X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=keywords.pl;h=d702a1a01f2cae52b0cddf79154a68fb5108e777;hb=b7eceb5b089aac293e431894de6d9597f59eefbb;hp=438849a057402074dc914b4cf0c541f18a1c2c55;hpb=c529f79d594c53d3968d464c57ac24a21137dd09;p=p5sagit%2Fp5-mst-13.2.git diff --git a/keywords.pl b/keywords.pl index 438849a..d702a1a 100755 --- a/keywords.pl +++ b/keywords.pl @@ -1,23 +1,47 @@ -#!/usr/bin/perl +#!/usr/bin/perl -w +use strict; -unlink "keywords.h"; +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; } @@ -32,16 +56,12 @@ __DATA__ __END__ AUTOLOAD BEGIN +UNITCHECK CORE DESTROY END -EQ -GE -GT INIT -LE -LT -NE +CHECK abs accept alarm @@ -50,6 +70,7 @@ atan2 bind binmode bless +break caller chdir chmod @@ -67,6 +88,7 @@ cos crypt dbmclose dbmopen +default defined delete die @@ -83,6 +105,7 @@ endpwent endservent eof eq +err eval exec exists @@ -123,6 +146,7 @@ getservbyport getservent getsockname getsockopt +given glob gmtime goto @@ -200,6 +224,7 @@ rewinddir rindex rmdir s +say scalar seek seekdir @@ -234,6 +259,7 @@ sprintf sqrt srand stat +state study sub substr @@ -270,6 +296,7 @@ wait waitpid wantarray warn +when while write x