diff --git a/defs/keywords b/defs/keywords index fc30ec2d15..a1b1f4f60f 100644 --- a/defs/keywords +++ b/defs/keywords @@ -2,7 +2,7 @@ struct kwtable {short name, id[2], state;}; const struct kwtable *rb_reserved_word(const char *, unsigned int); #ifndef RIPPER -static const struct kwtable *reserved_word(/*!ANSI{*/const char *, unsigned int/*}!ANSI*/); +static const struct kwtable *reserved_word(register const char *str, register size_t len); #define rb_reserved_word(str, len) reserved_word(str, len) %} diff --git a/defs/lex.c.src b/defs/lex.c.src index fc30ec2d15..a1b1f4f60f 100644 --- a/defs/lex.c.src +++ b/defs/lex.c.src @@ -2,7 +2,7 @@ struct kwtable {short name, id[2], state;}; const struct kwtable *rb_reserved_word(const char *, unsigned int); #ifndef RIPPER -static const struct kwtable *reserved_word(/*!ANSI{*/const char *, unsigned int/*}!ANSI*/); +static const struct kwtable *reserved_word(register const char *str, register size_t len); #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 54aa94f8bc..508a084449 100644 --- a/enc/jis/props.h.blt +++ b/enc/jis/props.h.blt @@ -69,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(register const char *str, register size_t len); #line 43 "enc/jis/props.kwd" struct enc_property; @@ -82,7 +82,7 @@ struct enc_property; #ifndef GPERF_DOWNCASE #define GPERF_DOWNCASE 1 -static unsigned char gperf_downcase[256] = +static const unsigned char gperf_downcase[256] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, diff --git a/enc/jis/props.kwd b/enc/jis/props.kwd index 659cf0aff4..9606828459 100644 --- a/enc/jis/props.kwd +++ b/enc/jis/props.kwd @@ -37,7 +37,7 @@ struct enc_property { unsigned char ctype; }; -static const struct enc_property *onig_jis_property(/*!ANSI{*/const char *str, unsigned int len/*}!ANSI*/); +static const struct enc_property *onig_jis_property(register const char *str, register size_t len); %} struct enc_property; diff --git a/enc/jis/props.src b/enc/jis/props.src index 659cf0aff4..9606828459 100644 --- a/enc/jis/props.src +++ b/enc/jis/props.src @@ -37,7 +37,7 @@ struct enc_property { unsigned char ctype; }; -static const struct enc_property *onig_jis_property(/*!ANSI{*/const char *str, unsigned int len/*}!ANSI*/); +static const struct enc_property *onig_jis_property(register const char *str, register size_t len); %} struct enc_property; diff --git a/enc/unicode/14.0.0/name2ctype.h b/enc/unicode/14.0.0/name2ctype.h index 99a3eeca19..61c16bafc2 100644 --- a/enc/unicode/14.0.0/name2ctype.h +++ b/enc/unicode/14.0.0/name2ctype.h @@ -40642,11 +40642,7 @@ struct uniname2ctype_struct { }; #define uniname2ctype_offset(str) offsetof(struct uniname2ctype_pool_t, uniname2ctype_pool_##str) -static const struct uniname2ctype_struct *uniname2ctype_p( -#if !(1+0) /* if ANSI, old style not to conflict with generated prototype */ - const char *, unsigned int -#endif -); +static const struct uniname2ctype_struct *uniname2ctype_p(register const char *str, register size_t len); #ifndef USE_UNICODE_PROPERTIES #define TOTAL_KEYWORDS 15 diff --git a/ext/date/zonetab.h b/ext/date/zonetab.h index 39a435db16..7ced9e0308 100644 --- a/ext/date/zonetab.h +++ b/ext/date/zonetab.h @@ -36,7 +36,7 @@ struct zone { int name; int offset; }; -static const struct zone *zonetab(); +static const struct zone *zonetab(register const char *str, register size_t len); #line 9 "zonetab.list" struct zone; diff --git a/ext/date/zonetab.list b/ext/date/zonetab.list index d2f902d2d5..748aec1d8a 100644 --- a/ext/date/zonetab.list +++ b/ext/date/zonetab.list @@ -3,7 +3,7 @@ struct zone { int name; int offset; }; -static const struct zone *zonetab(); +static const struct zone *zonetab(register const char *str, register size_t len); %} struct zone; diff --git a/lex.c.blt b/lex.c.blt index 92a4793b00..85727ed00f 100644 --- a/lex.c.blt +++ b/lex.c.blt @@ -34,7 +34,7 @@ struct kwtable {short 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(register const char *str, register size_t len); #define rb_reserved_word(str, len) reserved_word(str, len) #line 9 "defs/keywords" struct kwtable; diff --git a/tool/enc-unicode.rb b/tool/enc-unicode.rb index 60d3fca753..6f2576cc37 100755 --- a/tool/enc-unicode.rb +++ b/tool/enc-unicode.rb @@ -465,11 +465,7 @@ struct uniname2ctype_struct { }; #define uniname2ctype_offset(str) offsetof(struct uniname2ctype_pool_t, uniname2ctype_pool_##str) -static const struct uniname2ctype_struct *uniname2ctype_p( -#if !(/*ANSI*/+0) /* if ANSI, old style not to conflict with generated prototype */ - const char *, unsigned int -#endif -); +static const struct uniname2ctype_struct *uniname2ctype_p(register const char *str, register size_t len); %} struct uniname2ctype_struct; %%