maybe I'm re-inventing the wheel, here, but I can't see any functions that already do this, so...
| 275 | // maybe I'm re-inventing the wheel, here, but I can't see any functions that already do this, so... |
| 276 | // |
| 277 | char *Filename_WithoutPath(const char *psFilename) |
| 278 | { |
| 279 | static char sString[MAX_QPATH]; // !! |
| 280 | const char *p = strrchr(psFilename,'\\'); |
| 281 | |
| 282 | if (!p++) |
| 283 | p=psFilename; |
| 284 | |
| 285 | strcpy(sString,p); |
| 286 | |
| 287 | return sString; |
| 288 | |
| 289 | } |
| 290 | |
| 291 | // returns (eg) "\dir\name" for "\dir\name.bmp" |
| 292 | // |
no outgoing calls
no test coverage detected