Mercurial > hg > xemacs-beta
comparison pkg-src/tree-x/input.h @ 167:85ec50267440 r20-3b10
Import from CVS: tag r20-3b10
| author | cvs |
|---|---|
| date | Mon, 13 Aug 2007 09:45:46 +0200 |
| parents | 0132846995bd |
| children |
comparison
equal
deleted
inserted
replaced
| 166:7a77eb660975 | 167:85ec50267440 |
|---|---|
| 7 #define TOKEN_MAXSIZ 1023 /* maximum size of token */ | 7 #define TOKEN_MAXSIZ 1023 /* maximum size of token */ |
| 8 #define INPUT_BUFSIZ TOKEN_MAXSIZ + 1 /* allow for terminating null */ | 8 #define INPUT_BUFSIZ TOKEN_MAXSIZ + 1 /* allow for terminating null */ |
| 9 /* | 9 /* |
| 10 * #define DELIMITER_BEGIN_LIST '{' | 10 * #define DELIMITER_BEGIN_LIST '{' |
| 11 * #define DELIMITER_END_LIST '}' | 11 * #define DELIMITER_END_LIST '}' |
| 12 */ | 12 */ |
| 13 | 13 |
| 14 /* Possible token types in file */ | 14 /* Possible token types in file */ |
| 15 | 15 |
| 16 enum { TOKEN_LABEL, | 16 enum { TOKEN_LABEL, |
| 17 /* | 17 /* |
| 19 * TOKEN_END_LIST, | 19 * TOKEN_END_LIST, |
| 20 */ | 20 */ |
| 21 TOKEN_EOF }; | 21 TOKEN_EOF }; |
| 22 | 22 |
| 23 | 23 |
| 24 typedef enum { | 24 typedef enum { |
| 25 ERR_OPENFAIL, | 25 ERR_OPENFAIL, |
| 26 ERR_EMPTYFILE, | 26 ERR_EMPTYFILE, |
| 27 ERR_MEMALLOC, | 27 ERR_MEMALLOC, |
| 28 ERR_NOBEGIN, | 28 ERR_NOBEGIN, |
| 29 ERR_NOEND, | 29 ERR_NOEND, |
| 30 ERR_NOROOT, | 30 ERR_NOROOT, |
| 31 ERR_MANYROOT, | 31 ERR_MANYROOT, |
| 32 ERR_NONE, | 32 ERR_NONE |
| 33 } ErrCode; | 33 } ErrCode; |
| 34 | 34 |
| 35 #define NUM_ERRS 7 /* don't count ERR_NONE */ | 35 #define NUM_ERRS 7 /* don't count ERR_NONE */ |
| 36 | 36 |
| 37 | 37 |
| 38 Tree* ReadTreeFromFile(char *fname, ErrCode *error); | |
| 39 void SetNodeLabelAndValue(Tree *node, char *label_and_value); | |
| 40 int SaveTreeToFile(Tree *tree, char *fname); |
