ruby-changes:49166
From: nobu <ko1@a...>
Date: Fri, 15 Dec 2017 23:42:49 +0900 (JST)
Subject: [ruby-changes:49166] nobu:r61282 (trunk): gperf.sed: static declarations
nobu 2017-12-15 23:42:43 +0900 (Fri, 15 Dec 2017) New Revision: 61282 https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=61282 Log: gperf.sed: static declarations * tool/gperf.sed: comment out arguments part only, to keep the following declarations static. [Feature #13883] Modified files: trunk/defs/keywords trunk/defs/lex.c.src trunk/enc/jis/props.h.blt trunk/enc/jis/props.kwd trunk/enc/jis/props.src trunk/ext/io/console/win32_vk.inc trunk/ext/io/console/win32_vk.list trunk/lex.c.blt trunk/tool/gperf.sed Index: tool/gperf.sed =================================================================== --- tool/gperf.sed (revision 61281) +++ tool/gperf.sed (revision 61282) @@ -3,9 +3,9 @@ https://github.com/ruby/ruby/blob/trunk/tool/gperf.sed#L3 s/.*/ANSI:offset:/ x } -/^\/\*!ANSI\*\//{ +/\/\*!ANSI{\*\//{ G - s/^\/\*!ANSI\*\/\(.*\)\nANSI:.*/\/\*\1\*\// + s/\/\*!ANSI{\*\/\(.*\)\/\*}!ANSI\*\/\(.*\)\nANSI:.*/\/\*\1\*\/\2/ } 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/{ Index: ext/io/console/win32_vk.inc =================================================================== --- ext/io/console/win32_vk.inc (revision 61281) +++ ext/io/console/win32_vk.inc (revision 61282) @@ -513,7 +513,7 @@ https://github.com/ruby/ruby/blob/trunk/ext/io/console/win32_vk.inc#L513 #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 */ Index: ext/io/console/win32_vk.list =================================================================== --- ext/io/console/win32_vk.list (revision 61281) +++ ext/io/console/win32_vk.list (revision 61282) @@ -1,6 +1,6 @@ https://github.com/ruby/ruby/blob/trunk/ext/io/console/win32_vk.list#L1 %{ struct vktable {short ofs; unsigned short vk;}; -/*!ANSI*/static const struct vktable *console_win32_vk(const char *, unsigned int); +static const struct vktable *console_win32_vk(/*!ANSI{*/const char *, unsigned int/*}!ANSI*/); %} struct vktable %% Index: defs/keywords =================================================================== --- defs/keywords (revision 61281) +++ defs/keywords (revision 61282) @@ -2,7 +2,7 @@ https://github.com/ruby/ruby/blob/trunk/defs/keywords#L2 struct kwtable {int name, id[2], state;}; const struct kwtable *rb_reserved_word(const char *, unsigned int); #ifndef RIPPER -/*!ANSI*/static const struct kwtable *reserved_word(const char *, unsigned int); +static const struct kwtable *reserved_word(/*!ANSI{*/const char *, unsigned int/*}!ANSI*/); #define rb_reserved_word(str, len) reserved_word(str, len) %} Index: defs/lex.c.src =================================================================== --- defs/lex.c.src (revision 61281) +++ defs/lex.c.src (revision 61282) @@ -2,7 +2,7 @@ https://github.com/ruby/ruby/blob/trunk/defs/lex.c.src#L2 struct kwtable {int name, id[2], state;}; const struct kwtable *rb_reserved_word(const char *, unsigned int); #ifndef RIPPER -/*!ANSI*/static const struct kwtable *reserved_word(const char *, unsigned int); +static const struct kwtable *reserved_word(/*!ANSI{*/const char *, unsigned int/*}!ANSI*/); #define rb_reserved_word(str, len) reserved_word(str, len) %} Index: lex.c.blt =================================================================== --- lex.c.blt (revision 61281) +++ lex.c.blt (revision 61282) @@ -34,7 +34,7 @@ https://github.com/ruby/ruby/blob/trunk/lex.c.blt#L34 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; Index: enc/jis/props.kwd =================================================================== --- enc/jis/props.kwd (revision 61281) +++ enc/jis/props.kwd (revision 61282) @@ -37,7 +37,7 @@ struct enc_property { https://github.com/ruby/ruby/blob/trunk/enc/jis/props.kwd#L37 unsigned char ctype; }; -/*!ANSI*/static const struct enc_property *onig_jis_property(const char *str, unsigned int len); +static const struct enc_property *onig_jis_property(/*!ANSI{*/const char *str, unsigned int len/*}!ANSI*/); %} struct enc_property; Index: enc/jis/props.h.blt =================================================================== --- enc/jis/props.h.blt (revision 61281) +++ enc/jis/props.h.blt (revision 61282) @@ -69,7 +69,7 @@ struct enc_property { https://github.com/ruby/ruby/blob/trunk/enc/jis/props.h.blt#L69 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; Index: enc/jis/props.src =================================================================== --- enc/jis/props.src (revision 61281) +++ enc/jis/props.src (revision 61282) @@ -37,7 +37,7 @@ struct enc_property { https://github.com/ruby/ruby/blob/trunk/enc/jis/props.src#L37 unsigned char ctype; }; -/*!ANSI*/static const struct enc_property *onig_jis_property(const char *str, unsigned int len); +static const struct enc_property *onig_jis_property(/*!ANSI{*/const char *str, unsigned int len/*}!ANSI*/); %} struct enc_property; -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/