* Makefile.in, configure.in, configure,
[fw/sdcc] / src / SDCCargs.h
index 1a379101356107fe6326e9d21e3a7b90c685decc..5a143d6ffa8786e35a4e37655f021488bdf684bd 100644 (file)
 
 /** Definition of the structures used by the options parser.  The port
     may implement one of these for any options it wants parsed
-    automatically. 
+    automatically.
 */
 #ifndef SDCCARGS_H
 #define SDCCARGS_H
 
+/** Specifies option argument types.  */
+enum cl_opt_arg_type {
+  CLAT_BOOLEAN = 0, /* has to be zero! */
+  CLAT_INTEGER,
+  CLAT_STRING,
+  CLAT_SET,
+  CLAT_ADD_SET
+};
+
 /** Table of all options supported by all ports.
     This table provides:
       * A reference for all options.
       * An easy way to maintain help for the options.
       * Automatic support for setting flags on simple options.
 */
-typedef struct {
+typedef struct
+  {
     /** The short option character e.g. 'h' for -h.  0 for none. */
     char shortOpt;
     /** Long option e.g. "--help".  Includes the -- prefix.  NULL for
@@ -44,10 +54,12 @@ typedef struct {
     /** Pointer to an int that will be incremented every time the
         option is encountered.  May be NULL.
     */
-    int *pparameter;
+    void *pparameter;
     /** Help text to go with this option.  May be NULL. */
     const char *help;
-} OPTION;
+    /** Optin argument type */
+    enum cl_opt_arg_type arg_type;
+  } OPTION;
 
 char *getStringArg(const char *szStart, char **argv, int *pi, int argc);
 int getIntArg(const char *szStart, char **argv, int *pi, int argc);