summaryrefslogtreecommitdiff
path: root/misc.c
diff options
context:
space:
mode:
Diffstat (limited to 'misc.c')
-rw-r--r--misc.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/misc.c b/misc.c
index f11c755..c38996f 100644
--- a/misc.c
+++ b/misc.c
@@ -59,4 +59,9 @@ static inline bool strs_equal(const char *a, const char *b) {
}
#define plural_suffix(x) ((x) == 1 ? "" : "s")
-
+static char const *indefinite_article(char const *s) {
+ /* usually, words starting with "u" use "a" - "a unique thing", "a u64" */
+ if (*s == 'a' || *s == 'e' || *s == 'i' || *s == 'o')
+ return "an";
+ return "a";
+}