summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-12-08 05:51:19 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-12-08 05:51:19 +0000
commita4804fbdf503a9c2b550b877120ca4029c65cdb3 (patch)
tree2a354e79dbe773294347b7123701720a9b1bbb60
parentf8659dfd94d3f05f365996c68f2f1a78b1e7cbe3 (diff)
support gperf 3.1
* tool/gperf.sed: extracted sed commands to a script. ANSI-C code produced by gperf 3.1 declares length arguments as `size_t`. it causes conflict with existing declarations, and needs casts for a local variable and return statements. [Feature #13883] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61076 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--Makefile.in4
-rw-r--r--defs/keywords2
-rw-r--r--defs/lex.c.src2
-rw-r--r--enc/jis/props.h.blt56
-rw-r--r--enc/jis/props.kwd6
-rw-r--r--enc/jis/props.src6
-rw-r--r--enc/unicode/10.0.0/name2ctype.h8
-rw-r--r--ext/date/prereq.mk2
-rw-r--r--ext/date/zonetab.h375
-rw-r--r--ext/io/console/depend2
-rw-r--r--ext/io/console/win32_vk.inc361
-rw-r--r--ext/io/console/win32_vk.list2
-rw-r--r--lex.c.blt119
-rwxr-xr-xtool/enc-unicode.rb11
-rw-r--r--tool/gperf.sed22
15 files changed, 489 insertions, 489 deletions
diff --git a/Makefile.in b/Makefile.in
index 0ae2abb..25075f5 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -345,7 +345,7 @@ lex.c: defs/keywords
else \
[ $(Q) ] && echo generating $@ || set -x; \
gperf -C -P -p -j1 -i 1 -g -o -t -N rb_reserved_word -k1,3,$$ $? \
- | sed 's/(long)&((\(struct stringpool_t\) *\*)0)->\(stringpool_[a-z0-9]*\)/offsetof(\1, \2)/g' \
+ | sed -f $(srcdir)/tool/gperf.sed \
> $@.tmp && \
$(MV) $@.tmp $@ && \
$(CP) $? $(srcdir)/defs/lex.c.src && \
@@ -363,7 +363,7 @@ $(srcdir)/enc/jis/props.h: enc/jis/props.kwd
else \
set -x; \
gperf $(JIS_PROPS_OPTIONS) $? | \
- sed 's/(int)(long)&((\([a-zA-Z_0-9 ]*[a-zA-Z_0-9]\) *\*)0)->\([a-zA-Z0-9_]*\),/(char)offsetof(\1, \2),/g' > $@ && \
+ sed -f $(srcdir)/tool/gperf.sed > $@ && \
$(CP) $? $(?:.kwd=.src) && \
$(CP) $@ $(?:.kwd=.h.blt); \
fi
diff --git a/defs/keywords b/defs/keywords
index e0d931c..cc5622e 100644
--- a/defs/keywords
+++ b/defs/keywords
@@ -2,7 +2,7 @@
struct kwtable {int name, id[2], state;};
const struct kwtable *rb_reserved_word(const char *, unsigned int);
#ifndef RIPPER
-static const struct kwtable *reserved_word(const char *, unsigned int);
+/*!ANSI*/static const struct kwtable *reserved_word(const char *, unsigned int);
#define rb_reserved_word(str, len) reserved_word(str, len)
%}
diff --git a/defs/lex.c.src b/defs/lex.c.src
index e0d931c..cc5622e 100644
--- a/defs/lex.c.src
+++ b/defs/lex.c.src
@@ -2,7 +2,7 @@
struct kwtable {int name, id[2], state;};
const struct kwtable *rb_reserved_word(const char *, unsigned int);
#ifndef RIPPER
-static const struct kwtable *reserved_word(const char *, unsigned int);
+/*!ANSI*/static const struct kwtable *reserved_word(const char *, unsigned int);
#define rb_reserved_word(str, len) reserved_word(str, len)
%}
diff --git a/enc/jis/props.h.blt b/enc/jis/props.h.blt
index 4ae2e1f..df48501 100644
--- a/enc/jis/props.h.blt
+++ b/enc/jis/props.h.blt
@@ -1,4 +1,4 @@
-/* C code produced by gperf version 3.0.4 */
+/* ANSI-C code produced by gperf version 3.1 */
/* Command-line: gperf -k1,3 -7 -c -j1 -i1 -t -C -P -t --ignore-case -H onig_jis_property_hash -Q onig_jis_property_pool -N onig_jis_property enc/jis/props.kwd */
#if !((' ' == 32) && ('!' == 33) && ('"' == 34) && ('#' == 35) \
@@ -25,20 +25,21 @@
&& ('w' == 119) && ('x' == 120) && ('y' == 121) && ('z' == 122) \
&& ('{' == 123) && ('|' == 124) && ('}' == 125) && ('~' == 126))
/* The character set is not based on ISO-646. */
-error "gperf generated tables don't work with this execution character set. Please report a bug to <bug-gnu-gperf@gnu.org>."
+#error "gperf generated tables don't work with this execution character set. Please report a bug to <bug-gperf@gnu.org>."
#endif
+#define gperf_offsetof(s, n) (short)offsetof(struct s##_t, s##_str##n)
#line 1 "enc/jis/props.kwd"
/* -*- c -*- */
#define GPERF_DOWNCASE 1
#define GPERF_CASE_STRNCMP 1
static inline int
-gperf_case_strncmp(const char *s1, const char *s2, unsigned int n)
+gperf_case_strncmp(const char *s1, const char *s2, size_t n)
{
const UChar *str = (const UChar *)s1;
const UChar *s = (const UChar *)s2;
- return onigenc_with_ascii_strnicmp(ONIG_ENCODING_ASCII, str, str + n, s, n);
+ return onigenc_with_ascii_strnicmp(ONIG_ENCODING_ASCII, str, str + n, s, (int)n);
}
enum onigenc_jis_ctype {
@@ -68,7 +69,7 @@ struct enc_property {
unsigned char ctype;
};
-static const struct enc_property *onig_jis_property(const char *str, unsigned int len);
+/*static const struct enc_property *onig_jis_property(const char *str, unsigned int len);*/
#line 43 "enc/jis/props.kwd"
struct enc_property;
@@ -107,10 +108,7 @@ static unsigned char gperf_downcase[256] =
#ifndef GPERF_CASE_STRNCMP
#define GPERF_CASE_STRNCMP 1
static int
-gperf_case_strncmp (s1, s2, n)
- register const char *s1;
- register const char *s2;
- register unsigned int n;
+gperf_case_strncmp (register const char *s1, register const char *s2, register size_t n)
{
for (; n > 0;)
{
@@ -127,15 +125,15 @@ gperf_case_strncmp (s1, s2, n)
}
#endif
-#if (defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L) || defined(__cplusplus) || defined(__GNUC_STDC_INLINE__)
-inline
-#elif defined(__GNUC__)
+#ifdef __GNUC__
__inline
+#else
+#ifdef __cplusplus
+inline
+#endif
#endif
static unsigned int
-onig_jis_property_hash (str, len)
- register const char *str;
- register unsigned int len;
+onig_jis_property_hash (register const char *str, register size_t len)
{
static const unsigned char asso_values[] =
{
@@ -153,7 +151,7 @@ onig_jis_property_hash (str, len)
1, 13, 13, 13, 1, 13, 1, 13, 13, 13,
13, 13, 13, 13, 13, 13, 13, 13
};
- return len + asso_values[(unsigned char)str[2]] + asso_values[(unsigned char)str[0]];
+ return (unsigned int)len + asso_values[(unsigned char)str[2]] + asso_values[(unsigned char)str[0]];
}
struct onig_jis_property_pool_t
@@ -175,41 +173,33 @@ static const struct onig_jis_property_pool_t onig_jis_property_pool_contents =
"cyrillic"
};
#define onig_jis_property_pool ((const char *) &onig_jis_property_pool_contents)
-#ifdef __GNUC__
-__inline
-#if defined __GNUC_STDC_INLINE__ || defined __GNUC_GNU_INLINE__
-__attribute__ ((__gnu_inline__))
-#endif
-#endif
const struct enc_property *
-onig_jis_property (str, len)
- register const char *str;
- register unsigned int len;
+onig_jis_property (register const char *str, register size_t len)
{
static const struct enc_property wordlist[] =
{
{-1}, {-1}, {-1}, {-1}, {-1},
#line 48 "enc/jis/props.kwd"
- {(char)offsetof(struct onig_jis_property_pool_t, onig_jis_property_pool_str5), onigenc_jis_han},
+ {gperf_offsetof(onig_jis_property_pool, 5), onigenc_jis_han},
{-1},
#line 49 "enc/jis/props.kwd"
- {(char)offsetof(struct onig_jis_property_pool_t, onig_jis_property_pool_str7), onigenc_jis_latin},
+ {gperf_offsetof(onig_jis_property_pool, 7), onigenc_jis_latin},
#line 50 "enc/jis/props.kwd"
- {(char)offsetof(struct onig_jis_property_pool_t, onig_jis_property_pool_str8), onigenc_jis_greek},
+ {gperf_offsetof(onig_jis_property_pool, 8), onigenc_jis_greek},
{-1},
#line 46 "enc/jis/props.kwd"
- {(char)offsetof(struct onig_jis_property_pool_t, onig_jis_property_pool_str10), onigenc_jis_hiragana},
+ {gperf_offsetof(onig_jis_property_pool, 10), onigenc_jis_hiragana},
#line 47 "enc/jis/props.kwd"
- {(char)offsetof(struct onig_jis_property_pool_t, onig_jis_property_pool_str11), onigenc_jis_katakana},
+ {gperf_offsetof(onig_jis_property_pool, 11), onigenc_jis_katakana},
#line 51 "enc/jis/props.kwd"
- {(char)offsetof(struct onig_jis_property_pool_t, onig_jis_property_pool_str12), onigenc_jis_cyrillic}
+ {gperf_offsetof(onig_jis_property_pool, 12), onigenc_jis_cyrillic}
};
if (len <= MAX_WORD_LENGTH && len >= MIN_WORD_LENGTH)
{
- register int key = onig_jis_property_hash (str, len);
+ register unsigned int key = onig_jis_property_hash (str, len);
- if (key <= MAX_HASH_VALUE && key >= 0)
+ if (key <= MAX_HASH_VALUE)
{
register int o = wordlist[key].name;
if (o >= 0)
diff --git a/enc/jis/props.kwd b/enc/jis/props.kwd
index f3235c0..eaeeccd 100644
--- a/enc/jis/props.kwd
+++ b/enc/jis/props.kwd
@@ -3,11 +3,11 @@
#define GPERF_CASE_STRNCMP 1
static inline int
-gperf_case_strncmp(const char *s1, const char *s2, unsigned int n)
+gperf_case_strncmp(const char *s1, const char *s2, size_t n)
{
const UChar *str = (const UChar *)s1;
const UChar *s = (const UChar *)s2;
- return onigenc_with_ascii_strnicmp(ONIG_ENCODING_ASCII, str, str + n, s, n);
+ return onigenc_with_ascii_strnicmp(ONIG_ENCODING_ASCII, str, str + n, s, (int)n);
}
enum onigenc_jis_ctype {
@@ -37,7 +37,7 @@ struct enc_property {
unsigned char ctype;
};
-static const struct enc_property *onig_jis_property(const char *str, unsigned int len);
+/*!ANSI*/static const struct enc_property *onig_jis_property(const char *str, unsigned int len);
%}
struct enc_property;
diff --git a/enc/jis/props.src b/enc/jis/props.src
index f3235c0..eaeeccd 100644
--- a/enc/jis/props.src
+++ b/enc/jis/props.src
@@ -3,11 +3,11 @@
#define GPERF_CASE_STRNCMP 1
static inline int
-gperf_case_strncmp(const char *s1, const char *s2, unsigned int n)
+gperf_case_strncmp(const char *s1, const char *s2, size_t n)
{
const UChar *str = (const UChar *)s1;
const UChar *s = (const UChar *)s2;
- return onigenc_with_ascii_strnicmp(ONIG_ENCODING_ASCII, str, str + n, s, n);
+ return onigenc_with_ascii_strnicmp(ONIG_ENCODING_ASCII, str, str + n, s, (int)n);
}
enum onigenc_jis_ctype {
@@ -37,7 +37,7 @@ struct enc_property {
unsigned char ctype;
};
-static const struct enc_property *onig_jis_property(const char *str, unsigned int len);
+/*!ANSI*/static const struct enc_property *onig_jis_property(const char *str, unsigned int len);
%}
struct enc_property;
diff --git a/enc/unicode/10.0.0/name2ctype.h b/enc/unicode/10.0.0/name2ctype.h
index 6aab2cb..4a1422d 100644
--- a/enc/unicode/10.0.0/name2ctype.h
+++ b/enc/unicode/10.0.0/name2ctype.h
@@ -34756,7 +34756,9 @@ struct uniname2ctype_struct {
};
#define uniname2ctype_offset(str) offsetof(struct uniname2ctype_pool_t, uniname2ctype_pool_##str)
+#if !1+0
static const struct uniname2ctype_struct *uniname2ctype_p(const char *, unsigned int);
+#endif
#ifndef USE_UNICODE_PROPERTIES
#define TOTAL_KEYWORDS 15
@@ -34786,7 +34788,7 @@ inline
#endif
#endif
static unsigned int
-uniname2ctype_hash (register const char *str, register unsigned int len)
+uniname2ctype_hash (register const char *str, register size_t len)
{
#ifndef USE_UNICODE_PROPERTIES
static const unsigned char asso_values[] =
@@ -34832,7 +34834,7 @@ uniname2ctype_hash (register const char *str, register unsigned int len)
#ifndef USE_UNICODE_PROPERTIES
return len + asso_values[(unsigned char)str[2]] + asso_values[(unsigned char)str[0]];
#else /* USE_UNICODE_PROPERTIES */
- register unsigned int hval = len;
+ register unsigned int hval = (unsigned int)len;
switch (hval)
{
@@ -36535,7 +36537,7 @@ static const struct uniname2ctype_pool_t uniname2ctype_pool_contents =
};
#define uniname2ctype_pool ((const char *) &uniname2ctype_pool_contents)
const struct uniname2ctype_struct *
-uniname2ctype_p (register const char *str, register unsigned int len)
+uniname2ctype_p (register const char *str, register size_t len)
{
static const struct uniname2ctype_struct wordlist[] =
{
diff --git a/ext/date/prereq.mk b/ext/date/prereq.mk
index a0a5a2b..c0c55d2 100644
--- a/ext/date/prereq.mk
+++ b/ext/date/prereq.mk
@@ -2,7 +2,7 @@
.list.h:
gperf -E -C -c -P -p -j1 -i 1 -g -o -t -N $(*F) $< \
- | sed 's/(int)(long)&((\(struct stringpool_t\) *\*)0)->\(stringpool_[a-z0-9]*\)/offsetof(\1, \2)/g' \
+ | sed -f $(top_srcdir)/tool/gperf.sed \
> $(@F)
zonetab.h: zonetab.list
diff --git a/ext/date/zonetab.h b/ext/date/zonetab.h
index fa86e79..2dfa9b9 100644
--- a/ext/date/zonetab.h
+++ b/ext/date/zonetab.h
@@ -1,4 +1,4 @@
-/* C code produced by gperf version 3.0.4 */
+/* ANSI-C code produced by gperf version 3.1 */
/* Command-line: gperf -E -C -c -P -p -j1 -i 1 -g -o -t -N zonetab zonetab.list */
/* Computed positions: -k'1-4,$' */
@@ -26,9 +26,10 @@
&& ('w' == 119) && ('x' == 120) && ('y' == 121) && ('z' == 122) \
&& ('{' == 123) && ('|' == 124) && ('}' == 125) && ('~' == 126))
/* The character set is not based on ISO-646. */
-error "gperf generated tables don't work with this execution character set. Please report a bug to <bug-gnu-gperf@gnu.org>."
+#error "gperf generated tables don't work with this execution character set. Please report a bug to <bug-gperf@gnu.org>."
#endif
+#define gperf_offsetof(s, n) (short)offsetof(struct s##_t, s##_str##n)
#line 1 "zonetab.list"
struct zone {
@@ -40,15 +41,15 @@ static const struct zone *zonetab();
struct zone;
/* maximum key range = 434, duplicates = 0 */
-#if (defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L) || defined(__cplusplus) || defined(__GNUC_STDC_INLINE__)
-inline
-#elif defined(__GNUC__)
+#ifdef __GNUC__
__inline
+#else
+#ifdef __cplusplus
+inline
+#endif
#endif
static unsigned int
-hash (str, len)
- register const char *str;
- register unsigned int len;
+hash (register const char *str, register size_t len)
{
static const unsigned short asso_values[] =
{
@@ -79,7 +80,7 @@ hash (str, len)
439, 439, 439, 439, 439, 439, 439, 439, 439, 439,
439, 439, 439, 439, 439, 439, 439
};
- register int hval = len;
+ register unsigned int hval = (unsigned int)len;
switch (hval)
{
@@ -96,7 +97,7 @@ hash (str, len)
hval += asso_values[(unsigned char)str[0]+1];
break;
}
- return hval + asso_values[(unsigned char)str[len - 1]];
+ return (unsigned int)hval + asso_values[(unsigned char)str[len - 1]];
}
struct stringpool_t
@@ -446,16 +447,8 @@ static const struct stringpool_t stringpool_contents =
"fiji"
};
#define stringpool ((const char *) &stringpool_contents)
-#ifdef __GNUC__
-__inline
-#if defined __GNUC_STDC_INLINE__ || defined __GNUC_GNU_INLINE__
-__attribute__ ((__gnu_inline__))
-#endif
-#endif
const struct zone *
-zonetab (str, len)
- register const char *str;
- register unsigned int len;
+zonetab (register const char *str, register size_t len)
{
enum
{
@@ -470,398 +463,398 @@ zonetab (str, len)
{
{-1}, {-1}, {-1}, {-1}, {-1},
#line 37 "zonetab.list"
- {offsetof(struct stringpool_t, stringpool_str5), -5*3600},
+ {gperf_offsetof(stringpool, 5), -5*3600},
#line 38 "zonetab.list"
- {offsetof(struct stringpool_t, stringpool_str6), -6*3600},
+ {gperf_offsetof(stringpool, 6), -6*3600},
#line 24 "zonetab.list"
- {offsetof(struct stringpool_t, stringpool_str7), 4*3600},
+ {gperf_offsetof(stringpool, 7), 4*3600},
{-1}, {-1}, {-1}, {-1}, {-1}, {-1},
#line 15 "zonetab.list"
- {offsetof(struct stringpool_t, stringpool_str14), -6*3600},
+ {gperf_offsetof(stringpool, 14), -6*3600},
#line 16 "zonetab.list"
- {offsetof(struct stringpool_t, stringpool_str15), -5*3600},
+ {gperf_offsetof(stringpool, 15), -5*3600},
#line 85 "zonetab.list"
- {offsetof(struct stringpool_t, stringpool_str16), 2*3600},
+ {gperf_offsetof(stringpool, 16), 2*3600},
#line 71 "zonetab.list"
- {offsetof(struct stringpool_t, stringpool_str17), 1*3600},
+ {gperf_offsetof(stringpool, 17), 1*3600},
#line 90 "zonetab.list"
- {offsetof(struct stringpool_t, stringpool_str18), 4*3600},
+ {gperf_offsetof(stringpool, 18), 4*3600},
#line 79 "zonetab.list"
- {offsetof(struct stringpool_t, stringpool_str19), 2*3600},
+ {gperf_offsetof(stringpool, 19), 2*3600},
#line 65 "zonetab.list"
- {offsetof(struct stringpool_t, stringpool_str20),-10*3600},
+ {gperf_offsetof(stringpool, 20),-10*3600},
{-1},
#line 17 "zonetab.list"
- {offsetof(struct stringpool_t, stringpool_str22), -7*3600},
+ {gperf_offsetof(stringpool, 22), -7*3600},
#line 18 "zonetab.list"
- {offsetof(struct stringpool_t, stringpool_str23), -6*3600},
+ {gperf_offsetof(stringpool, 23), -6*3600},
#line 84 "zonetab.list"
- {offsetof(struct stringpool_t, stringpool_str24), 2*3600},
+ {gperf_offsetof(stringpool, 24), 2*3600},
#line 73 "zonetab.list"
- {offsetof(struct stringpool_t, stringpool_str25), 1*3600},
+ {gperf_offsetof(stringpool, 25), 1*3600},
{-1},
#line 82 "zonetab.list"
- {offsetof(struct stringpool_t, stringpool_str27), 2*3600},
+ {gperf_offsetof(stringpool, 27), 2*3600},
{-1}, {-1},
#line 47 "zonetab.list"
- {offsetof(struct stringpool_t, stringpool_str30), 0*3600},
+ {gperf_offsetof(stringpool, 30), 0*3600},
#line 128 "zonetab.list"
- {offsetof(struct stringpool_t, stringpool_str31), -43200},
+ {gperf_offsetof(stringpool, 31), -43200},
#line 78 "zonetab.list"
- {offsetof(struct stringpool_t, stringpool_str32), 1*3600},
+ {gperf_offsetof(stringpool, 32), 1*3600},
#line 77 "zonetab.list"
- {offsetof(struct stringpool_t, stringpool_str33), 1*3600},
+ {gperf_offsetof(stringpool, 33), 1*3600},
{-1},
#line 95 "zonetab.list"
- {offsetof(struct stringpool_t, stringpool_str35), 7*3600},
+ {gperf_offsetof(stringpool, 35), 7*3600},
#line 98 "zonetab.list"
- {offsetof(struct stringpool_t, stringpool_str36), 8*3600},
+ {gperf_offsetof(stringpool, 36), 8*3600},
#line 25 "zonetab.list"
- {offsetof(struct stringpool_t, stringpool_str37), 5*3600},
+ {gperf_offsetof(stringpool, 37), 5*3600},
#line 123 "zonetab.list"
- {offsetof(struct stringpool_t, stringpool_str38), 3600},
+ {gperf_offsetof(stringpool, 38), 3600},
#line 122 "zonetab.list"
- {offsetof(struct stringpool_t, stringpool_str39), 21600},
+ {gperf_offsetof(stringpool, 39), 21600},
#line 178 "zonetab.list"
- {offsetof(struct stringpool_t, stringpool_str40), 18000},
+ {gperf_offsetof(stringpool, 40), 18000},
#line 120 "zonetab.list"
- {offsetof(struct stringpool_t, stringpool_str41), 34200},
+ {gperf_offsetof(stringpool, 41), 34200},
#line 121 "zonetab.list"
- {offsetof(struct stringpool_t, stringpool_str42), -21600},
+ {gperf_offsetof(stringpool, 42), -21600},
{-1},
#line 13 "zonetab.list"
- {offsetof(struct stringpool_t, stringpool_str44), -5*3600},
+ {gperf_offsetof(stringpool, 44), -5*3600},
#line 14 "zonetab.list"
- {offsetof(struct stringpool_t, stringpool_str45), -4*3600},
+ {gperf_offsetof(stringpool, 45), -4*3600},
#line 124 "zonetab.list"
- {offsetof(struct stringpool_t, stringpool_str46), 3600},
+ {gperf_offsetof(stringpool, 46), 3600},
#line 80 "zonetab.list"
- {offsetof(struct stringpool_t, stringpool_str47), 2*3600},
+ {gperf_offsetof(stringpool, 47), 2*3600},
#line 164 "zonetab.list"
- {offsetof(struct stringpool_t, stringpool_str48), 25200},
+ {gperf_offsetof(stringpool, 48), 25200},
#line 88 "zonetab.list"
- {offsetof(struct stringpool_t, stringpool_str49), 3*3600},
+ {gperf_offsetof(stringpool, 49), 3*3600},
#line 87 "zonetab.list"
- {offsetof(struct stringpool_t, stringpool_str50), 3*3600},
+ {gperf_offsetof(stringpool, 50), 3*3600},
#line 45 "zonetab.list"
- {offsetof(struct stringpool_t, stringpool_str51), 0*3600},
+ {gperf_offsetof(stringpool, 51), 0*3600},
#line 101 "zonetab.list"
- {offsetof(struct stringpool_t, stringpool_str52),10*3600},
+ {gperf_offsetof(stringpool, 52),10*3600},
#line 103 "zonetab.list"
- {offsetof(struct stringpool_t, stringpool_str53),11*3600},
+ {gperf_offsetof(stringpool, 53),11*3600},
#line 160 "zonetab.list"
- {offsetof(struct stringpool_t, stringpool_str54), -10800},
+ {gperf_offsetof(stringpool, 54), -10800},
#line 177 "zonetab.list"
- {offsetof(struct stringpool_t, stringpool_str55), 3600},
+ {gperf_offsetof(stringpool, 55), 3600},
#line 23 "zonetab.list"
- {offsetof(struct stringpool_t, stringpool_str56), 3*3600},
+ {gperf_offsetof(stringpool, 56), 3*3600},
#line 63 "zonetab.list"
- {offsetof(struct stringpool_t, stringpool_str57), -9*3600},
+ {gperf_offsetof(stringpool, 57), -9*3600},
#line 59 "zonetab.list"
- {offsetof(struct stringpool_t, stringpool_str58), -8*3600},
+ {gperf_offsetof(stringpool, 58), -8*3600},
#line 100 "zonetab.list"
- {offsetof(struct stringpool_t, stringpool_str59), 9*3600},
+ {gperf_offsetof(stringpool, 59), 9*3600},
#line 57 "zonetab.list"
- {offsetof(struct stringpool_t, stringpool_str60), -4*3600},
+ {gperf_offsetof(stringpool, 60), -4*3600},
#line 133 "zonetab.list"
- {offsetof(struct stringpool_t, stringpool_str61), -18000},
+ {gperf_offsetof(stringpool, 61), -18000},
#line 54 "zonetab.list"
- {offsetof(struct stringpool_t, stringpool_str62),-3*3600},
+ {gperf_offsetof(stringpool, 62),-3*3600},
#line 86 "zonetab.list"
- {offsetof(struct stringpool_t, stringpool_str63), 3*3600},
+ {gperf_offsetof(stringpool, 63), 3*3600},
#line 175 "zonetab.list"
- {offsetof(struct stringpool_t, stringpool_str64), 28800},
+ {gperf_offsetof(stringpool, 64), 28800},
#line 70 "zonetab.list"
- {offsetof(struct stringpool_t, stringpool_str65), 1*3600},
+ {gperf_offsetof(stringpool, 65), 1*3600},
#line 96 "zonetab.list"
- {offsetof(struct stringpool_t, stringpool_str66), 8*3600},
+ {gperf_offsetof(stringpool, 66), 8*3600},
#line 53 "zonetab.list"
- {offsetof(struct stringpool_t, stringpool_str67), -3*3600},
+ {gperf_offsetof(stringpool, 67), -3*3600},
{-1},
#line 49 "zonetab.list"
- {offsetof(struct stringpool_t, stringpool_str69),-2*3600},
+ {gperf_offsetof(stringpool, 69),-2*3600},
{-1},
#line 21 "zonetab.list"
- {offsetof(struct stringpool_t, stringpool_str71), 1*3600},
+ {gperf_offsetof(stringpool, 71), 1*3600},
#line 131 "zonetab.list"
- {offsetof(struct stringpool_t, stringpool_str72), 7200},
+ {gperf_offsetof(stringpool, 72), 7200},
#line 48 "zonetab.list"
- {offsetof(struct stringpool_t, stringpool_str73), -2*3600},
+ {gperf_offsetof(stringpool, 73), -2*3600},
#line 126 "zonetab.list"
- {offsetof(struct stringpool_t, stringpool_str74), -21600},
+ {gperf_offsetof(stringpool, 74), -21600},
#line 56 "zonetab.list"
- {offsetof(struct stringpool_t, stringpool_str75), -4*3600},
+ {gperf_offsetof(stringpool, 75), -4*3600},
#line 52 "zonetab.list"
- {offsetof(struct stringpool_t, stringpool_str76), -3*3600},
+ {gperf_offsetof(stringpool, 76), -3*3600},
#line 51 "zonetab.list"
- {offsetof(struct stringpool_t, stringpool_str77), -3*3600},
+ {gperf_offsetof(stringpool, 77), -3*3600},
#line 129 "zonetab.list"
- {offsetof(struct stringpool_t, stringpool_str78), 10800},
+ {gperf_offsetof(stringpool, 78), 10800},
#line 132 "zonetab.list"
- {offsetof(struct stringpool_t, stringpool_str79), -10800},
+ {gperf_offsetof(stringpool, 79), -10800},
#line 99 "zonetab.list"
- {offsetof(struct stringpool_t, stringpool_str80), 9*3600},
+ {gperf_offsetof(stringpool, 80), 9*3600},
#line 130 "zonetab.list"
- {offsetof(struct stringpool_t, stringpool_str81), 36000},
+ {gperf_offsetof(stringpool, 81), 36000},
#line 39 "zonetab.list"
- {offsetof(struct stringpool_t, stringpool_str82), -7*3600},
+ {gperf_offsetof(stringpool, 82), -7*3600},
#line 68 "zonetab.list"
- {offsetof(struct stringpool_t, stringpool_str83), -11*3600},
+ {gperf_offsetof(stringpool, 83), -11*3600},
#line 33 "zonetab.list"
- {offsetof(struct stringpool_t, stringpool_str84), -1*3600},
+ {gperf_offsetof(stringpool, 84), -1*3600},
#line 55 "zonetab.list"
- {offsetof(struct stringpool_t, stringpool_str85), -(3*3600+1800)},
+ {gperf_offsetof(stringpool, 85), -(3*3600+1800)},
#line 50 "zonetab.list"
- {offsetof(struct stringpool_t, stringpool_str86), -(2*3600+1800)},
+ {gperf_offsetof(stringpool, 86), -(2*3600+1800)},
#line 117 "zonetab.list"
- {offsetof(struct stringpool_t, stringpool_str87), -21600},
+ {gperf_offsetof(stringpool, 87), -21600},
#line 125 "zonetab.list"
- {offsetof(struct stringpool_t, stringpool_str88), 39600},
+ {gperf_offsetof(stringpool, 88), 39600},
#line 179 "zonetab.list"
- {offsetof(struct stringpool_t, stringpool_str89), 36000},
+ {gperf_offsetof(stringpool, 89), 36000},
#line 67 "zonetab.list"
- {offsetof(struct stringpool_t, stringpool_str90),-10*3600},
+ {gperf_offsetof(stringpool, 90),-10*3600},
#line 62 "zonetab.list"
- {offsetof(struct stringpool_t, stringpool_str91), -9*3600},
+ {gperf_offsetof(stringpool, 91), -9*3600},
{-1},
#line 165 "zonetab.list"
- {offsetof(struct stringpool_t, stringpool_str93), 28800},
+ {gperf_offsetof(stringpool, 93), 28800},
{-1},
#line 94 "zonetab.list"
- {offsetof(struct stringpool_t, stringpool_str95), 6*3600},
+ {gperf_offsetof(stringpool, 95), 6*3600},
{-1},
#line 159 "zonetab.list"
- {offsetof(struct stringpool_t, stringpool_str97), 10800},
+ {gperf_offsetof(stringpool, 97), 10800},
#line 66 "zonetab.list"
- {offsetof(struct stringpool_t, stringpool_str98),-10*3600},
+ {gperf_offsetof(stringpool, 98),-10*3600},
#line 61 "zonetab.list"
- {offsetof(struct stringpool_t, stringpool_str99),-9*3600},
+ {gperf_offsetof(stringpool, 99),-9*3600},
#line 102 "zonetab.list"
- {offsetof(struct stringpool_t, stringpool_str100), 10*3600},
+ {gperf_offsetof(stringpool, 100), 10*3600},
#line 92 "zonetab.list"
- {offsetof(struct stringpool_t, stringpool_str101), 5*3600},
+ {gperf_offsetof(stringpool, 101), 5*3600},
#line 93 "zonetab.list"
- {offsetof(struct stringpool_t, stringpool_str102), (5*3600+1800)},
+ {gperf_offsetof(stringpool, 102), (5*3600+1800)},
#line 76 "zonetab.list"
- {offsetof(struct stringpool_t, stringpool_str103), 1*3600},
+ {gperf_offsetof(stringpool, 103), 1*3600},
#line 42 "zonetab.list"
- {offsetof(struct stringpool_t, stringpool_str104), -10*3600},
+ {gperf_offsetof(stringpool, 104), -10*3600},
#line 91 "zonetab.list"
- {offsetof(struct stringpool_t, stringpool_str105), 4*3600},
+ {gperf_offsetof(stringpool, 105), 4*3600},
{-1},
#line 75 "zonetab.list"
- {offsetof(struct stringpool_t, stringpool_str107), 1*3600},
+ {gperf_offsetof(stringpool, 107), 1*3600},
#line 118 "zonetab.list"
- {offsetof(struct stringpool_t, stringpool_str108), -3600},
+ {gperf_offsetof(stringpool, 108), -3600},
#line 83 "zonetab.list"
- {offsetof(struct stringpool_t, stringpool_str109), 2*3600},
+ {gperf_offsetof(stringpool, 109), 2*3600},
#line 138 "zonetab.list"
- {offsetof(struct stringpool_t, stringpool_str110), -10800},
+ {gperf_offsetof(stringpool, 110), -10800},
{-1},
#line 43 "zonetab.list"
- {offsetof(struct stringpool_t, stringpool_str112), -11*3600},
+ {gperf_offsetof(stringpool, 112), -11*3600},
{-1},
#line 74 "zonetab.list"
- {offsetof(struct stringpool_t, stringpool_str114), 1*3600},
+ {gperf_offsetof(stringpool, 114), 1*3600},
#line 176 "zonetab.list"
- {offsetof(struct stringpool_t, stringpool_str115), 3600},
+ {gperf_offsetof(stringpool, 115), 3600},
#line 30 "zonetab.list"
- {offsetof(struct stringpool_t, stringpool_str116), 10*3600},
+ {gperf_offsetof(stringpool, 116), 10*3600},
#line 22 "zonetab.list"
- {offsetof(struct stringpool_t, stringpool_str117), 2*3600},
+ {gperf_offsetof(stringpool, 117), 2*3600},
{-1},
#line 32 "zonetab.list"
- {offsetof(struct stringpool_t, stringpool_str119), 12*3600},
+ {gperf_offsetof(stringpool, 119), 12*3600},
#line 167 "zonetab.list"
- {offsetof(struct stringpool_t, stringpool_str120), 21600},
+ {gperf_offsetof(stringpool, 120), 21600},
{-1},
#line 81 "zonetab.list"
- {offsetof(struct stringpool_t, stringpool_str122), 2*3600},
+ {gperf_offsetof(stringpool, 122), 2*3600},
{-1},
#line 143 "zonetab.list"
- {offsetof(struct stringpool_t, stringpool_str124), 12600},
+ {gperf_offsetof(stringpool, 124), 12600},
#line 97 "zonetab.list"
- {offsetof(struct stringpool_t, stringpool_str125), 8*3600},
+ {gperf_offsetof(stringpool, 125), 8*3600},
#line 11 "zonetab.list"
- {offsetof(struct stringpool_t, stringpool_str126), 0*3600},
+ {gperf_offsetof(stringpool, 126), 0*3600},
{-1},
#line 36 "zonetab.list"
- {offsetof(struct stringpool_t, stringpool_str128), -4*3600},
+ {gperf_offsetof(stringpool, 128), -4*3600},
#line 106 "zonetab.list"
- {offsetof(struct stringpool_t, stringpool_str129), 12*3600},
+ {gperf_offsetof(stringpool, 129), 12*3600},
{-1},
#line 105 "zonetab.list"
- {offsetof(struct stringpool_t, stringpool_str131),12*3600},
+ {gperf_offsetof(stringpool, 131),12*3600},
#line 107 "zonetab.list"
- {offsetof(struct stringpool_t, stringpool_str132),13*3600},
+ {gperf_offsetof(stringpool, 132),13*3600},
#line 149 "zonetab.list"
- {offsetof(struct stringpool_t, stringpool_str133), 23400},
+ {gperf_offsetof(stringpool, 133), 23400},
{-1},
#line 109 "zonetab.list"
- {offsetof(struct stringpool_t, stringpool_str135), -32400},
+ {gperf_offsetof(stringpool, 135), -32400},
#line 19 "zonetab.list"
- {offsetof(struct stringpool_t, stringpool_str136), -8*3600},
+ {gperf_offsetof(stringpool, 136), -8*3600},
#line 20 "zonetab.list"
- {offsetof(struct stringpool_t, stringpool_str137), -7*3600},
+ {gperf_offsetof(stringpool, 137), -7*3600},
#line 162 "zonetab.list"
- {offsetof(struct stringpool_t, stringpool_str138), -14400},
+ {gperf_offsetof(stringpool, 138), -14400},
#line 145 "zonetab.list"
- {offsetof(struct stringpool_t, stringpool_str139), 32400},
+ {gperf_offsetof(stringpool, 139), 32400},
{-1}, {-1},
#line 44 "zonetab.list"
- {offsetof(struct stringpool_t, stringpool_str142), -12*3600},
+ {gperf_offsetof(stringpool, 142), -12*3600},
#line 26 "zonetab.list"
- {offsetof(struct stringpool_t, stringpool_str143), 6*3600},
+ {gperf_offsetof(stringpool, 143), 6*3600},
#line 60 "zonetab.list"
- {offsetof(struct stringpool_t, stringpool_str144),-9*3600},
+ {gperf_offsetof(stringpool, 144),-9*3600},
#line 58 "zonetab.list"
- {offsetof(struct stringpool_t, stringpool_str145),-8*3600},
+ {gperf_offsetof(stringpool, 145),-8*3600},
{-1}, {-1},
#line 119 "zonetab.list"
- {offsetof(struct stringpool_t, stringpool_str148), 14400},
+ {gperf_offsetof(stringpool, 148), 14400},
{-1},
#line 89 "zonetab.list"
- {offsetof(struct stringpool_t, stringpool_str150), 3*3600},
+ {gperf_offsetof(stringpool, 150), 3*3600},
#line 104 "zonetab.list"
- {offsetof(struct stringpool_t, stringpool_str151),12*3600},
+ {gperf_offsetof(stringpool, 151),12*3600},
{-1},
#line 111 "zonetab.list"
- {offsetof(struct stringpool_t, stringpool_str153), 14400},
+ {gperf_offsetof(stringpool, 153), 14400},
{-1},
#line 34 "zonetab.list"
- {offsetof(struct stringpool_t, stringpool_str155), -2*3600},
+ {gperf_offsetof(stringpool, 155), -2*3600},
#line 31 "zonetab.list"
- {offsetof(struct stringpool_t, stringpool_str156), 11*3600},
+ {gperf_offsetof(stringpool, 156), 11*3600},
#line 147 "zonetab.list"
- {offsetof(struct stringpool_t, stringpool_str157), -7200},
+ {gperf_offsetof(stringpool, 157), -7200},
{-1}, {-1},
#line 172 "zonetab.list"
- {offsetof(struct stringpool_t, stringpool_str160), -18000},
+ {gperf_offsetof(stringpool, 160), -18000},
{-1}, {-1}, {-1},
#line 64 "zonetab.list"
- {offsetof(struct stringpool_t, stringpool_str164),-10*3600},
+ {gperf_offsetof(stringpool, 164),-10*3600},
{-1}, {-1},
#line 28 "zonetab.list"
- {offsetof(struct stringpool_t, stringpool_str167), 8*3600},
+ {gperf_offsetof(stringpool, 167), 8*3600},
#line 137 "zonetab.list"
- {offsetof(struct stringpool_t, stringpool_str168), 7200},
+ {gperf_offsetof(stringpool, 168), 7200},
#line 29 "zonetab.list"
- {offsetof(struct stringpool_t, stringpool_str169), 9*3600},
+ {gperf_offsetof(stringpool, 169), 9*3600},
#line 155 "zonetab.list"
- {offsetof(struct stringpool_t, stringpool_str170), 25200},
+ {gperf_offsetof(stringpool, 170), 25200},
#line 150 "zonetab.list"
- {offsetof(struct stringpool_t, stringpool_str171), 21600},
+ {gperf_offsetof(stringpool, 171), 21600},
#line 154 "zonetab.list"
- {offsetof(struct stringpool_t, stringpool_str172), 28800},
+ {gperf_offsetof(stringpool, 172), 28800},
{-1},
#line 161 "zonetab.list"
- {offsetof(struct stringpool_t, stringpool_str174), -18000},
+ {gperf_offsetof(stringpool, 174), -18000},
{-1}, {-1},
#line 166 "zonetab.list"
- {offsetof(struct stringpool_t, stringpool_str177), 7200},
+ {gperf_offsetof(stringpool, 177), 7200},
{-1}, {-1}, {-1},
#line 115 "zonetab.list"
- {offsetof(struct stringpool_t, stringpool_str181), 36000},
+ {gperf_offsetof(stringpool, 181), 36000},
#line 113 "zonetab.list"
- {offsetof(struct stringpool_t, stringpool_str182), -14400},
+ {gperf_offsetof(stringpool, 182), -14400},
{-1}, {-1}, {-1},
#line 146 "zonetab.list"
- {offsetof(struct stringpool_t, stringpool_str186), -21600},
+ {gperf_offsetof(stringpool, 186), -21600},
{-1},
#line 148 "zonetab.list"
- {offsetof(struct stringpool_t, stringpool_str188), -25200},
+ {gperf_offsetof(stringpool, 188), -25200},
{-1},
#line 127 "zonetab.list"
- {offsetof(struct stringpool_t, stringpool_str190), 28800},
+ {gperf_offsetof(stringpool, 190), 28800},
#line 116 "zonetab.list"
- {offsetof(struct stringpool_t, stringpool_str191), -3600},
+ {gperf_offsetof(stringpool, 191), -3600},
#line 142 "zonetab.list"
- {offsetof(struct stringpool_t, stringpool_str192), 19800},
+ {gperf_offsetof(stringpool, 192), 19800},
{-1},
#line 40 "zonetab.list"
- {offsetof(struct stringpool_t, stringpool_str194), -8*3600},
+ {gperf_offsetof(stringpool, 194), -8*3600},
#line 112 "zonetab.list"
- {offsetof(struct stringpool_t, stringpool_str195), 10800},
+ {gperf_offsetof(stringpool, 195), 10800},
#line 139 "zonetab.list"
- {offsetof(struct stringpool_t, stringpool_str196), 0},
+ {gperf_offsetof(stringpool, 196), 0},
#line 152 "zonetab.list"
- {offsetof(struct stringpool_t, stringpool_str197), 43200},
+ {gperf_offsetof(stringpool, 197), 43200},
#line 141 "zonetab.list"
- {offsetof(struct stringpool_t, stringpool_str198), -36000},
+ {gperf_offsetof(stringpool, 198), -36000},
#line 27 "zonetab.list"
- {offsetof(struct stringpool_t, stringpool_str199), 7*3600},
+ {gperf_offsetof(stringpool, 199), 7*3600},
#line 158 "zonetab.list"
- {offsetof(struct stringpool_t, stringpool_str200), 3600},
+ {gperf_offsetof(stringpool, 200), 3600},
{-1}, {-1},
#line 110 "zonetab.list"
- {offsetof(struct stringpool_t, stringpool_str203), 10800},
+ {gperf_offsetof(stringpool, 203), 10800},
#line 163 "zonetab.list"
- {offsetof(struct stringpool_t, stringpool_str204), -39600},
+ {gperf_offsetof(stringpool, 204), -39600},
#line 41 "zonetab.list"
- {offsetof(struct stringpool_t, stringpool_str205), -9*3600},
+ {gperf_offsetof(stringpool, 205), -9*3600},
#line 35 "zonetab.list"
- {offsetof(struct stringpool_t, stringpool_str206), -3*3600},
+ {gperf_offsetof(stringpool, 206), -3*3600},
#line 12 "zonetab.list"
- {offsetof(struct stringpool_t, stringpool_str207), 0*3600},
+ {gperf_offsetof(stringpool, 207), 0*3600},
#line 169 "zonetab.list"
- {offsetof(struct stringpool_t, stringpool_str208), 36000},
+ {gperf_offsetof(stringpool, 208), 36000},
#line 72 "zonetab.list"
- {offsetof(struct stringpool_t, stringpool_str209), 1*3600},
+ {gperf_offsetof(stringpool, 209), 1*3600},
{-1},
#line 153 "zonetab.list"
- {offsetof(struct stringpool_t, stringpool_str211), -12600},
+ {gperf_offsetof(stringpool, 211), -12600},
{-1}, {-1}, {-1}, {-1}, {-1},
#line 151 "zonetab.list"
- {offsetof(struct stringpool_t, stringpool_str217), 20700},
+ {gperf_offsetof(stringpool, 217), 20700},
#line 114 "zonetab.list"
- {offsetof(struct stringpool_t, stringpool_str218), 34200},
+ {gperf_offsetof(stringpool, 218), 34200},
{-1}, {-1},
#line 140 "zonetab.list"
- {offsetof(struct stringpool_t, stringpool_str221), 7200},
+ {gperf_offsetof(stringpool, 221), 7200},
{-1},
#line 174 "zonetab.list"
- {offsetof(struct stringpool_t, stringpool_str223), 36000},
+ {gperf_offsetof(stringpool, 223), 36000},
{-1}, {-1}, {-1}, {-1}, {-1},
#line 46 "zonetab.list"
- {offsetof(struct stringpool_t, stringpool_str229), 0*3600},
+ {gperf_offsetof(stringpool, 229), 0*3600},
{-1}, {-1}, {-1},
#line 135 "zonetab.list"
- {offsetof(struct stringpool_t, stringpool_str233), 18000},
+ {gperf_offsetof(stringpool, 233), 18000},
{-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
{-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
{-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
{-1}, {-1}, {-1}, {-1},
#line 173 "zonetab.list"
- {offsetof(struct stringpool_t, stringpool_str265), -25200},
+ {gperf_offsetof(stringpool, 265), -25200},
{-1}, {-1}, {-1},
#line 144 "zonetab.list"
- {offsetof(struct stringpool_t, stringpool_str269), 7200},
+ {gperf_offsetof(stringpool, 269), 7200},
{-1}, {-1},
#line 180 "zonetab.list"
- {offsetof(struct stringpool_t, stringpool_str272), 32400},
+ {gperf_offsetof(stringpool, 272), 32400},
{-1}, {-1}, {-1}, {-1}, {-1}, {-1},
#line 156 "zonetab.list"
- {offsetof(struct stringpool_t, stringpool_str279), -14400},
+ {gperf_offsetof(stringpool, 279), -14400},
{-1}, {-1},
#line 171 "zonetab.list"
- {offsetof(struct stringpool_t, stringpool_str282), 46800},
+ {gperf_offsetof(stringpool, 282), 46800},
{-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
{-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
{-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
{-1}, {-1}, {-1}, {-1},
#line 108 "zonetab.list"
- {offsetof(struct stringpool_t, stringpool_str314), 16200},
+ {gperf_offsetof(stringpool, 314), 16200},
{-1}, {-1}, {-1}, {-1},
#line 69 "zonetab.list"
- {offsetof(struct stringpool_t, stringpool_str319),-12*3600},
+ {gperf_offsetof(stringpool, 319),-12*3600},
{-1}, {-1},
#line 157 "zonetab.list"
- {offsetof(struct stringpool_t, stringpool_str322), -28800},
+ {gperf_offsetof(stringpool, 322), -28800},
{-1}, {-1}, {-1}, {-1},
#line 168 "zonetab.list"
- {offsetof(struct stringpool_t, stringpool_str327), 28800},
+ {gperf_offsetof(stringpool, 327), 28800},
#line 134 "zonetab.list"
- {offsetof(struct stringpool_t, stringpool_str328), 7200},
+ {gperf_offsetof(stringpool, 328), 7200},
{-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
{-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
{-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
@@ -870,21 +863,21 @@ zonetab (str, len)
{-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
{-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
#line 170 "zonetab.list"
- {offsetof(struct stringpool_t, stringpool_str392), 32400},
+ {gperf_offsetof(stringpool, 392), 32400},
{-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
{-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
{-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
{-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
{-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
#line 136 "zonetab.list"
- {offsetof(struct stringpool_t, stringpool_str438), 43200}
+ {gperf_offsetof(stringpool, 438), 43200}
};
if (len <= MAX_WORD_LENGTH && len >= MIN_WORD_LENGTH)
{
- register int key = hash (str, len);
+ register unsigned int key = hash (str, len);
- if (key <= MAX_HASH_VALUE && key >= 0)
+ if (key <= MAX_HASH_VALUE)
{
register int o = wordlist[key].name;
if (o >= 0)
diff --git a/ext/io/console/depend b/ext/io/console/depend
index d69a0b3..821b28d 100644
--- a/ext/io/console/depend
+++ b/ext/io/console/depend
@@ -26,7 +26,7 @@ win32_vk.inc: win32_vk.list
-e 'puts(%[#ifndef #{n}\n# define #{n} UNDEFINED_VK\n#endif])' \
$< && \
gperf --ignore-case -E -C -P -p -j1 -i 1 -g -o -t -K ofs -N console_win32_vk -k* $< \
- | sed 's/(int)(long)&((\(struct stringpool_t\) *\*)0)->\(stringpool_[a-z0-9]*\)/offsetof(\1, \2)/g' \
+ | sed -f $(top_srcdir)/tool/gperf.sed \
) > $(@F)
.SUFFIXES: .chksum .list .inc
diff --git a/ext/io/console/win32_vk.inc b/ext/io/console/win32_vk.inc
index a098158..ab09cd6 100644
--- a/ext/io/console/win32_vk.inc
+++ b/ext/io/console/win32_vk.inc
@@ -479,7 +479,7 @@
#ifndef VK_OEM_CLEAR
# define VK_OEM_CLEAR UNDEFINED_VK
#endif
-/* C code produced by gperf version 3.0.4 */
+/* ANSI-C code produced by gperf version 3.1 */
/* Command-line: gperf --ignore-case -E -C -P -p -j1 -i 1 -g -o -t -K ofs -N console_win32_vk -k'*' win32_vk.list */
#if !((' ' == 32) && ('!' == 33) && ('"' == 34) && ('#' == 35) \
@@ -506,13 +506,14 @@
&& ('w' == 119) && ('x' == 120) && ('y' == 121) && ('z' == 122) \
&& ('{' == 123) && ('|' == 124) && ('}' == 125) && ('~' == 126))
/* The character set is not based on ISO-646. */
-error "gperf generated tables don't work with this execution character set. Please report a bug to <bug-gnu-gperf@gnu.org>."
+#error "gperf generated tables don't work with this execution character set. Please report a bug to <bug-gperf@gnu.org>."
#endif
+#define gperf_offsetof(s, n) (short)offsetof(struct s##_t, s##_str##n)
#line 1 "win32_vk.list"
struct vktable {short ofs; unsigned short vk;};
-static const struct vktable *console_win32_vk(const char *, unsigned int);
+/*static const struct vktable *console_win32_vk(const char *, unsigned int);*/
#line 5 "win32_vk.list"
struct vktable;
/* maximum key range = 245, duplicates = 0 */
@@ -545,9 +546,7 @@ static unsigned char gperf_downcase[256] =
#ifndef GPERF_CASE_STRCMP
#define GPERF_CASE_STRCMP 1
static int
-gperf_case_strcmp (s1, s2)
- register const char *s1;
- register const char *s2;
+gperf_case_strcmp (register const char *s1, register const char *s2)
{
for (;;)
{
@@ -560,15 +559,15 @@ gperf_case_strcmp (s1, s2)
}
#endif
-#if (defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L) || defined(__cplusplus) || defined(__GNUC_STDC_INLINE__)
-inline
-#elif defined(__GNUC__)
+#ifdef __GNUC__
__inline
+#else
+#ifdef __cplusplus
+inline
+#endif
#endif
static unsigned int
-hash (str, len)
- register const char *str;
- register unsigned int len;
+hash (register const char *str, register size_t len)
{
static const unsigned short asso_values[] =
{
@@ -599,7 +598,7 @@ hash (str, len)
257, 257, 257, 257, 257, 257, 257, 257, 257, 257,
257, 257, 257, 257, 257, 257, 257, 257
};
- register int hval = len;
+ register unsigned int hval = (unsigned int)len;
switch (hval)
{
@@ -661,7 +660,7 @@ hash (str, len)
hval += asso_values[(unsigned char)str[0]];
break;
}
- return hval;
+ return (unsigned int)hval;
}
struct stringpool_t
@@ -991,16 +990,8 @@ static const struct stringpool_t stringpool_contents =
"DIVIDE"
};
#define stringpool ((const char *) &stringpool_contents)
-#ifdef __GNUC__
-__inline
-#if defined __GNUC_STDC_INLINE__ || defined __GNUC_GNU_INLINE__
-__attribute__ ((__gnu_inline__))
-#endif
-#endif
const struct vktable *
-console_win32_vk (str, len)
- register const char *str;
- register unsigned int len;
+console_win32_vk (register const char *str, register size_t len)
{
enum
{
@@ -1016,375 +1007,375 @@ console_win32_vk (str, len)
{-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
{-1}, {-1}, {-1},
#line 40 "win32_vk.list"
- {offsetof(struct stringpool_t, stringpool_str12), VK_UP},
+ {gperf_offsetof(stringpool, 12), VK_UP},
#line 52 "win32_vk.list"
- {offsetof(struct stringpool_t, stringpool_str13), VK_APPS},
+ {gperf_offsetof(stringpool, 13), VK_APPS},
#line 159 "win32_vk.list"
- {offsetof(struct stringpool_t, stringpool_str14), VK_CRSEL},
+ {gperf_offsetof(stringpool, 14), VK_CRSEL},
#line 34 "win32_vk.list"
- {offsetof(struct stringpool_t, stringpool_str15), VK_SPACE},
+ {gperf_offsetof(stringpool, 15), VK_SPACE},
#line 95 "win32_vk.list"
- {offsetof(struct stringpool_t, stringpool_str16), VK_SCROLL},
+ {gperf_offsetof(stringpool, 16), VK_SCROLL},
#line 29 "win32_vk.list"
- {offsetof(struct stringpool_t, stringpool_str17), VK_ESCAPE},
+ {gperf_offsetof(stringpool, 17), VK_ESCAPE},
#line 9 "win32_vk.list"
- {offsetof(struct stringpool_t, stringpool_str18), VK_CANCEL},
+ {gperf_offsetof(stringpool, 18), VK_CANCEL},
#line 32 "win32_vk.list"
- {offsetof(struct stringpool_t, stringpool_str19), VK_ACCEPT},
+ {gperf_offsetof(stringpool, 19), VK_ACCEPT},
#line 66 "win32_vk.list"
- {offsetof(struct stringpool_t, stringpool_str20), VK_SEPARATOR},
+ {gperf_offsetof(stringpool, 20), VK_SEPARATOR},
#line 43 "win32_vk.list"
- {offsetof(struct stringpool_t, stringpool_str21), VK_SELECT},
+ {gperf_offsetof(stringpool, 21), VK_SELECT},
#line 18 "win32_vk.list"
- {offsetof(struct stringpool_t, stringpool_str22), VK_CONTROL},
+ {gperf_offsetof(stringpool, 22), VK_CONTROL},
#line 166 "win32_vk.list"
- {offsetof(struct stringpool_t, stringpool_str23), VK_OEM_CLEAR},
+ {gperf_offsetof(stringpool, 23), VK_OEM_CLEAR},
#line 145 "win32_vk.list"
- {offsetof(struct stringpool_t, stringpool_str24), VK_OEM_RESET},
+ {gperf_offsetof(stringpool, 24), VK_OEM_RESET},
#line 155 "win32_vk.list"
- {offsetof(struct stringpool_t, stringpool_str25), VK_OEM_AUTO},
+ {gperf_offsetof(stringpool, 25), VK_OEM_AUTO},
#line 151 "win32_vk.list"
- {offsetof(struct stringpool_t, stringpool_str26), VK_OEM_CUSEL},
+ {gperf_offsetof(stringpool, 26), VK_OEM_CUSEL},
{-1},
#line 22 "win32_vk.list"
- {offsetof(struct stringpool_t, stringpool_str28), VK_KANA},
+ {gperf_offsetof(stringpool, 28), VK_KANA},
#line 127 "win32_vk.list"
- {offsetof(struct stringpool_t, stringpool_str29), VK_OEM_PLUS},
+ {gperf_offsetof(stringpool, 29), VK_OEM_PLUS},
#line 35 "win32_vk.list"
- {offsetof(struct stringpool_t, stringpool_str30), VK_PRIOR},
+ {gperf_offsetof(stringpool, 30), VK_PRIOR},
#line 152 "win32_vk.list"
- {offsetof(struct stringpool_t, stringpool_str31), VK_OEM_ATTN},
+ {gperf_offsetof(stringpool, 31), VK_OEM_ATTN},
#line 20 "win32_vk.list"
- {offsetof(struct stringpool_t, stringpool_str32), VK_PAUSE},
+ {gperf_offsetof(stringpool, 32), VK_PAUSE},
#line 13 "win32_vk.list"
- {offsetof(struct stringpool_t, stringpool_str33), VK_BACK},
+ {gperf_offsetof(stringpool, 33), VK_BACK},
#line 144 "win32_vk.list"
- {offsetof(struct stringpool_t, stringpool_str34), VK_PACKET},
+ {gperf_offsetof(stringpool, 34), VK_PACKET},
#line 105 "win32_vk.list"
- {offsetof(struct stringpool_t, stringpool_str35), VK_RCONTROL},
+ {gperf_offsetof(stringpool, 35), VK_RCONTROL},
#line 104 "win32_vk.list"
- {offsetof(struct stringpool_t, stringpool_str36), VK_LCONTROL},
+ {gperf_offsetof(stringpool, 36), VK_LCONTROL},
#line 37 "win32_vk.list"
- {offsetof(struct stringpool_t, stringpool_str37), VK_END},
+ {gperf_offsetof(stringpool, 37), VK_END},
#line 38 "win32_vk.list"
- {offsetof(struct stringpool_t, stringpool_str38), VK_HOME},
+ {gperf_offsetof(stringpool, 38), VK_HOME},
#line 44 "win32_vk.list"
- {offsetof(struct stringpool_t, stringpool_str39), VK_PRINT},
+ {gperf_offsetof(stringpool, 39), VK_PRINT},
#line 94 "win32_vk.list"
- {offsetof(struct stringpool_t, stringpool_str40), VK_NUMLOCK},
+ {gperf_offsetof(stringpool, 40), VK_NUMLOCK},
#line 39 "win32_vk.list"
- {offsetof(struct stringpool_t, stringpool_str41), VK_LEFT},
+ {gperf_offsetof(stringpool, 41), VK_LEFT},
#line 25 "win32_vk.list"
- {offsetof(struct stringpool_t, stringpool_str42), VK_JUNJA},
+ {gperf_offsetof(stringpool, 42), VK_JUNJA},
#line 19 "win32_vk.list"
- {offsetof(struct stringpool_t, stringpool_str43), VK_MENU},
+ {gperf_offsetof(stringpool, 43), VK_MENU},
#line 150 "win32_vk.list"
- {offsetof(struct stringpool_t, stringpool_str44), VK_OEM_WSCTRL},
+ {gperf_offsetof(stringpool, 44), VK_OEM_WSCTRL},
#line 156 "win32_vk.list"
- {offsetof(struct stringpool_t, stringpool_str45), VK_OEM_ENLW},
+ {gperf_offsetof(stringpool, 45), VK_OEM_ENLW},
#line 36 "win32_vk.list"
- {offsetof(struct stringpool_t, stringpool_str46), VK_NEXT},
+ {gperf_offsetof(stringpool, 46), VK_NEXT},
#line 51 "win32_vk.list"
- {offsetof(struct stringpool_t, stringpool_str47), VK_RWIN},
+ {gperf_offsetof(stringpool, 47), VK_RWIN},
#line 50 "win32_vk.list"
- {offsetof(struct stringpool_t, stringpool_str48), VK_LWIN},
+ {gperf_offsetof(stringpool, 48), VK_LWIN},
#line 21 "win32_vk.list"
- {offsetof(struct stringpool_t, stringpool_str49), VK_CAPITAL},
+ {gperf_offsetof(stringpool, 49), VK_CAPITAL},
#line 49 "win32_vk.list"
- {offsetof(struct stringpool_t, stringpool_str50), VK_HELP},
+ {gperf_offsetof(stringpool, 50), VK_HELP},
#line 164 "win32_vk.list"
- {offsetof(struct stringpool_t, stringpool_str51), VK_NONAME},
+ {gperf_offsetof(stringpool, 51), VK_NONAME},
#line 8 "win32_vk.list"
- {offsetof(struct stringpool_t, stringpool_str52), VK_RBUTTON},
+ {gperf_offsetof(stringpool, 52), VK_RBUTTON},
#line 7 "win32_vk.list"
- {offsetof(struct stringpool_t, stringpool_str53), VK_LBUTTON},
+ {gperf_offsetof(stringpool, 53), VK_LBUTTON},
#line 96 "win32_vk.list"
- {offsetof(struct stringpool_t, stringpool_str54), VK_OEM_NEC_EQUAL},
+ {gperf_offsetof(stringpool, 54), VK_OEM_NEC_EQUAL},
{-1},
#line 47 "win32_vk.list"
- {offsetof(struct stringpool_t, stringpool_str56), VK_INSERT},
+ {gperf_offsetof(stringpool, 56), VK_INSERT},
#line 27 "win32_vk.list"
- {offsetof(struct stringpool_t, stringpool_str57), VK_HANJA},
+ {gperf_offsetof(stringpool, 57), VK_HANJA},
{-1}, {-1},
#line 46 "win32_vk.list"
- {offsetof(struct stringpool_t, stringpool_str60), VK_SNAPSHOT},
+ {gperf_offsetof(stringpool, 60), VK_SNAPSHOT},
#line 158 "win32_vk.list"
- {offsetof(struct stringpool_t, stringpool_str61), VK_ATTN},
+ {gperf_offsetof(stringpool, 61), VK_ATTN},
#line 14 "win32_vk.list"
- {offsetof(struct stringpool_t, stringpool_str62), VK_TAB},
+ {gperf_offsetof(stringpool, 62), VK_TAB},
#line 157 "win32_vk.list"
- {offsetof(struct stringpool_t, stringpool_str63), VK_OEM_BACKTAB},
+ {gperf_offsetof(stringpool, 63), VK_OEM_BACKTAB},
#line 143 "win32_vk.list"
- {offsetof(struct stringpool_t, stringpool_str64), VK_ICO_CLEAR},
+ {gperf_offsetof(stringpool, 64), VK_ICO_CLEAR},
#line 30 "win32_vk.list"
- {offsetof(struct stringpool_t, stringpool_str65), VK_CONVERT},
+ {gperf_offsetof(stringpool, 65), VK_CONVERT},
#line 16 "win32_vk.list"
- {offsetof(struct stringpool_t, stringpool_str66), VK_RETURN},
+ {gperf_offsetof(stringpool, 66), VK_RETURN},
#line 146 "win32_vk.list"
- {offsetof(struct stringpool_t, stringpool_str67), VK_OEM_JUMP},
+ {gperf_offsetof(stringpool, 67), VK_OEM_JUMP},
{-1}, {-1}, {-1},
#line 111 "win32_vk.list"
- {offsetof(struct stringpool_t, stringpool_str71), VK_BROWSER_STOP},
+ {gperf_offsetof(stringpool, 71), VK_BROWSER_STOP},
#line 26 "win32_vk.list"
- {offsetof(struct stringpool_t, stringpool_str72), VK_FINAL},
+ {gperf_offsetof(stringpool, 72), VK_FINAL},
#line 163 "win32_vk.list"
- {offsetof(struct stringpool_t, stringpool_str73), VK_ZOOM},
+ {gperf_offsetof(stringpool, 73), VK_ZOOM},
#line 28 "win32_vk.list"
- {offsetof(struct stringpool_t, stringpool_str74), VK_KANJI},
+ {gperf_offsetof(stringpool, 74), VK_KANJI},
#line 48 "win32_vk.list"
- {offsetof(struct stringpool_t, stringpool_str75), VK_DELETE},
+ {gperf_offsetof(stringpool, 75), VK_DELETE},
#line 128 "win32_vk.list"
- {offsetof(struct stringpool_t, stringpool_str76), VK_OEM_COMMA},
+ {gperf_offsetof(stringpool, 76), VK_OEM_COMMA},
#line 67 "win32_vk.list"
- {offsetof(struct stringpool_t, stringpool_str77), VK_SUBTRACT},
+ {gperf_offsetof(stringpool, 77), VK_SUBTRACT},
{-1},
#line 10 "win32_vk.list"
- {offsetof(struct stringpool_t, stringpool_str79), VK_MBUTTON},
+ {gperf_offsetof(stringpool, 79), VK_MBUTTON},
#line 78 "win32_vk.list"
- {offsetof(struct stringpool_t, stringpool_str80), VK_F9},
+ {gperf_offsetof(stringpool, 80), VK_F9},
#line 17 "win32_vk.list"
- {offsetof(struct stringpool_t, stringpool_str81), VK_SHIFT},
+ {gperf_offsetof(stringpool, 81), VK_SHIFT},
#line 103 "win32_vk.list"
- {offsetof(struct stringpool_t, stringpool_str82), VK_RSHIFT},
+ {gperf_offsetof(stringpool, 82), VK_RSHIFT},
#line 102 "win32_vk.list"
- {offsetof(struct stringpool_t, stringpool_str83), VK_LSHIFT},
+ {gperf_offsetof(stringpool, 83), VK_LSHIFT},
#line 65 "win32_vk.list"
- {offsetof(struct stringpool_t, stringpool_str84), VK_ADD},
+ {gperf_offsetof(stringpool, 84), VK_ADD},
#line 31 "win32_vk.list"
- {offsetof(struct stringpool_t, stringpool_str85), VK_NONCONVERT},
+ {gperf_offsetof(stringpool, 85), VK_NONCONVERT},
#line 160 "win32_vk.list"
- {offsetof(struct stringpool_t, stringpool_str86), VK_EXSEL},
+ {gperf_offsetof(stringpool, 86), VK_EXSEL},
#line 126 "win32_vk.list"
- {offsetof(struct stringpool_t, stringpool_str87), VK_OEM_1},
+ {gperf_offsetof(stringpool, 87), VK_OEM_1},
#line 138 "win32_vk.list"
- {offsetof(struct stringpool_t, stringpool_str88), VK_OEM_AX},
+ {gperf_offsetof(stringpool, 88), VK_OEM_AX},
#line 108 "win32_vk.list"
- {offsetof(struct stringpool_t, stringpool_str89), VK_BROWSER_BACK},
+ {gperf_offsetof(stringpool, 89), VK_BROWSER_BACK},
#line 137 "win32_vk.list"
- {offsetof(struct stringpool_t, stringpool_str90), VK_OEM_8},
+ {gperf_offsetof(stringpool, 90), VK_OEM_8},
#line 129 "win32_vk.list"
- {offsetof(struct stringpool_t, stringpool_str91), VK_OEM_MINUS},
+ {gperf_offsetof(stringpool, 91), VK_OEM_MINUS},
#line 162 "win32_vk.list"
- {offsetof(struct stringpool_t, stringpool_str92), VK_PLAY},
+ {gperf_offsetof(stringpool, 92), VK_PLAY},
#line 131 "win32_vk.list"
- {offsetof(struct stringpool_t, stringpool_str93), VK_OEM_2},
+ {gperf_offsetof(stringpool, 93), VK_OEM_2},
#line 15 "win32_vk.list"
- {offsetof(struct stringpool_t, stringpool_str94), VK_CLEAR},
+ {gperf_offsetof(stringpool, 94), VK_CLEAR},
#line 99 "win32_vk.list"
- {offsetof(struct stringpool_t, stringpool_str95), VK_OEM_FJ_TOUROKU},
+ {gperf_offsetof(stringpool, 95), VK_OEM_FJ_TOUROKU},
#line 147 "win32_vk.list"
- {offsetof(struct stringpool_t, stringpool_str96), VK_OEM_PA1},
+ {gperf_offsetof(stringpool, 96), VK_OEM_PA1},
#line 140 "win32_vk.list"
- {offsetof(struct stringpool_t, stringpool_str97), VK_ICO_HELP},
+ {gperf_offsetof(stringpool, 97), VK_ICO_HELP},
#line 112 "win32_vk.list"
- {offsetof(struct stringpool_t, stringpool_str98), VK_BROWSER_SEARCH},
+ {gperf_offsetof(stringpool, 98), VK_BROWSER_SEARCH},
#line 53 "win32_vk.list"
- {offsetof(struct stringpool_t, stringpool_str99), VK_SLEEP},
+ {gperf_offsetof(stringpool, 99), VK_SLEEP},
{-1},
#line 70 "win32_vk.list"
- {offsetof(struct stringpool_t, stringpool_str101), VK_F1},
+ {gperf_offsetof(stringpool, 101), VK_F1},
#line 148 "win32_vk.list"
- {offsetof(struct stringpool_t, stringpool_str102), VK_OEM_PA2},
+ {gperf_offsetof(stringpool, 102), VK_OEM_PA2},
#line 154 "win32_vk.list"
- {offsetof(struct stringpool_t, stringpool_str103), VK_OEM_COPY},
+ {gperf_offsetof(stringpool, 103), VK_OEM_COPY},
#line 77 "win32_vk.list"
- {offsetof(struct stringpool_t, stringpool_str104), VK_F8},
+ {gperf_offsetof(stringpool, 104), VK_F8},
#line 88 "win32_vk.list"
- {offsetof(struct stringpool_t, stringpool_str105), VK_F19},
+ {gperf_offsetof(stringpool, 105), VK_F19},
#line 41 "win32_vk.list"
- {offsetof(struct stringpool_t, stringpool_str106), VK_RIGHT},
+ {gperf_offsetof(stringpool, 106), VK_RIGHT},
#line 71 "win32_vk.list"
- {offsetof(struct stringpool_t, stringpool_str107), VK_F2},
+ {gperf_offsetof(stringpool, 107), VK_F2},
#line 135 "win32_vk.list"
- {offsetof(struct stringpool_t, stringpool_str108), VK_OEM_6},
+ {gperf_offsetof(stringpool, 108), VK_OEM_6},
#line 87 "win32_vk.list"
- {offsetof(struct stringpool_t, stringpool_str109), VK_F18},
+ {gperf_offsetof(stringpool, 109), VK_F18},
{-1},
#line 117 "win32_vk.list"
- {offsetof(struct stringpool_t, stringpool_str111), VK_VOLUME_UP},
+ {gperf_offsetof(stringpool, 111), VK_VOLUME_UP},
{-1}, {-1},
#line 120 "win32_vk.list"
- {offsetof(struct stringpool_t, stringpool_str114), VK_MEDIA_STOP},
+ {gperf_offsetof(stringpool, 114), VK_MEDIA_STOP},
#line 130 "win32_vk.list"
- {offsetof(struct stringpool_t, stringpool_str115), VK_OEM_PERIOD},
+ {gperf_offsetof(stringpool, 115), VK_OEM_PERIOD},
{-1},
#line 161 "win32_vk.list"
- {offsetof(struct stringpool_t, stringpool_str117), VK_EREOF},
+ {gperf_offsetof(stringpool, 117), VK_EREOF},
{-1}, {-1}, {-1},
#line 114 "win32_vk.list"
- {offsetof(struct stringpool_t, stringpool_str121), VK_BROWSER_HOME},
+ {gperf_offsetof(stringpool, 121), VK_BROWSER_HOME},
#line 75 "win32_vk.list"
- {offsetof(struct stringpool_t, stringpool_str122), VK_F6},
+ {gperf_offsetof(stringpool, 122), VK_F6},
{-1},
#line 110 "win32_vk.list"
- {offsetof(struct stringpool_t, stringpool_str124), VK_BROWSER_REFRESH},
+ {gperf_offsetof(stringpool, 124), VK_BROWSER_REFRESH},
{-1},
#line 165 "win32_vk.list"
- {offsetof(struct stringpool_t, stringpool_str126), VK_PA1},
+ {gperf_offsetof(stringpool, 126), VK_PA1},
#line 142 "win32_vk.list"
- {offsetof(struct stringpool_t, stringpool_str127), VK_PROCESSKEY},
+ {gperf_offsetof(stringpool, 127), VK_PROCESSKEY},
#line 68 "win32_vk.list"
- {offsetof(struct stringpool_t, stringpool_str128), VK_DECIMAL},
+ {gperf_offsetof(stringpool, 128), VK_DECIMAL},
#line 132 "win32_vk.list"
- {offsetof(struct stringpool_t, stringpool_str129), VK_OEM_3},
+ {gperf_offsetof(stringpool, 129), VK_OEM_3},
#line 107 "win32_vk.list"
- {offsetof(struct stringpool_t, stringpool_str130), VK_RMENU},
+ {gperf_offsetof(stringpool, 130), VK_RMENU},
#line 106 "win32_vk.list"
- {offsetof(struct stringpool_t, stringpool_str131), VK_LMENU},
+ {gperf_offsetof(stringpool, 131), VK_LMENU},
#line 98 "win32_vk.list"
- {offsetof(struct stringpool_t, stringpool_str132), VK_OEM_FJ_MASSHOU},
+ {gperf_offsetof(stringpool, 132), VK_OEM_FJ_MASSHOU},
#line 54 "win32_vk.list"
- {offsetof(struct stringpool_t, stringpool_str133), VK_NUMPAD0},
+ {gperf_offsetof(stringpool, 133), VK_NUMPAD0},
#line 24 "win32_vk.list"
- {offsetof(struct stringpool_t, stringpool_str134), VK_HANGUL},
+ {gperf_offsetof(stringpool, 134), VK_HANGUL},
#line 63 "win32_vk.list"
- {offsetof(struct stringpool_t, stringpool_str135), VK_NUMPAD9},
+ {gperf_offsetof(stringpool, 135), VK_NUMPAD9},
#line 23 "win32_vk.list"
- {offsetof(struct stringpool_t, stringpool_str136), VK_HANGEUL},
+ {gperf_offsetof(stringpool, 136), VK_HANGEUL},
#line 134 "win32_vk.list"
- {offsetof(struct stringpool_t, stringpool_str137), VK_OEM_5},
+ {gperf_offsetof(stringpool, 137), VK_OEM_5},
#line 149 "win32_vk.list"
- {offsetof(struct stringpool_t, stringpool_str138), VK_OEM_PA3},
+ {gperf_offsetof(stringpool, 138), VK_OEM_PA3},
#line 115 "win32_vk.list"
- {offsetof(struct stringpool_t, stringpool_str139), VK_VOLUME_MUTE},
+ {gperf_offsetof(stringpool, 139), VK_VOLUME_MUTE},
#line 133 "win32_vk.list"
- {offsetof(struct stringpool_t, stringpool_str140), VK_OEM_4},
+ {gperf_offsetof(stringpool, 140), VK_OEM_4},
#line 122 "win32_vk.list"
- {offsetof(struct stringpool_t, stringpool_str141), VK_LAUNCH_MAIL},
+ {gperf_offsetof(stringpool, 141), VK_LAUNCH_MAIL},
#line 97 "win32_vk.list"
- {offsetof(struct stringpool_t, stringpool_str142), VK_OEM_FJ_JISHO},
+ {gperf_offsetof(stringpool, 142), VK_OEM_FJ_JISHO},
#line 72 "win32_vk.list"
- {offsetof(struct stringpool_t, stringpool_str143), VK_F3},
+ {gperf_offsetof(stringpool, 143), VK_F3},
#line 101 "win32_vk.list"
- {offsetof(struct stringpool_t, stringpool_str144), VK_OEM_FJ_ROYA},
+ {gperf_offsetof(stringpool, 144), VK_OEM_FJ_ROYA},
#line 100 "win32_vk.list"
- {offsetof(struct stringpool_t, stringpool_str145), VK_OEM_FJ_LOYA},
+ {gperf_offsetof(stringpool, 145), VK_OEM_FJ_LOYA},
{-1},
#line 42 "win32_vk.list"
- {offsetof(struct stringpool_t, stringpool_str147), VK_DOWN},
+ {gperf_offsetof(stringpool, 147), VK_DOWN},
{-1},
#line 153 "win32_vk.list"
- {offsetof(struct stringpool_t, stringpool_str149), VK_OEM_FINISH},
+ {gperf_offsetof(stringpool, 149), VK_OEM_FINISH},
{-1},
#line 74 "win32_vk.list"
- {offsetof(struct stringpool_t, stringpool_str151), VK_F5},
+ {gperf_offsetof(stringpool, 151), VK_F5},
{-1},
#line 136 "win32_vk.list"
- {offsetof(struct stringpool_t, stringpool_str153), VK_OEM_7},
+ {gperf_offsetof(stringpool, 153), VK_OEM_7},
#line 73 "win32_vk.list"
- {offsetof(struct stringpool_t, stringpool_str154), VK_F4},
+ {gperf_offsetof(stringpool, 154), VK_F4},
#line 86 "win32_vk.list"
- {offsetof(struct stringpool_t, stringpool_str155), VK_F17},
+ {gperf_offsetof(stringpool, 155), VK_F17},
#line 55 "win32_vk.list"
- {offsetof(struct stringpool_t, stringpool_str156), VK_NUMPAD1},
+ {gperf_offsetof(stringpool, 156), VK_NUMPAD1},
#line 141 "win32_vk.list"
- {offsetof(struct stringpool_t, stringpool_str157), VK_ICO_00},
+ {gperf_offsetof(stringpool, 157), VK_ICO_00},
{-1},
#line 62 "win32_vk.list"
- {offsetof(struct stringpool_t, stringpool_str159), VK_NUMPAD8},
+ {gperf_offsetof(stringpool, 159), VK_NUMPAD8},
{-1}, {-1},
#line 56 "win32_vk.list"
- {offsetof(struct stringpool_t, stringpool_str162), VK_NUMPAD2},
+ {gperf_offsetof(stringpool, 162), VK_NUMPAD2},
{-1},
#line 124 "win32_vk.list"
- {offsetof(struct stringpool_t, stringpool_str164), VK_LAUNCH_APP1},
+ {gperf_offsetof(stringpool, 164), VK_LAUNCH_APP1},
#line 109 "win32_vk.list"
- {offsetof(struct stringpool_t, stringpool_str165), VK_BROWSER_FORWARD},
+ {gperf_offsetof(stringpool, 165), VK_BROWSER_FORWARD},
{-1},
#line 76 "win32_vk.list"
- {offsetof(struct stringpool_t, stringpool_str167), VK_F7},
+ {gperf_offsetof(stringpool, 167), VK_F7},
{-1}, {-1},
#line 125 "win32_vk.list"
- {offsetof(struct stringpool_t, stringpool_str170), VK_LAUNCH_APP2},
+ {gperf_offsetof(stringpool, 170), VK_LAUNCH_APP2},
#line 64 "win32_vk.list"
- {offsetof(struct stringpool_t, stringpool_str171), VK_MULTIPLY},
+ {gperf_offsetof(stringpool, 171), VK_MULTIPLY},
{-1}, {-1},
#line 45 "win32_vk.list"
- {offsetof(struct stringpool_t, stringpool_str174), VK_EXECUTE},
+ {gperf_offsetof(stringpool, 174), VK_EXECUTE},
{-1},
#line 113 "win32_vk.list"
- {offsetof(struct stringpool_t, stringpool_str176), VK_BROWSER_FAVORITES},
+ {gperf_offsetof(stringpool, 176), VK_BROWSER_FAVORITES},
#line 60 "win32_vk.list"
- {offsetof(struct stringpool_t, stringpool_str177), VK_NUMPAD6},
+ {gperf_offsetof(stringpool, 177), VK_NUMPAD6},
{-1},
#line 85 "win32_vk.list"
- {offsetof(struct stringpool_t, stringpool_str179), VK_F16},
+ {gperf_offsetof(stringpool, 179), VK_F16},
{-1}, {-1},
#line 79 "win32_vk.list"
- {offsetof(struct stringpool_t, stringpool_str182), VK_F10},
+ {gperf_offsetof(stringpool, 182), VK_F10},
{-1}, {-1},
#line 116 "win32_vk.list"
- {offsetof(struct stringpool_t, stringpool_str185), VK_VOLUME_DOWN},
+ {gperf_offsetof(stringpool, 185), VK_VOLUME_DOWN},
{-1}, {-1},
#line 89 "win32_vk.list"
- {offsetof(struct stringpool_t, stringpool_str188), VK_F20},
+ {gperf_offsetof(stringpool, 188), VK_F20},
#line 119 "win32_vk.list"
- {offsetof(struct stringpool_t, stringpool_str189), VK_MEDIA_PREV_TRACK},
+ {gperf_offsetof(stringpool, 189), VK_MEDIA_PREV_TRACK},
{-1},
#line 33 "win32_vk.list"
- {offsetof(struct stringpool_t, stringpool_str191), VK_MODECHANGE},
+ {gperf_offsetof(stringpool, 191), VK_MODECHANGE},
{-1}, {-1}, {-1}, {-1}, {-1},
#line 83 "win32_vk.list"
- {offsetof(struct stringpool_t, stringpool_str197), VK_F14},
+ {gperf_offsetof(stringpool, 197), VK_F14},
#line 57 "win32_vk.list"
- {offsetof(struct stringpool_t, stringpool_str198), VK_NUMPAD3},
+ {gperf_offsetof(stringpool, 198), VK_NUMPAD3},
#line 11 "win32_vk.list"
- {offsetof(struct stringpool_t, stringpool_str199), VK_XBUTTON1},
+ {gperf_offsetof(stringpool, 199), VK_XBUTTON1},
{-1}, {-1}, {-1},
#line 93 "win32_vk.list"
- {offsetof(struct stringpool_t, stringpool_str203), VK_F24},
+ {gperf_offsetof(stringpool, 203), VK_F24},
{-1},
#line 12 "win32_vk.list"
- {offsetof(struct stringpool_t, stringpool_str205), VK_XBUTTON2},
+ {gperf_offsetof(stringpool, 205), VK_XBUTTON2},
#line 59 "win32_vk.list"
- {offsetof(struct stringpool_t, stringpool_str206), VK_NUMPAD5},
+ {gperf_offsetof(stringpool, 206), VK_NUMPAD5},
{-1}, {-1},
#line 58 "win32_vk.list"
- {offsetof(struct stringpool_t, stringpool_str209), VK_NUMPAD4},
+ {gperf_offsetof(stringpool, 209), VK_NUMPAD4},
{-1}, {-1}, {-1}, {-1}, {-1},
#line 121 "win32_vk.list"
- {offsetof(struct stringpool_t, stringpool_str215), VK_MEDIA_PLAY_PAUSE},
+ {gperf_offsetof(stringpool, 215), VK_MEDIA_PLAY_PAUSE},
{-1},
#line 123 "win32_vk.list"
- {offsetof(struct stringpool_t, stringpool_str217), VK_LAUNCH_MEDIA_SELECT},
+ {gperf_offsetof(stringpool, 217), VK_LAUNCH_MEDIA_SELECT},
#line 80 "win32_vk.list"
- {offsetof(struct stringpool_t, stringpool_str218), VK_F11},
+ {gperf_offsetof(stringpool, 218), VK_F11},
{-1},
#line 139 "win32_vk.list"
- {offsetof(struct stringpool_t, stringpool_str220), VK_OEM_102},
+ {gperf_offsetof(stringpool, 220), VK_OEM_102},
#line 118 "win32_vk.list"
- {offsetof(struct stringpool_t, stringpool_str221), VK_MEDIA_NEXT_TRACK},
+ {gperf_offsetof(stringpool, 221), VK_MEDIA_NEXT_TRACK},
#line 61 "win32_vk.list"
- {offsetof(struct stringpool_t, stringpool_str222), VK_NUMPAD7},
+ {gperf_offsetof(stringpool, 222), VK_NUMPAD7},
{-1},
#line 90 "win32_vk.list"
- {offsetof(struct stringpool_t, stringpool_str224), VK_F21},
+ {gperf_offsetof(stringpool, 224), VK_F21},
{-1},
#line 82 "win32_vk.list"
- {offsetof(struct stringpool_t, stringpool_str226), VK_F13},
+ {gperf_offsetof(stringpool, 226), VK_F13},
{-1}, {-1},
#line 81 "win32_vk.list"
- {offsetof(struct stringpool_t, stringpool_str229), VK_F12},
+ {gperf_offsetof(stringpool, 229), VK_F12},
{-1}, {-1},
#line 92 "win32_vk.list"
- {offsetof(struct stringpool_t, stringpool_str232), VK_F23},
+ {gperf_offsetof(stringpool, 232), VK_F23},
{-1}, {-1},
#line 91 "win32_vk.list"
- {offsetof(struct stringpool_t, stringpool_str235), VK_F22},
+ {gperf_offsetof(stringpool, 235), VK_F22},
{-1}, {-1}, {-1}, {-1}, {-1}, {-1},
#line 84 "win32_vk.list"
- {offsetof(struct stringpool_t, stringpool_str242), VK_F15},
+ {gperf_offsetof(stringpool, 242), VK_F15},
{-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
{-1}, {-1}, {-1}, {-1},
#line 69 "win32_vk.list"
- {offsetof(struct stringpool_t, stringpool_str256), VK_DIVIDE}
+ {gperf_offsetof(stringpool, 256), VK_DIVIDE}
};
if (len <= MAX_WORD_LENGTH && len >= MIN_WORD_LENGTH)
{
- register int key = hash (str, len);
+ register unsigned int key = hash (str, len);
- if (key <= MAX_HASH_VALUE && key >= 0)
+ if (key <= MAX_HASH_VALUE)
{
register int o = wordlist[key].ofs;
if (o >= 0)
diff --git a/ext/io/console/win32_vk.list b/ext/io/console/win32_vk.list
index 28bc954..f1d3581 100644
--- a/ext/io/console/win32_vk.list
+++ b/ext/io/console/win32_vk.list
@@ -1,6 +1,6 @@
%{
struct vktable {short ofs; unsigned short vk;};
-static const struct vktable *console_win32_vk(const char *, unsigned int);
+/*!ANSI*/static const struct vktable *console_win32_vk(const char *, unsigned int);
%}
struct vktable
%%
diff --git a/lex.c.blt b/lex.c.blt
index 7d8dd5b..813decc 100644
--- a/lex.c.blt
+++ b/lex.c.blt
@@ -1,4 +1,4 @@
-/* C code produced by gperf version 3.0.4 */
+/* ANSI-C code produced by gperf version 3.1 */
/* Command-line: gperf -C -P -p -j1 -i 1 -g -o -t -N rb_reserved_word -k'1,3,$' defs/keywords */
#if !((' ' == 32) && ('!' == 33) && ('"' == 34) && ('#' == 35) \
@@ -25,15 +25,16 @@
&& ('w' == 119) && ('x' == 120) && ('y' == 121) && ('z' == 122) \
&& ('{' == 123) && ('|' == 124) && ('}' == 125) && ('~' == 126))
/* The character set is not based on ISO-646. */
-error "gperf generated tables don't work with this execution character set. Please report a bug to <bug-gnu-gperf@gnu.org>."
+#error "gperf generated tables don't work with this execution character set. Please report a bug to <bug-gperf@gnu.org>."
#endif
+#define gperf_offsetof(s, n) (short)offsetof(struct s##_t, s##_str##n)
#line 1 "defs/keywords"
struct kwtable {int name, id[2], state;};
const struct kwtable *rb_reserved_word(const char *, unsigned int);
#ifndef RIPPER
-static const struct kwtable *reserved_word(const char *, unsigned int);
+/*static const struct kwtable *reserved_word(const char *, unsigned int);*/
#define rb_reserved_word(str, len) reserved_word(str, len)
#line 9 "defs/keywords"
struct kwtable;
@@ -45,15 +46,15 @@ struct kwtable;
#define MAX_HASH_VALUE 50
/* maximum key range = 43, duplicates = 0 */
-#if (defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L) || defined(__cplusplus) || defined(__GNUC_STDC_INLINE__)
-inline
-#elif defined(__GNUC__)
+#ifdef __GNUC__
__inline
+#else
+#ifdef __cplusplus
+inline
+#endif
#endif
static unsigned int
-hash (str, len)
- register const char *str;
- register unsigned int len;
+hash (register const char *str, register size_t len)
{
static const unsigned char asso_values[] =
{
@@ -84,7 +85,7 @@ hash (str, len)
51, 51, 51, 51, 51, 51, 51, 51, 51, 51,
51, 51, 51, 51, 51, 51
};
- register int hval = len;
+ register unsigned int hval = (unsigned int)len;
switch (hval)
{
@@ -96,7 +97,7 @@ hash (str, len)
hval += asso_values[(unsigned char)str[0]];
break;
}
- return hval + asso_values[(unsigned char)str[len - 1]];
+ return (unsigned int)hval + asso_values[(unsigned char)str[len - 1]];
}
struct stringpool_t
@@ -188,110 +189,102 @@ static const struct stringpool_t stringpool_contents =
"while"
};
#define stringpool ((const char *) &stringpool_contents)
-#ifdef __GNUC__
-__inline
-#if defined __GNUC_STDC_INLINE__ || defined __GNUC_GNU_INLINE__
-__attribute__ ((__gnu_inline__))
-#endif
-#endif
const struct kwtable *
-rb_reserved_word (str, len)
- register const char *str;
- register unsigned int len;
+rb_reserved_word (register const char *str, register size_t len)
{
static const struct kwtable wordlist[] =
{
{-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
#line 19 "defs/keywords"
- {(int)offsetof(struct stringpool_t, stringpool_str8), {keyword_break, keyword_break}, EXPR_MID},
+ {gperf_offsetof(stringpool, 8), {keyword_break, keyword_break}, EXPR_MID},
#line 25 "defs/keywords"
- {(int)offsetof(struct stringpool_t, stringpool_str9), {keyword_else, keyword_else}, EXPR_BEG},
+ {gperf_offsetof(stringpool, 9), {keyword_else, keyword_else}, EXPR_BEG},
#line 35 "defs/keywords"
- {(int)offsetof(struct stringpool_t, stringpool_str10), {keyword_nil, keyword_nil}, EXPR_END},
+ {gperf_offsetof(stringpool, 10), {keyword_nil, keyword_nil}, EXPR_END},
#line 28 "defs/keywords"
- {(int)offsetof(struct stringpool_t, stringpool_str11), {keyword_ensure, keyword_ensure}, EXPR_BEG},
+ {gperf_offsetof(stringpool, 11), {keyword_ensure, keyword_ensure}, EXPR_BEG},
#line 27 "defs/keywords"
- {(int)offsetof(struct stringpool_t, stringpool_str12), {keyword_end, keyword_end}, EXPR_END},
+ {gperf_offsetof(stringpool, 12), {keyword_end, keyword_end}, EXPR_END},
#line 44 "defs/keywords"
- {(int)offsetof(struct stringpool_t, stringpool_str13), {keyword_then, keyword_then}, EXPR_BEG},
+ {gperf_offsetof(stringpool, 13), {keyword_then, keyword_then}, EXPR_BEG},
#line 36 "defs/keywords"
- {(int)offsetof(struct stringpool_t, stringpool_str14), {keyword_not, keyword_not}, EXPR_ARG},
+ {gperf_offsetof(stringpool, 14), {keyword_not, keyword_not}, EXPR_ARG},
#line 29 "defs/keywords"
- {(int)offsetof(struct stringpool_t, stringpool_str15), {keyword_false, keyword_false}, EXPR_END},
+ {gperf_offsetof(stringpool, 15), {keyword_false, keyword_false}, EXPR_END},
#line 42 "defs/keywords"
- {(int)offsetof(struct stringpool_t, stringpool_str16), {keyword_self, keyword_self}, EXPR_END},
+ {gperf_offsetof(stringpool, 16), {keyword_self, keyword_self}, EXPR_END},
#line 26 "defs/keywords"
- {(int)offsetof(struct stringpool_t, stringpool_str17), {keyword_elsif, keyword_elsif}, EXPR_VALUE},
+ {gperf_offsetof(stringpool, 17), {keyword_elsif, keyword_elsif}, EXPR_VALUE},
#line 39 "defs/keywords"
- {(int)offsetof(struct stringpool_t, stringpool_str18), {keyword_rescue, modifier_rescue}, EXPR_MID},
+ {gperf_offsetof(stringpool, 18), {keyword_rescue, modifier_rescue}, EXPR_MID},
#line 45 "defs/keywords"
- {(int)offsetof(struct stringpool_t, stringpool_str19), {keyword_true, keyword_true}, EXPR_END},
+ {gperf_offsetof(stringpool, 19), {keyword_true, keyword_true}, EXPR_END},
#line 48 "defs/keywords"
- {(int)offsetof(struct stringpool_t, stringpool_str20), {keyword_until, modifier_until}, EXPR_VALUE},
+ {gperf_offsetof(stringpool, 20), {keyword_until, modifier_until}, EXPR_VALUE},
#line 47 "defs/keywords"
- {(int)offsetof(struct stringpool_t, stringpool_str21), {keyword_unless, modifier_unless}, EXPR_VALUE},
+ {gperf_offsetof(stringpool, 21), {keyword_unless, modifier_unless}, EXPR_VALUE},
#line 41 "defs/keywords"
- {(int)offsetof(struct stringpool_t, stringpool_str22), {keyword_return, keyword_return}, EXPR_MID},
+ {gperf_offsetof(stringpool, 22), {keyword_return, keyword_return}, EXPR_MID},
#line 22 "defs/keywords"
- {(int)offsetof(struct stringpool_t, stringpool_str23), {keyword_def, keyword_def}, EXPR_FNAME},
+ {gperf_offsetof(stringpool, 23), {keyword_def, keyword_def}, EXPR_FNAME},
#line 17 "defs/keywords"
- {(int)offsetof(struct stringpool_t, stringpool_str24), {keyword_and, keyword_and}, EXPR_VALUE},
+ {gperf_offsetof(stringpool, 24), {keyword_and, keyword_and}, EXPR_VALUE},
#line 24 "defs/keywords"
- {(int)offsetof(struct stringpool_t, stringpool_str25), {keyword_do, keyword_do}, EXPR_BEG},
+ {gperf_offsetof(stringpool, 25), {keyword_do, keyword_do}, EXPR_BEG},
#line 51 "defs/keywords"
- {(int)offsetof(struct stringpool_t, stringpool_str26), {keyword_yield, keyword_yield}, EXPR_ARG},
+ {gperf_offsetof(stringpool, 26), {keyword_yield, keyword_yield}, EXPR_ARG},
#line 30 "defs/keywords"
- {(int)offsetof(struct stringpool_t, stringpool_str27), {keyword_for, keyword_for}, EXPR_VALUE},
+ {gperf_offsetof(stringpool, 27), {keyword_for, keyword_for}, EXPR_VALUE},
#line 46 "defs/keywords"
- {(int)offsetof(struct stringpool_t, stringpool_str28), {keyword_undef, keyword_undef}, EXPR_FNAME|EXPR_FITEM},
+ {gperf_offsetof(stringpool, 28), {keyword_undef, keyword_undef}, EXPR_FNAME|EXPR_FITEM},
#line 37 "defs/keywords"
- {(int)offsetof(struct stringpool_t, stringpool_str29), {keyword_or, keyword_or}, EXPR_VALUE},
+ {gperf_offsetof(stringpool, 29), {keyword_or, keyword_or}, EXPR_VALUE},
#line 32 "defs/keywords"
- {(int)offsetof(struct stringpool_t, stringpool_str30), {keyword_in, keyword_in}, EXPR_VALUE},
+ {gperf_offsetof(stringpool, 30), {keyword_in, keyword_in}, EXPR_VALUE},
#line 49 "defs/keywords"
- {(int)offsetof(struct stringpool_t, stringpool_str31), {keyword_when, keyword_when}, EXPR_VALUE},
+ {gperf_offsetof(stringpool, 31), {keyword_when, keyword_when}, EXPR_VALUE},
#line 40 "defs/keywords"
- {(int)offsetof(struct stringpool_t, stringpool_str32), {keyword_retry, keyword_retry}, EXPR_END},
+ {gperf_offsetof(stringpool, 32), {keyword_retry, keyword_retry}, EXPR_END},
#line 31 "defs/keywords"
- {(int)offsetof(struct stringpool_t, stringpool_str33), {keyword_if, modifier_if}, EXPR_VALUE},
+ {gperf_offsetof(stringpool, 33), {keyword_if, modifier_if}, EXPR_VALUE},
#line 20 "defs/keywords"
- {(int)offsetof(struct stringpool_t, stringpool_str34), {keyword_case, keyword_case}, EXPR_VALUE},
+ {gperf_offsetof(stringpool, 34), {keyword_case, keyword_case}, EXPR_VALUE},
#line 38 "defs/keywords"
- {(int)offsetof(struct stringpool_t, stringpool_str35), {keyword_redo, keyword_redo}, EXPR_END},
+ {gperf_offsetof(stringpool, 35), {keyword_redo, keyword_redo}, EXPR_END},
#line 34 "defs/keywords"
- {(int)offsetof(struct stringpool_t, stringpool_str36), {keyword_next, keyword_next}, EXPR_MID},
+ {gperf_offsetof(stringpool, 36), {keyword_next, keyword_next}, EXPR_MID},
#line 43 "defs/keywords"
- {(int)offsetof(struct stringpool_t, stringpool_str37), {keyword_super, keyword_super}, EXPR_ARG},
+ {gperf_offsetof(stringpool, 37), {keyword_super, keyword_super}, EXPR_ARG},
#line 33 "defs/keywords"
- {(int)offsetof(struct stringpool_t, stringpool_str38), {keyword_module, keyword_module}, EXPR_VALUE},
+ {gperf_offsetof(stringpool, 38), {keyword_module, keyword_module}, EXPR_VALUE},
#line 18 "defs/keywords"
- {(int)offsetof(struct stringpool_t, stringpool_str39), {keyword_begin, keyword_begin}, EXPR_BEG},
+ {gperf_offsetof(stringpool, 39), {keyword_begin, keyword_begin}, EXPR_BEG},
#line 12 "defs/keywords"
- {(int)offsetof(struct stringpool_t, stringpool_str40), {keyword__LINE__, keyword__LINE__}, EXPR_END},
+ {gperf_offsetof(stringpool, 40), {keyword__LINE__, keyword__LINE__}, EXPR_END},
#line 13 "defs/keywords"
- {(int)offsetof(struct stringpool_t, stringpool_str41), {keyword__FILE__, keyword__FILE__}, EXPR_END},
+ {gperf_offsetof(stringpool, 41), {keyword__FILE__, keyword__FILE__}, EXPR_END},
#line 11 "defs/keywords"
- {(int)offsetof(struct stringpool_t, stringpool_str42), {keyword__ENCODING__, keyword__ENCODING__}, EXPR_END},
+ {gperf_offsetof(stringpool, 42), {keyword__ENCODING__, keyword__ENCODING__}, EXPR_END},
#line 15 "defs/keywords"
- {(int)offsetof(struct stringpool_t, stringpool_str43), {keyword_END, keyword_END}, EXPR_END},
+ {gperf_offsetof(stringpool, 43), {keyword_END, keyword_END}, EXPR_END},
#line 16 "defs/keywords"
- {(int)offsetof(struct stringpool_t, stringpool_str44), {keyword_alias, keyword_alias}, EXPR_FNAME|EXPR_FITEM},
+ {gperf_offsetof(stringpool, 44), {keyword_alias, keyword_alias}, EXPR_FNAME|EXPR_FITEM},
#line 14 "defs/keywords"
- {(int)offsetof(struct stringpool_t, stringpool_str45), {keyword_BEGIN, keyword_BEGIN}, EXPR_END},
+ {gperf_offsetof(stringpool, 45), {keyword_BEGIN, keyword_BEGIN}, EXPR_END},
#line 23 "defs/keywords"
- {(int)offsetof(struct stringpool_t, stringpool_str46), {keyword_defined, keyword_defined}, EXPR_ARG},
+ {gperf_offsetof(stringpool, 46), {keyword_defined, keyword_defined}, EXPR_ARG},
#line 21 "defs/keywords"
- {(int)offsetof(struct stringpool_t, stringpool_str47), {keyword_class, keyword_class}, EXPR_CLASS},
+ {gperf_offsetof(stringpool, 47), {keyword_class, keyword_class}, EXPR_CLASS},
{-1}, {-1},
#line 50 "defs/keywords"
- {(int)offsetof(struct stringpool_t, stringpool_str50), {keyword_while, modifier_while}, EXPR_VALUE}
+ {gperf_offsetof(stringpool, 50), {keyword_while, modifier_while}, EXPR_VALUE}
};
if (len <= MAX_WORD_LENGTH && len >= MIN_WORD_LENGTH)
{
- register int key = hash (str, len);
+ register unsigned int key = hash (str, len);
- if (key <= MAX_HASH_VALUE && key >= 0)
+ if (key <= MAX_HASH_VALUE)
{
register int o = wordlist[key].name;
if (o >= 0)
diff --git a/tool/enc-unicode.rb b/tool/enc-unicode.rb
index 50fa07e..2ba0b73 100755
--- a/tool/enc-unicode.rb
+++ b/tool/enc-unicode.rb
@@ -449,7 +449,9 @@ struct uniname2ctype_struct {
};
#define uniname2ctype_offset(str) offsetof(struct uniname2ctype_pool_t, uniname2ctype_pool_##str)
+#if !(/*ANSI*/+0)
static const struct uniname2ctype_struct *uniname2ctype_p(const char *, unsigned int);
+#endif
%}
struct uniname2ctype_struct;
%%
@@ -536,10 +538,17 @@ if header
fds.each(&:close)
IO.popen(%W[diff -DUSE_UNICODE_AGE_PROPERTIES #{fds[1].path} #{fds[0].path}], "r") {|age|
IO.popen(%W[diff -DUSE_UNICODE_PROPERTIES #{fds[2].path} -], "r", in: age) {|f|
+ ansi = false
f.each {|line|
+ if /ANSI-C code produced by gperf/ =~ line
+ ansi = true
+ end
+ line.sub!(/\/\*ANSI\*\//, '1') if ansi
line.gsub!(/\(int\)\((?:long|size_t)\)&\(\(struct uniname2ctype_pool_t \*\)0\)->uniname2ctype_pool_(str\d+),\s+/,
'uniname2ctype_offset(\1), ')
- line.sub!(/^(uniname2ctype_(hash|p) *\(.* )size_t /, '\1unsigned int ')
+ if (/^(uniname2ctype_hash) /=~line)..(/^\}/=~line)
+ line.sub!(/^( *(?:register\s+)?(.*\S)\s+hval\s*=\s*)(?=len;)/, '\1(\2)')
+ end
puts line
}
}
diff --git a/tool/gperf.sed b/tool/gperf.sed
new file mode 100644
index 0000000..ed2196f
--- /dev/null
+++ b/tool/gperf.sed
@@ -0,0 +1,22 @@
+/ANSI-C code/{
+ h
+ s/.*/ANSI:offset:/
+ x
+}
+/^\/\*!ANSI\*\//{
+ G
+ s/^\/\*!ANSI\*\/\(.*\)\nANSI:.*/\/\*\1\*\//
+}
+s/(int)([a-z_]*)&((struct \([a-zA-Z_0-9][a-zA-Z_0-9]*\)_t *\*)0)->\1_str\([1-9][0-9]*\),/gperf_offsetof(\1, \2),/g
+/^#line/{
+ G
+ x
+ s/:offset:/:/
+ x
+ s/\(.*\)\(\n\).*:offset:.*/#define gperf_offsetof(s, n) (short)offsetof(struct s##_t, s##_str##n)\2\1/
+ s/\n[^#].*//
+}
+/^[a-zA-Z_0-9]*hash/,/^}/{
+ s/ hval = / hval = (unsigned int)/
+ s/ return / return (unsigned int)/
+}