[comp.os.minix] V1.3c posting #9 - mm

ast@cs.vu.nl (Andy Tanenbaum) (09/28/88)

: This is a shar archive.  Extract with sh, not csh.
: This archive ends with exit, so do not worry about trailing junk.
: --------------------------- cut here --------------------------
PATH=/bin:/usr/bin:/usr/ucb
echo Extracting 'LISTING'
sed 's/^X//' > 'LISTING' << '+ END-OF-FILE ''LISTING'
Xtotal 8
X-rw-r--r--  1 ast          1833 Sep 26 22:51 at_makefile
X-rw-r--r--  1 ast          1715 Sep 26 22:51 exec.c.cdif
X-rw-r--r--  1 ast           375 Sep 26 22:51 forkexit.c.cdif
X-rw-r--r--  1 ast          1890 Sep 26 22:51 pc_makefile
X-rw-r--r--  1 ast           323 Sep 26 22:51 signal.c.cdif
+ END-OF-FILE LISTING
chmod 'u=rw,g=r,o=r' 'LISTING'
set `wc -c 'LISTING'`
count=$1
case $count in
299)	:;;
*)	echo 'Bad character count in ''LISTING' >&2
		echo 'Count should be 299' >&2
esac
echo Extracting 'at_makefile'
sed 's/^X//' > 'at_makefile' << '+ END-OF-FILE ''at_makefile'
X# On a PC, cpp and cem are in /lib and will be removed to make space while
X# linking the kernel.  On an AT, they are in /usr/lib are are not removed.
X# This is because they have to be in /lib on a PC; the diskette is too small
X# for them to be in /usr/lib.
X#
X
Xh=../h
Xl=/usr/lib
XCFLAGS = -Di8088 -F -T.
X
Xobj =	main.s forkexit.s break.s exec.s signal.s getset.s  \
X	alloc.s utility.s table.s putc.s
X
Xmm:	makefile    $l/head.s $(obj) $l/libc.a $l/end.s
X	@echo "Start linking MM."
X	@asld -o mm -T. $l/head.s $(obj) $l/libc.a $l/end.s
X	@echo "MM done. "
X
Xclean:
X	rm -f $(obj)
X
Xalloc.s:	const.h $h/const.h $h/type.h
X
Xbreak.s:	const.h $h/const.h $h/type.h
Xbreak.s:	$h/error.h
Xbreak.s:	$h/signal.h
Xbreak.s:	glo.h
Xbreak.s:	mproc.h
Xbreak.s:	param.h
X
Xexec.s:		const.h $h/const.h $h/type.h
Xexec.s:		$h/callnr.h
Xexec.s:		$h/error.h
Xexec.s:		$h/stat.h
Xexec.s:		glo.h
Xexec.s:		mproc.h
Xexec.s:		param.h
X
Xforkexit.s:	const.h $h/const.h $h/type.h
Xforkexit.s:	$h/callnr.h
Xforkexit.s:	$h/error.h
Xforkexit.s:	glo.h
Xforkexit.s:	mproc.h
Xforkexit.s:	param.h
X
Xgetset.s:	const.h $h/const.h $h/type.h
Xgetset.s:	$h/callnr.h
Xgetset.s:	$h/error.h
Xgetset.s:	glo.h
Xgetset.s:	mproc.h
Xgetset.s:	param.h
X
Xmain.s:		const.h $h/const.h $h/type.h
Xmain.s:		$h/callnr.h
Xmain.s:		$h/com.h
Xmain.s:		$h/error.h
Xmain.s:		glo.h
Xmain.s:		mproc.h
Xmain.s:		param.h
X
Xputc.s:		$h/const.h $h/type.h
Xputc.s:		$h/com.h
X
Xsignal.s:	const.h $h/const.h $h/type.h
Xsignal.s:	$h/callnr.h
Xsignal.s:	$h/com.h
Xsignal.s:	$h/error.h
Xsignal.s:	$h/signal.h
Xsignal.s:	$h/stat.h
Xsignal.s:	glo.h
Xsignal.s:	mproc.h
Xsignal.s:	param.h
X
Xtable.s:	const.h $h/const.h $h/type.h
Xtable.s:	$h/callnr.h
Xtable.s:	glo.h
Xtable.s:	mproc.h
Xtable.s:	param.h
X
Xutility.s:	const.h $h/const.h $h/type.h
Xutility.s:	$h/callnr.h
Xutility.s:	$h/com.h
Xutility.s:	$h/error.h
Xutility.s:	$h/stat.h
Xutility.s:	glo.h
Xutility.s:	mproc.h
+ END-OF-FILE at_makefile
chmod 'u=rw,g=r,o=r' 'at_makefile'
set `wc -c 'at_makefile'`
count=$1
case $count in
1833)	:;;
*)	echo 'Bad character count in ''at_makefile' >&2
		echo 'Count should be 1833' >&2
esac
echo Extracting 'exec.c.cdif'
sed 's/^X//' > 'exec.c.cdif' << '+ END-OF-FILE ''exec.c.cdif'
X*** /local/ast/minix/tape3b/mm/exec.c	Wed Jul 13 11:50:13 1988
X--- exec.c	Mon Sep 26 13:03:53 1988
X***************
X*** 76,82 ****
X  
X    /* Read the file header and extract the segment sizes. */
X    sc = (stk_bytes + CLICK_SIZE - 1) >> CLICK_SHIFT;
X!   m = read_header(fd, &ft, &text_bytes, &data_bytes, &bss_bytes, &tot_bytes, &sym_bytes, sc);
X    if (m < 0) {
X  	close(fd);		/* something wrong with header */
X  	return(ENOEXEC);
X--- 76,83 ----
X  
X    /* Read the file header and extract the segment sizes. */
X    sc = (stk_bytes + CLICK_SIZE - 1) >> CLICK_SHIFT;
X!   m = read_header(fd, &ft, &text_bytes, &data_bytes, &bss_bytes, 
X! 						&tot_bytes, &sym_bytes, sc);
X    if (m < 0) {
X  	close(fd);		/* something wrong with header */
X  	return(ENOEXEC);
X***************
X*** 142,148 ****
X  /*===========================================================================*
X   *				read_header				     *
X   *===========================================================================*/
X! PRIVATE int read_header(fd, ft, text_bytes, data_bytes, bss_bytes, tot_bytes, sym_bytes, sc)
X  int fd;				/* file descriptor for reading exec file */
X  int *ft;			/* place to return ft number */
X  vir_bytes *text_bytes;		/* place to return text size */
X--- 143,150 ----
X  /*===========================================================================*
X   *				read_header				     *
X   *===========================================================================*/
X! PRIVATE int read_header(fd, ft, text_bytes, data_bytes, bss_bytes, 
X! 						    tot_bytes, sym_bytes, sc)
X  int fd;				/* file descriptor for reading exec file */
X  int *ft;			/* place to return ft number */
X  vir_bytes *text_bytes;		/* place to return text size */
+ END-OF-FILE exec.c.cdif
chmod 'u=rw,g=r,o=r' 'exec.c.cdif'
set `wc -c 'exec.c.cdif'`
count=$1
case $count in
1715)	:;;
*)	echo 'Bad character count in ''exec.c.cdif' >&2
		echo 'Count should be 1715' >&2
esac
echo Extracting 'forkexit.c.cdif'
sed 's/^X//' > 'forkexit.c.cdif' << '+ END-OF-FILE ''forkexit.c.cdif'
X*** /local/ast/minix/tape3b/mm/forkexit.c	Wed Jul 13 11:50:14 1988
X--- forkexit.c	Mon Sep 26 13:03:54 1988
X***************
X*** 254,262 ****
X    register struct mproc *parent, *rp;
X    int init_waiting, child_nr;
X    unsigned int r;
X- #ifndef ATARI_ST
X-   phys_clicks s;
X- #endif
X  
X    child_nr = (int)(child - mproc);
X    parent = &mproc[child->mp_parent];
X--- 254,259 ----
+ END-OF-FILE forkexit.c.cdif
chmod 'u=rw,g=r,o=r' 'forkexit.c.cdif'
set `wc -c 'forkexit.c.cdif'`
count=$1
case $count in
375)	:;;
*)	echo 'Bad character count in ''forkexit.c.cdif' >&2
		echo 'Count should be 375' >&2
esac
echo Extracting 'pc_makefile'
sed 's/^X//' > 'pc_makefile' << '+ END-OF-FILE ''pc_makefile'
X# On a PC, cpp and cem are in /lib and will be removed to make space while
X# linking the kernel.  On an AT, they are in /usr/lib are are not removed.
X# This is because they have to be in /lib on a PC; the diskette is too small
X# for them to be in /usr/lib.
X#
X
Xh=../h
Xl=/usr/lib
XCFLAGS = -Di8088 -F -T.
X
Xobj =	main.s forkexit.s break.s exec.s signal.s getset.s  \
X	alloc.s utility.s table.s putc.s
X
Xmm:	makefile    $l/head.s $(obj) $l/libc.a $l/end.s
X	@echo "Start linking MM."
X	@echo "If disk fills up, remove some files"
X	@asld -o mm -T. $l/head.s $(obj) $l/libc.a $l/end.s
X	@mv /mm mm
X	@echo "MM done. "
X
Xclean:
X	rm -f $(obj)
X
Xalloc.s:	const.h $h/const.h $h/type.h
X
Xbreak.s:	const.h $h/const.h $h/type.h
Xbreak.s:	$h/error.h
Xbreak.s:	$h/signal.h
Xbreak.s:	glo.h
Xbreak.s:	mproc.h
Xbreak.s:	param.h
X
Xexec.s:		const.h $h/const.h $h/type.h
Xexec.s:		$h/callnr.h
Xexec.s:		$h/error.h
Xexec.s:		$h/stat.h
Xexec.s:		glo.h
Xexec.s:		mproc.h
Xexec.s:		param.h
X
Xforkexit.s:	const.h $h/const.h $h/type.h
Xforkexit.s:	$h/callnr.h
Xforkexit.s:	$h/error.h
Xforkexit.s:	glo.h
Xforkexit.s:	mproc.h
Xforkexit.s:	param.h
X
Xgetset.s:	const.h $h/const.h $h/type.h
Xgetset.s:	$h/callnr.h
Xgetset.s:	$h/error.h
Xgetset.s:	glo.h
Xgetset.s:	mproc.h
Xgetset.s:	param.h
X
Xmain.s:		const.h $h/const.h $h/type.h
Xmain.s:		$h/callnr.h
Xmain.s:		$h/com.h
Xmain.s:		$h/error.h
Xmain.s:		glo.h
Xmain.s:		mproc.h
Xmain.s:		param.h
X
Xputc.s:		$h/const.h $h/type.h
Xputc.s:		$h/com.h
X
Xsignal.s:	const.h $h/const.h $h/type.h
Xsignal.s:	$h/callnr.h
Xsignal.s:	$h/com.h
Xsignal.s:	$h/error.h
Xsignal.s:	$h/signal.h
Xsignal.s:	$h/stat.h
Xsignal.s:	glo.h
Xsignal.s:	mproc.h
Xsignal.s:	param.h
X
Xtable.s:	const.h $h/const.h $h/type.h
Xtable.s:	$h/callnr.h
Xtable.s:	glo.h
Xtable.s:	mproc.h
Xtable.s:	param.h
X
Xutility.s:	const.h $h/const.h $h/type.h
Xutility.s:	$h/callnr.h
Xutility.s:	$h/com.h
Xutility.s:	$h/error.h
Xutility.s:	$h/stat.h
Xutility.s:	glo.h
Xutility.s:	mproc.h
+ END-OF-FILE pc_makefile
chmod 'u=rw,g=r,o=r' 'pc_makefile'
set `wc -c 'pc_makefile'`
count=$1
case $count in
1890)	:;;
*)	echo 'Bad character count in ''pc_makefile' >&2
		echo 'Count should be 1890' >&2
esac
echo Extracting 'signal.c.cdif'
sed 's/^X//' > 'signal.c.cdif' << '+ END-OF-FILE ''signal.c.cdif'
X*** /local/ast/minix/tape3b/mm/signal.c	Wed Jul 13 11:50:15 1988
X--- signal.c	Mon Sep 26 13:03:56 1988
X***************
X*** 349,355 ****
X    char buf[DUMP_SIZE];
X    int i, r, s, er1, er2, slot;
X    vir_bytes v_buf;
X-   long len;
X    long a, c, ct, dest;
X    struct mproc *xmp;
X    extern char core_name[];
X--- 349,354 ----
+ END-OF-FILE signal.c.cdif
chmod 'u=rw,g=r,o=r' 'signal.c.cdif'
set `wc -c 'signal.c.cdif'`
count=$1
case $count in
323)	:;;
*)	echo 'Bad character count in ''signal.c.cdif' >&2
		echo 'Count should be 323' >&2
esac
exit 0