76 lines
1017 B
Bash
76 lines
1017 B
Bash
#!/bin/sh
|
|
# $NetBSD: keywords.sh,v 1.1.1.1 1996/09/13 18:21:26 gwr Exp $
|
|
# @(#)keywords 8.2 (Berkeley) 3/19/94
|
|
#
|
|
# WARNING! If you change this file, re-run it!
|
|
#
|
|
# Note that this implementation mixes the #define's and
|
|
# the C structure initialiers in keywords.h! (Yuck!)
|
|
|
|
# Slight concession to SunOS, etc.
|
|
awk=awk
|
|
[ -x /usr/bin/nawk ] && awk=nawk
|
|
|
|
cat << _EOF_ > _keywords.t1
|
|
add
|
|
blackhole
|
|
change
|
|
cloning
|
|
delete
|
|
dst
|
|
expire
|
|
flush
|
|
gateway
|
|
genmask
|
|
get
|
|
host
|
|
hopcount
|
|
iface
|
|
interface
|
|
ifa
|
|
ifp
|
|
inet
|
|
iso
|
|
link
|
|
llinfo
|
|
lock
|
|
lockrest
|
|
mask
|
|
monitor
|
|
mtu
|
|
net
|
|
netmask
|
|
nostatic
|
|
osi
|
|
proto1
|
|
proto2
|
|
recvpipe
|
|
reject
|
|
rtt
|
|
rttvar
|
|
sa
|
|
sendpipe
|
|
show
|
|
ssthresh
|
|
static
|
|
x25
|
|
xns
|
|
xresolve
|
|
_EOF_
|
|
|
|
exec > keywords.h
|
|
|
|
echo '/* $'NetBSD'$ */'
|
|
echo '
|
|
/* WARNING! This file was generated by keywords.sh */
|
|
'
|
|
|
|
# This creates a stream of: keyword KEYWORD
|
|
tr a-z A-Z < _keywords.t1 | paste _keywords.t1 - > _keywords.t2
|
|
|
|
$awk '{ printf "#define\tK_%s\t%d\n\t{\"%s\", K_%s},\n",
|
|
$2, NR, $1, $2 }' < _keywords.t2
|
|
|
|
rm -f _keywords.t1 _keywords.t2
|
|
exit 0
|