MCPcopy Create free account
hub / github.com/CruiserOne/Astrolog / SzProcessProgname

Function SzProcessProgname

general.cpp:2378–2401  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2376// the main program to determine the name of the Astrolog executable.
2377
2378char *SzProcessProgname(char *szPath)
2379{
2380 char *pchStart, *pch, *pchEnd;
2381
2382 pchStart = pch = szPath;
2383 while (*pch) {
2384#ifdef PC
2385 *pch = ChUncap(*pch); // Because PC filenames are case insensitive.
2386#endif
2387 pch++;
2388 }
2389 pchEnd = pch;
2390 while (pch > pchStart && *pch != '.')
2391 pch--;
2392 if (pch > pchStart)
2393 *pch = 0;
2394 else
2395 pch = pchEnd;
2396 while (pch > pchStart && *pch != chDirSep)
2397 pch--;
2398 if (pch > pchStart)
2399 szPath = pch+1;
2400 return szPath;
2401}
2402
2403
2404// Append a set of chart information to the program's chart list.

Callers 1

FInputDataFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected