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 3456 - (show annotations) (download)
Thu Aug 9 13:18:23 2007 UTC (6 years, 6 months ago) by tg
File MIME type: text/plain
File size: 1267 byte(s)
fix
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_NORMAL,
22 KWT_MULTI,
23 KWT_ITERATED,
24 KWT_MULTITER
25 };
26
27 enum parser_argtype {
28 ARGT_STRING,
29 ARGT_INTEGER
30 };
31
32 #ifndef parser_kwords
33 #define parser_kwords int
34 #endif
35
36 struct parser_keywords {
37 const char *kwprefix;
38 parser_kwords kwnum;
39 enum parser_kwtype kwtype;
40 enum parser_argtype argtype;
41 };
42
43 struct parser_res {
44 CIRCLEQ_ENTRY(parser_res) e;
45 parser_kwords keyword;
46 char *kw_multi;
47 unsigned kw_iter;
48 char *value;
49 };
50
51 CIRCLEQ_HEAD(parser_result, parser_res);
52
53 __BEGIN_DECLS
54 /* categories.c */
55 extern const struct categories categories[];
56 const char *category(const char *);
57 /* parser.c */
58 struct parser_result *nfo_parse(int, const struct parser_keywords *);
59 const struct parser_keywords *parser_getkwbynum(parser_kwords,
60 const struct parser_keywords *);
61 void parser_dump(struct parser_res *, const struct parser_keywords *);
62 __END_DECLS
63
64 #endif

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