aboutsummaryrefslogtreecommitdiff
path: root/utf8.h
diff options
context:
space:
mode:
authorBruce Hill <bruce@bruce-hill.com>2021-09-21 18:45:43 -0700
committerBruce Hill <bruce@bruce-hill.com>2021-09-21 18:45:43 -0700
commit90c3c13a02e501d3bea839dceb00f09c89bfb5fe (patch)
treec084e3d34fb5fd83a6cc207a78cc8826cafdc031 /utf8.h
parent9401facbe7f768c7f4574a7f101d57f7075c42b7 (diff)
Moving cache logic into match, cleaner next_match() API, and slightly
less tightly coupled UTF8 API
Diffstat (limited to 'utf8.h')
-rw-r--r--utf8.h12
1 files changed, 6 insertions, 6 deletions
diff --git a/utf8.h b/utf8.h
index 97e259e..243acd3 100644
--- a/utf8.h
+++ b/utf8.h
@@ -1,21 +1,21 @@
//
// utf8.h - UTF8 helper functions
//
-#include "files.h"
-
#ifndef UTF8__H
#define UTF8__H
+#include <stdbool.h>
+
#define UTF8_MAXCHARLEN 4
__attribute__((nonnull, pure))
-const char *next_char(file_t *f, const char *str);
+const char *next_char(const char *str, const char *end);
__attribute__((nonnull, pure))
-const char *prev_char(file_t *f, const char *str);
+const char *prev_char(const char *start, const char *str);
__attribute__((nonnull, pure))
-bool isidstart(file_t *f, const char *str);
+bool isidstart(const char *str, const char *end);
__attribute__((nonnull, pure))
-bool isidcontinue(file_t *f, const char *str);
+bool isidcontinue(const char *str, const char *end);
#endif
// vim: ts=4 sw=0 et cino=L2,l1,(0,W4,m1,\:0