diff options
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 { |