| 238 |
|
return buf; |
| 239 |
|
} |
| 240 |
|
|
| 241 |
< |
#ifndef HAVE_BASENAME |
| 242 |
< |
|
| 243 |
< |
/* basename() |
| 241 |
> |
/* libio_basename() |
| 242 |
|
* |
| 243 |
|
* input - i.e. "/usr/local/ircd/modules/m_whois.so" |
| 244 |
|
* output - i.e. "m_whois.so" |
| 245 |
|
* side effects - this will be overwritten on subsequent calls |
| 246 |
|
*/ |
| 247 |
< |
char * |
| 248 |
< |
basename(char *path) |
| 247 |
> |
const char * |
| 248 |
> |
libio_basename(const char *path) |
| 249 |
|
{ |
| 250 |
< |
char *s; |
| 250 |
> |
const char *s; |
| 251 |
|
|
| 252 |
|
if ((s = strrchr(path, '/')) == NULL) |
| 253 |
|
s = path; |
| 257 |
|
return s; |
| 258 |
|
} |
| 259 |
|
|
| 262 |
– |
#endif /* !HAVE_BASENAME */ |
| 263 |
– |
|
| 260 |
|
/* |
| 261 |
|
* Copyright (c) 1996-1999 by Internet Software Consortium. |
| 262 |
|
* |