diff options
author | giraffedata <giraffedata@9d0c8265-081b-0410-96cb-a4ca84ce46f8> | 2019-08-18 16:16:23 +0000 |
---|---|---|
committer | giraffedata <giraffedata@9d0c8265-081b-0410-96cb-a4ca84ce46f8> | 2019-08-18 16:16:23 +0000 |
commit | 003388774ea92a2665bb782b3e3d2d17c9029144 (patch) | |
tree | f12a51dd02618f466e6565c6f1316ae20bb9f9bc /lib/util/shhopt.h | |
parent | 841ff875ec87eccf3734dbee2d5d1789349c900a (diff) | |
download | netpbm-mirror-003388774ea92a2665bb782b3e3d2d17c9029144.tar.gz netpbm-mirror-003388774ea92a2665bb782b3e3d2d17c9029144.tar.xz netpbm-mirror-003388774ea92a2665bb782b3e3d2d17c9029144.zip |
remove --help from examples
git-svn-id: http://svn.code.sf.net/p/netpbm/code/trunk@3660 9d0c8265-081b-0410-96cb-a4ca84ce46f8
Diffstat (limited to 'lib/util/shhopt.h')
-rw-r--r-- | lib/util/shhopt.h | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/lib/util/shhopt.h b/lib/util/shhopt.h index 03f40cc5..b6d4cdfd 100644 --- a/lib/util/shhopt.h +++ b/lib/util/shhopt.h @@ -26,7 +26,6 @@ main ( int argc, char **argv ) { optEntry * option_def; MALLOCARRAY(option_def, 100); - OPTENT3(0, "help", OPT_FLAG, &help_flag, &help_spec, 0); OPTENT3(0, "height", OPT_INT, &height, &height_spec, 0); OPTENT3('n', "name", OPT_STRING, &name, &name_spec, 0); OPTENT3('v', "verbose", OPT_FLAG, &verbose_flag, NULL, 0); @@ -43,8 +42,6 @@ main ( int argc, char **argv ) { printf("argc=%d\n", argc); - printf("help_flag=%d\n", help_flag); - printf("help_spec=%d\n", help_spec); printf("height=%d\n", height); printf("height_spec=%d\n", height_spec); printf("name='%s'\n", name); @@ -76,7 +73,7 @@ main ( int argc, char **argv ) { Now run this program with something like - myprog -vg --name=Bryan --hei 4 "My first argument" --help + myprog -vg --name=Bryan --hei 4 "My first argument" --verbose or do it with opt.short_allowed=0 and @@ -184,7 +181,7 @@ typedef struct { unsigned int option_def_index = 0; optStruct *option_def = malloc(100*sizeof(optStruct)); - OPTENTRY('h', "help", OPT_FLAG, &help_flag, 0); + OPTENTRY('h', "verbose", OPT_FLAG, &verbose_flag, 0); OPTENTRY(0, "alphaout", OPT_STRING, &alpha_filename, 0); */ @@ -224,11 +221,11 @@ typedef struct { Here is an example: unsigned int option_def_index = 0; - unsigned int help_flag; + unsigned int verbose_flag; const char * alpha_filename unsigned int alpha_spec; MALLOCARRAY_NOFAIL(option_def, 100); - OPTENT3('h', "help", OPT_FLAG, &help_flag, NULL); + OPTENT3('h', "verbose", OPT_FLAG, &verbose_flag NULL); OPTENT3(0, "alphaout", OPT_STRING, &alpha_filename, &alpha_spec); */ |