]> mj.ucw.cz Git - libucw.git/blobdiff - ucw/opt-internal.h
Table: renamed table_col_order[_by_name] -> table_set_col_order[_by_name]
[libucw.git] / ucw / opt-internal.h
index 05694ca5d8bc5a78af3c8111eb35b235da5c1781..77434d7a63a055208e49cadb77f06f70f3960fd6 100644 (file)
 #define _UCW_OPT_INTERNAL_H
 
 #ifdef CONFIG_UCW_CLEAN_ABI
-#define opt_failure ucw_opt_failure
 #define opt_precompute ucw_opt_precompute
 #endif
 
+enum opt_conf_state {
+  OPT_CONF_HOOK_BEGIN,
+  OPT_CONF_HOOK_CONFIG,
+  OPT_CONF_HOOK_OTHERS,
+};
+
+struct opt_context {
+  const struct opt_section * options;
+  struct opt_precomputed * opts;
+  struct opt_precomputed ** shortopt;
+  struct opt_item ** hooks;
+  int opt_count;
+  int hook_count;
+  int positional_max;
+  int positional_count;
+  bool stop_parsing;
+  enum opt_conf_state conf_state;
+};
+
 struct opt_precomputed {
   struct opt_item * item;
   const char * name;
@@ -23,7 +41,6 @@ struct opt_precomputed {
   short count;
 };
 
-void opt_failure(const char * mesg, ...) FORMAT_CHECK(printf,1,2) NONRET;
 void opt_precompute(struct opt_precomputed *opt, struct opt_item *item);
 
 #endif