From root@gits.dyndns.org  Sat Nov  3 20:09:47 2001
Return-Path: <root@gits.dyndns.org>
Received: from smtp.noos.fr (claudel.noos.net [212.198.2.83])
	by hub.freebsd.org (Postfix) with ESMTP id 6BB9E37B406
	for <FreeBSD-gnats-submit@freebsd.org>; Sat,  3 Nov 2001 20:09:44 -0800 (PST)
Received: (qmail 11946615 invoked by uid 0); 4 Nov 2001 04:09:26 -0000
Received: from unknown (HELO gits.dyndns.org) ([212.198.229.145]) (envelope-sender <root@gits.dyndns.org>)
          by 212.198.2.83 (qmail-ldap-1.03) with DES-CBC3-SHA encrypted SMTP
          for <phillip@pm.cse.rmit.edu.au>; 4 Nov 2001 04:09:26 -0000
Received: (from root@localhost)
	by gits.dyndns.org (8.11.6/8.11.6) id fA449Pq75800;
	Sun, 4 Nov 2001 05:09:25 +0100 (CET)
	(envelope-from root)
Message-Id: <200111040409.fA449Pq75800@gits.dyndns.org>
Date: Sun, 4 Nov 2001 05:09:25 +0100 (CET)
From: Cyrille Lefevre <clefevre@citeweb.net>
Reply-To: Cyrille Lefevre <clefevre@citeweb.net>
To: FreeBSD-gnats-submit@freebsd.org
Cc: Phillip Musumeci <phillip@pm.cse.rmit.edu.au>
Subject: New port: emulators/minix (2.0.0)
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         31744
>Category:       ports
>Synopsis:       New port: emulators/minix (2.0.0)
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    edwin
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Sat Nov 03 20:10:00 PST 2001
>Closed-Date:    Thu Jan 23 20:34:45 PST 2003
>Last-Modified:  Thu Jan 23 20:34:45 PST 2003
>Originator:     Cyrille Lefevre
>Release:        FreeBSD 4.4-STABLE i386
>Organization:
ACME
>Environment:
System: FreeBSD gits 4.4-STABLE FreeBSD 4.4-STABLE #9: Sun Oct 21 22:55:26 CEST 2001 root@gits:/disk2/4.x-stable/src/sys/compile/CUSTOM i386

>Description:
	This port contains almost 200 MINIX commands.  They all live and
	refer PREFIX/minix to avoid conflicts w/ the base system ones.
>How-To-Repeat:
	n/a
>Fix:

# This is a shell archive.  Save it in a file, remove anything before
# this line, and then unpack it by entering "sh file".  Note, it may
# create directories; files and directories will be owned by you and
# have default permissions.
#
# This archive contains:
#
#	minix/Makefile
#	minix/distinfo
#	minix/files/Makefiles.shar
#	minix/files/make-patch.sh
#	minix/files/minix.sh
#	minix/files/patch-aal
#	minix/files/patch-advent
#	minix/files/patch-ash
#	minix/files/patch-awk
#	minix/files/patch-bc
#	minix/files/patch-cawf
#	minix/files/patch-elle
#	minix/files/patch-elvis
#	minix/files/patch-ibm
#	minix/files/patch-ic
#	minix/files/patch-indent
#	minix/files/patch-kermit
#	minix/files/patch-m4
#	minix/files/patch-make
#	minix/files/patch-mined
#	minix/files/patch-patch
#	minix/files/patch-scripts
#	minix/files/patch-sh
#	minix/files/patch-simple
#	minix/files/patch-yap
#	minix/files/patch-zmodem
#	minix/files/profile
#	minix/pkg-comment
#	minix/pkg-descr
#	minix/pkg-message
#	minix/pkg-plist
#
echo x - minix/Makefile
sed 's/^X//' >minix/Makefile << 'END-of-minix/Makefile'
X# New ports collection makefile for:	minix
X# Date created:				01 November 2001
X# Whom:					clefevre@citeweb.net
X#
X# $FreeBSD$
X#
X
XPORTNAME=	minix
XPORTVERSION=	2.0.0
XCATEGORIES=	emulators
XMASTER_SITES=	http://www.cs.vu.nl/pub/minix/2.0.0/src/
XDISTFILES=	SYS.TAZ CMD.TAZ
XDIST_SUBDIR=	${PORTNAME}
X
XMAINTAINER=	clefevre@citeweb.net
X
X.include <bsd.port.pre.mk>
X
X#
X# Global variables
X#
X
XWRKSRC=		${WRKDIR}/src
XPATCH_STRIP=	-p2
XMAKE_ENV+=	MINIX_PREFIX="${MINIX_PREFIX}"
XMANPREFIX=	${MINIX_PREFIX}/share
XMANCOMPRESSED=	yes
XPLIST_SUB+=	MINIX="${MINIX_PREFIX:S|${PREFIX}/||}"
X
XMAN1=   aal.1 acd.1 anm.1 ar.1 arch.1 ascii.1 ash.1 asize.1 at.1 \
X	atrun.1 banner.1 basename.1 bc.1 bsfilt.1 btoa.1 cal.1 \
X	calendar.1 cat.1 cawf.1 cc.1 cdiff.1 cgrep.1 chgrp.1 chmod.1 \
X	ci.1 cksum.1 clone.1 clr.1 cmp.1 co.1 colcrt.1 comm.1 \
X	compress.1 cp.1 cpdir.1 crc.1 ctags.1 cut.1 date.1 dd.1 \
X	dhrystone.1 diff.1 dirname.1 dosdir.1 dosread.1 doswrite.1 \
X	du.1 echo.1 ed.1 elvis.1 elvrec.1 ex.1 expand.1 expr.1 \
X	factor.1 fgrep.1 file.1 find.1 flex.1 flexdoc.1 fmt.1 fold.1 \
X	fortune.1 gather.1 grep.1 head.1 ic.1 id.1 ifdef.1 install.1 \
X	isodir.1 isoinfo.1 isoread.1 join.1 kill.1 last.1 leave.1 \
X	ln.1 login.1 look.1 lp.1 ls.1 mail.1 make.1 makewhatis.1 \
X	man.1 mesg.1 mkdir.1 mkfifo.1 mkproto.1 mref.1 mt.1 mv.1 \
X	nroff.1 od.1 passwd.1 paste.1 patch.1 pathchk.1 pr.1 prep.1 \
X	pretty.1 printenv.1 pwd.1 readall.1 ref.1 remsync.1 rev.1 \
X	rm.1 rmdir.1 rz.1 sbc.1 sed.1 sh.1 shar.1 sleep.1 sort.1 \
X	spell.1 split.1 strings.1 stty.1 su.1 sum.1 svc.1 synctree.1 \
X	sz.1 tail.1 tar.1 tee.1 term.1 termcap.1 test.1 tget.1 \
X	time.1 touch.1 tr.1 traverse.1 treecmp.1 true.1 tsort.1 \
X	ttt.1 tty.1 uname.1 uncompress.1 unexpand.1 uniq.1 unshar.1 \
X	uud.1 uudecode.1 uue.1 uuencode.1 vi.1 wc.1 whatis.1 \
X	whatsnew.1 which.1 who.1 whoami.1 width.1 write.1 yacc.1 \
X	yap.1 yes.1 zcat.1
XMAN3=	add_history.3 editline.3 readline.3
XMAN5=	TZ.5 passwd.5 utmp.5 whatis.5
XMAN6=	advent.6
XMAN7=	ascii.7 environ.7 hier.7 man.7
XMAN8=   backup.8 checkhier.8 chown.8 cron.8 elvprsv.8 inodes.8 \
X	mknod.8 pwdauth.8 sync.8 update.8
XMAN9=   awk.9 elle.9 ellec.9 elvis.9 indent.9 kermit.9 m4.9 mined.9 \
X	roff.9
X
XMSG_FILE=	${PKGDIR}/pkg-message
XPKGMESSAGE=	${WRKDIR}/pkg-message
X
X#
X# Local variables
X#
X
XMINIX_PREFIX=	${PREFIX}/minix
X
XDOC_FILES=	LICENSE
X
X# save some space at build time by removing unneeded files and directories.
XREMOVE_DIRS=	include man/man2 man/man4 src/boot src/commands/ash/sys \
X		src/commands/de src/commands/dis88 src/commands/ftp \
X		src/commands/ftpd src/commands/reboot src/commands/talk \
X		src/commands/talkd src/commands/telnet src/commands/telnetd \
X		src/crclist src/etc src/fs src/inet src/kernel \
X		src/lib/ansi src/lib/curses src/lib/end src/lib/float \
X		src/lib/fphook src/lib/i386 src/lib/i86 src/lib/ip \
X		src/lib/math src/lib/other src/lib/posix src/lib/stdio \
X		src/lib/syscall src/lib/syslib src/mm src/test \
X		src/tmp src/tools tmp
X
X# The following directories are created as is w/ permissions
X# intentionally left closed.
XINSTALL_DIRS=	var/db var/log var/mail var/preserve var/run var/tmp \
X		var/spool/at/past var/spool/lpd var/spool/uucppublic
X
X# The following programs aren't really fonctionnal and may cause some
X# disasters.  So, for safety, they are disabled at installation time.
XDISABLED_FILES= anm asize at atrun cron acd cc m2 pc dosread dosdir \
X		doswrite login last who lp lpd mt passwd chfn chsh \
X		pwdauth readall su swapfs
X
XFIND?=		find
XXARGS?=		xargs
X
X#
X# Post-extract
X#
X
Xpost-extract: extract-makefiles remove-dirs
X
Xextract-makefiles:
X	cd ${WRKDIR}; ${SHELL} ${FILESDIR}/Makefiles.shar
X
Xremove-dirs:
X.for dir in ${REMOVE_DIRS}
X	@${RM} -rf ${WRKDIR}/${dir}
X.endfor
X
X#
X# Post-patch
X#
X
Xpost-patch: patch-paths patch-profile patch-wrapper patch-message
X
Xpatch-paths:
X	@${FIND} ${WRKSRC}/commands -type f | \
X	${XARGS} ${AWK} '/%%MINIX_PREFIX%%/{print FILENAME;nextfile}' | \
X	${XARGS} ${PERL} -pi.fbsd -e 's|%%MINIX_PREFIX%%|${MINIX_PREFIX}|g'
X
Xpatch-profile:
X	@${SED} -e 's|%%MINIX_PREFIX%%|${MINIX_PREFIX}|g' \
X		${FILESDIR}/profile > ${WRKDIR}/profile
X
Xpatch-wrapper:
X	@${SED} -e '/%%PROFILE%%/r ${FILESDIR}/profile' \
X		-e '/%%PROFILE%%/d' ${FILESDIR}/minix.sh | \
X	 ${SED} -e 's|%%MINIX_PREFIX%%|${MINIX_PREFIX}|g' > ${WRKDIR}/minix.sh
X
Xpatch-message:
X	@${SED} -e 's|%%PREFIX%%|${PREFIX}|g' \
X		-e 's|%%MINIX_PREFIX%%|${MINIX_PREFIX}|g' \
X		${MSG_FILE} > ${PKGMESSAGE}
X#
X# Post-install
X#
X
Xpost-install: install-docs install-profile install-wrapper \
X	      install-whatis install-dirs disable-files \
X	      display-message
X
Xinstall-docs:
X.if !defined(NOPORTDOCS)
X	@${MKDIR} ${DOCSDIR}
X.for file in ${DOC_FILES}
X	@${INSTALL_DATA} ${WRKSRC}/${file} ${DOCSDIR}
X.endfor
X.endif
X
Xinstall-profile:
X	@[ -d ${MINIX_PREFIX}/etc ] || ${MKDIR} ${MINIX_PREFIX}/etc
X.if !exists(${MINIX_PREFIX}/etc/profile.sample)
X	${INSTALL_DATA} ${WRKDIR}/profile ${MINIX_PREFIX}/etc/profile.sample
X.endif
X.if !exists(${MINIX_PREFIX}/etc/profile)
X	${INSTALL_DATA} ${WRKDIR}/profile ${MINIX_PREFIX}/etc/profile
X.endif
X
Xinstall-wrapper:
X	${INSTALL_SCRIPT} ${WRKDIR}/minix.sh ${PREFIX}/bin/minix
X
Xinstall-whatis:
X	${PREFIX}/bin/minix makewhatis ${MANPREFIX}/man
X
Xinstall-dirs:
X.for dir in ${INSTALL_DIRS}
X	@${MKDIR} ${MINIX_PREFIX}/${dir}
X.endfor
X
Xdisable-files:
X.for file in ${DISABLED_FILES}
X	@${CHMOD} a-x ${MINIX_PREFIX}/bin/${file}
X.endfor
X
Xdisplay-message:
X	@${ECHO_MSG}
X	@${CAT} ${PKGMESSAGE}
X	@${ECHO_MSG}
X
X#
X# Maintainer only
X#
X
Xmake-patch:
X	@${SHELL} ${FILESDIR}/make-patch.sh
X
X.include <bsd.port.post.mk>
END-of-minix/Makefile
echo x - minix/distinfo
sed 's/^X//' >minix/distinfo << 'END-of-minix/distinfo'
XMD5 (minix/SYS.TAZ) = 1e60a393ee235ac4b317079ffa5af5e8
XMD5 (minix/CMD.TAZ) = 41606c189678fa7b58fb4d1d43ff8752
END-of-minix/distinfo
echo x - minix/files/Makefiles.shar
sed 's/^X//' >minix/files/Makefiles.shar << 'END-of-minix/files/Makefiles.shar'
X# This is a shell archive.  Save it in a file, remove anything before
X# this line, and then unpack it by entering "sh file".  Note, it may
X# create directories; files and directories will be owned by you and
X# have default permissions.
X#
X# This archive contains:
X#
X#	src/Makefile
X#	src/Makefile.inc
X#	src/commands/Makefile
X#	src/commands/Makefile.inc
X#	src/commands/aal/Makefile
X#	src/commands/advent/Makefile
X#	src/commands/ash/Makefile
X#	src/commands/autil/Makefile
X#	src/commands/awk/Makefile
X#	src/commands/bc/Makefile
X#	src/commands/bsd.simple.mk
X#	src/commands/byacc/Makefile
X#	src/commands/cawf/Makefile
X#	src/commands/elle/Makefile
X#	src/commands/elvis/Makefile
X#	src/commands/flex-2.3.7/Makefile
X#	src/commands/i386/Makefile
X#	src/commands/i386/Makefile.inc
X#	src/commands/i386/asmconv/Makefile
X#	src/commands/ibm/Makefile
X#	src/commands/ic/Makefile
X#	src/commands/indent/Makefile
X#	src/commands/kermit/Makefile
X#	src/commands/m4/Makefile
X#	src/commands/make/Makefile
X#	src/commands/mined/Makefile
X#	src/commands/patch/Makefile
X#	src/commands/scripts/Makefile
X#	src/commands/sh/Makefile
X#	src/commands/simple/Makefile
X#	src/commands/yap/Makefile
X#	src/commands/zmodem/Makefile
X#	src/lib/Makefile
X#	src/lib/Makefile.inc
X#	src/lib/editline/Makefile
X#	src/lib/liby/Makefile
X#
Xecho x - src/Makefile
Xsed 's/^X//' >src/Makefile << 'END-of-src/Makefile'
XX.include "Makefile.inc"
XX
XXSUBDIR=	lib commands
XX
XXSECTIONS= 1 3 5 6 7 8 9 # 4 5
XX
XXbeforeinstall:
XX	@[ -d "${PREFIX}" ] || ${MKDIR} ${PREFIX}
XX	@[ -d "${MINIX_PREFIX}" ] || ${MKDIR} ${MINIX_PREFIX}
XX	@[ -d "${BINDIR}" ] || ${MKDIR} ${BINDIR}
XX	@[ -d "${LIBDIR}" ] || ${MKDIR} ${LIBDIR}
XX	@[ -d "${MANDIR:H}" ] || ${MKDIR} ${MANDIR:H}
XX.for sec in ${SECTIONS}
XX	@[ -d "${MANDIR}${sec}" ] || ${MKDIR} ${MANDIR}${sec}
XX.endfor
XX	@[ -d "${SHAREDIR}" ] || ${MKDIR} ${SHAREDIR}
XX
XX.include <bsd.subdir.mk>
XEND-of-src/Makefile
Xecho x - src/Makefile.inc
Xsed 's/^X//' >src/Makefile.inc << 'END-of-src/Makefile.inc'
XXPREFIX?=	/usr/local
XX
XXMINIX_PREFIX?=	${PREFIX}/minix
XX
XXMINIX_BINDIR?=	${MINIX_PREFIX}/bin
XXMINIX_LIBDIR?=	${MINIX_PREFIX}/lib
XXMINIX_SHAREDIR?= ${MINIX_PREFIX}/share
XXMINIX_MANDIR?=	${MINIX_PREFIX}/share/man/man
XX
XXBINDIR=		${MINIX_BINDIR}
XXLIBDIR=		${MINIX_LIBDIR}
XXMANDIR=		${MINIX_MANDIR}
XXSHAREDIR=	${MINIX_SHAREDIR}
XX
XXCHOWN?=		chown
XXCP?=		cp
XXECHO_CMD?=	echo
XXGTAGS?=		gtags
XXHTAGS?=		htags
XXLN?=		ln
XXMKDIR?=		mkdir -p
XXPAGER?=		more
XXRM?=		rm
XXSETENV?=	env
XEND-of-src/Makefile.inc
Xecho x - src/commands/Makefile
Xsed 's/^X//' >src/commands/Makefile << 'END-of-src/commands/Makefile'
XX# Makefile for commands.
XX
XXSUBDIR=         aal advent ash autil awk bc byacc cawf elle elvis \
XX		flex-2.3.7 ${MACHINE_ARCH} ibm ic indent kermit m4 \
XX		make mined patch scripts sh simple yap zmodem
XX#		de dis88 reboot ftp ftpd talk talkd telnet telnetd
XX
XX.include <bsd.subdir.mk>
XEND-of-src/commands/Makefile
Xecho x - src/commands/Makefile.inc
Xsed 's/^X//' >src/commands/Makefile.inc << 'END-of-src/commands/Makefile.inc'
XX.include "../Makefile.inc"
XEND-of-src/commands/Makefile.inc
Xecho x - src/commands/aal/Makefile
Xsed 's/^X//' >src/commands/aal/Makefile << 'END-of-src/commands/aal/Makefile'
XX# Makefile for aal
XX
XX.PATH:	${.CURDIR}/../../../man/man1
XX
XXCFLAGS+= -I. -DAAL -DSTB -DNDEBUG -DDISTRIBUTION
XX
XXPROG=	aal
XXMAN=	ar.1
XXSRCS=	archiver.c print.c rd.c rd_arhdr.c rd_unsig2.c \
XX	sprint.c wr_arhdr.c wr_bytes.c wr_int2.c wr_long.c \
XX	wr_ranlib.c format.c rd_bytes.c system.c write.c \
XX	long2str.c
XX
XXLINKS=	${BINDIR}/aal ${BINDIR}/ar
XXMLINKS=	ar.1 aal.1
XX
XX.include <bsd.prog.mk>
XEND-of-src/commands/aal/Makefile
Xecho x - src/commands/advent/Makefile
Xsed 's/^X//' >src/commands/advent/Makefile << 'END-of-src/commands/advent/Makefile'
XX# Makefile for advent
XX
XX.PATH:	${.CURDIR}/../../../man/man6
XX
XXCFLAGS+= -DTEXTDIR=\"${DATADIR}\"
XX
XXPROG=	advent
XXMAN=	advent.6
XXSRCS=	advent.c database.c english.c initial.c itverb.c \
XX	score.c travel.c turn.c utility.c verb.c vocab.c
XX
XXDATADIR=	${SHAREDIR}/games/advent
XXDATASRCS=	advent1.txt advent2.txt advent3.txt advent4.txt
XXDATAOBJS=	${DATASRCS:.txt=.dat}
XX
XXCLEANFILES=	setup advtext.h ${DATAOBJS}
XX
XXadvtext.h ${DATAOBJS}: setup ${DATASRCS}
XX	./setup
XX
XXdatabase.o: advtext.h
XX
XXafterinstall: ${DATAOBJS}
XX	@[ -d "${DATADIR}" ] || ${MKDIR} ${DATADIR}
XX	${INSTALL} ${COPY} -o ${LIBOWN} -g ${LIBGRP} -m ${LIBMODE} \
XX		${DATAOBJS} ${DATADIR}
XX
XX.include <bsd.prog.mk>
XEND-of-src/commands/advent/Makefile
Xecho x - src/commands/ash/Makefile
Xsed 's/^X//' >src/commands/ash/Makefile << 'END-of-src/commands/ash/Makefile'
XX# Makefile for ash.
XX
XX.PATH:	${.CURDIR}/../../../man/man1 ${.CURDIR}/bltin
XX
XXCFLAGS+= -DSHELL -I${.CURDIR}
XXLDFLAGS+= -L${.CURDIR}/../../lib/editline
XXLDADD=	-ledit -ltermcap
XX
XXPROG=		ash
XX# order is important.
XXSRCS=		${GENSRCS} ${BLTINSRCS} ${SHSRCS}
XX
XXSHSRCS=		cd.c dirent.c error.c eval.c exec.c expand.c input.c \
XX		jobs.c mail.c main.c memalloc.c miscbltin.c mystring.c \
XX		options.c output.c parser.c redir.c show.c trap.c var.c
XXBLTINSRCS=	echo.c expr.c regexp.c
XXGENSRCS=	builtins.c nodes.c signames.c syntax.c operators.c init.c
XXGENHDRS=	${GENSRCS:Ninit.c:.c=.h} token.def
XXINITSRCS=	${GENSRCS:Ninit.c} ${SHSRCS}
XXMKCMDS=		mkinit mknodes mksignames mksyntax
XXMKOBJS=		${MKCMDS:=.o}
XX
XXCLEANFILES=	${GENSRCS} ${GENHDRS} ${MKCMDS} ${MKOBJS}
XX
XXparser.o: token.def
XX
XXtoken.def: mktokens
XX	${SHELL} ./mktokens
XX
XXbuiltins.c builtins.h: builtins.table shell.h
XX	${SHELL} ./mkbuiltins shell.h builtins.table
XX
XXinit.c: mkinit ${INITSRCS}
XX	./mkinit : ${INITSRCS}
XX
XXnodes.c nodes.h: mknodes nodetypes nodes.c.pat
XX	./mknodes nodetypes nodes.c.pat
XX
XXsignames.c signames.h: mksignames
XX	./mksignames
XX
XXsyntax.c syntax.h: mksyntax
XX	./mksyntax
XX
XXoperators.c: bltin/mkexpr bltin/binary_op bltin/unary_op
XX	${SHELL} bltin/mkexpr
XX
XX.include <bsd.prog.mk>
XEND-of-src/commands/ash/Makefile
Xecho x - src/commands/autil/Makefile
Xsed 's/^X//' >src/commands/autil/Makefile << 'END-of-src/commands/autil/Makefile'
XX# Makefile for commands/autil
XX
XX.PATH:	${.CURDIR}/../../../man/man1
XX
XXPROGS=	anm asize
XX
XX.include "../bsd.simple.mk"
XEND-of-src/commands/autil/Makefile
Xecho x - src/commands/awk/Makefile
Xsed 's/^X//' >src/commands/awk/Makefile << 'END-of-src/commands/awk/Makefile'
XX# Makefile for awk.
XX
XX.PATH:	${.CURDIR}/../../../man/man9
XX
XXLDADD=	-lm
XX
XXPROG=	awk
XXMAN=	awk.9
XXSRCS=	m.c e.c n.c l.c r.c v.c y.c regexp.c k.c
XX
XX.include <bsd.prog.mk>
XEND-of-src/commands/awk/Makefile
Xecho x - src/commands/bc/Makefile
Xsed 's/^X//' >src/commands/bc/Makefile << 'END-of-src/commands/bc/Makefile'
XX# Makefile for bc
XX
XX.PATH:	${.CURDIR}/../../../man/man1
XX
XXLFLAGS=	-I8
XX
XXPROGS=		bc sbc
XXMAN_sbc=
XXSRCS_common=	scan.c util.c main.c number.c storage.c \
XX		load.c execute.c global.c
XXSRCS_bc=	bc.y ${SRCS_common}
XXSRCS_sbc=	sbc.y ${SRCS_common}
XX
XXMLINKS=		bc.1 sbc.1
XX
XXSRCS_fbc=	${SRCS_bc:Nglobal.c}
XXOBJS_fbc=	${SRCS_fbc:R:S/$/.o/g}
XX
XXDATADIR=	${SHAREDIR}/misc
XXDATAFILES=	libmath.b
XX
XXCLEANFILES=	fbc math.h
XX
XXmath.h: fbc libmath.b
XX	./fbc -c libmath.b < /dev/null > math.h
XX	${SHELL} ./fix_math.h
XX	${RM} -f fbc
XX
XXglobal.o: math.h
XX
XXafterinstall:
XX	@[ -d "${DATADIR}" ] || ${MKDIR} ${DATADIR}
XX	${INSTALL} ${COPY} -o ${LIBOWN} -g ${LIBGRP} -m ${LIBMODE} \
XX		${DATAFILES} ${DATADIR}
XX
XX.include "../bsd.simple.mk"
XX
XXfbc: ${OBJS_fbc}
XX	echo \"\" > math.h
XX	${CC} ${CFLAGS} -c global.c
XX	${CC} ${CFLAGS} ${LDFLAGS} -o ${.TARGET} ${OBJS_fbc} global.o
XX	${RM} -f math.h global.o
XEND-of-src/commands/bc/Makefile
Xecho x - src/commands/bsd.simple.mk
Xsed 's/^X//' >src/commands/bsd.simple.mk << 'END-of-src/commands/bsd.simple.mk'
XX#	from: @(#)bsd.prog.mk	5.26 (Berkeley) 6/25/91
XX# $FreeBSD: src/share/mk/bsd.prog.mk,v 1.86.2.5 2001/09/24 15:44:23 ru Exp $
XX
XX.if !target(__initialized__)
XX__initialized__:
XX.if exists(${.CURDIR}/../Makefile.inc)
XX.include "${.CURDIR}/../Makefile.inc"
XX.endif
XX.endif
XX
XXPINSTALL?=${INSTALL} ${COPY} ${STRIP} -o ${BINOWN} -g ${BINGRP} -m ${BINMODE}
XX
XX.SUFFIXES: .out .o .c .cc .cpp .cxx .C .m .y .l .s .S
XX
XXCFLAGS+=${COPTS} ${DEBUG_FLAGS}
XX.if defined(DESTDIR) && !defined(BOOTSTRAPPING)
XXCFLAGS+= -I${DESTDIR}/usr/include
XXCXXINCLUDES+= -I${DESTDIR}/usr/include/g++
XX.endif
XX
XX.if !defined(DEBUG_FLAGS)
XXSTRIP?=	-s
XX.endif
XX
XX.if defined(NOSHARED) && ( ${NOSHARED} != "no" && ${NOSHARED} != "NO" )
XXLDFLAGS+= -static
XX.endif
XX
XX.if defined(PROGS)
XX.for PROG in ${PROGS}
XX.if defined(SRCS_${PROG})
XX
XX# If there are Objective C sources, link with Objective C libraries.
XX.if ${SRCS_${PROG}:M*.m} != ""
XXOBJCLIBS_${PROG}?= -lobjc
XXLDADD_${PROG}+=	${OBJCLIBS_${PROG}}
XX.endif
XX
XXOBJS_${PROG}+=  ${SRCS_${PROG}:N*.h:R:S/$/.o/g}
XX.else
XXSRCS_${PROG}=	${PROG}.c
XX
XX# Always make an intermediate object file because:
XX# - it saves time rebuilding when only the library has changed
XX# - the name of the object gets put into the executable symbol table instead of
XX#   the name of a variable temporary object.
XX# - it's useful to keep objects around for crunching.
XXOBJS_${PROG}=	${PROG}.o
XX.endif
XX
XX.if !defined(CFLAGS_${PROG})
XXCFLAGS_${PROG}= ${CFLAGS}
XX.endif
XX.if !defined(LDFLAGS_${PROG})
XXLDFLAGS_${PROG}= ${LDFLAGS}
XX.endif
XX
XX.if !target(${PROG})
XX${PROG}: ${OBJS_${PROG}}
XX	${CC} ${CFLAGS_${PROG}} ${LDFLAGS_${PROG}} -o ${.TARGET} \
XX		${OBJS_${PROG}} ${LDDESTDIR} ${LDADD_${PROG}}
XX.endif
XX
XXSRCS+=	${SRCS_${PROG}}
XXOBJS+=	${OBJS_${PROG}}
XX
XX.if	!defined(NOMAN) && !defined(MAN_${PROG}) && \
XX	!defined(MAN1_${PROG}) && !defined(MAN2_${PROG}) && !defined(MAN3_${PROG}) && \
XX	!defined(MAN4_${PROG}) && !defined(MAN5_${PROG}) && !defined(MAN6_${PROG}) && \
XX	!defined(MAN7_${PROG}) && !defined(MAN8_${PROG}) && !defined(MAN9_${PROG}) && \
XX	!defined(MAN1aout_${PROG})
XXMAN_${PROG}=	${PROG}.1
XXMAN1_${PROG}=	${MAN_${PROG}}
XX.endif
XX.endfor
XX
XX.if	!defined(NOMAN) && !defined(MAN) && \
XX	!defined(MAN1) && !defined(MAN2) && !defined(MAN3) && \
XX	!defined(MAN4) && !defined(MAN5) && !defined(MAN6) && \
XX	!defined(MAN7) && !defined(MAN8) && !defined(MAN9) && \
XX	!defined(MAN1aout)
XX.for PROG in ${PROGS}
XXMAN+=	${MAN_${PROG}}
XXMAN1+=	${MAN1_${PROG}}
XX.endfor
XX.endif
XX.endif
XX
XX.if	!defined(NOMAN)
XX.if defined(MAN_EXTRA) && !empty(MAN_EXTRA)
XXMAN+=	${MAN_EXTRA}
XX.endif
XX.for sect in 1 2 3 4 5 6 7 8 9 1aout
XX.if defined(MAN${sect}_EXTRA) && !empty(MAN${sect}_EXTRA)
XXMAN+=	${MAN${sect}_EXTRA}
XXMAN${sect}+=	${MAN${sect}_EXTRA}
XX.endif
XX.endfor
XX.endif
XX
XX.MAIN: all
XX.if !defined(NOMAN)
XXall: objwarn ${PROGS} ${SCRIPTS} all-man _SUBDIR
XX.else
XXall: objwarn ${PROGS} ${SCRIPTS} _SUBDIR
XX.endif
XX
XXCLEANFILES+= ${PROGS} ${OBJS}
XX
XX.if defined(PROGS)
XX.for PROG in ${PROGS}
XX_EXTRADEPEND: _EXTRADEPEND_${PROG}
XX_EXTRADEPEND_${PROG}:
XX.if ${OBJFORMAT} == aout
XX	${ECHO_CMD} ${PROG}: $$(${CC} -Wl,-f ${CFLAGS} ${LDFLAGS} ${LDDESTDIR} \
XX	    ${LDADD_${PROG}:S/^/-Wl,/}) >> ${DEPENDFILE}
XX.else
XX	${ECHO_CMD} ${PROG}: ${LIBC} ${DPADD_${PROG}} >> ${DEPENDFILE}
XX.endif
XX.endfor
XX.endif
XX
XX.if !target(install)
XX.if !target(beforeinstall)
XXbeforeinstall:
XX.endif
XX.if !target(beforeuninstall)
XXbeforeuninstall:
XX.endif
XX
XX_INSTALLFLAGS:=	${INSTALLFLAGS}
XX.for ie in ${INSTALLFLAGS_EDIT}
XX_INSTALLFLAGS:=	${_INSTALLFLAGS${ie}}
XX.endfor
XX
XXrealinstall: beforeinstall
XX.if defined(PROGS)
XX.for PROG in ${PROGS}
XX.if defined(PROGNAME_${PROG})
XX	${PINSTALL} ${_INSTALLFLAGS} ${PROG} ${DESTDIR}${BINDIR}/${PROGNAME_${PROG}}
XX.else
XX	${PINSTALL} ${_INSTALLFLAGS} ${PROG} ${DESTDIR}${BINDIR}
XX.endif
XX.if defined(HIDEGAME)
XX	${LN} -fs dm ${DESTDIR}/${GBINDIR}/${PROG}
XX	${CHOWN} ${GAMEOWN}:${GAMEGRP} ${DESTDIR}/${GBINDIR}/${PROG}
XX.endif
XX.endfor
XX.endif
XX.if defined(LINKS) && !empty(LINKS)
XX	@set ${LINKS}; \
XX	while : ; do \
XX		case $$# in \
XX			0) break;; \
XX			1) ${ECHO_CMD} "warn: missing hardlink: $$1"; break;; \
XX		esac; \
XX		l=${DESTDIR}$$1; shift; \
XX		t=${DESTDIR}$$1; shift; \
XX		${ECHO} $$t -\> $$l; \
XX		${LN} -f $$l $$t; \
XX	done
XX.endif
XX.if defined(SYMLINKS) && !empty(SYMLINKS)
XX	@set ${SYMLINKS}; \
XX	while : ; do \
XX		case $$# in \
XX			0) break;; \
XX			1) ${ECHO_CMD} "warn: missing symlink: $$1"; break;; \
XX		esac; \
XX		l=$$1; shift; \
XX		t=${DESTDIR}$$1; shift; \
XX		${ECHO} $$t -\> $$l; \
XX		${LN} -fs $$l $$t; \
XX	done
XX.endif
XX
XXrealuninstall: beforeuninstall
XX.if defined(PROGS)
XX.for PROG in ${PROGS}
XX.if defined(PROGNAME_${PROG})
XX	@${ECHO_CMD} ${RM} -f ${DESTDIR}${BINDIR}/${PROGNAME_${PROG}}
XX.else
XX	@${ECHO_CMD} ${RM} -f ${DESTDIR}${BINDIR}/${PROG}
XX.endif
XX.if defined(HIDEGAME)
XX	@${ECHO_CMD} ${RM} -f ${DESTDIR}/${GBINDIR}/${PROG}
XX.endif
XX.endfor
XX.endif
XX.if defined(LINKS) && !empty(LINKS)
XX	@set ${LINKS}; \
XX	while : ; do \
XX		case $$# in \
XX			0) break;; \
XX			1) ${ECHO_CMD} "warn: missing hardlink: $$1"; break;; \
XX		esac; \
XX		shift; t=${DESTDIR}$$1; shift; \
XX		: ${ECHO} ${RM} -f $$t; \
XX		${ECHO_CMD} ${RM} -f $$t; \
XX	done
XX.endif
XX.if defined(SYMLINKS) && !empty(SYMLINKS)
XX	@set ${SYMLINKS}; \
XX	while : ; do \
XX		case $$# in \
XX			0) break;; \
XX			1) ${ECHO_CMD} "warn: missing symlink: $$1"; break;; \
XX		esac; \
XX		shift; t=${DESTDIR}$$1; shift; \
XX		: ${ECHO} ${RM} -f $$t; \
XX		${ECHO_CMD} ${RM} -f $$t; \
XX	done
XX.endif
XX
XX.if defined(SCRIPTS) && !empty(SCRIPTS)
XXrealinstall: _scriptsinstall
XXrealuninstall: _scriptsuninstall
XX
XXSCRIPTSDIR?=	${BINDIR}
XXSCRIPTSOWN?=	${BINOWN}
XXSCRIPTSGRP?=	${BINGRP}
XXSCRIPTSMODE?=	${BINMODE}
XX
XX.for script in ${SCRIPTS}
XX.if defined(SCRIPTSNAME)
XXSCRIPTSNAME_${script:T}?=	${SCRIPTSNAME}
XX.else
XXSCRIPTSNAME_${script:T}?=	${script:T:R}
XX.endif
XXSCRIPTSDIR_${script:T}?=	${SCRIPTSDIR}
XXSCRIPTSOWN_${script:T}?=	${SCRIPTSOWN}
XXSCRIPTSGRP_${script:T}?=	${SCRIPTSGRP}
XXSCRIPTSMODE_${script:T}?=	${SCRIPTSMODE}
XX
XX_scriptsinstall: SCRIPTSINS_${script:T}
XXSCRIPTSINS_${script:T}: ${script}
XX	${INSTALL} ${COPY} -o ${SCRIPTSOWN_${.ALLSRC:T}} \
XX	    -g ${SCRIPTSGRP_${.ALLSRC:T}} -m ${SCRIPTSMODE_${.ALLSRC:T}} \
XX	    ${_INSTALLFLAGS} ${.ALLSRC} \
XX	    ${DESTDIR}${SCRIPTSDIR_${.ALLSRC:T}}/${SCRIPTSNAME_${.ALLSRC:T}}
XX
XX_scriptsuninstall: SCRIPTSINS_${script:T}
XXSCRIPTSINS_${script:T}:
XX	@${ECHO_CMD} ${RM} -f ${DESTDIR}${SCRIPTSDIR_${.ALLSRC:T}}/${SCRIPTSNAME_${.ALLSRC:T}}
XX.endfor
XX.endif
XX
XXinstall: afterinstall _SUBDIR
XXuninstall: afteruninstall _UNINSTALL _SUBDIR
XX.if !defined(NOMAN)
XXafterinstall: realinstall maninstall
XXafteruninstall: realuninstall manuninstall
XX.else
XXafterinstall: realinstall
XXafteruninstall: realuninstall
XX.endif
XX.endif
XX
XXDISTRIBUTION?=	bin
XX.if !target(distribute)
XXdistribute: _SUBDIR
XX.for dist in ${DISTRIBUTION}
XX	cd ${.CURDIR}; \
XX		$(MAKE) install DESTDIR=${DISTDIR}/${dist} SHARED=copies
XX.endfor
XX.endif
XX
XX.if !target(lint)
XXlint: ${SRCS} _SUBDIR
XX.if defined(PROGS)
XX	@${LINT} ${LINTFLAGS} ${.ALLSRC} | ${PAGER} 2>&1
XX.endif
XX.endif
XX
XX.if defined(NOTAGS)
XXtags:
XX.endif
XX
XX.if !target(tags)
XXtags: ${SRCS} _SUBDIR
XX.if defined(PROGS)
XX	@cd ${.CURDIR}; ${GTAGS} ${GTAGSFLAGS} ${.OBJDIR}
XX.if defined(HTML)
XX	@cd ${.CURDIR}; ${HTAGS} ${HTAGSFLAGS} -d ${.OBJDIR} ${.OBJDIR}
XX.endif
XX.endif
XX.endif
XX
XX.if !defined(NOMAN)
XX.include <bsd.man.mk>
XX.endif
XX
XX.for __target in all-man maninstall regress uninstall manuninstall
XX.if !target(${__target})
XX${__target}:
XX.endif
XX.endfor
XX
XX.if ${OBJFORMAT} != aout || make(checkdpadd) || defined(NEED_LIBNAMES)
XX.include <bsd.libnames.mk>
XX.endif
XX
XX.include <bsd.dep.mk>
XX
XX.if defined(PROGS) && !exists(${DEPENDFILE})
XX${OBJS}: ${SRCS:M*.h}
XX.endif
XX
XX.include <bsd.obj.mk>
XX
XX.include <bsd.sys.mk>
XEND-of-src/commands/bsd.simple.mk
Xecho x - src/commands/byacc/Makefile
Xsed 's/^X//' >src/commands/byacc/Makefile << 'END-of-src/commands/byacc/Makefile'
XX# Makefile for Berkeley yacc.
XX
XX.PATH:	${.CURDIR}/../../../man/man1
XX
XXPROG=	yacc
XXSRCS=	closure.c error.c lalr.c lr0.c main.c mkpar.c output.c \
XX	reader.c skeleton.c symtab.c verbose.c warshall.c
XX
XX.include <bsd.prog.mk>
XEND-of-src/commands/byacc/Makefile
Xecho x - src/commands/cawf/Makefile
Xsed 's/^X//' >src/commands/cawf/Makefile << 'END-of-src/commands/cawf/Makefile'
XX# 	Makefile for cawf
XX
XX.PATH:	${.CURDIR}/../../../man/man1
XX
XXCFLAGS+= -DUNIX -DUSG -DSTDLIB -DCAWFLIB=\"${DATADIR}\"
XX
XXPROGS=		bsfilt cawf
XXSRCS_cawf=	cawf.c device.c error.c expand.c expr.c \
XX		macsup.c nreq.c output.c pass2.c pass3.c \
XX		regerror.c regexp.c store.c string.c
XX
XXLINKS=		${BINDIR}/bsfilt ${BINDIR}/colcrt \
XX		${BINDIR}/cawf ${BINDIR}/nroff
XXMLINKS=		bsfilt.1 colcrt.1	cawf.1 nroff.1
XX
XXDATADIR=	${SHAREDIR}/cawf
XXDATAFILES=	common device.cf dumb.dev man.mac me.mac ms.mac mnx.mac
XX
XXafterinstall:
XX	@[ -d ${DATADIR} ] || ${MKDIR} ${DATADIR}
XX	@${INSTALL} ${COPY} -o ${LIBOWN} -g ${LIBGRP} -m ${LIBMODE} \
XX		${DATAFILES} ${DATADIR}
XX
XX.include "../bsd.simple.mk"
XEND-of-src/commands/cawf/Makefile
Xecho x - src/commands/elle/Makefile
Xsed 's/^X//' >src/commands/elle/Makefile << 'END-of-src/commands/elle/Makefile'
XX# Makefile for elle
XX
XX.PATH:	${.CURDIR}/../../../man/man9
XX
XXCFLAGS+= -DNEED_STRDUP -DNEED_BCOPY -DNEED_VALLOC \
XX	-DEVHELPFILE=\"${DATADIR}/elle.dat\"
XX
XXPROGS=		ellec elle
XXMAN_ellec=
XXMAN_elle=	elle.9
XXSRCS_elle=	eemain.c eecmds.c eesite.c eevini.c eedisp.c \
XX		eeterm.c eeerr.c eeques.c eebuff.c eefile.c \
XX		eefed.c eeedit.c eebit.c eef1.c eef2.c \
XX		eefd.c eehelp.c eekmac.c eef3.c eesrch.c \
XX		eequer.c eefill.c eediag.c sbstr.c sbm.c \
XX		sberr.c sbbcpy.c
XXCFLAGS_ellec=	${CFLAGS} -fwritable-strings
XXLDADD_elle=	-ltermcap
XX
XXMLINKS=		elle.9 ellec.9
XX
XXDATADIR=	${SHAREDIR}/misc
XX
XXeecmds.o: defprf.c eefdef.h
XX${OBJS}: elle.h
XXelle.h: eefidx.h
XX
XXdefprf.c: deffun.e ellec
XX	${CAT} deffun.e defprf.e | ./ellec -Pconf > defprf.c
XX
XXeefdef.h: deffun.e ellec
XX	${CAT} deffun.e defprf.e | ./ellec -Fconf > eefdef.h
XX
XXeefidx.h: deffun.e ellec
XX	${CAT} deffun.e defprf.e | ./ellec -FXconf > eefidx.h
XX
XX# Don't flush these files if interrupted, dammit!
XX.PRECIOUS: defprf.c eefdef.h eefidx.h
XX
XXellec.o: ellec.c
XX	${CC} ${CFLAGS_ellec} -c ${.IMPSRC}
XX
XX# afterinstall:
XX# 	@[ -d "${DATADIR}" ] || ${MKDIR} ${DATADIR}
XX# 	${INSTALL} ${COPY} -o ${LIBOWN} -g ${LIBGRP} -m ${LIBMODE} \
XX# 		help.dat ${DATADIR}/elle.dat
XX
XX.include "../bsd.simple.mk"
XEND-of-src/commands/elle/Makefile
Xecho x - src/commands/elvis/Makefile
Xsed 's/^X//' >src/commands/elvis/Makefile << 'END-of-src/commands/elvis/Makefile'
XX# Makefile for elvis
XX
XX.PATH:	${.CURDIR}/../../../man/man1 \
XX	${.CURDIR}/../../../man/man8 \
XX	${.CURDIR}/../../../man/man9
XX
XXCFLAGS=	-Dbsd -DCRUNCH \
XX	-DNO_MKEXRC -DNO_CURSORSHAPE -DNO_CHARATTR -DNO_SHOWMODE \
XX	-DNO_MODELINE -DNO_OPTCOLS -DNO_DIGRAPH -DNO_EXTENSIONS \
XX	-DNO_ERRLIST -DNO_FKEY -DNO_VISIBLE -DNO_COLOR -DNO_POPUP
XX
XXPROGS=		elvis ctags ref elvrec fmt elvprsv
XXMAN_elvis=	elvis.1 elvis.9
XXMAN_elvprsv=	elvprsv.8
XXSRCS_elvis=	blk.c cmd1.c cmd2.c ctype.c curses.c \
XX		cut.c ex.c input.c main.c misc.c \
XX		modify.c move1.c move2.c move3.c move4.c \
XX		move5.c opts.c recycle.c redraw.c regexp.c \
XX		regsub.c system.c tio.c tmp.c unix.c \
XX		vars.c vcmd.c vi.c
XXSRCS_elvprsv=	elvprsv.c ctype.c
XXLDADD_elvis=	-ltermcap
XX
XXLINKS=		${BINDIR}/elvis ${BINDIR}/ex \
XX		${BINDIR}/elvis ${BINDIR}/vi
XXMLINKS=		elvis.1 ex.1	elvis.1 vi.1
XX
XX.include "../bsd.simple.mk"
XEND-of-src/commands/elvis/Makefile
Xecho x - src/commands/flex-2.3.7/Makefile
Xsed 's/^X//' >src/commands/flex-2.3.7/Makefile << 'END-of-src/commands/flex-2.3.7/Makefile'
XX# make file for "flex" tool
XX
XX.PATH:	${.CURDIR}/../../../man/man1
XX
XXCFLAGS+= -DUSG -DDEFAULT_SKELETON_FILE=\"${DATADIR}/${DATAFILE}\"
XX
XXPROG=		flex
XXMAN=		flex.1 flexdoc.1
XXSRCS=           ccl.c dfa.c ecs.c gen.c main.c misc.c nfa.c parse.y \
XX		scan.c sym.c tblcmp.c yylex.c
XX
XXCLEANFILES+=	libmain.o libmain.a
XX
XXDATADIR=	${SHAREDIR}/misc
XXDATAFILE=	flex.skel
XX
XXLIBFILE=	libfl.a
XX
XX.c.a:
XX	${CC} ${CFLAGS} -c ${.IMPSRC}
XX	${AR} ${ARFLAGS} ${.TARGET} ${.PREFIX}.o
XX	${RM} -f ${.PREFIX}.o
XX
XX# fake target
XXparse.y: libmain.a
XX
XXafterinstall:
XX	@[ -d "${DATADIR}" ] || ${MKDIR} ${DATADIR}
XX	${INSTALL} ${COPY} -o ${SHAREOWN} -g ${SHAREGRP} -m ${SHAREMODE} \
XX		${DATAFILE} ${DATADIR}
XX	${INSTALL} ${COPY} -o ${LIBOWN} -g ${LIBGRP} -m ${LIBMODE} \
XX		libmain.a ${LIBDIR}/${LIBFILE}
XX
XX.include <bsd.prog.mk>
XEND-of-src/commands/flex-2.3.7/Makefile
Xecho x - src/commands/i386/Makefile
Xsed 's/^X//' >src/commands/i386/Makefile << 'END-of-src/commands/i386/Makefile'
XX# Makefile for commands/i386.
XX
XX.PATH:	${.CURDIR}/../../../man/man1
XX
XXCFLAGS+= -DARCH=\"${MACHINE_ARCH}\" \
XX	-DLIB=\"${LIBDIR}\" -DDESCR=\"${LIBDIR}/descr\"
XX
XXPROG=	acd
XXMAN=	acd.1 cc.1
XX
XXLINKS=	${BINDIR}/acd ${BINDIR}/cc \
XX	${BINDIR}/acd ${BINDIR}/m2 \
XX	${BINDIR}/acd ${BINDIR}/pc
XX
XXSUBDIR=	asmconv
XX
XX.include <bsd.prog.mk>
XEND-of-src/commands/i386/Makefile
Xecho x - src/commands/i386/Makefile.inc
Xsed 's/^X//' >src/commands/i386/Makefile.inc << 'END-of-src/commands/i386/Makefile.inc'
XX.include "../Makefile.inc"
XEND-of-src/commands/i386/Makefile.inc
Xecho x - src/commands/i386/asmconv/Makefile
Xsed 's/^X//' >src/commands/i386/asmconv/Makefile << 'END-of-src/commands/i386/asmconv/Makefile'
XX# Makefile for asmconv.
XX
XX.PATH:	${.CURDIR}/../../../../man/man1
XX
XXMINIX_BINDIR=	${MINIX_LIBDIR}
XX
XXPROG=	asmconv
XXMAN=
XX
XXSRCS=	asm86.c asmconv.c parse_ack.c parse_bas.c tokenize.c \
XX	emit_ack.c emit_gnu.c
XX
XX.include <bsd.prog.mk>
XEND-of-src/commands/i386/asmconv/Makefile
Xecho x - src/commands/ibm/Makefile
Xsed 's/^X//' >src/commands/ibm/Makefile << 'END-of-src/commands/ibm/Makefile'
XX# Makefile for commands/ibm.
XX
XX.PATH:	${.CURDIR}/../../../man/man1
XX
XXCFLAGS+=	-fwritable-strings
XX
XXPROGS=		dosread
XXMAN_dosread=	dosdir.1 dosread.1 doswrite.1
XX
XXLINKS=		${BINDIR}/dosread ${BINDIR}/dosdir \
XX		${BINDIR}/dosread ${BINDIR}/doswrite
XX
XXNOPROGS=        cdplay fdisk format loadfont loadkeys mixer part \
XX		partition playwave postmort readclock recwave \
XX		repartition screendump sdump
XX
XX.include "../bsd.simple.mk"
XEND-of-src/commands/ibm/Makefile
Xecho x - src/commands/ic/Makefile
Xsed 's/^X//' >src/commands/ic/Makefile << 'END-of-src/commands/ic/Makefile'
XX# Makefile for ic
XX
XX.PATH:	${.CURDIR}/../../../man/man1
XX
XXLDADD=	-lcompat -ltermcap
XX
XXPROG=	ic
XXSRCS=	ic.o ic_input.o ic_output.o
XX
XX.include <bsd.prog.mk>
XEND-of-src/commands/ic/Makefile
Xecho x - src/commands/indent/Makefile
Xsed 's/^X//' >src/commands/indent/Makefile << 'END-of-src/commands/indent/Makefile'
XX# Makefile for indent
XX
XX.PATH:	${.CURDIR}/../../../man/man9
XX
XXPROG=	indent
XXMAN=	indent.9
XX
XXSRCS=	args.c comment.c lexi.c indent.c parse.c io.c
XX
XX.include <bsd.prog.mk>
XEND-of-src/commands/indent/Makefile
Xecho x - src/commands/kermit/Makefile
Xsed 's/^X//' >src/commands/kermit/Makefile << 'END-of-src/commands/kermit/Makefile'
XX# Makefile for kermit
XX
XX.PATH:	${.CURDIR}/../../../man/man9
XX
XXCFLAGS+= -DBSD4
XX
XXPROG=	kermit
XXMAN=	kermit.9
XXSRCS=	ckcmai.c ckutio.c ckufio.c ckcfns.c ckcfn2.c \
XX	ckcpro.c ckucmd.c ckuus2.c ckuus3.c ckuusr.c \
XX	ckucon.c ckudia.c ckuscr.c
XX
XX# ckcpro.c: ckcpro.w wart
XX# 	./wart ckcpro.w ckcpro.c
XX
XX.include <bsd.prog.mk>
XEND-of-src/commands/kermit/Makefile
Xecho x - src/commands/m4/Makefile
Xsed 's/^X//' >src/commands/m4/Makefile << 'END-of-src/commands/m4/Makefile'
XX# Makefile for M4
XX
XX.PATH:	${.CURDIR}/../../../man/man9
XX
XXCFLAGS+= -DEXTENDED
XX
XXPROG=	m4
XXMAN=	m4.9
XXSRCS=	main.c eval.c serv.c look.c misc.c expr.c
XX
XX.include <bsd.prog.mk>
XEND-of-src/commands/m4/Makefile
Xecho x - src/commands/make/Makefile
Xsed 's/^X//' >src/commands/make/Makefile << 'END-of-src/commands/make/Makefile'
XX# Makefile for make (!)
XX
XX.PATH:	${.CURDIR}/../../../man/man1
XX
XXCFLAGS+= -Dunix
XX
XXPROG=	make
XXSRCS=	check.c input.c macro.c main.c make.c reader.c rules.c archive.c
XX
XX.include <bsd.prog.mk>
XEND-of-src/commands/make/Makefile
Xecho x - src/commands/mined/Makefile
Xsed 's/^X//' >src/commands/mined/Makefile << 'END-of-src/commands/mined/Makefile'
XX# Makefile for mined
XX
XX.PATH:	${.CURDIR}/../../../man/man9
XX
XXCFLAGS+= -I${.CURDIR}
XX
XXPROG=	mined
XXMAN=	mined.9
XXSRCS=	mined1.c mined2.c
XX
XX.include <bsd.prog.mk>
XEND-of-src/commands/mined/Makefile
Xecho x - src/commands/patch/Makefile
Xsed 's/^X//' >src/commands/patch/Makefile << 'END-of-src/commands/patch/Makefile'
XX# Makefile for patch
XX
XX.PATH:	${.CURDIR}/../../../man/man1
XX
XXCFLAGS+= -DVOIDSIG # -DSMALL
XX
XXPROG=	patch
XXSRCS=	patch.c pch.c inp.c util.c version.c
XX
XX.include <bsd.prog.mk>
XEND-of-src/commands/patch/Makefile
Xecho x - src/commands/scripts/Makefile
Xsed 's/^X//' >src/commands/scripts/Makefile << 'END-of-src/commands/scripts/Makefile'
XX# Makefile for cmd/scripts.
XX
XX.PATH:	${.CURDIR}/../../../man/man1 \
XX	${.CURDIR}/../../../man/man5 \
XX	${.CURDIR}/../../../man/man8
XX
XXSCRIPTS=	checkhier.sh makewhatis.sh spell.sh true.sh whatis.sh
XX
XXMAN=		checkhier.8 makewhatis.1 spell.1 true.1 whatis.1 whatis.5
XX
XXLINKS=		${BINDIR}/true ${BINDIR}/false \
XX		${BINDIR}/whatis ${BINDIR}/apropos
XX
XXNOSCRIPTS=      DESCRIBE.sh M.sh MAKEDEV.sh adduser.sh mkdist.sh \
XX		setup.sh srccrc.sh svclog.sh whereis.sh
XX
XX.include <bsd.prog.mk>
XEND-of-src/commands/scripts/Makefile
Xecho x - src/commands/sh/Makefile
Xsed 's/^X//' >src/commands/sh/Makefile << 'END-of-src/commands/sh/Makefile'
XX# Makefile for sh
XX
XX.PATH:	${.CURDIR}/../../../man/man1
XX
XXPROG=	sh
XXSRCS=	sh1.o sh2.o sh3.o sh4.o sh5.o sh6.o
XX
XX.include <bsd.prog.mk>
XEND-of-src/commands/sh/Makefile
Xecho x - src/commands/simple/Makefile
Xsed 's/^X//' >src/commands/simple/Makefile << 'END-of-src/commands/simple/Makefile'
XX# Makefile for commands/simple.
XX
XX.PATH:	${.CURDIR}/../../../man/man1 \
XX	${.CURDIR}/../../../man/man5 \
XX	${.CURDIR}/../../../man/man7 \
XX	${.CURDIR}/../../../man/man8 \
XX	${.CURDIR}/../../../man/man9
XX
XXCFLAGS+= -fwritable-strings -DBSD4_2
XX
XXPROGS=  ascii at atrun backup banner basename btoa cal calendar cat \
XX	cdiff cgrep chmod chown ci cksum clr cmp co comm compress \
XX	cp crc cron cut date dd decomp16 dhrystone diff dirname du \
XX	dw echo ed expand expr factor fgrep file find fold fortune \
XX	gather gomoku grep head id ifdef inodes isoread join kill \
XX	last leave life login look lp lpd ls mail man men mesg mkdir \
XX	mkfifo mknod mkproto mref mt od passwd paste pathchk pr \
XX	prep pretty printenv proto pwd pwdauth readall remsync rev \
XX	rmdir roff sed shar sleep sort split strings stty su sum \
XX	swapfs sync synctree tail tar tee term termcap test tget \
XX	time touch tr traverse treecmp tsort ttt tty uname unexpand \
XX	uniq unshar update uud uue wc whatsnew which who \
XX	whoami width write xargs yes
XX
XX# the install program is handled specifically to avoid the conflict w/
XX# the install target.
XXPROGS+=		xinstall
XXSRCS_xinstall=	install.c
XXPROGNAME_xinstall= install
XXMAN_xinstall=	install.1
XX
XXMAN_atrun=
XXMAN_backup=	backup.8
XXMAN_chown=	chown.8 chgrp.1
XXMAN_ci=		svc.1
XXMAN_co=
XXMAN_cp=		cp.1 ln.1 mv.1 rm.1
XXMAN_cron=	cron.8
XXMAN_decomp16=
XXMAN_dirname=
XXMAN_dw=
XXMAN_gomoku=
XXMAN_inodes=	inodes.8
XXMAN_isoread=	isoread.1 isodir.1 isoinfo.1
XXMAN_life=
XXMAN_lpd=
XXMAN_men=
XXMAN_mknod=	mknod.8
XXMAN_proto=
XXMAN_pwdauth=	pwdauth.8
XXMAN_roff=	roff.9
XXMAN_swapfs=
XXMAN_sync=	sync.8
XXMAN_update=	update.8
XXMAN_xargs=
XX
XXLDADD_calendar=	-lcompat
XXLDADD_cgrep=	-lcompat
XXLDADD_clr=	-ltermcap
XXLDADD_gomoku=	-lcurses
XXLDADD_grep=	-lcompat
XXLDADD_leave=	-lcompat
XXLDADD_life=	-lcurses
XXLDADD_login=	-lcrypt
XXLDADD_lpd=	-ltermcap
XXLDADD_passwd=	-lcrypt
XXLDADD_su=	-lcrypt
XXLDADD_termcap=	-ltermcap
XXLDADD_tget=	-ltermcap
XX
XXMAN5_EXTRA=	TZ.5 passwd.5 utmp.5
XXMAN7_EXTRA=	ascii.7 environ.7 hier.7 man.7
XX
XXLINKS=	${BINDIR}/backup ${BINDIR}/restore \
XX	${BINDIR}/chown ${BINDIR}/chgrp \
XX	${BINDIR}/compress ${BINDIR}/uncompress \
XX	${BINDIR}/compress ${BINDIR}/zcat \
XX	${BINDIR}/cp ${BINDIR}/clone \
XX	${BINDIR}/cp ${BINDIR}/cpdir \
XX	${BINDIR}/cp ${BINDIR}/ln \
XX	${BINDIR}/cp ${BINDIR}/mv \
XX	${BINDIR}/cp ${BINDIR}/rm \
XX	${BINDIR}/isoread ${BINDIR}/isodir \
XX	${BINDIR}/isoread ${BINDIR}/isoinfo \
XX	${BINDIR}/passwd ${BINDIR}/chfn \
XX	${BINDIR}/passwd ${BINDIR}/chsh \
XX	${BINDIR}/test ${BINDIR}/[ \
XX	${BINDIR}/uname ${BINDIR}/arch \
XX	${BINDIR}/uud ${BINDIR}/uudecode \
XX	${BINDIR}/uue ${BINDIR}/uuencode
XX
XXMLINKS=	at.1 atrun.1		basename.1 dirname.1 \
XX	compress.1 uncompress.1	compress.1 zcat.1 \
XX	cp.1 cpdir.1		ln.1 clone.1 \
XX	svc.1 ci.1		svc.1 co.1 \
XX	uud.1 uudecode.1	uue.1 uuencode.1 \
XX	uname.1 arch.1
XX
XXNOPROGS=add_route badblocks chmem df diskcheck diskusage eject \
XX	finger fsck fsck1 getty host hostaddr ifconfig in.fingerd \
XX	in.rld in.rshd irdpd mkfs modem mount ncheck nm nonamed \
XX	ping pr_routes printroot rarpd rcp readfs recover rlogin \
XX	rsh size strip tcpd umount vol
XX
XX.include "../bsd.simple.mk"
XEND-of-src/commands/simple/Makefile
Xecho x - src/commands/yap/Makefile
Xsed 's/^X//' >src/commands/yap/Makefile << 'END-of-src/commands/yap/Makefile'
XX# $Header: Makefile,v 7.2 88/09/20 16:46:02 ceriel Exp $
XX
XX.PATH:	${.CURDIR}/../../../man/man1
XX
XXLDADD=	-ltermcap
XX
XXPROG=	yap
XXSRCS=   assert.c commands.c display.c getcomm.c getline.c help.c \
XX	keys.c machine.c main.c options.c output.c pattern.c process.c \
XX	prompt.c term.c
XXLINKS=	${BINDIR}/yap ${BINDIR}/more
XX
XX.include <bsd.prog.mk>
XEND-of-src/commands/yap/Makefile
Xecho x - src/commands/zmodem/Makefile
Xsed 's/^X//' >src/commands/zmodem/Makefile << 'END-of-src/commands/zmodem/Makefile'
XX# Makefile for zmodem
XX
XX.PATH:	${.CURDIR}/../../../man/man1
XX
XXCFLAGS+= -DPOSIX
XX
XXPROGS=		rz sz
XX
XX.include "../bsd.simple.mk"
XEND-of-src/commands/zmodem/Makefile
Xecho x - src/lib/Makefile
Xsed 's/^X//' >src/lib/Makefile << 'END-of-src/lib/Makefile'
XX# Makefile for the libraries
XX
XXSUBDIR=	editline liby
XX
XX# ansi curses end float fphook ip math other posix stdio syscall
XX# syslib ${MACHINE_ARCH}
XX
XX.include <bsd.subdir.mk>
XEND-of-src/lib/Makefile
Xecho x - src/lib/Makefile.inc
Xsed 's/^X//' >src/lib/Makefile.inc << 'END-of-src/lib/Makefile.inc'
XX.include "../Makefile.inc"
XEND-of-src/lib/Makefile.inc
Xecho x - src/lib/editline/Makefile
Xsed 's/^X//' >src/lib/editline/Makefile << 'END-of-src/lib/editline/Makefile'
XX##  Unix makefile for editline library.
XX
XX.PATH: ${.CURDIR}/../../../man/man3
XX
XXCFLAGS+= -DANSI_ARROWS -DHAVE_STDLIB -DHAVE_TCGETATTR -DHIDE -DUSE_DIRENT \
XX	 -DHIST_SIZE=100 -DUNIQUE_HISTORY -DUSE_TERMCAP -DSYS_UNIX
XX
XXLIB=	edit
XXMAN=	editline.3
XXSRCS=	editline.c complete.c sysunix.c
XX
XXMLINKS=	editline.3 readline.3	editline.3 add_history.3
XX
XX.include <bsd.lib.mk>
XEND-of-src/lib/editline/Makefile
Xecho x - src/lib/liby/Makefile
Xsed 's/^X//' >src/lib/liby/Makefile << 'END-of-src/lib/liby/Makefile'
XX# Makefile for lib/liby.
XX
XXLIB=	y
XXSRCS=	yyerror.c
XX
XX.include <bsd.lib.mk>
XEND-of-src/lib/liby/Makefile
Xexit
X
END-of-minix/files/Makefiles.shar
echo x - minix/files/make-patch.sh
sed 's/^X//' >minix/files/make-patch.sh << 'END-of-minix/files/make-patch.sh'
Xold=work.old
Xnew=work.new
X
X[ -d $old ] || exit
X[ -d $new ] || exit
X
Xcat << EOF |
Xaal
Xsrc/commands/aal/archiver.c
Xsrc/commands/aal/out.h
Xsrc/commands/aal/rd.c
Xadvent
Xsrc/commands/advent/advent.c
Xash
Xsrc/commands/ash/bltin/mkexpr
Xsrc/commands/ash/cd.c
Xsrc/commands/ash/expand.c
Xsrc/commands/ash/jobs.c
Xsrc/commands/ash/main.c
Xsrc/commands/ash/shell.h
Xsrc/commands/ash/var.c
Xawk
Xsrc/commands/awk/e.c
Xsrc/commands/awk/l.c
Xsrc/commands/awk/r.c
Xsrc/commands/awk/v.c
Xsrc/commands/awk/y.c
Xbc
Xsrc/commands/bc/config.h
Xsrc/commands/bc/const.h
Xsrc/commands/bc/scan.l
Xcawf
Xsrc/commands/cawf/mnx.mac
Xelle
Xsrc/commands/elle/eebuff.c
Xsrc/commands/elle/eeedit.c
Xsrc/commands/elle/eeerr.c
Xsrc/commands/elle/eefd.c
Xsrc/commands/elle/eefile.c
Xsrc/commands/elle/eemain.c
Xsrc/commands/elle/eeproto.h
Xsrc/commands/elle/eesite.c
Xsrc/commands/elle/eesite.h
Xsrc/commands/elle/eesrch.c
Xsrc/commands/elle/eeterm.c
Xsrc/commands/elle/ellec.c
Xsrc/commands/elle/sb.h
Xsrc/commands/elle/sbbcpy.c
Xsrc/commands/elle/sberr.c
Xsrc/commands/elle/sbm.c
Xsrc/commands/elle/sbproto.h
Xsrc/commands/elle/sbstr.c
Xsrc/commands/elle/sbvall.c
Xelvis
Xsrc/commands/elvis/cmd1.c
Xsrc/commands/elvis/config.h
Xsrc/commands/elvis/curses.c
Xsrc/commands/elvis/main.c
Xibm
Xsrc/commands/ibm/dosread.c
Xic
Xsrc/commands/ic/ic.c
Xsrc/commands/ic/ic.h
Xsrc/commands/ic/ic_output.c
Xindent
Xsrc/commands/indent/indent.c
Xsrc/commands/indent/proto.h
Xkermit
Xsrc/commands/kermit/ckcdeb.h
Xsrc/commands/kermit/ckucon.c
Xsrc/commands/kermit/ckudia.c
Xsrc/commands/kermit/ckufio.c
Xsrc/commands/kermit/ckuscr.c
Xsrc/commands/kermit/ckutio.c
Xsrc/commands/kermit/ckuus2.c
Xsrc/commands/kermit/ckuusr.c
Xm4
Xsrc/commands/m4/mdef.h
Xmake
Xsrc/commands/make/h.h
Xsrc/commands/make/main.c
Xsrc/commands/make/make.c
Xmined
Xsrc/commands/mined/mined.h
Xsrc/commands/mined/mined1.c
Xpatch
Xsrc/commands/patch/common.h
Xsrc/commands/patch/pch.c
Xscripts
Xsrc/commands/scripts/checkhier.sh
Xsrc/commands/scripts/makewhatis.sh
Xsrc/commands/scripts/whatis.sh
Xsh
Xsrc/commands/sh/sh.h
Xsrc/commands/sh/sh1.c
Xsrc/commands/sh/sh3.c
Xsrc/commands/sh/sh4.c
Xsimple
Xsrc/commands/simple/ascii.c
Xsrc/commands/simple/at.c
Xsrc/commands/simple/atrun.c
Xsrc/commands/simple/backup.c
Xsrc/commands/simple/banner.c
Xsrc/commands/simple/basename.c
Xsrc/commands/simple/btoa.c
Xsrc/commands/simple/cal.c
Xsrc/commands/simple/calendar.c
Xsrc/commands/simple/cat.c
Xsrc/commands/simple/cd.c
Xsrc/commands/simple/cdiff.c
Xsrc/commands/simple/cgrep.c
Xsrc/commands/simple/chmod.c
Xsrc/commands/simple/chown.c
Xsrc/commands/simple/ci.c
Xsrc/commands/simple/cksum.c
Xsrc/commands/simple/clr.c
Xsrc/commands/simple/cmp.c
Xsrc/commands/simple/co.c
Xsrc/commands/simple/comm.c
Xsrc/commands/simple/compress.c
Xsrc/commands/simple/cp.c
Xsrc/commands/simple/cron.c
Xsrc/commands/simple/cut.c
Xsrc/commands/simple/date.c
Xsrc/commands/simple/dd.c
Xsrc/commands/simple/decomp16.c
Xsrc/commands/simple/dhrystone.c
Xsrc/commands/simple/diff.c
X
Xsrc/commands/simple/du.c
Xsrc/commands/simple/dw.c
Xsrc/commands/simple/echo.c
Xsrc/commands/simple/ed.c
Xsrc/commands/simple/expand.c
Xsrc/commands/simple/expr.c
Xsrc/commands/simple/factor.c
Xsrc/commands/simple/fgrep.c
Xsrc/commands/simple/file.c
Xsrc/commands/simple/find.c
Xsrc/commands/simple/fold.c
Xsrc/commands/simple/fortune.c
Xsrc/commands/simple/gather.c
Xsrc/commands/simple/gomoku.c
Xsrc/commands/simple/grep.c
Xsrc/commands/simple/head.c
Xsrc/commands/simple/id.c
Xsrc/commands/simple/ifdef.c
Xsrc/commands/simple/inodes.c
Xsrc/commands/simple/install.c
Xsrc/commands/simple/isoread.c
Xsrc/commands/simple/join.c
Xsrc/commands/simple/kill.c
Xsrc/commands/simple/last.c
Xsrc/commands/simple/leave.c
Xsrc/commands/simple/life.c
Xsrc/commands/simple/login.c
Xsrc/commands/simple/look.c
Xsrc/commands/simple/lp.c
Xsrc/commands/simple/lpd.c
Xsrc/commands/simple/ls.c
Xsrc/commands/simple/mail.c
Xsrc/commands/simple/man.c
Xsrc/commands/simple/men.c
Xsrc/commands/simple/mesg.c
Xsrc/commands/simple/mkdir.c
Xsrc/commands/simple/mkfifo.c
Xsrc/commands/simple/mknod.c
Xsrc/commands/simple/mkproto.c
Xsrc/commands/simple/mref.c
Xsrc/commands/simple/mt.c
Xsrc/commands/simple/od.c
Xsrc/commands/simple/passwd.c
Xsrc/commands/simple/paste.c
Xsrc/commands/simple/pathchk.c
Xsrc/commands/simple/pr.c
Xsrc/commands/simple/prep.c
Xsrc/commands/simple/pretty.c
Xsrc/commands/simple/printenv.c
Xsrc/commands/simple/proto.c
Xsrc/commands/simple/pwd.c
Xsrc/commands/simple/pwdauth.c
Xsrc/commands/simple/readall.c
X
Xsrc/commands/simple/rev.c
Xsrc/commands/simple/rmdir.c
Xsrc/commands/simple/roff.c
Xsrc/commands/simple/sed.c
Xsrc/commands/simple/shar.c
Xsrc/commands/simple/sleep.c
Xsrc/commands/simple/sort.c
Xsrc/commands/simple/split.c
Xsrc/commands/simple/strings.c
Xsrc/commands/simple/stty.c
Xsrc/commands/simple/su.c
Xsrc/commands/simple/sum.c
X
Xsrc/commands/simple/sync.c
Xsrc/commands/simple/synctree.c
Xsrc/commands/simple/tail.c
Xsrc/commands/simple/tar.c
Xsrc/commands/simple/tee.c
Xsrc/commands/simple/term.c
Xsrc/commands/simple/termcap.c
Xsrc/commands/simple/test.c
Xsrc/commands/simple/tget.c
Xsrc/commands/simple/time.c
Xsrc/commands/simple/touch.c
Xsrc/commands/simple/tr.c
Xsrc/commands/simple/traverse.c
Xsrc/commands/simple/treecmp.c
Xsrc/commands/simple/tsort.c
Xsrc/commands/simple/ttt.c
Xsrc/commands/simple/tty.c
Xsrc/commands/simple/uname.c
Xsrc/commands/simple/unexpand.c
Xsrc/commands/simple/uniq.c
Xsrc/commands/simple/unshar.c
Xsrc/commands/simple/update.c
Xsrc/commands/simple/uud.c
Xsrc/commands/simple/uue.c
Xsrc/commands/simple/wc.c
Xsrc/commands/simple/whatsnew.c
Xsrc/commands/simple/which.c
Xsrc/commands/simple/who.c
Xsrc/commands/simple/whoami.c
Xsrc/commands/simple/width.c
Xsrc/commands/simple/write.c
Xsrc/commands/simple/xargs.c
X
Xyap
Xsrc/commands/yap/getcomm.c
Xsrc/commands/yap/getline.c
Xsrc/commands/yap/main.c
Xsrc/commands/yap/main.h
Xsrc/commands/yap/pattern.c
Xzmodem
Xsrc/commands/zmodem/rz.c
Xsrc/commands/zmodem/sz.c
Xsrc/commands/zmodem/zmodem.h
XEOF
Xwhile read i; do
Xcase $i in
X"")	;;
X*/*)	diff -ru $old/$i $new/$i
X	;;
X*)	exec > files/patch-$i
X	;;
Xesac
Xdone
Xexec > /dev/null
X
Xcd $new || exit
X
Xshar $(
Xcat << EOF
Xsrc/Makefile
Xsrc/Makefile.inc
Xsrc/commands/Makefile
Xsrc/commands/Makefile.inc
Xsrc/commands/aal/Makefile
Xsrc/commands/advent/Makefile
Xsrc/commands/ash/Makefile
Xsrc/commands/autil/Makefile
Xsrc/commands/awk/Makefile
Xsrc/commands/bc/Makefile
Xsrc/commands/bsd.simple.mk
Xsrc/commands/byacc/Makefile
Xsrc/commands/cawf/Makefile
Xsrc/commands/elle/Makefile
Xsrc/commands/elvis/Makefile
Xsrc/commands/flex-2.3.7/Makefile
Xsrc/commands/i386/Makefile
Xsrc/commands/i386/Makefile.inc
Xsrc/commands/i386/asmconv/Makefile
Xsrc/commands/ibm/Makefile
Xsrc/commands/ic/Makefile
Xsrc/commands/indent/Makefile
Xsrc/commands/kermit/Makefile
Xsrc/commands/m4/Makefile
Xsrc/commands/make/Makefile
Xsrc/commands/mined/Makefile
Xsrc/commands/patch/Makefile
Xsrc/commands/scripts/Makefile
Xsrc/commands/sh/Makefile
Xsrc/commands/simple/Makefile
Xsrc/commands/yap/Makefile
Xsrc/commands/zmodem/Makefile
Xsrc/lib/Makefile
Xsrc/lib/Makefile.inc
Xsrc/lib/editline/Makefile
Xsrc/lib/liby/Makefile
XEOF
X) > ../files/Makefiles.shar
END-of-minix/files/make-patch.sh
echo x - minix/files/minix.sh
sed 's/^X//' >minix/files/minix.sh << 'END-of-minix/files/minix.sh'
X#!/bin/sh
X# $FreeBSD$
X
Xif [ -f %%MINIX_PREFIX%%/etc/profile ]; then
X	. %%MINIX_PREFIX%%/etc/profile
Xelse
X%%PROFILE%%
Xfi
X
Xeval "$@"
END-of-minix/files/minix.sh
echo x - minix/files/patch-aal
sed 's/^X//' >minix/files/patch-aal << 'END-of-minix/files/patch-aal'
X--- work.old/src/commands/aal/archiver.c	Tue Oct  1 14:00:00 1996
X+++ work.new/src/commands/aal/archiver.c	Fri Nov  2 07:03:03 2001
X@@ -46,13 +46,22 @@
X unsigned int	tnum = 0;
X char	*tstrtab;
X unsigned int	tssiz = 0;
X+#ifdef __FreeBSD__
X+#include <stdlib.h>
X+#include <time.h>
X+#else
X char	*malloc(), *realloc(), *strcpy(), *strncpy();
X long	time();
X+#endif
X unsigned int tabsz, strtabsz;
X #else
X #define MAGIC_NUMBER	ARMAG
X #endif
X+#ifdef __FreeBSD__
X+#include <unistd.h>
X+#else
X long	lseek();
X+#endif
X 
X #define odd(nr)		(nr & 01)
X #define even(nr)	(odd(nr) ? nr + 1 : nr)
X--- work.old/src/commands/aal/out.h	Tue Oct  1 14:00:00 1996
X+++ work.new/src/commands/aal/out.h	Thu Nov  1 16:33:58 2001
X@@ -9,9 +9,6 @@
X /*
X  * output format for ACK assemblers
X  */
X-#ifndef ushort
X-#define ushort	unsigned short
X-#endif /* ushort */
X 
X struct outhead {
X 	ushort 	oh_magic;	/* magic number */
X--- work.old/src/commands/aal/rd.c	Tue Oct  1 14:00:00 1996
X+++ work.new/src/commands/aal/rd.c	Fri Nov  2 07:03:31 2001
X@@ -3,10 +3,17 @@
X  * (c) copyright 1987 by the Vrije Universiteit, Amsterdam, The Netherlands.
X  * See the copyright notice in the ACK home directory, in the file "Copyright".
X  */
X+#ifdef __FreeBSD__
X+#include <sys/types.h>
X+#endif
X #include <out.h>
X #include "object.h"
X 
X+#ifdef __FreeBSD__
X+#include <unistd.h>
X+#else
X extern long		lseek();
X+#endif
X 
X /*
X  * Parts of the output file.
END-of-minix/files/patch-aal
echo x - minix/files/patch-advent
sed 's/^X//' >minix/files/patch-advent << 'END-of-minix/files/patch-advent'
X--- work.old/src/commands/advent/advent.c	Tue Oct  1 14:00:00 1996
X+++ work.new/src/commands/advent/advent.c	Thu Nov  1 17:22:01 2001
X@@ -63,7 +63,7 @@
X     static FILE **fp[] = {0, &fd1, &fd2, &fd3, &fd4};
X     int i;
X     for (i = 1; i <= 4; i++) {
X-	sprintf(filename, "%sadvent%d.dat", textdir, i);
X+	sprintf(filename, "%s/advent%d.dat", textdir, i);
X 	*fp[i] = fopen(filename, "r");
X 	if (!*fp[i])
X 	    file_error(filename);
END-of-minix/files/patch-advent
echo x - minix/files/patch-ash
sed 's/^X//' >minix/files/patch-ash << 'END-of-minix/files/patch-ash'
X--- work.old/src/commands/ash/bltin/mkexpr	Tue Oct  1 14:00:00 1996
X+++ work.new/src/commands/ash/bltin/mkexpr	Fri Nov  2 03:39:38 2001
X@@ -7,14 +7,14 @@
X 
X exec > operators.h
X i=0
X-sed -e '/^[^#]/!d' unary_op binary_op | while read line
X+sed -e '/^[^#]/!d' bltin/unary_op bltin/binary_op | while read line
X do
X 	set -$- $line
X 	echo "#define $1 $i"
X 	i=`expr $i + 1`
X done
X echo
X-echo "#define FIRST_BINARY_OP" `sed -e '/^[^#]/!d' unary_op | wc -l`
X+echo "#define FIRST_BINARY_OP" `sed -e '/^[^#]/!d' bltin/unary_op | wc -l`
X echo '
X #define OP_INT 1		/* arguments to operator are integer */
X #define OP_STRING 2		/* arguments to operator are string */
X@@ -30,14 +30,14 @@
X  * Operators used in the expr/test command.
X  */
X 
X-#include "../shell.h"
X+#include "shell.h"
X #include "operators.h"
X 
X char *const unary_op[] = {'
X sed -e '/^[^#]/!d
X 	s/[ 	][ 	]*/ /g
X 	s/^[^ ][^ ]* \([^ ][^ ]*\).*/      "\1",/
X-	' unary_op
X+	' bltin/unary_op
X echo '      NULL
X };
X 
X@@ -45,7 +45,7 @@
X sed -e '/^[^#]/!d
X 	s/[ 	][ 	]*/ /g
X 	s/^[^ ][^ ]* \([^ ][^ ]*\).*/      "\1",/
X-	' binary_op
X+	' bltin/binary_op
X echo '      NULL
X };
X 
X@@ -53,7 +53,7 @@
X sed -e '/^[^#]/!d
X 	s/[ 	][ 	]*/ /g
X 	s/^[^ ][^ ]* [^ ][^ ]* \([^ ][^ ]*\).*/      \1,/
X-	' unary_op binary_op
X+	' bltin/unary_op bltin/binary_op
X echo '};
X 
X const char op_argflag[] = {'
X@@ -61,5 +61,5 @@
X 	s/[ 	][ 	]*/ /g
X 	s/^[^ ][^ ]* [^ ][^ ]* [^ ][^ ]*$/& 0/
X 	s/^[^ ][^ ]* [^ ][^ ]* [^ ][^ ]* \([^ ][^ ]*\)/      \1,/
X-	' unary_op binary_op
X+	' bltin/unary_op bltin/binary_op
X echo '};'
X--- work.old/src/commands/ash/cd.c	Tue Oct  1 14:00:00 1996
X+++ work.new/src/commands/ash/cd.c	Fri Nov  2 03:46:44 2001
X@@ -348,8 +348,8 @@
X 			copyfd(pip[1], 1);
X 			close(pip[1]);
X 		}
X-		execl("/bin/pwd", "pwd", (char *)0);
X-		error("Cannot exec /bin/pwd");
X+		execl("%%MINIX_PREFIX%%/bin/pwd", "pwd", (char *)0);
X+		error("Cannot exec %%MINIX_PREFIX%%/bin/pwd");
X 	}
X 	close(pip[1]);
X 	pip[1] = -1;
X--- work.old/src/commands/ash/expand.c	Tue Oct  1 14:00:00 1996
X+++ work.new/src/commands/ash/expand.c	Fri Nov  2 03:47:11 2001
X@@ -749,7 +749,7 @@
X 	}
X #endif
X #if !USEGETPW	/* can do without the bloat */
X-	setinputfile("/etc/passwd", 1);
X+	setinputfile("%%MINIX_PREFIX%%/etc/passwd", 1);
X 	q = line + strlen(name);
X 	while (pfgets(line, MAXPWLINE) != NULL) {
X 		if (line[0] == name[0] && prefix(name, line) && *q == ':') {
X--- work.old/src/commands/ash/jobs.c	Tue Oct  1 14:00:00 1996
X+++ work.new/src/commands/ash/jobs.c	Sat Nov  3 03:09:28 2001
X@@ -40,6 +40,7 @@
X 
X #include "shell.h"
X #if JOBS
X+#undef TILDE
X #include "sgtty.h"
X #undef CEOF			/* syntax.h redefines this */
X #endif
X@@ -818,7 +819,7 @@
X #endif
X 	if (block == 0)
X 		flags |= WNOHANG;
X-	return wait3((union wait *)status, flags, (struct rusage *)NULL);
X+	return wait3(status, flags, (struct rusage *)NULL);
X #else
X #ifdef SYSV
X 	int (*save)();
X--- work.old/src/commands/ash/main.c	Tue Oct  1 14:00:00 1996
X+++ work.new/src/commands/ash/main.c	Fri Nov  2 03:48:00 2001
X@@ -152,7 +152,7 @@
X 	procargs(argc, argv);
X 	if (argv[0] && argv[0][0] == '-') {
X 		state = 1;
X-		read_profile("/etc/profile");
X+		read_profile("%%MINIX_PREFIX%%/etc/profile");
X state1:
X 		state = 2;
X 		if ((home = getenv("HOME")) != NULL
X--- work.old/src/commands/ash/shell.h	Tue Oct  1 14:00:00 1996
X+++ work.new/src/commands/ash/shell.h	Fri Nov  2 22:37:06 2001
X@@ -57,16 +57,16 @@
X  */
X 
X 
X-#define JOBS	  0
X-#define SYMLINKS  0
X+#define JOBS	  1
X+#define SYMLINKS  1
X #define DIRENT	  1
X-#define UDIR	  0
X+#define UDIR	  1
X #define TILDE	  1
X-#define USEGETPW  0
X+#define USEGETPW  1
X #define ATTY	  0
X #define READLINE  1
X-/* #define BSD */
X-#define POSIX	  1
X+#define BSD       1
X+#define POSIX	  0
X #define DEBUG	  0
X 
X #ifdef __STDC__
X--- work.old/src/commands/ash/var.c	Tue Oct  1 14:00:00 1996
X+++ work.new/src/commands/ash/var.c	Fri Nov  2 03:58:16 2001
X@@ -89,7 +89,7 @@
X 	{&vifs,	VSTRFIXED|VTEXTFIXED,		"IFS= \t\n"},
X 	{&vmail,	VSTRFIXED|VTEXTFIXED|VUNSET,	"MAIL="},
X 	{&vmpath,	VSTRFIXED|VTEXTFIXED|VUNSET,	"MAILPATH="},
X-	{&vpath,	VSTRFIXED|VTEXTFIXED,		"PATH=:/bin:/usr/bin"},
X+	{&vpath,	VSTRFIXED|VTEXTFIXED,		"PATH=:%%MINIX_PREFIX%%/bin:/bin:/usr/bin"},
X 	/* 
X 	 * vps1 depends on uid
X 	 */
END-of-minix/files/patch-ash
echo x - minix/files/patch-awk
sed 's/^X//' >minix/files/patch-awk << 'END-of-minix/files/patch-awk'
X--- work.old/src/commands/awk/e.c	Tue Oct  1 14:00:00 1996
X+++ work.new/src/commands/awk/e.c	Sat Nov  3 03:17:11 2001
X@@ -29,14 +29,16 @@
X char *strsave(), *getsval(), *strcat(), *strstr();
X CELL *mkcell(), *mktmp();
X CELL *Field(), *Split(), *Forin();
X-CELL *Arith(), *Assign(), *Stat(), *Mathfun(), *Strfun(), *Cond();
X-CELL *Print(), *Cat(), *Array(), *Element();
X-CELL *If(), *While(), *For(), *Do(), *Jump();
X+static CELL *Arith(), *Assign(), *Mathfun(), *Strfun(), *Cond();
X+static CELL *Print(), *Cat();
X+CELL *Array(), *Element();
X+static CELL *If(), *While(), *For(), *Do(), *Jump();
X CELL *P1stat(), *P2stat(), *Print0();
X-CELL *Arg(), *Call(), *Ret();
X-CELL *Subst(), *In(), *Getline(), *Delete(), *Close();
X+static CELL *Arg(), *Call(), *Subst();
X+CELL *Ret(), *In(), *Getline(), *Delete(), *Close();
X CELL *Nulproc(), *Usrfun();
X CELL *_Arg();
X+static int Return();
X 
X FILE *getfp();	/* r.c */
X 
X@@ -398,7 +400,8 @@
X   char *s, *t, str[BUFSIZ];
X   int i, m, n;
X   double x;
X-  regexp *pat, *getpat();
X+  regexp *pat;
X+  static regexp *getpat();
X 
X   n = (int) p->n_arg[1];
X   if (n > 0 && (int) p->n_arg[0] != SPLIT) {
X--- work.old/src/commands/awk/l.c	Tue Oct  1 14:00:00 1996
X+++ work.new/src/commands/awk/l.c	Sat Nov  3 03:20:08 2001
X@@ -32,6 +32,10 @@
X char funnam[128];	/* function name for error message */
X int lineno = 1;
X 
X+static int follow(), follow2();
X+static int iskeywd(), isbuiltin();
X+static int scannum(), scanstr(), scanreg();
X+
X lex()
X {
X   int c, d;
X--- work.old/src/commands/awk/r.c	Tue Oct  1 14:00:00 1996
X+++ work.new/src/commands/awk/r.c	Sat Nov  3 03:22:53 2001
X@@ -37,6 +37,7 @@
X double getfval(), atof();
X CELL *mkcell(), *mktmp(), *execute(), *patexec();
X FILE *efopen();
X+static int get1rec(), r_mkfld(), close1();
X 
X extern CELL truecell, falsecell;
X 
X@@ -457,7 +458,7 @@
X {
X   register int i;
X   register char *name, *mode;
X-  char *awktmp();
X+  static char *awktmp();
X   FILE *fp, *efopen(), *epopen();
X 
X   for (i = 0; i < MAXFILE; i++)
X@@ -537,7 +538,7 @@
X close1(i)
X {
X   int fd, result, savefd;
X-  char *awktmp();
X+  static char *awktmp();
X 
X   if (filetab[i].f_fp == NULL)
X 	return;
X--- work.old/src/commands/awk/v.c	Tue Oct  1 14:00:00 1996
X+++ work.new/src/commands/awk/v.c	Sat Nov  3 03:24:44 2001
X@@ -38,7 +38,9 @@
X SYMBOL *argtab[HASHSIZE];
X 
X char *strsave(), *emalloc(), *strchr();
X-CELL *lookup(), *install(), *_install(), *mkcell(), *mktmp(), *getvar();
X+CELL *lookup(), *mkcell(), *mktmp(), *getvar();
X+static CELL *install(), *_install();
X+static int arrayelm();
X 
X char **FS, **RS, **OFS, **ORS, **OFMT, **FILENAME;
X char **SUBSEP;
X@@ -90,7 +92,7 @@
X {
X   CELL *u;
X   register int i;
X-  register char str[4];
X+  char str[4];
X 
X   ARGC = &install("ARGC", VAR|NUM, (char *)NULL, (double)argc+1, hashtab)->c_fval;
X   u = install("ARGV", ARR, (char *)NULL, 0.0, hashtab);
X--- work.old/src/commands/awk/y.c	Tue Oct  1 14:00:00 1996
X+++ work.new/src/commands/awk/y.c	Sat Nov  3 03:29:17 2001
X@@ -34,13 +34,14 @@
X 
X char *emalloc(), *strsave();
X NODE *node0(), *node1(), *node2(), *node3(), *node4();
X-NODE *stat(), *pastat();
X-NODE *expr(), *expr1(), *expr2(), *expr3(), *expr4();
X-NODE *expr5(), *expr6(), *expr7(), *expr8(), *expr9(), *expr10();
X-NODE *doprint(), *dofuncn(), *doif(), *dowhile(), *dofor(), *body();
X-NODE *doassign(), *dodo(), *doarray(), *doreturn(), *doelement();
X+static NODE *stat(), *pastat();
X+static NODE *expr(), *expr1(), *expr2(), *expr3(), *expr4();
X+static NODE *expr5(), *expr6(), *expr7(), *expr8(), *expr9(), *expr10();
X+static NODE *doprint(), *dofuncn(), *doif(), *dowhile(), *dofor(), *body();
X+static NODE *doassign(), *dodo(), *doarray(), *doreturn(), *doelement();
X CELL *mkcell(), *getvar();
X CELL *execute(), *lookup();
X+static int dousrfun(), skipeol(), isassign(), iscat(), isincdec();
X 
X int forflg;	/* parsing for(expr in array), inhibit 'expr in array' */
X int prmflg;	/* parsing pass parameters */
END-of-minix/files/patch-awk
echo x - minix/files/patch-bc
sed 's/^X//' >minix/files/patch-bc << 'END-of-minix/files/patch-bc'
X--- work.old/src/commands/bc/config.h	Tue Oct  1 14:00:00 1996
X+++ work.new/src/commands/bc/config.h	Sat Nov  3 01:34:28 2001
X@@ -1,4 +1,8 @@
X /* config.h */
X+#ifndef __FreeBSD__
X #define SMALL_BUF
X-#define BC_MATH_FILE "/usr/lib/libmath.b"
X+#endif
X+#define BC_MATH_FILE "%%MINIX_PREFIX%%/share/misc/libmath.b"
X+#ifndef __FreeBSD__
X #define SHORTNAMES
X+#endif
X--- work.old/src/commands/bc/const.h	Tue Oct  1 14:00:00 1996
X+++ work.new/src/commands/bc/const.h	Fri Nov  2 22:38:31 2001
X@@ -38,14 +38,17 @@
X /* Define constants in some reasonable size.  The next 4 constants are
X    POSIX constants. */
X 
X+#ifndef BC_BASE_MAX
X #define BC_BASE_MAX   INT_MAX
X #define BC_SCALE_MAX  INT_MAX
X #define BC_STRING_MAX INT_MAX
X-
X+#endif
X 
X /* Definitions for arrays. */
X 
X+#ifndef BC_DIM_MAX
X #define BC_DIM_MAX    65535       /* this should be NODE_SIZE^NODE_DEPTH-1 */
X+#endif
X 
X #define   NODE_SIZE        16     /* Must be a power of 2. */
X #define   NODE_MASK       0xf     /* Must be NODE_SIZE-1. */
X--- work.old/src/commands/bc/scan.l	Tue Oct  1 14:00:00 1996
X+++ work.new/src/commands/bc/scan.l	Fri Nov  2 05:47:42 2001
X@@ -28,7 +28,7 @@
X *************************************************************************/
X 
X #include "bcdefs.h"
X-#include "y.tab.h"
X+#include "bc.h"
X #include "global.h"
X #include "proto.h"
X 
END-of-minix/files/patch-bc
echo x - minix/files/patch-cawf
sed 's/^X//' >minix/files/patch-cawf << 'END-of-minix/files/patch-cawf'
X--- work.old/src/commands/cawf/mnx.mac	Tue Oct  1 14:00:00 1996
X+++ work.new/src/commands/cawf/mnx.mac	Sat Nov  3 14:49:33 2001
X@@ -1,7 +1,7 @@
X .\" -mnx macros for the Minix "Book manual pages".	Author: Kees J. Bot
X .\"								19 Nov 1994
X .\" Uses -ms:
X-.so /usr/lib/cawf/ms.mac
X+.so %%MINIX_PREFIX/share/cawf/ms.mac
X .tr ~
X .ds OQ \&'
X .ds CQ \&'
END-of-minix/files/patch-cawf
echo x - minix/files/patch-elle
sed 's/^X//' >minix/files/patch-elle << 'END-of-minix/files/patch-elle'
X--- work.old/src/commands/elle/eebuff.c	Tue Oct  1 14:00:00 1996
X+++ work.new/src/commands/elle/eebuff.c	Fri Nov  2 07:20:12 2001
X@@ -187,7 +187,7 @@
X 		if(*cp == SP) continue;	/* Ignore internal buffs */
X 		e_sputz((b->b_flags&B_MODIFIED) ? "* " : "  ");
X 		e_sputz(cp);			/* Insert buffer name */
X-		dottoa(temp,ex_blen(b));	/* Get buff-length string */
X+		dottoa(temp,ex_blen((SBBUF *)b));	/* Get buff-length string */
X 		if((i = ((FNAMELEN > 14) ? 30 : 20)
X 			 - strlen(cp) - strlen(temp)) > 0)
X 			e_insn(SP, i);
X@@ -863,7 +863,7 @@
X 	else
X 		w1 -> w_next = w -> w_next;
X 	kw->w_buf->b_dot = (kw == cur_win) ? cur_dot : kw->w_dot;
X-	chkfree (kw);
X+	chkfree ((SBMA)kw);
X #if IMAGEN		/* Not needed? */
X 	redp (RD_WINRES|RD_WINDS|RD_REDO);
X #endif /*IMAGEN*/
X--- work.old/src/commands/elle/eeedit.c	Tue Oct  1 14:00:00 1996
X+++ work.new/src/commands/elle/eeedit.c	Fri Nov  2 07:20:12 2001
X@@ -20,7 +20,7 @@
X #define CURSBB (SBBUF *)cur_buf		/* Shorthand for current SB buffer */
X 
X e_reset()	/* Reset current buffer */
X-{	ex_reset(CURSBB);
X+{	ex_reset((struct buffer *)CURSBB);
X 	cur_dot = 0;
X }
X 
X--- work.old/src/commands/elle/eeerr.c	Tue Oct  1 14:00:00 1996
X+++ work.new/src/commands/elle/eeerr.c	Fri Nov  2 07:45:05 2001
X@@ -74,6 +74,7 @@
X  *	code, then the world dies.
X  */
X 
X+void
X bite_bag(fault)				/* We come here on any memory error */
X int fault;
X {
X@@ -99,7 +100,9 @@
X  *	Note that the TTY is not touched at all, although the terminal mode
X  *	flag is set just in case further error handling routines are invoked.
X  */
X-hup_exit()
X+void
X+hup_exit(fault)
X+int fault;
X {	extern int trm_mode;		/* See e_disp.c */
X 
X 	trm_mode = -1;			/* Say TTY is now detached */
X--- work.old/src/commands/elle/eefd.c	Tue Oct  1 14:00:00 1996
X+++ work.new/src/commands/elle/eefd.c	Fri Nov  2 07:20:12 2001
X@@ -202,7 +202,7 @@
X #endif /* FX_SC%%WIND */
X 
X #if FX_MVWTOP || FX_MVWBOT	/* Guts for above two functions */
X-static
X+/* static */
X moveborder(top)
X int top;
X {
X--- work.old/src/commands/elle/eefile.c	Tue Oct  1 14:00:00 1996
X+++ work.new/src/commands/elle/eefile.c	Fri Nov  2 07:20:12 2001
X@@ -230,7 +230,7 @@
X 
X 	lastn = last_fname(f_name);	/* Find buffer name */
X 	b = find_buf(lastn);		/* Is there a buffer of that name? */
X-	if (b && (ex_blen(b) || b->b_fn))
X+	if (b && (ex_blen((SBBUF *)b) || b->b_fn))
X 	  {	ans = ask("Buffer %s contains %s, which buffer shall I use? ",
X     			b -> b_name, b->b_fn ? b->b_fn : "something");
X 		if(ans == 0) return;		/* Aborted */
X@@ -317,7 +317,7 @@
X 		close(ifd);
X 		return 0;
X 	  }
X-	sb_sins(cur_buf,sd);
X+	sb_sins((SBBUF *)cur_buf,sd);
X 	insdot = e_dot();
X 	f_setmark();			/* Set mark at current ptr */
X 	if(cur_dot != insdot)		/* If pointer was advanced, */
X@@ -674,7 +674,6 @@
X 	register char *cp;
X 	register int len;
X #endif /*IMAGEN*/
X-	char *strdup();
X 
X 	b = cur_buf;
X 	str = strdup(string);		/* Copy now in case copying self */
X--- work.old/src/commands/elle/eemain.c	Tue Oct  1 14:00:00 1996
X+++ work.new/src/commands/elle/eemain.c	Fri Nov  2 07:46:03 2001
X@@ -188,10 +188,6 @@
X 	  }
X }
X 
X-int f_throw();		/* throw function */
X-int bite_bag();		/* Error handling routine */
X-int hup_exit();		/* Hangup handling routine */
X-
X struct majmode ifunmode = { "Fundamental" };
X 
X initialize ()				/* Initialization */
X@@ -245,7 +241,9 @@
X  * allow interrupts to do anything.
X  */
X /* EFUN: "Error Throw" */
X-f_throw ()			       /* abort whatever is going on */
X+void
X+f_throw (fault)			       /* abort whatever is going on */
X+int fault;
X {
X 	ring_bell ();
X 	curs_lin = -1000;		/* make t_curpos do something */
X@@ -374,7 +372,7 @@
X f_pshinf()
X {
X 	register int res;
X-	register int (*sav2)(), (*sav3)();
X+	register void (*sav2)(), (*sav3)();
X 	int pid, status;
X 	char *shellname;
X #if IMAGEN
X@@ -403,23 +401,23 @@
X 			for(res = 3; res < 20;)	/* Don't let inf hack fd's */
X 				close(res++);
X #if V6
X-			execl("/bin/sh","-sh",0);
X+			execl("%%MINIX_PREFIX%%/bin/sh","-sh",0);
X #else
X 			signal(SIGINT, SIG_DFL);	/* V7 shell wants this?? */
X 			signal(SIGQUIT, SIG_DFL);	/*	*/
X #if IMAGEN
X 			if((shellname = getenv("SHELL")) == 0)
X 				shellname = "sh";
X-			strcpy(fullshell, "/bin/");
X+			strcpy(fullshell, "%%MINIX_PREFIX%%/bin/");
X 			strcat(fullshell, shellname);
X 			shellname = fullshell;
X #else
X 			if((shellname = getenv("SHELL")) == 0)
X-				shellname = "/bin/sh";
X+				shellname = "%%MINIX_PREFIX%%/bin/sh";
X #endif /*-IMAGEN*/
X 
X 			if((shellname = getenv("SHELL")) == 0)
X-				shellname = "/bin/sh";
X+				shellname = "%%MINIX_PREFIX%%/bin/sh";
X 			execl(shellname, shellname, 0);
X #endif /*-V6*/
X 			writerr("No shell!");
X@@ -441,12 +439,14 @@
X  * If this page becomes overly large, it can be split off into a separate
X  * file called E_MISC.
X  */
X+#ifdef NEED_STRDUP
X char *
X-strdup(s)
X+s_strdup(s)
X char *s;	/* Note that STRCPY's return val must be its 1st arg */
X {	char *strcpy();
X 	return(strcpy(memalloc((SBMO)(strlen(s)+1)), s));
X }
X+#endif
X 
X char *
X memalloc(size)
X--- work.old/src/commands/elle/eeproto.h	Tue Oct  1 14:00:00 1996
X+++ work.new/src/commands/elle/eeproto.h	Fri Nov  2 22:41:14 2001
X@@ -1,6 +1,11 @@
X+#ifndef __FreeBSD__
X #ifndef _ANSI
X #include <ansi.h>
X #endif
X+#endif
X+#ifndef _PROTOTYPE
X+#define _PROTOTYPE(x,y) x y
X+#endif
X 
X /* eebit.c */
X _PROTOTYPE( int *chballoc, (int size) );
X@@ -166,8 +171,8 @@
X _PROTOTYPE( int bpt, (void) );
X _PROTOTYPE( char *strerror, (int num) );
X _PROTOTYPE( int errsbm, (int type, int (*adr )(), char *str, int a0, int a1, int a2, int a3, int a4, int a5, int a6, int a7, int a8, int a9, int a10, int a11, int a12) );
X-_PROTOTYPE( int bite_bag, (int fault) );
X-_PROTOTYPE( int hup_exit, (void) );
X+_PROTOTYPE( void bite_bag, (int fault) );
X+_PROTOTYPE( void hup_exit, (int fault) );
X _PROTOTYPE( int errint, (void) );
X _PROTOTYPE( int askerr, (void) );
X _PROTOTYPE( char *asklin, (char *acp) );
X@@ -336,12 +341,15 @@
X /* eemain.c */
X _PROTOTYPE( int doargs, (int argc, char **argv) );
X _PROTOTYPE( int initialize, (void) );
X-_PROTOTYPE( int f_throw, (void) );
X+_PROTOTYPE( void f_throw, (int fault) );
X _PROTOTYPE( int ring_bell, (void) );
X _PROTOTYPE( int f_retsup, (void) );
X _PROTOTYPE( int f_wfexit, (void) );
X _PROTOTYPE( int f_pshinf, (void) );
X-_PROTOTYPE( char *strdup, (char *s) );
X+#ifdef NEED_STRDUP
X+_PROTOTYPE( char *s_strdup, (char *s) );
X+#define strdup(x) s_strdup(x)
X+#endif
X _PROTOTYPE( char *memalloc, (SBMO size) );
X _PROTOTYPE( int chkfree, (SBMA ptr) );
X _PROTOTYPE( int ustrcmp, (char *str1, char *str2) );
X@@ -404,7 +412,7 @@
X _PROTOTYPE( int f_srch, (void) );
X _PROTOTYPE( int f_rsrch, (void) );
X _PROTOTYPE( int lin_search, (int backwards) );
X-_PROTOTYPE( int srchint, (void) );
X+_PROTOTYPE( void srchint, (int fault) );
X _PROTOTYPE( char *srch_ask, (char *prompt) );
X _PROTOTYPE( int f_risrch, (void) );
X _PROTOTYPE( int i_search, (int back) );
X--- work.old/src/commands/elle/eesite.c	Tue Oct  1 14:00:00 1996
X+++ work.new/src/commands/elle/eesite.c	Sat Nov  3 03:32:49 2001
X@@ -37,6 +37,7 @@
X #define CRMOD (020)
X #define RAW (040)
X #else
X+#undef CTRL
X 	/* Normal V7 UNIX declarations, can use include file */
X #include <sgtty.h>
X #endif
X--- work.old/src/commands/elle/eesite.h	Tue Oct  1 14:00:00 1996
X+++ work.new/src/commands/elle/eesite.h	Fri Nov  2 07:20:12 2001
X@@ -7,17 +7,20 @@
X  * EESITE.H	Site-dependent switches & definitions
X  */
X 
X+#ifndef EESITE_H
X+#define EESITE_H
X+
X /* CONDITIONAL COMPILATION SWITCHES */
X 
X #define V6	0	/* Running on V6 system (else V7 assumed) */
X 
X #define APOLLO 0	/* Running on an Apollo system */
X #define BBN	0	/* Running on BBN system (tty stuff) */
X-#define BSD4_2	0	/* Running on 4.2BSD system */
X+#define BSD4_2	1	/* Running on 4.2BSD system */
X #define COHERENT 0	/* Running on Coherent IBM-PC system */
X #define DNTTY	0	/* Running on SRI V6 Deafnet system (tty stuff) */
X #define HPUX	0	/* Running on Hewlett-Packard System V + */
X-#define MINIX	1	/* Running on MINIX (IBM-PC) system */
X+#define MINIX	0	/* Running on MINIX (IBM-PC) system */
X #define ONYX	0	/* Running on ONYX Z8000 system */
X #define PCIX	0	/* Running on PC/IX (IBM-PC) system */
X #define SUN	0	/* Running on SUN workstation system */
X@@ -88,6 +91,14 @@
X #if BSD4_2
X #define FNAMELEN 255	/* Max size of last filename component */
X #define FNAMSIZ 400	/* Max size of complete filename */
X+#ifdef __FreeBSD__
X+#define STRERROR 1	/* Say that implementation provides strerror() */
X+#include <sys/types.h>
X+#include <string.h>
X+#include <unistd.h>
X+#include <stdio.h>
X+#include <stdlib.h>
X+#endif
X #endif /*BSD4_2*/
X 
X #if TOPS20
X@@ -181,4 +192,6 @@
X #endif
X #ifndef EVPROFTEXTFILE	/* Location of ASCII user profile (used by ELLEC) */
X #define EVPROFTEXTFILE ".ellepro.e"
X+#endif
X+
X #endif
X--- work.old/src/commands/elle/eesrch.c	Tue Oct  1 14:00:00 1996
X+++ work.new/src/commands/elle/eesrch.c	Fri Nov  2 07:49:37 2001
X@@ -38,8 +38,7 @@
X int  backwards;
X {	register char *mem;	/* item to be searched for */
X 	register int res;
X-	int srchint(), (*sav_srchalarm)();
X-	char *srch_ask();
X+	void (*sav_srchalarm)();
X 	chroff savdot;
X 
X 	savdot = cur_dot;		/* Save original loc */
X@@ -70,7 +69,9 @@
X 	ding("Search Failed");
X }
X 
X-srchint()
X+void
X+srchint(fault)
X+int fault;
X {	yelltoo(" ...");
X }
X 
X@@ -151,7 +152,7 @@
X 	struct window *savwin;
X 	int winning;	/* 1 = currently winning, 0 = currently failing */
X 	int pref, shown;
X-	int f_insself(), (*(cmd_fun()))();
X+	int (*(cmd_fun()))();
X 
X 	winning = 1;
X 	inpcnt = 0;
X--- work.old/src/commands/elle/eeterm.c	Tue Oct  1 14:00:00 1996
X+++ work.new/src/commands/elle/eeterm.c	Fri Nov  2 07:20:12 2001
X@@ -994,8 +994,6 @@
X 	char *tcbuf, *tcbptr;		/* Pointers into termcap buffer */
X 	char tmpstr[4];
X 	char tmpbuf[TCAPSLEN];		/* Allocate from stack */
X-	char *malloc();
X-	char *realloc();
X 
X 	/* First see if can find the terminal type. */
X 	if((tgetent(tmpbuf, stype)) != 1)
X--- work.old/src/commands/elle/ellec.c	Tue Oct  1 14:00:00 1996
X+++ work.new/src/commands/elle/ellec.c	Fri Nov  2 07:28:09 2001
X@@ -135,6 +135,10 @@
X 
X struct lnode ltruenode;		/* Constant TRUE */
X 
X+#ifndef _PROTOTYPE
X+#define _PROTOTYPE(x,y) x y
X+#endif
X+
X _PROTOTYPE(int main , (int argc , char **argv ));
X _PROTOTYPE(int doargs , (int argc , char **argv ));
X _PROTOTYPE(char **findkey , (char *cp , char ***aretp , char **tabp , int tabsiz , int elsize ));
X@@ -214,10 +218,10 @@
X 	else doargs(argc,argv);
X 
X 	/* Initialize function definitions and key bindings from predefs */
X-	chrptr = malloc(chrsiz);
X-	mtaptr = malloc(mtasiz);
X-	extptr = malloc(extsiz);
X-	mnuptr = malloc(mnusiz);
X+	chrptr = (char *)malloc(chrsiz);
X+	mtaptr = (char *)malloc(mtasiz);
X+	extptr = (char *)malloc(extsiz);
X+	mnuptr = (char *)malloc(mnusiz);
X 	if (!chrptr || !mtaptr || !extptr || !mnuptr)
X 		fatal("cannot init, no memory");
X 
X@@ -376,7 +380,7 @@
X 		av[0]++;
X 
X 		/* Try to look up switch in table */
X-		swp = (struct swarg *)findkey(av[0], &swp2, swtab,
X+		swp = (struct swarg *)findkey(av[0], (char ***)&swp2, (char **)swtab,
X 			(sizeof(swtab))/(sizeof(struct swarg)),
X 			(sizeof(struct swarg))/(sizeof(char *)));
X 		if(swp2)
X@@ -947,7 +951,7 @@
X   out:
X 	lp = getln();
X 	lp->ltyp = LT_STR;
X-	lp->lval.lvs = malloc(i+1);
X+	lp->lval.lvs = (char *)malloc(i+1);
X 	*cp = 0;
X 	strcpy(lp->lval.lvs, cbuf);
X 	return(lp);
X--- work.old/src/commands/elle/sb.h	Tue Oct  1 14:00:00 1996
X+++ work.new/src/commands/elle/sb.h	Fri Nov  2 07:20:12 2001
X@@ -254,10 +254,10 @@
X 
X extern SBFILE sbv_tf;		/* SBFILE for temp swapout file */
X extern int (*sbv_debug)();	/* Error handler address */
X+#ifndef __FreeBSD__
X extern off_t lseek();		/* For sbstr code mostly */
X extern char *mktemp();
X-extern char *malloc();
X-extern char *calloc();
X+#endif
X extern SBBUF *sb_open();
X extern SBSTR *sb_close(), *sb_fduse(), *sbs_cpy(), *sbs_app(), *sb_cpyn(),
X 	*sb_killn();
X--- work.old/src/commands/elle/sbbcpy.c	Tue Oct  1 14:00:00 1996
X+++ work.new/src/commands/elle/sbbcpy.c	Fri Nov  2 07:20:12 2001
X@@ -8,7 +8,8 @@
X  *	Attempts to be clever about using word moves instead of byte moves.
X  *	Does not hack overlapping backward moves.
X  */
X-bcopy(from, to, cnt)	/* Copy count bytes from -> to */
X+#ifdef NEED_BCOPY
X+sbb_bcopy(from, to, cnt)	/* Copy count bytes from -> to */
X register SBMA from;
X register SBMA to;
X register unsigned cnt;
X@@ -35,6 +36,7 @@
X 	do { *to++ = *from++; }		/* Finish up with byte loop */
X 	while(--cnt);
X }
X+#endif
X 
X /* SBM_WCPY - word-move auxiliary routine.
X  *	This is a separate routine so that machines with only a few
X--- work.old/src/commands/elle/sberr.c	Tue Oct  1 14:00:00 1996
X+++ work.new/src/commands/elle/sberr.c	Sat Nov  3 03:40:26 2001
X@@ -59,11 +59,6 @@
X };
X 
X _PROTOTYPE( char *sbe_fstr, (int flags, struct flgt *fp) );
X-
X-char *sbe_mvfy(), *sbe_mfl(), *sbe_mlst();		/* SBM */
X-char *sbe_sbvfy(), *sbe_sbs();				/* SBBUF */
X-char *sbe_svfy(), *sbe_sdlist(), *sbe_sdtab(), *sbe_schk();	/* SD */
X-char *sbe_fstr();				/* Misc utility */
X 
X 
X /* SBE_MEM() - Print out memory usage list
X@@ -190,12 +185,12 @@
X 				printf("Bad free-mem block"))
X 		PRF(sbe_smp(sm, 1))		/* Print out rest of info */
X 
X-		if(nextaddr != sm->smaddr
X+		if(nextaddr != (char *)sm->smaddr
X 		  && smtab.pt_cnt != 1)		/* 1st time needs init */
X 		  {	PRFBUG("Alignment error!",
X 				printf("\t  BAD!! %6o expected; ",nextaddr))
X #if !(MINIX)
X-			PRF((i = sm->smaddr - nextaddr) > 0
X+			PRF((i = (char *)sm->smaddr - nextaddr) > 0
X 				? printf("%d skipped.\n",i)
X 				: printf("%d overlapped.\n",-i))
X #endif
X@@ -260,7 +255,7 @@
X 	  {
X 		PRF(printf("%s%7o->", (i==0 ? "\n    " : ""), sd))
X 		if(++i >= 8) i = 0;
X-		if(sbe_tbent(&sdtab, sd) < 0)	/* If hit loop, stop */
X+		if(sbe_tbent(&sdtab, (struct smblk *)sd) < 0)	/* If hit loop, stop */
X 			PRFBAD("SD freelist loop",
X 			  printf("\nLOOP - %o seen as node %d!!",
X 				sd, sdtab.pt_xerr))
X@@ -334,7 +329,7 @@
X 
X 	/* Freelist entered in table, now scan all SD's */
X 	res = (char *)sbm_nfor(SM_DNODS,sizeof(struct sdblk),
X-			sbe_schk, &sdtab);
X+			(int (*)())sbe_schk, (struct sbfile *)&sdtab);
X 
X 	PRF(printf("\n"))
X 	return(res);
X@@ -357,7 +352,7 @@
X 
X 	/* Stick freelist in table */
X 	for(sd = sbx_nfl; sd; sd = sd->slforw)
X-	  {	if(sbe_tbent(pt, sd) < 0)
X+	  {	if(sbe_tbent(pt, (struct smblk *)sd) < 0)
X 		  {	if(pt->pt_xerr < 0)
X 				PRFBAD("SD freelist too long",
X 					printf("SD freelist too long (%d)\n",
X@@ -405,7 +400,7 @@
X 	p = pt->pt_pflag&PTF_PRF;	/* Set up printflag */
X 	savidx = pt->pt_nsto;		/* Remember initial extent of table */
X 
X-	if(sbe_tbent(pt, sd) < 0)
X+	if(sbe_tbent(pt, (struct smblk *)sd) < 0)
X 	  {	if(pt->pt_xerr >= 0)	/* OK if already in table */
X 			return(0);
X 		PRFBAD("Too many SDs",
X@@ -414,7 +409,7 @@
X 
X 	/* Now search backward for start of list */
X 	while(sdx = (phys ? sd->sdback : sd->slback))
X-		if(sbe_tbent(pt,sdx) >= 0)
X+		if(sbe_tbent(pt,(struct smblk *)sdx) >= 0)
X 			sd = sdx;
X 		else break;
X 	if(sdx)
X@@ -489,7 +484,7 @@
X 		lastaddr = sd->sdaddr;
X 		/* Done with special phys stuff */
X 
X-	doboth:	if(sbe_tbent(pt, sd) < 0)
X+	doboth:	if(sbe_tbent(pt, (struct smblk *)sd) < 0)
X 		  {	if(pt->pt_xerr < 0)
X 				PRFBAD("Too many SDs",
X 					printf("Too many SDs for table (%d)\n",NPTRS))
X--- work.old/src/commands/elle/sbm.c	Tue Oct  1 14:00:00 1996
X+++ work.new/src/commands/elle/sbm.c	Fri Nov  2 07:20:12 2001
X@@ -77,7 +77,7 @@
X 	  || (int) cp == -1)
X 		return(sbm_err(0,"Can't sbrk"));
X 	sm = (struct smblk *)cp;		/* Better be word-aligned! */
X-	sbm_lmak(sm,(SBMO)sizeof(struct smblk),SMNODES);      /* Make list */
X+	sbm_lmak((SBMA)sm,(SBMO)sizeof(struct smblk),SMNODES);      /* Make list */
X 	sbm_nfl = sm;				/* Point freelist at it */
X 	sbm_lowaddr = (SBMA)sm;			/* Remember lowest addr seen */
X 
X@@ -207,7 +207,7 @@
X 	cnt = sm->smlen/elsize;		/* Find # nodes that will fit */
X 	sm->smuse = cnt * elsize;	/* Actual size used */
X 	smp = (struct smblk *)(sm->smaddr);	/* Ptr to 1st loc of mem */
X-	sbm_lmak(smp, (SBMO)elsize, cnt);	/* Build freelist */
X+	sbm_lmak((SBMA)smp, (SBMO)elsize, cnt);	/* Build freelist */
X 	return(smp);            /* Return 1st free node. Caller is */
X 				/* responsible for setting freelist ptr. */
X }
X@@ -735,7 +735,7 @@
X  */
X 
X char *
X-malloc(size)
X+sbm_malloc(size)
X unsigned size;
X {       register struct smblk *sm, **sma;
X 	register SBMO siz;
X@@ -748,13 +748,13 @@
X }
X 
X char *
X-alloc(size)     /* For V6 programs - note different failure value! */
X+sbm_alloc(size)     /* For V6 programs - note different failure value! */
X unsigned size;
X {       register char *addr;
X 	return((addr = malloc(size)) ? addr : (char *) -1);
X }
X 
X-free(ptr)
X+sbm_free(ptr)
X char *ptr;
X {       register struct smblk *sm, **smp;
X 
X@@ -767,7 +767,7 @@
X }
X 
X char *
X-realloc(ptr,size)
X+sbm_realloc(ptr,size)
X char *ptr;
X unsigned size;
X {       register struct smblk *sm, **smp;
X@@ -783,7 +783,7 @@
X }
X 
X char *
X-calloc(nelem,elsize)
X+sbm_calloc(nelem,elsize)
X unsigned nelem, elsize;
X {       register SBMO cmin;
X 	register WORD *ip;                     /* Clear in units of words */
X--- work.old/src/commands/elle/sbproto.h	Tue Oct  1 14:00:00 1996
X+++ work.new/src/commands/elle/sbproto.h	Fri Nov  2 22:41:31 2001
X@@ -1,9 +1,17 @@
X+#ifndef __FreeBSD__
X #ifndef _ANSI
X #include <ansi.h>
X #endif
X+#endif
X+#ifndef _PROTOTYPE
X+#define _PROTOTYPE(x,y) x __P(y)
X+#endif
X 
X /* sbbcpy.c */
X-_PROTOTYPE( int bcopy, (SBMA from, SBMA to, unsigned cnt) );
X+#ifdef NEED_BCOPY
X+_PROTOTYPE( int sbb_bcopy, (SBMA from, SBMA to, unsigned cnt) );
X+#define bcopy(x,y,z) sbb_bcopy(x,y,z)
X+#endif
X _PROTOTYPE( int sbm_wcpy, (int *from, int *to, unsigned cnt) );
X 
X /* sberr.c */
X@@ -40,11 +48,16 @@
X #else
X struct smblk *sbm_err();
X #endif
X-_PROTOTYPE( char *malloc, (unsigned size) );
X-_PROTOTYPE( char *alloc, (unsigned size) );
X-_PROTOTYPE( int free, (char *ptr) );
X-_PROTOTYPE( char *realloc, (char *ptr, unsigned size) );
X-_PROTOTYPE( char *calloc, (unsigned nelem, unsigned elsize) );
X+_PROTOTYPE( char *sbm_malloc, (unsigned size) );
X+#define malloc(x) sbm_malloc(x)
X+_PROTOTYPE( char *sbm_alloc, (unsigned size) );
X+#define alloc(x) sbm_alloc(x)
X+_PROTOTYPE( int sbm_free, (char *ptr) );
X+#define free(x) sbm_free(x)
X+_PROTOTYPE( char *sbm_realloc, (char *ptr, unsigned size) );
X+#define realloc(x,y) sbm_realloc(x,y)
X+_PROTOTYPE( char *sbm_calloc, (unsigned nelem, unsigned elsize) );
X+#define calloc(x,y) sbm_calloc(x,y)
X _PROTOTYPE( int sbm_ngc, (void) );
X _PROTOTYPE( int sbm_xngc, (struct smblk **begp, unsigned elsize, unsigned flag) );
X _PROTOTYPE( int sbm_nfor, (int flag, int nodsiz, int (*proc )(), struct sbfile *arg) );
X@@ -117,4 +130,7 @@
X #endif
X 
X /* sbvall.c */
X-_PROTOTYPE( char *valloc, (unsigned size) );
X+#ifdef NEED_VALLOC
X+_PROTOTYPE( char *sbv_valloc, (unsigned size) );
X+#define valloc(x) sbv_valloc(x)
X+#endif
X--- work.old/src/commands/elle/sbstr.c	Tue Oct  1 14:00:00 1996
X+++ work.new/src/commands/elle/sbstr.c	Fri Nov  2 07:20:13 2001
X@@ -399,7 +399,7 @@
X 		return(0);		/* Yes, still in use, can't close */
X 	close(fd);			/* Maybe do this when list gone? */
X 	sbv_ftab[fd] = 0;		/* Remove from table */
X-	free(sf);			/* Remove sbfile struct from mem */
X+	free((char *)sf);			/* Remove sbfile struct from mem */
X }
X 
X /* SB_FDINP(sb,fd) - Returns TRUE if specified fd is still in use
X@@ -937,10 +937,10 @@
X 	  {
X 	case SK_READF:		/* Read Forward */
X 		if(sb->sbrleft > 0)	/* Already set up? */
X-			return(1);	/* Yup, fast return */
X+			return((struct sdblk *)1);	/* Yup, fast return */
X 		sbx_smdisc(sb);		/* None left, disc to get next */
X 		if((sd = sbx_next(sb)) == 0)	/* Try to get next blk */
X-			return(-1);	/* At EOF */
X+			return((struct sdblk *)-1);	/* At EOF */
X 		break;
X 
X 	case SK_READB:		/* Read Backward */
X@@ -950,7 +950,7 @@
X 				sb->sbflags &= ~SB_WRIT;
X 			  }
X 			sb->sbwleft = 0;
X-			return(1);
X+			return((struct sdblk *)1);
X 		  }
X 		sbx_smdisc(sb);
X 		break;
X@@ -959,7 +959,7 @@
X 		if(sb->sbrleft <= 0)
X 			sb->sbwleft = sm->smlen - moff;
X 		if(sb->sbwleft > 0)
X-			return(1);	/* OK to write now */
X+			return((struct sdblk *)1);	/* OK to write now */
X 					/* NOTE: flags not set!!! */
X 		sbx_smdisc(sb);
X 		break;
X@@ -983,7 +983,7 @@
X 		break;
X 
X 	default:
X-		return(0);
X+		return((struct sdblk *)0);
X 	  }
X 	  }
X 
X@@ -1002,14 +1002,14 @@
X 	  {
X 	case SK_READB:		/* Read Backward */
X 		if(sb->sboff == 0)	/* Due to normalize, if 0 seen */
X-			return(-1);	/* then we know it's BOF */
X+			return((struct sdblk *)-1);	/* then we know it's BOF */
X 		if(sm) goto sekr2;
X 		else goto sekr1;
X 
X 	case SK_READF:		/* Read Forward */
X 		if(sm) goto sekr2;
X 		if(sb->sboff == sd->sdlen)	/* Normalize means if EOB */
X-			return(-1);		/* then at EOF. */
X+			return((struct sdblk *)-1);		/* then at EOF. */
X 	sekr1:	slop = SB_SLOP;
X 	sekr3:	if(sb->sboff > cmin+slop)	/* Too much leading text? */
X 		  {				/* Split off leading txt */
X@@ -1048,7 +1048,7 @@
X 		else if(sm->smlen < cnt)	/* 2nd time shd always win */
X 		  {	sbx_err(0,"Readin blksiz err");	/* Internal error, */
X 			if((cmax /= 2) > 0) goto sekr3;	/* w/crude recovery */
X-			return(0);
X+			return((struct sdblk *)0);
X 		  }
X 		if(rem)		/* If disk not word-aligned, hack stuff */
X 		  {	sm = sbx_msplit(sm, (SBMO)rem);	/* Trim off from beg*/
X@@ -1058,10 +1058,10 @@
X 		sm->smuse = sd->sdlen;
X 
X 		if(sd->sdfile == 0)
X-			return(sbx_err(0,"No file"));	/* Gasp? */
X+			return((struct sdblk *)sbx_err(0,"No file"));	/* Gasp? */
X 		if(!sbx_rdf(sd->sdfile->sffd, sm->smaddr, sm->smuse,
X 				1, sd->sdaddr))
X-			return(sbx_err(0,"Readin SD: %o", sd));
X+			return((struct sdblk *)sbx_err(0,"Readin SD: %o", sd));
X 		/* ------- */
X 
X 	sekr2:	sbx_sbrdy(sb);		/* Make it current, pt to beg */
X@@ -1127,7 +1127,7 @@
X   sekwget:	sd->sdmem = sm = sbx_mget(cmin,cmax);
X 		sm->smuse = 0;
X    sekw:	sbx_sbrdy(sb);		/* Sets up sbwleft... */
X-		return(1);
X+		return((struct sdblk *)1);
X 
X 	case SK_DELF:		/* Delete forward */
X 		if(sb->sboff == 0)	/* At block beg already? */
X@@ -1143,9 +1143,9 @@
X 		break;
X 
X 	default:
X-		return(0);
X+		return((struct sdblk *)0);
X 	  }	/* End of switch */
X-	return(1);
X+	return((struct sdblk *)1);
X }
X 
X struct sdblk *
X@@ -1597,7 +1597,7 @@
X 	lev = 0;
X 	while((sd = sbx_nfl) == 0		/* Get a node */
X 						/* If fail, make more */
X-		&& (sd = sbm_nmak((sizeof (struct sdblk)),SM_DNODS)) == 0)
X+		&& (sd = (struct sdblk *)sbm_nmak((sizeof (struct sdblk)),SM_DNODS)) == 0)
X 						/* If still fail, try GC */
X 			sbx_comp(sizeof(struct sdblk)*SM_DNODS,lev++);
X 
X@@ -1721,7 +1721,7 @@
X 				cmin));
X 
X 	/* Step thru core hunting for SD node blocks */
X-	sbm_nfor(SM_DNODS,sizeof(struct sdblk),sbx_sdgc,lev);
X+	sbm_nfor(SM_DNODS,sizeof(struct sdblk),sbx_sdgc,(struct sbfile *)lev);
X }
X 
X /* Do GC stuff on a sdblk.  Guaranteed to exist, but may be locked */
X--- work.old/src/commands/elle/sbvall.c	Tue Oct  1 14:00:00 1996
X+++ work.new/src/commands/elle/sbvall.c	Fri Nov  2 07:20:13 2001
X@@ -14,8 +14,9 @@
X 
X #include "sb.h"
X 
X+#ifdef NEED_VALLOC
X char *
X-valloc(size)
X+sbv_valloc(size)
X unsigned size;
X {	register int pagmsk;
X 	register SBMO i;
X@@ -40,3 +41,4 @@
X 	  }
X 	return((char *)(sm->smaddr));
X }
X+#endif
END-of-minix/files/patch-elle
echo x - minix/files/patch-elvis
sed 's/^X//' >minix/files/patch-elvis << 'END-of-minix/files/patch-elvis'
X--- work.old/src/commands/elvis/cmd1.c	Tue Oct  1 14:00:00 1996
X+++ work.new/src/commands/elvis/cmd1.c	Fri Nov  2 22:51:25 2001
X@@ -1741,12 +1741,14 @@
X 	void	(*func)();	/* stores the previous setting of SIGTSTP */
X 
X #if ANY_UNIX
X+#ifndef __FreeBSD__
X 	/* the Bourne shell can't handle ^Z */
X-	if (!strcmp(o_shell, "/bin/sh"))
X+	if (!strcmp(o_shell+strlen(o_shell)-7, "/bin/sh"))
X 	{
X 		msg("The /bin/sh shell doesn't support ^Z");
X 		return;
X 	}
X+#endif
X #endif
X 
X 	move(LINES - 1, 0);
X--- work.old/src/commands/elvis/config.h	Tue Oct  1 14:00:00 1996
X+++ work.new/src/commands/elvis/config.h	Sat Nov  3 01:34:47 2001
X@@ -215,10 +215,12 @@
X  * but we'll ignore that and hope for the best; adding arguments to the macro
X  * would mess up an "extern" declaration of the function.
X  */
X+#ifndef __FreeBSD__
X #if BSD || COHERENT
X # define getcwd	getwd
X #endif
X extern char *getcwd();
X+#endif
X 
X /* text versa binary mode for read/write */
X #if !TOS
X@@ -252,8 +254,12 @@
X 
X /* everybody but Amiga wants lseek declared here */
X #if !AMIGA
X+#ifdef __FreeBSD__
X+#include <unistd.h>
X+#else
X extern long lseek();
X #endif
X+#endif
X 
X /******************* Names of files and environment vars **********************/
X 
X@@ -266,17 +272,17 @@
X #  endif
X # endif
X # ifndef PRSVDIR
X-#  define PRSVDIR	"/usr/preserve"	/* directory where preserved file live */
X+#  define PRSVDIR	"%%MINIX_PREFIX%%/var/preserve"	/* directory where preserved file live */
X # endif
X # ifndef PRSVINDEX
X-#  define PRSVINDEX	"/usr/preserve/Index" /* index of files in PRSVDIR */
X+#  define PRSVINDEX	"%%MINIX_PREFIX%%/var/preserve/Index" /* index of files in PRSVDIR */
X # endif
X # ifndef EXRC
X #  define EXRC		".exrc"		/* init file in current directory */
X # endif
X # define SCRATCHOUT	"%s/soXXXXXX"	/* temp file used as input to filter */
X # ifndef SHELL
X-#  define SHELL		"/bin/sh"	/* default shell */
X+#  define SHELL		"%%MINIX_PREFIX%%/bin/sh"	/* default shell */
X # endif
X # if COHERENT
X #  ifndef REDIRECT
X--- work.old/src/commands/elvis/curses.c	Tue Oct  1 14:00:00 1996
X+++ work.new/src/commands/elvis/curses.c	Fri Nov  2 08:58:23 2001
X@@ -41,6 +41,7 @@
X 
X 
X extern char	*getenv();
X+void		 getsize();
X static void	 starttcap();
X 
X /* variables, publicly available & used in the macros */
X@@ -636,7 +637,7 @@
X  * This function is called once during initialization, and thereafter it is
X  * called whenever the SIGWINCH signal is sent to this process.
X  */
X-int getsize(signo)
X+void getsize(signo)
X 	int	signo;
X {
X 	int	lines;
X@@ -719,8 +720,6 @@
X 		*o_columns = COLS;
X 	}
X #endif
X-
X-	return 0;
X }
X 
X 
X--- work.old/src/commands/elvis/main.c	Tue Oct  1 14:00:00 1996
X+++ work.new/src/commands/elvis/main.c	Fri Nov  2 08:53:45 2001
X@@ -38,7 +38,7 @@
X #  include "vmswild.c"
X main (argc, argv)
X # else
X-void main(argc, argv)
X+main(argc, argv)
X # endif
X #endif
X 	int	argc;
END-of-minix/files/patch-elvis
echo x - minix/files/patch-ibm
sed 's/^X//' >minix/files/patch-ibm << 'END-of-minix/files/patch-ibm'
X--- work.old/src/commands/ibm/dosread.c	Tue Oct  1 14:00:00 1996
X+++ work.new/src/commands/ibm/dosread.c	Sat Nov  3 18:46:53 2001
X@@ -89,8 +89,13 @@
X 
X static DIRECTORY root[MAX_ROOT_ENTRIES];
X static DIRECTORY save_entry;
X+#ifdef __FreeBSD__
X+static char drive[] = "/dev/fd0c";
X+#define DRIVE_NR	(sizeof (drive) - 3)
X+#else
X static char drive[] = "/dev/dosX";
X #define DRIVE_NR	(sizeof (drive) - 2)
X+#endif
X static char null[MAX_CLUSTER_SIZE], *device = drive, path[128];
X static long data_start;
X static long mark;	/* offset of directory entry to be written */
X@@ -117,6 +122,9 @@
X static BOOL		fat_dirty = FALSE;
X static unsigned int	cache_size;
X 
X+#ifndef _PROTOTYPE
X+#define _PROTOTYPE(x,y) x __P(y)
X+#endif
X 
X /* Prototypes. */
X _PROTOTYPE(void usage, (char *prog_name) );
X@@ -340,14 +348,20 @@
X 	 * is the name of a device in /dev. Instead of prepending
X 	 * /dev/ we try to chdir there.
X 	 */
X+#ifndef __FreeBSD__
X 	if (strchr(device, '/') == NULL && chdir("/dev") < 0) {
X 		perror("/dev");
X 		exit(1);
X 	}
X+#endif
X   } else {
X+#ifdef __FreeBSD__
X+	if ((dev_nr = *argv[idx++]) < '0' || dev_nr > '9')
X+		usage(argv[0]);
X+#else
X 	if ((dev_nr = toupper (*argv[idx++])) < 'A' || dev_nr > 'Z')
X 		usage(argv[0]);
X-
X+#endif
X 	device[DRIVE_NR] = dev_nr;
X   }
X 
END-of-minix/files/patch-ibm
echo x - minix/files/patch-ic
sed 's/^X//' >minix/files/patch-ic << 'END-of-minix/files/patch-ic'
X--- work.old/src/commands/ic/ic.c	Tue Oct  1 14:00:00 1996
X+++ work.new/src/commands/ic/ic.c	Sat Nov  3 03:42:20 2001
X@@ -23,6 +23,8 @@
X 
X static char copyright[] = {"ic    (c) Terrence W. Holm 1988"};
X 
X+_PROTOTYPE(char *cuserid, (char *string));
X+
X /****************************************************************/
X /*							 */
X /*	main()						 */
X@@ -530,7 +532,7 @@
X 	extern char **environ;
X 	char *shell = getenv("SHELL");
X 
X-	if (shell == NULL) shell = "/bin/sh";
X+	if (shell == NULL) shell = "%%MINIX_PREFIX%%/bin/sh";
X 	execle(shell, shell, (char *) 0, environ);
X 	perror(shell);
X 	exit(127);
X--- work.old/src/commands/ic/ic.h	Tue Oct  1 14:00:00 1996
X+++ work.new/src/commands/ic/ic.h	Sat Nov  3 03:07:29 2001
X@@ -118,6 +118,10 @@
X   char  file_name[20];			/*  "pad" or "/tmp/pad"	*/
X } ic_state;
X 
X+#ifndef _PROTOTYPE
X+#define _PROTOTYPE(x,y) x __P(y)
X+#endif
X+
X /* ic.c */
X _PROTOTYPE(int main, (int argc, char *argv []));
X _PROTOTYPE(void Init_State, (ic_state *s ));
X@@ -141,7 +145,7 @@
X _PROTOTYPE(int Init_Termcap, (void));
X _PROTOTYPE(void Move, (int column, int line ));
X _PROTOTYPE(void Puts, (char *string ));
X-_PROTOTYPE(void Putchar, (int c ));
X+_PROTOTYPE(int Putchar, (int c ));
X _PROTOTYPE(void Draw_Help_Screen, (void));
X _PROTOTYPE(void Draw_Prompt, (char *string ));
X _PROTOTYPE(void Erase_Prompt, (void));
X--- work.old/src/commands/ic/ic_output.c	Tue Oct  1 14:00:00 1996
X+++ work.new/src/commands/ic/ic_output.c	Sat Nov  3 03:07:31 2001
X@@ -87,10 +87,10 @@
X   tputs(string, 1, Putchar);
X }
X 
X-void Putchar(c)
X+int Putchar(c)
X char c;
X {
X-  putchar(c);
X+  return (putchar(c));
X }
X 
X /****************************************************************/
END-of-minix/files/patch-ic
echo x - minix/files/patch-indent
sed 's/^X//' >minix/files/patch-indent << 'END-of-minix/files/patch-indent'
X--- work.old/src/commands/indent/indent.c	Tue Oct  1 14:00:00 1996
X+++ work.new/src/commands/indent/indent.c	Fri Nov  2 16:11:21 2001
X@@ -40,7 +40,7 @@
X 						   name of output file */
X char            bakfile[60];
X 
X-void main(argc, argv)
X+main(argc, argv)
X    int             argc;
X    char          **argv;
X {
X--- work.old/src/commands/indent/proto.h	Tue Oct  1 14:00:00 1996
X+++ work.new/src/commands/indent/proto.h	Fri Nov  2 16:12:00 2001
X@@ -1,13 +1,16 @@
X /* _PROTOTYPE(   void diag, (int level,char *msg, int a, int b)    ); */
X void diag();			/* HACK.  should be varargs */
X 
X+#ifndef _PROTOTYPE
X+#define _PROTOTYPE(x,y) x __P(y)
X+#endif
X+
X _PROTOTYPE(   void set_profile, (void )    );
X _PROTOTYPE(   void scan_profile, (FILE *f)    );
X _PROTOTYPE(   int eqin, (char *s1,char *s2)    );
X _PROTOTYPE(   void set_defaults, (void )    );
X _PROTOTYPE(   void set_option, (char *arg)    );
X _PROTOTYPE(   void pr_comment, (void )    );
X-_PROTOTYPE(   void main, (int argc,char * *argv)    );
X _PROTOTYPE(   void bakcopy, (void )    );
X _PROTOTYPE(   void dump_line, (void )    );
X _PROTOTYPE(   int code_target, (void )    );
END-of-minix/files/patch-indent
echo x - minix/files/patch-kermit
sed 's/^X//' >minix/files/patch-kermit << 'END-of-minix/files/patch-kermit'
X--- work.old/src/commands/kermit/ckcdeb.h	Tue Oct  1 14:00:00 1996
X+++ work.new/src/commands/kermit/ckcdeb.h	Fri Nov  2 16:36:36 2001
X@@ -49,7 +49,11 @@
X /* Sys V R3 declares signal() differently from other systems. */
X typedef void SIGTYP;
X #else
X+#ifdef BSD4
X+typedef void SIGTYP;
X+#else
X typedef int SIGTYP;
X+#endif
X #endif
X 
X /* C Compiler Dependencies */
X--- work.old/src/commands/kermit/ckucon.c	Tue Oct  1 14:00:00 1996
X+++ work.new/src/commands/kermit/ckucon.c	Fri Nov  2 16:38:20 2001
X@@ -53,7 +53,7 @@
X static jmp_buf env_con;			/* Envir ptr for connect errors */
X 
X static
X-conn_int() {				/* Modem read failure handler, */
X+SIGTYP conn_int(fault) {		/* Modem read failure handler, */
X     longjmp(env_con,1);			/* notifies parent process to stop */
X }
X 
X--- work.old/src/commands/kermit/ckudia.c	Tue Oct  1 14:00:00 1996
X+++ work.new/src/commands/kermit/ckudia.c	Fri Nov  2 16:40:10 2001
X@@ -490,11 +490,11 @@
X static SIGTYP (*savAlrm)();	/* for saving alarm handler */
X static SIGTYP (*savInt)();	/* for saving interrupt handler */
X 
X-dialtime() {			/* timer interrupt handler */
X+SIGTYP dialtime(fault) {	/* timer interrupt handler */
X     longjmp( sjbuf, F_time );
X }
X 
X-dialint()			/* user-interrupt handler */
X+SIGTYP dialint(fault)		/* user-interrupt handler */
X     {
X     longjmp( sjbuf, F_int );
X     }
X--- work.old/src/commands/kermit/ckufio.c	Tue Oct  1 14:00:00 1996
X+++ work.new/src/commands/kermit/ckufio.c	Fri Nov  2 16:24:36 2001
X@@ -22,7 +22,12 @@
X #ifdef MINIX
X #include <limits.h>
X #endif
X+#ifdef __FreeBSD__
X+#include <dirent.h>
X+#define direct dirent
X+#else
X #include <sys/dir.h>			/* Directory structure */
X+#endif
X #include <pwd.h>			/* Password file for shell name */
X 
X #ifdef CIE
X@@ -617,7 +622,7 @@
X 	struct passwd *p;
X 	extern struct passwd * getpwuid();
X 	extern int getuid();
X-	char *defShel = "/bin/sh";	/* default shell */
X+	char *defShel = "%%MINIX_PREFIX%%/bin/sh";	/* default shell */
X #endif
X 
X 	close(pipes[0]);		/* close input side of pipe */
X--- work.old/src/commands/kermit/ckuscr.c	Tue Oct  1 14:00:00 1996
X+++ work.new/src/commands/kermit/ckuscr.c	Fri Nov  2 16:40:42 2001
X@@ -54,7 +54,7 @@
X 
X static jmp_buf alrmRng;		/* Envir ptr for connect errors */
X 
X-scrtime() {				/* modem read failure handler, */
X+SIGTYP scrtime(fault) {		/* modem read failure handler, */
X     longjmp(alrmRng,1);		/* notifies parent process to stop */
X }
X 
X--- work.old/src/commands/kermit/ckutio.c	Tue Oct  1 14:00:00 1996
X+++ work.new/src/commands/kermit/ckutio.c	Fri Nov  2 16:36:58 2001
X@@ -15,8 +15,12 @@
X /* Includes for all Unixes (conditional includes come later) */
X 
X #include <sys/types.h>			/* Types */
X-
X+#ifdef __FreeBSD__
X+#include <dirent.h>
X+#define direct dirent
X+#else
X #include <sys/dir.h>			/* Directory */
X+#endif
X #include <ctype.h>			/* Character types */
X #ifdef NULL
X #undef NULL
X@@ -817,11 +821,15 @@
X #ifdef ATT3BX
X     char *lockdir = "/usr/spool/locks";
X #else
X+#ifdef __FreeBSD__
X+    char *lockdir = "/var/spool/lock";
X+#else
X #ifdef NEWUUCP
X     char *lockdir = "/usr/spool/uucp/LCK";
X #else
X     char *lockdir = "/usr/spool/uucp";
X #endif /* newuucp */
X+#endif
X #endif /* att3bx */
X #endif /* isiii */
X 
X@@ -1203,7 +1211,7 @@
X 
X /* Timeout handler for communication line input functions */
X 
X-timerh() {
X+SIGTYP timerh(fault) {
X     longjmp(sjbuf,1);
X }
X 
X@@ -1233,10 +1241,10 @@
X 
X /*  C O N I N T  --  Console Interrupt setter  */
X 
X-conint(f) int (*f)(); {			/* Set an interrupt trap. */
X+conint(f) SIGTYP (*f)(); {			/* Set an interrupt trap. */
X     int x, y;
X #ifdef SIGTSTP
X-    int stptrap();			/* Suspend trap */
X+    SIGTYP stptrap();			/* Suspend trap */
X #endif
X 
X /* Check for background operation, even if not running on real tty, so that */
X--- work.old/src/commands/kermit/ckuus2.c	Tue Oct  1 14:00:00 1996
X+++ work.new/src/commands/kermit/ckuus2.c	Fri Nov  2 16:39:10 2001
X@@ -177,7 +177,7 @@
X "" } ;
X 
X  
X-static char *hmxyf[] = { "\set file: names, type, warning, display.\n\n",
X+static char *hmxyf[] = { "set file: names, type, warning, display.\n\n",
X "'names' are normally 'converted', which means file names are converted\n",
X "to 'common form' during transmission; 'literal' means use filenames\n",
X "literally (useful between like systems).\n\n",
X--- work.old/src/commands/kermit/ckuusr.c	Tue Oct  1 14:00:00 1996
X+++ work.new/src/commands/kermit/ckuusr.c	Fri Nov  2 16:21:43 2001
X@@ -1071,7 +1071,7 @@
X #ifdef datageneral
X     if (*s == NUL)			/* Interactive shell requested? */
X #ifdef mvux
X-	system("/bin/sh ");
X+	system("%%MINIX_PREFIX%%/bin/sh ");
X #else
X         system("x :cli prefix Kermit_Baby:");
X #endif
X@@ -1091,7 +1091,7 @@
X 	struct passwd *p;
X 	extern struct passwd * getpwuid();
X 	extern int getuid();
X-	char *defShel = "/bin/sh";	/* Default */
X+	char *defShel = "%%MINIX_PREFIX%%/bin/sh";	/* Default */
X  
X 	p = getpwuid( getuid() );	/* Get login data */
X 	if ( p == (struct passwd *) NULL || !*(p->pw_shell) )
END-of-minix/files/patch-kermit
echo x - minix/files/patch-m4
sed 's/^X//' >minix/files/patch-m4 << 'END-of-minix/files/patch-m4'
X--- work.old/src/commands/m4/mdef.h	Tue Oct  1 14:00:00 1996
X+++ work.new/src/commands/m4/mdef.h	Fri Nov  2 16:48:05 2001
X@@ -199,6 +199,10 @@
X 
X /* function prototypes */
X 
X+#ifndef _PROTOTYPE
X+#define _PROTOTYPE(x,y) x __P(y)
X+#endif
X+
X /* eval.c */
X 
X _PROTOTYPE(void eval, (char *argv [], int argc, int td ));
X@@ -255,7 +259,9 @@
X _PROTOTYPE(void killdiv, (void));
X _PROTOTYPE(char *strsave, (char *s ));
X _PROTOTYPE(void usage, (void));
X+#ifdef GETOPT
X _PROTOTYPE(int getopt, (int argc, char *argv [], char *optstring ));
X+#endif
X 
X /* serv.c */
X 
END-of-minix/files/patch-m4
echo x - minix/files/patch-make
sed 's/^X//' >minix/files/patch-make << 'END-of-minix/files/patch-make'
X--- work.old/src/commands/make/h.h	Tue Oct  1 14:00:00 1996
X+++ work.new/src/commands/make/h.h	Fri Nov  2 16:51:30 2001
X@@ -253,6 +253,10 @@
X /* Prototypes. */
X struct sgtbuf;
X 
X+#ifndef _PROTOTYPE
X+#define _PROTOTYPE(x,y) x __P(y)
X+#endif
X+
X /* check.c */
X _PROTOTYPE(void prt, (void));
X _PROTOTYPE(void check, (struct name *np ));
X@@ -279,7 +283,6 @@
X _PROTOTYPE(void expand, (struct str *strs ));
X 
X /* main.c */
X-_PROTOTYPE(void main, (int argc, char **argv ));
X _PROTOTYPE(void setoption, (char option ));
X _PROTOTYPE(void usage, (void));
X _PROTOTYPE(void fatal, (char *msg, char *a1, int a2 ));
X--- work.old/src/commands/make/main.c	Tue Oct  1 14:00:00 1996
X+++ work.new/src/commands/make/main.c	Fri Nov  2 16:51:20 2001
X@@ -51,7 +51,7 @@
X /* There must be enough 'space' for all possible flags ! */
X static char  makeflags[] = "MAKEFLAGS=                    ";
X 
X-void main(argc, argv)
X+main(argc, argv)
X int    argc;
X char **argv;
X {
X--- work.old/src/commands/make/make.c	Tue Oct  1 14:00:00 1996
X+++ work.new/src/commands/make/make.c	Fri Nov  2 16:52:19 2001
X@@ -102,7 +102,7 @@
X 	shell = ":bin/esh";
X #endif
X #ifdef unix
X-	shell = "/bin/sh";
X+	shell = "%%MINIX_PREFIX%%/bin/sh";
X #endif
X #ifdef os9
X 	shell = "shell";
END-of-minix/files/patch-make
echo x - minix/files/patch-mined
sed 's/^X//' >minix/files/patch-mined << 'END-of-minix/files/patch-mined'
X--- work.old/src/commands/mined/mined.h	Tue Oct  1 14:00:00 1996
X+++ work.new/src/commands/mined/mined.h	Fri Nov  2 17:38:36 2001
X@@ -2,7 +2,7 @@
X  *				Mined.h					  *
X  *========================================================================*/
X 
X-#include <minix/config.h>
X+/* #include <minix/config.h> */
X #include <sys/types.h>
X #include <fcntl.h>
X #include <stdlib.h>
X@@ -241,6 +241,10 @@
X 
X #endif /* YMAX */
X 
X+#ifndef _PROTOTYPE 
X+#define _PROTOTYPE(x,y) x __P(y)
X+#endif
X+
X /* mined1.c */
X 
X _PROTOTYPE(void FS, (void));
X@@ -284,7 +288,6 @@
X _PROTOTYPE(void load_file, (char *file ));
X _PROTOTYPE(int get_line, (int fd, char *buffer ));
X _PROTOTYPE(LINE *install_line, (char *buffer, int length ));
X-_PROTOTYPE(void main, (int argc, char *argv []));
X _PROTOTYPE(void RD, (void));
X _PROTOTYPE(void I, (void));
X _PROTOTYPE(void XT, (void));
X--- work.old/src/commands/mined/mined1.c	Tue Oct  1 14:00:00 1996
X+++ work.new/src/commands/mined/mined1.c	Fri Nov  2 17:38:57 2001
X@@ -1421,7 +1421,7 @@
X   return new_line;
X }
X 
X-void main(argc, argv)
X+main(argc, argv)
X int argc;
X char *argv[];
X {
END-of-minix/files/patch-mined
echo x - minix/files/patch-patch
sed 's/^X//' >minix/files/patch-patch << 'END-of-minix/files/patch-patch'
X--- work.old/src/commands/patch/common.h	Tue Oct  1 14:00:00 1996
X+++ work.new/src/commands/patch/common.h	Fri Nov  2 16:54:57 2001
X@@ -153,4 +153,8 @@
X 
X EXT char *revision INIT(Nullch);	/* prerequisite revision, if any */
X 
X+#ifndef _PROTOTYPE
X+#define _PROTOTYPE(x,y) x __P(y)
X+#endif
X+
X _PROTOTYPE(void my_exit , (int status ));
X--- work.old/src/commands/patch/pch.c	Tue Oct  1 14:00:00 1996
X+++ work.new/src/commands/patch/pch.c	Fri Nov  2 16:55:39 2001
X@@ -1251,9 +1251,9 @@
X 	Unlink(TMPOUTNAME);
X 	copy_file(filearg[0], TMPOUTNAME);
X 	if (verbose)
X-	    Sprintf(buf, "/bin/ed %s", TMPOUTNAME);
X+	    Sprintf(buf, "%%MINIX_PREFIX%%/bin/ed %s", TMPOUTNAME);
X 	else
X-	    Sprintf(buf, "/bin/ed - %s", TMPOUTNAME);
X+	    Sprintf(buf, "%%MINIX_PREFIX%%/bin/ed - %s", TMPOUTNAME);
X 	pipefp = popen(buf, "w");
X     }
X     for (;;) {
END-of-minix/files/patch-patch
echo x - minix/files/patch-scripts
sed 's/^X//' >minix/files/patch-scripts << 'END-of-minix/files/patch-scripts'
X--- work.old/src/commands/scripts/checkhier.sh	Tue Oct  1 14:00:00 1996
X+++ work.new/src/commands/scripts/checkhier.sh	Sun Nov  4 02:13:33 2001
X@@ -15,77 +15,50 @@
X # the system.
X {
X 	cat <<'EOF'
X-drwxr-xr-x	root	operator	/
X-drwxr-xr-x	bin	operator	/bin
X-drwxr-xr-x	root	operator	/dev
X-drwxr-xr-x	root	operator	/etc
X--rw-r--r--	root	operator	/etc/fstab
X--rw-r--r--	root	operator	/etc/group
X--rw-r--r--	root	operator	/etc/hostname.file
X--rw-r--r--	root	operator	/etc/motd
X--rw-r--r--	root	operator	/etc/mtab
X--rw-r--r--	root	operator	/etc/passwd
X--rw-r--r--	root	operator	/etc/profile
X--rw-r--r--	root	operator	/etc/protocols
X--rw-r--r--	root	operator	/etc/rc
X--rw-r--r--	root	operator	/etc/services
X--rw-------	root	operator	/etc/shadow
X--rw-r--r--	root	operator	/etc/termcap
X--rw-r--r--	root	operator	/etc/ttytab
X--rw-r--r--	root	operator	/etc/utmp
X-dr-xr-xr-x	root	operator	/fd0
X-dr-xr-xr-x	root	operator	/fd1
X-dr-xr-xr-x	root	operator	/mnt
X-dr-xr-xr-x	root	operator	/root
X-drwxrwxrwx	root	operator	/tmp
X-drwxr-xr-x	root	operator	/usr
X-drwxr-xr-x	root	operator	/usr/adm
X--rw-r--r--	root	operator	/usr/adm/lastlog
X--rw-r--r--	root	operator	/usr/adm/wtmp
X-drwxr-xr-x	ast	other		/usr/ast
X-drwxr-xr-x	bin	operator	/usr/bin
X-drwxr-xr-x	bin	operator	/usr/doc
X-drwxr-xr-x	bin	operator	/usr/etc
X-drwxr-xr-x	bin	operator	/usr/include
X-drwxr-xr-x	bin	operator	/usr/lib
X-drwxrwxr-x	root	operator	/usr/local
X-drwxrwxr-x	bin	operator	/usr/local/bin
X-drwxrwxr-x	bin	operator	/usr/local/doc
X-drwxrwxr-x	bin	operator	/usr/local/include
X-drwxrwxr-x	bin	operator	/usr/local/lib
X-drwxrwxr-x	bin	operator	/usr/local/man
X-drwxrwxr-x	bin	operator	/usr/local/src
X-drwxr-xr-x	bin	operator	/usr/man
X-drwxr-xr-x	bin	operator	/usr/mdec
X-drwx------	root	operator	/usr/preserve
X-drwxr-xr-x	root	operator	/usr/spool
X-drwx--x--x	root	operator	/usr/spool/at
X-drwx--x--x	root	operator	/usr/spool/at/past
X-drwxrwxr-x	root	uucp		/usr/spool/locks
X-drwx------	daemon	daemon		/usr/spool/lpd
X-drwxr-xr-x	bin	operator	/usr/src
X-drwxrwxrwx	root	operator	/usr/tmp
X--rwsr-xr-x	root	?		/usr/bin/at
X--rwsr-xr-x	root	?		/usr/bin/chfn
X--rwsr-xr-x	root	?		/usr/bin/chsh
X--rwsr-xr-x	root	?		/usr/bin/df
X--rwsr-xr-x	root	?		/usr/bin/elvprsv
X--rwsr-xr-x	root	?		/usr/bin/elvrec
X--rwsr-xr-x	root	?		/usr/bin/format
X--rwsr-xr-x	root	?		/usr/bin/hostaddr
X--rwsr-xr-x	root	?		/usr/bin/install
X--rwsr-xr-x	daemon	?		/usr/bin/lpd
X--rwsr-xr-x	root	?		/usr/bin/mail
X--rwsr-xr-x	root	?		/usr/bin/mount
X--rwsr-xr-x	root	?		/usr/bin/passwd
X--rwsr-xr-x	root	?		/usr/bin/ping
X--rwxr-sr-x	?	kmem		/usr/bin/ps
X--rwsr-xr-x	root	?		/usr/bin/recover
X--rwsr-xr--	root	?		/usr/bin/shutdown
X--rwsr-xr-x	root	?		/usr/bin/su
X--rwxr-sr-x	?	uucp		/usr/bin/term
X--rwsr-xr-x	root	?		/usr/bin/umount
X--rwxr-sr-x	?	tty		/usr/bin/write
X+drwxr-xr-x	root	wheel		%%MINIX_PREFIX%%
X+drwxr-xr-x	root	wheel		%%MINIX_PREFIX%%/bin
X+drwxr-xr-x	root	wheel		%%MINIX_PREFIX%%/etc
X+-rw-r--r--	root	wheel		%%MINIX_PREFIX%%/etc/profile
X+drwxr-xr-x	root	wheel		%%MINIX_PREFIX%%/lib
X+drwxr-xr-x	root	wheel		%%MINIX_PREFIX%%/share/man
X+-rw-r--r--	root	wheel		%%MINIX_PREFIX%%/share/man
X+drwxr-xr-x	root	wheel		%%MINIX_PREFIX%%/share/man/man1
X+drwxr-xr-x	root	wheel		%%MINIX_PREFIX%%/share/man/man5
X+drwxr-xr-x	root	wheel		%%MINIX_PREFIX%%/share/man/man6
X+drwxr-xr-x	root	wheel		%%MINIX_PREFIX%%/share/man/man7
X+drwxr-xr-x	root	wheel		%%MINIX_PREFIX%%/share/man/man8
X+drwxr-xr-x	root	wheel		%%MINIX_PREFIX%%/share/man/man9
X+drwxrwxrwx	man	man		%%MINIX_PREFIX%%/share/man/cat1
X+drwxrwxrwx	man	man		%%MINIX_PREFIX%%/share/man/cat5
X+drwxrwxrwx	man	man		%%MINIX_PREFIX%%/share/man/cat6
X+drwxrwxrwx	man	man		%%MINIX_PREFIX%%/share/man/cat7
X+drwxrwxrwx	man	man		%%MINIX_PREFIX%%/share/man/cat8
X+drwxrwxrwx	man	man		%%MINIX_PREFIX%%/share/man/cat9
X+drwxr-xr-x	root	wheel		%%MINIX_PREFIX%%/var/db
X+-rw-r--r--	root	wheel		%%MINIX_PREFIX%%/var/db/utmp
X+drwx------	root	wheel		%%MINIX_PREFIX%%/var/preserve
X+drwxr-xr-x	root	wheel		%%MINIX_PREFIX%%/var/run
X+-rw-r--r--	root	wheel		%%MINIX_PREFIX%%/var/run/lastlog
X+-rw-r--r--	root	wheel		%%MINIX_PREFIX%%/var/run/wtmp
X+drwxr-xr-x	root	wheel		%%MINIX_PREFIX%%/var/spool
X+drwx--x--x	root	wheel		%%MINIX_PREFIX%%/var/spool/at
X+drwx--x--x	root	wheel		%%MINIX_PREFIX%%/var/spool/at/past
X+drwx------	daemon	daemon		%%MINIX_PREFIX%%/var/spool/lpd
X+drwxrwxrwx	root	wheel		%%MINIX_PREFIX%%/var/tmp
X+-rwsr-xr-x	root	wheel		%%MINIX_PREFIX%%/bin/at
X+-rwsr-xr-x	root	wheel		%%MINIX_PREFIX%%/bin/chfn
X+-rwsr-xr-x	root	wheel		%%MINIX_PREFIX%%/bin/chsh
X+-rwsr-xr-x	root	wheel		%%MINIX_PREFIX%%/bin/elvprsv
X+-rwsr-xr-x	root	wheel		%%MINIX_PREFIX%%/bin/elvrec
X+-rwsr-xr-x	root	wheel		%%MINIX_PREFIX%%/bin/install
X+-rwsr-xr-x	root	wheel		%%MINIX_PREFIX%%/bin/login
X+-rwsr-xr-x	daemon	wheel		%%MINIX_PREFIX%%/bin/lpd
X+-rwsr-xr-x	root	wheel		%%MINIX_PREFIX%%/bin/mail
X+-rwsr-xr-x	root	wheel		%%MINIX_PREFIX%%/bin/passwd
X+-rwsr-xr-x	root	wheel		%%MINIX_PREFIX%%/bin/pwdauth
X+-rwsr-xr-x	root	wheel		%%MINIX_PREFIX%%/bin/su
X+-rwxr-sr-x	uucp	dialer		%%MINIX_PREFIX%%/bin/term
X+-rwxr-sr-x	root	tty		%%MINIX_PREFIX%%/bin/write
X EOF
X 
X } | {
X--- work.old/src/commands/scripts/makewhatis.sh	Tue Oct  1 14:00:00 1996
X+++ work.new/src/commands/scripts/makewhatis.sh	Sun Nov  4 01:41:39 2001
X@@ -9,6 +9,7 @@
X esac
X 
X case $# in
X+0)	set %%MINIX_PREFIX%%/share/man ;;
X 1)	;;
X *)	echo "Usage: $0 <mandir>" >&2
X 	exit 1
X@@ -23,10 +24,17 @@
X 	# section header.
X 	for chap in 1 2 3 4 5 6 7 8
X 	do
X-		for page in man$chap/*.$chap
X+		for page in man$chap/*.$chap*
X 		do
X 		   if	test -f "$page"; then	# (Old sh barfs on 'continue')
X 
X+		        case "$page" in
X+		        *.Z)	   cat=zcat ;;
X+		        *.gz)	   cat=gzcat ;;
X+		        *)	   cat=cat ;;
X+		        esac
X+
X+		        $cat "$page" |
X 			sed -e 's/	/ /g
X 				/^\.SH NAME/,/^\.SH /!d
X 				/^\.SH /d
X@@ -34,16 +42,23 @@
X 				s/\\s[+-].//g
X 				s/\\s.//g
X 				s/\\//
X-				'"s/ - / ($chap) - /" < "$page"
X+				'"s/ - / ($chap) - /"
X 		   fi
X 		done
X 	done
X 
X 	# The Minix "Book style" documents, look for .CD
X-	for page in man9/*.9
X+	for page in man9/*.9*
X 	do
X 	   if	test -f "$page"; then
X 
X+		case "$page" in
X+		*.Z)	   cat=zcat ;;
X+		*.gz)	   cat=gzcat ;;
X+		*)	   cat=cat ;;
X+		esac
X+
X+		$cat "$page" |
X 		sed -e 's/	/ /g
X 			/^\.CD /!d
X 			s/^[^"]*"//
X@@ -54,7 +69,7 @@
X 			s/\\s.//g
X 			s/\\\*(M2/MINIX/g
X 			s/\\//
X-			'"s/ - / (9) - /" < "$page"
X+			'"s/ - / (9) - /"
X 	   fi
X 	done
X 
X@@ -63,8 +78,10 @@
X 	trap 'rm -f /tmp/mkw[cmn]$$; exit 1' 1 2 15
X 	for chap in 1 2 3 4 5 6 7 8 9
X 	do
X-		ls cat$chap 2>/dev/null >/tmp/mkwc$$
X-		ls man$chap 2>/dev/null >/tmp/mkwm$$
X+		ls cat$chap 2>/dev/null |
X+		sed -e 's/\.Z$//' -e 's/\.gz$//' >/tmp/mkwc$$
X+		ls man$chap 2>/dev/null |
X+		sed -e 's/\.Z$//' -e 's/\.gz$//' >/tmp/mkwm$$
X 		comm -23 /tmp/mkwc$$ /tmp/mkwm$$ >/tmp/mkwn$$
X 		sed -e "/.*\\.$chap\$/!d
X 			s/\\.$chap\$/ ($chap) - ???/" < /tmp/mkwn$$
X--- work.old/src/commands/scripts/whatis.sh	Tue Oct  1 14:00:00 1996
X+++ work.new/src/commands/scripts/whatis.sh	Sun Nov  4 01:41:52 2001
X@@ -24,7 +24,7 @@
X esac
X 
X IFS=":$IFS"
X-MANPATH="${MANPATH-/usr/local/man:/usr/man}"
X+MANPATH="${MANPATH-%%MINIX_PREFIX%%/share/man}"
X 
X found=
X 
END-of-minix/files/patch-scripts
echo x - minix/files/patch-sh
sed 's/^X//' >minix/files/patch-sh << 'END-of-minix/files/patch-sh'
X--- work.old/src/commands/sh/sh.h	Tue Oct  1 14:00:00 1996
X+++ work.new/src/commands/sh/sh.h	Fri Nov  2 19:51:12 2001
X@@ -166,6 +166,10 @@
X extern	char	*null;	/* null value for variable */
X extern	int	intr;	/* interrupt pending */
X 
X+#ifndef _NSIG   
X+#define _NSIG NSIG
X+#endif
X+
X Extern	char	*trap[_NSIG+1];
X Extern	char	ourtrap[_NSIG+1];
X Extern	int	trapset;	/* trap pending */
X@@ -185,6 +189,11 @@
X #else
X int (*inbuilt())();
X #endif
X+
X+#ifndef _PROTOTYPE
X+#define _PROTOTYPE(x,y) x __P(y)
X+#endif
X+
X _PROTOTYPE(char *rexecve , (char *c , char **v , char **envp ));
X _PROTOTYPE(char *space , (int n ));
X _PROTOTYPE(char *strsave , (char *s , int a ));
X--- work.old/src/commands/sh/sh1.c	Tue Oct  1 14:00:00 1996
X+++ work.new/src/commands/sh/sh1.c	Fri Nov  2 19:52:20 2001
X@@ -26,8 +26,8 @@
X /*
X  * default shell, search rules
X  */
X-char	shellname[] = "/bin/sh";
X-char	search[] = ":/bin:/usr/bin";
X+char	shellname[] = "%%MINIX_PREFIX%%/bin/sh";
X+char	search[] = ":%%MINIX_PREFIX%%/bin:/bin:/usr/bin";
X 
X _PROTOTYPE(void (*qflag), (int)) = SIG_IGN;
X 
X@@ -155,7 +155,7 @@
X 		talking++;
X 		if ((f = open(".profile", 0)) >= 0)
X 			next(remap(f));
X-		if ((f = open("/etc/profile", 0)) >= 0)
X+		if ((f = open("%%MINIX_PREFIX%%/etc/profile", 0)) >= 0)
X 			next(remap(f));
X 	}
X 	if (talking)
X--- work.old/src/commands/sh/sh3.c	Tue Oct  1 14:00:00 1996
X+++ work.new/src/commands/sh/sh3.c	Fri Nov  2 19:52:45 2001
X@@ -594,7 +594,7 @@
X 			*v = e.linep;
X 			tp = *--v;
X 			*v = e.linep;
X-			execve("/bin/sh", v, envp);
X+			execve("%%MINIX_PREFIX%%/bin/sh", v, envp);
X 			*v = tp;
X 			return("no Shell");
X 
X--- work.old/src/commands/sh/sh4.c	Tue Oct  1 14:00:00 1996
X+++ work.new/src/commands/sh/sh4.c	Fri Nov  2 19:53:35 2001
X@@ -1,7 +1,12 @@
X #define Extern extern
X #include <sys/types.h>
X #include <sys/stat.h>
X+#ifdef __FreeBSD__
X+#include <dirent.h>
X+#define direct dirent
X+#else
X #include <sys/dir.h>
X+#endif
X #include <limits.h>
X #include <signal.h>
X #include <errno.h>
END-of-minix/files/patch-sh
echo x - minix/files/patch-simple
sed 's/^X//' >minix/files/patch-simple << 'END-of-minix/files/patch-simple'
X--- work.old/src/commands/simple/ascii.c	Tue Oct  1 14:00:00 1996
X+++ work.new/src/commands/simple/ascii.c	Sat Nov  3 00:46:18 2001
X@@ -5,15 +5,17 @@
X #include <unistd.h>
X #include <string.h>
X #include <stdlib.h>
X+#ifdef __FreeBSD__
X+#define std_err(x) warn("%s",x)
X+#else
X #include <minix/minlib.h>
X+#endif
X #include <stdio.h>
X 
X #define BUFSIZE 4*1024
X 
X static char buf[BUFSIZE + 1];	/* input buffer - +1 for sentinel */
X static char carry[BUFSIZE];	/* buffer for partial line carryover */
X-
X-_PROTOTYPE(int main, (int argc, char **argv));
X 
X int main(argc, argv)
X int argc;
X--- work.old/src/commands/simple/at.c	Tue Oct  1 14:00:00 1996
X+++ work.new/src/commands/simple/at.c	Sat Nov  3 01:21:46 2001
X@@ -14,6 +14,10 @@
X #define	MAXDAYNR	STARTDAY+365
X #define	NODAY		-2
X 
X+#ifndef _PROTOTYPE
X+#define _PROTOTYPE(x,y) x __P(y)
X+#endif
X+
X _PROTOTYPE(int main, (int argc, char **argv, char **envp));
X _PROTOTYPE(int getltim, (char *t));
X _PROTOTYPE(int getlday, (char *m, char *d));
X@@ -95,7 +99,7 @@
X 			lday--;
X 		break;
X 	}
X-  sprintf(job, "/usr/spool/at/%02d.%03d.%04d.%02d",
X+  sprintf(job, "%%MINIX_PREFIX%%/var/spool/at/%02d.%03d.%04d.%02d",
X 	year % 100, lday, ltim, getpid() % 100);
X   if ((fp = fopen(job, "w")) == NULL) {
X 	fprintf(stderr, "%s: cannot create %s\n", argv[0], job);
X--- work.old/src/commands/simple/atrun.c	Tue Oct  1 14:00:00 1996
X+++ work.new/src/commands/simple/atrun.c	Sat Nov  3 01:22:11 2001
X@@ -6,7 +6,6 @@
X  *-------------------------------------------------------------------------*/
X 
X #include <sys/types.h>
X-#include <sys/dir.h>
X #include <sys/stat.h>
X #include <fcntl.h>
X #include <limits.h>
X@@ -17,8 +16,6 @@
X #include <stdio.h>
X #include <dirent.h>
X 
X-_PROTOTYPE(int main, (void));
X-
X int main()
X {
X   char realtime[15], procname[35], procpast[35];
X@@ -36,15 +33,15 @@
X   p = localtime(&clk);
X   sprintf(realtime, "%02d.%03d.%02d%02d.00",
X 	p->tm_year % 100, p->tm_yday, p->tm_hour, p->tm_min);
X-  if ((dir = opendir("/usr/spool/at")) != NULL)
X+  if ((dir = opendir("%%MINIX_PREFIX%%/var/spool/at")) != NULL)
X 	while ((entry = readdir(dir)) != NULL)
X 		if (entry->d_ino > 0 &&
X 		    entry->d_name[0] != '.' &&
X 		    entry->d_name[0] != 'p' &&
X 		strncmp(entry->d_name, realtime, (size_t) 11) <= 0) {
X 
X-			sprintf(procname, "/usr/spool/at/%s", entry->d_name);
X-			sprintf(procpast, "/usr/spool/at/past/%s", entry->d_name);
X+			sprintf(procname, "%%MINIX_PREFIX%%/var/spool/at/%s", entry->d_name);
X+			sprintf(procpast, "%%MINIX_PREFIX%%/var/spool/at/past/%s", entry->d_name);
X 
X 			if (fork() == 0)	/* code for child */
X 				if (link(procname, procpast) == 0) {	/* link ok? */
X@@ -52,6 +49,7 @@
X 					stat(procpast, &sbuf);
X 					setgid(sbuf.st_gid);
X 					setuid(sbuf.st_uid);
X+					execl("%%MINIX_PREFIX%%/bin/sh", "sh", procpast, (char *) 0);
X 					execl("/bin/sh", "sh", procpast, (char *) 0);
X 					fprintf(stderr, "proc %s can't start\n", procpast);
X 					exit(1);
X--- work.old/src/commands/simple/backup.c	Tue Oct  1 14:00:00 1996
X+++ work.new/src/commands/simple/backup.c	Fri Nov  2 20:23:48 2001
X@@ -72,6 +72,10 @@
X extern int errno;
X extern char **environ;
X 
X+#ifndef _PROTOTYPE
X+#define _PROTOTYPE(x,y) x __P(y)
X+#endif
X+
X _PROTOTYPE(int main, (int argc, char **argv));
X _PROTOTYPE(void maketarget, (char *dir2));
X _PROTOTYPE(int make_dir, (char *dir));
X@@ -196,8 +200,7 @@
X   } else {
X 	/* Child process executes mkdir */
X 	close(2);		/* don't want mkdir's error messages */
X-	execle("/bin/mkdir", "mkdir", dir, (char *) 0, environ);
X-	execle("/usr/bin/mkdir", "mkdir", dir, (char *) 0, environ);
X+	execle("%%MINIX_PREFIX%%/bin/mkdir", "mkdir", dir, (char *) 0, environ);
X 	error(FATAL, "cannot execute mkdir", "", "");
X   }
X   return(0);
X@@ -485,8 +488,7 @@
X 	close(1);
X 	s = open(targ, O_RDWR);
X 	if (s < 0) error(FATAL, "cannot write on ", "targ", "");
X-	execle("/bin/compress", "compress", fbuf, src, (char *)0, environ);
X-	execle("/usr/bin/compress", "compress", fbuf, src, (char *)0, environ);
X+	execle("%%MINIX_PREFIX%%/bin/compress", "compress", fbuf, src, (char *)0, environ);
X 	error(FATAL, "cannot exec compress", "", "");
X   }
X   return(0);
X@@ -532,13 +534,11 @@
X 
X   if (fbuf[0] == '-') {
X 	execle(pname, pname, fbuf, d1buf, d2buf, (char *) 0, environ);
X-	execle("/bin/backup", "backup", fbuf, d1buf, d2buf, (char *)0,environ);
X-	execle("/usr/bin/backup","backup",fbuf,d1buf,d2buf,(char *)0,environ);
X+	execle("%%MINIX_PREFIX%%/bin/backup", "backup", fbuf, d1buf, d2buf, (char *)0,environ);
X 	error(FATAL, "cannot recursively exec backup", "", "");
X   } else {
X 	execle(pname, pname, d1buf, d2buf, (char *) 0, environ);
X-	execle("/bin/backup", "backup", d1buf, d2buf, (char *)0,environ);
X-	execle("/usr/bin/backup","backup", d1buf, d2buf, (char *)0,environ);
X+	execle("%%MINIX_PREFIX%%/bin/backup", "backup", d1buf, d2buf, (char *)0,environ);
X 	error(FATAL, "cannot recursively exec backup", "", "");
X   }
X }
X@@ -564,8 +564,7 @@
X 	wait(&status);
X 	maketarget(dir);	/* make the directory */
X   } else {
X-	execle("/bin/sh", "sh", "-i", (char *) 0, environ);
X-	execle("/usr/bin/sh", "sh", "-i", (char *) 0, environ);
X+	execle("%%MINIX_PREFIX%%/bin/sh", "sh", "-i", (char *) 0, environ);
X 	error(FATAL, "cannot execute shell to ask for new diskette", "", "");
X   }
X }
X--- work.old/src/commands/simple/banner.c	Tue Oct  1 14:00:00 1996
X+++ work.new/src/commands/simple/banner.c	Sat Nov  3 00:47:14 2001
X@@ -23,8 +23,6 @@
X #include <string.h>
X #include <stdio.h>
X 
X-_PROTOTYPE(int main, (int argc, char **argv));
X-
X char *glyphs[] = {
X 	  "         @@@  @@   @@  @ @   @@@@@          @@     @@@  ",
X 	  "         @@@  @@   @@  @ @  @  @  @@@   @  @  @    @@@  ",
X--- work.old/src/commands/simple/basename.c	Tue Oct  1 14:00:00 1996
X+++ work.new/src/commands/simple/basename.c	Sat Nov  3 00:47:30 2001
X@@ -20,8 +20,6 @@
X 
X #define EOS '\0'
X 
X-_PROTOTYPE(int main, (int argc, char **argv));
X-
X int main(argc, argv)
X int argc;
X char *argv[];
X--- work.old/src/commands/simple/btoa.c	Tue Oct  1 14:00:00 1996
X+++ work.new/src/commands/simple/btoa.c	Fri Nov  2 20:23:48 2001
X@@ -94,6 +94,10 @@
X 
X /* Following functions have been converted to macros:  calcchecksum() */
X 
X+#ifndef _PROTOTYPE
X+#define _PROTOTYPE(x,y) x __P(y)
X+#endif
X+
X _PROTOTYPE(int main, (int argc, char **argv));
X _PROTOTYPE(BYTE btoa, (FILE *infile, BYTE *infilename));
X _PROTOTYPE(void printhelp, (void));
X--- work.old/src/commands/simple/cal.c	Tue Oct  1 14:00:00 1996
X+++ work.new/src/commands/simple/cal.c	Fri Nov  2 20:23:48 2001
X@@ -33,6 +33,10 @@
X 	     "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"
X };
X 
X+#ifndef _PROTOTYPE
X+#define _PROTOTYPE(x,y) x __P(y)
X+#endif
X+
X _PROTOTYPE(int main, (int argc, char **argv));
X _PROTOTYPE(void doyear, (int year));
X _PROTOTYPE(void domonth, (int year, int month));
X--- work.old/src/commands/simple/calendar.c	Tue Oct  1 14:00:00 1996
X+++ work.new/src/commands/simple/calendar.c	Sat Nov  3 03:43:09 2001
X@@ -15,9 +15,8 @@
X #include <stdio.h>
X 
X /* Change these two lines for your system needs. */
X-#define MAIL1	"/usr/bin/mail"
X-#define MAIL2	"/bin/mail"
X-#define PASSWD	"/etc/passwd"	/* system password file */
X+#define MAIL1	"%%MINIX_PREFIX%%/bin/mail"
X+#define PASSWD	"%%MINIX_PREFIX%%/etc/passwd"	/* system password file */
X #define MAX_EXP		4	/* see date_exp() function */
X 
X char *mail;			/* mail command path ("/bin/mail" etc) */
X@@ -30,6 +29,10 @@
X char *cmd;			/* the name of this command */
X char buf[BUFSIZ];
X 
X+#ifndef _PROTOTYPE
X+#define _PROTOTYPE(x,y) x __P(y)
X+#endif
X+
X _PROTOTYPE(int main, (int argc, char **argv));
X _PROTOTYPE(void calendar, (void));
X _PROTOTYPE(char *getstr, (char *s, int n));
X@@ -37,7 +40,10 @@
X _PROTOTYPE(void grep, (char *file, char *user));
X _PROTOTYPE(int date_exp, (void));
X _PROTOTYPE(char *date_pat, (time_t t));
X+#ifndef __FreeBSD__
X+#define const
X _PROTOTYPE(void regerror, (char *s));
X+#endif
X _PROTOTYPE(void error, (char *s, char *t));
X 
X int main(argc, argv)
X@@ -58,8 +64,6 @@
X   if (mflg) {			/* check mailing agent */
X 	if (access(MAIL1, X_OK) == 0)
X 		mail = MAIL1;
X-	else if (access(MAIL2, X_OK) == 0)
X-		mail = MAIL2;
X 	else
X 		error("cannot find %s", MAIL1);
X   }
X@@ -161,7 +165,7 @@
X 
X   while (fgets(buf, BUFSIZ, ifp) != (char *) NULL) {
X 	for (i = 0; i < nexp; i++) {
X-		if (regexec(exp[i], buf, 1)) {
X+		if (regexec(exp[i], buf)) {
X 			if ((ofp == (FILE *) NULL) &&
X 				  (ofp = popen(command, "w")) == (FILE *) NULL)
X 				error("cannot popen %s", mail);
X@@ -215,9 +219,9 @@
X }
X 
X void regerror(s)
X-char *s;
X+const char *s;
X {				/* regcomp() needs this */
X-  error("REGULAR EXPRESSION ERROR (%s)", s);
X+  error("REGULAR EXPRESSION ERROR (%s)", (char *) s);
X }
X 
X void error(s, t)
X--- work.old/src/commands/simple/cat.c	Tue Oct  1 14:00:00 1996
X+++ work.new/src/commands/simple/cat.c	Sat Nov  3 00:48:14 2001
X@@ -9,7 +9,11 @@
X #include <string.h>
X #include <unistd.h>
X #include <stdlib.h>
X+#ifdef __FreeBSD__
X+#define std_err(x) warn("%s",x)
X+#else
X #include <minix/minlib.h>
X+#endif
X #include <stdio.h>
X 
X #define CHUNK_SIZE	4096
X@@ -18,6 +22,10 @@
X static char ibuf[CHUNK_SIZE];
X static char obuf[CHUNK_SIZE];
X static char *op = obuf;
X+
X+#ifndef _PROTOTYPE
X+#define _PROTOTYPE(x,y) x __P(y)
X+#endif
X 
X _PROTOTYPE(int main, (int argc, char **argv));
X _PROTOTYPE(void copyfile, (int ifd, int ofd));
X--- work.old/src/commands/simple/cd.c	Tue Oct  1 14:00:00 1996
X+++ work.new/src/commands/simple/cd.c	Sat Nov  3 00:48:31 2001
X@@ -19,6 +19,10 @@
X #include <unistd.h>
X #include <stdio.h>
X 
X+#ifndef _PROTOTYPE
X+#define _PROTOTYPE(x,y) x __P(y)
X+#endif
X+
X _PROTOTYPE(int main, (int argc, char **argv));
X _PROTOTYPE(void get_next_prefix, (char *string, char prefix [PATH_MAX ]));
X 
X--- work.old/src/commands/simple/cdiff.c	Tue Oct  1 14:00:00 1996
X+++ work.new/src/commands/simple/cdiff.c	Fri Nov  2 20:23:48 2001
X@@ -33,6 +33,11 @@
X char *progname;
X size_t oldsize, oldalloc, newsize, newalloc;
X 
X+
X+#ifndef _PROTOTYPE
X+#define _PROTOTYPE(x,y) x __P(y)
X+#endif
X+
X _PROTOTYPE(int main, (int argc, char **argv));
X _PROTOTYPE(void dumphunk, (void));
X _PROTOTYPE(char *getold, (int targ));
X--- work.old/src/commands/simple/cgrep.c	Tue Oct  1 14:00:00 1996
X+++ work.new/src/commands/simple/cgrep.c	Sat Nov  3 00:48:42 2001
X@@ -41,7 +41,12 @@
X 
X #ifdef OS_UNIX
X #include <sys/types.h>
X+#ifdef __FreeBSD__
X+#include <dirent.h>
X+#define direct dirent
X+#else
X #include <sys/dir.h>		/* Either here or in sys directory - dro */
X+#endif
X #include <ctype.h>
X #include <limits.h>		/* should have this                - dro */
X #include <regexp.h>		/* should have this                - dro */
X@@ -71,11 +76,18 @@
X 
X /* Internal routines */
X 
X+#ifndef _PROTOTYPE
X+#define _PROTOTYPE(x,y) x __P(y)
X+#endif
X+
X _PROTOTYPE(int main, (int argc, char **argv));
X _PROTOTYPE(void dosrch, (char *ifnm));
X _PROTOTYPE(void shwlin, (char *fnm, int linnum, char *line));
X _PROTOTYPE(int matlin, (char *line));
X+#ifndef __FreeBSD__
X+#define const
X _PROTOTYPE(void regerror, (char *s));
X+#endif
X 
X /* External data */
X 
X@@ -339,7 +351,7 @@
X #endif	/* REGEX */
X 
X #ifdef	REGCMP
X-  rtncode = (regexec(Re, line, TRUE) != 0);
X+  rtncode = (regexec(Re, line) != 0);
X #endif /* REGCMP */
X 
X #ifdef	NOREGEX			/* Have to do menial comparison.. */
X@@ -372,7 +384,7 @@
X 
X 
X void regerror(s)
X-char *s;
X+const char *s;
X {
X   printf("%s\n", s);
X   exit(1);
X--- work.old/src/commands/simple/chmod.c	Tue Oct  1 14:00:00 1996
X+++ work.new/src/commands/simple/chmod.c	Sat Nov  3 00:48:59 2001
X@@ -14,7 +14,11 @@
X #include <stdlib.h>
X #include <string.h>
X #include <unistd.h>
X+#ifdef __FreeBSD__
X+#define std_err(x) warn("%s",x)
X+#else
X #include <minix/minlib.h>
X+#endif
X #include <stdio.h>
X 
X #ifndef S_ISLNK
X@@ -39,8 +43,12 @@
X struct stat st;
X char path[PATH_MAX + 1];
X 
X+#ifndef _PROTOTYPE
X+#define _PROTOTYPE(x,y) x __P(y)
X+#endif
X+
X _PROTOTYPE(int main, (int argc, char **argv));
X-_PROTOTYPE(mode_t parsemode, (char *symbolic, Mode_t oldmode));
X+_PROTOTYPE(mode_t parsemode, (char *symbolic, mode_t oldmode));
X _PROTOTYPE(int do_change, (char *name));
X _PROTOTYPE(void usage, (void));
X 
X--- work.old/src/commands/simple/chown.c	Tue Oct  1 14:00:00 1996
X+++ work.new/src/commands/simple/chown.c	Sat Nov  3 00:49:07 2001
X@@ -20,7 +20,11 @@
X #include <errno.h>
X #include <stdlib.h>
X #include <unistd.h>
X+#ifdef __FreeBSD__
X+#define std_err(x) warn("%s",x)
X+#else
X #include <minix/minlib.h>
X+#endif
X #include <stdio.h>
X 
X #ifndef S_ISLNK
X@@ -35,6 +39,10 @@
X char *pgmname, path[PATH_MAX + 1];
X uid_t nuid;
X gid_t ngid;
X+
X+#ifndef _PROTOTYPE
X+#define _PROTOTYPE(x,y) x __P(y)
X+#endif
X 
X _PROTOTYPE(int main, (int argc, char **argv));
X _PROTOTYPE(void do_chown, (char *file));
X--- work.old/src/commands/simple/ci.c	Tue Oct  1 14:00:00 1996
X+++ work.new/src/commands/simple/ci.c	Sat Nov  3 00:49:15 2001
X@@ -46,6 +46,10 @@
X char original[] = "/tmp/cioXXXXXX";	/* previous revision */
X char diffout[] = "/tmp/cidXXXXXX";	/* diffs */
X 
X+#ifndef _PROTOTYPE
X+#define _PROTOTYPE(x,y) x __P(y)
X+#endif
X+
X _PROTOTYPE(int main, (int argc, char **argv));
X _PROTOTYPE(void rundiff, (void));
X _PROTOTYPE(void logmsg, (FILE *fp));
X@@ -256,8 +260,10 @@
X   time(&now);
X   fprintf(stderr, "Enter log message for revision %d (end with ^D or '.'):\n", rev);
X   fprintf(fp, "#***SVC*** revision %d %s %s", rev, file, ctime(&now));
X-  while (NULL != gets(line) && strcmp(line, "."))
X+  while (NULL != fgets(line, LINELEN, stdin) && strcmp(line, ".")) {
X+	line [LINELEN-1] = 0;
X 	fprintf(fp, "#***SVC*** %s\n", line);
X+  }
X }
X 
X void fname(src, dst)
X--- work.old/src/commands/simple/cksum.c	Tue Oct  1 14:00:00 1996
X+++ work.new/src/commands/simple/cksum.c	Sat Nov  3 00:49:19 2001
X@@ -71,6 +71,10 @@
X 	  0x2a6f2b94, 0xb40bbe37, 0xc30c8ea1, 0x5a05df1b, 0x2d02ef8d
X };
X 
X+#ifndef _PROTOTYPE
X+#define _PROTOTYPE(x,y) x __P(y)
X+#endif
X+
X _PROTOTYPE(int main, (int argc, char **argv));
X _PROTOTYPE(void crc, (int fd, char *name));
X _PROTOTYPE(unsigned long strncrc, (unsigned char *b, int n, unsigned long s));
X--- work.old/src/commands/simple/clr.c	Tue Oct  1 14:00:00 1996
X+++ work.new/src/commands/simple/clr.c	Sat Nov  3 00:49:26 2001
X@@ -27,6 +27,10 @@
X char clear[30];
X char *p = &clear[0];
X 
X+#ifndef _PROTOTYPE
X+#define _PROTOTYPE(x,y) x __P(y)
X+#endif
X+
X _PROTOTYPE(int main, (void));
X _PROTOTYPE(void get_termcap, (void));
X _PROTOTYPE(void Error, (char *str));
X--- work.old/src/commands/simple/cmp.c	Tue Oct  1 14:00:00 1996
X+++ work.new/src/commands/simple/cmp.c	Sat Nov  3 00:49:30 2001
X@@ -8,6 +8,10 @@
X #include <string.h>
X #include <errno.h>
X 
X+#ifndef _PROTOTYPE
X+#define _PROTOTYPE(x,y) x __P(y)
X+#endif
X+
X _PROTOTYPE(void fatal, (char *label));
X _PROTOTYPE(int cmp, (int fd1, int fd2));
X _PROTOTYPE(void Usage, (void));
X--- work.old/src/commands/simple/co.c	Tue Oct  1 14:00:00 1996
X+++ work.new/src/commands/simple/co.c	Sat Nov  3 00:49:54 2001
X@@ -35,6 +35,10 @@
X 
X char difftemp[PATHLEN];		/* extract() fix/patch input */
X 
X+#ifndef _PROTOTYPE
X+#define _PROTOTYPE(x,y) x __P(y)
X+#endif
X+
X _PROTOTYPE(int main, (int argc, char **argv));
X _PROTOTYPE(void fname, (char *src, char *dst));
X _PROTOTYPE(void svcname, (char *src, char *dst));
X--- work.old/src/commands/simple/comm.c	Tue Oct  1 14:00:00 1996
X+++ work.new/src/commands/simple/comm.c	Sat Nov  3 00:50:06 2001
X@@ -16,7 +16,11 @@
X #include <stdlib.h>
X #include <string.h>
X #include <unistd.h>
X+#ifdef __FreeBSD__
X+#define std_err(x) warn("%s",x)
X+#else
X #include <minix/minlib.h>
X+#endif
X #include <stdio.h>
X 
X #define BUFFER_SIZE (512)
X@@ -36,6 +40,10 @@
X int colflgs[3] = {1, 2, 3};	/* number of tabs + 1: 0 => no column */
X 
X static char *umsg = "Usage: comm [-[123]] file1 file2\n";
X+
X+#ifndef _PROTOTYPE
X+#define _PROTOTYPE(x,y) x __P(y)
X+#endif
X 
X _PROTOTYPE(int main, (int argc, char **argv));
X _PROTOTYPE(void usage, (void));
X--- work.old/src/commands/simple/compress.c	Tue Oct  1 14:00:00 1996
X+++ work.new/src/commands/simple/compress.c	Sat Nov  3 00:50:10 2001
X@@ -217,6 +217,10 @@
X code_int free_ent = 0;			/* first unused entry */
X int exit_stat = 0;
X 
X+#ifndef _PROTOTYPE
X+#define _PROTOTYPE(x,y) x __P(y)
X+#endif
X+
X _PROTOTYPE(int main, (int argc, char **argv));
X _PROTOTYPE(void Usage, (void));
X _PROTOTYPE(void compress, (void));
X--- work.old/src/commands/simple/cp.c	Tue Oct  1 14:00:00 1996
X+++ work.new/src/commands/simple/cp.c	Fri Nov  2 21:06:21 2001
X@@ -1108,7 +1108,7 @@
X 	exit(1);
X }
X 
X-void main(int argc, char **argv)
X+main(int argc, char **argv)
X {
X 	int i;
X 	char *flags;
X--- work.old/src/commands/simple/cron.c	Tue Oct  1 14:00:00 1996
X+++ work.new/src/commands/simple/cron.c	Sat Nov  3 01:24:13 2001
X@@ -44,8 +44,12 @@
X #include <sys/wait.h>
X #include <stdio.h>
X 
X-#define CRONTAB		"/usr/lib/crontab"
X-#define LOGFILE		"/usr/adm/cronlog"
X+#ifndef _NSIG
X+#define _NSIG NSIG
X+#endif
X+
X+#define CRONTAB		"%%MINIX_PREFIX%%/etc/crontab"
X+#define LOGFILE		"%%MINIX_PREFIX%%/var/log/cronlog"
X 
X #define SEPARATOR	" \t"
X #define CRONSIZE	2048
X@@ -69,6 +73,10 @@
X static time_t prv_time = (time_t) 0;	/* timekeeper: previous wakeup	*/
X static FILE *log, *logf;		/* FILE pointer to logfile	*/
X 
X+#ifndef _PROTOTYPE
X+#define _PROTOTYPE(x,y) x __P(y)
X+#endif
X+
X _PROTOTYPE(int main, (int argc, char **argv));
X _PROTOTYPE(void log_error, (char *error, ...));
X _PROTOTYPE(void assign, (CRON *entry, char *line));
X@@ -265,7 +273,7 @@
X   int status, i, pid;
X   time_t clk;
X 
X-  (void) chdir("/usr/adm");
X+  (void) chdir("/");
X 
X   if ((status = fork()) < 0) {
X 	fprintf(stderr, "cron: cannot fork!\n");
X--- work.old/src/commands/simple/cut.c	Tue Oct  1 14:00:00 1996
X+++ work.new/src/commands/simple/cut.c	Sat Nov  3 00:56:59 2001
X@@ -72,6 +72,10 @@
X char line[BUFSIZ];
X int exit_status;
X 
X+#ifndef _PROTOTYPE
X+#define _PROTOTYPE(x,y) x __P(y)
X+#endif
X+
X _PROTOTYPE(int main, (int argc, char **argv));
X _PROTOTYPE(void warn, (int warn_number, char *option));
X _PROTOTYPE(void cuterror, (int err));
X--- work.old/src/commands/simple/date.c	Tue Oct  1 14:00:00 1996
X+++ work.new/src/commands/simple/date.c	Sat Nov  3 00:57:06 2001
X@@ -19,6 +19,10 @@
X  */
X int outfd = 1;
X 
X+#ifndef _PROTOTYPE
X+#define _PROTOTYPE(x,y) x __P(y)
X+#endif
X+
X _PROTOTYPE(int main, (int argc, char **argv));
X _PROTOTYPE(void putchar, (int c));
X _PROTOTYPE(void pstring, (char *s, int len));
X@@ -90,7 +94,7 @@
X 	sflag = 1;
X   }
X 
X-  if (sflag && stime(&t) != 0) {
X+  if (sflag && time(&t) != 0) {
X 	outfd = 2;
X 	pstring("No permission to set time\n", -1);
X 	return(1);
X--- work.old/src/commands/simple/dd.c	Tue Oct  1 14:00:00 1996
X+++ work.new/src/commands/simple/dd.c	Sat Nov  3 00:57:31 2001
X@@ -16,6 +16,10 @@
X 
X char *pch, *errorp;
X 
X+#ifndef _PROTOTYPE
X+#define _PROTOTYPE(x,y) x __P(y)
X+#endif
X+
X _PROTOTYPE(int main, (int argc, char **argv));
X _PROTOTYPE(BOOLEAN is, (char *pc));
X _PROTOTYPE(int num, (void));
X--- work.old/src/commands/simple/decomp16.c	Tue Oct  1 14:00:00 1996
X+++ work.new/src/commands/simple/decomp16.c	Sat Nov  3 00:57:42 2001
X@@ -110,6 +110,10 @@
X int clearflg;			/* if set, allow CLEAR */
X int inmod;			/* mod 8 for getbits() */
X 
X+#ifndef _PROTOTYPE
X+#define _PROTOTYPE(x,y) x __P(y)
X+#endif
X+
X _PROTOTYPE(int main, (int argc, char **argv));
X _PROTOTYPE(void ffork, (void));
X _PROTOTYPE(void die, (char *s));
X--- work.old/src/commands/simple/dhrystone.c	Tue Oct  1 14:00:00 1996
X+++ work.new/src/commands/simple/dhrystone.c	Fri Nov  2 20:23:48 2001
X@@ -191,6 +191,11 @@
X #include <sys/times.h>
X #endif
X 
X+
X+#ifndef _PROTOTYPE
X+#define _PROTOTYPE(x,y) x __P(y)
X+#endif
X+
X _PROTOTYPE(int main, (void));
X _PROTOTYPE(void prep_timer, (void));
X _PROTOTYPE(void timeout, (int sig));
X--- work.old/src/commands/simple/diff.c	Tue Oct  1 14:00:00 1996
X+++ work.new/src/commands/simple/diff.c	Fri Nov  2 21:07:44 2001
X@@ -87,6 +87,11 @@
X 
X  /* Function prototypes for the functions in this file	 */
X struct f;
X+
X+#ifndef _PROTOTYPE
X+#define _PROTOTYPE(x,y) x __P(y)
X+#endif
X+
X _PROTOTYPE(int main, (int argc, char **argv ));
X _PROTOTYPE(void process_command_line, (int argc, char **argv ));
X _PROTOTYPE(void analyse_input_files, (char *arg1, char *arg2, char *input1, 
X@@ -385,7 +390,7 @@
X char *filename(path_string)
X char *path_string;
X {
X-  char name[NAME_MAX + 2];	/* filename plus /		 	 */
X+  static char name[NAME_MAX + 2];	/* filename plus / */
X   char *ptr;
X 
X   name[0] = '/';
X--- work.old/src/commands/simple/du.c	Tue Oct  1 14:00:00 1996
X+++ work.new/src/commands/simple/du.c	Sat Nov  3 01:09:59 2001
X@@ -62,9 +62,13 @@
X   nlink_t al_nlink;
X } ALREADY;
X 
X+#ifndef _PROTOTYPE
X+#define _PROTOTYPE(x,y) x __P(y)
X+#endif
X+
X _PROTOTYPE(int main, (int argc, char **argv));
X _PROTOTYPE(int makedname, (char *d, char *f, char *out, int outlen));
X-_PROTOTYPE(int done, (int dev, Ino_t inum, Nlink_t nlink));
X+_PROTOTYPE(int done, (int dev, ino_t inum, nlink_t nlink));
X _PROTOTYPE(long dodir, (char *d, int thislev));
X 
X char *prog;			/* program name */
X--- work.old/src/commands/simple/dw.c	Tue Oct  1 14:00:00 1996
X+++ work.new/src/commands/simple/dw.c	Sat Nov  3 01:10:10 2001
X@@ -7,6 +7,10 @@
X #include <ctype.h>
X #include <stdio.h>
X 
X+#ifndef _PROTOTYPE
X+#define _PROTOTYPE(x,y) x __P(y)
X+#endif
X+
X _PROTOTYPE(int main, (int argc, char *argv []));
X _PROTOTYPE(int get_token, (FILE *f ));
X _PROTOTYPE(void make_lower, (void));
X--- work.old/src/commands/simple/echo.c	Tue Oct  1 14:00:00 1996
X+++ work.new/src/commands/simple/echo.c	Sat Nov  3 01:10:25 2001
X@@ -8,6 +8,10 @@
X char buf[SIZE];
X int count;
X 
X+#ifndef _PROTOTYPE
X+#define _PROTOTYPE(x,y) x __P(y)
X+#endif
X+
X _PROTOTYPE(int main, (int argc, char **argv));
X _PROTOTYPE(void collect, (char *s));
X 
X--- work.old/src/commands/simple/ed.c	Tue Oct  1 14:00:00 1996
X+++ work.new/src/commands/simple/ed.c	Sat Nov  3 01:11:13 2001
X@@ -179,6 +179,10 @@
X /* #include <stdio.h> */
X /* #include "tools.h" */
X 
X+#ifndef _PROTOTYPE
X+#define _PROTOTYPE(x,y) x __P(y)
X+#endif
X+
X _PROTOTYPE(int main, (int argc, char **argv));
X _PROTOTYPE(static char *match, (char *lin, TOKEN *pat, char *boln));
X _PROTOTYPE(char *amatch, (char *lin, TOKEN *pat, char *boln));
X@@ -2138,8 +2142,7 @@
X }
X 
X /*	System.c	*/
X-#define SHELL	"/bin/sh"
X-#define SHELL2	"/usr/bin/sh"
X+#define SHELL	"%%MINIX_PREFIX%%/bin/sh"
X 
X int System(c)
X char *c;
X@@ -2151,7 +2154,6 @@
X 	return -1;
X       case 0:
X 	execl(SHELL, "sh", "-c", c, (char *) 0);
X-	execl(SHELL2, "sh", "-c", c, (char *) 0);
X 	exit(-1);
X       default:	while (wait(&status) != pid);
X }
X--- work.old/src/commands/simple/expand.c	Tue Oct  1 14:00:00 1996
X+++ work.new/src/commands/simple/expand.c	Sat Nov  3 01:11:46 2001
X@@ -11,6 +11,10 @@
X 
X int column = 0;			/* Current column, retained between files  */
X 
X+#ifndef _PROTOTYPE
X+#define _PROTOTYPE(x,y) x __P(y)
X+#endif
X+
X _PROTOTYPE(int main, (int argc, char **argv));
X _PROTOTYPE(void Expand, (FILE *f, int tab_index, int tabs []));
X 
X--- work.old/src/commands/simple/expr.c	Tue Oct  1 14:00:00 1996
X+++ work.new/src/commands/simple/expr.c	Sat Nov  3 01:11:57 2001
X@@ -16,6 +16,10 @@
X 	 ((valp)->strval = NULL),		\
X 	 ((valp)->numval = (number)))
X 
X+#ifndef _PROTOTYPE
X+#define _PROTOTYPE(x,y) x __P(y)
X+#endif
X+
X _PROTOTYPE(int main, (int argc, char **argv));
X _PROTOTYPE(void expr1, (struct value *valp));
X _PROTOTYPE(void expr2, (struct value *valp));
X--- work.old/src/commands/simple/factor.c	Tue Oct  1 14:00:00 1996
X+++ work.new/src/commands/simple/factor.c	Sat Nov  3 01:12:06 2001
X@@ -3,6 +3,10 @@
X #include <stdlib.h>
X #include <stdio.h>
X 
X+#ifndef _PROTOTYPE
X+#define _PROTOTYPE(x,y) x __P(y)
X+#endif
X+
X _PROTOTYPE(int main, (int argc, char **argv));
X _PROTOTYPE(long first, (long k));
X 
X--- work.old/src/commands/simple/fgrep.c	Tue Oct  1 14:00:00 1996
X+++ work.new/src/commands/simple/fgrep.c	Fri Nov  2 23:55:33 2001
X@@ -66,6 +66,10 @@
X extern char *optarg;
X extern int optind;
X 
X+#ifndef _PROTOTYPE
X+#define _PROTOTYPE(x,y) x __P(y)
X+#endif
X+
X _PROTOTYPE(int main, (int argc, char **argv));
X _PROTOTYPE(char *search_str, (test_str * ts));
X _PROTOTYPE(int fill_buffer, (void));
X@@ -75,7 +79,9 @@
X _PROTOTYPE(char *get_line, (void));
X _PROTOTYPE(void string_file, (void));
X _PROTOTYPE(void add_string, (char *str));
X+#ifndef __FreeBSD__
X _PROTOTYPE(int getopt, (int argc, char **argv, char *optstring));
X+#endif
X 
X int main(argc, argv)
X int argc;
X--- work.old/src/commands/simple/file.c	Tue Oct  1 14:00:00 1996
X+++ work.new/src/commands/simple/file.c	Sat Nov  3 01:12:43 2001
X@@ -21,6 +21,8 @@
X   unsigned char mask[4];	/* Mask to apply when matching */
X   char *description;		/* What it means */
X } table[] = {
X+  0x00, 0x7f, 0x45, 0x00, 0x00,		0xff, 0xff, 0x00, 0x00,
X+	"ELF executable",
X   0x00, 0x1f, 0x9d, 0x8d, 0x00,		0xff, 0xff, 0xff, 0x00,
X 	"13-bit compressed file",
X   0x00, 0x1f, 0x9d, 0x90, 0x00,		0xff, 0xff, 0xff, 0x00,
X@@ -61,6 +63,10 @@
X 
X int tabsize = sizeof(table) / sizeof(struct info);
X int L_flag;
X+
X+#ifndef _PROTOTYPE
X+#define _PROTOTYPE(x,y) x __P(y)
X+#endif
X 
X _PROTOTYPE(int main, (int argc, char **argv));
X _PROTOTYPE(void file, (char *name));
X--- work.old/src/commands/simple/find.c	Tue Oct  1 14:00:00 1996
X+++ work.new/src/commands/simple/find.c	Fri Nov  2 20:23:49 2001
X@@ -185,6 +185,11 @@
X 
X 
X /* The prototypes: */
X+
X+#ifndef _PROTOTYPE
X+#define _PROTOTYPE(x,y) x __P(y)
X+#endif
X+
X _PROTOTYPE(int main, (int argc, char **argv));
X _PROTOTYPE(char *Malloc, (int n));
X _PROTOTYPE(char *Salloc, (char *s));
X--- work.old/src/commands/simple/fold.c	Tue Oct  1 14:00:00 1996
X+++ work.new/src/commands/simple/fold.c	Sat Nov  3 01:13:03 2001
X@@ -10,6 +10,10 @@
X 
X int column = 0;			/* Current column, retained between files  */
X 
X+#ifndef _PROTOTYPE
X+#define _PROTOTYPE(x,y) x __P(y)
X+#endif
X+
X _PROTOTYPE(int main, (int argc, char **argv));
X _PROTOTYPE(void Fold, (FILE *f, int width));
X 
X--- work.old/src/commands/simple/fortune.c	Tue Oct  1 14:00:00 1996
X+++ work.new/src/commands/simple/fortune.c	Sat Nov  3 01:29:05 2001
X@@ -7,10 +7,14 @@
X #include <unistd.h>
X #include <stdio.h>
X 
X-#define COOKIEJAR "/usr/lib/fortune.dat"
X+#define COOKIEJAR "%%MINIX_PREFIX%%/share/games/fortune.dat"
X 
X static char *Copyright = "\0Copyright (c) 1990 Bert Reuling";
X static unsigned long seed;
X+
X+#ifndef _PROTOTYPE
X+#define _PROTOTYPE(x,y) x __P(y)
X+#endif
X 
X _PROTOTYPE(int main, (int argc, char **argv));
X _PROTOTYPE(unsigned long magic, (unsigned long range));
X--- work.old/src/commands/simple/gather.c	Tue Oct  1 14:00:00 1996
X+++ work.new/src/commands/simple/gather.c	Sat Nov  3 01:13:39 2001
X@@ -53,6 +53,10 @@
X   long file_size;
X } dir_ent[MAX_DIR_ENT];
X 
X+#ifndef _PROTOTYPE
X+#define _PROTOTYPE(x,y) x __P(y)
X+#endif
X+
X _PROTOTYPE(int main, (int argc, char **argv));
X _PROTOTYPE(int collect, (int first, int limit, long cutoff));
X _PROTOTYPE(long heuristic, (long m));
X--- work.old/src/commands/simple/gomoku.c	Tue Oct  1 14:00:00 1996
X+++ work.new/src/commands/simple/gomoku.c	Sat Nov  3 01:13:50 2001
X@@ -48,6 +48,10 @@
X char Command;			/* Command from keyboard */
X int AutoPlay = FALSE;		/* The program plays against itself */
X 
X+#ifndef _PROTOTYPE
X+#define _PROTOTYPE(x,y) x __P(y)
X+#endif
X+
X _PROTOTYPE(void Initialize, (void));
X _PROTOTYPE(int Abort, (char *s));
X _PROTOTYPE(void WriteLetters, (void));
X--- work.old/src/commands/simple/grep.c	Tue Oct  1 14:00:00 1996
X+++ work.new/src/commands/simple/grep.c	Fri Nov  2 23:56:28 2001
X@@ -61,12 +61,20 @@
X extern char *optarg;
X 
X /* Internal interfaces */
X+
X+#ifndef _PROTOTYPE
X+#define _PROTOTYPE(x,y) x __P(y)
X+#endif
X+
X _PROTOTYPE(int main, (int argc, char **argv));
X _PROTOTYPE(static int match, (FILE *input, char *label, char *filename));
X _PROTOTYPE(static char *get_line, (FILE *input));
X _PROTOTYPE(static char *map_nocase, (char *line));
X _PROTOTYPE(static void error_exit, (char *msg));
X+#ifndef __FreeBSD__
X+#define const
X _PROTOTYPE(void regerror , (char *s ) );
X+#endif
X 
X 
X int main(argc, argv)
X@@ -173,7 +181,7 @@
X   if (FLAG('s') || FLAG('l')) {
X 	while ((line = get_line(input)) != NULL) {
X 		testline = FLAG('i') ? map_nocase(line) : line;
X-		if (regexec(expression, testline, 1)) {
X+		if (regexec(expression, testline)) {
X 			status = MATCH;
X 			break;
X 		}
X@@ -188,7 +196,7 @@
X   while ((line = get_line(input)) != NULL) {
X 	++lineno;
X 	testline = FLAG('i') ? map_nocase(line) : line;
X-	if (regexec(expression, testline, 1)) {
X+	if (regexec(expression, testline)) {
X 		status = MATCH;
X 		if (!FLAG('v')) {
X 			if (label != NULL)
X@@ -304,7 +312,7 @@
X /* Regular expression code calls this routine to print errors. */
X 
X void regerror(s)
X-char *s;
X+const char *s;
X {
X   fprintf(stderr, "regexp: %s\n", s);
X }
X--- work.old/src/commands/simple/head.c	Tue Oct  1 14:00:00 1996
X+++ work.new/src/commands/simple/head.c	Sat Nov  3 01:14:06 2001
X@@ -5,6 +5,10 @@
X 
X #define DEFAULT 10
X 
X+#ifndef _PROTOTYPE
X+#define _PROTOTYPE(x,y) x __P(y)
X+#endif
X+
X _PROTOTYPE(int main, (int argc, char **argv));
X _PROTOTYPE(void do_file, (int n, FILE *f));
X _PROTOTYPE(void usage, (void));
X--- work.old/src/commands/simple/id.c	Tue Oct  1 14:00:00 1996
X+++ work.new/src/commands/simple/id.c	Sat Nov  3 01:14:34 2001
X@@ -13,8 +13,6 @@
X #include <unistd.h>
X #include <stdio.h>
X 
X-_PROTOTYPE(int main, (void));
X-
X int main()
X {
X   struct passwd *pwd;
X--- work.old/src/commands/simple/ifdef.c	Tue Oct  1 14:00:00 1996
X+++ work.new/src/commands/simple/ifdef.c	Fri Nov  2 20:23:49 2001
X@@ -52,6 +52,11 @@
X extern char *optarg;
X 
X /* Prototypes. */
X+
X+#ifndef _PROTOTYPE
X+#define _PROTOTYPE(x,y) x __P(y)
X+#endif
X+
X _PROTOTYPE(int main, (int argc, char **argv));
X _PROTOTYPE(char fgetarg, (FILE *stream, char *cbuf));
X _PROTOTYPE(int find, (char *symd));
X--- work.old/src/commands/simple/inodes.c	Tue Oct  1 14:00:00 1996
X+++ work.new/src/commands/simple/inodes.c	Sat Nov  3 01:15:02 2001
X@@ -10,8 +10,10 @@
X #include <stdio.h>
X 
X #define	NAMSIZ	256
X+#ifndef __FreeBSD__
X #define major(dev)	(((dev) >> 8) & 0xFF)
X #define minor(dev)	((dev) & 0xFF)
X+#endif
X 
X struct linkbuf {
X   struct linkbuf *l_nxt;
X@@ -24,6 +26,10 @@
X struct stat statbuf;
X struct linkbuf *lhead = NULL;
X 
X+#ifndef _PROTOTYPE
X+#define _PROTOTYPE(x,y) x __P(y)
X+#endif
X+
X _PROTOTYPE(int main, (void));
X _PROTOTYPE(void dir, (void));
X _PROTOTYPE(void dev, (int c));
X@@ -34,8 +40,8 @@
X 
X int main()
X {
X-  while (gets(line)) {
X-
X+  while (fgets(line, NAMSIZ, stdin)) {
X+	line [NAMSIZ-1] = 0;
X #ifdef S_IFLNK
X 	if (lstat(line, &statbuf) < 0) {
X #else
X--- work.old/src/commands/simple/install.c	Tue Oct  1 14:00:00 1996
X+++ work.new/src/commands/simple/install.c	Sat Nov  3 00:05:03 2001
X@@ -18,6 +18,7 @@
X #include <utime.h>
X #include <signal.h>
X 
X+#ifndef __FreeBSD__
X /* First line used on a self-decompressing executable. */
X char ZCAT[]=	"#!/usr/bin/zexec /usr/bin/zcat\n";
X char GZCAT[]=	"#!/usr/bin/zexec /usr/bin/gzcat\n";
X@@ -25,6 +26,7 @@
X /* Compression filters. */
X char *COMPRESS[]=	{ "compress", nil };
X char *GZIP[]=		{ "gzip", "-#", nil };
X+#endif
X 
X int excode= 0;		/* Exit code. */
X 
X@@ -68,6 +70,7 @@
X int wordpow= 1;		/* Must be multiplied with wordsize ** wordpow */
X 			/* So 8kb for an 8086 and 16kb for the rest. */
X 
X+#ifndef __FreeBSD__
X pid_t filter(int fd, char **command)
X /* Let a command filter the output to fd. */
X {
X@@ -100,6 +103,7 @@
X 	close(pfd[1]);
X 	return pid;
X }
X+#endif
X 
X int mkdirp(char *dir, int mode, int owner, int group)
X /* mkdir -p dir */
X@@ -172,6 +176,7 @@
X 	}
X }
X 
X+#ifndef __FreeBSD__
X int setstack(struct exec *hdr)
X /* Set the stack size in a header.  Return true if something changed. */
X {
X@@ -201,6 +206,7 @@
X 	}
X 	return 0;
X }
X+#endif
X 
X void copylink(char *source, char *dest, int mode, int owner, int group)
X {
X@@ -292,8 +298,11 @@
X 			return;
X 		}
X 
X+#ifndef __FreeBSD__
X 		pid= 0;
X+#endif
X 		while (count > 0 && (n= read(sfd, buf, sizeof(buf))) > 0) {
X+#ifndef __FreeBSD__
X 			if (first && n >= A_MINHDR && !BADMAG(*hdr)) {
X 				if (strip) {
X 					count= hdr->a_hdrlen
X@@ -318,6 +327,7 @@
X 					change= 1;
X 				}
X 			}
X+#endif
X 			if (count < n) n= count;
X 
X 			if (write(dfd, buf, n) < 0) {
X@@ -333,11 +343,14 @@
X 		if (n < 0) report(source);
X 		close(sfd);
X 		close(dfd);
X+#ifndef __FreeBSD__
X 		if (pid != 0 && waitpid(pid, &status, 0) < 0 || status != 0) {
X 			excode= 1;
X 			return;
X 		}
X+#endif
X 		if (n < 0) return;
X+#ifndef __FreeBSD__
X 	} else {
X 		if (stack != -1) {
X 			/* The file has been linked into place.  Set the
X@@ -364,6 +377,7 @@
X 			}
X 			close(dfd);
X 		}
X+#endif
X 	}
X 
X 	if (stat(dest, &dst) < 0) { report(dest); return; }
X@@ -398,7 +412,7 @@
X 	exit(1);
X }
X 
X-void main(int argc, char **argv)
X+main(int argc, char **argv)
X {
X 	int i= 1;
X 	int mode= -1;		/* Mode of target. */
X@@ -442,10 +456,14 @@
X 			case 's':	strip= 1;	break;
X 			case 'd':	dflag= 1;	break;
X 			case 'z':
X+#ifdef __FreeBSD__
X+				fprintf (stderr, "install: option `-z' ignored on this system.\n");
X+#else
X 				if (compress == nil) {
X 					compress= COMPRESS;
X 					zcat= ZCAT;
X 				}
X+#endif
X 				break;
X 			case 'o':
X 				if (*p == 0) {
X@@ -537,9 +555,13 @@
X 				break;
X 			default:
X 				if ((unsigned) (p[-1] - '1') <= ('9' - '1')) {
X+#ifdef __FreeBSD__
X+				fprintf (stderr, "install: option `-%c' ignored on this system.\n", p[-1]);
X+#else
X 					compress= GZIP;
X 					GZIP[1][1]= p[-1];
X 					zcat= GZCAT;
X+#endif
X 					break;
X 				}
X 				usage();
X--- work.old/src/commands/simple/isoread.c	Tue Oct  1 14:00:00 1996
X+++ work.new/src/commands/simple/isoread.c	Sat Nov  3 01:17:36 2001
X@@ -127,6 +127,9 @@
X #define IS_DOT_DOT(PTR) (PTR->name_length[0] == 1 && PTR->name[0] == 1 ? 1 : 0)
X #define IS_DIR(PTR) (PTR->flags[-High_Sierra] & 2 ? 1 : 0)
X 
X+#ifndef _PROTOTYPE
X+#define _PROTOTYPE(x,y) x __P(y)
X+#endif
X 
X _PROTOTYPE (int main, (int argc, char **argv));
X _PROTOTYPE (int iso_cmp, (char *name, struct dir_entry *dir_ptr, int dir_flag));
X--- work.old/src/commands/simple/join.c	Tue Oct  1 14:00:00 1996
X+++ work.new/src/commands/simple/join.c	Sat Nov  3 01:17:44 2001
X@@ -11,7 +11,10 @@
X 
X #define MAXFLD	200		/* maximum # of fields to accept */
X 
X-_PROTOTYPE(void main, (int argc, char **argv));
X+#ifndef _PROTOTYPE
X+#define _PROTOTYPE(x,y) x __P(y)
X+#endif
X+
X _PROTOTYPE(void error, (char *s, char *t));
X _PROTOTYPE(void usage, (void));
X _PROTOTYPE(void match, (void));
X@@ -58,7 +61,7 @@
X char sep;			/* c for -tc: filed separator */
X char *cmd;			/* name of this program */
X 
X-void main(argc, argv)
X+main(argc, argv)
X int argc;
X char **argv;
X {
X--- work.old/src/commands/simple/kill.c	Tue Oct  1 14:00:00 1996
X+++ work.new/src/commands/simple/kill.c	Fri Nov  2 20:23:49 2001
X@@ -7,6 +7,14 @@
X #include <string.h>
X #include <stdio.h>
X 
X+#ifndef _NSIG
X+#define _NSIG NSIG
X+#endif
X+
X+#ifndef _PROTOTYPE
X+#define _PROTOTYPE(x,y) x __P(y)
X+#endif
X+
X _PROTOTYPE(int main, (int argc, char **argv));
X _PROTOTYPE(void usage, (void));
X 
X--- work.old/src/commands/simple/last.c	Tue Oct  1 14:00:00 1996
X+++ work.new/src/commands/simple/last.c	Sat Nov  3 01:24:31 2001
X@@ -84,6 +84,10 @@
X logout *first_link = NULL;	/* List of logout times */
X int interrupt = FALSE;		/* If sigint or sigquit occurs */
X 
X+#ifndef _PROTOTYPE
X+#define _PROTOTYPE(x,y) x __P(y)
X+#endif
X+
X _PROTOTYPE(int main, (int argc, char **argv));
X _PROTOTYPE(void Sigint, (int sig));
X _PROTOTYPE(void Sigquit, (int sig));
X@@ -306,7 +310,7 @@
X int argc;
X char *argv[];
X {
X-  char *wtmp_file = WTMP;
X+  char *wtmp_file = "%%MINIX_PREFIX%%/var/db/wtmp";
X   FILE *f;
X   long size;			/* Number of wtmp records in the file	 */
X   long now;			/* time */
X--- work.old/src/commands/simple/leave.c	Tue Oct  1 14:00:00 1996
X+++ work.new/src/commands/simple/leave.c	Sat Nov  3 01:24:40 2001
X@@ -57,8 +57,11 @@
X   "You're going to be late!"	/* for all subsequent warnings */
X };
X 
X+#ifndef _PROTOTYPE
X+#define _PROTOTYPE(x,y) x __P(y)
X+#endif
X 
X-_PROTOTYPE(int main, (int argc, char **argv));
X+_PROTOTYPE(char *cuserid, (char *s));
X _PROTOTYPE(void Usage, (void));
X _PROTOTYPE(void Get_Hour_Min, (char *when, int *hour, int *min));
X _PROTOTYPE(int Still_Logged_On, (char *user, char *tty));
X@@ -102,7 +105,7 @@
X   FILE *f;
X   struct utmp login;
X 
X-  if ((f = fopen(UTMP, "r")) == NULL)
X+  if ((f = fopen("%%MINIX_PREFIX%%/var/run/utmp", "r")) == NULL)
X 	/* no login/logout records kept */
X 	return(1);
X 
X--- work.old/src/commands/simple/life.c	Tue Oct  1 14:00:00 1996
X+++ work.new/src/commands/simple/life.c	Sat Nov  3 01:20:30 2001
X@@ -44,6 +44,10 @@
X WINDOW *mns;			/* Main Screen */
X WINDOW *info;			/* Bottom line */
X 
X+#ifndef _PROTOTYPE
X+#define _PROTOTYPE(x,y) x __P(y)
X+#endif
X+
X _PROTOTYPE(void cleanup, (int s));
X _PROTOTYPE(void initialize, (void));
X _PROTOTYPE(void makscr, (void));
X--- work.old/src/commands/simple/login.c	Tue Oct  1 14:00:00 1996
X+++ work.new/src/commands/simple/login.c	Sat Nov  3 01:24:57 2001
X@@ -70,12 +70,21 @@
X #include <unistd.h>
X #include <utmp.h>
X #include <time.h>
X+#ifdef __FreeBSD__
X+#define std_err(x) warn("%s",x)
X+#define ut_user ut_name
X+#else
X #include <minix/minlib.h>
X+#endif
X 
X-char PATH_UTMP[] = "/etc/utmp";			/* current logins */
X-char PATH_WTMP[] = "/usr/adm/wtmp";		/* login/logout history */
X-char PATH_LASTLOG[] = "/usr/adm/lastlog";	/* last login history */
X-char PATH_MOTD[] = "/etc/motd";			/* message of the day */
X+#ifndef _NSIG
X+#define _NSIG NSIG
X+#endif
X+
X+char PATH_UTMP[] = "%%MINIX_PREFIX%%/var/run/utmp";			/* current logins */
X+char PATH_WTMP[] = "%%MINIX_PREFIX%%/var/db/wtmp";		/* login/logout history */
X+char PATH_LASTLOG[] = "%%MINIX_PREFIX%%/var/db/lastlog";	/* last login history */
X+char PATH_MOTD[] = "%%MINIX_PREFIX%%/etc/motd";			/* message of the day */
X 
X #define TTY_GID		4			/* group ID of ttys */
X 
X@@ -94,6 +103,11 @@
X char **env;
X extern char **environ;
X 
X+
X+#ifndef _PROTOTYPE
X+#define _PROTOTYPE(x,y) x __P(y)
X+#endif
X+
X _PROTOTYPE(int main, (int argc, char **argv));
X _PROTOTYPE(void wtmp, (char *user, int uid));
X _PROTOTYPE(void show_file, (char *nam));
X@@ -133,9 +147,11 @@
X   strncpy(entry.ut_user, user, sizeof(entry.ut_user));
X   if (hostname) strncpy(entry.ut_host, hostname, sizeof(entry.ut_host));
X 
X+#ifndef __FreeBSD__
X   if (entry.ut_pid == 0) entry.ut_pid = getpid();
X 
X   entry.ut_type = USER_PROCESS;		/* we are past login... */
X+#endif
X   time(&entry.ut_time);
X 
X   /* Write a WTMP record. */
X@@ -335,7 +351,7 @@
X 		}
X 	}
X 	/* Check if the system is going down  */
X-	if (access("/etc/nologin", 0) == 0 && strcmp(name, "root") != 0) {
X+	if (access("%%MINIX_PREFIX%%/etc/nologin", 0) == 0 && strcmp(name, "root") != 0) {
X 		write(1, "System going down\n\n", 19);
X 		continue;
X 	}
X--- work.old/src/commands/simple/look.c	Tue Oct  1 14:00:00 1996
X+++ work.new/src/commands/simple/look.c	Sat Nov  3 01:38:45 2001
X@@ -29,12 +29,16 @@
X #include <stdio.h>
X 
X #ifdef UNIX
X-#define  WORDS   "/usr/dict/words"
X+#define  WORDS   "%%MINIX_PREFIX%%/share/dict/words"
X #else
X #define  WORDS   "/usr/lib/dict/words"
X #endif
X 
X #define  MAX_WORD_LENGTH   80	/* including '\0'  */
X+
X+#ifndef _PROTOTYPE
X+#define _PROTOTYPE(x,y) x __P(y)
X+#endif
X 
X _PROTOTYPE(int main, (int argc, char **argv));
X _PROTOTYPE(void Fold, (char *str));
X--- work.old/src/commands/simple/lp.c	Tue Oct  1 14:00:00 1996
X+++ work.new/src/commands/simple/lp.c	Fri Nov  2 20:23:49 2001
X@@ -12,8 +12,7 @@
X #include <errno.h>
X #include <sys/wait.h>
X 
X-char LPD1[] = "/usr/sbin/lpd";		/* Proper place of lpd */
X-char LPD2[] = "/usr/bin/lpd";		/* Minix has no sbin directories. */
X+char LPD1[] = "%%MINIX_PREFIX%%/bin/lpd";		/* Proper place of lpd */
X 
X void report(char *mess)
X {
X@@ -33,9 +32,7 @@
X 
X 	if (file[0] != '/' || (pid= fork()) == 0) {
X 		execl(LPD1, LPD1, file, (char *) nil);
X-		if (errno != ENOENT) fatal(LPD1);
X-		execl(LPD2, LPD2, file, (char *) nil);
X-		fatal(LPD2);
X+		fatal(LPD1);
X 	}
X 
X 	if (pid < 0) fatal("can't fork");
X--- work.old/src/commands/simple/lpd.c	Tue Oct  1 14:00:00 1996
X+++ work.new/src/commands/simple/lpd.c	Sat Nov  3 01:25:58 2001
X@@ -14,8 +14,8 @@
X #include <unistd.h>
X #include <termcap.h>
X 
X-char PRINTER[] =	"/dev/lp";
X-char SPOOL[] =		"/usr/spool/lpd";
X+char PRINTER[] =	"/dev/lpt0";
X+char SPOOL[] =		"%%MINIX_PREFIX%%/var/spool/lpd";
X char LOG[] =		"/dev/log";
X 
X void report(char *mess)
X--- work.old/src/commands/simple/ls.c	Tue Oct  1 14:00:00 1996
X+++ work.new/src/commands/simple/ls.c	Fri Nov  2 20:23:49 2001
X@@ -438,6 +438,10 @@
X static int (*CMP)(struct file *f1, struct file *f2);
X static int (*rCMP)(struct file *f1, struct file *f2);
X 
X+#ifdef __FreeBSD__
X+#define mergesort xmergesort
X+#endif
X+
X static void mergesort(struct file **al)
X /* This is either a stable mergesort, or thermal noise, I'm no longer sure.
X  * It must be called like this: if (L != nil && L->next != nil) mergesort(&L);
X--- work.old/src/commands/simple/mail.c	Tue Oct  1 14:00:00 1996
X+++ work.new/src/commands/simple/mail.c	Sat Nov  3 01:43:31 2001
X@@ -22,16 +22,16 @@
X #define D(Q)
X #endif
X 
X-#define SHELL		"/bin/sh"
X+#define SHELL		"%%MINIX_PREFIX%%/bin/sh"
X 
X-#define DROPNAME 	"/usr/spool/mail/%s"
X-#define LOCKNAME	"/usr/spool/mail/%s.lock"
X+#define DROPNAME 	"%%MINIX_PREFIX%%/var/mail/%s"
X+#define LOCKNAME	"%%MINIX_PREFIX%%/var/mail/%s.lock"
X #define LOCKWAIT	5	/* seconds to wait after collision */
X #define LOCKTRIES	4	/* maximum number of collisions */
X 
X #define MBOX		"mbox"
X 
X-#define HELPFILE	"/usr/lib/mail.help"
X+#define HELPFILE	"%%MINIX_PREFIX%%/share/misc/mail.help"
X #define PROMPT		"? "
X #define PATHLEN		80
X #define MAXRCPT		100	/* maximum number of recipients */
X@@ -69,6 +69,10 @@
X 
X extern int optind;
X extern char *optarg;
X+
X+#ifndef _PROTOTYPE
X+#define _PROTOTYPE(x,y) x __P(y)
X+#endif
X 
X _PROTOTYPE(int main, (int argc, char **argv));
X _PROTOTYPE(int deliver, (int count, char *vec []));
X--- work.old/src/commands/simple/man.c	Tue Oct  1 14:00:00 1996
X+++ work.new/src/commands/simple/man.c	Sun Nov  4 01:41:28 2001
X@@ -16,8 +16,8 @@
X #include <sys/wait.h>
X 
X /* Defaults: */
X-char MANPATH[]=	"/usr/local/man:/usr/man";
X-char PAGER[]=	"more";
X+char MANPATH[]=	"%%MINIX_PREFIX%%/share/man";
X+char PAGER[]=	"%%MINIX_PREFIX%%/bin/more";
X 
X #define arraysize(a)	(sizeof(a) / sizeof((a)[0]))
X #define arraylimit(a)	((a) + arraysize(a))
X@@ -187,7 +187,7 @@
X int whatis= 0;		/* man -f word == whatis word. */
X int apropos= 0;		/* man -k word == apropos word. */
X enum ROFF { NROFF, TROFF } rofftype= NROFF;
X-char *roff[] = { "nroff", "troff" };
X+char *roff[] = { "%%MINIX_PREFIX%%/bin/nroff", "%%MINIX_PREFIX%%/bin/troff" };
X 
X int shown;		/* True if something has been shown. */
X int tty;		/* True if displaying on a terminal. */
X@@ -339,7 +339,7 @@
X 	execute(1, keyword);
X }
X 
X-enum pagetype { CAT, CATZ, MAN, MANZ };
X+enum pagetype { CAT, CATGZ, CATZ, MAN, MANGZ, MANZ };
X 
X int showpage(char *page, enum pagetype ptype, char *macros)
X /* Show a manual page if it exists using the proper decompression and
X@@ -354,11 +354,15 @@
X 	if (!S_ISREG(st.st_mode)) return 0;
X 	if ((st.st_mode & 0111) && page[0] != '/') return 0;
X 
X+	if (ptype == CATGZ || ptype == MANGZ) {
X+		putinline("gzcat", (char *) nil);
X+	}
X+
X 	if (ptype == CATZ || ptype == MANZ) {
X-		putinline("zcat", (char *) nil);
X+		putinline("%%MINIX_PREFIX%%/bin/zcat", (char *) nil);
X 	}
X 
X-	if (ptype == MAN || ptype == MANZ) {
X+	if (ptype == MAN || ptype == MANGZ || ptype == MANZ) {
X 		putinline(roff[rofftype], macros, (char *) nil);
X 	}
X 
X@@ -406,12 +410,16 @@
X 	} *sp;
X 	static struct searchnames searchN[] = {
X 		{ CAT,	"%s/cat%s/%s.%s"	},	/* SysV */
X+		{ CATGZ, "%s/cat%s/%s.%s.gz"	},
X 		{ CATZ,	"%s/cat%s/%s.%s.Z"	},
X 		{ MAN,	"%s/man%s/%s.%s"	},
X+		{ MANGZ, "%s/man%s/%s.%s.gz"	},
X 		{ MANZ,	"%s/man%s/%s.%s.Z"	},
X 		{ CAT,	"%s/cat%.1s/%s.%s"	},	/* BSD */
X+		{ CATGZ, "%s/cat%.1s/%s.%s.gz"	},
X 		{ CATZ,	"%s/cat%.1s/%s.%s.Z"	},
X 		{ MAN,	"%s/man%.1s/%s.%s"	},
X+		{ MANGZ, "%s/man%.1s/%s.%s.gz"	},
X 		{ MANZ,	"%s/man%.1s/%s.%s.Z"	},
X 	};
X 
X@@ -436,12 +444,16 @@
X 
X 		/* When looking for getc(1S) we try:
X 		 *	cat1s/getc.1s
X+		 *	cat1s/getc.1s.gz
X 		 *	cat1s/getc.1s.Z
X 		 *	man1s/getc.1s
X+		 *	man1s/getc.1s.gz
X 		 *	man1s/getc.1s.Z
X 		 *	cat1/getc.1s
X+		 *	cat1/getc.1s.gz
X 		 *	cat1/getc.1s.Z
X 		 *	man1/getc.1s
X+		 *	man1/getc.1s.gz
X 		 *	man1/getc.1s.Z
X 		 */
X 
X--- work.old/src/commands/simple/men.c	Tue Oct  1 14:00:00 1996
X+++ work.new/src/commands/simple/men.c	Sat Nov  3 01:43:48 2001
X@@ -94,6 +94,10 @@
X char *clr_str = "\033[H\033[0J";	/* ANSI for clear the screen */
X char *ret_str = "echo '\n\nPlease hit RETURN to go back to the menu';read ret";
X 
X+#ifndef _PROTOTYPE
X+#define _PROTOTYPE(x,y) x __P(y)
X+#endif
X+
X _PROTOTYPE(int main, (int argc, char **argv));
X _PROTOTYPE(void read_file, (int argc, char *argv []));
X _PROTOTYPE(void build_item_table, (void));
X--- work.old/src/commands/simple/mesg.c	Tue Oct  1 14:00:00 1996
X+++ work.new/src/commands/simple/mesg.c	Sat Nov  3 01:43:59 2001
X@@ -20,8 +20,6 @@
X #include <stdlib.h>
X #include <unistd.h>
X 
X-_PROTOTYPE( int main, (int argc, char *argv []) );
X-
X int main(argc, argv)
X int  argc;
X char *argv[];
X--- work.old/src/commands/simple/mkdir.c	Tue Oct  1 14:00:00 1996
X+++ work.new/src/commands/simple/mkdir.c	Sat Nov  3 01:44:06 2001
X@@ -8,7 +8,11 @@
X 
X #include <sys/types.h>
X #include <sys/stat.h>
X+#ifdef __FreeBSD__
X+#define std_err(x) warn("%s",x)
X+#else
X #include <minix/minlib.h>
X+#endif
X #include <limits.h>
X #include <errno.h>
X #include <string.h>
X@@ -36,8 +40,12 @@
X mode_t u_mask;
X struct stat st;
X 
X+#ifndef _PROTOTYPE
X+#define _PROTOTYPE(x,y) x __P(y)
X+#endif
X+
X _PROTOTYPE(int main, (int argc, char **argv));
X-_PROTOTYPE(mode_t parsemode, (char *symbolic, Mode_t oldmode));
X+_PROTOTYPE(mode_t parsemode, (char *symbolic, mode_t oldmode));
X _PROTOTYPE(int makepath, (char *fordir));
X _PROTOTYPE(int makedir, (char *dirname));
X _PROTOTYPE(void usage, (void));
X--- work.old/src/commands/simple/mkfifo.c	Tue Oct  1 14:00:00 1996
X+++ work.new/src/commands/simple/mkfifo.c	Sat Nov  3 01:44:11 2001
X@@ -11,7 +11,11 @@
X #include <sys/stat.h>
X #include <string.h>
X #include <unistd.h>
X+#ifdef __FreeBSD__
X+#define std_err(x) warn("%s",x)
X+#else
X #include <minix/minlib.h>
X+#endif
X #include <stdio.h>
X 
X #define USR_MODES (S_ISUID|S_IRWXU)
X@@ -28,8 +32,12 @@
X /* Global u_mask needed in changemode.h */
X mode_t u_mask;
X 
X+#ifndef _PROTOTYPE
X+#define _PROTOTYPE(x,y) x __P(y)
X+#endif
X+
X _PROTOTYPE(int main, (int argc, char **argv));
X-_PROTOTYPE(mode_t parsemode, (char *symbolic, Mode_t oldmode));
X+_PROTOTYPE(mode_t parsemode, (char *symbolic, mode_t oldmode));
X _PROTOTYPE(void usage, (void));
X 
X /* Parse a P1003.2 4.7.7-conformant symbolic mode. */
X--- work.old/src/commands/simple/mknod.c	Tue Oct  1 14:00:00 1996
X+++ work.new/src/commands/simple/mknod.c	Sat Nov  3 01:44:24 2001
X@@ -3,9 +3,17 @@
X #include <sys/types.h>
X #include <stdlib.h>
X #include <unistd.h>
X+#ifdef __FreeBSD__
X+#define std_err(x) warn("%s",x)
X+#else
X #include <minix/minlib.h>
X+#endif
X #include <errno.h>
X #include <stdio.h>
X+
X+#ifndef _PROTOTYPE
X+#define _PROTOTYPE(x,y) x __P(y)
X+#endif
X 
X _PROTOTYPE(int main, (int argc, char *argv []));
X _PROTOTYPE(void badcomm, (void));
X--- work.old/src/commands/simple/mkproto.c	Tue Oct  1 14:00:00 1996
X+++ work.new/src/commands/simple/mkproto.c	Sat Nov  3 01:44:30 2001
X@@ -18,8 +18,10 @@
X #define DEF_INODES	63
X #define DEF_INDENTSTR	"\t"
X 
X+#ifndef __FreeBSD__
X #define major(x) ( (x>>8) & 0377)
X #define minor(x) (x & 0377)
X+#endif
X 
X /* Globals. */
X int count, origlen, tabs;
X@@ -31,6 +33,10 @@
X 
X extern int optind;
X extern char *optarg;
X+
X+#ifndef _PROTOTYPE
X+#define _PROTOTYPE(x,y) x __P(y)
X+#endif
X 
X _PROTOTYPE(int main, (int argc, char **argv));
X _PROTOTYPE(void descend, (char *dirname));
X--- work.old/src/commands/simple/mref.c	Tue Oct  1 14:00:00 1996
X+++ work.new/src/commands/simple/mref.c	Sat Nov  3 01:46:16 2001
X@@ -162,6 +162,10 @@
X FILE *tmp;			/* for collecting cross references */
X FILE *sortf;			/* for sorting cross refernces */
X 
X+#ifndef _PROTOTYPE
X+#define _PROTOTYPE(x,y) x __P(y)
X+#endif
X+
X _PROTOTYPE(int main, (int argc, char **argv));
X _PROTOTYPE(int eat_flag, (char *argv [], int i));
X _PROTOTYPE(void make_files, (void));
X@@ -1071,8 +1075,7 @@
X 	close(1);
X 	if (open(TMP_FILE, O_RDONLY) < 0) exit(1);
X 	if (creat(SORTED_FILE, 0644) < 0) exit(2);
X-	execl("/bin/sort", "sort", (char *) 0);
X-	execl("/usr/bin/sort", "sort", (char *) 0);
X+	execl("%%MINIX_PREFIX%%/bin/sort", "sort", (char *) 0);
X 	exit(3);
X   }
X }
X--- work.old/src/commands/simple/mt.c	Tue Oct  1 14:00:00 1996
X+++ work.new/src/commands/simple/mt.c	Sat Nov  3 00:40:23 2001
X@@ -16,7 +16,16 @@
X #include <sys/mtio.h>
X 
X /* Default tape device. */
X+#ifdef __FreeBSD__
X+#define MTEOM MTEOD
X+#define MTRETEN MTRETENS
X+#define MTMODE MTSETDNSTY
X+#define MTBLKZ MTSETBSIZ
X+#define mt_blksize mt_blksiz
X+char DEFAULT_TAPE[]= "/dev/nrsa0";
X+#else
X char DEFAULT_TAPE[]= "/dev/nrst4";
X+#endif
X 
X /* Device status. */
X #define DS_OK		0
X--- work.old/src/commands/simple/od.c	Tue Oct  1 14:00:00 1996
X+++ work.new/src/commands/simple/od.c	Sat Nov  3 01:47:43 2001
X@@ -15,6 +15,10 @@
X int next;
X int bytespresent;
X 
X+#ifndef _PROTOTYPE
X+#define _PROTOTYPE(x,y) x __P(y)
X+#endif
X+
X _PROTOTYPE(int main, (int argc, char **argv));
X _PROTOTYPE(long offset, (int argc, char *argv [], int k));
X _PROTOTYPE(void dumpfile, (void));
X--- work.old/src/commands/simple/passwd.c	Tue Oct  1 14:00:00 1996
X+++ work.new/src/commands/simple/passwd.c	Sat Nov  3 01:57:27 2001
X@@ -12,9 +12,17 @@
X #include <unistd.h>
X #include <time.h>
X #include <sys/stat.h>
X+#ifdef __FreeBSD__
X+#define std_err(x) warn("%s",x)
X+#else
X #include <minix/minlib.h>
X+#endif
X #include <stdio.h>
X 
X+#ifndef _PROTOTYPE
X+#define _PROTOTYPE(x,y) x __P(y)
X+#endif
X+
X _PROTOTYPE(void report, (char *label));
X _PROTOTYPE(void quit, (int ex_stat));
X _PROTOTYPE(void fatal, (char *label));
X@@ -22,9 +30,9 @@
X _PROTOTYPE(int goodchars, (char *s));
X _PROTOTYPE(int main, (int argc, char **argv));
X 
X-char pw_file[] = "/etc/passwd";
X-char sh_file[] = "/etc/shadow";
X-char pw_tmp[] = "/etc/ptmp";
X+char pw_file[] = "%%MINIX_PREFIX%%/etc/passwd";
X+char sh_file[] = "%%MINIX_PREFIX%%/etc/shadow";
X+char pw_tmp[] = "%%MINIX_PREFIX%%/etc/ptmp";
X char bad[] = "Permission denied\n";
X char buf[1024];
X 
X@@ -34,6 +42,44 @@
X 
X char *arg0;
X 
X+#ifdef __FreeBSD__
X+/* Integer to ASCII for signed decimal integers. */
X+
X+static int next;
X+static char qbuf[8];
X+
X+_PROTOTYPE( char *itoa, (int n));
X+
X+char *itoa(n)
X+int n;
X+{
X+  register int r, k;
X+  int flag = 0;
X+
X+  next = 0;
X+  if (n < 0) {
X+	qbuf[next++] = '-';
X+	n = -n;
X+  }
X+  if (n == 0) {
X+	qbuf[next++] = '0';
X+  } else {
X+	k = 10000;
X+	while (k > 0) {
X+		r = n / k;
X+		if (flag || r > 0) {
X+			qbuf[next++] = '0' + r;
X+			flag = 1;
X+		}
X+		n -= r * k;
X+		k = k / 10;
X+	}
X+  }
X+  qbuf[next] = 0;
X+  return(qbuf);
X+}
X+#endif
X+
X void report(label)
X char *label;
X {
X@@ -133,12 +179,14 @@
X 		strncpy(pwname, pwd->pw_passwd + 2, 8);
X 		pwname[8] = 0;
X 		name = pwname;
X+#ifndef __FreeBSD__
X 		setpwfile(sh_file);
X 		if ((pwd= getpwnam(name)) == NULL) {
X 			std_err(bad);
X 			exit(1);
X 		}
X 		printf("Changing the shadow password of %s\n", name);
X+#endif
X 	} else {
X 		printf("Changing the password of %s\n", name);
X 	}
X--- work.old/src/commands/simple/paste.c	Tue Oct  1 14:00:00 1996
X+++ work.new/src/commands/simple/paste.c	Sat Nov  3 02:03:37 2001
X@@ -90,6 +90,10 @@
X char *delims;			/* the pointer to the delimiters        */
X int number_of_delims = 1;	/* number of delimiters to use	 	 */
X 
X+#ifndef _PROTOTYPE
X+#define _PROTOTYPE(x,y) x __P(y)
X+#endif
X+
X _PROTOTYPE(int main, (int argc, char **argv));
X _PROTOTYPE(void docol, (int nfiles, char **fnamptr));
X _PROTOTYPE(void doserial, (int nfiles, char **fnamptr));
X--- work.old/src/commands/simple/pathchk.c	Tue Oct  1 14:00:00 1996
X+++ work.new/src/commands/simple/pathchk.c	Sat Nov  3 00:42:04 2001
X@@ -12,13 +12,21 @@
X #include <stdlib.h>
X #include <string.h>
X #include <unistd.h>
X+#ifdef __FreeBSD__
X+#define std_err(x) warn("%s",x)
X+#else
X #include <minix/minlib.h>
X+#endif
X #include <stdio.h>
X 
X /* Global variables. */
X char directory[PATH_MAX + 1];
X char POSIX_CHAR_SET[] = "\
X .#-0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz_~";
X+
X+#ifndef _PROTOTYPE
X+#define _PROTOTYPE(x,y) x __P(y)
X+#endif
X 
X _PROTOTYPE(int main, (int argc, char **argv));
X _PROTOTYPE(void perr, (char *name, char *msg));
X--- work.old/src/commands/simple/pr.c	Tue Oct  1 14:00:00 1996
X+++ work.new/src/commands/simple/pr.c	Sat Nov  3 02:03:55 2001
X@@ -93,6 +93,10 @@
X 
X char output[1024];
X 
X+#ifndef _PROTOTYPE
X+#define _PROTOTYPE(x,y) x __P(y)
X+#endif
X+
X _PROTOTYPE(int main, (int argc, char **argv));
X _PROTOTYPE(static char *myalloc, (size_t size));
X _PROTOTYPE(char skip_page, (int lines, int width, FILE * filep));
X--- work.old/src/commands/simple/prep.c	Tue Oct  1 14:00:00 1996
X+++ work.new/src/commands/simple/prep.c	Sat Nov  3 02:04:03 2001
X@@ -12,6 +12,10 @@
X int lfread;			/* set when last char read was lf */
X int lfwritten = 1;		/* set when last char written was lf */
X 
X+#ifndef _PROTOTYPE
X+#define _PROTOTYPE(x,y) x __P(y)
X+#endif
X+
X _PROTOTYPE(int main, (int argc, char **argv));
X _PROTOTYPE(void skipline, (void));
X _PROTOTYPE(int backslash, (void));
X--- work.old/src/commands/simple/pretty.c	Tue Oct  1 14:00:00 1996
X+++ work.new/src/commands/simple/pretty.c	Sat Nov  3 02:04:12 2001
X@@ -33,6 +33,10 @@
X char buf3[BUF_SIZE];
X int loops;
X 
X+#ifndef _PROTOTYPE
X+#define _PROTOTYPE(x,y) x __P(y)
X+#endif
X+
X _PROTOTYPE(int main, (int argc, char **argv));
X _PROTOTYPE(void indent, (char *s, char *intermediate));
X _PROTOTYPE(void process, (char *s, char *intermediate));
X--- work.old/src/commands/simple/printenv.c	Tue Oct  1 14:00:00 1996
X+++ work.new/src/commands/simple/printenv.c	Sat Nov  3 02:04:19 2001
X@@ -5,8 +5,6 @@
X 
X extern char **environ;
X 
X-_PROTOTYPE(int main, (void));
X-
X int main()
X {
X   char **sptr;
X--- work.old/src/commands/simple/proto.c	Tue Oct  1 14:00:00 1996
X+++ work.new/src/commands/simple/proto.c	Sat Nov  3 02:04:36 2001
X@@ -37,6 +37,9 @@
X Word *endlist;			/* Parentheses after the parameters */
X char *progname;			/* name of program (for error messages) */
X 
X+#ifndef _PROTOTYPE
X+#define _PROTOTYPE(x,y) x __P(y)
X+#endif
X 
X _PROTOTYPE(Word * word_alloc, (char *s));
X _PROTOTYPE(void word_free, (Word * w));
X--- work.old/src/commands/simple/pwd.c	Tue Oct  1 14:00:00 1996
X+++ work.new/src/commands/simple/pwd.c	Sat Nov  3 02:04:45 2001
X@@ -27,8 +27,6 @@
X #define SUCCESS	0		/* exit code in case of success */
X #define FAILURE 1		/*                   or failure */
X 
X-_PROTOTYPE(int main, (void));
X-
X static char dir[PATH_MAX + 1];
X static char *errmsg = "pwd: cannot search some directory on the path\n";
X 
X--- work.old/src/commands/simple/pwdauth.c	Tue Oct  1 14:00:00 1996
X+++ work.new/src/commands/simple/pwdauth.c	Sat Nov  3 02:12:57 2001
X@@ -23,9 +23,13 @@
X #include <stdio.h>
X #include <string.h>
X #include <unistd.h>
X+#ifdef __FreeBSD__
X+#define setkey SETKEY
X+#define encrypt ENCRYPT
X+#endif
X 
X #define LEN	1024
X-char SHADOW[] = "/etc/shadow";
X+char SHADOW[] = "%%MINIX_PREFIX%%/etc/shadow";
X 
X int main(int argc, char **argv)
X {
X@@ -49,8 +53,9 @@
X 		/* Get the encrypted password from the shadow password file,
X 		 * encrypt key and compare.
X 		 */
X+#ifndef __FreeBSD__
X 		setpwfile(SHADOW);
X-
X+#endif
X 		if ((pw= getpwnam(salt + 2)) == nil) return 2;
X 
X 		/* A null encrypted password matches a null key, otherwise
X--- work.old/src/commands/simple/readall.c	Tue Oct  1 14:00:00 1996
X+++ work.new/src/commands/simple/readall.c	Sat Nov  3 02:15:05 2001
X@@ -37,6 +37,10 @@
X char a[CHUNK * BLOCK_SIZE];	/* read buffer */
X long rotten[STORE];		/* list of bad blocks */
X 
X+#ifndef _PROTOTYPE
X+#define _PROTOTYPE(x,y) x __P(y)
X+#endif
X+
X _PROTOTYPE(int main, (int argc, char **argv));
X static _PROTOTYPE(void output, (long blocks_read));
X 
X--- work.old/src/commands/simple/rev.c	Tue Oct  1 14:00:00 1996
X+++ work.new/src/commands/simple/rev.c	Sat Nov  3 00:44:05 2001
X@@ -4,12 +4,20 @@
X #include <fcntl.h>
X #include <stdlib.h>
X #include <unistd.h>
X+#ifdef __FreeBSD__
X+#define std_err(x) warn("%s",x)
X+#else
X #include <minix/minlib.h>
X+#endif
X 
X #define CHUNK_SIZE	4096
X 
X #ifndef EOF
X #define	EOF	((char) -1)
X+#endif
X+
X+#ifndef _PROTOTYPE
X+#define _PROTOTYPE(x,y) x __P(y)
X #endif
X 
X _PROTOTYPE(int main, (int argc, char **argv));
X--- work.old/src/commands/simple/rmdir.c	Tue Oct  1 14:00:00 1996
X+++ work.new/src/commands/simple/rmdir.c	Sat Nov  3 00:45:16 2001
X@@ -1,13 +1,15 @@
X /* rmdir - remove a directory		Author: Bruce Evans */
X 
X+#ifdef __FreeBSD__
X+#define std_err(x) warn("%s",x)
X+#else
X #include <minix/minlib.h>
X+#endif
X #include <sys/types.h>
X #include <errno.h>
X #include <stdlib.h>
X #include <unistd.h>
X #include <stdio.h>
X-
X-_PROTOTYPE(int main, (int argc, char **argv));
X 
X int main(argc, argv)
X int argc;
X--- work.old/src/commands/simple/roff.c	Tue Oct  1 14:00:00 1996
X+++ work.new/src/commands/simple/roff.c	Sat Nov  3 02:20:47 2001
X@@ -24,7 +24,7 @@
X #include <unistd.h>
X #include <stdio.h>
X 
X-#define SUFTAB	"/usr/lib/suftab"
X+#define SUFTAB	"%%MINIX_PREFIX%%/share/misc/suftab"
X #define TXTLEN	(o_pl-o_m1-o_m2-o_m3-o_m4-2)
X #define IDTLEN	(o_ti>=0?o_ti:o_in)
X #define MAXMAC	64
X@@ -81,6 +81,10 @@
X char *mfilnam = "/tmp/rtmXXXXXX";
X int c;				/* LAST CHAR READ */
X struct termios tty;
X+
X+#ifndef _PROTOTYPE
X+#define _PROTOTYPE(x,y) x __P(y)
X+#endif
X 
X _PROTOTYPE(int main, (int argc, char **argv));
X _PROTOTYPE(void mesg, (int f));
X--- work.old/src/commands/simple/sed.c	Tue Oct  1 14:00:00 1996
X+++ work.new/src/commands/simple/sed.c	Sat Nov  3 02:21:01 2001
X@@ -211,6 +211,10 @@
X static int eflag;		/* -e option flag */
X static int gflag;		/* -g option flag */
X 
X+#ifndef _PROTOTYPE
X+#define _PROTOTYPE(x,y) x __P(y)
X+#endif
X+
X _PROTOTYPE(int main, (int argc, char **argv));
X _PROTOTYPE(static void compile, (void));
X _PROTOTYPE(static int cmdcomp, (int cchar));
X--- work.old/src/commands/simple/shar.c	Tue Oct  1 14:00:00 1996
X+++ work.new/src/commands/simple/shar.c	Fri Nov  2 20:23:50 2001
X@@ -1,7 +1,12 @@
X /* shar - make a shell archive		Author: Michiel Husijes */
X 
X+
X #include <stdlib.h>		/* for the nonstd :-( _PROTOTYPE */
X #include <stdio.h>
X+
X+#ifndef _PROTOTYPE
X+#define _PROTOTYPE(x,y) x __P(y)
X+#endif
X 
X static _PROTOTYPE( void error, (char *progname, char *operation,
X 				char *filename) );
X--- work.old/src/commands/simple/sleep.c	Tue Oct  1 14:00:00 1996
X+++ work.new/src/commands/simple/sleep.c	Sat Nov  3 00:45:22 2001
X@@ -3,9 +3,11 @@
X #include <sys/types.h>
X #include <stdlib.h>
X #include <unistd.h>
X+#ifdef __FreeBSD__
X+#define std_err(x) warn("%s",x)
X+#else
X #include <minix/minlib.h>
X-
X-_PROTOTYPE(int main, (int argc, char **argv));
X+#endif
X 
X int main(argc, argv)
X int argc;
X--- work.old/src/commands/simple/sort.c	Tue Oct  1 14:00:00 1996
X+++ work.new/src/commands/simple/sort.c	Fri Nov  2 20:23:50 2001
X@@ -126,6 +126,11 @@
X char USAGE[] = "Usage: sort [-funbirdcmt'x'] [+beg_pos [-end_pos]] [-o outfile] [file] ..";
X 
X /* Forward declarations */
X+
X+#ifndef _PROTOTYPE
X+#define _PROTOTYPE(x,y) x __P(y)
X+#endif
X+
X _PROTOTYPE(int main, (int argc, char **argv));
X _PROTOTYPE(void get_opts, (char *ptr, FIELD * field));
X _PROTOTYPE(void new_field, (FIELD * field, int *offset, BOOL beg_fl));
X--- work.old/src/commands/simple/split.c	Tue Oct  1 14:00:00 1996
X+++ work.new/src/commands/simple/split.c	Sat Nov  3 00:45:37 2001
X@@ -5,7 +5,11 @@
X #include <stdlib.h>
X #include <string.h>
X #include <unistd.h>
X+#ifdef __FreeBSD__
X+#define std_err(x) warn("%s",x)
X+#else
X #include <minix/minlib.h>
X+#endif
X 
X #define CHUNK_SIZE	1024
X 
X@@ -13,6 +17,10 @@
X int infile;
X char out_file[100];
X char *suffix;
X+
X+#ifndef _PROTOTYPE
X+#define _PROTOTYPE(x,y) x __P(y)
X+#endif
X 
X _PROTOTYPE(int main, (int argc, char **argv));
X _PROTOTYPE(void split, (void));
X--- work.old/src/commands/simple/strings.c	Tue Oct  1 14:00:00 1996
X+++ work.new/src/commands/simple/strings.c	Sat Nov  3 00:45:57 2001
X@@ -54,6 +54,10 @@
X #define	STRLEN		4	/* default minimum string length */
X #define STRBUF		512	/* buffer length for strings */
X 
X+#ifndef _PROTOTYPE
X+#define _PROTOTYPE(x,y) x __P(y)
X+#endif
X+
X _PROTOTYPE(int main, (int argc, char **argv));
X _PROTOTYPE(void strings, (char *filename));
X _PROTOTYPE(void usage, (void));
X--- work.old/src/commands/simple/stty.c	Tue Oct  1 14:00:00 1996
X+++ work.new/src/commands/simple/stty.c	Fri Nov  2 21:17:37 2001
X@@ -95,7 +95,6 @@
X #define PROTO(a) ()
X #endif
X 
X-void main PROTO(( int argc, char **argv ));
X void report PROTO(( int flags ));
X int option PROTO(( char *opt, char *next ));
X int match PROTO(( char *s1, char *s2 ));
X@@ -114,7 +113,7 @@
X #define print_char(c,d,n,a) (do_print_char((unsigned)(c),(unsigned)(d),(n),(a)))
X #define print_num(m,d,n,a) (do_print_num((unsigned)(m),(unsigned)(d),(n),(a)))
X 
X-void main(argc, argv)
X+main(argc, argv)
X int argc;
X char *argv[];
X {
X--- work.old/src/commands/simple/su.c	Tue Oct  1 14:00:00 1996
X+++ work.new/src/commands/simple/su.c	Sat Nov  3 02:22:18 2001
X@@ -5,13 +5,15 @@
X #include <stdlib.h>
X #include <string.h>
X #include <unistd.h>
X+#ifdef __FreeBSD__
X+#define std_err(x) warn("%s",x)
X+#else
X #include <minix/minlib.h>
X+#endif
X 
X /* True iff the invoker need not give a password. */
X #define privileged()	(getgid() == 0)
X 
X-_PROTOTYPE(int main, (int argc, char **argv));
X-
X int main(argc, argv)
X int argc;
X char *argv[];
X@@ -19,8 +21,8 @@
X   register char *name, *password;
X   char *shell;
X   char arg0[20];
X-  static char shell1[] = "/bin/sh";
X-  static char shell2[] = "/usr/bin/sh";
X+  static char shell1[] = "%%MINIX_PREFIX%%/bin/sh";
X+  static char shell2[] = "%%MINIX_PREFIX%%/bin/ash";
X   int nr, login_shell = 0;
X   register struct passwd *pwd;
X   static char USER[20], LOGNAME[25], HOME[100], SHELL[100];
X--- work.old/src/commands/simple/sum.c	Tue Oct  1 14:00:00 1996
X+++ work.new/src/commands/simple/sum.c	Sat Nov  3 02:22:25 2001
X@@ -15,7 +15,11 @@
X #include <fcntl.h>
X #include <stdlib.h>
X #include <unistd.h>
X+#ifdef __FreeBSD__
X+#define std_err(x) warn("%s",x)
X+#else
X #include <minix/minlib.h>
X+#endif
X #include <stdio.h>
X 
X #define BUFFER_SIZE (512)
X@@ -23,6 +27,10 @@
X int rc = 0;
X 
X char *defargv[] = {"-", 0};
X+
X+#ifndef _PROTOTYPE
X+#define _PROTOTYPE(x,y) x __P(y)
X+#endif
X 
X _PROTOTYPE(int main, (int argc, char **argv));
X _PROTOTYPE(void error, (char *s, char *f));
X--- work.old/src/commands/simple/sync.c	Tue Oct  1 14:00:00 1996
X+++ work.new/src/commands/simple/sync.c	Sat Nov  3 02:22:55 2001
X@@ -3,8 +3,6 @@
X #include <sys/types.h>
X #include <unistd.h>
X 
X-_PROTOTYPE(int main, (void));
X-
X int main()
X {
X /* First prize in shortest useful program contest. */
X--- work.old/src/commands/simple/synctree.c	Tue Oct  1 14:00:00 1996
X+++ work.new/src/commands/simple/synctree.c	Fri Nov  2 21:21:47 2001
X@@ -47,7 +47,16 @@
X #define LITTLE_ENDIAN	(CHIP == INTEL)
X #define USE_SHADOWING	(CHIP == M68000)
X #else
X+#ifdef __FreeBSD__
X+#if BYTE_ORDER != LITTLE_ENDIAN
X+#undef LITTLE_ENDIAN
X+#define LITTLE_ENDIAN	1
X+#else
X+#undef LITTLE_ENDIAN
X+#endif
X+#else
X #define LITTLE_ENDIAN	0
X+#endif
X #define USE_SHADOWING	0
X #endif
X 
X--- work.old/src/commands/simple/tail.c	Tue Oct  1 14:00:00 1996
X+++ work.new/src/commands/simple/tail.c	Fri Nov  2 20:23:50 2001
X@@ -83,6 +83,10 @@
X #define FALSE 0
X #define TRUE 1
X 
X+#ifndef _PROTOTYPE
X+#define _PROTOTYPE(x,y) x __P(y)
X+#endif
X+
X /* Internal functions - prototyped under Minix */
X _PROTOTYPE(int main, (int argc, char **argv));
X _PROTOTYPE(int tail, (int count, int bytes, int read_until_killed));
X--- work.old/src/commands/simple/tar.c	Tue Oct  1 14:00:00 1996
X+++ work.new/src/commands/simple/tar.c	Sat Nov  3 02:23:19 2001
X@@ -73,6 +73,39 @@
X #include <stdio.h>		/* need NULL */
X #include <errno.h>
X 
X+#ifdef __FreeBSD__
X+#define TBLOCK		512
X+#define NAMSIZ		100
X+#define PFXSIZ		155
X+#define TUNMLEN		8
X+#define TSIZLEN		12
X+#define TGNMLEN		32
X+struct header
X+{
X+        char            name[NAMSIZ];
X+        char            mode[8 ];
X+        char            uid[TUNMLEN];
X+        char            gid[TUNMLEN];
X+        char            size[TSIZLEN];
X+        char            mtime[12 ];
X+        char            chksum[8 ];
X+        char            typeflag;
X+        char            linkname[NAMSIZ];
X+        char            magic[6 ];
X+        char            version[2 ];
X+        char            uname[TGNMLEN];
X+        char            gname[TGNMLEN];
X+        char            devmajor[8 ];
X+        char            devminor[8 ];
X+        char            prefix[155 ];
X+};
X+union hblock
X+{
X+        char            dummy[TBLOCK];
X+        struct header   dbuf;
X+};
X+#endif
X+
X #define	POSIX_COMP		/* POSIX compatible */
X #define DIRECT_3		/* use directory(3) routines */
X 
X@@ -187,6 +220,10 @@
X #define block_size()	(int) ((convert(header.member.m_size, LONG_TYPE) \
X   + (long) TBLOCK_SIZE - 1) / (long) TBLOCK_SIZE)
X 
X+#ifndef _PROTOTYPE
X+#define _PROTOTYPE(x,y) x __P(y)
X+#endif
X+
X _PROTOTYPE(int main, (int argc, char **argv));
X _PROTOTYPE(void error, (char *s1, char *s2));
X _PROTOTYPE(BOOL get_header, (void));
X@@ -880,8 +917,8 @@
X 	strncpy(header.dbuf.size, "0", (size_t) TSIZLEN);
X   string_print(header.member.m_time, "%L ", st->st_mtime);
X   strncpy(header.dbuf.magic, TMAGIC, (size_t) TMAGLEN);
X-  header.dbuf.version[0] = 0;
X-  header.dbuf.version[1] = 0;
X+  header.dbuf.version[0] = TVERSION[0];
X+  header.dbuf.version[1] = TVERSION[1];
X   pwd = getpwuid(st->st_uid);
X   strncpy(header.dbuf.uname,
X 	(pwd != NULL ? pwd->pw_name : "nobody"), TUNMLEN);
X--- work.old/src/commands/simple/tee.c	Tue Oct  1 14:00:00 1996
X+++ work.new/src/commands/simple/tee.c	Sat Nov  3 02:23:37 2001
X@@ -5,14 +5,16 @@
X #include <signal.h>
X #include <unistd.h>
X #include <stdlib.h>
X+#ifdef __FreeBSD__
X+#define std_err(x) warn("%s",x)
X+#else
X #include <minix/minlib.h>
X+#endif
X 
X #define	MAXFD	18
X #define CHUNK_SIZE	4096
X 
X int fd[MAXFD];
X-
X-_PROTOTYPE(int main, (int argc, char **argv));
X 
X int main(argc, argv)
X int argc;
X--- work.old/src/commands/simple/term.c	Tue Oct  1 14:00:00 1996
X+++ work.new/src/commands/simple/term.c	Sun Nov  4 01:28:31 2001
X@@ -63,10 +63,10 @@
X 
X #define CHUNK 1024		/* how much to read at once */
X 
X-char TERM_LINE[] = "/dev/modem";/* default serial port to use */
X+char TERM_LINE[] = "/dev/cuaa0";/* default serial port to use */
X 
X 				/* device lock file */
X-char lockfile[] = "/usr/spool/locks/LK.iii.jjj.kkk";
X+char lockfile[] = "/var/spool/lock/LK..cuaa0";
X 
X char *commdev;			/* communications device a.k.a. "modem". */
X int commfd;			/* open file no. for comm device */
X@@ -111,6 +111,10 @@
X 
X #define NIL ((char *) NULL)		/* tell(fd, ..., NIL) */
X 
X+#ifndef _PROTOTYPE
X+#define _PROTOTYPE(x,y) x __P(y)
X+#endif
X+
X _PROTOTYPE(int main, (int argc, char *argv[]));
X _PROTOTYPE(void tell, (int fd, ...));
X _PROTOTYPE(void reader, (int on));
X@@ -360,9 +364,7 @@
X   }
X 
X   /* Compute the lock file name. */
X-  setnum(lockfile + 23, (stbuf.st_dev >> 8) & 0xFF);	/* FS major (why?) */
X-  setnum(lockfile + 27, (stbuf.st_rdev >> 8) & 0xFF);	/* device major */
X-  setnum(lockfile + 31, (stbuf.st_rdev >> 0) & 0xFF);	/* device minor */
X+  strcpy(lockfile + sizeof(lockfile) - 6, device+5);
X 
X   /* Try to make a lock file and put my pid in it. */
X   u = umask(0);
X--- work.old/src/commands/simple/termcap.c	Tue Oct  1 14:00:00 1996
X+++ work.new/src/commands/simple/termcap.c	Sat Nov  3 02:23:50 2001
X@@ -16,6 +16,10 @@
X /*								*/
X /****************************************************************/
X 
X+#ifndef _PROTOTYPE
X+#define _PROTOTYPE(x,y) x __P(y)
X+#endif
X+
X _PROTOTYPE(int main, (int argc, char **argv));
X _PROTOTYPE(void Print, (char *comment, char *name));
X _PROTOTYPE(void Error, (char *message, char *arg));
X--- work.old/src/commands/simple/test.c	Tue Oct  1 14:00:00 1996
X+++ work.new/src/commands/simple/test.c	Sat Nov  3 02:23:55 2001
X@@ -161,6 +161,10 @@
X char *prog;
X struct op *ip_op;
X 
X+#ifndef _PROTOTYPE
X+#define _PROTOTYPE(x,y) x __P(y)
X+#endif
X+
X _PROTOTYPE(int main, (int argc, char **argv));
X _PROTOTYPE(void syntax, (void));
X _PROTOTYPE(long num, (char *s));
X--- work.old/src/commands/simple/tget.c	Tue Oct  1 14:00:00 1996
X+++ work.new/src/commands/simple/tget.c	Fri Nov  2 21:26:10 2001
X@@ -7,9 +7,9 @@
X #include <string.h>
X #include <termcap.h>
X 
X-void fputchar(int c)
X+int fputchar(int c)
X {
X-	putchar(c);
X+	return(putchar(c));
X }
X 
X void usage(void)
X@@ -20,7 +20,7 @@
X 	exit(-1);
X }
X 
X-void main(int argc, char **argv)
X+main(int argc, char **argv)
X {
X 	char termbuf[1024];
X 	char string[256], *pstr;
X--- work.old/src/commands/simple/time.c	Tue Oct  1 14:00:00 1996
X+++ work.new/src/commands/simple/time.c	Sat Nov  3 02:24:05 2001
X@@ -8,7 +8,11 @@
X #include <stdlib.h>
X #include <unistd.h>
X #include <sys/wait.h>
X+#ifdef __FreeBSD__
X+#define std_err(x) warn("%s",x)
X+#else
X #include <minix/minlib.h>
X+#endif
X #include <stdio.h>
X 
X char **args;
X@@ -16,6 +20,10 @@
X 
X int digit_seen;
X char a[] = "12:34:56.78";
X+
X+#ifndef _PROTOTYPE
X+#define _PROTOTYPE(x,y) x __P(y)
X+#endif
X 
X _PROTOTYPE(int main, (int argc, char **argv));
X _PROTOTYPE(void print_time, (clock_t t));
X--- work.old/src/commands/simple/touch.c	Tue Oct  1 14:00:00 1996
X+++ work.new/src/commands/simple/touch.c	Sat Nov  3 02:24:09 2001
X@@ -62,6 +62,10 @@
X #	define ATIME	1
X #	define MTIME	2
X 
X+#ifndef _PROTOTYPE
X+#define _PROTOTYPE(x,y) x __P(y)
X+#endif
X+
X _PROTOTYPE(int main, (int argc, char **argv));
X _PROTOTYPE(int doit, (char *name, struct utimbuf tvp));
X _PROTOTYPE(void usage, (void));
X--- work.old/src/commands/simple/tr.c	Tue Oct  1 14:00:00 1996
X+++ work.new/src/commands/simple/tr.c	Sat Nov  3 02:24:16 2001
X@@ -27,6 +27,10 @@
X #include <stdlib.h>
X #include <unistd.h>
X 
X+#ifndef _PROTOTYPE
X+#define _PROTOTYPE(x,y) x __P(y)
X+#endif
X+
X _PROTOTYPE(int main, (int argc, char **argv));
X _PROTOTYPE(void convert, (void));
X _PROTOTYPE(void map, (unsigned char *string1, unsigned char *string2));
X--- work.old/src/commands/simple/traverse.c	Tue Oct  1 14:00:00 1996
X+++ work.new/src/commands/simple/traverse.c	Sat Nov  3 02:24:20 2001
X@@ -1,7 +1,12 @@
X /* traverse - traverse a tree		Author:	Gary Perlman */
X 
X #include <sys/types.h>
X+#ifdef __FreeBSD__
X+#include <dirent.h>
X+#define direct dirent
X+#else
X #include <sys/dir.h>
X+#endif
X #include <string.h>
X #include <limits.h>
X #include <unistd.h>
X@@ -15,6 +20,10 @@
X #define closedir(dirp) fclose (dirp)
X #define readdir myreaddir	/* someday this should use the library
X 				 * dirent routines, and report errors */
X+
X+#ifndef _PROTOTYPE
X+#define _PROTOTYPE(x,y) x __P(y)
X+#endif
X 
X _PROTOTYPE(int main, (int argc, char **argv));
X _PROTOTYPE(struct direct *readdir, (DIR *dirp));
X--- work.old/src/commands/simple/treecmp.c	Tue Oct  1 14:00:00 1996
X+++ work.new/src/commands/simple/treecmp.c	Sat Nov  3 02:24:27 2001
X@@ -41,6 +41,10 @@
X int changes;			/* set on -c flag */
X int verbose;			/* set on -v flag */
X 
X+#ifndef _PROTOTYPE
X+#define _PROTOTYPE(x,y) x __P(y)
X+#endif
X+
X _PROTOTYPE(int main, (int argc, char **argv));
X _PROTOTYPE(void compare, (char *old, char *new));
X _PROTOTYPE(void regular, (char *old, char *new));
X--- work.old/src/commands/simple/tsort.c	Tue Oct  1 14:00:00 1996
X+++ work.new/src/commands/simple/tsort.c	Sat Nov  3 02:24:32 2001
X@@ -28,6 +28,10 @@
X     vertex *v;          /* vertex to which this edge goes   */
X } edge;
X 
X+#ifndef _PROTOTYPE
X+#define _PROTOTYPE(x,y) x __P(y)
X+#endif
X+
X _PROTOTYPE(int main, (int argc, char **argv));
X _PROTOTYPE(void *xmalloc, (size_t siz));
X _PROTOTYPE(edge *new_edge, (vertex *v));
X@@ -152,7 +156,8 @@
X     char *bp;
X     vertex *child,*parent;
X     edge *e;
X-    while(gets(buf) != NULL) {
X+    while(fgets(buf, sizeof(buf), stdin) != NULL) {
X+	buf [sizeof(buf)-1] = 0;
X         bp = copyupto(name,buf,' ');
X         child = add_v(name);
X         parent = add_v(bp);
X--- work.old/src/commands/simple/ttt.c	Tue Oct  1 14:00:00 1996
X+++ work.new/src/commands/simple/ttt.c	Sat Nov  3 02:24:36 2001
X@@ -33,6 +33,10 @@
X   int path;			/* alphabeta consists of a value */
X } MOVE;				/* and an actual move (path)   */
X 
X+#ifndef _PROTOTYPE
X+#define _PROTOTYPE(x,y) x __P(y)
X+#endif
X+
X _PROTOTYPE(int main, (void));
X _PROTOTYPE(int stateval, (int board [], int whosemove));
X _PROTOTYPE(MOVE alphabeta, (int board [], int whosemove, int alpha, int beta));
X--- work.old/src/commands/simple/tty.c	Tue Oct  1 14:00:00 1996
X+++ work.new/src/commands/simple/tty.c	Sat Nov  3 02:24:43 2001
X@@ -9,8 +9,6 @@
X #include <unistd.h>
X #include <stdio.h>
X 
X-_PROTOTYPE(int main, (int argc, char **argv));
X-
X int main(argc, argv)
X int argc;
X char *argv[];
X--- work.old/src/commands/simple/uname.c	Tue Oct  1 14:00:00 1996
X+++ work.new/src/commands/simple/uname.c	Sat Nov  3 02:24:57 2001
X@@ -27,6 +27,10 @@
X #define MACHINE  ((unsigned) 0x10)
X #define ARCH     ((unsigned) 0x20)
X 
X+#ifndef _PROTOTYPE
X+#define _PROTOTYPE(x,y) x __P(y)
X+#endif
X+
X _PROTOTYPE(int main, (int argc, char **argv ));
X _PROTOTYPE(void print, (int fd, ... ));
X _PROTOTYPE(void usage, (void ));
X@@ -118,11 +122,13 @@
X 		print(STDOUT_FILENO, " ", (char *) NULL);
X 	print(STDOUT_FILENO, un.machine, (char *) NULL);
X   }
X+#ifndef __FreeBSD__
X   if ((info & ARCH) != 0) {
X 	if ((info & (SYSNAME|NODENAME|RELEASE|VERSION|MACHINE)) != 0)
X 		print(STDOUT_FILENO, " ", (char *) NULL);
X 	print(STDOUT_FILENO, un.arch, (char *) NULL);
X   }
X+#endif
X   print(STDOUT_FILENO, "\n", (char *) NULL);
X   return EXIT_SUCCESS;
X }
X--- work.old/src/commands/simple/unexpand.c	Tue Oct  1 14:00:00 1996
X+++ work.new/src/commands/simple/unexpand.c	Sat Nov  3 02:25:00 2001
X@@ -14,6 +14,10 @@
X int leading_blank = 1;		/* Only unexpand leading blanks,	    */
X /* Overruled by -a option	            */
X 
X+#ifndef _PROTOTYPE
X+#define _PROTOTYPE(x,y) x __P(y)
X+#endif
X+
X _PROTOTYPE(int main, (int argc, char **argv));
X _PROTOTYPE(void Unexpand, (FILE *f, int all));
X 
X--- work.old/src/commands/simple/uniq.c	Tue Oct  1 14:00:00 1996
X+++ work.new/src/commands/simple/uniq.c	Sat Nov  3 02:25:03 2001
X@@ -24,6 +24,10 @@
X int fields = 0;
X int chars = 0;
X 
X+#ifndef _PROTOTYPE
X+#define _PROTOTYPE(x,y) x __P(y)
X+#endif
X+
X _PROTOTYPE(int main, (int argc, char **argv));
X _PROTOTYPE(FILE *xfopen, (char *fn, char *mode));
X _PROTOTYPE(char *skip, (char *s));
X--- work.old/src/commands/simple/unshar.c	Tue Oct  1 14:00:00 1996
X+++ work.new/src/commands/simple/unshar.c	Sat Nov  3 02:25:06 2001
X@@ -52,6 +52,10 @@
X 
X extern char *optarg;
X 
X+#ifndef _PROTOTYPE
X+#define _PROTOTYPE(x,y) x __P(y)
X+#endif
X+
X _PROTOTYPE(int main, (int argc, char **argv));
X _PROTOTYPE(int fgetline, (FILE * zin, int how, char *buf, size_t max));
X _PROTOTYPE(char *getstring, (char *buf));
X@@ -166,7 +170,7 @@
X char *buf;
X {
X /* Get the next string from the buffer ignoring any quotes. */
X-  char out[BUFSIZE];
X+  static char out[BUFSIZE];
X   char *temp = out;
X   char inquotes = 0, ok = 1;
X   while ((*buf == ' ') || (*buf == '\t'))
X--- work.old/src/commands/simple/update.c	Tue Oct  1 14:00:00 1996
X+++ work.new/src/commands/simple/update.c	Sat Nov  3 02:25:13 2001
X@@ -4,8 +4,6 @@
X #include <signal.h>
X #include <unistd.h>
X 
X-_PROTOTYPE(int main, (void));
X-
X int main()
X {
X   /* Release all (?) open file descriptors. */
X--- work.old/src/commands/simple/uud.c	Tue Oct  1 14:00:00 1996
X+++ work.new/src/commands/simple/uud.c	Sat Nov  3 02:25:16 2001
X@@ -67,6 +67,10 @@
X int debug = 0, nochk = 0, onedone = 0;
X int chtbl[NCHARS], cdlen[NORMLEN + 3];
X 
X+#ifndef _PROTOTYPE
X+#define _PROTOTYPE(x,y) x __P(y)
X+#endif
X+
X _PROTOTYPE(int main, (int argc, char **argv));
X _PROTOTYPE(char *getnword, (char *str, int n));
X _PROTOTYPE(void gettable, (void));
X--- work.old/src/commands/simple/uue.c	Tue Oct  1 14:00:00 1996
X+++ work.new/src/commands/simple/uue.c	Sat Nov  3 02:25:19 2001
X@@ -50,6 +50,10 @@
X int split = 0;
X int fileln = 32000;
X 
X+#ifndef _PROTOTYPE
X+#define _PROTOTYPE(x,y) x __P(y)
X+#endif
X+
X _PROTOTYPE(int main, (int argc, char **argv));
X _PROTOTYPE(void maketable, (void));
X _PROTOTYPE(void makename, (void));
X--- work.old/src/commands/simple/wc.c	Tue Oct  1 14:00:00 1996
X+++ work.new/src/commands/simple/wc.c	Sat Nov  3 02:26:13 2001
X@@ -39,6 +39,10 @@
X long wtotal;			/* Total count of words */
X long ctotal;			/* Total count of characters */
X 
X+#ifndef _PROTOTYPE
X+#define _PROTOTYPE(x,y) x __P(y)
X+#endif
X+
X _PROTOTYPE(int main, (int argc, char **argv));
X _PROTOTYPE(void count, (FILE *f));
X _PROTOTYPE(void usage, (void));
X--- work.old/src/commands/simple/whatsnew.c	Tue Oct  1 14:00:00 1996
X+++ work.new/src/commands/simple/whatsnew.c	Sat Nov  3 02:26:18 2001
X@@ -37,6 +37,10 @@
X char *hp = heap;		/* pointer to end of the heap */
X int width = DEF_WIDTH;		/* how wide to print the listing */
X 
X+#ifndef _PROTOTYPE
X+#define _PROTOTYPE(x,y) x __P(y)
X+#endif
X+
X _PROTOTYPE(int main, (int argc, char **argv));
X _PROTOTYPE(void eat_cdif, (FILE *cdif, char *name));
X _PROTOTYPE(void read_and_print, (FILE *newf));
X--- work.old/src/commands/simple/which.c	Tue Oct  1 14:00:00 1996
X+++ work.new/src/commands/simple/which.c	Sat Nov  3 02:26:23 2001
X@@ -8,8 +8,6 @@
X #include <unistd.h>
X #include <stdio.h>
X 
X-_PROTOTYPE(int main, (int argc, char **argv));
X-
X int main(ac, av)
X int ac;
X char **av;
X--- work.old/src/commands/simple/who.c	Tue Oct  1 14:00:00 1996
X+++ work.new/src/commands/simple/who.c	Sat Nov  3 01:28:33 2001
X@@ -11,7 +11,7 @@
X #include <time.h>
X #include <string.h>
X 
X-char PATH_UTMP[] = "/etc/utmp";
X+char PATH_UTMP[] = "%%MINIX_PREFIX%%/var/run/utmp";
X 
X char day[] = "SunMonTueWedThuFriSat";
X char month[] = "JanFebMarAprMayJunJulAugSepOctNovDec";
X@@ -47,7 +47,7 @@
X 	}
X 
X 	while (fread((char *) &ut, sizeof(ut), 1, f) == 1) {
X-		if (!wtmp && ut.ut_name[0] == 0) continue;
X+		if (!wtmp && (ut.ut_name[0] == 0 || ut.ut_line[0] == 0)) continue;
X 
X 		tm= localtime(&ut.ut_time);
X 
X--- work.old/src/commands/simple/whoami.c	Tue Oct  1 14:00:00 1996
X+++ work.new/src/commands/simple/whoami.c	Sat Nov  3 02:26:32 2001
X@@ -6,8 +6,6 @@
X #include <unistd.h>
X #include <stdio.h>
X 
X-_PROTOTYPE(int main, (void));
X-
X int main()
X {
X   struct passwd *pw_entry;
X--- work.old/src/commands/simple/width.c	Tue Oct  1 14:00:00 1996
X+++ work.new/src/commands/simple/width.c	Sat Nov  3 02:26:36 2001
X@@ -18,6 +18,10 @@
X #define MAX_WIDTH	1024	/* longest acceptable line */
X #define TAB_WIDTH          8	/* spacing between tab stops */
X 
X+#ifndef _PROTOTYPE
X+#define _PROTOTYPE(x,y) x __P(y)
X+#endif
X+
X _PROTOTYPE(int main, (int argc, char **argv));
X _PROTOTYPE(void process, (FILE *in, FILE *out, int width));
X _PROTOTYPE(void cant_open, (char *program, char *file));
X--- work.old/src/commands/simple/write.c	Tue Oct  1 14:00:00 1996
X+++ work.new/src/commands/simple/write.c	Sat Nov  3 02:26:42 2001
X@@ -39,6 +39,10 @@
X 
X extern int optind;
X 
X+#ifndef _PROTOTYPE
X+#define _PROTOTYPE(x,y) x __P(y)
X+#endif
X+
X _PROTOTYPE(int main, (int argc, char **argv));
X _PROTOTYPE(char *finduser, (void));
X _PROTOTYPE(void settty, (char *utty));
X@@ -68,7 +72,7 @@
X   if (verbose) fprintf(stderr, "Trying to write to %s\n",
X 		userptr->pw_gecos);
X 
X-  if ((utmpfd = open("/etc/utmp", O_RDONLY)) < 0) {
X+  if ((utmpfd = open("%%MINIX_PREFIX%%/var/run/utmp", O_RDONLY)) < 0) {
X 	fprintf(stderr, "Cannot open utmp file\n");
X 	return(NULL);
X   }
X--- work.old/src/commands/simple/xargs.c	Tue Oct  1 14:00:00 1996
X+++ work.new/src/commands/simple/xargs.c	Sat Nov  3 02:26:48 2001
X@@ -49,8 +49,6 @@
X char *ending = NULL;
X char traceflag = 0;
X 
X-_PROTOTYPE(int main, (int argc, char **argv));
X-
X int main(ac,av)
X int ac;
X char *av[];
X@@ -86,7 +84,8 @@
X    strcpy(outlin, startlin);
X    outlen = startlen;
X 
X-   while (gets(inlin) != NULL) {
X+   while (fgets(inlin, MAX_ARGLINE, stdin) != NULL) {
X+       inlin [MAX_ARGLINE-1] = 0;
X        inlen = strlen(inlin);
X        if (maxlin <= (outlen + inlen)) {
X 	   if (outlen == startlen) {
END-of-minix/files/patch-simple
echo x - minix/files/patch-yap
sed 's/^X//' >minix/files/patch-yap << 'END-of-minix/files/patch-yap'
X--- work.old/src/commands/yap/getcomm.c	Tue Oct  1 14:00:00 1996
X+++ work.new/src/commands/yap/getcomm.c	Fri Nov  2 22:23:12 2001
X@@ -229,7 +229,7 @@
X #endif
X 			close(piped[0]);
X 		}
X-		execl("/bin/sh", "sh", "-c", comm + 1, (char *) 0);
X+		execl("%%MINIX_PREFIX%%/bin/sh", "sh", "-c", comm + 1, (char *) 0);
X 		exit(1);
X 	}
X 	(VOID) signal(SIGINT,SIG_IGN);
X@@ -251,7 +251,7 @@
X 		 */
X 	}
X 	(VOID) signal(SIGINT,catchdel);
X-	(VOID) signal(SIGQUIT,quit);
X+	(VOID) signal(SIGQUIT,catchquit);
X # ifdef SIGTSTP
X 	(VOID) signal(SIGTSTP, savetstp);
X # endif
X--- work.old/src/commands/yap/getline.c	Tue Oct  1 14:00:00 1996
X+++ work.new/src/commands/yap/getline.c	Fri Nov  2 22:05:53 2001
X@@ -205,7 +205,6 @@
X 	register char *pmem;
X 	register struct block *pblock, *bllist;
X 	char *malloc();
X-	long lseek();
X 	register long i;
X 
X 	bllist = blocklist;
X--- work.old/src/commands/yap/main.c	Tue Oct  1 14:00:00 1996
X+++ work.new/src/commands/yap/main.c	Fri Nov  2 22:23:39 2001
X@@ -30,7 +30,7 @@
X 
X STATIC int initialize();
X # ifdef SIGTSTP
X-STATIC int suspsig();
X+STATIC VOID suspsig();
X # endif
X 
X int
X@@ -58,7 +58,7 @@
X 	}
X 	if (no_tty) {
X 		*--av = "cat";
X-		execve("/bin/cat", av, (char *) 0);
X+		execve("%%MINIX_PREFIX%%/bin/cat", av, (char *) 0);
X 	}
X 	else	processfiles(argc-(av-argv), av);
X 	(VOID) quit();
X@@ -138,12 +138,12 @@
X 		(VOID) signal(SIGTSTP,suspsig);
X 	}
X # endif
X-	(VOID) signal(SIGQUIT,quit);
X+	(VOID) signal(SIGQUIT,catchquit);
X 	return 0;
X }
X 
X-int
X-catchdel() {
X+VOID
X+catchdel(fault) {
X 	(VOID) signal(SIGINT, catchdel);
X 	interrupt = 1;
X }
X@@ -183,8 +183,8 @@
X  * Just indicate that we had one, ignore further ones and return.
X  */
X 
X-STATIC int
X-suspsig() {
X+STATIC VOID
X+suspsig(fault) {
X 
X 	suspend();
X 	if (DoneSetJmp) longjmp(SetJmpBuf, 1);
X@@ -203,6 +203,11 @@
X 	resettty();
X 	flush();
X 	exit(0);
X+}
X+
X+STATIC VOID
X+catchquit(fault) {
X+	(VOID) quit();
X }
X 
X /*
X--- work.old/src/commands/yap/main.h	Tue Oct  1 14:00:00 1996
X+++ work.new/src/commands/yap/main.h	Fri Nov  2 22:20:58 2001
X@@ -31,7 +31,8 @@
X  * it couldn't open one.
X  */
X 
X-int	catchdel();
X+VOID	catchdel();
X+VOID	catchquit();
X /*
X  * int catchdel();
X  *
X--- work.old/src/commands/yap/pattern.c	Tue Oct  1 14:00:00 1996
X+++ work.new/src/commands/yap/pattern.c	Fri Nov  2 22:16:43 2001
X@@ -65,8 +65,8 @@
X 
X # if V8_REGEX
X VOID
X-regerror(str) char *str; {
X-	rc_error = str;
X+regerror(str) const char *str; {
X+	rc_error = (char *) str;
X }
X # endif V8_REGEX
X 
END-of-minix/files/patch-yap
echo x - minix/files/patch-zmodem
sed 's/^X//' >minix/files/patch-zmodem << 'END-of-minix/files/patch-zmodem'
X--- work.old/src/commands/zmodem/rz.c	Tue Oct  1 14:00:00 1996
X+++ work.new/src/commands/zmodem/rz.c	Sun Nov  4 00:40:57 2001
X@@ -1,5 +1,5 @@
X #define VERSION "2.03 05-17-88"
X-#define PUBDIR "/usr/spool/uucppublic"
X+#define PUBDIR "%%MINIX_PREFIX%%/spool/uucppublic"
X 
X /*% cc -compat -M2 -Ox -K -i -DMD -DOMEN % -o rz; size rz;
X <-xtx-*> cc386 -Ox -DMD -DOMEN -DSEGMENTS=8 rz.c -o $B/rz;  size $B/rz
X@@ -91,6 +91,9 @@
X #undef ERROR
X #define ERROR (-1)
X 
X+#ifndef _PROTOTYPE
X+#define _PROTOTYPE(x,y) x __P(y)
X+#endif
X 
X _PROTOTYPE(long getfree , (void));
X _PROTOTYPE(void alrm , (int sig ));
X@@ -919,7 +922,7 @@
X 		 */
X 		status = umask(0);	/* Get current umask */
X 		status = umask(status | (0777 & ~dmode)); /* Set for mkdir */
X-		execl("/bin/mkdir", "mkdir", dpath, (char *)0);
X+		execl("%%MINIX_PREFIX%%/bin/mkdir", "mkdir", dpath, (char *)0);
X 		_exit(-1);		/* Can't exec /bin/mkdir */
X 	
X 	default:			/* Parent process */
X@@ -1543,7 +1546,7 @@
X 	if (*s == '!')
X 		++s;
X 	mode(0);
X-	execl("/bin/sh", "sh", "-c", s);
X+	execl("%%MINIX_PREFIX%%/bin/sh", "sh", "-c", s);
X }
X #endif
X /* End of rz.c */
X--- work.old/src/commands/zmodem/sz.c	Tue Oct  1 14:00:00 1996
X+++ work.new/src/commands/zmodem/sz.c	Sun Nov  4 00:40:44 2001
X@@ -1,5 +1,5 @@
X #define VERSION "sz 2.12 05-29-88"
X-#define PUBDIR "/usr/spool/uucppublic"
X+#define PUBDIR "%%MINIX_PREFIX%%/spool/uucppublic"
X 
X /*% cc -compat -M2 -Ox -K -i -DTXBSIZE=16384  -DNFGVMIN -DREADCHECK sz.c -lx -o sz; size sz
X 
X@@ -219,6 +219,10 @@
X 
X jmp_buf tohere;		/* For the interrupt on RX timeout */
X jmp_buf intrjmp;	/* For the interrupt on RX CAN */
X+
X+#ifndef _PROTOTYPE
X+#define _PROTOTYPE(x,y) x __P(y)
X+#endif
X 
X _PROTOTYPE(void onintr , (int sig ));
X _PROTOTYPE(int main , (int argc , char *argv []));
X--- work.old/src/commands/zmodem/zmodem.h	Tue Oct  1 14:00:00 1996
X+++ work.new/src/commands/zmodem/zmodem.h	Fri Nov  2 22:26:47 2001
X@@ -118,6 +118,10 @@
X extern Znulls;		/* Number of nulls to send at beginning of ZDATA hdr */
X extern char Attn[ZATTNLEN+1];	/* Attention string rx sends to tx on err */
X 
X+#ifndef _PROTOTYPE
X+#define _PROTOTYPE(x,y) x __P(y)
X+#endif
X+
X /* crctab.c */
X 
X _PROTOTYPE(long UPDC32 , (int b , long c ));
END-of-minix/files/patch-zmodem
echo x - minix/files/profile
sed 's/^X//' >minix/files/profile << 'END-of-minix/files/profile'
X# $FreeBSD$
X
XTZ='MET-1MET DST,M3.5.0/2,M9.5.0/3'
Xexport TZ
X
XMANPATH=%%MINIX_PREFIX%%/share/man:${MANPATH}
XPATH=%%MINIX_PREFIX%%/bin:${PATH}
Xexport MANPATH PATH
X
XPAGER=%%MINIX_PREFIX%%/bin/more
XSHELL=%%MINIX_PREFIX%%/bin/sh
Xexport PAGER SHELL
X
XPS1="! "
Xexport PS1
END-of-minix/files/profile
echo x - minix/pkg-comment
sed 's/^X//' >minix/pkg-comment << 'END-of-minix/pkg-comment'
XAlmost 200 MINIX commands ported to FreeBSD
END-of-minix/pkg-comment
echo x - minix/pkg-descr
sed 's/^X//' >minix/pkg-descr << 'END-of-minix/pkg-descr'
XMINIX is a free UNIX clone that is available with all the source
Xcode.  It has been written from scratch, and therefore does not
Xcontain any AT&T code--not in the kernel, the compiler, the utilities,
Xor the libraries.
X
XThis port contains almost 200 MINIX commands.  They all live and
Xrefer PREFIX/minix to avoid conflicts w/ the base system ones.
X
XNot included commands are the ones which are OS (MINIX) and/or
Xnetwork dependent.
X
XAlso, no regression test has been run and some commands may not
Xwork as expected.  Currently, suspect commands are disabled at
Xinstallation time.  As usual, use them at your own risk.  You
Xhave been warned.
X
XWWW: http://www.cs.vu.nl/~ast/minix.html
END-of-minix/pkg-descr
echo x - minix/pkg-message
sed 's/^X//' >minix/pkg-message << 'END-of-minix/pkg-message'
X****  All MINIX commands and manual pages live in %%MINIX_PREFIX%%/bin
X      and %%MINIX_PREFIX%%/man respectively.
X
X      To lanch them, you may prefer to use the %%PREFIX%%/bin/minix
X      wrapper rather then setting up your environment.  It would be
X      more easer to lanch a MINIX shell, using the following command:
X
X	    minix sh
X
X      see sh(1), using the following command, for details about the
X      MINIX shell:
X
X	    minix man sh
X
X****  To setup your MINIX environment, you may want to edit
X      %%MINIX_PREFIX%%/etc/profile.  A sample profile exists
X      in the %%MINIX_PREFIX%%/etc directory.
END-of-minix/pkg-message
echo x - minix/pkg-plist
sed 's/^X//' >minix/pkg-plist << 'END-of-minix/pkg-plist'
X@comment $FreeBSD$
Xbin/minix
X%%PORTDOCS%%share/doc/minix/LICENSE
X%%PORTDOCS%%@dirrm share/doc/minix
X%%MINIX%%/bin/[
X%%MINIX%%/bin/aal
X%%MINIX%%/bin/acd
X%%MINIX%%/bin/advent
X%%MINIX%%/bin/anm
X%%MINIX%%/bin/apropos
X%%MINIX%%/bin/ar
X%%MINIX%%/bin/arch
X%%MINIX%%/bin/ascii
X%%MINIX%%/bin/ash
X%%MINIX%%/bin/asize
X%%MINIX%%/bin/at
X%%MINIX%%/bin/atrun
X%%MINIX%%/bin/awk
X%%MINIX%%/bin/backup
X%%MINIX%%/bin/banner
X%%MINIX%%/bin/basename
X%%MINIX%%/bin/bc
X%%MINIX%%/bin/bsfilt
X%%MINIX%%/bin/btoa
X%%MINIX%%/bin/cal
X%%MINIX%%/bin/calendar
X%%MINIX%%/bin/cat
X%%MINIX%%/bin/cawf
X%%MINIX%%/bin/cc
X%%MINIX%%/bin/cdiff
X%%MINIX%%/bin/cgrep
X%%MINIX%%/bin/checkhier
X%%MINIX%%/bin/chfn
X%%MINIX%%/bin/chgrp
X%%MINIX%%/bin/chmod
X%%MINIX%%/bin/chown
X%%MINIX%%/bin/chsh
X%%MINIX%%/bin/ci
X%%MINIX%%/bin/cksum
X%%MINIX%%/bin/clone
X%%MINIX%%/bin/clr
X%%MINIX%%/bin/cmp
X%%MINIX%%/bin/co
X%%MINIX%%/bin/colcrt
X%%MINIX%%/bin/comm
X%%MINIX%%/bin/compress
X%%MINIX%%/bin/cp
X%%MINIX%%/bin/cpdir
X%%MINIX%%/bin/crc
X%%MINIX%%/bin/cron
X%%MINIX%%/bin/ctags
X%%MINIX%%/bin/cut
X%%MINIX%%/bin/date
X%%MINIX%%/bin/dd
X%%MINIX%%/bin/decomp16
X%%MINIX%%/bin/dhrystone
X%%MINIX%%/bin/diff
X%%MINIX%%/bin/dirname
X%%MINIX%%/bin/dosdir
X%%MINIX%%/bin/dosread
X%%MINIX%%/bin/doswrite
X%%MINIX%%/bin/du
X%%MINIX%%/bin/dw
X%%MINIX%%/bin/echo
X%%MINIX%%/bin/ed
X%%MINIX%%/bin/elle
X%%MINIX%%/bin/ellec
X%%MINIX%%/bin/elvis
X%%MINIX%%/bin/elvprsv
X%%MINIX%%/bin/elvrec
X%%MINIX%%/bin/ex
X%%MINIX%%/bin/expand
X%%MINIX%%/bin/expr
X%%MINIX%%/bin/factor
X%%MINIX%%/bin/false
X%%MINIX%%/bin/fgrep
X%%MINIX%%/bin/file
X%%MINIX%%/bin/find
X%%MINIX%%/bin/flex
X%%MINIX%%/bin/fmt
X%%MINIX%%/bin/fold
X%%MINIX%%/bin/fortune
X%%MINIX%%/bin/gather
X%%MINIX%%/bin/gomoku
X%%MINIX%%/bin/grep
X%%MINIX%%/bin/head
X%%MINIX%%/bin/ic
X%%MINIX%%/bin/id
X%%MINIX%%/bin/ifdef
X%%MINIX%%/bin/indent
X%%MINIX%%/bin/inodes
X%%MINIX%%/bin/install
X%%MINIX%%/bin/isodir
X%%MINIX%%/bin/isoinfo
X%%MINIX%%/bin/isoread
X%%MINIX%%/bin/join
X%%MINIX%%/bin/kermit
X%%MINIX%%/bin/kill
X%%MINIX%%/bin/last
X%%MINIX%%/bin/leave
X%%MINIX%%/bin/life
X%%MINIX%%/bin/ln
X%%MINIX%%/bin/login
X%%MINIX%%/bin/look
X%%MINIX%%/bin/lp
X%%MINIX%%/bin/lpd
X%%MINIX%%/bin/ls
X%%MINIX%%/bin/m2
X%%MINIX%%/bin/m4
X%%MINIX%%/bin/mail
X%%MINIX%%/bin/make
X%%MINIX%%/bin/makewhatis
X%%MINIX%%/bin/man
X%%MINIX%%/bin/men
X%%MINIX%%/bin/mesg
X%%MINIX%%/bin/mined
X%%MINIX%%/bin/mkdir
X%%MINIX%%/bin/mkfifo
X%%MINIX%%/bin/mknod
X%%MINIX%%/bin/mkproto
X%%MINIX%%/bin/more
X%%MINIX%%/bin/mref
X%%MINIX%%/bin/mt
X%%MINIX%%/bin/mv
X%%MINIX%%/bin/nroff
X%%MINIX%%/bin/od
X%%MINIX%%/bin/passwd
X%%MINIX%%/bin/paste
X%%MINIX%%/bin/patch
X%%MINIX%%/bin/pathchk
X%%MINIX%%/bin/pc
X%%MINIX%%/bin/pr
X%%MINIX%%/bin/prep
X%%MINIX%%/bin/pretty
X%%MINIX%%/bin/printenv
X%%MINIX%%/bin/proto
X%%MINIX%%/bin/pwd
X%%MINIX%%/bin/pwdauth
X%%MINIX%%/bin/readall
X%%MINIX%%/bin/ref
X%%MINIX%%/bin/remsync
X%%MINIX%%/bin/restore
X%%MINIX%%/bin/rev
X%%MINIX%%/bin/rm
X%%MINIX%%/bin/rmdir
X%%MINIX%%/bin/roff
X%%MINIX%%/bin/rz
X%%MINIX%%/bin/sbc
X%%MINIX%%/bin/sed
X%%MINIX%%/bin/sh
X%%MINIX%%/bin/shar
X%%MINIX%%/bin/sleep
X%%MINIX%%/bin/sort
X%%MINIX%%/bin/spell
X%%MINIX%%/bin/split
X%%MINIX%%/bin/strings
X%%MINIX%%/bin/stty
X%%MINIX%%/bin/su
X%%MINIX%%/bin/sum
X%%MINIX%%/bin/swapfs
X%%MINIX%%/bin/sync
X%%MINIX%%/bin/synctree
X%%MINIX%%/bin/sz
X%%MINIX%%/bin/tail
X%%MINIX%%/bin/tar
X%%MINIX%%/bin/tee
X%%MINIX%%/bin/term
X%%MINIX%%/bin/termcap
X%%MINIX%%/bin/test
X%%MINIX%%/bin/tget
X%%MINIX%%/bin/time
X%%MINIX%%/bin/touch
X%%MINIX%%/bin/tr
X%%MINIX%%/bin/traverse
X%%MINIX%%/bin/treecmp
X%%MINIX%%/bin/true
X%%MINIX%%/bin/tsort
X%%MINIX%%/bin/ttt
X%%MINIX%%/bin/tty
X%%MINIX%%/bin/uname
X%%MINIX%%/bin/uncompress
X%%MINIX%%/bin/unexpand
X%%MINIX%%/bin/uniq
X%%MINIX%%/bin/unshar
X%%MINIX%%/bin/update
X%%MINIX%%/bin/uud
X%%MINIX%%/bin/uudecode
X%%MINIX%%/bin/uue
X%%MINIX%%/bin/uuencode
X%%MINIX%%/bin/vi
X%%MINIX%%/bin/wc
X%%MINIX%%/bin/whatis
X%%MINIX%%/bin/whatsnew
X%%MINIX%%/bin/which
X%%MINIX%%/bin/who
X%%MINIX%%/bin/whoami
X%%MINIX%%/bin/width
X%%MINIX%%/bin/write
X%%MINIX%%/bin/xargs
X%%MINIX%%/bin/yacc
X%%MINIX%%/bin/yap
X%%MINIX%%/bin/yes
X%%MINIX%%/bin/zcat
X@unexec if cmp -s %D/%%MINIX%%/etc/profile.sample %D/%%MINIX%%/etc/profile; then rm -f %D/%%MINIX%%/etc/profile; fi
X%%MINIX%%/etc/profile.sample
X@exec [ -f %D/%%MINIX%%/etc/profile ] || cp %D/%%MINIX%%/etc/profile.sample %D/%%MINIX%%/etc/profile
X%%MINIX%%/lib/asmconv
X%%MINIX%%/lib/libedit.a
X%%MINIX%%/lib/libfl.a
X%%MINIX%%/lib/liby.a
X%%MINIX%%/share/cawf/common
X%%MINIX%%/share/cawf/device.cf
X%%MINIX%%/share/cawf/dumb.dev
X%%MINIX%%/share/cawf/me.mac
X%%MINIX%%/share/cawf/man.mac
X%%MINIX%%/share/cawf/mnx.mac
X%%MINIX%%/share/cawf/ms.mac
X%%MINIX%%/share/games/advent/advent1.dat
X%%MINIX%%/share/games/advent/advent2.dat
X%%MINIX%%/share/games/advent/advent3.dat
X%%MINIX%%/share/games/advent/advent4.dat
X%%MINIX%%/share/man/whatis
X%%MINIX%%/share/misc/flex.skel
X%%MINIX%%/share/misc/libmath.b
X@exec mkdir -p %D/%%MINIX%%/var/db
X@unexec if [ -f %D/%%MINIX%%/var/db/lastlog ]; then rm -f %D/%%MINIX%%/var/db/lastlog; fi
X@unexec if [ -f %D/%%MINIX%%/var/db/wtmp ]; then rm -f %D/%%MINIX%%/var/db/wtmp; fi
X@dirrm %%MINIX%%/var/db
X@exec mkdir -p %D/%%MINIX%%/var/log
X@unexec if [ -f %D/%%MINIX%%/var/log/cronlog ]; then rm -f %D/%%MINIX%%/var/log/cronlog; fi
X@dirrm %%MINIX%%/var/log
X@exec mkdir -p %D/%%MINIX%%/var/mail
X@dirrm %%MINIX%%/var/mail
X@exec mkdir -p %D/%%MINIX%%/var/preserve
X@unexec if [ -f %D/%%MINIX%%/var/preserve/Index ]; then rm -f %D/%%MINIX%%/var/preserve/Index; fi
X@dirrm %%MINIX%%/var/preserve
X@exec mkdir -p %D/%%MINIX%%/var/run
X@unexec if [ -f %D/%%MINIX%%/var/run/utmp ]; then rm -f %D/%%MINIX%%/var/run/utmp; fi
X@dirrm %%MINIX%%/var/run
X@exec mkdir -p %D/%%MINIX%%/var/spool/at/past
X@unexec rm -rf %D/%%MINIX%%/var/spool/at/past
X@dirrm %%MINIX%%/var/spool/at
X@exec mkdir -p %D/%%MINIX%%/var/spool/lpd
X@dirrm %%MINIX%%/var/spool/lpd
X@exec mkdir -p %D/%%MINIX%%/var/spool/uucppublic
X@dirrm %%MINIX%%/var/spool/uucppublic
X@dirrm %%MINIX%%/var/spool
X@exec mkdir -p %D/%%MINIX%%/var/tmp
X@dirrm %%MINIX%%/var/tmp
X@dirrm %%MINIX%%/var
X@dirrm %%MINIX%%/share/misc
X@dirrm %%MINIX%%/share/man/man9
X@dirrm %%MINIX%%/share/man/man8
X@dirrm %%MINIX%%/share/man/man7
X@dirrm %%MINIX%%/share/man/man6
X@dirrm %%MINIX%%/share/man/man5
X@dirrm %%MINIX%%/share/man/man3
X@dirrm %%MINIX%%/share/man/man1
X@dirrm %%MINIX%%/share/man
X@dirrm %%MINIX%%/share/games/advent
X@dirrm %%MINIX%%/share/games
X@dirrm %%MINIX%%/share/cawf
X@dirrm %%MINIX%%/share
X@dirrm %%MINIX%%/lib
X@dirrm %%MINIX%%/etc
X@dirrm %%MINIX%%/bin
X@dirrm %%MINIX%%
END-of-minix/pkg-plist
exit

>Release-Note:
>Audit-Trail:
Class-Changed-From-To: maintainer-update->change-request 
Class-Changed-By: lioux 
Class-Changed-When: Thu Dec 20 09:30:57 PST 2001 
Class-Changed-Why:  
Misfiled class 

http://www.FreeBSD.org/cgi/query-pr.cgi?pr=31061 
Class-Changed-From-To: maintainer-update->change-request 
Class-Changed-By: lioux 
Class-Changed-When: Thu Dec 20 09:30:57 PST 2001 
Class-Changed-Why:  
Misfiled class 

http://www.FreeBSD.org/cgi/query-pr.cgi?pr=31282 
Class-Changed-From-To: maintainer-update->change-request 
Class-Changed-By: lioux 
Class-Changed-When: Thu Dec 20 09:30:57 PST 2001 
Class-Changed-Why:  
Misfiled class 

http://www.FreeBSD.org/cgi/query-pr.cgi?pr=31744 

From: Kris Kennaway <kris@obsecurity.org>
To: freebsd-gnats-submit@FreeBSD.org, clefevre@citeweb.net
Cc:  
Subject: Re: ports/31744
Date: Sat, 25 May 2002 02:53:21 -0700

 I tried to build this port but the compilation fails.  There was also
 something funky about the shar archive; I had to create the minix and
 minix/files directories by hand.  Finally, I'm not sure emulators is
 really the best category for this to live in.
 
 Kris
 
State-Changed-From-To: open->feedback 
State-Changed-By: will 
State-Changed-When: Sat Jun 22 23:22:42 PDT 2002 
State-Changed-Why:  
I can't extract the shar.  Can you post a tarball instead?  Also, I 
didn't see a reply to Kris' comments regarding this PR a few weeks ago. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=31744 

From: Cyrille Lefevre <cyrille.lefevre@laposte.net>
To: freebsd-gnats-submit@FreeBSD.org
Cc: Will Andrews <will@FreeBSD.org>, Kris Kennaway <kris@FreeBSD.org>
Subject: Re: ports/31744: New port: emulators/minix (2.0.0)
Date: Sun, 30 Jun 2002 05:47:08 +0200

 On Sat, 25 May 2002 02:53:21 -0700, Kris Kennaway wrote:
 > I tried to build this port but the compilation fails.  There was also
 > something funky about the shar archive; I had to create the minix and
 > minix/files directories by hand.  Finally, I'm not sure emulators is
 > really the best category for this to live in.
 
 > State-Changed-From-To: open->feedback 
 > State-Changed-By: will 
 > State-Changed-When: Sat Jun 22 23:22:42 PDT 2002 
 > State-Changed-Why:  
 > I can't extract the shar.  Can you post a tarball instead?  Also, I 
 > didn't see a reply to Kris' comments regarding this PR a few weeks ago. 
 
 Hi,
 
 well, I've just discovered the status flag in the current problem reports !
 so, I'll take more care about the `f' for feedback ;^)
 also, citeweb.net is dead since december, so, I didn't see Kris's messages...
 about the shar archive, as Kriss did, you just have to manually create
 `minix/files' using mkdir -p before to extract it, sorry for the convenience.
 in the future, I'll take care about putting directories in the shell archive.
 anout the category, emulators is, IMHO, better than misc or whatever, no ?
 finally, about the built failure, here is the patch :
 
 --- files/patch-elle.old	Sun Nov  4 04:36:37 2001
 +++ files/patch-elle	Sun Jun 30 05:38:42 2002
 @@ -484,6 +484,14 @@
   					printf("Too many SDs for table (%d)\n",NPTRS))
  --- work.old/src/commands/elle/sbm.c	Tue Oct  1 14:00:00 1996
  +++ work.new/src/commands/elle/sbm.c	Fri Nov  2 07:20:12 2001
 +@@ -50,7 +50,6 @@
 + #endif /*DBG_SIZE*/
 + 
 + /* Forward routine declarations */
 +-char *sbrk();
 + struct smblk *sbm_nmak(), *sbm_nget(), *sbm_mget(), *sbm_split();
 + struct smblk *sbm_lmak(), *sbm_err();
 + 
  @@ -77,7 +77,7 @@
   	  || (int) cp == -1)
   		return(sbm_err(0,"Can't sbrk"));
 Cyrille.
 -- 
 Cyrille Lefevre                 mailto:cyrille.lefevre@laposte.net
 12, Rue de Bizerte 75017 Paris  http://clefevre.fr.st
 tel/fax: +33 (0)1 45 22 83 85   gsm: +33 (0)6 80 94 76 63
State-Changed-From-To: feedback->open 
State-Changed-By: arved 
State-Changed-When: Thu Oct 31 07:18:03 PST 2002 
State-Changed-Why:  
Feedback has been submitted 

http://www.freebsd.org/cgi/query-pr.cgi?pr=31744 
State-Changed-From-To: open->feedback 
State-Changed-By: edwin 
State-Changed-When: Sat Jan 18 17:31:04 PST 2003 
State-Changed-Why:  
On a 4.7 and an -current system: 

commands/ash doesn't compile: 
cc -O -pipe -march=pentium2 -march=pentium2 -DSHELL -I/freefall/d/home/edwin/por ts/new/minix/work/src/commands/ash     -L/freefall/d/home/edwin/ports/new/minix/work/src/commands/ash/../../lib/editline mknodes.c  -o mknodes 
mknodes.c:91: initializer element is not constant 

commands/autil,bc,cawf,elle,elvis complain about bsd.man.mk: 
===> commands/autil 
"/usr/share/mk/bsd.man.mk", line 53: bsd.man.mk cannot be included directly. 
Can be overcome by making with NOMAN=yes 

commands/util,bc complain abuot bsd.libnames.mk 
===> commands/autil 
"/usr/share/mk/bsd.libnames.mk", line 8: bsd.libnames.mk cannot be included directly. 

etc. 

Please tell me what you want, an update or closing of this port? 



Responsible-Changed-From-To: freebsd-ports-bugs->edwin 
Responsible-Changed-By: edwin 
Responsible-Changed-When: Sat Jan 18 17:31:04 PST 2003 
Responsible-Changed-Why:  
I'll handle it with the submitter. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=31744 
State-Changed-From-To: feedback->closed 
State-Changed-By: edwin 
State-Changed-When: Thu Jan 23 20:33:59 PST 2003 
State-Changed-Why:  
Maintainer unreachable: 

<clefevre@citeweb.net>: connect to citeweb.net[216.27.93.20]: 
Operation timed out 


http://www.freebsd.org/cgi/query-pr.cgi?pr=31744 
>Unformatted:
