home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
minnie.tuhs.org
/
unixen.tar
/
unixen
/
PDP-11
/
Distributions
/
ucb
/
spencer_2bsd.tar.gz
/
2bsd.tar
/
src
/
ex
/
makeoptions
< prev
next >
Wrap
Text File
|
1980-02-17
|
604b
|
41 lines
#
# remake options -- this isn't necessary unless you add/delete options
#
onintr ifintr
cp ex_data.c /tmp/$$.c
ex - /tmp/$$.c <<'%'
g/^#include/d
w
q
'%'
cc -E $* /tmp/$$.c >/tmp/foo.c
ex - /tmp/foo.c <<'X'
g/^# /d
set sh=/bin/csh
g/^[ ]*$/d
1,/options/d
/}/-1,$d
1,$s/ "//
1,$s/".*//
1m$
w! ex_vars.h
!rm -f %; num ex_vars.h >%
e
$t0
1s/......../ 0 /
1,$s/\(......\)\(.*\)/#define \U\2\L \1/
1,$s/ */ /g
g/ */s// /g
w
!rm -f ex_vars.h; expand -8,24 % >ex_vars.h
e! ex_vars.h
$i
.
$s/e[ ].*[ ]/e NOPTS /
w
q
'X'
ifintr:
rm /tmp/foo.c