Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

cleanup utf8 check

  • Loading branch information...
commit c1e201ba282d21cb2c0159b6520295a22596b036 1 parent 0904cff
@dividuum authored
Showing with 4 additions and 10 deletions.
  1. +3 −0  misc.c
  2. +1 −10 misc.h
View
3  misc.c
@@ -58,6 +58,9 @@ static const uint8_t utf8d[] = {
1,3,1,1,1,1,1,3,1,3,1,1,1,1,1,1,1,3,1,1,1,1,1,1,1,1,1,1,1,1,1,1, // s7..s8
};
+#define UTF8_ACCEPT 0
+#define UTF8_REJECT 1
+
uint32_t decode_utf8(uint32_t* state, uint32_t* codep, uint32_t byte) {
uint32_t type = utf8d[byte];
View
11 misc.h
@@ -31,6 +31,7 @@
void die(const char *fmt, ...);
void *xmalloc(size_t size);
double time_delta(struct timeval *before, struct timeval *after);
+int check_utf8(const char* s);
extern GLuint default_tex;
extern struct event_base *event_base;
@@ -90,14 +91,4 @@ int type##_register(lua_State *L) { \
return 1; \
}
-// Copyright (c) 2008-2009 Bjoern Hoehrmann <bjoern@hoehrmann.de>
-// See http://bjoern.hoehrmann.de/utf-8/decoder/dfa/ for details.
-//
-// Modified for info-beamer
-
-#define UTF8_ACCEPT 0
-#define UTF8_REJECT 1
-
-int check_utf8(const char* s);
-
#endif
Please sign in to comment.
Something went wrong with that request. Please try again.