Lines Matching refs:arg

54 int bs_is_option(const char *arg, const char *option, int with_value) {  in bs_is_option()  argument
58 if (arg[of] == '-') { in bs_is_option()
61 if (arg[of] == '-') { in bs_is_option()
66 if (strcmp(&arg[of], option) != 0) { in bs_is_option()
73 while (!(arg[of] == 0 && *option == 0)) { in bs_is_option()
75 if ((arg[of] == ':') || (arg[of] == '=')) { in bs_is_option()
81 if (arg[of] != *option) { in bs_is_option()
88 if (arg[of] == 0) { /* we need a value to follow */ in bs_is_option()
106 int bs_is_multi_opt(const char *arg, const char *option, uint* index, int with_value) { in bs_is_multi_opt() argument
109 if (arg[of] == '-') { in bs_is_multi_opt()
112 if (arg[of] == '-') { //we accept options with either 1 or 2 - in bs_is_multi_opt()
116 if (strncmp(&arg[of],option,to_match_len) == 0) { in bs_is_multi_opt()
122 while ( ( arg[c] != 0 ) && ( arg[c]!= ':' ) && ( arg[c]!= '=' ) ){ in bs_is_multi_opt()
123 if ( ( arg[c] >= '0' ) && ( arg[c] <= '9') ) { in bs_is_multi_opt()
124 n = n*10 + ( arg[c] - '0'); in bs_is_multi_opt()
141 if ( ( arg[of] == ':' ) || ( arg[of] == '=' ) ) { in bs_is_multi_opt()
143 if ( arg[of] == 0 ) { //we need an option to follow in bs_is_multi_opt()
150 if ( arg[of] != 0 ) { //we dont accept any extra characters in bs_is_multi_opt()
168 int bs_is_help(const char *arg){ in bs_is_help() argument
169 if (arg[0] == '-') { in bs_is_help()
170 arg++; in bs_is_help()
172 if (arg[0] == '-') { in bs_is_help()
173 arg++; in bs_is_help()
175 if ((strcasecmp(arg, "?") == 0) || in bs_is_help()
176 (strcasecmp(arg, "h") == 0) || in bs_is_help()
177 (strcasecmp(arg, "help") == 0)) { in bs_is_help()