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