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