From 6a9ca73e10c3c4e8a95101313e9c5d46cf018f86 Mon Sep 17 00:00:00 2001 From: Laurent Bercot Date: Sat, 7 Jan 2017 20:31:02 +0000 Subject: Types fix: first pass This pass makes variable size_t-ready, so everything works when the prototypes are fixed in skalibs. Some code uses "unsigned int *" where it should be "size_t *"; it cannot be changed now, but it's been marked with XXX. It must change at the same time as the skalibs API. --- src/libexecline/el_parse.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'src/libexecline/el_parse.c') diff --git a/src/libexecline/el_parse.c b/src/libexecline/el_parse.c index 1544f51..acff34a 100644 --- a/src/libexecline/el_parse.c +++ b/src/libexecline/el_parse.c @@ -1,6 +1,7 @@ /* ISC license. */ -#include +#include +#include #include #include #include @@ -10,7 +11,7 @@ int el_parse (stralloc *sa, el_chargen_func_t_ref next, void *source) { static unsigned char const class[256] = "`aaaaaaaaadaaaaaaaaaaaaaaaaaaaaaafcbffffffffffffjhhhhhhhiifffffffmmmmmmfffffffffffffffffffffeffffggmmmgfffffffkfffkfkfkflffnfoffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff" ; - static uint16 const table[16][16] = + static uint16_t const table[16][16] = { { 0x0011, 0x4011, 0x0010, 0x0010, 0x0010, 0x0011, 0x0010, 0x0010, 0x0010, 0x0010, 0x0010, 0x0010, 0x0010, 0x0010, 0x0010, 0x4091 }, { 0x0000, 0x4000, 0x8001, 0x8003, 0x8003, 0x0005, 0x0010, 0x8403, 0x8403, 0x8403, 0x8403, 0x0010, 0x8403, 0x8403, 0x0100, 0x4080 }, @@ -30,14 +31,14 @@ int el_parse (stralloc *sa, el_chargen_func_t_ref next, void *source) { 0x820f, 0x8001, 0x8001, 0x8003, 0x8003, 0x0005, 0x0010, 0x8403, 0x8403, 0x8403, 0x8403, 0x0010, 0x8403, 0x8403, 0x8001, 0x8001 } } ; - unsigned int mark = 0 ; - unsigned int n = 0 ; + size_t mark = 0 ; + int n = 0 ; unsigned int blevel = 0 ; unsigned char state = 0, base = 10 ; while (state < 0x10) { - uint16 c ; + uint16_t c ; unsigned char cur ; if (!(*next)(&cur, source)) return -1 ; c = table[class[cur]-'`'][state] ; -- cgit v1.3.1