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

Function FErrorArgc

general.cpp:1481–1492  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1479// Print error message for missing parameters to a command switch.
1480
1481flag FErrorArgc(CONST char *szOpt, int carg, int cargMax)
1482{
1483 char sz[cchSzDef];
1484
1485 carg--;
1486 if (carg >= cargMax)
1487 return fFalse;
1488 sprintf(sz, "Too few parameters to switch %c%s (%d given, %d required)",
1489 chSwitch, szOpt, carg, cargMax);
1490 PrintError(sz);
1491 return fTrue;
1492}
1493
1494
1495// Print error message for out of range integer parameter to a command switch.

Callers 5

NProcessSwitchesRareFunction · 0.85
FProcessSwitchesFunction · 0.85
NProcessSwitchesXFunction · 0.85
NProcessSwitchesRareXFunction · 0.85
NProcessSwitchesWFunction · 0.85

Calls 1

PrintErrorFunction · 0.85

Tested by

no test coverage detected