MCPcopy Create free account
hub / github.com/DescentDevelopers/Descent3 / FixFilenameCase

Function FixFilenameCase

Descent3/localization.cpp:236–259  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

234}
235
236void FixFilenameCase(const char *filename, char *newfile) {
237 char path[_MAX_PATH], file[_MAX_FNAME], ext[_MAX_EXT];
238 ddio_SplitPath(filename, path, file, ext);
239
240 char *p;
241
242 p = file;
243 while (*p) {
244 *p = tolower(*p);
245 p++;
246 };
247 p = ext;
248 while (*p) {
249 *p = tolower(*p);
250 p++;
251 };
252
253 strcat(file, ext);
254
255 if (strlen(path) > 0)
256 ddio_MakePath(newfile, path, file, NULL);
257 else
258 strcpy(newfile, file);
259}
260
261// Given a filename, pointer to a char * array and a pointer to an int,
262// it will load the string table and fill in the information

Callers 3

CreateStringTableFunction · 0.85
GetTotalStringCountFunction · 0.85
LoadStringFileFunction · 0.85

Calls 2

ddio_SplitPathFunction · 0.50
ddio_MakePathFunction · 0.50

Tested by

no test coverage detected