English Language flag
// Log In
// CVSweb
Project: FreeWRT
// Summary // Activity // Search // Tracker // Lists // News // SCM // Wiki

SCM Repository

ViewVC logotype

Contents of /branches/common-nfo/tools/nfotiser/nfotiser.h

Parent Directory Parent Directory | Revision Log Revision Log


Revision 3471 - (show annotations) (download)
Thu Aug 9 16:28:02 2007 UTC (6 years, 6 months ago) by tg
File MIME type: text/plain
File size: 1617 byte(s)
work on lookup stuff; next: unbreak varexpand...
1 /*-
2 * $FreeWRT$
3 *-
4 * This file is part of the FreeWRT project. FreeWRT is copyrighted
5 * material, please see the LICENCE file in the top-level directory
6 * or at http://www.freewrt.org/licence for details.
7 */
8
9 #ifndef NFOTISER_NFOTISER_H
10 #define NFOTISER_NFOTISER_H
11
12 #include <sys/queue.h>
13 #include "nfohelpr.h"
14
15 struct categories {
16 const char *catname;
17 const char *catdesc;
18 };
19
20 enum parser_kwtype {
21 KWT_INVALID,
22 KWT_NORMAL,
23 KWT_MULTI,
24 KWT_ITERATED,
25 KWT_MULTITER,
26 KWT_MULTITOP
27 };
28
29 enum parser_argtype {
30 ARGT_STRING,
31 ARGT_INTEGER
32 };
33
34 #ifndef parser_kwords
35 #define parser_kwords int
36 #endif
37
38 struct parser_keywords {
39 const char *kwprefix;
40 parser_kwords kwnum;
41 enum parser_kwtype kwtype;
42 enum parser_argtype argtype;
43 };
44
45 struct parser_res {
46 CIRCLEQ_ENTRY(parser_res) e;
47 parser_kwords keyword;
48 enum parser_kwtype itype;
49 char *kw_multi;
50 unsigned kw_iter;
51 char *value;
52 };
53
54 CIRCLEQ_HEAD(parser_result, parser_res);
55
56 __BEGIN_DECLS
57 /* categories.c */
58 extern const struct categories categories[];
59 const char *category(const char *);
60 /* parser.c */
61 struct parser_result *nfo_parse(int, const struct parser_keywords *);
62 const struct parser_keywords *parser_getkwbynum(parser_kwords,
63 const struct parser_keywords *);
64 void parser_dump(struct parser_res *, const struct parser_keywords *);
65 void parser_free(struct parser_result *);
66 EXTERN char *parser_errpfx I__(NULL);
67 /* pfile.c */
68 struct parser_res *parse_lookupbyname(struct parser_result *, const char *);
69 struct parser_res *parse_lookup(struct parser_result *, struct parser_res *);
70 char *varnameck(const char *, const char *);
71 __END_DECLS
72
73 #endif

root@freewrt.org:443
ViewVC Help
Powered by ViewVC 1.1.20