returns (eg) "\dir\name" for "\dir\name.bmp"
| 291 | // returns (eg) "\dir\name" for "\dir\name.bmp" |
| 292 | // |
| 293 | char *Filename_WithoutExt(const char *psFilename) |
| 294 | { |
| 295 | static char sString[MAX_QPATH]; // ! |
| 296 | |
| 297 | strcpy(sString,psFilename); |
| 298 | |
| 299 | char *p = strrchr(sString,'.'); |
| 300 | char *p2= strrchr(sString,'\\'); |
| 301 | |
| 302 | // special check, make sure the first suffix we found from the end wasn't just a directory suffix (eg on a path'd filename with no extension anyway) |
| 303 | // |
| 304 | if (p && (p2==0 || (p2 && p>p2))) |
| 305 | *p=0; |
| 306 | |
| 307 | return sString; |
| 308 | |
| 309 | } |
| 310 | |
| 311 | |
| 312 |
no outgoing calls
no test coverage detected