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