diff options
author | Leo Tenenbaum <pommicket@gmail.com> | 2019-09-19 13:26:01 -0400 |
---|---|---|
committer | Leo Tenenbaum <pommicket@gmail.com> | 2019-09-19 13:26:01 -0400 |
commit | 46b5ce1b8f52329a18095da9ca4a5ee58345ff92 (patch) | |
tree | 9c7abec96f860153d5e7abf20348f7be9759763d /util | |
parent | d905377ca9a8648a24d3baf671d4c729596efdd8 (diff) |
added arg type checking
Diffstat (limited to 'util')
-rw-r--r-- | util/err.c | 9 |
1 files changed, 9 insertions, 0 deletions
@@ -12,6 +12,15 @@ #define TEXT_IMPORTANT(x) x #endif +static inline const char *ordinals(size_t x) { + switch (x % 10) { + case 1: return "st"; + case 2: return "nd"; + case 3: return "rd"; + default: return "th"; + } +} + typedef uint32_t LineNo; typedef struct { |