summaryrefslogtreecommitdiff
path: root/sample
diff options
context:
space:
mode:
Diffstat (limited to 'sample')
-rw-r--r--sample/mkproto.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/sample/mkproto.rb b/sample/mkproto.rb
index e1d49be3e3..754ca2dff2 100644
--- a/sample/mkproto.rb
+++ b/sample/mkproto.rb
@@ -1,11 +1,11 @@
$/ = nil
while line = gets()
if /^((void|VALUE|int|char *\*|ID|struct [\w_]+ *\*|st_table *\*) *)?\n([\w\d_]+)\(.*\)\n\s*((.+;\n)*)\{/ =~ line
- $_ = $'
+ line = $'
printf "%s %s(", $2, $3
args = []
for arg in $4.split(/;\n\s*/)
- arg.gsub! ' +', ' '
+ arg.gsub!(/ +/, ' ')
if arg =~ /,/
if arg =~ /(([^*]+) *\** *[\w\d_]+),/
type = $2.strip