diff options
author | Omar Polo <op@omarpolo.com> | 2021-01-09 20:32:23 +0000 |
---|---|---|
committer | Omar Polo <op@omarpolo.com> | 2021-01-09 20:32:23 +0000 |
commit | ef04b55160759b22db67f14c703a4343c4741e8b (patch) | |
tree | fff26b0d56a0506b2ef0ebb84ffa50f2d655ebe6 /gmid.h | |
parent | 578ba2d81b2fa5f839314190f42bb9116069db7a (diff) |
switch to Bjoern Hoehrmann UTF-8 decoder
It's correct, while my hacked valid_multibyte_utf8 would allow things
that aren't technically UTF8.
Diffstat (limited to 'gmid.h')
-rw-r--r-- | gmid.h | 9 |
1 files changed, 9 insertions, 0 deletions
@@ -117,6 +117,12 @@ struct uri { char *fragment; }; +struct parser { + char *uri; + struct uri *parsed; + const char *err; +}; + enum { FILE_EXISTS, FILE_EXECUTABLE, @@ -151,6 +157,9 @@ void loop(struct tls*, int); void usage(const char*); +/* utf8.c */ +int valid_multibyte_utf8(struct parser*); + /* uri.c */ int parse_uri(char*, struct uri*, const char**); int trim_req_uri(char*); |