*
* DO NOT EDIT THIS FILE (options.h)
*
- * It has been AutoGen-ed December 27, 2012 at 12:59:05 PM by AutoGen 5.17.0pre12
+ * It has been AutoGen-ed January 4, 2013 at 04:15:49 PM by AutoGen 5.17.1pre14
* From the definitions funcs.def
* and the template file options_h
*
* This file defines all the global structures and special values
* used in the automated option processing library.
*
- * Automated Options Copyright (C) 1992-2012 by Bruce Korb
+ * Automated Options Copyright (C) 1992-2013 by Bruce Korb
*
* * AutoOpts is free software: you can redistribute it and/or modify it
* under the terms of the GNU Lesser General Public License as published
// END-CONFIGURED-HEADERS
/**
- * Defined to normal value of EX_USAGE. Used to indicate that paged usage
+ * Defined to abnormal value of EX_USAGE. Used to indicate that paged usage
* was requested. It is used to distinguish a --usage from a --help request.
* --usage is abbreviated and --help gives as much help as possible.
*/
#define AO_EXIT_REQ_USAGE 10064
-/*
+/**
* PUBLIC DEFINES
*
* The following defines may be used in applications that need to test the
* See the relevant generated header file to determine which and what
* values for "opt_name" are available.
*/
-#define OPTIONS_STRUCT_VERSION 151552
-#define OPTIONS_VERSION_STRING "37:0:12"
+#define OPTIONS_STRUCT_VERSION 151553
+#define OPTIONS_VERSION_STRING "37:1:12"
#define OPTIONS_MINIMUM_VERSION 102400
#define OPTIONS_MIN_VER_STRING "25:0:0"
+#define OPTIONS_DOTTED_VERSION "37.1"
#define OPTIONS_VER_TO_NUM(_v, _r) (((_v) * 4096) + (_r))
+/**
+ * Option argument types. This must fit in the OPTST_ARG_TYPE_MASK
+ * field of the fOptState field of an option descriptor (tOptDesc).
+ * It will be a problem to extend beyond 4 bits.
+ */
typedef enum {
- OPARG_TYPE_NONE = 0,
- OPARG_TYPE_STRING = 1, /* default type/ vanilla string */
- OPARG_TYPE_ENUMERATION = 2, /* opt arg is an enum (keyword list) */
- OPARG_TYPE_BOOLEAN = 3, /* opt arg is boolean-valued */
- OPARG_TYPE_MEMBERSHIP = 4, /* opt arg sets set membership bits */
- OPARG_TYPE_NUMERIC = 5, /* opt arg is a long int */
- OPARG_TYPE_HIERARCHY = 6, /* option arg is hierarchical value */
- OPARG_TYPE_FILE = 7, /* option arg names a file */
- OPARG_TYPE_TIME = 8, /* opt arg is a time duration */
- OPARG_TYPE_FLOAT = 9, /* opt arg is a floating point num */
- OPARG_TYPE_DOUBLE = 10, /* opt arg is a double prec. float */
- OPARG_TYPE_LONG_DOUBLE = 11, /* opt arg is a long double prec. */
- OPARG_TYPE_LONG_LONG = 12 /* opt arg is a long long int */
+ OPARG_TYPE_NONE = 0, /**< does not take an argument */
+ OPARG_TYPE_STRING = 1, /**< default type/ vanilla string */
+ OPARG_TYPE_ENUMERATION = 2, /**< opt arg is an enum (keyword list) */
+ OPARG_TYPE_BOOLEAN = 3, /**< opt arg is boolean-valued */
+ OPARG_TYPE_MEMBERSHIP = 4, /**< opt arg sets set membership bits */
+ OPARG_TYPE_NUMERIC = 5, /**< opt arg is a long int */
+ OPARG_TYPE_HIERARCHY = 6, /**< option arg is hierarchical value */
+ OPARG_TYPE_FILE = 7, /**< option arg names a file */
+ OPARG_TYPE_TIME = 8, /**< opt arg is a time duration */
+ OPARG_TYPE_FLOAT = 9, /**< opt arg is a floating point num */
+ OPARG_TYPE_DOUBLE = 10, /**< opt arg is a double prec. float */
+ OPARG_TYPE_LONG_DOUBLE = 11, /**< opt arg is a long double prec. */
+ OPARG_TYPE_LONG_LONG = 12 /**< opt arg is a long long int */
} teOptArgType;
+/**
+ * value descriptor for sub options
+ */
typedef struct optionValue {
- teOptArgType valType;
- char* pzName;
+ teOptArgType valType; /**< which argument type */
+ char * pzName; /**< name of the sub-option */
union {
- char strVal[1]; /* OPARG_TYPE_STRING */
- unsigned int enumVal; /* OPARG_TYPE_ENUMERATION */
- unsigned int boolVal; /* OPARG_TYPE_BOOLEAN */
- unsigned long setVal; /* OPARG_TYPE_MEMBERSHIP */
- long longVal; /* OPARG_TYPE_NUMERIC */
- void* nestVal; /* OPARG_TYPE_HIERARCHY */
+ char strVal[1]; /**< OPARG_TYPE_STRING */
+ unsigned int enumVal; /**< OPARG_TYPE_ENUMERATION */
+ unsigned int boolVal; /**< OPARG_TYPE_BOOLEAN */
+ unsigned long setVal; /**< OPARG_TYPE_MEMBERSHIP */
+ long longVal; /**< OPARG_TYPE_NUMERIC */
+ void* nestVal; /**< OPARG_TYPE_HIERARCHY */
} v;
} tOptionValue;
+/**
+ * file argument state and handling.
+ */
typedef enum {
- FTYPE_MODE_MAY_EXIST = 0x00,
- FTYPE_MODE_MUST_EXIST = 0x01,
- FTYPE_MODE_MUST_NOT_EXIST = 0x02,
- FTYPE_MODE_EXIST_MASK = 0x03,
- FTYPE_MODE_NO_OPEN = 0x00,
- FTYPE_MODE_OPEN_FD = 0x10,
- FTYPE_MODE_FOPEN_FP = 0x20,
- FTYPE_MODE_OPEN_MASK = 0x30
+ FTYPE_MODE_MAY_EXIST = 0x00, /**< may or may not exist */
+ FTYPE_MODE_MUST_EXIST = 0x01, /**< must pre-exist */
+ FTYPE_MODE_MUST_NOT_EXIST = 0x02, /**< must *not* pre-exist */
+ FTYPE_MODE_EXIST_MASK = 0x03, /**< mask for these bits */
+ FTYPE_MODE_NO_OPEN = 0x00, /**< leave file closed */
+ FTYPE_MODE_OPEN_FD = 0x10, /**< call open(2) */
+ FTYPE_MODE_FOPEN_FP = 0x20, /**< call fopen(3) */
+ FTYPE_MODE_OPEN_MASK = 0x30 /**< open/fopen/not open */
} teOptFileType;
+/**
+ * the open flag bits or the mode string, depending on the open type.
+ */
typedef union {
- int file_flags;
- char const * file_mode;
+ int file_flags; /**< open(2) flag bits */
+ char const * file_mode; /**< fopen(3) mode string */
} tuFileMode;
typedef struct argList tArgList;
char const * apzArgs[MIN_ARG_ALLOC_CT];
};
-/*
+/**
* Bits in the fOptState option descriptor field.
*/
* and may be subject to change.
*/
-/*
+/**
* Define the processing state flags
*/
#define OPTION_LIMIT SHRT_MAX
#define NO_EQUIVALENT (OPTION_LIMIT+1)
+/**
+ * Option argument value. Which is valid is determined by:
+ * (fOptState & OPTST_ARG_TYPE_MASK) >> OPTST_ARG_TYPE_SHIFT
+ * which will yield one of the teOptArgType values.
+ */
typedef union {
char const * argString;
uintptr_t argEnum;
opt_state_mask_t fOptState; /* PUBLIC */
unsigned int reserved;
- opt_arg_union_t optArg; /* PUBLIC */
+ opt_arg_union_t optArg; /* PUBLIC */
void * optCookie; /* PUBLIC */
int const * const pOptMust;
*
* DO NOT EDIT THIS FILE (usage-txt.h)
*
- * It has been AutoGen-ed December 27, 2012 at 12:59:03 PM by AutoGen 5.17.0pre12
+ * It has been AutoGen-ed January 4, 2013 at 04:15:47 PM by AutoGen 5.17.1pre14
* From the definitions usage-txt.def
* and the template file usage-txt.tpl
* @file usage-txt.h
* they may substitute translated strings using a procedure that steps through
* all the string pointers.
*
- * Copyright (C) 1992-2012 Bruce Korb, all rights reserved.
+ * Copyright (C) 1992-2013 Bruce Korb, all rights reserved.
* This is free software. It is licensed for use, modification and
* redistribution under the terms of the
* GNU Lesser General Public License, version 3 or later
/* 260 */ "\tThis is less than the minimum library version: \0"
/* 310 */ "strdup of %d byte string failed\n\0"
/* 343 */ "Automated Options version %s\n"
- "\tcopyright (c) 1999-2012 by Bruce Korb - all rights reserved\n\0"
+ "\tCopyright (C) 1999-2013 by Bruce Korb - all rights reserved\n\0"
/* 434 */ "AutoOpts lib error: defaulted to option with optional arg\n\0"
/* 493 */ "(AutoOpts bug): Aliasing option is out of range.\0"
/* 543 */ "all\0"
puts(_("\tThis is less than the minimum library version: "));
#line 77 "../autoopts.c"
puts(_("strdup of %d byte string failed\n"));
-#line 122 "../version.c"
+#line 120 "../version.c"
puts(_("Automated Options version %s\n"
- "\tcopyright (c) 1999-2012 by Bruce Korb - all rights reserved\n"));
+ "\tCopyright (C) 1999-2013 by Bruce Korb - all rights reserved\n"));
#line 585 "../find.c"
puts(_("AutoOpts lib error: defaulted to option with optional arg\n"));
#line 53 "../alias.c"
puts(_("version, usage and configuration options:"));
#line 266 "../makeshell.c"
puts(_("Error %d (%s) from the pipe(2) syscall\n"));
-#line 162 "../version.c"
+#line 160 "../version.c"
puts(_("ERROR: version option argument '%c' invalid. Use:\n"
"\t'v' - version only\n"
"\t'c' - version and copyright\n"
puts(_("Write failure to output file"));
#line 307 "../usage.c"
puts(_("Write failure to output file"));
-#line 168 "../version.c"
+#line 166 "../version.c"
puts(_("Write failure to output file"));
#line 701 "../usage.c"
puts(_(" - reading file %s"));
#line 302 "../usage.c"
puts(_("\n"
"please send bug reports to: %s\n"));
-#line 106 "../version.c"
+#line 104 "../version.c"
puts(_("\n"
"please send bug reports to: %s\n"));
-#line 128 "../version.c"
+#line 126 "../version.c"
puts(_("\n"
"please send bug reports to: %s\n"));
#line 673 "../usage.c"