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

Function IntSpacing

editor/HFile.cpp:648–659  ·  view source on GitHub ↗

Returns a pointer to enough spaces to right-justify a number that's printed after the spaces

Source from the content-addressed store, hash-verified

646
647// Returns a pointer to enough spaces to right-justify a number that's printed after the spaces
648char *IntSpacing(int i) {
649 static char *spaces = " ";
650
651 i = abs(i);
652
653 for (int n = 1; i >= 10; n++)
654 i /= 10;
655
656 ASSERT(n <= 20);
657
658 return spaces + n * 2 + n / 2;
659}
660
661extern void dump_text_to_clipboard(char *text);
662

Callers 1

ShowLevelStatsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected