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

Function FormatSz

express.cpp:2559–2581  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2557// string indexed by custom variable @a.
2558
2559void FormatSz(CONST char *szIn, char *szFormat)
2560{
2561 char *pch2;
2562 CONST char *pch;
2563
2564 for (pch = szIn, pch2 = szFormat; *pch; pch++, pch2++) {
2565 *pch2 = *pch;
2566 if (*pch == '\\') {
2567 if (pch[1] == '\\')
2568 pch++;
2569 else if (FCapCh(pch[1])) {
2570 pch2 = PchFormatExpression(pch2, pch[1] - '@') - 1;
2571 pch++;
2572 continue;
2573 } else if (FUncapCh(pch[1])) {
2574 pch2 = PchFormatString(pch2, pch[1] - '`') - 1;
2575 pch++;
2576 continue;
2577 }
2578 }
2579 }
2580 *pch2 = chNull;
2581}
2582
2583
2584// Ensure there are at least the given number of slots available in the custom

Callers 1

FEvalFunctionFunction · 0.85

Calls 2

PchFormatExpressionFunction · 0.85
PchFormatStringFunction · 0.85

Tested by

no test coverage detected