]> mj.ucw.cz Git - libucw.git/blobdiff - ucw/conf-internal.h
Doc: Updated the list of contributors
[libucw.git] / ucw / conf-internal.h
index a47ab46678303ac2f5b03121be93d9f789eb2e96..b4ff767f438d5301b3a0ad4a7a9ddb7e394b89a3 100644 (file)
 
 #include <ucw/threads.h>
 
 
 #include <ucw/threads.h>
 
+#ifdef CONFIG_UCW_CLEAN_ABI
+#define cf_add_dirty ucw_cf_add_dirty
+#define cf_commit_all ucw_cf_commit_all
+#define cf_done_stack ucw_cf_done_stack
+#define cf_find_subitem ucw_cf_find_subitem
+#define cf_init_stack ucw_cf_init_stack
+#define cf_interpret_line ucw_cf_interpret_line
+#define cf_journal_delete ucw_cf_journal_delete
+#define cf_journal_swap ucw_cf_journal_swap
+#define cf_load_default ucw_cf_load_default
+#define cf_obtain_context ucw_cf_obtain_context
+#define cf_op_names ucw_cf_op_names
+#define cf_sections ucw_cf_sections
+#define cf_type_names ucw_cf_type_names
+#define cf_type_size ucw_cf_type_size
+#endif
+
 /* Item stack used by conf-intr.c */
 
 #define MAX_STACK_SIZE 16
 /* Item stack used by conf-intr.c */
 
 #define MAX_STACK_SIZE 16
@@ -42,26 +59,25 @@ struct dirty_section {
 struct cf_context {
   struct mempool *pool;
   int is_active;
 struct cf_context {
   struct mempool *pool;
   int is_active;
-  int need_journal;
-  int def_loaded;
+  int config_loaded;                   // at least one config file was loaded
   struct cf_parser_state *parser;
   struct cf_parser_state *parser;
-  uns everything_committed;            // after the 1st load, this flag is set on
-  uns postpone_commit;                 // used internally by cf_getopt()
-  uns other_options;
-  clist conf_entries;
+  uns everything_committed;            // did we already commit each section?
+  uns postpone_commit;                 // counter of calls to cf_open_group()
+  uns other_options;                   // used internally by cf_getopt()
+  clist conf_entries;                  // files/strings to reload
+  struct cf_journal_item *journal;     // journalling
+  int enable_journal;
   struct old_pools *pools;
   struct old_pools *pools;
-  struct cf_journal_item *journal;
-  struct item_stack stack[MAX_STACK_SIZE];
+  struct item_stack stack[MAX_STACK_SIZE];     // interpreter stack
   uns stack_level;
   uns stack_level;
-  uns initialized;
   struct cf_section sections;          // root section
   struct cf_section sections;          // root section
+  uns sections_initialized;
   dirtsec_t dirty;                     // dirty sections
   uns dirties;
 };
 
 /* conf-ctxt.c */
   dirtsec_t dirty;                     // dirty sections
   uns dirties;
 };
 
 /* conf-ctxt.c */
-static inline struct cf_context *
-cf_get_context(void)
+static inline struct cf_context *cf_get_context(void)
 {
   struct cf_context *cc = ucwlib_thread_context()->cf_context;
   ASSERT(cc->is_active);
 {
   struct cf_context *cc = ucwlib_thread_context()->cf_context;
   ASSERT(cc->is_active);
@@ -85,7 +101,7 @@ extern char *cf_type_names[];
 uns cf_type_size(enum cf_type type, struct cf_user_type *utype);
 char *cf_interpret_line(struct cf_context *cc, char *name, enum cf_operation op, int number, char **pars);
 void cf_init_stack(struct cf_context *cc);
 uns cf_type_size(enum cf_type type, struct cf_user_type *utype);
 char *cf_interpret_line(struct cf_context *cc, char *name, enum cf_operation op, int number, char **pars);
 void cf_init_stack(struct cf_context *cc);
-int cf_check_stack(struct cf_context *cc);
+int cf_done_stack(struct cf_context *cc);
 
 /* conf-journal.c */
 void cf_journal_swap(void);
 
 /* conf-journal.c */
 void cf_journal_swap(void);
@@ -103,4 +119,7 @@ struct cf_item *cf_find_subitem(struct cf_section *sec, const char *name);
 int cf_commit_all(enum cf_commit_mode cm);
 void cf_add_dirty(struct cf_section *sec, void *ptr);
 
 int cf_commit_all(enum cf_commit_mode cm);
 void cf_add_dirty(struct cf_section *sec, void *ptr);
 
+/* conf-getopt.c */
+void cf_load_default(struct cf_context *cc);
+
 #endif
 #endif