Changeset 3444
- Timestamp:
- 08/08/07 16:32:17 (1 year ago)
- Files:
-
- branches/common-nfo/tools/nfotiser/Makefile (modified) (2 diffs)
- branches/common-nfo/tools/nfotiser/extern.h (modified) (1 diff)
- branches/common-nfo/tools/nfotiser/nfotiser.h (modified) (2 diffs)
- branches/common-nfo/tools/nfotiser/parser.c (added)
- branches/common-nfo/tools/nfotiser/pfile.c (added)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
branches/common-nfo/tools/nfotiser/Makefile
r3443 r3444 35 35 categories.c \ 36 36 dbscheme.S \ 37 pfile.c \ 38 parser.c \ 37 39 main.c 38 40 … … 67 69 dbscheme.o: dbscheme.S mknfodb.sql 68 70 categories.o: nfotiser.h 71 parser.o: nfotiser.h 72 pfile.o: extern.h nfotiser.h branches/common-nfo/tools/nfotiser/extern.h
r3443 r3444 14 14 #include "nfotiser.h" 15 15 16 /* categories.c */ 17 extern const struct categories categories[]; 18 const char *category(const char *); 16 __BEGIN_DECLS 19 17 /* dbscheme.S */ 20 18 extern const char dbscheme[]; 19 __END_DECLS 21 20 22 21 #endif branches/common-nfo/tools/nfotiser/nfotiser.h
r3443 r3444 10 10 #define NFOTISER_NFOTISER_H 11 11 12 #include <sys/queue.h> 13 12 14 struct categories { 13 15 const char *catname; … … 15 17 }; 16 18 19 enum parser_kwtype { 20 KWT_NORMAL, 21 KWT_MULTI, 22 KWT_ITERATED, 23 KWT_MULTITER 24 }; 25 26 enum parser_argtype { 27 ARGT_STRING, 28 ARGT_INTEGER 29 }; 30 31 #ifndef parser_kwords 32 #define parser_kwords int 17 33 #endif 34 35 struct parser_keywords { 36 const char *kwprefix; 37 parser_kwords kwnum; 38 enum parser_kwtype kwtype; 39 enum parser_argtype argtype; 40 }; 41 42 struct parser_res { 43 CIRCLEQ_ENTRY(parser_res) e; 44 parser_kwords keyword; 45 char *kw_multi; 46 unsigned kw_iter; 47 char *value; 48 }; 49 50 CIRCLEQ_HEAD(parser_result, parser_res); 51 52 __BEGIN_DECLS 53 /* categories.c */ 54 extern const struct categories categories[]; 55 const char *category(const char *); 56 /* parser.c */ 57 struct parser_result *nfo_parse(int fd); 58 __END_DECLS 59 60 #endif


