commit 44255b350222f624c42b4aa5ca59c72898365753 parent 5899a546a7c6e4dde5fc7b2bda2ff6e4bddbd90d Author: Robert Russell <robertrussell.72001@gmail.com> Date: Fri, 24 Mar 2023 17:01:21 -0700 unicode: remove r_ prefix Having nearing every function in the API start with r_ is ugly and hurts readability. This is C; we don't have namespaces and we just have to live with it. Diffstat:
| M | inc/unicode.h | | | 8 | +------- |
| M | src/unicode.c | | | 2 | +- |
2 files changed, 2 insertions(+), 8 deletions(-)
diff --git a/inc/unicode.h b/inc/unicode.h @@ -2,10 +2,4 @@ #include "def.h" -/* TODO: idea: -#define r_unicode_is_letter(r) (r_unicode_category(r)[0] == 'L') -etc... -Actually, this is wrong, because r_unicode_category can return NULL -*/ - -char *r_unicode_category(rune r); +char *unicode_category(rune r); diff --git a/src/unicode.c b/src/unicode.c @@ -14,7 +14,7 @@ static char ucats[] = * function inside the header file. */ char * -r_unicode_category(rune r) { +unicode_category(rune r) { if (r <= 0xff) /* Latin 1 */ return &ucats[3 * ucatl1tab[r]];