History

xm: case-insensitive strcmp, some files are apparently different (thanks kemal)

Sigrid Solveig Haflínudóttir committed 5 years ago

Commit ce2aea91 parent 9d8c7872 files · +2 −1Browse files

Unified · Split

2 files
  1. tagspriv.h +1 −0
  2. xm.c +1 −1
tagspriv.h+1−0
@@ -6,6 +6,7 @@ · 5 unmodified lines
66 #include <strings.h>
77 #define snprint snprintf
88 #define cistrcmp strcasecmp
9+#define cistrncmp strncasecmp
910 #define nil NULL
1011 #define UTFmax 4
1112 #define nelem(x) (int)(sizeof(x)/sizeof((x)[0]))
xm.c+1−1
@@ -5,7 +5,7 @@ tagxm(Tagctx *ctx) · 4 unmodified lines
55 {
66 char d[17+20+1], o[20*UTFmax+1];
77
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)
99 return -1;
1010 d[17+20] = 0;
1111 if(cp437toutf8(o, sizeof(o), d+17, 20) > 0)

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t