Unified · Split
| @@ -6,6 +6,7 @@ · 5 unmodified lines | |||
| 6 | #include <strings.h> | 6 | #include <strings.h> |
| 7 | #define snprint snprintf | 7 | #define snprint snprintf |
| 8 | #define cistrcmp strcasecmp | 8 | #define cistrcmp strcasecmp |
| 9 | #define cistrncmp strncasecmp | ||
| 9 | #define nil NULL | 10 | #define nil NULL |
| 10 | #define UTFmax 4 | 11 | #define UTFmax 4 |
| 11 | #define nelem(x) (int)(sizeof(x)/sizeof((x)[0])) | 12 | #define nelem(x) (int)(sizeof(x)/sizeof((x)[0])) |
| @@ -5,7 +5,7 @@ tagxm(Tagctx *ctx) · 4 unmodified lines | |||
| 5 | { | 5 | { |
| 6 | char d[17+20+1], o[20*UTFmax+1]; | 6 | char d[17+20+1], o[20*UTFmax+1]; |
| 7 | 7 | ||
| 8 | if(ctx->read(ctx, d, 17+20) != 17+20 || memcmp(d, "Extended Module: ", 17) != 0) | 8 | if(ctx->read(ctx, d, 17+20) != 17+20 || cistrncmp(d, "Extended Module: ", 17) != 0) |
| 9 | return -1; | 9 | return -1; |
| 10 | d[17+20] = 0; | 10 | d[17+20] = 0; |
| 11 | if(cp437toutf8(o, sizeof(o), d+17, 20) > 0) | 11 | if(cp437toutf8(o, sizeof(o), d+17, 20) > 0) |