File:  [CSRG BSD Unix] / 43BSDTahoe / new / news / src / localize.7300
Revision 1.1: download - view: text, annotated - select for diffs
Tue Apr 24 16:12:58 2018 UTC (8 years, 1 month ago) by root
CVS tags: MAIN, HEAD
Initial revision

#localize.7300 - for AT&T UNIX PC 7300 and 3b1 system, to use the shared
# library.
#From philabs!hhb!kosman!kevin Sun Nov 9 12:00:17 1986
rm -f Makefile
cp Makefile.dst Makefile
chmod u+w Makefile

ed - Makefile  <<'EOF'
g/^#USG /s///
g/^#V7 /d
g/^#VMS /d
g/^#BSD4_[123] /d
g/#NOTVMS/s/#NOTVMS.*//
/CFLAGS[	 ]*=/t.
.s/CFLAGS/MFLAGS/p
.s/-Dindex.*strrchr//p
/-o compress compress.c/s//compress.c -o compress/p
g/Makefile.dst/s//Makefile/p
/-o postnews/s/$(CFLAGS) //
g/$(CFLAGS) $(LFLAGS)/t.\
.-1s/$(LFLAGS)/-c/\
s/ -o .*//p\
.+1s/ $(CFLAGS)//\
s/\.c/.o/p
/-c compress.c/s/CFLAGS/MFLAGS/p
g/$(LFLAGS)/s;$(LFLAGS);& /lib/crt0s.o shlib.ifile;\
s/$(CC)/$(LD)/
g/-ltermlib/s/-ltermlib//
g/chmod 755.*inews/s/755/6755/p
/UUXFLAGS =/s/ -z//p
w
q
EOF

rm -f defs.h
cp defs.dist defs.h
chmod u+w defs.h

ed - defs.h <<'EOF'
/DFLTSUB/s/".*"/"all"/p
/ROOTID/s/10/101/p
/TMAIL/s;^;/*;p
/PAGE/s;/usr/ucb/more;/usr/bin/more;p
/DFTXMIT/s/ -z//p
/UXMIT/s/ -z//p
/UNAME/s;/\* ;;p
/DOXREF/s;/\* ;;p
/MYORG/s;".*";"/etc/MYORG";p
w
q
EOF

#  specific stuff to tailor the shared-libarary ifile.  The news software
#  duplicates some code in the shared library and its easiest just to avoid
#  the error messages.  Also, the ifile for some reason does not define
#  daylight (from ctime(3c)) -- as near as I can tell, this is where it goes.

rm -f shlib.ifile
cat /lib/shlib.ifile >shlib.ifile
chmod u+w shlib.ifile

ed - shlib.ifile <<'EOF'
/^PC /d
/^BC /d
/^UP /d
/^ospeed /d
/^COLS /d
/^_sibuf /i

daylight = 0x303658;

.
w
q
EOF

unix.superglobalmegacorp.com

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