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
6#include <strings.h>6#include <strings.h>
7#define snprint snprintf7#define snprint snprintf
8#define cistrcmp strcasecmp8#define cistrcmp strcasecmp
9#define cistrncmp strncasecmp
9#define nil NULL10#define nil NULL
10#define UTFmax 411#define UTFmax 4
11#define nelem(x) (int)(sizeof(x)/sizeof((x)[0]))12#define nelem(x) (int)(sizeof(x)/sizeof((x)[0]))
xm.c+1−1
@@ -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)

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