version 1.58, 2004/11/25 22:22:14 |
version 1.59, 2004/11/29 07:41:24 |
|
|
cmd_interrupt(int signo) |
cmd_interrupt(int signo) |
{ |
{ |
const char msg[] = "\rInterrupt \n"; |
const char msg[] = "\rInterrupt \n"; |
|
int olderrno = errno; |
|
|
write(STDERR_FILENO, msg, sizeof(msg) - 1); |
write(STDERR_FILENO, msg, sizeof(msg) - 1); |
interrupted = 1; |
interrupted = 1; |
|
errno = olderrno; |
} |
} |
|
|
static void |
static void |
|
|
return (xstrdup(path)); |
return (xstrdup(path)); |
|
|
len = strlen(strip); |
len = strlen(strip); |
if (strip != NULL && strncmp(path, strip, len) == 0) { |
if (strncmp(path, strip, len) == 0) { |
if (strip[len - 1] != '/' && path[len] == '/') |
if (strip[len - 1] != '/' && path[len] == '/') |
len++; |
len++; |
return (xstrdup(path + len)); |
return (xstrdup(path + len)); |