Lines Matching refs:p
106 char *p, *target; in sanitize_file_name() local
145 p = target + 4; in sanitize_file_name()
148 p = target; in sanitize_file_name()
151 for(; *p; ++p) { in sanitize_file_name()
154 if((1 <= *p && *p <= 31) || in sanitize_file_name()
155 (!(flags & SANITIZE_ALLOW_PATH) && *p == ':') || in sanitize_file_name()
156 (!(flags & SANITIZE_ALLOW_PATH) && (*p == '/' || *p == '\\'))) { in sanitize_file_name()
157 *p = '_'; in sanitize_file_name()
162 if(*p == *banned) { in sanitize_file_name()
163 *p = '_'; in sanitize_file_name()
173 p = &target[len]; in sanitize_file_name()
175 --p; in sanitize_file_name()
176 if(*p != ' ' && *p != '.') in sanitize_file_name()
178 clip = p; in sanitize_file_name()
179 } while(p != target); in sanitize_file_name()
188 sc = msdosify(&p, target, flags); in sanitize_file_name()
192 target = p; in sanitize_file_name()
202 sc = rename_if_reserved_dos(&p, target, flags); in sanitize_file_name()
206 target = p; in sanitize_file_name()
265 const char *p = &path[truncate_pos - 1]; in truncate_dryrun() local
267 --p; in truncate_dryrun()
268 if(*p == ':') in truncate_dryrun()
270 } while(p != path && *p != '\\' && *p != '/'); in truncate_dryrun()
445 char *p, *base; in rename_if_reserved_dos() local
481 for(p = fname; p; p = (p == fname && fname != base ? base : NULL)) { in rename_if_reserved_dos()
483 int x = (curl_strnequal(p, "CON", 3) || in rename_if_reserved_dos()
484 curl_strnequal(p, "PRN", 3) || in rename_if_reserved_dos()
485 curl_strnequal(p, "AUX", 3) || in rename_if_reserved_dos()
486 curl_strnequal(p, "NUL", 3)) ? 3 : in rename_if_reserved_dos()
487 (curl_strnequal(p, "CLOCK$", 6)) ? 6 : in rename_if_reserved_dos()
488 (curl_strnequal(p, "COM", 3) || curl_strnequal(p, "LPT", 3)) ? in rename_if_reserved_dos()
489 (('1' <= p[3] && p[3] <= '9') ? 4 : 3) : 0; in rename_if_reserved_dos()
497 for(; p[x] == ' '; ++x) in rename_if_reserved_dos()
500 if(p[x] == '.') { in rename_if_reserved_dos()
501 p[x] = '_'; in rename_if_reserved_dos()
504 else if(p[x] == ':') { in rename_if_reserved_dos()
506 p[x] = '_'; in rename_if_reserved_dos()
511 else if(p[x]) /* no match */ in rename_if_reserved_dos()
515 p_len = strlen(p); in rename_if_reserved_dos()
520 memmove(p + 1, p, p_len + 1); in rename_if_reserved_dos()
521 p[0] = '_'; in rename_if_reserved_dos()
525 if(p == fname) in rename_if_reserved_dos()