| 608 | } |
| 609 | |
| 610 | AP_DECLARE(void) ap_no2slash_ex(char *name, int is_fs_path) |
| 611 | { |
| 612 | |
| 613 | char *d, *s; |
| 614 | |
| 615 | if (!*name) { |
| 616 | return; |
| 617 | } |
| 618 | |
| 619 | s = d = name; |
| 620 | |
| 621 | #ifdef HAVE_UNC_PATHS |
| 622 | /* Check for UNC names. Leave leading two slashes. */ |
| 623 | if (is_fs_path && s[0] == '/' && s[1] == '/') |
| 624 | *d++ = *s++; |
| 625 | #endif |
| 626 | |
| 627 | while (*s) { |
| 628 | if ((*d++ = *s) == '/') { |
| 629 | do { |
| 630 | ++s; |
| 631 | } while (*s == '/'); |
| 632 | } |
| 633 | else { |
| 634 | ++s; |
| 635 | } |
| 636 | } |
| 637 | *d = '\0'; |
| 638 | } |
| 639 | |
| 640 | AP_DECLARE(void) ap_no2slash(char *name) |
| 641 | { |