File:  [CSRG BSD Unix] / 3BSD / cmd / ex / makeoptions
Revision 1.1.1.1 (vendor branch): download - view: text, annotated - select for diffs
Tue Apr 24 16:12:53 2018 UTC (8 years, 1 month ago) by root
Branches: MAIN, CSRG
CVS tags: HEAD, BSD3
BSD 3.0

#
# 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

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.