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