summaryrefslogtreecommitdiff
path: root/util
diff options
context:
space:
mode:
Diffstat (limited to 'util')
-rw-r--r--util/err.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/util/err.c b/util/err.c
index 3fe3b53..c5d32b2 100644
--- a/util/err.c
+++ b/util/err.c
@@ -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 {