2 * UCW Library -- Configuration files: only for internal use of conf-*.c
4 * (c) 2001--2006 Robert Spalek <robert@ucw.cz>
5 * (c) 2003--2006 Martin Mares <mj@ucw.cz>
7 * This software may be freely distributed and used according to the terms
8 * of the GNU Lesser General Public License.
11 #ifndef _UCW_CONF_INTERNAL_H
12 #define _UCW_CONF_INTERNAL_H
15 #define OP_MASK 0xff // only get the operation
16 #define OP_OPEN 0x100 // here we only get an opening brace instead of parameters
17 #define OP_1ST 0x200 // in the 1st phase selectors are recorded into the mask
18 #define OP_2ND 0x400 // in the 2nd phase real data are entered
20 extern char *cf_op_names[];
21 extern char *cf_type_names[];
23 uns cf_type_size(enum cf_type type, struct cf_user_type *utype);
24 char *cf_interpret_line(char *name, enum cf_operation op, int number, char **pars);
25 void cf_init_stack(void);
26 int cf_check_stack(void);
29 void cf_journal_swap(void);
30 void cf_journal_delete(void);
33 #define SEC_FLAG_DYNAMIC 0x80000000 // contains a dynamic attribute
34 #define SEC_FLAG_UNKNOWN 0x40000000 // ignore unknown entriies
35 #define SEC_FLAG_CANT_COPY 0x20000000 // contains lists or parsers
36 #define SEC_FLAG_NUMBER 0x0fffffff // number of entries
37 enum cf_commit_mode { CF_NO_COMMIT, CF_COMMIT, CF_COMMIT_ALL };
38 extern struct cf_section cf_sections;
40 struct cf_item *cf_find_subitem(struct cf_section *sec, const char *name);
41 int cf_commit_all(enum cf_commit_mode cm);
42 void cf_add_dirty(struct cf_section *sec, void *ptr);