+Definition of CMDLINE_POPT for command arguments parsing support.
authorshort <>
Tue, 28 Oct 2003 14:04:48 +0000 (14:04 +0000)
committershort <>
Tue, 28 Oct 2003 14:04:48 +0000 (14:04 +0000)
Fixed 'command_name --help' to prevent exit of captive-cmdline(1).

src/client/cmdline/main.h

index 9d603b6..11c23a8 100644 (file)
 #include <captive/client-vfs.h>
 
 
+#define CMDLINE_POPT(longname,shortname,argInfoP,argP,descripP,argDescripP) \
+               { \
+                       longName: (longname), \
+                       shortName: (shortname), \
+                       argInfo: (argInfoP), \
+                       arg: (void *)argP, \
+                       val: 0, \
+                       descrip: (descripP), \
+                       argDescrip: (argDescripP), \
+               }
+extern const struct poptOption cmdline_poptHelpOptions[];
+#define CMDLINE_POPT_AUTOHELP \
+               { NULL,'\0',POPT_ARG_INCLUDE_TABLE,(struct poptOption *)cmdline_poptHelpOptions,0,"Help options:",NULL },
+
+
 #define CMDLINE_MAIN_ERROR (cmdline_main_error_quark())
 GQuark cmdline_main_error_quark(void);