Home | History | Annotate | Download | only in toolutil

Lines Matching defs:option

35             /* process an option */
36 UOption *option=NULL;
39 /* process a long option */
44 /* search for the option string */
48 option=options+j;
52 if(option==NULL) {
53 /* no option matches */
56 option->doesOccur=1;
58 if(option->hasArg!=UOPT_NO_ARG) {
59 /* parse the argument for the option, if any */
61 /* argument in the next argv[], and there is not an option in there */
62 option->value=argv[++i];
63 } else if(option->hasArg==UOPT_REQUIRES_ARG) {
65 option->doesOccur=0;
70 if(option->optionFn!=NULL && option->optionFn(option->context, option)<0) {
71 /* the option function was called and returned an error */
72 option->doesOccur=0;
79 /* search for the option letter */
83 option=options+j;
87 if(option==NULL) {
88 /* no option matches */
91 option->doesOccur=1;
93 if(option->hasArg!=UOPT_NO_ARG) {
94 /* parse the argument for the option, if any */
97 option->value=arg;
98 /* do not process the rest of this arg as option letters */
101 /* argument in the next argv[], and there is not an option in there */
102 option->value=argv[++i];
105 } else if(option->hasArg==UOPT_REQUIRES_ARG) {
107 option->doesOccur=0;
112 if(option->optionFn!=NULL && option->optionFn(option->context, option)<0) {
113 /* the option function was called and returned an error */
114 option->doesOccur=0;
118 /* get the next option letter */
119 option=NULL;
127 /* move a non-option up in argv[] */