From ce05175372a9ddca1a225db0765ace1127a39293 Mon Sep 17 00:00:00 2001 From: Nicholas Date: Fri, 12 Nov 2021 09:22:01 -0800 Subject: chore: simplified organizational structure --- sys/libutf/canfit.c | 23 ----------------------- 1 file changed, 23 deletions(-) delete mode 100644 sys/libutf/canfit.c (limited to 'sys/libutf/canfit.c') diff --git a/sys/libutf/canfit.c b/sys/libutf/canfit.c deleted file mode 100644 index 4579ab3..0000000 --- a/sys/libutf/canfit.c +++ /dev/null @@ -1,23 +0,0 @@ -#include "internal.h" - -/* returns 1 if string of length n is long enough to be decoded */ -int -utf8·canfit(byte* s, int n) -{ - int i; - rune c; - - if(n <= 0) - return 0; - - c = *(ubyte*)s; - if(c < TByte1) - return 1; - - if(c < TByte3) - return n >= 2; - if(c < TByte4) - return n >= 3; - - return n >= UTFmax; -} -- cgit v1.2.1