Initialise $@ early (fixes t/lib/ph.t for threaded perl).
[p5sagit/p5-mst-13.2.git] / keywords.pl
1 #!/usr/bin/perl
2
3 unlink "keywords.h";
4 open(KW, ">keywords.h") || die "Can't create keywords.h: $!\n";
5 select KW;
6
7 # Read & print data.
8
9 $keynum = 0;
10 while (<DATA>) {
11     chop;
12     next unless $_;
13     next if /^#/;
14     ($keyword) = split;
15     print &tab(5, "#define KEY_$keyword"), $keynum++, "\n";
16 }
17
18 ###########################################################################
19 sub tab {
20     local($l, $t) = @_;
21     $t .= "\t" x ($l - (length($t) + 1) / 8);
22     $t;
23 }
24 ###########################################################################
25 __END__
26
27 NULL
28 __FILE__
29 __LINE__
30 __PACKAGE__
31 __DATA__
32 __END__
33 AUTOLOAD
34 BEGIN
35 CORE
36 DESTROY
37 END
38 EQ
39 GE
40 GT
41 INIT
42 LE
43 LT
44 NE
45 abs
46 accept
47 alarm
48 and
49 atan2
50 bind
51 binmode
52 bless
53 caller
54 chdir
55 chmod
56 chomp
57 chop
58 chown
59 chr
60 chroot
61 close
62 closedir
63 cmp
64 connect
65 continue
66 cos
67 crypt
68 dbmclose
69 dbmopen
70 defined
71 delete
72 die
73 do
74 dump
75 each
76 else
77 elsif
78 endgrent
79 endhostent
80 endnetent
81 endprotoent
82 endpwent
83 endservent
84 eof
85 eq
86 eval
87 exec
88 exists
89 exit
90 exp
91 fcntl
92 fileno
93 flock
94 for
95 foreach
96 fork
97 format
98 formline
99 ge
100 getc
101 getgrent
102 getgrgid
103 getgrnam
104 gethostbyaddr
105 gethostbyname
106 gethostent
107 getlogin
108 getnetbyaddr
109 getnetbyname
110 getnetent
111 getpeername
112 getpgrp
113 getppid
114 getpriority
115 getprotobyname
116 getprotobynumber
117 getprotoent
118 getpwent
119 getpwnam
120 getpwuid
121 getservbyname
122 getservbyport
123 getservent
124 getsockname
125 getsockopt
126 glob
127 gmtime
128 goto
129 grep
130 gt
131 hex
132 if
133 index
134 int
135 ioctl
136 join
137 keys
138 kill
139 last
140 lc
141 lcfirst
142 le
143 length
144 link
145 listen
146 local
147 localtime
148 lock
149 log
150 lstat
151 lt
152 m
153 map
154 mkdir
155 msgctl
156 msgget
157 msgrcv
158 msgsnd
159 my
160 ne
161 next
162 no
163 not
164 oct
165 open
166 opendir
167 or
168 ord
169 pack
170 package
171 pipe
172 pop
173 pos
174 print
175 printf
176 prototype
177 push
178 q
179 qq
180 quotemeta
181 qw
182 qx
183 rand
184 read
185 readdir
186 readline
187 readlink
188 readpipe
189 recv
190 redo
191 ref
192 rename
193 require
194 reset
195 return
196 reverse
197 rewinddir
198 rindex
199 rmdir
200 s
201 scalar
202 seek
203 seekdir
204 select
205 semctl
206 semget
207 semop
208 send
209 setgrent
210 sethostent
211 setnetent
212 setpgrp
213 setpriority
214 setprotoent
215 setpwent
216 setservent
217 setsockopt
218 shift
219 shmctl
220 shmget
221 shmread
222 shmwrite
223 shutdown
224 sin
225 sleep
226 socket
227 socketpair
228 sort
229 splice
230 split
231 sprintf
232 sqrt
233 srand
234 stat
235 study
236 sub
237 substr
238 symlink
239 syscall
240 sysopen
241 sysread
242 sysseek
243 system
244 syswrite
245 tell
246 telldir
247 tie
248 tied
249 time
250 times
251 tr
252 truncate
253 uc
254 ucfirst
255 umask
256 undef
257 unless
258 unlink
259 unpack
260 unshift
261 untie
262 until
263 use
264 utime
265 values
266 vec
267 wait
268 waitpid
269 wantarray
270 warn
271 while
272 write
273 x
274 xor
275 y