$ make WERROR=-Werror now builds with -Werror

add some single char escaping routines to fmt.h
pull in html5 entities from w3c and use those to do a proper scan_html decoding
fix an off-by-one in fmt_to_array
add a ton of unit tests for the fmt routines
This commit is contained in:
leitner
2014-03-13 22:25:20 +00:00
parent dd4f86fbfa
commit 35942878c2
26 changed files with 2759 additions and 24 deletions

View File

@@ -4,7 +4,7 @@
void fmt_to_array(size_t (*func)(char*,const char*,size_t),
array* a,const char* src,size_t len) {
size_t needed=func(0,src,len);
if (array_bytes(a)+needed>needed &&
if (array_bytes(a)+needed>=needed &&
array_allocate(a,1,array_bytes(a)+needed-1)) {
char* x=((char*)array_start(a))+array_bytes(a)-needed;
func(x,src,len);