diff options
Diffstat (limited to 'lib/util')
-rw-r--r-- | lib/util/shhopt.c | 24 | ||||
-rw-r--r-- | lib/util/shhopt.h | 16 |
2 files changed, 20 insertions, 20 deletions
diff --git a/lib/util/shhopt.c b/lib/util/shhopt.c index 7f6e2899..d789a03b 100644 --- a/lib/util/shhopt.c +++ b/lib/util/shhopt.c @@ -521,12 +521,12 @@ optSetFatalFunc(void (*f)(const char *, ...)) /*------------------------------------------------------------------------ - | NAME optParseOptions + | NAME pm_optParseOptions | | FUNCTION Parse commandline options. | | SYNOPSIS #include "shhopt.h" - | void optParseOptions(int *argc, char *argv[], + | void pm_optParseOptions(int *argc, char *argv[], | optStruct opt[], int allowNegNum); | | INPUT argc Pointer to number of options. @@ -553,7 +553,7 @@ optSetFatalFunc(void (*f)(const char *, ...)) | Any error leads to program abortion. */ void -optParseOptions(int *argc, char *argv[], optStruct opt[], int allowNegNum) +pm_optParseOptions(int *argc, char *argv[], optStruct opt[], int allowNegNum) { int ai, /* argv index. */ optarg, /* argv index of option argument, or -1 if none. */ @@ -821,12 +821,12 @@ parse_long_option(char * const argv[], /*------------------------------------------------------------------------ - | NAME optParseOptions2 + | NAME pm_optParseOptions2 | | FUNCTION Parse commandline options. | | SYNOPSIS #include "shhopt.h" - | void optParseOptions2(int *argc, char *argv[], + | void pm_optParseOptions2(int *argc, char *argv[], | optStruct2 opt, unsigned long flags); | | INPUT argc Pointer to number of options. @@ -846,7 +846,7 @@ parse_long_option(char * const argv[], | extracted and stored in the variables or passed to | functions pointed to by entries in opt. | - | This differs from optParseOptions in that it accepts + | This differs from pm_optParseOptions in that it accepts | long options with just one hyphen and doesn't accept | any short options. It also has accomodations for | future expansion. @@ -857,10 +857,10 @@ parse_long_option(char * const argv[], | Any error leads to program abortion. */ void -optParseOptions2(int * const argc_p, char *argv[], const optStruct2 opt, +pm_optParseOptions2(int * const argc_p, char *argv[], const optStruct2 opt, const unsigned long flags) /*---------------------------------------------------------------------------- - This does the same thing as optParseOptions3(), except that there is no + This does the same thing as pm_optParseOptions3(), except that there is no "specified" return value. This function exists for backward compatibility. @@ -877,7 +877,7 @@ optParseOptions2(int * const argc_p, char *argv[], const optStruct2 opt, optFatal("Memory allocation failed (trying to allocate space for " "new-format option table)"); - optParseOptions3(argc_p, argv, opt3, sizeof(opt3), flags); + pm_optParseOptions3(argc_p, argv, opt3, sizeof(opt3), flags); free(opt3.opt_table); } @@ -902,7 +902,7 @@ zero_specified(optEntry opt_table[]) { /*------------------------------------------------------------------------ - | NAME optParseOptions3 + | NAME pm_optParseOptions3 | | FUNCTION Parse commandline options. | @@ -931,7 +931,7 @@ zero_specified(optEntry opt_table[]) { | extracted and stored in the variables or passed to | functions pointed to by entries in opt. | - | This differs from optParseOptions in that it accepts + | This differs from pm_optParseOptions in that it accepts | long options with just one hyphen and doesn't accept | any short options. It also has accomodations for | future expansion. @@ -942,7 +942,7 @@ zero_specified(optEntry opt_table[]) { | Any error leads to program abortion. */ void -optParseOptions3(int * const argc_p, char *argv[], const optStruct3 opt, +pm_optParseOptions3(int * const argc_p, char *argv[], const optStruct3 opt, const unsigned int optStructSize, const unsigned long flags) { int ai; /* argv index. */ diff --git a/lib/util/shhopt.h b/lib/util/shhopt.h index e5e138e1..6fad0c33 100644 --- a/lib/util/shhopt.h +++ b/lib/util/shhopt.h @@ -36,7 +36,7 @@ main ( int argc, char **argv ) { opt.allowNegNum = 1; - optParseOptions3(&argc, argv, opt, sizeof(opt), 0); + pm_optParseOptions3(&argc, argv, opt, sizeof(opt), 0); printf("argc=%d\n", argc); @@ -99,7 +99,7 @@ typedef enum { typedef struct { /* This structure describes a single program option in a form for - use by the optParseOptions() or optParseOptions2() function. + use by the pm_optParseOptions() or pm_optParseOptions2() function. */ char shortName; /* short option name. */ const char *longName; /* long option name, not including '--'. */ @@ -111,7 +111,7 @@ typedef struct { typedef struct { /* This structure describes a single program option in a form for - use by the optParseOptions3() function. + use by the pm_optParseOptions3() function. */ char shortName; /* short option name. */ const char *longName; /* long option name, not including '--' or '-' */ @@ -132,7 +132,7 @@ typedef struct { typedef struct { /* This structure describes the options of a program in a form for - use with the optParseOptions2() function. + use with the pm_optParseOptions2() function. */ unsigned char short_allowed; /* boolean */ /* The syntax may include short (i.e. one-character) options. @@ -149,7 +149,7 @@ typedef struct { } optStruct2; typedef struct { - /* Same as optStruct2, but for optParseOptions3() */ + /* Same as optStruct2, but for pm_optParseOptions3() */ unsigned char short_allowed; unsigned char allowNegNum; optEntry *opt_table; @@ -219,13 +219,13 @@ struct optNameValue { void optSetFatalFunc(void (*f)(const char *, ...)); -void optParseOptions(int *argc, char *argv[], +void pm_optParseOptions(int *argc, char *argv[], optStruct opt[], int allowNegNum); void -optParseOptions2(int * const argc_p, char *argv[], const optStruct2 opt, +pm_optParseOptions2(int * const argc_p, char *argv[], const optStruct2 opt, const unsigned long flags); void -optParseOptions3(int * const argc_p, char *argv[], const optStruct3 opt, +pm_optParseOptions3(int * const argc_p, char *argv[], const optStruct3 opt, const unsigned int optStructSize, const unsigned long flags); void |