MCPcopy Create free account
hub / github.com/JACoders/OpenJK / Filename_WithoutExt

Function Filename_WithoutExt

code/client/snd_mem.cpp:293–309  ·  view source on GitHub ↗

returns (eg) "\dir\name" for "\dir\name.bmp"

Source from the content-addressed store, hash-verified

291// returns (eg) "\dir\name" for "\dir\name.bmp"
292//
293char *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

Callers 2

R_CheckMP3sFunction · 0.70
SetupNewFileParseMethod · 0.50

Calls

no outgoing calls

Tested by

no test coverage detected