+/**
+ * opt_early_parse - parse early arguments.
+ * @argc: argc
+ * @argv: argv array.
+ * @errlog: the function to print errors
+ *
+ * There are times when you want to parse some arguments before any other
+ * arguments; this is especially important for debugging flags (eg. --verbose)
+ * when you have complicated callbacks in option processing.
+ *
+ * You can use opt_early_parse() to only parse options registered with
+ * opt_register_earlyarg()/opt_register_early_noarg() or
+ * OPT_EARLY_WITHOUT_ARG/OPT_EARLY_WITH_ARG entries in tables registered with
+ * opt_register_table().
+ *
+ * Note that unlike opt_parse(), argc and argv are not altered.
+ *
+ * Example:
+ * if (!opt_early_parse(argc, argv, opt_log_stderr)) {
+ * printf("You screwed up, aborting!\n");
+ * exit(1);
+ * }
+ *
+ * See Also:
+ * opt_parse()
+ */
+bool opt_early_parse(int argc, char *argv[],
+ void (*errlog)(const char *fmt, ...));
+
+/**
+ * opt_early_parse_incomplete - parse early arguments, ignoring unknown ones.
+ * @argc: argc
+ * @argv: argv array.
+ * @errlog: the function to print errors
+ *
+ * If you have plugins, you might need to do early parsing (eg. to find the
+ * plugin directory) but you don't know what options the plugins will want.
+ *
+ * Thus, this function is just like opt_early_parse, but ignores unknown options.
+ *
+ * Example:
+ * if (!opt_early_parse_incomplete(argc, argv, opt_log_stderr)) {
+ * printf("You screwed up, aborting!\n");
+ * exit(1);
+ * }
+ *
+ * See Also:
+ * opt_early_parse()
+ */
+bool opt_early_parse_incomplete(int argc, char *argv[],
+ void (*errlog)(const char *fmt, ...));
+
+
+/**
+ * opt_free_table - reset the opt library.
+ *
+ * This frees the internal memory and returns counters to zero. Call
+ * this as the last opt function to avoid memory leaks. You can also
+ * use this function to reset option handling to its initial state (no
+ * options registered).
+ */
+void opt_free_table(void);
+
+/**
+ * opt_set_alloc - set alloc/realloc/free function for opt to use.
+ * @allocfn: allocator function
+ * @reallocfn: reallocator function, ptr may be NULL, size never 0.
+ * @freefn: free function
+ *
+ * By default opt uses malloc/realloc/free, and simply crashes if they fail.
+ * You can set your own variants here.
+ */
+void opt_set_alloc(void *(*allocfn)(size_t size),
+ void *(*reallocfn)(void *ptr, size_t size),
+ void (*freefn)(void *ptr));
+