Initial Commit
[packages] / xemacs-packages / oo-browser / tree-w32 / input.h
1 /* ----------------------------------------------------------------------------\r
2  * File    : input.h\r
3  * Purpose : header file for input.c\r
4  * ----------------------------------------------------------------------------\r
5  */\r
6 \r
7 #define TOKEN_MAXSIZ          1023             /* maximum size of token      */\r
8 #define INPUT_BUFSIZ          TOKEN_MAXSIZ + 1 /* allow for terminating null */\r
9 /*\r
10  *  #define DELIMITER_BEGIN_LIST '{'\r
11  *  #define DELIMITER_END_LIST   '}'\r
12  */ \r
13 \r
14 /* Possible token types in file */\r
15 \r
16 enum { TOKEN_LABEL,\r
17 /*\r
18  *     TOKEN_BEGIN_LIST,\r
19  *     TOKEN_END_LIST,\r
20  */\r
21        TOKEN_EOF };\r
22 \r
23 \r
24 typedef enum { \r
25    ERR_OPENFAIL,\r
26    ERR_EMPTYFILE,\r
27    ERR_MEMALLOC,\r
28    ERR_NOBEGIN,\r
29    ERR_NOEND,\r
30    ERR_NOROOT,\r
31    ERR_MANYROOT,\r
32    ERR_NONE,\r
33 } ErrCode;\r
34 \r
35 #define NUM_ERRS             7  /* don't count ERR_NONE */\r
36 \r
37 \r
38 Tree* ReadTreeFromFile (char* fname, ErrCode *error);\r
39 int SaveTreeToFile (Tree* tree, char* fname);\r
40 \r