X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=keywords.pl;h=d702a1a01f2cae52b0cddf79154a68fb5108e777;hb=d78e0c3b45e585b6bd35bdb5daff9190ed70c086;hp=09e8debb97007e663883ff1ddf78b25bd0ac03a2;hpb=9ad884cb5e6c71bf010defc627075ba1610c8eba;p=p5sagit%2Fp5-mst-13.2.git diff --git a/keywords.pl b/keywords.pl index 09e8deb..d702a1a 100755 --- a/keywords.pl +++ b/keywords.pl @@ -1,15 +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; } @@ -50,6 +56,7 @@ __DATA__ __END__ AUTOLOAD BEGIN +UNITCHECK CORE DESTROY END @@ -63,6 +70,7 @@ atan2 bind binmode bless +break caller chdir chmod @@ -80,6 +88,7 @@ cos crypt dbmclose dbmopen +default defined delete die @@ -137,6 +146,7 @@ getservbyport getservent getsockname getsockopt +given glob gmtime goto @@ -214,6 +224,7 @@ rewinddir rindex rmdir s +say scalar seek seekdir @@ -248,6 +259,7 @@ sprintf sqrt srand stat +state study sub substr @@ -284,6 +296,7 @@ wait waitpid wantarray warn +when while write x