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

Function PrintSzFormat

general.cpp:1357–1390  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1355// AstroExpression custom string indexed by custom variable @a.
1356
1357void PrintSzFormat(CONST char *sz, flag fPopup)
1358{
1359 char szFormat[cchSzLine], *pch2;
1360 CONST char *pch;
1361
1362 for (pch = sz, pch2 = szFormat; *pch; pch++, pch2++) {
1363 *pch2 = *pch;
1364 if (*pch == '\\' && (pch[1] == '\\' || pch[1] == 'n')) {
1365 if (pch[1] == 'n')
1366 *pch2 = '\n';
1367 pch++;
1368 }
1369#ifdef EXPRESS
1370 else if (*pch == '\\') {
1371 if (FCapCh(pch[1])) {
1372 pch2 = PchFormatExpression(pch2, pch[1] - '@') - 1;
1373 pch++;
1374 continue;
1375 } else if (FUncapCh(pch[1])) {
1376 pch2 = PchFormatString(pch2, pch[1] - '`') - 1;
1377 pch++;
1378 continue;
1379 }
1380 }
1381#endif
1382 }
1383 *pch2 = chNull;
1384#ifdef WIN
1385 if (fPopup)
1386 PrintNotice(szFormat);
1387 else
1388#endif
1389 PrintSz(szFormat);
1390}
1391
1392
1393// Print a partial progress message given a string. This is meant to be used

Callers 1

NProcessSwitchesRareFunction · 0.85

Calls 4

PchFormatExpressionFunction · 0.85
PchFormatStringFunction · 0.85
PrintNoticeFunction · 0.85
PrintSzFunction · 0.85

Tested by

no test coverage detected