Skip to content

Commit f8ec8a0

Browse files
committed
Use strcasecmp
1 parent 3798aae commit f8ec8a0

File tree

3 files changed

+4
-2
lines changed

3 files changed

+4
-2
lines changed

ext/io/console/console.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1071,6 +1071,9 @@ console_scroll(VALUE io, int line)
10711071
return io;
10721072
}
10731073

1074+
#define GPERF_DOWNCASE 1
1075+
#define GPERF_CASE_STRCMP 1
1076+
#define gperf_case_strcmp strcasecmp
10741077
#include "win32_vk.inc"
10751078

10761079
/*

ext/io/console/win32_vk.inc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -519,7 +519,7 @@ struct vktable;
519519

520520
#ifndef GPERF_DOWNCASE
521521
#define GPERF_DOWNCASE 1
522-
static const unsigned char gperf_downcase[256] =
522+
static unsigned char gperf_downcase[256] =
523523
{
524524
0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14,
525525
15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29,

tool/gperf.sed

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,3 @@
22
s/ hval = / hval = (unsigned int)/
33
s/ return / return (unsigned int)/
44
}
5-
s/^\(static\) \(unsigned char gperf_downcase\)/\1 const \2/

0 commit comments

Comments
 (0)