mirror of
https://github.com/leahneukirchen/mblaze
synced 2024-11-15 18:14:02 +00:00
16 lines
210 B
C
16 lines
210 B
C
void
|
|
squeeze_slash(char *arg) {
|
|
char *s, *t;
|
|
|
|
// squeeze slashes
|
|
s = t = arg;
|
|
while ((*s++ = *t))
|
|
while (*t++ == '/' && *t == '/')
|
|
;
|
|
|
|
// remove trailing slashes
|
|
s--;
|
|
while (*--s == '/')
|
|
*s = 0;
|
|
}
|