Lines Matching refs:p

55     const char *p;  in opt_path_end()  local
58 for (p = filename + strlen(filename); --p > filename; ) in opt_path_end()
59 if (*p == '/' || *p == '\\' || *p == ':') { in opt_path_end()
60 p++; in opt_path_end()
63 return p; in opt_path_end()
69 const char *p; in opt_progname() local
72 p = opt_path_end(argv0); in opt_progname()
75 n = strlen(p); in opt_progname()
77 (strcmp(&p[n - 4], ".exe") == 0 || strcmp(&p[n - 4], ".EXE") == 0)) in opt_progname()
83 for (q = prog, i = 0; i < n; i++, p++) in opt_progname()
84 *q++ = tolower((unsigned char)*p); in opt_progname()
93 const char *p; in opt_path_end() local
96 for (p = filename + strlen(filename); --p > filename;) in opt_path_end()
97 if (*p == ':' || *p == ']' || *p == '>') { in opt_path_end()
98 p++; in opt_path_end()
101 return p; in opt_path_end()
106 const char *p, *q; in opt_progname() local
109 p = opt_path_end(argv0); in opt_progname()
110 q = strrchr(p, '.'); in opt_progname()
111 if (prog != p) in opt_progname()
112 strncpy(prog, p, sizeof(prog) - 1); in opt_progname()
114 if (q != NULL && q - p < sizeof(prog)) in opt_progname()
115 prog[q - p] = '\0'; in opt_progname()
123 const char *p; in opt_path_end() local
126 for (p = filename + strlen(filename); --p > filename;) in opt_path_end()
127 if (*p == '/') { in opt_path_end()
128 p++; in opt_path_end()
131 return p; in opt_path_end()
136 const char *p; in opt_progname() local
138 p = opt_path_end(argv0); in opt_progname()
139 if (prog != p) in opt_progname()
140 strncpy(prog, p, sizeof(prog) - 1); in opt_progname()
482 const char **p; in opt_string() local
484 for (p = options; *p != NULL; p++) in opt_string()
485 if (strcmp(*p, name) == 0) in opt_string()
488 for (p = options; *p != NULL; p++) in opt_string()
489 opt_printf_stderr("\t%s\n", *p); in opt_string()
845 char *p; in opt_next() local
855 p = argv[opt_index]; in opt_next()
856 if (p == NULL) in opt_next()
860 if (*p != '-') in opt_next()
865 if (strcmp(p, "--") == 0) in opt_next()
869 if (*++p == '-') in opt_next()
870 p++; in opt_next()
871 flag = p - 1; in opt_next()
874 if ((arg = strchr(p, '=')) != NULL) in opt_next()
878 if (!(strcmp(p, "h") == 0 && strcmp(o->name, "help") == 0) in opt_next()
879 && strcmp(p, o->name) != 0) in opt_next()
886 prog, p); in opt_next()
974 dunno = p; in opt_next()
977 opt_printf_stderr("%s: Unknown option: -%s\n", prog, p); in opt_next()
1061 char *p; in opt_print() local
1090 p = start; in opt_print()
1091 *p++ = ' '; in opt_print()
1093 *p++ = '-'; in opt_print()
1095 p += strlen(strcpy(p, o->name)); in opt_print()
1097 *p++ = '*'; in opt_print()
1099 *p++ = ' '; in opt_print()
1100 p += strlen(strcpy(p, valtype2param(o))); in opt_print()
1102 *p = ' '; in opt_print()
1103 if ((int)(p - start) >= MAX_OPT_HELP_WIDTH) { in opt_print()
1104 *p = '\0'; in opt_print()