X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=keywords.pl;h=eb0c0af41bc77e76ed7312b70431b7979341e280;hb=99d50c9cc9ff711b22da2b2efc0a05f25b870ee6;hp=2cc50b577991dcf0a6ea90d350aa95b93fd8a71b;hpb=4bb101f2758f169969171dfe6b70f68a406dcc1e;p=p5sagit%2Fp5-mst-13.2.git diff --git a/keywords.pl b/keywords.pl index 2cc50b5..eb0c0af 100755 --- a/keywords.pl +++ b/keywords.pl @@ -1,16 +1,19 @@ -#!/usr/bin/perl +#!/usr/bin/perl -w +use strict; require 'regen_lib.pl'; safer_unlink ("keywords.h"); open(KW, ">keywords.h") || die "Can't create keywords.h: $!\n"; +binmode KW; select KW; print <) { chop; next unless $_; next if /^#/; - ($keyword) = split; + my ($keyword) = split; print &tab(5, "#define KEY_$keyword"), $keynum++, "\n"; } +print KW "\n/* ex: set ro: */\n"; + close KW or die "Error closing keywords.h: $!"; ########################################################################### sub tab { - local($l, $t) = @_; + my ($l, $t) = @_; $t .= "\t" x ($l - (length($t) + 1) / 8); $t; } @@ -51,6 +56,7 @@ __DATA__ __END__ AUTOLOAD BEGIN +UNITCHECK CORE DESTROY END @@ -64,6 +70,7 @@ atan2 bind binmode bless +break caller chdir chmod @@ -81,6 +88,7 @@ cos crypt dbmclose dbmopen +default defined delete die @@ -97,7 +105,6 @@ endpwent endservent eof eq -err eval exec exists @@ -138,6 +145,7 @@ getservbyport getservent getsockname getsockopt +given glob gmtime goto @@ -215,6 +223,7 @@ rewinddir rindex rmdir s +say scalar seek seekdir @@ -249,6 +258,7 @@ sprintf sqrt srand stat +state study sub substr @@ -285,6 +295,7 @@ wait waitpid wantarray warn +when while write x