]>
Commit | Line | Data |
---|---|---|
2bd0ea18 | 1 | /* |
da23017d NS |
2 | * Copyright (c) 2000-2001,2005 Silicon Graphics, Inc. |
3 | * All Rights Reserved. | |
2bd0ea18 NS |
4 | */ |
5 | ||
6 | struct field; | |
7 | ||
8 | typedef struct flist { | |
9 | char *name; | |
dfc130f3 | 10 | const struct field *fld; |
2bd0ea18 NS |
11 | struct flist *child; |
12 | struct flist *sibling; | |
13 | int low; | |
14 | int high; | |
15 | int flags; | |
16 | int offset; | |
17 | } flist_t; | |
18 | ||
19 | /* | |
20 | * Flags for flist | |
21 | */ | |
22 | #define FL_OKLOW 1 | |
23 | #define FL_OKHIGH 2 | |
24 | ||
25 | typedef enum tokty { | |
26 | TT_NAME, TT_NUM, TT_STRING, TT_LB, TT_RB, TT_DASH, TT_DOT, TT_END | |
27 | } tokty_t; | |
28 | ||
29 | typedef struct ftok { | |
30 | char *tok; | |
31 | tokty_t tokty; | |
32 | } ftok_t; | |
33 | ||
34 | extern void flist_free(flist_t *fl); | |
35 | extern flist_t *flist_make(char *name); | |
36 | extern int flist_parse(const struct field *fields, flist_t *fl, void *obj, | |
37 | int startoff); | |
38 | extern void flist_print(flist_t *fl); | |
39 | extern flist_t *flist_scan(char *name); | |
b64af2c4 | 40 | extern flist_t *flist_find_ftyp(const field_t *fields, fldt_t type); |