-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathparse.h
More file actions
66 lines (44 loc) · 1.34 KB
/
parse.h
File metadata and controls
66 lines (44 loc) · 1.34 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
#ifndef PARSE_H
#define PARSE_H
#include "utildefs.h"
#define UTIL_MAX_RANGES 512
#define UTIL_BUFFER_LEN 2048
void parse_print_white( FILE *, int );
void parse_print_back( FILE *, int );
char *parse_strip_white( char * );
int parse_read_line( FILE *, char * );
int parse_stokenize( char *, char **, char * );
int parse_ftokenize( FILE *, char *, char **, char * );
int parse_read_ranges( char *, int *** );
long parse_read_ranges_long( char *, long *** );
/**
* This function prints out a formatted line describing
* the function of interest; it takes the flag name, the
* value of that flag, if it has one, and the description
* of the flag variable
*
* @param flag The string representing the flag, i.e. "-f"
* @param val The value of the flag's variable
* @param desc Description of the variable's meaning
*/
void print_usage_line( char *, char *, char * );
typedef struct snode
{
int id;
int len;
char *str;
int deg;
int alloc;
struct snode *child;
char op[SNODE_OP_SIZE];
char optype;
} snode_t;
int snode_init( snode_t *obj_in, int len_in );
int snode_alloc( snode_t *obj_in, int len_in );
int snode_free( snode_t *obj_in );
int snode_set_string( snode_t *, char * );
int snode_set_op( snode_t *, char *, char );
int snode_add_child( snode_t *, char * );
int stree_free( snode_t * );
int stree_print( snode_t *, int );
#endif