Lines Matching defs:option
30 // Checks if the current argument is an option or not.
47 // Gets an argument of the current option.
55 // Checks whether the current option has an argument or not.
64 // Searches an option.
68 // Updates an option character.
73 // Gets an option argument if required.
94 // Returns '?' if the option character is undefined.
98 // Compares a long option with an argument and returns the length of the
150 // Gets an argument of a long option.
170 const cmdopt_option *option;
172 // Keeps the long option.
175 // Gets the next option.
183 option = h->longopts + h->longindex;
184 if (option->has_arg) {
192 // Returns '?' for an extra option argument.
198 if (option->flag != NULL) {
199 *option->flag = option->val;
203 return option->val;
206 // Analyze command line option.
218 // Checks whether the next argument is an option or not.
233 // Searches an option string.
262 // cmdopt_get() analyzes command line arguments and gets the next option.
269 // Warning for a lack of an option argument.
271 fprintf(stderr, "option requires an argument -- %c\n", h->optopt);
273 fprintf(stderr, "option `--%s' requires an argument\n",
277 // Warning for an invalid option.
279 fprintf(stderr, "invalid option -- %c\n", h->optopt);
281 fprintf(stderr, "unrecognized option `%s'\n", h->optlong);
286 fprintf(stderr, "option with `%s' -- %c\n", h->optarg, h->optopt);
288 fprintf(stderr, "option `--%s' with `%s'\n",