summaryrefslogtreecommitdiff
path: root/util
diff options
context:
space:
mode:
authorLeo Tenenbaum <pommicket@gmail.com>2019-09-19 13:26:01 -0400
committerLeo Tenenbaum <pommicket@gmail.com>2019-09-19 13:26:01 -0400
commit46b5ce1b8f52329a18095da9ca4a5ee58345ff92 (patch)
tree9c7abec96f860153d5e7abf20348f7be9759763d /util
parentd905377ca9a8648a24d3baf671d4c729596efdd8 (diff)
added arg type checking
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 {