Returns a pointer to enough spaces to right-justify a number that's printed after the spaces
| 646 | |
| 647 | // Returns a pointer to enough spaces to right-justify a number that's printed after the spaces |
| 648 | char *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 | |
| 661 | extern void dump_text_to_clipboard(char *text); |
| 662 |