Index: trunk/minix/lib/Makefile
===================================================================
--- trunk/minix/lib/Makefile	(revision 9)
+++ 	(revision )
@@ -1,203 +1,0 @@
-#Generated from ./Makefile.in
-all: all-ack
-
-all-ack:
-all-gnu:
-
-makefiles: Makefile
-Makedepend-ack Makedepend-gnu: 
-	sh generate.sh . obj-ack/ obj-gnu
-
-Makefile: Makefile.in Makedepend-ack Makedepend-gnu
-	sh generate.sh . obj-ack/ obj-gnu
-	@echo
-	@echo *Attention*
-	@echo Makefile is regenerated... rerun command to see changes
-	@echo *Attention*
-	@echo
-
-all-ack: makefiles
-	mkdir -p obj-ack//./ansi
-	cd ansi && $(MAKE) $@
-	mkdir -p obj-ack//./curses
-	cd curses && $(MAKE) $@
-	mkdir -p obj-ack//./dummy
-	cd dummy && $(MAKE) $@
-	mkdir -p obj-ack//./editline
-	cd editline && $(MAKE) $@
-	mkdir -p obj-ack//./end
-	cd end && $(MAKE) $@
-	mkdir -p obj-ack//./ip
-	cd ip && $(MAKE) $@
-	mkdir -p obj-ack//./math
-	cd math && $(MAKE) $@
-	mkdir -p obj-ack//./other
-	cd other && $(MAKE) $@
-	mkdir -p obj-ack//./posix
-	cd posix && $(MAKE) $@
-	mkdir -p obj-ack//./regex
-	cd regex && $(MAKE) $@
-	mkdir -p obj-ack//./stdio
-	cd stdio && $(MAKE) $@
-	mkdir -p obj-ack//./syscall
-	cd syscall && $(MAKE) $@
-	mkdir -p obj-ack//./syslib
-	cd syslib && $(MAKE) $@
-	mkdir -p obj-ack//./util
-	cd util && $(MAKE) $@
-	mkdir -p obj-ack//./sysutil
-	cd sysutil && $(MAKE) $@
-	mkdir -p obj-ack//./timers
-	cd timers && $(MAKE) $@
-	mkdir -p obj-ack//./i386
-	cd i386 && $(MAKE) $@
-	mkdir -p obj-ack//./zlib-1.2.3
-	cd zlib-1.2.3 && $(MAKE) $@
-	mkdir -p obj-ack//./ack
-	cd ack && $(MAKE) $@
-	mkdir -p obj-ack//./gnu
-	cd gnu && $(MAKE) $@
-
-all-gnu: makefiles
-	mkdir -p obj-gnu/./ansi
-	cd ansi && $(MAKE) $@
-	mkdir -p obj-gnu/./curses
-	cd curses && $(MAKE) $@
-	mkdir -p obj-gnu/./dummy
-	cd dummy && $(MAKE) $@
-	mkdir -p obj-gnu/./editline
-	cd editline && $(MAKE) $@
-	mkdir -p obj-gnu/./end
-	cd end && $(MAKE) $@
-	mkdir -p obj-gnu/./ip
-	cd ip && $(MAKE) $@
-	mkdir -p obj-gnu/./math
-	cd math && $(MAKE) $@
-	mkdir -p obj-gnu/./other
-	cd other && $(MAKE) $@
-	mkdir -p obj-gnu/./posix
-	cd posix && $(MAKE) $@
-	mkdir -p obj-gnu/./regex
-	cd regex && $(MAKE) $@
-	mkdir -p obj-gnu/./stdio
-	cd stdio && $(MAKE) $@
-	mkdir -p obj-gnu/./syscall
-	cd syscall && $(MAKE) $@
-	mkdir -p obj-gnu/./syslib
-	cd syslib && $(MAKE) $@
-	mkdir -p obj-gnu/./util
-	cd util && $(MAKE) $@
-	mkdir -p obj-gnu/./sysutil
-	cd sysutil && $(MAKE) $@
-	mkdir -p obj-gnu/./timers
-	cd timers && $(MAKE) $@
-	mkdir -p obj-gnu/./i386
-	cd i386 && $(MAKE) $@
-	mkdir -p obj-gnu/./zlib-1.2.3
-	cd zlib-1.2.3 && $(MAKE) $@
-	mkdir -p obj-gnu/./ack
-	cd ack && $(MAKE) $@
-	mkdir -p obj-gnu/./gnu
-	cd gnu && $(MAKE) $@
-
-clean depend depend-ack depend-gnu:: makefiles
-	cd ansi && $(MAKE) $@
-	cd curses && $(MAKE) $@
-	cd dummy && $(MAKE) $@
-	cd editline && $(MAKE) $@
-	cd end && $(MAKE) $@
-	cd ip && $(MAKE) $@
-	cd math && $(MAKE) $@
-	cd other && $(MAKE) $@
-	cd posix && $(MAKE) $@
-	cd regex && $(MAKE) $@
-	cd stdio && $(MAKE) $@
-	cd syscall && $(MAKE) $@
-	cd syslib && $(MAKE) $@
-	cd util && $(MAKE) $@
-	cd sysutil && $(MAKE) $@
-	cd timers && $(MAKE) $@
-	cd i386 && $(MAKE) $@
-	cd zlib-1.2.3 && $(MAKE) $@
-	cd ack && $(MAKE) $@
-	cd gnu && $(MAKE) $@
-
-makefiles: ansi/Makefile
-makefiles: curses/Makefile
-makefiles: dummy/Makefile
-makefiles: editline/Makefile
-makefiles: end/Makefile
-makefiles: ip/Makefile
-makefiles: math/Makefile
-makefiles: other/Makefile
-makefiles: posix/Makefile
-makefiles: regex/Makefile
-makefiles: stdio/Makefile
-makefiles: syscall/Makefile
-makefiles: syslib/Makefile
-makefiles: util/Makefile
-makefiles: sysutil/Makefile
-makefiles: timers/Makefile
-makefiles: i386/Makefile
-makefiles: zlib-1.2.3/Makefile
-makefiles: ack/Makefile
-makefiles: gnu/Makefile
-
-ansi/Makefile: ansi/Makefile.in
-	cd ansi && sh ../generate.sh ./ansi ../obj-ack/ ../obj-gnu && $(MAKE) makefiles
-curses/Makefile: curses/Makefile.in
-	cd curses && sh ../generate.sh ./curses ../obj-ack/ ../obj-gnu && $(MAKE) makefiles
-dummy/Makefile: dummy/Makefile.in
-	cd dummy && sh ../generate.sh ./dummy ../obj-ack/ ../obj-gnu && $(MAKE) makefiles
-editline/Makefile: editline/Makefile.in
-	cd editline && sh ../generate.sh ./editline ../obj-ack/ ../obj-gnu && $(MAKE) makefiles
-end/Makefile: end/Makefile.in
-	cd end && sh ../generate.sh ./end ../obj-ack/ ../obj-gnu && $(MAKE) makefiles
-ip/Makefile: ip/Makefile.in
-	cd ip && sh ../generate.sh ./ip ../obj-ack/ ../obj-gnu && $(MAKE) makefiles
-math/Makefile: math/Makefile.in
-	cd math && sh ../generate.sh ./math ../obj-ack/ ../obj-gnu && $(MAKE) makefiles
-other/Makefile: other/Makefile.in
-	cd other && sh ../generate.sh ./other ../obj-ack/ ../obj-gnu && $(MAKE) makefiles
-posix/Makefile: posix/Makefile.in
-	cd posix && sh ../generate.sh ./posix ../obj-ack/ ../obj-gnu && $(MAKE) makefiles
-regex/Makefile: regex/Makefile.in
-	cd regex && sh ../generate.sh ./regex ../obj-ack/ ../obj-gnu && $(MAKE) makefiles
-stdio/Makefile: stdio/Makefile.in
-	cd stdio && sh ../generate.sh ./stdio ../obj-ack/ ../obj-gnu && $(MAKE) makefiles
-syscall/Makefile: syscall/Makefile.in
-	cd syscall && sh ../generate.sh ./syscall ../obj-ack/ ../obj-gnu && $(MAKE) makefiles
-syslib/Makefile: syslib/Makefile.in
-	cd syslib && sh ../generate.sh ./syslib ../obj-ack/ ../obj-gnu && $(MAKE) makefiles
-util/Makefile: util/Makefile.in
-	cd util && sh ../generate.sh ./util ../obj-ack/ ../obj-gnu && $(MAKE) makefiles
-sysutil/Makefile: sysutil/Makefile.in
-	cd sysutil && sh ../generate.sh ./sysutil ../obj-ack/ ../obj-gnu && $(MAKE) makefiles
-timers/Makefile: timers/Makefile.in
-	cd timers && sh ../generate.sh ./timers ../obj-ack/ ../obj-gnu && $(MAKE) makefiles
-i386/Makefile: i386/Makefile.in
-	cd i386 && sh ../generate.sh ./i386 ../obj-ack/ ../obj-gnu && $(MAKE) makefiles
-zlib-1.2.3/Makefile: zlib-1.2.3/Makefile.in
-	cd zlib-1.2.3 && sh ../generate.sh ./zlib-1.2.3 ../obj-ack/ ../obj-gnu && $(MAKE) makefiles
-ack/Makefile: ack/Makefile.in
-	cd ack && sh ../generate.sh ./ack ../obj-ack/ ../obj-gnu && $(MAKE) makefiles
-gnu/Makefile: gnu/Makefile.in
-	cd gnu && sh ../generate.sh ./gnu ../obj-ack/ ../obj-gnu && $(MAKE) makefiles
-
-clean::
-	rm -f obj-ack//./*
-	rm -f obj-gnu/./*
-
-install: install-ack
-
-install-ack: all-ack
-	cp obj-ack//*.[ao] /usr/lib/i386
-
-install-gnu: all-gnu
-	cp obj-gnu/*.[ao] /usr/gnu/lib
-
-include Makedepend-ack
-include .depend-ack
-
-include Makedepend-gnu
-include .depend-gnu
Index: trunk/minix/lib/Makefile.in
===================================================================
--- trunk/minix/lib/Makefile.in	(revision 9)
+++ 	(revision )
@@ -1,28 +1,0 @@
-
-#ACKBASE=$(CURDIR)/obj-ack
-#GNUBASE=$(CURDIR)/obj-gnu
-
-#OBJDIR=.
-
-SUBDIRS="ansi \
-	curses \
-	dummy \
-	editline \
-	end \
-	ip \
-	math \
-	other \
-	posix \
-	regex \
-	stdio \
-	syscall \
-	syslib \
-	util \
-	sysutil \
-	timers \
-	i386 \
-	zlib-1.2.3 \
-	ack
-	gnu"
-	
-TYPE=both
Index: trunk/minix/lib/README
===================================================================
--- trunk/minix/lib/README	(revision 9)
+++ 	(revision )
@@ -1,7 +1,0 @@
-make depend  - find dependencies of ack libraries
-make all     - compile ack libraries
-make install - compile and install ack libraries
-
-make depend-gnu  - find dependencies of gnu libraries
-make all-gnu     - compile gnu libraries
-make install-gnu - compile and install gnu libraries
Index: trunk/minix/lib/ack/Makefile
===================================================================
--- trunk/minix/lib/ack/Makefile	(revision 9)
+++ 	(revision )
@@ -1,90 +1,0 @@
-#Generated from ./ack/Makefile.in
-all: all-ack
-
-all-ack:
-all-gnu:
-
-makefiles: Makefile
-Makedepend-ack Makedepend-gnu: 
-	sh ../generate.sh ./ack ../obj-ack/ ../obj-gnu
-
-Makefile: Makefile.in Makedepend-ack Makedepend-gnu
-	sh ../generate.sh ./ack ../obj-ack/ ../obj-gnu
-	@echo
-	@echo *Attention*
-	@echo Makefile is regenerated... rerun command to see changes
-	@echo *Attention*
-	@echo
-
-all-ack: makefiles
-	mkdir -p ../obj-ack//./ack/float
-	cd float && $(MAKE) $@
-	mkdir -p ../obj-ack//./ack/fphook
-	cd fphook && $(MAKE) $@
-	mkdir -p ../obj-ack//./ack/i386
-	cd i386 && $(MAKE) $@
-	mkdir -p ../obj-ack//./ack/libm2
-	cd libm2 && $(MAKE) $@
-	mkdir -p ../obj-ack//./ack/libp
-	cd libp && $(MAKE) $@
-	mkdir -p ../obj-ack//./ack/liby
-	cd liby && $(MAKE) $@
-	mkdir -p ../obj-ack//./ack/math
-	cd math && $(MAKE) $@
-	mkdir -p ../obj-ack//./ack/rts
-	cd rts && $(MAKE) $@
-
-all-gnu: makefiles
-	cd float && $(MAKE) $@
-	cd fphook && $(MAKE) $@
-	cd i386 && $(MAKE) $@
-	cd libm2 && $(MAKE) $@
-	cd libp && $(MAKE) $@
-	cd liby && $(MAKE) $@
-	cd math && $(MAKE) $@
-	cd rts && $(MAKE) $@
-
-clean depend depend-ack depend-gnu:: makefiles
-	cd float && $(MAKE) $@
-	cd fphook && $(MAKE) $@
-	cd i386 && $(MAKE) $@
-	cd libm2 && $(MAKE) $@
-	cd libp && $(MAKE) $@
-	cd liby && $(MAKE) $@
-	cd math && $(MAKE) $@
-	cd rts && $(MAKE) $@
-
-makefiles: float/Makefile
-makefiles: fphook/Makefile
-makefiles: i386/Makefile
-makefiles: libm2/Makefile
-makefiles: libp/Makefile
-makefiles: liby/Makefile
-makefiles: math/Makefile
-makefiles: rts/Makefile
-
-float/Makefile: float/Makefile.in
-	cd float && sh ../../generate.sh ./ack/float ../../obj-ack/ ../../obj-gnu && $(MAKE) makefiles
-fphook/Makefile: fphook/Makefile.in
-	cd fphook && sh ../../generate.sh ./ack/fphook ../../obj-ack/ ../../obj-gnu && $(MAKE) makefiles
-i386/Makefile: i386/Makefile.in
-	cd i386 && sh ../../generate.sh ./ack/i386 ../../obj-ack/ ../../obj-gnu && $(MAKE) makefiles
-libm2/Makefile: libm2/Makefile.in
-	cd libm2 && sh ../../generate.sh ./ack/libm2 ../../obj-ack/ ../../obj-gnu && $(MAKE) makefiles
-libp/Makefile: libp/Makefile.in
-	cd libp && sh ../../generate.sh ./ack/libp ../../obj-ack/ ../../obj-gnu && $(MAKE) makefiles
-liby/Makefile: liby/Makefile.in
-	cd liby && sh ../../generate.sh ./ack/liby ../../obj-ack/ ../../obj-gnu && $(MAKE) makefiles
-math/Makefile: math/Makefile.in
-	cd math && sh ../../generate.sh ./ack/math ../../obj-ack/ ../../obj-gnu && $(MAKE) makefiles
-rts/Makefile: rts/Makefile.in
-	cd rts && sh ../../generate.sh ./ack/rts ../../obj-ack/ ../../obj-gnu && $(MAKE) makefiles
-
-clean::
-	rm -f ../obj-ack//./ack/*
-
-include Makedepend-ack
-include .depend-ack
-
-include Makedepend-gnu
-include .depend-gnu
Index: trunk/minix/lib/ack/Makefile.in
===================================================================
--- trunk/minix/lib/ack/Makefile.in	(revision 9)
+++ 	(revision )
@@ -1,12 +1,0 @@
-
-SUBDIRS=" \
-	float \
-	fphook \
-	i386 \
-	libm2 \
-	libp \
-	liby \
-	math \
-	rts"
-
-TYPE=ack
Index: trunk/minix/lib/ack/float/FP.compile
===================================================================
--- trunk/minix/lib/ack/float/FP.compile	(revision 9)
+++ 	(revision )
@@ -1,22 +1,0 @@
-#!/bin/sh
-#							Author: Kees J. Bot
-# Compile one soft FP source file.
-# (These files shouldn't be optimized normally, but the 16-bit C compiler
-# only optimizes scratch register allocation a bit with -O.  To the 32-bit
-# compiler -O is a no-op.)
-
-case $#:$2 in
-2:*.fc)	;;
-*)	echo "$0: $1: not a FC file" >&2; exit 1
-esac
-
-dst=$1
-src=$2
-base="`basename "$src" .fc`"
-trap 'rm -f tmp.c tmp.s"; exit 1' 2
-
-cp "$src" tmp.c &&
-cc -O -I. -D_MINIX -D_POSIX_SOURCE -S tmp.c &&
-sed -f FP.script tmp.s > "$base.s" &&
-cc -c -o $dst "$base.s" &&
-rm tmp.c tmp.s
Index: trunk/minix/lib/ack/float/FP.script
===================================================================
--- trunk/minix/lib/ack/float/FP.script	(revision 9)
+++ 	(revision )
@@ -1,39 +1,0 @@
-s/_adf4/.adf4/
-s/_adf8/.adf8/
-s/_cff4/.cff4/
-s/_cff8/.cff8/
-s/_cfi/.cfi/
-s/_cfu/.cfu/
-s/_cif4/.cif4/
-s/_cif8/.cif8/
-s/_cmf4/.cmf4/
-s/_cmf8/.cmf8/
-s/_cuf4/.cuf4/
-s/_cuf8/.cuf8/
-s/_dvf4/.dvf4/
-s/_dvf8/.dvf8/
-s/_fef4/.fef4/
-s/_fef8/.fef8/
-s/_fif4/.fif4/
-s/_fif8/.fif8/
-s/_mlf4/.mlf4/
-s/_mlf8/.mlf8/
-s/_ngf4/.ngf4/
-s/_ngf8/.ngf8/
-s/_sbf4/.sbf4/
-s/_sbf8/.sbf8/
-s/_zrf4/.zrf4/
-s/_zrf8/.zrf8/
-s/_add_ext/.add_ext/
-s/_div_ext/.div_ext/
-s/_mul_ext/.mul_ext/
-s/_nrm_ext/.nrm_ext/
-s/_sft_ext/.sft_ext/
-s/_sub_ext/.sub_ext/
-s/_zrf_ext/.zrf_ext/
-s/_compact/.compact/
-s/_extend/.extend/
-s/_b64_add/.b64_add/
-s/_b64_sft/.b64_sft/
-s/_b64_rsft/.b64_rsft/
-s/_b64_lsft/.b64_lsft/
Index: trunk/minix/lib/ack/float/FP_bias.h
===================================================================
--- trunk/minix/lib/ack/float/FP_bias.h	(revision 9)
+++ 	(revision )
@@ -1,28 +1,0 @@
-/*
-  (c) copyright 1988 by the Vrije Universiteit, Amsterdam, The Netherlands.
-  See the copyright notice in the ACK home directory, in the file "Copyright".
-*/
-
-/* $Header: /cvsup/minix/src/lib/ack/float/FP_bias.h,v 1.1 2005/10/10 15:27:42 beng Exp $ */
-
-/*
-	include file for floating point package
-*/
-
-		/*	FLOAT FORMAT EXPONENT BIAS	*/
-
-#define	SGL_BIAS	 127	/* excess  128 notation used	*/
-#define	DBL_BIAS	1023	/* excess 1024 notation used	*/
-#define	EXT_BIAS	   0	/* 2s-complement notation used	*/
-				/* this is possible because the	*/
-				/* sign is in a seperate word	*/
-		
-		/*	VARIOUS MAX AND MIN VALUES	*/
-		/*	1) FOR THE DIFFERENT FORMATS	*/
-
-#define	SGL_MAX		   254	/*	standard definition	*/
-#define	SGL_MIN		     1	/*	standard definition	*/
-#define	DBL_MAX		  2046	/*	standard definition	*/
-#define	DBL_MIN		     1	/*	standard definition	*/
-#define EXT_MAX		 16383	/*	standard minimum	*/
-#define EXT_MIN		-16382	/*	standard minimum	*/
Index: trunk/minix/lib/ack/float/FP_shift.h
===================================================================
--- trunk/minix/lib/ack/float/FP_shift.h	(revision 9)
+++ 	(revision )
@@ -1,49 +1,0 @@
-/*
-  (c) copyright 1988 by the Vrije Universiteit, Amsterdam, The Netherlands.
-  See the copyright notice in the ACK home directory, in the file "Copyright".
-*/
-
-/* $Header: /cvsup/minix/src/lib/ack/float/FP_shift.h,v 1.1 2005/10/10 15:27:42 beng Exp $ */
-
-/*
-	include file for floating point package
-*/
-
-# define	CARRYBIT	0x80000000L
-# define	NORMBIT		0x80000000L
-# define	EXP_STORE	16
-
-
-				/* parameters for Single Precision */
-#define SGL_EXPSHIFT	7
-#define SGL_M1LEFT	8
-#define SGL_ZERO	0xffffff80L
-#define SGL_EXACT	0xff
-#define SGL_RUNPACK	SGL_M1LEFT
-
-#define SGL_ROUNDUP	0x80
-#define	SGL_CARRYOUT	0x01000000L
-#define	SGL_MASK	0x007fffffL
-
-				/* parameters for Double Precision */
-				/* used in extend.c */
-
-#define DBL_EXPSHIFT	4
-
-#define DBL_M1LEFT	11
-
-#define	DBL_RPACK	(32-DBL_M1LEFT)
-#define	DBL_LPACK	DBL_M1LEFT
-
-				/* used in compact.c */
-
-#define DBL_ZERO	0xfffffd00L
-
-#define DBL_EXACT	0x7ff
-
-#define DBL_RUNPACK	DBL_M1LEFT
-#define DBL_LUNPACK	(32-DBL_RUNPACK)
-
-#define DBL_ROUNDUP	0x400
-#define	DBL_CARRYOUT	0x00200000L
-#define	DBL_MASK	0x000fffffL
Index: trunk/minix/lib/ack/float/FP_trap.h
===================================================================
--- trunk/minix/lib/ack/float/FP_trap.h	(revision 9)
+++ 	(revision )
@@ -1,22 +1,0 @@
-/*
-  (c) copyright 1988 by the Vrije Universiteit, Amsterdam, The Netherlands.
-  See the copyright notice in the ACK home directory, in the file "Copyright".
-*/
-
-/* $Header: /cvsup/minix/src/lib/ack/float/FP_trap.h,v 1.1 2005/10/10 15:27:42 beng Exp $ */
-
-/*
-	include file for floating point package
-*/
-
-			/*	EM TRAPS	*/
-
-#define	EIOVFL	3	/* Integer  Overflow		*/
-#define	EFOVFL	4	/* Floating Overflow		*/
-#define	EFUNFL	5	/* Floating Underflow		*/
-#define	EIDIVZ	6	/* Integer  Divide by 0		*/
-#define	EFDIVZ	7	/* Floating Divide by 0.0	*/
-#define	EIUND	8	/* Integer  Undefined Number	*/
-#define	EFUND	9	/* Floating Undefined Number	*/
-#define	ECONV	10	/* Conversion Error		*/
-# define trap(x) _fptrp(x)
Index: trunk/minix/lib/ack/float/FP_types.h
===================================================================
--- trunk/minix/lib/ack/float/FP_types.h	(revision 9)
+++ 	(revision )
@@ -1,113 +1,0 @@
-/*
-  (c) copyright 1988 by the Vrije Universiteit, Amsterdam, The Netherlands.
-  See the copyright notice in the ACK home directory, in the file "Copyright".
-*/
-
-/* $Header: /cvsup/minix/src/lib/ack/float/FP_types.h,v 1.1 2005/10/10 15:27:42 beng Exp $ */
-
-/********************************************************/
-/*
-	Type definitions for C Floating Point Package
-	include file for floating point package
-*/
-/********************************************************/
-/*
-	THESE STRUCTURES ARE USED TO ADDRESS THE INDIVIDUAL
-	PARTS OF THE FLOATING POINT NUMBER REPRESENTATIONS.
-
-	THREE STRUCTURES ARE DEFINED:
-		SINGLE:	single precision floating format
-		DOUBLE:	double precision floating format
-		EXTEND:	double precision extended format
-*/
-/********************************************************/
-
-#ifndef __FPTYPES
-#define __FPTYPES
-
-typedef	struct	{
-	unsigned long	h_32;	/* higher 32 bits of 64 */
-	unsigned long	l_32;	/* lower  32 bits of 64 */
-}	B64;
-
-typedef	unsigned long	SINGLE;
-
-typedef	struct	{
-	unsigned long	d[2];
-}	DOUBLE;
-
-typedef	struct	{	/* expanded float format	*/
-	short	sign;
-	short	exp;
-	B64	mantissa;
-#define m1 mantissa.h_32
-#define m2 mantissa.l_32
-} EXTEND;
-
-struct	fef4_returns {
-	int	e;
-	SINGLE	f;
-};
-
-struct	fef8_returns {
-	int	e;
-	DOUBLE	f;
-};
-
-struct fif4_returns {
-	SINGLE ipart;
-	SINGLE fpart;
-};
-
-struct fif8_returns {
-	DOUBLE ipart;
-	DOUBLE fpart;
-};
-
-#if __STDC__
-#define _PROTOTYPE(function, params)	function params
-#else
-#define _PROTOTYPE(function, params)	function()
-#endif
-_PROTOTYPE( void add_ext, (EXTEND *e1, EXTEND *e2));
-_PROTOTYPE( void mul_ext, (EXTEND *e1, EXTEND *e2));
-_PROTOTYPE( void div_ext, (EXTEND *e1, EXTEND *e2));
-_PROTOTYPE( void sub_ext, (EXTEND *e1, EXTEND *e2));
-_PROTOTYPE( void sft_ext, (EXTEND *e1, EXTEND *e2));
-_PROTOTYPE( void nrm_ext, (EXTEND *e1));
-_PROTOTYPE( void zrf_ext, (EXTEND *e1));
-_PROTOTYPE( void extend, (unsigned long *from, EXTEND *to, int size));
-_PROTOTYPE( void compact, (EXTEND *from, unsigned long *to, int size));
-_PROTOTYPE( void _fptrp, (int));
-_PROTOTYPE( void adf4, (SINGLE s2, SINGLE s1));
-_PROTOTYPE( void adf8, (DOUBLE s2, DOUBLE s1));
-_PROTOTYPE( void sbf4, (SINGLE s2, SINGLE s1));
-_PROTOTYPE( void sbf8, (DOUBLE s2, DOUBLE s1));
-_PROTOTYPE( void dvf4, (SINGLE s2, SINGLE s1));
-_PROTOTYPE( void dvf8, (DOUBLE s2, DOUBLE s1));
-_PROTOTYPE( void mlf4, (SINGLE s2, SINGLE s1));
-_PROTOTYPE( void mlf8, (DOUBLE s2, DOUBLE s1));
-_PROTOTYPE( void ngf4, (SINGLE f));
-_PROTOTYPE( void ngf8, (DOUBLE f));
-_PROTOTYPE( void zrf4, (SINGLE *l));
-_PROTOTYPE( void zrf8, (DOUBLE *z));
-_PROTOTYPE( void cff4, (DOUBLE src));
-_PROTOTYPE( void cff8, (SINGLE src));
-_PROTOTYPE( void cif4, (int ss, long src));
-_PROTOTYPE( void cif8, (int ss, long src));
-_PROTOTYPE( void cuf4, (int ss, long src));
-_PROTOTYPE( void cuf8, (int ss, long src));
-_PROTOTYPE( long cfu, (int ds, int ss, DOUBLE src));
-_PROTOTYPE( long cfi, (int ds, int ss, DOUBLE src));
-_PROTOTYPE( int cmf4, (SINGLE s2, SINGLE s1));
-_PROTOTYPE( int cmf8, (DOUBLE d1, DOUBLE d2));
-_PROTOTYPE( void fef4, (struct fef4_returns *r, SINGLE s1));
-_PROTOTYPE( void fef8, (struct fef8_returns *r, DOUBLE s1));
-_PROTOTYPE( void fif4, (struct fif4_returns *p, SINGLE x, SINGLE y));
-_PROTOTYPE( void fif8, (struct fif8_returns *p, DOUBLE x, DOUBLE y));
-
-_PROTOTYPE( void b64_sft, (B64 *, int));
-_PROTOTYPE( void b64_lsft, (B64 *));
-_PROTOTYPE( void b64_rsft, (B64 *));
-_PROTOTYPE( int b64_add, (B64 *, B64 *));
-#endif
Index: trunk/minix/lib/ack/float/Makedepend-ack
===================================================================
--- trunk/minix/lib/ack/float/Makedepend-ack	(revision 9)
+++ 	(revision )
@@ -1,41 +1,0 @@
-depend-ack:
-	rm .depend-ack
-	touch .depend-ack
-	mkdep 'cc -E' add_ext.fc | sed -e 's:^\(.\):../../obj-ack//./ack/float/\1:' >> .depend-ack
-	mkdep 'cc -E' adder.fc | sed -e 's:^\(.\):../../obj-ack//./ack/float/\1:' >> .depend-ack
-	mkdep 'cc -E' adf4.fc | sed -e 's:^\(.\):../../obj-ack//./ack/float/\1:' >> .depend-ack
-	mkdep 'cc -E' adf8.fc | sed -e 's:^\(.\):../../obj-ack//./ack/float/\1:' >> .depend-ack
-	mkdep 'cc -E' cff4.fc | sed -e 's:^\(.\):../../obj-ack//./ack/float/\1:' >> .depend-ack
-	mkdep 'cc -E' cff8.fc | sed -e 's:^\(.\):../../obj-ack//./ack/float/\1:' >> .depend-ack
-	mkdep 'cc -E' cfi.fc | sed -e 's:^\(.\):../../obj-ack//./ack/float/\1:' >> .depend-ack
-	mkdep 'cc -E' cfu.fc | sed -e 's:^\(.\):../../obj-ack//./ack/float/\1:' >> .depend-ack
-	mkdep 'cc -E' cif4.fc | sed -e 's:^\(.\):../../obj-ack//./ack/float/\1:' >> .depend-ack
-	mkdep 'cc -E' cif8.fc | sed -e 's:^\(.\):../../obj-ack//./ack/float/\1:' >> .depend-ack
-	mkdep 'cc -E' cmf4.fc | sed -e 's:^\(.\):../../obj-ack//./ack/float/\1:' >> .depend-ack
-	mkdep 'cc -E' cmf8.fc | sed -e 's:^\(.\):../../obj-ack//./ack/float/\1:' >> .depend-ack
-	mkdep 'cc -E' compact.fc | sed -e 's:^\(.\):../../obj-ack//./ack/float/\1:' >> .depend-ack
-	mkdep 'cc -E' cuf4.fc | sed -e 's:^\(.\):../../obj-ack//./ack/float/\1:' >> .depend-ack
-	mkdep 'cc -E' cuf8.fc | sed -e 's:^\(.\):../../obj-ack//./ack/float/\1:' >> .depend-ack
-	mkdep 'cc -E' div_ext.fc | sed -e 's:^\(.\):../../obj-ack//./ack/float/\1:' >> .depend-ack
-	mkdep 'cc -E' dvf4.fc | sed -e 's:^\(.\):../../obj-ack//./ack/float/\1:' >> .depend-ack
-	mkdep 'cc -E' dvf8.fc | sed -e 's:^\(.\):../../obj-ack//./ack/float/\1:' >> .depend-ack
-	mkdep 'cc -E' extend.fc | sed -e 's:^\(.\):../../obj-ack//./ack/float/\1:' >> .depend-ack
-	mkdep 'cc -E' fef4.fc | sed -e 's:^\(.\):../../obj-ack//./ack/float/\1:' >> .depend-ack
-	mkdep 'cc -E' fef8.fc | sed -e 's:^\(.\):../../obj-ack//./ack/float/\1:' >> .depend-ack
-	mkdep 'cc -E' fif4.fc | sed -e 's:^\(.\):../../obj-ack//./ack/float/\1:' >> .depend-ack
-	mkdep 'cc -E' fif8.fc | sed -e 's:^\(.\):../../obj-ack//./ack/float/\1:' >> .depend-ack
-	mkdep 'cc  -E' fptrp.s | sed -e 's:^\(.\):../../obj-ack//./ack/float/\1:' >> .depend-ack
-	mkdep 'cc -E' mlf4.fc | sed -e 's:^\(.\):../../obj-ack//./ack/float/\1:' >> .depend-ack
-	mkdep 'cc -E' mlf8.fc | sed -e 's:^\(.\):../../obj-ack//./ack/float/\1:' >> .depend-ack
-	mkdep 'cc -E' mul_ext.fc | sed -e 's:^\(.\):../../obj-ack//./ack/float/\1:' >> .depend-ack
-	mkdep 'cc -E' ngf4.fc | sed -e 's:^\(.\):../../obj-ack//./ack/float/\1:' >> .depend-ack
-	mkdep 'cc -E' ngf8.fc | sed -e 's:^\(.\):../../obj-ack//./ack/float/\1:' >> .depend-ack
-	mkdep 'cc -E' nrm_ext.fc | sed -e 's:^\(.\):../../obj-ack//./ack/float/\1:' >> .depend-ack
-	mkdep 'cc -E' sbf4.fc | sed -e 's:^\(.\):../../obj-ack//./ack/float/\1:' >> .depend-ack
-	mkdep 'cc -E' sbf8.fc | sed -e 's:^\(.\):../../obj-ack//./ack/float/\1:' >> .depend-ack
-	mkdep 'cc -E' sft_ext.fc | sed -e 's:^\(.\):../../obj-ack//./ack/float/\1:' >> .depend-ack
-	mkdep 'cc -E' shifter.fc | sed -e 's:^\(.\):../../obj-ack//./ack/float/\1:' >> .depend-ack
-	mkdep 'cc -E' sub_ext.fc | sed -e 's:^\(.\):../../obj-ack//./ack/float/\1:' >> .depend-ack
-	mkdep 'cc -E' zrf4.fc | sed -e 's:^\(.\):../../obj-ack//./ack/float/\1:' >> .depend-ack
-	mkdep 'cc -E' zrf8.fc | sed -e 's:^\(.\):../../obj-ack//./ack/float/\1:' >> .depend-ack
-	mkdep 'cc -E' zrf_ext.fc | sed -e 's:^\(.\):../../obj-ack//./ack/float/\1:' >> .depend-ack
Index: trunk/minix/lib/ack/float/Makedepend-gnu
===================================================================
--- trunk/minix/lib/ack/float/Makedepend-gnu	(revision 9)
+++ 	(revision )
@@ -1,3 +1,0 @@
-depend-gnu:
-	rm .depend-gnu
-	touch .depend-gnu
Index: trunk/minix/lib/ack/float/Makefile
===================================================================
--- trunk/minix/lib/ack/float/Makefile	(revision 9)
+++ 	(revision )
@@ -1,151 +1,0 @@
-#Generated from ./ack/float/Makefile.in
-all: all-ack
-
-all-ack:
-all-gnu:
-
-makefiles: Makefile
-Makedepend-ack Makedepend-gnu: 
-	sh ../../generate.sh ./ack/float ../../obj-ack/ ../../obj-gnu
-
-Makefile: Makefile.in Makedepend-ack Makedepend-gnu
-	sh ../../generate.sh ./ack/float ../../obj-ack/ ../../obj-gnu
-	@echo
-	@echo *Attention*
-	@echo Makefile is regenerated... rerun command to see changes
-	@echo *Attention*
-	@echo
-
-depend: depend-ack
-all-ack: ../../obj-ack//libfp.a
-
-../../obj-ack//libfp.a: ../../obj-ack//libfp.a(add_ext.o)
-../../obj-ack//libfp.a: ../../obj-ack//libfp.a(adder.o)
-../../obj-ack//libfp.a: ../../obj-ack//libfp.a(adf4.o)
-../../obj-ack//libfp.a: ../../obj-ack//libfp.a(adf8.o)
-../../obj-ack//libfp.a: ../../obj-ack//libfp.a(cff4.o)
-../../obj-ack//libfp.a: ../../obj-ack//libfp.a(cff8.o)
-../../obj-ack//libfp.a: ../../obj-ack//libfp.a(cfi.o)
-../../obj-ack//libfp.a: ../../obj-ack//libfp.a(cfu.o)
-../../obj-ack//libfp.a: ../../obj-ack//libfp.a(cif4.o)
-../../obj-ack//libfp.a: ../../obj-ack//libfp.a(cif8.o)
-../../obj-ack//libfp.a: ../../obj-ack//libfp.a(cmf4.o)
-../../obj-ack//libfp.a: ../../obj-ack//libfp.a(cmf8.o)
-../../obj-ack//libfp.a: ../../obj-ack//libfp.a(compact.o)
-../../obj-ack//libfp.a: ../../obj-ack//libfp.a(cuf4.o)
-../../obj-ack//libfp.a: ../../obj-ack//libfp.a(cuf8.o)
-../../obj-ack//libfp.a: ../../obj-ack//libfp.a(div_ext.o)
-../../obj-ack//libfp.a: ../../obj-ack//libfp.a(dvf4.o)
-../../obj-ack//libfp.a: ../../obj-ack//libfp.a(dvf8.o)
-../../obj-ack//libfp.a: ../../obj-ack//libfp.a(extend.o)
-../../obj-ack//libfp.a: ../../obj-ack//libfp.a(fef4.o)
-../../obj-ack//libfp.a: ../../obj-ack//libfp.a(fef8.o)
-../../obj-ack//libfp.a: ../../obj-ack//libfp.a(fif4.o)
-../../obj-ack//libfp.a: ../../obj-ack//libfp.a(fif8.o)
-../../obj-ack//libfp.a: ../../obj-ack//libfp.a(fptrp.o)
-../../obj-ack//libfp.a: ../../obj-ack//libfp.a(mlf4.o)
-../../obj-ack//libfp.a: ../../obj-ack//libfp.a(mlf8.o)
-../../obj-ack//libfp.a: ../../obj-ack//libfp.a(mul_ext.o)
-../../obj-ack//libfp.a: ../../obj-ack//libfp.a(ngf4.o)
-../../obj-ack//libfp.a: ../../obj-ack//libfp.a(ngf8.o)
-../../obj-ack//libfp.a: ../../obj-ack//libfp.a(nrm_ext.o)
-../../obj-ack//libfp.a: ../../obj-ack//libfp.a(sbf4.o)
-../../obj-ack//libfp.a: ../../obj-ack//libfp.a(sbf8.o)
-../../obj-ack//libfp.a: ../../obj-ack//libfp.a(sft_ext.o)
-../../obj-ack//libfp.a: ../../obj-ack//libfp.a(shifter.o)
-../../obj-ack//libfp.a: ../../obj-ack//libfp.a(sub_ext.o)
-../../obj-ack//libfp.a: ../../obj-ack//libfp.a(zrf4.o)
-../../obj-ack//libfp.a: ../../obj-ack//libfp.a(zrf8.o)
-../../obj-ack//libfp.a: ../../obj-ack//libfp.a(zrf_ext.o)
-
-../../obj-ack//libfp.a:
-	ar cr ../../obj-ack//libfp.a ../../obj-ack//./ack/float/*.o
-	rm ../../obj-ack//./ack/float/*.o
-
-../../obj-ack//libfp.a(add_ext.o): add_ext.fc
-	sh ./FP.compile ../../obj-ack//./ack/float/add_ext.o add_ext.fc
-../../obj-ack//libfp.a(adder.o): adder.fc
-	sh ./FP.compile ../../obj-ack//./ack/float/adder.o adder.fc
-../../obj-ack//libfp.a(adf4.o): adf4.fc
-	sh ./FP.compile ../../obj-ack//./ack/float/adf4.o adf4.fc
-../../obj-ack//libfp.a(adf8.o): adf8.fc
-	sh ./FP.compile ../../obj-ack//./ack/float/adf8.o adf8.fc
-../../obj-ack//libfp.a(cff4.o): cff4.fc
-	sh ./FP.compile ../../obj-ack//./ack/float/cff4.o cff4.fc
-../../obj-ack//libfp.a(cff8.o): cff8.fc
-	sh ./FP.compile ../../obj-ack//./ack/float/cff8.o cff8.fc
-../../obj-ack//libfp.a(cfi.o): cfi.fc
-	sh ./FP.compile ../../obj-ack//./ack/float/cfi.o cfi.fc
-../../obj-ack//libfp.a(cfu.o): cfu.fc
-	sh ./FP.compile ../../obj-ack//./ack/float/cfu.o cfu.fc
-../../obj-ack//libfp.a(cif4.o): cif4.fc
-	sh ./FP.compile ../../obj-ack//./ack/float/cif4.o cif4.fc
-../../obj-ack//libfp.a(cif8.o): cif8.fc
-	sh ./FP.compile ../../obj-ack//./ack/float/cif8.o cif8.fc
-../../obj-ack//libfp.a(cmf4.o): cmf4.fc
-	sh ./FP.compile ../../obj-ack//./ack/float/cmf4.o cmf4.fc
-../../obj-ack//libfp.a(cmf8.o): cmf8.fc
-	sh ./FP.compile ../../obj-ack//./ack/float/cmf8.o cmf8.fc
-../../obj-ack//libfp.a(compact.o): compact.fc
-	sh ./FP.compile ../../obj-ack//./ack/float/compact.o compact.fc
-../../obj-ack//libfp.a(cuf4.o): cuf4.fc
-	sh ./FP.compile ../../obj-ack//./ack/float/cuf4.o cuf4.fc
-../../obj-ack//libfp.a(cuf8.o): cuf8.fc
-	sh ./FP.compile ../../obj-ack//./ack/float/cuf8.o cuf8.fc
-../../obj-ack//libfp.a(div_ext.o): div_ext.fc
-	sh ./FP.compile ../../obj-ack//./ack/float/div_ext.o div_ext.fc
-../../obj-ack//libfp.a(dvf4.o): dvf4.fc
-	sh ./FP.compile ../../obj-ack//./ack/float/dvf4.o dvf4.fc
-../../obj-ack//libfp.a(dvf8.o): dvf8.fc
-	sh ./FP.compile ../../obj-ack//./ack/float/dvf8.o dvf8.fc
-../../obj-ack//libfp.a(extend.o): extend.fc
-	sh ./FP.compile ../../obj-ack//./ack/float/extend.o extend.fc
-../../obj-ack//libfp.a(fef4.o): fef4.fc
-	sh ./FP.compile ../../obj-ack//./ack/float/fef4.o fef4.fc
-../../obj-ack//libfp.a(fef8.o): fef8.fc
-	sh ./FP.compile ../../obj-ack//./ack/float/fef8.o fef8.fc
-../../obj-ack//libfp.a(fif4.o): fif4.fc
-	sh ./FP.compile ../../obj-ack//./ack/float/fif4.o fif4.fc
-../../obj-ack//libfp.a(fif8.o): fif8.fc
-	sh ./FP.compile ../../obj-ack//./ack/float/fif8.o fif8.fc
-../../obj-ack//libfp.a(fptrp.o): fptrp.s
-	cc  -c -o ../../obj-ack//./ack/float/fptrp.o fptrp.s
-../../obj-ack//libfp.a(mlf4.o): mlf4.fc
-	sh ./FP.compile ../../obj-ack//./ack/float/mlf4.o mlf4.fc
-../../obj-ack//libfp.a(mlf8.o): mlf8.fc
-	sh ./FP.compile ../../obj-ack//./ack/float/mlf8.o mlf8.fc
-../../obj-ack//libfp.a(mul_ext.o): mul_ext.fc
-	sh ./FP.compile ../../obj-ack//./ack/float/mul_ext.o mul_ext.fc
-../../obj-ack//libfp.a(ngf4.o): ngf4.fc
-	sh ./FP.compile ../../obj-ack//./ack/float/ngf4.o ngf4.fc
-../../obj-ack//libfp.a(ngf8.o): ngf8.fc
-	sh ./FP.compile ../../obj-ack//./ack/float/ngf8.o ngf8.fc
-../../obj-ack//libfp.a(nrm_ext.o): nrm_ext.fc
-	sh ./FP.compile ../../obj-ack//./ack/float/nrm_ext.o nrm_ext.fc
-../../obj-ack//libfp.a(sbf4.o): sbf4.fc
-	sh ./FP.compile ../../obj-ack//./ack/float/sbf4.o sbf4.fc
-../../obj-ack//libfp.a(sbf8.o): sbf8.fc
-	sh ./FP.compile ../../obj-ack//./ack/float/sbf8.o sbf8.fc
-../../obj-ack//libfp.a(sft_ext.o): sft_ext.fc
-	sh ./FP.compile ../../obj-ack//./ack/float/sft_ext.o sft_ext.fc
-../../obj-ack//libfp.a(shifter.o): shifter.fc
-	sh ./FP.compile ../../obj-ack//./ack/float/shifter.o shifter.fc
-../../obj-ack//libfp.a(sub_ext.o): sub_ext.fc
-	sh ./FP.compile ../../obj-ack//./ack/float/sub_ext.o sub_ext.fc
-../../obj-ack//libfp.a(zrf4.o): zrf4.fc
-	sh ./FP.compile ../../obj-ack//./ack/float/zrf4.o zrf4.fc
-../../obj-ack//libfp.a(zrf8.o): zrf8.fc
-	sh ./FP.compile ../../obj-ack//./ack/float/zrf8.o zrf8.fc
-../../obj-ack//libfp.a(zrf_ext.o): zrf_ext.fc
-	sh ./FP.compile ../../obj-ack//./ack/float/zrf_ext.o zrf_ext.fc
-
-
-
-clean::
-	rm -f ../../obj-ack//./ack/float/*
-
-include Makedepend-ack
-include .depend-ack
-
-include Makedepend-gnu
-include .depend-gnu
Index: trunk/minix/lib/ack/float/Makefile.in
===================================================================
--- trunk/minix/lib/ack/float/Makefile.in	(revision 9)
+++ 	(revision )
@@ -1,61 +1,0 @@
-# Makefile for lib/float.
-
-#CC1	= /bin/sh ./FP.compile
-
-LIBRARIES=libfp
-
-libfp_FILES=" \
-	add_ext.fc \
-	adder.fc \
-	adf4.fc \
-	adf8.fc \
-	cff4.fc \
-	cff8.fc \
-	cfi.fc \
-	cfu.fc \
-	cif4.fc \
-	cif8.fc \
-	cmf4.fc \
-	cmf8.fc \
-	compact.fc \
-	cuf4.fc \
-	cuf8.fc \
-	div_ext.fc \
-	dvf4.fc \
-	dvf8.fc \
-	extend.fc \
-	fef4.fc \
-	fef8.fc \
-	fif4.fc \
-	fif8.fc \
-	fptrp.s \
-	mlf4.fc \
-	mlf8.fc \
-	mul_ext.fc \
-	ngf4.fc \
-	ngf8.fc \
-	nrm_ext.fc \
-	sbf4.fc \
-	sbf8.fc \
-	sft_ext.fc \
-	shifter.fc \
-	sub_ext.fc \
-	zrf4.fc \
-	zrf8.fc \
-	zrf_ext.fc"
-
-TYPE=ack
-
-#extra commands to convert the c files to the correct assembler files
-
-#%.s: %.fc
-#	/bin/sh ./FP.compile $<
-
-#1. make a assembler file of the c file
-#%.fs: %.fc
-#	-cp $< $(<:.fc=.c) && cc -O -I. -D_MINIX -D_POSIX_SOURCE -S $(<:.fc=.c) && cp $(<:.fc=.s) $(<:.fc=.fs)
-#	@rm $(<:.fc=.c) $(<:.fc=.s)
-
-#2. modify the assembler file
-#%.s: %.fs
-#	sed -f FP.script $< > $@
Index: trunk/minix/lib/ack/float/add_ext.fc
===================================================================
--- trunk/minix/lib/ack/float/add_ext.fc	(revision 9)
+++ 	(revision )
@@ -1,56 +1,0 @@
-/*
-  (c) copyright 1988 by the Vrije Universiteit, Amsterdam, The Netherlands.
-  See the copyright notice in the ACK home directory, in the file "Copyright".
-*/
-
-/* $Header: /cvsup/minix/src/lib/ack/float/add_ext.fc,v 1.1 2005/10/10 15:27:42 beng Exp $ */
-
-/*
-	ADD TWO EXTENDED FORMAT NUMBERS
-*/
-
-#include "FP_types.h"
-
-void
-add_ext(e1,e2)
-register EXTEND	*e1,*e2;
-{
-	if ((e2->m1 | e2->m2) == 0L) {
-		return;
-	}
-	if ((e1->m1 | e1->m2) == 0L) {
-		*e1 = *e2;
-		return;
-	}
-	sft_ext(e1, e2);	/* adjust mantissas to equal powers */
-	if (e1->sign != e2->sign) {
-		/* e1 + e2 = e1 - (-e2) */
-		if (e2->m1 > e1->m1 ||
-                    (e2->m1 == e1->m1 && e2->m2 > e1->m2)) {
-                	/*      abs(e2) > abs(e1) */
-			EXTEND x;
-
-			x = *e1;
-			*e1 = *e2;
-                	if (x.m2 > e1->m2) {
-                        	e1->m1 -= 1;    /* carry in */
-                	}
-                	e1->m1 -= x.m1;
-                	e1->m2 -= x.m2;
-        	}
-        	else {
-                	if (e2->m2 > e1->m2)
-                        	e1->m1 -= 1;    /* carry in */
-                	e1->m1 -= e2->m1;
-                	e1->m2 -= e2->m2;
-        	}
-	}
-	else {
-		if (b64_add(&e1->mantissa,&e2->mantissa)) {	/* addition carry */
-			b64_rsft(&e1->mantissa);	/* shift mantissa one bit RIGHT */
-			e1->m1 |= 0x80000000L;	/* set max bit	*/
-			e1->exp++;		/* increase the exponent */
-		}
-	}
-	nrm_ext(e1);
-}
Index: trunk/minix/lib/ack/float/add_ext.s
===================================================================
--- trunk/minix/lib/ack/float/add_ext.s	(revision 9)
+++ 	(revision )
@@ -1,107 +1,0 @@
-.sect .text; .sect .rom; .sect .data; .sect .bss
-.extern .add_ext
-.sect .text
-.add_ext:
-push ebp
-mov ebp,esp
-sub	esp,12
-push esi
-push edi
-mov esi,8(ebp)
-mov edi,12(ebp)
-mov edx,8(edi)
-or edx,4(edi)
-je I1_1
-mov edx,8(esi)
-or edx,4(esi)
-jne I1_7
-push edi
-push esi
-mov ecx,3
-call .blm
-jmp I1_1
-I1_7:
-push edi
-push esi
-call .sft_ext
-pop ecx
-pop ecx
-movsx eax,(esi)
-movsx ebx,(edi)
-cmp eax,ebx
-je I1_10
-mov edx,4(esi)
-cmp 4(edi),edx
-ja I1_12
-cmp 4(edi),edx
-jne I1_13
-mov edx,8(esi)
-cmp 8(edi),edx
-jbe I1_13
-I1_12:
-push esi
-lea eax,-12(ebp)
-push eax
-mov ecx,3
-call .blm
-push edi
-push esi
-mov ecx,3
-call .blm
-mov edx,-4(ebp)
-cmp 8(esi),edx
-jae I1_18
-mov edx,4(esi)
-sub edx,1
-mov 4(esi),edx
-I1_18:
-mov edx,4(esi)
-sub edx,-8(ebp)
-mov 4(esi),edx
-mov edx,8(esi)
-sub edx,-4(ebp)
-mov 8(esi),edx
-jmp I1_11
-I1_13:
-mov edx,8(esi)
-cmp 8(edi),edx
-jbe I1_21
-mov edx,4(esi)
-sub edx,1
-mov 4(esi),edx
-I1_21:
-mov edx,4(esi)
-sub edx,4(edi)
-mov 4(esi),edx
-mov edx,8(esi)
-sub edx,8(edi)
-mov 8(esi),edx
-jmp I1_11
-I1_10:
-lea eax,4(edi)
-push eax
-lea eax,4(esi)
-push eax
-call .b64_add
-pop ecx
-pop ecx
-test eax,eax
-je I1_11
-lea eax,4(esi)
-push eax
-call .b64_rsft
-pop ecx
-or 4(esi),-2147483648
-movsx eax,2(esi)
-inc eax
-movsx eax,eax
-o16 mov 2(esi),eax
-I1_11:
-push esi
-call .nrm_ext
-pop ecx
-I1_1:
-pop edi
-pop esi
-leave
-ret
Index: trunk/minix/lib/ack/float/adder.fc
===================================================================
--- trunk/minix/lib/ack/float/adder.fc	(revision 9)
+++ 	(revision )
@@ -1,50 +1,0 @@
-/*
-  (c) copyright 1988 by the Vrije Universiteit, Amsterdam, The Netherlands.
-  See the copyright notice in the ACK home directory, in the file "Copyright".
-*/
-
-/* $Header: /cvsup/minix/src/lib/ack/float/adder.fc,v 1.1 2005/10/10 15:27:42 beng Exp $ */
-
-/*
- *	these are the routines the routines to do 32 and  64-bit addition
- */
-
-# ifdef	EXT_DEBUG
-# include <stdio.h>
-# endif
-
-# include "FP_types.h"
-# define	UNKNOWN -1
-# define	TRUE	 1
-# define	FALSE	 0
-# define	MAXBIT	0x80000000L
-
-	/*
-	 *	add 64 bits
-	 */
-int
-b64_add(e1,e2)
-		/*
-		 * pointers to 64 bit 'registers'
-		 */
-register	B64	*e1,*e2;
-{
-		register	int	overflow;
-				int	carry;
-
-			/* add higher pair of 32 bits */
-	overflow = ((unsigned long) 0xFFFFFFFF - e1->h_32 < e2->h_32);
-	e1->h_32 += e2->h_32;
-
-			/* add lower pair of 32 bits */
-	carry = ((unsigned long) 0xFFFFFFFF - e1->l_32 < e2->l_32);
-	e1->l_32 += e2->l_32;
-# ifdef	EXT_DEBUG
-	printf("\t\t\t\t\tb64_add: overflow (%d); internal carry(%d)\n",
-					overflow,carry);
-	fflush(stdout);
-# endif
-	if ((carry) && (++e1->h_32 == 0))
-		return(TRUE);		/* had a 64 bit overflow */
-	return(overflow);		/* return status from higher add */
-}
Index: trunk/minix/lib/ack/float/adder.h
===================================================================
--- trunk/minix/lib/ack/float/adder.h	(revision 9)
+++ 	(revision )
@@ -1,15 +1,0 @@
-/*
-  (c) copyright 1988 by the Vrije Universiteit, Amsterdam, The Netherlands.
-  See the copyright notice in the ACK home directory, in the file "Copyright".
-*/
-
-/* $Header: /cvsup/minix/src/lib/ack/float/adder.h,v 1.1 2005/10/10 15:27:42 beng Exp $ */
-
-/*
- *	include file for 32 & 64 bit addition
- */
-
-typedef	struct	B64 {
-	unsigned long	h_32;	/* higher 32 bits of 64 */
-	unsigned long	l_32;	/* lower  32 bits of 64 */
-}	B64;
Index: trunk/minix/lib/ack/float/adder.s
===================================================================
--- trunk/minix/lib/ack/float/adder.s	(revision 9)
+++ 	(revision )
@@ -1,46 +1,0 @@
-.sect .text; .sect .rom; .sect .data; .sect .bss
-.extern .b64_add
-.sect .text
-.b64_add:
-push ebp
-mov ebp,esp
-sub	esp,8
-push esi
-push edi
-mov esi,8(ebp)
-mov edi,12(ebp)
-mov edx,-1
-sub edx,(esi)
-xor eax,eax
-cmp (edi),edx
-jbe 1f
-inc eax
-1:
-mov -4(ebp),eax
-mov edx,(edi)
-add (esi),edx
-mov edx,-1
-sub edx,4(esi)
-xor eax,eax
-cmp 4(edi),edx
-jbe 1f
-inc eax
-1:
-mov -8(ebp),eax
-mov edx,4(edi)
-add 4(esi),edx
-cmp -8(ebp),0
-je I1_4
-mov edx,(esi)
-inc edx
-mov (esi),edx
-jne I1_4
-mov eax,1
-jmp I1_1
-I1_4:
-mov eax,-4(ebp)
-I1_1:
-pop edi
-pop esi
-leave
-ret
Index: trunk/minix/lib/ack/float/adf4.fc
===================================================================
--- trunk/minix/lib/ack/float/adf4.fc	(revision 9)
+++ 	(revision )
@@ -1,32 +1,0 @@
-/*
-  (c) copyright 1988 by the Vrije Universiteit, Amsterdam, The Netherlands.
-  See the copyright notice in the ACK home directory, in the file "Copyright".
-*/
-
-/* $Header: /cvsup/minix/src/lib/ack/float/adf4.fc,v 1.1 2005/10/10 15:27:42 beng Exp $ */
-
-/*
-	ADD TWO FLOATS - SINGLE (ADF 4)
-*/
-
-#include	"FP_types.h"
-
-void
-adf4(s2,s1)
-SINGLE	s1,s2;
-{
-	EXTEND	e1,e2;
-	int	swap = 0;
-
-	if (s1 == (SINGLE) 0) {
-		s1 = s2;
-		return;
-	}
-	if (s2 == (SINGLE) 0) {
-		return;
-	}
-	extend(&s1,&e1,sizeof(SINGLE));
-	extend(&s2,&e2,sizeof(SINGLE));
-	add_ext(&e1,&e2);
-	compact(&e1,&s1,sizeof(SINGLE));
-}
Index: trunk/minix/lib/ack/float/adf4.s
===================================================================
--- trunk/minix/lib/ack/float/adf4.s	(revision 9)
+++ 	(revision )
@@ -1,47 +1,0 @@
-.sect .text; .sect .rom; .sect .data; .sect .bss
-.extern .adf4
-.sect .text
-.adf4:
-push ebp
-mov ebp,esp
-sub	esp,28
-mov -28(ebp),0
-cmp 12(ebp),0
-jne I1_4
-mov edx,8(ebp)
-mov 12(ebp),edx
-jmp I1_1
-I1_4:
-cmp 8(ebp),0
-je I1_1
-push 4
-lea eax,-12(ebp)
-push eax
-lea eax,12(ebp)
-push eax
-call .extend
-add esp,12
-push 4
-lea eax,-24(ebp)
-push eax
-lea eax,8(ebp)
-push eax
-call .extend
-add esp,12
-lea eax,-24(ebp)
-push eax
-lea eax,-12(ebp)
-push eax
-call .add_ext
-pop ecx
-pop ecx
-push 4
-lea eax,12(ebp)
-push eax
-lea eax,-12(ebp)
-push eax
-call .compact
-add esp,12
-I1_1:
-leave
-ret
Index: trunk/minix/lib/ack/float/adf8.fc
===================================================================
--- trunk/minix/lib/ack/float/adf8.fc	(revision 9)
+++ 	(revision )
@@ -1,32 +1,0 @@
-/*
-  (c) copyright 1988 by the Vrije Universiteit, Amsterdam, The Netherlands.
-  See the copyright notice in the ACK home directory, in the file "Copyright".
-*/
-
-/* $Header: /cvsup/minix/src/lib/ack/float/adf8.fc,v 1.1 2005/10/10 15:27:42 beng Exp $ */
-
-/*
-	ADD TWO FLOATS - DOUBLE (ADF 8)
-*/
-
-#include	"FP_types.h"
-
-void
-adf8(s2,s1)
-DOUBLE	s1,s2;
-{
-	EXTEND	e1,e2;
-
-	if (s1.d[0] == 0 && s1.d[1] == 0) {
-		s1 = s2;
-		return;
-	}
-	if (s2.d[0] == 0 && s2.d[1] == 0) {
-		return;
-	}
-
-	extend(&s1.d[0],&e1,sizeof(DOUBLE));
-	extend(&s2.d[0],&e2,sizeof(DOUBLE));
-	add_ext(&e1,&e2);
-	compact(&e1,&s1.d[0],sizeof(DOUBLE));
-}
Index: trunk/minix/lib/ack/float/adf8.s
===================================================================
--- trunk/minix/lib/ack/float/adf8.s	(revision 9)
+++ 	(revision )
@@ -1,53 +1,0 @@
-.sect .text; .sect .rom; .sect .data; .sect .bss
-.extern .adf8
-.sect .text
-.adf8:
-push ebp
-mov ebp,esp
-sub	esp,24
-cmp 16(ebp),0
-jne I1_4
-cmp 20(ebp),0
-jne I1_4
-mov edx,8(ebp)
-mov ecx,12(ebp)
-mov 16(ebp),edx
-mov 20(ebp),ecx
-jmp I1_1
-I1_4:
-cmp 8(ebp),0
-jne I1_8
-cmp 12(ebp),0
-je I1_1
-I1_8:
-push 8
-lea eax,-12(ebp)
-push eax
-lea eax,16(ebp)
-push eax
-call .extend
-add esp,12
-push 8
-lea eax,-24(ebp)
-push eax
-lea eax,8(ebp)
-push eax
-call .extend
-add esp,12
-lea eax,-24(ebp)
-push eax
-lea eax,-12(ebp)
-push eax
-call .add_ext
-pop ecx
-pop ecx
-push 8
-lea eax,16(ebp)
-push eax
-lea eax,-12(ebp)
-push eax
-call .compact
-add esp,12
-I1_1:
-leave
-ret
Index: trunk/minix/lib/ack/float/byte_order.h
===================================================================
--- trunk/minix/lib/ack/float/byte_order.h	(revision 9)
+++ 	(revision )
@@ -1,6 +1,0 @@
-#define CHAR_UNSIGNED	0
-#define MSB_AT_LOW_ADDRESS	0
-#define MSW_AT_LOW_ADDRESS	0
-#define FL_MSB_AT_LOW_ADDRESS	0
-#define FL_MSW_AT_LOW_ADDRESS	0
-#define FL_MSL_AT_LOW_ADDRESS	0
Index: trunk/minix/lib/ack/float/cff4.fc
===================================================================
--- trunk/minix/lib/ack/float/cff4.fc	(revision 9)
+++ 	(revision )
@@ -1,28 +1,0 @@
-/*
-  (c) copyright 1988 by the Vrije Universiteit, Amsterdam, The Netherlands.
-  See the copyright notice in the ACK home directory, in the file "Copyright".
-*/
-
-/* $Header: /cvsup/minix/src/lib/ack/float/cff4.fc,v 1.1 2005/10/10 15:27:42 beng Exp $ */
-
-/*
-		CONVERT DOUBLE TO SINGLE (CFF 8 4)
-
-	This routine works quite simply. A floating point
-	of size 08 is converted to extended format.
-	This extended variable is converted back to
-	a floating point of size 04.
-
-*/
-
-#include	"FP_types.h"
-
-void
-cff4(src)
-DOUBLE	src;	/* the source itself -	THIS TIME it's DOUBLE */
-{
-	EXTEND	buf;
-
-	extend(&src.d[0],&buf,sizeof(DOUBLE));	/* no matter what */
-	compact(&buf,&(src.d[1]),sizeof(SINGLE));
-}
Index: trunk/minix/lib/ack/float/cff4.s
===================================================================
--- trunk/minix/lib/ack/float/cff4.s	(revision 9)
+++ 	(revision )
@@ -1,23 +1,0 @@
-.sect .text; .sect .rom; .sect .data; .sect .bss
-.extern .cff4
-.sect .text
-.cff4:
-push ebp
-mov ebp,esp
-sub	esp,12
-push 8
-lea eax,-12(ebp)
-push eax
-lea eax,8(ebp)
-push eax
-call .extend
-add esp,12
-push 4
-lea eax,12(ebp)
-push eax
-lea eax,-12(ebp)
-push eax
-call .compact
-add esp,12
-leave
-ret
Index: trunk/minix/lib/ack/float/cff8.fc
===================================================================
--- trunk/minix/lib/ack/float/cff8.fc	(revision 9)
+++ 	(revision )
@@ -1,28 +1,0 @@
-/*
-  (c) copyright 1988 by the Vrije Universiteit, Amsterdam, The Netherlands.
-  See the copyright notice in the ACK home directory, in the file "Copyright".
-*/
-
-/* $Header: /cvsup/minix/src/lib/ack/float/cff8.fc,v 1.1 2005/10/10 15:27:42 beng Exp $ */
-
-/*
-		CONVERT SINGLE TO DOUBLE (CFF 4 8)
-
-	This routine works quite simply. A floating point
-	of size 04 is converted to extended format.
-	This extended variable is converted back to
-	a floating point of size 08.
-
-*/
-
-#include "FP_types.h"
-
-void
-cff8(src)
-SINGLE	src;
-{
-	EXTEND	buf;
-
-	extend(&src,&buf,sizeof(SINGLE));	/* no matter what */
-	compact(&buf, &src,sizeof(DOUBLE));
-}
Index: trunk/minix/lib/ack/float/cff8.s
===================================================================
--- trunk/minix/lib/ack/float/cff8.s	(revision 9)
+++ 	(revision )
@@ -1,23 +1,0 @@
-.sect .text; .sect .rom; .sect .data; .sect .bss
-.extern .cff8
-.sect .text
-.cff8:
-push ebp
-mov ebp,esp
-sub	esp,12
-push 4
-lea eax,-12(ebp)
-push eax
-lea eax,8(ebp)
-push eax
-call .extend
-add esp,12
-push 8
-lea eax,8(ebp)
-push eax
-lea eax,-12(ebp)
-push eax
-call .compact
-add esp,12
-leave
-ret
Index: trunk/minix/lib/ack/float/cfi.fc
===================================================================
--- trunk/minix/lib/ack/float/cfi.fc	(revision 9)
+++ 	(revision )
@@ -1,52 +1,0 @@
-/*
-  (c) copyright 1988 by the Vrije Universiteit, Amsterdam, The Netherlands.
-  See the copyright notice in the ACK home directory, in the file "Copyright".
-*/
-
-/* $Header: /cvsup/minix/src/lib/ack/float/cfi.fc,v 1.1 2005/10/10 15:27:42 beng Exp $ */
-
-/*
-		CONVERT FLOAT TO SIGNED (CFI m n)
-
-		N.B. The caller must know what it is getting.
-		     A LONG is always returned. If it is an
-		     integer the high byte is cleared first.
-*/
-
-#include "FP_trap.h"
-#include "FP_types.h"
-#include "FP_shift.h"
-
-long
-cfi(ds,ss,src)
-int	ds;	/* destination size (2 or 4) */
-int	ss;	/* source size	    (4 or 8) */
-DOUBLE	src;	/* assume worst case */
-{
-	EXTEND	buf;
-	long	new;
-	short	max_exp;
-
-	extend(&src.d[0],&buf,ss);	/* get extended format */
-	if (buf.exp < 0) {	/* no conversion needed */
-		src.d[ss == 8] = 0L;
-		return(0L);
-	}
-	max_exp = (ds << 3) - 2;	/* signed numbers */
-				/* have more limited max_exp */
-	if (buf.exp > max_exp) {
-		if (buf.exp == max_exp+1 && buf.sign && buf.m1 == NORMBIT &&
-		    buf.m2 == 0L) {
-		}
-		else {
-			trap(EIOVFL);	/* integer overflow	*/
-			buf.exp %= max_exp; /* truncate	*/
-		}
-	}
-	new = buf.m1 >> (31-buf.exp);
-	if (buf.sign)
-		new = -new;
-done:
-	src.d[ss == 8] = new;
-	return(new);
-}
Index: trunk/minix/lib/ack/float/cfi.s
===================================================================
--- trunk/minix/lib/ack/float/cfi.s	(revision 9)
+++ 	(revision )
@@ -1,80 +1,0 @@
-.sect .text; .sect .rom; .sect .data; .sect .bss
-.extern .cfi
-.sect .text
-.cfi:
-push ebp
-mov ebp,esp
-sub	esp,20
-push esi
-push 12(ebp)
-lea eax,-12(ebp)
-push eax
-lea eax,16(ebp)
-push eax
-call .extend
-add esp,12
-movsx eax,-10(ebp)
-test eax,eax
-jns I1_4
-xor eax,eax
-cmp 12(ebp),8
-jne 1f
-inc eax
-1:
-mov 16(ebp)(eax*4),0
-xor eax,eax
-jmp I1_1
-I1_4:
-mov edx,8(ebp)
-sal edx,3
-sub edx,2
-o16 mov -18(ebp),edx
-movsx eax,-10(ebp)
-movsx ebx,-18(ebp)
-cmp eax,ebx
-jle I1_7
-movsx eax,-18(ebp)
-inc eax
-movsx ebx,-10(ebp)
-cmp eax,ebx
-jne I1_10
-movzx edx,-12(ebp)
-test edx,edx
-je I1_10
-cmp -8(ebp),-2147483648
-jne I1_10
-cmp -4(ebp),0
-je I1_7
-I1_10:
-push 3
-call __fptrp
-pop ecx
-movsx eax,-10(ebp)
-movsx ebx,-18(ebp)
-cdq
-idiv ebx
-o16 mov -10(ebp),edx
-I1_7:
-movsx eax,-10(ebp)
-sub eax,31
-neg eax
-mov ecx,eax
-mov edx,-8(ebp)
-shr edx,cl
-mov esi,edx
-movzx edx,-12(ebp)
-test edx,edx
-je I1_18
-neg esi
-I1_18:
-xor eax,eax
-cmp 12(ebp),8
-jne 1f
-inc eax
-1:
-mov 16(ebp)(eax*4),esi
-mov eax,esi
-I1_1:
-pop esi
-leave
-ret
Index: trunk/minix/lib/ack/float/cfu.fc
===================================================================
--- trunk/minix/lib/ack/float/cfu.fc	(revision 9)
+++ 	(revision )
@@ -1,43 +1,0 @@
-/*
-  (c) copyright 1988 by the Vrije Universiteit, Amsterdam, The Netherlands.
-  See the copyright notice in the ACK home directory, in the file "Copyright".
-*/
-
-/* $Header: /cvsup/minix/src/lib/ack/float/cfu.fc,v 1.1 2005/10/10 15:27:42 beng Exp $ */
-
-/*
-		CONVERT FLOAT TO UNSIGNED (CFU m n)
-
-		N.B. The caller must know what it is getting.
-		     A LONG is always returned. If it is an
-		     integer the high byte is cleared first.
-*/
-
-#include "FP_trap.h"
-#include "FP_types.h"
-
-long
-cfu(ds,ss,src)
-int	ds;	/* destination size (2 or 4) */
-int	ss;	/* source size	    (4 or 8) */
-DOUBLE	src;	/* assume worst case */
-{
-	EXTEND	buf;
-	long	new;
-	short	newint, max_exp;
-
-	extend(&src.d[0],&buf,ss);	/* get extended format	*/
-	if (buf.exp < 0) {	/* no conversion needed	*/
-		src.d[ss == 8] = 0L;
-		return(0L);
-	}
-	max_exp = (ds << 3) - 1;
-	if (buf.exp > max_exp) {
-		trap(EIOVFL);	/* integer overflow	*/
-		buf.exp %= max_exp;
-	}
-	new = buf.m1 >> (31-buf.exp);
-done:
-	src.d[ss == 8] = new;
-	return(new);
-}
Index: trunk/minix/lib/ack/float/cfu.s
===================================================================
--- trunk/minix/lib/ack/float/cfu.s	(revision 9)
+++ 	(revision )
@@ -1,62 +1,0 @@
-.sect .text; .sect .rom; .sect .data; .sect .bss
-.extern .cfu
-.sect .text
-.cfu:
-push ebp
-mov ebp,esp
-sub	esp,20
-push esi
-push 12(ebp)
-lea eax,-12(ebp)
-push eax
-lea eax,16(ebp)
-push eax
-call .extend
-add esp,12
-movsx eax,-10(ebp)
-test eax,eax
-jns I1_4
-xor eax,eax
-cmp 12(ebp),8
-jne 1f
-inc eax
-1:
-mov 16(ebp)(eax*4),0
-xor eax,eax
-jmp I1_1
-I1_4:
-mov edx,8(ebp)
-sal edx,3
-dec edx
-o16 mov -20(ebp),edx
-movsx eax,-10(ebp)
-movsx ebx,-20(ebp)
-cmp eax,ebx
-jle I1_7
-push 3
-call __fptrp
-pop ecx
-movsx eax,-10(ebp)
-movsx ebx,-20(ebp)
-cdq
-idiv ebx
-o16 mov -10(ebp),edx
-I1_7:
-movsx eax,-10(ebp)
-sub eax,31
-neg eax
-mov ecx,eax
-mov edx,-8(ebp)
-shr edx,cl
-mov esi,edx
-xor eax,eax
-cmp 12(ebp),8
-jne 1f
-inc eax
-1:
-mov 16(ebp)(eax*4),esi
-mov eax,esi
-I1_1:
-pop esi
-leave
-ret
Index: trunk/minix/lib/ack/float/cif4.fc
===================================================================
--- trunk/minix/lib/ack/float/cif4.fc	(revision 9)
+++ 	(revision )
@@ -1,56 +1,0 @@
-/*
-  (c) copyright 1988 by the Vrije Universiteit, Amsterdam, The Netherlands.
-  See the copyright notice in the ACK home directory, in the file "Copyright".
-*/
-
-/* $Header: /cvsup/minix/src/lib/ack/float/cif4.fc,v 1.1 2005/10/10 15:27:42 beng Exp $ */
-
-/*
-	CONVERT INTEGER TO SINGLE (CIF n 4)
-
-	THIS ROUTINE WORKS BY FILLING AN EXTENDED
-	WITH THE INTEGER VALUE IN EXTENDED FORMAT
-	AND USES COMPACT() TO PUT IT INTO THE PROPER
-	FLOATING POINT PRECISION.
-*/
-
-#include "FP_types.h"
-
-void
-cif4(ss,src)
-int	ss;	/* source size */
-long	src;	/* largest possible integer to convert */
-{
-	EXTEND	buf;
-	short	*ipt;
-	long	i_src;
-	SINGLE	*result;
-
-	zrf_ext(&buf);
-	if (ss == sizeof(long))	{
-		buf.exp = 31;
-		i_src = src;
-		result = (SINGLE *) &src;
-	}
-	else	{
-		ipt = (short *) &src;
-		i_src = (long) *ipt;
-		buf.exp = 15;
-		result = (SINGLE *) &ss;
-	}
-	if (i_src == 0)	{
-		*result = (SINGLE) 0L;
-		return;
-	}
-			/* ESTABLISHED THAT src != 0	*/
-			/* adjust exponent field	*/
-	buf.sign = (i_src < 0) ? 0x8000 : 0;
-			/* clear sign bit of integer	*/
-			/* move to mantissa field	*/
-	buf.m1 = (i_src < 0) ? -i_src : i_src;
-			/* adjust mantissa field	*/
-	if (ss != sizeof(long))
-		buf.m1 <<= 16;
-	nrm_ext(&buf);		/* adjust mantissa field	*/
-	compact(&buf, result,sizeof(SINGLE));	/* put on stack */
-}
Index: trunk/minix/lib/ack/float/cif4.s
===================================================================
--- trunk/minix/lib/ack/float/cif4.s	(revision 9)
+++ 	(revision )
@@ -1,69 +1,0 @@
-.sect .text; .sect .rom; .sect .data; .sect .bss
-.extern .cif4
-.sect .text
-.cif4:
-push ebp
-mov ebp,esp
-sub	esp,16
-push esi
-push edi
-lea eax,-12(ebp)
-push eax
-call .zrf_ext
-pop ecx
-cmp 8(ebp),4
-jne I1_4
-o16 mov -10(ebp),31
-mov esi,12(ebp)
-lea edi,12(ebp)
-jmp I1_5
-I1_4:
-lea edx,12(ebp)
-mov -16(ebp),edx
-movsx eax,(edx)
-mov esi,eax
-o16 mov -10(ebp),15
-lea edi,8(ebp)
-I1_5:
-test esi,esi
-jne I1_7
-mov (edi),0
-jmp I1_1
-I1_7:
-test esi,esi
-jns I1_10
-mov eax,32768
-jmp I1_11
-I1_10:
-xor eax,eax
-I1_11:
-o16 mov -12(ebp),eax
-test esi,esi
-jns I1_13
-mov edx,esi
-neg edx
-mov eax,edx
-jmp I1_14
-I1_13:
-mov eax,esi
-I1_14:
-mov -8(ebp),eax
-cmp 8(ebp),4
-je I1_16
-sal -8(ebp),16
-I1_16:
-lea eax,-12(ebp)
-push eax
-call .nrm_ext
-pop ecx
-push 4
-push edi
-lea eax,-12(ebp)
-push eax
-call .compact
-add esp,12
-I1_1:
-pop edi
-pop esi
-leave
-ret
Index: trunk/minix/lib/ack/float/cif8.fc
===================================================================
--- trunk/minix/lib/ack/float/cif8.fc	(revision 9)
+++ 	(revision )
@@ -1,55 +1,0 @@
-/*
-  (c) copyright 1988 by the Vrije Universiteit, Amsterdam, The Netherlands.
-  See the copyright notice in the ACK home directory, in the file "Copyright".
-*/
-
-/* $Header: /cvsup/minix/src/lib/ack/float/cif8.fc,v 1.1 2005/10/10 15:27:42 beng Exp $ */
-
-/*
-	CONVERT INTEGER TO FLOAT (CIF n 8)
-
-	THIS ROUTINE WORKS BY FILLING AN EXTENDED
-	WITH THE INTEGER VALUE IN EXTENDED FORMAT
-	AND USES COMPACT() TO PUT IT INTO THE PROPER
-	FLOATING POINT PRECISION.
-*/
-
-#include "FP_types.h"
-
-void
-cif8(ss,src)
-int	ss;	/* source size */
-long	src;	/* largest possible integer to convert */
-{
-	EXTEND	buf;
-	DOUBLE	*result;	/* for return value */
-	short	*ipt;
-	long	i_src;
-
-	result = (DOUBLE *) ((void *) &ss);	/* always */
-	zrf_ext(&buf);
-	if (ss == sizeof(long))	{
-		buf.exp = 31;
-		i_src = src;
-	}
-	else	{
-		ipt = (short *) &src;
-		i_src = (long) *ipt;
-		buf.exp = 15;
-	}
-	if (i_src == 0)	{
-		zrf8(result);
-		return;
-	}
-			/* ESTABLISHED THAT src != 0	*/
-			/* adjust exponent field	*/
-	buf.sign = (i_src < 0) ? 0x8000 : 0;
-			/* clear sign bit of integer	*/
-			/* move to mantissa field	*/
-	buf.m1 = (i_src < 0) ? -i_src : i_src;
-			/* adjust mantissa field	*/
-	if (ss != sizeof(long))
-		buf.m1 <<= 16;
-	nrm_ext(&buf);
-	compact(&buf,&result->d[0],8);
-}
Index: trunk/minix/lib/ack/float/cif8.s
===================================================================
--- trunk/minix/lib/ack/float/cif8.s	(revision 9)
+++ 	(revision )
@@ -1,70 +1,0 @@
-.sect .text; .sect .rom; .sect .data; .sect .bss
-.extern .cif8
-.sect .text
-.cif8:
-push ebp
-mov ebp,esp
-sub	esp,20
-push esi
-push edi
-lea edi,8(ebp)
-lea eax,-12(ebp)
-push eax
-call .zrf_ext
-pop ecx
-cmp 8(ebp),4
-jne I1_4
-o16 mov -10(ebp),31
-mov esi,12(ebp)
-jmp I1_5
-I1_4:
-lea edx,12(ebp)
-mov -20(ebp),edx
-movsx eax,(edx)
-mov esi,eax
-o16 mov -10(ebp),15
-I1_5:
-test esi,esi
-jne I1_7
-push edi
-call .zrf8
-pop ecx
-jmp I1_1
-I1_7:
-test esi,esi
-jns I1_10
-mov eax,32768
-jmp I1_11
-I1_10:
-xor eax,eax
-I1_11:
-o16 mov -12(ebp),eax
-test esi,esi
-jns I1_13
-mov edx,esi
-neg edx
-mov eax,edx
-jmp I1_14
-I1_13:
-mov eax,esi
-I1_14:
-mov -8(ebp),eax
-cmp 8(ebp),4
-je I1_16
-sal -8(ebp),16
-I1_16:
-lea eax,-12(ebp)
-push eax
-call .nrm_ext
-pop ecx
-push 8
-push edi
-lea eax,-12(ebp)
-push eax
-call .compact
-add esp,12
-I1_1:
-pop edi
-pop esi
-leave
-ret
Index: trunk/minix/lib/ack/float/cmf4.fc
===================================================================
--- trunk/minix/lib/ack/float/cmf4.fc	(revision 9)
+++ 	(revision )
@@ -1,40 +1,0 @@
-/*
-  (c) copyright 1988 by the Vrije Universiteit, Amsterdam, The Netherlands.
-  See the copyright notice in the ACK home directory, in the file "Copyright".
-*/
-
-/* $Header: /cvsup/minix/src/lib/ack/float/cmf4.fc,v 1.1 2005/10/10 15:27:42 beng Exp $ */
-
-/*
-	COMPARE	SINGLES (CMF 4)
-*/
-
-#include	"FP_types.h"
-#include	"get_put.h"
-
-int
-cmf4(f1,f2)
-SINGLE	f1,f2;
-{
-		/*
-		 * return ((f1 < f2) ? 1 : (f1 - f2))
-		 */
-#define SIGN(x) (((x) < 0) ? -1 : 1)
-        int	sign1,sign2;
-	long	l1,l2;
-
-	l1 = get4((char *) &f1);
-	l2 = get4((char *) &f2);
-
-	if (l1 == l2) return 0;
-
-        sign1 = SIGN(l1);
-        sign2 = SIGN(l2);
-        if (sign1 != sign2) {
-		if ((l1 & 0x7fffffff) == 0 &&
-		    (l2 & 0x7fffffff) == 0) return 0;
-                return ((sign1 > 0) ? -1 : 1);
-	}
-
-	return (sign1 * ((l1 < l2) ? 1 : -1));
-}
Index: trunk/minix/lib/ack/float/cmf4.s
===================================================================
--- trunk/minix/lib/ack/float/cmf4.s	(revision 9)
+++ 	(revision )
@@ -1,63 +1,0 @@
-.sect .text; .sect .rom; .sect .data; .sect .bss
-.extern .cmf4
-.sect .text
-.cmf4:
-push ebp
-mov ebp,esp
-sub	esp,8
-push esi
-push edi
-mov edi,8(ebp)
-mov esi,12(ebp)
-cmp edi,esi
-jne I1_4
-xor eax,eax
-jmp I1_1
-I1_4:
-test edi,edi
-jns I1_7
-mov eax,-1
-jmp I1_8
-I1_7:
-mov eax,1
-I1_8:
-mov -4(ebp),eax
-test esi,esi
-jns I1_10
-mov eax,-1
-jmp I1_11
-I1_10:
-mov eax,1
-I1_11:
-mov -8(ebp),eax
-cmp -4(ebp),eax
-je I1_13
-test edi,2147483647
-jne I1_16
-test esi,2147483647
-jne I1_16
-xor eax,eax
-jmp I1_1
-I1_16:
-! kill cc
-cmp -4(ebp),0
-jle I1_20
-mov eax,-1
-jmp I1_1
-I1_20:
-mov eax,1
-jmp I1_1
-I1_13:
-cmp edi,esi
-jge I1_23
-mov eax,1
-jmp I1_24
-I1_23:
-mov eax,-1
-I1_24:
-imul eax,-4(ebp)
-I1_1:
-pop edi
-pop esi
-leave
-ret
Index: trunk/minix/lib/ack/float/cmf8.fc
===================================================================
--- trunk/minix/lib/ack/float/cmf8.fc	(revision 9)
+++ 	(revision )
@@ -1,61 +1,0 @@
-/*
-  (c) copyright 1988 by the Vrije Universiteit, Amsterdam, The Netherlands.
-  See the copyright notice in the ACK home directory, in the file "Copyright".
-*/
-
-/* $Header: /cvsup/minix/src/lib/ack/float/cmf8.fc,v 1.1 2005/10/10 15:27:42 beng Exp $ */
-
-/*
-	COMPARE	DOUBLES (CMF 8)
-*/
-
-#include	"FP_types.h"
-#include	"get_put.h"
-
-int
-cmf8(d1,d2)
-DOUBLE	d1,d2;
-{
-#define	SIGN(x)	(((x) < 0) ? -1 : 1)
-		/*
-		 * return ((d1 < d2) ? 1 : (d1 > d2) ? -1 : 0))
-		 */
-	long	l1,l2;
-	int	sign1,sign2;
-	int	rv;
-
-#if FL_MSL_AT_LOW_ADDRESS
-	l1 = get4((char *)&d1);
-	l2 = get4((char *)&d2);
-#else
-	l1 = get4(((char *)&d1+4));
-	l2 = get4(((char *)&d2+4));
-#endif
-	sign1 = SIGN(l1);
-	sign2 = SIGN(l2);
-	if (sign1 != sign2) {
-		l1 &= 0x7fffffff;
-		l2 &= 0x7fffffff;
-		if (l1 != 0 || l2 != 0) {
-			return ((sign1 > 0) ? -1 : 1);
-		}
-	}
-	if (l1 != l2)	{	/* we can decide here */
-		rv = l1 < l2 ? 1 : -1;
-	}
-	else	{ 		/* decide in 2nd half */
-		unsigned long u1, u2;
-#if FL_MSL_AT_LOW_ADDRESS
-		u1 = get4(((char *)&d1 + 4));
-		u2 = get4(((char *)&d2 + 4));
-#else
-		u1 = get4((char *)&d1);
-		u2 = get4((char *)&d2);
-#endif
-		if (u1 == u2)
-			return(0);
-		if (u1 < u2) rv = 1;
-		else rv = -1;
-	}
-	return sign1 * rv;
-}
Index: trunk/minix/lib/ack/float/cmf8.s
===================================================================
--- trunk/minix/lib/ack/float/cmf8.s	(revision 9)
+++ 	(revision )
@@ -1,82 +1,0 @@
-.sect .text; .sect .rom; .sect .data; .sect .bss
-.extern .cmf8
-.sect .text
-.cmf8:
-push ebp
-mov ebp,esp
-sub	esp,28
-push esi
-push edi
-mov edi,12(ebp)
-mov esi,20(ebp)
-test edi,edi
-jns I1_4
-mov eax,-1
-jmp I1_5
-I1_4:
-mov eax,1
-I1_5:
-mov -12(ebp),eax
-test esi,esi
-jns I1_7
-mov eax,-1
-jmp I1_8
-I1_7:
-mov eax,1
-I1_8:
-mov -16(ebp),eax
-cmp -12(ebp),eax
-je I1_10
-and edi,2147483647
-and esi,2147483647
-test edi,edi
-jne I1_12
-test esi,esi
-je I1_10
-I1_12:
-! kill cc
-cmp -12(ebp),0
-jle I1_17
-mov eax,-1
-jmp I1_1
-I1_17:
-mov eax,1
-jmp I1_1
-I1_10:
-cmp edi,esi
-je I1_20
-cmp edi,esi
-jge I1_23
-mov eax,1
-jmp I1_24
-I1_23:
-mov eax,-1
-I1_24:
-mov -20(ebp),eax
-jmp I1_21
-I1_20:
-mov edx,8(ebp)
-mov -24(ebp),edx
-mov edx,16(ebp)
-mov -28(ebp),edx
-cmp -24(ebp),edx
-jne I1_26
-xor eax,eax
-jmp I1_1
-I1_26:
-mov edx,-28(ebp)
-cmp -24(ebp),edx
-jae I1_29
-mov -20(ebp),1
-jmp I1_21
-I1_29:
-mov -20(ebp),-1
-I1_21:
-mov edx,-12(ebp)
-imul edx,-20(ebp)
-mov eax,edx
-I1_1:
-pop edi
-pop esi
-leave
-ret
Index: trunk/minix/lib/ack/float/compact.fc
===================================================================
--- trunk/minix/lib/ack/float/compact.fc	(revision 9)
+++ 	(revision )
@@ -1,202 +1,0 @@
-/*
-  (c) copyright 1988 by the Vrije Universiteit, Amsterdam, The Netherlands.
-  See the copyright notice in the ACK home directory, in the file "Copyright".
-*/
-
-/* $Header: /cvsup/minix/src/lib/ack/float/compact.fc,v 1.1 2005/10/10 15:27:42 beng Exp $ */
-
-/*
-	COMPACT EXTEND FORMAT INTO FLOAT OF PROPER SIZE
-*/
-
-# include "FP_bias.h"
-# include "FP_shift.h"
-# include "FP_trap.h"
-# include "FP_types.h"
-# include "get_put.h"
-
-void
-compact(f,to,size)
-EXTEND	*f;
-unsigned long	*to;
-int	size;
-{
-	int	error = 0;
-
-	if (size == sizeof(DOUBLE)) {
-	/*
-	 * COMPACT EXTENDED INTO DOUBLE
-	 */
-		DOUBLE *DBL = (DOUBLE *) (void *) to;
-
-		if ((f->m1|(f->m2 & DBL_ZERO)) == 0L)	{
-			zrf8(DBL);
-			return;
-		}
-		f->exp += DBL_BIAS;	/* restore proper bias	*/
-		if (f->exp > DBL_MAX)	{
-dbl_over:			trap(EFOVFL);
-			f->exp = DBL_MAX+1;
-			f->m1 = 0;
-			f->m2 = 0;
-			if (error++)
-				return;
-		}
-		else if (f->exp < DBL_MIN)	{
-			b64_rsft(&(f->mantissa));
-			if (f->exp < 0) {
-				b64_sft(&(f->mantissa), -f->exp);
-				f->exp = 0;
-			}
-			/* underflow ??? */
-		}
-			
-		/* local CAST conversion		*/
-
-		/* because of special format shift only 10 bits */
-		/* bit shift mantissa 10 bits		*/
-
-		/* first align within words, then do store operation */
-
-		DBL->d[0] = f->m1 >> DBL_RUNPACK;   /* plus 22 == 32 */
-		DBL->d[1] = f->m2 >> DBL_RUNPACK;   /* plus 22 == 32 */
-		DBL->d[1] |= (f->m1 << DBL_LUNPACK); /* plus 10 == 32 */
-
-		/* if not exact then round to nearest	*/
-		/* on a tie, round to even */
-
-#ifdef EXCEPTION_INEXACT
-		if ((f->m2 & DBL_EXACT) != 0) {
-		    INEXACT();
-#endif
-		    if (((f->m2 & DBL_EXACT) > DBL_ROUNDUP)
-			|| ((f->m2 & DBL_EXACT) == DBL_ROUNDUP
-			    && (f->m2 & (DBL_ROUNDUP << 1)))) {
-			DBL->d[1]++;	/* rounding up	*/
-			if (DBL->d[1] == 0L) { /* carry out	*/
-			    DBL->d[0]++;
-
-			    if (f->exp == 0 && (DBL->d[0] & ~DBL_MASK)) {
-					f->exp++;
-				}
-			    if (DBL->d[0] & DBL_CARRYOUT) { /* carry out */
-				if (DBL->d[0] & 01)
-				    DBL->d[1] = CARRYBIT;
-				DBL->d[0] >>= 1;
-				f->exp++;
-			    }
-			}
-			/*	check for overflow			*/
-			if (f->exp > DBL_MAX)
-		    		goto dbl_over;
-		    }
-#ifdef EXCEPTION_INEXACT
-		}
-#endif
-
-		/*
-		 * STORE EXPONENT AND SIGN:
-		 *
-		 * 1) clear leading bits (B4-B15)
-		 * 2) shift and store exponent
-		 */
-
-		DBL->d[0] &= DBL_MASK;
-		DBL->d[0] |= 
-			((long) (f->exp << DBL_EXPSHIFT) << EXP_STORE);
-		if (f->sign)
-			DBL->d[0] |= CARRYBIT;
-
-		/*
-		 * STORE MANTISSA
-		 */
-
-#if FL_MSL_AT_LOW_ADDRESS
-		put4(DBL->d[0], (char *) &DBL->d[0]);
-		put4(DBL->d[1], (char *) &DBL->d[1]);
-#else
-		{ unsigned long l;
-		  put4(DBL->d[1], (char *) &l);
-		  put4(DBL->d[0], (char *) &DBL->d[1]);
-		  DBL->d[0] = l;
-		}
-#endif
-	}
-	else {
-		/*
-		 * COMPACT EXTENDED INTO FLOAT
-		 */
-		SINGLE	*SGL;
-
-		/* local CAST conversion		*/
-		SGL = (SINGLE *) (void *) to;
-		if ((f->m1 & SGL_ZERO) == 0L)	{
-			*SGL = 0L;
-			return;
-		}
-		f->exp += SGL_BIAS;	/* restore bias	*/
-		if (f->exp > SGL_MAX)	{
-sgl_over:			trap(EFOVFL);
-			f->exp = SGL_MAX+1;
-			f->m1 = 0L;
-			f->m2 = 0L;
-			if (error++)
-				return;
-		}
-		else if (f->exp < SGL_MIN)	{
-			b64_rsft(&(f->mantissa));
-			if (f->exp < 0) {
-				b64_sft(&(f->mantissa), -f->exp);
-				f->exp = 0;
-			}
-			/* underflow ??? */
-		}
-
-		/* shift mantissa and store	*/
-		*SGL = (f->m1 >> SGL_RUNPACK);
-
-		/* check for rounding to nearest	*/
-		/* on a tie, round to even		*/
-#ifdef EXCEPTION_INEXACT
-		if (f->m2 != 0 ||
-		    (f->m1 & SGL_EXACT) != 0L) {
-			INEXACT();
-#endif
-		        if (((f->m1 & SGL_EXACT) > SGL_ROUNDUP)
-			    || ((f->m1 & SGL_EXACT) == SGL_ROUNDUP
-			        && (f->m1 & (SGL_ROUNDUP << 1)))) {
-				(*SGL)++;
-				if (f->exp == 0 && (*SGL & ~SGL_MASK)) {
-					f->exp++;
-				}
-			/* check normal */
-				if (*SGL & SGL_CARRYOUT)	{
-					*SGL >>= 1;
-					f->exp++;
-				}
-				if (f->exp > SGL_MAX)
-					goto sgl_over;
-			}
-#ifdef EXCEPTION_INEXACT
-		}
-#endif
-
-		/*
-		 * STORE EXPONENT AND SIGN:
-		 *
-		 * 1) clear leading bit of fraction
-		 * 2) shift and store exponent
-		 */
-
-		*SGL &= SGL_MASK; /* B23-B31 are 0 */
-		*SGL |= ((long) (f->exp << SGL_EXPSHIFT) << EXP_STORE);
-		if (f->sign)
-			*SGL |= CARRYBIT;
-
-		/*
-		 * STORE MANTISSA
-		 */
-
-		put4(*SGL, (char *) &SGL);
-	}
-}
Index: trunk/minix/lib/ack/float/compact.s
===================================================================
--- trunk/minix/lib/ack/float/compact.s	(revision 9)
+++ 	(revision )
@@ -1,270 +1,0 @@
-.sect .text; .sect .rom; .sect .data; .sect .bss
-.extern .compact
-.sect .text
-.compact:
-push ebp
-mov ebp,esp
-sub	esp,16
-push esi
-push edi
-mov esi,8(ebp)
-mov -4(ebp),0
-cmp 16(ebp),8
-jne I1_4
-mov edi,12(ebp)
-mov edx,-768
-and edx,8(esi)
-or edx,4(esi)
-jne I1_7
-push edi
-call .zrf8
-pop ecx
-jmp I1_1
-I1_7:
-movsx eax,2(esi)
-add eax,1023
-movsx eax,eax
-o16 mov 2(esi),eax
-movsx ebx,2(esi)
-cmp ebx,2046
-jle I1_10
-I1_12:
-push 4
-call __fptrp
-pop ecx
-o16 mov 2(esi),2047
-mov 4(esi),0
-mov 8(esi),0
-mov edx,-4(ebp)
-mov ecx,edx
-inc ecx
-mov -4(ebp),ecx
-test edx,edx
-je I1_11
-jmp I1_1
-I1_10:
-movsx eax,2(esi)
-! kill cc
-test eax,eax
-jg I1_11
-lea eax,4(esi)
-push eax
-call .b64_rsft
-pop ecx
-movsx eax,2(esi)
-test eax,eax
-jns I1_11
-movsx eax,2(esi)
-neg eax
-push eax
-lea eax,4(esi)
-push eax
-call .b64_sft
-pop ecx
-pop ecx
-o16 mov 2(esi),0
-I1_11:
-mov edx,4(esi)
-shr edx,11
-mov (edi),edx
-mov edx,8(esi)
-shr edx,11
-mov 4(edi),edx
-lea edx,4(edi)
-mov -12(ebp),edx
-mov ecx,4(esi)
-sal ecx,21
-or ecx,(edx)
-mov eax,-12(ebp)
-mov (eax),ecx
-! kill eax
-mov edx,2047
-and edx,8(esi)
-cmp edx,1024
-ja I1_22
-mov edx,2047
-and edx,8(esi)
-cmp edx,1024
-jne I1_23
-test 8(esi),2048
-je I1_23
-I1_22:
-lea edx,4(edi)
-mov -12(ebp),edx
-mov ecx,1
-add ecx,(edx)
-mov eax,-12(ebp)
-mov (eax),ecx
-! kill eax
-cmp 4(edi),0
-jne I1_28
-mov -12(ebp),edi
-mov edx,1
-add edx,(edi)
-mov eax,-12(ebp)
-mov (eax),edx
-! kill eax
-movzx edx,2(esi)
-test edx,edx
-jne I1_31
-test (edi),-1048576
-je I1_31
-movsx eax,2(esi)
-inc eax
-movsx eax,eax
-o16 mov 2(esi),eax
-I1_31:
-test (edi),2097152
-je I1_28
-mov edx,(edi)
-testb dl,1
-je I1_38
-mov 4(edi),-2147483648
-I1_38:
-mov -12(ebp),edi
-mov edx,(edi)
-shr edx,1
-mov eax,-12(ebp)
-mov (eax),edx
-! kill eax
-movsx eax,2(esi)
-inc eax
-movsx eax,eax
-o16 mov 2(esi),eax
-I1_28:
-movsx eax,2(esi)
-cmp eax,2046
-jg I1_12
-I1_23:
-mov -12(ebp),edi
-mov edx,1048575
-and edx,(edi)
-mov eax,-12(ebp)
-mov (eax),edx
-! kill eax
-mov -12(ebp),edi
-movsx eax,2(esi)
-sal eax,4
-sal eax,16
-or eax,(edi)
-mov ebx,-12(ebp)
-mov (ebx),eax
-! kill ebx
-movzx edx,(esi)
-test edx,edx
-je I1_44
-mov -12(ebp),edi
-mov edx,-2147483648
-or edx,(edi)
-mov eax,-12(ebp)
-mov (eax),edx
-! kill eax
-I1_44:
-mov edx,4(edi)
-mov -16(ebp),edx
-mov edx,(edi)
-mov 4(edi),edx
-mov edx,-16(ebp)
-mov (edi),edx
-jmp I1_1
-I1_4:
-mov edi,12(ebp)
-test 4(esi),-128
-jne I1_47
-mov (edi),0
-jmp I1_1
-I1_47:
-movsx eax,2(esi)
-add eax,127
-movsx eax,eax
-o16 mov 2(esi),eax
-movsx ebx,2(esi)
-cmp ebx,254
-jle I1_50
-I1_52:
-push 4
-call __fptrp
-pop ecx
-o16 mov 2(esi),255
-mov 4(esi),0
-mov 8(esi),0
-mov edx,-4(ebp)
-mov ecx,edx
-inc ecx
-mov -4(ebp),ecx
-test edx,edx
-je I1_51
-jmp I1_1
-I1_50:
-movsx eax,2(esi)
-! kill cc
-test eax,eax
-jg I1_51
-lea eax,4(esi)
-push eax
-call .b64_rsft
-pop ecx
-movsx eax,2(esi)
-test eax,eax
-jns I1_51
-movsx eax,2(esi)
-neg eax
-push eax
-lea eax,4(esi)
-push eax
-call .b64_sft
-pop ecx
-pop ecx
-o16 mov 2(esi),0
-I1_51:
-mov edx,4(esi)
-shr edx,8
-mov (edi),edx
-mov edx,4(esi)
-movzxb ecx,dl
-cmp ecx,128
-ja I1_62
-cmpb dl,128
-jne I1_63
-test 4(esi),256
-je I1_63
-I1_62:
-inc (edi)
-movzx edx,2(esi)
-test edx,edx
-jne I1_68
-test (edi),-8388608
-je I1_68
-movsx eax,2(esi)
-inc eax
-movsx eax,eax
-o16 mov 2(esi),eax
-I1_68:
-test (edi),16777216
-je I1_72
-shr (edi),1
-movsx eax,2(esi)
-inc eax
-movsx eax,eax
-o16 mov 2(esi),eax
-I1_72:
-movsx eax,2(esi)
-cmp eax,254
-jg I1_52
-I1_63:
-and (edi),8388607
-movsx eax,2(esi)
-sal eax,7
-sal eax,16
-or (edi),eax
-movzx edx,(esi)
-test edx,edx
-je I1_78
-or (edi),-2147483648
-I1_78:
-mov edi,(edi)
-I1_1:
-pop edi
-pop esi
-leave
-ret
Index: trunk/minix/lib/ack/float/cuf4.fc
===================================================================
--- trunk/minix/lib/ack/float/cuf4.fc	(revision 9)
+++ 	(revision )
@@ -1,57 +1,0 @@
-/*
-  (c) copyright 1988 by the Vrije Universiteit, Amsterdam, The Netherlands.
-  See the copyright notice in the ACK home directory, in the file "Copyright".
-*/
-
-/* $Header: /cvsup/minix/src/lib/ack/float/cuf4.fc,v 1.1 2005/10/10 15:27:42 beng Exp $ */
-
-/*
-	CONVERT INTEGER TO SINGLE (CUF n 4)
-
-	THIS ROUTINE WORKS BY FILLING AN EXTENDED
-	WITH THE INTEGER VALUE IN EXTENDED FORMAT
-	AND USES COMPACT() TO PUT IT INTO THE PROPER
-	FLOATING POINT PRECISION.
-*/
-
-#include "FP_types.h"
-
-void
-cuf4(ss,src)
-int	ss;	/* source size */
-long	src;	/* largest possible integer to convert */
-{
-	EXTEND	buf;
-	short	*ipt;
-	SINGLE	*result;
-	long	i_src;
-
-	zrf_ext(&buf);
-	if (ss == sizeof(long))	{
-		buf.exp = 31;
-		i_src = src;
-		result = (SINGLE *) &src;
-	}
-	else	{
-		ipt = (short *) &src;
-		i_src = (long) *ipt;
-		buf.exp = 15;
-		result = (SINGLE *) ((void *) &ss);
-	}
-	if (i_src == 0)	{
-		*result = (SINGLE) 0L;
-		return;
-	}
-			/* ESTABLISHED THAT src != 0	*/
-
-			/* adjust exponent field	*/
-	if (ss != sizeof(long))
-		i_src <<= 16;
-
-			/* move to mantissa field	*/
-	buf.m1 = i_src;
-
-			/* adjust mantissa field	*/
-	nrm_ext(&buf);
-	compact(&buf,result,4);
-}
Index: trunk/minix/lib/ack/float/cuf4.s
===================================================================
--- trunk/minix/lib/ack/float/cuf4.s	(revision 9)
+++ 	(revision )
@@ -1,52 +1,0 @@
-.sect .text; .sect .rom; .sect .data; .sect .bss
-.extern .cuf4
-.sect .text
-.cuf4:
-push ebp
-mov ebp,esp
-sub	esp,16
-push esi
-push edi
-lea eax,-12(ebp)
-push eax
-call .zrf_ext
-pop ecx
-cmp 8(ebp),4
-jne I1_4
-o16 mov -10(ebp),31
-mov esi,12(ebp)
-lea edi,12(ebp)
-jmp I1_5
-I1_4:
-lea edx,12(ebp)
-mov -16(ebp),edx
-movsx eax,(edx)
-mov esi,eax
-o16 mov -10(ebp),15
-lea edi,8(ebp)
-I1_5:
-test esi,esi
-jne I1_7
-mov (edi),0
-jmp I1_1
-I1_7:
-cmp 8(ebp),4
-je I1_10
-sal esi,16
-I1_10:
-mov -8(ebp),esi
-lea eax,-12(ebp)
-push eax
-call .nrm_ext
-pop ecx
-push 4
-push edi
-lea eax,-12(ebp)
-push eax
-call .compact
-add esp,12
-I1_1:
-pop edi
-pop esi
-leave
-ret
Index: trunk/minix/lib/ack/float/cuf8.fc
===================================================================
--- trunk/minix/lib/ack/float/cuf8.fc	(revision 9)
+++ 	(revision )
@@ -1,54 +1,0 @@
-/*
-  (c) copyright 1988 by the Vrije Universiteit, Amsterdam, The Netherlands.
-  See the copyright notice in the ACK home directory, in the file "Copyright".
-*/
-
-/* $Header: /cvsup/minix/src/lib/ack/float/cuf8.fc,v 1.1 2005/10/10 15:27:42 beng Exp $ */
-
-/*
-	CONVERT INTEGER TO FLOAT (CUF n 8)
-
-	THIS ROUTINE WORKS BY FILLING AN EXTENDED
-	WITH THE INTEGER VALUE IN EXTENDED FORMAT
-	AND USES COMPACT() TO PUT IT INTO THE PROPER
-	FLOATING POINT PRECISION.
-*/
-
-#include "FP_types.h"
-
-void
-cuf8(ss,src)
-int	ss;	/* source size */
-long	src;	/* largest possible integer to convert */
-{
-	EXTEND	buf;
-	short	*ipt;
-	long	i_src;
-
-	zrf_ext(&buf);
-	if (ss == sizeof(long))	{
-		buf.exp = 31;
-		i_src = src;
-	}
-	else	{
-		ipt = (short *) &src;
-		i_src = (long) *ipt;
-		buf.exp = 15;
-	}
-	if (i_src == 0)	{
-		zrf8((DOUBLE *)((void *)&ss));
-		return;
-	}
-			/* ESTABLISHED THAT src != 0	*/
-
-			/* adjust exponent field	*/
-	if (ss != sizeof(long))
-		i_src <<= 16;
-
-			/* move to mantissa field	*/
-	buf.m1 = i_src;
-
-			/* adjust mantissa field	*/
-	nrm_ext(&buf);
-	compact(&buf,(unsigned long *) (void *)&ss,8);
-}
Index: trunk/minix/lib/ack/float/cuf8.s
===================================================================
--- trunk/minix/lib/ack/float/cuf8.s	(revision 9)
+++ 	(revision )
@@ -1,52 +1,0 @@
-.sect .text; .sect .rom; .sect .data; .sect .bss
-.extern .cuf8
-.sect .text
-.cuf8:
-push ebp
-mov ebp,esp
-sub	esp,16
-push esi
-lea eax,-12(ebp)
-push eax
-call .zrf_ext
-pop ecx
-cmp 8(ebp),4
-jne I1_4
-o16 mov -10(ebp),31
-mov esi,12(ebp)
-jmp I1_5
-I1_4:
-lea edx,12(ebp)
-mov -16(ebp),edx
-movsx eax,(edx)
-mov esi,eax
-o16 mov -10(ebp),15
-I1_5:
-test esi,esi
-jne I1_7
-lea eax,8(ebp)
-push eax
-call .zrf8
-pop ecx
-jmp I1_1
-I1_7:
-cmp 8(ebp),4
-je I1_10
-sal esi,16
-I1_10:
-mov -8(ebp),esi
-lea eax,-12(ebp)
-push eax
-call .nrm_ext
-pop ecx
-push 8
-lea eax,8(ebp)
-push eax
-lea eax,-12(ebp)
-push eax
-call .compact
-add esp,12
-I1_1:
-pop esi
-leave
-ret
Index: trunk/minix/lib/ack/float/div_ext.fc
===================================================================
--- trunk/minix/lib/ack/float/div_ext.fc	(revision 9)
+++ 	(revision )
@@ -1,266 +1,0 @@
-/*
-  (c) copyright 1988 by the Vrije Universiteit, Amsterdam, The Netherlands.
-  See the copyright notice in the ACK home directory, in the file "Copyright".
-*/
-
-/* $Header: /cvsup/minix/src/lib/ack/float/div_ext.fc,v 1.1 2005/10/10 15:27:42 beng Exp $ */
-
-/*
-	DIVIDE EXTENDED FORMAT
-*/
-
-#include "FP_bias.h"
-#include "FP_trap.h"
-#include "FP_types.h"
-
-/*
-	November 15, 1984
-
-	This is a routine to do the work.
-	There are two versions: 
-	One is based on the partial products method
-	and makes no use possible machine instructions
-	to divide (hardware dividers).
-	The other is used when USE_DIVIDE is defined. It is much faster on
-	machines with fast 4 byte operations.
-*/
-/********************************************************/
-
-void
-div_ext(e1,e2)
-EXTEND	*e1,*e2;
-{
-	short	error = 0;
-	B64		result;
-	register	unsigned long	*lp;
-#ifndef USE_DIVIDE
-	short	count;
-#else
-	unsigned short u[9], v[5];
-	register int j;
-	register unsigned short *u_p = u;
-	int maxv = 4;
-#endif
-
-	if ((e2->m1 | e2->m2) == 0) {
-                /*
-                 * Exception 8.2 - Divide by zero
-                 */
-		trap(EFDIVZ);
-		e1->m1 = e1->m2 = 0L;
-		e1->exp = EXT_MAX;
-		return;
-	}
-	if ((e1->m1 | e1->m2) == 0) {	/* 0 / anything == 0 */
-		e1->exp = 0;	/* make sure */
-		return;
-	}
-#ifndef USE_DIVIDE
-	/*
-	 * numbers are right shifted one bit to make sure
-	 * that m1 is quaranteed to be larger if its
-	 * maximum bit is set
-	 */
-	b64_rsft(&e1->mantissa);	/* 64 bit shift right */
-	b64_rsft(&e2->mantissa);	/* 64 bit shift right */
-	e1->exp++;
-	e2->exp++;
-#endif
-	/*	check for underflow, divide by zero, etc	*/
-	e1->sign ^= e2->sign;
-	e1->exp -= e2->exp;
-
-#ifndef USE_DIVIDE
-		/* do division of mantissas	*/
-		/* uses partial product method	*/
-		/* init control variables	*/
-
-	count = 64;
-	result.h_32 = 0L;
-	result.l_32 = 0L;
-
-		/* partial product division loop */
-
-	while (count--)	{
-		/* first left shift result 1 bit	*/
-		/* this is ALWAYS done			*/
-
-		b64_lsft(&result);
-
-		/* compare dividend and divisor		*/
-		/* if dividend >= divisor add a bit	*/
-		/* and subtract divisior from dividend	*/
-
-		if ( (e1->m1 < e2->m1) ||
-			((e1->m1 == e2->m1) && (e1->m2 < e2->m2) ))
-			;	/* null statement */
-				/* i.e., don't add or subtract */
-		else	{
-			result.l_32++;	/* ADD	*/
-			if (e2->m2 > e1->m2)
-				e1->m1 -= 1;	/* carry in */
-			e1->m1 -= e2->m1;	/* do SUBTRACTION */
-			e1->m2 -= e2->m2;	/*    SUBTRACTION */
-		}
-
-		/*	shift dividend left one bit OR	*/
-		/*	IF it equals ZERO we can break out	*/
-		/*	of the loop, but still must shift	*/
-		/*	the quotient the remaining count bits	*/
-		/* NB	save the results of this test in error	*/
-		/*	if not zero, then the result is inexact. */
-		/* 	this would be reported in IEEE standard	*/
-
-		/*	lp points to dividend			*/
-		lp = &e1->m1;
-
-		error = ((*lp | *(lp+1)) != 0L) ? 1 : 0;
-		if (error)	{	/* more work */
-			/*	assume max bit == 0 (see above)	*/
-			b64_lsft(&e1->mantissa);
-			continue;
-		}
-		else
-			break;	/* leave loop	*/
-	}	/* end of divide by subtraction loop	*/
-
-	if (count > 0)	{
-		lp = &result.h_32;
-		if (count > 31) {	/* move to higher word */
-			*lp = *(lp+1);
-			count -= 32;
-			*(lp+1) = 0L;	/* clear low word	*/
-		}
-		if (*lp)
-			*lp <<= count;	/* shift rest of way	*/
-		lp++;	/*  == &result.l_32	*/
-		if (*lp) {
-			result.h_32 |= (*lp >> 32-count);
-			*lp <<= count;
-		}
-	}
-#else /* USE_DIVIDE */
-
-	u[4] = (e1->m2 & 1) << 15;
-	b64_rsft(&(e1->mantissa));
-	u[0] = e1->m1 >> 16;
-	u[1] = e1->m1;
-	u[2] = e1->m2 >> 16;
-	u[3] = e1->m2;
-	u[5] = 0; u[6] = 0; u[7] = 0;
-	v[1] = e2->m1 >> 16;
-	v[2] = e2->m1;
-	v[3] = e2->m2 >> 16;
-	v[4] = e2->m2;
-	while (! v[maxv]) maxv--;
-	result.h_32 = 0;
-	result.l_32 = 0;
-	lp = &result.h_32;
-
-	/*
-	 * Use an algorithm of Knuth (The art of programming, Seminumerical
-	 * algorithms), to divide u by v. u and v are both seen as numbers
-	 * with base 65536. 
-	 */
-	for (j = 0; j <= 3; j++, u_p++) {
-		unsigned long q_est, temp;
-
-		if (j == 2) lp++;
-		if (u_p[0] == 0 && u_p[1] < v[1]) continue;
-		temp = ((unsigned long)u_p[0] << 16) + u_p[1];
-		if (u_p[0] >= v[1]) {
-			q_est = 0x0000FFFFL;
-		}
-		else {
-			q_est = temp / v[1];
-		}
-		temp -= q_est * v[1];
-		while (temp < 0x10000 && v[2]*q_est > ((temp<<16)+u_p[2])) {
-			q_est--;
-			temp += v[1];
-		}
-		/*	Now, according to Knuth, we have an estimate of the
-			quotient, that is either correct or one too big, but
-			almost always correct.
-		*/
-		if (q_est != 0)  {
-			int i;
-			unsigned long k = 0;
-			int borrow = 0;
-
-			for (i = maxv; i > 0; i--) {
-				unsigned long tmp = q_est * v[i] + k + borrow;
-				unsigned short md = tmp;
-
-				borrow = (md > u_p[i]);
-				u_p[i] -= md;
-				k = tmp >> 16;
-			}
-			k += borrow;
-			borrow = u_p[0] < k;
-			u_p[0] -= k;
-
-			if (borrow) {
-				/* So, this does not happen often; the estimate
-				   was one too big; correct this
-				*/
-				*lp |= (j & 1) ? (q_est - 1) : ((q_est-1)<<16);
-				borrow = 0;
-				for (i = maxv; i > 0; i--) {
-					unsigned long tmp 
-					    = v[i]+(unsigned long)u_p[i]+borrow;
-					
-					u_p[i] = tmp;
-					borrow = tmp >> 16;
-				}
-				u_p[0] += borrow;
-			}
-			else *lp |= (j & 1) ? q_est : (q_est<<16);
-		}
-	}
-#ifdef	EXCEPTION_INEXACT
-	u_p = &u[0];
-	for (j = 7; j >= 0; j--) {
-		if (*u_p++) {
-			error = 1;
-			break;
-		}
-	}
-#endif
-#endif
-
-#ifdef  EXCEPTION_INEXACT
-        if (error)      {
-                /*
-                 * report here exception 8.5 - Inexact
-                 * from Draft 8.0 of IEEE P754:
-                 * In the absence of an invalid operation exception,
-                 * if the rounded result of an operation is not exact or if
-                 * it overflows without a trap, then the inexact exception
-                 * shall be assigned. The rounded or overflowed result
-                 * shall be delivered to the destination.
-                 */
-                INEXACT();
-#endif
-	e1->mantissa = result;
-
-	nrm_ext(e1);
-	if (e1->exp < EXT_MIN)	{
-		/*
-		 * Exception 8.4 - Underflow
-		 */
-		trap(EFUNFL);	/* underflow */
-		e1->exp = EXT_MIN;
-		e1->m1 = e1->m2 = 0L;
-		return;
-	}
-	if (e1->exp >= EXT_MAX) {
-                /*
-                 * Exception 8.3 - Overflow
-                 */
-                trap(EFOVFL);   /* overflow */
-                e1->exp = EXT_MAX;
-                e1->m1 = e1->m2 = 0L;
-                return;
-        }
-}
Index: trunk/minix/lib/ack/float/div_ext.s
===================================================================
--- trunk/minix/lib/ack/float/div_ext.s	(revision 9)
+++ 	(revision )
@@ -1,211 +1,0 @@
-.sect .text; .sect .rom; .sect .data; .sect .bss
-.extern .div_ext
-.sect .text
-.div_ext:
-push ebp
-mov ebp,esp
-sub	esp,20
-push esi
-push edi
-mov esi,8(ebp)
-o16 mov -2(ebp),0
-mov edx,12(ebp)
-mov ecx,12(ebp)
-mov ecx,8(ecx)
-or ecx,4(edx)
-jne I1_4
-push 7
-call __fptrp
-pop ecx
-xor edx,edx
-mov 8(esi),edx
-mov 4(esi),edx
-o16 mov 2(esi),16383
-jmp I1_1
-I1_4:
-mov edx,8(esi)
-or edx,4(esi)
-jne I1_7
-o16 mov 2(esi),0
-jmp I1_1
-I1_7:
-lea eax,4(esi)
-push eax
-call .b64_rsft
-pop ecx
-mov edx,12(ebp)
-! kill edx
-add edx,4
-push edx
-call .b64_rsft
-pop ecx
-movsx eax,2(esi)
-inc eax
-movsx eax,eax
-o16 mov 2(esi),eax
-mov edx,12(ebp)
-! kill edx
-movsx ebx,2(edx)
-inc ebx
-mov eax,ebx
-movsx eax,eax
-mov edx,12(ebp)
-! kill edx
-o16 mov 2(edx),eax
-mov edx,12(ebp)
-movsx eax,(edx)
-movsx ebx,(esi)
-xor ebx,eax
-o16 mov (esi),ebx
-movsx eax,2(esi)
-mov edx,12(ebp)
-! kill edx
-movsx ecx,2(edx)
-sub ecx,eax
-neg ecx
-mov eax,ecx
-movsx eax,eax
-o16 mov 2(esi),eax
-o16 mov -18(ebp),64
-mov -12(ebp),0
-mov -8(ebp),0
-I1_10:
-movzx edx,-18(ebp)
-mov eax,edx
-movsx eax,eax
-dec eax
-o16 mov -18(ebp),eax
-mov eax,edx
-movsx eax,eax
-test eax,eax
-je I1_9
-lea eax,-12(ebp)
-push eax
-call .b64_lsft
-pop ecx
-mov edx,12(ebp)
-mov edx,4(edx)
-cmp 4(esi),edx
-jb I1_14
-mov edx,12(ebp)
-mov edx,4(edx)
-cmp 4(esi),edx
-jne I1_13
-mov edx,12(ebp)
-mov edx,8(edx)
-cmp 8(esi),edx
-jb I1_14
-I1_13:
-inc -8(ebp)
-mov edx,12(ebp)
-mov ecx,8(esi)
-cmp 8(edx),ecx
-jbe I1_18
-mov edx,4(esi)
-sub edx,1
-mov 4(esi),edx
-I1_18:
-mov edx,12(ebp)
-mov ecx,4(esi)
-sub ecx,4(edx)
-mov 4(esi),ecx
-mov edx,12(ebp)
-mov ecx,8(esi)
-sub ecx,8(edx)
-mov 8(esi),ecx
-I1_14:
-mov edi,esi
-add edi,4
-mov edx,(edi)
-or edx,4(edi)
-je I1_21
-mov eax,1
-jmp I1_22
-I1_21:
-xor eax,eax
-I1_22:
-o16 mov -2(ebp),eax
-movzx edx,-2(ebp)
-test edx,edx
-je I1_9
-lea eax,4(esi)
-push eax
-call .b64_lsft
-pop ecx
-jmp I1_10
-I1_9:
-movsx eax,-18(ebp)
-! kill cc
-test eax,eax
-jle I1_27
-lea edi,-12(ebp)
-movsx eax,-18(ebp)
-cmp eax,31
-jle I1_30
-mov edx,4(edi)
-mov (edi),edx
-movsx eax,-18(ebp)
-sub eax,32
-o16 mov -18(ebp),eax
-mov 4(edi),0
-I1_30:
-cmp (edi),0
-je I1_33
-movsx eax,-18(ebp)
-mov ecx,eax
-mov edx,(edi)
-sal edx,cl
-mov (edi),edx
-I1_33:
-add edi,4
-cmp (edi),0
-je I1_27
-movsx eax,-18(ebp)
-sub eax,32
-neg eax
-mov ecx,eax
-mov edx,(edi)
-shr edx,cl
-or -12(ebp),edx
-movsx eax,-18(ebp)
-mov ecx,eax
-mov edx,(edi)
-sal edx,cl
-mov (edi),edx
-I1_27:
-lea eax,-12(ebp)
-push eax
-lea eax,4(esi)
-push eax
-mov ecx,2
-call .blm
-push esi
-call .nrm_ext
-pop ecx
-movsx eax,2(esi)
-cmp eax,-16382
-jge I1_39
-push 5
-call __fptrp
-pop ecx
-o16 mov 2(esi),-16382
-xor edx,edx
-mov 8(esi),edx
-mov 4(esi),edx
-jmp I1_1
-I1_39:
-movsx eax,2(esi)
-cmp eax,16383
-jl I1_1
-push 4
-call __fptrp
-pop ecx
-o16 mov 2(esi),16383
-xor edx,edx
-mov 8(esi),edx
-mov 4(esi),edx
-I1_1:
-pop edi
-pop esi
-leave
-ret
Index: trunk/minix/lib/ack/float/dvf4.fc
===================================================================
--- trunk/minix/lib/ack/float/dvf4.fc	(revision 9)
+++ 	(revision )
@@ -1,26 +1,0 @@
-/*
-  (c) copyright 1988 by the Vrije Universiteit, Amsterdam, The Netherlands.
-  See the copyright notice in the ACK home directory, in the file "Copyright".
-*/
-
-/* $Header: /cvsup/minix/src/lib/ack/float/dvf4.fc,v 1.1 2005/10/10 15:27:42 beng Exp $ */
-
-/*
-	DIVIDE TWO SINGLES - SINGLE Precision (dvf 4)
-*/
-
-#include	"FP_types.h"
-
-void
-dvf4(s2,s1)
-SINGLE	s1,s2;
-{
-	EXTEND	e1,e2;
-
-	extend(&s1,&e1,sizeof(SINGLE));
-	extend(&s2,&e2,sizeof(SINGLE));
-
-		/* do a divide */
-	div_ext(&e1,&e2);
-	compact(&e1,&s1,sizeof(SINGLE));
-}
Index: trunk/minix/lib/ack/float/dvf4.s
===================================================================
--- trunk/minix/lib/ack/float/dvf4.s	(revision 9)
+++ 	(revision )
@@ -1,37 +1,0 @@
-.sect .text; .sect .rom; .sect .data; .sect .bss
-.extern .dvf4
-.sect .text
-.dvf4:
-push ebp
-mov ebp,esp
-sub	esp,24
-push 4
-lea eax,-12(ebp)
-push eax
-lea eax,12(ebp)
-push eax
-call .extend
-add esp,12
-push 4
-lea eax,-24(ebp)
-push eax
-lea eax,8(ebp)
-push eax
-call .extend
-add esp,12
-lea eax,-24(ebp)
-push eax
-lea eax,-12(ebp)
-push eax
-call .div_ext
-pop ecx
-pop ecx
-push 4
-lea eax,12(ebp)
-push eax
-lea eax,-12(ebp)
-push eax
-call .compact
-add esp,12
-leave
-ret
Index: trunk/minix/lib/ack/float/dvf8.fc
===================================================================
--- trunk/minix/lib/ack/float/dvf8.fc	(revision 9)
+++ 	(revision )
@@ -1,26 +1,0 @@
-/*
-  (c) copyright 1988 by the Vrije Universiteit, Amsterdam, The Netherlands.
-  See the copyright notice in the ACK home directory, in the file "Copyright".
-*/
-
-/* $Header: /cvsup/minix/src/lib/ack/float/dvf8.fc,v 1.1 2005/10/10 15:27:42 beng Exp $ */
-
-/*
-	DIVIDE TWO FLOATS - DOUBLE Precision (DVF 8)
-*/
-
-#include	"FP_types.h"
-
-void
-dvf8(s2,s1)
-DOUBLE	s1,s2;
-{
-	EXTEND	e1,e2;
-
-	extend(&s1.d[0],&e1,sizeof(DOUBLE));
-	extend(&s2.d[0],&e2,sizeof(DOUBLE));
-
-		/* do a divide */
-	div_ext(&e1,&e2);
-	compact(&e1,&s1.d[0],sizeof(DOUBLE));
-}
Index: trunk/minix/lib/ack/float/dvf8.s
===================================================================
--- trunk/minix/lib/ack/float/dvf8.s	(revision 9)
+++ 	(revision )
@@ -1,37 +1,0 @@
-.sect .text; .sect .rom; .sect .data; .sect .bss
-.extern .dvf8
-.sect .text
-.dvf8:
-push ebp
-mov ebp,esp
-sub	esp,24
-push 8
-lea eax,-12(ebp)
-push eax
-lea eax,16(ebp)
-push eax
-call .extend
-add esp,12
-push 8
-lea eax,-24(ebp)
-push eax
-lea eax,8(ebp)
-push eax
-call .extend
-add esp,12
-lea eax,-24(ebp)
-push eax
-lea eax,-12(ebp)
-push eax
-call .div_ext
-pop ecx
-pop ecx
-push 8
-lea eax,16(ebp)
-push eax
-lea eax,-12(ebp)
-push eax
-call .compact
-add esp,12
-leave
-ret
Index: trunk/minix/lib/ack/float/extend.fc
===================================================================
--- trunk/minix/lib/ack/float/extend.fc	(revision 9)
+++ 	(revision )
@@ -1,111 +1,0 @@
-/*
-  (c) copyright 1988 by the Vrije Universiteit, Amsterdam, The Netherlands.
-  See the copyright notice in the ACK home directory, in the file "Copyright".
-*/
-
-/* $Header: /cvsup/minix/src/lib/ack/float/extend.fc,v 1.1 2005/10/10 15:27:43 beng Exp $ */
-
-/*
-	CONVERTS FLOATING POINT TO EXTENDED FORMAT
-
-	Two sizes of FLOATING Point are known:
-		SINGLE and DOUBLE
-*/
-/********************************************************/
-/*
-	It is not required to normalize in extended
-	format, but it has been chosen to do so.
-	Extended Format is as follows (at exit):
-
-->sign	S000 0000 | 0000 0000		<SIGN>
-->exp	0EEE EEEE | EEEE EEEE		<EXPONENT>
-->m1	LFFF FFFF | FFFF FFFF		<L.Fraction>
-	FFFF FFFF | FFFF FFFF		<Fraction>
-->m2	FFFF FFFF | FFFF FFFF		<Fraction>
-	FFFF F000 | 0000 0000		<Fraction>
-*/
-/********************************************************/
-
-#include "FP_bias.h"
-#include "FP_shift.h"
-#include "FP_types.h"
-#include "get_put.h"
-/********************************************************/
-
-void
-extend(from,to,size)
-unsigned long	*from;
-EXTEND	*to;
-int	size;
-{
-	register char *cpt1;
-	unsigned long	tmp;
-	int	leadbit = 0;
-
-	cpt1 = (char *) from;
-
-#if FL_MSL_AT_LOW_ADDRESS
-#if FL_MSW_AT_LOW_ADDRESS
-	to->exp = uget2(cpt1);
-#else
-	to->exp = uget2(cpt1+2);
-#endif
-#else
-#if FL_MSW_AT_LOW_ADDRESS
-	to->exp = uget2(cpt1+(size == sizeof(DOUBLE) ? 4 : 0));
-#else
-	to->exp = uget2(cpt1+(size == sizeof(DOUBLE) ? 6 : 2));
-#endif
-#endif
-	to->sign = (to->exp & 0x8000);	/* set sign bit */
-	to->exp ^= to->sign;
-	if (size == sizeof(DOUBLE))
-		to->exp >>= DBL_EXPSHIFT;
-	else
-		to->exp >>= SGL_EXPSHIFT;
-	if (to->exp > 0)
-		leadbit++;	/* will set Lead bit later	*/
-	else to->exp++;
-
-	if (size == sizeof(DOUBLE))	{
-#if FL_MSL_AT_LOW_ADDRESS
-		to->m1 = get4(cpt1);
-		cpt1 += 4;
-		tmp = get4(cpt1);
-#else
-		tmp = get4(cpt1);
-		cpt1 += 4;
-		to->m1 = get4(cpt1);
-#endif
-		if (to->exp == 1 && to->m1 == 0 && tmp == 0) {
-			to->exp = 0;
-			to->sign = 0;
-			to->m1 = 0;
-			to->m2 = 0;
-			return;
-		}
-		to->m1 <<= DBL_M1LEFT;		/* shift	*/
-		to->exp -= DBL_BIAS;		/* remove bias	*/
-		to->m1 |= (tmp>>DBL_RPACK);	/* plus 10 == 32	*/
-		to->m2 = (tmp<<DBL_LPACK);	/* plus 22 == 32	*/
-	}
-	else	{	/* size == sizeof(SINGLE)		*/
-		to->m1 = get4(cpt1);
-		to->m1  <<= SGL_M1LEFT;	/* shift	*/
-		if (to->exp == 1 && to->m1 == 0) {
-			to->exp = 0;
-			to->sign = 0;
-			to->m1 = 0;
-			to->m2 = 0;
-			return;
-		}
-		to->exp -= SGL_BIAS;		/* remove bias	*/
-		to->m2 = 0L;
-	}
-
-	to->m1 |= NORMBIT;				/* set bit L	*/
-	if (leadbit == 0) {		/* set or clear Leading Bit	*/
-		to->m1 &= ~NORMBIT;			/* clear bit L	*/
-		nrm_ext(to);				/* and normalize */
-	}
-}
Index: trunk/minix/lib/ack/float/extend.s
===================================================================
--- trunk/minix/lib/ack/float/extend.s	(revision 9)
+++ 	(revision )
@@ -1,127 +1,0 @@
-.sect .text; .sect .rom; .sect .data; .sect .bss
-.extern .extend
-.sect .text
-.extend:
-push ebp
-mov ebp,esp
-sub	esp,12
-push esi
-push edi
-mov esi,12(ebp)
-mov -12(ebp),0
-mov edi,8(ebp)
-push edi
-cmp 16(ebp),8
-jne I1_4
-mov eax,6
-jmp I1_5
-I1_4:
-mov eax,2
-I1_5:
-pop edx
-add edx,eax
-movsx eax,(edx)
-o16 mov 2(esi),eax
-movsx ebx,2(esi)
-and ebx,32768
-o16 mov (esi),ebx
-movsx eax,(esi)
-movsx ecx,2(esi)
-xor ecx,eax
-mov eax,ecx
-movsx eax,eax
-o16 mov 2(esi),eax
-cmp 16(ebp),8
-jne I1_7
-movsx ebx,2(esi)
-sar ebx,4
-mov eax,ebx
-movsx eax,eax
-o16 mov 2(esi),eax
-jmp I1_8
-I1_7:
-movsx eax,2(esi)
-sar eax,7
-movsx eax,eax
-o16 mov 2(esi),eax
-I1_8:
-movsx eax,2(esi)
-! kill cc
-test eax,eax
-jle I1_10
-inc -12(ebp)
-jmp I1_11
-I1_10:
-movsx eax,2(esi)
-inc eax
-movsx eax,eax
-o16 mov 2(esi),eax
-I1_11:
-cmp 16(ebp),8
-jne I1_13
-mov edx,(edi)
-mov -8(ebp),edx
-add edi,4
-mov edx,(edi)
-mov 4(esi),edx
-movsx eax,2(esi)
-cmp eax,1
-jne I1_16
-cmp 4(esi),0
-jne I1_16
-cmp -8(ebp),0
-jne I1_16
-o16 mov 2(esi),0
-o16 mov (esi),0
-mov 4(esi),0
-mov 8(esi),0
-jmp I1_1
-I1_16:
-mov edx,4(esi)
-sal edx,11
-mov 4(esi),edx
-movsx eax,2(esi)
-sub eax,1023
-movsx eax,eax
-o16 mov 2(esi),eax
-mov edx,-8(ebp)
-shr edx,21
-or 4(esi),edx
-mov edx,-8(ebp)
-sal edx,11
-mov 8(esi),edx
-jmp I1_14
-I1_13:
-mov edx,(edi)
-mov 4(esi),edx
-sal edx,8
-mov 4(esi),edx
-movsx eax,2(esi)
-cmp eax,1
-jne I1_21
-cmp 4(esi),0
-jne I1_21
-o16 mov 2(esi),0
-o16 mov (esi),0
-mov 4(esi),0
-mov 8(esi),0
-jmp I1_1
-I1_21:
-movsx eax,2(esi)
-sub eax,127
-movsx eax,eax
-o16 mov 2(esi),eax
-mov 8(esi),0
-I1_14:
-or 4(esi),-2147483648
-cmp -12(ebp),0
-jne I1_1
-and 4(esi),2147483647
-push esi
-call .nrm_ext
-pop ecx
-I1_1:
-pop edi
-pop esi
-leave
-ret
Index: trunk/minix/lib/ack/float/fef4.fc
===================================================================
--- trunk/minix/lib/ack/float/fef4.fc	(revision 9)
+++ 	(revision )
@@ -1,33 +1,0 @@
-/*
-  (c) copyright 1988 by the Vrije Universiteit, Amsterdam, The Netherlands.
-  See the copyright notice in the ACK home directory, in the file "Copyright".
-*/
-
-/* $Header: /cvsup/minix/src/lib/ack/float/fef4.fc,v 1.1 2005/10/10 15:27:43 beng Exp $ */
-
-/*
-	SEPERATE INTO EXPONENT AND FRACTION (FEF 4)
-*/
-
-#include	"FP_types.h"
-
-void
-fef4(r,s1)
-SINGLE	s1;
-struct fef4_returns	*r;
-{
-	EXTEND	buf;
-	register struct fef4_returns	*p = r;	/* make copy; r might refer
-						   to itself (see table)
-						*/
-
-	extend(&s1,&buf,sizeof(SINGLE));
-	if (buf.exp == 0 && buf.m1 == 0 && buf.m2 == 0) {
-		p->e = 0;
-	}
-	else {
-		p->e = buf.exp+1;
-		buf.exp = -1;
-	}
-	compact(&buf,&p->f,sizeof(SINGLE));
-}
Index: trunk/minix/lib/ack/float/fef4.s
===================================================================
--- trunk/minix/lib/ack/float/fef4.s	(revision 9)
+++ 	(revision )
@@ -1,41 +1,0 @@
-.sect .text; .sect .rom; .sect .data; .sect .bss
-.extern .fef4
-.sect .text
-.fef4:
-push ebp
-mov ebp,esp
-sub	esp,12
-push esi
-mov esi,8(ebp)
-push 4
-lea eax,-12(ebp)
-push eax
-lea eax,12(ebp)
-push eax
-call .extend
-add esp,12
-movzx edx,-10(ebp)
-test edx,edx
-jne I1_4
-cmp -8(ebp),0
-jne I1_4
-cmp -4(ebp),0
-jne I1_4
-mov (esi),0
-jmp I1_5
-I1_4:
-movsx eax,-10(ebp)
-inc eax
-mov (esi),eax
-o16 mov -10(ebp),-1
-I1_5:
-push 4
-lea eax,4(esi)
-push eax
-lea eax,-12(ebp)
-push eax
-call .compact
-add esp,12
-pop esi
-leave
-ret
Index: trunk/minix/lib/ack/float/fef8.fc
===================================================================
--- trunk/minix/lib/ack/float/fef8.fc	(revision 9)
+++ 	(revision )
@@ -1,33 +1,0 @@
-/*
-  (c) copyright 1988 by the Vrije Universiteit, Amsterdam, The Netherlands.
-  See the copyright notice in the ACK home directory, in the file "Copyright".
-*/
-
-/* $Header: /cvsup/minix/src/lib/ack/float/fef8.fc,v 1.1 2005/10/10 15:27:43 beng Exp $ */
-
-/*
-	SEPERATE DOUBLE INTO EXPONENT AND FRACTION (FEF 8)
-*/
-
-#include	"FP_types.h"
-
-void
-fef8(r, s1)
-DOUBLE	s1;
-struct fef8_returns *r;
-{
-	EXTEND	buf;
-	register struct fef8_returns *p = r;	/* make copy, r might refer
-						   to itself (see table)
-						*/
-
-	extend(&s1.d[0],&buf,sizeof(DOUBLE));
-	if (buf.exp == 0 && buf.m1 == 0 && buf.m2 == 0) {
-		p->e = 0;
-	}
-	else {
-		p->e = buf.exp + 1;
-		buf.exp = -1;
-	}
-	compact(&buf,&p->f.d[0],sizeof(DOUBLE));
-}
Index: trunk/minix/lib/ack/float/fef8.s
===================================================================
--- trunk/minix/lib/ack/float/fef8.s	(revision 9)
+++ 	(revision )
@@ -1,41 +1,0 @@
-.sect .text; .sect .rom; .sect .data; .sect .bss
-.extern .fef8
-.sect .text
-.fef8:
-push ebp
-mov ebp,esp
-sub	esp,12
-push esi
-mov esi,8(ebp)
-push 8
-lea eax,-12(ebp)
-push eax
-lea eax,12(ebp)
-push eax
-call .extend
-add esp,12
-movzx edx,-10(ebp)
-test edx,edx
-jne I1_4
-cmp -8(ebp),0
-jne I1_4
-cmp -4(ebp),0
-jne I1_4
-mov (esi),0
-jmp I1_5
-I1_4:
-movsx eax,-10(ebp)
-inc eax
-mov (esi),eax
-o16 mov -10(ebp),-1
-I1_5:
-push 8
-lea eax,4(esi)
-push eax
-lea eax,-12(ebp)
-push eax
-call .compact
-add esp,12
-pop esi
-leave
-ret
Index: trunk/minix/lib/ack/float/fif4.fc
===================================================================
--- trunk/minix/lib/ack/float/fif4.fc	(revision 9)
+++ 	(revision )
@@ -1,46 +1,0 @@
-/*
-  (c) copyright 1988 by the Vrije Universiteit, Amsterdam, The Netherlands.
-  See the copyright notice in the ACK home directory, in the file "Copyright".
-*/
-
-/* $Header: /cvsup/minix/src/lib/ack/float/fif4.fc,v 1.1 2005/10/10 15:27:43 beng Exp $ */
-
-/*
-	MULTIPLY AND DISMEMBER PARTS (FIF 4)
-*/
-
-#include "FP_types.h"
-#include "FP_shift.h"
-
-void
-fif4(p,x,y)
-SINGLE	x,y;
-struct fif4_returns *p;
-{
-
-	EXTEND	e1,e2;
-
-	extend(&y,&e1,sizeof(SINGLE));
-	extend(&x,&e2,sizeof(SINGLE));
-		/* do a multiply */
-	mul_ext(&e1,&e2);
-	e2 = e1;
-	compact(&e2,&y,sizeof(SINGLE));
-	if (e1.exp < 0) {
-		p->ipart = 0;
-		p->fpart = y;
-		return;
-	}
-	if (e1.exp > 30 - SGL_M1LEFT) {
-		p->ipart = y;
-		p->fpart = 0;
-		return;
-	}
-	b64_sft(&e1.mantissa, 63 - e1.exp);
-	b64_sft(&e1.mantissa, e1.exp - 63);	/* "loose" low order bits */
-	compact(&e1,&(p->ipart),sizeof(SINGLE));
-	extend(&(p->ipart), &e2, sizeof(SINGLE));
-	extend(&y, &e1, sizeof(SINGLE));
-	sub_ext(&e1, &e2);
-	compact(&e1, &(p->fpart), sizeof(SINGLE));
-}
Index: trunk/minix/lib/ack/float/fif4.s
===================================================================
--- trunk/minix/lib/ack/float/fif4.s	(revision 9)
+++ 	(revision )
@@ -1,113 +1,0 @@
-.sect .text; .sect .rom; .sect .data; .sect .bss
-.extern .fif4
-.sect .text
-.fif4:
-push ebp
-mov ebp,esp
-sub	esp,24
-push esi
-mov esi,8(ebp)
-push 4
-lea eax,-12(ebp)
-push eax
-lea eax,16(ebp)
-push eax
-call .extend
-add esp,12
-push 4
-lea eax,-24(ebp)
-push eax
-lea eax,12(ebp)
-push eax
-call .extend
-add esp,12
-lea eax,-24(ebp)
-push eax
-lea eax,-12(ebp)
-push eax
-call .mul_ext
-pop ecx
-pop ecx
-lea eax,-12(ebp)
-push eax
-lea eax,-24(ebp)
-push eax
-mov ecx,3
-call .blm
-push 4
-lea eax,16(ebp)
-push eax
-lea eax,-24(ebp)
-push eax
-call .compact
-add esp,12
-movsx eax,-10(ebp)
-test eax,eax
-jns I1_4
-mov (esi),0
-mov edx,16(ebp)
-mov 4(esi),edx
-jmp I1_1
-I1_4:
-movsx eax,-10(ebp)
-cmp eax,22
-jle I1_7
-mov edx,16(ebp)
-mov (esi),edx
-mov 4(esi),0
-jmp I1_1
-I1_7:
-movsx eax,-10(ebp)
-sub eax,63
-neg eax
-push eax
-lea eax,-8(ebp)
-push eax
-call .b64_sft
-pop ecx
-pop ecx
-movsx eax,-10(ebp)
-sub eax,63
-push eax
-lea eax,-8(ebp)
-push eax
-call .b64_sft
-pop ecx
-pop ecx
-push 4
-push esi
-lea eax,-12(ebp)
-push eax
-call .compact
-add esp,12
-push 4
-lea eax,-24(ebp)
-push eax
-push esi
-call .extend
-add esp,12
-push 4
-lea eax,-12(ebp)
-push eax
-lea eax,16(ebp)
-push eax
-call .extend
-add esp,12
-lea eax,-24(ebp)
-push eax
-lea eax,-12(ebp)
-push eax
-call .sub_ext
-pop ecx
-pop ecx
-push 4
-lea eax,4(esi)
-push eax
-lea eax,-12(ebp)
-push eax
-call .compact
-add esp,12
-I1_1:
-pop esi
-leave
-ret
Index: trunk/minix/lib/ack/float/fif8.fc
===================================================================
--- trunk/minix/lib/ack/float/fif8.fc	(revision 9)
+++ 	(revision )
@@ -1,48 +1,0 @@
-/*
-  (c) copyright 1988 by the Vrije Universiteit, Amsterdam, The Netherlands.
-  See the copyright notice in the ACK home directory, in the file "Copyright".
-*/
-
-/* $Header: /cvsup/minix/src/lib/ack/float/fif8.fc,v 1.1 2005/10/10 15:27:43 beng Exp $ */
-
-/*
-	MULTIPLY AND DISMEMBER PARTS (FIF 8)
-*/
-
-#include "FP_types.h"
-#include "FP_shift.h"
-
-void
-fif8(p,x,y)
-DOUBLE	x,y;
-struct fif8_returns *p;
-{
-
-	EXTEND	e1,e2;
-
-	extend(&y.d[0],&e1,sizeof(DOUBLE));
-	extend(&x.d[0],&e2,sizeof(DOUBLE));
-		/* do a multiply */
-	mul_ext(&e1,&e2);
-	e2 = e1;
-	compact(&e2, &y.d[0], sizeof(DOUBLE));
-	if (e1.exp < 0) {
-		p->ipart.d[0] = 0;
-		p->ipart.d[1] = 0;
-		p->fpart = y;
-		return;
-	}
-	if (e1.exp > 62 - DBL_M1LEFT) {
-		p->ipart = y;
-		p->fpart.d[0] = 0;
-		p->fpart.d[1] = 0;
-		return;
-	}
-	b64_sft(&e1.mantissa, 63 - e1.exp);
-	b64_sft(&e1.mantissa, e1.exp - 63);	/* "loose" low order bits */
-	compact(&e1, &(p->ipart.d[0]), sizeof(DOUBLE));
-	extend(&(p->ipart.d[0]), &e2, sizeof(DOUBLE));
-	extend(&y.d[0], &e1, sizeof(DOUBLE));
-	sub_ext(&e1, &e2);
-	compact(&e1, &(p->fpart.d[0]), sizeof(DOUBLE));
-}
Index: trunk/minix/lib/ack/float/fif8.s
===================================================================
--- trunk/minix/lib/ack/float/fif8.s	(revision 9)
+++ 	(revision )
@@ -1,122 +1,0 @@
-.sect .text; .sect .rom; .sect .data; .sect .bss
-.extern .fif8
-.sect .text
-.fif8:
-push ebp
-mov ebp,esp
-sub	esp,24
-push esi
-mov esi,8(ebp)
-push 8
-lea eax,-12(ebp)
-push eax
-lea eax,20(ebp)
-push eax
-call .extend
-add esp,12
-push 8
-lea eax,-24(ebp)
-push eax
-lea eax,12(ebp)
-push eax
-call .extend
-add esp,12
-lea eax,-24(ebp)
-push eax
-lea eax,-12(ebp)
-push eax
-call .mul_ext
-pop ecx
-pop ecx
-lea eax,-12(ebp)
-push eax
-lea eax,-24(ebp)
-push eax
-mov ecx,3
-call .blm
-push 8
-lea eax,20(ebp)
-push eax
-lea eax,-24(ebp)
-push eax
-call .compact
-add esp,12
-movsx eax,-10(ebp)
-test eax,eax
-jns I1_4
-mov (esi),0
-mov 4(esi),0
-lea eax,20(ebp)
-push eax
-lea eax,8(esi)
-push eax
-mov ecx,2
-call .blm
-jmp I1_1
-I1_4:
-movsx eax,-10(ebp)
-cmp eax,51
-jle I1_7
-lea eax,20(ebp)
-push eax
-push esi
-mov ecx,2
-call .blm
-mov 8(esi),0
-mov 12(esi),0
-jmp I1_1
-I1_7:
-movsx eax,-10(ebp)
-sub eax,63
-neg eax
-push eax
-lea eax,-8(ebp)
-push eax
-call .b64_sft
-pop ecx
-pop ecx
-movsx eax,-10(ebp)
-sub eax,63
-push eax
-lea eax,-8(ebp)
-push eax
-call .b64_sft
-pop ecx
-pop ecx
-push 8
-push esi
-lea eax,-12(ebp)
-push eax
-call .compact
-add esp,12
-push 8
-lea eax,-24(ebp)
-push eax
-push esi
-call .extend
-add esp,12
-push 8
-lea eax,-12(ebp)
-push eax
-lea eax,20(ebp)
-push eax
-call .extend
-add esp,12
-lea eax,-24(ebp)
-push eax
-lea eax,-12(ebp)
-push eax
-call .sub_ext
-pop ecx
-pop ecx
-push 8
-lea eax,8(esi)
-push eax
-lea eax,-12(ebp)
-push eax
-call .compact
-add esp,12
-I1_1:
-pop esi
-leave
-ret
Index: trunk/minix/lib/ack/float/fptrp.s
===================================================================
--- trunk/minix/lib/ack/float/fptrp.s	(revision 9)
+++ 	(revision )
@@ -1,19 +1,0 @@
-#
-.sect .text; .sect .rom; .sect .data; .sect .bss
-.define __fptrp
-.sect .text
-__fptrp:
-#if __i386
-	push	ebp
-	mov	ebp, esp
-	mov	eax, 8(bp)
-	call	.Xtrp
-	leave
-	ret
-#else /* i86 */
-	push	bp
-	mov	bp, sp
-	mov	ax, 4(bp)
-	call	.Xtrp
-	jmp	.cret
-#endif
Index: trunk/minix/lib/ack/float/get_put.h
===================================================================
--- trunk/minix/lib/ack/float/get_put.h	(revision 9)
+++ 	(revision )
@@ -1,41 +1,0 @@
-/*
-  (c) copyright 1988 by the Vrije Universiteit, Amsterdam, The Netherlands.
-  See the copyright notice in the ACK home directory, in the file "Copyright".
-*/
-
-/* $Header: /cvsup/minix/src/lib/ack/float/get_put.h,v 1.1 2005/10/10 15:27:43 beng Exp $ */
-
-#include <byte_order.h>
-
-#if CHAR_UNSIGNED
-#define Xchar(ch)	(ch)
-#else
-#define Xchar(ch)	((ch) & 0377)
-#endif
-
-#define BYTES_REVERSED (MSB_AT_LOW_ADDRESS != FL_MSB_AT_LOW_ADDRESS)
-#define WORDS_REVERSED (MSW_AT_LOW_ADDRESS != FL_MSW_AT_LOW_ADDRESS)
-#define LONGS_REVERSED (FL_MSL_AT_LOW_ADDRESS)
-
-#if BYTES_REVERSED
-#define uget2(c)	(Xchar((c)[1]) | ((unsigned) Xchar((c)[0]) << 8))
-#define Xput2(i, c)	(((c)[1] = (i)), ((c)[0] = (i) >> 8))
-#define put2(i, c)	{ register int j = (i); Xput2(j, c); }
-#else
-#define uget2(c)	(* ((unsigned short *) (c)))
-#define Xput2(i, c)	(* ((short *) (c)) = (i))
-#define put2(i, c)	Xput2(i, c)
-#endif
-
-#define get2(c)		((short) uget2(c))
-
-#if WORDS_REVERSED || BYTES_REVERSED
-#define get4(c)		(uget2((c)+2) | ((long) uget2(c) << 16))
-#define put4(l, c)	{ register long x=(l); \
-			  Xput2((int)x,(c)+2); \
-			  Xput2((int)(x>>16),(c)); \
-			}
-#else
-#define get4(c)		(* ((long *) (c)))
-#define put4(l, c)	(* ((long *) (c)) = (l))
-#endif
Index: trunk/minix/lib/ack/float/mlf4.fc
===================================================================
--- trunk/minix/lib/ack/float/mlf4.fc	(revision 9)
+++ 	(revision )
@@ -1,25 +1,0 @@
-/*
-  (c) copyright 1988 by the Vrije Universiteit, Amsterdam, The Netherlands.
-  See the copyright notice in the ACK home directory, in the file "Copyright".
-*/
-
-/* $Header: /cvsup/minix/src/lib/ack/float/mlf4.fc,v 1.1 2005/10/10 15:27:43 beng Exp $ */
-
-/*
- * Multiply Single Precesion Float (MLF 4)
- */
-
-#include	"FP_types.h"
-
-void
-mlf4(s2,s1)
-SINGLE	s1,s2;
-{
-	EXTEND	e1,e2;
-
-	extend(&s1,&e1,sizeof(SINGLE));
-	extend(&s2,&e2,sizeof(SINGLE));
-		/* do a multiply */
-	mul_ext(&e1,&e2);
-	compact(&e1,&s1,sizeof(SINGLE));
-}
Index: trunk/minix/lib/ack/float/mlf4.s
===================================================================
--- trunk/minix/lib/ack/float/mlf4.s	(revision 9)
+++ 	(revision )
@@ -1,37 +1,0 @@
-.sect .text; .sect .rom; .sect .data; .sect .bss
-.extern .mlf4
-.sect .text
-.mlf4:
-push ebp
-mov ebp,esp
-sub	esp,24
-push 4
-lea eax,-12(ebp)
-push eax
-lea eax,12(ebp)
-push eax
-call .extend
-add esp,12
-push 4
-lea eax,-24(ebp)
-push eax
-lea eax,8(ebp)
-push eax
-call .extend
-add esp,12
-lea eax,-24(ebp)
-push eax
-lea eax,-12(ebp)
-push eax
-call .mul_ext
-pop ecx
-pop ecx
-push 4
-lea eax,12(ebp)
-push eax
-lea eax,-12(ebp)
-push eax
-call .compact
-add esp,12
-leave
-ret
Index: trunk/minix/lib/ack/float/mlf8.fc
===================================================================
--- trunk/minix/lib/ack/float/mlf8.fc	(revision 9)
+++ 	(revision )
@@ -1,25 +1,0 @@
-/*
-  (c) copyright 1988 by the Vrije Universiteit, Amsterdam, The Netherlands.
-  See the copyright notice in the ACK home directory, in the file "Copyright".
-*/
-
-/* $Header: /cvsup/minix/src/lib/ack/float/mlf8.fc,v 1.1 2005/10/10 15:27:43 beng Exp $ */
-
-/*
- * Multiply Double Precision Float (MLF 8)
- */
-
-#include	"FP_types.h"
-
-void
-mlf8(s2,s1)
-DOUBLE	s1,s2;
-{
-	EXTEND	e1,e2;
-
-	extend(&s1.d[0],&e1,sizeof(DOUBLE));
-	extend(&s2.d[0],&e2,sizeof(DOUBLE));
-		/* do a multiply */
-	mul_ext(&e1,&e2);
-	compact(&e1,&s1.d[0],sizeof(DOUBLE));
-}
Index: trunk/minix/lib/ack/float/mlf8.s
===================================================================
--- trunk/minix/lib/ack/float/mlf8.s	(revision 9)
+++ 	(revision )
@@ -1,37 +1,0 @@
-.sect .text; .sect .rom; .sect .data; .sect .bss
-.extern .mlf8
-.sect .text
-.mlf8:
-push ebp
-mov ebp,esp
-sub	esp,24
-push 8
-lea eax,-12(ebp)
-push eax
-lea eax,16(ebp)
-push eax
-call .extend
-add esp,12
-push 8
-lea eax,-24(ebp)
-push eax
-lea eax,8(ebp)
-push eax
-call .extend
-add esp,12
-lea eax,-24(ebp)
-push eax
-lea eax,-12(ebp)
-push eax
-call .mul_ext
-pop ecx
-pop ecx
-push 8
-lea eax,16(ebp)
-push eax
-lea eax,-12(ebp)
-push eax
-call .compact
-add esp,12
-leave
-ret
Index: trunk/minix/lib/ack/float/mul_ext.fc
===================================================================
--- trunk/minix/lib/ack/float/mul_ext.fc	(revision 9)
+++ 	(revision )
@@ -1,98 +1,0 @@
-/*
-  (c) copyright 1988 by the Vrije Universiteit, Amsterdam, The Netherlands.
-  See the copyright notice in the ACK home directory, in the file "Copyright".
-*/
-
-/* $Header: /cvsup/minix/src/lib/ack/float/mul_ext.fc,v 1.1 2005/10/10 15:27:43 beng Exp $ */
-
-/*
-	ROUTINE TO MULTIPLY TWO EXTENDED FORMAT NUMBERS
-*/
-
-# include "FP_bias.h"
-# include "FP_trap.h"
-# include "FP_types.h"
-# include "FP_shift.h"
-
-void
-mul_ext(e1,e2)
-EXTEND	*e1,*e2;
-{
-	register int	i,j;		/* loop control	*/
-	unsigned short	mp[4];		/* multiplier */
-	unsigned short	mc[4];		/* multipcand */
-	unsigned short	result[8];	/* result */
-	register unsigned short *pres;
-
-	/* first save the sign (XOR)			*/
-	e1->sign ^= e2->sign;
-
-	/* compute new exponent */
-	e1->exp += e2->exp + 1;
-	/* 128 bit multiply of mantissas			*/
-
-		/* assign unknown long formats		*/
-		/* to known unsigned word formats	*/
-	mp[0] = e1->m1 >> 16;
-	mp[1] = (unsigned short) e1->m1;
-	mp[2] = e1->m2 >> 16;
-	mp[3] = (unsigned short) e1->m2;
-	mc[0] = e2->m1 >> 16;
-	mc[1] = (unsigned short) e2->m1;
-	mc[2] = e2->m2 >> 16;
-	mc[3] = (unsigned short) e2->m2;
-	for (i = 8; i--;) {
-		result[i] = 0;
-	}
-	/*
-	 *	fill registers with their components
-	 */
-	for(i=4, pres = &result[4];i--;pres--) if (mp[i]) {
-		unsigned short k = 0;
-		unsigned long mpi = mp[i];
-		for(j=4;j--;) {
-			unsigned long tmp = (unsigned long)pres[j] + k;
-			if (mc[j]) tmp += mpi * mc[j];
-			pres[j] = tmp;
-			k = tmp >> 16;
-		}
-		pres[-1] = k;
-	}
-        if (! (result[0] & 0x8000)) {
-                e1->exp--;
-                for (i = 0; i <= 3; i++) {
-                        result[i] <<= 1;
-                        if (result[i+1]&0x8000) result[i] |= 1;
-                }
-                result[4] <<= 1;
-        }
-
-	/*
-	 *	combine the registers to a total
-	 */
-	e1->m1 = ((unsigned long)(result[0]) << 16) + result[1];
-	e1->m2 = ((unsigned long)(result[2]) << 16) + result[3];
-	if (result[4] & 0x8000) {
-		if (++e1->m2 == 0)
-			if (++e1->m1 == 0) {
-				e1->m1 = NORMBIT;
-				e1->exp++;
-			}
-	}
-
-					/* check for overflow	*/
-	if (e1->exp >= EXT_MAX)	{
-		trap(EFOVFL);
-			/* if caught 			*/
-			/* return signed infinity	*/
-		e1->exp = EXT_MAX;
-infinity:	e1->m1 = e1->m2 =0L;
-		return;
-	}
-				/* check for underflow	*/
-	if (e1->exp < EXT_MIN)	{
-		trap(EFUNFL);
-		e1->exp = EXT_MIN;
-		goto infinity;
-	}
-}
Index: trunk/minix/lib/ack/float/mul_ext.s
===================================================================
--- trunk/minix/lib/ack/float/mul_ext.s	(revision 9)
+++ 	(revision )
@@ -1,209 +1,0 @@
-.sect .text; .sect .rom; .sect .data; .sect .bss
-.extern .mul_ext
-.sect .text
-.mul_ext:
-push ebp
-mov ebp,esp
-sub	esp,60
-push esi
-push edi
-mov esi,8(ebp)
-mov edx,12(ebp)
-movsx eax,(edx)
-movsx ebx,(esi)
-xor ebx,eax
-o16 mov (esi),ebx
-mov edx,12(ebp)
-! kill edx
-movsx eax,2(edx)
-inc eax
-movsx ecx,2(esi)
-add ecx,eax
-mov eax,ecx
-movsx eax,eax
-o16 mov 2(esi),eax
-mov edx,4(esi)
-shr edx,16
-and edx,65535
-o16 mov -16(ebp),edx
-mov edx,65535
-and edx,4(esi)
-o16 mov -14(ebp),edx
-mov edx,8(esi)
-shr edx,16
-and edx,65535
-o16 mov -12(ebp),edx
-mov edx,65535
-and edx,8(esi)
-o16 mov -10(ebp),edx
-mov edx,12(ebp)
-mov edx,4(edx)
-shr edx,16
-and edx,65535
-o16 mov -24(ebp),edx
-mov edx,12(ebp)
-mov ecx,65535
-and ecx,4(edx)
-o16 mov -22(ebp),ecx
-mov edx,8(edx)
-shr edx,16
-and edx,65535
-o16 mov -20(ebp),edx
-mov edx,12(ebp)
-mov ecx,65535
-and ecx,8(edx)
-o16 mov -18(ebp),ecx
-mov edi,8
-I1_6:
-mov edx,edi
-dec edx
-push edi
-mov edi,edx
-pop edx
-test edx,edx
-je I1_3
-o16 mov -40(ebp)(edi*2),0
-jmp I1_6
-I1_3:
-mov edi,4
-lea edx,-32(ebp)
-mov -44(ebp),edx
-I1_10:
-mov edx,edi
-dec edx
-push edi
-mov edi,edx
-pop edx
-test edx,edx
-je I1_7
-movzx edx,-16(ebp)(edi*2)
-test edx,edx
-je I1_8
-o16 mov -46(ebp),0
-movzx edx,-16(ebp)(edi*2)
-mov -52(ebp),edx
-mov -8(ebp),4
-I1_17:
-mov edx,-8(ebp)
-mov ecx,edx
-dec ecx
-mov -8(ebp),ecx
-test edx,edx
-je I1_14
-mov edx,-44(ebp)
-movzx ebx,-46(ebp)
-movzx eax,0(edx)(ecx*2)
-add ebx,eax
-mov -56(ebp),ebx
-movzx edx,-24(ebp)(ecx*2)
-test edx,edx
-je I1_19
-movzx edx,-24(ebp)(ecx*2)
-imul edx,-52(ebp)
-add -56(ebp),edx
-I1_19:
-mov edx,65535
-and edx,-56(ebp)
-mov ecx,-8(ebp)
-mov ebx,-44(ebp)
-o16 mov 0(ebx)(ecx*2),edx
-mov edx,-56(ebp)
-shr edx,16
-and edx,65535
-o16 mov -46(ebp),edx
-jmp I1_17
-I1_14:
-mov edx,-44(ebp)
-! kill edx
-o16 mov cx,-46(ebp)
-o16 mov -2(edx),cx
-I1_8:
-add -44(ebp),-2
-jmp I1_10
-I1_7:
-movzx edx,-40(ebp)
-test edx,32768
-jne I1_22
-movsx eax,2(esi)
-dec eax
-movsx eax,eax
-o16 mov 2(esi),eax
-xor edi,edi
-I1_27:
-cmp edi,3
-jg I1_24
-lea edx,-40(ebp)(edi*2)
-mov -60(ebp),edx
-movzx ecx,(edx)
-sal ecx,1
-and ecx,65535
-o16 mov (edx),ecx
-mov edx,edi
-inc edx
-movzx ecx,-40(ebp)(edx*2)
-test ecx,32768
-je I1_25
-lea edx,-40(ebp)(edi*2)
-mov -60(ebp),edx
-movzx ecx,(edx)
-or ecx,1
-and ecx,65535
-o16 mov (edx),ecx
-I1_25:
-inc edi
-jmp I1_27
-I1_24:
-movzx edx,-32(ebp)
-sal edx,1
-and edx,65535
-o16 mov -32(ebp),edx
-I1_22:
-movzx edx,-40(ebp)
-sal edx,16
-movzx ecx,-38(ebp)
-add ecx,edx
-mov 4(esi),ecx
-movzx edx,-36(ebp)
-sal edx,16
-movzx ecx,-34(ebp)
-add ecx,edx
-mov 8(esi),ecx
-movzx edx,-32(ebp)
-test edx,32768
-je I1_32
-add 8(esi),1
-jne I1_32
-add 4(esi),1
-jne I1_32
-mov 4(esi),-2147483648
-movsx eax,2(esi)
-inc eax
-movsx eax,eax
-o16 mov 2(esi),eax
-I1_32:
-movsx eax,2(esi)
-cmp eax,16383
-jl I1_41
-push 4
-call __fptrp
-pop ecx
-o16 mov 2(esi),16383
-I1_43:
-xor edx,edx
-mov 8(esi),edx
-mov 4(esi),edx
-jmp I1_1
-I1_41:
-movsx eax,2(esi)
-cmp eax,-16382
-jge I1_1
-push 5
-call __fptrp
-pop ecx
-o16 mov 2(esi),-16382
-jmp I1_43
-I1_1:
-pop edi
-pop esi
-leave
-ret
Index: trunk/minix/lib/ack/float/ngf4.fc
===================================================================
--- trunk/minix/lib/ack/float/ngf4.fc	(revision 9)
+++ 	(revision )
@@ -1,27 +1,0 @@
-/*
-  (c) copyright 1988 by the Vrije Universiteit, Amsterdam, The Netherlands.
-  See the copyright notice in the ACK home directory, in the file "Copyright".
-*/
-
-/* $Header: /cvsup/minix/src/lib/ack/float/ngf4.fc,v 1.1 2005/10/10 15:27:43 beng Exp $ */
-
-/*
-		NEGATE A FLOATING POINT (NGF 4)
-*/
-/********************************************************/
-
-#include "FP_types.h"
-#include "get_put.h"
-
-#define OFF ((FL_MSW_AT_LOW_ADDRESS ? 0 : 2) + (FL_MSB_AT_LOW_ADDRESS ? 0 : 1))
-void
-ngf4(f)
-SINGLE	f;
-{
-	unsigned char *p;
-
-	if (f != (SINGLE) 0) {
-		p = (unsigned char *) &f + OFF;
-		*p ^= 0x80;
-	}
-}
Index: trunk/minix/lib/ack/float/ngf4.s
===================================================================
--- trunk/minix/lib/ack/float/ngf4.s	(revision 9)
+++ 	(revision )
@@ -1,17 +1,0 @@
-.sect .text; .sect .rom; .sect .data; .sect .bss
-.extern .ngf4
-.sect .text
-.ngf4:
-push ebp
-mov ebp,esp
-push esi
-cmp 8(ebp),0
-je I1_1
-lea esi,11(ebp)
-movzxb edx,(esi)
-xor edx,128
-movb (esi),dl
-I1_1:
-pop esi
-leave
-ret
Index: trunk/minix/lib/ack/float/ngf8.fc
===================================================================
--- trunk/minix/lib/ack/float/ngf8.fc	(revision 9)
+++ 	(revision )
@@ -1,28 +1,0 @@
-/*
-  (c) copyright 1988 by the Vrije Universiteit, Amsterdam, The Netherlands.
-  See the copyright notice in the ACK home directory, in the file "Copyright".
-*/
-
-/* $Header: /cvsup/minix/src/lib/ack/float/ngf8.fc,v 1.1 2005/10/10 15:27:43 beng Exp $ */
-
-/*
-		NEGATE A FLOATING POINT (NGF 8)
-*/
-/********************************************************/
-
-#include "FP_types.h"
-#include "get_put.h"
-
-#define OFF ((FL_MSL_AT_LOW_ADDRESS ? 0 : 4) + (FL_MSW_AT_LOW_ADDRESS ? 0 : 2) + (FL_MSB_AT_LOW_ADDRESS ? 0 : 1))
-
-void
-ngf8(f)
-DOUBLE	f;
-{
-	unsigned char	*p;
-
-	if (f.d[0] != 0 || f.d[1] != 0) {
-		p = (unsigned char *) &f + OFF;
-		*p ^= 0x80;
-	}
-}
Index: trunk/minix/lib/ack/float/ngf8.s
===================================================================
--- trunk/minix/lib/ack/float/ngf8.s	(revision 9)
+++ 	(revision )
@@ -1,20 +1,0 @@
-.sect .text; .sect .rom; .sect .data; .sect .bss
-.extern .ngf8
-.sect .text
-.ngf8:
-push ebp
-mov ebp,esp
-push esi
-cmp 8(ebp),0
-jne I1_3
-cmp 12(ebp),0
-je I1_1
-I1_3:
-lea esi,15(ebp)
-movzxb edx,(esi)
-xor edx,128
-movb (esi),dl
-I1_1:
-pop esi
-leave
-ret
Index: trunk/minix/lib/ack/float/nrm_ext.fc
===================================================================
--- trunk/minix/lib/ack/float/nrm_ext.fc	(revision 9)
+++ 	(revision )
@@ -1,50 +1,0 @@
-/*
-  (c) copyright 1988 by the Vrije Universiteit, Amsterdam, The Netherlands.
-  See the copyright notice in the ACK home directory, in the file "Copyright".
-*/
-
-/* $Header: /cvsup/minix/src/lib/ack/float/nrm_ext.fc,v 1.1 2005/10/10 15:27:43 beng Exp $ */
-
-/********************************************************/
-/*
-	NORMALIZE an EXTENDED FORMAT NUMBER
-*/
-/********************************************************/
-
-#include "FP_shift.h"
-#include "FP_types.h"
-
-void
-nrm_ext(e1)
-EXTEND	*e1;
-{
-		/* we assume that the mantissa != 0	*/
-		/* if it is then just return		*/
-		/* to let it be a problem elsewhere	*/
-		/* THAT IS, The exponent is not set to	*/
-		/* zero. If we don't test here an	*/
-		/* infinite loop is generated when	*/
-		/* mantissa is zero			*/
-
-	if ((e1->m1 | e1->m2) == 0L)
-		return;
-
-		/* if top word is zero mov low word	*/
-		/* to top word, adjust exponent value	*/
-	if (e1->m1 == 0L)	{
-		e1->m1 = e1->m2;
-		e1->m2 = 0L;
-		e1->exp -= 32;
-	}
-	if ((e1->m1 & NORMBIT) == 0) {
-		unsigned long l = ((unsigned long)NORMBIT >> 1);
-		int cnt = -1;
-
-		while (! (l & e1->m1)) {
-			l >>= 1;
-			cnt--;
-		}
-		e1->exp += cnt;
-		b64_sft(&(e1->mantissa), cnt);
-	}
-}
Index: trunk/minix/lib/ack/float/nrm_ext.s
===================================================================
--- trunk/minix/lib/ack/float/nrm_ext.s	(revision 9)
+++ 	(revision )
@@ -1,50 +1,0 @@
-.sect .text; .sect .rom; .sect .data; .sect .bss
-.extern .nrm_ext
-.sect .text
-.nrm_ext:
-push ebp
-mov ebp,esp
-sub	esp,4
-push esi
-push edi
-mov esi,8(ebp)
-mov edx,8(esi)
-or edx,4(esi)
-je I1_1
-cmp 4(esi),0
-jne I1_7
-mov edx,8(esi)
-mov 4(esi),edx
-mov 8(esi),0
-movsx eax,2(esi)
-sub eax,32
-movsx eax,eax
-o16 mov 2(esi),eax
-I1_7:
-test 4(esi),-2147483648
-jne I1_1
-mov -4(ebp),1073741824
-mov edi,-1
-I1_13:
-mov edx,-4(ebp)
-test 4(esi),edx
-jne I1_12
-shr -4(ebp),1
-dec edi
-jmp I1_13
-I1_12:
-movsx eax,2(esi)
-add eax,edi
-movsx eax,eax
-o16 mov 2(esi),eax
-push edi
-lea eax,4(esi)
-push eax
-call .b64_sft
-pop ecx
-pop ecx
-I1_1:
-pop edi
-pop esi
-leave
-ret
Index: trunk/minix/lib/ack/float/sbf4.fc
===================================================================
--- trunk/minix/lib/ack/float/sbf4.fc	(revision 9)
+++ 	(revision )
@@ -1,27 +1,0 @@
-/*
- (c) copyright 1988 by the Vrije Universiteit, Amsterdam, The Netherlands.
-  See the copyright notice in the ACK home directory, in the file "Copyright".
-*/
-
-/* $Header: /cvsup/minix/src/lib/ack/float/sbf4.fc,v 1.1 2005/10/10 15:27:43 beng Exp $ */
-
-/*
-	SUBTRACT TWO FLOATS - SINGLE Precision (SBF 4)
-*/
-
-#include	"FP_types.h"
-
-void
-sbf4(s2,s1)
-SINGLE	s1,s2;
-{
-	EXTEND e1,e2;
-
-	if (s2 == (SINGLE) 0) {
-		return;
-	}
-	extend(&s1,&e1,sizeof(SINGLE));
-	extend(&s2,&e2,sizeof(SINGLE));
-	sub_ext(&e1,&e2);
-	compact(&e1,&s1,sizeof(SINGLE));
-}
Index: trunk/minix/lib/ack/float/sbf4.s
===================================================================
--- trunk/minix/lib/ack/float/sbf4.s	(revision 9)
+++ 	(revision )
@@ -1,40 +1,0 @@
-.sect .text; .sect .rom; .sect .data; .sect .bss
-.extern .sbf4
-.sect .text
-.sbf4:
-push ebp
-mov ebp,esp
-sub	esp,24
-cmp 8(ebp),0
-je I1_1
-push 4
-lea eax,-12(ebp)
-push eax
-lea eax,12(ebp)
-push eax
-call .extend
-add esp,12
-push 4
-lea eax,-24(ebp)
-push eax
-lea eax,8(ebp)
-push eax
-call .extend
-add esp,12
-lea eax,-24(ebp)
-push eax
-lea eax,-12(ebp)
-push eax
-call .sub_ext
-pop ecx
-pop ecx
-push 4
-lea eax,12(ebp)
-push eax
-lea eax,-12(ebp)
-push eax
-call .compact
-add esp,12
-I1_1:
-leave
-ret
Index: trunk/minix/lib/ack/float/sbf8.fc
===================================================================
--- trunk/minix/lib/ack/float/sbf8.fc	(revision 9)
+++ 	(revision )
@@ -1,27 +1,0 @@
-/*
-  (c) copyright 1988 by the Vrije Universiteit, Amsterdam, The Netherlands.
-  See the copyright notice in the ACK home directory, in the file "Copyright".
-*/
-
-/* $Header: /cvsup/minix/src/lib/ack/float/sbf8.fc,v 1.1 2005/10/10 15:27:43 beng Exp $ */
-
-/*
-	SUBTRACT TWO FLOATS - DOUBLE Precision (SBF 8)
-*/
-
-#include	"FP_types.h"
-
-void
-sbf8(s2,s1)
-DOUBLE	s1,s2;
-{
-	EXTEND e1, e2;
-
-	if (s2.d[0] == 0 && s2.d[1] == 0) {
-		return;
-	}
-	extend(&s1.d[0],&e1,sizeof(DOUBLE));
-	extend(&s2.d[0],&e2,sizeof(DOUBLE));
-	sub_ext(&e1,&e2);
-	compact(&e1,&s1.d[0],sizeof(DOUBLE));
-}
Index: trunk/minix/lib/ack/float/sbf8.s
===================================================================
--- trunk/minix/lib/ack/float/sbf8.s	(revision 9)
+++ 	(revision )
@@ -1,43 +1,0 @@
-.sect .text; .sect .rom; .sect .data; .sect .bss
-.extern .sbf8
-.sect .text
-.sbf8:
-push ebp
-mov ebp,esp
-sub	esp,24
-cmp 8(ebp),0
-jne I1_4
-cmp 12(ebp),0
-je I1_1
-I1_4:
-push 8
-lea eax,-12(ebp)
-push eax
-lea eax,16(ebp)
-push eax
-call .extend
-add esp,12
-push 8
-lea eax,-24(ebp)
-push eax
-lea eax,8(ebp)
-push eax
-call .extend
-add esp,12
-lea eax,-24(ebp)
-push eax
-lea eax,-12(ebp)
-push eax
-call .sub_ext
-pop ecx
-pop ecx
-push 8
-lea eax,16(ebp)
-push eax
-lea eax,-12(ebp)
-push eax
-call .compact
-add esp,12
-I1_1:
-leave
-ret
Index: trunk/minix/lib/ack/float/sft_ext.fc
===================================================================
--- trunk/minix/lib/ack/float/sft_ext.fc	(revision 9)
+++ 	(revision )
@@ -1,39 +1,0 @@
-/*
-  (c) copyright 1988 by the Vrije Universiteit, Amsterdam, The Netherlands.
-  See the copyright notice in the ACK home directory, in the file "Copyright".
-*/
-
-/* $Header: /cvsup/minix/src/lib/ack/float/sft_ext.fc,v 1.1 2005/10/10 15:27:43 beng Exp $ */
-
-/*
-	SHIFT TWO EXTENDED NUMBERS INTO PROPER
-	ALIGNMENT FOR ADDITION (exponents are equal)
-	Numbers should not be zero on entry.
-*/
-
-#include "FP_types.h"
-
-void
-sft_ext(e1,e2)
-EXTEND	*e1,*e2;
-{
-	register	EXTEND	*s;
-	register	int	diff;
-
-	diff = e1->exp - e2->exp;
-
-	if (!diff)
-		return;	/* exponents are equal	*/
-
-	if (diff < 0)	{ /* e2 is larger	*/
-			/* shift e1		*/
-		diff = -diff;
-		s = e1;
-	}
-	else		/* e1 is larger		*/
-			/* shift e2		*/
-		s = e2;
-
-	s->exp += diff;
-	b64_sft(&(s->mantissa), diff);
-}
Index: trunk/minix/lib/ack/float/sft_ext.s
===================================================================
--- trunk/minix/lib/ack/float/sft_ext.s	(revision 9)
+++ 	(revision )
@@ -1,42 +1,0 @@
-.sect .text; .sect .rom; .sect .data; .sect .bss
-.extern .sft_ext
-.sect .text
-.sft_ext:
-push ebp
-mov ebp,esp
-push esi
-push edi
-mov edx,8(ebp)
-! kill edx
-movsx eax,2(edx)
-mov edx,12(ebp)
-! kill edx
-movsx ebx,2(edx)
-sub ebx,eax
-neg ebx
-mov edi,ebx
-test edi,edi
-je I1_1
-test edi,edi
-jns I1_7
-neg edi
-mov esi,8(ebp)
-jmp I1_8
-I1_7:
-mov esi,12(ebp)
-I1_8:
-movsx eax,2(esi)
-add eax,edi
-movsx eax,eax
-o16 mov 2(esi),eax
-push edi
-lea eax,4(esi)
-push eax
-call .b64_sft
-pop ecx
-pop ecx
-I1_1:
-pop edi
-pop esi
-leave
-ret
Index: trunk/minix/lib/ack/float/shifter.fc
===================================================================
--- trunk/minix/lib/ack/float/shifter.fc	(revision 9)
+++ 	(revision )
@@ -1,75 +1,0 @@
-/*
-  (c) copyright 1988 by the Vrije Universiteit, Amsterdam, The Netherlands.
-  See the copyright notice in the ACK home directory, in the file "Copyright".
-*/
-
-/* $Header: /cvsup/minix/src/lib/ack/float/shifter.fc,v 1.1 2005/10/10 15:27:43 beng Exp $ */
-
-# include "FP_types.h"
-
-void
-b64_sft(e1,n)
-B64	*e1;
-int	n;
-{
-	if (n > 0) {
-		if (n > 63) {
-			e1->l_32 = 0;
-			e1->h_32 = 0;
-			return;
-		}
-		if (n >= 32) {
-			e1->l_32 = e1->h_32;
-			e1->h_32 = 0;
-			n -= 32;
-		}
-		if (n > 0) {
-			e1->l_32 >>= n;
-			if (e1->h_32 != 0) {
-				e1->l_32 |= (e1->h_32 << (32 - n));
-				e1->h_32 >>= n;
-			}
-		}
-		return;
-	}
-	n = -n;
-	if (n > 0) {
-		if (n > 63) {
-			e1->l_32 = 0;
-			e1->h_32 = 0;
-			return;
-		}
-		if (n >= 32) {
-			e1->h_32 = e1->l_32;
-			e1->l_32 = 0;
-			n -= 32;
-		}
-		if (n > 0) {
-			e1->h_32 <<= n;
-			if (e1->l_32 != 0) {
-				e1->h_32 |= (e1->l_32 >> (32 - n));
-				e1->l_32 <<= n;
-			}
-		}
-	}
-}
-
-void
-b64_lsft(e1)
-B64	*e1;
-{
-	/*	shift left 1 bit */
-	e1->h_32 <<= 1;
-	if (e1->l_32 & 0x80000000L) e1->h_32 |= 1;
-	e1->l_32 <<= 1;
-}
-
-void
-b64_rsft(e1)
-B64	*e1;
-{
-	/*	shift right 1 bit */
-	e1->l_32 >>= 1;
-	if (e1->h_32 & 1) e1->l_32 |= 0x80000000L;
-	e1->h_32 >>= 1;
-}
Index: trunk/minix/lib/ack/float/shifter.s
===================================================================
--- trunk/minix/lib/ack/float/shifter.s	(revision 9)
+++ 	(revision )
@@ -1,123 +1,0 @@
-.sect .text; .sect .rom; .sect .data; .sect .bss
-.extern .b64_sft
-.sect .text
-.b64_sft:
-push ebp
-mov ebp,esp
-push esi
-push edi
-mov esi,8(ebp)
-mov edi,12(ebp)
-! kill cc
-test edi,edi
-jle I1_4
-cmp edi,63
-jle I1_7
-mov 4(esi),0
-mov (esi),0
-jmp I1_1
-I1_7:
-cmp edi,32
-jl I1_10
-mov edx,(esi)
-mov 4(esi),edx
-mov (esi),0
-sub edi,32
-I1_10:
-! kill cc
-test edi,edi
-jle I1_1
-mov ecx,edi
-mov edx,4(esi)
-shr edx,cl
-mov 4(esi),edx
-cmp (esi),0
-je I1_1
-mov edx,32
-sub edx,edi
-mov ecx,edx
-mov edx,(esi)
-sal edx,cl
-or 4(esi),edx
-mov ecx,edi
-mov edx,(esi)
-shr edx,cl
-mov (esi),edx
-jmp I1_1
-I1_4:
-neg edi
-! kill cc
-test edi,edi
-jle I1_1
-cmp edi,63
-jle I1_22
-mov 4(esi),0
-mov (esi),0
-jmp I1_1
-I1_22:
-cmp edi,32
-jl I1_25
-mov edx,4(esi)
-mov (esi),edx
-mov 4(esi),0
-sub edi,32
-I1_25:
-! kill cc
-test edi,edi
-jle I1_1
-mov ecx,edi
-mov edx,(esi)
-sal edx,cl
-mov (esi),edx
-cmp 4(esi),0
-je I1_1
-mov edx,32
-sub edx,edi
-mov ecx,edx
-mov edx,4(esi)
-shr edx,cl
-or (esi),edx
-mov ecx,edi
-mov edx,4(esi)
-sal edx,cl
-mov 4(esi),edx
-I1_1:
-pop edi
-pop esi
-leave
-ret
-.extern .b64_lsft
-.b64_lsft:
-push ebp
-mov ebp,esp
-push esi
-mov esi,8(ebp)
-sal (esi),1
-test 4(esi),-2147483648
-je I2_4
-or (esi),1
-I2_4:
-mov edx,4(esi)
-sal edx,1
-mov 4(esi),edx
-pop esi
-leave
-ret
-.extern .b64_rsft
-.b64_rsft:
-push ebp
-mov ebp,esp
-push esi
-mov esi,8(ebp)
-mov edx,4(esi)
-shr edx,1
-mov 4(esi),edx
-mov edx,(esi)
-testb dl,1
-je I3_4
-or 4(esi),-2147483648
-I3_4:
-shr (esi),1
-pop esi
-leave
-ret
Index: trunk/minix/lib/ack/float/sub_ext.fc
===================================================================
--- trunk/minix/lib/ack/float/sub_ext.fc	(revision 9)
+++ 	(revision )
@@ -1,53 +1,0 @@
-/*
-  (c) copyright 1988 by the Vrije Universiteit, Amsterdam, The Netherlands.
-  See the copyright notice in the ACK home directory, in the file "Copyright".
-*/
-
-/* $Header: /cvsup/minix/src/lib/ack/float/sub_ext.fc,v 1.1 2005/10/10 15:27:43 beng Exp $ */
-
-/*
-	SUBTRACT 2 EXTENDED FORMAT NUMBERS
-*/
-
-#include "FP_types.h"
-
-void
-sub_ext(e1,e2)
-EXTEND	*e1,*e2;
-{
-	if ((e2->m1 | e2->m2) == 0L) {
-		return;
-	}
-	if ((e1->m1 | e1->m2) == 0L) {
-		*e1 = *e2;
-		e1->sign = e2->sign ? 0 : 1;
-		return;
-	}
-	sft_ext(e1, e2);
-	if (e1->sign != e2->sign) {
-		/* e1 - e2 = e1 + (-e2) */
-		if (b64_add(&e1->mantissa,&e2->mantissa)) { /* addition carry */
-                	b64_rsft(&e1->mantissa);      /* shift mantissa one bit RIGHT */
-                	e1->m1 |= 0x80000000L;  /* set max bit  */
-                	e1->exp++;              /* increase the exponent */
-        	}
-	}
-        else if (e2->m1 > e1->m1 ||
-                 (e2->m1 == e1->m1 && e2->m2 > e1->m2)) {
-		/*	abs(e2) > abs(e1) */
-		if (e1->m2 > e2->m2) {
-			e2->m1 -= 1;	/* carry in */
-		}
-		e2->m1 -= e1->m1;
-		e2->m2 -= e1->m2;
-		*e1 = *e2;
-		e1->sign = e2->sign ? 0 : 1;
-	}
-	else {
-		if (e2->m2 > e1->m2)
-			e1->m1 -= 1;	/* carry in */
-		e1->m1 -= e2->m1;
-		e1->m2 -= e2->m2;
-	}
-	nrm_ext(e1);
-}
Index: trunk/minix/lib/ack/float/sub_ext.s
===================================================================
--- trunk/minix/lib/ack/float/sub_ext.s	(revision 9)
+++ 	(revision )
@@ -1,119 +1,0 @@
-.sect .text; .sect .rom; .sect .data; .sect .bss
-.extern .sub_ext
-.sect .text
-.sub_ext:
-push ebp
-mov ebp,esp
-push esi
-push edi
-mov esi,8(ebp)
-mov edi,12(ebp)
-mov edx,8(edi)
-or edx,4(edi)
-je I1_1
-mov edx,8(esi)
-or edx,4(esi)
-jne I1_7
-push edi
-push esi
-mov ecx,3
-call .blm
-movzx edx,(edi)
-test edx,edx
-je I1_10
-xor eax,eax
-jmp I1_11
-I1_10:
-mov eax,1
-I1_11:
-o16 mov (esi),eax
-jmp I1_1
-I1_7:
-push edi
-push esi
-call .sft_ext
-pop ecx
-pop ecx
-movsx eax,(esi)
-movsx ebx,(edi)
-cmp eax,ebx
-je I1_13
-lea eax,4(edi)
-push eax
-lea eax,4(esi)
-push eax
-call .b64_add
-pop ecx
-pop ecx
-test eax,eax
-je I1_14
-lea eax,4(esi)
-push eax
-call .b64_rsft
-pop ecx
-or 4(esi),-2147483648
-movsx eax,2(esi)
-inc eax
-movsx eax,eax
-o16 mov 2(esi),eax
-jmp I1_14
-I1_13:
-mov edx,4(esi)
-cmp 4(edi),edx
-ja I1_18
-cmp 4(edi),edx
-jne I1_19
-mov edx,8(esi)
-cmp 8(edi),edx
-jbe I1_19
-I1_18:
-mov edx,8(edi)
-cmp 8(esi),edx
-jbe I1_24
-mov edx,4(edi)
-sub edx,1
-mov 4(edi),edx
-I1_24:
-mov edx,4(edi)
-sub edx,4(esi)
-mov 4(edi),edx
-mov edx,8(edi)
-sub edx,8(esi)
-mov 8(edi),edx
-push edi
-push esi
-mov ecx,3
-call .blm
-movzx edx,(edi)
-test edx,edx
-je I1_27
-xor eax,eax
-jmp I1_28
-I1_27:
-mov eax,1
-I1_28:
-o16 mov (esi),eax
-jmp I1_14
-I1_19:
-mov edx,8(esi)
-cmp 8(edi),edx
-jbe I1_30
-mov edx,4(esi)
-sub edx,1
-mov 4(esi),edx
-I1_30:
-mov edx,4(esi)
-sub edx,4(edi)
-mov 4(esi),edx
-mov edx,8(esi)
-sub edx,8(edi)
-mov 8(esi),edx
-I1_14:
-push esi
-call .nrm_ext
-pop ecx
-I1_1:
-pop edi
-pop esi
-leave
-ret
Index: trunk/minix/lib/ack/float/zrf4.fc
===================================================================
--- trunk/minix/lib/ack/float/zrf4.fc	(revision 9)
+++ 	(revision )
@@ -1,19 +1,0 @@
-/*
-  (c) copyright 1988 by the Vrije Universiteit, Amsterdam, The Netherlands.
-  See the copyright notice in the ACK home directory, in the file "Copyright".
-*/
-
-/* $Header: /cvsup/minix/src/lib/ack/float/zrf4.fc,v 1.1 2005/10/10 15:27:43 beng Exp $ */
-
-/*
-	return a zero float (ZRF 4)
-*/
-
-#include "FP_types.h"
-
-void
-zrf4(l)
-SINGLE	*l;
-{
-	*l = 0L;
-}
Index: trunk/minix/lib/ack/float/zrf4.s
===================================================================
--- trunk/minix/lib/ack/float/zrf4.s	(revision 9)
+++ 	(revision )
@@ -1,11 +1,0 @@
-.sect .text; .sect .rom; .sect .data; .sect .bss
-.extern .zrf4
-.sect .text
-.zrf4:
-push ebp
-mov ebp,esp
-mov eax,8(ebp)
-mov (eax),0
-! kill eax
-leave
-ret
Index: trunk/minix/lib/ack/float/zrf8.fc
===================================================================
--- trunk/minix/lib/ack/float/zrf8.fc	(revision 9)
+++ 	(revision )
@@ -1,21 +1,0 @@
-/*
-  (c) copyright 1988 by the Vrije Universiteit, Amsterdam, The Netherlands.
-  See the copyright notice in the ACK home directory, in the file "Copyright".
-*/
-
-/* $Header: /cvsup/minix/src/lib/ack/float/zrf8.fc,v 1.1 2005/10/10 15:27:43 beng Exp $ */
-
-/*
-	return a zero double (ZRF 8)
-*/
-
-#include "FP_types.h"
-
-void
-zrf8(z)
-DOUBLE	*z;
-{
-
-	z->d[0] = 0L;
-	z->d[1] = 0L;
-}
Index: trunk/minix/lib/ack/float/zrf8.s
===================================================================
--- trunk/minix/lib/ack/float/zrf8.s	(revision 9)
+++ 	(revision )
@@ -1,13 +1,0 @@
-.sect .text; .sect .rom; .sect .data; .sect .bss
-.extern .zrf8
-.sect .text
-.zrf8:
-push ebp
-mov ebp,esp
-mov eax,8(ebp)
-mov (eax),0
-! kill eax
-mov edx,8(ebp)
-mov 4(edx),0
-leave
-ret
Index: trunk/minix/lib/ack/float/zrf_ext.fc
===================================================================
--- trunk/minix/lib/ack/float/zrf_ext.fc	(revision 9)
+++ 	(revision )
@@ -1,22 +1,0 @@
-/*
-  (c) copyright 1988 by the Vrije Universiteit, Amsterdam, The Netherlands.
-  See the copyright notice in the ACK home directory, in the file "Copyright".
-*/
-
-/* $Header: /cvsup/minix/src/lib/ack/float/zrf_ext.fc,v 1.1 2005/10/10 15:27:43 beng Exp $ */
-
-/*
-	ZERO and return EXTEND FORMAT FLOAT
-*/
-
-#include "FP_types.h"
-
-void
-zrf_ext(e)
-EXTEND	*e;
-{
-	e->m1 = 0;
-	e->m2 = 0;
-	e->exp = 0;
-	e->sign = 0;
-}
Index: trunk/minix/lib/ack/float/zrf_ext.s
===================================================================
--- trunk/minix/lib/ack/float/zrf_ext.s	(revision 9)
+++ 	(revision )
@@ -1,15 +1,0 @@
-.sect .text; .sect .rom; .sect .data; .sect .bss
-.extern .zrf_ext
-.sect .text
-.zrf_ext:
-push ebp
-mov ebp,esp
-push esi
-mov esi,8(ebp)
-mov 4(esi),0
-mov 8(esi),0
-o16 mov 2(esi),0
-o16 mov (esi),0
-pop esi
-leave
-ret
Index: trunk/minix/lib/ack/fphook/FP.compile
===================================================================
--- trunk/minix/lib/ack/fphook/FP.compile	(revision 9)
+++ 	(revision )
@@ -1,19 +1,0 @@
-#!/bin/sh
-#							Author: Kees J. Bot
-# Compile one soft FP source file.
-# (These files shouldn't be optimized normally, but the 16-bit C compiler
-# only optimizes scratch register allocation a bit with -O.  To the 32-bit
-# compiler -O is a no-op.)
-
-case $#:$1 in
-1:*.fc)	;;
-*)	echo "$0: $1: not a FC file" >&2; exit 1
-esac
-
-base="`basename "$1" .fc`"
-trap 'rm -f tmp.c tmp.s"; exit 1' 2
-
-cp "$1" tmp.c &&
-cc -O -I. -D_MINIX -D_POSIX_SOURCE -S tmp.c &&
-sed -f FP.script tmp.s > "$base.s" &&
-rm tmp.c tmp.s
Index: trunk/minix/lib/ack/fphook/FP.script
===================================================================
--- trunk/minix/lib/ack/fphook/FP.script	(revision 9)
+++ 	(revision )
@@ -1,39 +1,0 @@
-s/_adf4/.adf4/
-s/_adf8/.adf8/
-s/_cff4/.cff4/
-s/_cff8/.cff8/
-s/_cfi/.cfi/
-s/_cfu/.cfu/
-s/_cif4/.cif4/
-s/_cif8/.cif8/
-s/_cmf4/.cmf4/
-s/_cmf8/.cmf8/
-s/_cuf4/.cuf4/
-s/_cuf8/.cuf8/
-s/_dvf4/.dvf4/
-s/_dvf8/.dvf8/
-s/_fef4/.fef4/
-s/_fef8/.fef8/
-s/_fif4/.fif4/
-s/_fif8/.fif8/
-s/_mlf4/.mlf4/
-s/_mlf8/.mlf8/
-s/_ngf4/.ngf4/
-s/_ngf8/.ngf8/
-s/_sbf4/.sbf4/
-s/_sbf8/.sbf8/
-s/_zrf4/.zrf4/
-s/_zrf8/.zrf8/
-s/_add_ext/.add_ext/
-s/_div_ext/.div_ext/
-s/_mul_ext/.mul_ext/
-s/_nrm_ext/.nrm_ext/
-s/_sft_ext/.sft_ext/
-s/_sub_ext/.sub_ext/
-s/_zrf_ext/.zrf_ext/
-s/_compact/.compact/
-s/_extend/.extend/
-s/_b64_add/.b64_add/
-s/_b64_sft/.b64_sft/
-s/_b64_rsft/.b64_rsft/
-s/_b64_lsft/.b64_lsft/
Index: trunk/minix/lib/ack/fphook/FP_bias.h
===================================================================
--- trunk/minix/lib/ack/fphook/FP_bias.h	(revision 9)
+++ 	(revision )
@@ -1,28 +1,0 @@
-/*
-  (c) copyright 1988 by the Vrije Universiteit, Amsterdam, The Netherlands.
-  See the copyright notice in the ACK home directory, in the file "Copyright".
-*/
-
-/* $Header: /cvsup/minix/src/lib/ack/fphook/FP_bias.h,v 1.1 2005/10/10 15:27:43 beng Exp $ */
-
-/*
-	include file for floating point package
-*/
-
-		/*	FLOAT FORMAT EXPONENT BIAS	*/
-
-#define	SGL_BIAS	 127	/* excess  128 notation used	*/
-#define	DBL_BIAS	1023	/* excess 1024 notation used	*/
-#define	EXT_BIAS	   0	/* 2s-complement notation used	*/
-				/* this is possible because the	*/
-				/* sign is in a seperate word	*/
-		
-		/*	VARIOUS MAX AND MIN VALUES	*/
-		/*	1) FOR THE DIFFERENT FORMATS	*/
-
-#define	SGL_MAX		   254	/*	standard definition	*/
-#define	SGL_MIN		     1	/*	standard definition	*/
-#define	DBL_MAX		  2046	/*	standard definition	*/
-#define	DBL_MIN		     1	/*	standard definition	*/
-#define EXT_MAX		 16383	/*	standard minimum	*/
-#define EXT_MIN		-16382	/*	standard minimum	*/
Index: trunk/minix/lib/ack/fphook/FP_shift.h
===================================================================
--- trunk/minix/lib/ack/fphook/FP_shift.h	(revision 9)
+++ 	(revision )
@@ -1,49 +1,0 @@
-/*
-  (c) copyright 1988 by the Vrije Universiteit, Amsterdam, The Netherlands.
-  See the copyright notice in the ACK home directory, in the file "Copyright".
-*/
-
-/* $Header: /cvsup/minix/src/lib/ack/fphook/FP_shift.h,v 1.1 2005/10/10 15:27:43 beng Exp $ */
-
-/*
-	include file for floating point package
-*/
-
-# define	CARRYBIT	0x80000000L
-# define	NORMBIT		0x80000000L
-# define	EXP_STORE	16
-
-
-				/* parameters for Single Precision */
-#define SGL_EXPSHIFT	7
-#define SGL_M1LEFT	8
-#define SGL_ZERO	0xffffff80L
-#define SGL_EXACT	0xff
-#define SGL_RUNPACK	SGL_M1LEFT
-
-#define SGL_ROUNDUP	0x80
-#define	SGL_CARRYOUT	0x01000000L
-#define	SGL_MASK	0x007fffffL
-
-				/* parameters for Double Precision */
-				/* used in extend.c */
-
-#define DBL_EXPSHIFT	4
-
-#define DBL_M1LEFT	11
-
-#define	DBL_RPACK	(32-DBL_M1LEFT)
-#define	DBL_LPACK	DBL_M1LEFT
-
-				/* used in compact.c */
-
-#define DBL_ZERO	0xfffffd00L
-
-#define DBL_EXACT	0x7ff
-
-#define DBL_RUNPACK	DBL_M1LEFT
-#define DBL_LUNPACK	(32-DBL_RUNPACK)
-
-#define DBL_ROUNDUP	0x400
-#define	DBL_CARRYOUT	0x00200000L
-#define	DBL_MASK	0x000fffffL
Index: trunk/minix/lib/ack/fphook/FP_trap.h
===================================================================
--- trunk/minix/lib/ack/fphook/FP_trap.h	(revision 9)
+++ 	(revision )
@@ -1,22 +1,0 @@
-/*
-  (c) copyright 1988 by the Vrije Universiteit, Amsterdam, The Netherlands.
-  See the copyright notice in the ACK home directory, in the file "Copyright".
-*/
-
-/* $Header: /cvsup/minix/src/lib/ack/fphook/FP_trap.h,v 1.1 2005/10/10 15:27:43 beng Exp $ */
-
-/*
-	include file for floating point package
-*/
-
-			/*	EM TRAPS	*/
-
-#define	EIOVFL	3	/* Integer  Overflow		*/
-#define	EFOVFL	4	/* Floating Overflow		*/
-#define	EFUNFL	5	/* Floating Underflow		*/
-#define	EIDIVZ	6	/* Integer  Divide by 0		*/
-#define	EFDIVZ	7	/* Floating Divide by 0.0	*/
-#define	EIUND	8	/* Integer  Undefined Number	*/
-#define	EFUND	9	/* Floating Undefined Number	*/
-#define	ECONV	10	/* Conversion Error		*/
-# define trap(x) _fptrp(x)
Index: trunk/minix/lib/ack/fphook/FP_types.h
===================================================================
--- trunk/minix/lib/ack/fphook/FP_types.h	(revision 9)
+++ 	(revision )
@@ -1,113 +1,0 @@
-/*
-  (c) copyright 1988 by the Vrije Universiteit, Amsterdam, The Netherlands.
-  See the copyright notice in the ACK home directory, in the file "Copyright".
-*/
-
-/* $Header: /cvsup/minix/src/lib/ack/fphook/FP_types.h,v 1.1 2005/10/10 15:27:43 beng Exp $ */
-
-/********************************************************/
-/*
-	Type definitions for C Floating Point Package
-	include file for floating point package
-*/
-/********************************************************/
-/*
-	THESE STRUCTURES ARE USED TO ADDRESS THE INDIVIDUAL
-	PARTS OF THE FLOATING POINT NUMBER REPRESENTATIONS.
-
-	THREE STRUCTURES ARE DEFINED:
-		SINGLE:	single precision floating format
-		DOUBLE:	double precision floating format
-		EXTEND:	double precision extended format
-*/
-/********************************************************/
-
-#ifndef __FPTYPES
-#define __FPTYPES
-
-typedef	struct	{
-	unsigned long	h_32;	/* higher 32 bits of 64 */
-	unsigned long	l_32;	/* lower  32 bits of 64 */
-}	B64;
-
-typedef	unsigned long	SINGLE;
-
-typedef	struct	{
-	unsigned long	d[2];
-}	DOUBLE;
-
-typedef	struct	{	/* expanded float format	*/
-	short	sign;
-	short	exp;
-	B64	mantissa;
-#define m1 mantissa.h_32
-#define m2 mantissa.l_32
-} EXTEND;
-
-struct	fef4_returns {
-	int	e;
-	SINGLE	f;
-};
-
-struct	fef8_returns {
-	int	e;
-	DOUBLE	f;
-};
-
-struct fif4_returns {
-	SINGLE ipart;
-	SINGLE fpart;
-};
-
-struct fif8_returns {
-	DOUBLE ipart;
-	DOUBLE fpart;
-};
-
-#if __STDC__
-#define _PROTOTYPE(function, params)	function params
-#else
-#define _PROTOTYPE(function, params)	function()
-#endif
-_PROTOTYPE( void add_ext, (EXTEND *e1, EXTEND *e2));
-_PROTOTYPE( void mul_ext, (EXTEND *e1, EXTEND *e2));
-_PROTOTYPE( void div_ext, (EXTEND *e1, EXTEND *e2));
-_PROTOTYPE( void sub_ext, (EXTEND *e1, EXTEND *e2));
-_PROTOTYPE( void sft_ext, (EXTEND *e1, EXTEND *e2));
-_PROTOTYPE( void nrm_ext, (EXTEND *e1));
-_PROTOTYPE( void zrf_ext, (EXTEND *e1));
-_PROTOTYPE( void extend, (unsigned long *from, EXTEND *to, int size));
-_PROTOTYPE( void compact, (EXTEND *from, unsigned long *to, int size));
-_PROTOTYPE( void _fptrp, (int));
-_PROTOTYPE( void adf4, (SINGLE s2, SINGLE s1));
-_PROTOTYPE( void adf8, (DOUBLE s2, DOUBLE s1));
-_PROTOTYPE( void sbf4, (SINGLE s2, SINGLE s1));
-_PROTOTYPE( void sbf8, (DOUBLE s2, DOUBLE s1));
-_PROTOTYPE( void dvf4, (SINGLE s2, SINGLE s1));
-_PROTOTYPE( void dvf8, (DOUBLE s2, DOUBLE s1));
-_PROTOTYPE( void mlf4, (SINGLE s2, SINGLE s1));
-_PROTOTYPE( void mlf8, (DOUBLE s2, DOUBLE s1));
-_PROTOTYPE( void ngf4, (SINGLE f));
-_PROTOTYPE( void ngf8, (DOUBLE f));
-_PROTOTYPE( void zrf4, (SINGLE *l));
-_PROTOTYPE( void zrf8, (DOUBLE *z));
-_PROTOTYPE( void cff4, (DOUBLE src));
-_PROTOTYPE( void cff8, (SINGLE src));
-_PROTOTYPE( void cif4, (int ss, long src));
-_PROTOTYPE( void cif8, (int ss, long src));
-_PROTOTYPE( void cuf4, (int ss, long src));
-_PROTOTYPE( void cuf8, (int ss, long src));
-_PROTOTYPE( long cfu, (int ds, int ss, DOUBLE src));
-_PROTOTYPE( long cfi, (int ds, int ss, DOUBLE src));
-_PROTOTYPE( int cmf4, (SINGLE s2, SINGLE s1));
-_PROTOTYPE( int cmf8, (DOUBLE d1, DOUBLE d2));
-_PROTOTYPE( void fef4, (struct fef4_returns *r, SINGLE s1));
-_PROTOTYPE( void fef8, (struct fef8_returns *r, DOUBLE s1));
-_PROTOTYPE( void fif4, (struct fif4_returns *p, SINGLE x, SINGLE y));
-_PROTOTYPE( void fif8, (struct fif8_returns *p, DOUBLE x, DOUBLE y));
-
-_PROTOTYPE( void b64_sft, (B64 *, int));
-_PROTOTYPE( void b64_lsft, (B64 *));
-_PROTOTYPE( void b64_rsft, (B64 *));
-_PROTOTYPE( int b64_add, (B64 *, B64 *));
-#endif
Index: trunk/minix/lib/ack/fphook/Makedepend-ack
===================================================================
--- trunk/minix/lib/ack/fphook/Makedepend-ack	(revision 9)
+++ 	(revision )
@@ -1,6 +1,0 @@
-depend-ack:
-	rm .depend-ack
-	touch .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -I.. -E' fphook.c | sed -e 's:^\(.\):../../obj-ack//./ack/fphook/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -I.. -E' fltpr.c | sed -e 's:^\(.\):../../obj-ack//./ack/fphook/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -I.. -E' strtod.c | sed -e 's:^\(.\):../../obj-ack//./ack/fphook/\1:' >> .depend-ack
Index: trunk/minix/lib/ack/fphook/Makedepend-gnu
===================================================================
--- trunk/minix/lib/ack/fphook/Makedepend-gnu	(revision 9)
+++ 	(revision )
@@ -1,3 +1,0 @@
-depend-gnu:
-	rm .depend-gnu
-	touch .depend-gnu
Index: trunk/minix/lib/ack/fphook/Makefile
===================================================================
--- trunk/minix/lib/ack/fphook/Makefile	(revision 9)
+++ 	(revision )
@@ -1,54 +1,0 @@
-#Generated from ./ack/fphook/Makefile.in
-all: all-ack
-
-all-ack:
-all-gnu:
-
-makefiles: Makefile
-Makedepend-ack Makedepend-gnu: 
-	sh ../../generate.sh ./ack/fphook ../../obj-ack/ ../../obj-gnu
-
-Makefile: Makefile.in Makedepend-ack Makedepend-gnu
-	sh ../../generate.sh ./ack/fphook ../../obj-ack/ ../../obj-gnu
-	@echo
-	@echo *Attention*
-	@echo Makefile is regenerated... rerun command to see changes
-	@echo *Attention*
-	@echo
-
-depend: depend-ack
-all-ack: ../../obj-ack//libd.a
-
-../../obj-ack//libd.a: ../../obj-ack//libd.a(fphook.o)
-
-../../obj-ack//libd.a:
-	ar cr ../../obj-ack//libd.a ../../obj-ack//./ack/fphook/*.o
-	rm ../../obj-ack//./ack/fphook/*.o
-
-../../obj-ack//libd.a(fphook.o): fphook.c
-	cc -O -D_MINIX -D_POSIX_SOURCE -I.. -c -o ../../obj-ack//./ack/fphook/fphook.o fphook.c
-
-all-ack: ../../obj-ack//libc.a
-
-../../obj-ack//libc.a: ../../obj-ack//libc.a(fltpr.o)
-../../obj-ack//libc.a: ../../obj-ack//libc.a(strtod.o)
-
-../../obj-ack//libc.a:
-	ar cr ../../obj-ack//libc.a ../../obj-ack//./ack/fphook/*.o
-	rm ../../obj-ack//./ack/fphook/*.o
-
-../../obj-ack//libc.a(fltpr.o): fltpr.c
-	cc -O -D_MINIX -D_POSIX_SOURCE -I.. -c -o ../../obj-ack//./ack/fphook/fltpr.o fltpr.c
-../../obj-ack//libc.a(strtod.o): strtod.c
-	cc -O -D_MINIX -D_POSIX_SOURCE -I.. -c -o ../../obj-ack//./ack/fphook/strtod.o strtod.c
-
-
-
-clean::
-	rm -f ../../obj-ack//./ack/fphook/*
-
-include Makedepend-ack
-include .depend-ack
-
-include Makedepend-gnu
-include .depend-gnu
Index: trunk/minix/lib/ack/fphook/Makefile.in
===================================================================
--- trunk/minix/lib/ack/fphook/Makefile.in	(revision 9)
+++ 	(revision )
@@ -1,19 +1,0 @@
-# Makefile for lib/ack/fphook.
-
-# The ACK ANSI C compiler has an nice trick to reduce the size of programs
-# that do not use floating point.  If a program uses floating point then the
-# compiler generates an external reference to the label '_fp_hook'.  This makes
-# the loader bring in the floating point printing and conversion routines
-# '_f_print' and 'strtod' from the library libd.a.  Otherwise two dummy
-# routines are found in libc.a.  (The printf and scanf need floating point
-# for the %f formats, whether you use them or not.)
-
-CFLAGS="-O -D_MINIX -D_POSIX_SOURCE -I.."
-
-LIBRARIES="libd libc"
-
-libd_FILES=fphook.c
-
-libc_FILES="fltpr.c strtod.c"
-
-TYPE=ack
Index: trunk/minix/lib/ack/fphook/add_ext.fc
===================================================================
--- trunk/minix/lib/ack/fphook/add_ext.fc	(revision 9)
+++ 	(revision )
@@ -1,56 +1,0 @@
-/*
-  (c) copyright 1988 by the Vrije Universiteit, Amsterdam, The Netherlands.
-  See the copyright notice in the ACK home directory, in the file "Copyright".
-*/
-
-/* $Header: /cvsup/minix/src/lib/ack/fphook/add_ext.fc,v 1.1 2005/10/10 15:27:43 beng Exp $ */
-
-/*
-	ADD TWO EXTENDED FORMAT NUMBERS
-*/
-
-#include "FP_types.h"
-
-void
-add_ext(e1,e2)
-register EXTEND	*e1,*e2;
-{
-	if ((e2->m1 | e2->m2) == 0L) {
-		return;
-	}
-	if ((e1->m1 | e1->m2) == 0L) {
-		*e1 = *e2;
-		return;
-	}
-	sft_ext(e1, e2);	/* adjust mantissas to equal powers */
-	if (e1->sign != e2->sign) {
-		/* e1 + e2 = e1 - (-e2) */
-		if (e2->m1 > e1->m1 ||
-                    (e2->m1 == e1->m1 && e2->m2 > e1->m2)) {
-                	/*      abs(e2) > abs(e1) */
-			EXTEND x;
-
-			x = *e1;
-			*e1 = *e2;
-                	if (x.m2 > e1->m2) {
-                        	e1->m1 -= 1;    /* carry in */
-                	}
-                	e1->m1 -= x.m1;
-                	e1->m2 -= x.m2;
-        	}
-        	else {
-                	if (e2->m2 > e1->m2)
-                        	e1->m1 -= 1;    /* carry in */
-                	e1->m1 -= e2->m1;
-                	e1->m2 -= e2->m2;
-        	}
-	}
-	else {
-		if (b64_add(&e1->mantissa,&e2->mantissa)) {	/* addition carry */
-			b64_rsft(&e1->mantissa);	/* shift mantissa one bit RIGHT */
-			e1->m1 |= 0x80000000L;	/* set max bit	*/
-			e1->exp++;		/* increase the exponent */
-		}
-	}
-	nrm_ext(e1);
-}
Index: trunk/minix/lib/ack/fphook/adder.fc
===================================================================
--- trunk/minix/lib/ack/fphook/adder.fc	(revision 9)
+++ 	(revision )
@@ -1,50 +1,0 @@
-/*
-  (c) copyright 1988 by the Vrije Universiteit, Amsterdam, The Netherlands.
-  See the copyright notice in the ACK home directory, in the file "Copyright".
-*/
-
-/* $Header: /cvsup/minix/src/lib/ack/fphook/adder.fc,v 1.1 2005/10/10 15:27:43 beng Exp $ */
-
-/*
- *	these are the routines the routines to do 32 and  64-bit addition
- */
-
-# ifdef	EXT_DEBUG
-# include <stdio.h>
-# endif
-
-# include "FP_types.h"
-# define	UNKNOWN -1
-# define	TRUE	 1
-# define	FALSE	 0
-# define	MAXBIT	0x80000000L
-
-	/*
-	 *	add 64 bits
-	 */
-int
-b64_add(e1,e2)
-		/*
-		 * pointers to 64 bit 'registers'
-		 */
-register	B64	*e1,*e2;
-{
-		register	int	overflow;
-				int	carry;
-
-			/* add higher pair of 32 bits */
-	overflow = ((unsigned long) 0xFFFFFFFF - e1->h_32 < e2->h_32);
-	e1->h_32 += e2->h_32;
-
-			/* add lower pair of 32 bits */
-	carry = ((unsigned long) 0xFFFFFFFF - e1->l_32 < e2->l_32);
-	e1->l_32 += e2->l_32;
-# ifdef	EXT_DEBUG
-	printf("\t\t\t\t\tb64_add: overflow (%d); internal carry(%d)\n",
-					overflow,carry);
-	fflush(stdout);
-# endif
-	if ((carry) && (++e1->h_32 == 0))
-		return(TRUE);		/* had a 64 bit overflow */
-	return(overflow);		/* return status from higher add */
-}
Index: trunk/minix/lib/ack/fphook/adder.h
===================================================================
--- trunk/minix/lib/ack/fphook/adder.h	(revision 9)
+++ 	(revision )
@@ -1,15 +1,0 @@
-/*
-  (c) copyright 1988 by the Vrije Universiteit, Amsterdam, The Netherlands.
-  See the copyright notice in the ACK home directory, in the file "Copyright".
-*/
-
-/* $Header: /cvsup/minix/src/lib/ack/fphook/adder.h,v 1.1 2005/10/10 15:27:43 beng Exp $ */
-
-/*
- *	include file for 32 & 64 bit addition
- */
-
-typedef	struct	B64 {
-	unsigned long	h_32;	/* higher 32 bits of 64 */
-	unsigned long	l_32;	/* lower  32 bits of 64 */
-}	B64;
Index: trunk/minix/lib/ack/fphook/adf4.fc
===================================================================
--- trunk/minix/lib/ack/fphook/adf4.fc	(revision 9)
+++ 	(revision )
@@ -1,32 +1,0 @@
-/*
-  (c) copyright 1988 by the Vrije Universiteit, Amsterdam, The Netherlands.
-  See the copyright notice in the ACK home directory, in the file "Copyright".
-*/
-
-/* $Header: /cvsup/minix/src/lib/ack/fphook/adf4.fc,v 1.1 2005/10/10 15:27:43 beng Exp $ */
-
-/*
-	ADD TWO FLOATS - SINGLE (ADF 4)
-*/
-
-#include	"FP_types.h"
-
-void
-adf4(s2,s1)
-SINGLE	s1,s2;
-{
-	EXTEND	e1,e2;
-	int	swap = 0;
-
-	if (s1 == (SINGLE) 0) {
-		s1 = s2;
-		return;
-	}
-	if (s2 == (SINGLE) 0) {
-		return;
-	}
-	extend(&s1,&e1,sizeof(SINGLE));
-	extend(&s2,&e2,sizeof(SINGLE));
-	add_ext(&e1,&e2);
-	compact(&e1,&s1,sizeof(SINGLE));
-}
Index: trunk/minix/lib/ack/fphook/adf8.fc
===================================================================
--- trunk/minix/lib/ack/fphook/adf8.fc	(revision 9)
+++ 	(revision )
@@ -1,32 +1,0 @@
-/*
-  (c) copyright 1988 by the Vrije Universiteit, Amsterdam, The Netherlands.
-  See the copyright notice in the ACK home directory, in the file "Copyright".
-*/
-
-/* $Header: /cvsup/minix/src/lib/ack/fphook/adf8.fc,v 1.1 2005/10/10 15:27:43 beng Exp $ */
-
-/*
-	ADD TWO FLOATS - DOUBLE (ADF 8)
-*/
-
-#include	"FP_types.h"
-
-void
-adf8(s2,s1)
-DOUBLE	s1,s2;
-{
-	EXTEND	e1,e2;
-
-	if (s1.d[0] == 0 && s1.d[1] == 0) {
-		s1 = s2;
-		return;
-	}
-	if (s2.d[0] == 0 && s2.d[1] == 0) {
-		return;
-	}
-
-	extend(&s1.d[0],&e1,sizeof(DOUBLE));
-	extend(&s2.d[0],&e2,sizeof(DOUBLE));
-	add_ext(&e1,&e2);
-	compact(&e1,&s1.d[0],sizeof(DOUBLE));
-}
Index: trunk/minix/lib/ack/fphook/byte_order.h
===================================================================
--- trunk/minix/lib/ack/fphook/byte_order.h	(revision 9)
+++ 	(revision )
@@ -1,6 +1,0 @@
-#define CHAR_UNSIGNED	0
-#define MSB_AT_LOW_ADDRESS	0
-#define MSW_AT_LOW_ADDRESS	0
-#define FL_MSB_AT_LOW_ADDRESS	0
-#define FL_MSW_AT_LOW_ADDRESS	0
-#define FL_MSL_AT_LOW_ADDRESS	0
Index: trunk/minix/lib/ack/fphook/cff4.fc
===================================================================
--- trunk/minix/lib/ack/fphook/cff4.fc	(revision 9)
+++ 	(revision )
@@ -1,28 +1,0 @@
-/*
-  (c) copyright 1988 by the Vrije Universiteit, Amsterdam, The Netherlands.
-  See the copyright notice in the ACK home directory, in the file "Copyright".
-*/
-
-/* $Header: /cvsup/minix/src/lib/ack/fphook/cff4.fc,v 1.1 2005/10/10 15:27:43 beng Exp $ */
-
-/*
-		CONVERT DOUBLE TO SINGLE (CFF 8 4)
-
-	This routine works quite simply. A floating point
-	of size 08 is converted to extended format.
-	This extended variable is converted back to
-	a floating point of size 04.
-
-*/
-
-#include	"FP_types.h"
-
-void
-cff4(src)
-DOUBLE	src;	/* the source itself -	THIS TIME it's DOUBLE */
-{
-	EXTEND	buf;
-
-	extend(&src.d[0],&buf,sizeof(DOUBLE));	/* no matter what */
-	compact(&buf,&(src.d[1]),sizeof(SINGLE));
-}
Index: trunk/minix/lib/ack/fphook/cff8.fc
===================================================================
--- trunk/minix/lib/ack/fphook/cff8.fc	(revision 9)
+++ 	(revision )
@@ -1,28 +1,0 @@
-/*
-  (c) copyright 1988 by the Vrije Universiteit, Amsterdam, The Netherlands.
-  See the copyright notice in the ACK home directory, in the file "Copyright".
-*/
-
-/* $Header: /cvsup/minix/src/lib/ack/fphook/cff8.fc,v 1.1 2005/10/10 15:27:43 beng Exp $ */
-
-/*
-		CONVERT SINGLE TO DOUBLE (CFF 4 8)
-
-	This routine works quite simply. A floating point
-	of size 04 is converted to extended format.
-	This extended variable is converted back to
-	a floating point of size 08.
-
-*/
-
-#include "FP_types.h"
-
-void
-cff8(src)
-SINGLE	src;
-{
-	EXTEND	buf;
-
-	extend(&src,&buf,sizeof(SINGLE));	/* no matter what */
-	compact(&buf, &src,sizeof(DOUBLE));
-}
Index: trunk/minix/lib/ack/fphook/cfi.fc
===================================================================
--- trunk/minix/lib/ack/fphook/cfi.fc	(revision 9)
+++ 	(revision )
@@ -1,52 +1,0 @@
-/*
-  (c) copyright 1988 by the Vrije Universiteit, Amsterdam, The Netherlands.
-  See the copyright notice in the ACK home directory, in the file "Copyright".
-*/
-
-/* $Header: /cvsup/minix/src/lib/ack/fphook/cfi.fc,v 1.1 2005/10/10 15:27:43 beng Exp $ */
-
-/*
-		CONVERT FLOAT TO SIGNED (CFI m n)
-
-		N.B. The caller must know what it is getting.
-		     A LONG is always returned. If it is an
-		     integer the high byte is cleared first.
-*/
-
-#include "FP_trap.h"
-#include "FP_types.h"
-#include "FP_shift.h"
-
-long
-cfi(ds,ss,src)
-int	ds;	/* destination size (2 or 4) */
-int	ss;	/* source size	    (4 or 8) */
-DOUBLE	src;	/* assume worst case */
-{
-	EXTEND	buf;
-	long	new;
-	short	max_exp;
-
-	extend(&src.d[0],&buf,ss);	/* get extended format */
-	if (buf.exp < 0) {	/* no conversion needed */
-		src.d[ss == 8] = 0L;
-		return(0L);
-	}
-	max_exp = (ds << 3) - 2;	/* signed numbers */
-				/* have more limited max_exp */
-	if (buf.exp > max_exp) {
-		if (buf.exp == max_exp+1 && buf.sign && buf.m1 == NORMBIT &&
-		    buf.m2 == 0L) {
-		}
-		else {
-			trap(EIOVFL);	/* integer overflow	*/
-			buf.exp %= max_exp; /* truncate	*/
-		}
-	}
-	new = buf.m1 >> (31-buf.exp);
-	if (buf.sign)
-		new = -new;
-done:
-	src.d[ss == 8] = new;
-	return(new);
-}
Index: trunk/minix/lib/ack/fphook/cfu.fc
===================================================================
--- trunk/minix/lib/ack/fphook/cfu.fc	(revision 9)
+++ 	(revision )
@@ -1,43 +1,0 @@
-/*
-  (c) copyright 1988 by the Vrije Universiteit, Amsterdam, The Netherlands.
-  See the copyright notice in the ACK home directory, in the file "Copyright".
-*/
-
-/* $Header: /cvsup/minix/src/lib/ack/fphook/cfu.fc,v 1.1 2005/10/10 15:27:43 beng Exp $ */
-
-/*
-		CONVERT FLOAT TO UNSIGNED (CFU m n)
-
-		N.B. The caller must know what it is getting.
-		     A LONG is always returned. If it is an
-		     integer the high byte is cleared first.
-*/
-
-#include "FP_trap.h"
-#include "FP_types.h"
-
-long
-cfu(ds,ss,src)
-int	ds;	/* destination size (2 or 4) */
-int	ss;	/* source size	    (4 or 8) */
-DOUBLE	src;	/* assume worst case */
-{
-	EXTEND	buf;
-	long	new;
-	short	newint, max_exp;
-
-	extend(&src.d[0],&buf,ss);	/* get extended format	*/
-	if (buf.exp < 0) {	/* no conversion needed	*/
-		src.d[ss == 8] = 0L;
-		return(0L);
-	}
-	max_exp = (ds << 3) - 1;
-	if (buf.exp > max_exp) {
-		trap(EIOVFL);	/* integer overflow	*/
-		buf.exp %= max_exp;
-	}
-	new = buf.m1 >> (31-buf.exp);
-done:
-	src.d[ss == 8] = new;
-	return(new);
-}
Index: trunk/minix/lib/ack/fphook/cif4.fc
===================================================================
--- trunk/minix/lib/ack/fphook/cif4.fc	(revision 9)
+++ 	(revision )
@@ -1,56 +1,0 @@
-/*
-  (c) copyright 1988 by the Vrije Universiteit, Amsterdam, The Netherlands.
-  See the copyright notice in the ACK home directory, in the file "Copyright".
-*/
-
-/* $Header: /cvsup/minix/src/lib/ack/fphook/cif4.fc,v 1.1 2005/10/10 15:27:43 beng Exp $ */
-
-/*
-	CONVERT INTEGER TO SINGLE (CIF n 4)
-
-	THIS ROUTINE WORKS BY FILLING AN EXTENDED
-	WITH THE INTEGER VALUE IN EXTENDED FORMAT
-	AND USES COMPACT() TO PUT IT INTO THE PROPER
-	FLOATING POINT PRECISION.
-*/
-
-#include "FP_types.h"
-
-void
-cif4(ss,src)
-int	ss;	/* source size */
-long	src;	/* largest possible integer to convert */
-{
-	EXTEND	buf;
-	short	*ipt;
-	long	i_src;
-	SINGLE	*result;
-
-	zrf_ext(&buf);
-	if (ss == sizeof(long))	{
-		buf.exp = 31;
-		i_src = src;
-		result = (SINGLE *) &src;
-	}
-	else	{
-		ipt = (short *) &src;
-		i_src = (long) *ipt;
-		buf.exp = 15;
-		result = (SINGLE *) &ss;
-	}
-	if (i_src == 0)	{
-		*result = (SINGLE) 0L;
-		return;
-	}
-			/* ESTABLISHED THAT src != 0	*/
-			/* adjust exponent field	*/
-	buf.sign = (i_src < 0) ? 0x8000 : 0;
-			/* clear sign bit of integer	*/
-			/* move to mantissa field	*/
-	buf.m1 = (i_src < 0) ? -i_src : i_src;
-			/* adjust mantissa field	*/
-	if (ss != sizeof(long))
-		buf.m1 <<= 16;
-	nrm_ext(&buf);		/* adjust mantissa field	*/
-	compact(&buf, result,sizeof(SINGLE));	/* put on stack */
-}
Index: trunk/minix/lib/ack/fphook/cif8.fc
===================================================================
--- trunk/minix/lib/ack/fphook/cif8.fc	(revision 9)
+++ 	(revision )
@@ -1,55 +1,0 @@
-/*
-  (c) copyright 1988 by the Vrije Universiteit, Amsterdam, The Netherlands.
-  See the copyright notice in the ACK home directory, in the file "Copyright".
-*/
-
-/* $Header: /cvsup/minix/src/lib/ack/fphook/cif8.fc,v 1.1 2005/10/10 15:27:43 beng Exp $ */
-
-/*
-	CONVERT INTEGER TO FLOAT (CIF n 8)
-
-	THIS ROUTINE WORKS BY FILLING AN EXTENDED
-	WITH THE INTEGER VALUE IN EXTENDED FORMAT
-	AND USES COMPACT() TO PUT IT INTO THE PROPER
-	FLOATING POINT PRECISION.
-*/
-
-#include "FP_types.h"
-
-void
-cif8(ss,src)
-int	ss;	/* source size */
-long	src;	/* largest possible integer to convert */
-{
-	EXTEND	buf;
-	DOUBLE	*result;	/* for return value */
-	short	*ipt;
-	long	i_src;
-
-	result = (DOUBLE *) ((void *) &ss);	/* always */
-	zrf_ext(&buf);
-	if (ss == sizeof(long))	{
-		buf.exp = 31;
-		i_src = src;
-	}
-	else	{
-		ipt = (short *) &src;
-		i_src = (long) *ipt;
-		buf.exp = 15;
-	}
-	if (i_src == 0)	{
-		zrf8(result);
-		return;
-	}
-			/* ESTABLISHED THAT src != 0	*/
-			/* adjust exponent field	*/
-	buf.sign = (i_src < 0) ? 0x8000 : 0;
-			/* clear sign bit of integer	*/
-			/* move to mantissa field	*/
-	buf.m1 = (i_src < 0) ? -i_src : i_src;
-			/* adjust mantissa field	*/
-	if (ss != sizeof(long))
-		buf.m1 <<= 16;
-	nrm_ext(&buf);
-	compact(&buf,&result->d[0],8);
-}
Index: trunk/minix/lib/ack/fphook/cmf4.fc
===================================================================
--- trunk/minix/lib/ack/fphook/cmf4.fc	(revision 9)
+++ 	(revision )
@@ -1,40 +1,0 @@
-/*
-  (c) copyright 1988 by the Vrije Universiteit, Amsterdam, The Netherlands.
-  See the copyright notice in the ACK home directory, in the file "Copyright".
-*/
-
-/* $Header: /cvsup/minix/src/lib/ack/fphook/cmf4.fc,v 1.1 2005/10/10 15:27:43 beng Exp $ */
-
-/*
-	COMPARE	SINGLES (CMF 4)
-*/
-
-#include	"FP_types.h"
-#include	"get_put.h"
-
-int
-cmf4(f1,f2)
-SINGLE	f1,f2;
-{
-		/*
-		 * return ((f1 < f2) ? 1 : (f1 - f2))
-		 */
-#define SIGN(x) (((x) < 0) ? -1 : 1)
-        int	sign1,sign2;
-	long	l1,l2;
-
-	l1 = get4((char *) &f1);
-	l2 = get4((char *) &f2);
-
-	if (l1 == l2) return 0;
-
-        sign1 = SIGN(l1);
-        sign2 = SIGN(l2);
-        if (sign1 != sign2) {
-		if ((l1 & 0x7fffffff) == 0 &&
-		    (l2 & 0x7fffffff) == 0) return 0;
-                return ((sign1 > 0) ? -1 : 1);
-	}
-
-	return (sign1 * ((l1 < l2) ? 1 : -1));
-}
Index: trunk/minix/lib/ack/fphook/cmf8.fc
===================================================================
--- trunk/minix/lib/ack/fphook/cmf8.fc	(revision 9)
+++ 	(revision )
@@ -1,61 +1,0 @@
-/*
-  (c) copyright 1988 by the Vrije Universiteit, Amsterdam, The Netherlands.
-  See the copyright notice in the ACK home directory, in the file "Copyright".
-*/
-
-/* $Header: /cvsup/minix/src/lib/ack/fphook/cmf8.fc,v 1.1 2005/10/10 15:27:43 beng Exp $ */
-
-/*
-	COMPARE	DOUBLES (CMF 8)
-*/
-
-#include	"FP_types.h"
-#include	"get_put.h"
-
-int
-cmf8(d1,d2)
-DOUBLE	d1,d2;
-{
-#define	SIGN(x)	(((x) < 0) ? -1 : 1)
-		/*
-		 * return ((d1 < d2) ? 1 : (d1 > d2) ? -1 : 0))
-		 */
-	long	l1,l2;
-	int	sign1,sign2;
-	int	rv;
-
-#if FL_MSL_AT_LOW_ADDRESS
-	l1 = get4((char *)&d1);
-	l2 = get4((char *)&d2);
-#else
-	l1 = get4(((char *)&d1+4));
-	l2 = get4(((char *)&d2+4));
-#endif
-	sign1 = SIGN(l1);
-	sign2 = SIGN(l2);
-	if (sign1 != sign2) {
-		l1 &= 0x7fffffff;
-		l2 &= 0x7fffffff;
-		if (l1 != 0 || l2 != 0) {
-			return ((sign1 > 0) ? -1 : 1);
-		}
-	}
-	if (l1 != l2)	{	/* we can decide here */
-		rv = l1 < l2 ? 1 : -1;
-	}
-	else	{ 		/* decide in 2nd half */
-		unsigned long u1, u2;
-#if FL_MSL_AT_LOW_ADDRESS
-		u1 = get4(((char *)&d1 + 4));
-		u2 = get4(((char *)&d2 + 4));
-#else
-		u1 = get4((char *)&d1);
-		u2 = get4((char *)&d2);
-#endif
-		if (u1 == u2)
-			return(0);
-		if (u1 < u2) rv = 1;
-		else rv = -1;
-	}
-	return sign1 * rv;
-}
Index: trunk/minix/lib/ack/fphook/compact.fc
===================================================================
--- trunk/minix/lib/ack/fphook/compact.fc	(revision 9)
+++ 	(revision )
@@ -1,202 +1,0 @@
-/*
-  (c) copyright 1988 by the Vrije Universiteit, Amsterdam, The Netherlands.
-  See the copyright notice in the ACK home directory, in the file "Copyright".
-*/
-
-/* $Header: /cvsup/minix/src/lib/ack/fphook/compact.fc,v 1.1 2005/10/10 15:27:43 beng Exp $ */
-
-/*
-	COMPACT EXTEND FORMAT INTO FLOAT OF PROPER SIZE
-*/
-
-# include "FP_bias.h"
-# include "FP_shift.h"
-# include "FP_trap.h"
-# include "FP_types.h"
-# include "get_put.h"
-
-void
-compact(f,to,size)
-EXTEND	*f;
-unsigned long	*to;
-int	size;
-{
-	int	error = 0;
-
-	if (size == sizeof(DOUBLE)) {
-	/*
-	 * COMPACT EXTENDED INTO DOUBLE
-	 */
-		DOUBLE *DBL = (DOUBLE *) (void *) to;
-
-		if ((f->m1|(f->m2 & DBL_ZERO)) == 0L)	{
-			zrf8(DBL);
-			return;
-		}
-		f->exp += DBL_BIAS;	/* restore proper bias	*/
-		if (f->exp > DBL_MAX)	{
-dbl_over:			trap(EFOVFL);
-			f->exp = DBL_MAX+1;
-			f->m1 = 0;
-			f->m2 = 0;
-			if (error++)
-				return;
-		}
-		else if (f->exp < DBL_MIN)	{
-			b64_rsft(&(f->mantissa));
-			if (f->exp < 0) {
-				b64_sft(&(f->mantissa), -f->exp);
-				f->exp = 0;
-			}
-			/* underflow ??? */
-		}
-			
-		/* local CAST conversion		*/
-
-		/* because of special format shift only 10 bits */
-		/* bit shift mantissa 10 bits		*/
-
-		/* first align within words, then do store operation */
-
-		DBL->d[0] = f->m1 >> DBL_RUNPACK;   /* plus 22 == 32 */
-		DBL->d[1] = f->m2 >> DBL_RUNPACK;   /* plus 22 == 32 */
-		DBL->d[1] |= (f->m1 << DBL_LUNPACK); /* plus 10 == 32 */
-
-		/* if not exact then round to nearest	*/
-		/* on a tie, round to even */
-
-#ifdef EXCEPTION_INEXACT
-		if ((f->m2 & DBL_EXACT) != 0) {
-		    INEXACT();
-#endif
-		    if (((f->m2 & DBL_EXACT) > DBL_ROUNDUP)
-			|| ((f->m2 & DBL_EXACT) == DBL_ROUNDUP
-			    && (f->m2 & (DBL_ROUNDUP << 1)))) {
-			DBL->d[1]++;	/* rounding up	*/
-			if (DBL->d[1] == 0L) { /* carry out	*/
-			    DBL->d[0]++;
-
-			    if (f->exp == 0 && (DBL->d[0] & ~DBL_MASK)) {
-					f->exp++;
-				}
-			    if (DBL->d[0] & DBL_CARRYOUT) { /* carry out */
-				if (DBL->d[0] & 01)
-				    DBL->d[1] = CARRYBIT;
-				DBL->d[0] >>= 1;
-				f->exp++;
-			    }
-			}
-			/*	check for overflow			*/
-			if (f->exp > DBL_MAX)
-		    		goto dbl_over;
-		    }
-#ifdef EXCEPTION_INEXACT
-		}
-#endif
-
-		/*
-		 * STORE EXPONENT AND SIGN:
-		 *
-		 * 1) clear leading bits (B4-B15)
-		 * 2) shift and store exponent
-		 */
-
-		DBL->d[0] &= DBL_MASK;
-		DBL->d[0] |= 
-			((long) (f->exp << DBL_EXPSHIFT) << EXP_STORE);
-		if (f->sign)
-			DBL->d[0] |= CARRYBIT;
-
-		/*
-		 * STORE MANTISSA
-		 */
-
-#if FL_MSL_AT_LOW_ADDRESS
-		put4(DBL->d[0], (char *) &DBL->d[0]);
-		put4(DBL->d[1], (char *) &DBL->d[1]);
-#else
-		{ unsigned long l;
-		  put4(DBL->d[1], (char *) &l);
-		  put4(DBL->d[0], (char *) &DBL->d[1]);
-		  DBL->d[0] = l;
-		}
-#endif
-	}
-	else {
-		/*
-		 * COMPACT EXTENDED INTO FLOAT
-		 */
-		SINGLE	*SGL;
-
-		/* local CAST conversion		*/
-		SGL = (SINGLE *) (void *) to;
-		if ((f->m1 & SGL_ZERO) == 0L)	{
-			*SGL = 0L;
-			return;
-		}
-		f->exp += SGL_BIAS;	/* restore bias	*/
-		if (f->exp > SGL_MAX)	{
-sgl_over:			trap(EFOVFL);
-			f->exp = SGL_MAX+1;
-			f->m1 = 0L;
-			f->m2 = 0L;
-			if (error++)
-				return;
-		}
-		else if (f->exp < SGL_MIN)	{
-			b64_rsft(&(f->mantissa));
-			if (f->exp < 0) {
-				b64_sft(&(f->mantissa), -f->exp);
-				f->exp = 0;
-			}
-			/* underflow ??? */
-		}
-
-		/* shift mantissa and store	*/
-		*SGL = (f->m1 >> SGL_RUNPACK);
-
-		/* check for rounding to nearest	*/
-		/* on a tie, round to even		*/
-#ifdef EXCEPTION_INEXACT
-		if (f->m2 != 0 ||
-		    (f->m1 & SGL_EXACT) != 0L) {
-			INEXACT();
-#endif
-		        if (((f->m1 & SGL_EXACT) > SGL_ROUNDUP)
-			    || ((f->m1 & SGL_EXACT) == SGL_ROUNDUP
-			        && (f->m1 & (SGL_ROUNDUP << 1)))) {
-				(*SGL)++;
-				if (f->exp == 0 && (*SGL & ~SGL_MASK)) {
-					f->exp++;
-				}
-			/* check normal */
-				if (*SGL & SGL_CARRYOUT)	{
-					*SGL >>= 1;
-					f->exp++;
-				}
-				if (f->exp > SGL_MAX)
-					goto sgl_over;
-			}
-#ifdef EXCEPTION_INEXACT
-		}
-#endif
-
-		/*
-		 * STORE EXPONENT AND SIGN:
-		 *
-		 * 1) clear leading bit of fraction
-		 * 2) shift and store exponent
-		 */
-
-		*SGL &= SGL_MASK; /* B23-B31 are 0 */
-		*SGL |= ((long) (f->exp << SGL_EXPSHIFT) << EXP_STORE);
-		if (f->sign)
-			*SGL |= CARRYBIT;
-
-		/*
-		 * STORE MANTISSA
-		 */
-
-		put4(*SGL, (char *) &SGL);
-	}
-}
Index: trunk/minix/lib/ack/fphook/cuf4.fc
===================================================================
--- trunk/minix/lib/ack/fphook/cuf4.fc	(revision 9)
+++ 	(revision )
@@ -1,57 +1,0 @@
-/*
-  (c) copyright 1988 by the Vrije Universiteit, Amsterdam, The Netherlands.
-  See the copyright notice in the ACK home directory, in the file "Copyright".
-*/
-
-/* $Header: /cvsup/minix/src/lib/ack/fphook/cuf4.fc,v 1.1 2005/10/10 15:27:43 beng Exp $ */
-
-/*
-	CONVERT INTEGER TO SINGLE (CUF n 4)
-
-	THIS ROUTINE WORKS BY FILLING AN EXTENDED
-	WITH THE INTEGER VALUE IN EXTENDED FORMAT
-	AND USES COMPACT() TO PUT IT INTO THE PROPER
-	FLOATING POINT PRECISION.
-*/
-
-#include "FP_types.h"
-
-void
-cuf4(ss,src)
-int	ss;	/* source size */
-long	src;	/* largest possible integer to convert */
-{
-	EXTEND	buf;
-	short	*ipt;
-	SINGLE	*result;
-	long	i_src;
-
-	zrf_ext(&buf);
-	if (ss == sizeof(long))	{
-		buf.exp = 31;
-		i_src = src;
-		result = (SINGLE *) &src;
-	}
-	else	{
-		ipt = (short *) &src;
-		i_src = (long) *ipt;
-		buf.exp = 15;
-		result = (SINGLE *) ((void *) &ss);
-	}
-	if (i_src == 0)	{
-		*result = (SINGLE) 0L;
-		return;
-	}
-			/* ESTABLISHED THAT src != 0	*/
-
-			/* adjust exponent field	*/
-	if (ss != sizeof(long))
-		i_src <<= 16;
-
-			/* move to mantissa field	*/
-	buf.m1 = i_src;
-
-			/* adjust mantissa field	*/
-	nrm_ext(&buf);
-	compact(&buf,result,4);
-}
Index: trunk/minix/lib/ack/fphook/cuf8.fc
===================================================================
--- trunk/minix/lib/ack/fphook/cuf8.fc	(revision 9)
+++ 	(revision )
@@ -1,54 +1,0 @@
-/*
-  (c) copyright 1988 by the Vrije Universiteit, Amsterdam, The Netherlands.
-  See the copyright notice in the ACK home directory, in the file "Copyright".
-*/
-
-/* $Header: /cvsup/minix/src/lib/ack/fphook/cuf8.fc,v 1.1 2005/10/10 15:27:43 beng Exp $ */
-
-/*
-	CONVERT INTEGER TO FLOAT (CUF n 8)
-
-	THIS ROUTINE WORKS BY FILLING AN EXTENDED
-	WITH THE INTEGER VALUE IN EXTENDED FORMAT
-	AND USES COMPACT() TO PUT IT INTO THE PROPER
-	FLOATING POINT PRECISION.
-*/
-
-#include "FP_types.h"
-
-void
-cuf8(ss,src)
-int	ss;	/* source size */
-long	src;	/* largest possible integer to convert */
-{
-	EXTEND	buf;
-	short	*ipt;
-	long	i_src;
-
-	zrf_ext(&buf);
-	if (ss == sizeof(long))	{
-		buf.exp = 31;
-		i_src = src;
-	}
-	else	{
-		ipt = (short *) &src;
-		i_src = (long) *ipt;
-		buf.exp = 15;
-	}
-	if (i_src == 0)	{
-		zrf8((DOUBLE *)((void *)&ss));
-		return;
-	}
-			/* ESTABLISHED THAT src != 0	*/
-
-			/* adjust exponent field	*/
-	if (ss != sizeof(long))
-		i_src <<= 16;
-
-			/* move to mantissa field	*/
-	buf.m1 = i_src;
-
-			/* adjust mantissa field	*/
-	nrm_ext(&buf);
-	compact(&buf,(unsigned long *) (void *)&ss,8);
-}
Index: trunk/minix/lib/ack/fphook/div_ext.fc
===================================================================
--- trunk/minix/lib/ack/fphook/div_ext.fc	(revision 9)
+++ 	(revision )
@@ -1,266 +1,0 @@
-/*
-  (c) copyright 1988 by the Vrije Universiteit, Amsterdam, The Netherlands.
-  See the copyright notice in the ACK home directory, in the file "Copyright".
-*/
-
-/* $Header: /cvsup/minix/src/lib/ack/fphook/div_ext.fc,v 1.1 2005/10/10 15:27:43 beng Exp $ */
-
-/*
-	DIVIDE EXTENDED FORMAT
-*/
-
-#include "FP_bias.h"
-#include "FP_trap.h"
-#include "FP_types.h"
-
-/*
-	November 15, 1984
-
-	This is a routine to do the work.
-	There are two versions: 
-	One is based on the partial products method
-	and makes no use possible machine instructions
-	to divide (hardware dividers).
-	The other is used when USE_DIVIDE is defined. It is much faster on
-	machines with fast 4 byte operations.
-*/
-/********************************************************/
-
-void
-div_ext(e1,e2)
-EXTEND	*e1,*e2;
-{
-	short	error = 0;
-	B64		result;
-	register	unsigned long	*lp;
-#ifndef USE_DIVIDE
-	short	count;
-#else
-	unsigned short u[9], v[5];
-	register int j;
-	register unsigned short *u_p = u;
-	int maxv = 4;
-#endif
-
-	if ((e2->m1 | e2->m2) == 0) {
-                /*
-                 * Exception 8.2 - Divide by zero
-                 */
-		trap(EFDIVZ);
-		e1->m1 = e1->m2 = 0L;
-		e1->exp = EXT_MAX;
-		return;
-	}
-	if ((e1->m1 | e1->m2) == 0) {	/* 0 / anything == 0 */
-		e1->exp = 0;	/* make sure */
-		return;
-	}
-#ifndef USE_DIVIDE
-	/*
-	 * numbers are right shifted one bit to make sure
-	 * that m1 is quaranteed to be larger if its
-	 * maximum bit is set
-	 */
-	b64_rsft(&e1->mantissa);	/* 64 bit shift right */
-	b64_rsft(&e2->mantissa);	/* 64 bit shift right */
-	e1->exp++;
-	e2->exp++;
-#endif
-	/*	check for underflow, divide by zero, etc	*/
-	e1->sign ^= e2->sign;
-	e1->exp -= e2->exp;
-
-#ifndef USE_DIVIDE
-		/* do division of mantissas	*/
-		/* uses partial product method	*/
-		/* init control variables	*/
-
-	count = 64;
-	result.h_32 = 0L;
-	result.l_32 = 0L;
-
-		/* partial product division loop */
-
-	while (count--)	{
-		/* first left shift result 1 bit	*/
-		/* this is ALWAYS done			*/
-
-		b64_lsft(&result);
-
-		/* compare dividend and divisor		*/
-		/* if dividend >= divisor add a bit	*/
-		/* and subtract divisior from dividend	*/
-
-		if ( (e1->m1 < e2->m1) ||
-			((e1->m1 == e2->m1) && (e1->m2 < e2->m2) ))
-			;	/* null statement */
-				/* i.e., don't add or subtract */
-		else	{
-			result.l_32++;	/* ADD	*/
-			if (e2->m2 > e1->m2)
-				e1->m1 -= 1;	/* carry in */
-			e1->m1 -= e2->m1;	/* do SUBTRACTION */
-			e1->m2 -= e2->m2;	/*    SUBTRACTION */
-		}
-
-		/*	shift dividend left one bit OR	*/
-		/*	IF it equals ZERO we can break out	*/
-		/*	of the loop, but still must shift	*/
-		/*	the quotient the remaining count bits	*/
-		/* NB	save the results of this test in error	*/
-		/*	if not zero, then the result is inexact. */
-		/* 	this would be reported in IEEE standard	*/
-
-		/*	lp points to dividend			*/
-		lp = &e1->m1;
-
-		error = ((*lp | *(lp+1)) != 0L) ? 1 : 0;
-		if (error)	{	/* more work */
-			/*	assume max bit == 0 (see above)	*/
-			b64_lsft(&e1->mantissa);
-			continue;
-		}
-		else
-			break;	/* leave loop	*/
-	}	/* end of divide by subtraction loop	*/
-
-	if (count > 0)	{
-		lp = &result.h_32;
-		if (count > 31) {	/* move to higher word */
-			*lp = *(lp+1);
-			count -= 32;
-			*(lp+1) = 0L;	/* clear low word	*/
-		}
-		if (*lp)
-			*lp <<= count;	/* shift rest of way	*/
-		lp++;	/*  == &result.l_32	*/
-		if (*lp) {
-			result.h_32 |= (*lp >> 32-count);
-			*lp <<= count;
-		}
-	}
-#else /* USE_DIVIDE */
-
-	u[4] = (e1->m2 & 1) << 15;
-	b64_rsft(&(e1->mantissa));
-	u[0] = e1->m1 >> 16;
-	u[1] = e1->m1;
-	u[2] = e1->m2 >> 16;
-	u[3] = e1->m2;
-	u[5] = 0; u[6] = 0; u[7] = 0;
-	v[1] = e2->m1 >> 16;
-	v[2] = e2->m1;
-	v[3] = e2->m2 >> 16;
-	v[4] = e2->m2;
-	while (! v[maxv]) maxv--;
-	result.h_32 = 0;
-	result.l_32 = 0;
-	lp = &result.h_32;
-
-	/*
-	 * Use an algorithm of Knuth (The art of programming, Seminumerical
-	 * algorithms), to divide u by v. u and v are both seen as numbers
-	 * with base 65536. 
-	 */
-	for (j = 0; j <= 3; j++, u_p++) {
-		unsigned long q_est, temp;
-
-		if (j == 2) lp++;
-		if (u_p[0] == 0 && u_p[1] < v[1]) continue;
-		temp = ((unsigned long)u_p[0] << 16) + u_p[1];
-		if (u_p[0] >= v[1]) {
-			q_est = 0x0000FFFFL;
-		}
-		else {
-			q_est = temp / v[1];
-		}
-		temp -= q_est * v[1];
-		while (temp < 0x10000 && v[2]*q_est > ((temp<<16)+u_p[2])) {
-			q_est--;
-			temp += v[1];
-		}
-		/*	Now, according to Knuth, we have an estimate of the
-			quotient, that is either correct or one too big, but
-			almost always correct.
-		*/
-		if (q_est != 0)  {
-			int i;
-			unsigned long k = 0;
-			int borrow = 0;
-
-			for (i = maxv; i > 0; i--) {
-				unsigned long tmp = q_est * v[i] + k + borrow;
-				unsigned short md = tmp;
-
-				borrow = (md > u_p[i]);
-				u_p[i] -= md;
-				k = tmp >> 16;
-			}
-			k += borrow;
-			borrow = u_p[0] < k;
-			u_p[0] -= k;
-
-			if (borrow) {
-				/* So, this does not happen often; the estimate
-				   was one too big; correct this
-				*/
-				*lp |= (j & 1) ? (q_est - 1) : ((q_est-1)<<16);
-				borrow = 0;
-				for (i = maxv; i > 0; i--) {
-					unsigned long tmp 
-					    = v[i]+(unsigned long)u_p[i]+borrow;
-					
-					u_p[i] = tmp;
-					borrow = tmp >> 16;
-				}
-				u_p[0] += borrow;
-			}
-			else *lp |= (j & 1) ? q_est : (q_est<<16);
-		}
-	}
-#ifdef	EXCEPTION_INEXACT
-	u_p = &u[0];
-	for (j = 7; j >= 0; j--) {
-		if (*u_p++) {
-			error = 1;
-			break;
-		}
-	}
-#endif
-#endif
-
-#ifdef  EXCEPTION_INEXACT
-        if (error)      {
-                /*
-                 * report here exception 8.5 - Inexact
-                 * from Draft 8.0 of IEEE P754:
-                 * In the absence of an invalid operation exception,
-                 * if the rounded result of an operation is not exact or if
-                 * it overflows without a trap, then the inexact exception
-                 * shall be assigned. The rounded or overflowed result
-                 * shall be delivered to the destination.
-                 */
-                INEXACT();
-#endif
-	e1->mantissa = result;
-
-	nrm_ext(e1);
-	if (e1->exp < EXT_MIN)	{
-		/*
-		 * Exception 8.4 - Underflow
-		 */
-		trap(EFUNFL);	/* underflow */
-		e1->exp = EXT_MIN;
-		e1->m1 = e1->m2 = 0L;
-		return;
-	}
-	if (e1->exp >= EXT_MAX) {
-                /*
-                 * Exception 8.3 - Overflow
-                 */
-                trap(EFOVFL);   /* overflow */
-                e1->exp = EXT_MAX;
-                e1->m1 = e1->m2 = 0L;
-                return;
-        }
-}
Index: trunk/minix/lib/ack/fphook/dvf4.fc
===================================================================
--- trunk/minix/lib/ack/fphook/dvf4.fc	(revision 9)
+++ 	(revision )
@@ -1,26 +1,0 @@
-/*
-  (c) copyright 1988 by the Vrije Universiteit, Amsterdam, The Netherlands.
-  See the copyright notice in the ACK home directory, in the file "Copyright".
-*/
-
-/* $Header: /cvsup/minix/src/lib/ack/fphook/dvf4.fc,v 1.1 2005/10/10 15:27:43 beng Exp $ */
-
-/*
-	DIVIDE TWO SINGLES - SINGLE Precision (dvf 4)
-*/
-
-#include	"FP_types.h"
-
-void
-dvf4(s2,s1)
-SINGLE	s1,s2;
-{
-	EXTEND	e1,e2;
-
-	extend(&s1,&e1,sizeof(SINGLE));
-	extend(&s2,&e2,sizeof(SINGLE));
-
-		/* do a divide */
-	div_ext(&e1,&e2);
-	compact(&e1,&s1,sizeof(SINGLE));
-}
Index: trunk/minix/lib/ack/fphook/dvf8.fc
===================================================================
--- trunk/minix/lib/ack/fphook/dvf8.fc	(revision 9)
+++ 	(revision )
@@ -1,26 +1,0 @@
-/*
-  (c) copyright 1988 by the Vrije Universiteit, Amsterdam, The Netherlands.
-  See the copyright notice in the ACK home directory, in the file "Copyright".
-*/
-
-/* $Header: /cvsup/minix/src/lib/ack/fphook/dvf8.fc,v 1.1 2005/10/10 15:27:43 beng Exp $ */
-
-/*
-	DIVIDE TWO FLOATS - DOUBLE Precision (DVF 8)
-*/
-
-#include	"FP_types.h"
-
-void
-dvf8(s2,s1)
-DOUBLE	s1,s2;
-{
-	EXTEND	e1,e2;
-
-	extend(&s1.d[0],&e1,sizeof(DOUBLE));
-	extend(&s2.d[0],&e2,sizeof(DOUBLE));
-
-		/* do a divide */
-	div_ext(&e1,&e2);
-	compact(&e1,&s1.d[0],sizeof(DOUBLE));
-}
Index: trunk/minix/lib/ack/fphook/extend.fc
===================================================================
--- trunk/minix/lib/ack/fphook/extend.fc	(revision 9)
+++ 	(revision )
@@ -1,111 +1,0 @@
-/*
-  (c) copyright 1988 by the Vrije Universiteit, Amsterdam, The Netherlands.
-  See the copyright notice in the ACK home directory, in the file "Copyright".
-*/
-
-/* $Header: /cvsup/minix/src/lib/ack/fphook/extend.fc,v 1.1 2005/10/10 15:27:43 beng Exp $ */
-
-/*
-	CONVERTS FLOATING POINT TO EXTENDED FORMAT
-
-	Two sizes of FLOATING Point are known:
-		SINGLE and DOUBLE
-*/
-/********************************************************/
-/*
-	It is not required to normalize in extended
-	format, but it has been chosen to do so.
-	Extended Format is as follows (at exit):
-
-->sign	S000 0000 | 0000 0000		<SIGN>
-->exp	0EEE EEEE | EEEE EEEE		<EXPONENT>
-->m1	LFFF FFFF | FFFF FFFF		<L.Fraction>
-	FFFF FFFF | FFFF FFFF		<Fraction>
-->m2	FFFF FFFF | FFFF FFFF		<Fraction>
-	FFFF F000 | 0000 0000		<Fraction>
-*/
-/********************************************************/
-
-#include "FP_bias.h"
-#include "FP_shift.h"
-#include "FP_types.h"
-#include "get_put.h"
-/********************************************************/
-
-void
-extend(from,to,size)
-unsigned long	*from;
-EXTEND	*to;
-int	size;
-{
-	register char *cpt1;
-	unsigned long	tmp;
-	int	leadbit = 0;
-
-	cpt1 = (char *) from;
-
-#if FL_MSL_AT_LOW_ADDRESS
-#if FL_MSW_AT_LOW_ADDRESS
-	to->exp = uget2(cpt1);
-#else
-	to->exp = uget2(cpt1+2);
-#endif
-#else
-#if FL_MSW_AT_LOW_ADDRESS
-	to->exp = uget2(cpt1+(size == sizeof(DOUBLE) ? 4 : 0));
-#else
-	to->exp = uget2(cpt1+(size == sizeof(DOUBLE) ? 6 : 2));
-#endif
-#endif
-	to->sign = (to->exp & 0x8000);	/* set sign bit */
-	to->exp ^= to->sign;
-	if (size == sizeof(DOUBLE))
-		to->exp >>= DBL_EXPSHIFT;
-	else
-		to->exp >>= SGL_EXPSHIFT;
-	if (to->exp > 0)
-		leadbit++;	/* will set Lead bit later	*/
-	else to->exp++;
-
-	if (size == sizeof(DOUBLE))	{
-#if FL_MSL_AT_LOW_ADDRESS
-		to->m1 = get4(cpt1);
-		cpt1 += 4;
-		tmp = get4(cpt1);
-#else
-		tmp = get4(cpt1);
-		cpt1 += 4;
-		to->m1 = get4(cpt1);
-#endif
-		if (to->exp == 1 && to->m1 == 0 && tmp == 0) {
-			to->exp = 0;
-			to->sign = 0;
-			to->m1 = 0;
-			to->m2 = 0;
-			return;
-		}
-		to->m1 <<= DBL_M1LEFT;		/* shift	*/
-		to->exp -= DBL_BIAS;		/* remove bias	*/
-		to->m1 |= (tmp>>DBL_RPACK);	/* plus 10 == 32	*/
-		to->m2 = (tmp<<DBL_LPACK);	/* plus 22 == 32	*/
-	}
-	else	{	/* size == sizeof(SINGLE)		*/
-		to->m1 = get4(cpt1);
-		to->m1  <<= SGL_M1LEFT;	/* shift	*/
-		if (to->exp == 1 && to->m1 == 0) {
-			to->exp = 0;
-			to->sign = 0;
-			to->m1 = 0;
-			to->m2 = 0;
-			return;
-		}
-		to->exp -= SGL_BIAS;		/* remove bias	*/
-		to->m2 = 0L;
-	}
-
-	to->m1 |= NORMBIT;				/* set bit L	*/
-	if (leadbit == 0) {		/* set or clear Leading Bit	*/
-		to->m1 &= ~NORMBIT;			/* clear bit L	*/
-		nrm_ext(to);				/* and normalize */
-	}
-}
Index: trunk/minix/lib/ack/fphook/fef4.fc
===================================================================
--- trunk/minix/lib/ack/fphook/fef4.fc	(revision 9)
+++ 	(revision )
@@ -1,33 +1,0 @@
-/*
-  (c) copyright 1988 by the Vrije Universiteit, Amsterdam, The Netherlands.
-  See the copyright notice in the ACK home directory, in the file "Copyright".
-*/
-
-/* $Header: /cvsup/minix/src/lib/ack/fphook/fef4.fc,v 1.1 2005/10/10 15:27:43 beng Exp $ */
-
-/*
-	SEPERATE INTO EXPONENT AND FRACTION (FEF 4)
-*/
-
-#include	"FP_types.h"
-
-void
-fef4(r,s1)
-SINGLE	s1;
-struct fef4_returns	*r;
-{
-	EXTEND	buf;
-	register struct fef4_returns	*p = r;	/* make copy; r might refer
-						   to itself (see table)
-						*/
-
-	extend(&s1,&buf,sizeof(SINGLE));
-	if (buf.exp == 0 && buf.m1 == 0 && buf.m2 == 0) {
-		p->e = 0;
-	}
-	else {
-		p->e = buf.exp+1;
-		buf.exp = -1;
-	}
-	compact(&buf,&p->f,sizeof(SINGLE));
-}
Index: trunk/minix/lib/ack/fphook/fef8.fc
===================================================================
--- trunk/minix/lib/ack/fphook/fef8.fc	(revision 9)
+++ 	(revision )
@@ -1,33 +1,0 @@
-/*
-  (c) copyright 1988 by the Vrije Universiteit, Amsterdam, The Netherlands.
-  See the copyright notice in the ACK home directory, in the file "Copyright".
-*/
-
-/* $Header: /cvsup/minix/src/lib/ack/fphook/fef8.fc,v 1.1 2005/10/10 15:27:43 beng Exp $ */
-
-/*
-	SEPERATE DOUBLE INTO EXPONENT AND FRACTION (FEF 8)
-*/
-
-#include	"FP_types.h"
-
-void
-fef8(r, s1)
-DOUBLE	s1;
-struct fef8_returns *r;
-{
-	EXTEND	buf;
-	register struct fef8_returns *p = r;	/* make copy, r might refer
-						   to itself (see table)
-						*/
-
-	extend(&s1.d[0],&buf,sizeof(DOUBLE));
-	if (buf.exp == 0 && buf.m1 == 0 && buf.m2 == 0) {
-		p->e = 0;
-	}
-	else {
-		p->e = buf.exp + 1;
-		buf.exp = -1;
-	}
-	compact(&buf,&p->f.d[0],sizeof(DOUBLE));
-}
Index: trunk/minix/lib/ack/fphook/fif4.fc
===================================================================
--- trunk/minix/lib/ack/fphook/fif4.fc	(revision 9)
+++ 	(revision )
@@ -1,46 +1,0 @@
-/*
-  (c) copyright 1988 by the Vrije Universiteit, Amsterdam, The Netherlands.
-  See the copyright notice in the ACK home directory, in the file "Copyright".
-*/
-
-/* $Header: /cvsup/minix/src/lib/ack/fphook/fif4.fc,v 1.1 2005/10/10 15:27:43 beng Exp $ */
-
-/*
-	MULTIPLY AND DISMEMBER PARTS (FIF 4)
-*/
-
-#include "FP_types.h"
-#include "FP_shift.h"
-
-void
-fif4(p,x,y)
-SINGLE	x,y;
-struct fif4_returns *p;
-{
-
-	EXTEND	e1,e2;
-
-	extend(&y,&e1,sizeof(SINGLE));
-	extend(&x,&e2,sizeof(SINGLE));
-		/* do a multiply */
-	mul_ext(&e1,&e2);
-	e2 = e1;
-	compact(&e2,&y,sizeof(SINGLE));
-	if (e1.exp < 0) {
-		p->ipart = 0;
-		p->fpart = y;
-		return;
-	}
-	if (e1.exp > 30 - SGL_M1LEFT) {
-		p->ipart = y;
-		p->fpart = 0;
-		return;
-	}
-	b64_sft(&e1.mantissa, 63 - e1.exp);
-	b64_sft(&e1.mantissa, e1.exp - 63);	/* "loose" low order bits */
-	compact(&e1,&(p->ipart),sizeof(SINGLE));
-	extend(&(p->ipart), &e2, sizeof(SINGLE));
-	extend(&y, &e1, sizeof(SINGLE));
-	sub_ext(&e1, &e2);
-	compact(&e1, &(p->fpart), sizeof(SINGLE));
-}
Index: trunk/minix/lib/ack/fphook/fif8.fc
===================================================================
--- trunk/minix/lib/ack/fphook/fif8.fc	(revision 9)
+++ 	(revision )
@@ -1,48 +1,0 @@
-/*
-  (c) copyright 1988 by the Vrije Universiteit, Amsterdam, The Netherlands.
-  See the copyright notice in the ACK home directory, in the file "Copyright".
-*/
-
-/* $Header: /cvsup/minix/src/lib/ack/fphook/fif8.fc,v 1.1 2005/10/10 15:27:44 beng Exp $ */
-
-/*
-	MULTIPLY AND DISMEMBER PARTS (FIF 8)
-*/
-
-#include "FP_types.h"
-#include "FP_shift.h"
-
-void
-fif8(p,x,y)
-DOUBLE	x,y;
-struct fif8_returns *p;
-{
-
-	EXTEND	e1,e2;
-
-	extend(&y.d[0],&e1,sizeof(DOUBLE));
-	extend(&x.d[0],&e2,sizeof(DOUBLE));
-		/* do a multiply */
-	mul_ext(&e1,&e2);
-	e2 = e1;
-	compact(&e2, &y.d[0], sizeof(DOUBLE));
-	if (e1.exp < 0) {
-		p->ipart.d[0] = 0;
-		p->ipart.d[1] = 0;
-		p->fpart = y;
-		return;
-	}
-	if (e1.exp > 62 - DBL_M1LEFT) {
-		p->ipart = y;
-		p->fpart.d[0] = 0;
-		p->fpart.d[1] = 0;
-		return;
-	}
-	b64_sft(&e1.mantissa, 63 - e1.exp);
-	b64_sft(&e1.mantissa, e1.exp - 63);	/* "loose" low order bits */
-	compact(&e1, &(p->ipart.d[0]), sizeof(DOUBLE));
-	extend(&(p->ipart.d[0]), &e2, sizeof(DOUBLE));
-	extend(&y.d[0], &e1, sizeof(DOUBLE));
-	sub_ext(&e1, &e2);
-	compact(&e1, &(p->fpart.d[0]), sizeof(DOUBLE));
-}
Index: trunk/minix/lib/ack/fphook/fltpr.c
===================================================================
--- trunk/minix/lib/ack/fphook/fltpr.c	(revision 9)
+++ 	(revision )
@@ -1,12 +1,0 @@
-#include	<stdio.h>
-#include	<stdlib.h>
-#include	"../stdio/loc_incl.h"
-
-int _fp_hook = 1;
-
-char *
-_f_print(va_list *ap, int flags, char *s, char c, int precision)
-{
-	fprintf(stderr,"cannot print floating point\n");
-	exit(EXIT_FAILURE);
-}
Index: trunk/minix/lib/ack/fphook/fphook.c
===================================================================
--- trunk/minix/lib/ack/fphook/fphook.c	(revision 9)
+++ 	(revision )
@@ -1,195 +1,0 @@
-/*
- * fltpr.c - print floating point numbers
- */
-/* $Header: /cvsup/minix/src/lib/ack/fphook/fphook.c,v 1.1 2005/10/10 15:27:44 beng Exp $ */
-
-#ifndef	NOFLOAT
-#include	<string.h>
-#include	<stdarg.h>
-#include	"../stdio/loc_incl.h"
-int _fp_hook = 1;
-
-static char *
-_pfloat(long double r, register char *s, int n, int flags)
-{
-	register char *s1;
-	int sign, dp;
-	register int i;
-
-	s1 = _fcvt(r, n, &dp, &sign);
-	if (sign)
-		*s++ = '-';
-	else if (flags & FL_SIGN)
-		*s++ = '+';
-	else if (flags & FL_SPACE)
-		*s++ = ' ';
-
-	if (dp<=0)
-		*s++ = '0';
-	for (i=dp; i>0; i--)
-		if (*s1) *s++ = *s1++;
-		else *s++ = '0';
-	if (((i=n) > 0) || (flags & FL_ALT))
-		*s++ = '.';
-	while (++dp <= 0) {
-		if (--i<0)
-			break;
-		*s++ = '0';
-	}
-	while (--i >= 0)
-		if (*s1) *s++ = *s1++;
-		else *s++ = '0';
-	return s;
-}
-
-static char *
-_pscien(long double r, register char *s, int n, int flags)
-{
-	int sign, dp; 
-	register char *s1;
-
-	s1 = _ecvt(r, n + 1, &dp, &sign);
-	if (sign)
-		*s++ = '-';
-	else if (flags & FL_SIGN)
-		*s++ = '+';
-	else if (flags & FL_SPACE)
-		*s++ = ' ';
-
-	*s++ = *s1++;
-	if ((n > 0) || (flags & FL_ALT))
-		*s++ = '.';
-	while (--n >= 0)
-		if (*s1) *s++ = *s1++;
-		else *s++ = '0';
-	*s++ = 'e';
-	if ( r != 0 ) --dp ;
-	if ( dp<0 ) {
-		*s++ = '-' ; dp= -dp ;
-	} else {
-		*s++ = '+' ;
-	}
-	if (dp >= 100) {
-		*s++ = '0' + (dp / 100);
-		dp %= 100;
-	}
-	*s++ = '0' + (dp/10);
-	*s++ = '0' + (dp%10);
-	return s;
-}
-
-#define	NDIGINEXP(exp)		(((exp) >= 100 || (exp) <= -100) ? 3 : 2)
-#define	LOW_EXP			-4
-#define	USE_EXP(exp, ndigits)	(((exp) < LOW_EXP + 1) || (exp >= ndigits + 1))
-
-static char *
-_gcvt(long double value, int ndigit, char *s, int flags)
-{
-	int sign, dp;
-	register char *s1, *s2;
-	register int i;
-	register int nndigit = ndigit;
-
-	s1 = _ecvt(value, ndigit, &dp, &sign);
-	s2 = s;
-	if (sign) *s2++ = '-';
-	else if (flags & FL_SIGN)
-		*s2++ = '+';
-	else if (flags & FL_SPACE)
-		*s2++ = ' ';
-
-	if (!(flags & FL_ALT))
-		for (i = nndigit - 1; i > 0 && s1[i] == '0'; i--)
-			nndigit--;
-
-	if (USE_EXP(dp,ndigit))	{
-		/* Use E format */
-		dp--;
-		*s2++ = *s1++;
-		if ((nndigit > 1) || (flags & FL_ALT)) *s2++ = '.';
-		while (--nndigit > 0) *s2++ = *s1++;
-		*s2++ = 'e';
-		if (dp < 0) {
-			*s2++ = '-';
-			dp = -dp;
-		}
-		else	 *s2++ = '+';
-		s2 += NDIGINEXP(dp);
-		*s2 = 0;
-		for (i = NDIGINEXP(dp); i > 0; i--) {
-			*--s2 = dp % 10 + '0';
-			dp /= 10;
-		}
-		return s;
-	}
-	/* Use f format */
-	if (dp <= 0) {
-		if (*s1 != '0')	{
-			/* otherwise the whole number is 0 */
-			*s2++ = '0';
-			*s2++ = '.';
-		}
-		while (dp < 0) {
-			dp++;
-			*s2++ = '0';
-		}
-	}
-	for (i = 1; i <= nndigit; i++) {
-		*s2++ = *s1++;
-		if (i == dp) *s2++ = '.';
-	}
-	if (i <= dp) {
-		while (i++ <= dp) *s2++ = '0';
-		*s2++ = '.';
-	}
-	if ((s2[-1]=='.') && !(flags & FL_ALT)) s2--;
-	*s2 = '\0';
-	return s;
-}
-
-char *
-_f_print(va_list *ap, int flags, char *s, char c, int precision)
-{
-	register char *old_s = s;
-	long double ld_val;
-
-	if (flags & FL_LONGDOUBLE) ld_val = va_arg(*ap, long double);
-	else ld_val = (long double) va_arg(*ap, double);
-
-	switch(c) {
-	case 'f':
-		s = _pfloat(ld_val, s, precision, flags);
-		break;
-	case 'e':
-	case 'E':
-		s = _pscien(ld_val, s, precision , flags);
-		break;
-	case 'g':
-	case 'G':
-		s = _gcvt(ld_val, precision, s, flags);
-		s += strlen(s);
-		break;
-	}
-	if ( c == 'E' || c == 'G') {
-		while (*old_s && *old_s != 'e') old_s++;
-		if (*old_s == 'e') *old_s = 'E';
-	}
-	return s;
-}
-#endif	/* NOFLOAT */
-/* $Header: /cvsup/minix/src/lib/ack/fphook/fphook.c,v 1.1 2005/10/10 15:27:44 beng Exp $ */
-
-#include <stdlib.h>
-#include "../ansi/ext_fmt.h"
-
-void _str_ext_cvt(const char *s, char **ss, struct EXTEND *e);
-double _ext_dbl_cvt(struct EXTEND *e);
-
-double
-strtod(const char *p, char **pp)
-{
-	struct EXTEND e;
-
-	_str_ext_cvt(p, pp, &e);
-	return _ext_dbl_cvt(&e);
-}
Index: trunk/minix/lib/ack/fphook/fptrp.s
===================================================================
--- trunk/minix/lib/ack/fphook/fptrp.s	(revision 9)
+++ 	(revision )
@@ -1,19 +1,0 @@
-#
-.sect .text; .sect .rom; .sect .data; .sect .bss
-.define __fptrp
-.sect .text
-__fptrp:
-#if __i386
-	push	ebp
-	mov	ebp, esp
-	mov	eax, 8(bp)
-	call	.Xtrp
-	leave
-	ret
-#else /* i86 */
-	push	bp
-	mov	bp, sp
-	mov	ax, 4(bp)
-	call	.Xtrp
-	jmp	.cret
-#endif
Index: trunk/minix/lib/ack/fphook/get_put.h
===================================================================
--- trunk/minix/lib/ack/fphook/get_put.h	(revision 9)
+++ 	(revision )
@@ -1,41 +1,0 @@
-/*
-  (c) copyright 1988 by the Vrije Universiteit, Amsterdam, The Netherlands.
-  See the copyright notice in the ACK home directory, in the file "Copyright".
-*/
-
-/* $Header: /cvsup/minix/src/lib/ack/fphook/get_put.h,v 1.1 2005/10/10 15:27:44 beng Exp $ */
-
-#include <byte_order.h>
-
-#if CHAR_UNSIGNED
-#define Xchar(ch)	(ch)
-#else
-#define Xchar(ch)	((ch) & 0377)
-#endif
-
-#define BYTES_REVERSED (MSB_AT_LOW_ADDRESS != FL_MSB_AT_LOW_ADDRESS)
-#define WORDS_REVERSED (MSW_AT_LOW_ADDRESS != FL_MSW_AT_LOW_ADDRESS)
-#define LONGS_REVERSED (FL_MSL_AT_LOW_ADDRESS)
-
-#if BYTES_REVERSED
-#define uget2(c)	(Xchar((c)[1]) | ((unsigned) Xchar((c)[0]) << 8))
-#define Xput2(i, c)	(((c)[1] = (i)), ((c)[0] = (i) >> 8))
-#define put2(i, c)	{ register int j = (i); Xput2(j, c); }
-#else
-#define uget2(c)	(* ((unsigned short *) (c)))
-#define Xput2(i, c)	(* ((short *) (c)) = (i))
-#define put2(i, c)	Xput2(i, c)
-#endif
-
-#define get2(c)		((short) uget2(c))
-
-#if WORDS_REVERSED || BYTES_REVERSED
-#define get4(c)		(uget2((c)+2) | ((long) uget2(c) << 16))
-#define put4(l, c)	{ register long x=(l); \
-			  Xput2((int)x,(c)+2); \
-			  Xput2((int)(x>>16),(c)); \
-			}
-#else
-#define get4(c)		(* ((long *) (c)))
-#define put4(l, c)	(* ((long *) (c)) = (l))
-#endif
Index: trunk/minix/lib/ack/fphook/mlf4.fc
===================================================================
--- trunk/minix/lib/ack/fphook/mlf4.fc	(revision 9)
+++ 	(revision )
@@ -1,25 +1,0 @@
-/*
-  (c) copyright 1988 by the Vrije Universiteit, Amsterdam, The Netherlands.
-  See the copyright notice in the ACK home directory, in the file "Copyright".
-*/
-
-/* $Header: /cvsup/minix/src/lib/ack/fphook/mlf4.fc,v 1.1 2005/10/10 15:27:44 beng Exp $ */
-
-/*
- * Multiply Single Precesion Float (MLF 4)
- */
-
-#include	"FP_types.h"
-
-void
-mlf4(s2,s1)
-SINGLE	s1,s2;
-{
-	EXTEND	e1,e2;
-
-	extend(&s1,&e1,sizeof(SINGLE));
-	extend(&s2,&e2,sizeof(SINGLE));
-		/* do a multiply */
-	mul_ext(&e1,&e2);
-	compact(&e1,&s1,sizeof(SINGLE));
-}
Index: trunk/minix/lib/ack/fphook/mlf8.fc
===================================================================
--- trunk/minix/lib/ack/fphook/mlf8.fc	(revision 9)
+++ 	(revision )
@@ -1,25 +1,0 @@
-/*
-  (c) copyright 1988 by the Vrije Universiteit, Amsterdam, The Netherlands.
-  See the copyright notice in the ACK home directory, in the file "Copyright".
-*/
-
-/* $Header: /cvsup/minix/src/lib/ack/fphook/mlf8.fc,v 1.1 2005/10/10 15:27:44 beng Exp $ */
-
-/*
- * Multiply Double Precision Float (MLF 8)
- */
-
-#include	"FP_types.h"
-
-void
-mlf8(s2,s1)
-DOUBLE	s1,s2;
-{
-	EXTEND	e1,e2;
-
-	extend(&s1.d[0],&e1,sizeof(DOUBLE));
-	extend(&s2.d[0],&e2,sizeof(DOUBLE));
-		/* do a multiply */
-	mul_ext(&e1,&e2);
-	compact(&e1,&s1.d[0],sizeof(DOUBLE));
-}
Index: trunk/minix/lib/ack/fphook/mul_ext.fc
===================================================================
--- trunk/minix/lib/ack/fphook/mul_ext.fc	(revision 9)
+++ 	(revision )
@@ -1,98 +1,0 @@
-/*
-  (c) copyright 1988 by the Vrije Universiteit, Amsterdam, The Netherlands.
-  See the copyright notice in the ACK home directory, in the file "Copyright".
-*/
-
-/* $Header: /cvsup/minix/src/lib/ack/fphook/mul_ext.fc,v 1.1 2005/10/10 15:27:44 beng Exp $ */
-
-/*
-	ROUTINE TO MULTIPLY TWO EXTENDED FORMAT NUMBERS
-*/
-
-# include "FP_bias.h"
-# include "FP_trap.h"
-# include "FP_types.h"
-# include "FP_shift.h"
-
-void
-mul_ext(e1,e2)
-EXTEND	*e1,*e2;
-{
-	register int	i,j;		/* loop control	*/
-	unsigned short	mp[4];		/* multiplier */
-	unsigned short	mc[4];		/* multipcand */
-	unsigned short	result[8];	/* result */
-	register unsigned short *pres;
-
-	/* first save the sign (XOR)			*/
-	e1->sign ^= e2->sign;
-
-	/* compute new exponent */
-	e1->exp += e2->exp + 1;
-	/* 128 bit multiply of mantissas			*/
-
-		/* assign unknown long formats		*/
-		/* to known unsigned word formats	*/
-	mp[0] = e1->m1 >> 16;
-	mp[1] = (unsigned short) e1->m1;
-	mp[2] = e1->m2 >> 16;
-	mp[3] = (unsigned short) e1->m2;
-	mc[0] = e2->m1 >> 16;
-	mc[1] = (unsigned short) e2->m1;
-	mc[2] = e2->m2 >> 16;
-	mc[3] = (unsigned short) e2->m2;
-	for (i = 8; i--;) {
-		result[i] = 0;
-	}
-	/*
-	 *	fill registers with their components
-	 */
-	for(i=4, pres = &result[4];i--;pres--) if (mp[i]) {
-		unsigned short k = 0;
-		unsigned long mpi = mp[i];
-		for(j=4;j--;) {
-			unsigned long tmp = (unsigned long)pres[j] + k;
-			if (mc[j]) tmp += mpi * mc[j];
-			pres[j] = tmp;
-			k = tmp >> 16;
-		}
-		pres[-1] = k;
-	}
-        if (! (result[0] & 0x8000)) {
-                e1->exp--;
-                for (i = 0; i <= 3; i++) {
-                        result[i] <<= 1;
-                        if (result[i+1]&0x8000) result[i] |= 1;
-                }
-                result[4] <<= 1;
-        }
-
-	/*
-	 *	combine the registers to a total
-	 */
-	e1->m1 = ((unsigned long)(result[0]) << 16) + result[1];
-	e1->m2 = ((unsigned long)(result[2]) << 16) + result[3];
-	if (result[4] & 0x8000) {
-		if (++e1->m2 == 0)
-			if (++e1->m1 == 0) {
-				e1->m1 = NORMBIT;
-				e1->exp++;
-			}
-	}
-
-					/* check for overflow	*/
-	if (e1->exp >= EXT_MAX)	{
-		trap(EFOVFL);
-			/* if caught 			*/
-			/* return signed infinity	*/
-		e1->exp = EXT_MAX;
-infinity:	e1->m1 = e1->m2 =0L;
-		return;
-	}
-				/* check for underflow	*/
-	if (e1->exp < EXT_MIN)	{
-		trap(EFUNFL);
-		e1->exp = EXT_MIN;
-		goto infinity;
-	}
-}
Index: trunk/minix/lib/ack/fphook/ngf4.fc
===================================================================
--- trunk/minix/lib/ack/fphook/ngf4.fc	(revision 9)
+++ 	(revision )
@@ -1,27 +1,0 @@
-/*
-  (c) copyright 1988 by the Vrije Universiteit, Amsterdam, The Netherlands.
-  See the copyright notice in the ACK home directory, in the file "Copyright".
-*/
-
-/* $Header: /cvsup/minix/src/lib/ack/fphook/ngf4.fc,v 1.1 2005/10/10 15:27:44 beng Exp $ */
-
-/*
-		NEGATE A FLOATING POINT (NGF 4)
-*/
-/********************************************************/
-
-#include "FP_types.h"
-#include "get_put.h"
-
-#define OFF ((FL_MSW_AT_LOW_ADDRESS ? 0 : 2) + (FL_MSB_AT_LOW_ADDRESS ? 0 : 1))
-void
-ngf4(f)
-SINGLE	f;
-{
-	unsigned char *p;
-
-	if (f != (SINGLE) 0) {
-		p = (unsigned char *) &f + OFF;
-		*p ^= 0x80;
-	}
-}
Index: trunk/minix/lib/ack/fphook/ngf8.fc
===================================================================
--- trunk/minix/lib/ack/fphook/ngf8.fc	(revision 9)
+++ 	(revision )
@@ -1,28 +1,0 @@
-/*
-  (c) copyright 1988 by the Vrije Universiteit, Amsterdam, The Netherlands.
-  See the copyright notice in the ACK home directory, in the file "Copyright".
-*/
-
-/* $Header: /cvsup/minix/src/lib/ack/fphook/ngf8.fc,v 1.1 2005/10/10 15:27:44 beng Exp $ */
-
-/*
-		NEGATE A FLOATING POINT (NGF 8)
-*/
-/********************************************************/
-
-#include "FP_types.h"
-#include "get_put.h"
-
-#define OFF ((FL_MSL_AT_LOW_ADDRESS ? 0 : 4) + (FL_MSW_AT_LOW_ADDRESS ? 0 : 2) + (FL_MSB_AT_LOW_ADDRESS ? 0 : 1))
-
-void
-ngf8(f)
-DOUBLE	f;
-{
-	unsigned char	*p;
-
-	if (f.d[0] != 0 || f.d[1] != 0) {
-		p = (unsigned char *) &f + OFF;
-		*p ^= 0x80;
-	}
-}
Index: trunk/minix/lib/ack/fphook/nrm_ext.fc
===================================================================
--- trunk/minix/lib/ack/fphook/nrm_ext.fc	(revision 9)
+++ 	(revision )
@@ -1,50 +1,0 @@
-/*
-  (c) copyright 1988 by the Vrije Universiteit, Amsterdam, The Netherlands.
-  See the copyright notice in the ACK home directory, in the file "Copyright".
-*/
-
-/* $Header: /cvsup/minix/src/lib/ack/fphook/nrm_ext.fc,v 1.1 2005/10/10 15:27:44 beng Exp $ */
-
-/********************************************************/
-/*
-	NORMALIZE an EXTENDED FORMAT NUMBER
-*/
-/********************************************************/
-
-#include "FP_shift.h"
-#include "FP_types.h"
-
-void
-nrm_ext(e1)
-EXTEND	*e1;
-{
-		/* we assume that the mantissa != 0	*/
-		/* if it is then just return		*/
-		/* to let it be a problem elsewhere	*/
-		/* THAT IS, The exponent is not set to	*/
-		/* zero. If we don't test here an	*/
-		/* infinite loop is generated when	*/
-		/* mantissa is zero			*/
-
-	if ((e1->m1 | e1->m2) == 0L)
-		return;
-
-		/* if top word is zero mov low word	*/
-		/* to top word, adjust exponent value	*/
-	if (e1->m1 == 0L)	{
-		e1->m1 = e1->m2;
-		e1->m2 = 0L;
-		e1->exp -= 32;
-	}
-	if ((e1->m1 & NORMBIT) == 0) {
-		unsigned long l = ((unsigned long)NORMBIT >> 1);
-		int cnt = -1;
-
-		while (! (l & e1->m1)) {
-			l >>= 1;
-			cnt--;
-		}
-		e1->exp += cnt;
-		b64_sft(&(e1->mantissa), cnt);
-	}
-}
Index: trunk/minix/lib/ack/fphook/sbf4.fc
===================================================================
--- trunk/minix/lib/ack/fphook/sbf4.fc	(revision 9)
+++ 	(revision )
@@ -1,27 +1,0 @@
-/*
- (c) copyright 1988 by the Vrije Universiteit, Amsterdam, The Netherlands.
-  See the copyright notice in the ACK home directory, in the file "Copyright".
-*/
-
-/* $Header: /cvsup/minix/src/lib/ack/fphook/sbf4.fc,v 1.1 2005/10/10 15:27:44 beng Exp $ */
-
-/*
-	SUBTRACT TWO FLOATS - SINGLE Precision (SBF 4)
-*/
-
-#include	"FP_types.h"
-
-void
-sbf4(s2,s1)
-SINGLE	s1,s2;
-{
-	EXTEND e1,e2;
-
-	if (s2 == (SINGLE) 0) {
-		return;
-	}
-	extend(&s1,&e1,sizeof(SINGLE));
-	extend(&s2,&e2,sizeof(SINGLE));
-	sub_ext(&e1,&e2);
-	compact(&e1,&s1,sizeof(SINGLE));
-}
Index: trunk/minix/lib/ack/fphook/sbf8.fc
===================================================================
--- trunk/minix/lib/ack/fphook/sbf8.fc	(revision 9)
+++ 	(revision )
@@ -1,27 +1,0 @@
-/*
-  (c) copyright 1988 by the Vrije Universiteit, Amsterdam, The Netherlands.
-  See the copyright notice in the ACK home directory, in the file "Copyright".
-*/
-
-/* $Header: /cvsup/minix/src/lib/ack/fphook/sbf8.fc,v 1.1 2005/10/10 15:27:44 beng Exp $ */
-
-/*
-	SUBTRACT TWO FLOATS - DOUBLE Precision (SBF 8)
-*/
-
-#include	"FP_types.h"
-
-void
-sbf8(s2,s1)
-DOUBLE	s1,s2;
-{
-	EXTEND e1, e2;
-
-	if (s2.d[0] == 0 && s2.d[1] == 0) {
-		return;
-	}
-	extend(&s1.d[0],&e1,sizeof(DOUBLE));
-	extend(&s2.d[0],&e2,sizeof(DOUBLE));
-	sub_ext(&e1,&e2);
-	compact(&e1,&s1.d[0],sizeof(DOUBLE));
-}
Index: trunk/minix/lib/ack/fphook/sft_ext.fc
===================================================================
--- trunk/minix/lib/ack/fphook/sft_ext.fc	(revision 9)
+++ 	(revision )
@@ -1,39 +1,0 @@
-/*
-  (c) copyright 1988 by the Vrije Universiteit, Amsterdam, The Netherlands.
-  See the copyright notice in the ACK home directory, in the file "Copyright".
-*/
-
-/* $Header: /cvsup/minix/src/lib/ack/fphook/sft_ext.fc,v 1.1 2005/10/10 15:27:44 beng Exp $ */
-
-/*
-	SHIFT TWO EXTENDED NUMBERS INTO PROPER
-	ALIGNMENT FOR ADDITION (exponents are equal)
-	Numbers should not be zero on entry.
-*/
-
-#include "FP_types.h"
-
-void
-sft_ext(e1,e2)
-EXTEND	*e1,*e2;
-{
-	register	EXTEND	*s;
-	register	int	diff;
-
-	diff = e1->exp - e2->exp;
-
-	if (!diff)
-		return;	/* exponents are equal	*/
-
-	if (diff < 0)	{ /* e2 is larger	*/
-			/* shift e1		*/
-		diff = -diff;
-		s = e1;
-	}
-	else		/* e1 is larger		*/
-			/* shift e2		*/
-		s = e2;
-
-	s->exp += diff;
-	b64_sft(&(s->mantissa), diff);
-}
Index: trunk/minix/lib/ack/fphook/shifter.fc
===================================================================
--- trunk/minix/lib/ack/fphook/shifter.fc	(revision 9)
+++ 	(revision )
@@ -1,75 +1,0 @@
-/*
-  (c) copyright 1988 by the Vrije Universiteit, Amsterdam, The Netherlands.
-  See the copyright notice in the ACK home directory, in the file "Copyright".
-*/
-
-/* $Header: /cvsup/minix/src/lib/ack/fphook/shifter.fc,v 1.1 2005/10/10 15:27:44 beng Exp $ */
-
-# include "FP_types.h"
-
-void
-b64_sft(e1,n)
-B64	*e1;
-int	n;
-{
-	if (n > 0) {
-		if (n > 63) {
-			e1->l_32 = 0;
-			e1->h_32 = 0;
-			return;
-		}
-		if (n >= 32) {
-			e1->l_32 = e1->h_32;
-			e1->h_32 = 0;
-			n -= 32;
-		}
-		if (n > 0) {
-			e1->l_32 >>= n;
-			if (e1->h_32 != 0) {
-				e1->l_32 |= (e1->h_32 << (32 - n));
-				e1->h_32 >>= n;
-			}
-		}
-		return;
-	}
-	n = -n;
-	if (n > 0) {
-		if (n > 63) {
-			e1->l_32 = 0;
-			e1->h_32 = 0;
-			return;
-		}
-		if (n >= 32) {
-			e1->h_32 = e1->l_32;
-			e1->l_32 = 0;
-			n -= 32;
-		}
-		if (n > 0) {
-			e1->h_32 <<= n;
-			if (e1->l_32 != 0) {
-				e1->h_32 |= (e1->l_32 >> (32 - n));
-				e1->l_32 <<= n;
-			}
-		}
-	}
-}
-
-void
-b64_lsft(e1)
-B64	*e1;
-{
-	/*	shift left 1 bit */
-	e1->h_32 <<= 1;
-	if (e1->l_32 & 0x80000000L) e1->h_32 |= 1;
-	e1->l_32 <<= 1;
-}
-
-void
-b64_rsft(e1)
-B64	*e1;
-{
-	/*	shift right 1 bit */
-	e1->l_32 >>= 1;
-	if (e1->h_32 & 1) e1->l_32 |= 0x80000000L;
-	e1->h_32 >>= 1;
-}
Index: trunk/minix/lib/ack/fphook/strtod.c
===================================================================
--- trunk/minix/lib/ack/fphook/strtod.c	(revision 9)
+++ 	(revision )
@@ -1,9 +1,0 @@
-#include	<stdio.h>
-#include	<stdlib.h>
-
-double
-strtod(const char *p, char **pp)
-{
-	fprintf(stderr,"cannot print floating point\n");
-	exit(EXIT_FAILURE);
-}
Index: trunk/minix/lib/ack/fphook/sub_ext.fc
===================================================================
--- trunk/minix/lib/ack/fphook/sub_ext.fc	(revision 9)
+++ 	(revision )
@@ -1,53 +1,0 @@
-/*
-  (c) copyright 1988 by the Vrije Universiteit, Amsterdam, The Netherlands.
-  See the copyright notice in the ACK home directory, in the file "Copyright".
-*/
-
-/* $Header: /cvsup/minix/src/lib/ack/fphook/sub_ext.fc,v 1.1 2005/10/10 15:27:44 beng Exp $ */
-
-/*
-	SUBTRACT 2 EXTENDED FORMAT NUMBERS
-*/
-
-#include "FP_types.h"
-
-void
-sub_ext(e1,e2)
-EXTEND	*e1,*e2;
-{
-	if ((e2->m1 | e2->m2) == 0L) {
-		return;
-	}
-	if ((e1->m1 | e1->m2) == 0L) {
-		*e1 = *e2;
-		e1->sign = e2->sign ? 0 : 1;
-		return;
-	}
-	sft_ext(e1, e2);
-	if (e1->sign != e2->sign) {
-		/* e1 - e2 = e1 + (-e2) */
-		if (b64_add(&e1->mantissa,&e2->mantissa)) { /* addition carry */
-                	b64_rsft(&e1->mantissa);      /* shift mantissa one bit RIGHT */
-                	e1->m1 |= 0x80000000L;  /* set max bit  */
-                	e1->exp++;              /* increase the exponent */
-        	}
-	}
-        else if (e2->m1 > e1->m1 ||
-                 (e2->m1 == e1->m1 && e2->m2 > e1->m2)) {
-		/*	abs(e2) > abs(e1) */
-		if (e1->m2 > e2->m2) {
-			e2->m1 -= 1;	/* carry in */
-		}
-		e2->m1 -= e1->m1;
-		e2->m2 -= e1->m2;
-		*e1 = *e2;
-		e1->sign = e2->sign ? 0 : 1;
-	}
-	else {
-		if (e2->m2 > e1->m2)
-			e1->m1 -= 1;	/* carry in */
-		e1->m1 -= e2->m1;
-		e1->m2 -= e2->m2;
-	}
-	nrm_ext(e1);
-}
Index: trunk/minix/lib/ack/fphook/zrf4.fc
===================================================================
--- trunk/minix/lib/ack/fphook/zrf4.fc	(revision 9)
+++ 	(revision )
@@ -1,19 +1,0 @@
-/*
-  (c) copyright 1988 by the Vrije Universiteit, Amsterdam, The Netherlands.
-  See the copyright notice in the ACK home directory, in the file "Copyright".
-*/
-
-/* $Header: /cvsup/minix/src/lib/ack/fphook/zrf4.fc,v 1.1 2005/10/10 15:27:44 beng Exp $ */
-
-/*
-	return a zero float (ZRF 4)
-*/
-
-#include "FP_types.h"
-
-void
-zrf4(l)
-SINGLE	*l;
-{
-	*l = 0L;
-}
Index: trunk/minix/lib/ack/fphook/zrf8.fc
===================================================================
--- trunk/minix/lib/ack/fphook/zrf8.fc	(revision 9)
+++ 	(revision )
@@ -1,21 +1,0 @@
-/*
-  (c) copyright 1988 by the Vrije Universiteit, Amsterdam, The Netherlands.
-  See the copyright notice in the ACK home directory, in the file "Copyright".
-*/
-
-/* $Header: /cvsup/minix/src/lib/ack/fphook/zrf8.fc,v 1.1 2005/10/10 15:27:44 beng Exp $ */
-
-/*
-	return a zero double (ZRF 8)
-*/
-
-#include "FP_types.h"
-
-void
-zrf8(z)
-DOUBLE	*z;
-{
-
-	z->d[0] = 0L;
-	z->d[1] = 0L;
-}
Index: trunk/minix/lib/ack/fphook/zrf_ext.fc
===================================================================
--- trunk/minix/lib/ack/fphook/zrf_ext.fc	(revision 9)
+++ 	(revision )
@@ -1,22 +1,0 @@
-/*
-  (c) copyright 1988 by the Vrije Universiteit, Amsterdam, The Netherlands.
-  See the copyright notice in the ACK home directory, in the file "Copyright".
-*/
-
-/* $Header: /cvsup/minix/src/lib/ack/fphook/zrf_ext.fc,v 1.1 2005/10/10 15:27:44 beng Exp $ */
-
-/*
-	ZERO and return EXTEND FORMAT FLOAT
-*/
-
-#include "FP_types.h"
-
-void
-zrf_ext(e)
-EXTEND	*e;
-{
-	e->m1 = 0;
-	e->m2 = 0;
-	e->exp = 0;
-	e->sign = 0;
-}
Index: trunk/minix/lib/ack/h/em_abs.h
===================================================================
--- trunk/minix/lib/ack/h/em_abs.h	(revision 9)
+++ 	(revision )
@@ -1,35 +1,0 @@
-/* $Header: /cvsup/minix/src/lib/ack/h/em_abs.h,v 1.1 2005/10/10 15:27:44 beng Exp $ */
-/*
- * (c) copyright 1987 by the Vrije Universiteit, Amsterdam, The Netherlands.
- * See the copyright notice in the ACK home directory, in the file "Copyright".
- */
-#define LINO_AD         0
-#define FILN_AD         4
-
-#define LINO            (*(int    *)(_hol0()+LINO_AD))
-#define FILN            (*(char  **)(_hol0()+FILN_AD))
-
-#define EARRAY          0
-#define ERANGE          1
-#define ESET            2
-#define EIOVFL          3
-#define EFOVFL          4
-#define EFUNFL          5
-#define EIDIVZ          6
-#define EFDIVZ          7
-#define EIUND           8
-#define EFUND           9
-#define ECONV           10
-
-#define ESTACK          16
-#define EHEAP           17
-#define EILLINS         18
-#define EODDZ           19
-#define ECASE           20
-#define EMEMFLT         21
-#define EBADPTR         22
-#define EBADPC          23
-#define EBADLAE         24
-#define EBADMON         25
-#define EBADLIN         26
-#define EBADGTO         27
Index: trunk/minix/lib/ack/h/m2_traps.h
===================================================================
--- trunk/minix/lib/ack/h/m2_traps.h	(revision 9)
+++ 	(revision )
@@ -1,16 +1,0 @@
-/* $Header: /cvsup/minix/src/lib/ack/h/m2_traps.h,v 1.1 2005/10/10 15:27:44 beng Exp $ */
-/*
- * (c) copyright 1990 by the Vrije Universiteit, Amsterdam, The Netherlands.
- * See the copyright notice in the ACK home directory, in the file "Copyright".
- */
-
-/* Modula-2 runtime errors */
-
-#define M2_TOOLARGE	64	/* stack of process too large */
-#define M2_TOOMANY	65	/* too many nested traps & handlers */
-#define M2_NORESULT	66	/* no RETURN from procedure function */
-#define M2_UOVFL	67	/* cardinal overflow */
-#define M2_FORCH	68	/* FOR-loop control variable changed */
-#define M2_UUVFL	69	/* cardinal underflow */
-#define M2_INTERNAL	70	/* internal error, should not happen */
-#define M2_UNIXSIG	71	/* unix signal */
Index: trunk/minix/lib/ack/h/pc_err.h
===================================================================
--- trunk/minix/lib/ack/h/pc_err.h	(revision 9)
+++ 	(revision )
@@ -1,29 +1,0 @@
-/* $Header: /cvsup/minix/src/lib/ack/h/pc_err.h,v 1.1 2005/10/10 15:27:44 beng Exp $ */
-/*
- * (c) copyright 1987 by the Vrije Universiteit, Amsterdam, The Netherlands.
- * See the copyright notice in the ACK home directory, in the file "Copyright".
- */
-#define	EARGC	64
-#define	EEXP	65
-#define	ELOG	66
-#define	ESQT	67
-#define	EASS	68
-#define	EPACK	69
-#define	EUNPACK	70
-#define	EMOD	71
-#define	EBADF	72
-#define	EFREE	73
-#define EFUNASS	74
-#define EWIDTH	75
-
-#define	EWRITEF	96
-#define	EREADF	97
-#define	EEOF	98
-#define	EFTRUNC	99
-#define	ERESET	100
-#define	EREWR	101
-#define	ECLOSE	102
-#define	EREAD	103
-#define	EWRITE	104
-#define	EDIGIT	105
-#define	EASCII	106
Index: trunk/minix/lib/ack/h/pc_file.h
===================================================================
--- trunk/minix/lib/ack/h/pc_file.h	(revision 9)
+++ 	(revision )
@@ -1,24 +1,0 @@
-/* $Header: /cvsup/minix/src/lib/ack/h/pc_file.h,v 1.1 2005/10/10 15:27:44 beng Exp $ */
-/*
- * (c) copyright 1987 by the Vrije Universiteit, Amsterdam, The Netherlands.
- * See the copyright notice in the ACK home directory, in the file "Copyright".
- */
-#define	WRBIT	0100000
-#define	TXTBIT	040000
-#define	EOFBIT	020000
-#define	ELNBIT	010000
-#define	WINDOW	04000
-#define	MAGIC	0252
-
-#define	PC_BUFLEN	1024
-
-struct file {
-	char	*ptr;
-	unsigned flags;
-	char	*fname;
-	int	ufd;
-	int	size;
-	int	count;
-	int	buflen;
-	char	bufadr[PC_BUFLEN];
-};
Index: trunk/minix/lib/ack/h/pc_math.h
===================================================================
--- trunk/minix/lib/ack/h/pc_math.h	(revision 9)
+++ 	(revision )
@@ -1,42 +1,0 @@
-/*
- * localmath.h - This header is used by the mathematical library.
- */
-/* $Header: /cvsup/minix/src/lib/ack/h/pc_math.h,v 1.1 2005/10/10 15:27:44 beng Exp $ */
-
-/* some constants (Hart & Cheney) */
-#define	M_PI		3.14159265358979323846264338327950288
-#define	M_2PI		6.28318530717958647692528676655900576
-#define	M_3PI_4		2.35619449019234492884698253745962716
-#define	M_PI_2		1.57079632679489661923132169163975144
-#define	M_3PI_8		1.17809724509617246442349126872981358
-#define	M_PI_4		0.78539816339744830961566084581987572
-#define	M_PI_8		0.39269908169872415480783042290993786
-#define	M_1_PI		0.31830988618379067153776752674502872
-#define	M_2_PI		0.63661977236758134307553505349005744
-#define	M_4_PI		1.27323954473516268615107010698011488
-#define	M_E		2.71828182845904523536028747135266250
-#define	M_LOG2E		1.44269504088896340735992468100189213
-#define	M_LOG10E	0.43429448190325182765112891891660508
-#define	M_LN2		0.69314718055994530941723212145817657
-#define	M_LN10		2.30258509299404568401799145468436421
-#define	M_SQRT2		1.41421356237309504880168872420969808
-#define	M_1_SQRT2	0.70710678118654752440084436210484904
-#define	M_EULER		0.57721566490153286060651209008240243
-
-/* macros for constructing polynomials */
-#define	POLYNOM1(x, a)	((a)[1]*(x)+(a)[0])
-#define	POLYNOM2(x, a)	(POLYNOM1((x),(a)+1)*(x)+(a)[0])
-#define	POLYNOM3(x, a)	(POLYNOM2((x),(a)+1)*(x)+(a)[0])
-#define	POLYNOM4(x, a)	(POLYNOM3((x),(a)+1)*(x)+(a)[0])
-#define	POLYNOM5(x, a)	(POLYNOM4((x),(a)+1)*(x)+(a)[0])
-#define	POLYNOM6(x, a)	(POLYNOM5((x),(a)+1)*(x)+(a)[0])
-#define	POLYNOM7(x, a)	(POLYNOM6((x),(a)+1)*(x)+(a)[0])
-#define	POLYNOM8(x, a)	(POLYNOM7((x),(a)+1)*(x)+(a)[0])
-#define	POLYNOM9(x, a)	(POLYNOM8((x),(a)+1)*(x)+(a)[0])
-#define	POLYNOM10(x, a)	(POLYNOM9((x),(a)+1)*(x)+(a)[0])
-#define	POLYNOM11(x, a)	(POLYNOM10((x),(a)+1)*(x)+(a)[0])
-#define	POLYNOM12(x, a)	(POLYNOM11((x),(a)+1)*(x)+(a)[0])
-#define	POLYNOM13(x, a)	(POLYNOM12((x),(a)+1)*(x)+(a)[0])
-
-#define	M_LN_MAX_D	(M_LN2 * DBL_MAX_EXP)
-#define	M_LN_MIN_D	(M_LN2 * (DBL_MIN_EXP - 1))
Index: trunk/minix/lib/ack/i386/Makefile
===================================================================
--- trunk/minix/lib/ack/i386/Makefile	(revision 9)
+++ 	(revision )
@@ -1,48 +1,0 @@
-#Generated from ./ack/i386/Makefile.in
-all: all-ack
-
-all-ack:
-all-gnu:
-
-makefiles: Makefile
-Makedepend-ack Makedepend-gnu: 
-	sh ../../generate.sh ./ack/i386 ../../obj-ack/ ../../obj-gnu
-
-Makefile: Makefile.in Makedepend-ack Makedepend-gnu
-	sh ../../generate.sh ./ack/i386 ../../obj-ack/ ../../obj-gnu
-	@echo
-	@echo *Attention*
-	@echo Makefile is regenerated... rerun command to see changes
-	@echo *Attention*
-	@echo
-
-all-ack: makefiles
-	mkdir -p ../../obj-ack//./ack/i386/em
-	cd em && $(MAKE) $@
-	mkdir -p ../../obj-ack//./ack/i386/head
-	cd head && $(MAKE) $@
-
-all-gnu: makefiles
-	cd em && $(MAKE) $@
-	cd head && $(MAKE) $@
-
-clean depend depend-ack depend-gnu:: makefiles
-	cd em && $(MAKE) $@
-	cd head && $(MAKE) $@
-
-makefiles: em/Makefile
-makefiles: head/Makefile
-
-em/Makefile: em/Makefile.in
-	cd em && sh ../../../generate.sh ./ack/i386/em ../../../obj-ack/ ../../../obj-gnu && $(MAKE) makefiles
-head/Makefile: head/Makefile.in
-	cd head && sh ../../../generate.sh ./ack/i386/head ../../../obj-ack/ ../../../obj-gnu && $(MAKE) makefiles
-
-clean::
-	rm -f ../../obj-ack//./ack/i386/*
-
-include Makedepend-ack
-include .depend-ack
-
-include Makedepend-gnu
-include .depend-gnu
Index: trunk/minix/lib/ack/i386/Makefile.in
===================================================================
--- trunk/minix/lib/ack/i386/Makefile.in	(revision 9)
+++ 	(revision )
@@ -1,4 +1,0 @@
-
-SUBDIRS="em head"
-
-TYPE=ack
Index: trunk/minix/lib/ack/i386/em/Makedepend-ack
===================================================================
--- trunk/minix/lib/ack/i386/em/Makedepend-ack	(revision 9)
+++ 	(revision )
@@ -1,72 +1,0 @@
-depend-ack:
-	rm .depend-ack
-	touch .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -Was-ack -E' em_adf4.s | sed -e 's:^\(.\):../../../obj-ack//./ack/i386/em/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -Was-ack -E' em_adf8.s | sed -e 's:^\(.\):../../../obj-ack//./ack/i386/em/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -Was-ack -E' em_adi.s | sed -e 's:^\(.\):../../../obj-ack//./ack/i386/em/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -Was-ack -E' em_and.s | sed -e 's:^\(.\):../../../obj-ack//./ack/i386/em/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -Was-ack -E' em_blm.s | sed -e 's:^\(.\):../../../obj-ack//./ack/i386/em/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -Was-ack -E' em_cff4.s | sed -e 's:^\(.\):../../../obj-ack//./ack/i386/em/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -Was-ack -E' em_cff8.s | sed -e 's:^\(.\):../../../obj-ack//./ack/i386/em/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -Was-ack -E' em_cfi.s | sed -e 's:^\(.\):../../../obj-ack//./ack/i386/em/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -Was-ack -E' em_cfu.s | sed -e 's:^\(.\):../../../obj-ack//./ack/i386/em/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -Was-ack -E' em_cif4.s | sed -e 's:^\(.\):../../../obj-ack//./ack/i386/em/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -Was-ack -E' em_cif8.s | sed -e 's:^\(.\):../../../obj-ack//./ack/i386/em/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -Was-ack -E' em_cii.s | sed -e 's:^\(.\):../../../obj-ack//./ack/i386/em/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -Was-ack -E' em_cmf4.s | sed -e 's:^\(.\):../../../obj-ack//./ack/i386/em/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -Was-ack -E' em_cmf8.s | sed -e 's:^\(.\):../../../obj-ack//./ack/i386/em/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -Was-ack -E' em_cms.s | sed -e 's:^\(.\):../../../obj-ack//./ack/i386/em/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -Was-ack -E' em_com.s | sed -e 's:^\(.\):../../../obj-ack//./ack/i386/em/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -Was-ack -E' em_csa4.s | sed -e 's:^\(.\):../../../obj-ack//./ack/i386/em/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -Was-ack -E' em_csb4.s | sed -e 's:^\(.\):../../../obj-ack//./ack/i386/em/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -Was-ack -E' em_cuf4.s | sed -e 's:^\(.\):../../../obj-ack//./ack/i386/em/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -Was-ack -E' em_cuf8.s | sed -e 's:^\(.\):../../../obj-ack//./ack/i386/em/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -Was-ack -E' em_cuu.s | sed -e 's:^\(.\):../../../obj-ack//./ack/i386/em/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -Was-ack -E' em_dup.s | sed -e 's:^\(.\):../../../obj-ack//./ack/i386/em/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -Was-ack -E' em_dvf4.s | sed -e 's:^\(.\):../../../obj-ack//./ack/i386/em/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -Was-ack -E' em_dvf8.s | sed -e 's:^\(.\):../../../obj-ack//./ack/i386/em/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -Was-ack -E' em_dvi.s | sed -e 's:^\(.\):../../../obj-ack//./ack/i386/em/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -Was-ack -E' em_dvu.s | sed -e 's:^\(.\):../../../obj-ack//./ack/i386/em/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -Was-ack -E' em_error.s | sed -e 's:^\(.\):../../../obj-ack//./ack/i386/em/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -Was-ack -E' em_exg.s | sed -e 's:^\(.\):../../../obj-ack//./ack/i386/em/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -Was-ack -E' em_fat.s | sed -e 's:^\(.\):../../../obj-ack//./ack/i386/em/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -Was-ack -E' em_fef4.s | sed -e 's:^\(.\):../../../obj-ack//./ack/i386/em/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -Was-ack -E' em_fef8.s | sed -e 's:^\(.\):../../../obj-ack//./ack/i386/em/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -Was-ack -E' em_fif4.s | sed -e 's:^\(.\):../../../obj-ack//./ack/i386/em/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -Was-ack -E' em_fif8.s | sed -e 's:^\(.\):../../../obj-ack//./ack/i386/em/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -Was-ack -E' em_fp8087.s | sed -e 's:^\(.\):../../../obj-ack//./ack/i386/em/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -Was-ack -E' em_gto.s | sed -e 's:^\(.\):../../../obj-ack//./ack/i386/em/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -Was-ack -E' em_hol0.s | sed -e 's:^\(.\):../../../obj-ack//./ack/i386/em/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -Was-ack -E' em_iaar.s | sed -e 's:^\(.\):../../../obj-ack//./ack/i386/em/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -Was-ack -E' em_ilar.s | sed -e 's:^\(.\):../../../obj-ack//./ack/i386/em/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -Was-ack -E' em_inn.s | sed -e 's:^\(.\):../../../obj-ack//./ack/i386/em/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -Was-ack -E' em_ior.s | sed -e 's:^\(.\):../../../obj-ack//./ack/i386/em/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -Was-ack -E' em_isar.s | sed -e 's:^\(.\):../../../obj-ack//./ack/i386/em/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -Was-ack -E' em_lar4.s | sed -e 's:^\(.\):../../../obj-ack//./ack/i386/em/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -Was-ack -E' em_loi.s | sed -e 's:^\(.\):../../../obj-ack//./ack/i386/em/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -Was-ack -E' em_mlf4.s | sed -e 's:^\(.\):../../../obj-ack//./ack/i386/em/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -Was-ack -E' em_mlf8.s | sed -e 's:^\(.\):../../../obj-ack//./ack/i386/em/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -Was-ack -E' em_mli.s | sed -e 's:^\(.\):../../../obj-ack//./ack/i386/em/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -Was-ack -E' em_mon.s | sed -e 's:^\(.\):../../../obj-ack//./ack/i386/em/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -Was-ack -E' em_ngf4.s | sed -e 's:^\(.\):../../../obj-ack//./ack/i386/em/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -Was-ack -E' em_ngf8.s | sed -e 's:^\(.\):../../../obj-ack//./ack/i386/em/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -Was-ack -E' em_ngi.s | sed -e 's:^\(.\):../../../obj-ack//./ack/i386/em/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -Was-ack -E' em_nop.s | sed -e 's:^\(.\):../../../obj-ack//./ack/i386/em/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -Was-ack -E' em_print.s | sed -e 's:^\(.\):../../../obj-ack//./ack/i386/em/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -Was-ack -E' em_rck.s | sed -e 's:^\(.\):../../../obj-ack//./ack/i386/em/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -Was-ack -E' em_rmi.s | sed -e 's:^\(.\):../../../obj-ack//./ack/i386/em/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -Was-ack -E' em_rmu.s | sed -e 's:^\(.\):../../../obj-ack//./ack/i386/em/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -Was-ack -E' em_rol.s | sed -e 's:^\(.\):../../../obj-ack//./ack/i386/em/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -Was-ack -E' em_ror.s | sed -e 's:^\(.\):../../../obj-ack//./ack/i386/em/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -Was-ack -E' em_sar4.s | sed -e 's:^\(.\):../../../obj-ack//./ack/i386/em/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -Was-ack -E' em_sbf4.s | sed -e 's:^\(.\):../../../obj-ack//./ack/i386/em/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -Was-ack -E' em_sbf8.s | sed -e 's:^\(.\):../../../obj-ack//./ack/i386/em/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -Was-ack -E' em_sbi.s | sed -e 's:^\(.\):../../../obj-ack//./ack/i386/em/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -Was-ack -E' em_set.s | sed -e 's:^\(.\):../../../obj-ack//./ack/i386/em/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -Was-ack -E' em_sli.s | sed -e 's:^\(.\):../../../obj-ack//./ack/i386/em/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -Was-ack -E' em_sri.s | sed -e 's:^\(.\):../../../obj-ack//./ack/i386/em/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -Was-ack -E' em_sti.s | sed -e 's:^\(.\):../../../obj-ack//./ack/i386/em/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -Was-ack -E' em_stop.s | sed -e 's:^\(.\):../../../obj-ack//./ack/i386/em/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -Was-ack -E' em_trp.s | sed -e 's:^\(.\):../../../obj-ack//./ack/i386/em/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -Was-ack -E' em_unknown.s | sed -e 's:^\(.\):../../../obj-ack//./ack/i386/em/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -Was-ack -E' em_xor.s | sed -e 's:^\(.\):../../../obj-ack//./ack/i386/em/\1:' >> .depend-ack
Index: trunk/minix/lib/ack/i386/em/Makedepend-gnu
===================================================================
--- trunk/minix/lib/ack/i386/em/Makedepend-gnu	(revision 9)
+++ 	(revision )
@@ -1,3 +1,0 @@
-depend-gnu:
-	rm .depend-gnu
-	touch .depend-gnu
Index: trunk/minix/lib/ack/i386/em/Makefile
===================================================================
--- trunk/minix/lib/ack/i386/em/Makefile	(revision 9)
+++ 	(revision )
@@ -1,244 +1,0 @@
-#Generated from ./ack/i386/em/Makefile.in
-all: all-ack
-
-all-ack:
-all-gnu:
-
-makefiles: Makefile
-Makedepend-ack Makedepend-gnu: 
-	sh ../../../generate.sh ./ack/i386/em ../../../obj-ack/ ../../../obj-gnu
-
-Makefile: Makefile.in Makedepend-ack Makedepend-gnu
-	sh ../../../generate.sh ./ack/i386/em ../../../obj-ack/ ../../../obj-gnu
-	@echo
-	@echo *Attention*
-	@echo Makefile is regenerated... rerun command to see changes
-	@echo *Attention*
-	@echo
-
-depend: depend-ack
-all-ack: ../../../obj-ack//libe.a
-
-../../../obj-ack//libe.a: ../../../obj-ack//libe.a(em_adf4.o)
-../../../obj-ack//libe.a: ../../../obj-ack//libe.a(em_adf8.o)
-../../../obj-ack//libe.a: ../../../obj-ack//libe.a(em_adi.o)
-../../../obj-ack//libe.a: ../../../obj-ack//libe.a(em_and.o)
-../../../obj-ack//libe.a: ../../../obj-ack//libe.a(em_blm.o)
-../../../obj-ack//libe.a: ../../../obj-ack//libe.a(em_cff4.o)
-../../../obj-ack//libe.a: ../../../obj-ack//libe.a(em_cff8.o)
-../../../obj-ack//libe.a: ../../../obj-ack//libe.a(em_cfi.o)
-../../../obj-ack//libe.a: ../../../obj-ack//libe.a(em_cfu.o)
-../../../obj-ack//libe.a: ../../../obj-ack//libe.a(em_cif4.o)
-../../../obj-ack//libe.a: ../../../obj-ack//libe.a(em_cif8.o)
-../../../obj-ack//libe.a: ../../../obj-ack//libe.a(em_cii.o)
-../../../obj-ack//libe.a: ../../../obj-ack//libe.a(em_cmf4.o)
-../../../obj-ack//libe.a: ../../../obj-ack//libe.a(em_cmf8.o)
-../../../obj-ack//libe.a: ../../../obj-ack//libe.a(em_cms.o)
-../../../obj-ack//libe.a: ../../../obj-ack//libe.a(em_com.o)
-../../../obj-ack//libe.a: ../../../obj-ack//libe.a(em_csa4.o)
-../../../obj-ack//libe.a: ../../../obj-ack//libe.a(em_csb4.o)
-../../../obj-ack//libe.a: ../../../obj-ack//libe.a(em_cuf4.o)
-../../../obj-ack//libe.a: ../../../obj-ack//libe.a(em_cuf8.o)
-../../../obj-ack//libe.a: ../../../obj-ack//libe.a(em_cuu.o)
-../../../obj-ack//libe.a: ../../../obj-ack//libe.a(em_dup.o)
-../../../obj-ack//libe.a: ../../../obj-ack//libe.a(em_dvf4.o)
-../../../obj-ack//libe.a: ../../../obj-ack//libe.a(em_dvf8.o)
-../../../obj-ack//libe.a: ../../../obj-ack//libe.a(em_dvi.o)
-../../../obj-ack//libe.a: ../../../obj-ack//libe.a(em_dvu.o)
-../../../obj-ack//libe.a: ../../../obj-ack//libe.a(em_error.o)
-../../../obj-ack//libe.a: ../../../obj-ack//libe.a(em_exg.o)
-../../../obj-ack//libe.a: ../../../obj-ack//libe.a(em_fat.o)
-../../../obj-ack//libe.a: ../../../obj-ack//libe.a(em_fef4.o)
-../../../obj-ack//libe.a: ../../../obj-ack//libe.a(em_fef8.o)
-../../../obj-ack//libe.a: ../../../obj-ack//libe.a(em_fif4.o)
-../../../obj-ack//libe.a: ../../../obj-ack//libe.a(em_fif8.o)
-../../../obj-ack//libe.a: ../../../obj-ack//libe.a(em_fp8087.o)
-../../../obj-ack//libe.a: ../../../obj-ack//libe.a(em_gto.o)
-../../../obj-ack//libe.a: ../../../obj-ack//libe.a(em_hol0.o)
-../../../obj-ack//libe.a: ../../../obj-ack//libe.a(em_iaar.o)
-../../../obj-ack//libe.a: ../../../obj-ack//libe.a(em_ilar.o)
-../../../obj-ack//libe.a: ../../../obj-ack//libe.a(em_inn.o)
-../../../obj-ack//libe.a: ../../../obj-ack//libe.a(em_ior.o)
-../../../obj-ack//libe.a: ../../../obj-ack//libe.a(em_isar.o)
-../../../obj-ack//libe.a: ../../../obj-ack//libe.a(em_lar4.o)
-../../../obj-ack//libe.a: ../../../obj-ack//libe.a(em_loi.o)
-../../../obj-ack//libe.a: ../../../obj-ack//libe.a(em_mlf4.o)
-../../../obj-ack//libe.a: ../../../obj-ack//libe.a(em_mlf8.o)
-../../../obj-ack//libe.a: ../../../obj-ack//libe.a(em_mli.o)
-../../../obj-ack//libe.a: ../../../obj-ack//libe.a(em_mon.o)
-../../../obj-ack//libe.a: ../../../obj-ack//libe.a(em_ngf4.o)
-../../../obj-ack//libe.a: ../../../obj-ack//libe.a(em_ngf8.o)
-../../../obj-ack//libe.a: ../../../obj-ack//libe.a(em_ngi.o)
-../../../obj-ack//libe.a: ../../../obj-ack//libe.a(em_nop.o)
-../../../obj-ack//libe.a: ../../../obj-ack//libe.a(em_print.o)
-../../../obj-ack//libe.a: ../../../obj-ack//libe.a(em_rck.o)
-../../../obj-ack//libe.a: ../../../obj-ack//libe.a(em_rmi.o)
-../../../obj-ack//libe.a: ../../../obj-ack//libe.a(em_rmu.o)
-../../../obj-ack//libe.a: ../../../obj-ack//libe.a(em_rol.o)
-../../../obj-ack//libe.a: ../../../obj-ack//libe.a(em_ror.o)
-../../../obj-ack//libe.a: ../../../obj-ack//libe.a(em_sar4.o)
-../../../obj-ack//libe.a: ../../../obj-ack//libe.a(em_sbf4.o)
-../../../obj-ack//libe.a: ../../../obj-ack//libe.a(em_sbf8.o)
-../../../obj-ack//libe.a: ../../../obj-ack//libe.a(em_sbi.o)
-../../../obj-ack//libe.a: ../../../obj-ack//libe.a(em_set.o)
-../../../obj-ack//libe.a: ../../../obj-ack//libe.a(em_sli.o)
-../../../obj-ack//libe.a: ../../../obj-ack//libe.a(em_sri.o)
-../../../obj-ack//libe.a: ../../../obj-ack//libe.a(em_sti.o)
-../../../obj-ack//libe.a: ../../../obj-ack//libe.a(em_stop.o)
-../../../obj-ack//libe.a: ../../../obj-ack//libe.a(em_trp.o)
-../../../obj-ack//libe.a: ../../../obj-ack//libe.a(em_unknown.o)
-../../../obj-ack//libe.a: ../../../obj-ack//libe.a(em_xor.o)
-
-../../../obj-ack//libe.a:
-	ar cr ../../../obj-ack//libe.a ../../../obj-ack//./ack/i386/em/*.o
-	rm ../../../obj-ack//./ack/i386/em/*.o
-
-../../../obj-ack//libe.a(em_adf4.o): em_adf4.s
-	cc -O -D_MINIX -D_POSIX_SOURCE -Was-ack -c -o ../../../obj-ack//./ack/i386/em/em_adf4.o em_adf4.s
-../../../obj-ack//libe.a(em_adf8.o): em_adf8.s
-	cc -O -D_MINIX -D_POSIX_SOURCE -Was-ack -c -o ../../../obj-ack//./ack/i386/em/em_adf8.o em_adf8.s
-../../../obj-ack//libe.a(em_adi.o): em_adi.s
-	cc -O -D_MINIX -D_POSIX_SOURCE -Was-ack -c -o ../../../obj-ack//./ack/i386/em/em_adi.o em_adi.s
-../../../obj-ack//libe.a(em_and.o): em_and.s
-	cc -O -D_MINIX -D_POSIX_SOURCE -Was-ack -c -o ../../../obj-ack//./ack/i386/em/em_and.o em_and.s
-../../../obj-ack//libe.a(em_blm.o): em_blm.s
-	cc -O -D_MINIX -D_POSIX_SOURCE -Was-ack -c -o ../../../obj-ack//./ack/i386/em/em_blm.o em_blm.s
-../../../obj-ack//libe.a(em_cff4.o): em_cff4.s
-	cc -O -D_MINIX -D_POSIX_SOURCE -Was-ack -c -o ../../../obj-ack//./ack/i386/em/em_cff4.o em_cff4.s
-../../../obj-ack//libe.a(em_cff8.o): em_cff8.s
-	cc -O -D_MINIX -D_POSIX_SOURCE -Was-ack -c -o ../../../obj-ack//./ack/i386/em/em_cff8.o em_cff8.s
-../../../obj-ack//libe.a(em_cfi.o): em_cfi.s
-	cc -O -D_MINIX -D_POSIX_SOURCE -Was-ack -c -o ../../../obj-ack//./ack/i386/em/em_cfi.o em_cfi.s
-../../../obj-ack//libe.a(em_cfu.o): em_cfu.s
-	cc -O -D_MINIX -D_POSIX_SOURCE -Was-ack -c -o ../../../obj-ack//./ack/i386/em/em_cfu.o em_cfu.s
-../../../obj-ack//libe.a(em_cif4.o): em_cif4.s
-	cc -O -D_MINIX -D_POSIX_SOURCE -Was-ack -c -o ../../../obj-ack//./ack/i386/em/em_cif4.o em_cif4.s
-../../../obj-ack//libe.a(em_cif8.o): em_cif8.s
-	cc -O -D_MINIX -D_POSIX_SOURCE -Was-ack -c -o ../../../obj-ack//./ack/i386/em/em_cif8.o em_cif8.s
-../../../obj-ack//libe.a(em_cii.o): em_cii.s
-	cc -O -D_MINIX -D_POSIX_SOURCE -Was-ack -c -o ../../../obj-ack//./ack/i386/em/em_cii.o em_cii.s
-../../../obj-ack//libe.a(em_cmf4.o): em_cmf4.s
-	cc -O -D_MINIX -D_POSIX_SOURCE -Was-ack -c -o ../../../obj-ack//./ack/i386/em/em_cmf4.o em_cmf4.s
-../../../obj-ack//libe.a(em_cmf8.o): em_cmf8.s
-	cc -O -D_MINIX -D_POSIX_SOURCE -Was-ack -c -o ../../../obj-ack//./ack/i386/em/em_cmf8.o em_cmf8.s
-../../../obj-ack//libe.a(em_cms.o): em_cms.s
-	cc -O -D_MINIX -D_POSIX_SOURCE -Was-ack -c -o ../../../obj-ack//./ack/i386/em/em_cms.o em_cms.s
-../../../obj-ack//libe.a(em_com.o): em_com.s
-	cc -O -D_MINIX -D_POSIX_SOURCE -Was-ack -c -o ../../../obj-ack//./ack/i386/em/em_com.o em_com.s
-../../../obj-ack//libe.a(em_csa4.o): em_csa4.s
-	cc -O -D_MINIX -D_POSIX_SOURCE -Was-ack -c -o ../../../obj-ack//./ack/i386/em/em_csa4.o em_csa4.s
-../../../obj-ack//libe.a(em_csb4.o): em_csb4.s
-	cc -O -D_MINIX -D_POSIX_SOURCE -Was-ack -c -o ../../../obj-ack//./ack/i386/em/em_csb4.o em_csb4.s
-../../../obj-ack//libe.a(em_cuf4.o): em_cuf4.s
-	cc -O -D_MINIX -D_POSIX_SOURCE -Was-ack -c -o ../../../obj-ack//./ack/i386/em/em_cuf4.o em_cuf4.s
-../../../obj-ack//libe.a(em_cuf8.o): em_cuf8.s
-	cc -O -D_MINIX -D_POSIX_SOURCE -Was-ack -c -o ../../../obj-ack//./ack/i386/em/em_cuf8.o em_cuf8.s
-../../../obj-ack//libe.a(em_cuu.o): em_cuu.s
-	cc -O -D_MINIX -D_POSIX_SOURCE -Was-ack -c -o ../../../obj-ack//./ack/i386/em/em_cuu.o em_cuu.s
-../../../obj-ack//libe.a(em_dup.o): em_dup.s
-	cc -O -D_MINIX -D_POSIX_SOURCE -Was-ack -c -o ../../../obj-ack//./ack/i386/em/em_dup.o em_dup.s
-../../../obj-ack//libe.a(em_dvf4.o): em_dvf4.s
-	cc -O -D_MINIX -D_POSIX_SOURCE -Was-ack -c -o ../../../obj-ack//./ack/i386/em/em_dvf4.o em_dvf4.s
-../../../obj-ack//libe.a(em_dvf8.o): em_dvf8.s
-	cc -O -D_MINIX -D_POSIX_SOURCE -Was-ack -c -o ../../../obj-ack//./ack/i386/em/em_dvf8.o em_dvf8.s
-../../../obj-ack//libe.a(em_dvi.o): em_dvi.s
-	cc -O -D_MINIX -D_POSIX_SOURCE -Was-ack -c -o ../../../obj-ack//./ack/i386/em/em_dvi.o em_dvi.s
-../../../obj-ack//libe.a(em_dvu.o): em_dvu.s
-	cc -O -D_MINIX -D_POSIX_SOURCE -Was-ack -c -o ../../../obj-ack//./ack/i386/em/em_dvu.o em_dvu.s
-../../../obj-ack//libe.a(em_error.o): em_error.s
-	cc -O -D_MINIX -D_POSIX_SOURCE -Was-ack -c -o ../../../obj-ack//./ack/i386/em/em_error.o em_error.s
-../../../obj-ack//libe.a(em_exg.o): em_exg.s
-	cc -O -D_MINIX -D_POSIX_SOURCE -Was-ack -c -o ../../../obj-ack//./ack/i386/em/em_exg.o em_exg.s
-../../../obj-ack//libe.a(em_fat.o): em_fat.s
-	cc -O -D_MINIX -D_POSIX_SOURCE -Was-ack -c -o ../../../obj-ack//./ack/i386/em/em_fat.o em_fat.s
-../../../obj-ack//libe.a(em_fef4.o): em_fef4.s
-	cc -O -D_MINIX -D_POSIX_SOURCE -Was-ack -c -o ../../../obj-ack//./ack/i386/em/em_fef4.o em_fef4.s
-../../../obj-ack//libe.a(em_fef8.o): em_fef8.s
-	cc -O -D_MINIX -D_POSIX_SOURCE -Was-ack -c -o ../../../obj-ack//./ack/i386/em/em_fef8.o em_fef8.s
-../../../obj-ack//libe.a(em_fif4.o): em_fif4.s
-	cc -O -D_MINIX -D_POSIX_SOURCE -Was-ack -c -o ../../../obj-ack//./ack/i386/em/em_fif4.o em_fif4.s
-../../../obj-ack//libe.a(em_fif8.o): em_fif8.s
-	cc -O -D_MINIX -D_POSIX_SOURCE -Was-ack -c -o ../../../obj-ack//./ack/i386/em/em_fif8.o em_fif8.s
-../../../obj-ack//libe.a(em_fp8087.o): em_fp8087.s
-	cc -O -D_MINIX -D_POSIX_SOURCE -Was-ack -c -o ../../../obj-ack//./ack/i386/em/em_fp8087.o em_fp8087.s
-../../../obj-ack//libe.a(em_gto.o): em_gto.s
-	cc -O -D_MINIX -D_POSIX_SOURCE -Was-ack -c -o ../../../obj-ack//./ack/i386/em/em_gto.o em_gto.s
-../../../obj-ack//libe.a(em_hol0.o): em_hol0.s
-	cc -O -D_MINIX -D_POSIX_SOURCE -Was-ack -c -o ../../../obj-ack//./ack/i386/em/em_hol0.o em_hol0.s
-../../../obj-ack//libe.a(em_iaar.o): em_iaar.s
-	cc -O -D_MINIX -D_POSIX_SOURCE -Was-ack -c -o ../../../obj-ack//./ack/i386/em/em_iaar.o em_iaar.s
-../../../obj-ack//libe.a(em_ilar.o): em_ilar.s
-	cc -O -D_MINIX -D_POSIX_SOURCE -Was-ack -c -o ../../../obj-ack//./ack/i386/em/em_ilar.o em_ilar.s
-../../../obj-ack//libe.a(em_inn.o): em_inn.s
-	cc -O -D_MINIX -D_POSIX_SOURCE -Was-ack -c -o ../../../obj-ack//./ack/i386/em/em_inn.o em_inn.s
-../../../obj-ack//libe.a(em_ior.o): em_ior.s
-	cc -O -D_MINIX -D_POSIX_SOURCE -Was-ack -c -o ../../../obj-ack//./ack/i386/em/em_ior.o em_ior.s
-../../../obj-ack//libe.a(em_isar.o): em_isar.s
-	cc -O -D_MINIX -D_POSIX_SOURCE -Was-ack -c -o ../../../obj-ack//./ack/i386/em/em_isar.o em_isar.s
-../../../obj-ack//libe.a(em_lar4.o): em_lar4.s
-	cc -O -D_MINIX -D_POSIX_SOURCE -Was-ack -c -o ../../../obj-ack//./ack/i386/em/em_lar4.o em_lar4.s
-../../../obj-ack//libe.a(em_loi.o): em_loi.s
-	cc -O -D_MINIX -D_POSIX_SOURCE -Was-ack -c -o ../../../obj-ack//./ack/i386/em/em_loi.o em_loi.s
-../../../obj-ack//libe.a(em_mlf4.o): em_mlf4.s
-	cc -O -D_MINIX -D_POSIX_SOURCE -Was-ack -c -o ../../../obj-ack//./ack/i386/em/em_mlf4.o em_mlf4.s
-../../../obj-ack//libe.a(em_mlf8.o): em_mlf8.s
-	cc -O -D_MINIX -D_POSIX_SOURCE -Was-ack -c -o ../../../obj-ack//./ack/i386/em/em_mlf8.o em_mlf8.s
-../../../obj-ack//libe.a(em_mli.o): em_mli.s
-	cc -O -D_MINIX -D_POSIX_SOURCE -Was-ack -c -o ../../../obj-ack//./ack/i386/em/em_mli.o em_mli.s
-../../../obj-ack//libe.a(em_mon.o): em_mon.s
-	cc -O -D_MINIX -D_POSIX_SOURCE -Was-ack -c -o ../../../obj-ack//./ack/i386/em/em_mon.o em_mon.s
-../../../obj-ack//libe.a(em_ngf4.o): em_ngf4.s
-	cc -O -D_MINIX -D_POSIX_SOURCE -Was-ack -c -o ../../../obj-ack//./ack/i386/em/em_ngf4.o em_ngf4.s
-../../../obj-ack//libe.a(em_ngf8.o): em_ngf8.s
-	cc -O -D_MINIX -D_POSIX_SOURCE -Was-ack -c -o ../../../obj-ack//./ack/i386/em/em_ngf8.o em_ngf8.s
-../../../obj-ack//libe.a(em_ngi.o): em_ngi.s
-	cc -O -D_MINIX -D_POSIX_SOURCE -Was-ack -c -o ../../../obj-ack//./ack/i386/em/em_ngi.o em_ngi.s
-../../../obj-ack//libe.a(em_nop.o): em_nop.s
-	cc -O -D_MINIX -D_POSIX_SOURCE -Was-ack -c -o ../../../obj-ack//./ack/i386/em/em_nop.o em_nop.s
-../../../obj-ack//libe.a(em_print.o): em_print.s
-	cc -O -D_MINIX -D_POSIX_SOURCE -Was-ack -c -o ../../../obj-ack//./ack/i386/em/em_print.o em_print.s
-../../../obj-ack//libe.a(em_rck.o): em_rck.s
-	cc -O -D_MINIX -D_POSIX_SOURCE -Was-ack -c -o ../../../obj-ack//./ack/i386/em/em_rck.o em_rck.s
-../../../obj-ack//libe.a(em_rmi.o): em_rmi.s
-	cc -O -D_MINIX -D_POSIX_SOURCE -Was-ack -c -o ../../../obj-ack//./ack/i386/em/em_rmi.o em_rmi.s
-../../../obj-ack//libe.a(em_rmu.o): em_rmu.s
-	cc -O -D_MINIX -D_POSIX_SOURCE -Was-ack -c -o ../../../obj-ack//./ack/i386/em/em_rmu.o em_rmu.s
-../../../obj-ack//libe.a(em_rol.o): em_rol.s
-	cc -O -D_MINIX -D_POSIX_SOURCE -Was-ack -c -o ../../../obj-ack//./ack/i386/em/em_rol.o em_rol.s
-../../../obj-ack//libe.a(em_ror.o): em_ror.s
-	cc -O -D_MINIX -D_POSIX_SOURCE -Was-ack -c -o ../../../obj-ack//./ack/i386/em/em_ror.o em_ror.s
-../../../obj-ack//libe.a(em_sar4.o): em_sar4.s
-	cc -O -D_MINIX -D_POSIX_SOURCE -Was-ack -c -o ../../../obj-ack//./ack/i386/em/em_sar4.o em_sar4.s
-../../../obj-ack//libe.a(em_sbf4.o): em_sbf4.s
-	cc -O -D_MINIX -D_POSIX_SOURCE -Was-ack -c -o ../../../obj-ack//./ack/i386/em/em_sbf4.o em_sbf4.s
-../../../obj-ack//libe.a(em_sbf8.o): em_sbf8.s
-	cc -O -D_MINIX -D_POSIX_SOURCE -Was-ack -c -o ../../../obj-ack//./ack/i386/em/em_sbf8.o em_sbf8.s
-../../../obj-ack//libe.a(em_sbi.o): em_sbi.s
-	cc -O -D_MINIX -D_POSIX_SOURCE -Was-ack -c -o ../../../obj-ack//./ack/i386/em/em_sbi.o em_sbi.s
-../../../obj-ack//libe.a(em_set.o): em_set.s
-	cc -O -D_MINIX -D_POSIX_SOURCE -Was-ack -c -o ../../../obj-ack//./ack/i386/em/em_set.o em_set.s
-../../../obj-ack//libe.a(em_sli.o): em_sli.s
-	cc -O -D_MINIX -D_POSIX_SOURCE -Was-ack -c -o ../../../obj-ack//./ack/i386/em/em_sli.o em_sli.s
-../../../obj-ack//libe.a(em_sri.o): em_sri.s
-	cc -O -D_MINIX -D_POSIX_SOURCE -Was-ack -c -o ../../../obj-ack//./ack/i386/em/em_sri.o em_sri.s
-../../../obj-ack//libe.a(em_sti.o): em_sti.s
-	cc -O -D_MINIX -D_POSIX_SOURCE -Was-ack -c -o ../../../obj-ack//./ack/i386/em/em_sti.o em_sti.s
-../../../obj-ack//libe.a(em_stop.o): em_stop.s
-	cc -O -D_MINIX -D_POSIX_SOURCE -Was-ack -c -o ../../../obj-ack//./ack/i386/em/em_stop.o em_stop.s
-../../../obj-ack//libe.a(em_trp.o): em_trp.s
-	cc -O -D_MINIX -D_POSIX_SOURCE -Was-ack -c -o ../../../obj-ack//./ack/i386/em/em_trp.o em_trp.s
-../../../obj-ack//libe.a(em_unknown.o): em_unknown.s
-	cc -O -D_MINIX -D_POSIX_SOURCE -Was-ack -c -o ../../../obj-ack//./ack/i386/em/em_unknown.o em_unknown.s
-../../../obj-ack//libe.a(em_xor.o): em_xor.s
-	cc -O -D_MINIX -D_POSIX_SOURCE -Was-ack -c -o ../../../obj-ack//./ack/i386/em/em_xor.o em_xor.s
-
-
-
-clean::
-	rm -f ../../../obj-ack//./ack/i386/em/*
-
-include Makedepend-ack
-include .depend-ack
-
-include Makedepend-gnu
-include .depend-gnu
Index: trunk/minix/lib/ack/i386/em/Makefile.in
===================================================================
--- trunk/minix/lib/ack/i386/em/Makefile.in	(revision 9)
+++ 	(revision )
@@ -1,78 +1,0 @@
-# Makefile for lib/ack/i386/em.
-
-CFLAGS="-O -D_MINIX -D_POSIX_SOURCE -Was-ack"
-
-LIBRARIES=libe
-
-libe_FILES=" \
-	em_adf4.s \
-	em_adf8.s \
-	em_adi.s \
-	em_and.s \
-	em_blm.s \
-	em_cff4.s \
-	em_cff8.s \
-	em_cfi.s \
-	em_cfu.s \
-	em_cif4.s \
-	em_cif8.s \
-	em_cii.s \
-	em_cmf4.s \
-	em_cmf8.s \
-	em_cms.s \
-	em_com.s \
-	em_csa4.s \
-	em_csb4.s \
-	em_cuf4.s \
-	em_cuf8.s \
-	em_cuu.s \
-	em_dup.s \
-	em_dvf4.s \
-	em_dvf8.s \
-	em_dvi.s \
-	em_dvu.s \
-	em_error.s \
-	em_exg.s \
-	em_fat.s \
-	em_fef4.s \
-	em_fef8.s \
-	em_fif4.s \
-	em_fif8.s \
-	em_fp8087.s \
-	em_gto.s \
-	em_hol0.s \
-	em_iaar.s \
-	em_ilar.s \
-	em_inn.s \
-	em_ior.s \
-	em_isar.s \
-	em_lar4.s \
-	em_loi.s \
-	em_mlf4.s \
-	em_mlf8.s \
-	em_mli.s \
-	em_mon.s \
-	em_ngf4.s \
-	em_ngf8.s \
-	em_ngi.s \
-	em_nop.s \
-	em_print.s \
-	em_rck.s \
-	em_rmi.s \
-	em_rmu.s \
-	em_rol.s \
-	em_ror.s \
-	em_sar4.s \
-	em_sbf4.s \
-	em_sbf8.s \
-	em_sbi.s \
-	em_set.s \
-	em_sli.s \
-	em_sri.s \
-	em_sti.s \
-	em_stop.s \
-	em_trp.s \
-	em_unknown.s \
-	em_xor.s"
-
-TYPE=ack
Index: trunk/minix/lib/ack/i386/em/byte_order.h
===================================================================
--- trunk/minix/lib/ack/i386/em/byte_order.h	(revision 9)
+++ 	(revision )
@@ -1,6 +1,0 @@
-#define CHAR_UNSIGNED	0
-#define MSB_AT_LOW_ADDRESS	0
-#define MSW_AT_LOW_ADDRESS	0
-#define FL_MSB_AT_LOW_ADDRESS	0
-#define FL_MSW_AT_LOW_ADDRESS	0
-#define FL_MSL_AT_LOW_ADDRESS	0
Index: trunk/minix/lib/ack/i386/em/em_adf4.s
===================================================================
--- trunk/minix/lib/ack/i386/em/em_adf4.s	(revision 9)
+++ 	(revision )
@@ -1,11 +1,0 @@
-.sect .text; .sect .rom; .sect .data; .sect .bss
-.define .adf4
-
-	.sect .text
-.adf4:
-	mov	bx,sp
-	flds	4(bx)
-	fadds	8(bx)
-	fstps	8(bx)
-	wait
-	ret
Index: trunk/minix/lib/ack/i386/em/em_adf8.s
===================================================================
--- trunk/minix/lib/ack/i386/em/em_adf8.s	(revision 9)
+++ 	(revision )
@@ -1,11 +1,0 @@
-.sect .text; .sect .rom; .sect .data; .sect .bss
-.define .adf8
-
-	.sect .text
-.adf8:
-	mov	bx,sp
-	fldd	4(bx)
-	faddd	12(bx)
-	fstpd	12(bx)
-	wait
-	ret
Index: trunk/minix/lib/ack/i386/em/em_adi.s
===================================================================
--- trunk/minix/lib/ack/i386/em/em_adi.s	(revision 9)
+++ 	(revision )
@@ -1,18 +1,0 @@
-.sect .text; .sect .rom; .sect .data; .sect .bss
-.define .adi
-
-	! #bytes in ecx , top of stack in eax
-	.sect .text
-.adi:
-	pop     ebx              ! return address
-	cmp     ecx,4
-	jne     9f
-	pop     ecx
-	add     eax,ecx
-	jmp     ebx
-9:
-.extern	EODDZ
-.extern .trp
-	mov     eax,EODDZ
-	push	ebx
-	jmp     .trp
Index: trunk/minix/lib/ack/i386/em/em_and.s
===================================================================
--- trunk/minix/lib/ack/i386/em/em_and.s	(revision 9)
+++ 	(revision )
@@ -1,20 +1,0 @@
-.sect .text; .sect .rom; .sect .data; .sect .bss
-.define	.and
-
-	! #bytes in ecx
-	! save edi; it might be a register variable
-
-	.sect .text
-.and:
-	pop	ebx		! return address
-	mov	edx,edi
-	mov	edi,esp
-	add	edi,ecx
-	sar	ecx,2
-1:
-	pop	eax
-	and	eax,(edi)
-	stos
-	loop	1b
-	mov	edi,edx
-	jmp	ebx
Index: trunk/minix/lib/ack/i386/em/em_blm.s
===================================================================
--- trunk/minix/lib/ack/i386/em/em_blm.s	(revision 9)
+++ 	(revision )
@@ -1,16 +1,0 @@
-.sect .text; .sect .rom; .sect .data; .sect .bss
-.sect .text
-.define .blm
-
-	! ecx: count in words
-.blm:
-	mov	ebx,esp
-	mov	eax,esi
-	mov	edx,edi
-	mov	edi,4(ebx)
-	mov	esi,8(ebx)
-	rep	movs
-	mov	esi,eax
-	mov	edi,edx
-	ret	8
-
Index: trunk/minix/lib/ack/i386/em/em_cff4.s
===================================================================
--- trunk/minix/lib/ack/i386/em/em_cff4.s	(revision 9)
+++ 	(revision )
@@ -1,19 +1,0 @@
-.sect .text; .sect .rom; .sect .data; .sect .bss
-.define .cff4
-
-	.sect .text
-.cff4:
-	mov	bx,sp
-	fldd	4(bx)
-	fstcw	4(bx)
-	wait
-	mov	dx,4(bx)
-	and	4(bx),0xf3ff	! set to rounding mode
-	wait
-	fldcw	4(bx)
-	fstps	8(bx)
-	mov	4(bx),dx
-	wait
-	fldcw	4(bx)
-	wait
-	ret
Index: trunk/minix/lib/ack/i386/em/em_cff8.s
===================================================================
--- trunk/minix/lib/ack/i386/em/em_cff8.s	(revision 9)
+++ 	(revision )
@@ -1,10 +1,0 @@
-.sect .text; .sect .rom; .sect .data; .sect .bss
-.define .cff8
-
-	.sect .text
-.cff8:
-	mov	bx,sp
-	flds	4(bx)
-	fstpd	4(bx)
-	wait
-	ret
Index: trunk/minix/lib/ack/i386/em/em_cfi.s
===================================================================
--- trunk/minix/lib/ack/i386/em/em_cfi.s	(revision 9)
+++ 	(revision )
@@ -1,27 +1,0 @@
-.sect .text; .sect .rom; .sect .data; .sect .bss
-.define .cfi
-
-	.sect .text
-.cfi:
-	mov	bx,sp
-	fstcw	4(bx)
-	wait
-	mov	dx,4(bx)
-	or	4(bx),0xc00	! truncating mode
-	wait
-	fldcw	4(bx)
-	cmp	8(bx),4
-	jne	2f
-				! loc 4 loc ? cfi
-	flds	12(bx)
-	fistpl	12(bx)
-1:
-	mov	4(bx),dx
-	wait
-	fldcw	4(bx)
-	ret
-2:
-				! loc 8 loc ? cfi
-	fldd	12(bx)
-	fistpl	16(bx)
-	jmp	1b
Index: trunk/minix/lib/ack/i386/em/em_cfu.s
===================================================================
--- trunk/minix/lib/ack/i386/em/em_cfu.s	(revision 9)
+++ 	(revision )
@@ -1,38 +1,0 @@
-.sect .text; .sect .rom; .sect .data; .sect .bss
-.define .cfu
-
-	.sect .text
-.cfu:
-	mov	bx,sp
-	fstcw	4(bx)
-	wait
-	mov	dx,4(bx)
-	or	4(bx),0xc00	! truncating mode
-	wait
-	fldcw	4(bx)
-	cmp	8(bx),4
-	jne	2f
-				! loc 4 loc ? cfu
-	flds	12(bx)
-	fabs			! ???
-	fiaddl	(bigmin)
-	fistpl	12(bx)
-	wait
-	mov	ax,12(bx)
-	sub	ax,(bigmin)
-	mov	12(bx),ax
-1:
-	mov	4(bx),dx
-	wait
-	fldcw	4(bx)
-	ret
-2:
-				! loc 8 loc ? cfu
-	fldd	12(bx)
-	fabs			! ???
-	fiaddl	(bigmin)
-	fistpl	16(bx)
-	mov	ax,16(bx)
-	sub	ax,(bigmin)
-	mov	16(bx),ax
-	jmp	1b
Index: trunk/minix/lib/ack/i386/em/em_cif4.s
===================================================================
--- trunk/minix/lib/ack/i386/em/em_cif4.s	(revision 9)
+++ 	(revision )
@@ -1,10 +1,0 @@
-.sect .text; .sect .rom; .sect .data; .sect .bss
-.define .cif4
-
-	.sect .text
-.cif4:
-	mov	bx,sp
-	fildl	8(bx)
-	fstps	8(bx)
-	wait
-	ret
Index: trunk/minix/lib/ack/i386/em/em_cif8.s
===================================================================
--- trunk/minix/lib/ack/i386/em/em_cif8.s	(revision 9)
+++ 	(revision )
@@ -1,10 +1,0 @@
-.sect .text; .sect .rom; .sect .data; .sect .bss
-.define .cif8
-
-	.sect .text
-.cif8:
-	mov	bx,sp
-	fildl	8(bx)
-	fstpd	4(bx)
-	wait
-	ret
Index: trunk/minix/lib/ack/i386/em/em_cii.s
===================================================================
--- trunk/minix/lib/ack/i386/em/em_cii.s	(revision 9)
+++ 	(revision )
@@ -1,31 +1,0 @@
-.sect .text; .sect .rom; .sect .data; .sect .bss
-.define .cii
-
-.sect .text
-.cii:
-	pop     ebx              ! return address
-				! pop     ecx, dest. size
-				! pop     edx, src. size
-				! eax is source
-	cmp	edx,1
-	jne	2f
-	movsxb	eax,al
-	mov	edx,4
-	jmp	1f
-2:
-	cmp	edx,2
-	jne	1f
-	cwde			! convert from 2 to 4 bytes
-	mov	edx,4
-1:
-	cmp     edx,ecx
-	jne     9f
-	cmp	edx,4
-	jne	9f
-	jmp     ebx
-9:
-.extern EILLINS
-.extern .fat
-	mov     eax,EILLINS
-	push    eax
-	jmp     .fat
Index: trunk/minix/lib/ack/i386/em/em_cmf4.s
===================================================================
--- trunk/minix/lib/ack/i386/em/em_cmf4.s	(revision 9)
+++ 	(revision )
@@ -1,22 +1,0 @@
-.sect .text; .sect .rom; .sect .data; .sect .bss
-.define .cmf4
-
-	.sect .text
-.cmf4:
-	mov	bx,sp
-	xor	cx,cx
-	flds	8(bx)
-	flds	4(bx)
-	fcompp			! compare and pop operands
-	fstsw	ax
-	wait
-	sahf
-	je	1f
-	jb	2f
-	dec	cx
-	jmp	1f
-2:
-	inc	cx
-1:
-	mov	ax,cx
-	ret
Index: trunk/minix/lib/ack/i386/em/em_cmf8.s
===================================================================
--- trunk/minix/lib/ack/i386/em/em_cmf8.s	(revision 9)
+++ 	(revision )
@@ -1,22 +1,0 @@
-.sect .text; .sect .rom; .sect .data; .sect .bss
-.define .cmf8
-
-	.sect .text
-.cmf8:
-	mov	bx,sp
-	xor	cx,cx
-	fldd	12(bx)
-	fldd	4(bx)
-	fcompp			! compare and pop operands
-	fstsw	ax
-	wait
-	sahf
-	je	1f
-	jb	2f
-	dec	cx
-	jmp	1f
-2:
-	inc	cx
-1:
-	mov	ax,cx
-	ret
Index: trunk/minix/lib/ack/i386/em/em_cms.s
===================================================================
--- trunk/minix/lib/ack/i386/em/em_cms.s	(revision 9)
+++ 	(revision )
@@ -1,23 +1,0 @@
-.sect .text; .sect .rom; .sect .data; .sect .bss
-.define .cms
-
-	! #bytes in ecx
-	.sect .text
-.cms:
-	pop     ebx              ! return address
-	mov     edx,esp
-	push	esi
-	push	edi
-	mov     esi,edx
-	add     edx,ecx
-	mov     edi,edx
-	add     edx,ecx
-	sar     ecx,2
-	repe cmps
-	je      1f
-	inc     ecx
-1:
-	pop	edi
-	pop	esi
-	mov     esp,edx
-	jmp     ebx
Index: trunk/minix/lib/ack/i386/em/em_com.s
===================================================================
--- trunk/minix/lib/ack/i386/em/em_com.s	(revision 9)
+++ 	(revision )
@@ -1,14 +1,0 @@
-.sect .text; .sect .rom; .sect .data; .sect .bss
-.define	.com
-
-	! #bytes in ecx
-	.sect .text
-.com:
-	mov	ebx,esp
-	add	ebx,4
-	sar	ecx,2
-1:
-	not	(ebx)
-	add	ebx,4
-	loop	1b
-	ret
Index: trunk/minix/lib/ack/i386/em/em_csa4.s
===================================================================
--- trunk/minix/lib/ack/i386/em/em_csa4.s	(revision 9)
+++ 	(revision )
@@ -1,27 +1,0 @@
-.sect .text; .sect .rom; .sect .data; .sect .bss
-.define .csa4
-
-.sect .text
-.csa4:
-				! ebx, descriptor address
-				! eax, index
-	mov     edx,(ebx)         ! default
-	sub     eax,4(ebx)
-	cmp     eax,8(ebx)
-	ja      1f
-	sal     eax,2
-	add	ebx,eax
-	mov     ebx,12(ebx)
-	test    ebx,ebx
-	jnz     2f
-1:
-	mov     ebx,edx
-	test    ebx,ebx
-	jnz     2f
-.extern ECASE
-.extern .fat
-	mov     eax,ECASE
-	push    eax
-	jmp     .fat
-2:
-	jmp     ebx
Index: trunk/minix/lib/ack/i386/em/em_csb4.s
===================================================================
--- trunk/minix/lib/ack/i386/em/em_csb4.s	(revision 9)
+++ 	(revision )
@@ -1,29 +1,0 @@
-.sect .text; .sect .rom; .sect .data; .sect .bss
-.define .csb4
-
-.sect .text
-.csb4:
-				!ebx, descriptor address
-				!eax,  index
-	mov	edx,(ebx)
-	mov	ecx,4(ebx)
-1:
-	add	ebx,8
-	dec     ecx
-	jl      4f
-	cmp     eax,(ebx)
-	jne     1b
-	mov	ebx,4(ebx)
-2:
-	test    ebx,ebx
-	jnz     3f
-.extern ECASE
-.extern .fat
-	mov     eax,ECASE
-	push    eax
-	jmp     .fat
-3:
-	jmp     ebx
-4:
-	mov	ebx,edx
-	jmp	2b
Index: trunk/minix/lib/ack/i386/em/em_cuf4.s
===================================================================
--- trunk/minix/lib/ack/i386/em/em_cuf4.s	(revision 9)
+++ 	(revision )
@@ -1,15 +1,0 @@
-.sect .text; .sect .rom; .sect .data; .sect .bss
-.define .cuf4
-
-	.sect .text
-.cuf4:
-	mov	bx,sp
-	fildl	8(bx)
-	cmp	8(bx),0
-	jge	1f
-	fisubl	(bigmin)
-	fisubl	(bigmin)
-1:
-	fstps	8(bx)
-	wait
-	ret
Index: trunk/minix/lib/ack/i386/em/em_cuf8.s
===================================================================
--- trunk/minix/lib/ack/i386/em/em_cuf8.s	(revision 9)
+++ 	(revision )
@@ -1,15 +1,0 @@
-.sect .text; .sect .rom; .sect .data; .sect .bss
-.define .cuf8
-
-	.sect .text
-.cuf8:
-	mov	bx,sp
-	fildl	8(bx)
-	cmp	8(bx),0
-	jge	1f
-	fisubl	(bigmin)
-	fisubl	(bigmin)
-1:
-	fstpd	4(bx)
-	wait
-	ret
Index: trunk/minix/lib/ack/i386/em/em_cuu.s
===================================================================
--- trunk/minix/lib/ack/i386/em/em_cuu.s	(revision 9)
+++ 	(revision )
@@ -1,22 +1,0 @@
-.sect .text; .sect .rom; .sect .data; .sect .bss
-.define .ciu
-.define .cui
-.define .cuu
-
-.sect .text
-.ciu:
-.cui:
-.cuu:
-	pop     ebx              ! return address
-				! pop     ecx, dest. size
-				! pop     edx, source size
-				! eax is source
-	cmp     edx,ecx
-	jne     8f
-	jmp     ebx
-8:
-.extern EILLINS
-.extern .fat
-	mov     eax,EILLINS
-	push    eax
-	jmp     .fat
Index: trunk/minix/lib/ack/i386/em/em_dup.s
===================================================================
--- trunk/minix/lib/ack/i386/em/em_dup.s	(revision 9)
+++ 	(revision )
@@ -1,17 +1,0 @@
-.sect .text; .sect .rom; .sect .data; .sect .bss
-.define	.dup
-
-	! #bytes in ecx
-	.sect .text
-.dup:
-	pop	ebx		! return address
-	mov	eax,esi
-	mov	edx,edi
-	mov	esi,esp
-	sub	esp,ecx
-	mov	edi,esp
-	sar	ecx,2
-	rep movs
-	mov	esi,eax
-	mov	edi,edx
-	jmp	ebx
Index: trunk/minix/lib/ack/i386/em/em_dvf4.s
===================================================================
--- trunk/minix/lib/ack/i386/em/em_dvf4.s	(revision 9)
+++ 	(revision )
@@ -1,11 +1,0 @@
-.sect .text; .sect .rom; .sect .data; .sect .bss
-.define .dvf4
-
-	.sect .text
-.dvf4:
-	mov	bx,sp
-	flds	8(bx)
-	fdivs	4(bx)
-	fstps	8(bx)
-	wait
-	ret
Index: trunk/minix/lib/ack/i386/em/em_dvf8.s
===================================================================
--- trunk/minix/lib/ack/i386/em/em_dvf8.s	(revision 9)
+++ 	(revision )
@@ -1,11 +1,0 @@
-.sect .text; .sect .rom; .sect .data; .sect .bss
-.define .dvf8
-
-	.sect .text
-.dvf8:
-	mov	bx,sp
-	fldd	12(bx)
-	fdivd	4(bx)
-	fstpd	12(bx)
-	wait
-	ret
Index: trunk/minix/lib/ack/i386/em/em_dvi.s
===================================================================
--- trunk/minix/lib/ack/i386/em/em_dvi.s	(revision 9)
+++ 	(revision )
@@ -1,21 +1,0 @@
-.sect .text; .sect .rom; .sect .data; .sect .bss
-.define .dvi
-
-        ! #bytes in eax
-	.sect .text
-.dvi:
-        pop     ebx              ! return address
-        cmp     eax,4
-        jne     1f
-        pop     eax
-        cwd
-        pop     ecx
-        idiv    ecx
-        push    eax
-        jmp     ebx
-1:
-.extern EODDZ
-.extern .trp
-        mov     eax,EODDZ
-        push    ebx
-        jmp     .trp
Index: trunk/minix/lib/ack/i386/em/em_dvu.s
===================================================================
--- trunk/minix/lib/ack/i386/em/em_dvu.s	(revision 9)
+++ 	(revision )
@@ -1,21 +1,0 @@
-.sect .text; .sect .rom; .sect .data; .sect .bss
-.define .dvu
-
-	! #bytes in eax
-	.sect .text
-.dvu:
-	pop     ebx              ! return address
-	cmp     eax,4
-	jne     1f
-	pop     eax
-	xor     edx,edx
-	pop     ecx
-	div     ecx
-	push    eax
-	jmp     ebx
-1:
-.extern EODDZ
-.extern .trp
-	mov     eax,EODDZ
-	push    ebx
-	jmp     .trp
Index: trunk/minix/lib/ack/i386/em/em_error.s
===================================================================
--- trunk/minix/lib/ack/i386/em/em_error.s	(revision 9)
+++ 	(revision )
@@ -1,32 +1,0 @@
-.sect .text; .sect .rom; .sect .data; .sect .bss
-.define .error
-.define .Xtrp
-
-	! eax is trap number
-	! all registers must be saved
-	! because return is possible
-	! May only be called with error no's <16
-.sect .text
-.error:
-	mov  ecx,eax
-	mov  ebx,1
-	sal  ebx,cl
-.extern .ignmask
-.extern .trp
-	test ebx,(.ignmask)
-	jne  2f
-	call    .trp
-2:
-	ret
-
-.Xtrp:
-	pusha
-	cmp	eax,16
-	jge	1f
-	call	.error
-	popa
-	ret
-1:
-	call	.trp
-	popa
-	ret
Index: trunk/minix/lib/ack/i386/em/em_exg.s
===================================================================
--- trunk/minix/lib/ack/i386/em/em_exg.s	(revision 9)
+++ 	(revision )
@@ -1,22 +1,0 @@
-.sect .text; .sect .rom; .sect .data; .sect .bss
-.define .exg
-
-	! #bytes in ecx
-.sect .text
-.exg:
-	push	edi
-	mov	edi,esp
-	add	edi,8
-	mov	ebx,edi
-	add	ebx,ecx
-	sar     ecx,2
-1:
-	mov	eax,(ebx)
-	xchg	eax,(edi)
-	mov	(ebx),eax
-	add	edi,4
-	add	ebx,4
-	loop	1b
-2:
-	pop	edi
-	ret
Index: trunk/minix/lib/ack/i386/em/em_fat.s
===================================================================
--- trunk/minix/lib/ack/i386/em/em_fat.s	(revision 9)
+++ 	(revision )
@@ -1,10 +1,0 @@
-.sect .text; .sect .rom; .sect .data; .sect .bss
-.sect .text
-.define .fat
-
-.fat:
-.extern .trp
-.extern .stop
-	call    .trp
-	call    .stop
-	! no return
Index: trunk/minix/lib/ack/i386/em/em_fef4.s
===================================================================
--- trunk/minix/lib/ack/i386/em/em_fef4.s	(revision 9)
+++ 	(revision )
@@ -1,49 +1,0 @@
-.sect .text; .sect .rom; .sect .data; .sect .bss
-.define .fef4
-
-	.sect .text
-.fef4:
-				! this could be simpler, if only the
-				! fxtract instruction was emulated properly
-	mov	bx,sp
-	mov	ax,8(bx)
-	and	ax,0x7f800000
-	je	1f		! zero exponent
-	shr	ax,23
-	sub	ax,126
-	mov	cx,ax		! exponent in cx
-	mov	ax,8(bx)
-	and	ax,0x807fffff
-	or	ax,0x3f000000	! load -1 exponent
-	mov	bx,4(bx)
-	mov	4(bx),ax
-	mov	(bx),cx
-	ret
-1:				! we get here on zero exp
-	mov	ax,8(bx)
-	and	ax,0x007fffff
-	jne	1f		! zero result
-	mov	bx,4(bx)
-	mov	(bx),ax
-	mov	4(bx),ax
-	ret
-1:				! otherwise unnormalized number
-	mov	cx,8(bx)
-	and	cx,0x807fffff
-	mov	dx,cx
-	and	cx,0x80000000
-	mov	ax,-125
-2:
-	test	dx,0x800000
-	jne	1f
-	dec	ax
-	shl	dx,1
-	or	dx,cx
-	jmp	2b
-1:
-	mov	bx,4(bx)
-	mov	(bx),ax
-	and	dx,0x807fffff
-	or	dx,0x3f000000	! load -1 exponent
-	mov	4(bx),dx
-	ret
Index: trunk/minix/lib/ack/i386/em/em_fef8.s
===================================================================
--- trunk/minix/lib/ack/i386/em/em_fef8.s	(revision 9)
+++ 	(revision )
@@ -1,56 +1,0 @@
-.sect .text; .sect .rom; .sect .data; .sect .bss
-.define .fef8
-
-	.sect .text
-.fef8:
-				! this could be simpler, if only the
-				! fxtract instruction was emulated properly
-	mov	bx,sp
-	mov	ax,12(bx)
-	and	ax,0x7ff00000
-	je	1f		! zero exponent
-	shr	ax,20
-	sub	ax,1022
-	mov	cx,ax		! exponent in cx
-	mov	ax,12(bx)
-	and	ax,0x800fffff
-	or	ax,0x3fe00000	! load -1 exponent
-	mov	dx,8(bx)
-	mov	bx,4(bx)
-	mov	4(bx),dx
-	mov	8(bx),ax
-	mov	(bx),cx
-	ret
-1:				! we get here on zero exp
-	mov	ax,12(bx)
-	and	ax,0xfffff
-	or	ax,8(bx)
-	jne	1f		! zero result
-	mov	bx,4(bx)
-	mov	(bx),ax
-	mov	4(bx),ax
-	mov	8(bx),ax
-	ret
-1:				! otherwise unnormalized number
-	mov	cx,12(bx)
-	and	cx,0x800fffff
-	mov	dx,cx
-	and	cx,0x80000000
-	mov	ax,-1021
-2:
-	test	dx,0x100000
-	jne	1f
-	dec	ax
-	shl	8(bx),1
-	rcl	dx,1
-	or	dx,cx
-	jmp	2b
-1:
-	and	dx,0x800fffff
-	or	dx,0x3fe00000	! load -1 exponent
-	mov	cx,8(bx)
-	mov	bx,4(bx)
-	mov	(bx),ax
-	mov	8(bx),dx
-	mov	4(bx),cx
-	ret
Index: trunk/minix/lib/ack/i386/em/em_fif4.s
===================================================================
--- trunk/minix/lib/ack/i386/em/em_fif4.s	(revision 9)
+++ 	(revision )
@@ -1,37 +1,0 @@
-.sect .text; .sect .rom; .sect .data; .sect .bss
-.define .fif4
-
-	.sect .text
-.fif4:
-	mov	bx,sp
-	flds	8(bx)
-	fmuls	12(bx)		! multiply
-	fld	st		! copy result
-	ftst			! test sign; handle negative separately
-	fstsw	ax
-	wait
-	sahf			! result of test in condition codes
-	jb	1f
-	frndint			! this one rounds (?)
-	fcom	st(1)		! compare with original; if <=, then OK
-	fstsw	ax
-	wait
-	sahf
-	jbe	2f
-	fisubs	(one)		! else subtract 1
-	jmp	2f
-1:				! here, negative case
-	frndint			! this one rounds (?)
-	fcom	st(1)		! compare with original; if >=, then OK
-	fstsw	ax
-	wait
-	sahf
-	jae	2f
-	fiadds	(one)		! else add 1
-2:
-	fsub	st(1),st	! subtract integer part
-	mov	bx,4(bx)
-	fstps	(bx)
-	fstps	4(bx)
-	wait
-	ret
Index: trunk/minix/lib/ack/i386/em/em_fif8.s
===================================================================
--- trunk/minix/lib/ack/i386/em/em_fif8.s	(revision 9)
+++ 	(revision )
@@ -1,37 +1,0 @@
-.sect .text; .sect .rom; .sect .data; .sect .bss
-.define .fif8
-
-	.sect .text
-.fif8:
-	mov	bx,sp
-	fldd	8(bx)
-	fmuld	16(bx)		! multiply
-	fld	st		! and copy result
-	ftst			! test sign; handle negative separately
-	fstsw	ax
-	wait
-	sahf			! result of test in condition codes
-	jb	1f
-	frndint			! this one rounds (?)
-	fcom	st(1)		! compare with original; if <=, then OK
-	fstsw	ax
-	wait
-	sahf
-	jbe	2f
-	fisubs	(one)		! else subtract 1
-	jmp	2f
-1:				! here, negative case
-	frndint			! this one rounds (?)
-	fcom	st(1)		! compare with original; if >=, then OK
-	fstsw	ax
-	wait
-	sahf
-	jae	2f
-	fiadds	(one)		! else add 1
-2:
-	fsub	st(1),st	! subtract integer part
-	mov	bx,4(bx)
-	fstpd	(bx)
-	fstpd	8(bx)
-	wait
-	ret
Index: trunk/minix/lib/ack/i386/em/em_fp8087.s
===================================================================
--- trunk/minix/lib/ack/i386/em/em_fp8087.s	(revision 9)
+++ 	(revision )
@@ -1,10 +1,0 @@
-.sect .text; .sect .rom; .sect .data; .sect .bss
-.define one, bigmin
-
-	.sect .rom
-one:
-	.data2	1
-two:
-	.data2	2
-bigmin:
-	.data4 	-2147483648
Index: trunk/minix/lib/ack/i386/em/em_gto.s
===================================================================
--- trunk/minix/lib/ack/i386/em/em_gto.s	(revision 9)
+++ 	(revision )
@@ -1,8 +1,0 @@
-.sect .text; .sect .rom; .sect .data; .sect .bss
-.sect .text
-.define .gto
-
-.gto:
-	mov     ebp,8(ebx)
-	mov     esp,4(ebx)
-	jmp     (ebx)
Index: trunk/minix/lib/ack/i386/em/em_hol0.s
===================================================================
--- trunk/minix/lib/ack/i386/em/em_hol0.s	(revision 9)
+++ 	(revision )
@@ -1,7 +1,0 @@
-.sect .text; .sect .rom; .sect .data; .sect .bss
-
-.define hol0
-.sect .data
-hol0:
-	.data4	0, 0
-	.data4	0, 0
Index: trunk/minix/lib/ack/i386/em/em_iaar.s
===================================================================
--- trunk/minix/lib/ack/i386/em/em_iaar.s	(revision 9)
+++ 	(revision )
@@ -1,18 +1,0 @@
-.sect .text; .sect .rom; .sect .data; .sect .bss
-.sect .text
-.define .iaar
-
-.iaar:
-	pop     ecx
-	pop     edx
-	cmp     edx,4
-.extern .unknown
-	jne     .unknown
-	pop     ebx     ! descriptor address
-	pop     eax     ! index
-	sub     eax,(ebx)
-	mul     8(ebx)
-	pop	ebx	! array base
-	add     ebx,eax
-	push	ecx
-	ret
Index: trunk/minix/lib/ack/i386/em/em_ilar.s
===================================================================
--- trunk/minix/lib/ack/i386/em/em_ilar.s	(revision 9)
+++ 	(revision )
@@ -1,15 +1,0 @@
-.sect .text; .sect .rom; .sect .data; .sect .bss
-.sect .text
-.define .ilar
-
-.ilar:
-	pop     ecx
-	pop     edx
-.extern .unknown
-	cmp     edx,4
-	jne     .unknown
-	pop     ebx      ! descriptor address
-	pop     eax      ! index
-	push    ecx
-.extern .lar4
-	jmp    .lar4
Index: trunk/minix/lib/ack/i386/em/em_inn.s
===================================================================
--- trunk/minix/lib/ack/i386/em/em_inn.s	(revision 9)
+++ 	(revision )
@@ -1,32 +1,0 @@
-.sect .text; .sect .rom; .sect .data; .sect .bss
-.sect .text
-.define .inn
-
-	! #bytes in ecx
-	! bit # in eax
-.inn:
-	xor     edx,edx
-	mov     ebx,8
-	div     ebx
-	mov     ebx,esp
-	add	ebx,4
-	add     ebx,eax
-	cmp     eax,ecx
-	jae     1f
-	movb	al,(ebx)
-	mov	ebx,edx
-	testb   al,bits(ebx)
-	jz      1f
-	mov	eax,1
-	jmp	2f
-1:
-	xor	eax,eax
-2:
-	pop	ebx
-	add     esp,ecx
-	! eax is result
-	jmp     ebx
-
-	.sect .rom
-bits:
-	.data1 1,2,4,8,16,32,64,128
Index: trunk/minix/lib/ack/i386/em/em_ior.s
===================================================================
--- trunk/minix/lib/ack/i386/em/em_ior.s	(revision 9)
+++ 	(revision )
@@ -1,18 +1,0 @@
-.sect .text; .sect .rom; .sect .data; .sect .bss
-.sect .text
-.define	.ior
-
-	! #bytes in ecx
-.ior:
-	pop	ebx		! return address
-	mov	edx,edi
-	mov	edi,esp
-	add	edi,ecx
-	sar	ecx,2
-1:
-	pop	eax
-	or	eax,(edi)
-	stos
-	loop	1b
-	mov	edi,edx
-	jmp	ebx
Index: trunk/minix/lib/ack/i386/em/em_isar.s
===================================================================
--- trunk/minix/lib/ack/i386/em/em_isar.s	(revision 9)
+++ 	(revision )
@@ -1,15 +1,0 @@
-.sect .text; .sect .rom; .sect .data; .sect .bss
-.sect .text
-.define .isar
-
-.isar:
-	pop     ecx
-	pop     eax
-	cmp     eax,4
-.extern .unknown
-	jne     .unknown
-	pop     ebx      ! descriptor address
-	pop     eax      ! index
-	push    ecx
-.extern .sar4
-	jmp    .sar4
Index: trunk/minix/lib/ack/i386/em/em_lar4.s
===================================================================
--- trunk/minix/lib/ack/i386/em/em_lar4.s	(revision 9)
+++ 	(revision )
@@ -1,37 +1,0 @@
-.sect .text; .sect .rom; .sect .data; .sect .bss
-.sect .text
-.define .lar4
-
-.lar4:
-				! ebx, descriptor address
-				! eax, index
-	sub     eax,(ebx)
-	mov     ecx,8(ebx)
-	imul    ecx
-	pop	ebx
-	pop	edx		! base address
-	add     edx,eax
-	sar     ecx,1
-	jnb     1f
-	xor     eax,eax
-	movb	al,(edx)
-	push    eax
-	jmp     ebx
-1:
-	sar     ecx,1
-	jnb     1f
-	xor     eax,eax
-	o16 mov	ax,(edx)
-	push    eax
-	jmp     ebx
-1:
-	xchg	edx,esi		! saved esi
-	mov	eax,ecx
-	sal	eax,2
-	sub     esp,eax
-	mov	eax,edi		! save edi
-	mov     edi,esp
-	rep movs
-	mov	edi,eax
-	mov	esi,edx
-	jmp     ebx
Index: trunk/minix/lib/ack/i386/em/em_loi.s
===================================================================
--- trunk/minix/lib/ack/i386/em/em_loi.s	(revision 9)
+++ 	(revision )
@@ -1,44 +1,0 @@
-.sect .text; .sect .rom; .sect .data; .sect .bss
-.sect .text
-.define .loi
-.define .los
-
-	! #bytes in ecx
-	! address in ebx
-	! save esi/edi. they might be register variables
-.los:
-	pop	edx
-	mov     eax,ecx
-	sar     ecx,1
-	jnb     1f
-	movsxb	eax,(ebx)
-	push    eax
-	jmp     edx
-1:
-	sar     ecx,1
-	jnb     1f
-	movsx	eax,(ebx)
-	push    eax
-	jmp     edx
-1:
-	push	edx
-	mov	edx,esi
-	mov	esi,ebx
-	pop	ebx
-	sub     esp,eax
-	jmp	1f
-
-.loi:
-	! only called with size >= 4
-	mov	edx,esi
-	mov	esi,ebx
-	pop	ebx
-	sub	esp,ecx
-	sar	ecx,2
-1:
-	mov	eax,edi
-	mov     edi,esp
-	rep movs
-	mov	esi,edx
-	mov	edi,eax
-	jmp     ebx
Index: trunk/minix/lib/ack/i386/em/em_mlf4.s
===================================================================
--- trunk/minix/lib/ack/i386/em/em_mlf4.s	(revision 9)
+++ 	(revision )
@@ -1,11 +1,0 @@
-.sect .text; .sect .rom; .sect .data; .sect .bss
-.define .mlf4
-
-	.sect .text
-.mlf4:
-	mov	bx,sp
-	flds	4(bx)
-	fmuls	8(bx)
-	fstps	8(bx)
-	wait
-	ret
Index: trunk/minix/lib/ack/i386/em/em_mlf8.s
===================================================================
--- trunk/minix/lib/ack/i386/em/em_mlf8.s	(revision 9)
+++ 	(revision )
@@ -1,11 +1,0 @@
-.sect .text; .sect .rom; .sect .data; .sect .bss
-.define .mlf8
-
-	.sect .text
-.mlf8:
-	mov	bx,sp
-	fldd	4(bx)
-	fmuld	12(bx)
-	fstpd	12(bx)
-	wait
-	ret
Index: trunk/minix/lib/ack/i386/em/em_mli.s
===================================================================
--- trunk/minix/lib/ack/i386/em/em_mli.s	(revision 9)
+++ 	(revision )
@@ -1,20 +1,0 @@
-.sect .text; .sect .rom; .sect .data; .sect .bss
-.sect .text
-.define .mli
-
-	! #bytes in eax
-.mli:
-	pop     ebx              ! return address
-	cmp     eax,4
-	jne     1f
-	pop     eax
-	pop     ecx
-	mul     ecx
-	push    eax
-	jmp     ebx
-1:
-.extern EODDZ
-.extern .trp
-	mov     eax,EODDZ
-	push    ebx
-	jmp     .trp
Index: trunk/minix/lib/ack/i386/em/em_mon.s
===================================================================
--- trunk/minix/lib/ack/i386/em/em_mon.s	(revision 9)
+++ 	(revision )
@@ -1,7 +1,0 @@
-.sect .text; .sect .rom; .sect .data; .sect .bss
-.sect .text
-.define .mon
-
-.mon:
-.extern .stop
-	call    .stop
Index: trunk/minix/lib/ack/i386/em/em_ngf4.s
===================================================================
--- trunk/minix/lib/ack/i386/em/em_ngf4.s	(revision 9)
+++ 	(revision )
@@ -1,11 +1,0 @@
-.sect .text; .sect .rom; .sect .data; .sect .bss
-.define .ngf4
-
-	.sect .text
-.ngf4:
-	mov	bx,sp
-	flds	4(bx)
-	fchs
-	fstps	4(bx)
-	wait
-	ret
Index: trunk/minix/lib/ack/i386/em/em_ngf8.s
===================================================================
--- trunk/minix/lib/ack/i386/em/em_ngf8.s	(revision 9)
+++ 	(revision )
@@ -1,11 +1,0 @@
-.sect .text; .sect .rom; .sect .data; .sect .bss
-.define .ngf8
-
-	.sect .text
-.ngf8:
-	mov	bx,sp
-	fldd	4(bx)
-	fchs
-	fstpd	4(bx)
-	wait
-	ret
Index: trunk/minix/lib/ack/i386/em/em_ngi.s
===================================================================
--- trunk/minix/lib/ack/i386/em/em_ngi.s	(revision 9)
+++ 	(revision )
@@ -1,19 +1,0 @@
-.sect .text; .sect .rom; .sect .data; .sect .bss
-.sect .text
-.define .ngi
-
-	! #bytes in eax
-.ngi:
-	pop     ebx              ! return address
-	cmp     eax,4
-	jne     1f
-	pop     ecx
-	neg     ecx
-	push    ecx
-	jmp     ebx
-1:
-.extern EODDZ
-.extern .trp
-	mov     eax,EODDZ
-	push    ebx
-	jmp     .trp
Index: trunk/minix/lib/ack/i386/em/em_nop.s
===================================================================
--- trunk/minix/lib/ack/i386/em/em_nop.s	(revision 9)
+++ 	(revision )
@@ -1,10 +1,0 @@
-.sect .text; .sect .rom; .sect .data; .sect .bss
-.sect .text
-.define .nop
-.extern printd, printc, hol0
-
-.nop:
-	mov     eax,(hol0)
-	call    printd
-	movb    al,'\n'
-	jmp     printc
Index: trunk/minix/lib/ack/i386/em/em_print.s
===================================================================
--- trunk/minix/lib/ack/i386/em/em_print.s	(revision 9)
+++ 	(revision )
@@ -1,47 +1,0 @@
-.sect .text; .sect .rom; .sect .data; .sect .bss
-.sect .text
-.define	printc,printd,prints
-
-	! argument in eax
-	! uses ebx
-prints:
-	xchg	eax,ebx
-1:
-	movb	al,(ebx)
-	inc	ebx
-	testb	al,al
-	jz	2f
-	call	printc
-	jmp	1b
-2:
-	ret
-
-	! argument in eax
-	! uses ecx and edx
-printd:
-	xor	edx,edx
-	mov	ecx,10
-	div	ecx
-	test	eax,eax
-	jz	1f
-	push	edx
-	call	printd
-	pop	edx
-1:
-	xchg	eax,edx
-	addb	al,'0'
-
-	! argument in eax
-printc:
-	push	eax
-	mov	ebx,esp
-	mov	eax,1
-	push	eax
-	push	ebx
-	push	eax
-	call	__write
-	pop	ebx
-	pop	ebx
-	pop	ebx
-	pop	ebx
-	ret
Index: trunk/minix/lib/ack/i386/em/em_rck.s
===================================================================
--- trunk/minix/lib/ack/i386/em/em_rck.s	(revision 9)
+++ 	(revision )
@@ -1,20 +1,0 @@
-.sect .text; .sect .rom; .sect .data; .sect .bss
-.sect .text
-.define .rck
-
-	! descriptor address in ebx
-	! value in eax, must be left there
-.rck:
-	cmp     eax,(ebx)
-	jl      2f
-	cmp     eax,4(ebx)
-	jg      2f
-	ret
-2:
-	push    eax
-.extern ERANGE
-.extern .error
-	mov     eax,ERANGE
-	call    .error
-	pop     eax
-	ret
Index: trunk/minix/lib/ack/i386/em/em_rmi.s
===================================================================
--- trunk/minix/lib/ack/i386/em/em_rmi.s	(revision 9)
+++ 	(revision )
@@ -1,21 +1,0 @@
-.sect .text; .sect .rom; .sect .data; .sect .bss
-.sect .text
-.define .rmi
-
-	! #bytes in eax
-.rmi:
-	pop     ebx              ! return address
-	cmp     eax,4
-	jne     1f
-	pop     eax
-	cwd
-	pop     ecx
-	idiv    ecx
-	push    edx
-	jmp     ebx
-1:
-.extern EODDZ
-.extern .trp
-	mov     eax,EODDZ
-	push    ebx
-	jmp     .trp
Index: trunk/minix/lib/ack/i386/em/em_rmu.s
===================================================================
--- trunk/minix/lib/ack/i386/em/em_rmu.s	(revision 9)
+++ 	(revision )
@@ -1,21 +1,0 @@
-.sect .text; .sect .rom; .sect .data; .sect .bss
-.sect .text
-.define .rmu
-
-	! #bytes in eax
-.rmu:
-	pop     ebx              ! return address
-	cmp     eax,4
-	jne     1f
-	pop     eax
-	xor     edx,edx
-	pop     ecx
-	idiv    ecx
-	push    edx
-	jmp     ebx
-1:
-.extern EODDZ
-.extern .trp
-	mov     eax,EODDZ
-	push    ebx
-	jmp     .trp
Index: trunk/minix/lib/ack/i386/em/em_rol.s
===================================================================
--- trunk/minix/lib/ack/i386/em/em_rol.s	(revision 9)
+++ 	(revision )
@@ -1,20 +1,0 @@
-.sect .text; .sect .rom; .sect .data; .sect .bss
-.sect .text
-.define .rol
-
-	! #bytes in eax
-.rol:
-	pop     edx              ! return address
-	cmp     eax,4
-	jne     1f
-	pop     eax
-	pop     ecx
-	rol     eax,cl
-	push    eax
-	jmp     edx
-1:
-.extern EODDZ
-.extern .trp
-	mov     eax,EODDZ
-	push    edx
-	jmp     .trp
Index: trunk/minix/lib/ack/i386/em/em_ror.s
===================================================================
--- trunk/minix/lib/ack/i386/em/em_ror.s	(revision 9)
+++ 	(revision )
@@ -1,20 +1,0 @@
-.sect .text; .sect .rom; .sect .data; .sect .bss
-.sect .text
-.define .ror
-
-	! #bytes in eax
-.ror:
-	pop     edx              ! return address
-	cmp     eax,4
-	jne     1f
-	pop     eax
-	pop     ecx
-	ror     eax,cl
-	push    eax
-	jmp     edx
-1:
-.extern EODDZ
-.extern .trp
-	mov     eax,EODDZ
-	push    edx
-	jmp     .trp
Index: trunk/minix/lib/ack/i386/em/em_sar4.s
===================================================================
--- trunk/minix/lib/ack/i386/em/em_sar4.s	(revision 9)
+++ 	(revision )
@@ -1,33 +1,0 @@
-.sect .text; .sect .rom; .sect .data; .sect .bss
-.sect .text
-.define .sar4
-
-.sar4:
-				! ebx, descriptor address
-				! eax, index
-	sub     eax,(ebx)
-	mov     ecx,8(ebx)
-	imul    ecx
-	pop	ebx
-	pop	edx		! base address
-	add     edx,eax
-	sar     ecx,1
-	jnb     1f
-	pop     eax
-	movb	(edx),al
-	jmp     ebx
-1:
-	sar     ecx,1
-	jnb     1f
-	pop     eax
-	o16 mov (edx),ax
-	jmp     ebx
-1:
-	xchg	edi,edx		! edi = base address, edx is saved edi
-	mov	eax,esi
-	mov     esi,esp
-	rep movs
-	mov     esp,esi
-	mov	esi,eax
-	mov	edi,edx
-	jmp     ebx
Index: trunk/minix/lib/ack/i386/em/em_sbf4.s
===================================================================
--- trunk/minix/lib/ack/i386/em/em_sbf4.s	(revision 9)
+++ 	(revision )
@@ -1,11 +1,0 @@
-.sect .text; .sect .rom; .sect .data; .sect .bss
-.define .sbf4
-
-	.sect .text
-.sbf4:
-	mov	bx,sp
-	flds	8(bx)
-	fsubs	4(bx)
-	fstps	8(bx)
-	wait
-	ret
Index: trunk/minix/lib/ack/i386/em/em_sbf8.s
===================================================================
--- trunk/minix/lib/ack/i386/em/em_sbf8.s	(revision 9)
+++ 	(revision )
@@ -1,11 +1,0 @@
-.sect .text; .sect .rom; .sect .data; .sect .bss
-.define .sbf8
-
-	.sect .text
-.sbf8:
-	mov	bx,sp
-	fldd	12(bx)
-	fsubd	4(bx)
-	fstpd	12(bx)
-	wait
-	ret
Index: trunk/minix/lib/ack/i386/em/em_sbi.s
===================================================================
--- trunk/minix/lib/ack/i386/em/em_sbi.s	(revision 9)
+++ 	(revision )
@@ -1,19 +1,0 @@
-.sect .text; .sect .rom; .sect .data; .sect .bss
-.sect .text
-.define .sbi
-
-	! #bytes in ecx , top of stack in eax
-.sbi:
-	pop     ebx              ! return subress
-	cmp     ecx,4
-	jne     1f
-	pop     ecx
-	sub     eax,ecx
-	neg     eax
-	jmp     ebx
-1:
-.extern EODDZ
-.extern .trp
-	mov     eax,EODDZ
-	push    ebx
-	jmp     .trp
Index: trunk/minix/lib/ack/i386/em/em_set.s
===================================================================
--- trunk/minix/lib/ack/i386/em/em_set.s	(revision 9)
+++ 	(revision )
@@ -1,42 +1,0 @@
-.sect .text; .sect .rom; .sect .data; .sect .bss
-.sect .text
-.define .set
-
-	! #bytes in ecx
-	! bit # in eax
-.set:
-	pop     ebx              ! return address
-	xor     edx,edx
-!ifdef create set
-	sub	esp,ecx
-	push	ebx
-	push	edi
-	mov     ebx,esp
-	xor	edi,edi
-	sar	ecx,2
-1:
-	mov     8(ebx)(edi),edx
-	add	edi,4
-	loop	1b
-!endif
-	mov     ebx,8
-	div     ebx
-	cmp     eax,edi
-	jae     2f
-	mov	edi,edx
-	movb	dl,bits(edi)
-	mov     edi,esp
-	add     edi,eax
-	orb     8(edi),dl
-	pop	edi
-	ret
-2:
-.extern ESET
-.extern .trp
-	pop	edi
-	mov     eax,ESET
-	jmp     .trp
-
-	.sect .rom
-bits:
-	.data1   1,2,4,8,16,32,64,128
Index: trunk/minix/lib/ack/i386/em/em_sli.s
===================================================================
--- trunk/minix/lib/ack/i386/em/em_sli.s	(revision 9)
+++ 	(revision )
@@ -1,20 +1,0 @@
-.sect .text; .sect .rom; .sect .data; .sect .bss
-.sect .text
-.define .sli
-
-	! #bytes in eax
-.sli:
-	pop     edx              ! return address
-	cmp     eax,4
-	jne     1f
-	pop     eax
-	pop     ecx
-	sal     eax,cl
-	push    eax
-	jmp     edx
-1:
-.extern EODDZ
-.extern .trp
-	mov     eax,EODDZ
-	push    edx
-	jmp     .trp
Index: trunk/minix/lib/ack/i386/em/em_sri.s
===================================================================
--- trunk/minix/lib/ack/i386/em/em_sri.s	(revision 9)
+++ 	(revision )
@@ -1,20 +1,0 @@
-.sect .text; .sect .rom; .sect .data; .sect .bss
-.sect .text
-.define .sri
-
-	! #bytes in eax
-.sri:
-	pop     edx              ! return address
-	cmp     eax,4
-	jne     1f
-	pop     eax
-	pop     ecx
-	sar     eax,cl
-	push    eax
-	jmp     edx
-1:
-.extern EODDZ
-.extern .trp
-	mov     eax,EODDZ
-	push    edx
-	jmp     .trp
Index: trunk/minix/lib/ack/i386/em/em_sti.s
===================================================================
--- trunk/minix/lib/ack/i386/em/em_sti.s	(revision 9)
+++ 	(revision )
@@ -1,41 +1,0 @@
-.sect .text; .sect .rom; .sect .data; .sect .bss
-.sect .text
-.define .sti
-.define .sts
-
-	! #bytes in ecx
-	! address in ebx
-	! save edi/esi. they might be register variables
-.sts:
-	pop	edx
-	sar     ecx,1
-	jnb     1f
-	pop     eax
-	movb	(ebx),al
-	jmp     edx
-1:
-	sar     ecx,1
-	jnb     1f
-	pop     eax
-	o16 mov	(ebx),ax
-	jmp     edx
-1:
-	push	edx
-	mov	edx,edi
-	mov	edi,ebx
-	pop	ebx
-	jmp	1f
-.sti:
-	! only called with count >> 4
-	mov	edx,edi
-	mov	edi,ebx
-	pop	ebx
-	sar	ecx,2
-1:
-	mov	eax,esi
-	mov     esi,esp
-	rep movs
-	mov     esp,esi
-	mov	edi,edx
-	mov	esi,eax
-	jmp     ebx
Index: trunk/minix/lib/ack/i386/em/em_stop.s
===================================================================
--- trunk/minix/lib/ack/i386/em/em_stop.s	(revision 9)
+++ 	(revision )
@@ -1,5 +1,0 @@
-.sect .text; .sect .rom; .sect .data; .sect .bss
-.sect .text
-.define .stop
-.stop:
-	jmp	___exit
Index: trunk/minix/lib/ack/i386/em/em_trp.s
===================================================================
--- trunk/minix/lib/ack/i386/em/em_trp.s	(revision 9)
+++ 	(revision )
@@ -1,18 +1,0 @@
-.sect .text; .sect .rom; .sect .data; .sect .bss
-.sect .text
-.define .trp
-.extern .trppc, .stop
-
-		! eax is trap number
-.trp:
-	xor     ebx,ebx
-	xchg    ebx,(.trppc)
-	test    ebx,ebx
-	jz      2f
-	push    eax
-	call    ebx
-	pop     eax
-	ret
-2:
-	push	eax
-	call    .stop
Index: trunk/minix/lib/ack/i386/em/em_unknown.s
===================================================================
--- trunk/minix/lib/ack/i386/em/em_unknown.s	(revision 9)
+++ 	(revision )
@@ -1,9 +1,0 @@
-.sect .text; .sect .rom; .sect .data; .sect .bss
-.sect .text
-.define .unknown
-.extern EILLINS, .fat
-
-.unknown:
-	mov  eax,EILLINS
-	push eax
-	jmp  .fat
Index: trunk/minix/lib/ack/i386/em/em_xor.s
===================================================================
--- trunk/minix/lib/ack/i386/em/em_xor.s	(revision 9)
+++ 	(revision )
@@ -1,18 +1,0 @@
-.sect .text; .sect .rom; .sect .data; .sect .bss
-.sect .text
-.define	.xor
-
-	! #bytes in ecx
-.xor:
-	pop	ebx		! return address
-	mov	edx,edi
-	mov	edi,esp
-	add	edi,ecx
-	sar	ecx,2
-1:
-	pop	eax
-	xor	eax,(edi)
-	stos
-	loop	1b
-	mov	edi,edx
-	jmp	ebx
Index: trunk/minix/lib/ack/i386/head/Makedepend-ack
===================================================================
--- trunk/minix/lib/ack/i386/head/Makedepend-ack	(revision 9)
+++ 	(revision )
@@ -1,4 +1,0 @@
-depend-ack:
-	rm .depend-ack
-	touch .depend-ack
-	mkdep 'cc  -E' em_head.s | sed -e 's:^\(.\):../../../obj-ack//./ack/i386/head/\1:' >> .depend-ack
Index: trunk/minix/lib/ack/i386/head/Makedepend-gnu
===================================================================
--- trunk/minix/lib/ack/i386/head/Makedepend-gnu	(revision 9)
+++ 	(revision )
@@ -1,3 +1,0 @@
-depend-gnu:
-	rm .depend-gnu
-	touch .depend-gnu
Index: trunk/minix/lib/ack/i386/head/Makefile
===================================================================
--- trunk/minix/lib/ack/i386/head/Makefile	(revision 9)
+++ 	(revision )
@@ -1,40 +1,0 @@
-#Generated from ./ack/i386/head/Makefile.in
-all: all-ack
-
-all-ack:
-all-gnu:
-
-makefiles: Makefile
-Makedepend-ack Makedepend-gnu: 
-	sh ../../../generate.sh ./ack/i386/head ../../../obj-ack/ ../../../obj-gnu
-
-Makefile: Makefile.in Makedepend-ack Makedepend-gnu
-	sh ../../../generate.sh ./ack/i386/head ../../../obj-ack/ ../../../obj-gnu
-	@echo
-	@echo *Attention*
-	@echo Makefile is regenerated... rerun command to see changes
-	@echo *Attention*
-	@echo
-
-depend: depend-ack
-all-ack: ../../../obj-ack//libe.a
-
-../../../obj-ack//libe.a: ../../../obj-ack//libe.a(em_head.o)
-
-../../../obj-ack//libe.a:
-	ar cr ../../../obj-ack//libe.a ../../../obj-ack//./ack/i386/head/*.o
-	rm ../../../obj-ack//./ack/i386/head/*.o
-
-../../../obj-ack//libe.a(em_head.o): em_head.s
-	cc  -c -o ../../../obj-ack//./ack/i386/head/em_head.o em_head.s
-
-
-
-clean::
-	rm -f ../../../obj-ack//./ack/i386/head/*
-
-include Makedepend-ack
-include .depend-ack
-
-include Makedepend-gnu
-include .depend-gnu
Index: trunk/minix/lib/ack/i386/head/Makefile.in
===================================================================
--- trunk/minix/lib/ack/i386/head/Makefile.in	(revision 9)
+++ 	(revision )
@@ -1,9 +1,0 @@
-# Makefile for lib/ack/i386/head.
-
-#ASFLAGS = -I.
-
-LIBRARIES=libe
-
-libe_FILES=em_head.s
-
-TYPE=ack
Index: trunk/minix/lib/ack/i386/head/em_abs.h
===================================================================
--- trunk/minix/lib/ack/i386/head/em_abs.h	(revision 9)
+++ 	(revision )
@@ -1,35 +1,0 @@
-/* $Header: /cvsup/minix/src/lib/ack/i386/head/em_abs.h,v 1.1 2005/10/10 15:27:45 beng Exp $ */
-/*
- * (c) copyright 1987 by the Vrije Universiteit, Amsterdam, The Netherlands.
- * See the copyright notice in the ACK home directory, in the file "Copyright".
- */
-#define LINO_AD         0
-#define FILN_AD         4
-
-#define LINO            (*(int    *)(_hol0()+LINO_AD))
-#define FILN            (*(char  **)(_hol0()+FILN_AD))
-
-#define EARRAY          0
-#define ERANGE          1
-#define ESET            2
-#define EIOVFL          3
-#define EFOVFL          4
-#define EFUNFL          5
-#define EIDIVZ          6
-#define EFDIVZ          7
-#define EIUND           8
-#define EFUND           9
-#define ECONV           10
-
-#define ESTACK          16
-#define EHEAP           17
-#define EILLINS         18
-#define EODDZ           19
-#define ECASE           20
-#define EMEMFLT         21
-#define EBADPTR         22
-#define EBADPC          23
-#define EBADLAE         24
-#define EBADMON         25
-#define EBADLIN         26
-#define EBADGTO         27
Index: trunk/minix/lib/ack/i386/head/em_head.s
===================================================================
--- trunk/minix/lib/ack/i386/head/em_head.s	(revision 9)
+++ 	(revision )
@@ -1,20 +1,0 @@
-#
-.sect .text; .sect .rom; .sect .data; .sect .bss
-.define ERANGE,ESET,EHEAP,ECASE,EILLINS,EIDIVZ,EODDZ
-.define .trppc, .ignmask
-
-ERANGE		= 1
-ESET		= 2
-EIDIVZ		= 6
-EHEAP		= 17
-EILLINS		= 18
-EODDZ		= 19
-ECASE		= 20
-
-#include "em_abs.h"
-
-.sect .data
-.trppc:
-	.data4	0
-.ignmask:
-	.data4	EIOVFL | EIUND | ECONV | EFOVFL | EFUNFL
Index: trunk/minix/lib/ack/libm2/Arguments.c
===================================================================
--- trunk/minix/lib/ack/libm2/Arguments.c	(revision 9)
+++ 	(revision )
@@ -1,73 +1,0 @@
-/*
-  (c) copyright 1988 by the Vrije Universiteit, Amsterdam, The Netherlands.
-  See the copyright notice in the ACK home directory, in the file "Copyright".
-*/
-
-/*
-  Module:	Access to program arguments and environment
-  Author:	Ceriel J.H. Jacobs
-  Version:	$Header: /cvsup/minix/src/lib/ack/libm2/Arguments.c,v 1.1 2005/10/10 15:27:46 beng Exp $
-*/
-
-extern char **argv, ***_penviron;
-extern int argc;
-unsigned int _Arguments__Argc;
-
-static char *
-findname(s1, s2)
-register char *s1, *s2;
-{
-
-	while (*s1 == *s2++) s1++;
-	if (*s1 == '\0' && *(s2-1) == '=') return s2;
-	return 0;
-}
-
-static unsigned int
-scopy(src, dst, max)
-	register char *src, *dst;
-	unsigned int max;
-{
-	register unsigned int i = 0;
-
-	while (*src && i <= max) {
-		i++;
-		*dst++ = *src++;
-	}
-	if (i <= max) {
-		*dst = '\0';
-		return i+1;
-	}
-	while (*src++) i++;
-	return i + 1;
-}
-
-_Arguments_()
-{
-	_Arguments__Argc = argc;
-}
-
-unsigned
-_Arguments__Argv(n, argument, l, u, s)
-	unsigned int u;
-	char *argument;
-{
-
-	if (n >= argc) return 0;
-	return scopy(argv[n], argument, u);
-}
-
-unsigned
-_Arguments__GetEnv(name, nn, nu, ns, value, l, u, s)
-	char *name, *value;
-	unsigned int nu, u;
-{
-	register char **p = *_penviron;
-	register char *v = 0;
-
-	while (*p && !(v = findname(name, *p++))) {
-		/* nothing */
-	}
-	if (!v) return 0;
-	return scopy(v, value, u);
-}
Index: trunk/minix/lib/ack/libm2/ArraySort.mod
===================================================================
--- trunk/minix/lib/ack/libm2/ArraySort.mod	(revision 9)
+++ 	(revision )
@@ -1,155 +1,0 @@
-(*
-  (c) copyright 1988 by the Vrije Universiteit, Amsterdam, The Netherlands.
-  See the copyright notice in the ACK home directory, in the file "Copyright".
-*)
-
-(*$R-*)
-IMPLEMENTATION MODULE ArraySort;
-(* 
-  Module:	Array sorting module.
-  Author:	Ceriel J.H. Jacobs
-  Version:	$Header: /cvsup/minix/src/lib/ack/libm2/ArraySort.mod,v 1.1 2005/10/10 15:27:46 beng Exp $
-*)
-  FROM	SYSTEM IMPORT	ADDRESS, BYTE;	(* no generics in Modula-2, sorry *)
-
-  TYPE BytePtr = POINTER TO BYTE;
-
-  VAR compareproc: CompareProc;
-
-  PROCEDURE Sort(base: ADDRESS;		(* address of array *)
-		 nel: CARDINAL;		(* number of elements in array *)
-		 size: CARDINAL;	(* size of each element *)
-		 compar: CompareProc);	(* the comparison procedure *)
-  BEGIN
-	compareproc := compar;
-	qsort(base, base+(nel-1)*size, size);
-  END Sort;
-
-  PROCEDURE qsort(a1, a2: ADDRESS; size: CARDINAL);
-  (* Implemented with quick-sort, with some extra's *)
-    VAR	left, right, lefteq, righteq: ADDRESS;
-	cmp: CompareResult;
-	mainloop: BOOLEAN;
-  BEGIN
-	WHILE a2 > a1 DO
-		left := a1;
-		right := a2;
-		lefteq := a1 + size * (((a2 - a1) + size) DIV (2 * size));
-		righteq := lefteq;
-		(*
-                   Pick an element in the middle of the array.
-                   We will collect the equals around it.
-                   "lefteq" and "righteq" indicate the left and right
-                   bounds of the equals respectively.
-                   Smaller elements end up left of it, larger elements end
-                   up right of it.
-		*)
-		LOOP
-			LOOP
-				IF left >= lefteq THEN EXIT END;
-			      	cmp := compareproc(left, lefteq);
-				IF cmp = greater THEN EXIT END;
-				IF cmp = less THEN
-					left := left + size;
-				ELSE
-					(* equal, so exchange with the element
-					   to the left of the "equal"-interval.
-					*)
-					lefteq := lefteq - size;
-					exchange(left, lefteq, size);
-				END;
-			END;
-			mainloop := FALSE;
-			LOOP
-				IF right <= righteq THEN EXIT END;
-				cmp := compareproc(right, righteq);
-				IF cmp = less THEN
-					IF left < lefteq THEN
-						(* larger one at the left,
-						   so exchange
-						*)
-						exchange(left,right,size);
-						left := left + size;
-						right := right - size;
-						mainloop := TRUE;
-						EXIT;
-					END;
-                                (*
- 				   no more room at the left part, so we
-                                   move the "equal-interval" one place to the
-                                   right, and the smaller element to the
-                                   left of it.
-                                   This is best expressed as a three-way
-                                   exchange.
-                                *)
-					righteq := righteq + size;
-					threewayexchange(left, righteq, right,
-						size);
-					lefteq := lefteq + size;
-					left := lefteq;
-				ELSIF cmp = equal THEN
-					(* equal, zo exchange with the element
-					   to the right of the "equal"
-					   interval
-					*)
-					righteq := righteq + size;
-					exchange(right, righteq, size);
-				ELSE
-					(* leave it where it is *)
-					right := right - size;
-				END;
-			END;
-			IF (NOT mainloop) THEN
-				IF left >= lefteq THEN
-					(* sort "smaller" part *)
-					qsort(a1, lefteq - size, size);
-					(* and now the "larger" part, saving a
-					   procedure call, because of this big
-					   WHILE loop
-					*)
-					a1 := righteq + size;
-					EXIT;	(* from the LOOP *)
-				END;
-                        	(* larger element to the left, but no more room,
-                      	     	   so move the "equal-interval" one place to the
-                           	   left, and the larger element to the right
-                           	   of it.
-                         	*)
-				lefteq := lefteq - size;
-				threewayexchange(right, lefteq, left, size);
-				righteq := righteq - size;
-				right := righteq;
-			END;
-		END;
-	END;
-  END qsort;
-
-  PROCEDURE exchange(a,b: BytePtr; size : CARDINAL);
-    VAR c: BYTE;
-  BEGIN
-	WHILE size > 0 DO
-		DEC(size);
-		c := a^;
-		a^ := b^;
-		a := ADDRESS(a) + 1;
-		b^ := c;
-		b := ADDRESS(b) + 1;
-	END;
-  END exchange;
-
-  PROCEDURE threewayexchange(p,q,r: BytePtr; size: CARDINAL);
-    VAR c: BYTE;
-  BEGIN
-	WHILE size > 0 DO
-		DEC(size);
-		c := p^;
-		p^ := r^;
-		p := ADDRESS(p) + 1;
-		r^ := q^;
-		r := ADDRESS(r) + 1;
-		q^ := c;
-		q := ADDRESS(q) + 1;
-	END;
-  END threewayexchange;
-
-END ArraySort.
Index: trunk/minix/lib/ack/libm2/CSP.mod
===================================================================
--- trunk/minix/lib/ack/libm2/CSP.mod	(revision 9)
+++ 	(revision )
@@ -1,347 +1,0 @@
-(*$R-*)
-IMPLEMENTATION MODULE CSP;
-(*
-  Module:	Communicating Sequential Processes
-  From:		"A Modula-2 Implementation of CSP",
-		M. Collado, R. Morales, J.J. Moreno,
-		SIGPlan Notices, Volume 22, Number 6, June 1987.
-		Some modifications by Ceriel J.H. Jacobs
-  Version:	$Header: /cvsup/minix/src/lib/ack/libm2/CSP.mod,v 1.1 2005/10/10 15:27:46 beng Exp $
-
-   See this article for an explanation of the use of this module.
-*)
-
-  FROM random	IMPORT	Uniform;
-  FROM SYSTEM	IMPORT	BYTE, ADDRESS, NEWPROCESS, TRANSFER;
-  FROM Storage	IMPORT	Allocate, Deallocate;
-  FROM Traps	IMPORT	Message;
-
-  CONST	WorkSpaceSize = 2000;
-
-  TYPE	ByteAddress =	POINTER TO BYTE;
-	Channel =	POINTER TO ChannelDescriptor;
-	ProcessType =	POINTER TO ProcessDescriptor;
-	ProcessDescriptor = RECORD
-				next: ProcessType;
-				father: ProcessType;
-				cor: ADDRESS;
-				wsp: ADDRESS;
-				guardindex: INTEGER;
-				guardno: CARDINAL;
-				guardcount: CARDINAL;
-				opened: Channel;
-				sons: CARDINAL;
-				msgadr: ADDRESS;
-				msglen: CARDINAL;
-			    END;
-
-	Queue =	RECORD
-		    head, tail: ProcessType;
-		END;
-
-	ChannelDescriptor = RECORD
-				senders: Queue;
-				owner: ProcessType;
-				guardindex: INTEGER;
-				next: Channel;
-			    END;
-
-  VAR	cp: ProcessType;
-	free, ready: Queue;
-
-(* ------------ Private modules and procedures ------------- *)
-
-  MODULE ProcessQueue;
-
-    IMPORT	ProcessType, Queue;
-    EXPORT	Push, Pop, InitQueue, IsEmpty;
-
-    PROCEDURE InitQueue(VAR q: Queue);
-    BEGIN
-	WITH q DO
-		head := NIL;
-		tail := NIL
-	END
-    END InitQueue;
-
-    PROCEDURE Push(p: ProcessType; VAR q: Queue);
-    BEGIN
-	p^.next := NIL;
-	WITH q DO
-		IF head = NIL THEN
-			tail := p
-		ELSE
-			head^.next := p
-		END;
-		head := p
-	END
-    END Push;
-
-    PROCEDURE Pop(VAR q: Queue; VAR p: ProcessType);
-    BEGIN
-	WITH q DO
-		p := tail;
-		IF p # NIL THEN
-			tail := tail^.next;
-			IF head = p THEN
-				head := NIL
-			END
-		END
-	END
-    END Pop;
-
-    PROCEDURE IsEmpty(q: Queue): BOOLEAN;
-    BEGIN
-	RETURN q.head = NIL
-    END IsEmpty;
-
-  END ProcessQueue;
-
-
-  PROCEDURE DoTransfer;
-    VAR	aux: ProcessType;
-  BEGIN
-	aux := cp;
-	Pop(ready, cp);
-	IF cp = NIL THEN
-		HALT
-	ELSE
-		TRANSFER(aux^.cor, cp^.cor)
-	END
-  END DoTransfer;
-
-  PROCEDURE OpenChannel(ch: Channel; n: INTEGER);
-  BEGIN
-	WITH ch^ DO
-		IF guardindex = 0 THEN
-			guardindex := n;
-			next := cp^.opened;
-			cp^.opened := ch
-		END
-	END
-  END OpenChannel;
-
-  PROCEDURE CloseChannels(p: ProcessType);
-  BEGIN
-	WITH p^ DO
-		WHILE opened # NIL DO
-			opened^.guardindex := 0;
-			opened := opened^.next
-		END
-	END
-  END CloseChannels;
-
-  PROCEDURE ThereAreOpenChannels(): BOOLEAN;
-  BEGIN
-	RETURN cp^.opened # NIL;
-  END ThereAreOpenChannels;
-
-  PROCEDURE Sending(ch: Channel): BOOLEAN;
-  BEGIN
-	RETURN NOT IsEmpty(ch^.senders)
-  END Sending;
-
-(* -------------- Public Procedures ----------------- *)
-
-  PROCEDURE COBEGIN;
-  (* Beginning of a COBEGIN .. COEND structure *)
-  BEGIN
-  END COBEGIN;
-
-  PROCEDURE COEND;
-  (* End of a COBEGIN .. COEND structure *)
-    (* VAR	aux: ProcessType; *)
-  BEGIN
-	IF cp^.sons > 0 THEN
-		DoTransfer
-	END
-  END COEND;
-
-  PROCEDURE StartProcess(P: PROC);
-  (* Start an anonimous process that executes the procedure P *)
-    VAR newprocess: ProcessType;
-  BEGIN
-	Pop(free, newprocess);
-	IF newprocess = NIL THEN
-		Allocate(newprocess,SIZE(ProcessDescriptor));
-		Allocate(newprocess^.wsp, WorkSpaceSize)
-	END;
-	WITH newprocess^ DO
-		father := cp;
-		sons := 0;
-		msglen := 0;
-		NEWPROCESS(P, wsp, WorkSpaceSize, cor)
-	END;
-	cp^.sons := cp^.sons + 1;
-	Push(newprocess, ready)
-  END StartProcess;
-
-  PROCEDURE StopProcess;
-  (* Terminate a Process (itself) *)
-    VAR aux: ProcessType;
-  BEGIN
-	aux := cp^.father;
-	aux^.sons := aux^.sons - 1;
-	IF aux^.sons = 0 THEN
-		Push(aux, ready)
-	END;
-	aux := cp;
-	Push(aux, free);
-	Pop(ready, cp);
-	IF cp = NIL THEN
-		HALT
-	ELSE
-		TRANSFER(aux^.cor, cp^.cor)
-	END
-  END StopProcess;
-
-  PROCEDURE InitChannel(VAR ch: Channel);
-  (* Initialize the channel ch *)
-  BEGIN
-	Allocate(ch, SIZE(ChannelDescriptor));
-	WITH ch^ DO
-		InitQueue(senders);
-		owner := NIL;
-		next := NIL;
-		guardindex := 0
-	END
-  END InitChannel;
-
-  PROCEDURE GetChannel(ch: Channel);
-  (* Assign the channel ch to the process that gets it *)
-  BEGIN
-	WITH ch^ DO
-		IF owner # NIL THEN
-			Message("Channel already has an owner");
-			HALT
-		END;
-		owner := cp
-	END
-  END GetChannel;
-
-  PROCEDURE Send(data: ARRAY OF BYTE; VAR ch: Channel);
-  (* Send a message with the data to the cvhannel ch *)
-    VAR	m: ByteAddress;
-	(* aux: ProcessType; *)
-	i: CARDINAL;
-  BEGIN
-	WITH ch^ DO
-		Push(cp, senders);
-		Allocate(cp^.msgadr, SIZE(data));
-		m := cp^.msgadr;
-		cp^.msglen := HIGH(data);
-		FOR i := 0 TO HIGH(data) DO
-			m^ := data[i];
-			m := ADDRESS(m) + 1
-		END;
-		IF guardindex # 0 THEN
-			owner^.guardindex := guardindex;
-			CloseChannels(owner);
-			Push(owner, ready)
-		END
-	END;
-	DoTransfer
-  END Send;
-
-  PROCEDURE Receive(VAR ch: Channel; VAR dest: ARRAY OF BYTE);
-  (* Receive a message from the channel ch into the dest variable *)
-    VAR	aux: ProcessType;
-	m: ByteAddress;
-	i: CARDINAL;
-  BEGIN
-	WITH ch^ DO
-		IF cp # owner THEN
-			Message("Only owner of channel can receive from it");
-			HALT
-		END;
-		IF Sending(ch) THEN
-			Pop(senders, aux);
-			m := aux^.msgadr;
-			FOR i := 0 TO aux^.msglen DO
-				dest[i] := m^;
-				m := ADDRESS(m) + 1
-			END;
-			Push(aux, ready);
-			Push(cp, ready);
-			CloseChannels(cp)
-		ELSE
-			OpenChannel(ch, -1);
-			DoTransfer;
-			Pop(senders, aux);
-			m := aux^.msgadr;
-			FOR i := 0 TO aux^.msglen DO
-				dest[i] := m^;
-				m := ADDRESS(m) + 1
-			END;
-			Push(cp, ready);
-			Push(aux, ready)
-		END;
-		Deallocate(aux^.msgadr, aux^.msglen+1);
-		DoTransfer
-	END
-  END Receive;
-
-  PROCEDURE SELECT(n: CARDINAL);
-  (* Beginning of a SELECT structure with n guards *)
-  BEGIN
-	cp^.guardindex := Uniform(1,n);
-	cp^.guardno := n;
-	cp^.guardcount := n
-  END SELECT;
-
-  PROCEDURE NEXTGUARD(): CARDINAL;
-  (* Returns an index to the next guard to be evaluated in a SELECT *)
-  BEGIN
-	RETURN cp^.guardindex
-  END NEXTGUARD;
-
-  PROCEDURE GUARD(cond: BOOLEAN; ch: Channel;
-		  VAR dest: ARRAY OF BYTE): BOOLEAN;
-  (* Evaluates a guard, including reception management *)
-    (* VAR	aux: ProcessType; *)
-  BEGIN
-	IF NOT cond THEN
-		RETURN FALSE
-	ELSIF ch = NIL THEN
-		CloseChannels(cp);
-		cp^.guardindex := 0;
-		RETURN TRUE
-	ELSIF Sending(ch) THEN
-		Receive(ch, dest);
-		cp^.guardindex := 0;
-		RETURN TRUE
-	ELSE
-		OpenChannel(ch, cp^.guardindex);
-		RETURN FALSE
-	END
-  END GUARD;
-
-  PROCEDURE ENDSELECT(): BOOLEAN;
-  (* End of a SELECT structure *)
-  BEGIN
-	WITH cp^ DO
-		IF guardindex <= 0 THEN
-			RETURN TRUE
-		END;
-		guardcount := guardcount - 1;
-		IF guardcount # 0 THEN
-			guardindex := (guardindex MOD INTEGER(guardno)) + 1
-		ELSIF ThereAreOpenChannels() THEN
-			DoTransfer
-		ELSE
-			guardindex := 0
-		END
-	END;
-	RETURN FALSE
-  END ENDSELECT;
-
-BEGIN
-	InitQueue(free);
-	InitQueue(ready);
-	Allocate(cp,SIZE(ProcessDescriptor));
-	WITH cp^ DO
-		sons := 0;
-		father := NIL
-	END
-END CSP.
-
Index: trunk/minix/lib/ack/libm2/Conversion.mod
===================================================================
--- trunk/minix/lib/ack/libm2/Conversion.mod	(revision 9)
+++ 	(revision )
@@ -1,73 +1,0 @@
-(*
-  (c) copyright 1988 by the Vrije Universiteit, Amsterdam, The Netherlands.
-  See the copyright notice in the ACK home directory, in the file "Copyright".
-*)
-
-(*$R-*)
-IMPLEMENTATION MODULE Conversions;
-(*
-  Module:	numeric-to-string conversions
-  Author:	Ceriel J.H. Jacobs
-  Version:	$Header: /cvsup/minix/src/lib/ack/libm2/Conversion.mod,v 1.1 2005/10/10 15:27:46 beng Exp $
-*)
-
-  PROCEDURE ConvertNum(num, len, base: CARDINAL;
-		       neg: BOOLEAN;
-		       VAR str: ARRAY OF CHAR);
-    VAR i: CARDINAL;
-	r: CARDINAL;
-	tmp: ARRAY [0..20] OF CHAR;
-    BEGIN
-	i := 0;
-	REPEAT
-		r := num MOD base;
-		num := num DIV base;
-		IF r <= 9 THEN
-			tmp[i] := CHR(r + ORD('0'));
-		ELSE
-			tmp[i] := CHR(r - 10 + ORD('A'));
-		END;
-		INC(i);
-	UNTIL num = 0;
-	IF neg THEN
-		tmp[i] := '-';
-		INC(i)
-	END;
-	IF len > HIGH(str) + 1 THEN len := HIGH(str) + 1; END;
-	IF i > HIGH(str) + 1 THEN i := HIGH(str) + 1; END;
-	r := 0;
-	WHILE len > i DO str[r] := ' '; INC(r); DEC(len); END;
-	WHILE i > 0 DO str[r] := tmp[i-1]; DEC(i); INC(r); END;
-	WHILE r <= HIGH(str) DO
-		str[r] := 0C;
-		INC(r);
-	END;
-    END ConvertNum;
-
-  PROCEDURE ConvertOctal(num, len: CARDINAL; VAR str: ARRAY OF CHAR);
-  BEGIN   
-	ConvertNum(num, len, 8, FALSE, str);
-  END ConvertOctal;   
-
-  PROCEDURE ConvertHex(num, len: CARDINAL; VAR str: ARRAY OF CHAR);
-  BEGIN   
-	ConvertNum(num, len, 16, FALSE, str);
-  END ConvertHex;   
-
-  PROCEDURE ConvertCardinal(num, len: CARDINAL; VAR str: ARRAY OF CHAR);   
-  BEGIN   
-	ConvertNum(num, len, 10, FALSE, str);
-  END ConvertCardinal;   
-
-  PROCEDURE ConvertInteger(num: INTEGER;
-			   len: CARDINAL;   
-                           VAR str: ARRAY OF CHAR); 
-  BEGIN 
-	IF (num < 0) AND (num >= -MAX(INTEGER)) THEN
-		ConvertNum(-num, len, 10, TRUE, str);
-	ELSE
-		ConvertNum(CARDINAL(num), len, 10, num < 0, str);
-	END;
-  END ConvertInteger; 
-
-END Conversions.
Index: trunk/minix/lib/ack/libm2/EM.e
===================================================================
--- trunk/minix/lib/ack/libm2/EM.e	(revision 9)
+++ 	(revision )
@@ -1,100 +1,0 @@
-#
-;
-; (c) copyright 1988 by the Vrije Universiteit, Amsterdam, The Netherlands.
-; See the copyright notice in the ACK home directory, in the file "Copyright".
-;
-;
-; Module:	Interface to some EM instructions and data
-; Author:	Ceriel J.H. Jacobs
-; Version:	$Header: /cvsup/minix/src/lib/ack/libm2/EM.e,v 1.1 2005/10/10 15:27:46 beng Exp $
-;
- mes 2,_EM_WSIZE,_EM_PSIZE
-
-#define ARG1    0
-#define ARG2    _EM_DSIZE
-#define IRES    2*_EM_DSIZE
-
-; FIF is called with three parameters:
-;       - address of integer part result (IRES)
-;       - float two (ARG2)
-;       - float one (ARG1)
-; and returns an _EM_DSIZE-byte floating point number
-; Definition:
-;	PROCEDURE FIF(ARG1, ARG2: LONGREAL; VAR IRES: LONGREAL) : LONGREAL;
-
- exp $FIF
- pro $FIF,0
- lal 0
- loi 2*_EM_DSIZE
- fif _EM_DSIZE
- lal IRES
- loi _EM_PSIZE
- sti _EM_DSIZE
- ret _EM_DSIZE
- end ?
-
-#define FARG    0
-#define ERES    _EM_DSIZE
-
-; FEF is called with two parameters:
-;       - address of base 2 exponent result (ERES)
-;       - floating point number to be split (FARG)
-; and returns an _EM_DSIZE-byte floating point number (the mantissa)
-; Definition:
-;	PROCEDURE FEF(FARG: LONGREAL; VAR ERES: integer): LONGREAL;
-
- exp $FEF
- pro $FEF,0
- lal FARG
- loi _EM_DSIZE
- fef _EM_DSIZE
- lal ERES
- loi _EM_PSIZE
- sti _EM_WSIZE
- ret _EM_DSIZE
- end ?
-
-#define TRAP    0
-
-; TRP is called with one parameter:
-;       - trap number (TRAP)
-; Definition:
-; PROCEDURE TRP(trapno: INTEGER);
-
- exp $TRP
- pro $TRP, 0
- lol TRAP
- trp
- ret 0
- end ?
-
-#define PROC    0
-
-; SIG is called with one parameter:
-;       - procedure instance identifier (PROC)
-; and returns the old traphandler.
-
- exa handler
- exp $SIG
- pro $SIG, 0
- lae handler
- loi _EM_PSIZE
- lal PROC
- loi _EM_PSIZE
- lae handler
- sti _EM_PSIZE
- ret _EM_PSIZE
- end ?
-
- exp $LINO
- pro $LINO,0
- loe 0
- ret _EM_WSIZE
- end ?
-
- exp $FILN
- pro $FILN,0
- lae 4
- loi _EM_PSIZE
- ret _EM_PSIZE
- end ?
Index: trunk/minix/lib/ack/libm2/InOut.mod
===================================================================
--- trunk/minix/lib/ack/libm2/InOut.mod	(revision 9)
+++ 	(revision )
@@ -1,371 +1,0 @@
-(*
-  (c) copyright 1988 by the Vrije Universiteit, Amsterdam, The Netherlands.
-  See the copyright notice in the ACK home directory, in the file "Copyright".
-*)
-
-(*$R-*)
-IMPLEMENTATION MODULE InOut ;
-(*
-  Module:	Wirth's Input/Output module
-  Author:	Ceriel J.H. Jacobs
-  Version:	$Header: /cvsup/minix/src/lib/ack/libm2/InOut.mod,v 1.1 2005/10/10 15:27:46 beng Exp $
-*)
-
-  IMPORT	Streams;
-  FROM	Conversions IMPORT
-			ConvertCardinal, ConvertInteger,
-			ConvertOctal, ConvertHex;
-  FROM	Traps IMPORT	Message;
-
-  CONST	TAB = 11C;
-
-  TYPE	numbuf = ARRAY[0..255] OF CHAR;
-
-  VAR	unread: BOOLEAN;
-	unreadch: CHAR;
-	CurrIn, CurrOut: Streams.Stream;
-	result: Streams.StreamResult;
-
-  PROCEDURE Read(VAR c : CHAR);
-
-  BEGIN
-	IF unread THEN
-		unread := FALSE;
-		c := unreadch;
-		Done := TRUE;
-	ELSE
-		Streams.Read(CurrIn, c, result);
-		Done := result = Streams.succeeded;
-	END;
-  END Read;
-
-  PROCEDURE UnRead(ch: CHAR);
-  BEGIN
-	unread := TRUE;
-	unreadch := ch;
-  END UnRead;
-
-  PROCEDURE Write(c: CHAR);
-  BEGIN
-	Streams.Write(CurrOut, c, result);
-  END Write;
-
-  PROCEDURE OpenInput(defext: ARRAY OF CHAR);
-  VAR namebuf : ARRAY [1..128] OF CHAR;
-  BEGIN
-	IF CurrIn # Streams.InputStream THEN
-		Streams.CloseStream(CurrIn, result);
-	END;
-	MakeFileName("Name of input file: ", defext, namebuf);
-	IF NOT Done THEN RETURN; END;
-	openinput(namebuf);
-  END OpenInput;
-
-  PROCEDURE OpenInputFile(filename: ARRAY OF CHAR);
-  BEGIN
-	IF CurrIn # Streams.InputStream THEN
-		Streams.CloseStream(CurrIn, result);
-	END;
-	openinput(filename);
-  END OpenInputFile;
-
-  PROCEDURE openinput(namebuf: ARRAY OF CHAR);
-  BEGIN
-	IF (namebuf[0] = '-') AND (namebuf[1] = 0C) THEN
-		CurrIn := Streams.InputStream;
-		Done := TRUE;
-	ELSE
-		Streams.OpenStream(CurrIn, namebuf, Streams.text,
-				   Streams.reading, result);
-		Done := result = Streams.succeeded;
-	END;
-  END openinput;
-
-  PROCEDURE CloseInput;
-  BEGIN
-	IF CurrIn # Streams.InputStream THEN
-		Streams.CloseStream(CurrIn, result);
-	END;
-	CurrIn := Streams.InputStream;
-  END CloseInput;
-
-  PROCEDURE OpenOutput(defext: ARRAY OF CHAR);
-  VAR namebuf : ARRAY [1..128] OF CHAR;
-  BEGIN
-	IF CurrOut # Streams.OutputStream THEN
-		Streams.CloseStream(CurrOut, result);
-	END;
-	MakeFileName("Name of output file: ", defext, namebuf);
-	IF NOT Done THEN RETURN; END;
-	openoutput(namebuf);
-  END OpenOutput;
-
-  PROCEDURE OpenOutputFile(filename: ARRAY OF CHAR);
-  BEGIN
-	IF CurrOut # Streams.OutputStream THEN
-		Streams.CloseStream(CurrOut, result);
-	END;
-	openoutput(filename);
-  END OpenOutputFile;
-
-  PROCEDURE openoutput(namebuf: ARRAY OF CHAR);
-  BEGIN
-	IF (namebuf[1] = '-') AND (namebuf[2] = 0C) THEN
-		CurrOut := Streams.OutputStream;
-		Done := TRUE;
-	ELSE
-		Streams.OpenStream(CurrOut, namebuf, Streams.text,
-				   Streams.writing, result);
-		Done := result = Streams.succeeded;
-	END;
-  END openoutput;
-
-  PROCEDURE CloseOutput;
-  BEGIN
-	IF CurrOut # Streams.OutputStream THEN
-		Streams.CloseStream(CurrOut, result);
-	END;
-	CurrOut := Streams.OutputStream;
-  END CloseOutput;
-
-  PROCEDURE MakeFileName(prompt, defext : ARRAY OF CHAR;
-		       VAR buf : ARRAY OF CHAR);
-  VAR	i : INTEGER;
-	j : CARDINAL;
-  BEGIN
-	Done := TRUE;
-	IF Streams.isatty(Streams.InputStream, result) THEN
-		XWriteString(prompt);
-	END;
-	XReadString(buf);
-	i := 0;
-	WHILE buf[i] # 0C DO i := i + 1 END;
-	IF i # 0 THEN
-		i := i - 1;
-		IF buf[i] = '.' THEN
-	    		FOR j := 0 TO HIGH(defext) DO
-				i := i + 1;
-				buf[i] := defext[j];
-	    		END;
-	    		buf[i+1] := 0C;
-		END;
-		RETURN;
-	END;
-	Done := FALSE;
-  END MakeFileName;
-
-  PROCEDURE ReadInt(VAR integ : INTEGER);
-  CONST
-    	SAFELIMITDIV10 = MAX(INTEGER) DIV 10;
-    	SAFELIMITREM10 = MAX(INTEGER) MOD 10;
-  TYPE
-	itype = [0..31];
-	ibuf =  ARRAY itype OF CHAR;
-  VAR
-    	int : INTEGER;
-    	neg : BOOLEAN;
-    	safedigit: [0 .. 9];
-    	chvalue: CARDINAL;
-	buf : ibuf;
-	index : itype;
-  BEGIN
-    	ReadString(buf);
-	IF NOT Done THEN
-		RETURN
-	END;
-	index := 0;
-    	IF buf[index] = '-' THEN
-		neg := TRUE;
-		INC(index);
-    	ELSIF buf[index] = '+' THEN
-		neg := FALSE;
-		INC(index);
-    	ELSE
-		neg := FALSE
-    	END;
-
-    	safedigit := SAFELIMITREM10;
-    	IF neg THEN safedigit := safedigit + 1 END;
-    	int := 0;
-	WHILE (buf[index] >= '0') & (buf[index] <= '9') DO
-  		chvalue := ORD(buf[index]) - ORD('0');
-	   	IF (int > SAFELIMITDIV10) OR 
-		   ( (int = SAFELIMITDIV10) AND
-		     (chvalue > safedigit)) THEN
-			Message("integer too large");
-			HALT;
-	    	ELSE
-			int := 10*int + VAL(INTEGER, chvalue);
-			INC(index)
-	    	END;
-	END;
-	IF neg THEN
-   		integ := -int
-	ELSE
-		integ := int
-	END;
-	IF buf[index] > " " THEN
-		Message("illegal integer");
-		HALT;
-	END;
-	Done := TRUE;
-  END ReadInt;
-
-  PROCEDURE ReadCard(VAR card : CARDINAL);
-  CONST
-    	SAFELIMITDIV10 = MAX(CARDINAL) DIV 10;
-    	SAFELIMITREM10 = MAX(CARDINAL) MOD 10;
-
-  TYPE
-	itype = [0..31];
-	ibuf =  ARRAY itype OF CHAR;
-    
-  VAR
-    	int : CARDINAL;
-    	index  : itype;
-	buf : ibuf;
-    	safedigit: [0 .. 9];
-    	chvalue: CARDINAL;
-  BEGIN
-    	ReadString(buf);
-	IF NOT Done THEN RETURN; END;
-	index := 0;
-    	safedigit := SAFELIMITREM10;
-    	int := 0;
-	WHILE (buf[index] >= '0') & (buf[index] <= '9') DO
-  		chvalue := ORD(buf[index]) - ORD('0');
-	    	IF (int > SAFELIMITDIV10) OR 
-		   ( (int = SAFELIMITDIV10) AND
-		     (chvalue > safedigit)) THEN
-			Message("cardinal too large");
-			HALT;
-	    	ELSE
-			int := 10*int + chvalue;
-			INC(index);
-	    	END;
-	END;
-	IF buf[index] > " " THEN
-		Message("illegal cardinal");
-		HALT;
-	END;
-	card := int;
-	Done := TRUE;
-  END ReadCard;
-
-  PROCEDURE ReadString(VAR s : ARRAY OF CHAR);
-  TYPE charset = SET OF CHAR;
-  VAR	i : CARDINAL;
-    	ch : CHAR;
-
-  BEGIN
-    	i := 0;
-	REPEAT
-		Read(ch);
-	UNTIL NOT (ch IN charset{' ', TAB, 12C, 15C});
-	IF NOT Done THEN
-		RETURN;
-	END;
-	UnRead(ch);
-    	REPEAT
-		Read(ch);
-		termCH := ch;
-		IF i <= HIGH(s) THEN
-			s[i] := ch;
-			IF (NOT Done) OR (ch <= " ") THEN
-				s[i] := 0C;
-			END;
-		END;
-		INC(i);
-    	UNTIL (NOT Done) OR (ch <= " ");
-	IF Done THEN UnRead(ch); END;
-  END ReadString;
-
-  PROCEDURE XReadString(VAR s : ARRAY OF CHAR);
-  VAR	j : CARDINAL;
-    	ch : CHAR;
-
-  BEGIN
-	j := 0;
-	LOOP
-		Streams.Read(Streams.InputStream, ch, result);
-		IF result # Streams.succeeded THEN
-			EXIT;
-		END;
-		IF ch <= " " THEN
-			s[j] := 0C;
-			EXIT;
-		END;
-		IF j < HIGH(s) THEN
-			s[j] := ch;
-			INC(j);
-		END;
-	END;
-  END XReadString;
-
-  PROCEDURE XWriteString(s: ARRAY OF CHAR);
-  VAR i: CARDINAL;
-  BEGIN
-	i := 0;
-	LOOP
-		IF (i <= HIGH(s)) AND (s[i] # 0C) THEN
-			Streams.Write(Streams.OutputStream, s[i], result);
-			INC(i);
-		ELSE
-			EXIT;
-		END;
-	END;
-  END XWriteString;
-
-  PROCEDURE WriteCard(card, width : CARDINAL);
-  VAR
-    	buf : numbuf;
-  BEGIN
-	ConvertCardinal(card, width, buf);
-	WriteString(buf);
-  END WriteCard;
-
-  PROCEDURE WriteInt(int : INTEGER; width : CARDINAL);
-  VAR
-    	buf : numbuf;
-  BEGIN
-    	ConvertInteger(int, width, buf);
-	WriteString(buf);
-  END WriteInt;
-
-  PROCEDURE WriteHex(card, width : CARDINAL);
-  VAR
-    	buf : numbuf;
-  BEGIN
-	ConvertHex(card, width, buf);
-	WriteString(buf);
-  END WriteHex;
-
-  PROCEDURE WriteLn;
-  BEGIN
-    	Write(EOL)
-  END WriteLn;
-
-  PROCEDURE WriteOct(card, width : CARDINAL);
-  VAR
-    	buf : numbuf;
-  BEGIN
-    	ConvertOctal(card, width, buf);
-	WriteString(buf);
-  END WriteOct;
-
-  PROCEDURE WriteString(str : ARRAY OF CHAR);
-  VAR
-    	nbytes : CARDINAL;
-  BEGIN
-    	nbytes := 0;
-    	WHILE (nbytes <= HIGH(str)) AND (str[nbytes] # 0C) DO
-		Write(str[nbytes]);
-		INC(nbytes)
-    	END;
-  END WriteString;
-
-BEGIN	(* InOut initialization *)
-	CurrIn := Streams.InputStream;
-	CurrOut := Streams.OutputStream;
-	unread := FALSE;
-END InOut.
Index: trunk/minix/lib/ack/libm2/LtoUset.e
===================================================================
--- trunk/minix/lib/ack/libm2/LtoUset.e	(revision 9)
+++ 	(revision )
@@ -1,61 +1,0 @@
-#
-;
-; (c) copyright 1988 by the Vrije Universiteit, Amsterdam, The Netherlands.
-; See the copyright notice in the ACK home directory, in the file "Copyright".
-;
-;
-; Module:	Compute non-constant set displays
-; Author:	Ceriel J.H. Jacobs
-; Version:	$Header: /cvsup/minix/src/lib/ack/libm2/LtoUset.e,v 1.1 2005/10/10 15:27:46 beng Exp $
-;
- mes 2,_EM_WSIZE,_EM_PSIZE
-
- ; LtoUset is called for set displays containing { expr1 .. expr2 }.
- ; It has six parameters, of which the caller must pop five:
- ; - The set in which bits must be set.
- ; - the lower bound of the set type.
- ; - The set size in bytes.
- ; - The upper bound of set elements, specified by the set-type.
- ; - "expr2", the upper bound
- ; - "expr1", the lower bound
-
-#define SETBASE	5*_EM_WSIZE
-#define SETLOW	4*_EM_WSIZE
-#define SETSIZE 3*_EM_WSIZE
-#define USETSIZ 2*_EM_WSIZE
-#define LWB	_EM_WSIZE
-#define UPB	0
- exp $LtoUset
- pro $LtoUset,0
- lal SETBASE	; address of initial set
- lol SETSIZE
- los _EM_WSIZE	; load initial set
- lol LWB	; low bound
- lol SETLOW
- sbu _EM_WSIZE
- stl LWB
- lol UPB	; high bound
- lol SETLOW
- sbu _EM_WSIZE
- stl UPB
-1
- lol LWB
- lol UPB
- cmu _EM_WSIZE
- zgt *2		; while low <= high
- lol LWB
- lol SETSIZE
- set ?		; create [low]
- lol SETSIZE
- ior ?		; merge with initial set
- lol LWB
- loc 1
- adu _EM_WSIZE
- stl LWB
- bra *1		; loop back
-2
- lal SETBASE
- lol SETSIZE
- sts _EM_WSIZE	; store result over initial set
- ret 0
- end 0
Index: trunk/minix/lib/ack/libm2/Makedepend-ack
===================================================================
--- trunk/minix/lib/ack/libm2/Makedepend-ack	(revision 9)
+++ 	(revision )
@@ -1,50 +1,0 @@
-depend-ack:
-	rm .depend-ack
-	touch .depend-ack
-	mkdep 'cc -O -I../h -wo -E' Arguments.c | sed -e 's:^\(.\):../../obj-ack//./ack/libm2/\1:' >> .depend-ack
-	mkdep 'm2 -O -ws -n -E' ArraySort.mod | sed -e 's:^\(.\):../../obj-ack//./ack/libm2/\1:' >> .depend-ack
-	mkdep 'm2 -O -ws -n -E' CSP.mod | sed -e 's:^\(.\):../../obj-ack//./ack/libm2/\1:' >> .depend-ack
-	mkdep 'm2 -O -ws -n -E' Conversion.mod | sed -e 's:^\(.\):../../obj-ack//./ack/libm2/\1:' >> .depend-ack
-	mkdep 'cc -O -I../h -wo -E' EM.e | sed -e 's:^\(.\):../../obj-ack//./ack/libm2/\1:' >> .depend-ack
-	mkdep 'm2 -O -ws -n -E' InOut.mod | sed -e 's:^\(.\):../../obj-ack//./ack/libm2/\1:' >> .depend-ack
-	mkdep 'cc -O -I../h -wo -E' LtoUset.e | sed -e 's:^\(.\):../../obj-ack//./ack/libm2/\1:' >> .depend-ack
-	mkdep 'm2 -O -ws -n -E' MathLib0.mod | sed -e 's:^\(.\):../../obj-ack//./ack/libm2/\1:' >> .depend-ack
-	mkdep 'm2 -O -ws -n -E' Mathlib.mod | sed -e 's:^\(.\):../../obj-ack//./ack/libm2/\1:' >> .depend-ack
-	mkdep 'm2 -O -ws -n -E' PascalIO.mod | sed -e 's:^\(.\):../../obj-ack//./ack/libm2/\1:' >> .depend-ack
-	mkdep 'm2 -O -ws -n -E' Processes.mod | sed -e 's:^\(.\):../../obj-ack//./ack/libm2/\1:' >> .depend-ack
-	mkdep 'm2 -O -ws -n -E' RealConver.mod | sed -e 's:^\(.\):../../obj-ack//./ack/libm2/\1:' >> .depend-ack
-	mkdep 'm2 -O -ws -n -E' RealInOut.mod | sed -e 's:^\(.\):../../obj-ack//./ack/libm2/\1:' >> .depend-ack
-	mkdep 'cc -O -I../h -wo -E' SYSTEM.c | sed -e 's:^\(.\):../../obj-ack//./ack/libm2/\1:' >> .depend-ack
-	mkdep 'm2 -O -ws -n -E' Semaphores.mod | sed -e 's:^\(.\):../../obj-ack//./ack/libm2/\1:' >> .depend-ack
-	mkdep 'm2 -O -ws -n -E' Storage.mod | sed -e 's:^\(.\):../../obj-ack//./ack/libm2/\1:' >> .depend-ack
-	mkdep 'cc -O -I../h -wo -E' StrAss.c | sed -e 's:^\(.\):../../obj-ack//./ack/libm2/\1:' >> .depend-ack
-	mkdep 'm2 -O -ws -n -E' Streams.mod | sed -e 's:^\(.\):../../obj-ack//./ack/libm2/\1:' >> .depend-ack
-	mkdep 'm2 -O -ws -n -E' Strings.mod | sed -e 's:^\(.\):../../obj-ack//./ack/libm2/\1:' >> .depend-ack
-	mkdep 'm2 -O -ws -n -E' Termcap.mod | sed -e 's:^\(.\):../../obj-ack//./ack/libm2/\1:' >> .depend-ack
-	mkdep 'm2 -O -ws -n -E' Terminal.mod | sed -e 's:^\(.\):../../obj-ack//./ack/libm2/\1:' >> .depend-ack
-	mkdep 'm2 -O -ws -n -E' Traps.mod | sed -e 's:^\(.\):../../obj-ack//./ack/libm2/\1:' >> .depend-ack
-	mkdep 'cc -O -I../h -wo -E' XXTermcap.c | sed -e 's:^\(.\):../../obj-ack//./ack/libm2/\1:' >> .depend-ack
-	mkdep 'cc -O -I../h -wo -E' absd.c | sed -e 's:^\(.\):../../obj-ack//./ack/libm2/\1:' >> .depend-ack
-	mkdep 'cc -O -I../h -wo -E' absf.e | sed -e 's:^\(.\):../../obj-ack//./ack/libm2/\1:' >> .depend-ack
-	mkdep 'cc -O -I../h -wo -E' absi.c | sed -e 's:^\(.\):../../obj-ack//./ack/libm2/\1:' >> .depend-ack
-	mkdep 'cc -O -I../h -wo -E' absl.c | sed -e 's:^\(.\):../../obj-ack//./ack/libm2/\1:' >> .depend-ack
-	mkdep 'cc -O -I../h -wo -E' blockmove.c | sed -e 's:^\(.\):../../obj-ack//./ack/libm2/\1:' >> .depend-ack
-	mkdep 'cc -O -I../h -wo -E' cap.c | sed -e 's:^\(.\):../../obj-ack//./ack/libm2/\1:' >> .depend-ack
-	mkdep 'cc -O -I../h -wo -E' catch.c | sed -e 's:^\(.\):../../obj-ack//./ack/libm2/\1:' >> .depend-ack
-	mkdep 'cc -O -I../h -wo -E' confarray.c | sed -e 's:^\(.\):../../obj-ack//./ack/libm2/\1:' >> .depend-ack
-	mkdep 'cc -O -I../h -wo -E' dvi.c | sed -e 's:^\(.\):../../obj-ack//./ack/libm2/\1:' >> .depend-ack
-	mkdep 'cc -O -I../h -wo -E' halt.c | sed -e 's:^\(.\):../../obj-ack//./ack/libm2/\1:' >> .depend-ack
-	mkdep 'cc -O -I../h -wo -E' head_m2.e | sed -e 's:^\(.\):../../obj-ack//./ack/libm2/\1:' >> .depend-ack
-	mkdep 'cc -O -I../h -wo -E' init.c | sed -e 's:^\(.\):../../obj-ack//./ack/libm2/\1:' >> .depend-ack
-	mkdep 'cc -O -I../h -wo -E' load.c | sed -e 's:^\(.\):../../obj-ack//./ack/libm2/\1:' >> .depend-ack
-	mkdep 'cc -O -I../h -wo -E' par_misc.e | sed -e 's:^\(.\):../../obj-ack//./ack/libm2/\1:' >> .depend-ack
-	mkdep 'm2 -O -ws -n -E' random.mod | sed -e 's:^\(.\):../../obj-ack//./ack/libm2/\1:' >> .depend-ack
-	mkdep 'cc -O -I../h -wo -E' rcka.c | sed -e 's:^\(.\):../../obj-ack//./ack/libm2/\1:' >> .depend-ack
-	mkdep 'cc -O -I../h -wo -E' rcki.c | sed -e 's:^\(.\):../../obj-ack//./ack/libm2/\1:' >> .depend-ack
-	mkdep 'cc -O -I../h -wo -E' rckil.c | sed -e 's:^\(.\):../../obj-ack//./ack/libm2/\1:' >> .depend-ack
-	mkdep 'cc -O -I../h -wo -E' rcku.c | sed -e 's:^\(.\):../../obj-ack//./ack/libm2/\1:' >> .depend-ack
-	mkdep 'cc -O -I../h -wo -E' rckul.c | sed -e 's:^\(.\):../../obj-ack//./ack/libm2/\1:' >> .depend-ack
-	mkdep 'cc -O -I../h -wo -E' sigtrp.c | sed -e 's:^\(.\):../../obj-ack//./ack/libm2/\1:' >> .depend-ack
-	mkdep 'cc -O -I../h -wo -E' stackprio.c | sed -e 's:^\(.\):../../obj-ack//./ack/libm2/\1:' >> .depend-ack
-	mkdep 'cc -O -I../h -wo -E' store.c | sed -e 's:^\(.\):../../obj-ack//./ack/libm2/\1:' >> .depend-ack
-	mkdep 'cc -O -I../h -wo -E' ucheck.c | sed -e 's:^\(.\):../../obj-ack//./ack/libm2/\1:' >> .depend-ack
Index: trunk/minix/lib/ack/libm2/Makedepend-gnu
===================================================================
--- trunk/minix/lib/ack/libm2/Makedepend-gnu	(revision 9)
+++ 	(revision )
@@ -1,3 +1,0 @@
-depend-gnu:
-	rm .depend-gnu
-	touch .depend-gnu
Index: trunk/minix/lib/ack/libm2/Makefile
===================================================================
--- trunk/minix/lib/ack/libm2/Makefile	(revision 9)
+++ 	(revision )
@@ -1,178 +1,0 @@
-#Generated from ./ack/libm2/Makefile.in
-all: all-ack
-
-all-ack:
-all-gnu:
-
-makefiles: Makefile
-Makedepend-ack Makedepend-gnu: 
-	sh ../../generate.sh ./ack/libm2 ../../obj-ack/ ../../obj-gnu
-
-Makefile: Makefile.in Makedepend-ack Makedepend-gnu
-	sh ../../generate.sh ./ack/libm2 ../../obj-ack/ ../../obj-gnu
-	@echo
-	@echo *Attention*
-	@echo Makefile is regenerated... rerun command to see changes
-	@echo *Attention*
-	@echo
-
-depend: depend-ack
-all-ack: ../../obj-ack//libm2.a
-
-../../obj-ack//libm2.a: ../../obj-ack//libm2.a(Arguments.o)
-../../obj-ack//libm2.a: ../../obj-ack//libm2.a(ArraySort.o)
-../../obj-ack//libm2.a: ../../obj-ack//libm2.a(CSP.o)
-../../obj-ack//libm2.a: ../../obj-ack//libm2.a(Conversion.o)
-../../obj-ack//libm2.a: ../../obj-ack//libm2.a(EM.o)
-../../obj-ack//libm2.a: ../../obj-ack//libm2.a(InOut.o)
-../../obj-ack//libm2.a: ../../obj-ack//libm2.a(LtoUset.o)
-../../obj-ack//libm2.a: ../../obj-ack//libm2.a(MathLib0.o)
-../../obj-ack//libm2.a: ../../obj-ack//libm2.a(Mathlib.o)
-../../obj-ack//libm2.a: ../../obj-ack//libm2.a(PascalIO.o)
-../../obj-ack//libm2.a: ../../obj-ack//libm2.a(Processes.o)
-../../obj-ack//libm2.a: ../../obj-ack//libm2.a(RealConver.o)
-../../obj-ack//libm2.a: ../../obj-ack//libm2.a(RealInOut.o)
-../../obj-ack//libm2.a: ../../obj-ack//libm2.a(SYSTEM.o)
-../../obj-ack//libm2.a: ../../obj-ack//libm2.a(Semaphores.o)
-../../obj-ack//libm2.a: ../../obj-ack//libm2.a(Storage.o)
-../../obj-ack//libm2.a: ../../obj-ack//libm2.a(StrAss.o)
-../../obj-ack//libm2.a: ../../obj-ack//libm2.a(Streams.o)
-../../obj-ack//libm2.a: ../../obj-ack//libm2.a(Strings.o)
-../../obj-ack//libm2.a: ../../obj-ack//libm2.a(Termcap.o)
-../../obj-ack//libm2.a: ../../obj-ack//libm2.a(Terminal.o)
-../../obj-ack//libm2.a: ../../obj-ack//libm2.a(Traps.o)
-../../obj-ack//libm2.a: ../../obj-ack//libm2.a(XXTermcap.o)
-../../obj-ack//libm2.a: ../../obj-ack//libm2.a(absd.o)
-../../obj-ack//libm2.a: ../../obj-ack//libm2.a(absf.o)
-../../obj-ack//libm2.a: ../../obj-ack//libm2.a(absi.o)
-../../obj-ack//libm2.a: ../../obj-ack//libm2.a(absl.o)
-../../obj-ack//libm2.a: ../../obj-ack//libm2.a(blockmove.o)
-../../obj-ack//libm2.a: ../../obj-ack//libm2.a(cap.o)
-../../obj-ack//libm2.a: ../../obj-ack//libm2.a(catch.o)
-../../obj-ack//libm2.a: ../../obj-ack//libm2.a(confarray.o)
-../../obj-ack//libm2.a: ../../obj-ack//libm2.a(dvi.o)
-../../obj-ack//libm2.a: ../../obj-ack//libm2.a(halt.o)
-../../obj-ack//libm2.a: ../../obj-ack//libm2.a(head_m2.o)
-../../obj-ack//libm2.a: ../../obj-ack//libm2.a(init.o)
-../../obj-ack//libm2.a: ../../obj-ack//libm2.a(load.o)
-../../obj-ack//libm2.a: ../../obj-ack//libm2.a(par_misc.o)
-../../obj-ack//libm2.a: ../../obj-ack//libm2.a(random.o)
-../../obj-ack//libm2.a: ../../obj-ack//libm2.a(rcka.o)
-../../obj-ack//libm2.a: ../../obj-ack//libm2.a(rcki.o)
-../../obj-ack//libm2.a: ../../obj-ack//libm2.a(rckil.o)
-../../obj-ack//libm2.a: ../../obj-ack//libm2.a(rcku.o)
-../../obj-ack//libm2.a: ../../obj-ack//libm2.a(rckul.o)
-../../obj-ack//libm2.a: ../../obj-ack//libm2.a(sigtrp.o)
-../../obj-ack//libm2.a: ../../obj-ack//libm2.a(stackprio.o)
-../../obj-ack//libm2.a: ../../obj-ack//libm2.a(store.o)
-../../obj-ack//libm2.a: ../../obj-ack//libm2.a(ucheck.o)
-
-../../obj-ack//libm2.a:
-	ar cr ../../obj-ack//libm2.a ../../obj-ack//./ack/libm2/*.o
-	rm ../../obj-ack//./ack/libm2/*.o
-
-../../obj-ack//libm2.a(Arguments.o): Arguments.c
-	cc -O -I../h -wo -c -o ../../obj-ack//./ack/libm2/Arguments.o Arguments.c
-../../obj-ack//libm2.a(ArraySort.o): ArraySort.mod
-	m2 -O -ws -n -c -o ../../obj-ack//./ack/libm2/ArraySort.o ArraySort.mod
-../../obj-ack//libm2.a(CSP.o): CSP.mod
-	m2 -O -ws -n -c -o ../../obj-ack//./ack/libm2/CSP.o CSP.mod
-../../obj-ack//libm2.a(Conversion.o): Conversion.mod
-	m2 -O -ws -n -c -o ../../obj-ack//./ack/libm2/Conversion.o Conversion.mod
-../../obj-ack//libm2.a(EM.o): EM.e
-	cc -O -I../h -wo -c -o ../../obj-ack//./ack/libm2/EM.o EM.e
-../../obj-ack//libm2.a(InOut.o): InOut.mod
-	m2 -O -ws -n -c -o ../../obj-ack//./ack/libm2/InOut.o InOut.mod
-../../obj-ack//libm2.a(LtoUset.o): LtoUset.e
-	cc -O -I../h -wo -c -o ../../obj-ack//./ack/libm2/LtoUset.o LtoUset.e
-../../obj-ack//libm2.a(MathLib0.o): MathLib0.mod
-	m2 -O -ws -n -c -o ../../obj-ack//./ack/libm2/MathLib0.o MathLib0.mod
-../../obj-ack//libm2.a(Mathlib.o): Mathlib.mod
-	m2 -O -ws -n -c -o ../../obj-ack//./ack/libm2/Mathlib.o Mathlib.mod
-../../obj-ack//libm2.a(PascalIO.o): PascalIO.mod
-	m2 -O -ws -n -c -o ../../obj-ack//./ack/libm2/PascalIO.o PascalIO.mod
-../../obj-ack//libm2.a(Processes.o): Processes.mod
-	m2 -O -ws -n -c -o ../../obj-ack//./ack/libm2/Processes.o Processes.mod
-../../obj-ack//libm2.a(RealConver.o): RealConver.mod
-	m2 -O -ws -n -c -o ../../obj-ack//./ack/libm2/RealConver.o RealConver.mod
-../../obj-ack//libm2.a(RealInOut.o): RealInOut.mod
-	m2 -O -ws -n -c -o ../../obj-ack//./ack/libm2/RealInOut.o RealInOut.mod
-../../obj-ack//libm2.a(SYSTEM.o): SYSTEM.c
-	cc -O -I../h -wo -c -o ../../obj-ack//./ack/libm2/SYSTEM.o SYSTEM.c
-../../obj-ack//libm2.a(Semaphores.o): Semaphores.mod
-	m2 -O -ws -n -c -o ../../obj-ack//./ack/libm2/Semaphores.o Semaphores.mod
-../../obj-ack//libm2.a(Storage.o): Storage.mod
-	m2 -O -ws -n -c -o ../../obj-ack//./ack/libm2/Storage.o Storage.mod
-../../obj-ack//libm2.a(StrAss.o): StrAss.c
-	cc -O -I../h -wo -c -o ../../obj-ack//./ack/libm2/StrAss.o StrAss.c
-../../obj-ack//libm2.a(Streams.o): Streams.mod
-	m2 -O -ws -n -c -o ../../obj-ack//./ack/libm2/Streams.o Streams.mod
-../../obj-ack//libm2.a(Strings.o): Strings.mod
-	m2 -O -ws -n -c -o ../../obj-ack//./ack/libm2/Strings.o Strings.mod
-../../obj-ack//libm2.a(Termcap.o): Termcap.mod
-	m2 -O -ws -n -c -o ../../obj-ack//./ack/libm2/Termcap.o Termcap.mod
-../../obj-ack//libm2.a(Terminal.o): Terminal.mod
-	m2 -O -ws -n -c -o ../../obj-ack//./ack/libm2/Terminal.o Terminal.mod
-../../obj-ack//libm2.a(Traps.o): Traps.mod
-	m2 -O -ws -n -c -o ../../obj-ack//./ack/libm2/Traps.o Traps.mod
-../../obj-ack//libm2.a(XXTermcap.o): XXTermcap.c
-	cc -O -I../h -wo -c -o ../../obj-ack//./ack/libm2/XXTermcap.o XXTermcap.c
-../../obj-ack//libm2.a(absd.o): absd.c
-	cc -O -I../h -wo -c -o ../../obj-ack//./ack/libm2/absd.o absd.c
-../../obj-ack//libm2.a(absf.o): absf.e
-	cc -O -I../h -wo -c -o ../../obj-ack//./ack/libm2/absf.o absf.e
-../../obj-ack//libm2.a(absi.o): absi.c
-	cc -O -I../h -wo -c -o ../../obj-ack//./ack/libm2/absi.o absi.c
-../../obj-ack//libm2.a(absl.o): absl.c
-	cc -O -I../h -wo -c -o ../../obj-ack//./ack/libm2/absl.o absl.c
-../../obj-ack//libm2.a(blockmove.o): blockmove.c
-	cc -O -I../h -wo -c -o ../../obj-ack//./ack/libm2/blockmove.o blockmove.c
-../../obj-ack//libm2.a(cap.o): cap.c
-	cc -O -I../h -wo -c -o ../../obj-ack//./ack/libm2/cap.o cap.c
-../../obj-ack//libm2.a(catch.o): catch.c
-	cc -O -I../h -wo -c -o ../../obj-ack//./ack/libm2/catch.o catch.c
-../../obj-ack//libm2.a(confarray.o): confarray.c
-	cc -O -I../h -wo -c -o ../../obj-ack//./ack/libm2/confarray.o confarray.c
-../../obj-ack//libm2.a(dvi.o): dvi.c
-	cc -O -I../h -wo -c -o ../../obj-ack//./ack/libm2/dvi.o dvi.c
-../../obj-ack//libm2.a(halt.o): halt.c
-	cc -O -I../h -wo -c -o ../../obj-ack//./ack/libm2/halt.o halt.c
-../../obj-ack//libm2.a(head_m2.o): head_m2.e
-	cc -O -I../h -wo -c -o ../../obj-ack//./ack/libm2/head_m2.o head_m2.e
-../../obj-ack//libm2.a(init.o): init.c
-	cc -O -I../h -wo -c -o ../../obj-ack//./ack/libm2/init.o init.c
-../../obj-ack//libm2.a(load.o): load.c
-	cc -O -I../h -wo -c -o ../../obj-ack//./ack/libm2/load.o load.c
-../../obj-ack//libm2.a(par_misc.o): par_misc.e
-	cc -O -I../h -wo -c -o ../../obj-ack//./ack/libm2/par_misc.o par_misc.e
-../../obj-ack//libm2.a(random.o): random.mod
-	m2 -O -ws -n -c -o ../../obj-ack//./ack/libm2/random.o random.mod
-../../obj-ack//libm2.a(rcka.o): rcka.c
-	cc -O -I../h -wo -c -o ../../obj-ack//./ack/libm2/rcka.o rcka.c
-../../obj-ack//libm2.a(rcki.o): rcki.c
-	cc -O -I../h -wo -c -o ../../obj-ack//./ack/libm2/rcki.o rcki.c
-../../obj-ack//libm2.a(rckil.o): rckil.c
-	cc -O -I../h -wo -c -o ../../obj-ack//./ack/libm2/rckil.o rckil.c
-../../obj-ack//libm2.a(rcku.o): rcku.c
-	cc -O -I../h -wo -c -o ../../obj-ack//./ack/libm2/rcku.o rcku.c
-../../obj-ack//libm2.a(rckul.o): rckul.c
-	cc -O -I../h -wo -c -o ../../obj-ack//./ack/libm2/rckul.o rckul.c
-../../obj-ack//libm2.a(sigtrp.o): sigtrp.c
-	cc -O -I../h -wo -c -o ../../obj-ack//./ack/libm2/sigtrp.o sigtrp.c
-../../obj-ack//libm2.a(stackprio.o): stackprio.c
-	cc -O -I../h -wo -c -o ../../obj-ack//./ack/libm2/stackprio.o stackprio.c
-../../obj-ack//libm2.a(store.o): store.c
-	cc -O -I../h -wo -c -o ../../obj-ack//./ack/libm2/store.o store.c
-../../obj-ack//libm2.a(ucheck.o): ucheck.c
-	cc -O -I../h -wo -c -o ../../obj-ack//./ack/libm2/ucheck.o ucheck.c
-
-
-
-clean::
-	rm -f ../../obj-ack//./ack/libm2/*
-
-include Makedepend-ack
-include .depend-ack
-
-include Makedepend-gnu
-include .depend-gnu
Index: trunk/minix/lib/ack/libm2/Makefile.in
===================================================================
--- trunk/minix/lib/ack/libm2/Makefile.in	(revision 9)
+++ 	(revision )
@@ -1,57 +1,0 @@
-# Makefile for lib/ack/libm2.
-
-CFLAGS="-O -I../h -wo"
-M2FLAGS="-O -ws -n"
-
-LIBRARIES=libm2
-
-libm2_FILES=" \
-	Arguments.c \
-	ArraySort.mod \
-	CSP.mod \
-	Conversion.mod \
-	EM.e \
-	InOut.mod \
-	LtoUset.e \
-	MathLib0.mod \
-	Mathlib.mod \
-	PascalIO.mod \
-	Processes.mod \
-	RealConver.mod \
-	RealInOut.mod \
-	SYSTEM.c \
-	Semaphores.mod \
-	Storage.mod \
-	StrAss.c \
-	Streams.mod \
-	Strings.mod \
-	Termcap.mod \
-	Terminal.mod \
-	Traps.mod \
-	XXTermcap.c \
-	absd.c \
-	absf.e \
-	absi.c \
-	absl.c \
-	blockmove.c \
-	cap.c \
-	catch.c \
-	confarray.c \
-	dvi.c \
-	halt.c \
-	head_m2.e \
-	init.c \
-	load.c \
-	par_misc.e \
-	random.mod \
-	rcka.c \
-	rcki.c \
-	rckil.c \
-	rcku.c \
-	rckul.c \
-	sigtrp.c \
-	stackprio.c \
-	store.c \
-	ucheck.c" 
-	
-TYPE=ack
Index: trunk/minix/lib/ack/libm2/MathLib0.mod
===================================================================
--- trunk/minix/lib/ack/libm2/MathLib0.mod	(revision 9)
+++ 	(revision )
@@ -1,69 +1,0 @@
-(*
-  (c) copyright 1988 by the Vrije Universiteit, Amsterdam, The Netherlands.
-  See the copyright notice in the ACK home directory, in the file "Copyright".
-*)
-
-(*$R-*)
-IMPLEMENTATION MODULE MathLib0;
-(*
-  Module:	Some mathematical functions
-  Author:	Ceriel J.H. Jacobs
-  Version:	$Header: /cvsup/minix/src/lib/ack/libm2/MathLib0.mod,v 1.1 2005/10/10 15:27:46 beng Exp $
-*)
-
-  IMPORT	Mathlib;
-
-  PROCEDURE cos(arg: REAL): REAL;
-  BEGIN
-	RETURN Mathlib.cos(arg);
-  END cos;
-
-  PROCEDURE sin(arg: REAL): REAL;
-  BEGIN
-	RETURN Mathlib.sin(arg);
-  END sin;
-
-  PROCEDURE arctan(arg: REAL): REAL;
-  BEGIN
-	RETURN Mathlib.arctan(arg);
-  END arctan;
-
-  PROCEDURE sqrt(arg: REAL): REAL;
-  BEGIN
-	RETURN Mathlib.sqrt(arg);
-  END sqrt;
-
-  PROCEDURE ln(arg: REAL): REAL;
-  BEGIN
-	RETURN Mathlib.ln(arg);
-  END ln;
-
-  PROCEDURE exp(arg: REAL): REAL;
-  BEGIN
-	RETURN Mathlib.exp(arg);
-  END exp;
-
-  PROCEDURE entier(x: REAL): INTEGER;
-  VAR i: INTEGER;
-  BEGIN
-	IF x < 0.0 THEN
-		i := TRUNC(-x);
-		IF FLOAT(i) = -x THEN
-			RETURN -i;
-		ELSE
-			RETURN -i -1;
-		END;
-	END;
-	RETURN TRUNC(x);
-  END entier;
-
-  PROCEDURE real(x: INTEGER): REAL;
-  BEGIN
-	IF x < 0 THEN
-		RETURN - FLOAT(-x);
-	END;
-	RETURN FLOAT(x);
-  END real;
-
-BEGIN
-END MathLib0.
Index: trunk/minix/lib/ack/libm2/Mathlib.mod
===================================================================
--- trunk/minix/lib/ack/libm2/Mathlib.mod	(revision 9)
+++ 	(revision )
@@ -1,576 +1,0 @@
-(*
-  (c) copyright 1988 by the Vrije Universiteit, Amsterdam, The Netherlands.
-  See the copyright notice in the ACK home directory, in the file "Copyright".
-*)
-
-(*$R-*)
-IMPLEMENTATION MODULE Mathlib;
-(*
-  Module:	Mathematical functions
-  Author:	Ceriel J.H. Jacobs
-  Version:	$Header: /cvsup/minix/src/lib/ack/libm2/Mathlib.mod,v 1.1 2005/10/10 15:27:46 beng Exp $
-*)
-
-  FROM	EM IMPORT	FIF, FEF;
-  FROM	Traps IMPORT	Message;
-
-  CONST
-	OneRadianInDegrees	= 57.295779513082320876798155D;
-	OneDegreeInRadians	=  0.017453292519943295769237D;
-	OneOverSqrt2		= 0.70710678118654752440084436210484904D;
-
-  (* basic functions *)
-
-  PROCEDURE pow(x: REAL; i: INTEGER): REAL;
-  BEGIN
-	RETURN SHORT(longpow(LONG(x), i));
-  END pow;
-
-  PROCEDURE longpow(x: LONGREAL; i: INTEGER): LONGREAL;
-    VAR	val: LONGREAL;
-	ri: LONGREAL;
-  BEGIN
-	ri := FLOATD(i);
-	IF x < 0.0D THEN
-		val := longexp(longln(-x) * ri);
-		IF ODD(i) THEN RETURN -val;
-		ELSE RETURN val;
-		END;
-	ELSIF x = 0.0D THEN
-		RETURN 0.0D;
-	ELSE
-		RETURN longexp(longln(x) * ri);
-	END;
-  END longpow;
-
-  PROCEDURE sqrt(x: REAL): REAL;
-  BEGIN
-	RETURN SHORT(longsqrt(LONG(x)));
-  END sqrt;
-
-  PROCEDURE longsqrt(x: LONGREAL): LONGREAL;
-    VAR
-	temp: LONGREAL;
-	exp, i: INTEGER;
-  BEGIN
-	IF x <= 0.0D THEN
-		IF x < 0.0D THEN
-			Message("sqrt: negative argument");
-			HALT
-		END;
-		RETURN 0.0D;
-	END;
-	temp := FEF(x,exp);
-	(*
-	 * NOTE
-	 * this wont work on 1's comp
-	 *)
-	IF ODD(exp) THEN
-		temp := 2.0D * temp;
-		DEC(exp);
-	END;
-	temp := 0.5D*(1.0D + temp);
-
-	WHILE exp > 28 DO
-		temp := temp * 16384.0D;
-		exp := exp - 28;
-	END;
-	WHILE exp < -28 DO
-		temp := temp / 16384.0D;
-		exp := exp + 28;
-	END;
-	WHILE exp >= 2 DO
-		temp := temp * 2.0D;
-		exp := exp - 2;
-	END;
-	WHILE exp <= -2 DO
-		temp := temp / 2.0D;
-		exp := exp + 2;
-	END;
-	FOR i := 0 TO 5 DO
-		temp := 0.5D*(temp + x/temp);
-	END;
-	RETURN temp;
-  END longsqrt;
-
-  PROCEDURE ldexp(x:LONGREAL; n: INTEGER): LONGREAL;
-  BEGIN
-	WHILE n >= 16 DO
-		x := x * 65536.0D;
-		n := n - 16;
-	END;
-	WHILE n > 0 DO
-		x := x * 2.0D;
-		DEC(n);
-	END;
-	WHILE n <= -16 DO
-		x := x / 65536.0D;
-		n := n + 16;
-	END;
-	WHILE n < 0 DO
-		x := x / 2.0D;
-		INC(n);
-	END;
-	RETURN x;
-  END ldexp;
-
-  PROCEDURE exp(x: REAL): REAL;
-  BEGIN
-	RETURN SHORT(longexp(LONG(x)));
-  END exp;
-
-  PROCEDURE longexp(x: LONGREAL): LONGREAL;
-  (*	Algorithm and coefficients from:
-		"Software manual for the elementary functions"
-		by W.J. Cody and W. Waite, Prentice-Hall, 1980
-  *)
-    CONST
-	p0 = 0.25000000000000000000D+00;
-	p1 = 0.75753180159422776666D-02;
-	p2 = 0.31555192765684646356D-04;
-	q0 = 0.50000000000000000000D+00;
-	q1 = 0.56817302698551221787D-01;
-	q2 = 0.63121894374398503557D-03;
-	q3 = 0.75104028399870046114D-06;
-
-    VAR
-	neg: BOOLEAN;
-	n: INTEGER;
-	xn, g, x1, x2: LONGREAL;
-  BEGIN
-	neg := x < 0.0D;
-	IF neg THEN
-		x := -x;
-	END;
-	n := TRUNC(x/longln2 + 0.5D);
-	xn := FLOATD(n);
-	x1 := FLOATD(TRUNCD(x));
-	x2 := x - x1;
-	g := ((x1 - xn * 0.693359375D)+x2) - xn * (-2.1219444005469058277D-4);
-	IF neg THEN
-		g := -g;
-		n := -n;
-	END;
-	xn := g*g;
-	x := g*((p2*xn+p1)*xn+p0);
-	INC(n);
-	RETURN ldexp(0.5D + x/((((q3*xn+q2)*xn+q1)*xn+q0) - x), n);
-  END longexp;
-
-  PROCEDURE ln(x: REAL): REAL;	(* natural log *)
-  BEGIN
-	RETURN SHORT(longln(LONG(x)));
-  END ln;
-
-  PROCEDURE longln(x: LONGREAL): LONGREAL;	(* natural log *)
-  (*	Algorithm and coefficients from:
-		"Software manual for the elementary functions"
-		by W.J. Cody and W. Waite, Prentice-Hall, 1980
-   *)
-    CONST
-	p0 = -0.64124943423745581147D+02;
-	p1 =  0.16383943563021534222D+02;
-	p2 = -0.78956112887491257267D+00;
-	q0 = -0.76949932108494879777D+03;
-	q1 =  0.31203222091924532844D+03;
-	q2 = -0.35667977739034646171D+02;
-	q3 =  1.0D;
-    VAR
-	exp: INTEGER;
-	z, znum, zden, w: LONGREAL;
-
-  BEGIN
-	IF x <= 0.0D THEN
-		Message("ln: argument <= 0");
-		HALT
-	END;
-	x := FEF(x, exp);
-	IF x > OneOverSqrt2 THEN
-		znum := (x - 0.5D) - 0.5D;
-		zden := x * 0.5D + 0.5D;
-	ELSE
-		znum := x - 0.5D;
-		zden := znum * 0.5D + 0.5D;
-		DEC(exp);
-	END;
-	z := znum / zden;
-	w := z * z;
-	x := z + z * w * (((p2*w+p1)*w+p0)/(((q3*w+q2)*w+q1)*w+q0));
-	z := FLOATD(exp);
-	x := x + z * (-2.121944400546905827679D-4);
-	RETURN x + z * 0.693359375D;
-  END longln;
-
-  PROCEDURE log(x: REAL): REAL;	(* log with base 10 *)
-  BEGIN
-	RETURN SHORT(longlog(LONG(x)));
-  END log;
-
-  PROCEDURE longlog(x: LONGREAL): LONGREAL;	(* log with base 10 *)
-  BEGIN
-	RETURN longln(x)/longln10;
-  END longlog;
-
-  (* trigonometric functions; arguments in radians *)
-
-  PROCEDURE sin(x: REAL): REAL;
-  BEGIN
-	RETURN SHORT(longsin(LONG(x)));
-  END sin;
-
-  PROCEDURE sinus(x: LONGREAL; cosflag: BOOLEAN) : LONGREAL;
-  (*	Algorithm and coefficients from:
-		"Software manual for the elementary functions"
-		by W.J. Cody and W. Waite, Prentice-Hall, 1980
-  *)
-    CONST
-	r0 = -0.16666666666666665052D+00;
-	r1 =  0.83333333333331650314D-02;
-	r2 = -0.19841269841201840457D-03;
-	r3 =  0.27557319210152756119D-05;
-	r4 = -0.25052106798274584544D-07;
-	r5 =  0.16058936490371589114D-09;
-	r6 = -0.76429178068910467734D-12;
-	r7 =  0.27204790957888846175D-14;
-	A1 =  3.1416015625D;
-	A2 = -8.908910206761537356617D-6;
-    VAR
-	x1, x2, y : LONGREAL;
-	neg : BOOLEAN;
-  BEGIN
-	IF x < 0.0D THEN
-		neg := TRUE;
-		x := -x
-	ELSE	neg := FALSE
-	END;
-	IF cosflag THEN
-		neg := FALSE;
-		y := longhalfpi + x
-	ELSE
-		y := x
-	END;
-	y := y / longpi + 0.5D;
-
-	IF FIF(y, 1.0D, y) < 0.0D THEN ; END;
-	IF FIF(y, 0.5D, x1) # 0.0D THEN neg := NOT neg END;
-	IF cosflag THEN y := y - 0.5D END;
-	x2 := FIF(x, 1.0, x1);
-	x := x1 - y * A1;
-	x := x + x2;
-	x := x - y * A2;
-
-	IF x < 0.0D THEN
-		neg := NOT neg;
-		x := -x
-	END;
-	y := x * x;
-	x := x + x * y * (((((((r7*y+r6)*y+r5)*y+r4)*y+r3)*y+r2)*y+r1)*y+r0);
-	IF neg THEN RETURN -x END;
-	RETURN x;
-  END sinus;
-
-  PROCEDURE longsin(x: LONGREAL): LONGREAL;
-  BEGIN
-	RETURN sinus(x, FALSE);
-  END longsin;
-
-  PROCEDURE cos(x: REAL): REAL;
-  BEGIN
-	RETURN SHORT(longcos(LONG(x)));
-  END cos;
-
-  PROCEDURE longcos(x: LONGREAL): LONGREAL;
-  BEGIN
-	IF x < 0.0D THEN x := -x; END;
-	RETURN sinus(x, TRUE);	
-  END longcos;
-
-  PROCEDURE tan(x: REAL): REAL;
-  BEGIN
-	RETURN SHORT(longtan(LONG(x)));
-  END tan;
-
-  PROCEDURE longtan(x: LONGREAL): LONGREAL;
-  (*	Algorithm and coefficients from:
-		"Software manual for the elementary functions"
-		by W.J. Cody and W. Waite, Prentice-Hall, 1980
-  *)
-
-    CONST
-	p1 = -0.13338350006421960681D+00;
-	p2 =  0.34248878235890589960D-02;
-	p3 = -0.17861707342254426711D-04;
-
-	q0 =  1.0D;
-	q1 = -0.46671683339755294240D+00;
-	q2 =  0.25663832289440112864D-01;
-	q3 = -0.31181531907010027307D-03;
-	q4 =  0.49819433993786512270D-06;
-
-	A1 =  1.57080078125D;
-	A2 = -4.454455103380768678308D-06;
-
-    VAR y, x1, x2: LONGREAL;
-	negative: BOOLEAN;
-	invert: BOOLEAN;
-  BEGIN
-	negative := x < 0.0D;
-	y := x / longhalfpi + 0.5D;
-
-        (*      Use extended precision to calculate reduced argument.
-                Here we used 12 bits of the mantissa for a1.
-                Also split x in integer part x1 and fraction part x2.
-        *)
-	IF FIF(y, 1.0D, y) < 0.0D THEN ; END;
-	invert := FIF(y, 0.5D, x1) # 0.0D;
-	x2 := FIF(x, 1.0D, x1);
-	x := x1 - y * A1;
-	x := x + x2;
-	x := x - y * A2;
-
-	y := x * x;
-	x := x + x * y * ((p3*y+p2)*y+p1);
-	y := (((q4*y+q3)*y+q2)*y+q1)*y+q0;
-	IF negative THEN x := -x END;
-	IF invert THEN RETURN -y/x END;
-	RETURN x/y;
-  END longtan;
-
-  PROCEDURE arcsin(x: REAL): REAL;
-  BEGIN
-	RETURN SHORT(longarcsin(LONG(x)));
-  END arcsin;
-
-  PROCEDURE arcsincos(x: LONGREAL; cosfl: BOOLEAN): LONGREAL;
-    CONST
-	p0 = -0.27368494524164255994D+02;
-	p1 =  0.57208227877891731407D+02;
-	p2 = -0.39688862997540877339D+02;
-	p3 =  0.10152522233806463645D+02;
-	p4 = -0.69674573447350646411D+00;
-
-	q0 = -0.16421096714498560795D+03;
-	q1 =  0.41714430248260412556D+03;
-	q2 = -0.38186303361750149284D+03;
-	q3 =  0.15095270841030604719D+03;
-	q4 = -0.23823859153670238830D+02;
-	q5 =  1.0D;
-    VAR
-	negative : BOOLEAN;
-	big: BOOLEAN;
-	g: LONGREAL;
-  BEGIN
-	negative := x < 0.0D;
-	IF negative THEN x := -x; END;
-	IF x > 0.5D THEN
-		big := TRUE;
-		IF x > 1.0D THEN
-			Message("arcsin or arccos: argument > 1");
-			HALT
-		END;
-		g := 0.5D - 0.5D * x;
-		x := -longsqrt(g);
-		x := x + x;
-	ELSE
-		big := FALSE;
-		g := x * x;
-	END;
-	x := x + x * g *
-	  ((((p4*g+p3)*g+p2)*g+p1)*g+p0)/(((((q5*g+q4)*g+q3)*g+q2)*g+q1)*g+q0);
-	IF cosfl AND NOT negative THEN x := -x END;
-	IF cosfl = NOT big THEN
-		x := (x + longquartpi) + longquartpi;
-	ELSIF cosfl AND negative AND big THEN
-		x := (x + longhalfpi) + longhalfpi;
-	END;
-	IF negative AND NOT cosfl THEN x := -x END;
-	RETURN x;
-  END arcsincos;	
-
-  PROCEDURE longarcsin(x: LONGREAL): LONGREAL;
-  BEGIN
-	RETURN arcsincos(x, FALSE);
-  END longarcsin;
-
-  PROCEDURE arccos(x: REAL): REAL;
-  BEGIN
-	RETURN SHORT(longarccos(LONG(x)));
-  END arccos;
-
-  PROCEDURE longarccos(x: LONGREAL): LONGREAL;
-  BEGIN
-	RETURN arcsincos(x, TRUE);
-  END longarccos;
-
-  PROCEDURE arctan(x: REAL): REAL;
-  BEGIN
-	RETURN SHORT(longarctan(LONG(x)));
-  END arctan;
-
-  VAR A: ARRAY[0..3] OF LONGREAL;
-      arctaninit: BOOLEAN;
-
-  PROCEDURE longarctan(x: LONGREAL): LONGREAL;
-  (*	Algorithm and coefficients from:
-		"Software manual for the elementary functions"
-		by W.J. Cody and W. Waite, Prentice-Hall, 1980
-  *)
-    CONST
-	p0 = -0.13688768894191926929D+02;
-	p1 = -0.20505855195861651981D+02;
-	p2 = -0.84946240351320683534D+01;
-	p3 = -0.83758299368150059274D+00;
-	q0 =  0.41066306682575781263D+02;
-	q1 =  0.86157349597130242515D+02;
-	q2 =  0.59578436142597344465D+02;
-	q3 =  0.15024001160028576121D+02;
-	q4 =  1.0D;
-    VAR
-	g: LONGREAL;
-	neg: BOOLEAN;
-	n: INTEGER;
-  BEGIN
-	IF NOT arctaninit THEN
-		arctaninit := TRUE;
-		A[0] := 0.0D;
-		A[1] := 0.52359877559829887307710723554658381D;	(* p1/6 *)
-		A[2] := longhalfpi;
-		A[3] := 1.04719755119659774615421446109316763D; (* pi/3 *)
-	END;
-	neg := FALSE;
-	IF x < 0.0D THEN
-		neg := TRUE;
-		x := -x;
-	END;
-	IF x > 1.0D THEN
-		x := 1.0D/x;
-		n := 2
-	ELSE
-		n := 0
-	END;
-	IF x > 0.26794919243112270647D (* 2-sqrt(3) *) THEN
-		INC(n);
-		x := (((0.73205080756887729353D*x-0.5D)-0.5D)+x)/
-			(1.73205080756887729353D + x);
-	END;
-	g := x*x;
-	x := x + x * g * (((p3*g+p2)*g+p1)*g+p0) / ((((q4*g+q3)*g+q2)*g+q1)*g+q0);
-	IF n > 1 THEN x := -x END;
-	x := x + A[n];
-	IF neg THEN RETURN -x; END;
-	RETURN x;
-  END longarctan;
-
-  (* hyperbolic functions *)
-  (* The C math library has better implementations for some of these, but
-     they depend on some properties of the floating point implementation,
-     and, for now, we don't want that in the Modula-2 system.
-  *)
-
-  PROCEDURE sinh(x: REAL): REAL;
-  BEGIN
-	RETURN SHORT(longsinh(LONG(x)));
-  END sinh;
-
-  PROCEDURE longsinh(x: LONGREAL): LONGREAL;
-    VAR expx: LONGREAL;
-  BEGIN
-	expx := longexp(x);
-	RETURN (expx - 1.0D/expx)/2.0D;
-  END longsinh;
-
-  PROCEDURE cosh(x: REAL): REAL;
-  BEGIN
-	RETURN SHORT(longcosh(LONG(x)));
-  END cosh;
-
-  PROCEDURE longcosh(x: LONGREAL): LONGREAL;
-    VAR expx: LONGREAL;
-  BEGIN
-	expx := longexp(x);
-	RETURN (expx + 1.0D/expx)/2.0D;
-  END longcosh;
-
-  PROCEDURE tanh(x: REAL): REAL;
-  BEGIN
-	RETURN SHORT(longtanh(LONG(x)));
-  END tanh;
-
-  PROCEDURE longtanh(x: LONGREAL): LONGREAL;
-    VAR expx: LONGREAL;
-  BEGIN
-	expx := longexp(x);
-	RETURN (expx - 1.0D/expx) / (expx + 1.0D/expx);
-  END longtanh;
-
-  PROCEDURE arcsinh(x: REAL): REAL;
-  BEGIN
-	RETURN SHORT(longarcsinh(LONG(x)));
-  END arcsinh;
-
-  PROCEDURE longarcsinh(x: LONGREAL): LONGREAL;
-    VAR neg: BOOLEAN;
-  BEGIN
-	neg := FALSE;
-	IF x < 0.0D THEN
-		neg := TRUE;
-		x := -x;
-	END;
-	x := longln(x + longsqrt(x*x+1.0D));
-	IF neg THEN RETURN -x; END;
-	RETURN x;
-  END longarcsinh;
-
-  PROCEDURE arccosh(x: REAL): REAL;
-  BEGIN
-	RETURN SHORT(longarccosh(LONG(x)));
-  END arccosh;
-
-  PROCEDURE longarccosh(x: LONGREAL): LONGREAL;
-  BEGIN
-	IF x < 1.0D THEN
-		Message("arccosh: argument < 1");
-		HALT
-	END;
-	RETURN longln(x + longsqrt(x*x - 1.0D));
-  END longarccosh;
-
-  PROCEDURE arctanh(x: REAL): REAL;
-  BEGIN
-	RETURN SHORT(longarctanh(LONG(x)));
-  END arctanh;
-
-  PROCEDURE longarctanh(x: LONGREAL): LONGREAL;
-  BEGIN
-	IF (x <= -1.0D) OR (x >= 1.0D) THEN
-		Message("arctanh: ABS(argument) >= 1");
-		HALT
-	END;
-	RETURN longln((1.0D + x)/(1.0D - x)) / 2.0D;
-  END longarctanh;
-
-  (* conversions *)
-
-  PROCEDURE RadianToDegree(x: REAL): REAL;
-  BEGIN
-	RETURN SHORT(longRadianToDegree(LONG(x)));
-  END RadianToDegree;
-
-  PROCEDURE longRadianToDegree(x: LONGREAL): LONGREAL;
-  BEGIN
-	RETURN x * OneRadianInDegrees;
-  END longRadianToDegree;
-
-  PROCEDURE DegreeToRadian(x: REAL): REAL;
-  BEGIN
-	RETURN SHORT(longDegreeToRadian(LONG(x)));
-  END DegreeToRadian;
-
-  PROCEDURE longDegreeToRadian(x: LONGREAL): LONGREAL;
-  BEGIN
-	RETURN x * OneDegreeInRadians;
-  END longDegreeToRadian;
-
-BEGIN
-	arctaninit := FALSE;
-END Mathlib.
Index: trunk/minix/lib/ack/libm2/PascalIO.mod
===================================================================
--- trunk/minix/lib/ack/libm2/PascalIO.mod	(revision 9)
+++ 	(revision )
@@ -1,437 +1,0 @@
-(*
-  (c) copyright 1988 by the Vrije Universiteit, Amsterdam, The Netherlands.
-  See the copyright notice in the ACK home directory, in the file "Copyright".
-*)
-
-(*$R-*)
-IMPLEMENTATION MODULE PascalIO;
-(*
-  Module:	Pascal-like Input/Output
-  Author:	Ceriel J.H. Jacobs
-  Version:	$Header: /cvsup/minix/src/lib/ack/libm2/PascalIO.mod,v 1.1 2005/10/10 15:27:46 beng Exp $
-*)
-
-  FROM	Conversions IMPORT
-			ConvertInteger, ConvertCardinal;
-  FROM	RealConversions IMPORT
-			LongRealToString, StringToLongReal;
-  FROM	Traps IMPORT	Message;
-  FROM	Streams IMPORT	Stream, StreamKind, StreamMode, StreamResult,
-			InputStream, OutputStream, OpenStream, CloseStream, 
-			EndOfStream, Read, Write, StreamBuffering;
-  FROM	Storage IMPORT	Allocate;
-  FROM	SYSTEM IMPORT	ADR;
-
-  TYPE	charset = SET OF CHAR;
-	btype = (Preading, Pwriting, free);
-
-  CONST	spaces = charset{11C, 12C, 13C, 14C, 15C, ' '};
-
-  TYPE	IOstream = RECORD
-			type: btype;
-			done, eof : BOOLEAN;
-			ch: CHAR;
-			next: Text;
-			stream: Stream;
-		END;
-	Text =	POINTER TO IOstream;
-	numbuf = ARRAY[0..255] OF CHAR;
-
-  VAR	ibuf, obuf: IOstream;
-	head: Text;
-	result: StreamResult;
-
-  PROCEDURE Reset(VAR InputText: Text; Filename: ARRAY OF CHAR);
-  BEGIN
-	doclose(InputText);
-	getstruct(InputText);
-	WITH InputText^ DO
-		OpenStream(stream, Filename, text, reading, result);
-		IF result # succeeded THEN
-			Message("could not open input file");
-			HALT;
-		END;
-		type := Preading;
-		done := FALSE;
-		eof := FALSE;
-	END;
-  END Reset;
-
-  PROCEDURE Rewrite(VAR OutputText: Text; Filename: ARRAY OF CHAR);
-  BEGIN
-	doclose(OutputText);
-	getstruct(OutputText);
-	WITH OutputText^ DO
-		OpenStream(stream, Filename, text, writing, result);
-		IF result # succeeded THEN
-			Message("could not open output file");
-			HALT;
-		END;
-		type := Pwriting;
-	END;
-  END Rewrite;
-
-  PROCEDURE CloseOutput();
-  VAR p: Text;
-  BEGIN
-	p := head;
-	WHILE p # NIL DO
-		doclose(p);
-		p := p^.next;
-	END;
-  END CloseOutput;
-
-  PROCEDURE doclose(Xtext: Text);
-  BEGIN
-	IF Xtext # Notext THEN
-		WITH Xtext^ DO
-			IF type # free THEN
-				CloseStream(stream, result);
-				type := free;
-			END;
-		END;
-	END;
-  END doclose;
-
-  PROCEDURE getstruct(VAR Xtext: Text);
-  BEGIN
-	Xtext := head;
-	WHILE (Xtext # NIL) AND (Xtext^.type # free) DO
-		Xtext := Xtext^.next;
-	END;
-	IF Xtext = NIL THEN
-		Allocate(Xtext,SIZE(IOstream));
-		Xtext^.next := head;
-		head := Xtext;
-	END;
-  END getstruct;
-
-  PROCEDURE Error(tp: btype);
-  BEGIN
-	IF tp = Preading THEN
-		Message("input text expected");
-	ELSE
-		Message("output text expected");
-	END;
-	HALT;
-  END Error;
-
-  PROCEDURE ReadChar(InputText: Text; VAR ch : CHAR);
-  BEGIN
-	ch := NextChar(InputText);
-	IF InputText^.eof THEN
-		Message("unexpected EOF");
-		HALT;
-	END;
-	InputText^.done := FALSE;
-  END ReadChar;
-
-  PROCEDURE NextChar(InputText: Text): CHAR;
-  BEGIN
-	WITH InputText^ DO
-		IF type # Preading THEN Error(Preading); END;
-		IF NOT done THEN
-			IF EndOfStream(stream, result) THEN
-				eof := TRUE;
-				ch := 0C;
-			ELSE
-				Read(stream, ch, result);
-				done := TRUE;
-			END;
-		END;
-		RETURN ch;
-	END;
-  END NextChar;
-
-  PROCEDURE Get(InputText: Text);
-  VAR dummy: CHAR;
-  BEGIN
-	ReadChar(InputText, dummy);
-  END Get;
-
-  PROCEDURE Eoln(InputText: Text): BOOLEAN;
-  BEGIN
-	RETURN NextChar(InputText) = 12C;
-  END Eoln;
-
-  PROCEDURE Eof(InputText: Text): BOOLEAN;
-  BEGIN
-	RETURN (NextChar(InputText) = 0C) AND InputText^.eof;
-  END Eof;
-
-  PROCEDURE ReadLn(InputText: Text);
-  VAR ch: CHAR;
-  BEGIN
-	REPEAT
-		ReadChar(InputText, ch)
-	UNTIL ch = 12C;
-  END ReadLn;
-
-  PROCEDURE WriteChar(OutputText: Text; char: CHAR);
-  BEGIN
-	WITH OutputText^ DO
-		IF type # Pwriting THEN Error(Pwriting); END;
-		Write(stream, char, result);
-	END;
-  END WriteChar;
-
-  PROCEDURE WriteLn(OutputText: Text);
-  BEGIN
-	WriteChar(OutputText, 12C);
-  END WriteLn;
-
-  PROCEDURE Page(OutputText: Text);
-  BEGIN
-	WriteChar(OutputText, 14C);
-  END Page;
-
-  PROCEDURE ReadInteger(InputText: Text; VAR int : INTEGER);
-  CONST
-    	SAFELIMITDIV10 = MAX(INTEGER) DIV 10;
-    	SAFELIMITREM10 = MAX(INTEGER) MOD 10;
-  VAR
-    	neg : BOOLEAN;
-    	safedigit: CARDINAL;
-	ch: CHAR;
-    	chvalue: CARDINAL;
-  BEGIN
-    	WHILE NextChar(InputText) IN spaces DO
-		Get(InputText);
-	END;
-	ch := NextChar(InputText);
-    	IF ch = '-' THEN
-		Get(InputText);
-		ch := NextChar(InputText);
-		neg := TRUE;
-    	ELSIF ch = '+' THEN
-		Get(InputText);
-		ch := NextChar(InputText);
-		neg := FALSE;
-    	ELSE
-		neg := FALSE
-    	END;
-
-    	safedigit := SAFELIMITREM10;
-    	IF neg THEN safedigit := safedigit + 1 END;
-    	int := 0;
-	IF (ch >= '0') AND (ch <= '9') THEN
-		WHILE (ch >= '0') & (ch <= '9') DO
-  			chvalue := ORD(ch) - ORD('0');
-	   		IF (int < -SAFELIMITDIV10) OR 
-		   	   ( (int = -SAFELIMITDIV10) AND
-		     	     (chvalue > safedigit)) THEN
-				Message("integer too large");
-				HALT;
-	    		ELSE
-				int := 10*int - VAL(INTEGER, chvalue);
-				Get(InputText);
-				ch := NextChar(InputText);
-	    		END;
-		END;
-		IF NOT neg THEN
-   			int := -int
-		END;
-	ELSE
-		Message("integer expected");
-		HALT;
-	END;
-  END ReadInteger;
-
-  PROCEDURE ReadCardinal(InputText: Text; VAR card : CARDINAL);
-  CONST
-    	SAFELIMITDIV10 = MAX(CARDINAL) DIV 10;
-    	SAFELIMITREM10 = MAX(CARDINAL) MOD 10;
-
-  VAR
-    	ch : CHAR;
-    	safedigit: CARDINAL;
-    	chvalue: CARDINAL;
-  BEGIN
-    	WHILE NextChar(InputText) IN spaces DO
-		Get(InputText);
-	END;
-	ch := NextChar(InputText);
-    	safedigit := SAFELIMITREM10;
-    	card := 0;
-	IF (ch >= '0') AND (ch <= '9') THEN
-		WHILE (ch >= '0') & (ch <= '9') DO
-  			chvalue := ORD(ch) - ORD('0');
-	    		IF (card > SAFELIMITDIV10) OR 
-			   ( (card = SAFELIMITDIV10) AND
-			     (chvalue > safedigit)) THEN
-				Message("cardinal too large");
-				HALT;
-		    	ELSE
-				card := 10*card + chvalue;
-				Get(InputText);
-				ch := NextChar(InputText);
-		    	END;
-		END;
-	ELSE
-		Message("cardinal expected");
-		HALT;
-	END;
-  END ReadCardinal;
-
-  PROCEDURE ReadReal(InputText: Text; VAR real: REAL);
-  VAR x1: LONGREAL;
-  BEGIN
-	ReadLongReal(InputText, x1);
-	real := x1
-  END ReadReal;
-
-  PROCEDURE ReadLongReal(InputText: Text; VAR real: LONGREAL);
-  VAR
-	buf: numbuf;
-	ch: CHAR;
-	ok: BOOLEAN;
-	index: INTEGER;
-
-    PROCEDURE inch(): CHAR;
-    BEGIN
-	buf[index] := ch;
-	INC(index);
-	Get(InputText);
-	RETURN NextChar(InputText);
-    END inch;
-
-  BEGIN
-	index := 0;
-	ok := TRUE;
-    	WHILE NextChar(InputText) IN spaces DO
-		Get(InputText);
-	END;
-	ch := NextChar(InputText);
-	IF (ch ='+') OR (ch = '-') THEN
-		ch := inch();
-	END;
-	IF (ch >= '0') AND (ch <= '9') THEN
-		WHILE (ch >= '0') AND (ch <= '9') DO
-			ch := inch();
-		END;
-		IF (ch = '.') THEN
-			ch := inch();
-			IF (ch >= '0') AND (ch <= '9') THEN
-				WHILE (ch >= '0') AND (ch <= '9') DO
-					ch := inch();
-				END;
-			ELSE
-				ok := FALSE;
-			END;
-		END;
-		IF ok AND (ch = 'E') THEN
-			ch := inch();
-			IF (ch ='+') OR (ch = '-') THEN
-				ch := inch();
-			END;
-			IF (ch >= '0') AND (ch <= '9') THEN
-				WHILE (ch >= '0') AND (ch <= '9') DO
-					ch := inch();
-				END;
-			ELSE
-				ok := FALSE;
-			END;
-		END;
-	ELSE
-		ok := FALSE;
-	END;
-	IF ok THEN
-		buf[index] := 0C;
-		StringToLongReal(buf, real, ok);
-	END;
-	IF NOT ok THEN
-		Message("Illegal real");
-		HALT;
-	END;
-  END ReadLongReal;
-
-  PROCEDURE WriteCardinal(OutputText: Text; card: CARDINAL; width: CARDINAL);
-  VAR
-    	buf : numbuf;
-  BEGIN
-	ConvertCardinal(card, 1, buf);
-	WriteString(OutputText, buf, width);
-  END WriteCardinal;
-
-  PROCEDURE WriteInteger(OutputText: Text; int: INTEGER; width: CARDINAL);
-  VAR
-    	buf : numbuf;
-  BEGIN
-    	ConvertInteger(int, 1, buf);
-	WriteString(OutputText, buf, width);
-  END WriteInteger;
-
-  PROCEDURE WriteBoolean(OutputText: Text; bool: BOOLEAN; width: CARDINAL);
-  BEGIN
-	IF bool THEN
-		WriteString(OutputText, " TRUE", width);
-	ELSE
-		WriteString(OutputText, "FALSE", width);
-	END;
-  END WriteBoolean;
-
-  PROCEDURE WriteReal(OutputText: Text; real: REAL; width, nfrac: CARDINAL);
-  BEGIN
-	WriteLongReal(OutputText, LONG(real), width, nfrac)
-  END WriteReal;
-
-  PROCEDURE WriteLongReal(OutputText: Text; real: LONGREAL; width, nfrac: CARDINAL);
-  VAR
-	buf: numbuf;
-	ok: BOOLEAN;
-	digits: INTEGER;
-  BEGIN
-	IF width > SIZE(buf) THEN
-		width := SIZE(buf);
-	END;
-	IF nfrac > 0 THEN
-		LongRealToString(real, width, nfrac, buf, ok);
-	ELSE
-		IF width < 9 THEN width := 9; END;
-		IF real < 0.0D THEN
-			digits := 7 - INTEGER(width);
-		ELSE
-			digits := 6 - INTEGER(width);
-		END;
-		LongRealToString(real, width, digits, buf, ok);
-	END;
-	WriteString(OutputText, buf, 0);
-  END WriteLongReal;
-
-  PROCEDURE WriteString(OutputText: Text; str: ARRAY OF CHAR; width: CARDINAL);
-  VAR index: CARDINAL;
-  BEGIN
-	index := 0;
-	WHILE (index <= HIGH(str)) AND (str[index] # Eos) DO
-		INC(index);
-	END;
-	WHILE index < width DO
-		WriteChar(OutputText, " ");
-		INC(index);
-	END;
-	index := 0;
-	WHILE (index <= HIGH(str)) AND (str[index] # Eos) DO
-		WriteChar(OutputText, str[index]);
-		INC(index);
-	END;
-  END WriteString;
-
-BEGIN	(* PascalIO initialization *)
-	WITH ibuf DO
-		stream := InputStream;
-		eof := FALSE;
-		type := Preading;
-		done := FALSE;
-	END;
-	WITH obuf DO
-		stream := OutputStream;
-		eof := FALSE;
-		type := Pwriting;
-	END;
-	Notext := NIL;
-	Input := ADR(ibuf);
-	Output := ADR(obuf);
-	Input^.next := Output;
-	Output^.next := NIL;
-	head := Input;
-END PascalIO.
Index: trunk/minix/lib/ack/libm2/Processes.mod
===================================================================
--- trunk/minix/lib/ack/libm2/Processes.mod	(revision 9)
+++ 	(revision )
@@ -1,101 +1,0 @@
-(*$R-*)
-IMPLEMENTATION MODULE Processes [1];
-(*
-  Module:       Processes
-  From:         "Programming in Modula-2", 3rd, corrected edition, by N. Wirth
-  Version:      $Header: /cvsup/minix/src/lib/ack/libm2/Processes.mod,v 1.1 2005/10/10 15:27:46 beng Exp $
-*)
-
-  FROM	SYSTEM IMPORT	ADDRESS, TSIZE, NEWPROCESS, TRANSFER;
-  FROM	Storage IMPORT	Allocate;
-  FROM	Traps IMPORT	Message;
-
-  TYPE	SIGNAL = POINTER TO ProcessDescriptor;
-
-	ProcessDescriptor =
-		RECORD	next: SIGNAL;	(* ring *)
-			queue: SIGNAL;	(* queue of waiting processes *)
-			cor: ADDRESS;
-			ready: BOOLEAN;
-		END;
-
-  VAR	cp: SIGNAL;			(* current process *)
-
-  PROCEDURE StartProcess(P: PROC; n: CARDINAL);
-    VAR	s0: SIGNAL;
-	wsp: ADDRESS;
-  BEGIN
-	s0 := cp;
-	Allocate(wsp, n);
-	Allocate(cp, TSIZE(ProcessDescriptor));
-	WITH cp^ DO
-		next := s0^.next;
-		s0^.next := cp;
-		ready := TRUE;
-		queue := NIL
-	END;
-	NEWPROCESS(P, wsp, n, cp^.cor);
-	TRANSFER(s0^.cor, cp^.cor);
-  END StartProcess;
-
-  PROCEDURE SEND(VAR s: SIGNAL);
-    VAR	s0: SIGNAL;
-  BEGIN
-	IF s # NIL THEN
-		s0 := cp;
-		cp := s;
-		WITH cp^ DO
-			s := queue;
-			ready := TRUE;
-			queue := NIL
-		END;
-		TRANSFER(s0^.cor, cp^.cor);
-	END
-  END SEND;
-
-  PROCEDURE WAIT(VAR s: SIGNAL);
-    VAR	s0, s1: SIGNAL;
-  BEGIN
-	(* insert cp in queue s *)
-	IF s = NIL THEN
-		s := cp
-	ELSE
-		s0 := s;
-		s1 := s0^.queue;
-		WHILE s1 # NIL DO
-			s0 := s1;
-			s1 := s0^.queue
-		END;
-		s0^.queue := cp
-	END;
-	s0 := cp;
-	REPEAT
-		cp := cp^.next
-	UNTIL cp^.ready;
-	IF cp = s0 THEN
-		(* deadlock *)
-		Message("deadlock");
-		HALT
-	END;
-	s0^.ready := FALSE;
-	TRANSFER(s0^.cor, cp^.cor)
-  END WAIT;
-
-  PROCEDURE Awaited(s: SIGNAL): BOOLEAN;
-  BEGIN
-	RETURN s # NIL
-  END Awaited;
-
-  PROCEDURE Init(VAR s: SIGNAL);
-  BEGIN
-	s := NIL
-  END Init;
-
-BEGIN
-	Allocate(cp, TSIZE(ProcessDescriptor));
-	WITH cp^ DO
-		next := cp;
-		ready := TRUE;
-		queue := NIL
-	END
-END Processes.
Index: trunk/minix/lib/ack/libm2/RealConver.mod
===================================================================
--- trunk/minix/lib/ack/libm2/RealConver.mod	(revision 9)
+++ 	(revision )
@@ -1,337 +1,0 @@
-(*
-  (c) copyright 1988 by the Vrije Universiteit, Amsterdam, The Netherlands.
-  See the copyright notice in the ACK home directory, in the file "Copyright".
-*)
-
-(*$R-*)
-IMPLEMENTATION MODULE RealConversions;
-(*
-  Module:       string-to-real and real-to-string conversions
-  Author:       Ceriel J.H. Jacobs
-  Version:      $Header: /cvsup/minix/src/lib/ack/libm2/RealConver.mod,v 1.1 2005/10/10 15:27:46 beng Exp $
-*)
-
-
-  PROCEDURE RealToString(arg: REAL;
-		width, digits: INTEGER;
-		VAR str: ARRAY OF CHAR;
-		VAR ok: BOOLEAN);
-  BEGIN
-	LongRealToString(LONG(arg), width, digits, str, ok);
-  END RealToString;
-
-  TYPE
-	Powers = RECORD
-		pval: LONGREAL;
-		rpval: LONGREAL;
-		exp: INTEGER
-	END;
-
-  VAR Powers10: ARRAY[1..6] OF Powers;
-
-  PROCEDURE LongRealToString(arg: LONGREAL;
-		width, digits: INTEGER;
-		VAR str: ARRAY OF CHAR;
-		VAR ok: BOOLEAN);
-    VAR	pointpos: INTEGER;
-	i: CARDINAL;
-	ecvtflag: BOOLEAN;
-	r: LONGREAL;
-	ind1, ind2 : CARDINAL;
-	sign: BOOLEAN;
-	ndigits: CARDINAL;
-
-  BEGIN
-	r := arg;
-	IF digits < 0 THEN
-		ecvtflag := TRUE;
-		ndigits := -digits;
-	ELSE
-		ecvtflag := FALSE;
-		ndigits := digits;
-	END;
-	IF (HIGH(str) < ndigits + 3) THEN
-		str[0] := 0C; ok := FALSE; RETURN
-	END;
-	pointpos := 0;
-	sign := r < 0.0D;
-	IF sign THEN r := -r END;
-	ok := TRUE;
-	IF NOT (r / 10.0D < r) THEN
-		(* assume Nan or Infinity *)
-		r := 0.0D;
-		ok := FALSE;
-	END;
-	IF r # 0.0D THEN
-		IF r >= 10.0D THEN
-			FOR i := 1 TO 6 DO
-				WITH Powers10[i] DO
-					WHILE r >= pval DO
-						r := r * rpval;
-						INC(pointpos, exp)
-					END;
-				END;
-			END;
-		END;
-		IF r < 1.0D THEN
-			FOR i := 1 TO 6 DO
-				WITH Powers10[i] DO
-					WHILE r*pval < 10.0D DO
-						r := r * pval;
-						DEC(pointpos, exp)
-					END;
-				END;
-			END;
-		END;
-		(* Now, we have r in [1.0, 10.0) *)
-		INC(pointpos);
-	END;
-	ind1 := 0;
-	ind2 := ndigits+1;
-
-	IF NOT ecvtflag THEN 
-		IF INTEGER(ind2) + pointpos <= 0 THEN
-			ind2 := 1;
-		ELSE
-			ind2 := INTEGER(ind2) + pointpos
-		END;
-	END;
-	IF ind2 > HIGH(str) THEN
-		ok := FALSE;
-		str[0] := 0C;
-		RETURN;
-	END;
-	WHILE ind1 < ind2 DO
-		str[ind1] := CHR(TRUNC(r)+ORD('0'));
-		r := 10.0D * (r - FLOATD(TRUNC(r)));
-		INC(ind1);
-	END;
-	IF ind2 > 0 THEN
-		DEC(ind2);
-		ind1 := ind2;
-		str[ind2] := CHR(ORD(str[ind2])+5);
-		WHILE str[ind2] > '9' DO
-			str[ind2] := '0';
-			IF ind2 > 0 THEN
-				DEC(ind2);
-				str[ind2] := CHR(ORD(str[ind2])+1);
-			ELSE
-				str[ind2] := '1';
-				INC(pointpos);
-				IF NOT ecvtflag THEN
-					IF ind1 > 0 THEN str[ind1] := '0'; END;
-					INC(ind1);
-				END;
-			END;
-		END;
-		IF (NOT ecvtflag) AND (ind1 = 0) THEN
-			str[0] := CHR(ORD(str[0])-5);
-			INC(ind1);
-		END;
-	END;
-	IF ecvtflag THEN
-		FOR i := ind1 TO 2 BY -1 DO
-			str[i] := str[i-1];
-		END;
-		str[1] := '.';
-		INC(ind1);
-		IF sign THEN
-			FOR i := ind1 TO 1 BY -1 DO
-				str[i] := str[i-1];
-			END;
-			INC(ind1);
-			str[0] := '-';
-		END;
-		IF (ind1 + 4) > HIGH(str) THEN
-			str[0] := 0C;
-			ok := FALSE;
-			RETURN;
-		END;
-		str[ind1] := 'E'; INC(ind1);
-		IF arg # 0.0D THEN DEC(pointpos); END;
-		IF pointpos < 0 THEN
-			pointpos := -pointpos;
-			str[ind1] := '-';
-		ELSE
-			str[ind1] := '+';
-		END;
-		INC(ind1);
-		str[ind1] := CHR(ORD('0') + CARDINAL(pointpos DIV 100));
-		pointpos := pointpos MOD 100;
-		INC(ind1);
-		str[ind1] := CHR(ORD('0') + CARDINAL(pointpos DIV 10));
-		INC(ind1);
-		str[ind1] := CHR(ORD('0') + CARDINAL(pointpos MOD 10));
-	ELSE
-		IF pointpos <= 0 THEN
-			FOR i := ind1 TO 1 BY -1 DO
-				str[i+CARDINAL(-pointpos)] := str[i-1];
-			END;
-			FOR i := 0 TO CARDINAL(-pointpos) DO
-				str[i] := '0';
-			END;
-			ind1 := ind1 + CARDINAL(1 - pointpos);
-			pointpos := 1;
-		END;
-		FOR i := ind1 TO CARDINAL(pointpos+1) BY -1 DO
-			str[i] := str[i-1];
-		END;
-		IF ndigits = 0 THEN
-			str[pointpos] := 0C;
-			ind1 := pointpos - 1;
-		ELSE
-			str[pointpos] := '.';
-			IF INTEGER(ind1) > pointpos+INTEGER(ndigits) THEN
-				ind1 := pointpos+INTEGER(ndigits);
-			END;
-			str[pointpos+INTEGER(ndigits)+1] := 0C;
-		END;
-		IF sign THEN
-			FOR i := ind1 TO 0 BY -1 DO
-				str[i+1] := str[i];
-			END;
-			str[0] := '-';
-			INC(ind1);
-		END;
-	END;
-	IF (ind1+1) <= HIGH(str) THEN str[ind1+1] := 0C; END;
-	IF ind1 >= CARDINAL(width) THEN
-		ok := FALSE;
-		RETURN;
-	END;
-	IF width > 0 THEN
-		DEC(width);
-	END;
-	IF (width > 0) AND (ind1 < CARDINAL(width)) THEN
-		FOR i := ind1 TO 0 BY -1 DO
-			str[i + CARDINAL(width) - ind1] := str[i];
-		END;
-		FOR i := 0 TO CARDINAL(width)-(ind1+1) DO
-			str[i] := ' ';
-		END;
-		ind1 := CARDINAL(width);
-		IF (ind1+1) <= HIGH(str) THEN
-			FOR ind1 := ind1+1 TO HIGH(str) DO
-				str[ind1] := 0C;
-			END;
-		END;
-	END;
-
-  END LongRealToString;
-
-	
-  PROCEDURE StringToReal(str: ARRAY OF CHAR;
-			 VAR r: REAL; VAR ok: BOOLEAN);
-    VAR x: LONGREAL;
-  BEGIN
-	StringToLongReal(str, x, ok);
-	IF ok THEN
-		r := x;
-	END;
-  END StringToReal;
-
-  PROCEDURE StringToLongReal(str: ARRAY OF CHAR;
-			 VAR r: LONGREAL; VAR ok: BOOLEAN);
-    CONST	BIG = 1.0D17;
-    TYPE	SETOFCHAR = SET OF CHAR;
-    VAR		pow10 : INTEGER;
-		i : INTEGER;
-		e : LONGREAL;
-		ch : CHAR;
-		signed: BOOLEAN;
-		signedexp: BOOLEAN;
-		iB: CARDINAL;
-
-  BEGIN
-	r := 0.0D;
-	pow10 := 0;
-	iB := 0;
-	ok := TRUE;
-	signed := FALSE;
-	WHILE (str[iB] = ' ') OR (str[iB] = CHR(9)) DO
-		INC(iB);
-		IF iB > HIGH(str) THEN
-			ok := FALSE;
-			RETURN;
-		END;
-	END;
-	IF str[iB] = '-' THEN signed := TRUE; INC(iB)
-	ELSIF str[iB] = '+' THEN INC(iB)
-	END;
-	ch := str[iB]; INC(iB);
-	IF NOT (ch IN SETOFCHAR{'0'..'9'}) THEN ok := FALSE; RETURN END;
-	REPEAT
-		IF r>BIG THEN INC(pow10) ELSE r:= 10.0D*r+FLOATD(ORD(ch)-ORD('0')) END;
-		IF iB <= HIGH(str) THEN
-			ch := str[iB]; INC(iB);
-		END;
-	UNTIL (iB > HIGH(str)) OR NOT (ch IN SETOFCHAR{'0'..'9'});
-	IF (ch = '.') AND (iB <= HIGH(str)) THEN
-		ch := str[iB]; INC(iB);
-		IF NOT (ch IN SETOFCHAR{'0'..'9'}) THEN ok := FALSE; RETURN END;
-		REPEAT
-			IF r < BIG THEN
-				r := 10.0D * r + FLOATD(ORD(ch)-ORD('0'));
-				DEC(pow10);
-			END;
-			IF iB <= HIGH(str) THEN
-				ch := str[iB]; INC(iB);
-			END;
-		UNTIL (iB > HIGH(str)) OR NOT (ch IN SETOFCHAR{'0'..'9'});
-	END;
-	IF (ch = 'E') THEN
-		IF iB > HIGH(str) THEN
-			ok := FALSE;
-			RETURN;
-		ELSE
-			ch := str[iB]; INC(iB);
-		END;
-		i := 0;
-		signedexp := FALSE;
-		IF (ch = '-') OR (ch = '+') THEN
-			signedexp := ch = '-';
-			IF iB > HIGH(str) THEN
-				ok := FALSE;
-				RETURN;
-			ELSE
-				ch := str[iB]; INC(iB);
-			END;
-		END;
-		IF NOT (ch IN SETOFCHAR{'0'..'9'}) THEN ok := FALSE; RETURN END;
-		REPEAT
-			i := i*10 + INTEGER(ORD(ch) - ORD('0'));
-			IF iB <= HIGH(str) THEN
-				ch := str[iB]; INC(iB);
-			END;
-		UNTIL (iB > HIGH(str)) OR NOT (ch IN SETOFCHAR{'0'..'9'});
-		IF signedexp THEN i := -i END;
-		pow10 := pow10 + i;
-	END;
-	IF pow10 < 0 THEN i := -pow10; ELSE i := pow10; END;
-	e := 1.0D;
-	DEC(i);
-	WHILE i >= 10 DO
-		e := e * 10000000000.0D;
-		DEC(i,10);
-	END;
-	WHILE i >= 0 DO
-		e := e * 10.0D;
-		DEC(i)
-	END;
-	IF pow10<0 THEN
-		r := r / e;
-	ELSE
-		r := r * e;
-	END;
-	IF signed THEN r := -r; END;
-	IF (iB <= HIGH(str)) AND (ORD(ch) > ORD(' ')) THEN ok := FALSE; END
-  END StringToLongReal;
-
-BEGIN
-	WITH Powers10[1] DO pval := 1.0D32; rpval := 1.0D-32; exp := 32 END;
-	WITH Powers10[2] DO pval := 1.0D16; rpval := 1.0D-16; exp := 16 END;
-	WITH Powers10[3] DO pval := 1.0D8; rpval := 1.0D-8; exp := 8 END;
-	WITH Powers10[4] DO pval := 1.0D4; rpval := 1.0D-4; exp := 4 END;
-	WITH Powers10[5] DO pval := 1.0D2; rpval := 1.0D-2; exp := 2 END;
-	WITH Powers10[6] DO pval := 1.0D1; rpval := 1.0D-1; exp := 1 END;
-END RealConversions.
Index: trunk/minix/lib/ack/libm2/RealInOut.mod
===================================================================
--- trunk/minix/lib/ack/libm2/RealInOut.mod	(revision 9)
+++ 	(revision )
@@ -1,97 +1,0 @@
-(*
-  (c) copyright 1988 by the Vrije Universiteit, Amsterdam, The Netherlands.
-  See the copyright notice in the ACK home directory, in the file "Copyright".
-*)
-
-(*$R-*)
-IMPLEMENTATION MODULE RealInOut;
-(*
-  Module:       InOut for REAL numbers
-  Author:	Ceriel J.H. Jacobs
-  Version:      $Header: /cvsup/minix/src/lib/ack/libm2/RealInOut.mod,v 1.1 2005/10/10 15:27:46 beng Exp $
-*)
-
-  FROM	InOut IMPORT	ReadString, WriteString, WriteOct;
-  FROM	Traps IMPORT	Message;
-  FROM	SYSTEM IMPORT	WORD;
-  FROM	RealConversions IMPORT
-			LongRealToString, StringToLongReal;
-
-  CONST	MAXNDIG = 32;
-	MAXWIDTH = MAXNDIG+7;
-  TYPE	RBUF = ARRAY [0..MAXWIDTH+1] OF CHAR;
-
-  PROCEDURE WriteReal(arg: REAL; ndigits: CARDINAL);
-  BEGIN
-	WriteLongReal(LONG(arg), ndigits)
-  END WriteReal;
-
-  PROCEDURE WriteLongReal(arg: LONGREAL; ndigits: CARDINAL);
-    VAR buf : RBUF;
-	ok : BOOLEAN;
-
-  BEGIN
-	IF ndigits > MAXWIDTH THEN ndigits := MAXWIDTH; END;
-	IF ndigits < 10 THEN ndigits := 10; END;
-	LongRealToString(arg, ndigits, -INTEGER(ndigits - 7), buf, ok);
-	WriteString(buf);
-  END WriteLongReal;
-
-  PROCEDURE WriteFixPt(arg: REAL; n, k: CARDINAL);
-  BEGIN
-	WriteLongFixPt(LONG(arg), n, k)
-  END WriteFixPt;
-
-  PROCEDURE WriteLongFixPt(arg: LONGREAL; n, k: CARDINAL);
-  VAR buf: RBUF;
-      ok : BOOLEAN;
-
-  BEGIN
-	IF n > MAXWIDTH THEN n := MAXWIDTH END;
-	LongRealToString(arg, n, k, buf, ok);
-	WriteString(buf);
-  END WriteLongFixPt;
-
-  PROCEDURE ReadReal(VAR x: REAL);
-  VAR x1: LONGREAL;
-  BEGIN
-	ReadLongReal(x1);
-	x := x1
-  END ReadReal;
-
-  PROCEDURE ReadLongReal(VAR x: LONGREAL);
-    VAR	Buf: ARRAY[0..512] OF CHAR;
-	ok: BOOLEAN;
-
-  BEGIN
-	ReadString(Buf);
-	StringToLongReal(Buf, x, ok);
-	IF NOT ok THEN
-		Message("real expected");
-		HALT;
-	END;
-	Done := TRUE;
-  END ReadLongReal;
-
-  PROCEDURE wroct(x: ARRAY OF WORD);
-  VAR	i: CARDINAL;
-  BEGIN
-	FOR i := 0 TO HIGH(x) DO
-		WriteOct(CARDINAL(x[i]), 0);
-		WriteString("  ");
-	END;
-  END wroct;
-
-  PROCEDURE WriteRealOct(x: REAL);
-  BEGIN
-	wroct(x);
-  END WriteRealOct;
-
-  PROCEDURE WriteLongRealOct(x: LONGREAL);
-  BEGIN
-	wroct(x);
-  END WriteLongRealOct;
-
-BEGIN
-	Done := FALSE;
-END RealInOut.
Index: trunk/minix/lib/ack/libm2/SYSTEM.c
===================================================================
--- trunk/minix/lib/ack/libm2/SYSTEM.c	(revision 9)
+++ 	(revision )
@@ -1,115 +1,0 @@
-/*
-  (c) copyright 1988 by the Vrije Universiteit, Amsterdam, The Netherlands.
-  See the copyright notice in the ACK home directory, in the file "Copyright".
-*/
-
-/*
-  Module:	SYSTEM
-  Author:	Ceriel J.H. Jacobs
-  Version:	$Header: /cvsup/minix/src/lib/ack/libm2/SYSTEM.c,v 1.1 2005/10/10 15:27:46 beng Exp $
-*/
-
-/*
-	An implementation of the Modula-2 NEWPROCESS and TRANSFER facilities
-	using the topsize, topsave, and topload facilities.
-	For each coroutine, a proc structure is built. For the main routine,
-	a static space is declared to save its stack. For the other coroutines,
-	the user specifies this space.
-*/
-
-#include <m2_traps.h>
-
-#define MAXMAIN	2048
-
-struct proc {
-	unsigned size;		/* size of saved stackframe(s) */
-	int (*proc)();		/* address of coroutine procedure */
-	char *brk;		/* stack break of this coroutine */
-};
-
-extern unsigned topsize();
-
-static struct proc mainproc[MAXMAIN/sizeof(struct proc) + 1];
-
-static struct proc *curproc = 0;/* current coroutine */
-extern char *MainLB;		/* stack break of main routine */
-
-_SYSTEM__NEWPROCESS(p, a, n, p1)
-	int (*p)();		/* coroutine procedure */
-	struct proc *a;		/* pointer to area for saved stack-frame */
-	unsigned n;		/* size of this area */
-	struct proc **p1;	/* where to leave coroutine descriptor,
-				   in this implementation the address of
-				   the area for saved stack-frame(s) */
-{
-	/*	This procedure creates a new coroutine, but does not
-		transfer control to it. The routine "topsize" will compute the
-		stack break, which will be the local base of this routine.
-		Notice that we can do this because we do not need the stack
-		above this point for this coroutine. In Modula-2, coroutines
-		must be level 0 procedures without parameters.
-	*/
-	char *brk = 0;
-	unsigned sz = topsize(&brk);
-
-	if (sz + sizeof(struct proc) > n) {
-		/* not enough space */
-		TRP(M2_TOOLARGE);
-	}
-	a->size = n;
-	a->proc = p;
-	a->brk = brk;
-	*p1 = a;
-	if (topsave(brk, a+1))
-		/* stack frame saved; now just return */
-		;
-	else {
-		/* We get here through the first transfer to the coroutine
-		   created above.
-		   This also means that curproc is now set to this coroutine.
-		   We cannot trust the parameters anymore.
-		   Just call the coroutine procedure.
-		*/
-		(*(curproc->proc))();
-		_cleanup();
-		_exit(0);
-	}
-}
-
-_SYSTEM__TRANSFER(a, b)
-	struct proc **a, **b;
-{
-	/*	transfer from one coroutine to another, saving the current
-		descriptor in the space indicated by "a", and transfering to
-		the coroutine in descriptor "b".
-	*/
-	unsigned size;
-
-	if (! curproc) {
-		/* the current coroutine is the main process;
-		   initialize a coroutine descriptor for it ...
-		*/
-		mainproc[0].brk = MainLB;
-		mainproc[0].size = sizeof(mainproc);
-		curproc = &mainproc[0];
-	}
-	*a = curproc;		/* save current descriptor in "a" */
-	if (*b == curproc) {
-		/* transfer to itself is a no-op */
-		return;
-	}
-	size = topsize(&(curproc->brk));
-	if (size + sizeof(struct proc) > curproc->size) {
-		TRP(M2_TOOLARGE);
-	}
-	if (topsave(curproc->brk, curproc+1)) {
-		/* stack top saved. Now restore context of target
-		   coroutine
-		*/
-		curproc = *b;
-		topload(curproc+1);
-		/* we never get here ... */
-	}
-	/* but we do get here, when a transfer is done to the coroutine in "a".
-	*/
-}
Index: trunk/minix/lib/ack/libm2/Semaphores.mod
===================================================================
--- trunk/minix/lib/ack/libm2/Semaphores.mod	(revision 9)
+++ 	(revision )
@@ -1,118 +1,0 @@
-(*
-  (c) copyright 1988 by the Vrije Universiteit, Amsterdam, The Netherlands.
-  See the copyright notice in the ACK home directory, in the file "Copyright".
-*)
-
-(*$R-*)
-IMPLEMENTATION MODULE Semaphores [1];
-(*
-  Module:       Processes with semaphores
-  Author:       Ceriel J.H. Jacobs
-  Version:      $Header: /cvsup/minix/src/lib/ack/libm2/Semaphores.mod,v 1.1 2005/10/10 15:27:46 beng Exp $
-
-  Quasi-concurrency implementation
-*)
-
-  FROM	SYSTEM IMPORT	ADDRESS, NEWPROCESS, TRANSFER;
-  FROM	Storage IMPORT	Allocate;
-  FROM	random IMPORT	Uniform;
-  FROM	Traps IMPORT	Message;
-
-  TYPE	Sema = POINTER TO Semaphore;
-	Processes = POINTER TO Process;
-	Semaphore =
-		RECORD
-			level: CARDINAL;
-		END;
-	Process =
-		RECORD	next: Processes;
-			proc: ADDRESS;
-			waiting: Sema;
-		END;
-
-  VAR	cp: Processes;			(* current process *)
-
-  PROCEDURE StartProcess(P: PROC; n: CARDINAL);
-    VAR	s0: Processes;
-	wsp: ADDRESS;
-  BEGIN
-	s0 := cp;
-	Allocate(wsp, n);
-	Allocate(cp, SIZE(Process));
-	WITH cp^ DO
-		next := s0^.next;
-		s0^.next := cp;
-		waiting := NIL;
-	END;
-	NEWPROCESS(P, wsp, n, cp^.proc);
-	TRANSFER(s0^.proc, cp^.proc);
-  END StartProcess;
-
-  PROCEDURE Up(VAR s: Sema);
-  BEGIN
-	s^.level := s^.level + 1;
-	ReSchedule;
-  END Up;
-
-  PROCEDURE Down(VAR s: Sema);
-  BEGIN
-	IF s^.level = 0 THEN
-		cp^.waiting := s;
-	ELSE
-		s^.level := s^.level - 1;
-	END;
-	ReSchedule;
-  END Down;
-
-  PROCEDURE NewSema(n: CARDINAL): Sema;
-  VAR	s: Sema;
-  BEGIN
-	Allocate(s, SIZE(Semaphore));
-	s^.level := n;
-	RETURN s;
-  END NewSema;
-
-  PROCEDURE Level(s: Sema): CARDINAL;
-  BEGIN
-	RETURN s^.level;
-  END Level;
-
-  PROCEDURE ReSchedule;
-  VAR s0: Processes;
-      i, j: CARDINAL;
-  BEGIN
-	s0 := cp;
-	i := Uniform(1, 5);
-	j := i;
-	LOOP
-		cp := cp^.next;
-		IF Runnable(cp) THEN
-			DEC(i);
-			IF i = 0 THEN EXIT END;
-		END;
-		IF (cp = s0) AND (j = i) THEN
-			(* deadlock *)
-			Message("deadlock");
-			HALT
-		END;
-	END;
-	IF cp # s0 THEN TRANSFER(s0^.proc, cp^.proc); END;
-  END ReSchedule;
-
-  PROCEDURE Runnable(p: Processes): BOOLEAN;
-  BEGIN
-	IF p^.waiting = NIL THEN RETURN TRUE; END;
-	IF p^.waiting^.level > 0 THEN
-		p^.waiting^.level := p^.waiting^.level - 1;
-		p^.waiting := NIL;
-		RETURN TRUE;
-	END;
-	RETURN FALSE;
-  END Runnable;
-BEGIN
-	Allocate(cp, SIZE(Process));
-	WITH cp^ DO
-		next := cp;
-		waiting := NIL;
-	END
-END Semaphores.
Index: trunk/minix/lib/ack/libm2/Storage.mod
===================================================================
--- trunk/minix/lib/ack/libm2/Storage.mod	(revision 9)
+++ 	(revision )
@@ -1,353 +1,0 @@
-(*
-  (c) copyright 1988 by the Vrije Universiteit, Amsterdam, The Netherlands.
-  See the copyright notice in the ACK home directory, in the file "Copyright".
-*)
-
-(*$R-*)
-IMPLEMENTATION MODULE Storage;
-(*
-  Module:	Dynamic Storage Allocation
-  Author:	Ceriel J.H. Jacobs
-		Adapted from a version in C by Hans Tebra
-  Version:	$Header: /cvsup/minix/src/lib/ack/libm2/Storage.mod,v 1.1 2005/10/10 15:27:46 beng Exp $
-*)
-(* This storage manager maintains an array of lists of objects with the
-   same size. Commonly used sizes have their own bucket. The larger ones
-   are put in a single list.
-*)
-  FROM	Unix IMPORT	sbrk, ILLBREAK;
-  FROM	SYSTEM IMPORT	ADDRESS, ADR;
-  FROM	Traps IMPORT	Message;
-
-  CONST
-	NLISTS = 20;
-	MAGICW = 0A5A5H;
-	MAGICC = 175C;
-
-  TYPE
-	ALIGNTYPE = 
-	  RECORD
-		CASE : INTEGER OF
-		  1: l: LONGINT |
-		  2: p: ADDRESS |
-		  3: d: LONGREAL
-		END
-	  END;			(* A type with high alignment requirements *)
-	BucketPtr = POINTER TO Bucket;
-	Bucket =
-	  RECORD
-		CASE : BOOLEAN OF
-		   FALSE:
-			  BNEXT: BucketPtr; 	(* next free Bucket *)
-			  BSIZE: CARDINAL; |	(* size of user part in UNITs *)
-		   TRUE: BXX: ALIGNTYPE
-		END;
-		BSTORE: ALIGNTYPE;
-	  END;
-
-  CONST
-	UNIT = SIZE(ALIGNTYPE);
-
-  VAR
-	FreeLists: ARRAY[0..NLISTS] OF BucketPtr;	(* small blocks *)
-	Llist: BucketPtr;				(* others *)
-	Compacted: BOOLEAN;		(* avoid recursive reorganization *)
-	FirstBlock: BucketPtr;
-	USED: ADDRESS;
-
-  PROCEDURE MyAllocate(size: CARDINAL) : ADDRESS;
-    VAR	nu : CARDINAL;
-	b : CARDINAL;
-	p, q: BucketPtr;
-	pc: POINTER TO CHAR;
-	brk : ADDRESS;
-  BEGIN
-	IF size > CARDINAL(MAX(INTEGER)-2*UNIT + 1) THEN
-		RETURN NIL;
-	END;
-	nu := (size + (UNIT-1)) DIV UNIT;
-	IF nu = 0 THEN
-		nu := 1;
-	END;
-	IF nu <= NLISTS THEN
-		b := nu;
-		IF FreeLists[b] # NIL THEN
-			(* Exact fit *)
-			p := FreeLists[b];
-			FreeLists[b] := p^.BNEXT;
-			p^.BNEXT := USED;
-			IF p^.BSIZE * UNIT # size THEN
-				pc := ADR(p^.BSTORE) + size;
-				pc^ := MAGICC;
-			END;
-			p^.BSIZE := size;
-			RETURN ADR(p^.BSTORE);
-		END;
-
-		(* Search for a block with >= 2 units more than requested.
-		   We pay for an additional header when the block is split.
-		*)
-		FOR b := b+2 TO NLISTS DO
-			IF FreeLists[b] # NIL THEN
-				q := FreeLists[b];
-				FreeLists[b] := q^.BNEXT;
-				p := ADDRESS(q) + (nu+1)*UNIT;
-				(* p indicates the block that must be given
-				   back
-				*)
-				p^.BSIZE := q^.BSIZE - nu - 1;
-				p^.BNEXT := FreeLists[p^.BSIZE];
-				FreeLists[p^.BSIZE] := p;
-				q^.BSIZE := nu;
-				q^.BNEXT := USED;
-				IF q^.BSIZE * UNIT # size THEN
-					pc := ADR(q^.BSTORE) + size;
-					pc^ := MAGICC;
-				END;
-				q^.BSIZE := size;
-				RETURN ADR(q^.BSTORE);
-			END;
-		END;
-	END;
-
-	p := Llist;
-	IF p # NIL THEN
-		q := NIL;
-		WHILE (p # NIL) AND (p^.BSIZE < nu) DO
-			q := p;
-			p := p^.BNEXT;
-		END;
-
-		IF p # NIL THEN
-			(* p^.BSIZE >= nu *)
-			IF p^.BSIZE <= nu + NLISTS + 1 THEN
-				(* Remove p from this list *)
-				IF q # NIL THEN q^.BNEXT := p^.BNEXT
-				ELSE Llist := p^.BNEXT;
-				END;
-				p^.BNEXT := USED;
-				IF p^.BSIZE > nu + 1 THEN
-					(* split block,
-					   tail goes to FreeLists area
-					*)
-					q := ADDRESS(p) + (nu+1)*UNIT;
-					q^.BSIZE := p^.BSIZE -nu -1;
-					q^.BNEXT := FreeLists[q^.BSIZE];
-					FreeLists[q^.BSIZE] := q;
-					p^.BSIZE := nu;
-				END;
-				IF p^.BSIZE * UNIT # size THEN
-					pc := ADR(p^.BSTORE) + size;
-					pc^ := MAGICC;
-				END;
-				p^.BSIZE := size;
-				RETURN ADR(p^.BSTORE);
-			END;
-			(* Give part of tail of original block.
-			   Block stays in this list.
-			*)
-			q := ADDRESS(p) + (p^.BSIZE-nu)*UNIT;
-			q^.BSIZE := nu;
-			p^.BSIZE := p^.BSIZE - nu - 1;
-			q^.BNEXT := USED;
-			IF q^.BSIZE * UNIT # size THEN
-				pc := ADR(q^.BSTORE) + size;
-				pc^ := MAGICC;
-			END;
-			q^.BSIZE := size;
-			RETURN ADR(q^.BSTORE);
-		END;
-	END;
-
-	IF Compacted THEN
-		(* reorganization did not yield sufficient memory *)
-		RETURN NIL;
-	END;
-
-	brk := sbrk(UNIT * (nu + 1));
-	IF brk = ILLBREAK THEN
-		ReOrganize();
-		Compacted := TRUE;
-		brk := MyAllocate(size);
-		Compacted := FALSE;
-		RETURN brk;
-	END;
-
-	p := brk;
-	p^.BSIZE := nu;
-	p^.BNEXT := USED;
-	IF p^.BSIZE * UNIT # size THEN
-		pc := ADR(p^.BSTORE) + size;
-		pc^ := MAGICC;
-	END;
-	p^.BSIZE := size;
-	RETURN ADR(p^.BSTORE);
-  END MyAllocate;
-
-  PROCEDURE ALLOCATE(VAR a: ADDRESS; size: CARDINAL);
-  BEGIN
-	Allocate(a, size);
-  END ALLOCATE;
-
-  PROCEDURE Allocate(VAR a: ADDRESS; size: CARDINAL);
-  BEGIN
-	a := MyAllocate(size);
-	IF a = NIL THEN
-		Message("out of core");
-		HALT;
-	END;
-  END Allocate;
-
-  PROCEDURE Available(size: CARDINAL): BOOLEAN;
-    VAR	a: ADDRESS;
-  BEGIN
-	a:= MyAllocate(size);
-	IF a # NIL THEN
-		Deallocate(a, size);
-		RETURN TRUE;
-	END;
-	RETURN FALSE;
-  END Available;
-
-  PROCEDURE DEALLOCATE(VAR a: ADDRESS; size: CARDINAL);
-  BEGIN
-	Deallocate(a, size);
-  END DEALLOCATE;
-
-  PROCEDURE Deallocate(VAR a: ADDRESS; size: CARDINAL);
-    VAR	p: BucketPtr;
-	pc: POINTER TO CHAR;
-  BEGIN
-	IF (a = NIL) THEN 
-		Message("(Warning) Deallocate: NIL pointer deallocated");
-		RETURN;
-	END;
-	p := a - UNIT;
-	IF (p^.BNEXT # BucketPtr(USED)) THEN
-		Message("(Warning) Deallocate: area already deallocated or heap corrupted");
-		a := NIL;
-		RETURN;
-	END;
-	WITH p^ DO
-		IF BSIZE # size THEN
-			Message("(Warning) Deallocate: wrong size or heap corrupted");
-		END;
-		BSIZE := (size + (UNIT - 1)) DIV UNIT;
-		IF (BSIZE*UNIT # size) THEN
-			pc := a + size;
-			IF pc^ # MAGICC THEN
-				Message("(Warning) Deallocate: heap corrupted");
-			END;
-		END;	
-		IF BSIZE <= NLISTS THEN
-			BNEXT := FreeLists[BSIZE];
-			FreeLists[BSIZE] := p;
-		ELSE
-			BNEXT := Llist;
-			Llist := p;
-		END;
-	END;
-	a := NIL
-  END Deallocate;
-
-  PROCEDURE ReOrganize();
-    VAR lastblock: BucketPtr;
-	b, be: BucketPtr;
-	i: CARDINAL;
-  BEGIN
-	lastblock := NIL;
-	FOR i := 1 TO NLISTS DO
-		b := FreeLists[i];
-		WHILE b # NIL DO
-			IF ADDRESS(b) > ADDRESS(lastblock) THEN
-				lastblock := b;
-			END;
-			be := b^.BNEXT;
-			b^.BNEXT := NIL;	(* temporary free mark *)
-			b := be;
-		END;
-	END;
-
-	b := Llist;
-	WHILE b # NIL DO
-		IF ADDRESS(b) > ADDRESS(lastblock) THEN
-			lastblock := b;
-		END;
-		be := b^.BNEXT;
-		b^.BNEXT := NIL;
-		b := be;
-	END;
-
-	(* Now, all free blocks have b^.BNEXT = NIL *)
-
-	b := FirstBlock;
-	WHILE ADDRESS(b) < ADDRESS(lastblock) DO
-		LOOP
-			be := ADDRESS(b)+(b^.BSIZE+1)*UNIT;
-			IF b^.BNEXT # NIL THEN	
-				(* this block is not free *)
-				EXIT;
-			END;
-			IF ADDRESS(be) > ADDRESS(lastblock) THEN
-				(* no next block *)
-				EXIT;
-			END;
-			IF be^.BNEXT # NIL THEN
-				(* next block is not free *)
-				EXIT;
-			END;
-			(* this block and the next one are free,
-			   so merge them, but only if it is not too big
-			*)
-			IF MAX(CARDINAL) - b^.BSIZE > be^.BSIZE THEN
-				b^.BSIZE := b^.BSIZE + be^.BSIZE + 1;
-			ELSE
-				EXIT;
-			END;
-		END;
-		b := be;
-	END;
-
-	(* clear all free lists *)
-	FOR i := 1 TO NLISTS DO FreeLists[i] := NIL; END;
-	Llist := NIL;
-
-	(* collect free blocks in them again *)
-	b := FirstBlock;
-	WHILE ADDRESS(b) <= ADDRESS(lastblock) DO
-		WITH b^ DO
-			IF BNEXT = NIL THEN
-				IF BSIZE <= NLISTS THEN
-					BNEXT := FreeLists[BSIZE];
-					FreeLists[BSIZE] := b;
-				ELSE
-					BNEXT := Llist;
-					Llist := b;
-				END;
-				b := ADDRESS(b) + (BSIZE+1) * UNIT;
-			ELSE
-				b := ADDRESS(b) + 
-					((BSIZE + (UNIT - 1)) DIV UNIT + 1) * UNIT;
-			END;
-		END;
-	END;
-  END ReOrganize;
-
-  PROCEDURE InitStorage();
-    VAR	i: CARDINAL;
-	brk: ADDRESS;
-  BEGIN
-	FOR i := 1 TO NLISTS DO
-		FreeLists[i] := NIL;
-	END;
-	Llist := NIL;
-	brk := sbrk(0);
-	brk := sbrk(UNIT - brk MOD UNIT);
-	FirstBlock := sbrk(0);
-	Compacted := FALSE;
-	USED := MAGICW;
-  END InitStorage;
-
-BEGIN
-	InitStorage();
-END Storage.
Index: trunk/minix/lib/ack/libm2/StrAss.c
===================================================================
--- trunk/minix/lib/ack/libm2/StrAss.c	(revision 9)
+++ 	(revision )
@@ -1,23 +1,0 @@
-/*
-  (c) copyright 1988 by the Vrije Universiteit, Amsterdam, The Netherlands.
-  See the copyright notice in the ACK home directory, in the file "Copyright".
-*/
-
-/*
-  Module:	assign string to character array, with possible 0-byte
-		extension
-  Author:	Ceriel J.H. Jacobs
-  Version:	$Header: /cvsup/minix/src/lib/ack/libm2/StrAss.c,v 1.1 2005/10/10 15:27:46 beng Exp $
-*/
-StringAssign(dstsiz, srcsiz, dstaddr, srcaddr)
-	register char *dstaddr, *srcaddr;
-{
-	while (srcsiz > 0) {
-		*dstaddr++ = *srcaddr++;
-		srcsiz--;
-		dstsiz--;
-	}
-	if (dstsiz > 0) {
-		*dstaddr = 0;
-	}
-}
Index: trunk/minix/lib/ack/libm2/Streams.mod
===================================================================
--- trunk/minix/lib/ack/libm2/Streams.mod	(revision 9)
+++ 	(revision )
@@ -1,443 +1,0 @@
-#
-(*
-  (c) copyright 1988 by the Vrije Universiteit, Amsterdam, The Netherlands.
-  See the copyright notice in the ACK home directory, in the file "Copyright".
-*)
-
-(*$R-*)
-IMPLEMENTATION MODULE Streams;
-(*
-  Module:       Stream Input/Output
-  Author:       Ceriel J.H. Jacobs
-  Version:      $Header: /cvsup/minix/src/lib/ack/libm2/Streams.mod,v 1.1 2005/10/10 15:27:46 beng Exp $
-
-  Implementation for Unix
-*)
-
-  FROM	SYSTEM IMPORT	BYTE, ADR;
-  FROM	Epilogue IMPORT	CallAtEnd;
-  FROM	Storage IMPORT	Allocate, Available;
-  FROM	StripUnix IMPORT
-			open, close, lseek, read, write, creat;
-  IMPORT StripUnix;
-
-  CONST BUFSIZ = 1024;	(* tunable *)
-  TYPE	IOB = RECORD
-		kind: StreamKind;
-		mode: StreamMode;
-		eof: BOOLEAN;
-		buffering: StreamBuffering;
-		next : Stream;
-		fildes: INTEGER;
-		cnt, maxcnt: INTEGER;
-		bufferedcnt: INTEGER;
-		buf: ARRAY[1..BUFSIZ] OF BYTE;
-	      END;
-	Stream = POINTER TO IOB;
-  VAR
-	ibuf, obuf, ebuf: IOB;
-	head: Stream;
-
-  PROCEDURE getstruct(VAR stream: Stream);
-  BEGIN
-        stream := head;
-        WHILE (stream # NIL) AND (stream^.kind # none) DO
-                stream := stream^.next;
-        END;
-        IF stream = NIL THEN
-		IF NOT Available(SIZE(IOB)) THEN
-			RETURN;
-		END;
-                Allocate(stream,SIZE(IOB));
-                stream^.next := head;
-                head := stream;
-        END;
-  END getstruct;
- 
-  PROCEDURE freestruct(stream: Stream);
-  BEGIN
-	stream^.kind := none;
-  END freestruct;
-
-  PROCEDURE OpenStream(VAR stream: Stream;
-		       filename: ARRAY OF CHAR; 
-		       kind: StreamKind;
-		       mode: StreamMode;
-		       VAR result: StreamResult);
-    VAR fd: INTEGER;
-	i: CARDINAL;
-  BEGIN
-	IF kind = none THEN
-		result := illegaloperation;
-		RETURN;
-	END;
-	getstruct(stream);
-	IF stream = NIL THEN
-		result := nomemory;
-		RETURN;
-	END;
-        WITH stream^ DO
-                FOR i := 0 TO HIGH(filename) DO
-                        buf[i+1] := BYTE(filename[i]);
-                END;
-                buf[HIGH(filename)+2] := BYTE(0C);
-	END;
-	IF (mode = reading) THEN
-		fd := open(ADR(stream^.buf), 0);
-	ELSE
-		fd := -1;
-		IF (mode = appending) THEN
-			fd := open(ADR(stream^.buf), 1);
-			IF fd >= 0 THEN
-				IF (lseek(fd, 0D , 2) < 0D) THEN ; END;
-			END;
-		END;
-		IF fd < 0 THEN
-			fd := creat(ADR(stream^.buf), 666B);
-		END;
-	END;
-	IF fd < 0 THEN
-		result := openfailed;
-		freestruct(stream);
-		stream := NIL;
-		RETURN;
-	END;
-	result := succeeded;
-	stream^.fildes := fd;
-	stream^.kind := kind;
-	stream^.mode := mode;
-	stream^.buffering := blockbuffered;
-	stream^.bufferedcnt := BUFSIZ;
-	stream^.maxcnt := 0;
-	stream^.eof := FALSE;
-	IF mode = reading THEN
-		stream^.cnt := 1;
-	ELSE
-		stream^.cnt := 0;
-	END;
-  END OpenStream;
-
-  PROCEDURE SetStreamBuffering( stream: Stream;
-				b: StreamBuffering;
-				VAR result: StreamResult);
-  BEGIN
-	result := succeeded;
-	IF (stream = NIL) OR (stream^.kind = none) THEN
-		result := nostream;
-		RETURN;
-	END;
-	IF (stream^.mode = reading) OR
-	   ((b = linebuffered) AND (stream^.kind = binary)) THEN
-		result := illegaloperation;
-		RETURN;
-	END;
-	FlushStream(stream, result);
-	IF b = unbuffered THEN
-		stream^.bufferedcnt := 1;
-	END;
-	stream^.buffering := b;
-  END SetStreamBuffering;
-
-  PROCEDURE FlushStream(stream: Stream; VAR result: StreamResult);
-  VAR cnt1: INTEGER;
-  BEGIN
-	result := succeeded;
-	IF (stream = NIL) OR (stream^.kind = none) THEN
-		result := nostream;
-		RETURN;
-	END;
-	WITH stream^ DO
-		IF mode = reading THEN
-			result := illegaloperation;
-			RETURN;
-		END;
-		IF (cnt > 0) THEN
-			cnt1 := cnt;
-			cnt := 0;
-			IF write(fildes, ADR(buf), cnt1) < 0 THEN END;
-		END;
-	END;
-  END FlushStream;
-
-  PROCEDURE CloseStream(VAR stream: Stream; VAR result: StreamResult);
-  BEGIN
-	IF (stream # NIL) AND (stream^.kind # none) THEN
-		result := succeeded;
-		IF stream^.mode # reading THEN
-			FlushStream(stream, result);
-		END;
-		IF close(stream^.fildes) < 0 THEN ; END;
-		freestruct(stream);
-	ELSE
-		result := nostream;
-	END;
-	stream := NIL;
-  END CloseStream;
-	
-  PROCEDURE EndOfStream(stream: Stream; VAR result: StreamResult): BOOLEAN;
-  BEGIN
-	result := succeeded;
-	IF (stream = NIL) OR (stream^.kind = none) THEN
-		result := nostream;
-		RETURN FALSE;
-	END;
-	IF stream^.mode # reading THEN
-		result := illegaloperation;
-		RETURN FALSE;
-	END;
-	IF stream^.eof THEN RETURN TRUE; END;
-	RETURN (CHAR(NextByte(stream)) = 0C) AND stream^.eof;
-  END EndOfStream;
-
-  PROCEDURE FlushLineBuffers();
-  VAR	s: Stream;
-	result: StreamResult;
-  BEGIN
-	s := head;
-	WHILE s # NIL DO
-		IF (s^.kind # none) AND (s^.buffering = linebuffered) THEN
-			FlushStream(s, result);
-		END;
-		s := s^.next;
-	END;
-  END FlushLineBuffers;
-
-  PROCEDURE NextByte(stream: Stream): BYTE;
-  VAR c: BYTE;
-  BEGIN
-	WITH stream^ DO
-		IF cnt <= maxcnt THEN
-			c := buf[cnt];
-		ELSE
-			IF eof THEN RETURN BYTE(0C); END;
-			IF stream = InputStream THEN
-				FlushLineBuffers();
-			END;
-			maxcnt := read(fildes, ADR(buf), bufferedcnt);
-			cnt := 1;
-			IF maxcnt <= 0 THEN
-				eof := TRUE;
-				c := BYTE(0C);
-			ELSE
-				c := buf[1];
-			END;
-		END;
-	END;
-	RETURN c;
-  END NextByte;
-
-  PROCEDURE Read(stream: Stream; VAR ch: CHAR; VAR result: StreamResult);
-  VAR EoF: BOOLEAN;
-  BEGIN
-	ch := 0C;
-	EoF := EndOfStream(stream, result);
-	IF result # succeeded THEN RETURN; END;
-	IF EoF THEN
-		result := endoffile;
-		RETURN;
-	END;
-	WITH stream^ DO
-		ch := CHAR(buf[cnt]);
-		INC(cnt);
-	END;
-  END Read;
-
-  PROCEDURE ReadByte(stream: Stream; VAR byte: BYTE; VAR result: StreamResult);
-  VAR EoF: BOOLEAN;
-  BEGIN
-	byte := BYTE(0C);
-	EoF := EndOfStream(stream, result);
-	IF result # succeeded THEN RETURN; END;
-	IF EoF THEN
-		result := endoffile;
-		RETURN;
-	END;
-	WITH stream^ DO
-		byte := buf[cnt];
-		INC(cnt);
-	END;
-  END ReadByte;
-
-  PROCEDURE ReadBytes(stream: Stream;
-		      VAR bytes: ARRAY OF BYTE;
-		      VAR result: StreamResult);
-  VAR i: CARDINAL;
-  BEGIN
-	FOR i := 0 TO HIGH(bytes) DO
-		ReadByte(stream, bytes[i], result);
-	END;
-  END ReadBytes;
-
-  PROCEDURE Write(stream: Stream; ch: CHAR; VAR result: StreamResult);
-  BEGIN
-	IF (stream = NIL) OR (stream^.kind = none) THEN
-		result := nostream;
-		RETURN;
-	END;
-	IF (stream^.kind # text) OR (stream^.mode = reading) THEN
-		result := illegaloperation;
-		RETURN;
-	END;
-	WITH stream^ DO
-		INC(cnt);
-		buf[cnt] := BYTE(ch);
-		IF (cnt >= bufferedcnt) OR
-		   ((ch = 12C) AND (buffering = linebuffered))
-		THEN
-			FlushStream(stream, result);
-		END;
-	END;
-  END Write;
-
-  PROCEDURE WriteByte(stream: Stream; byte: BYTE; VAR result: StreamResult);
-  BEGIN
-	IF (stream = NIL) OR (stream^.kind = none) THEN
-		result := nostream;
-		RETURN;
-	END;
-	IF (stream^.kind # binary) OR (stream^.mode = reading) THEN
-		result := illegaloperation;
-		RETURN;
-	END;
-	WITH stream^ DO
-		INC(cnt);
-		buf[cnt] := byte;
-		IF cnt >= bufferedcnt THEN
-			FlushStream(stream, result);
-		END;
-	END;
-  END WriteByte;
-
-  PROCEDURE WriteBytes(stream: Stream; bytes: ARRAY OF BYTE; VAR result: StreamResult);
-  VAR i: CARDINAL;
-  BEGIN
-	FOR i := 0 TO HIGH(bytes) DO
-		WriteByte(stream, bytes[i], result);
-	END;
-  END WriteBytes;
-
-  PROCEDURE EndIt;
-  VAR h, h1 : Stream;
-      result: StreamResult;
-  BEGIN
-	h := head;
-	WHILE h # NIL DO
-		h1 := h;
-		CloseStream(h1, result);
-		h := h^.next;
-	END;
-  END EndIt;
-
-  PROCEDURE GetPosition(s: Stream; VAR position: LONGINT;
-			VAR result: StreamResult);
-  BEGIN
-	IF (s = NIL) OR (s^.kind = none) THEN
-		result := illegaloperation;
-		RETURN;
-	END;
-	IF (s^.mode # reading) THEN FlushStream(s, result); END;
-	position := lseek(s^.fildes, 0D, 1);
-	IF position < 0D THEN
-		result := illegaloperation;
-		RETURN;
-	END;
-	IF s^.mode = reading THEN
-		position := position + LONG(s^.maxcnt - s^.cnt + 1);
-	END;
-  END GetPosition;
-
-  PROCEDURE SetPosition(s: Stream; position: LONGINT; VAR result: StreamResult);
-  VAR currpos: LONGINT;
-  BEGIN
-	currpos := 0D;
-	IF (s = NIL) OR (s^.kind = none) THEN
-		result := nostream;
-		RETURN;
-	END;
-	IF (s^.mode # reading) THEN
-		FlushStream(s, result);
-	ELSE
-		s^.maxcnt := 0;
-		s^.eof := FALSE;
-	END;
-	IF s^.mode = appending THEN
-		currpos := lseek(s^.fildes, 0D, 1);
-		IF currpos < 0D THEN
-			result := illegaloperation;
-			RETURN;
-		END;
-	END;
-	IF position < currpos THEN
-		result := illegaloperation;
-		RETURN;
-	END;
-	currpos := lseek(s^.fildes, position, 0);
-	IF currpos < 0D THEN
-		result := illegaloperation;
-		RETURN;
-	END;
-	result := succeeded;
-  END SetPosition;
-
-  PROCEDURE isatty(stream: Stream; VAR result: StreamResult): BOOLEAN;
-  BEGIN
-	IF (stream = NIL) OR (stream^.kind = none) THEN
-		result := nostream;
-		RETURN FALSE;
-	END;
-	RETURN StripUnix.isatty(stream^.fildes);
-  END isatty;
-
-  PROCEDURE InitStreams;
-  VAR result: StreamResult;
-  BEGIN
-	InputStream := ADR(ibuf);
-	OutputStream := ADR(obuf);
-	ErrorStream := ADR(ebuf);
-	WITH ibuf DO
-		kind := text;
-		mode := reading;
-		eof := FALSE;
-		next := ADR(obuf);
-		fildes := 0;
-		maxcnt := 0;
-		cnt := 1;
-		bufferedcnt := BUFSIZ;
-	END;
-	WITH obuf DO
-		kind := text;
-		mode := writing;
-		eof := TRUE;
-		next := ADR(ebuf);
-		fildes := 1;
-		maxcnt := 0;
-		cnt := 0;
-		bufferedcnt := BUFSIZ;
-		IF isatty(OutputStream, result) THEN
-			buffering := linebuffered;
-		ELSE
-			buffering := blockbuffered;
-		END;
-	END;
-	WITH ebuf DO
-		kind := text;
-		mode := writing;
-		eof := TRUE;
-		next := NIL;
-		fildes := 2;
-		maxcnt := 0;
-		cnt := 0;
-		bufferedcnt := BUFSIZ;
-		IF isatty(ErrorStream, result) THEN
-			buffering := linebuffered;
-		ELSE
-			buffering := blockbuffered;
-		END;
-	END;
-	head := InputStream;
-	IF CallAtEnd(EndIt) THEN ; END;
-  END InitStreams;
-
-BEGIN
-	InitStreams
-END Streams.
Index: trunk/minix/lib/ack/libm2/Strings.mod
===================================================================
--- trunk/minix/lib/ack/libm2/Strings.mod	(revision 9)
+++ 	(revision )
@@ -1,171 +1,0 @@
-(*
-  (c) copyright 1988 by the Vrije Universiteit, Amsterdam, The Netherlands.
-  See the copyright notice in the ACK home directory, in the file "Copyright".
-*)
-
-(*$R-*)
-IMPLEMENTATION MODULE Strings;
-(*
-  Module:       String manipulations
-  Author:       Ceriel J.H. Jacobs
-  Version:      $Header: /cvsup/minix/src/lib/ack/libm2/Strings.mod,v 1.1 2005/10/10 15:27:46 beng Exp $
-*)
-
-  PROCEDURE Assign(source: ARRAY OF CHAR; VAR dest: ARRAY OF CHAR);
-  (* Assign string source to dest
-  *)
-  VAR	i: CARDINAL;
-	max: CARDINAL;
-  BEGIN
-	max := HIGH(source);
-	IF HIGH(dest) < max THEN max := HIGH(dest); END;
-	i := 0;
-	WHILE (i <= max) AND (source[i] # 0C) DO
-		dest[i] := source[i];
-		INC(i);
-	END;
-	IF i < HIGH(dest) THEN dest[i] := 0C; END;
-  END Assign;
-
-  PROCEDURE Insert(substr: ARRAY OF CHAR; VAR str: ARRAY OF CHAR; inx: CARDINAL);
-  (* Insert the string substr into str, starting at str[inx].
-     If inx is equal to or greater than Length(str) then substr is appended
-     to the end of str.
-  *)
-  VAR	sublen, length, i: CARDINAL;
-  BEGIN
-	sublen := Length(substr);
-	IF sublen = 0 THEN RETURN; END;
-	length := Length(str);
-	IF inx > length THEN inx := length; END;
-	i := length;
-	IF i + sublen  - 1 > HIGH(str) THEN i := HIGH(str); END;
-	WHILE i > inx DO
-		str[i+sublen-1] := str[i-1];
-		DEC(i);
-	END;
-	FOR i := 0 TO sublen - 1 DO
-		IF i + inx <= HIGH(str) THEN
-			str[i + inx] := substr[i];
-		ELSE
-			RETURN;
-		END;
-	END;
-	IF length + sublen <= HIGH(str) THEN
-		str[length + sublen] := 0C;
-	END;
-  END Insert;
-
-  PROCEDURE Delete(VAR str: ARRAY OF CHAR; inx, len: CARDINAL);
-  (* Delete len characters from str, starting at str[inx].
-     If inx >= Length(str) then nothing happens.
-     If there are not len characters to delete, characters to the end of the
-     string are deleted.
-  *)
-  VAR	length: CARDINAL;
-  BEGIN
-	IF len = 0 THEN RETURN; END;
-	length := Length(str);
-	IF inx >= length THEN RETURN; END;
-	WHILE inx + len < length DO
-		str[inx] := str[inx + len];
-		INC(inx);
-	END;
-	str[inx] := 0C;
-  END Delete;
-
-  PROCEDURE Pos(substr, str: ARRAY OF CHAR): CARDINAL;
-  (* Return the index into str of the first occurrence of substr.
-     Pos returns a value greater than HIGH(str) of no occurrence is found.
-  *)
-  VAR	i, j, max, subl: CARDINAL;
-  BEGIN
-	max := Length(str);
-	subl := Length(substr);
-	IF subl > max THEN RETURN HIGH(str) + 1; END;
-	IF subl = 0 THEN RETURN 0; END;
-	max := max - subl;
-	FOR i := 0 TO max DO
-		j := 0;
-		WHILE (j <= subl-1) AND (str[i+j] = substr[j]) DO
-			INC(j);
-		END;
-		IF j = subl THEN RETURN i; END;
-	END;
-	RETURN HIGH(str) + 1;
-  END Pos;
-
-  PROCEDURE Copy(str: ARRAY OF CHAR;
-	         inx, len: CARDINAL;
-	         VAR result: ARRAY OF CHAR);
-  (* Copy at most len characters from str into result, starting at str[inx].
-  *)
-  VAR	i: CARDINAL;
-  BEGIN
-	IF Length(str) <= inx THEN RETURN END;
-	i := 0;
-	LOOP
-		IF i > HIGH(result) THEN RETURN; END;
-		IF len = 0 THEN EXIT; END;
-		IF inx > HIGH(str) THEN EXIT; END;
-		result[i] := str[inx];
-		INC(i); INC(inx); DEC(len);
-	END;
-	IF i <= HIGH(result) THEN result[i] := 0C; END;
-  END Copy;
-
-  PROCEDURE Concat(s1, s2: ARRAY OF CHAR; VAR result: ARRAY OF CHAR);
-  (* Concatenate two strings.
-  *)
-  VAR	i, j: CARDINAL;
-  BEGIN
-	i := 0;
-	WHILE (i <= HIGH(s1)) AND (s1[i] # 0C) DO
-		IF i > HIGH(result) THEN RETURN END;
-		result[i] := s1[i];
-		INC(i);
-	END;
-	j := 0;
-	WHILE (j <= HIGH(s2)) AND (s2[j] # 0C) DO
-		IF i > HIGH(result) THEN RETURN END;
-		result[i] := s2[j];
-		INC(i);
-		INC(j);
-	END;
-	IF i <= HIGH(result) THEN result[i] := 0C; END;
-  END Concat;
-
-  PROCEDURE Length(str: ARRAY OF CHAR): CARDINAL;
-  (* Return number of characters in str.
-  *)
-  VAR i: CARDINAL;
-  BEGIN
-	i := 0;
-	WHILE (i <= HIGH(str)) DO
-		IF str[i] = 0C THEN RETURN i; END;
-		INC(i);
-	END;
-	RETURN i;
-  END Length;
-
-  PROCEDURE CompareStr(s1, s2: ARRAY OF CHAR): INTEGER;
-  (* Compare two strings, return -1 if s1 < s2, 0 if s1 = s2, and 1 if s1 > s2.
-  *)
-  VAR	i: CARDINAL;
-	max: CARDINAL;
-  BEGIN
-	max := HIGH(s1);
-	IF HIGH(s2) < max THEN max := HIGH(s2); END;
-	i := 0;
-	WHILE (i <= max) DO
-		IF s1[i] < s2[i] THEN RETURN -1; END;
-		IF s1[i] > s2[i] THEN RETURN 1; END;
-		IF s1[i] = 0C THEN RETURN 0; END;
-		INC(i);
-	END;
-	IF (i <= HIGH(s1)) AND (s1[i] # 0C) THEN RETURN 1; END;
-	IF (i <= HIGH(s2)) AND (s2[i] # 0C) THEN RETURN -1; END;
-	RETURN 0;
-  END CompareStr;
-
-END Strings.
Index: trunk/minix/lib/ack/libm2/Termcap.mod
===================================================================
--- trunk/minix/lib/ack/libm2/Termcap.mod	(revision 9)
+++ 	(revision )
@@ -1,99 +1,0 @@
-(*
-  (c) copyright 1988 by the Vrije Universiteit, Amsterdam, The Netherlands.
-  See the copyright notice in the ACK home directory, in the file "Copyright".
-*)
- 
-(* 
-  Module:       Interface to termcap database
-  From:         Unix manual chapter 3 
-  Version:      $Header: /cvsup/minix/src/lib/ack/libm2/Termcap.mod,v 1.1 2005/10/10 15:27:46 beng Exp $ 
-*)
-
-(*$R-*)
-IMPLEMENTATION MODULE Termcap;
-
-  IMPORT XXTermcap;
-  FROM	SYSTEM IMPORT	ADR, ADDRESS;
-  FROM	Unix IMPORT	isatty;
-  FROM	Arguments IMPORT
-			GetEnv;
-
-  TYPE	STR = ARRAY[1..32] OF CHAR;
-	STRCAP = POINTER TO STR;
-
-  VAR	Buf, Buf1 : ARRAY [1..1024] OF CHAR;
-	BufCnt : INTEGER;
-
-  PROCEDURE Tgetent(name: ARRAY OF CHAR) : INTEGER;
-  VAR i: INTEGER;
-      x: STRCAP;
-  BEGIN
-	i := XXTermcap.tgetent(ADR(Buf), ADR(name));
-	BufCnt := 1;
-	IF isatty(1) THEN
-	ELSE
-		(* This used to be something returned by gtty().  To increase
-		 * portability we forget about old terminals needing delays.
-		 * (kjb)
-		 *)
-		XXTermcap.ospeed := 0;
-	END;
-	IF i > 0 THEN
-		IF Tgetstr("pc", x) THEN
-			XXTermcap.PC := x^[1];
-		ELSE	XXTermcap.PC := 0C;
-		END;
-		IF Tgetstr("up", x) THEN ; END; XXTermcap.UP := x;
-		IF Tgetstr("bc", x) THEN ; END; XXTermcap.BC := x;
-	END;
-	RETURN i;
-  END Tgetent;
-
-  PROCEDURE Tgetnum(id: ARRAY OF CHAR): INTEGER;
-  BEGIN
-	RETURN XXTermcap.tgetnum(ADR(id));
-  END Tgetnum;
-
-  PROCEDURE Tgetflag(id: ARRAY OF CHAR): BOOLEAN;
-  BEGIN
-	RETURN XXTermcap.tgetflag(ADR(id)) = 1;
-  END Tgetflag;
-
-  PROCEDURE Tgoto(cm: STRCAP; col, line: INTEGER): STRCAP;
-  BEGIN
-	RETURN XXTermcap.tgoto(cm, col, line);
-  END Tgoto;
-
-  PROCEDURE Tgetstr(id: ARRAY OF CHAR; VAR res: STRCAP) : BOOLEAN;
-  VAR a, a2: ADDRESS;
-      b: CARDINAL;
-  BEGIN
-	a := ADR(Buf1[BufCnt]);
-	a2 := XXTermcap.tgetstr(ADR(id), ADR(a));
-	res := a2;
-	IF a2 = NIL THEN
-		RETURN FALSE;
-	END;
-	b := a - a2;
-	INC(BufCnt, b);
-	RETURN TRUE;
-  END Tgetstr;
-
-  PROCEDURE Tputs(cp: STRCAP; affcnt: INTEGER; p: PUTPROC);
-  BEGIN
-	XXTermcap.tputs(cp, affcnt, XXTermcap.PUTPROC(p));
-  END Tputs;
-
-  PROCEDURE InitTermcap;
-  VAR Bf: STR;
-  BEGIN
-	IF GetEnv("TERM", Bf) = 0 THEN
-		Bf := "dumb";
-	END;
-	IF Tgetent(Bf) <= 0 THEN
-	END;
-  END InitTermcap;
-
-BEGIN
-	InitTermcap;
-END Termcap.
Index: trunk/minix/lib/ack/libm2/Terminal.mod
===================================================================
--- trunk/minix/lib/ack/libm2/Terminal.mod	(revision 9)
+++ 	(revision )
@@ -1,114 +1,0 @@
-#
-(*
-  (c) copyright 1988 by the Vrije Universiteit, Amsterdam, The Netherlands.
-  See the copyright notice in the ACK home directory, in the file "Copyright".
-*)
-
-(*$R-*)
-IMPLEMENTATION MODULE Terminal;
-(*
-  Module:       Input/Output to/from terminals
-  Author:	Ceriel J.H. Jacobs
-  Version:      $Header: /cvsup/minix/src/lib/ack/libm2/Terminal.mod,v 1.1 2005/10/10 15:27:46 beng Exp $
-
-  Implementation for Unix.
-*)
-  FROM	SYSTEM IMPORT	ADR;
-#ifdef __USG
-  FROM	Unix IMPORT	read, write, open, fcntl;
-#else
-  FROM	Unix IMPORT	read, write, open, ioctl;
-#endif
-  VAR fildes: INTEGER;
-      unreadch: CHAR;
-      unread: BOOLEAN;
-      tty: ARRAY[0..8] OF CHAR;
-
-  PROCEDURE Read(VAR ch: CHAR);
-  BEGIN
-	IF unread THEN
-		ch := unreadch;
-		unread := FALSE
-	ELSE
-		IF read(fildes, ADR(ch), 1) < 0 THEN
-			;
-		END;
-	END;
-	unreadch := ch;
-  END Read;
-
-  PROCEDURE BusyRead(VAR ch: CHAR);
-    VAR l: INTEGER;
-  BEGIN
-	IF unread THEN
-		ch := unreadch;
-		unread := FALSE
-	ELSE
-#ifdef __USG
-		l := fcntl(fildes, (*FGETFL*) 3, 0);
-		IF fcntl(fildes,
-			      (* FSETFL *) 4,
-			      l + (*ONDELAY*) 2) < 0 THEN
-			;
-		END;
-		IF read(fildes, ADR(ch), 1) = 0 THEN
-			ch := 0C;
-		ELSE
-			unreadch := ch;
-		END;
-		IF fcntl(fildes, (*FSETFL*)4, l) < 0 THEN
-			;
-		END;
-#else
-#ifdef __BSD4_2
-		IF ioctl(fildes, INTEGER(ORD('f')*256+127+4*65536+40000000H), ADR(l)) < 0 THEN
-#else
-		IF ioctl(fildes, INTEGER(ORD('f')*256+127), ADR(l)) < 0 THEN
-#endif
-			;
-		END;
-
-		IF l = 0 THEN
-			ch := 0C;
-		ELSE
-			IF read(fildes, ADR(ch), 1) < 0 THEN
-				;
-			END;
-			unreadch := ch;
-		END;
-#endif
-  	END;
-  END BusyRead;	
-
-  PROCEDURE ReadAgain;
-  BEGIN
-	unread := TRUE;
-  END ReadAgain;
-
-  PROCEDURE Write(ch: CHAR);
-  BEGIN
-	IF write(fildes, ADR(ch), 1) < 0 THEN
-		;
-	END;
-  END Write;
-
-  PROCEDURE WriteLn;
-  BEGIN
-	Write(12C);
-  END WriteLn;
-
-  PROCEDURE WriteString(s: ARRAY OF CHAR);
-    VAR i: CARDINAL;
-  BEGIN
-	i := 0;
-	WHILE (i <= HIGH(s)) & (s[i] # 0C) DO
-		Write(s[i]);
-		INC(i)
-	END
-  END WriteString;
-
-BEGIN
-	tty := "/dev/tty";
-	fildes := open(ADR(tty), 2);
-	unread := FALSE;
-END Terminal.
Index: trunk/minix/lib/ack/libm2/Traps.mod
===================================================================
--- trunk/minix/lib/ack/libm2/Traps.mod	(revision 9)
+++ 	(revision )
@@ -1,96 +1,0 @@
-(*
-  (c) copyright 1988 by the Vrije Universiteit, Amsterdam, The Netherlands.
-  See the copyright notice in the ACK home directory, in the file "Copyright".
-*)
-
-(*$R-*)
-IMPLEMENTATION MODULE Traps;
-(*
-  Module:       Facility for handling traps
-  Author:       Ceriel J.H. Jacobs
-  Version:      $Header: /cvsup/minix/src/lib/ack/libm2/Traps.mod,v 1.1 2005/10/10 15:27:46 beng Exp $
-*)
-
-  FROM	EM IMPORT	SIG, LINO, FILN, TRP;
-  FROM	Unix IMPORT	write;
-  FROM	SYSTEM IMPORT	ADDRESS, ADR;
-  FROM	Arguments IMPORT
-			Argv;
-
-  PROCEDURE InstallTrapHandler(t: TrapHandler): TrapHandler;
-  (* Install a new trap handler, and return the previous one.
-     Parameter of trap handler is the trap number.
-  *)
-  BEGIN
-	RETURN SIG(t);
-  END InstallTrapHandler;
-
-  PROCEDURE Message(str: ARRAY OF CHAR);
-  (* Write message "str" on standard error, preceeded by filename and
-     linenumber if possible
-  *)
-  VAR 	p: POINTER TO CHAR;
-	l: CARDINAL;
-	lino: INTEGER;
-	buf, buf2: ARRAY [0..255] OF CHAR;
-	i, j: CARDINAL;
-  BEGIN
-	p := FILN();
-	IF p # NIL THEN
-		i := 1;
-		buf[0] := '"';
-		WHILE p^ # 0C DO
-			buf[i] := p^;
-			INC(i);
-			p := ADDRESS(p) + 1;
-		END;
-		buf[i] := '"';
-		INC(i);
-		IF write(2, ADR(buf), i) < 0 THEN END;
-	ELSE
-		l := Argv(0, buf);
-		IF write(2, ADR(buf), l-1) < 0 THEN END;
-	END;
-	lino := LINO();
-	i := 0;
-	IF lino # 0 THEN
-		i := 7;
-		buf[0] := ','; buf[1] := ' ';
-		buf[2] := 'l'; buf[3] := 'i'; buf[4] := 'n'; buf[5] := 'e';
-		buf[6] := ' ';
-		IF lino < 0 THEN
-			buf[7] := '-';
-			i := 8;
-			lino := - lino;
-		END;
-		j := 0;
-		REPEAT
-			buf2[j] := CHR(CARDINAL(lino) MOD 10 + ORD('0'));
-			lino := lino DIV 10;
-			INC(j);
-		UNTIL lino = 0;
-		WHILE j > 0 DO
-			DEC(j);
-			buf[i] := buf2[j];
-			INC(i);
-		END;
-	END;
-	buf[i] := ':';
-	buf[i+1] := ' ';
-	IF write(2, ADR(buf), i+2) < 0 THEN END;
-	i := 0;
-	WHILE (i <= HIGH(str)) AND (str[i] # 0C) DO
-		INC(i);
-	END;
-	IF write(2, ADR(str), i) < 0 THEN END;
-	buf[0] := 12C;
-	IF write(2, ADR(buf), 1) < 0 THEN END;
-  END Message;
-
-  PROCEDURE Trap(n: INTEGER);
-  (* cause trap number "n" to occur *)
-  BEGIN
-	TRP(n);
-  END Trap;
-
-END Traps.
Index: trunk/minix/lib/ack/libm2/XXTermcap.c
===================================================================
--- trunk/minix/lib/ack/libm2/XXTermcap.c	(revision 9)
+++ 	(revision )
@@ -1,573 +1,0 @@
-/*
- *	termcap.c	1.1	20/7/87		agc	Joypace Ltd
- *
- *	Copyright Joypace Ltd, London, UK, 1987. All rights reserved.
- *	This file may be freely distributed provided that this notice
- *	remains attached.
- *
- *	A public domain implementation of the termcap(3) routines.
- *
- *	Made fully functional by Ceriel J.H. Jacobs.
- *
- * BUGS:
- *	- does not check termcap entry sizes
- *	- not fully tested
- */
-
-#define CAPABLEN	2
-
-#define ISSPACE(c)	((c) == ' ' || (c) == '\t' || (c) == '\r' || (c) == '\n')
-#define ISDIGIT(x)	((x) >= '0' && (x) <= '9')
-
-short	ospeed = 0;		/* output speed */
-char	PC = 0;			/* padding character */
-char	*BC = 0;		/* back cursor movement */
-char	*UP = 0;		/* up cursor movement */
-
-static char	*capab = 0;		/* the capability itself */
-static int	check_for_tc();
-static int	match_name();
-
-#define NULL	0
-
-/* Some things from C-library, needed here because the C-library is not
-   loaded with Modula-2 programs
-*/
-
-static char *
-strcat(s1, s2)
-register char *s1, *s2;
-{
-  /* Append s2 to the end of s1. */
-
-  char *original = s1;
-
-  /* Find the end of s1. */
-  while (*s1 != 0) s1++;
-
-  /* Now copy s2 to the end of s1. */
-  while (*s1++ = *s2++) /* nothing */ ;
-  return(original);
-}
-
-static char *
-strcpy(s1, s2)
-register char *s1, *s2;
-{
-/* Copy s2 to s1. */
-  char *original = s1;
-
-  while (*s1++ = *s2++) /* nothing */;
-  return(original);
-}
-
-static int
-strlen(s)
-char *s;
-{
-/* Return length of s. */
-
-  char *original = s;
-
-  while (*s != 0) s++;
-  return(s - original);
-}
-
-static int
-strcmp(s1, s2)
-register char *s1, *s2;
-{
-/* Compare 2 strings. */
-
-  for(;;) {
-	if (*s1 != *s2) {
-		if (!*s1) return -1;
-		if (!*s2) return 1;
-		return(*s1 - *s2);
-	}
-	if (*s1++ == 0) return(0);
-	s2++;
-  }
-}
-
-static int
-strncmp(s1, s2, n)
-	register char *s1, *s2;
-	int n;
-{
-/* Compare two strings, but at most n characters. */
-
-  while (n-- > 0) {
-	if (*s1 != *s2) {
-		if (!*s1) return -1;
-		if (!*s2) return 1;
-		return(*s1 - *s2);
-	}
-	if (*s1++ == 0) break;
-	s2++;
-  }
-  return 0;
-}
-
-static char *
-getenv(name)
-register char *name;
-{
-  extern char ***_penviron;
-  register char **v = *_penviron, *p, *q;
-
-  if (v == 0 || name == 0) return 0;
-  while ((p = *v++) != 0) {
-	q = name;
-	while (*q && *q++ == *p++) /* nothing */ ;
-	if (*q || *p != '=') continue;
-	return(p+1);
-  }
-  return(0);
-}
-
-static char *
-fgets(buf, count, fd)
-	char *buf;
-{
-	static char bf[1024];
-	static int cnt = 0;
-	static char *pbf = &bf[0];
-	register char *c = buf;
-
-
-	while (--count) {
-		if (pbf >= &bf[cnt]) {
-			if ((cnt = read(fd, bf, 1024)) <= 0) {
-				if (c == buf) return (char *) NULL;
-				*c = 0;
-				return buf;
-			}
-			pbf = &bf[0];
-		}
-		*c = *pbf++;
-		if (*c++ == '\n') {
-			*c = 0;
-			return buf;
-		}
-	}
-	*c = 0;
-	return buf;
-}
-
-/*
- *	tgetent - get the termcap entry for terminal name, and put it
- *	in bp (which must be an array of 1024 chars). Returns 1 if
- *	termcap entry found, 0 if not found, and -1 if file not found.
- */
-int
-tgetent(bp, name)
-char	*bp;
-char	*name;
-{
-	int	fp;
-	char	*file;
-	char	*cp;
-	short	len = strlen(name);
-	char	buf[1024];
-
-	capab = bp;
-	if ((file = getenv("TERMCAP")) != (char *) NULL) {
-		if (*file != '/' &&
-		    (cp = getenv("TERM")) != NULL && strcmp(name, cp) == 0) {
-			(void) strcpy(bp, file);
-			return(1);
-		}
-		else file = "/etc/termcap";
-	} else
-		file = "/etc/termcap";
-	if ((fp = open(file, 0)) < 0) {
-		capab = 0;
-		return(-1); 
-	}
-	while (fgets(buf, 1024, fp) != NULL) {
-		if (buf[0] == '#') continue;
-		while (*(cp = &buf[strlen(buf) - 2]) == '\\')
-			if (fgets(cp, 1024, fp) == NULL)
-				return (0);
-		if (match_name(buf, name)) {
-			strcpy(bp, buf);
-			close(fp);
-			if(check_for_tc() == 0) {
-				capab = 0;
-				return 0;
-			}
-			return 1;
-		}
-	}
-	capab = 0;
-	close(fp);
-	return(0);
-}
-
-/*
- *	Compare the terminal name with each termcap entry name; Return 1 if a
- *	match is found.
- */
-static int
-match_name(buf, name)
-	char	*buf;
-	char	*name;
-{
-	register char	*tp = buf;
-	register char	*np;
-
-	for (;;) {
-		for (np = name; *np && *tp == *np; np++, tp++) { }
-		if (*np == 0 && (*tp == '|' || *tp == ':' || *tp == 0))
-			return(1);
-		while (*tp != 0 && *tp != '|' && *tp != ':') tp++;
-		if (*tp++ != '|') return (0);
-	}
-}
-
-/*
- *	Handle tc= definitions recursively.
- */
-static int
-check_for_tc()
-{
-	static int	count = 0;
-	char		*savcapab = capab;
-	char		buf[1024];
-	char		terminalname[128];
-	register char	*p = capab + strlen(capab) - 2, *q;
-
-	while (*p != ':')
-		if (--p < capab)
-			return(0);	/* no : in termcap entry */
-	if (p[1] != 't' || p[2] != 'c')
-		return(1);
-	if (count > 16) {
-		return(0);	/* recursion in tc= definitions */
-	}
-	count++;
-	strcpy(terminalname, &p[4]);
-	q = terminalname;
-	while (*q && *q != ':') q++;
-	*q = 0;
-	if (tgetent(buf, terminalname) != 1) {
-		--count;
-		return(0);
-	}
-	--count;
-	for (q = buf; *q && *q != ':'; q++) { }
-	strcpy(p, q);
-	capab = savcapab;
-	return(1);
-}
-
-/*
- *	tgetnum - get the numeric terminal capability corresponding
- *	to id. Returns the value, -1 if invalid.
- */
-int
-tgetnum(id)
-char	*id;
-{
-	char	*cp;
-	int	ret;
-
-	if ((cp = capab) == NULL || id == NULL || *cp == 0)
-		return(-1);
-	while (*++cp && *cp != ':')
-		;
-	while (*cp) {
-		cp++;
-		while (ISSPACE(*cp))
-			cp++;
-		if (strncmp(cp, id, CAPABLEN) == 0) {
-			while (*cp && *cp != ':' && *cp != '#')
-				cp++;
-			if (*cp != '#')
-				return(-1);
-			for (ret = 0, cp++ ; *cp && ISDIGIT(*cp) ; cp++)
-				ret = ret * 10 + *cp - '0';
-			return(ret);
-		}
-		while (*cp && *cp != ':')
-			cp++;
-	}
-	return(-1);
-}
-
-/*
- *	tgetflag - get the boolean flag corresponding to id. Returns -1
- *	if invalid, 0 if the flag is not in termcap entry, or 1 if it is
- *	present.
- */
-int
-tgetflag(id)
-char	*id;
-{
-	char	*cp;
-
-	if ((cp = capab) == NULL || id == NULL || *cp == 0)
-		return(-1);
-	while (*++cp && *cp != ':')
-		;
-	while (*cp) {
-		cp++;
-		while (ISSPACE(*cp))
-			cp++;
-		if (strncmp(cp, id, CAPABLEN) == 0)
-			return(1);
-		while (*cp && *cp != ':')
-			cp++;
-	}
-	return(0);
-}
-
-/*
- *	tgetstr - get the string capability corresponding to id and place
- *	it in area (advancing area at same time). Expand escape sequences
- *	etc. Returns the string, or NULL if it can't do it.
- */
-char *
-tgetstr(id, area)
-char	*id;
-char	**area;
-{
-	char	*cp;
-	char	*ret;
-	int	i;
-
-	if ((cp = capab) == NULL || id == NULL || *cp == 0)
-		return(NULL);
-	while (*++cp != ':')
-		;
-	while (*cp) {
-		cp++;
-		while (ISSPACE(*cp))
-			cp++;
-		if (strncmp(cp, id, CAPABLEN) == 0) {
-			while (*cp && *cp != ':' && *cp != '=')
-				cp++;
-			if (*cp != '=')
-				return(NULL);
-			for (ret = *area, cp++; *cp && *cp != ':' ; (*area)++, cp++)
-				switch(*cp) {
-				case '^' :
-					**area = *++cp - 'A' + 1;
-					break;
-				case '\\' :
-					switch(*++cp) {
-					case 'E' :
-						**area = '\033';
-						break;
-					case 'n' :
-						**area = '\n';
-						break;
-					case 'r' :
-						**area = '\r';
-						break;
-					case 't' :
-						**area = '\t';
-						break;
-					case 'b' :
-						**area = '\b';
-						break;
-					case 'f' :
-						**area = '\f';
-						break;
-					case '0' :
-					case '1' :
-					case '2' :
-					case '3' :
-						for (i=0 ; *cp && ISDIGIT(*cp) ; cp++)
-							i = i * 8 + *cp - '0';
-						**area = i;
-						cp--;
-						break;
-					case '^' :
-					case '\\' :
-						**area = *cp;
-						break;
-					}
-					break;
-				default :
-					**area = *cp;
-				}
-			*(*area)++ = '\0';
-			return(ret);
-		}
-		while (*cp && *cp != ':')
-			cp++;
-	}
-	return(NULL);
-}
-
-/*
- *	tgoto - given the cursor motion string cm, make up the string
- *	for the cursor to go to (destcol, destline), and return the string.
- *	Returns "OOPS" if something's gone wrong, or the string otherwise.
- */
-char *
-tgoto(cm, destcol, destline)
-char	*cm;
-int	destcol;
-int	destline;
-{
-	register char	*rp;
-	static char	ret[32];
-	char		added[16];
-	int		*dp = &destline;
-	int 		numval;
-	int		swapped = 0;
-
-	added[0] = 0;
-	for (rp = ret ; *cm ; cm++) {
-		if (*cm == '%') {
-			switch(*++cm) {
-			case '>' :
-				if (dp == NULL)
-					return("OOPS");
-				cm++;
-				if (*dp > *cm++) {
-					*dp += *cm;
-				}
-				break;
-			case '+' :
-			case '.' :
-				if (dp == NULL)
-					return("OOPS");
-				if (*cm == '+') *dp = *dp + *++cm;
-				for (;;) {
-				    switch(*dp) {
-				    case 0:
-				    case 04:
-				    case '\t':
-				    case '\n':
-					/* filter these out */
-					if (dp == &destcol || swapped || UP) {
-						strcat(added, dp == &destcol || swapped ?
-							(BC ? BC : "\b") :
-							UP);
-						(*dp)++;
-						continue;
-					}
-				    }
-				    break;
-				}
-				*rp++ = *dp;
-				dp = (dp == &destline) ? &destcol : NULL;
-				break;
-
-			case 'r' : {
-				int tmp = destline;
-
-				destline = destcol;
-				destcol = tmp;
-				swapped = 1 - swapped;
-				break;
-			}
-			case 'n' :
-				destcol ^= 0140;
-				destline ^= 0140;
-				break;
-
-			case '%' :
-				*rp++ = '%';
-				break;
-
-			case 'i' :
-				destcol++;
-				destline++;
-				break;
-
-			case 'B' :
-				if (dp == NULL)
-					return("OOPS");
-				*dp = 16 * (*dp / 10) + *dp % 10;
-				break;
-
-			case 'D' :
-				if (dp == NULL)
-					return("OOPS");
-				*dp = *dp - 2 * (*dp % 16);
-				break;
-
-			case 'd' :
-			case '2' :
-			case '3' :
-				if (dp == NULL)
-					return("OOPS");
-				numval = *dp;
-				dp = (dp == &destline) ? &destcol : NULL;
-				if (numval >= 100) {
-					*rp++ = '0' + numval / 100;
-				}
-				else if (*cm == '3') {
-					*rp++ = ' ';
-				}
-				if (numval >= 10) {
-					*rp++ = '0' + ((numval%100)/10);
-				}
-				else if (*cm == '3' || *cm == '2') {
-					*rp++ = ' ';
-				}
-				*rp++ = '0' + (numval%10);
-				break;
-			default :
-				return("OOPS");
-			}
-		}
-		else *rp++ = *cm;
-	}
-	*rp = '\0';
-	strcpy(rp, added);
-	return(ret);
-}
-
-static int tens_of_ms_p_char[] = {	/* index as returned by gtty */
-					/* assume 10 bits per char */
-	0, 2000, 1333, 909, 743, 666, 500, 333, 166, 83, 55, 41, 20, 10, 5, 2
-};
-/*
- *	tputs - put the string cp out onto the terminal, using the function
- *	outc. Also handle padding.
- */
-int
-tputs(cp, affcnt, outc)
-register char	*cp;
-int		affcnt;
-int		(*outc)();
-{
-	int delay = 0;
-	if (cp == NULL)
-		return(1);
-	while (ISDIGIT(*cp)) {
-		delay = delay * 10 + (*cp++ - '0');
-	}
-	delay *= 10;
-	if (*cp == '.') {
-		cp++;
-		if (ISDIGIT(*cp)) {
-			delay += *cp++ - '0';
-		}
-		while (ISDIGIT(*cp)) cp++;
-	}
-	if (*cp == '*') {
-		delay *= affcnt;
-		cp++;
-	}
-	while (*cp)
-		(*outc)(*cp++);
-	if (delay != 0 &&
-	    ospeed > 0 &&
-	    ospeed < (sizeof tens_of_ms_p_char / sizeof tens_of_ms_p_char[0])) {
-		delay = (delay + tens_of_ms_p_char[ospeed] - 1) / 
-				  tens_of_ms_p_char[ospeed];
-		while (delay--) (*outc)(PC);
-	}
-	return(1);
-}
-
-/*
- *	That's all, folks...
- */
Index: trunk/minix/lib/ack/libm2/absd.c
===================================================================
--- trunk/minix/lib/ack/libm2/absd.c	(revision 9)
+++ 	(revision )
@@ -1,18 +1,0 @@
-/*
-  (c) copyright 1988 by the Vrije Universiteit, Amsterdam, The Netherlands.
-  See the copyright notice in the ACK home directory, in the file "Copyright".
-*/
-
-/*
-  Module:	double abs function
-  Author:	Ceriel J.H. Jacobs
-  Version:	$Header: /cvsup/minix/src/lib/ack/libm2/absd.c,v 1.1 2005/10/10 15:27:46 beng Exp $
-*/
-#ifndef NOFLOAT
-double
-absd(i)
-	double i;
-{
-	return i >= 0 ? i : -i;
-}
-#endif
Index: trunk/minix/lib/ack/libm2/absf.e
===================================================================
--- trunk/minix/lib/ack/libm2/absf.e	(revision 9)
+++ 	(revision )
@@ -1,30 +1,0 @@
-#
-;
-; (c) copyright 1988 by the Vrije Universiteit, Amsterdam, The Netherlands.
-; See the copyright notice in the ACK home directory, in the file "Copyright".
-;
-;
-; Module:	REAL abs function
-; Author:	Ceriel J.H. Jacobs
-; Version:	$Header: /cvsup/minix/src/lib/ack/libm2/absf.e,v 1.1 2005/10/10 15:27:46 beng Exp $
-;
- mes 2,_EM_WSIZE,_EM_PSIZE
- exp $absf
- pro $absf,0
- mes 5
- mes 9,8
- lal 0
- loi _EM_FSIZE
- zrf _EM_FSIZE
- cmf _EM_FSIZE
- zlt *3
- lal 0
- loi _EM_FSIZE
- bra *4
-3
- lal 0
- loi _EM_FSIZE
- ngf _EM_FSIZE
-4
- ret _EM_FSIZE
- end 0
Index: trunk/minix/lib/ack/libm2/absi.c
===================================================================
--- trunk/minix/lib/ack/libm2/absi.c	(revision 9)
+++ 	(revision )
@@ -1,15 +1,0 @@
-/*
-  (c) copyright 1988 by the Vrije Universiteit, Amsterdam, The Netherlands.
-  See the copyright notice in the ACK home directory, in the file "Copyright".
-*/
-
-/*
-  Module:	integer abs function
-  Author:	Ceriel J.H. Jacobs
-  Version:	$Header: /cvsup/minix/src/lib/ack/libm2/absi.c,v 1.1 2005/10/10 15:27:46 beng Exp $
-*/
-
-absi(i)
-{
-	return i >= 0 ? i : -i;
-}
Index: trunk/minix/lib/ack/libm2/absl.c
===================================================================
--- trunk/minix/lib/ack/libm2/absl.c	(revision 9)
+++ 	(revision )
@@ -1,16 +1,0 @@
-/*
-  (c) copyright 1988 by the Vrije Universiteit, Amsterdam, The Netherlands.
-  See the copyright notice in the ACK home directory, in the file "Copyright".
-*/
-
-/*
-  Module:	longint abs function
-  Author:	Ceriel J.H. Jacobs
-  Version:	$Header: /cvsup/minix/src/lib/ack/libm2/absl.c,v 1.1 2005/10/10 15:27:46 beng Exp $
-*/
-long
-absl(i)
-	long i;
-{
-	return i >= 0 ? i : -i;
-}
Index: trunk/minix/lib/ack/libm2/blockmove.c
===================================================================
--- trunk/minix/lib/ack/libm2/blockmove.c	(revision 9)
+++ 	(revision )
@@ -1,23 +1,0 @@
-/*
-  (c) copyright 1988 by the Vrije Universiteit, Amsterdam, The Netherlands.
-  See the copyright notice in the ACK home directory, in the file "Copyright".
-*/
-
-/*
-  Module:	block moves
-  Author:	Ceriel J.H. Jacobs
-  Version:	$Header: /cvsup/minix/src/lib/ack/libm2/blockmove.c,v 1.1 2005/10/10 15:27:46 beng Exp $
-*/
-
-#if _EM_WSIZE==_EM_PSIZE
-typedef unsigned pcnt;
-#else
-typedef unsigned long pcnt;
-#endif
-
-blockmove(siz, dst, src)
-	pcnt siz;
-	register char *dst, *src;
-{
-	while (siz--) *dst++ = *src++;
-}
Index: trunk/minix/lib/ack/libm2/cap.c
===================================================================
--- trunk/minix/lib/ack/libm2/cap.c	(revision 9)
+++ 	(revision )
@@ -1,18 +1,0 @@
-/*
-  (c) copyright 1988 by the Vrije Universiteit, Amsterdam, The Netherlands.
-  See the copyright notice in the ACK home directory, in the file "Copyright".
-*/
-
-/*
-  Module:	cap; implementation of CAP
-  Author:	Ceriel J.H. Jacobs
-  Version:	$Header: /cvsup/minix/src/lib/ack/libm2/cap.c,v 1.1 2005/10/10 15:27:46 beng Exp $
-*/
-
-cap(u)
-	unsigned u;
-{
-	register unsigned *p = &u;
-
-	if (*p >= 'a' && *p <= 'z') *p += 'A'-'a';
-}
Index: trunk/minix/lib/ack/libm2/catch.c
===================================================================
--- trunk/minix/lib/ack/libm2/catch.c	(revision 9)
+++ 	(revision )
@@ -1,99 +1,0 @@
-/*
-  (c) copyright 1988 by the Vrije Universiteit, Amsterdam, The Netherlands.
-  See the copyright notice in the ACK home directory, in the file "Copyright".
-*/
-
-/*
-  Module:	default modula-2 trap handler
-  Author:	Ceriel J.H. Jacobs
-  Version:	$Header: /cvsup/minix/src/lib/ack/libm2/catch.c,v 1.1 2005/10/10 15:27:46 beng Exp $
-*/
-#include <em_abs.h>
-#include <m2_traps.h>
-#include <signal.h>
-
-static struct errm {
-	int errno;
-	char *errmes;
-} errors[] = {
-	{ EARRAY,	"array bound error"},
-	{ ERANGE,	"range bound error"},
-	{ ESET,		"set bound error"},
-	{ EIOVFL,	"integer overflow"},
-	{ EFOVFL,	"real overflow"},
-	{ EFUNFL,	"real underflow"},
-	{ EIDIVZ,	"divide by 0"},
-	{ EFDIVZ,	"divide by 0.0"},
-	{ EIUND,	"undefined integer"},
-	{ EFUND,	"undefined real"},
-	{ ECONV,	"conversion error"},
-
-	{ ESTACK,	"stack overflow"},
-	{ EHEAP,	"heap overflow"},
-	{ EILLINS,	"illegal instruction"},
-	{ EODDZ,	"illegal size argument"},
-	{ ECASE,	"case error"},
-	{ EMEMFLT,	"addressing non existent memory"},
-	{ EBADPTR,	"bad pointer used"},
-	{ EBADPC,	"program counter out of range"},
-	{ EBADLAE,	"bad argument of lae"},
-	{ EBADMON,	"bad monitor call"},
-	{ EBADLIN,	"argument if LIN too high"},
-	{ EBADGTO,	"GTO descriptor error"},
-
-	{ M2_TOOLARGE,	"stack size of process too large"},
-	{ M2_TOOMANY,	"too many nested traps + handlers"},
-	{ M2_NORESULT,	"no RETURN from function procedure"},
-	{ M2_UOVFL,	"cardinal overflow"},
-	{ M2_FORCH,	"(warning) FOR-loop control variable was changed in the body"},
-	{ M2_UUVFL,	"cardinal underflow"},
-	{ M2_INTERNAL,	"internal error; ask an expert for help"},
-	{ M2_UNIXSIG,	"got a unix signal"},
-	{ -1,		0}
-};
-
-catch(trapno)
-	int trapno;
-{
-	register struct errm *ep = &errors[0];
-	char *errmessage;
-	char buf[20];
-	register char *p, *s;
-
-	while (ep->errno != trapno && ep->errmes != 0) ep++;
-	if (p = ep->errmes) {
-		while (*p) p++;
-		_Traps__Message(ep->errmes, 0, (int) (p - ep->errmes), 1);
-	}
-	else {
-		int i = trapno;
-		static char q[] = "error number xxxxxxxxxxxxx";
-
-		p = &q[13];
-		s = buf;
-		if (i < 0) {
-			i = -i;
-			*p++ = '-';
-		}
-		do
-			*s++ = i % 10 + '0';
-		while (i /= 10);
-		while (s > buf) *p++ = *--s;
-		*p = 0;
-		_Traps__Message(q, 0, (int) (p - q), 1);
-	}
-#if !defined(__em24) && !defined(__em44) && !defined(__em22)
-	if (trapno == M2_UNIXSIG) {
-		extern int __signo;
-		signal(__signo, SIG_DFL);
-		_cleanup();
-		kill(getpid(), __signo);
-		_exit(trapno);
-	}
-#endif
-	if (trapno != M2_FORCH) {
-		_cleanup();
-		_exit(trapno);
-	}
-	SIG(catch);
-}
Index: trunk/minix/lib/ack/libm2/confarray.c
===================================================================
--- trunk/minix/lib/ack/libm2/confarray.c	(revision 9)
+++ 	(revision )
@@ -1,72 +1,0 @@
-/*
-  (c) copyright 1988 by the Vrije Universiteit, Amsterdam, The Netherlands.
-  See the copyright notice in the ACK home directory, in the file "Copyright".
-*/
-
-/*
-  Module:	runtime support for conformant arrays
-  Author:	Ceriel J.H. Jacobs
-  Version:	$Header: /cvsup/minix/src/lib/ack/libm2/confarray.c,v 1.1 2005/10/10 15:27:46 beng Exp $
-*/
-#include <m2_traps.h>
-
-#ifndef EM_WSIZE
-#define EM_WSIZE _EM_WSIZE
-#define EM_PSIZE _EM_PSIZE
-#endif
-
-#if EM_WSIZE==EM_PSIZE
-typedef unsigned pcnt;
-#else
-typedef unsigned long pcnt;
-#endif
-
-struct descr {
-	char *addr;
-	int low;
-	unsigned int highminlow;
-	unsigned int size;
-};
-
-static struct descr *descrs[10];
-static struct descr **ppdescr = descrs;
-
-pcnt
-new_stackptr(pdscr, a)
-	struct descr *pdscr;
-{
-	register struct descr *pdescr = pdscr;
-	pcnt size = (((pdescr->highminlow + 1) * pdescr->size +
-				(EM_WSIZE - 1)) & ~(EM_WSIZE - 1));
-
-	if (ppdescr >= &descrs[10]) {
-		/* to many nested traps + handlers ! */
-		TRP(M2_TOOMANY);
-	}
-	*ppdescr++ = pdescr;
-	if ((char *) &a - (char *) &pdscr > 0) {
-		/* stack grows downwards */
-		return - size;
-	}
-	return size;
-}
-
-copy_array(pp, a)
-	char *pp;
-{
-	register char *p = pp;
-	register char *q;
-	register pcnt sz;
-	char dummy;
-
-	ppdescr--;
-	sz = ((*ppdescr)->highminlow + 1) * (*ppdescr)->size;
-	
-	if ((char *) &a - (char *) &pp > 0) {
-		(*ppdescr)->addr = q = (char *) &a;
-	}
-	else	(*ppdescr)->addr = q = (char *) &a - 
-			((sz + (EM_WSIZE - 1)) & ~ (EM_WSIZE - 1));
-
-	while (sz--) *q++ = *p++;
-}
Index: trunk/minix/lib/ack/libm2/dvi.c
===================================================================
--- trunk/minix/lib/ack/libm2/dvi.c	(revision 9)
+++ 	(revision )
@@ -1,68 +1,0 @@
-/*
-  (c) copyright 1988 by the Vrije Universiteit, Amsterdam, The Netherlands.
-  See the copyright notice in the ACK home directory, in the file "Copyright".
-*/
-
-/*
-  Module:	implementation of DIV and MOD
-  Author:	Ceriel J.H. Jacobs
-  Version:	$Header: /cvsup/minix/src/lib/ack/libm2/dvi.c,v 1.1 2005/10/10 15:27:46 beng Exp $
-  Reason:	We cannot use DVI and RMI, because DVI rounds towards 0
-		and Modula-2 requires truncation
-*/
-
-#include <em_abs.h>
-
-int
-dvi(j,i)
-	int j,i;
-{
-	if (j == 0) TRP(EIDIVZ);
-	if ((i < 0) != (j < 0)) {
-		if (i < 0) i = -i;
-		else j = -j;
-		return -((i+j-1)/j);
-	}
-	else return i/j;
-}
-
-long
-dvil(j,i)
-	long j,i;
-{
-	if (j == 0) TRP(EIDIVZ);
-	if ((i < 0) != (j < 0)) {
-		if (i < 0) i = -i;
-		else j = -j;
-		return -((i+j-1)/j);
-	}
-	else return i/j;
-}
-
-int
-rmi(j,i)
-	int j,i;
-{
-	if (j == 0) TRP(EIDIVZ);
-	if (i == 0) return 0;
-	if ((i < 0) != (j < 0)) {
-		if (i < 0) i = -i;
-		else j = -j;
-		return j*((i+j-1)/j)-i;
-	}
-	else return i%j;
-}
-
-long
-rmil(j,i)
-	long j,i;
-{
-	if (j == 0) TRP(EIDIVZ);
-	if (i == 0) return 0L;
-	if ((i < 0) != (j < 0)) {
-		if (i < 0) i = -i;
-		else j = -j;
-		return j*((i+j-1)/j)-i;
-	}
-	else return i%j;
-}
Index: trunk/minix/lib/ack/libm2/halt.c
===================================================================
--- trunk/minix/lib/ack/libm2/halt.c	(revision 9)
+++ 	(revision )
@@ -1,37 +1,0 @@
-/*
-  (c) copyright 1988 by the Vrije Universiteit, Amsterdam, The Netherlands.
-  See the copyright notice in the ACK home directory, in the file "Copyright".
-*/
-
-/*
-  Module:	program termination routines
-  Author:	Ceriel J.H. Jacobs
-  Version:	$Header: /cvsup/minix/src/lib/ack/libm2/halt.c,v 1.1 2005/10/10 15:27:46 beng Exp $
-*/
-#define MAXPROCS 32
-
-static int callindex = 0;
-static int (*proclist[MAXPROCS])();
-
-_cleanup()
-{
-	while (--callindex >= 0)
-		(*proclist[callindex])();
-	callindex = 0;
-}
-
-CallAtEnd(p)
-	int (*p)();
-{
-	if (callindex >= MAXPROCS) {
-		return 0;
-	}
-	proclist[callindex++] = p;
-	return 1;
-}
-
-halt()
-{
-	_cleanup();
-	_exit(0);
-}
Index: trunk/minix/lib/ack/libm2/head_m2.e
===================================================================
--- trunk/minix/lib/ack/libm2/head_m2.e	(revision 9)
+++ 	(revision )
@@ -1,63 +1,0 @@
-#
-;
-; (c) copyright 1988 by the Vrije Universiteit, Amsterdam, The Netherlands.
-; See the copyright notice in the ACK home directory, in the file "Copyright".
-;
-;
-; Module:	Modula-2 runtime startoff
-; Author:	Ceriel J.H. Jacobs
-; Version:	$Header: /cvsup/minix/src/lib/ack/libm2/head_m2.e,v 1.1 2005/10/10 15:27:46 beng Exp $
-;
-
- mes 2,_EM_WSIZE,_EM_PSIZE
-
- exa handler
- exa argv
- exa argc
- exa MainLB
- exa bkillbss
- exp $catch
- exp $init
- inp $trap_handler
-
-bkillbss
- bss _EM_PSIZE,0,0
-
- exp $_m_a_i_n
- pro $_m_a_i_n, 0
-
- lor 0
- lae MainLB
- sti _EM_PSIZE
-
- lal _EM_WSIZE
- loi _EM_PSIZE
- lae argv		; save argument pointer
- sti _EM_PSIZE
-
- lol 0
- ste argc		; save argument count
-
- lpi $trap_handler
- sig
- asp _EM_PSIZE
- cal $init
- cal $__M2M_
- cal $halt
- loc 0			; should not get here
- ret _EM_WSIZE
- end
-
- pro $trap_handler,0
- lpi $trap_handler
- sig
- lol 0	; trap number
- lae handler
- loi _EM_PSIZE
- lpi $catch
- lae handler
- sti _EM_PSIZE
- cai
- asp _EM_PSIZE+_EM_WSIZE
- rtt
- end 0
Index: trunk/minix/lib/ack/libm2/init.c
===================================================================
--- trunk/minix/lib/ack/libm2/init.c	(revision 9)
+++ 	(revision )
@@ -1,51 +1,0 @@
-/*
-  (c) copyright 1988 by the Vrije Universiteit, Amsterdam, The Netherlands.
-  See the copyright notice in the ACK home directory, in the file "Copyright".
-*/
-
-/*
-  Module:	initialization and some global vars
-  Author:	Ceriel J.H. Jacobs
-  Version:	$Header: /cvsup/minix/src/lib/ack/libm2/init.c,v 1.2 2006/02/17 14:12:47 philip Exp $
-*/
-
-#include <signal.h>
-#include <em_abs.h>
-#include <m2_traps.h>
-
-/* map unix signals onto EM traps */
-init()
-{
-	sigtrp(M2_UNIXSIG, SIGHUP);
-	sigtrp(M2_UNIXSIG, SIGINT);
-	sigtrp(M2_UNIXSIG, SIGQUIT);
-	sigtrp(EILLINS, SIGILL);
-	sigtrp(M2_UNIXSIG, SIGTRAP);
-#ifdef SIGIOT
-	sigtrp(M2_UNIXSIG, SIGIOT);
-#endif
-#if SIGEMT
-	sigtrp(M2_UNIXSIG, SIGEMT);
-#endif
-	sigtrp(M2_UNIXSIG, SIGFPE);
-	sigtrp(M2_UNIXSIG, SIGBUS);
-	sigtrp(M2_UNIXSIG, SIGSEGV);
-#ifdef SIGSYS
-	sigtrp(EBADMON, SIGSYS);
-#endif
-	sigtrp(M2_UNIXSIG, SIGPIPE);
-	sigtrp(M2_UNIXSIG, SIGALRM);
-	sigtrp(M2_UNIXSIG, SIGTERM);
-}
-
-killbss()
-{
-	/* Fill bss with junk?  Make lots of VM pages dirty?  No way! */
-}
-
-extern int catch();
-
-int (*handler)() = catch;
-char **argv;
-int argc;
-char *MainLB;
Index: trunk/minix/lib/ack/libm2/load.c
===================================================================
--- trunk/minix/lib/ack/libm2/load.c	(revision 9)
+++ 	(revision )
@@ -1,45 +1,0 @@
-/*
-  (c) copyright 1988 by the Vrije Universiteit, Amsterdam, The Netherlands.
-  See the copyright notice in the ACK home directory, in the file "Copyright".
-*/
-
-/*
-  Module:	get value on stack, byte by byte
-  Author:	Ceriel J.H. Jacobs
-  Version:	$Header: /cvsup/minix/src/lib/ack/libm2/load.c,v 1.1 2005/10/10 15:27:46 beng Exp $
-*/
-
-#include <m2_traps.h>
-
-#ifndef EM_WSIZE
-#define EM_WSIZE _EM_WSIZE
-#define EM_PSIZE _EM_PSIZE
-#endif
-
-#if EM_WSIZE==EM_PSIZE
-typedef unsigned pcnt;
-#else
-typedef long pcnt;
-#endif
-
-load(siz, addr, p)
-	register char *addr;
-	register pcnt siz;
-{
-	/*	Make sure, that a value with a size that could have been
-		handled by the LOI instruction ends up at the same place,
-		where it would, were the LOI instruction used.
-	*/
-	register char *q = (char *) &p;
-	char t[4];
-
-	if (siz < EM_WSIZE && EM_WSIZE % siz == 0) {
-		/* as long as EM_WSIZE <= 4 ... */
-		if (siz != 2) TRP(M2_INTERNAL);	/* internal error */
-		q = &t[0];
-	}
-	while (siz--) *q++ = *addr++;
-	if (q - t == 2) {
-		*((unsigned *)(&p)) = *((unsigned short *) (&t[0]));
-	}
-}
Index: trunk/minix/lib/ack/libm2/par_misc.e
===================================================================
--- trunk/minix/lib/ack/libm2/par_misc.e	(revision 9)
+++ 	(revision )
@@ -1,175 +1,0 @@
-#
-;
-; (c) copyright 1988 by the Vrije Universiteit, Amsterdam, The Netherlands.
-; See the copyright notice in the ACK home directory, in the file "Copyright".
-;
-
-;
-; Module:	coroutine primitives
-; Author:	Kees Bot, Edwin Scheffer, Ceriel Jacobs
-; Version:	$Header: /cvsup/minix/src/lib/ack/libm2/par_misc.e,v 1.1 2005/10/10 15:27:46 beng Exp $
-;
-
- mes 2,_EM_WSIZE,_EM_PSIZE
-
- ; topsize takes care of two things:
- ; - given a stack-break,
- ;   it computes the size of the chunk of memory needed to save the stack;
- ; - also, if this stack-break = 0, it creates one, assuming that caller is
- ;   the stack-break.
- ;
- ; This implementation assumes a continuous stack growing downwards
-
- exp $topsize
-#ifdef __sparc
- inp $topsize2
- pro $topsize, 0
- mes 11
- zer _EM_PSIZE
- lal 0
- loi _EM_PSIZE
- cal $topsize2
- asp 2*_EM_PSIZE
- lfr _EM_WSIZE
- ret _EM_WSIZE
- end 0
- pro $topsize2, (3*_EM_WSIZE+3*_EM_PSIZE)
-#else
- pro $topsize, (3*_EM_WSIZE+3*_EM_PSIZE)
-#endif
- ; local space for line-number, ignoremask, filename, stack-break, size,
- ; and stack-pointer (see the topsave routine)
- mes 11
- lal 0
- loi _EM_PSIZE
- loi _EM_PSIZE		; stack-break or 0
- zer _EM_PSIZE
- cmp
- zne *1
- lxl 0
- dch			; local base of caller
-#ifdef __sparc
- dch			; because of the extra layer
-#endif
- lal 0
- loi _EM_PSIZE
- sti _EM_PSIZE
-1
- lal 0
- loi _EM_PSIZE
- loi _EM_PSIZE
- lpb			; convert this local base to an argument base.
-			; An implementation of a sort of "topsize" EM
-			; instruction should take a local base, and save
-			; the whole frame.
-
- lor 1			; stack-break  SP
- sbs _EM_WSIZE		; stack-break-SP
- ret _EM_WSIZE		; return size of block to be saved
- end 3*_EM_WSIZE+3*_EM_PSIZE
-
- exp $topsave
-#ifdef __sparc
- inp $topsave2
- pro $topsave,0
- mes 11
- lal 0
- loi 2*_EM_PSIZE
- cal $topsave2
- asp 2*_EM_PSIZE
- lfr _EM_WSIZE
- ret _EM_WSIZE
- end 0
- pro $topsave2,0
-#else
- pro $topsave, 0
-#endif
- mes 11
- loe 0
- lae 4			; load line number and file name
- loi _EM_PSIZE
- lim			; ignore mask
- lor 0			; LB
- lal 0
- loi _EM_PSIZE		; stack-break
- lpb
- lor 1
- sbs _EM_WSIZE
- loc _EM_WSIZE
- adu _EM_WSIZE		; gives size
- dup _EM_WSIZE
- stl 0			; save size
- lor 1			; SP (the SP BEFORE pushing)
- lor 1			; SP (address of stack top to save)
- lal _EM_PSIZE		; area
- loi _EM_PSIZE
- lol 0			; size
- bls _EM_WSIZE		; move whole block
- asp 3*_EM_PSIZE+3*_EM_WSIZE	; remove the lot from the stack
- loc 1
- ret _EM_WSIZE			; return 1
- end 0
-
-sv
- bss _EM_PSIZE,0,0
-
- exp $topload
-#ifdef __sparc
- inp $topload1
- pro $topload,0
- lal 0
- loi _EM_PSIZE
- cal $topload1
- asp _EM_PSIZE
- lfr _EM_WSIZE
- ret _EM_WSIZE
- end 0
- pro $topload1, 0
-#else
- pro $topload, 0
-#endif
- mes 11
-
- lal 0
- loi _EM_PSIZE
- lae sv
- sti _EM_PSIZE		; saved parameter
-
- lxl 0
-2
- dup _EM_PSIZE
- adp -3*_EM_PSIZE
- lal 0
- loi _EM_PSIZE		; compare target SP with current LB to see if we must
- loi _EM_PSIZE
- cmp			; find another LB first
- zgt *1
- dch			; just follow dynamic chain to make sure we find
-			; a legal one
- bra *2
-1
- str 0
-
- lae sv
- loi _EM_PSIZE
- loi _EM_PSIZE		; load indirect to
- str 1			; restore SP
- asp 0-_EM_PSIZE	; to stop int from complaining about non-existent memory
- lae sv
- loi _EM_PSIZE		; source address
- lor 1
- adp _EM_PSIZE		; destination address
- lae sv
- loi _EM_PSIZE
- adp _EM_PSIZE
- loi _EM_WSIZE		; size of block
- bls _EM_WSIZE
- asp _EM_PSIZE+_EM_WSIZE	; drop size + SP
- str 0			; restore local base
- sim			; ignore mask
- lae 4
- sti _EM_PSIZE
- ste 0			; line and file
- loc 0
- ret _EM_WSIZE
- end 0
Index: trunk/minix/lib/ack/libm2/random.mod
===================================================================
--- trunk/minix/lib/ack/libm2/random.mod	(revision 9)
+++ 	(revision )
@@ -1,58 +1,0 @@
-(*
-  (c) copyright 1988 by the Vrije Universiteit, Amsterdam, The Netherlands.
-  See the copyright notice in the ACK home directory, in the file "Copyright".
-*)
-
-(*$R-*)
-IMPLEMENTATION MODULE random;
-(*
-  Module:       random numbers
-  Author:       Ceriel J.H. Jacobs
-  Version:      $Header: /cvsup/minix/src/lib/ack/libm2/random.mod,v 1.1 2005/10/10 15:27:46 beng Exp $
-*)
-
-  FROM	Unix IMPORT	getpid, time;
-  TYPE index = [1..55];
-
-  VAR	X: ARRAY index OF CARDINAL;
-	j, k: index;
-	tm: LONGINT;
-
-  PROCEDURE Random(): CARDINAL;
-  BEGIN
-	IF k-1 <= 0 THEN k := 55; ELSE DEC(k) END;
-	IF j-1 <= 0 THEN j := 55; ELSE DEC(j) END;
-	X[k] := X[k] + X[j];
-	RETURN X[k]
-  END Random;
-
-  PROCEDURE Uniform (lwb, upb: CARDINAL): CARDINAL;
-  BEGIN
-    	IF upb <= lwb THEN RETURN lwb; END;
-    	RETURN lwb + (Random() MOD (upb - lwb + 1));
-  END Uniform;
-
-  PROCEDURE StartSeed(seed: CARDINAL);
-  VAR v: CARDINAL;
-  BEGIN
-	FOR k := 1 TO 55 DO
-		seed := 1297 * seed + 123;
-		X[k] := seed;
-	END;
-	FOR k := 1 TO 15 DO
-		j := tm MOD 55D + 1D;
-		v := X[j];
-		tm := tm DIV 7D;
-		j := tm MOD 55D + 1D;
-		X[j] := v;
-		tm := tm * 3D;
-	END;
-	k := 1;
-	j := 25;
-  END StartSeed;
-
-BEGIN
- 	tm := time(NIL);
-	X[1] := tm;
-	StartSeed(CARDINAL(getpid()) * X[1]);
-END random.
Index: trunk/minix/lib/ack/libm2/rcka.c
===================================================================
--- trunk/minix/lib/ack/libm2/rcka.c	(revision 9)
+++ 	(revision )
@@ -1,25 +1,0 @@
-/*
- * (c) copyright 1988 by the Vrije Universiteit, Amsterdam, The Netherlands.
- * See the copyright notice in the ACK home directory, in the file "Copyright".
- *
- *
- * Module:	range checks for INTEGER, now for array indexing
- * Author:	Ceriel J.H. Jacobs
- * Version:	$Header: /cvsup/minix/src/lib/ack/libm2/rcka.c,v 1.1 2005/10/10 15:27:46 beng Exp $
-*/
-
-#include <em_abs.h>
-
-extern TRP();
-
-struct array_descr {
-  int	lbound;
-  int	n_elts_min_one;
-  unsigned size;
-};
-
-rcka(descr, indx)
-  struct array_descr *descr;
-{
-  if (indx < 0 || indx > descr->n_elts_min_one) TRP(EARRAY);
-}
Index: trunk/minix/lib/ack/libm2/rcki.c
===================================================================
--- trunk/minix/lib/ack/libm2/rcki.c	(revision 9)
+++ 	(revision )
@@ -1,23 +1,0 @@
-/*
- * (c) copyright 1988 by the Vrije Universiteit, Amsterdam, The Netherlands.
- * See the copyright notice in the ACK home directory, in the file "Copyright".
- *
- *
- * Module:	range checks for INTEGER
- * Author:	Ceriel J.H. Jacobs
- * Version:	$Header: /cvsup/minix/src/lib/ack/libm2/rcki.c,v 1.1 2005/10/10 15:27:46 beng Exp $
-*/
-
-#include <em_abs.h>
-
-extern TRP();
-
-struct range_descr {
-  int	low, high;
-};
-
-rcki(descr, val)
-  struct range_descr *descr;
-{
-  if (val < descr->low || val > descr->high) TRP(ERANGE);
-}
Index: trunk/minix/lib/ack/libm2/rckil.c
===================================================================
--- trunk/minix/lib/ack/libm2/rckil.c	(revision 9)
+++ 	(revision )
@@ -1,24 +1,0 @@
-/*
- * (c) copyright 1988 by the Vrije Universiteit, Amsterdam, The Netherlands.
- * See the copyright notice in the ACK home directory, in the file "Copyright".
- *
- *
- * Module:	range checks for LONGINT
- * Author:	Ceriel J.H. Jacobs
- * Version:	$Header: /cvsup/minix/src/lib/ack/libm2/rckil.c,v 1.1 2005/10/10 15:27:46 beng Exp $
-*/
-
-#include <em_abs.h>
-
-extern TRP();
-
-struct range_descr {
-  long	low, high;
-};
-
-rckil(descr, val)
-  struct range_descr *descr;
-  long val;
-{
-  if (val < descr->low || val > descr->high) TRP(ERANGE);
-}
Index: trunk/minix/lib/ack/libm2/rcku.c
===================================================================
--- trunk/minix/lib/ack/libm2/rcku.c	(revision 9)
+++ 	(revision )
@@ -1,24 +1,0 @@
-/*
- * (c) copyright 1988 by the Vrije Universiteit, Amsterdam, The Netherlands.
- * See the copyright notice in the ACK home directory, in the file "Copyright".
- *
- *
- * Module:	range checks for CARDINAL
- * Author:	Ceriel J.H. Jacobs
- * Version:	$Header: /cvsup/minix/src/lib/ack/libm2/rcku.c,v 1.1 2005/10/10 15:27:46 beng Exp $
-*/
-
-#include <em_abs.h>
-
-extern TRP();
-
-struct range_descr {
-  unsigned	low, high;
-};
-
-rcku(descr, val)
-  struct range_descr *descr;
-  unsigned val;
-{
-  if (val < descr->low || val > descr->high) TRP(ERANGE);
-}
Index: trunk/minix/lib/ack/libm2/rckul.c
===================================================================
--- trunk/minix/lib/ack/libm2/rckul.c	(revision 9)
+++ 	(revision )
@@ -1,24 +1,0 @@
-/*
- * (c) copyright 1988 by the Vrije Universiteit, Amsterdam, The Netherlands.
- * See the copyright notice in the ACK home directory, in the file "Copyright".
- *
- *
- * Module:	range checks for LONGCARD
- * Author:	Ceriel J.H. Jacobs
- * Version:	$Header: /cvsup/minix/src/lib/ack/libm2/rckul.c,v 1.1 2005/10/10 15:27:46 beng Exp $
-*/
-
-#include <em_abs.h>
-
-extern TRP();
-
-struct range_descr {
-  unsigned long	low, high;
-};
-
-rckul(descr, val)
-  struct range_descr *descr;
-  unsigned long val;
-{
-  if (val < descr->low || val > descr->high) TRP(ERANGE);
-}
Index: trunk/minix/lib/ack/libm2/sigtrp.c
===================================================================
--- trunk/minix/lib/ack/libm2/sigtrp.c	(revision 9)
+++ 	(revision )
@@ -1,82 +1,0 @@
-/*
-  (c) copyright 1988 by the Vrije Universiteit, Amsterdam, The Netherlands.
-  See the copyright notice in the ACK home directory, in the file "Copyright".
-*/
-
-/*
-  Module:	Mapping of Unix signals to EM traps
-		(only when not using the MON instruction)
-  Author:	Ceriel J.H. Jacobs
-  Version:	$Header: /cvsup/minix/src/lib/ack/libm2/sigtrp.c,v 1.1 2005/10/10 15:27:46 beng Exp $
-*/
-
-#if !defined(__em22) && !defined(__em24) && !defined(__em44)
-
-#define EM_trap(n) TRP(n)	/* define to whatever is needed to cause the trap */
-
-#include <signal.h>
-#include <errno.h>
-
-int __signo;
-
-static int __traps[] = {
- -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2,
- -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2,
- -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2,
-};
-
-static void
-__ctchsig(signo)
-{
-	signal(signo,__ctchsig);
-#ifdef __BSD4_2
-	sigsetmask(sigblock(0) & ~(1<<(signo - 1)));
-#endif
-	__signo = signo;
-	EM_trap(__traps[signo]);
-}
-
-int
-sigtrp(trapno, signo)
-{
-	/*	Let Unix signal signo cause EM trap trapno to occur.
-		If trapno = -2, restore default,
-		If trapno = -3, ignore.
-		Return old trapnumber.
-		Careful, this could be -2 or -3; But return value of -1
-		indicates failure, with error number in errno.
-	*/
-	extern int errno;
-	void (*ctch)() = __ctchsig;
-	void (*oldctch)();
-	int oldtrap;
-
-	if (signo <= 0 || signo >= sizeof(__traps)/sizeof(__traps[0])) {
-		errno = EINVAL;
-		return -1;
-	}
-
-	if (trapno == -3)
-		ctch = SIG_IGN;
-	else if (trapno == -2)
-		ctch = SIG_DFL;
-	else if (trapno >= 0 && trapno <= 252)
-		;
-	else {
-		errno = EINVAL;
-		return -1;
-	}
-
-	oldtrap = __traps[signo];
-
-	if ((oldctch = signal(signo, ctch)) == (void (*)())-1)  /* errno set by signal */
-		return -1;
-	
-	else if (oldctch == SIG_IGN) {
-		signal(signo, SIG_IGN);
-	}
-	else __traps[signo] = trapno;
-
-	return oldtrap;
-}
-#endif
Index: trunk/minix/lib/ack/libm2/stackprio.c
===================================================================
--- trunk/minix/lib/ack/libm2/stackprio.c	(revision 9)
+++ 	(revision )
@@ -1,27 +1,0 @@
-/*
-  (c) copyright 1988 by the Vrije Universiteit, Amsterdam, The Netherlands.
-  See the copyright notice in the ACK home directory, in the file "Copyright".
-*/
-
-/*
-  Module:	Dummy priority routines
-  Author:	Ceriel J.H. Jacobs
-  Version:	$Header: /cvsup/minix/src/lib/ack/libm2/stackprio.c,v 1.1 2005/10/10 15:27:46 beng Exp $
-*/
-
-static unsigned prio = 0;
-
-stackprio(n)
-	unsigned n;
-{
-	unsigned old = prio;
-
-	if (n > prio) prio = n;
-	return old;
-}
-
-unstackprio(n)
-	unsigned n;
-{
-	prio = n;
-}
Index: trunk/minix/lib/ack/libm2/store.c
===================================================================
--- trunk/minix/lib/ack/libm2/store.c	(revision 9)
+++ 	(revision )
@@ -1,43 +1,0 @@
-/*
-  (c) copyright 1988 by the Vrije Universiteit, Amsterdam, The Netherlands.
-  See the copyright notice in the ACK home directory, in the file "Copyright".
-*/
-
-/*
-  Module:	store values from stack, byte by byte
-  Author:	Ceriel J.H. Jacobs
-  Version:	$Header: /cvsup/minix/src/lib/ack/libm2/store.c,v 1.1 2005/10/10 15:27:46 beng Exp $
-*/
-
-#include <m2_traps.h>
-
-#ifndef EM_WSIZE
-#define EM_WSIZE _EM_WSIZE
-#define EM_PSIZE _EM_PSIZE
-#endif
-
-#if EM_WSIZE==EM_PSIZE
-typedef unsigned pcnt;
-#else
-typedef long pcnt;
-#endif
-
-store(siz, addr, p)
-	register char *addr;
-	register pcnt siz;
-{
-	/*	Make sure, that a value with a size that could have been
-		handled by the LOI instruction is handled as if it was
-		loaded with the LOI instruction.
-	*/
-	register char *q = (char *) &p;
-	char t[4];
-
-	if (siz < EM_WSIZE && EM_WSIZE % siz == 0) {
-		/* as long as EM_WSIZE <= 4 ... */
-		if (siz != 2) TRP(M2_INTERNAL);	/* internal error */
-		*((unsigned short *) (&t[0])) = *((unsigned *) q);
-		q = &t[0];
-	}
-	while (siz--) *addr++ = *q++;
-}
Index: trunk/minix/lib/ack/libm2/ucheck.c
===================================================================
--- trunk/minix/lib/ack/libm2/ucheck.c	(revision 9)
+++ 	(revision )
@@ -1,65 +1,0 @@
-/*
- * (c) copyright 1988 by the Vrije Universiteit, Amsterdam, The Netherlands.
- * See the copyright notice in the ACK home directory, in the file "Copyright".
- *
- *
- * Module:	CARDINAL operations with overflow checking
- * Author:	Ceriel J.H. Jacobs
- * Version:	$Header: /cvsup/minix/src/lib/ack/libm2/ucheck.c,v 1.1 2005/10/10 15:27:46 beng Exp $
-*/
-
-#ifndef EM_WSIZE
-#define EM_WSIZE _EM_WSIZE
-#endif
-#ifndef EM_LSIZE
-#define EM_LSIZE _EM_LSIZE
-#endif
-
-#include <m2_traps.h>
-
-#define MAXCARD	((unsigned)-1)
-#if EM_WSIZE < EM_LSIZE
-#define MAXLONGCARD	((unsigned long) -1L)
-#endif
-
-adduchk(a,b)
-  unsigned	a,b;
-{
-  if (MAXCARD - a < b) TRP(M2_UOVFL);
-}
-
-#if EM_WSIZE < EM_LSIZE
-addulchk(a,b)
-  unsigned long	a,b;
-{
-  if (MAXLONGCARD - a < b) TRP(M2_UOVFL);
-}
-#endif
-
-muluchk(a,b)
-  unsigned	a,b;
-{
-  if (a != 0 && MAXCARD/a < b) TRP(M2_UOVFL);
-}
-
-#if EM_WSIZE < EM_LSIZE
-mululchk(a,b)
-  unsigned long	a,b;
-{
-  if (a != 0 && MAXLONGCARD/a < b) TRP(M2_UOVFL);
-}
-#endif
-
-subuchk(a,b)
-  unsigned	a,b;
-{
-  if (b < a) TRP(M2_UUVFL);
-}
-
-#if EM_WSIZE < EM_LSIZE
-subulchk(a,b)
-  unsigned long	a,b;
-{
-  if (b < a) TRP(M2_UUVFL);
-}
-#endif
Index: trunk/minix/lib/ack/libp/Makedepend-ack
===================================================================
--- trunk/minix/lib/ack/libp/Makedepend-ack	(revision 9)
+++ 	(revision )
@@ -1,76 +1,0 @@
-depend-ack:
-	rm .depend-ack
-	touch .depend-ack
-	mkdep 'cc -O -I../h -wo -E' abi.c | sed -e 's:^\(.\):../../obj-ack//./ack/libp/\1:' >> .depend-ack
-	mkdep 'cc -O -I../h -wo -E' abl.c | sed -e 's:^\(.\):../../obj-ack//./ack/libp/\1:' >> .depend-ack
-	mkdep 'cc -O -I../h -wo -E' abr.c | sed -e 's:^\(.\):../../obj-ack//./ack/libp/\1:' >> .depend-ack
-	mkdep 'cc -O -I../h -wo -E' arg.c | sed -e 's:^\(.\):../../obj-ack//./ack/libp/\1:' >> .depend-ack
-	mkdep 'cc -O -I../h -wo -E' ass.c | sed -e 's:^\(.\):../../obj-ack//./ack/libp/\1:' >> .depend-ack
-	mkdep 'cc -O -I../h -wo -E' asz.c | sed -e 's:^\(.\):../../obj-ack//./ack/libp/\1:' >> .depend-ack
-	mkdep 'cc -O -I../h -wo -E' atn.c | sed -e 's:^\(.\):../../obj-ack//./ack/libp/\1:' >> .depend-ack
-	mkdep 'cc -O -I../h -wo -E' bcp.c | sed -e 's:^\(.\):../../obj-ack//./ack/libp/\1:' >> .depend-ack
-	mkdep 'cc -O -I../h -wo -E' bts.e | sed -e 's:^\(.\):../../obj-ack//./ack/libp/\1:' >> .depend-ack
-	mkdep 'cc -O -I../h -wo -E' buff.c | sed -e 's:^\(.\):../../obj-ack//./ack/libp/\1:' >> .depend-ack
-	mkdep 'cc -O -I../h -wo -E' catch.c | sed -e 's:^\(.\):../../obj-ack//./ack/libp/\1:' >> .depend-ack
-	mkdep 'cc -O -I../h -wo -E' clock.c | sed -e 's:^\(.\):../../obj-ack//./ack/libp/\1:' >> .depend-ack
-	mkdep 'cc -O -I../h -wo -E' cls.c | sed -e 's:^\(.\):../../obj-ack//./ack/libp/\1:' >> .depend-ack
-	mkdep 'cc -O -I../h -wo -E' cvt.c | sed -e 's:^\(.\):../../obj-ack//./ack/libp/\1:' >> .depend-ack
-	mkdep 'cc -O -I../h -wo -E' diag.c | sed -e 's:^\(.\):../../obj-ack//./ack/libp/\1:' >> .depend-ack
-	mkdep 'cc -O -I../h -wo -E' dis.c | sed -e 's:^\(.\):../../obj-ack//./ack/libp/\1:' >> .depend-ack
-	mkdep 'cc -O -I../h -wo -E' efl.c | sed -e 's:^\(.\):../../obj-ack//./ack/libp/\1:' >> .depend-ack
-	mkdep 'cc -O -I../h -wo -E' eln.c | sed -e 's:^\(.\):../../obj-ack//./ack/libp/\1:' >> .depend-ack
-	mkdep 'cc -O -I../h -wo -E' encaps.e | sed -e 's:^\(.\):../../obj-ack//./ack/libp/\1:' >> .depend-ack
-	mkdep 'cc -O -I../h -wo -E' exp.c | sed -e 's:^\(.\):../../obj-ack//./ack/libp/\1:' >> .depend-ack
-	mkdep 'cc -O -I../h -wo -E' fef.e | sed -e 's:^\(.\):../../obj-ack//./ack/libp/\1:' >> .depend-ack
-	mkdep 'cc -O -I../h -wo -E' fif.e | sed -e 's:^\(.\):../../obj-ack//./ack/libp/\1:' >> .depend-ack
-	mkdep 'cc -O -I../h -wo -E' get.c | sed -e 's:^\(.\):../../obj-ack//./ack/libp/\1:' >> .depend-ack
-	mkdep 'cc -O -I../h -wo -E' gto.e | sed -e 's:^\(.\):../../obj-ack//./ack/libp/\1:' >> .depend-ack
-	mkdep 'cc -O -I../h -wo -E' head_pc.e | sed -e 's:^\(.\):../../obj-ack//./ack/libp/\1:' >> .depend-ack
-	mkdep 'cc -O -I../h -wo -E' hlt.c | sed -e 's:^\(.\):../../obj-ack//./ack/libp/\1:' >> .depend-ack
-	mkdep 'cc -O -I../h -wo -E' hol0.e | sed -e 's:^\(.\):../../obj-ack//./ack/libp/\1:' >> .depend-ack
-	mkdep 'cc -O -I../h -wo -E' incpt.c | sed -e 's:^\(.\):../../obj-ack//./ack/libp/\1:' >> .depend-ack
-	mkdep 'cc -O -I../h -wo -E' ini.c | sed -e 's:^\(.\):../../obj-ack//./ack/libp/\1:' >> .depend-ack
-	mkdep 'cc -O -I../h -wo -E' log.c | sed -e 's:^\(.\):../../obj-ack//./ack/libp/\1:' >> .depend-ack
-	mkdep 'cc -O -I../h -wo -E' mdi.c | sed -e 's:^\(.\):../../obj-ack//./ack/libp/\1:' >> .depend-ack
-	mkdep 'cc -O -I../h -wo -E' mdl.c | sed -e 's:^\(.\):../../obj-ack//./ack/libp/\1:' >> .depend-ack
-	mkdep 'cc -O -I../h -wo -E' new.c | sed -e 's:^\(.\):../../obj-ack//./ack/libp/\1:' >> .depend-ack
-	mkdep 'cc -O -I../h -wo -E' nfa.c | sed -e 's:^\(.\):../../obj-ack//./ack/libp/\1:' >> .depend-ack
-	mkdep 'cc -O -I../h -wo -E' nobuff.c | sed -e 's:^\(.\):../../obj-ack//./ack/libp/\1:' >> .depend-ack
-	mkdep 'cc -O -I../h -wo -E' notext.c | sed -e 's:^\(.\):../../obj-ack//./ack/libp/\1:' >> .depend-ack
-	mkdep 'cc -O -I../h -wo -E' opn.c | sed -e 's:^\(.\):../../obj-ack//./ack/libp/\1:' >> .depend-ack
-	mkdep 'cc -O -I../h -wo -E' outcpt.c | sed -e 's:^\(.\):../../obj-ack//./ack/libp/\1:' >> .depend-ack
-	mkdep 'cc -O -I../h -wo -E' pac.c | sed -e 's:^\(.\):../../obj-ack//./ack/libp/\1:' >> .depend-ack
-	mkdep 'cc -O -I../h -wo -E' pclose.c | sed -e 's:^\(.\):../../obj-ack//./ack/libp/\1:' >> .depend-ack
-	mkdep 'cc -O -I../h -wo -E' pcreat.c | sed -e 's:^\(.\):../../obj-ack//./ack/libp/\1:' >> .depend-ack
-	mkdep 'cc -O -I../h -wo -E' pentry.c | sed -e 's:^\(.\):../../obj-ack//./ack/libp/\1:' >> .depend-ack
-	mkdep 'cc -O -I../h -wo -E' perrno.c | sed -e 's:^\(.\):../../obj-ack//./ack/libp/\1:' >> .depend-ack
-	mkdep 'cc -O -I../h -wo -E' pexit.c | sed -e 's:^\(.\):../../obj-ack//./ack/libp/\1:' >> .depend-ack
-	mkdep 'cc -O -I../h -wo -E' popen.c | sed -e 's:^\(.\):../../obj-ack//./ack/libp/\1:' >> .depend-ack
-	mkdep 'cc -O -I../h -wo -E' put.c | sed -e 's:^\(.\):../../obj-ack//./ack/libp/\1:' >> .depend-ack
-	mkdep 'cc -O -I../h -wo -E' rcka.c | sed -e 's:^\(.\):../../obj-ack//./ack/libp/\1:' >> .depend-ack
-	mkdep 'cc -O -I../h -wo -E' rdc.c | sed -e 's:^\(.\):../../obj-ack//./ack/libp/\1:' >> .depend-ack
-	mkdep 'cc -O -I../h -wo -E' rdi.c | sed -e 's:^\(.\):../../obj-ack//./ack/libp/\1:' >> .depend-ack
-	mkdep 'cc -O -I../h -wo -E' rdl.c | sed -e 's:^\(.\):../../obj-ack//./ack/libp/\1:' >> .depend-ack
-	mkdep 'cc -O -I../h -wo -E' rdr.c | sed -e 's:^\(.\):../../obj-ack//./ack/libp/\1:' >> .depend-ack
-	mkdep 'cc -O -I../h -wo -E' rf.c | sed -e 's:^\(.\):../../obj-ack//./ack/libp/\1:' >> .depend-ack
-	mkdep 'cc -O -I../h -wo -E' rln.c | sed -e 's:^\(.\):../../obj-ack//./ack/libp/\1:' >> .depend-ack
-	mkdep 'cc -O -I../h -wo -E' rnd.c | sed -e 's:^\(.\):../../obj-ack//./ack/libp/\1:' >> .depend-ack
-	mkdep 'cc -O -I../h -wo -E' sav.e | sed -e 's:^\(.\):../../obj-ack//./ack/libp/\1:' >> .depend-ack
-	mkdep 'cc -O -I../h -wo -E' sig.e | sed -e 's:^\(.\):../../obj-ack//./ack/libp/\1:' >> .depend-ack
-	mkdep 'cc -O -I../h -wo -E' sin.c | sed -e 's:^\(.\):../../obj-ack//./ack/libp/\1:' >> .depend-ack
-	mkdep 'cc -O -I../h -wo -E' sqt.c | sed -e 's:^\(.\):../../obj-ack//./ack/libp/\1:' >> .depend-ack
-	mkdep 'cc -O -I../h -wo -E' string.c | sed -e 's:^\(.\):../../obj-ack//./ack/libp/\1:' >> .depend-ack
-	mkdep 'cc -O -I../h -wo -E' trap.e | sed -e 's:^\(.\):../../obj-ack//./ack/libp/\1:' >> .depend-ack
-	mkdep 'cc -O -I../h -wo -E' trp.e | sed -e 's:^\(.\):../../obj-ack//./ack/libp/\1:' >> .depend-ack
-	mkdep 'cc -O -I../h -wo -E' unp.c | sed -e 's:^\(.\):../../obj-ack//./ack/libp/\1:' >> .depend-ack
-	mkdep 'cc -O -I../h -wo -E' uread.c | sed -e 's:^\(.\):../../obj-ack//./ack/libp/\1:' >> .depend-ack
-	mkdep 'cc -O -I../h -wo -E' uwrite.c | sed -e 's:^\(.\):../../obj-ack//./ack/libp/\1:' >> .depend-ack
-	mkdep 'cc -O -I../h -wo -E' wdw.c | sed -e 's:^\(.\):../../obj-ack//./ack/libp/\1:' >> .depend-ack
-	mkdep 'cc -O -I../h -wo -E' wf.c | sed -e 's:^\(.\):../../obj-ack//./ack/libp/\1:' >> .depend-ack
-	mkdep 'cc -O -I../h -wo -E' wrc.c | sed -e 's:^\(.\):../../obj-ack//./ack/libp/\1:' >> .depend-ack
-	mkdep 'cc -O -I../h -wo -E' wrf.c | sed -e 's:^\(.\):../../obj-ack//./ack/libp/\1:' >> .depend-ack
-	mkdep 'cc -O -I../h -wo -E' wri.c | sed -e 's:^\(.\):../../obj-ack//./ack/libp/\1:' >> .depend-ack
-	mkdep 'cc -O -I../h -wo -E' wrl.c | sed -e 's:^\(.\):../../obj-ack//./ack/libp/\1:' >> .depend-ack
-	mkdep 'cc -O -I../h -wo -E' wrr.c | sed -e 's:^\(.\):../../obj-ack//./ack/libp/\1:' >> .depend-ack
-	mkdep 'cc -O -I../h -wo -E' wrs.c | sed -e 's:^\(.\):../../obj-ack//./ack/libp/\1:' >> .depend-ack
-	mkdep 'cc -O -I../h -wo -E' wrz.c | sed -e 's:^\(.\):../../obj-ack//./ack/libp/\1:' >> .depend-ack
Index: trunk/minix/lib/ack/libp/Makedepend-gnu
===================================================================
--- trunk/minix/lib/ack/libp/Makedepend-gnu	(revision 9)
+++ 	(revision )
@@ -1,3 +1,0 @@
-depend-gnu:
-	rm .depend-gnu
-	touch .depend-gnu
Index: trunk/minix/lib/ack/libp/Makefile
===================================================================
--- trunk/minix/lib/ack/libp/Makefile	(revision 9)
+++ 	(revision )
@@ -1,256 +1,0 @@
-#Generated from ./ack/libp/Makefile.in
-all: all-ack
-
-all-ack:
-all-gnu:
-
-makefiles: Makefile
-Makedepend-ack Makedepend-gnu: 
-	sh ../../generate.sh ./ack/libp ../../obj-ack/ ../../obj-gnu
-
-Makefile: Makefile.in Makedepend-ack Makedepend-gnu
-	sh ../../generate.sh ./ack/libp ../../obj-ack/ ../../obj-gnu
-	@echo
-	@echo *Attention*
-	@echo Makefile is regenerated... rerun command to see changes
-	@echo *Attention*
-	@echo
-
-depend: depend-ack
-all-ack: ../../obj-ack//libp.a
-
-../../obj-ack//libp.a: ../../obj-ack//libp.a(abi.o)
-../../obj-ack//libp.a: ../../obj-ack//libp.a(abl.o)
-../../obj-ack//libp.a: ../../obj-ack//libp.a(abr.o)
-../../obj-ack//libp.a: ../../obj-ack//libp.a(arg.o)
-../../obj-ack//libp.a: ../../obj-ack//libp.a(ass.o)
-../../obj-ack//libp.a: ../../obj-ack//libp.a(asz.o)
-../../obj-ack//libp.a: ../../obj-ack//libp.a(atn.o)
-../../obj-ack//libp.a: ../../obj-ack//libp.a(bcp.o)
-../../obj-ack//libp.a: ../../obj-ack//libp.a(bts.o)
-../../obj-ack//libp.a: ../../obj-ack//libp.a(buff.o)
-../../obj-ack//libp.a: ../../obj-ack//libp.a(catch.o)
-../../obj-ack//libp.a: ../../obj-ack//libp.a(clock.o)
-../../obj-ack//libp.a: ../../obj-ack//libp.a(cls.o)
-../../obj-ack//libp.a: ../../obj-ack//libp.a(cvt.o)
-../../obj-ack//libp.a: ../../obj-ack//libp.a(diag.o)
-../../obj-ack//libp.a: ../../obj-ack//libp.a(dis.o)
-../../obj-ack//libp.a: ../../obj-ack//libp.a(efl.o)
-../../obj-ack//libp.a: ../../obj-ack//libp.a(eln.o)
-../../obj-ack//libp.a: ../../obj-ack//libp.a(encaps.o)
-../../obj-ack//libp.a: ../../obj-ack//libp.a(exp.o)
-../../obj-ack//libp.a: ../../obj-ack//libp.a(fef.o)
-../../obj-ack//libp.a: ../../obj-ack//libp.a(fif.o)
-../../obj-ack//libp.a: ../../obj-ack//libp.a(get.o)
-../../obj-ack//libp.a: ../../obj-ack//libp.a(gto.o)
-../../obj-ack//libp.a: ../../obj-ack//libp.a(head_pc.o)
-../../obj-ack//libp.a: ../../obj-ack//libp.a(hlt.o)
-../../obj-ack//libp.a: ../../obj-ack//libp.a(hol0.o)
-../../obj-ack//libp.a: ../../obj-ack//libp.a(incpt.o)
-../../obj-ack//libp.a: ../../obj-ack//libp.a(ini.o)
-../../obj-ack//libp.a: ../../obj-ack//libp.a(log.o)
-../../obj-ack//libp.a: ../../obj-ack//libp.a(mdi.o)
-../../obj-ack//libp.a: ../../obj-ack//libp.a(mdl.o)
-../../obj-ack//libp.a: ../../obj-ack//libp.a(new.o)
-../../obj-ack//libp.a: ../../obj-ack//libp.a(nfa.o)
-../../obj-ack//libp.a: ../../obj-ack//libp.a(nobuff.o)
-../../obj-ack//libp.a: ../../obj-ack//libp.a(notext.o)
-../../obj-ack//libp.a: ../../obj-ack//libp.a(opn.o)
-../../obj-ack//libp.a: ../../obj-ack//libp.a(outcpt.o)
-../../obj-ack//libp.a: ../../obj-ack//libp.a(pac.o)
-../../obj-ack//libp.a: ../../obj-ack//libp.a(pclose.o)
-../../obj-ack//libp.a: ../../obj-ack//libp.a(pcreat.o)
-../../obj-ack//libp.a: ../../obj-ack//libp.a(pentry.o)
-../../obj-ack//libp.a: ../../obj-ack//libp.a(perrno.o)
-../../obj-ack//libp.a: ../../obj-ack//libp.a(pexit.o)
-../../obj-ack//libp.a: ../../obj-ack//libp.a(popen.o)
-../../obj-ack//libp.a: ../../obj-ack//libp.a(put.o)
-../../obj-ack//libp.a: ../../obj-ack//libp.a(rcka.o)
-../../obj-ack//libp.a: ../../obj-ack//libp.a(rdc.o)
-../../obj-ack//libp.a: ../../obj-ack//libp.a(rdi.o)
-../../obj-ack//libp.a: ../../obj-ack//libp.a(rdl.o)
-../../obj-ack//libp.a: ../../obj-ack//libp.a(rdr.o)
-../../obj-ack//libp.a: ../../obj-ack//libp.a(rf.o)
-../../obj-ack//libp.a: ../../obj-ack//libp.a(rln.o)
-../../obj-ack//libp.a: ../../obj-ack//libp.a(rnd.o)
-../../obj-ack//libp.a: ../../obj-ack//libp.a(sav.o)
-../../obj-ack//libp.a: ../../obj-ack//libp.a(sig.o)
-../../obj-ack//libp.a: ../../obj-ack//libp.a(sin.o)
-../../obj-ack//libp.a: ../../obj-ack//libp.a(sqt.o)
-../../obj-ack//libp.a: ../../obj-ack//libp.a(string.o)
-../../obj-ack//libp.a: ../../obj-ack//libp.a(trap.o)
-../../obj-ack//libp.a: ../../obj-ack//libp.a(trp.o)
-../../obj-ack//libp.a: ../../obj-ack//libp.a(unp.o)
-../../obj-ack//libp.a: ../../obj-ack//libp.a(uread.o)
-../../obj-ack//libp.a: ../../obj-ack//libp.a(uwrite.o)
-../../obj-ack//libp.a: ../../obj-ack//libp.a(wdw.o)
-../../obj-ack//libp.a: ../../obj-ack//libp.a(wf.o)
-../../obj-ack//libp.a: ../../obj-ack//libp.a(wrc.o)
-../../obj-ack//libp.a: ../../obj-ack//libp.a(wrf.o)
-../../obj-ack//libp.a: ../../obj-ack//libp.a(wri.o)
-../../obj-ack//libp.a: ../../obj-ack//libp.a(wrl.o)
-../../obj-ack//libp.a: ../../obj-ack//libp.a(wrr.o)
-../../obj-ack//libp.a: ../../obj-ack//libp.a(wrs.o)
-../../obj-ack//libp.a: ../../obj-ack//libp.a(wrz.o)
-
-../../obj-ack//libp.a:
-	ar cr ../../obj-ack//libp.a ../../obj-ack//./ack/libp/*.o
-	rm ../../obj-ack//./ack/libp/*.o
-
-../../obj-ack//libp.a(abi.o): abi.c
-	cc -O -I../h -wo -c -o ../../obj-ack//./ack/libp/abi.o abi.c
-../../obj-ack//libp.a(abl.o): abl.c
-	cc -O -I../h -wo -c -o ../../obj-ack//./ack/libp/abl.o abl.c
-../../obj-ack//libp.a(abr.o): abr.c
-	cc -O -I../h -wo -c -o ../../obj-ack//./ack/libp/abr.o abr.c
-../../obj-ack//libp.a(arg.o): arg.c
-	cc -O -I../h -wo -c -o ../../obj-ack//./ack/libp/arg.o arg.c
-../../obj-ack//libp.a(ass.o): ass.c
-	cc -O -I../h -wo -c -o ../../obj-ack//./ack/libp/ass.o ass.c
-../../obj-ack//libp.a(asz.o): asz.c
-	cc -O -I../h -wo -c -o ../../obj-ack//./ack/libp/asz.o asz.c
-../../obj-ack//libp.a(atn.o): atn.c
-	cc -O -I../h -wo -c -o ../../obj-ack//./ack/libp/atn.o atn.c
-../../obj-ack//libp.a(bcp.o): bcp.c
-	cc -O -I../h -wo -c -o ../../obj-ack//./ack/libp/bcp.o bcp.c
-../../obj-ack//libp.a(bts.o): bts.e
-	cc -O -I../h -wo -c -o ../../obj-ack//./ack/libp/bts.o bts.e
-../../obj-ack//libp.a(buff.o): buff.c
-	cc -O -I../h -wo -c -o ../../obj-ack//./ack/libp/buff.o buff.c
-../../obj-ack//libp.a(catch.o): catch.c
-	cc -O -I../h -wo -c -o ../../obj-ack//./ack/libp/catch.o catch.c
-../../obj-ack//libp.a(clock.o): clock.c
-	cc -O -I../h -wo -c -o ../../obj-ack//./ack/libp/clock.o clock.c
-../../obj-ack//libp.a(cls.o): cls.c
-	cc -O -I../h -wo -c -o ../../obj-ack//./ack/libp/cls.o cls.c
-../../obj-ack//libp.a(cvt.o): cvt.c
-	cc -O -I../h -wo -c -o ../../obj-ack//./ack/libp/cvt.o cvt.c
-../../obj-ack//libp.a(diag.o): diag.c
-	cc -O -I../h -wo -c -o ../../obj-ack//./ack/libp/diag.o diag.c
-../../obj-ack//libp.a(dis.o): dis.c
-	cc -O -I../h -wo -c -o ../../obj-ack//./ack/libp/dis.o dis.c
-../../obj-ack//libp.a(efl.o): efl.c
-	cc -O -I../h -wo -c -o ../../obj-ack//./ack/libp/efl.o efl.c
-../../obj-ack//libp.a(eln.o): eln.c
-	cc -O -I../h -wo -c -o ../../obj-ack//./ack/libp/eln.o eln.c
-../../obj-ack//libp.a(encaps.o): encaps.e
-	cc -O -I../h -wo -c -o ../../obj-ack//./ack/libp/encaps.o encaps.e
-../../obj-ack//libp.a(exp.o): exp.c
-	cc -O -I../h -wo -c -o ../../obj-ack//./ack/libp/exp.o exp.c
-../../obj-ack//libp.a(fef.o): fef.e
-	cc -O -I../h -wo -c -o ../../obj-ack//./ack/libp/fef.o fef.e
-../../obj-ack//libp.a(fif.o): fif.e
-	cc -O -I../h -wo -c -o ../../obj-ack//./ack/libp/fif.o fif.e
-../../obj-ack//libp.a(get.o): get.c
-	cc -O -I../h -wo -c -o ../../obj-ack//./ack/libp/get.o get.c
-../../obj-ack//libp.a(gto.o): gto.e
-	cc -O -I../h -wo -c -o ../../obj-ack//./ack/libp/gto.o gto.e
-../../obj-ack//libp.a(head_pc.o): head_pc.e
-	cc -O -I../h -wo -c -o ../../obj-ack//./ack/libp/head_pc.o head_pc.e
-../../obj-ack//libp.a(hlt.o): hlt.c
-	cc -O -I../h -wo -c -o ../../obj-ack//./ack/libp/hlt.o hlt.c
-../../obj-ack//libp.a(hol0.o): hol0.e
-	cc -O -I../h -wo -c -o ../../obj-ack//./ack/libp/hol0.o hol0.e
-../../obj-ack//libp.a(incpt.o): incpt.c
-	cc -O -I../h -wo -c -o ../../obj-ack//./ack/libp/incpt.o incpt.c
-../../obj-ack//libp.a(ini.o): ini.c
-	cc -O -I../h -wo -c -o ../../obj-ack//./ack/libp/ini.o ini.c
-../../obj-ack//libp.a(log.o): log.c
-	cc -O -I../h -wo -c -o ../../obj-ack//./ack/libp/log.o log.c
-../../obj-ack//libp.a(mdi.o): mdi.c
-	cc -O -I../h -wo -c -o ../../obj-ack//./ack/libp/mdi.o mdi.c
-../../obj-ack//libp.a(mdl.o): mdl.c
-	cc -O -I../h -wo -c -o ../../obj-ack//./ack/libp/mdl.o mdl.c
-../../obj-ack//libp.a(new.o): new.c
-	cc -O -I../h -wo -c -o ../../obj-ack//./ack/libp/new.o new.c
-../../obj-ack//libp.a(nfa.o): nfa.c
-	cc -O -I../h -wo -c -o ../../obj-ack//./ack/libp/nfa.o nfa.c
-../../obj-ack//libp.a(nobuff.o): nobuff.c
-	cc -O -I../h -wo -c -o ../../obj-ack//./ack/libp/nobuff.o nobuff.c
-../../obj-ack//libp.a(notext.o): notext.c
-	cc -O -I../h -wo -c -o ../../obj-ack//./ack/libp/notext.o notext.c
-../../obj-ack//libp.a(opn.o): opn.c
-	cc -O -I../h -wo -c -o ../../obj-ack//./ack/libp/opn.o opn.c
-../../obj-ack//libp.a(outcpt.o): outcpt.c
-	cc -O -I../h -wo -c -o ../../obj-ack//./ack/libp/outcpt.o outcpt.c
-../../obj-ack//libp.a(pac.o): pac.c
-	cc -O -I../h -wo -c -o ../../obj-ack//./ack/libp/pac.o pac.c
-../../obj-ack//libp.a(pclose.o): pclose.c
-	cc -O -I../h -wo -c -o ../../obj-ack//./ack/libp/pclose.o pclose.c
-../../obj-ack//libp.a(pcreat.o): pcreat.c
-	cc -O -I../h -wo -c -o ../../obj-ack//./ack/libp/pcreat.o pcreat.c
-../../obj-ack//libp.a(pentry.o): pentry.c
-	cc -O -I../h -wo -c -o ../../obj-ack//./ack/libp/pentry.o pentry.c
-../../obj-ack//libp.a(perrno.o): perrno.c
-	cc -O -I../h -wo -c -o ../../obj-ack//./ack/libp/perrno.o perrno.c
-../../obj-ack//libp.a(pexit.o): pexit.c
-	cc -O -I../h -wo -c -o ../../obj-ack//./ack/libp/pexit.o pexit.c
-../../obj-ack//libp.a(popen.o): popen.c
-	cc -O -I../h -wo -c -o ../../obj-ack//./ack/libp/popen.o popen.c
-../../obj-ack//libp.a(put.o): put.c
-	cc -O -I../h -wo -c -o ../../obj-ack//./ack/libp/put.o put.c
-../../obj-ack//libp.a(rcka.o): rcka.c
-	cc -O -I../h -wo -c -o ../../obj-ack//./ack/libp/rcka.o rcka.c
-../../obj-ack//libp.a(rdc.o): rdc.c
-	cc -O -I../h -wo -c -o ../../obj-ack//./ack/libp/rdc.o rdc.c
-../../obj-ack//libp.a(rdi.o): rdi.c
-	cc -O -I../h -wo -c -o ../../obj-ack//./ack/libp/rdi.o rdi.c
-../../obj-ack//libp.a(rdl.o): rdl.c
-	cc -O -I../h -wo -c -o ../../obj-ack//./ack/libp/rdl.o rdl.c
-../../obj-ack//libp.a(rdr.o): rdr.c
-	cc -O -I../h -wo -c -o ../../obj-ack//./ack/libp/rdr.o rdr.c
-../../obj-ack//libp.a(rf.o): rf.c
-	cc -O -I../h -wo -c -o ../../obj-ack//./ack/libp/rf.o rf.c
-../../obj-ack//libp.a(rln.o): rln.c
-	cc -O -I../h -wo -c -o ../../obj-ack//./ack/libp/rln.o rln.c
-../../obj-ack//libp.a(rnd.o): rnd.c
-	cc -O -I../h -wo -c -o ../../obj-ack//./ack/libp/rnd.o rnd.c
-../../obj-ack//libp.a(sav.o): sav.e
-	cc -O -I../h -wo -c -o ../../obj-ack//./ack/libp/sav.o sav.e
-../../obj-ack//libp.a(sig.o): sig.e
-	cc -O -I../h -wo -c -o ../../obj-ack//./ack/libp/sig.o sig.e
-../../obj-ack//libp.a(sin.o): sin.c
-	cc -O -I../h -wo -c -o ../../obj-ack//./ack/libp/sin.o sin.c
-../../obj-ack//libp.a(sqt.o): sqt.c
-	cc -O -I../h -wo -c -o ../../obj-ack//./ack/libp/sqt.o sqt.c
-../../obj-ack//libp.a(string.o): string.c
-	cc -O -I../h -wo -c -o ../../obj-ack//./ack/libp/string.o string.c
-../../obj-ack//libp.a(trap.o): trap.e
-	cc -O -I../h -wo -c -o ../../obj-ack//./ack/libp/trap.o trap.e
-../../obj-ack//libp.a(trp.o): trp.e
-	cc -O -I../h -wo -c -o ../../obj-ack//./ack/libp/trp.o trp.e
-../../obj-ack//libp.a(unp.o): unp.c
-	cc -O -I../h -wo -c -o ../../obj-ack//./ack/libp/unp.o unp.c
-../../obj-ack//libp.a(uread.o): uread.c
-	cc -O -I../h -wo -c -o ../../obj-ack//./ack/libp/uread.o uread.c
-../../obj-ack//libp.a(uwrite.o): uwrite.c
-	cc -O -I../h -wo -c -o ../../obj-ack//./ack/libp/uwrite.o uwrite.c
-../../obj-ack//libp.a(wdw.o): wdw.c
-	cc -O -I../h -wo -c -o ../../obj-ack//./ack/libp/wdw.o wdw.c
-../../obj-ack//libp.a(wf.o): wf.c
-	cc -O -I../h -wo -c -o ../../obj-ack//./ack/libp/wf.o wf.c
-../../obj-ack//libp.a(wrc.o): wrc.c
-	cc -O -I../h -wo -c -o ../../obj-ack//./ack/libp/wrc.o wrc.c
-../../obj-ack//libp.a(wrf.o): wrf.c
-	cc -O -I../h -wo -c -o ../../obj-ack//./ack/libp/wrf.o wrf.c
-../../obj-ack//libp.a(wri.o): wri.c
-	cc -O -I../h -wo -c -o ../../obj-ack//./ack/libp/wri.o wri.c
-../../obj-ack//libp.a(wrl.o): wrl.c
-	cc -O -I../h -wo -c -o ../../obj-ack//./ack/libp/wrl.o wrl.c
-../../obj-ack//libp.a(wrr.o): wrr.c
-	cc -O -I../h -wo -c -o ../../obj-ack//./ack/libp/wrr.o wrr.c
-../../obj-ack//libp.a(wrs.o): wrs.c
-	cc -O -I../h -wo -c -o ../../obj-ack//./ack/libp/wrs.o wrs.c
-../../obj-ack//libp.a(wrz.o): wrz.c
-	cc -O -I../h -wo -c -o ../../obj-ack//./ack/libp/wrz.o wrz.c
-
-
-
-clean::
-	rm -f ../../obj-ack//./ack/libp/*
-
-include Makedepend-ack
-include .depend-ack
-
-include Makedepend-gnu
-include .depend-gnu
Index: trunk/minix/lib/ack/libp/Makefile.in
===================================================================
--- trunk/minix/lib/ack/libp/Makefile.in	(revision 9)
+++ 	(revision )
@@ -1,83 +1,0 @@
-# Makefile for lib/ack/libp.
-
-CFLAGS="-O -I../h -wo"
-#CC1	= $(CC) $(CFLAGS) -c
-
-LIBRARIES=libp
-
-libp_FILES=" \
-	abi.c \
-	abl.c \
-	abr.c \
-	arg.c \
-	ass.c \
-	asz.c \
-	atn.c \
-	bcp.c \
-	bts.e \
-	buff.c \
-	catch.c \
-	clock.c \
-	cls.c \
-	cvt.c \
-	diag.c \
-	dis.c \
-	efl.c \
-	eln.c \
-	encaps.e \
-	exp.c \
-	fef.e \
-	fif.e \
-	get.c \
-	gto.e \
-	head_pc.e \
-	hlt.c \
-	hol0.e \
-	incpt.c \
-	ini.c \
-	log.c \
-	mdi.c \
-	mdl.c \
-	new.c \
-	nfa.c \
-	nobuff.c \
-	notext.c \
-	opn.c \
-	outcpt.c \
-	pac.c \
-	pclose.c \
-	pcreat.c \
-	pentry.c \
-	perrno.c \
-	pexit.c \
-	popen.c \
-	put.c \
-	rcka.c \
-	rdc.c \
-	rdi.c \
-	rdl.c \
-	rdr.c \
-	rf.c \
-	rln.c \
-	rnd.c \
-	sav.e \
-	sig.e \
-	sin.c \
-	sqt.c \
-	string.c \
-	trap.e \
-	trp.e \
-	unp.c \
-	uread.c \
-	uwrite.c \
-	wdw.c \
-	wf.c \
-	wrc.c \
-	wrf.c \
-	wri.c \
-	wrl.c \
-	wrr.c \
-	wrs.c \
-	wrz.c"
-
-TYPE=ack
Index: trunk/minix/lib/ack/libp/abi.c
===================================================================
--- trunk/minix/lib/ack/libp/abi.c	(revision 9)
+++ 	(revision )
@@ -1,23 +1,0 @@
-/* $Header: /cvsup/minix/src/lib/ack/libp/abi.c,v 1.1 2005/10/10 15:27:46 beng Exp $ */
-/*
- * (c) copyright 1983 by the Vrije Universiteit, Amsterdam, The Netherlands.
- *
- *          This product is part of the Amsterdam Compiler Kit.
- *
- * Permission to use, sell, duplicate or disclose this software must be
- * obtained in writing. Requests for such permissions may be sent to
- *
- *      Dr. Andrew S. Tanenbaum
- *      Wiskundig Seminarium
- *      Vrije Universiteit
- *      Postbox 7161
- *      1007 MC Amsterdam
- *      The Netherlands
- *
- */
-
-/* Author: J.W. Stevenson */
-
-int _abi(i) int i; {
-	return(i>=0 ? i : -i);
-}
Index: trunk/minix/lib/ack/libp/abl.c
===================================================================
--- trunk/minix/lib/ack/libp/abl.c	(revision 9)
+++ 	(revision )
@@ -1,23 +1,0 @@
-/* $Header: /cvsup/minix/src/lib/ack/libp/abl.c,v 1.1 2005/10/10 15:27:46 beng Exp $ */
-/*
- * (c) copyright 1983 by the Vrije Universiteit, Amsterdam, The Netherlands.
- *
- *          This product is part of the Amsterdam Compiler Kit.
- *
- * Permission to use, sell, duplicate or disclose this software must be
- * obtained in writing. Requests for such permissions may be sent to
- *
- *      Dr. Andrew S. Tanenbaum
- *      Wiskundig Seminarium
- *      Vrije Universiteit
- *      Postbox 7161
- *      1007 MC Amsterdam
- *      The Netherlands
- *
- */
-
-/* Author: J.W. Stevenson */
-
-long _abl(i) long i; {
-	return(i>=0 ? i : -i);
-}
Index: trunk/minix/lib/ack/libp/abr.c
===================================================================
--- trunk/minix/lib/ack/libp/abr.c	(revision 9)
+++ 	(revision )
@@ -1,23 +1,0 @@
-/* $Header: /cvsup/minix/src/lib/ack/libp/abr.c,v 1.1 2005/10/10 15:27:46 beng Exp $ */
-/*
- * (c) copyright 1983 by the Vrije Universiteit, Amsterdam, The Netherlands.
- *
- *          This product is part of the Amsterdam Compiler Kit.
- *
- * Permission to use, sell, duplicate or disclose this software must be
- * obtained in writing. Requests for such permissions may be sent to
- *
- *      Dr. Andrew S. Tanenbaum
- *      Wiskundig Seminarium
- *      Vrije Universiteit
- *      Postbox 7161
- *      1007 MC Amsterdam
- *      The Netherlands
- *
- */
-
-/* Author: J.W. Stevenson */
-
-double _abr(r) double r; {
-	return(r>=0 ? r : -r);
-}
Index: trunk/minix/lib/ack/libp/arg.c
===================================================================
--- trunk/minix/lib/ack/libp/arg.c	(revision 9)
+++ 	(revision )
@@ -1,56 +1,0 @@
-/* $Header: /cvsup/minix/src/lib/ack/libp/arg.c,v 1.1 2005/10/10 15:27:46 beng Exp $ */
-/*
- * (c) copyright 1983 by the Vrije Universiteit, Amsterdam, The Netherlands.
- *
- *          This product is part of the Amsterdam Compiler Kit.
- *
- * Permission to use, sell, duplicate or disclose this software must be
- * obtained in writing. Requests for such permissions may be sent to
- *
- *      Dr. Andrew S. Tanenbaum
- *      Wiskundig Seminarium
- *      Vrije Universiteit
- *      Postbox 7161
- *      1007 MC Amsterdam
- *      The Netherlands
- *
- */
-
-/* Author: J.W. Stevenson */
-
-/* function argc:integer; extern; */
-/* function argv(i:integer):string; extern; */
-/* procedure argshift; extern; */
-/* function environ(i:integer):string; extern; */
-
-extern int	_pargc;
-extern char	**_pargv;
-extern char	***_penviron;
-
-int argc() {
-	return(_pargc);
-}
-
-char *argv(i) {
-	if (i >= _pargc)
-		return(0);
-	return(_pargv[i]);
-}
-
-argshift() {
-
-	if (_pargc > 1) {
-		--_pargc;
-		_pargv++;
-	}
-}
-
-char *environ(i) {
-	char **p; char *q;
-
-	if (p = *_penviron)
-		while (q = *p++)
-			if (i-- < 0)
-				return(q);
-	return(0);
-}
Index: trunk/minix/lib/ack/libp/ass.c
===================================================================
--- trunk/minix/lib/ack/libp/ass.c	(revision 9)
+++ 	(revision )
@@ -1,33 +1,0 @@
-/* $Header: /cvsup/minix/src/lib/ack/libp/ass.c,v 1.1 2005/10/10 15:27:46 beng Exp $ */
-/*
- * (c) copyright 1983 by the Vrije Universiteit, Amsterdam, The Netherlands.
- *
- *          This product is part of the Amsterdam Compiler Kit.
- *
- * Permission to use, sell, duplicate or disclose this software must be
- * obtained in writing. Requests for such permissions may be sent to
- *
- *      Dr. Andrew S. Tanenbaum
- *      Wiskundig Seminarium
- *      Vrije Universiteit
- *      Postbox 7161
- *      1007 MC Amsterdam
- *      The Netherlands
- *
- */
-
-/* Author: J.W. Stevenson */
-
-#include	<em_abs.h>
-#include	<pc_err.h>
-
-extern char	*_hol0();
-extern		_trp();
-
-_ass(line,bool) int line,bool; {
-
-	if (bool==0) {
-		LINO = line;
-		_trp(EASS);
-	}
-}
Index: trunk/minix/lib/ack/libp/asz.c
===================================================================
--- trunk/minix/lib/ack/libp/asz.c	(revision 9)
+++ 	(revision )
@@ -1,29 +1,0 @@
-/* $Header: /cvsup/minix/src/lib/ack/libp/asz.c,v 1.1 2005/10/10 15:27:46 beng Exp $ */
-/*
- * (c) copyright 1983 by the Vrije Universiteit, Amsterdam, The Netherlands.
- *
- *          This product is part of the Amsterdam Compiler Kit.
- *
- * Permission to use, sell, duplicate or disclose this software must be
- * obtained in writing. Requests for such permissions may be sent to
- *
- *      Dr. Andrew S. Tanenbaum
- *      Wiskundig Seminarium
- *      Vrije Universiteit
- *      Postbox 7161
- *      1007 MC Amsterdam
- *      The Netherlands
- *
- */
-
-/* Author: J.W. Stevenson */
-
-struct descr {
-	int	low;
-	int	diff;
-	int	size;
-};
-
-int _asz(dp) struct descr *dp; {
-	return(dp->size * (dp->diff + 1));
-}
Index: trunk/minix/lib/ack/libp/atn.c
===================================================================
--- trunk/minix/lib/ack/libp/atn.c	(revision 9)
+++ 	(revision )
@@ -1,72 +1,0 @@
-/*
- * (c) copyright 1988 by the Vrije Universiteit, Amsterdam, The Netherlands.
- * See the copyright notice in the ACK home directory, in the file "Copyright".
- *
- * Author: Ceriel J.H. Jacobs
- */
-
-/* $Header: /cvsup/minix/src/lib/ack/libp/atn.c,v 1.1 2005/10/10 15:27:46 beng Exp $ */
-
-#define __NO_DEFS
-#include <math.h>
-
-#if __STDC__
-#include <pc_math.h>
-#endif
-
-double
-_atn(x)
-	double x;
-{
-	/*	Algorithm and coefficients from:
-			"Software manual for the elementary functions"
-			by W.J. Cody and W. Waite, Prentice-Hall, 1980
-	*/
-
-	static double p[] = {
-		-0.13688768894191926929e+2,
-		-0.20505855195861651981e+2,
-		-0.84946240351320683534e+1,
-		-0.83758299368150059274e+0
-	};
-	static double q[] = {
-		 0.41066306682575781263e+2,
-		 0.86157349597130242515e+2,
-		 0.59578436142597344465e+2,
-		 0.15024001160028576121e+2,
-		 1.0
-	};
-	static double a[] = {
-		0.0,
-		0.52359877559829887307710723554658381,	/* pi/6 */
-		M_PI_2,
-		1.04719755119659774615421446109316763	/* pi/3 */
-	};
-
-	int	neg = x < 0;
-	int	n;
-	double	g;
-
-	if (neg) {
-		x = -x;
-	}
-	if (x > 1.0) {
-		x = 1.0/x;
-		n = 2;
-	}
-	else	n = 0;
-
-	if (x > 0.26794919243112270647) {	/* 2-sqtr(3) */
-		n = n + 1;
-		x = (((0.73205080756887729353*x-0.5)-0.5)+x)/
-			(1.73205080756887729353+x);
-	}
-
-	/* ??? avoid underflow ??? */
-
-	g = x * x;
-	x += x * g * POLYNOM3(g, p) / POLYNOM4(g, q);
-	if (n > 1) x = -x;
-	x += a[n];
-	return neg ? -x : x;
-}
Index: trunk/minix/lib/ack/libp/bcp.c
===================================================================
--- trunk/minix/lib/ack/libp/bcp.c	(revision 9)
+++ 	(revision )
@@ -1,30 +1,0 @@
-/* $Header: /cvsup/minix/src/lib/ack/libp/bcp.c,v 1.1 2005/10/10 15:27:46 beng Exp $ */
-/*
- * (c) copyright 1983 by the Vrije Universiteit, Amsterdam, The Netherlands.
- *
- *          This product is part of the Amsterdam Compiler Kit.
- *
- * Permission to use, sell, duplicate or disclose this software must be
- * obtained in writing. Requests for such permissions may be sent to
- *
- *      Dr. Andrew S. Tanenbaum
- *      Wiskundig Seminarium
- *      Vrije Universiteit
- *      Postbox 7161
- *      1007 MC Amsterdam
- *      The Netherlands
- *
- */
-
-/* Author: J.W. Stevenson */
-
-int _bcp(sz,y,x) int sz; unsigned char *y,*x; {
-
-	while (--sz >= 0) {
-		if (*x < *y)
-			return(-1);
-		if (*x++ > *y++)
-			return(1);
-	}
-	return(0);
-}
Index: trunk/minix/lib/ack/libp/bts.e
===================================================================
--- trunk/minix/lib/ack/libp/bts.e	(revision 9)
+++ 	(revision )
@@ -1,56 +1,0 @@
-#
-; $Header: /cvsup/minix/src/lib/ack/libp/bts.e,v 1.1 2005/10/10 15:27:46 beng Exp $
-;
-; (c) copyright 1983 by the Vrije Universiteit, Amsterdam, The Netherlands.
-;
-;          This product is part of the Amsterdam Compiler Kit.
-;
-; Permission to use, sell, duplicate or disclose this software must be
-; obtained in writing. Requests for such permissions may be sent to
-;
-;      Dr. Andrew S. Tanenbaum
-;      Wiskundig Seminarium
-;      Vrije Universiteit
-;      Postbox 7161
-;      1007 MC Amsterdam
-;      The Netherlands
-;
-; 
-
-; Author: J.W. Stevenson */
-
- mes 2,_EM_WSIZE,_EM_PSIZE
-
-#define	SIZE	0
-#define	HIGH	_EM_WSIZE
-#define	LOWB	2*_EM_WSIZE
-#define	BASE	3*_EM_WSIZE
-
-; _bts is called with four parameters:
-;	- the initial set (BASE)
-;	- low bound of range of bits (LOWB)
-;	- high bound of range of bits (HIGH)
-;	- set size in bytes (SIZE)
-
- exp $_bts
- pro $_bts,0
- lal BASE	; address of initial set
- lol SIZE
- los _EM_WSIZE	; load initial set
-1
- lol LOWB	; low bound
- lol HIGH	; high bound
- bgt *2		; while low <= high
- lol LOWB
- lol SIZE
- set ?		; create [low]
- lol SIZE
- ior ?		; merge with initial set
- inl LOWB	; increment low bound
- bra *1		; loop back
-2
- lal BASE
- lol SIZE
- sts _EM_WSIZE	; store result over initial set
- ret 0
- end ?
Index: trunk/minix/lib/ack/libp/buff.c
===================================================================
--- trunk/minix/lib/ack/libp/buff.c	(revision 9)
+++ 	(revision )
@@ -1,35 +1,0 @@
-/* $Header: /cvsup/minix/src/lib/ack/libp/buff.c,v 1.1 2005/10/10 15:27:46 beng Exp $ */
-/*
- * (c) copyright 1983 by the Vrije Universiteit, Amsterdam, The Netherlands.
- *
- *          This product is part of the Amsterdam Compiler Kit.
- *
- * Permission to use, sell, duplicate or disclose this software must be
- * obtained in writing. Requests for such permissions may be sent to
- *
- *      Dr. Andrew S. Tanenbaum
- *      Wiskundig Seminarium
- *      Vrije Universiteit
- *      Postbox 7161
- *      1007 MC Amsterdam
- *      The Netherlands
- *
- */
-
-/* Author: J.W. Stevenson */
-
-#include	<pc_file.h>
-
-extern		_flush();
-
-/* procedure buff(var f:file of ?); */
-
-buff(f) struct file *f; {
-	int sz;
-
-	if ((f->flags & (0377|WRBIT)) != (MAGIC|WRBIT))
-		return;
-	_flush(f);
-	sz = f->size;
-	f->count = f->buflen = (sz>PC_BUFLEN ? sz : PC_BUFLEN-PC_BUFLEN%sz);
-}
Index: trunk/minix/lib/ack/libp/catch.c
===================================================================
--- trunk/minix/lib/ack/libp/catch.c	(revision 9)
+++ 	(revision )
@@ -1,154 +1,0 @@
-/* $Header: /cvsup/minix/src/lib/ack/libp/catch.c,v 1.1 2005/10/10 15:27:46 beng Exp $ */
-/*
- * (c) copyright 1983 by the Vrije Universiteit, Amsterdam, The Netherlands.
- *
- *          This product is part of the Amsterdam Compiler Kit.
- *
- * Permission to use, sell, duplicate or disclose this software must be
- * obtained in writing. Requests for such permissions may be sent to
- *
- *      Dr. Andrew S. Tanenbaum
- *      Wiskundig Seminarium
- *      Vrije Universiteit
- *      Postbox 7161
- *      1007 MC Amsterdam
- *      The Netherlands
- *
- */
-
-#include	<em_abs.h>
-#include	<pc_err.h>
-#include	<pc_file.h>
-
-/* to make it easier to patch ... */
-extern struct file	*_curfil;
-
-static struct errm {
-	int errno;
-	char *errmes;
-} errors[] = {
-	{ EARRAY,	"array bound error"},
-	{ ERANGE,	"range bound error"},
-	{ ESET,		"set bound error"},
-	{ EIOVFL,	"integer overflow"},
-	{ EFOVFL,	"real overflow"},
-	{ EFUNFL,	"real underflow"},
-	{ EIDIVZ,	"divide by 0"},
-	{ EFDIVZ,	"divide by 0.0"},
-	{ EIUND,	"undefined integer"},
-	{ EFUND,	"undefined real"},
-	{ ECONV,	"conversion error"},
-
-	{ ESTACK,	"stack overflow"},
-	{ EHEAP,	"heap overflow"},
-	{ EILLINS,	"illegal instruction"},
-	{ EODDZ,	"illegal size argument"},
-	{ ECASE,	"case error"},
-	{ EMEMFLT,	"addressing non existent memory"},
-	{ EBADPTR,	"bad pointer used"},
-	{ EBADPC,	"program counter out of range"},
-	{ EBADLAE,	"bad argument of lae"},
-	{ EBADMON,	"bad monitor call"},
-	{ EBADLIN,	"argument if LIN too high"},
-	{ EBADGTO,	"GTO descriptor error"},
-
-	{ EARGC,	"more args expected" },
-	{ EEXP,		"error in exp" },
-	{ ELOG,		"error in ln" },
-	{ ESQT,		"error in sqrt" },
-	{ EASS,		"assertion failed" },
-	{ EPACK,	"array bound error in pack" },
-	{ EUNPACK,	"array bound error in unpack" },
-	{ EMOD,		"only positive j in 'i mod j'" },
-	{ EBADF,	"file not yet open" },
-	{ EFREE,	"dispose error" },
-	{ EFUNASS,	"function not assigned" },
-	{ EWIDTH,	"illegal field width" },
-
-	{ EWRITEF,	"not writable" },
-	{ EREADF,	"not readable" },
-	{ EEOF,		"end of file" },
-	{ EFTRUNC,	"truncated" },
-	{ ERESET,	"reset error" },
-	{ EREWR,	"rewrite error" },
-	{ ECLOSE,	"close error" },
-	{ EREAD,	"read error" },
-	{ EWRITE,	"write error" },
-	{ EDIGIT,	"digit expected" },
-	{ EASCII,	"non-ASCII char read" },
-	{ -1,		0}
-};
-
-extern int		_pargc;
-extern char		**_pargv;
-extern char		***_penviron;
-
-extern char		*_hol0();
-extern			_trp();
-extern			_exit();
-extern int		_write();
-
-_catch(erno) unsigned erno; {
-	register struct errm *ep = &errors[0];
-	char *p,*q,*s,**qq;
-	char buf[20];
-	unsigned i;
-	int j = erno;
-	char *pp[11];
-	char xbuf[100];
-
-	qq = pp;
-	if (p = FILN)
-		*qq++ = p;
-	else
-		*qq++ = _pargv[0];
-
-	while (ep->errno != erno && ep->errmes != 0) ep++;
-	p = buf;
-	s = xbuf;
-	if (i = LINO) {
-		*qq++ = ", ";
-		do
-			*p++ = i % 10 + '0';
-		while (i /= 10);
-		while (p > buf) *s++ = *--p;
-	}
-	*s++ = ':';
-	*s++ = ' ';
-	*s++ = '\0';
-	*qq++ = xbuf;
-	if ((erno & ~037) == 0140 && (_curfil->flags&0377)==MAGIC) { 
-		/* file error */
-		*qq++ = "file ";
-		*qq++ = _curfil->fname;
-		*qq++ = ": ";
-	}
-	if (ep->errmes) *qq++ = ep->errmes;
-	else {
-		*qq++ = "error number ";
-		*qq++ = s;
-		p = buf;
-		if (j < 0) {
-			j = -j;
-			*s++ = '-';
-		}
-		do
-			*p++ = j % 10 + '0';
-		while (j /= 10);
-		while (p > buf) *s++ = *--p;
-		*s = 0;
-	}
-	*qq++ = "\n";
-	*qq = 0;
-	qq = pp;
-	while (q = *qq++) {
-		p = q;
-		while (*p)
-			p++;
-		if (_write(2,q,(int)(p-q)) < 0)
-			;
-	}
-	_exit(erno);
-error:
-	_trp(erno);
-}
Index: trunk/minix/lib/ack/libp/clock.c
===================================================================
--- trunk/minix/lib/ack/libp/clock.c	(revision 9)
+++ 	(revision )
@@ -1,47 +1,0 @@
-/* $Header: /cvsup/minix/src/lib/ack/libp/clock.c,v 1.1 2005/10/10 15:27:46 beng Exp $ */
-/*
- * (c) copyright 1983 by the Vrije Universiteit, Amsterdam, The Netherlands.
- *
- *          This product is part of the Amsterdam Compiler Kit.
- *
- * Permission to use, sell, duplicate or disclose this software must be
- * obtained in writing. Requests for such permissions may be sent to
- *
- *      Dr. Andrew S. Tanenbaum
- *      Wiskundig Seminarium
- *      Vrije Universiteit
- *      Postbox 7161
- *      1007 MC Amsterdam
- *      The Netherlands
- *
- */
-
-/* Author: J.W. Stevenson */
-
-/* function clock:integer; extern; */
-
-extern int	_times();
-
-struct tbuf {
-	long	utime;
-	long	stime;
-	long	cutime;
-	long	cstime;
-};
-
-#ifndef EM_WSIZE
-#define EM_WSIZE _EM_WSIZE
-#endif
-
-int clock() {
-	struct tbuf t;
-
-	_times(&t);
-	return( (int)(t.utime + t.stime) &
-#if EM_WSIZE <= 2
-	077777
-#else
-	0x7fffffffL
-#endif
-	);
-}
Index: trunk/minix/lib/ack/libp/cls.c
===================================================================
--- trunk/minix/lib/ack/libp/cls.c	(revision 9)
+++ 	(revision )
@@ -1,67 +1,0 @@
-/* $Header: /cvsup/minix/src/lib/ack/libp/cls.c,v 1.1 2005/10/10 15:27:46 beng Exp $ */
-/*
- * (c) copyright 1983 by the Vrije Universiteit, Amsterdam, The Netherlands.
- *
- *          This product is part of the Amsterdam Compiler Kit.
- *
- * Permission to use, sell, duplicate or disclose this software must be
- * obtained in writing. Requests for such permissions may be sent to
- *
- *      Dr. Andrew S. Tanenbaum
- *      Wiskundig Seminarium
- *      Vrije Universiteit
- *      Postbox 7161
- *      1007 MC Amsterdam
- *      The Netherlands
- *
- */
-
-/* Author: J.W. Stevenson */
-
-#include	<pc_file.h>
-#include	<pc_err.h>
-
-extern struct file	*_curfil;
-extern			_trp();
-extern			_flush();
-extern			_outcpt();
-extern int		_close();
-
-_xcls(f) struct file *f; {
-
-	if ((f->flags & WRBIT) == 0)
-		return;
-	if ((f->flags & (TXTBIT|ELNBIT)) == TXTBIT) {
-#ifdef CPM
-		*f->ptr = '\r';
-		_outcpt(f);
-#endif
-		*f->ptr = '\n';
-		_outcpt(f);
-	}
-	_flush(f);
-}
-
-_cls(f) struct file *f; {
-#ifdef MAYBE
-	char *p;
-#endif
-
-	_curfil = f;
-	if ((f->flags&0377) != MAGIC)
-		return;
-#ifdef MAYBE
-	p = f->bufadr;
-	if (f->ptr < p)
-		return;
-	if (f->buflen <= 0)
-		return;
-	p += f->buflen;
-	if (f->ptr >= p)
-		return;
-#endif
-	_xcls(f);
-	if (_close(f->ufd) != 0)
-		_trp(ECLOSE);
-	f->flags = 0;
-}
Index: trunk/minix/lib/ack/libp/cvt.c
===================================================================
--- trunk/minix/lib/ack/libp/cvt.c	(revision 9)
+++ 	(revision )
@@ -1,119 +1,0 @@
-/* $Header: /cvsup/minix/src/lib/ack/libp/cvt.c,v 1.1 2005/10/10 15:27:46 beng Exp $ */
-#ifndef NOFLOAT
-
-#if __STDC__
-#include <float.h>
-#else
-#include <math.h>
-#define DBL_MAX	M_MAX_D
-#endif
-
-static char *cvt();
-#define NDIGITS	128
-
-char *
-_ecvt(value, ndigit, decpt, sign)
-	double value;
-	int ndigit, *decpt, *sign;
-{
-	return cvt(value, ndigit, decpt, sign, 1);
-}
-
-char *
-_fcvt(value, ndigit, decpt, sign)
-	double value;
-	int ndigit, *decpt, *sign;
-{
-	return cvt(value, ndigit, decpt, sign, 0);
-}
-
-static struct powers_of_10 {
-	double pval;
-	double rpval;
-	int exp;
-} p10[] = {
-	1.0e32, 1.0e-32, 32,
-	1.0e16, 1.0e-16, 16,
-	1.0e8, 1.0e-8, 8,
-	1.0e4, 1.0e-4, 4,
-	1.0e2, 1.0e-2, 2,
-	1.0e1, 1.0e-1, 1,
-	1.0e0, 1.0e0, 0
-};
-
-static char *
-cvt(value, ndigit, decpt, sign, ecvtflag)
-	double value;
-	int ndigit, *decpt, *sign;
-{
-	static char buf[NDIGITS+1];
-	register char *p = buf;
-	register char *pe;
-
-	if (ndigit < 0) ndigit = 0;
-	if (ndigit > NDIGITS) ndigit = NDIGITS;
-	pe = &buf[ndigit];
-	buf[0] = '\0';
-
-	*sign = 0;
-	if (value < 0) {
-		*sign = 1;
-		value = -value;
-	}
-
-	*decpt = 0;
-	if (value >= DBL_MAX) {
-		value = DBL_MAX;
-	}
-	if (value != 0.0) {
-		register struct powers_of_10 *pp = &p10[0];
-
-		if (value >= 10.0) do {
-			while (value >= pp->pval) {
-				value *= pp->rpval;
-				*decpt += pp->exp;
-			}
-		} while ((++pp)->exp > 0);
-
-		pp = &p10[0];
-		if (value < 1.0) do {
-			while (value * pp->pval < 10.0) {
-				value *= pp->pval;
-				*decpt -= pp->exp;
-			}
-		} while ((++pp)->exp > 0);
-
-		(*decpt)++;	/* because now value in [1.0, 10.0) */
-	}
-	if (! ecvtflag) {
-		/* for fcvt() we need ndigit digits behind the dot */
-		pe += *decpt;
-		if (pe > &buf[NDIGITS]) pe = &buf[NDIGITS];
-	}
-	while (p <= pe) {
-		*p++ = (int)value + '0';
-		value = 10.0 * (value - (int)value);
-	}
-	if (pe >= buf) {
-		p = pe;
-		*p += 5;	/* round of at the end */
-		while (*p > '9') {
-			*p = '0';
-			if (p > buf) ++*--p;
-			else {
-				*p = '1';
-				++*decpt;
-				if (! ecvtflag) {
-					/* maybe add another digit at the end,
-					   because the point was shifted right
-					*/
-					if (pe > buf) *pe = '0';
-					pe++;
-				}
-			}
-		}
-		*pe = '\0';
-	}
-	return buf;
-}
-#endif
Index: trunk/minix/lib/ack/libp/diag.c
===================================================================
--- trunk/minix/lib/ack/libp/diag.c	(revision 9)
+++ 	(revision )
@@ -1,34 +1,0 @@
-/* $Header: /cvsup/minix/src/lib/ack/libp/diag.c,v 1.1 2005/10/10 15:27:46 beng Exp $ */
-/*
- * (c) copyright 1983 by the Vrije Universiteit, Amsterdam, The Netherlands.
- *
- *          This product is part of the Amsterdam Compiler Kit.
- *
- * Permission to use, sell, duplicate or disclose this software must be
- * obtained in writing. Requests for such permissions may be sent to
- *
- *      Dr. Andrew S. Tanenbaum
- *      Wiskundig Seminarium
- *      Vrije Universiteit
- *      Postbox 7161
- *      1007 MC Amsterdam
- *      The Netherlands
- *
- */
-
-/* Author: J.W. Stevenson */
-
-#include	<pc_file.h>
-
-/* procedure diag(var f:text); */
-
-diag(f) struct file *f; {
-
-	f->ptr = f->bufadr;
-	f->flags = WRBIT|EOFBIT|ELNBIT|TXTBIT|MAGIC;
-	f->fname = "DIAG";
-	f->ufd = 2;
-	f->size = 1;
-	f->count = 1;
-	f->buflen = 1;
-}
Index: trunk/minix/lib/ack/libp/dis.c
===================================================================
--- trunk/minix/lib/ack/libp/dis.c	(revision 9)
+++ 	(revision )
@@ -1,87 +1,0 @@
-/* $Header: /cvsup/minix/src/lib/ack/libp/dis.c,v 1.1 2005/10/10 15:27:46 beng Exp $ */
-/*
- * (c) copyright 1983 by the Vrije Universiteit, Amsterdam, The Netherlands.
- *
- *          This product is part of the Amsterdam Compiler Kit.
- *
- * Permission to use, sell, duplicate or disclose this software must be
- * obtained in writing. Requests for such permissions may be sent to
- *
- *      Dr. Andrew S. Tanenbaum
- *      Wiskundig Seminarium
- *      Vrije Universiteit
- *      Postbox 7161
- *      1007 MC Amsterdam
- *      The Netherlands
- *
- */
-
-/* Author: J.W. Stevenson */
-
-#include	<pc_err.h>
-
-#define assert()	/* nothing */
-
-/*
- * use circular list of free blocks from low to high addresses
- * _highp points to free block with highest address
- */
-struct adm {
-	struct adm	*next;
-	int		size;
-};
-
-extern struct adm	*_lastp;
-extern struct adm	*_highp;
-extern			_trp();
-
-static int merge(p1,p2) struct adm *p1,*p2; {
-	struct adm *p;
-
-	p = (struct adm *)((char *)p1 + p1->size);
-	if (p > p2)
-		_trp(EFREE);
-	if (p != p2)
-		return(0);
-	p1->size += p2->size;
-	p1->next = p2->next;
-	return(1);
-}
-
-_dis(n,pp) int n; struct adm **pp; {
-	struct adm *p1,*p2;
-
-	/*
-	 * NOTE: dispose only objects whose size is a multiple of sizeof(*pp).
-	 *       this is always true for objects allocated by _new()
-	 */
-	n = ((n+sizeof(*p1)-1) / sizeof(*p1)) * sizeof(*p1);
-	if (n == 0)
-		return;
-	if ((p1= *pp) == (struct adm *) 0)
-		_trp(EFREE);
-	p1->size = n;
-	if ((p2 = _highp) == 0)  /*p1 is the only free block*/
-		p1->next = p1;
-	else {
-		if (p2 > p1) {
-			/*search for the preceding free block*/
-			if (_lastp < p1)  /*reduce search*/
-				p2 = _lastp;
-			while (p2->next < p1)
-				p2 = p2->next;
-		}
-		/* if p2 preceeds p1 in the circular list,
-		 * try to merge them			*/
-		p1->next = p2->next; p2->next = p1;
-		if (p2 <= p1 && merge(p2,p1))
-			p1 = p2;
-		p2 = p1->next;
-		/* p1 preceeds p2 in the circular list */
-		if (p2 > p1) merge(p1,p2);
-	}
-	if (p1 >= p1->next)
-		_highp = p1;
-	_lastp = p1;
-	*pp = (struct adm *) 0;
-}
Index: trunk/minix/lib/ack/libp/efl.c
===================================================================
--- trunk/minix/lib/ack/libp/efl.c	(revision 9)
+++ 	(revision )
@@ -1,36 +1,0 @@
-/* $Header: /cvsup/minix/src/lib/ack/libp/efl.c,v 1.1 2005/10/10 15:27:46 beng Exp $ */
-/*
- * (c) copyright 1983 by the Vrije Universiteit, Amsterdam, The Netherlands.
- *
- *          This product is part of the Amsterdam Compiler Kit.
- *
- * Permission to use, sell, duplicate or disclose this software must be
- * obtained in writing. Requests for such permissions may be sent to
- *
- *      Dr. Andrew S. Tanenbaum
- *      Wiskundig Seminarium
- *      Vrije Universiteit
- *      Postbox 7161
- *      1007 MC Amsterdam
- *      The Netherlands
- *
- */
-
-/* Author: J.W. Stevenson */
-
-#include	<pc_file.h>
-#include	<pc_err.h>
-
-extern struct file	*_curfil;
-extern			_trp();
-extern			_incpt();
-
-int _efl(f) struct file *f; {
-
-	_curfil = f;
-	if ((f->flags & 0377) != MAGIC)
-		_trp(EBADF);
-	if ((f->flags & (WINDOW|WRBIT|EOFBIT)) == 0)
-		_incpt(f);
-	return((f->flags & EOFBIT) != 0);
-}
Index: trunk/minix/lib/ack/libp/eln.c
===================================================================
--- trunk/minix/lib/ack/libp/eln.c	(revision 9)
+++ 	(revision )
@@ -1,33 +1,0 @@
-/* $Header: /cvsup/minix/src/lib/ack/libp/eln.c,v 1.1 2005/10/10 15:27:46 beng Exp $ */
-/*
- * (c) copyright 1983 by the Vrije Universiteit, Amsterdam, The Netherlands.
- *
- *          This product is part of the Amsterdam Compiler Kit.
- *
- * Permission to use, sell, duplicate or disclose this software must be
- * obtained in writing. Requests for such permissions may be sent to
- *
- *      Dr. Andrew S. Tanenbaum
- *      Wiskundig Seminarium
- *      Vrije Universiteit
- *      Postbox 7161
- *      1007 MC Amsterdam
- *      The Netherlands
- *
- */
-
-/* Author: J.W. Stevenson */
-
-#include	<pc_file.h>
-#include	<pc_err.h>
-
-extern		_trp();
-extern		_rf();
-
-int _eln(f) struct file *f; {
-
-	_rf(f);
-	if (f->flags & EOFBIT)
-		_trp(EEOF);
-	return((f->flags & ELNBIT) != 0);
-}
Index: trunk/minix/lib/ack/libp/encaps.e
===================================================================
--- trunk/minix/lib/ack/libp/encaps.e	(revision 9)
+++ 	(revision )
@@ -1,144 +1,0 @@
-#
-
-
-; $Header: /cvsup/minix/src/lib/ack/libp/encaps.e,v 1.1 2005/10/10 15:27:46 beng Exp $
-;  (c) copyright 1983 by the Vrije Universiteit, Amsterdam, The Netherlands.
-; 
-;           This product is part of the Amsterdam Compiler Kit.
-; 
-;  Permission to use, sell, duplicate or disclose this software must be
-;  obtained in writing. Requests for such permissions may be sent to
-; 
-;       Dr. Andrew S. Tanenbaum
-;       Wiskundig Seminarium
-;       Vrije Universiteit
-;       Postbox 7161
-;       1007 MC Amsterdam
-;       The Netherlands
-; 
-
- mes 2,_EM_WSIZE,_EM_PSIZE
-
-; procedure encaps(procedure p; procedure(q(n:integer));
-; {call q if a trap occurs during the execution of p}
-; {if q returns, continue execution of p}
-
-
- inp $handler
-
-#define PIISZ   2*_EM_PSIZE
-
-#define PARG    0
-#define QARG    PIISZ
-#define E_ELB   0-_EM_PSIZE
-#define E_EHA   -2*_EM_PSIZE
-
-; encaps is called with two parameters:
-;       - procedure instance identifier of q (QARG)
-;       - procedure instance identifier of p (PARG)
-; and two local variables:
-;       - the lb of the previous encaps      (E_ELB)
-;       - the procedure identifier of the previous handler (E_EHA)
-;
-; One static variable:
-;       - the lb of the currently active encaps (enc_lb)
-
-enc_lb
-        bss _EM_PSIZE,0,0
-
- exp $encaps
- pro $encaps,PIISZ
- ; save lb of previous encaps
- lae enc_lb
- loi _EM_PSIZE
- lal E_ELB
- sti _EM_PSIZE
- ; set new lb
- lxl 0
- lae enc_lb
- sti _EM_PSIZE
- ; save old handler id while setting up the new handler
- lpi $handler
- sig
- lal E_EHA
- sti _EM_PSIZE
- ; handler is ready, p can be called
- ; p doesn't expect parameters except possibly the static link
- ; always passing the link won't hurt
- lal PARG
- loi PIISZ
- cai
- asp _EM_PSIZE
- ; reinstate old handler
- lal E_ELB
- loi _EM_PSIZE
- lae enc_lb
- sti _EM_PSIZE
- lal E_EHA
- loi _EM_PSIZE
- sig
- asp _EM_PSIZE
- ret 0
- end ?
-
-#define TRAP    0
-#define H_ELB   0-_EM_PSIZE
-
-; handler is called with one parameter:
-;       - trap number (TRAP)
-; one local variable
-;       - the current LB of the enclosing encaps (H_ELB)
-
-
- pro $handler,_EM_PSIZE
- ; save LB of nearest encaps
- lae enc_lb
- loi _EM_PSIZE
- lal H_ELB
- sti _EM_PSIZE
- ; fetch setting for previous encaps via LB of nearest
- lal H_ELB
- loi _EM_PSIZE
- adp E_ELB
- loi _EM_PSIZE   ; LB of previous encaps
- lae enc_lb
- sti _EM_PSIZE
- lal H_ELB
- loi _EM_PSIZE
- adp E_EHA
- loi _EM_PSIZE   ; previous handler
- sig
- asp _EM_PSIZE
- ; previous handler is re-instated, time to call Q
- lol TRAP       ; the one and only real parameter
- lal H_ELB
- loi _EM_PSIZE
- lpb            ; argument base of enclosing encaps
- adp QARG
- loi PIISZ
- exg _EM_PSIZE
- dup _EM_PSIZE   ; The static link is now on top
- zer _EM_PSIZE
- cmp
- zeq *1
- ; non-zero LB
- exg _EM_PSIZE
- cai
- asp _EM_WSIZE+_EM_PSIZE
- bra *2
-1
- ; zero LB
- asp _EM_PSIZE
- cai
- asp _EM_WSIZE
-2
- ; now reinstate handler for continued execution of p
- lal H_ELB
- loi _EM_PSIZE
- lae enc_lb
- sti _EM_PSIZE
- lpi $handler
- sig
- asp _EM_PSIZE
- rtt
- end ?
Index: trunk/minix/lib/ack/libp/exp.c
===================================================================
--- trunk/minix/lib/ack/libp/exp.c	(revision 9)
+++ 	(revision )
@@ -1,118 +1,0 @@
-/*
- * (c) copyright 1988 by the Vrije Universiteit, Amsterdam, The Netherlands.
- * See the copyright notice in the ACK home directory, in the file "Copyright".
- *
- * Author: Ceriel J.H. Jacobs
- */
-
-/* $Header: /cvsup/minix/src/lib/ack/libp/exp.c,v 1.1 2005/10/10 15:27:46 beng Exp $ */
-#define __NO_DEFS
-#include <math.h>
-#include <pc_err.h>
-extern	_trp();
-
-#if __STDC__
-#include <float.h>
-#include <pc_math.h>
-#define M_MIN_D	DBL_MIN
-#define M_MAX_D	DBL_MAX
-#define M_DMINEXP DBL_MIN_EXP
-#endif
-#undef HUGE
-#define HUGE	1e1000
-
-static double
-Ldexp(fl,exp)
-	double fl;
-	int exp;
-{
-	extern double _fef();
-	int sign = 1;
-	int currexp;
-
-	if (fl<0) {
-		fl = -fl;
-		sign = -1;
-	}
-	fl = _fef(fl,&currexp);
-	exp += currexp;
-	if (exp > 0) {
-		while (exp>30) {
-			fl *= (double) (1L << 30);
-			exp -= 30;
-		}
-		fl *= (double) (1L << exp);
-	}
-	else	{
-		while (exp<-30) {
-			fl /= (double) (1L << 30);
-			exp += 30;
-		}
-		fl /= (double) (1L << -exp);
-	}
-	return sign * fl;
-}
-
-double
-_exp(x)
-	double x;
-{
-	/*	Algorithm and coefficients from:
-			"Software manual for the elementary functions"
-			by W.J. Cody and W. Waite, Prentice-Hall, 1980
-	*/
-
-	static double p[] = {
-	        0.25000000000000000000e+0,
-	        0.75753180159422776666e-2,
-		0.31555192765684646356e-4
-	};
-
-	static double q[] = {
-	        0.50000000000000000000e+0,
-	        0.56817302698551221787e-1,
-	        0.63121894374398503557e-3,
-		0.75104028399870046114e-6
-	};
-	double	xn, g;
-	int	n;
-	int	negative = x < 0;
-
-	if (x <= M_LN_MIN_D) {
-		g = M_MIN_D/4.0;
-
-		if (g != 0.0) {
-			/* unnormalized numbers apparently exist */
-			if (x < (M_LN2 * (M_DMINEXP - 53))) return 0.0;
-		}
-		else {
-			if (x < M_LN_MIN_D) return 0.0;
-			return M_MIN_D;
-		}
-	}
-	if (x >= M_LN_MAX_D) {
-		if (x > M_LN_MAX_D) {
-			_trp(EEXP);
-			return HUGE;
-		}
-		return M_MAX_D;
-	}
-	if (negative) x = -x;
-
-	n = x * M_LOG2E + 0.5;	/* 1/ln(2) = log2(e), 0.5 added for rounding */
-	xn = n;
-	{
-		double	x1 = (long) x;
-		double	x2 = x - x1;
-
-		g = ((x1-xn*0.693359375)+x2) - xn*(-2.1219444005469058277e-4);
-	}
-	if (negative) {
-		g = -g;
-		n = -n;
-	}
-	xn = g * g;
-	x = g * POLYNOM2(xn, p);
-	n += 1;
-	return (Ldexp(0.5 + x/(POLYNOM3(xn, q) - x), n));
-}
Index: trunk/minix/lib/ack/libp/fef.e
===================================================================
--- trunk/minix/lib/ack/libp/fef.e	(revision 9)
+++ 	(revision )
@@ -1,39 +1,0 @@
-#
-; $Header: /cvsup/minix/src/lib/ack/libp/fef.e,v 1.1 2005/10/10 15:27:46 beng Exp $
-;
-; (c) copyright 1983 by the Vrije Universiteit, Amsterdam, The Netherlands.
-;
-;          This product is part of the Amsterdam Compiler Kit.
-;
-; Permission to use, sell, duplicate or disclose this software must be
-; obtained in writing. Requests for such permissions may be sent to
-;
-;      Dr. Andrew S. Tanenbaum
-;      Wiskundig Seminarium
-;      Vrije Universiteit
-;      Postbox 7161
-;      1007 MC Amsterdam
-;      The Netherlands
-;
-;
-
- mes 2,_EM_WSIZE,_EM_PSIZE
-
-#define FARG    0
-#define ERES    _EM_DSIZE
-
-; _fef is called with two parameters:
-;       - address of exponent result (ERES)
-;       - floating point number to be split (FARG)
-; and returns an _EM_DSIZE-byte floating point number
-
- exp $_fef
- pro $_fef,0
- lal FARG
- loi _EM_DSIZE
- fef _EM_DSIZE
- lal ERES
- loi _EM_PSIZE
- sti _EM_WSIZE
- ret _EM_DSIZE
- end ?
Index: trunk/minix/lib/ack/libp/fif.e
===================================================================
--- trunk/minix/lib/ack/libp/fif.e	(revision 9)
+++ 	(revision )
@@ -1,41 +1,0 @@
-#
-; $Header: /cvsup/minix/src/lib/ack/libp/fif.e,v 1.1 2005/10/10 15:27:46 beng Exp $
-;
-; (c) copyright 1983 by the Vrije Universiteit, Amsterdam, The Netherlands.
-;
-;          This product is part of the Amsterdam Compiler Kit.
-;
-; Permission to use, sell, duplicate or disclose this software must be
-; obtained in writing. Requests for such permissions may be sent to
-;
-;      Dr. Andrew S. Tanenbaum
-;      Wiskundig Seminarium
-;      Vrije Universiteit
-;      Postbox 7161
-;      1007 MC Amsterdam
-;      The Netherlands
-;
-;
-
- mes 2,_EM_WSIZE,_EM_PSIZE
-
-#define ARG1    0
-#define ARG2    _EM_DSIZE
-#define IRES    2*_EM_DSIZE
-
-; _fif is called with three parameters:
-;       - address of integer part result (IRES)
-;       - float two (ARG2)
-;       - float one (ARG1)
-; and returns an _EM_DSIZE-byte floating point number
-
- exp $_fif
- pro $_fif,0
- lal 0
- loi 2*_EM_DSIZE
- fif _EM_DSIZE
- lal IRES
- loi _EM_PSIZE
- sti _EM_DSIZE
- ret _EM_DSIZE
- end ?
Index: trunk/minix/lib/ack/libp/get.c
===================================================================
--- trunk/minix/lib/ack/libp/get.c	(revision 9)
+++ 	(revision )
@@ -1,31 +1,0 @@
-/* $Header: /cvsup/minix/src/lib/ack/libp/get.c,v 1.1 2005/10/10 15:27:46 beng Exp $ */
-/*
- * (c) copyright 1983 by the Vrije Universiteit, Amsterdam, The Netherlands.
- *
- *          This product is part of the Amsterdam Compiler Kit.
- *
- * Permission to use, sell, duplicate or disclose this software must be
- * obtained in writing. Requests for such permissions may be sent to
- *
- *      Dr. Andrew S. Tanenbaum
- *      Wiskundig Seminarium
- *      Vrije Universiteit
- *      Postbox 7161
- *      1007 MC Amsterdam
- *      The Netherlands
- *
- */
-
-#include	<pc_file.h>
-#include	<pc_err.h>
-
-extern		_rf();
-extern		_trp();
-
-_get(f) struct file *f; {
-
-	_rf(f);
-	if (f->flags&EOFBIT)
-		_trp(EEOF);
-	f->flags &= ~WINDOW;
-}
Index: trunk/minix/lib/ack/libp/gto.e
===================================================================
--- trunk/minix/lib/ack/libp/gto.e	(revision 9)
+++ 	(revision )
@@ -1,85 +1,0 @@
-#
-; $Header: /cvsup/minix/src/lib/ack/libp/gto.e,v 1.1 2005/10/10 15:27:46 beng Exp $
-;  (c) copyright 1983 by the Vrije Universiteit, Amsterdam, The Netherlands.
-; 
-;           This product is part of the Amsterdam Compiler Kit.
-; 
-;  Permission to use, sell, duplicate or disclose this software must be
-;  obtained in writing. Requests for such permissions may be sent to
-; 
-;       Dr. Andrew S. Tanenbaum
-;       Wiskundig Seminarium
-;       Vrije Universiteit
-;       Postbox 7161
-;       1007 MC Amsterdam
-;       The Netherlands
-; 
-
-/* Author: J.W. Stevenson */
-
-
- mes 2,_EM_WSIZE,_EM_PSIZE
-
-#define TARLB   0
-#define DESCR   _EM_PSIZE
-
-#define NEWPC   0
-#define SAVSP   _EM_PSIZE
-
-#define D_PC    0
-#define D_SP    _EM_PSIZE
-#define D_LB    _EM_PSIZE+_EM_PSIZE
-
-#define LOCLB   0-_EM_PSIZE
-
-; _gto is called with two arguments:
-;       - pointer to the label descriptor (DESCR)
-;       - local base (LB) of target procedure (TARLB)
-; the label descriptor contains two items:
-;       - label address i.e. new PC (NEWPC)
-;       - offset in target procedure frame (SAVSP)
-; using this offset and the LB of the target procedure, the address of
-; of local variable of the target procedure is constructed.
-; the target procedure must have stored the correct target SP there.
-
-descr
- bss 3*_EM_PSIZE,0,0
-
- exp $_gto
- pro $_gto,_EM_PSIZE
- lal DESCR
- loi _EM_PSIZE
- adp NEWPC
- loi _EM_PSIZE
- lae descr+D_PC
- sti _EM_PSIZE
- lal TARLB
- loi _EM_PSIZE
- zer _EM_PSIZE
- cmp
- zeq *1
- lal TARLB
- loi _EM_PSIZE
- bra *2
-1
- lae _m_lb
- loi _EM_PSIZE
-2
- lal LOCLB
- sti _EM_PSIZE
- lal LOCLB
- loi _EM_PSIZE
- lal DESCR
- loi _EM_PSIZE
- adp SAVSP
- loi _EM_WSIZE           ; or _EM_PSIZE ?
- ads _EM_WSIZE           ; or _EM_PSIZE ?
- loi _EM_PSIZE
- lae descr+D_SP
- sti _EM_PSIZE
- lal LOCLB
- loi _EM_PSIZE
- lae descr+D_LB
- sti _EM_PSIZE
- gto descr
- end ?
Index: trunk/minix/lib/ack/libp/head_pc.e
===================================================================
--- trunk/minix/lib/ack/libp/head_pc.e	(revision 9)
+++ 	(revision )
@@ -1,3 +1,0 @@
-#
-; $Header: /cvsup/minix/src/lib/ack/libp/head_pc.e,v 1.1 2005/10/10 15:27:46 beng Exp $
- mes 2,_EM_WSIZE,_EM_PSIZE
Index: trunk/minix/lib/ack/libp/hlt.c
===================================================================
--- trunk/minix/lib/ack/libp/hlt.c	(revision 9)
+++ 	(revision )
@@ -1,35 +1,0 @@
-/* $Header: /cvsup/minix/src/lib/ack/libp/hlt.c,v 1.1 2005/10/10 15:27:46 beng Exp $ */
-/*
- * (c) copyright 1983 by the Vrije Universiteit, Amsterdam, The Netherlands.
- *
- *          This product is part of the Amsterdam Compiler Kit.
- *
- * Permission to use, sell, duplicate or disclose this software must be
- * obtained in writing. Requests for such permissions may be sent to
- *
- *      Dr. Andrew S. Tanenbaum
- *      Wiskundig Seminarium
- *      Vrije Universiteit
- *      Postbox 7161
- *      1007 MC Amsterdam
- *      The Netherlands
- *
- */
-
-/* Author: J.W. Stevenson */
-
-#include	<pc_file.h>
-
-extern struct file	**_extfl;
-extern int		_extflc;
-extern			_cls();
-extern			_exit();
-
-_hlt(ecode) int ecode; {
-	int i;
-
-	for (i = 0; i < _extflc; i++)
-		if (_extfl[i] != (struct file *) 0)
-			_cls(_extfl[i]);
-	_exit(ecode);
-}
Index: trunk/minix/lib/ack/libp/hol0.e
===================================================================
--- trunk/minix/lib/ack/libp/hol0.e	(revision 9)
+++ 	(revision )
@@ -1,29 +1,0 @@
-#
-
-; $Header: /cvsup/minix/src/lib/ack/libp/hol0.e,v 1.1 2005/10/10 15:27:46 beng Exp $
-;
-; (c) copyright 1983 by the Vrije Universiteit, Amsterdam, The Netherlands.
-;
-;          This product is part of the Amsterdam Compiler Kit.
-;
-; Permission to use, sell, duplicate or disclose this software must be
-; obtained in writing. Requests for such permissions may be sent to
-;
-;      Dr. Andrew S. Tanenbaum
-;      Wiskundig Seminarium
-;      Vrije Universiteit
-;      Postbox 7161
-;      1007 MC Amsterdam
-;      The Netherlands
-;
-;
-
- mes 2,_EM_WSIZE,_EM_PSIZE
-
-; _hol0 return the address of the ABS block (hol0)
-
- exp $_hol0
- pro $_hol0,0
- lae 0
- ret _EM_PSIZE
- end ?
Index: trunk/minix/lib/ack/libp/incpt.c
===================================================================
--- trunk/minix/lib/ack/libp/incpt.c	(revision 9)
+++ 	(revision )
@@ -1,75 +1,0 @@
-/* $Header: /cvsup/minix/src/lib/ack/libp/incpt.c,v 1.1 2005/10/10 15:27:47 beng Exp $ */
-/*
- * (c) copyright 1983 by the Vrije Universiteit, Amsterdam, The Netherlands.
- *
- *          This product is part of the Amsterdam Compiler Kit.
- *
- * Permission to use, sell, duplicate or disclose this software must be
- * obtained in writing. Requests for such permissions may be sent to
- *
- *      Dr. Andrew S. Tanenbaum
- *      Wiskundig Seminarium
- *      Vrije Universiteit
- *      Postbox 7161
- *      1007 MC Amsterdam
- *      The Netherlands
- *
- */
-
-/* Author: J.W. Stevenson */
-
-#include	<pc_file.h>
-#include	<pc_err.h>
-
-#define EINTR	4
-
-extern int	errno;
-extern		_trp();
-extern int	_read();
-
-_incpt(f) struct file *f; {
-
-	if (f->flags & EOFBIT)
-		_trp(EEOF);
-	f->flags |= WINDOW;
-	f->flags &= ~ELNBIT;
-#ifdef CPM
-	do {
-#endif
-	f->ptr += f->size;
-	if (f->count == 0) {
-		f->ptr = f->bufadr;
-		for(;;) {
-			f->count=_read(f->ufd,f->bufadr,f->buflen);
-			if ( f->count<0 ) {
-				if (errno != EINTR) _trp(EREAD) ;
-				continue ;
-			}
-			break ;
-		}
-		if (f->count == 0) {
-			f->flags |= EOFBIT;
-			*f->ptr = '\0';
-			return;
-		}
-	}
-	if ((f->count -= f->size) < 0)
-		_trp(EFTRUNC);
-#ifdef CPM
-	} while ((f->flags&TXTBIT) && *f->ptr == '\r');
-#endif
-	if (f->flags & TXTBIT) {
-		if (*f->ptr & 0200)
-			_trp(EASCII);
-		if (*f->ptr == '\n') {
-			f->flags |= ELNBIT;
-			*f->ptr = ' ';
-		}
-#ifdef CPM
-		if (*f->ptr == 26) {
-			f->flags |= EOFBIT;
-			*f->ptr = 0;
-		}
-#endif
-	}
-}
Index: trunk/minix/lib/ack/libp/ini.c
===================================================================
--- trunk/minix/lib/ack/libp/ini.c	(revision 9)
+++ 	(revision )
@@ -1,72 +1,0 @@
-/* $Header: /cvsup/minix/src/lib/ack/libp/ini.c,v 1.1 2005/10/10 15:27:47 beng Exp $ */
-/*
- * (c) copyright 1983 by the Vrije Universiteit, Amsterdam, The Netherlands.
- *
- *          This product is part of the Amsterdam Compiler Kit.
- *
- * Permission to use, sell, duplicate or disclose this software must be
- * obtained in writing. Requests for such permissions may be sent to
- *
- *      Dr. Andrew S. Tanenbaum
- *      Wiskundig Seminarium
- *      Vrije Universiteit
- *      Postbox 7161
- *      1007 MC Amsterdam
- *      The Netherlands
- *
- */
-
-/* Author: J.W. Stevenson */
-
-#include        <pc_file.h>
-#include        <pc_err.h>
-
-extern          (*_sig())();
-extern          _catch();
-#ifndef CPM
-extern int      _isatty();
-#endif
-
-struct file     **_extfl;
-int		_extflc;	/* number of external files */
-char            *_m_lb;         /* LB of _m_a_i_n */
-struct file     *_curfil;       /* points to file struct in case of errors */
-int             _pargc;
-char            **_pargv;
-char            ***_penviron;
-int		_fp_hook = 1;	/* This is for Minix, but does not harm others */
-
-_ini(args,c,p,mainlb) char *args,*mainlb; int c; struct file **p; {
-	struct file *f;
-	char buf[128];
-
-	_pargc= *(int *)args; args += sizeof (int);
-	_pargv= *(char ***)args;
-	_sig(_catch);
-	_extfl = p;
-	_extflc = c;
-	if( !c ) return;
-	_m_lb = mainlb;
-	if ( (f = _extfl[0]) != (struct file *) 0) {
-		f->ptr = f->bufadr;
-		f->flags = MAGIC|TXTBIT;
-		f->fname = "INPUT";
-		f->ufd = 0;
-		f->size = 1;
-		f->count = 0;
-		f->buflen = PC_BUFLEN;
-	}
-	if ( (f = _extfl[1]) != (struct file *) 0) {
-		f->ptr = f->bufadr;
-		f->flags = MAGIC|TXTBIT|WRBIT|EOFBIT|ELNBIT;
-		f->fname = "OUTPUT";
-		f->ufd = 1;
-		f->size = 1;
-#ifdef CPM
-		f->count = 1;
-#else
-		f->count = (_isatty(1) ? 1 : PC_BUFLEN);
-#endif
-		f->buflen = f->count;
-	}
-}
Index: trunk/minix/lib/ack/libp/log.c
===================================================================
--- trunk/minix/lib/ack/libp/log.c	(revision 9)
+++ 	(revision )
@@ -1,65 +1,0 @@
-/*
- * (c) copyright 1988 by the Vrije Universiteit, Amsterdam, The Netherlands.
- * See the copyright notice in the ACK home directory, in the file "Copyright".
- *
- * Author: Ceriel J.H. Jacobs
- */
-
-/* $Header: /cvsup/minix/src/lib/ack/libp/log.c,v 1.1 2005/10/10 15:27:47 beng Exp $ */
-
-#define __NO_DEFS
-#include <math.h>
-#include <pc_err.h>
-
-#if __STDC__
-#include <pc_math.h>
-#include <float.h>
-#endif
-#undef HUGE
-#define HUGE	1e1000
-
-double
-_log(x)
-	double	x;
-{
-	/*	Algorithm and coefficients from:
-			"Software manual for the elementary functions"
-			by W.J. Cody and W. Waite, Prentice-Hall, 1980
-	*/
-	static double a[] = {
-		-0.64124943423745581147e2,
-		 0.16383943563021534222e2,
-		-0.78956112887491257267e0
-	};
-	static double b[] = {
-		-0.76949932108494879777e3,
-		 0.31203222091924532844e3,
-		-0.35667977739034646171e2,
-		 1.0
-	};
-
-	extern double	_fef();
-	double	znum, zden, z, w;
-	int	exponent;
-
-	if (x <= 0) {
-		_trp(ELOG);
-		return -HUGE;
-	}
-
-	x = _fef(x, &exponent);
-	if (x > M_1_SQRT2) {
-		znum = (x - 0.5) - 0.5;
-		zden = x * 0.5 + 0.5;
-	}
-	else {
-		znum = x - 0.5;
-		zden = znum * 0.5 + 0.5;
-		exponent--;
-	}
-	z = znum/zden; w = z * z;
-	x = z + z * w * (POLYNOM2(w,a)/POLYNOM3(w,b));
-	z = exponent;
-	x += z * (-2.121944400546905827679e-4);
-	return x + z * 0.693359375;
-}
Index: trunk/minix/lib/ack/libp/mdi.c
===================================================================
--- trunk/minix/lib/ack/libp/mdi.c	(revision 9)
+++ 	(revision )
@@ -1,71 +1,0 @@
-/* $Header: /cvsup/minix/src/lib/ack/libp/mdi.c,v 1.1 2005/10/10 15:27:47 beng Exp $ */
-/*
- * (c) copyright 1983 by the Vrije Universiteit, Amsterdam, The Netherlands.
- *
- *          This product is part of the Amsterdam Compiler Kit.
- *
- * Permission to use, sell, duplicate or disclose this software must be
- * obtained in writing. Requests for such permissions may be sent to
- *
- *      Dr. Andrew S. Tanenbaum
- *      Wiskundig Seminarium
- *      Vrije Universiteit
- *      Postbox 7161
- *      1007 MC Amsterdam
- *      The Netherlands
- *
- */
-
-/* Author: J.W. Stevenson */
-
-#include	<pc_err.h>
-
-extern		_trp();
-
-int _mdi(j,i) int j,i; {
-
-        if (j <= 0)
-                _trp(EMOD);
-        i = i % j;
-        if (i < 0)
-                i += j;
-        return(i);
-}
-
-long _mdil(j,i) long j,i; {
-
-	if (j <= 0)
-		_trp(EMOD);
-	i = i % j;
-	if (i < 0)
-		i += j;
-	return(i);
-}
-
-int _dvi(j, i) unsigned int j,i; {
-	int neg = 0;
-
-	if ((int)j < 0) {
-		j = -(int)j; neg = 1;
-	}
-	if ((int)i < 0) {
-		i = -(int)i; neg = !neg;
-	}
-	i = i / j;
-	if (neg) return -(int)i;
-	return i;
-}
-
-long _dvil(j, i) unsigned long j,i; {
-	int neg = 0;
-
-	if ((long)j < 0) {
-		j = -(long)j; neg = 1;
-	}
-	if ((long)i < 0) {
-		i = -(long)i; neg = !neg;
-	}
-	i = i / j;
-	if (neg) return -(long)i;
-	return i;
-}
Index: trunk/minix/lib/ack/libp/mdl.c
===================================================================
--- trunk/minix/lib/ack/libp/mdl.c	(revision 9)
+++ 	(revision )
@@ -1,33 +1,0 @@
-/* $Header: /cvsup/minix/src/lib/ack/libp/mdl.c,v 1.1 2005/10/10 15:27:47 beng Exp $ */
-/*
- * (c) copyright 1983 by the Vrije Universiteit, Amsterdam, The Netherlands.
- *
- *          This product is part of the Amsterdam Compiler Kit.
- *
- * Permission to use, sell, duplicate or disclose this software must be
- * obtained in writing. Requests for such permissions may be sent to
- *
- *      Dr. Andrew S. Tanenbaum
- *      Wiskundig Seminarium
- *      Vrije Universiteit
- *      Postbox 7161
- *      1007 MC Amsterdam
- *      The Netherlands
- *
- */
-
-/* Author: J.W. Stevenson */
-
-#include	<pc_err.h>
-
-extern		_trp();
-
-long _mdl(j,i) long j,i; {
-
-	if (j <= 0)
-		_trp(EMOD);
-	i = i % j;
-	if (i < 0)
-		i += j;
-	return(i);
-}
Index: trunk/minix/lib/ack/libp/new.c
===================================================================
--- trunk/minix/lib/ack/libp/new.c	(revision 9)
+++ 	(revision )
@@ -1,69 +1,0 @@
-/* $Header: /cvsup/minix/src/lib/ack/libp/new.c,v 1.1 2005/10/10 15:27:47 beng Exp $ */
-/*
- * (c) copyright 1983 by the Vrije Universiteit, Amsterdam, The Netherlands.
- *
- *          This product is part of the Amsterdam Compiler Kit.
- *
- * Permission to use, sell, duplicate or disclose this software must be
- * obtained in writing. Requests for such permissions may be sent to
- *
- *      Dr. Andrew S. Tanenbaum
- *      Wiskundig Seminarium
- *      Vrije Universiteit
- *      Postbox 7161
- *      1007 MC Amsterdam
- *      The Netherlands
- *
- */
-
-/* Author: J.W. Stevenson */
-
-extern		_sav();
-extern		_rst();
-
-#define assert(x)	/* nothing */
-#define	UNDEF		0x8000
-
-struct adm {
-	struct adm	*next;
-	int		size;
-};
-
-struct adm	*_lastp = 0;
-struct adm	*_highp = 0;
-
-_new(n,pp) int n; struct adm **pp; {
-	struct adm *p,*q;
-	int *ptmp;
-
-	n = ((n+sizeof(*p)-1) / sizeof(*p)) * sizeof(*p);
-	if ((p = _lastp) != 0)
-		do {
-			q = p->next;
-			if (q->size >= n) {
-				assert(q->size%sizeof(adm) == 0);
-				if ((q->size -= n) == 0) {
-					if (p == q)
-						p = 0;
-					else
-						p->next = q->next;
-					if (q == _highp)
-						_highp = p;
-				}
-				_lastp = p;
-				p = (struct adm *)((char *)q + q->size);
-				q = (struct adm *)((char *)p + n);
-				goto initialize;
-			}
-			p = q;
-		} while (p != _lastp);
-	/*no free block big enough*/
-	_sav(&p);
-	q = (struct adm *)((char *)p + n);
-	_rst(&q);
-initialize:
-	*pp = p;
-	ptmp = (int *)p;
-	while (ptmp < (int *)q)
-		*ptmp++ = UNDEF;
-}
Index: trunk/minix/lib/ack/libp/nfa.c
===================================================================
--- trunk/minix/lib/ack/libp/nfa.c	(revision 9)
+++ 	(revision )
@@ -1,16 +1,0 @@
-/* $Header: /cvsup/minix/src/lib/ack/libp/nfa.c,v 1.1 2005/10/10 15:27:47 beng Exp $ */
-/*
- * (c) copyright 1990 by the Vrije Universiteit, Amsterdam, The Netherlands.
- * See the copyright notice in the ACK home directory, in the file "Copyright".
- */
-
-/* Author: Hans van Eck */
-
-#include	<pc_err.h>
-
-extern _trp();
-
-_nfa(bool)
-{
-	if (! bool) _trp(EFUNASS);
-}
Index: trunk/minix/lib/ack/libp/nobuff.c
===================================================================
--- trunk/minix/lib/ack/libp/nobuff.c	(revision 9)
+++ 	(revision )
@@ -1,33 +1,0 @@
-/* $Header: /cvsup/minix/src/lib/ack/libp/nobuff.c,v 1.1 2005/10/10 15:27:47 beng Exp $ */
-/*
- * (c) copyright 1983 by the Vrije Universiteit, Amsterdam, The Netherlands.
- *
- *          This product is part of the Amsterdam Compiler Kit.
- *
- * Permission to use, sell, duplicate or disclose this software must be
- * obtained in writing. Requests for such permissions may be sent to
- *
- *      Dr. Andrew S. Tanenbaum
- *      Wiskundig Seminarium
- *      Vrije Universiteit
- *      Postbox 7161
- *      1007 MC Amsterdam
- *      The Netherlands
- *
- */
-
-/* Author: J.W. Stevenson */
-
-#include	<pc_file.h>
-
-extern		_flush();
-
-/* procedure nobuff(var f:file of ?); */
-
-nobuff(f) struct file *f; {
-
-	if ((f->flags & (0377|WRBIT)) != (MAGIC|WRBIT))
-		return;
-	_flush(f);
-	f->count = f->buflen = f->size;
-}
Index: trunk/minix/lib/ack/libp/notext.c
===================================================================
--- trunk/minix/lib/ack/libp/notext.c	(revision 9)
+++ 	(revision )
@@ -1,23 +1,0 @@
-/* $Header: /cvsup/minix/src/lib/ack/libp/notext.c,v 1.1 2005/10/10 15:27:47 beng Exp $ */
-/*
- * (c) copyright 1983 by the Vrije Universiteit, Amsterdam, The Netherlands.
- *
- *          This product is part of the Amsterdam Compiler Kit.
- *
- * Permission to use, sell, duplicate or disclose this software must be
- * obtained in writing. Requests for such permissions may be sent to
- *
- *      Dr. Andrew S. Tanenbaum
- *      Wiskundig Seminarium
- *      Vrije Universiteit
- *      Postbox 7161
- *      1007 MC Amsterdam
- *      The Netherlands
- *
- */
-
-#include	<pc_file.h>
-
-notext(f) struct file *f; {
-	f->flags &= ~TXTBIT;
-}
Index: trunk/minix/lib/ack/libp/opn.c
===================================================================
--- trunk/minix/lib/ack/libp/opn.c	(revision 9)
+++ 	(revision )
@@ -1,118 +1,0 @@
-/* $Header: /cvsup/minix/src/lib/ack/libp/opn.c,v 1.1 2005/10/10 15:27:47 beng Exp $ */
-/*
- * (c) copyright 1983 by the Vrije Universiteit, Amsterdam, The Netherlands.
- *
- *          This product is part of the Amsterdam Compiler Kit.
- *
- * Permission to use, sell, duplicate or disclose this software must be
- * obtained in writing. Requests for such permissions may be sent to
- *
- *      Dr. Andrew S. Tanenbaum
- *      Wiskundig Seminarium
- *      Vrije Universiteit
- *      Postbox 7161
- *      1007 MC Amsterdam
- *      The Netherlands
- *
- */
-
-/* Author: J.W. Stevenson */
-
-#include	<pc_file.h>
-#include	<pc_err.h>
-
-extern struct file	**_extfl;
-extern int		_extflc;
-extern struct file	*_curfil;
-extern int		_pargc;
-extern char		**_pargv;
-extern char		***_penviron;
-
-extern			_cls();
-extern			_xcls();
-extern			_trp();
-extern int		_getpid();
-extern int		_creat();
-extern int		_open();
-extern int		_close();
-extern int		_unlink();
-extern long		_lseek();
-
-static int tmpfil() {
-	static char namebuf[] = "/usr/tmp/plf.xxxxx";
-	int i; char *p,*q;
-
-	i = _getpid();
-	p = namebuf;
-	q = p + 13;
-	do
-		*q++ = (i & 07) + '0';
-	while (i >>= 3);
-	*q = '\0';
-	if ((i = _creat(p,0644)) < 0)
-		if ((i = _creat(p += 4,0644)) < 0)
-			if ((i = _creat(p += 5,0644)) < 0)
-				goto error;
-	if (_close(i) != 0)
-		goto error;
-	if ((i = _open(p,2)) < 0)
-		goto error;
-	if (_unlink(p) != 0)
-error:		_trp(EREWR);
-	return(i);
-}
-
-static int initfl(descr,sz,f) int descr; int sz; struct file *f; {
-	int i;
-
-	_curfil = f;
-	if (sz == 0) {
-		sz++;
-		descr |= TXTBIT;
-	}
-	for (i=0; i<_extflc; i++)
-		if (f == _extfl[i])
-			break;
-	if (i >= _extflc) {		/* local file */
-		f->fname = "LOCAL";
-		if ((descr & WRBIT) == 0 && (f->flags & 0377) == MAGIC) {
-			_xcls(f);
-			if (_lseek(f->ufd,(long)0,0) == -1)
-				_trp(ERESET);
-		} else {
-			_cls(f);
-			f->ufd = tmpfil();
-		}
-	} else {	/* external file */
-		if (--i <= 0)
-			return(0);
-		if (i >= _pargc)
-			_trp(EARGC);
-		f->fname = _pargv[i];
-		_cls(f);
-		if ((descr & WRBIT) == 0) {
-			if ((f->ufd = _open(f->fname,0)) < 0)
-				_trp(ERESET);
-		} else {
-			if ((f->ufd = _creat(f->fname,0644)) < 0)
-				_trp(EREWR);
-		}
-	}
-	f->buflen = (sz>PC_BUFLEN ? sz : PC_BUFLEN-PC_BUFLEN%sz);
-	f->size = sz;
-	f->ptr = f->bufadr;
-	f->flags = descr;
-	return(1);
-}
-
-_opn(sz,f) int sz; struct file *f; {
-
-	if (initfl(MAGIC,sz,f))
-		f->count = 0;
-}
-
-_cre(sz,f) int sz; struct file *f; {
-
-	if (initfl(WRBIT|EOFBIT|ELNBIT|MAGIC,sz,f))
-		f->count = f->buflen;
-}
Index: trunk/minix/lib/ack/libp/outcpt.c
===================================================================
--- trunk/minix/lib/ack/libp/outcpt.c	(revision 9)
+++ 	(revision )
@@ -1,50 +1,0 @@
-/* $Header: /cvsup/minix/src/lib/ack/libp/outcpt.c,v 1.1 2005/10/10 15:27:47 beng Exp $ */
-/*
- * (c) copyright 1983 by the Vrije Universiteit, Amsterdam, The Netherlands.
- *
- *          This product is part of the Amsterdam Compiler Kit.
- *
- * Permission to use, sell, duplicate or disclose this software must be
- * obtained in writing. Requests for such permissions may be sent to
- *
- *      Dr. Andrew S. Tanenbaum
- *      Wiskundig Seminarium
- *      Vrije Universiteit
- *      Postbox 7161
- *      1007 MC Amsterdam
- *      The Netherlands
- *
- */
-
-/* Author: J.W. Stevenson */
-
-#include	<pc_file.h>
-#include	<pc_err.h>
-
-#define EINTR	4
-
-extern int	errno;
-extern		_trp();
-extern int	_write();
-
-_flush(f) struct file *f; {
-	int i,n;
-
-	f->ptr = f->bufadr;
-	n = f->buflen - f->count;
-	if (n <= 0)
-		return;
-	f->count = f->buflen;
-	if ((i = _write(f->ufd,f->bufadr,n)) < 0 && errno == EINTR)
-		return;
-	if (i != n)
-		_trp(EWRITE);
-}
-
-_outcpt(f) struct file *f; {
-
-	f->flags &= ~ELNBIT;
-	f->ptr += f->size;
-	if ((f->count -= f->size) <= 0)
-		_flush(f);
-}
Index: trunk/minix/lib/ack/libp/pac.c
===================================================================
--- trunk/minix/lib/ack/libp/pac.c	(revision 9)
+++ 	(revision )
@@ -1,63 +1,0 @@
-/* $Header: /cvsup/minix/src/lib/ack/libp/pac.c,v 1.1 2005/10/10 15:27:47 beng Exp $ */
-/*
- * (c) copyright 1983 by the Vrije Universiteit, Amsterdam, The Netherlands.
- *
- *          This product is part of the Amsterdam Compiler Kit.
- *
- * Permission to use, sell, duplicate or disclose this software must be
- * obtained in writing. Requests for such permissions may be sent to
- *
- *      Dr. Andrew S. Tanenbaum
- *      Wiskundig Seminarium
- *      Vrije Universiteit
- *      Postbox 7161
- *      1007 MC Amsterdam
- *      The Netherlands
- *
- */
-
-/* Author: J.W. Stevenson */
-
-#include	<pc_err.h>
-
-extern		_trp();
-
-#define	assert(x)	/* nothing */
-
-#ifndef EM_WSIZE
-#define EM_WSIZE _EM_WSIZE
-#endif
-
-struct descr {
-	int	low;
-	int	diff;
-	int	size;
-};
-
-_pac(ad,zd,zp,i,ap) int i; struct descr *ad,*zd; char *zp,*ap; {
-
-	if (zd->diff > ad->diff ||
-			(i -= ad->low) < 0 ||
-			(i+zd->diff) > ad->diff)
-		_trp(EPACK);
-	ap += (i * ad->size);
-	i = (zd->diff + 1) * zd->size;
-	if (zd->size == 1) {
-		int *aptmp = (int *)ap;
-		assert(ad->size == EM_WSIZE);
-		while (--i >= 0)
-			*zp++ = *aptmp++;
-#if EM_WSIZE > 2
-	} else if (zd->size == 2) {
-		int *aptmp = (int *)ap;
-		short *zptmp = (short *) zp;
-		assert(ad->size == EM_WSIZE);
-		while (--i >= 0)
-			*zptmp++ = *aptmp++;
-#endif
-	} else {
-		assert(ad->size == zd->size);
-		while (--i >= 0)
-			*zp++ = *ap++;
-	}
-}
Index: trunk/minix/lib/ack/libp/pclose.c
===================================================================
--- trunk/minix/lib/ack/libp/pclose.c	(revision 9)
+++ 	(revision )
@@ -1,27 +1,0 @@
-/* $Header: /cvsup/minix/src/lib/ack/libp/pclose.c,v 1.1 2005/10/10 15:27:47 beng Exp $ */
-/*
- * (c) copyright 1983 by the Vrije Universiteit, Amsterdam, The Netherlands.
- *
- *          This product is part of the Amsterdam Compiler Kit.
- *
- * Permission to use, sell, duplicate or disclose this software must be
- * obtained in writing. Requests for such permissions may be sent to
- *
- *      Dr. Andrew S. Tanenbaum
- *      Wiskundig Seminarium
- *      Vrije Universiteit
- *      Postbox 7161
- *      1007 MC Amsterdam
- *      The Netherlands
- *
- */
-
-#include	<pc_file.h>
-
-extern		_cls();
-
-/* procedure pclose(var f:file of ??); */
-
-pclose(f) struct file *f; {
-	_cls(f);
-}
Index: trunk/minix/lib/ack/libp/pcreat.c
===================================================================
--- trunk/minix/lib/ack/libp/pcreat.c	(revision 9)
+++ 	(revision )
@@ -1,41 +1,0 @@
-/* $Header: /cvsup/minix/src/lib/ack/libp/pcreat.c,v 1.1 2005/10/10 15:27:47 beng Exp $ */
-/*
- * (c) copyright 1983 by the Vrije Universiteit, Amsterdam, The Netherlands.
- *
- *          This product is part of the Amsterdam Compiler Kit.
- *
- * Permission to use, sell, duplicate or disclose this software must be
- * obtained in writing. Requests for such permissions may be sent to
- *
- *      Dr. Andrew S. Tanenbaum
- *      Wiskundig Seminarium
- *      Vrije Universiteit
- *      Postbox 7161
- *      1007 MC Amsterdam
- *      The Netherlands
- *
- */
-
-/* Author: J.W. Stevenson */
-
-#include	<pc_file.h>
-#include	<pc_err.h>
-
-extern		_cls();
-extern		_trp();
-extern int	_creat();
-
-/* procedure pcreat(var f:text; s:string); */
-
-pcreat(f,s) struct file *f; char *s; {
-
-	_cls(f);	/* initializes _curfil */
-	f->ptr = f->bufadr;
-	f->flags = WRBIT|EOFBIT|ELNBIT|TXTBIT|MAGIC;
-	f->fname = s;
-	f->size = 1;
-	f->count = PC_BUFLEN;
-	f->buflen = PC_BUFLEN;
-	if ((f->ufd = _creat(s,0644)) < 0)
-		_trp(EREWR);
-}
Index: trunk/minix/lib/ack/libp/pentry.c
===================================================================
--- trunk/minix/lib/ack/libp/pentry.c	(revision 9)
+++ 	(revision )
@@ -1,35 +1,0 @@
-/* $Header: /cvsup/minix/src/lib/ack/libp/pentry.c,v 1.1 2005/10/10 15:27:47 beng Exp $ */
-/*
- * (c) copyright 1983 by the Vrije Universiteit, Amsterdam, The Netherlands.
- *
- *          This product is part of the Amsterdam Compiler Kit.
- *
- * Permission to use, sell, duplicate or disclose this software must be
- * obtained in writing. Requests for such permissions may be sent to
- *
- *      Dr. Andrew S. Tanenbaum
- *      Wiskundig Seminarium
- *      Vrije Universiteit
- *      Postbox 7161
- *      1007 MC Amsterdam
- *      The Netherlands
- *
- */
-
-/* Author: J.W. Stevenson */
-
-#include	<pc_file.h>
-
-extern struct file	**_extfl;
-extern			_wrs();
-extern			_wrz();
-extern			_wln();
-
-procentry(name) char *name; {
-	struct file *f;
-
-	f = _extfl[1];
-	_wrs(5,"call ",f);
-	_wrz(name,f);
-	_wln(f);
-}
Index: trunk/minix/lib/ack/libp/perrno.c
===================================================================
--- trunk/minix/lib/ack/libp/perrno.c	(revision 9)
+++ 	(revision )
@@ -1,25 +1,0 @@
-/* $Header: /cvsup/minix/src/lib/ack/libp/perrno.c,v 1.1 2005/10/10 15:27:47 beng Exp $ */
-/*
- * (c) copyright 1983 by the Vrije Universiteit, Amsterdam, The Netherlands.
- *
- *          This product is part of the Amsterdam Compiler Kit.
- *
- * Permission to use, sell, duplicate or disclose this software must be
- * obtained in writing. Requests for such permissions may be sent to
- *
- *      Dr. Andrew S. Tanenbaum
- *      Wiskundig Seminarium
- *      Vrije Universiteit
- *      Postbox 7161
- *      1007 MC Amsterdam
- *      The Netherlands
- *
- */
-
-/* function perrno:integer; extern; */
-
-extern int	errno;
-
-int perrno() {
-	return(errno);
-}
Index: trunk/minix/lib/ack/libp/pexit.c
===================================================================
--- trunk/minix/lib/ack/libp/pexit.c	(revision 9)
+++ 	(revision )
@@ -1,33 +1,0 @@
-/* $Header: /cvsup/minix/src/lib/ack/libp/pexit.c,v 1.1 2005/10/10 15:27:47 beng Exp $ */
-/*
- * (c) copyright 1983 by the Vrije Universiteit, Amsterdam, The Netherlands.
- *
- *          This product is part of the Amsterdam Compiler Kit.
- *
- * Permission to use, sell, duplicate or disclose this software must be
- * obtained in writing. Requests for such permissions may be sent to
- *
- *      Dr. Andrew S. Tanenbaum
- *      Wiskundig Seminarium
- *      Vrije Universiteit
- *      Postbox 7161
- *      1007 MC Amsterdam
- *      The Netherlands
- *
- */
-
-#include	<pc_file.h>
-
-extern struct file	**_extfl;
-extern			_wrs();
-extern			_wrz();
-extern			_wln();
-
-procexit(name) char *name; {
-	struct file *f;
-
-	f = _extfl[1];
-	_wrs(5,"exit ",f);
-	_wrz(name,f);
-	_wln(f);
-}
Index: trunk/minix/lib/ack/libp/popen.c
===================================================================
--- trunk/minix/lib/ack/libp/popen.c	(revision 9)
+++ 	(revision )
@@ -1,41 +1,0 @@
-/* $Header: /cvsup/minix/src/lib/ack/libp/popen.c,v 1.1 2005/10/10 15:27:47 beng Exp $ */
-/*
- * (c) copyright 1983 by the Vrije Universiteit, Amsterdam, The Netherlands.
- *
- *          This product is part of the Amsterdam Compiler Kit.
- *
- * Permission to use, sell, duplicate or disclose this software must be
- * obtained in writing. Requests for such permissions may be sent to
- *
- *      Dr. Andrew S. Tanenbaum
- *      Wiskundig Seminarium
- *      Vrije Universiteit
- *      Postbox 7161
- *      1007 MC Amsterdam
- *      The Netherlands
- *
- */
-
-/* Author: J.W. Stevenson */
-
-#include	<pc_file.h>
-#include	<pc_err.h>
-
-extern		_cls();
-extern		_trp();
-extern int	_open();
-
-/* procedure popen(var f:text; s:string); */
-
-popen(f,s) struct file *f; char *s; {
-
-	_cls(f);	/* initializes _curfil */
-	f->ptr = f->bufadr;
-	f->flags = TXTBIT|MAGIC;
-	f->fname = s;
-	f->size = 1;
-	f->count = 0;
-	f->buflen = PC_BUFLEN;
-	if ((f->ufd = _open(s,0)) < 0)
-		_trp(ERESET);
-}
Index: trunk/minix/lib/ack/libp/put.c
===================================================================
--- trunk/minix/lib/ack/libp/put.c	(revision 9)
+++ 	(revision )
@@ -1,27 +1,0 @@
-/* $Header: /cvsup/minix/src/lib/ack/libp/put.c,v 1.1 2005/10/10 15:27:47 beng Exp $ */
-/*
- * (c) copyright 1983 by the Vrije Universiteit, Amsterdam, The Netherlands.
- *
- *          This product is part of the Amsterdam Compiler Kit.
- *
- * Permission to use, sell, duplicate or disclose this software must be
- * obtained in writing. Requests for such permissions may be sent to
- *
- *      Dr. Andrew S. Tanenbaum
- *      Wiskundig Seminarium
- *      Vrije Universiteit
- *      Postbox 7161
- *      1007 MC Amsterdam
- *      The Netherlands
- *
- */
-
-#include	<pc_file.h>
-
-extern		_wf();
-extern		_outcpt();
-
-_put(f) struct file *f; {
-	_wf(f);
-	_outcpt(f);
-}
Index: trunk/minix/lib/ack/libp/rcka.c
===================================================================
--- trunk/minix/lib/ack/libp/rcka.c	(revision 9)
+++ 	(revision )
@@ -1,25 +1,0 @@
-/* $Header: /cvsup/minix/src/lib/ack/libp/rcka.c,v 1.1 2005/10/10 15:27:47 beng Exp $ */
-/*
- * (c) copyright 1990 by the Vrije Universiteit, Amsterdam, The Netherlands.
- * See the copyright notice in the ACK home directory, in the file "Copyright".
- */
-
-/* Author: Hans van Eck */
-
-#include	<em_abs.h>
-
-extern _trp();
-
-struct array_descr	{
-		int		lbound;
-		unsigned	n_elts_min_one;
-		unsigned	size;		/* doesn't really matter */
-	    };
-
-_rcka(descr, index)
-struct array_descr *descr;
-{
-	if( index < descr->lbound ||
-	    index > (int) descr->n_elts_min_one + descr->lbound )
-		_trp(EARRAY);
-}
Index: trunk/minix/lib/ack/libp/rdc.c
===================================================================
--- trunk/minix/lib/ack/libp/rdc.c	(revision 9)
+++ 	(revision )
@@ -1,31 +1,0 @@
-/* $Header: /cvsup/minix/src/lib/ack/libp/rdc.c,v 1.1 2005/10/10 15:27:47 beng Exp $ */
-/*
- * (c) copyright 1983 by the Vrije Universiteit, Amsterdam, The Netherlands.
- *
- *          This product is part of the Amsterdam Compiler Kit.
- *
- * Permission to use, sell, duplicate or disclose this software must be
- * obtained in writing. Requests for such permissions may be sent to
- *
- *      Dr. Andrew S. Tanenbaum
- *      Wiskundig Seminarium
- *      Vrije Universiteit
- *      Postbox 7161
- *      1007 MC Amsterdam
- *      The Netherlands
- *
- */
-
-#include	<pc_file.h>
-
-extern		_rf();
-extern		_incpt();
-
-int _rdc(f) struct file *f; {
-	int c;
-
-	_rf(f);
-	c = *f->ptr;
-	_incpt(f);
-	return(c);
-}
Index: trunk/minix/lib/ack/libp/rdi.c
===================================================================
--- trunk/minix/lib/ack/libp/rdi.c	(revision 9)
+++ 	(revision )
@@ -1,78 +1,0 @@
-/* $Header: /cvsup/minix/src/lib/ack/libp/rdi.c,v 1.1 2005/10/10 15:27:47 beng Exp $ */
-/*
- * (c) copyright 1983 by the Vrije Universiteit, Amsterdam, The Netherlands.
- *
- *          This product is part of the Amsterdam Compiler Kit.
- *
- * Permission to use, sell, duplicate or disclose this software must be
- * obtained in writing. Requests for such permissions may be sent to
- *
- *      Dr. Andrew S. Tanenbaum
- *      Wiskundig Seminarium
- *      Vrije Universiteit
- *      Postbox 7161
- *      1007 MC Amsterdam
- *      The Netherlands
- *
- */
-
-/* Author: J.W. Stevenson */
-
-#include	<pc_file.h>
-#include	<pc_err.h>
-
-extern		_trp();
-extern		_rf();
-extern		_incpt();
-
-_skipsp(f) struct file *f; {
-	while ((*f->ptr == ' ') || (*f->ptr == '\t'))
-		_incpt(f);
-}
-
-int _getsig(f) struct file *f; {
-	int sign;
-
-	if ((sign = (*f->ptr == '-')) || *f->ptr == '+')
-		_incpt(f);
-	return(sign);
-}
-
-int _fstdig(f) struct file *f; {
-	int ch;
-
-	ch = *f->ptr - '0';
-	if ((unsigned) ch > 9) {
-		_trp(EDIGIT);
-		ch = 0;
-	}
-	return(ch);
-}
-
-int _nxtdig(f) struct file *f; {
-	int ch;
-
-	_incpt(f);
-	ch = *f->ptr - '0';
-	if ((unsigned) ch > 9)
-		return(-1);
-	return(ch);
-}
-
-int _getint(f) struct file *f; {
-	int is_signed,i,ch;
-
-	is_signed = _getsig(f);
-	ch = _fstdig(f);
-	i = 0;
-	do
-		i = i*10 - ch;
-	while ((ch = _nxtdig(f)) >= 0);
-	return(is_signed ? i : -i);
-}
-
-int _rdi(f) struct file *f; {
-	_rf(f);
-	_skipsp(f);
-	return(_getint(f));
-}
Index: trunk/minix/lib/ack/libp/rdl.c
===================================================================
--- trunk/minix/lib/ack/libp/rdl.c	(revision 9)
+++ 	(revision )
@@ -1,41 +1,0 @@
-/* $Header: /cvsup/minix/src/lib/ack/libp/rdl.c,v 1.1 2005/10/10 15:27:47 beng Exp $ */
-/*
- * (c) copyright 1983 by the Vrije Universiteit, Amsterdam, The Netherlands.
- *
- *          This product is part of the Amsterdam Compiler Kit.
- *
- * Permission to use, sell, duplicate or disclose this software must be
- * obtained in writing. Requests for such permissions may be sent to
- *
- *      Dr. Andrew S. Tanenbaum
- *      Wiskundig Seminarium
- *      Vrije Universiteit
- *      Postbox 7161
- *      1007 MC Amsterdam
- *      The Netherlands
- *
- */
-
-/* Author: J.W. Stevenson */
-
-#include	<pc_file.h>
-
-extern		_rf();
-extern		_skipsp();
-extern int	_getsig();
-extern int	_fstdig();
-extern int	_nxtdig();
-
-long _rdl(f) struct file *f; {
-	int is_signed,ch; long l;
-
-	_rf(f);
-	_skipsp(f);
-	is_signed = _getsig(f);
-	ch = _fstdig(f);
-	l = 0;
-	do
-		l = l*10 - ch;
-	while ((ch = _nxtdig(f)) >= 0);
-	return(is_signed ? l : -l);
-}
Index: trunk/minix/lib/ack/libp/rdr.c
===================================================================
--- trunk/minix/lib/ack/libp/rdr.c	(revision 9)
+++ 	(revision )
@@ -1,78 +1,0 @@
-/* $Header: /cvsup/minix/src/lib/ack/libp/rdr.c,v 1.1 2005/10/10 15:27:47 beng Exp $ */
-/*
- * (c) copyright 1983 by the Vrije Universiteit, Amsterdam, The Netherlands.
- *
- *          This product is part of the Amsterdam Compiler Kit.
- *
- * Permission to use, sell, duplicate or disclose this software must be
- * obtained in writing. Requests for such permissions may be sent to
- *
- *      Dr. Andrew S. Tanenbaum
- *      Wiskundig Seminarium
- *      Vrije Universiteit
- *      Postbox 7161
- *      1007 MC Amsterdam
- *      The Netherlands
- *
- */
-
-/* Author: J.W. Stevenson */
-
-#include	<pc_file.h>
-
-#define	BIG	1e17
-
-extern		_rf();
-extern		_incpt();
-extern		_skipsp();
-extern int	_getsig();
-extern int	_getint();
-extern int	_fstdig();
-extern int	_nxtdig();
-
-static double		r;
-static int		pow10;
-
-static dig(ch) int ch; {
-
-	if (r>BIG)
-		pow10++;
-	else
-		r = r*10.0 + ch;
-}
-
-double _rdr(f) struct file *f; {
-	int i; double e; int is_signed,ch;
-
-	r = 0;
-	pow10 = 0;
-	_rf(f);
-	_skipsp(f);
-	is_signed = _getsig(f);
-	ch = _fstdig(f);
-	do
-		dig(ch);
-	while ((ch = _nxtdig(f)) >= 0);
-	if (*f->ptr == '.') {
-		_incpt(f);
-		ch = _fstdig(f);
-		do {
-			dig(ch);
-			pow10--;
-		} while ((ch = _nxtdig(f)) >= 0);
-	}
-	if ((*f->ptr == 'e') || (*f->ptr == 'E')) {
-		_incpt(f);
-		pow10 += _getint(f);
-	}
-	if ((i = pow10) < 0)
-		i = -i;
-	e = 1.0;
-	while (--i >= 0)
-		e *= 10.0;
-	if (pow10<0)
-		r /= e;
-	else
-		r *= e;
-	return(is_signed? -r : r);
-}
Index: trunk/minix/lib/ack/libp/rf.c
===================================================================
--- trunk/minix/lib/ack/libp/rf.c	(revision 9)
+++ 	(revision )
@@ -1,35 +1,0 @@
-/* $Header: /cvsup/minix/src/lib/ack/libp/rf.c,v 1.1 2005/10/10 15:27:47 beng Exp $ */
-/*
- * (c) copyright 1983 by the Vrije Universiteit, Amsterdam, The Netherlands.
- *
- *          This product is part of the Amsterdam Compiler Kit.
- *
- * Permission to use, sell, duplicate or disclose this software must be
- * obtained in writing. Requests for such permissions may be sent to
- *
- *      Dr. Andrew S. Tanenbaum
- *      Wiskundig Seminarium
- *      Vrije Universiteit
- *      Postbox 7161
- *      1007 MC Amsterdam
- *      The Netherlands
- *
- */
-
-#include	<pc_file.h>
-#include	<pc_err.h>
-
-extern struct file	*_curfil;
-extern			_trp();
-extern			_incpt();
-
-_rf(f) struct file *f; {
-
-	_curfil = f;
-	if ((f->flags&0377) != MAGIC)
-		_trp(EBADF);
-	if (f->flags & WRBIT)
-		_trp(EREADF);
-	if ((f->flags & WINDOW) == 0)
-		_incpt(f);
-}
Index: trunk/minix/lib/ack/libp/rln.c
===================================================================
--- trunk/minix/lib/ack/libp/rln.c	(revision 9)
+++ 	(revision )
@@ -1,30 +1,0 @@
-/* $Header: /cvsup/minix/src/lib/ack/libp/rln.c,v 1.1 2005/10/10 15:27:47 beng Exp $ */
-/*
- * (c) copyright 1983 by the Vrije Universiteit, Amsterdam, The Netherlands.
- *
- *          This product is part of the Amsterdam Compiler Kit.
- *
- * Permission to use, sell, duplicate or disclose this software must be
- * obtained in writing. Requests for such permissions may be sent to
- *
- *      Dr. Andrew S. Tanenbaum
- *      Wiskundig Seminarium
- *      Vrije Universiteit
- *      Postbox 7161
- *      1007 MC Amsterdam
- *      The Netherlands
- *
- */
-
-#include	<pc_file.h>
-
-extern		_rf();
-extern		_incpt();
-
-_rln(f) struct file *f; {
-
-	_rf(f);
-	while ((f->flags & ELNBIT) == 0)
-		_incpt(f);
-	f->flags &= ~WINDOW;
-}
Index: trunk/minix/lib/ack/libp/rnd.c
===================================================================
--- trunk/minix/lib/ack/libp/rnd.c	(revision 9)
+++ 	(revision )
@@ -1,21 +1,0 @@
-/* $Header: /cvsup/minix/src/lib/ack/libp/rnd.c,v 1.1 2005/10/10 15:27:47 beng Exp $ */
-/*
- * (c) copyright 1983 by the Vrije Universiteit, Amsterdam, The Netherlands.
- *
- *          This product is part of the Amsterdam Compiler Kit.
- *
- * Permission to use, sell, duplicate or disclose this software must be
- * obtained in writing. Requests for such permissions may be sent to
- *
- *      Dr. Andrew S. Tanenbaum
- *      Wiskundig Seminarium
- *      Vrije Universiteit
- *      Postbox 7161
- *      1007 MC Amsterdam
- *      The Netherlands
- *
- */
-
-double _rnd(r) double r; {
-	return(r + (r<0 ? -0.5 : 0.5));
-}
Index: trunk/minix/lib/ack/libp/sav.e
===================================================================
--- trunk/minix/lib/ack/libp/sav.e	(revision 9)
+++ 	(revision )
@@ -1,49 +1,0 @@
-#
-; $Header: /cvsup/minix/src/lib/ack/libp/sav.e,v 1.1 2005/10/10 15:27:47 beng Exp $
-;  (c) copyright 1983 by the Vrije Universiteit, Amsterdam, The Netherlands.
-; 
-;           This product is part of the Amsterdam Compiler Kit.
-; 
-;  Permission to use, sell, duplicate or disclose this software must be
-;  obtained in writing. Requests for such permissions may be sent to
-; 
-;       Dr. Andrew S. Tanenbaum
-;       Wiskundig Seminarium
-;       Vrije Universiteit
-;       Postbox 7161
-;       1007 MC Amsterdam
-;       The Netherlands
-; 
-
-/* Author: J.W. Stevenson */
-
-
- mes 2,_EM_WSIZE,_EM_PSIZE
-
-#define	PTRAD	0
-
-#define	HP	2
-
-; _sav called with one parameter:
-;	- address of pointer variable (PTRAD)
-
- exp $_sav
- pro $_sav,0
- lor HP
- lal PTRAD
- loi _EM_PSIZE
- sti _EM_PSIZE
- ret 0
- end ?
-
-; _rst is called with one parameter:
-;	- address of pointer variable (PTRAD)
-
- exp $_rst
- pro $_rst,0
- lal PTRAD
- loi _EM_PSIZE
- loi _EM_PSIZE
- str HP
- ret 0
- end ?
Index: trunk/minix/lib/ack/libp/sig.e
===================================================================
--- trunk/minix/lib/ack/libp/sig.e	(revision 9)
+++ 	(revision )
@@ -1,35 +1,0 @@
-#define PROC    0
-
-; $Header: /cvsup/minix/src/lib/ack/libp/sig.e,v 1.1 2005/10/10 15:27:47 beng Exp $
-;
-; (c) copyright 1983 by the Vrije Universiteit, Amsterdam, The Netherlands.
-;
-;          This product is part of the Amsterdam Compiler Kit.
-;
-; Permission to use, sell, duplicate or disclose this software must be
-; obtained in writing. Requests for such permissions may be sent to
-;
-;      Dr. Andrew S. Tanenbaum
-;      Wiskundig Seminarium
-;      Vrije Universiteit
-;      Postbox 7161
-;      1007 MC Amsterdam
-;      The Netherlands
-;
-;
-
- mes 2,_EM_WSIZE,_EM_PSIZE
-
-; _sig is called with one parameter:
-;       - procedure instance identifier (PROC)
-; and returns nothing.
-; only the procedure identifier inside the PROC is used.
-
- exp $_sig
- pro $_sig,0
- lal PROC
- loi _EM_PSIZE
- sig
- asp _EM_PSIZE
- ret 0                  ; ignore the result of sig
- end ?
Index: trunk/minix/lib/ack/libp/sin.c
===================================================================
--- trunk/minix/lib/ack/libp/sin.c	(revision 9)
+++ 	(revision )
@@ -1,101 +1,0 @@
-/*
- * (c) copyright 1988 by the Vrije Universiteit, Amsterdam, The Netherlands.
- * See the copyright notice in the ACK home directory, in the file "Copyright".
- *
- * Author: Ceriel J.H. Jacobs
- */
-
-/* $Header: /cvsup/minix/src/lib/ack/libp/sin.c,v 1.1 2005/10/10 15:27:47 beng Exp $ */
-
-#define __NO_DEFS
-#include <math.h>
-
-#if __STDC__
-#include <pc_math.h>
-#endif
-
-static double
-sinus(x, cos_flag)
-	double x;
-{
-	/*	Algorithm and coefficients from:
-			"Software manual for the elementary functions"
-			by W.J. Cody and W. Waite, Prentice-Hall, 1980
-	*/
-
-	static double r[] = {
-		-0.16666666666666665052e+0,
-		 0.83333333333331650314e-2,
-		-0.19841269841201840457e-3,
-		 0.27557319210152756119e-5,
-		-0.25052106798274584544e-7,
-		 0.16058936490371589114e-9,
-		-0.76429178068910467734e-12,
-		 0.27204790957888846175e-14
-	};
-
-	double	xsqr;
-	double	y;
-	int	neg = 0;
-
-	if (x < 0) {
-		x = -x;
-		neg = 1;
-	}
-	if (cos_flag) {
-		neg = 0;
-		y = M_PI_2 + x;
-	}
-	else	y = x;
-
-	/* ??? avoid loss of significance, if y is too large, error ??? */
-
-	y = y * M_1_PI + 0.5;
-
-	/*	Use extended precision to calculate reduced argument.
-		Here we used 12 bits of the mantissa for a1.
-		Also split x in integer part x1 and fraction part x2.
-	*/
-#define A1 3.1416015625
-#define A2 -8.908910206761537356617e-6
-	{
-		double x1, x2;
-		extern double	_fif();
-
-		_fif(y, 1.0,  &y);
-		if (_fif(y, 0.5, &x1)) neg = !neg;
-		if (cos_flag) y -= 0.5;
-		x2 = _fif(x, 1.0, &x1);
-		x = x1 - y * A1;
-		x += x2;
-		x -= y * A2;
-#undef A1
-#undef A2
-	}
-
-	if (x < 0) {
-		neg = !neg;
-		x = -x;
-	}
-
-	/* ??? avoid underflow ??? */
-
-	y = x * x;
-	x += x * y * POLYNOM7(y, r);
-	return neg ? -x : x;
-}
-
-double
-_sin(x)
-	double x;
-{
-	return sinus(x, 0);
-}
-
-double
-_cos(x)
-	double x;
-{
-	if (x < 0) x = -x;
-	return sinus(x, 1);
-}
Index: trunk/minix/lib/ack/libp/sqt.c
===================================================================
--- trunk/minix/lib/ack/libp/sqt.c	(revision 9)
+++ 	(revision )
@@ -1,72 +1,0 @@
-/*
- * (c) copyright 1988 by the Vrije Universiteit, Amsterdam, The Netherlands.
- * See the copyright notice in the ACK home directory, in the file "Copyright".
- *
- * Author: Ceriel J.H. Jacobs
- */
-
-/* $Header: /cvsup/minix/src/lib/ack/libp/sqt.c,v 1.1 2005/10/10 15:27:47 beng Exp $ */
-#define __NO_DEFS
-#include <math.h>
-#include <pc_err.h>
-extern	_trp();
-
-#define NITER	5
-
-static double
-Ldexp(fl,exp)
-	double fl;
-	int exp;
-{
-	extern double _fef();
-	int sign = 1;
-	int currexp;
-
-	if (fl<0) {
-		fl = -fl;
-		sign = -1;
-	}
-	fl = _fef(fl,&currexp);
-	exp += currexp;
-	if (exp > 0) {
-		while (exp>30) {
-			fl *= (double) (1L << 30);
-			exp -= 30;
-		}
-		fl *= (double) (1L << exp);
-	}
-	else	{
-		while (exp<-30) {
-			fl /= (double) (1L << 30);
-			exp += 30;
-		}
-		fl /= (double) (1L << -exp);
-	}
-	return sign * fl;
-}
-
-double
-_sqt(x)
-	double x;
-{
-	extern double _fef();
-	int exponent;
-	double val;
-
-	if (x <= 0) {
-		if (x < 0) _trp(ESQT);
-		return 0;
-	}
-
-	val = _fef(x, &exponent);
-	if (exponent & 1) {
-		exponent--;
-		val *= 2;
-	}
-	val = Ldexp(val + 1.0, exponent/2 - 1);
-	/* was: val = (val + 1.0)/2.0; val = Ldexp(val, exponent/2); */
-	for (exponent = NITER - 1; exponent >= 0; exponent--) {
-		val = (val + x / val) / 2.0;
-	}
-	return val;
-}
Index: trunk/minix/lib/ack/libp/string.c
===================================================================
--- trunk/minix/lib/ack/libp/string.c	(revision 9)
+++ 	(revision )
@@ -1,60 +1,0 @@
-/* $Header: /cvsup/minix/src/lib/ack/libp/string.c,v 1.1 2005/10/10 15:27:47 beng Exp $ */
-/*
- * (c) copyright 1983 by the Vrije Universiteit, Amsterdam, The Netherlands.
- *
- *          This product is part of the Amsterdam Compiler Kit.
- *
- * Permission to use, sell, duplicate or disclose this software must be
- * obtained in writing. Requests for such permissions may be sent to
- *
- *      Dr. Andrew S. Tanenbaum
- *      Wiskundig Seminarium
- *      Vrije Universiteit
- *      Postbox 7161
- *      1007 MC Amsterdam
- *      The Netherlands
- *
- */
-
-/* function strbuf(var b:charbuf):string; */
-
-char *strbuf(s) char *s; {
-	return(s);
-}
-
-/* function strtobuf(s:string; var b:charbuf; blen:integer):integer; */
-
-int strtobuf(s,b,l) char *s,*b; {
-	int i;
-
-	i = 0;
-	while (--l>=0) {
-		if ((*b++ = *s++) == 0)
-			break;
-		i++;
-	}
-	return(i);
-}
-
-/* function strlen(s:string):integer; */
-
-int strlen(s) char *s; {
-	int i;
-
-	i = 0;
-	while (*s++)
-		i++;
-	return(i);
-}
-
-/* function strfetch(s:string; i:integer):char; */
-
-int strfetch(s,i) char *s; {
-	return(s[i-1]);
-}
-
-/* procedure strstore(s:string; i:integer; c:char); */
-
-strstore(s,i,c) char *s; {
-	s[i-1] = c;
-}
Index: trunk/minix/lib/ack/libp/trap.e
===================================================================
--- trunk/minix/lib/ack/libp/trap.e	(revision 9)
+++ 	(revision )
@@ -1,33 +1,0 @@
-#
-
-; $Header: /cvsup/minix/src/lib/ack/libp/trap.e,v 1.1 2005/10/10 15:27:47 beng Exp $
-;
-; (c) copyright 1983 by the Vrije Universiteit, Amsterdam, The Netherlands.
-;
-;          This product is part of the Amsterdam Compiler Kit.
-;
-; Permission to use, sell, duplicate or disclose this software must be
-; obtained in writing. Requests for such permissions may be sent to
-;
-;      Dr. Andrew S. Tanenbaum
-;      Wiskundig Seminarium
-;      Vrije Universiteit
-;      Postbox 7161
-;      1007 MC Amsterdam
-;      The Netherlands
-;
-;
-
- mes 2,_EM_WSIZE,_EM_PSIZE
-
-#define	TRAP	0
-
-; trap is called with one parameter:
-;	- trap number (TRAP)
-
- exp $trap
- pro $trap,0
- lol TRAP
- trp
- ret 0
- end ?
Index: trunk/minix/lib/ack/libp/trp.e
===================================================================
--- trunk/minix/lib/ack/libp/trp.e	(revision 9)
+++ 	(revision )
@@ -1,38 +1,0 @@
-#
-
-; $Header: /cvsup/minix/src/lib/ack/libp/trp.e,v 1.1 2005/10/10 15:27:47 beng Exp $
-;
-; (c) copyright 1983 by the Vrije Universiteit, Amsterdam, The Netherlands.
-;
-;          This product is part of the Amsterdam Compiler Kit.
-;
-; Permission to use, sell, duplicate or disclose this software must be
-; obtained in writing. Requests for such permissions may be sent to
-;
-;      Dr. Andrew S. Tanenbaum
-;      Wiskundig Seminarium
-;      Vrije Universiteit
-;      Postbox 7161
-;      1007 MC Amsterdam
-;      The Netherlands
-;
-;
-
- mes 2,_EM_WSIZE,_EM_PSIZE
-
-#define TRAP    0
-
-; _trp() and trap() perform the same function,
-; but have to be separate. trap exists to facilitate the user.
-; _trp is there for the system, trap cannot be used for that purpose
-; because a user might define its own Pascal routine called trap.
-
-; _trp is called with one parameter:
-;       - trap number (TRAP)
-
- exp $_trp
- pro $_trp,0
- lol TRAP
- trp
- ret 0
- end ?
Index: trunk/minix/lib/ack/libp/unp.c
===================================================================
--- trunk/minix/lib/ack/libp/unp.c	(revision 9)
+++ 	(revision )
@@ -1,65 +1,0 @@
-/* $Header: /cvsup/minix/src/lib/ack/libp/unp.c,v 1.1 2005/10/10 15:27:47 beng Exp $ */
-/*
- * (c) copyright 1983 by the Vrije Universiteit, Amsterdam, The Netherlands.
- *
- *          This product is part of the Amsterdam Compiler Kit.
- *
- * Permission to use, sell, duplicate or disclose this software must be
- * obtained in writing. Requests for such permissions may be sent to
- *
- *      Dr. Andrew S. Tanenbaum
- *      Wiskundig Seminarium
- *      Vrije Universiteit
- *      Postbox 7161
- *      1007 MC Amsterdam
- *      The Netherlands
- *
- */
-
-/* Author: J.W. Stevenson */
-
-#include	<pc_err.h>
-
-extern		_trp();
-
-#define	assert(x)	/* nothing */
-
-#ifndef EM_WSIZE
-#define EM_WSIZE _EM_WSIZE
-#endif
-
-struct descr {
-	int	low;
-	int	diff;
-	int	size;
-};
-
-_unp(ad,zd,i,ap,zp,noext) int i; struct descr *ad,*zd; char *ap,*zp; int noext; {
-
-	if (zd->diff > ad->diff ||
-			(i -= ad->low) < 0 ||
-			(i+zd->diff) > ad->diff)
-		_trp(EUNPACK);
-	ap += (i * ad->size);
-	i = (zd->diff + 1) * zd->size;
-	if (zd->size == 1) {
-		int *aptmp = (int *) ap;
-		assert(ad->size == EM_WSIZE);
-		while (--i >= 0)
-			if (noext) *aptmp++ = *zp++ & 0377;
-			else *aptmp++ = *zp++;
-#if EM_WSIZE > 2
-	} else if (zd->size == 2) {
-		int *aptmp = (int *) ap;
-		short *zptmp = (short *) zp;
-		assert(ad->size == EM_WSIZE);
-		while (--i >= 0)
-			if (noext) *aptmp++ = *zptmp++ & 0177777;
-			else *aptmp++ = *zptmp++;
-#endif
-	} else {
-		assert(ad->size == zd->size);
-		while (--i >= 0)
-			*ap++ = *zp++;
-	}
-}
Index: trunk/minix/lib/ack/libp/uread.c
===================================================================
--- trunk/minix/lib/ack/libp/uread.c	(revision 9)
+++ 	(revision )
@@ -1,25 +1,0 @@
-/* $Header: /cvsup/minix/src/lib/ack/libp/uread.c,v 1.1 2005/10/10 15:27:47 beng Exp $ */
-/*
- * (c) copyright 1983 by the Vrije Universiteit, Amsterdam, The Netherlands.
- *
- *          This product is part of the Amsterdam Compiler Kit.
- *
- * Permission to use, sell, duplicate or disclose this software must be
- * obtained in writing. Requests for such permissions may be sent to
- *
- *      Dr. Andrew S. Tanenbaum
- *      Wiskundig Seminarium
- *      Vrije Universiteit
- *      Postbox 7161
- *      1007 MC Amsterdam
- *      The Netherlands
- *
- */
-
-/* function uread(fd:integer; var b:buf; n:integer):integer; */
-
-extern int	_read();
-
-int uread(fd,b,n) char *b; int fd,n; {
-	return(_read(fd,b,n));
-}
Index: trunk/minix/lib/ack/libp/uwrite.c
===================================================================
--- trunk/minix/lib/ack/libp/uwrite.c	(revision 9)
+++ 	(revision )
@@ -1,25 +1,0 @@
-/* $Header: /cvsup/minix/src/lib/ack/libp/uwrite.c,v 1.1 2005/10/10 15:27:47 beng Exp $ */
-/*
- * (c) copyright 1983 by the Vrije Universiteit, Amsterdam, The Netherlands.
- *
- *          This product is part of the Amsterdam Compiler Kit.
- *
- * Permission to use, sell, duplicate or disclose this software must be
- * obtained in writing. Requests for such permissions may be sent to
- *
- *      Dr. Andrew S. Tanenbaum
- *      Wiskundig Seminarium
- *      Vrije Universiteit
- *      Postbox 7161
- *      1007 MC Amsterdam
- *      The Netherlands
- *
- */
-
-/* function uwrite(fd:integer; var b:buf; n:integer):integer; */
-
-extern int	_write();
-
-int uwrite(fd,b,n) char *b; int fd,n; {
-	return(_write(fd,b,n));
-}
Index: trunk/minix/lib/ack/libp/wdw.c
===================================================================
--- trunk/minix/lib/ack/libp/wdw.c	(revision 9)
+++ 	(revision )
@@ -1,30 +1,0 @@
-/* $Header: /cvsup/minix/src/lib/ack/libp/wdw.c,v 1.1 2005/10/10 15:27:47 beng Exp $ */
-/*
- * (c) copyright 1983 by the Vrije Universiteit, Amsterdam, The Netherlands.
- *
- *          This product is part of the Amsterdam Compiler Kit.
- *
- * Permission to use, sell, duplicate or disclose this software must be
- * obtained in writing. Requests for such permissions may be sent to
- *
- *      Dr. Andrew S. Tanenbaum
- *      Wiskundig Seminarium
- *      Vrije Universiteit
- *      Postbox 7161
- *      1007 MC Amsterdam
- *      The Netherlands
- *
- */
-
-#include	<pc_file.h>
-
-extern struct file	*_curfil;
-extern			_incpt();
-
-char *_wdw(f) struct file *f; {
-
-	_curfil = f;
-	if ((f->flags & (WINDOW|WRBIT|0377)) == MAGIC)
-		_incpt(f);
-	return(f->ptr);
-}
Index: trunk/minix/lib/ack/libp/wf.c
===================================================================
--- trunk/minix/lib/ack/libp/wf.c	(revision 9)
+++ 	(revision )
@@ -1,32 +1,0 @@
-/* $Header: /cvsup/minix/src/lib/ack/libp/wf.c,v 1.1 2005/10/10 15:27:47 beng Exp $ */
-/*
- * (c) copyright 1983 by the Vrije Universiteit, Amsterdam, The Netherlands.
- *
- *          This product is part of the Amsterdam Compiler Kit.
- *
- * Permission to use, sell, duplicate or disclose this software must be
- * obtained in writing. Requests for such permissions may be sent to
- *
- *      Dr. Andrew S. Tanenbaum
- *      Wiskundig Seminarium
- *      Vrije Universiteit
- *      Postbox 7161
- *      1007 MC Amsterdam
- *      The Netherlands
- *
- */
-
-#include	<pc_file.h>
-#include	<pc_err.h>
-
-extern struct file	*_curfil;
-extern			_trp();
-
-_wf(f) struct file *f; {
-
-	_curfil = f;
-	if ((f->flags&0377) != MAGIC)
-		_trp(EBADF);
-	if ((f->flags & WRBIT) == 0)
-		_trp(EWRITEF);
-}
Index: trunk/minix/lib/ack/libp/wrc.c
===================================================================
--- trunk/minix/lib/ack/libp/wrc.c	(revision 9)
+++ 	(revision )
@@ -1,41 +1,0 @@
-/* $Header: /cvsup/minix/src/lib/ack/libp/wrc.c,v 1.1 2005/10/10 15:27:47 beng Exp $ */
-/*
- * (c) copyright 1983 by the Vrije Universiteit, Amsterdam, The Netherlands.
- *
- *          This product is part of the Amsterdam Compiler Kit.
- *
- * Permission to use, sell, duplicate or disclose this software must be
- * obtained in writing. Requests for such permissions may be sent to
- *
- *      Dr. Andrew S. Tanenbaum
- *      Wiskundig Seminarium
- *      Vrije Universiteit
- *      Postbox 7161
- *      1007 MC Amsterdam
- *      The Netherlands
- *
- */
-
-#include	<pc_file.h>
-
-extern		_wf();
-extern		_outcpt();
-
-_wrc(c,f) int c; struct file *f; {
-	*f->ptr = c;
-	_wf(f);
-	_outcpt(f);
-}
-
-_wln(f) struct file *f; {
-#ifdef CPM
-	_wrc('\r',f);
-#endif
-	_wrc('\n',f);
-	f->flags |= ELNBIT;
-}
-
-_pag(f) struct file *f; {
-	_wrc('\014',f);
-	f->flags |= ELNBIT;
-}
Index: trunk/minix/lib/ack/libp/wrf.c
===================================================================
--- trunk/minix/lib/ack/libp/wrf.c	(revision 9)
+++ 	(revision )
@@ -1,68 +1,0 @@
-/* $Header: /cvsup/minix/src/lib/ack/libp/wrf.c,v 1.1 2005/10/10 15:27:47 beng Exp $ */
-/*
- * (c) copyright 1983 by the Vrije Universiteit, Amsterdam, The Netherlands.
- *
- *          This product is part of the Amsterdam Compiler Kit.
- *
- * Permission to use, sell, duplicate or disclose this software must be
- * obtained in writing. Requests for such permissions may be sent to
- *
- *      Dr. Andrew S. Tanenbaum
- *      Wiskundig Seminarium
- *      Vrije Universiteit
- *      Postbox 7161
- *      1007 MC Amsterdam
- *      The Netherlands
- *
- */
-
-/* Author: J.W. Stevenson */
-
-#include	<pc_err.h>
-#include	<pc_file.h>
-
-extern		_wstrin();
-extern char	*_fcvt();
-
-#define	assert(x)	/* nothing */
-
-#if __STDC__
-#include <float.h>
-#define	HUGE_DIG	DBL_MAX_10_EXP	/* log10(maxreal) */
-#else
-#define	HUGE_DIG	400	/* log10(maxreal) */
-#endif
-#define	PREC_DIG	80	/* the maximum digits returned by _fcvt() */
-#define	FILL_CHAR	'0'	/* char printed if all of _fcvt() used */
-#define	BUFSIZE		HUGE_DIG + PREC_DIG + 3
-
-_wrf(n,w,r,f) int n,w; double r; struct file *f; {
-	char *p,*b; int s,d; char buf[BUFSIZE];
-
-	if ( n < 0 || w < 0) _trp(EWIDTH);
-	p = buf;
-	if (n > PREC_DIG)
-		n = PREC_DIG;
-	b = _fcvt(r,n,&d,&s);
-	assert(abs(d) <= HUGE_DIG);
-	if (s)
-		*p++ = '-';
-	if (d<=0)
-		*p++ = '0';
-	else
-		do
-			*p++ = (*b ? *b++ : FILL_CHAR);
-		while (--d > 0);
-	if (n > 0)
-		*p++ = '.';
-	while (++d <= 0) {
-		if (--n < 0)
-			break;
-		*p++ = '0';
-	}
-	while (--n >= 0) {
-		*p++ = (*b ? *b++ : FILL_CHAR);
-		assert(p <= buf+BUFSIZE);
-	}
-	_wstrin(w,(int)(p-buf),buf,f);
-}
Index: trunk/minix/lib/ack/libp/wri.c
===================================================================
--- trunk/minix/lib/ack/libp/wri.c	(revision 9)
+++ 	(revision )
@@ -1,72 +1,0 @@
-/* $Header: /cvsup/minix/src/lib/ack/libp/wri.c,v 1.1 2005/10/10 15:27:47 beng Exp $ */
-/*
- * (c) copyright 1983 by the Vrije Universiteit, Amsterdam, The Netherlands.
- *
- *          This product is part of the Amsterdam Compiler Kit.
- *
- * Permission to use, sell, duplicate or disclose this software must be
- * obtained in writing. Requests for such permissions may be sent to
- *
- *      Dr. Andrew S. Tanenbaum
- *      Wiskundig Seminarium
- *      Vrije Universiteit
- *      Postbox 7161
- *      1007 MC Amsterdam
- *      The Netherlands
- *
- */
-
-#include	<pc_err.h>
-#include	<pc_file.h>
-
-extern		_wstrin();
-
-#ifndef EM_WSIZE
-#ifdef _EM_WSIZE
-#define EM_WSIZE _EM_WSIZE
-#endif
-#endif
-
-#if EM_WSIZE==4
-#define SZ 11
-#define MININT -2147483648
-#define STRMININT "-2147483648"
-#endif
-#if EM_WSIZE==2
-#define SZ 6
-#define MININT -32768
-#define STRMININT "-32768"
-#endif
-#if EM_WSIZE==1
-#define SZ 4
-#define MININT -128
-#define STRMININT "-128"
-#endif
-
-#ifndef STRMININT
-Something wrong here!
-#endif
-
-_wsi(w,i,f) int w,i; struct file *f; {
-	char *p; int j; char buf[SZ];
-
-	if (w < 0) _trp(EWIDTH);
-	p = &buf[SZ];
-	if ((j=i) < 0) {
-		if (i == MININT) {
-			_wstrin(w,SZ,STRMININT,f);
-			return;
-		}
-		j = -j;
-	}
-	do
-		*--p = '0' + j%10;
-	while (j /= 10);
-	if (i<0)
-		*--p = '-';
-	_wstrin(w,(int)(&buf[SZ]-p),p,f);
-}
-
-_wri(i,f) int i; struct file *f; {
-	_wsi(SZ,i,f);
-}
Index: trunk/minix/lib/ack/libp/wrl.c
===================================================================
--- trunk/minix/lib/ack/libp/wrl.c	(revision 9)
+++ 	(revision )
@@ -1,51 +1,0 @@
-/* $Header: /cvsup/minix/src/lib/ack/libp/wrl.c,v 1.1 2005/10/10 15:27:47 beng Exp $ */
-/*
- * (c) copyright 1983 by the Vrije Universiteit, Amsterdam, The Netherlands.
- *
- *          This product is part of the Amsterdam Compiler Kit.
- *
- * Permission to use, sell, duplicate or disclose this software must be
- * obtained in writing. Requests for such permissions may be sent to
- *
- *      Dr. Andrew S. Tanenbaum
- *      Wiskundig Seminarium
- *      Vrije Universiteit
- *      Postbox 7161
- *      1007 MC Amsterdam
- *      The Netherlands
- *
- */
-
-/* Author: J.W. Stevenson */
-
-#include	<pc_err.h>
-#include	<pc_file.h>
-
-extern		_wstrin();
-
-#define	MAXNEGLONG	-2147483648
-
-_wsl(w,l,f) int w; long l; struct file *f; {
-	char *p,c; long j; char buf[11];
-
-	if (w < 0) _trp(EWIDTH);
-	p = &buf[11];
-	if ((j=l) < 0) {
-		if (l == MAXNEGLONG) {
-			_wstrin(w,11,"-2147483648",f);
-			return;
-		}
-		j = -j;
-	}
-	do {
-		c = j%10;
-		*--p = c + '0';
-	} while (j /= 10);
-	if (l<0)
-		*--p = '-';
-	_wstrin(w,(int)(&buf[11]-p),p,f);
-}
-
-_wrl(l,f) long l; struct file *f; {
-	_wsl(11,l,f);
-}
Index: trunk/minix/lib/ack/libp/wrr.c
===================================================================
--- trunk/minix/lib/ack/libp/wrr.c	(revision 9)
+++ 	(revision )
@@ -1,67 +1,0 @@
-/* $Header: /cvsup/minix/src/lib/ack/libp/wrr.c,v 1.1 2005/10/10 15:27:47 beng Exp $ */
-/*
- * (c) copyright 1983 by the Vrije Universiteit, Amsterdam, The Netherlands.
- *
- *          This product is part of the Amsterdam Compiler Kit.
- *
- * Permission to use, sell, duplicate or disclose this software must be
- * obtained in writing. Requests for such permissions may be sent to
- *
- *      Dr. Andrew S. Tanenbaum
- *      Wiskundig Seminarium
- *      Vrije Universiteit
- *      Postbox 7161
- *      1007 MC Amsterdam
- *      The Netherlands
- *
- */
-
-/* Author: J.W. Stevenson */
-
-#include	<pc_err.h>
-#include	<pc_file.h>
-
-extern		_wstrin();
-extern char	*_ecvt();
-
-#define	PREC_DIG	80	/* maximum digits produced by _ecvt() */
-
-_wsr(w,r,f) int w; double r; struct file *f; {
-	char *p,*b; int s,d,i; char buf[PREC_DIG+7];
-
-	if (w < 0) _trp(EWIDTH);
-	p = buf;
-	if ((i = w-6) < 2)
-		i = 2;
-	b = _ecvt(r,i,&d,&s);
-	*p++ = s? '-' : ' ';
-	if (*b == '0')
-		d++;
-	*p++ = *b++;
-	*p++ = '.';
-	while (--i > 0)
-		*p++ = *b++;
-	*p++ = 'e';
-	d--;
-	if (d < 0) {
-		d = -d;
-		*p++ = '-';
-	} else
-		*p++ = '+';
-
-	if (d >= 1000) {
-		*p++ = '*';
-		*p++ = '*';
-		*p++ = '*';
-	}
-	else {
-		*p++ = '0' + d/100;
-		*p++ = '0' + (d/10) % 10;
-		*p++ = '0' + d%10;
-	}
-	_wstrin(w,(int)(p-buf),buf,f);
-}
-
-_wrr(r,f) double r; struct file *f; {
-	_wsr(13,r,f);
-}
Index: trunk/minix/lib/ack/libp/wrs.c
===================================================================
--- trunk/minix/lib/ack/libp/wrs.c	(revision 9)
+++ 	(revision )
@@ -1,68 +1,0 @@
-/* $Header: /cvsup/minix/src/lib/ack/libp/wrs.c,v 1.1 2005/10/10 15:27:47 beng Exp $ */
-/*
- * (c) copyright 1983 by the Vrije Universiteit, Amsterdam, The Netherlands.
- *
- *          This product is part of the Amsterdam Compiler Kit.
- *
- * Permission to use, sell, duplicate or disclose this software must be
- * obtained in writing. Requests for such permissions may be sent to
- *
- *      Dr. Andrew S. Tanenbaum
- *      Wiskundig Seminarium
- *      Vrije Universiteit
- *      Postbox 7161
- *      1007 MC Amsterdam
- *      The Netherlands
- *
- */
-
-/* Author: J.W. Stevenson */
-
-#include	<pc_err.h>
-#include	<pc_file.h>
-
-extern		_wf();
-extern		_outcpt();
-
-_wstrin(width,len,buf,f) int width,len; char *buf; struct file *f; {
-
-	_wf(f);
-	for (width -= len; width>0; width--) {
-		*f->ptr = ' ';
-		_outcpt(f);
-	}
-	while (--len >= 0) {
-		*f->ptr = *buf++;
-		_outcpt(f);
-	}
-}
-
-_wsc(w,c,f) int w; char c; struct file *f; {
-
-	if (w < 0) _trp(EWIDTH);
-	_wss(w,1,&c,f);
-}
-
-_wss(w,len,s,f) int w,len; char *s; struct file *f; {
-
-	if (w < 0 || len < 0) _trp(EWIDTH);
-	if (w < len)
-		len = w;
-	_wstrin(w,len,s,f);
-}
-
-_wrs(len,s,f) int len; char *s; struct file *f; {
-	if (len < 0) _trp(EWIDTH);
-	_wss(len,len,s,f);
-}
-
-_wsb(w,b,f) int w,b; struct file *f; {
-	if (b)
-		_wss(w,4,"true",f);
-	else
-		_wss(w,5,"false",f);
-}
-
-_wrb(b,f) int b; struct file *f; {
-	_wsb(5,b,f);
-}
Index: trunk/minix/lib/ack/libp/wrz.c
===================================================================
--- trunk/minix/lib/ack/libp/wrz.c	(revision 9)
+++ 	(revision )
@@ -1,38 +1,0 @@
-/* $Header: /cvsup/minix/src/lib/ack/libp/wrz.c,v 1.1 2005/10/10 15:27:47 beng Exp $ */
-/*
- * (c) copyright 1983 by the Vrije Universiteit, Amsterdam, The Netherlands.
- *
- *          This product is part of the Amsterdam Compiler Kit.
- *
- * Permission to use, sell, duplicate or disclose this software must be
- * obtained in writing. Requests for such permissions may be sent to
- *
- *      Dr. Andrew S. Tanenbaum
- *      Wiskundig Seminarium
- *      Vrije Universiteit
- *      Postbox 7161
- *      1007 MC Amsterdam
- *      The Netherlands
- *
- */
-
-#include	<pc_err.h>
-#include	<pc_file.h>
-
-extern		_wss();
-extern		_wrs();
-
-_wsz(w,s,f) int w; char *s; struct file *f; {
-	char *p;
-
-	if (w < 0) _trp(EWIDTH);
-	for (p=s; *p; p++);
-	_wss(w,(int)(p-s),s,f);
-}
-
-_wrz(s,f) char *s; struct file *f; {
-	char *p;
-
-	for (p=s; *p; p++);
-	_wrs((int)(p-s),s,f);
-}
Index: trunk/minix/lib/ack/liby/Makedepend-ack
===================================================================
--- trunk/minix/lib/ack/liby/Makedepend-ack	(revision 9)
+++ 	(revision )
@@ -1,5 +1,0 @@
-depend-ack:
-	rm .depend-ack
-	touch .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -wo -E' main.c | sed -e 's:^\(.\):../../obj-ack//./ack/liby/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -wo -E' yyerror.c | sed -e 's:^\(.\):../../obj-ack//./ack/liby/\1:' >> .depend-ack
Index: trunk/minix/lib/ack/liby/Makedepend-gnu
===================================================================
--- trunk/minix/lib/ack/liby/Makedepend-gnu	(revision 9)
+++ 	(revision )
@@ -1,3 +1,0 @@
-depend-gnu:
-	rm .depend-gnu
-	touch .depend-gnu
Index: trunk/minix/lib/ack/liby/Makefile
===================================================================
--- trunk/minix/lib/ack/liby/Makefile	(revision 9)
+++ 	(revision )
@@ -1,43 +1,0 @@
-#Generated from ./ack/liby/Makefile.in
-all: all-ack
-
-all-ack:
-all-gnu:
-
-makefiles: Makefile
-Makedepend-ack Makedepend-gnu: 
-	sh ../../generate.sh ./ack/liby ../../obj-ack/ ../../obj-gnu
-
-Makefile: Makefile.in Makedepend-ack Makedepend-gnu
-	sh ../../generate.sh ./ack/liby ../../obj-ack/ ../../obj-gnu
-	@echo
-	@echo *Attention*
-	@echo Makefile is regenerated... rerun command to see changes
-	@echo *Attention*
-	@echo
-
-depend: depend-ack
-all-ack: ../../obj-ack//liby.a
-
-../../obj-ack//liby.a: ../../obj-ack//liby.a(main.o)
-../../obj-ack//liby.a: ../../obj-ack//liby.a(yyerror.o)
-
-../../obj-ack//liby.a:
-	ar cr ../../obj-ack//liby.a ../../obj-ack//./ack/liby/*.o
-	rm ../../obj-ack//./ack/liby/*.o
-
-../../obj-ack//liby.a(main.o): main.c
-	cc -O -D_MINIX -D_POSIX_SOURCE -wo -c -o ../../obj-ack//./ack/liby/main.o main.c
-../../obj-ack//liby.a(yyerror.o): yyerror.c
-	cc -O -D_MINIX -D_POSIX_SOURCE -wo -c -o ../../obj-ack//./ack/liby/yyerror.o yyerror.c
-
-
-
-clean::
-	rm -f ../../obj-ack//./ack/liby/*
-
-include Makedepend-ack
-include .depend-ack
-
-include Makedepend-gnu
-include .depend-gnu
Index: trunk/minix/lib/ack/liby/Makefile.in
===================================================================
--- trunk/minix/lib/ack/liby/Makefile.in	(revision 9)
+++ 	(revision )
@@ -1,11 +1,0 @@
-# Makefile for lib/liby.
-
-CFLAGS="-O -D_MINIX -D_POSIX_SOURCE -wo"
-
-LIBRARIES=liby
-
-liby_FILES=" \
-	main.c \
-	yyerror.c"
-
-TYPE=ack
Index: trunk/minix/lib/ack/liby/main.c
===================================================================
--- trunk/minix/lib/ack/liby/main.c	(revision 9)
+++ 	(revision )
@@ -1,41 +1,0 @@
-/*-
- * Copyright (c) 1990 The Regents of the University of California.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- *    must display the following acknowledgement:
- *	This product includes software developed by the University of
- *	California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- *    may be used to endorse or promote products derived from this software
- *    without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)main.c	5.3 (Berkeley) 1/13/91";
-#endif /* not lint */
-
-main()
-{
-	exit(yyparse());
-}
Index: trunk/minix/lib/ack/liby/yyerror.c
===================================================================
--- trunk/minix/lib/ack/liby/yyerror.c	(revision 9)
+++ 	(revision )
@@ -1,45 +1,0 @@
-/*-
- * Copyright (c) 1990 The Regents of the University of California.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- *    must display the following acknowledgement:
- *	This product includes software developed by the University of
- *	California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- *    may be used to endorse or promote products derived from this software
- *    without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)yyerror.c	5.2 (Berkeley) 5/15/90";
-#endif /* not lint */
-
-#include <stdio.h>
-
-yyerror(msg)
-char *msg;
-{
-	(void)fprintf(stderr, "%s\n", msg);
-	return(0);
-}
Index: trunk/minix/lib/ack/math/Makedepend-ack
===================================================================
--- trunk/minix/lib/ack/math/Makedepend-ack	(revision 9)
+++ 	(revision )
@@ -1,7 +1,0 @@
-depend-ack:
-	rm .depend-ack
-	touch .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -E' frexp.s | sed -e 's:^\(.\):../../obj-ack//./ack/math/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -E' modf.s | sed -e 's:^\(.\):../../obj-ack//./ack/math/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -E' isnan.c | sed -e 's:^\(.\):../../obj-ack//./ack/math/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -E' ldexp.c | sed -e 's:^\(.\):../../obj-ack//./ack/math/\1:' >> .depend-ack
Index: trunk/minix/lib/ack/math/Makedepend-gnu
===================================================================
--- trunk/minix/lib/ack/math/Makedepend-gnu	(revision 9)
+++ 	(revision )
@@ -1,3 +1,0 @@
-depend-gnu:
-	rm .depend-gnu
-	touch .depend-gnu
Index: trunk/minix/lib/ack/math/Makefile
===================================================================
--- trunk/minix/lib/ack/math/Makefile	(revision 9)
+++ 	(revision )
@@ -1,49 +1,0 @@
-#Generated from ./ack/math/Makefile.in
-all: all-ack
-
-all-ack:
-all-gnu:
-
-makefiles: Makefile
-Makedepend-ack Makedepend-gnu: 
-	sh ../../generate.sh ./ack/math ../../obj-ack/ ../../obj-gnu
-
-Makefile: Makefile.in Makedepend-ack Makedepend-gnu
-	sh ../../generate.sh ./ack/math ../../obj-ack/ ../../obj-gnu
-	@echo
-	@echo *Attention*
-	@echo Makefile is regenerated... rerun command to see changes
-	@echo *Attention*
-	@echo
-
-depend: depend-ack
-all-ack: ../../obj-ack//libc.a
-
-../../obj-ack//libc.a: ../../obj-ack//libc.a(frexp.o)
-../../obj-ack//libc.a: ../../obj-ack//libc.a(modf.o)
-../../obj-ack//libc.a: ../../obj-ack//libc.a(isnan.o)
-../../obj-ack//libc.a: ../../obj-ack//libc.a(ldexp.o)
-
-../../obj-ack//libc.a:
-	ar cr ../../obj-ack//libc.a ../../obj-ack//./ack/math/*.o
-	rm ../../obj-ack//./ack/math/*.o
-
-../../obj-ack//libc.a(frexp.o): frexp.s
-	cc -O -D_MINIX -D_POSIX_SOURCE -c -o ../../obj-ack//./ack/math/frexp.o frexp.s
-../../obj-ack//libc.a(modf.o): modf.s
-	cc -O -D_MINIX -D_POSIX_SOURCE -c -o ../../obj-ack//./ack/math/modf.o modf.s
-../../obj-ack//libc.a(isnan.o): isnan.c
-	cc -O -D_MINIX -D_POSIX_SOURCE -c -o ../../obj-ack//./ack/math/isnan.o isnan.c
-../../obj-ack//libc.a(ldexp.o): ldexp.c
-	cc -O -D_MINIX -D_POSIX_SOURCE -c -o ../../obj-ack//./ack/math/ldexp.o ldexp.c
-
-
-
-clean::
-	rm -f ../../obj-ack//./ack/math/*
-
-include Makedepend-ack
-include .depend-ack
-
-include Makedepend-gnu
-include .depend-gnu
Index: trunk/minix/lib/ack/math/Makefile.in
===================================================================
--- trunk/minix/lib/ack/math/Makefile.in	(revision 9)
+++ 	(revision )
@@ -1,13 +1,0 @@
-# Makefile for lib/ack/math.
-
-CFLAGS="-O -D_MINIX -D_POSIX_SOURCE"
-
-LIBRARIES=libc
-
-libc_FILES=" \
-	frexp.s \
-	modf.s \
-	isnan.c \
-	ldexp.c"
-
-TYPE=ack
Index: trunk/minix/lib/ack/math/frexp.s
===================================================================
--- trunk/minix/lib/ack/math/frexp.s	(revision 9)
+++ 	(revision )
@@ -1,35 +1,0 @@
-#
-.sect .text; .sect .rom; .sect .data; .sect .bss
-.extern _frexp
-.sect .text
-_frexp:
-#if __i386
-	push	ebp
-	mov	ebp, esp
-	push	12(ebp)
-	push	8(ebp)
-	mov	eax, esp
-	add	eax, -4
-	push	eax
-	call	.fef8
-	mov	eax, 16(ebp)
-	pop	(eax)
-	pop	eax
-	pop	edx
-	leave
-	ret
-#else /* i86 */
-	push	bp
-	mov	bp, sp
-	lea	bx, 4(bp)
-	mov	cx, #8
-	call	.loi
-	mov	ax, sp
-	add	ax, #-2
-	push	ax
-	call	.fef8
-	mov	bx, 12(bp)
-	pop	(bx)
-	call	.ret8
-	jmp	.cret
-#endif
Index: trunk/minix/lib/ack/math/isnan.c
===================================================================
--- trunk/minix/lib/ack/math/isnan.c	(revision 9)
+++ 	(revision )
@@ -1,11 +1,0 @@
-int __IsNan(double d)
-{
-#if defined(vax) || defined(pdp)
-#else
-	float f = d;
-
-	if ((*((long *) &f) & 0x7f800000) == 0x7f800000 &&
-	    (*((long *) &f) & 0x007fffff) != 0) return 1;
-#endif
-	return 0;
-}
Index: trunk/minix/lib/ack/math/ldexp.c
===================================================================
--- trunk/minix/lib/ack/math/ldexp.c	(revision 9)
+++ 	(revision )
@@ -1,55 +1,0 @@
-/*
- * (c) copyright 1987 by the Vrije Universiteit, Amsterdam, The Netherlands.
- * See the copyright notice in the ACK home directory, in the file "Copyright".
- */
-/* $Header: /cvsup/minix/src/lib/ack/math/ldexp.c,v 1.1 2005/10/10 15:27:47 beng Exp $ */
-
-#include	<math.h>
-#include	<float.h>
-#include	<errno.h>
-
-double
-ldexp(double fl, int exp)
-{
-	int sign = 1;
-	int currexp;
-
-	if (__IsNan(fl)) {
-		errno = EDOM;
-		return fl;
-	}
-	if (fl == 0.0) return 0.0;
-	if (fl<0) {
-		fl = -fl;
-		sign = -1;
-	}
-	if (fl > DBL_MAX) {		/* for infinity */
-		errno = ERANGE;
-		return sign * fl;
-	}
-	fl = frexp(fl,&currexp);
-	exp += currexp;
-	if (exp > 0) {
-		if (exp > DBL_MAX_EXP) {
-			errno = ERANGE;
-			return sign * HUGE_VAL;
-		}
-		while (exp>30) {
-			fl *= (double) (1L << 30);
-			exp -= 30;
-		}
-		fl *= (double) (1L << exp);
-	}
-	else	{
-		/* number need not be normalized */
-		if (exp < DBL_MIN_EXP - DBL_MANT_DIG) {
-			return 0.0;
-		}
-		while (exp<-30) {
-			fl /= (double) (1L << 30);
-			exp += 30;
-		}
-		fl /= (double) (1L << -exp);
-	}
-	return sign * fl;
-}
Index: trunk/minix/lib/ack/math/modf.s
===================================================================
--- trunk/minix/lib/ack/math/modf.s	(revision 9)
+++ 	(revision )
@@ -1,49 +1,0 @@
-#
-.sect .text; .sect .rom; .sect .data; .sect .bss
-.extern _modf
-.sect .text
-_modf:
-#if __i386
-	push	ebp
-	mov	ebp, esp
-	push	12(ebp)
-	push	8(ebp)
-	push	1
-	push	4
-	call	.cif8
-	mov	eax, esp
-	push	eax
-	call	.fif8
-	pop	ecx
-	mov	edx, 16(ebp)
-	pop	ecx
-	pop	ebx
-	mov	0(edx), ecx
-	mov	4(edx), ebx
-	pop	eax
-	pop	edx
-	leave
-	ret
-#else /* i86 */
-	push	bp
-	mov	bp, sp
-	lea	bx, 4(bp)
-	mov	cx, #8
-	call	.loi
-	mov	dx, #1
-	push	dx
-	push	dx
-	push	dx
-	mov	ax, #2
-	push	ax
-	call	.cif8
-	mov	ax, sp
-	push	ax
-	call	.fif8
-	pop	bx
-	mov	bx, 12(bp)
-	mov	cx, #8
-	call	.sti
-	call	.ret8
-	jmp	.cret
-#endif
Index: trunk/minix/lib/ack/rts/Makedepend-ack
===================================================================
--- trunk/minix/lib/ack/rts/Makedepend-ack	(revision 9)
+++ 	(revision )
@@ -1,4 +1,0 @@
-depend-ack:
-	rm .depend-ack
-	touch .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -E' setjmp.e | sed -e 's:^\(.\):../../obj-ack//./ack/rts/\1:' >> .depend-ack
Index: trunk/minix/lib/ack/rts/Makedepend-gnu
===================================================================
--- trunk/minix/lib/ack/rts/Makedepend-gnu	(revision 9)
+++ 	(revision )
@@ -1,3 +1,0 @@
-depend-gnu:
-	rm .depend-gnu
-	touch .depend-gnu
Index: trunk/minix/lib/ack/rts/Makefile
===================================================================
--- trunk/minix/lib/ack/rts/Makefile	(revision 9)
+++ 	(revision )
@@ -1,40 +1,0 @@
-#Generated from ./ack/rts/Makefile.in
-all: all-ack
-
-all-ack:
-all-gnu:
-
-makefiles: Makefile
-Makedepend-ack Makedepend-gnu: 
-	sh ../../generate.sh ./ack/rts ../../obj-ack/ ../../obj-gnu
-
-Makefile: Makefile.in Makedepend-ack Makedepend-gnu
-	sh ../../generate.sh ./ack/rts ../../obj-ack/ ../../obj-gnu
-	@echo
-	@echo *Attention*
-	@echo Makefile is regenerated... rerun command to see changes
-	@echo *Attention*
-	@echo
-
-depend: depend-ack
-all-ack: ../../obj-ack//libc.a
-
-../../obj-ack//libc.a: ../../obj-ack//libc.a(setjmp.o)
-
-../../obj-ack//libc.a:
-	ar cr ../../obj-ack//libc.a ../../obj-ack//./ack/rts/*.o
-	rm ../../obj-ack//./ack/rts/*.o
-
-../../obj-ack//libc.a(setjmp.o): setjmp.e
-	cc -O -D_MINIX -D_POSIX_SOURCE -c -o ../../obj-ack//./ack/rts/setjmp.o setjmp.e
-
-
-
-clean::
-	rm -f ../../obj-ack//./ack/rts/*
-
-include Makedepend-ack
-include .depend-ack
-
-include Makedepend-gnu
-include .depend-gnu
Index: trunk/minix/lib/ack/rts/Makefile.in
===================================================================
--- trunk/minix/lib/ack/rts/Makefile.in	(revision 9)
+++ 	(revision )
@@ -1,9 +1,0 @@
-# Makefile for lib/ack/rts.
-
-CFLAGS="-O -D_MINIX -D_POSIX_SOURCE"
-
-LIBRARIES=libc
-
-libc_FILES=setjmp.e
-
-TYPE=ack
Index: trunk/minix/lib/ack/rts/setjmp.e
===================================================================
--- trunk/minix/lib/ack/rts/setjmp.e	(revision 9)
+++ 	(revision )
@@ -1,112 +1,0 @@
-#
- mes 2,_EM_WSIZE,_EM_PSIZE
-;
-; layout of a setjmp buffer:
-;
-;  -----------------
-; |      flag       |		(!0 when blocked signals saved (POSIX))
-;  -----------------
-; | signal mask/set |		(for Berkeley 4.[2-] / POSIX)
-;  -----------------
-; |                 |
-; |  GTO descriptor |
-; |   (SP, LB, PC)  |
-; |                 |
-;  -----------------
-;
-; setjmp saves the signalmask, PC, SP, and LB of caller, and creates a
-; GTO descriptor from this.
-; The big problem here is how to get the return address, i.e. the PC of
-; the caller; This problem is solved by the front-end, which must pass
-; it as an extra parameter to setjmp.
-
-; a GTO descriptor must be in the global data area
-gtobuf
- bss 3*_EM_PSIZE,0,0
-
- inp $fill_ret_area
- exp $__setjmp
- pro $__setjmp,0
-#if	defined(_POSIX_SOURCE)
-; save mask of currently blocked signals. 
-; longjmp must restore this mask
- lol _EM_PSIZE			; the flag integer at offset _EM_PSIZE
- lal 0
- loi _EM_PSIZE
- stf 3*_EM_PSIZE+_EM_LSIZE
- lol _EM_PSIZE			; the flag integer at offset _EM_PSIZE
- zeq *1
- lal 0
- loi _EM_PSIZE
- adp 3*_EM_PSIZE
- cal $__newsigset
- asp _EM_PSIZE
-1
-#elif	defined(__BSD4_2)
- loc 0
- cal $sigblock
- asp _EM_WSIZE
- lfr _EM_WSIZE
- lal 0
- loi _EM_PSIZE
- stf 3*_EM_PSIZE
-#endif
-; create GTO descriptor for longjmp
- lxl 0
- dch		; Local Base of caller
- lxa 0		; Stackpointer of caller
- lal _EM_PSIZE+_EM_WSIZE
- loi _EM_PSIZE	; Return address of caller
- lal 0
- loi _EM_PSIZE	; address of jmpbuf
- sti 3*_EM_PSIZE	; LB, SP, and PC stored in jmpbuf
- loc 0
- ret _EM_WSIZE	; setjmp must return 0
- end 0
-
- pro $fill_ret_area,0
-; put argument in function result area
- lol 0
- ret _EM_WSIZE
- end 0
-
- exp $longjmp
- pro $longjmp,?
-#if	defined(_POSIX_SOURCE)
-; restore blocked mask
- lal 0
- loi _EM_PSIZE
- lof 3*_EM_PSIZE+_EM_LSIZE
- zeq *2
- lal 0
- loi _EM_PSIZE
- adp 3*_EM_PSIZE
- cal $__oldsigset
- asp _EM_PSIZE
-2
-#elif	defined(__BSD4_2)
-; restore signal mask
- lal 0
- loi _EM_PSIZE
- lof 3*_EM_PSIZE
- cal $_sigsetmask
- asp _EM_WSIZE
- lfr _EM_WSIZE
- asp _EM_WSIZE
-#endif
- lal 0
- loi _EM_PSIZE	; address of jmpbuf
- lae gtobuf
- blm 3*_EM_PSIZE	; fill GTO descriptor from jmpbuf
- lol _EM_PSIZE	; second parameter of longjmp: the return value
- dup _EM_WSIZE
- zne *3
-; of course, longjmp may not return 0!
- inc
-3
-; put return value in function result area
- cal $fill_ret_area
- asp _EM_WSIZE
- gto gtobuf	; there we go ...
-; ASP and GTO do not damage function result area
- end 0
Index: trunk/minix/lib/ansi/Makedepend-ack
===================================================================
--- trunk/minix/lib/ansi/Makedepend-ack	(revision 9)
+++ 	(revision )
@@ -1,67 +1,0 @@
-depend-ack:
-	rm .depend-ack
-	touch .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -D__USG -E' abort.c | sed -e 's:^\(.\):../obj-ack//./ansi/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -D__USG -E' abs.c | sed -e 's:^\(.\):../obj-ack//./ansi/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -D__USG -E' asctime.c | sed -e 's:^\(.\):../obj-ack//./ansi/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -D__USG -E' assert.c | sed -e 's:^\(.\):../obj-ack//./ansi/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -D__USG -E' atexit.c | sed -e 's:^\(.\):../obj-ack//./ansi/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -D__USG -E' atof.c | sed -e 's:^\(.\):../obj-ack//./ansi/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -D__USG -E' atoi.c | sed -e 's:^\(.\):../obj-ack//./ansi/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -D__USG -E' atol.c | sed -e 's:^\(.\):../obj-ack//./ansi/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -D__USG -E' bsearch.c | sed -e 's:^\(.\):../obj-ack//./ansi/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -D__USG -E' calloc.c | sed -e 's:^\(.\):../obj-ack//./ansi/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -D__USG -E' chartab.c | sed -e 's:^\(.\):../obj-ack//./ansi/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -D__USG -E' clock.c | sed -e 's:^\(.\):../obj-ack//./ansi/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -D__USG -E' ctime.c | sed -e 's:^\(.\):../obj-ack//./ansi/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -D__USG -E' difftime.c | sed -e 's:^\(.\):../obj-ack//./ansi/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -D__USG -E' div.c | sed -e 's:^\(.\):../obj-ack//./ansi/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -D__USG -E' errlist.c | sed -e 's:^\(.\):../obj-ack//./ansi/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -D__USG -E' exit.c | sed -e 's:^\(.\):../obj-ack//./ansi/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -D__USG -E' ext_comp.c | sed -e 's:^\(.\):../obj-ack//./ansi/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -D__USG -E' getenv.c | sed -e 's:^\(.\):../obj-ack//./ansi/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -D__USG -E' gmtime.c | sed -e 's:^\(.\):../obj-ack//./ansi/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -D__USG -E' isalnum.c | sed -e 's:^\(.\):../obj-ack//./ansi/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -D__USG -E' isalpha.c | sed -e 's:^\(.\):../obj-ack//./ansi/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -D__USG -E' isascii.c | sed -e 's:^\(.\):../obj-ack//./ansi/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -D__USG -E' iscntrl.c | sed -e 's:^\(.\):../obj-ack//./ansi/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -D__USG -E' isdigit.c | sed -e 's:^\(.\):../obj-ack//./ansi/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -D__USG -E' isgraph.c | sed -e 's:^\(.\):../obj-ack//./ansi/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -D__USG -E' islower.c | sed -e 's:^\(.\):../obj-ack//./ansi/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -D__USG -E' isprint.c | sed -e 's:^\(.\):../obj-ack//./ansi/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -D__USG -E' ispunct.c | sed -e 's:^\(.\):../obj-ack//./ansi/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -D__USG -E' isspace.c | sed -e 's:^\(.\):../obj-ack//./ansi/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -D__USG -E' isupper.c | sed -e 's:^\(.\):../obj-ack//./ansi/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -D__USG -E' isxdigit.c | sed -e 's:^\(.\):../obj-ack//./ansi/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -D__USG -E' labs.c | sed -e 's:^\(.\):../obj-ack//./ansi/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -D__USG -E' ldiv.c | sed -e 's:^\(.\):../obj-ack//./ansi/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -D__USG -E' localeconv.c | sed -e 's:^\(.\):../obj-ack//./ansi/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -D__USG -E' localtime.c | sed -e 's:^\(.\):../obj-ack//./ansi/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -D__USG -E' malloc.c | sed -e 's:^\(.\):../obj-ack//./ansi/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -D__USG -E' mblen.c | sed -e 's:^\(.\):../obj-ack//./ansi/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -D__USG -E' mbstowcs.c | sed -e 's:^\(.\):../obj-ack//./ansi/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -D__USG -E' mbtowc.c | sed -e 's:^\(.\):../obj-ack//./ansi/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -D__USG -E' misc.c | sed -e 's:^\(.\):../obj-ack//./ansi/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -D__USG -E' mktime.c | sed -e 's:^\(.\):../obj-ack//./ansi/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -D__USG -E' qsort.c | sed -e 's:^\(.\):../obj-ack//./ansi/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -D__USG -E' raise.c | sed -e 's:^\(.\):../obj-ack//./ansi/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -D__USG -E' rand.c | sed -e 's:^\(.\):../obj-ack//./ansi/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -D__USG -E' setlocale.c | sed -e 's:^\(.\):../obj-ack//./ansi/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -D__USG -E' sigmisc.c | sed -e 's:^\(.\):../obj-ack//./ansi/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -D__USG -E' signal.c | sed -e 's:^\(.\):../obj-ack//./ansi/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -D__USG -E' strcoll.c | sed -e 's:^\(.\):../obj-ack//./ansi/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -D__USG -E' strcspn.c | sed -e 's:^\(.\):../obj-ack//./ansi/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -D__USG -E' strerror.c | sed -e 's:^\(.\):../obj-ack//./ansi/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -D__USG -E' strftime.c | sed -e 's:^\(.\):../obj-ack//./ansi/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -D__USG -E' strpbrk.c | sed -e 's:^\(.\):../obj-ack//./ansi/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -D__USG -E' strspn.c | sed -e 's:^\(.\):../obj-ack//./ansi/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -D__USG -E' strstr.c | sed -e 's:^\(.\):../obj-ack//./ansi/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -D__USG -E' strtok.c | sed -e 's:^\(.\):../obj-ack//./ansi/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -D__USG -E' strtol.c | sed -e 's:^\(.\):../obj-ack//./ansi/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -D__USG -E' strxfrm.c | sed -e 's:^\(.\):../obj-ack//./ansi/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -D__USG -E' system.c | sed -e 's:^\(.\):../obj-ack//./ansi/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -D__USG -E' tolower.c | sed -e 's:^\(.\):../obj-ack//./ansi/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -D__USG -E' toupper.c | sed -e 's:^\(.\):../obj-ack//./ansi/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -D__USG -E' tzset.c | sed -e 's:^\(.\):../obj-ack//./ansi/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -D__USG -E' wcstombs.c | sed -e 's:^\(.\):../obj-ack//./ansi/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -D__USG -E' wctomb.c | sed -e 's:^\(.\):../obj-ack//./ansi/\1:' >> .depend-ack
Index: trunk/minix/lib/ansi/Makedepend-gnu
===================================================================
--- trunk/minix/lib/ansi/Makedepend-gnu	(revision 9)
+++ 	(revision )
@@ -1,67 +1,0 @@
-depend-gnu:
-	rm .depend-gnu
-	touch .depend-gnu
-	mkdep 'gcc -O -D_MINIX -D_POSIX_SOURCE -D__USG -E' abort.c | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./ansi/\1:' >> .depend-gnu
-	mkdep 'gcc -O -D_MINIX -D_POSIX_SOURCE -D__USG -E' abs.c | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./ansi/\1:' >> .depend-gnu
-	mkdep 'gcc -O -D_MINIX -D_POSIX_SOURCE -D__USG -E' asctime.c | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./ansi/\1:' >> .depend-gnu
-	mkdep 'gcc -O -D_MINIX -D_POSIX_SOURCE -D__USG -E' assert.c | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./ansi/\1:' >> .depend-gnu
-	mkdep 'gcc -O -D_MINIX -D_POSIX_SOURCE -D__USG -E' atexit.c | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./ansi/\1:' >> .depend-gnu
-	mkdep 'gcc -O -D_MINIX -D_POSIX_SOURCE -D__USG -E' atof.c | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./ansi/\1:' >> .depend-gnu
-	mkdep 'gcc -O -D_MINIX -D_POSIX_SOURCE -D__USG -E' atoi.c | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./ansi/\1:' >> .depend-gnu
-	mkdep 'gcc -O -D_MINIX -D_POSIX_SOURCE -D__USG -E' atol.c | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./ansi/\1:' >> .depend-gnu
-	mkdep 'gcc -O -D_MINIX -D_POSIX_SOURCE -D__USG -E' bsearch.c | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./ansi/\1:' >> .depend-gnu
-	mkdep 'gcc -O -D_MINIX -D_POSIX_SOURCE -D__USG -E' calloc.c | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./ansi/\1:' >> .depend-gnu
-	mkdep 'gcc -O -D_MINIX -D_POSIX_SOURCE -D__USG -E' chartab.c | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./ansi/\1:' >> .depend-gnu
-	mkdep 'gcc -O -D_MINIX -D_POSIX_SOURCE -D__USG -E' clock.c | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./ansi/\1:' >> .depend-gnu
-	mkdep 'gcc -O -D_MINIX -D_POSIX_SOURCE -D__USG -E' ctime.c | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./ansi/\1:' >> .depend-gnu
-	mkdep 'gcc -O -D_MINIX -D_POSIX_SOURCE -D__USG -E' difftime.c | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./ansi/\1:' >> .depend-gnu
-	mkdep 'gcc -O -D_MINIX -D_POSIX_SOURCE -D__USG -E' div.c | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./ansi/\1:' >> .depend-gnu
-	mkdep 'gcc -O -D_MINIX -D_POSIX_SOURCE -D__USG -E' errlist.c | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./ansi/\1:' >> .depend-gnu
-	mkdep 'gcc -O -D_MINIX -D_POSIX_SOURCE -D__USG -E' exit.c | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./ansi/\1:' >> .depend-gnu
-	mkdep 'gcc -O -D_MINIX -D_POSIX_SOURCE -D__USG -E' ext_comp.c | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./ansi/\1:' >> .depend-gnu
-	mkdep 'gcc -O -D_MINIX -D_POSIX_SOURCE -D__USG -E' getenv.c | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./ansi/\1:' >> .depend-gnu
-	mkdep 'gcc -O -D_MINIX -D_POSIX_SOURCE -D__USG -E' gmtime.c | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./ansi/\1:' >> .depend-gnu
-	mkdep 'gcc -O -D_MINIX -D_POSIX_SOURCE -D__USG -E' isalnum.c | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./ansi/\1:' >> .depend-gnu
-	mkdep 'gcc -O -D_MINIX -D_POSIX_SOURCE -D__USG -E' isalpha.c | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./ansi/\1:' >> .depend-gnu
-	mkdep 'gcc -O -D_MINIX -D_POSIX_SOURCE -D__USG -E' isascii.c | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./ansi/\1:' >> .depend-gnu
-	mkdep 'gcc -O -D_MINIX -D_POSIX_SOURCE -D__USG -E' iscntrl.c | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./ansi/\1:' >> .depend-gnu
-	mkdep 'gcc -O -D_MINIX -D_POSIX_SOURCE -D__USG -E' isdigit.c | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./ansi/\1:' >> .depend-gnu
-	mkdep 'gcc -O -D_MINIX -D_POSIX_SOURCE -D__USG -E' isgraph.c | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./ansi/\1:' >> .depend-gnu
-	mkdep 'gcc -O -D_MINIX -D_POSIX_SOURCE -D__USG -E' islower.c | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./ansi/\1:' >> .depend-gnu
-	mkdep 'gcc -O -D_MINIX -D_POSIX_SOURCE -D__USG -E' isprint.c | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./ansi/\1:' >> .depend-gnu
-	mkdep 'gcc -O -D_MINIX -D_POSIX_SOURCE -D__USG -E' ispunct.c | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./ansi/\1:' >> .depend-gnu
-	mkdep 'gcc -O -D_MINIX -D_POSIX_SOURCE -D__USG -E' isspace.c | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./ansi/\1:' >> .depend-gnu
-	mkdep 'gcc -O -D_MINIX -D_POSIX_SOURCE -D__USG -E' isupper.c | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./ansi/\1:' >> .depend-gnu
-	mkdep 'gcc -O -D_MINIX -D_POSIX_SOURCE -D__USG -E' isxdigit.c | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./ansi/\1:' >> .depend-gnu
-	mkdep 'gcc -O -D_MINIX -D_POSIX_SOURCE -D__USG -E' labs.c | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./ansi/\1:' >> .depend-gnu
-	mkdep 'gcc -O -D_MINIX -D_POSIX_SOURCE -D__USG -E' ldiv.c | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./ansi/\1:' >> .depend-gnu
-	mkdep 'gcc -O -D_MINIX -D_POSIX_SOURCE -D__USG -E' localeconv.c | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./ansi/\1:' >> .depend-gnu
-	mkdep 'gcc -O -D_MINIX -D_POSIX_SOURCE -D__USG -E' localtime.c | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./ansi/\1:' >> .depend-gnu
-	mkdep 'gcc -O -D_MINIX -D_POSIX_SOURCE -D__USG -E' malloc.c | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./ansi/\1:' >> .depend-gnu
-	mkdep 'gcc -O -D_MINIX -D_POSIX_SOURCE -D__USG -E' mblen.c | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./ansi/\1:' >> .depend-gnu
-	mkdep 'gcc -O -D_MINIX -D_POSIX_SOURCE -D__USG -E' mbstowcs.c | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./ansi/\1:' >> .depend-gnu
-	mkdep 'gcc -O -D_MINIX -D_POSIX_SOURCE -D__USG -E' mbtowc.c | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./ansi/\1:' >> .depend-gnu
-	mkdep 'gcc -O -D_MINIX -D_POSIX_SOURCE -D__USG -E' misc.c | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./ansi/\1:' >> .depend-gnu
-	mkdep 'gcc -O -D_MINIX -D_POSIX_SOURCE -D__USG -E' mktime.c | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./ansi/\1:' >> .depend-gnu
-	mkdep 'gcc -O -D_MINIX -D_POSIX_SOURCE -D__USG -E' qsort.c | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./ansi/\1:' >> .depend-gnu
-	mkdep 'gcc -O -D_MINIX -D_POSIX_SOURCE -D__USG -E' raise.c | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./ansi/\1:' >> .depend-gnu
-	mkdep 'gcc -O -D_MINIX -D_POSIX_SOURCE -D__USG -E' rand.c | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./ansi/\1:' >> .depend-gnu
-	mkdep 'gcc -O -D_MINIX -D_POSIX_SOURCE -D__USG -E' setlocale.c | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./ansi/\1:' >> .depend-gnu
-	mkdep 'gcc -O -D_MINIX -D_POSIX_SOURCE -D__USG -E' sigmisc.c | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./ansi/\1:' >> .depend-gnu
-	mkdep 'gcc -O -D_MINIX -D_POSIX_SOURCE -D__USG -E' signal.c | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./ansi/\1:' >> .depend-gnu
-	mkdep 'gcc -O -D_MINIX -D_POSIX_SOURCE -D__USG -E' strcoll.c | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./ansi/\1:' >> .depend-gnu
-	mkdep 'gcc -O -D_MINIX -D_POSIX_SOURCE -D__USG -E' strcspn.c | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./ansi/\1:' >> .depend-gnu
-	mkdep 'gcc -O -D_MINIX -D_POSIX_SOURCE -D__USG -E' strerror.c | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./ansi/\1:' >> .depend-gnu
-	mkdep 'gcc -O -D_MINIX -D_POSIX_SOURCE -D__USG -E' strftime.c | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./ansi/\1:' >> .depend-gnu
-	mkdep 'gcc -O -D_MINIX -D_POSIX_SOURCE -D__USG -E' strpbrk.c | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./ansi/\1:' >> .depend-gnu
-	mkdep 'gcc -O -D_MINIX -D_POSIX_SOURCE -D__USG -E' strspn.c | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./ansi/\1:' >> .depend-gnu
-	mkdep 'gcc -O -D_MINIX -D_POSIX_SOURCE -D__USG -E' strstr.c | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./ansi/\1:' >> .depend-gnu
-	mkdep 'gcc -O -D_MINIX -D_POSIX_SOURCE -D__USG -E' strtok.c | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./ansi/\1:' >> .depend-gnu
-	mkdep 'gcc -O -D_MINIX -D_POSIX_SOURCE -D__USG -E' strtol.c | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./ansi/\1:' >> .depend-gnu
-	mkdep 'gcc -O -D_MINIX -D_POSIX_SOURCE -D__USG -E' strxfrm.c | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./ansi/\1:' >> .depend-gnu
-	mkdep 'gcc -O -D_MINIX -D_POSIX_SOURCE -D__USG -E' system.c | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./ansi/\1:' >> .depend-gnu
-	mkdep 'gcc -O -D_MINIX -D_POSIX_SOURCE -D__USG -E' tolower.c | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./ansi/\1:' >> .depend-gnu
-	mkdep 'gcc -O -D_MINIX -D_POSIX_SOURCE -D__USG -E' toupper.c | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./ansi/\1:' >> .depend-gnu
-	mkdep 'gcc -O -D_MINIX -D_POSIX_SOURCE -D__USG -E' tzset.c | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./ansi/\1:' >> .depend-gnu
-	mkdep 'gcc -O -D_MINIX -D_POSIX_SOURCE -D__USG -E' wcstombs.c | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./ansi/\1:' >> .depend-gnu
-	mkdep 'gcc -O -D_MINIX -D_POSIX_SOURCE -D__USG -E' wctomb.c | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./ansi/\1:' >> .depend-gnu
Index: trunk/minix/lib/ansi/Makefile
===================================================================
--- trunk/minix/lib/ansi/Makefile	(revision 9)
+++ 	(revision )
@@ -1,493 +1,0 @@
-#Generated from ./ansi/Makefile.in
-all: all-ack
-
-all-ack:
-all-gnu:
-
-makefiles: Makefile
-Makedepend-ack Makedepend-gnu: 
-	sh ../generate.sh ./ansi ../obj-ack/ ../obj-gnu
-
-Makefile: Makefile.in Makedepend-ack Makedepend-gnu
-	sh ../generate.sh ./ansi ../obj-ack/ ../obj-gnu
-	@echo
-	@echo *Attention*
-	@echo Makefile is regenerated... rerun command to see changes
-	@echo *Attention*
-	@echo
-
-depend: depend-ack
-all-ack: ../obj-ack//libc.a
-
-../obj-ack//libc.a: ../obj-ack//libc.a(abort.o)
-../obj-ack//libc.a: ../obj-ack//libc.a(abs.o)
-../obj-ack//libc.a: ../obj-ack//libc.a(asctime.o)
-../obj-ack//libc.a: ../obj-ack//libc.a(assert.o)
-../obj-ack//libc.a: ../obj-ack//libc.a(atexit.o)
-../obj-ack//libc.a: ../obj-ack//libc.a(atof.o)
-../obj-ack//libc.a: ../obj-ack//libc.a(atoi.o)
-../obj-ack//libc.a: ../obj-ack//libc.a(atol.o)
-../obj-ack//libc.a: ../obj-ack//libc.a(bsearch.o)
-../obj-ack//libc.a: ../obj-ack//libc.a(calloc.o)
-../obj-ack//libc.a: ../obj-ack//libc.a(chartab.o)
-../obj-ack//libc.a: ../obj-ack//libc.a(clock.o)
-../obj-ack//libc.a: ../obj-ack//libc.a(ctime.o)
-../obj-ack//libc.a: ../obj-ack//libc.a(difftime.o)
-../obj-ack//libc.a: ../obj-ack//libc.a(div.o)
-../obj-ack//libc.a: ../obj-ack//libc.a(errlist.o)
-../obj-ack//libc.a: ../obj-ack//libc.a(exit.o)
-../obj-ack//libc.a: ../obj-ack//libc.a(ext_comp.o)
-../obj-ack//libc.a: ../obj-ack//libc.a(getenv.o)
-../obj-ack//libc.a: ../obj-ack//libc.a(gmtime.o)
-../obj-ack//libc.a: ../obj-ack//libc.a(isalnum.o)
-../obj-ack//libc.a: ../obj-ack//libc.a(isalpha.o)
-../obj-ack//libc.a: ../obj-ack//libc.a(isascii.o)
-../obj-ack//libc.a: ../obj-ack//libc.a(iscntrl.o)
-../obj-ack//libc.a: ../obj-ack//libc.a(isdigit.o)
-../obj-ack//libc.a: ../obj-ack//libc.a(isgraph.o)
-../obj-ack//libc.a: ../obj-ack//libc.a(islower.o)
-../obj-ack//libc.a: ../obj-ack//libc.a(isprint.o)
-../obj-ack//libc.a: ../obj-ack//libc.a(ispunct.o)
-../obj-ack//libc.a: ../obj-ack//libc.a(isspace.o)
-../obj-ack//libc.a: ../obj-ack//libc.a(isupper.o)
-../obj-ack//libc.a: ../obj-ack//libc.a(isxdigit.o)
-../obj-ack//libc.a: ../obj-ack//libc.a(labs.o)
-../obj-ack//libc.a: ../obj-ack//libc.a(ldiv.o)
-../obj-ack//libc.a: ../obj-ack//libc.a(localeconv.o)
-../obj-ack//libc.a: ../obj-ack//libc.a(localtime.o)
-../obj-ack//libc.a: ../obj-ack//libc.a(malloc.o)
-../obj-ack//libc.a: ../obj-ack//libc.a(mblen.o)
-../obj-ack//libc.a: ../obj-ack//libc.a(mbstowcs.o)
-../obj-ack//libc.a: ../obj-ack//libc.a(mbtowc.o)
-../obj-ack//libc.a: ../obj-ack//libc.a(misc.o)
-../obj-ack//libc.a: ../obj-ack//libc.a(mktime.o)
-../obj-ack//libc.a: ../obj-ack//libc.a(qsort.o)
-../obj-ack//libc.a: ../obj-ack//libc.a(raise.o)
-../obj-ack//libc.a: ../obj-ack//libc.a(rand.o)
-../obj-ack//libc.a: ../obj-ack//libc.a(setlocale.o)
-../obj-ack//libc.a: ../obj-ack//libc.a(sigmisc.o)
-../obj-ack//libc.a: ../obj-ack//libc.a(signal.o)
-../obj-ack//libc.a: ../obj-ack//libc.a(strcoll.o)
-../obj-ack//libc.a: ../obj-ack//libc.a(strcspn.o)
-../obj-ack//libc.a: ../obj-ack//libc.a(strerror.o)
-../obj-ack//libc.a: ../obj-ack//libc.a(strftime.o)
-../obj-ack//libc.a: ../obj-ack//libc.a(strpbrk.o)
-../obj-ack//libc.a: ../obj-ack//libc.a(strspn.o)
-../obj-ack//libc.a: ../obj-ack//libc.a(strstr.o)
-../obj-ack//libc.a: ../obj-ack//libc.a(strtok.o)
-../obj-ack//libc.a: ../obj-ack//libc.a(strtol.o)
-../obj-ack//libc.a: ../obj-ack//libc.a(strxfrm.o)
-../obj-ack//libc.a: ../obj-ack//libc.a(system.o)
-../obj-ack//libc.a: ../obj-ack//libc.a(tolower.o)
-../obj-ack//libc.a: ../obj-ack//libc.a(toupper.o)
-../obj-ack//libc.a: ../obj-ack//libc.a(tzset.o)
-../obj-ack//libc.a: ../obj-ack//libc.a(wcstombs.o)
-../obj-ack//libc.a: ../obj-ack//libc.a(wctomb.o)
-
-../obj-ack//libc.a:
-	ar cr ../obj-ack//libc.a ../obj-ack//./ansi/*.o
-	rm ../obj-ack//./ansi/*.o
-
-../obj-ack//libc.a(abort.o): abort.c
-	cc -O -D_MINIX -D_POSIX_SOURCE -D__USG -c -o ../obj-ack//./ansi/abort.o abort.c
-../obj-ack//libc.a(abs.o): abs.c
-	cc -O -D_MINIX -D_POSIX_SOURCE -D__USG -c -o ../obj-ack//./ansi/abs.o abs.c
-../obj-ack//libc.a(asctime.o): asctime.c
-	cc -O -D_MINIX -D_POSIX_SOURCE -D__USG -c -o ../obj-ack//./ansi/asctime.o asctime.c
-../obj-ack//libc.a(assert.o): assert.c
-	cc -O -D_MINIX -D_POSIX_SOURCE -D__USG -c -o ../obj-ack//./ansi/assert.o assert.c
-../obj-ack//libc.a(atexit.o): atexit.c
-	cc -O -D_MINIX -D_POSIX_SOURCE -D__USG -c -o ../obj-ack//./ansi/atexit.o atexit.c
-../obj-ack//libc.a(atof.o): atof.c
-	cc -O -D_MINIX -D_POSIX_SOURCE -D__USG -c -o ../obj-ack//./ansi/atof.o atof.c
-../obj-ack//libc.a(atoi.o): atoi.c
-	cc -O -D_MINIX -D_POSIX_SOURCE -D__USG -c -o ../obj-ack//./ansi/atoi.o atoi.c
-../obj-ack//libc.a(atol.o): atol.c
-	cc -O -D_MINIX -D_POSIX_SOURCE -D__USG -c -o ../obj-ack//./ansi/atol.o atol.c
-../obj-ack//libc.a(bsearch.o): bsearch.c
-	cc -O -D_MINIX -D_POSIX_SOURCE -D__USG -c -o ../obj-ack//./ansi/bsearch.o bsearch.c
-../obj-ack//libc.a(calloc.o): calloc.c
-	cc -O -D_MINIX -D_POSIX_SOURCE -D__USG -c -o ../obj-ack//./ansi/calloc.o calloc.c
-../obj-ack//libc.a(chartab.o): chartab.c
-	cc -O -D_MINIX -D_POSIX_SOURCE -D__USG -c -o ../obj-ack//./ansi/chartab.o chartab.c
-../obj-ack//libc.a(clock.o): clock.c
-	cc -O -D_MINIX -D_POSIX_SOURCE -D__USG -c -o ../obj-ack//./ansi/clock.o clock.c
-../obj-ack//libc.a(ctime.o): ctime.c
-	cc -O -D_MINIX -D_POSIX_SOURCE -D__USG -c -o ../obj-ack//./ansi/ctime.o ctime.c
-../obj-ack//libc.a(difftime.o): difftime.c
-	cc -O -D_MINIX -D_POSIX_SOURCE -D__USG -c -o ../obj-ack//./ansi/difftime.o difftime.c
-../obj-ack//libc.a(div.o): div.c
-	cc -O -D_MINIX -D_POSIX_SOURCE -D__USG -c -o ../obj-ack//./ansi/div.o div.c
-../obj-ack//libc.a(errlist.o): errlist.c
-	cc -O -D_MINIX -D_POSIX_SOURCE -D__USG -c -o ../obj-ack//./ansi/errlist.o errlist.c
-../obj-ack//libc.a(exit.o): exit.c
-	cc -O -D_MINIX -D_POSIX_SOURCE -D__USG -c -o ../obj-ack//./ansi/exit.o exit.c
-../obj-ack//libc.a(ext_comp.o): ext_comp.c
-	cc -O -D_MINIX -D_POSIX_SOURCE -D__USG -c -o ../obj-ack//./ansi/ext_comp.o ext_comp.c
-../obj-ack//libc.a(getenv.o): getenv.c
-	cc -O -D_MINIX -D_POSIX_SOURCE -D__USG -c -o ../obj-ack//./ansi/getenv.o getenv.c
-../obj-ack//libc.a(gmtime.o): gmtime.c
-	cc -O -D_MINIX -D_POSIX_SOURCE -D__USG -c -o ../obj-ack//./ansi/gmtime.o gmtime.c
-../obj-ack//libc.a(isalnum.o): isalnum.c
-	cc -O -D_MINIX -D_POSIX_SOURCE -D__USG -c -o ../obj-ack//./ansi/isalnum.o isalnum.c
-../obj-ack//libc.a(isalpha.o): isalpha.c
-	cc -O -D_MINIX -D_POSIX_SOURCE -D__USG -c -o ../obj-ack//./ansi/isalpha.o isalpha.c
-../obj-ack//libc.a(isascii.o): isascii.c
-	cc -O -D_MINIX -D_POSIX_SOURCE -D__USG -c -o ../obj-ack//./ansi/isascii.o isascii.c
-../obj-ack//libc.a(iscntrl.o): iscntrl.c
-	cc -O -D_MINIX -D_POSIX_SOURCE -D__USG -c -o ../obj-ack//./ansi/iscntrl.o iscntrl.c
-../obj-ack//libc.a(isdigit.o): isdigit.c
-	cc -O -D_MINIX -D_POSIX_SOURCE -D__USG -c -o ../obj-ack//./ansi/isdigit.o isdigit.c
-../obj-ack//libc.a(isgraph.o): isgraph.c
-	cc -O -D_MINIX -D_POSIX_SOURCE -D__USG -c -o ../obj-ack//./ansi/isgraph.o isgraph.c
-../obj-ack//libc.a(islower.o): islower.c
-	cc -O -D_MINIX -D_POSIX_SOURCE -D__USG -c -o ../obj-ack//./ansi/islower.o islower.c
-../obj-ack//libc.a(isprint.o): isprint.c
-	cc -O -D_MINIX -D_POSIX_SOURCE -D__USG -c -o ../obj-ack//./ansi/isprint.o isprint.c
-../obj-ack//libc.a(ispunct.o): ispunct.c
-	cc -O -D_MINIX -D_POSIX_SOURCE -D__USG -c -o ../obj-ack//./ansi/ispunct.o ispunct.c
-../obj-ack//libc.a(isspace.o): isspace.c
-	cc -O -D_MINIX -D_POSIX_SOURCE -D__USG -c -o ../obj-ack//./ansi/isspace.o isspace.c
-../obj-ack//libc.a(isupper.o): isupper.c
-	cc -O -D_MINIX -D_POSIX_SOURCE -D__USG -c -o ../obj-ack//./ansi/isupper.o isupper.c
-../obj-ack//libc.a(isxdigit.o): isxdigit.c
-	cc -O -D_MINIX -D_POSIX_SOURCE -D__USG -c -o ../obj-ack//./ansi/isxdigit.o isxdigit.c
-../obj-ack//libc.a(labs.o): labs.c
-	cc -O -D_MINIX -D_POSIX_SOURCE -D__USG -c -o ../obj-ack//./ansi/labs.o labs.c
-../obj-ack//libc.a(ldiv.o): ldiv.c
-	cc -O -D_MINIX -D_POSIX_SOURCE -D__USG -c -o ../obj-ack//./ansi/ldiv.o ldiv.c
-../obj-ack//libc.a(localeconv.o): localeconv.c
-	cc -O -D_MINIX -D_POSIX_SOURCE -D__USG -c -o ../obj-ack//./ansi/localeconv.o localeconv.c
-../obj-ack//libc.a(localtime.o): localtime.c
-	cc -O -D_MINIX -D_POSIX_SOURCE -D__USG -c -o ../obj-ack//./ansi/localtime.o localtime.c
-../obj-ack//libc.a(malloc.o): malloc.c
-	cc -O -D_MINIX -D_POSIX_SOURCE -D__USG -c -o ../obj-ack//./ansi/malloc.o malloc.c
-../obj-ack//libc.a(mblen.o): mblen.c
-	cc -O -D_MINIX -D_POSIX_SOURCE -D__USG -c -o ../obj-ack//./ansi/mblen.o mblen.c
-../obj-ack//libc.a(mbstowcs.o): mbstowcs.c
-	cc -O -D_MINIX -D_POSIX_SOURCE -D__USG -c -o ../obj-ack//./ansi/mbstowcs.o mbstowcs.c
-../obj-ack//libc.a(mbtowc.o): mbtowc.c
-	cc -O -D_MINIX -D_POSIX_SOURCE -D__USG -c -o ../obj-ack//./ansi/mbtowc.o mbtowc.c
-../obj-ack//libc.a(misc.o): misc.c
-	cc -O -D_MINIX -D_POSIX_SOURCE -D__USG -c -o ../obj-ack//./ansi/misc.o misc.c
-../obj-ack//libc.a(mktime.o): mktime.c
-	cc -O -D_MINIX -D_POSIX_SOURCE -D__USG -c -o ../obj-ack//./ansi/mktime.o mktime.c
-../obj-ack//libc.a(qsort.o): qsort.c
-	cc -O -D_MINIX -D_POSIX_SOURCE -D__USG -c -o ../obj-ack//./ansi/qsort.o qsort.c
-../obj-ack//libc.a(raise.o): raise.c
-	cc -O -D_MINIX -D_POSIX_SOURCE -D__USG -c -o ../obj-ack//./ansi/raise.o raise.c
-../obj-ack//libc.a(rand.o): rand.c
-	cc -O -D_MINIX -D_POSIX_SOURCE -D__USG -c -o ../obj-ack//./ansi/rand.o rand.c
-../obj-ack//libc.a(setlocale.o): setlocale.c
-	cc -O -D_MINIX -D_POSIX_SOURCE -D__USG -c -o ../obj-ack//./ansi/setlocale.o setlocale.c
-../obj-ack//libc.a(sigmisc.o): sigmisc.c
-	cc -O -D_MINIX -D_POSIX_SOURCE -D__USG -c -o ../obj-ack//./ansi/sigmisc.o sigmisc.c
-../obj-ack//libc.a(signal.o): signal.c
-	cc -O -D_MINIX -D_POSIX_SOURCE -D__USG -c -o ../obj-ack//./ansi/signal.o signal.c
-../obj-ack//libc.a(strcoll.o): strcoll.c
-	cc -O -D_MINIX -D_POSIX_SOURCE -D__USG -c -o ../obj-ack//./ansi/strcoll.o strcoll.c
-../obj-ack//libc.a(strcspn.o): strcspn.c
-	cc -O -D_MINIX -D_POSIX_SOURCE -D__USG -c -o ../obj-ack//./ansi/strcspn.o strcspn.c
-../obj-ack//libc.a(strerror.o): strerror.c
-	cc -O -D_MINIX -D_POSIX_SOURCE -D__USG -c -o ../obj-ack//./ansi/strerror.o strerror.c
-../obj-ack//libc.a(strftime.o): strftime.c
-	cc -O -D_MINIX -D_POSIX_SOURCE -D__USG -c -o ../obj-ack//./ansi/strftime.o strftime.c
-../obj-ack//libc.a(strpbrk.o): strpbrk.c
-	cc -O -D_MINIX -D_POSIX_SOURCE -D__USG -c -o ../obj-ack//./ansi/strpbrk.o strpbrk.c
-../obj-ack//libc.a(strspn.o): strspn.c
-	cc -O -D_MINIX -D_POSIX_SOURCE -D__USG -c -o ../obj-ack//./ansi/strspn.o strspn.c
-../obj-ack//libc.a(strstr.o): strstr.c
-	cc -O -D_MINIX -D_POSIX_SOURCE -D__USG -c -o ../obj-ack//./ansi/strstr.o strstr.c
-../obj-ack//libc.a(strtok.o): strtok.c
-	cc -O -D_MINIX -D_POSIX_SOURCE -D__USG -c -o ../obj-ack//./ansi/strtok.o strtok.c
-../obj-ack//libc.a(strtol.o): strtol.c
-	cc -O -D_MINIX -D_POSIX_SOURCE -D__USG -c -o ../obj-ack//./ansi/strtol.o strtol.c
-../obj-ack//libc.a(strxfrm.o): strxfrm.c
-	cc -O -D_MINIX -D_POSIX_SOURCE -D__USG -c -o ../obj-ack//./ansi/strxfrm.o strxfrm.c
-../obj-ack//libc.a(system.o): system.c
-	cc -O -D_MINIX -D_POSIX_SOURCE -D__USG -c -o ../obj-ack//./ansi/system.o system.c
-../obj-ack//libc.a(tolower.o): tolower.c
-	cc -O -D_MINIX -D_POSIX_SOURCE -D__USG -c -o ../obj-ack//./ansi/tolower.o tolower.c
-../obj-ack//libc.a(toupper.o): toupper.c
-	cc -O -D_MINIX -D_POSIX_SOURCE -D__USG -c -o ../obj-ack//./ansi/toupper.o toupper.c
-../obj-ack//libc.a(tzset.o): tzset.c
-	cc -O -D_MINIX -D_POSIX_SOURCE -D__USG -c -o ../obj-ack//./ansi/tzset.o tzset.c
-../obj-ack//libc.a(wcstombs.o): wcstombs.c
-	cc -O -D_MINIX -D_POSIX_SOURCE -D__USG -c -o ../obj-ack//./ansi/wcstombs.o wcstombs.c
-../obj-ack//libc.a(wctomb.o): wctomb.c
-	cc -O -D_MINIX -D_POSIX_SOURCE -D__USG -c -o ../obj-ack//./ansi/wctomb.o wctomb.c
-
-all-gnu: ../obj-gnu/libc.a
-
-../obj-gnu/libc.a: ../obj-gnu/./ansi/abort.o
-../obj-gnu/libc.a: ../obj-gnu/./ansi/abs.o
-../obj-gnu/libc.a: ../obj-gnu/./ansi/asctime.o
-../obj-gnu/libc.a: ../obj-gnu/./ansi/assert.o
-../obj-gnu/libc.a: ../obj-gnu/./ansi/atexit.o
-../obj-gnu/libc.a: ../obj-gnu/./ansi/atof.o
-../obj-gnu/libc.a: ../obj-gnu/./ansi/atoi.o
-../obj-gnu/libc.a: ../obj-gnu/./ansi/atol.o
-../obj-gnu/libc.a: ../obj-gnu/./ansi/bsearch.o
-../obj-gnu/libc.a: ../obj-gnu/./ansi/calloc.o
-../obj-gnu/libc.a: ../obj-gnu/./ansi/chartab.o
-../obj-gnu/libc.a: ../obj-gnu/./ansi/clock.o
-../obj-gnu/libc.a: ../obj-gnu/./ansi/ctime.o
-../obj-gnu/libc.a: ../obj-gnu/./ansi/difftime.o
-../obj-gnu/libc.a: ../obj-gnu/./ansi/div.o
-../obj-gnu/libc.a: ../obj-gnu/./ansi/errlist.o
-../obj-gnu/libc.a: ../obj-gnu/./ansi/exit.o
-../obj-gnu/libc.a: ../obj-gnu/./ansi/ext_comp.o
-../obj-gnu/libc.a: ../obj-gnu/./ansi/getenv.o
-../obj-gnu/libc.a: ../obj-gnu/./ansi/gmtime.o
-../obj-gnu/libc.a: ../obj-gnu/./ansi/isalnum.o
-../obj-gnu/libc.a: ../obj-gnu/./ansi/isalpha.o
-../obj-gnu/libc.a: ../obj-gnu/./ansi/isascii.o
-../obj-gnu/libc.a: ../obj-gnu/./ansi/iscntrl.o
-../obj-gnu/libc.a: ../obj-gnu/./ansi/isdigit.o
-../obj-gnu/libc.a: ../obj-gnu/./ansi/isgraph.o
-../obj-gnu/libc.a: ../obj-gnu/./ansi/islower.o
-../obj-gnu/libc.a: ../obj-gnu/./ansi/isprint.o
-../obj-gnu/libc.a: ../obj-gnu/./ansi/ispunct.o
-../obj-gnu/libc.a: ../obj-gnu/./ansi/isspace.o
-../obj-gnu/libc.a: ../obj-gnu/./ansi/isupper.o
-../obj-gnu/libc.a: ../obj-gnu/./ansi/isxdigit.o
-../obj-gnu/libc.a: ../obj-gnu/./ansi/labs.o
-../obj-gnu/libc.a: ../obj-gnu/./ansi/ldiv.o
-../obj-gnu/libc.a: ../obj-gnu/./ansi/localeconv.o
-../obj-gnu/libc.a: ../obj-gnu/./ansi/localtime.o
-../obj-gnu/libc.a: ../obj-gnu/./ansi/malloc.o
-../obj-gnu/libc.a: ../obj-gnu/./ansi/mblen.o
-../obj-gnu/libc.a: ../obj-gnu/./ansi/mbstowcs.o
-../obj-gnu/libc.a: ../obj-gnu/./ansi/mbtowc.o
-../obj-gnu/libc.a: ../obj-gnu/./ansi/misc.o
-../obj-gnu/libc.a: ../obj-gnu/./ansi/mktime.o
-../obj-gnu/libc.a: ../obj-gnu/./ansi/qsort.o
-../obj-gnu/libc.a: ../obj-gnu/./ansi/raise.o
-../obj-gnu/libc.a: ../obj-gnu/./ansi/rand.o
-../obj-gnu/libc.a: ../obj-gnu/./ansi/setlocale.o
-../obj-gnu/libc.a: ../obj-gnu/./ansi/sigmisc.o
-../obj-gnu/libc.a: ../obj-gnu/./ansi/signal.o
-../obj-gnu/libc.a: ../obj-gnu/./ansi/strcoll.o
-../obj-gnu/libc.a: ../obj-gnu/./ansi/strcspn.o
-../obj-gnu/libc.a: ../obj-gnu/./ansi/strerror.o
-../obj-gnu/libc.a: ../obj-gnu/./ansi/strftime.o
-../obj-gnu/libc.a: ../obj-gnu/./ansi/strpbrk.o
-../obj-gnu/libc.a: ../obj-gnu/./ansi/strspn.o
-../obj-gnu/libc.a: ../obj-gnu/./ansi/strstr.o
-../obj-gnu/libc.a: ../obj-gnu/./ansi/strtok.o
-../obj-gnu/libc.a: ../obj-gnu/./ansi/strtol.o
-../obj-gnu/libc.a: ../obj-gnu/./ansi/strxfrm.o
-../obj-gnu/libc.a: ../obj-gnu/./ansi/system.o
-../obj-gnu/libc.a: ../obj-gnu/./ansi/tolower.o
-../obj-gnu/libc.a: ../obj-gnu/./ansi/toupper.o
-../obj-gnu/libc.a: ../obj-gnu/./ansi/tzset.o
-../obj-gnu/libc.a: ../obj-gnu/./ansi/wcstombs.o
-../obj-gnu/libc.a: ../obj-gnu/./ansi/wctomb.o
-
-../obj-gnu/libc.a:
-	gar cr ../obj-gnu/libc.a $?
-
-../obj-gnu/./ansi/abort.o: abort.c
-	gcc -O -D_MINIX -D_POSIX_SOURCE -D__USG -c -o ../obj-gnu/./ansi/abort.o abort.c
-
-../obj-gnu/./ansi/abs.o: abs.c
-	gcc -O -D_MINIX -D_POSIX_SOURCE -D__USG -c -o ../obj-gnu/./ansi/abs.o abs.c
-
-../obj-gnu/./ansi/asctime.o: asctime.c
-	gcc -O -D_MINIX -D_POSIX_SOURCE -D__USG -c -o ../obj-gnu/./ansi/asctime.o asctime.c
-
-../obj-gnu/./ansi/assert.o: assert.c
-	gcc -O -D_MINIX -D_POSIX_SOURCE -D__USG -c -o ../obj-gnu/./ansi/assert.o assert.c
-
-../obj-gnu/./ansi/atexit.o: atexit.c
-	gcc -O -D_MINIX -D_POSIX_SOURCE -D__USG -c -o ../obj-gnu/./ansi/atexit.o atexit.c
-
-../obj-gnu/./ansi/atof.o: atof.c
-	gcc -O -D_MINIX -D_POSIX_SOURCE -D__USG -c -o ../obj-gnu/./ansi/atof.o atof.c
-
-../obj-gnu/./ansi/atoi.o: atoi.c
-	gcc -O -D_MINIX -D_POSIX_SOURCE -D__USG -c -o ../obj-gnu/./ansi/atoi.o atoi.c
-
-../obj-gnu/./ansi/atol.o: atol.c
-	gcc -O -D_MINIX -D_POSIX_SOURCE -D__USG -c -o ../obj-gnu/./ansi/atol.o atol.c
-
-../obj-gnu/./ansi/bsearch.o: bsearch.c
-	gcc -O -D_MINIX -D_POSIX_SOURCE -D__USG -c -o ../obj-gnu/./ansi/bsearch.o bsearch.c
-
-../obj-gnu/./ansi/calloc.o: calloc.c
-	gcc -O -D_MINIX -D_POSIX_SOURCE -D__USG -c -o ../obj-gnu/./ansi/calloc.o calloc.c
-
-../obj-gnu/./ansi/chartab.o: chartab.c
-	gcc -O -D_MINIX -D_POSIX_SOURCE -D__USG -c -o ../obj-gnu/./ansi/chartab.o chartab.c
-
-../obj-gnu/./ansi/clock.o: clock.c
-	gcc -O -D_MINIX -D_POSIX_SOURCE -D__USG -c -o ../obj-gnu/./ansi/clock.o clock.c
-
-../obj-gnu/./ansi/ctime.o: ctime.c
-	gcc -O -D_MINIX -D_POSIX_SOURCE -D__USG -c -o ../obj-gnu/./ansi/ctime.o ctime.c
-
-../obj-gnu/./ansi/difftime.o: difftime.c
-	gcc -O -D_MINIX -D_POSIX_SOURCE -D__USG -c -o ../obj-gnu/./ansi/difftime.o difftime.c
-
-../obj-gnu/./ansi/div.o: div.c
-	gcc -O -D_MINIX -D_POSIX_SOURCE -D__USG -c -o ../obj-gnu/./ansi/div.o div.c
-
-../obj-gnu/./ansi/errlist.o: errlist.c
-	gcc -O -D_MINIX -D_POSIX_SOURCE -D__USG -c -o ../obj-gnu/./ansi/errlist.o errlist.c
-
-../obj-gnu/./ansi/exit.o: exit.c
-	gcc -O -D_MINIX -D_POSIX_SOURCE -D__USG -c -o ../obj-gnu/./ansi/exit.o exit.c
-
-../obj-gnu/./ansi/ext_comp.o: ext_comp.c
-	gcc -O -D_MINIX -D_POSIX_SOURCE -D__USG -c -o ../obj-gnu/./ansi/ext_comp.o ext_comp.c
-
-../obj-gnu/./ansi/getenv.o: getenv.c
-	gcc -O -D_MINIX -D_POSIX_SOURCE -D__USG -c -o ../obj-gnu/./ansi/getenv.o getenv.c
-
-../obj-gnu/./ansi/gmtime.o: gmtime.c
-	gcc -O -D_MINIX -D_POSIX_SOURCE -D__USG -c -o ../obj-gnu/./ansi/gmtime.o gmtime.c
-
-../obj-gnu/./ansi/isalnum.o: isalnum.c
-	gcc -O -D_MINIX -D_POSIX_SOURCE -D__USG -c -o ../obj-gnu/./ansi/isalnum.o isalnum.c
-
-../obj-gnu/./ansi/isalpha.o: isalpha.c
-	gcc -O -D_MINIX -D_POSIX_SOURCE -D__USG -c -o ../obj-gnu/./ansi/isalpha.o isalpha.c
-
-../obj-gnu/./ansi/isascii.o: isascii.c
-	gcc -O -D_MINIX -D_POSIX_SOURCE -D__USG -c -o ../obj-gnu/./ansi/isascii.o isascii.c
-
-../obj-gnu/./ansi/iscntrl.o: iscntrl.c
-	gcc -O -D_MINIX -D_POSIX_SOURCE -D__USG -c -o ../obj-gnu/./ansi/iscntrl.o iscntrl.c
-
-../obj-gnu/./ansi/isdigit.o: isdigit.c
-	gcc -O -D_MINIX -D_POSIX_SOURCE -D__USG -c -o ../obj-gnu/./ansi/isdigit.o isdigit.c
-
-../obj-gnu/./ansi/isgraph.o: isgraph.c
-	gcc -O -D_MINIX -D_POSIX_SOURCE -D__USG -c -o ../obj-gnu/./ansi/isgraph.o isgraph.c
-
-../obj-gnu/./ansi/islower.o: islower.c
-	gcc -O -D_MINIX -D_POSIX_SOURCE -D__USG -c -o ../obj-gnu/./ansi/islower.o islower.c
-
-../obj-gnu/./ansi/isprint.o: isprint.c
-	gcc -O -D_MINIX -D_POSIX_SOURCE -D__USG -c -o ../obj-gnu/./ansi/isprint.o isprint.c
-
-../obj-gnu/./ansi/ispunct.o: ispunct.c
-	gcc -O -D_MINIX -D_POSIX_SOURCE -D__USG -c -o ../obj-gnu/./ansi/ispunct.o ispunct.c
-
-../obj-gnu/./ansi/isspace.o: isspace.c
-	gcc -O -D_MINIX -D_POSIX_SOURCE -D__USG -c -o ../obj-gnu/./ansi/isspace.o isspace.c
-
-../obj-gnu/./ansi/isupper.o: isupper.c
-	gcc -O -D_MINIX -D_POSIX_SOURCE -D__USG -c -o ../obj-gnu/./ansi/isupper.o isupper.c
-
-../obj-gnu/./ansi/isxdigit.o: isxdigit.c
-	gcc -O -D_MINIX -D_POSIX_SOURCE -D__USG -c -o ../obj-gnu/./ansi/isxdigit.o isxdigit.c
-
-../obj-gnu/./ansi/labs.o: labs.c
-	gcc -O -D_MINIX -D_POSIX_SOURCE -D__USG -c -o ../obj-gnu/./ansi/labs.o labs.c
-
-../obj-gnu/./ansi/ldiv.o: ldiv.c
-	gcc -O -D_MINIX -D_POSIX_SOURCE -D__USG -c -o ../obj-gnu/./ansi/ldiv.o ldiv.c
-
-../obj-gnu/./ansi/localeconv.o: localeconv.c
-	gcc -O -D_MINIX -D_POSIX_SOURCE -D__USG -c -o ../obj-gnu/./ansi/localeconv.o localeconv.c
-
-../obj-gnu/./ansi/localtime.o: localtime.c
-	gcc -O -D_MINIX -D_POSIX_SOURCE -D__USG -c -o ../obj-gnu/./ansi/localtime.o localtime.c
-
-../obj-gnu/./ansi/malloc.o: malloc.c
-	gcc -O -D_MINIX -D_POSIX_SOURCE -D__USG -c -o ../obj-gnu/./ansi/malloc.o malloc.c
-
-../obj-gnu/./ansi/mblen.o: mblen.c
-	gcc -O -D_MINIX -D_POSIX_SOURCE -D__USG -c -o ../obj-gnu/./ansi/mblen.o mblen.c
-
-../obj-gnu/./ansi/mbstowcs.o: mbstowcs.c
-	gcc -O -D_MINIX -D_POSIX_SOURCE -D__USG -c -o ../obj-gnu/./ansi/mbstowcs.o mbstowcs.c
-
-../obj-gnu/./ansi/mbtowc.o: mbtowc.c
-	gcc -O -D_MINIX -D_POSIX_SOURCE -D__USG -c -o ../obj-gnu/./ansi/mbtowc.o mbtowc.c
-
-../obj-gnu/./ansi/misc.o: misc.c
-	gcc -O -D_MINIX -D_POSIX_SOURCE -D__USG -c -o ../obj-gnu/./ansi/misc.o misc.c
-
-../obj-gnu/./ansi/mktime.o: mktime.c
-	gcc -O -D_MINIX -D_POSIX_SOURCE -D__USG -c -o ../obj-gnu/./ansi/mktime.o mktime.c
-
-../obj-gnu/./ansi/qsort.o: qsort.c
-	gcc -O -D_MINIX -D_POSIX_SOURCE -D__USG -c -o ../obj-gnu/./ansi/qsort.o qsort.c
-
-../obj-gnu/./ansi/raise.o: raise.c
-	gcc -O -D_MINIX -D_POSIX_SOURCE -D__USG -c -o ../obj-gnu/./ansi/raise.o raise.c
-
-../obj-gnu/./ansi/rand.o: rand.c
-	gcc -O -D_MINIX -D_POSIX_SOURCE -D__USG -c -o ../obj-gnu/./ansi/rand.o rand.c
-
-../obj-gnu/./ansi/setlocale.o: setlocale.c
-	gcc -O -D_MINIX -D_POSIX_SOURCE -D__USG -c -o ../obj-gnu/./ansi/setlocale.o setlocale.c
-
-../obj-gnu/./ansi/sigmisc.o: sigmisc.c
-	gcc -O -D_MINIX -D_POSIX_SOURCE -D__USG -c -o ../obj-gnu/./ansi/sigmisc.o sigmisc.c
-
-../obj-gnu/./ansi/signal.o: signal.c
-	gcc -O -D_MINIX -D_POSIX_SOURCE -D__USG -c -o ../obj-gnu/./ansi/signal.o signal.c
-
-../obj-gnu/./ansi/strcoll.o: strcoll.c
-	gcc -O -D_MINIX -D_POSIX_SOURCE -D__USG -c -o ../obj-gnu/./ansi/strcoll.o strcoll.c
-
-../obj-gnu/./ansi/strcspn.o: strcspn.c
-	gcc -O -D_MINIX -D_POSIX_SOURCE -D__USG -c -o ../obj-gnu/./ansi/strcspn.o strcspn.c
-
-../obj-gnu/./ansi/strerror.o: strerror.c
-	gcc -O -D_MINIX -D_POSIX_SOURCE -D__USG -c -o ../obj-gnu/./ansi/strerror.o strerror.c
-
-../obj-gnu/./ansi/strftime.o: strftime.c
-	gcc -O -D_MINIX -D_POSIX_SOURCE -D__USG -c -o ../obj-gnu/./ansi/strftime.o strftime.c
-
-../obj-gnu/./ansi/strpbrk.o: strpbrk.c
-	gcc -O -D_MINIX -D_POSIX_SOURCE -D__USG -c -o ../obj-gnu/./ansi/strpbrk.o strpbrk.c
-
-../obj-gnu/./ansi/strspn.o: strspn.c
-	gcc -O -D_MINIX -D_POSIX_SOURCE -D__USG -c -o ../obj-gnu/./ansi/strspn.o strspn.c
-
-../obj-gnu/./ansi/strstr.o: strstr.c
-	gcc -O -D_MINIX -D_POSIX_SOURCE -D__USG -c -o ../obj-gnu/./ansi/strstr.o strstr.c
-
-../obj-gnu/./ansi/strtok.o: strtok.c
-	gcc -O -D_MINIX -D_POSIX_SOURCE -D__USG -c -o ../obj-gnu/./ansi/strtok.o strtok.c
-
-../obj-gnu/./ansi/strtol.o: strtol.c
-	gcc -O -D_MINIX -D_POSIX_SOURCE -D__USG -c -o ../obj-gnu/./ansi/strtol.o strtol.c
-
-../obj-gnu/./ansi/strxfrm.o: strxfrm.c
-	gcc -O -D_MINIX -D_POSIX_SOURCE -D__USG -c -o ../obj-gnu/./ansi/strxfrm.o strxfrm.c
-
-../obj-gnu/./ansi/system.o: system.c
-	gcc -O -D_MINIX -D_POSIX_SOURCE -D__USG -c -o ../obj-gnu/./ansi/system.o system.c
-
-../obj-gnu/./ansi/tolower.o: tolower.c
-	gcc -O -D_MINIX -D_POSIX_SOURCE -D__USG -c -o ../obj-gnu/./ansi/tolower.o tolower.c
-
-../obj-gnu/./ansi/toupper.o: toupper.c
-	gcc -O -D_MINIX -D_POSIX_SOURCE -D__USG -c -o ../obj-gnu/./ansi/toupper.o toupper.c
-
-../obj-gnu/./ansi/tzset.o: tzset.c
-	gcc -O -D_MINIX -D_POSIX_SOURCE -D__USG -c -o ../obj-gnu/./ansi/tzset.o tzset.c
-
-../obj-gnu/./ansi/wcstombs.o: wcstombs.c
-	gcc -O -D_MINIX -D_POSIX_SOURCE -D__USG -c -o ../obj-gnu/./ansi/wcstombs.o wcstombs.c
-
-../obj-gnu/./ansi/wctomb.o: wctomb.c
-	gcc -O -D_MINIX -D_POSIX_SOURCE -D__USG -c -o ../obj-gnu/./ansi/wctomb.o wctomb.c
-
-
-
-
-clean::
-	rm -f ../obj-ack//./ansi/*
-	rm -f ../obj-gnu/./ansi/*
-
-include Makedepend-ack
-include .depend-ack
-
-include Makedepend-gnu
-include .depend-gnu
Index: trunk/minix/lib/ansi/Makefile.in
===================================================================
--- trunk/minix/lib/ansi/Makefile.in	(revision 9)
+++ 	(revision )
@@ -1,91 +1,0 @@
-# Makefile for lib/ansi.
-
-# This Makefile compiles part of the C library, the functions required by the
-# ANSI C standard.  This Makefile, and those in the other subdirectories use
-# a little known feature of make, the ability to refer to a file within a
-# library.  The construct abs.o' names the file 'abs.o' contained
-# in 'libc.a'.  So the rule
-#
-#	abs.o:	abs.c
-#		cc -c abs.c
-#		aal cr libc.a abs.o
-#		rm abs.o
-#
-# compiles abs.c and installs the result abs.o in libc.a if abs.c is newer
-# than the abs.o in the library.  This Makefile does not work like this
-# precisely, it first compiles all changed source files and than installs
-# them all in one 'aal' command.
-
-# Many of the string functions in this directory are not used, because the
-# have fast assembly implementations.
-
-CFLAGS="-O -D_MINIX -D_POSIX_SOURCE -D__USG"
-
-LIBRARIES=libc
-libc_FILES=" \
-	abort.c \
-	abs.c \
-	asctime.c \
-	assert.c \
-	atexit.c \
-	atof.c \
-	atoi.c \
-	atol.c \
-	bsearch.c \
-	calloc.c \
-	chartab.c \
-	clock.c \
-	ctime.c \
-	difftime.c \
-	div.c \
-	errlist.c \
-	exit.c \
-	ext_comp.c \
-	getenv.c \
-	gmtime.c \
-	isalnum.c \
-	isalpha.c \
-	isascii.c \
-	iscntrl.c \
-	isdigit.c \
-	isgraph.c \
-	islower.c \
-	isprint.c \
-	ispunct.c \
-	isspace.c \
-	isupper.c \
-	isxdigit.c \
-	labs.c \
-	ldiv.c \
-	localeconv.c \
-	localtime.c \
-	malloc.c \
-	mblen.c \
-	mbstowcs.c \
-	mbtowc.c \
-	misc.c \
-	mktime.c \
-	qsort.c \
-	raise.c \
-	rand.c \
-	setlocale.c \
-	sigmisc.c \
-	signal.c \
-	strcoll.c \
-	strcspn.c \
-	strerror.c \
-	strftime.c \
-	strpbrk.c \
-	strspn.c \
-	strstr.c \
-	strtok.c \
-	strtol.c \
-	strxfrm.c \
-	system.c \
-	tolower.c \
-	toupper.c \
-	tzset.c \
-	wcstombs.c \
-	wctomb.c"
-		
-TYPE=both
Index: trunk/minix/lib/ansi/abort.c
===================================================================
--- trunk/minix/lib/ansi/abort.c	(revision 9)
+++ 	(revision )
@@ -1,21 +1,0 @@
-/*
- * (c) copyright 1987 by the Vrije Universiteit, Amsterdam, The Netherlands.
- * See the copyright notice in the ACK home directory, in the file "Copyright".
- */
-/* $Header: /cvsup/minix/src/lib/ansi/abort.c,v 1.1.1.1 2005/04/21 14:56:04 beng Exp $ */
-
-#if	defined(_POSIX_SOURCE)
-#include	<sys/types.h>
-#endif
-#include	<signal.h>
-#include	<stdlib.h>
-
-extern void (*_clean)(void);
-
-void
-abort(void)
-{
-	if (_clean) _clean();		/* flush all output files */
-	raise(SIGABRT);
-}
-
Index: trunk/minix/lib/ansi/abs.c
===================================================================
--- trunk/minix/lib/ansi/abs.c	(revision 9)
+++ 	(revision )
@@ -1,13 +1,0 @@
-/*
- * (c) copyright 1987 by the Vrije Universiteit, Amsterdam, The Netherlands.
- * See the copyright notice in the ACK home directory, in the file "Copyright".
- */
-/* $Header: /cvsup/minix/src/lib/ansi/abs.c,v 1.1.1.1 2005/04/21 14:56:04 beng Exp $ */
-
-#include	<stdlib.h>
-
-int
-abs(register int i)
-{
-	return i >= 0 ? i : -i;
-}
Index: trunk/minix/lib/ansi/asctime.c
===================================================================
--- trunk/minix/lib/ansi/asctime.c	(revision 9)
+++ 	(revision )
@@ -1,60 +1,0 @@
-/*
- * asctime - print a date
- */
-/* $Header: /cvsup/minix/src/lib/ansi/asctime.c,v 1.1.1.1 2005/04/21 14:56:04 beng Exp $ */
-
-#include	<string.h>
-#include	<time.h>
-#include	"loc_time.h"
-
-#define	DATE_STR	"??? ??? ?? ??:??:?? ????\n"
-
-static char *
-two_digits(register char *pb, int i, int nospace)
-{
-	*pb = (i / 10) % 10 + '0';
-	if (!nospace && *pb == '0') *pb = ' ';
-	pb++;
-	*pb++ = (i % 10) + '0';
-	return ++pb;
-}
-
-static char *
-four_digits(register char *pb, int i)
-{
-	i %= 10000;
-	*pb++ = (i / 1000) + '0';
-	i %= 1000;
-	*pb++ = (i / 100) + '0';
-	i %= 100;
-	*pb++ = (i / 10) + '0';
-	*pb++ = (i % 10) + '0';
-	return ++pb;
-}
-
-char *asctime(const struct tm *timeptr)
-{
-	static char buf[26];
-	register char *pb = buf;
-	register const char *ps;
-	register int n;
-
-	strcpy(pb, DATE_STR);
-	ps = _days[timeptr->tm_wday];
-	n = ABB_LEN;
-	while(--n >= 0) *pb++ = *ps++;
-	pb++;
-	ps = _months[timeptr->tm_mon];
-	n = ABB_LEN;
-	while(--n >= 0) *pb++ = *ps++;
-	pb++;
-	pb = two_digits(
-		    two_digits(
-			    two_digits(two_digits(pb, timeptr->tm_mday, 0)
-					, timeptr->tm_hour, 1)
-			    , timeptr->tm_min, 1)
-		    , timeptr->tm_sec, 1);
-
-	four_digits(pb, timeptr->tm_year + 1900);
-	return buf;
-}
Index: trunk/minix/lib/ansi/assert.c
===================================================================
--- trunk/minix/lib/ansi/assert.c	(revision 9)
+++ 	(revision )
@@ -1,14 +1,0 @@
-/*
- * assert.c - diagnostics
- */
-/* $Header: /cvsup/minix/src/lib/ansi/assert.c,v 1.1.1.1 2005/04/21 14:56:04 beng Exp $ */
-
-#include	<assert.h>
-#include	<stdio.h>
-#include	<stdlib.h>
-
-void __bad_assertion(const char *mess) {
-
-	fputs(mess, stderr);
-	abort();
-}
Index: trunk/minix/lib/ansi/atexit.c
===================================================================
--- trunk/minix/lib/ansi/atexit.c	(revision 9)
+++ 	(revision )
@@ -1,17 +1,0 @@
-/* $Header: /cvsup/minix/src/lib/ansi/atexit.c,v 1.1.1.1 2005/04/21 14:56:04 beng Exp $ */
-
-#include	<stdlib.h>
-
-#define	NEXITS	32
-
-extern void (*__functab[NEXITS])(void);
-extern int __funccnt;
-
-int
-atexit(void (*func)(void))
-{
-	if (__funccnt >= NEXITS)
-		return 1;
-	__functab[__funccnt++] = func;
-	return 0;
-}
Index: trunk/minix/lib/ansi/atof.c
===================================================================
--- trunk/minix/lib/ansi/atof.c	(revision 9)
+++ 	(revision )
@@ -1,19 +1,0 @@
-/*
- * (c) copyright 1987 by the Vrije Universiteit, Amsterdam, The Netherlands.
- * See the copyright notice in the ACK home directory, in the file "Copyright".
- */
-/* $Header: /cvsup/minix/src/lib/ansi/atof.c,v 1.1.1.1 2005/04/21 14:56:04 beng Exp $ */
-
-#include	<stdlib.h>
-#include	<errno.h>
-
-double
-atof(const char *nptr)
-{
-	double d;
-	int e = errno;
-
-	d = strtod(nptr, (char **) NULL);
-	errno = e;
-	return d;
-}
Index: trunk/minix/lib/ansi/atoi.c
===================================================================
--- trunk/minix/lib/ansi/atoi.c	(revision 9)
+++ 	(revision )
@@ -1,14 +1,0 @@
-/*
- * (c) copyright 1987 by the Vrije Universiteit, Amsterdam, The Netherlands.
- * See the copyright notice in the ACK home directory, in the file "Copyright".
- */
-/* $Header: /cvsup/minix/src/lib/ansi/atoi.c,v 1.1.1.1 2005/04/21 14:56:04 beng Exp $ */
-
-#include	<ctype.h>
-#include	<stdlib.h>
-
-int
-atoi(register const char *nptr)
-{
-	return strtol(nptr, (char **) NULL, 10);
-}
Index: trunk/minix/lib/ansi/atol.c
===================================================================
--- trunk/minix/lib/ansi/atol.c	(revision 9)
+++ 	(revision )
@@ -1,30 +1,0 @@
-/*
- * (c) copyright 1987 by the Vrije Universiteit, Amsterdam, The Netherlands.
- * See the copyright notice in the ACK home directory, in the file "Copyright".
- */
-/* $Header: /cvsup/minix/src/lib/ansi/atol.c,v 1.1.1.1 2005/04/21 14:56:04 beng Exp $ */
-
-#include	<ctype.h>
-#include	<stdlib.h>
-
-/* We do not use strtol here for backwards compatibility in behaviour on
-   overflow.
-*/
-long
-atol(register const char *nptr)
-{
-	long total = 0;
-	int minus = 0;
-
-	while (isspace(*nptr)) nptr++;
-	if (*nptr == '+') nptr++;
-	else if (*nptr == '-') {
-		minus = 1;
-		nptr++;
-	}
-	while (isdigit(*nptr)) {
-		total *= 10;
-		total += (*nptr++ - '0');
-	}
-	return minus ? -total : total;
-}
Index: trunk/minix/lib/ansi/bsearch.c
===================================================================
--- trunk/minix/lib/ansi/bsearch.c	(revision 9)
+++ 	(revision )
@@ -1,28 +1,0 @@
-/*
- * (c) copyright 1987 by the Vrije Universiteit, Amsterdam, The Netherlands.
- * See the copyright notice in the ACK home directory, in the file "Copyright".
- */
-/* $Header: /cvsup/minix/src/lib/ansi/bsearch.c,v 1.1.1.1 2005/04/21 14:56:04 beng Exp $ */
-
-#include	<stdlib.h>
-
-void *
-bsearch(register const void *key, register const void *base,
-	register size_t nmemb, register size_t size,
-	int (*compar)(const void *, const void *))
-{
-	register const void *mid_point;
-	register int  cmp;
-
-	while (nmemb > 0) {
-		mid_point = (char *)base + size * (nmemb >> 1);
-		if ((cmp = (*compar)(key, mid_point)) == 0)
-			return (void *)mid_point;
-		if (cmp >= 0) {
-			base  = (char *)mid_point + size;
-			nmemb = (nmemb - 1) >> 1;
-		} else
-			nmemb >>= 1;
-	}
-	return (void *)NULL;
-}
Index: trunk/minix/lib/ansi/calloc.c
===================================================================
--- trunk/minix/lib/ansi/calloc.c	(revision 9)
+++ 	(revision )
@@ -1,19 +1,0 @@
-/* $Header: /cvsup/minix/src/lib/ansi/calloc.c,v 1.1.1.1 2005/04/21 14:56:04 beng Exp $ */
-#include	<stdlib.h>
-
-#define ALIGN(x)	(((x) + (sizeof(size_t) - 1)) & ~(sizeof(size_t) - 1))
-
-void *
-calloc(size_t nelem, size_t elsize)
-{
-	register char *p;
-	register size_t *q;
-	size_t size = ALIGN(nelem * elsize);
-
-	p = malloc(size);
-	if (p == NULL) return NULL;
-	q = (size_t *) (p + size);
-	while ((char *) q > p) *--q = 0;
-	return p;
-}
-
Index: trunk/minix/lib/ansi/chartab.c
===================================================================
--- trunk/minix/lib/ansi/chartab.c	(revision 9)
+++ 	(revision )
@@ -1,261 +1,0 @@
-#include	<ctype.h>
-
-char __ctype[] = {
-0,
-_C,
-_C,
-_C,
-_C,
-_C,
-_C,
-_C,
-_C,
-_C,
-_C|_S,
-_C|_S,
-_C|_S,
-_C|_S,
-_C|_S,
-_C,
-_C,
-_C,
-_C,
-_C,
-_C,
-_C,
-_C,
-_C,
-_C,
-_C,
-_C,
-_C,
-_C,
-_C,
-_C,
-_C,
-_C,
-_S,
-_P,
-_P,
-_P,
-_P,
-_P,
-_P,
-_P,
-_P,
-_P,
-_P,
-_P,
-_P,
-_P,
-_P,
-_P,
-_N,
-_N,
-_N,
-_N,
-_N,
-_N,
-_N,
-_N,
-_N,
-_N,
-_P,
-_P,
-_P,
-_P,
-_P,
-_P,
-_P,
-_U|_X,
-_U|_X,
-_U|_X,
-_U|_X,
-_U|_X,
-_U|_X,
-_U,
-_U,
-_U,
-_U,
-_U,
-_U,
-_U,
-_U,
-_U,
-_U,
-_U,
-_U,
-_U,
-_U,
-_U,
-_U,
-_U,
-_U,
-_U,
-_U,
-_P,
-_P,
-_P,
-_P,
-_P,
-_P,
-_L|_X,
-_L|_X,
-_L|_X,
-_L|_X,
-_L|_X,
-_L|_X,
-_L,
-_L,
-_L,
-_L,
-_L,
-_L,
-_L,
-_L,
-_L,
-_L,
-_L,
-_L,
-_L,
-_L,
-_L,
-_L,
-_L,
-_L,
-_L,
-_L,
-_P,
-_P,
-_P,
-_P,
-_C,
-0,
-0,
-0,
-0,
-0,
-0,
-0,
-0,
-0,
-0,
-0,
-0,
-0,
-0,
-0,
-0,
-0,
-0,
-0,
-0,
-0,
-0,
-0,
-0,
-0,
-0,
-0,
-0,
-0,
-0,
-0,
-0,
-0,
-0,
-0,
-0,
-0,
-0,
-0,
-0,
-0,
-0,
-0,
-0,
-0,
-0,
-0,
-0,
-0,
-0,
-0,
-0,
-0,
-0,
-0,
-0,
-0,
-0,
-0,
-0,
-0,
-0,
-0,
-0,
-0,
-0,
-0,
-0,
-0,
-0,
-0,
-0,
-0,
-0,
-0,
-0,
-0,
-0,
-0,
-0,
-0,
-0,
-0,
-0,
-0,
-0,
-0,
-0,
-0,
-0,
-0,
-0,
-0,
-0,
-0,
-0,
-0,
-0,
-0,
-0,
-0,
-0,
-0,
-0,
-0,
-0,
-0,
-0,
-0,
-0,
-0,
-0,
-0,
-0,
-0,
-0,
-0,
-0,
-0,
-0,
-0,
-0,
-0,
-0,
-0,
-0,
-0,
-0,
-};
Index: trunk/minix/lib/ansi/clock.c
===================================================================
--- trunk/minix/lib/ansi/clock.c	(revision 9)
+++ 	(revision )
@@ -1,15 +1,0 @@
-/*
- * clock - determine the processor time used
- */
-
-#define times _times
-#include <time.h>
-#include <sys/times.h>
-
-clock_t clock(void)
-{
-	struct tms tms;
-
-	times(&tms);
-	return tms.tms_utime;
-}
Index: trunk/minix/lib/ansi/ctime.c
===================================================================
--- trunk/minix/lib/ansi/ctime.c	(revision 9)
+++ 	(revision )
@@ -1,12 +1,0 @@
-/*
- * ctime - convers the calendar time to a string
- */
-/* $Header: /cvsup/minix/src/lib/ansi/ctime.c,v 1.1.1.1 2005/04/21 14:56:04 beng Exp $ */
-
-#include	<time.h>
-
-char *
-ctime(const time_t *timer)
-{
-	return asctime(localtime(timer));
-}
Index: trunk/minix/lib/ansi/difftime.c
===================================================================
--- trunk/minix/lib/ansi/difftime.c	(revision 9)
+++ 	(revision )
@@ -1,17 +1,0 @@
-/*
- * difftime - compute the difference between two calendar times
- */
-/* $Header: /cvsup/minix/src/lib/ansi/difftime.c,v 1.1.1.1 2005/04/21 14:56:04 beng Exp $ */
-
-#include	<time.h>
-
-double
-difftime(time_t time1, time_t time0)
-{
-	/* be careful: time_t may be unsigned */
-	if ((time_t)-1 > 0 && time0 > time1) {
-		return - (double) (time0 - time1);
-	} else {
-		return (double)(time1 - time0);
-	}
-}
Index: trunk/minix/lib/ansi/div.c
===================================================================
--- trunk/minix/lib/ansi/div.c	(revision 9)
+++ 	(revision )
@@ -1,31 +1,0 @@
-/*
- * (c) copyright 1987 by the Vrije Universiteit, Amsterdam, The Netherlands.
- * See the copyright notice in the ACK home directory, in the file "Copyright".
- */
-/* $Header: /cvsup/minix/src/lib/ansi/div.c,v 1.1.1.1 2005/04/21 14:56:04 beng Exp $ */
-
-#include	<stdlib.h>
-
-static int tmp = -1;
-
-div_t
-div(register int numer, register int denom)
-{
-	div_t r;
-
-	/* The assignment of tmp should not be optimized !! */
-	if (tmp == -1) {
-		tmp = (tmp / 2 == 0);
-	}
-	if (numer == 0) {
-		r.quot = numer / denom;		/* might trap if denom == 0 */
-		r.rem = numer % denom;
-	} else if ( !tmp && ((numer < 0) != (denom < 0))) {
-		r.quot = (numer / denom) + 1;
-		r.rem = numer - (numer / denom + 1) * denom;
-	} else {
-		r.quot = numer / denom;
-		r.rem = numer % denom;
-	}
-	return r;
-}
Index: trunk/minix/lib/ansi/errlist.c
===================================================================
--- trunk/minix/lib/ansi/errlist.c	(revision 9)
+++ 	(revision )
@@ -1,90 +1,0 @@
-/*
- * (c) copyright 1987 by the Vrije Universiteit, Amsterdam, The Netherlands.
- * See the copyright notice in the ACK home directory, in the file "Copyright".
- */
-/* $Header: /cvsup/minix/src/lib/ansi/errlist.c,v 1.4 2006/02/17 13:44:48 philip Exp $ */
-
-#include	<errno.h>
-
-static const char unknown[] = "Unknown error";
-
-const char *_sys_errlist[] = {
-        "Error 0",			/* EGENERIC */
-        "Not owner",			/* EPERM */
-        "No such file or directory",	/* ENOENT */
-        "No such process",		/* ESRCH */
-        "Interrupted system call",	/* EINTR */
-        "I/O error",			/* EIO */
-        "No such device or address",	/* ENXIO */
-        "Arg list too long",		/* E2BIG */
-        "Exec format error",		/* ENOEXEC */
-        "Bad file number",		/* EBADF */
-        "No children",			/* ECHILD */
-        "Resource temporarily unavailable",/* EAGAIN */
-        "Not enough core",		/* ENOMEM */
-        "Permission denied",		/* EACCES */
-        "Bad address",			/* EFAULT */
-        "Block device required",	/* ENOTBLK */
-        "Resource busy",		/* EBUSY */
-        "File exists",			/* EEXIST */
-        "Cross-device link",		/* EXDEV */
-        "No such device",		/* ENODEV */
-        "Not a directory",		/* ENOTDIR */
-        "Is a directory",		/* EISDIR */
-        "Invalid argument",		/* EINVAL */
-        "File table overflow",		/* ENFILE */
-        "Too many open files",		/* EMFILE */
-        "Not a typewriter",		/* ENOTTY */
-        "Text file busy",		/* ETXTBSY */
-        "File too large",		/* EFBIG */
-        "No space left on device",	/* ENOSPC */
-        "Illegal seek",			/* ESPIPE */
-        "Read-only file system",	/* EROFS */
-        "Too many links",		/* EMLINK */
-        "Broken pipe",			/* EPIPE */
-        "Math argument",		/* EDOM */
-        "Result too large",		/* ERANGE */
-	"Resource deadlock avoided",	/* EDEADLK */
-	"File name too long",		/* ENAMETOOLONG */
-	"No locks available",		/* ENOLCK */
-	"Function not implemented",	/* ENOSYS */
-	"Directory not empty",		/* ENOTEMPTY */
-	"Too many levels of symbolic links",	/* ELOOP */
-	unknown,			/* 41 */
-	unknown,			/* 42 */
-	unknown,			/* 43 */
-	unknown,			/* 44 */
-	unknown,			/* 45 */
-	unknown,			/* 46 */
-	unknown,			/* 47 */
-	unknown,			/* 48 */
-	unknown,			/* 49 */
-	"Invalid packet size",		/* EPACKSIZE */
-	"Not enough buffers left",	/* EOUTOFBUFS */
-	"Illegal ioctl for device",	/* EBADIOCTL */
-	"Bad mode for ioctl",		/* EBADMODE */
-	"Would block",			/* EWOULDBLOCK */
-	"Bad destination address",	/* EBADDEST */
-	"Destination not reachable",	/* EDSTNOTRCH */
-	"Already connected",		/* EISCONN */
-	"Address in use",		/* EADDRINUSE */
-	"Connection refused",		/* ECONNREFUSED */
-	"Connection reset",		/* ECONNRESET */
-	"Connection timed out",		/* ETIMEDOUT */
-	"Urgent data present",		/* EURG */
-	"No urgent data present",	/* ENOURG */
-	"No connection",		/* ENOTCONN */
-	"Already shutdown",		/* ESHUTDOWN */
-	"No such connection",		/* ENOCONN */
-	"Address family not supported",	/* EAFNOSUPPORT */
-	"Protocol not supported by AF",	/* EPROTONOSUPPORT */
-	"Protocol wrong type for socket", /* EPROTOTYPE */
-	"Operation in progress",	/* EINPROGRESS */
-	"Address not available",	/* EADDRNOTAVAIL */
-	"Connection already in progress", /* EALREADY */
-	"Message too long",		/* EMSGSIZE */
-	"Socket operation on non-socket", /* ENOTSOCK */
-	"Protocol not available",	/* ENOPROTOOPT */
-};
-
-const int _sys_nerr = sizeof(_sys_errlist) / sizeof(_sys_errlist[0]);
Index: trunk/minix/lib/ansi/exit.c
===================================================================
--- trunk/minix/lib/ansi/exit.c	(revision 9)
+++ 	(revision )
@@ -1,36 +1,0 @@
-/*
- * (c) copyright 1987 by the Vrije Universiteit, Amsterdam, The Netherlands.
- * See the copyright notice in the ACK home directory, in the file "Copyright".
- */
-/* $Header: /cvsup/minix/src/lib/ansi/exit.c,v 1.1.1.1 2005/04/21 14:56:04 beng Exp $ */
-
-#include	<stdio.h>
-#include	<stdlib.h>
-
-#define	NEXITS	32
-
-void (*__functab[NEXITS])(void);
-int __funccnt = 0;
-
-extern void _exit(int);
-
-/* only flush output buffers when necessary */
-int (*_clean)(void) = NULL;
-
-static void
-_calls(void)
-{
-	register int i = __funccnt;
-	
-	/* "Called in reversed order of their registration" */
-	while (--i >= 0)
-		(*__functab[i])();
-}
-
-void
-exit(int status)
-{
-	_calls();
-	if (_clean) _clean();
-	_exit(status) ;
-}
Index: trunk/minix/lib/ansi/ext_comp.c
===================================================================
--- trunk/minix/lib/ansi/ext_comp.c	(revision 9)
+++ 	(revision )
@@ -1,743 +1,0 @@
-/*
-  (c) copyright 1989 by the Vrije Universiteit, Amsterdam, The Netherlands.
-  See the copyright notice in the ACK home directory, in the file "Copyright".
-*/
-
-/* $Id: ext_comp.c,v 1.1.1.1 2005/04/21 14:56:05 beng Exp $ */
-
-/* extended precision arithmetic for the strtod() and cvt() routines */
-
-/* This may require some more work when long doubles get bigger than 8
-   bytes. In this case, these routines may become obsolete. ???
-*/
-
-#include	"ext_fmt.h"
-#include	<float.h>
-#include	<errno.h>
-#include	<ctype.h>
-
-static int b64_add(struct mantissa *e1, struct mantissa *e2);
-static b64_sft(struct mantissa *e1, int n);
-
-static
-mul_ext(struct EXTEND *e1, struct EXTEND *e2, struct EXTEND *e3)
-{
-	/*	Multiply the extended numbers e1 and e2, and put the
-		result in e3.
-	*/
-	register int	i,j;		/* loop control	*/
-	unsigned short	mp[4];
-	unsigned short	mc[4];
-	unsigned short	result[8];	/* result */
-
-	register unsigned short *pres;
-
-	/* first save the sign (XOR)			*/
-	e3->sign = e1->sign ^ e2->sign;
-
-	/* compute new exponent */
-	e3->exp = e1->exp + e2->exp + 1;
-
-	/* check for overflow/underflow	??? */
-
-	/* 128 bit multiply of mantissas	*/
-
-	/* assign unknown long formats		*/
-	/* to known unsigned word formats	*/
-	mp[0] = e1->m1 >> 16;
-	mp[1] = (unsigned short) e1->m1;
-	mp[2] = e1->m2 >> 16;
-	mp[3] = (unsigned short) e1->m2;
-	mc[0] = e2->m1 >> 16;
-	mc[1] = (unsigned short) e2->m1;
-	mc[2] = e2->m2 >> 16;
-	mc[3] = (unsigned short) e2->m2;
-	for (i = 8; i--;) {
-		result[i] = 0;
-	}
-	/*
-	 *	fill registers with their components
-	 */
-	for(i=4, pres = &result[4];i--;pres--) if (mp[i]) {
-		unsigned short k = 0;
-		unsigned long mpi = mp[i];
-		for(j=4;j--;) {
-			unsigned long tmp = (unsigned long)pres[j] + k;
-			if (mc[j]) tmp += mpi * mc[j];
-			pres[j] = tmp;
-			k = tmp >> 16;
-		}
-		pres[-1] = k;
-	}
-
-	if (! (result[0] & 0x8000)) {
-		e3->exp--;
-		for (i = 0; i <= 3; i++) {
-			result[i] <<= 1;
-			if (result[i+1]&0x8000) result[i] |= 1;
-		}
-		result[4] <<= 1;
-	}	
-	/*
-	 *	combine the registers to a total
-	 */
-	e3->m1 = ((unsigned long)(result[0]) << 16) + result[1];
-	e3->m2 = ((unsigned long)(result[2]) << 16) + result[3];
-	if (result[4] & 0x8000) {
-		if (++e3->m2 == 0) {
-			if (++e3->m1 == 0) {
-				e3->m1 = 0x80000000;
-				e3->exp++;
-			}
-		}
-	}
-}
-
-static
-add_ext(struct EXTEND *e1, struct EXTEND *e2, struct EXTEND *e3)
-{
-	/*	Add two extended numbers e1 and e2, and put the result
-		in e3
-	*/
-	struct EXTEND ce2;
-	int diff;
-
-	if ((e2->m1 | e2->m2) == 0L) {
-		*e3 = *e1;
-		return;
-	}
-	if ((e1->m1 | e1->m2) == 0L) {
-		*e3 = *e2;
-		return;
-	}
-	ce2 = *e2;
-	*e3 = *e1;
-	e1 = &ce2;
-
-	/* adjust mantissas to equal power */
-	diff = e3->exp - e1->exp;
-	if (diff < 0) {
-		diff = -diff;
-		e3->exp += diff;
-		b64_sft(&(e3->mantissa), diff);
-	}
-	else if (diff > 0) {
-		e1->exp += diff;
-		b64_sft(&(e1->mantissa), diff);
-	}
-	if (e1->sign != e3->sign) {
-		/* e3 + e1 = e3 - (-e1) */
-		if (e1->m1 > e3->m1 ||
-                    (e1->m1 == e3->m1 && e1->m2 > e3->m2)) {
-                	/*      abs(e1) > abs(e3) */
-                	if (e3->m2 > e1->m2) {
-                        	e1->m1 -= 1;    /* carry in */
-                	}
-                	e1->m1 -= e3->m1;
-                	e1->m2 -= e3->m2;
-                	*e3 = *e1;
-        	}
-        	else {
-                	if (e1->m2 > e3->m2)
-                        	e3->m1 -= 1;    /* carry in */
-                	e3->m1 -= e1->m1;
-                	e3->m2 -= e1->m2;
-        	}
-	}
-	else {
-		if (b64_add(&e3->mantissa,&e1->mantissa)) {/* addition carry */
-			b64_sft(&e3->mantissa,1);/* shift mantissa one bit RIGHT */
-			e3->m1 |= 0x80000000L;	/* set max bit	*/
-			e3->exp++;		/* increase the exponent */
-		}
-	}
-	if ((e3->m2 | e3->m1) != 0L) {
-		/* normalize */
-		if (e3->m1 == 0L) {
-			e3->m1 = e3->m2; e3->m2 = 0L; e3->exp -= 32;
-		}
-		if (!(e3->m1 & 0x80000000)) {
-			unsigned long l = 0x40000000;
-			int cnt = -1;
-
-			while (! (l & e3->m1)) {
-				l >>= 1; cnt--;
-			}
-			e3->exp += cnt;
-			b64_sft(&(e3->mantissa), cnt);
-		}
-	}
-}
-
-static int
-cmp_ext(struct EXTEND *e1, struct EXTEND *e2)
-{
-        struct EXTEND tmp; 
-         
-        e2->sign = ! e2->sign; 
-        add_ext(e1, e2, &tmp);  
-        e2->sign = ! e2->sign;
-        if (tmp.m1 == 0 && tmp.m2 == 0) return 0; 
-        if (tmp.sign) return -1;
-        return 1;
-}
-
-static
-b64_sft(struct mantissa *e1, int n)
-{
-	if (n > 0) {
-		if (n > 63) {
-			e1->l_32 = 0;
-			e1->h_32 = 0;
-			return;
-		}
-		if (n >= 32) {
-			e1->l_32 = e1->h_32;
-			e1->h_32 = 0;
-			n -= 32;
-		}
-		if (n > 0) {
-			e1->l_32 >>= n;
-			if (e1->h_32 != 0) {
-				e1->l_32 |= (e1->h_32 << (32 - n));
-				e1->h_32 >>= n;
-			}
-		}
-		return;
-	}
-	n = -n;
-	if (n > 0) {
-		if (n > 63) {
-			e1->l_32 = 0;
-			e1->h_32 = 0;
-			return;
-		}
-		if (n >= 32) {
-			e1->h_32 = e1->l_32;
-			e1->l_32 = 0;
-			n -= 32;
-		}
-		if (n > 0) {
-			e1->h_32 <<= n;
-			if (e1->l_32 != 0) {
-				e1->h_32 |= (e1->l_32 >> (32 - n));
-				e1->l_32 <<= n;
-			}
-		}
-	}
-}
-
-static int
-b64_add(struct mantissa *e1, struct mantissa *e2)
-		/*
-		 * pointers to 64 bit 'registers'
-		 */
-{
-	register int	overflow;
-	int		carry;
-
-			/* add higher pair of 32 bits */
-	overflow = ((unsigned long) 0xFFFFFFFF - e1->h_32 < e2->h_32);
-	e1->h_32 += e2->h_32;
-
-			/* add lower pair of 32 bits */
-	carry = ((unsigned long) 0xFFFFFFFF - e1->l_32 < e2->l_32);
-	e1->l_32 += e2->l_32;
-	if ((carry) && (++e1->h_32 == 0))
-		return(1);		/* had a 64 bit overflow */
-	else
-		return(overflow);	/* return status from higher add */
-}
-
-/* The following tables can be computed with the following bc(1)
-   program:
-
-obase=16
-scale=0
-define t(x){
-	auto a, b, c
-	a=2;b=1;c=2^32;n=1
-	while(a<x) {
-		b=a;n+=n;a*=a
-	}
-	n/=2
-	a=b
-	while(b<x) {
-		a=b;b*=c;n+=32
-	}
-	n-=32
-	b=a
-	while(a<x) {
-		b=a;a+=a;n+=1
-	}
-	n-=1
-	x*=16^16
-	b=x%a
-	x/=a
-	if(a<=(2*b)) x+=1
-	obase=10
-	n
-	obase=16
-	return(x)
-}
-for (i=1;i<28;i++) {
-	t(10^i)
-}
-0
-for (i=1;i<20;i++) {
-	t(10^(28*i))
-}
-0
-define r(x){
-	auto a, b, c
-	a=2;b=1;c=2^32;n=1
-	while(a<x) {
-		b=a;n+=n;a*=a
-	}
-	n/=2
-	a=b
-	while(b<x) {
-		a=b;b*=c;n+=32
-	}
-	n-=32
-	b=a
-	while(a<x) {
-		b=a;a+=a;n+=1
-	}
-	a=b
-	a*=16^16
-	b=a%x
-	a/=x
-	if(x<=(2*b)) a+=1
-	obase=10
-	-n
-	obase=16
-	return(a)
-}
-for (i=1;i<28;i++) {
-	r(10^i)
-}
-0
-for (i=1;i<20;i++) {
-	r(10^(28*i))
-}
-0
-
-*/
-static struct EXTEND ten_powers[] = {	/* representation of 10 ** i */
-	{ 0,	0,	0x80000000,	0 },
-	{ 0,	3,	0xA0000000,	0 },
-	{ 0,	6,	0xC8000000,	0 },
-	{ 0,	9,	0xFA000000,	0 },
-	{ 0,	13,	0x9C400000,	0 },
-	{ 0,	16,	0xC3500000,	0 },
-	{ 0,	19,	0xF4240000,	0 },
-	{ 0,	23,	0x98968000,	0 },
-	{ 0,	26,	0xBEBC2000,	0 },
-	{ 0,	29,	0xEE6B2800,	0 },
-	{ 0,	33,	0x9502F900,	0 },
-	{ 0,	36,	0xBA43B740,	0 },
-	{ 0,	39,	0xE8D4A510,	0 },
-	{ 0,	43,	0x9184E72A,	0 },
-	{ 0,	46,	0xB5E620F4,	0x80000000 },
-	{ 0,	49,	0xE35FA931,	0xA0000000 },
-	{ 0,	53,	0x8E1BC9BF,	0x04000000 },
-	{ 0,	56,	0xB1A2BC2E,	0xC5000000 },
-	{ 0,	59,	0xDE0B6B3A,	0x76400000 },
-	{ 0,	63,	0x8AC72304,	0x89E80000 },
-	{ 0,	66,	0xAD78EBC5,	0xAC620000 },
-	{ 0,	69,	0xD8D726B7,	0x177A8000 },
-	{ 0,	73,	0x87867832,	0x6EAC9000 },
-	{ 0,	76,	0xA968163F,	0x0A57B400 },
-	{ 0,	79,	0xD3C21BCE,	0xCCEDA100 },
-	{ 0,	83,	0x84595161,	0x401484A0 },
-	{ 0,	86,	0xA56FA5B9,	0x9019A5C8 },
-	{ 0,	89,	0xCECB8F27,	0xF4200F3A }
-};
-static struct EXTEND big_ten_powers[] = {  /* representation of 10 ** (28*i) */
-	{ 0,	0,	0x80000000,	0 },
-	{ 0,	93,	0x813F3978,	0xF8940984 },
-	{ 0,	186,	0x82818F12,	0x81ED44A0 },
-	{ 0,	279,	0x83C7088E,	0x1AAB65DB },
-	{ 0,	372,	0x850FADC0,	0x9923329E },
-	{ 0,	465,	0x865B8692,	0x5B9BC5C2 },
-	{ 0,	558,	0x87AA9AFF,	0x79042287 },
-	{ 0,	651,	0x88FCF317,	0xF22241E2 },
-	{ 0,	744,	0x8A5296FF,	0xE33CC930 },
-	{ 0,	837,	0x8BAB8EEF,	0xB6409C1A },
-	{ 0,	930,	0x8D07E334,	0x55637EB3 },
-	{ 0,	1023,	0x8E679C2F,	0x5E44FF8F },
-	{ 0,	1116,	0x8FCAC257,	0x558EE4E6 },
-	{ 0,	1209,	0x91315E37,	0xDB165AA9 },
-	{ 0,	1302,	0x929B7871,	0xDE7F22B9 },
-	{ 0,	1395,	0x940919BB,	0xD4620B6D },
-	{ 0,	1488,	0x957A4AE1,	0xEBF7F3D4 },
-	{ 0,	1581,	0x96EF14C6,	0x454AA840 },
-	{ 0,	1674,	0x98678061,	0x27ECE4F5 },
-	{ 0,	1767,	0x99E396C1,	0x3A3ACFF2 }
-};
-
-static struct EXTEND r_ten_powers[] = { /* representation of 10 ** -i */
-	{ 0,	0,	0x80000000,	0 },
-	{ 0,	-4,	0xCCCCCCCC,	0xCCCCCCCD },
-	{ 0,	-7,	0xA3D70A3D,	0x70A3D70A },
-	{ 0,	-10,	0x83126E97,	0x8D4FDF3B },
-	{ 0,	-14,	0xD1B71758,	0xE219652C },
-	{ 0,	-17,	0xA7C5AC47,	0x1B478423 },
-	{ 0,	-20,	0x8637BD05,	0xAF6C69B6 },
-	{ 0,	-24,	0xD6BF94D5,	0xE57A42BC },
-	{ 0,	-27,	0xABCC7711,	0x8461CEFD },
-	{ 0,	-30,	0x89705F41,	0x36B4A597 },
-	{ 0,	-34,	0xDBE6FECE,	0xBDEDD5BF },
-	{ 0,	-37,	0xAFEBFF0B,	0xCB24AAFF },
-	{ 0,	-40,	0x8CBCCC09,	0x6F5088CC },
-	{ 0,	-44,	0xE12E1342,	0x4BB40E13 },
-	{ 0,	-47,	0xB424DC35,	0x095CD80F },
-	{ 0,	-50,	0x901D7CF7,	0x3AB0ACD9 },
-	{ 0,	-54,	0xE69594BE,	0xC44DE15B },
-	{ 0,	-57,	0xB877AA32,	0x36A4B449 },
-	{ 0,	-60,	0x9392EE8E,	0x921D5D07 },
-	{ 0,	-64,	0xEC1E4A7D,	0xB69561A5 },
-	{ 0,	-67,	0xBCE50864,	0x92111AEB },
-	{ 0,	-70,	0x971DA050,	0x74DA7BEF },
-	{ 0,	-74,	0xF1C90080,	0xBAF72CB1 },
-	{ 0,	-77,	0xC16D9A00,	0x95928A27 },
-	{ 0,	-80,	0x9ABE14CD,	0x44753B53 },
-	{ 0,	-84,	0xF79687AE,	0xD3EEC551 },
-	{ 0,	-87,	0xC6120625,	0x76589DDB },
-	{ 0,	-90,	0x9E74D1B7,	0x91E07E48 }
-};
-
-static struct EXTEND r_big_ten_powers[] = { /* representation of 10 ** -(28*i) */
-	{ 0,	0,	0x80000000,	0 },
-	{ 0,	-94,	0xFD87B5F2,	0x8300CA0E },
-	{ 0,	-187,	0xFB158592,	0xBE068D2F },
-	{ 0,	-280,	0xF8A95FCF,	0x88747D94 },
-	{ 0,	-373,	0xF64335BC,	0xF065D37D },
-	{ 0,	-466,	0xF3E2F893,	0xDEC3F126 },
-	{ 0,	-559,	0xF18899B1,	0xBC3F8CA2 },
-	{ 0,	-652,	0xEF340A98,	0x172AACE5 },
-	{ 0,	-745,	0xECE53CEC,	0x4A314EBE },
-	{ 0,	-838,	0xEA9C2277,	0x23EE8BCB },
-	{ 0,	-931,	0xE858AD24,	0x8F5C22CA },
-	{ 0,	-1024,	0xE61ACF03,	0x3D1A45DF },
-	{ 0,	-1117,	0xE3E27A44,	0x4D8D98B8 },
-	{ 0,	-1210,	0xE1AFA13A,	0xFBD14D6E },
-	{ 0,	-1303,	0xDF82365C,	0x497B5454 },
-	{ 0,	-1396,	0xDD5A2C3E,	0xAB3097CC },
-	{ 0,	-1489,	0xDB377599,	0xB6074245 },
-	{ 0,	-1582,	0xD91A0545,	0xCDB51186 },
-	{ 0,	-1675,	0xD701CE3B,	0xD387BF48 },
-	{ 0,	-1768,	0xD4EEC394,	0xD6258BF8 }
-};
-
-#define	TP	(int)(sizeof(ten_powers)/sizeof(ten_powers[0]))
-#define BTP	(int)(sizeof(big_ten_powers)/sizeof(big_ten_powers[0]))
-#define MAX_EXP	(TP * BTP - 1)
-
-static
-add_exponent(struct EXTEND *e, int exp)
-{
-	int neg = exp < 0;
-	int divsz, modsz;
-	struct EXTEND x;
-
-	if (neg) exp = -exp;
-	divsz = exp / TP;
-	modsz = exp % TP;
-	if (neg) {
-		mul_ext(e, &r_ten_powers[modsz], &x);
-		mul_ext(&x, &r_big_ten_powers[divsz], e);
-	}
-	else {
-		mul_ext(e, &ten_powers[modsz], &x);
-		mul_ext(&x, &big_ten_powers[divsz], e);
-	}
-}
-
-_str_ext_cvt(const char *s, char **ss, struct EXTEND *e)
-{
-	/*	Like strtod, but for extended precision */
-	register int	c;
-	int		dotseen = 0;
-	int		digitseen = 0;
-	int		exp = 0;
-
-	if (ss) *ss = (char *)s;
-	while (isspace(*s)) s++;
-
-	e->sign = 0;
-	e->exp = 0;
-	e->m1 = e->m2 = 0;
-
-	c = *s;
-	switch(c) {
-	case '-':
-		e->sign = 1;
-	case '+':
-		s++;
-	}
-	while (c = *s++, isdigit(c) || (c == '.' && ! dotseen++)) {
-		if (c == '.') continue;
-		digitseen = 1;
-		if (e->m1 <= (unsigned long)(0xFFFFFFFF)/10) {
-			struct mantissa	a1;
-
-			a1 = e->mantissa;
-			b64_sft(&(e->mantissa), -3);
-			b64_sft(&a1, -1);
-			b64_add(&(e->mantissa), &a1);
-			a1.h_32 = 0;
-			a1.l_32 = c - '0';
-			b64_add(&(e->mantissa), &a1);
-		}
-		else exp++;
-		if (dotseen) exp--;
-	}
-	if (! digitseen) return;
-
-	if (ss) *ss = (char *)s - 1;
-
-	if (c == 'E' || c == 'e') {
-		int	exp1 = 0;
-		int	sign = 1;
-		int	exp_overflow = 0;
-
-		switch(*s) {
-		case '-':
-			sign = -1;
-		case '+':
-			s++;
-		}
-		if (c = *s, isdigit(c)) {
-			do {
-				int tmp;
-
-				exp1 = 10 * exp1 + (c - '0');
-				if ((tmp = sign * exp1 + exp) > MAX_EXP ||
-				     tmp < -MAX_EXP) {
-					exp_overflow = 1;
-				}
-			} while (c = *++s, isdigit(c));
-			if (ss) *ss = (char *)s;
-		}
-		exp += sign * exp1;
-		if (exp_overflow) {
-			exp = sign * MAX_EXP;
-			if (e->m1 != 0 || e->m2 != 0) errno = ERANGE;
-		}
-	}
-	if (e->m1 == 0 && e->m2 == 0) return;
-	e->exp = 63;
-	while (! (e->m1 & 0x80000000)) {
-		b64_sft(&(e->mantissa),-1);
-		e->exp--;
-	}
-	add_exponent(e, exp);
-}
-
-#include	<math.h>
-
-static
-ten_mult(struct EXTEND *e)
-{
-	struct EXTEND e1 = *e;
-
-	e1.exp++;
-	e->exp += 3;
-	add_ext(e, &e1, e);
-}
-
-#define NDIGITS 128
-#define NSIGNIFICANT 19
-
-char *
-_ext_str_cvt(struct EXTEND *e, int ndigit, int *decpt, int *sign, int ecvtflag)
-{
-	/*	Like cvt(), but for extended precision */
-
-	static char buf[NDIGITS+1];
-	struct EXTEND m;
-	register char *p = buf;
-	register char *pe;
-	int findex = 0;
-
-	if (ndigit < 0) ndigit = 0;
-	if (ndigit > NDIGITS) ndigit = NDIGITS;
-	pe = &buf[ndigit];
-	buf[0] = '\0';
-
-	*sign = 0;
-	if (e->sign) {
-		*sign = 1;
-		e->sign = 0;
-	}
-
-	*decpt = 0;
-	if (e->m1 != 0) {
-		register struct EXTEND *pp = &big_ten_powers[1];
-
-		while(cmp_ext(e,pp) >= 0) {
-			pp++;
-			findex = pp - big_ten_powers;
-			if (findex >= BTP) break;
-		}
-		pp--;
-		findex = pp - big_ten_powers;
-		mul_ext(e,&r_big_ten_powers[findex],e);
-		*decpt += findex * TP;
-		pp = &ten_powers[1];
-		while(pp < &ten_powers[TP] && cmp_ext(e, pp) >= 0) pp++;
-		pp--;
-		findex = pp - ten_powers;
-		*decpt += findex;
-
-		if (cmp_ext(e, &ten_powers[0]) < 0) {
-			pp = &r_big_ten_powers[1];
-			while(cmp_ext(e,pp) < 0) pp++;
-			pp--;
-			findex = pp - r_big_ten_powers;
-			mul_ext(e, &big_ten_powers[findex], e);
-			*decpt -= findex * TP;
-			/* here, value >= 10 ** -28 */
-			ten_mult(e);
-			(*decpt)--;
-			pp = &r_ten_powers[0];
-			while(cmp_ext(e, pp) < 0) pp++;
-			findex = pp - r_ten_powers;
-			mul_ext(e, &ten_powers[findex], e);
-			*decpt -= findex;
-			findex = 0;
-		}
-		(*decpt)++;	/* because now value in [1.0, 10.0) */
-	}
-	if (! ecvtflag) {
-		/* for fcvt() we need ndigit digits behind the dot */
-		pe += *decpt;
-		if (pe > &buf[NDIGITS]) pe = &buf[NDIGITS];
-	}
-	m.exp = -62;
-	m.sign = 0;
-	m.m1 = 0xA0000000;
-	m.m2 = 0;
-	while (p <= pe) {
-		struct EXTEND oneminm;
-
-		if (p - pe > NSIGNIFICANT) {
-			findex = 0;
-			e->m1 = 0;
-		}
-		if (findex) {
-			struct EXTEND tc, oldtc;
-			int count = 0;
-
-			oldtc.exp = 0;
-			oldtc.sign = 0;
-			oldtc.m1 = 0;
-			oldtc.m2 = 0;
-			tc = ten_powers[findex];
-			while (cmp_ext(e, &tc) >= 0) {
-				oldtc = tc;
-				add_ext(&tc, &ten_powers[findex], &tc);
-				count++;
-			}
-			*p++ = count + '0';
-			oldtc.sign = 1;
-			add_ext(e, &oldtc, e);
-			findex--;
-			continue;
-		}
-		if (e->m1) {
-			m.sign = 1;
-			add_ext(&ten_powers[0], &m, &oneminm);
-			m.sign = 0;
-			if (e->exp >= 0) {
-				struct EXTEND x;
-
-				x.m2 = 0; x.exp = e->exp;
-				x.sign = 1;
-				x.m1 = e->m1>>(31-e->exp);
-				*p++ = (x.m1) + '0';
-				x.m1 = x.m1 << (31-e->exp);
-				add_ext(e, &x, e);
-			}
-			else *p++ = '0';
-			/* Check that remainder is still significant */
-			if (cmp_ext(&m, e) > 0 || cmp_ext(e, &oneminm) > 0) {
-				if (e->m1 && e->exp >= -1) *(p-1) += 1;
-				e->m1 = 0;
-				continue;
-			}
-			ten_mult(&m);
-			ten_mult(e);
-		}
-		else *p++ = '0';
-	}
-	if (pe >= buf) {
-		p = pe;
-		*p += 5;	/* round of at the end */
-		while (*p > '9') {
-			*p = '0';
-			if (p > buf) ++*--p;
-			else {
-				*p = '1';
-				++*decpt;
-				if (! ecvtflag) {
-					/* maybe add another digit at the end,
-					   because the point was shifted right
-					*/
-					if (pe > buf) *pe = '0';
-					pe++;
-				}
-			}
-		}
-		*pe = '\0';
-	}
-	return buf;
-}
-
-_dbl_ext_cvt(double value, struct EXTEND *e)
-{
-	/*	Convert double to extended
-	*/
-	int exponent;
-
-	value = frexp(value, &exponent);
-	e->sign = value < 0.0;
-	if (e->sign) value = -value;
-	e->exp = exponent - 1;
-	value *= 4294967296.0;
-	e->m1 = value;
-	value -= e->m1;
-	value *= 4294967296.0;
-	e->m2 = value;
-}
-
-static struct EXTEND max_d;
-
-double
-_ext_dbl_cvt(struct EXTEND *e)
-{
-	/*	Convert extended to double
-	*/
-	double f;
-	int sign = e->sign;
-
-	e->sign = 0;
-	if (e->m1 == 0 && e->m2 == 0) {
-		return 0.0;
-	}
-	if (max_d.exp == 0) {
-		_dbl_ext_cvt(DBL_MAX, &max_d);
-	}
-	if (cmp_ext(&max_d, e) < 0) {
-		f = HUGE_VAL;
-		errno = ERANGE;
-	}
-	else	f = ldexp((double)e->m1*4294967296.0 + (double)e->m2, e->exp-63);
-	if (sign) f = -f;
-	if (f == 0.0 && (e->m1 != 0 || e->m2 != 0)) {
-		errno = ERANGE;
-	}
-	return f;
-}
Index: trunk/minix/lib/ansi/ext_fmt.h
===================================================================
--- trunk/minix/lib/ansi/ext_fmt.h	(revision 9)
+++ 	(revision )
@@ -1,13 +1,0 @@
-struct mantissa {
-	unsigned long h_32;
-	unsigned long l_32;
-};
-
-struct EXTEND {
-	short	sign;
-	short	exp;
-	struct mantissa mantissa;
-#define m1 mantissa.h_32
-#define m2 mantissa.l_32
-};
-	
Index: trunk/minix/lib/ansi/getenv.c
===================================================================
--- trunk/minix/lib/ansi/getenv.c	(revision 9)
+++ 	(revision )
@@ -1,28 +1,0 @@
-/*
- * (c) copyright 1987 by the Vrije Universiteit, Amsterdam, The Netherlands.
- * See the copyright notice in the ACK home directory, in the file "Copyright".
- */
-/* $Header: /cvsup/minix/src/lib/ansi/getenv.c,v 1.1.1.1 2005/04/21 14:56:05 beng Exp $ */
-
-#include	<stdlib.h>
-
-extern const char ***_penviron;
-
-char *
-getenv(const char *name)
-{
-	register const char **v = *_penviron;
-	register const char *p, *q;
-
-	if (v == NULL || name == NULL)
-		return (char *)NULL;
-	while ((p = *v++) != NULL) {
-		q = name;
-		while (*q && (*q == *p++))
-			q++;
-		if (*q || (*p != '='))
-			continue;
-		return (char *)p + 1;
-	}
-	return (char *)NULL;
-}
Index: trunk/minix/lib/ansi/gmtime.c
===================================================================
--- trunk/minix/lib/ansi/gmtime.c	(revision 9)
+++ 	(revision )
@@ -1,41 +1,0 @@
-/*
- * gmtime - convert the calendar time into broken down time
- */
-/* $Header: /cvsup/minix/src/lib/ansi/gmtime.c,v 1.1.1.1 2005/04/21 14:56:05 beng Exp $ */
-
-#include	<time.h>
-#include	<limits.h>
-#include	"loc_time.h"
-
-struct tm *
-gmtime(register const time_t *timer)
-{
-	static struct tm br_time;
-	register struct tm *timep = &br_time;
-	time_t time = *timer;
-	register unsigned long dayclock, dayno;
-	int year = EPOCH_YR;
-
-	dayclock = (unsigned long)time % SECS_DAY;
-	dayno = (unsigned long)time / SECS_DAY;
-
-	timep->tm_sec = dayclock % 60;
-	timep->tm_min = (dayclock % 3600) / 60;
-	timep->tm_hour = dayclock / 3600;
-	timep->tm_wday = (dayno + 4) % 7;	/* day 0 was a thursday */
-	while (dayno >= YEARSIZE(year)) {
-		dayno -= YEARSIZE(year);
-		year++;
-	}
-	timep->tm_year = year - YEAR0;
-	timep->tm_yday = dayno;
-	timep->tm_mon = 0;
-	while (dayno >= _ytab[LEAPYEAR(year)][timep->tm_mon]) {
-		dayno -= _ytab[LEAPYEAR(year)][timep->tm_mon];
-		timep->tm_mon++;
-	}
-	timep->tm_mday = dayno + 1;
-	timep->tm_isdst = 0;
-
-	return timep;
-}
Index: trunk/minix/lib/ansi/isalnum.c
===================================================================
--- trunk/minix/lib/ansi/isalnum.c	(revision 9)
+++ 	(revision )
@@ -1,5 +1,0 @@
-#include	<ctype.h>
-
-int (isalnum)(int c) {
-	return isalnum(c);
-}
Index: trunk/minix/lib/ansi/isalpha.c
===================================================================
--- trunk/minix/lib/ansi/isalpha.c	(revision 9)
+++ 	(revision )
@@ -1,5 +1,0 @@
-#include	<ctype.h>
-
-int (isalpha)(int c) {
-	return isalpha(c);
-}
Index: trunk/minix/lib/ansi/isascii.c
===================================================================
--- trunk/minix/lib/ansi/isascii.c	(revision 9)
+++ 	(revision )
@@ -1,5 +1,0 @@
-#include	<ctype.h>
-
-int (isascii)(int c) {
-	return isascii(c);
-}
Index: trunk/minix/lib/ansi/iscntrl.c
===================================================================
--- trunk/minix/lib/ansi/iscntrl.c	(revision 9)
+++ 	(revision )
@@ -1,5 +1,0 @@
-#include	<ctype.h>
-
-int (iscntrl)(int c) {
-	return iscntrl(c);
-}
Index: trunk/minix/lib/ansi/isdigit.c
===================================================================
--- trunk/minix/lib/ansi/isdigit.c	(revision 9)
+++ 	(revision )
@@ -1,5 +1,0 @@
-#include	<ctype.h>
-
-int (isdigit)(int c) {
-	return isdigit(c);
-}
Index: trunk/minix/lib/ansi/isgraph.c
===================================================================
--- trunk/minix/lib/ansi/isgraph.c	(revision 9)
+++ 	(revision )
@@ -1,5 +1,0 @@
-#include	<ctype.h>
-
-int (isgraph)(int c) {
-	return isgraph(c);
-}
Index: trunk/minix/lib/ansi/islower.c
===================================================================
--- trunk/minix/lib/ansi/islower.c	(revision 9)
+++ 	(revision )
@@ -1,5 +1,0 @@
-#include	<ctype.h>
-
-int (islower)(int c) {
-	return islower(c);
-}
Index: trunk/minix/lib/ansi/isprint.c
===================================================================
--- trunk/minix/lib/ansi/isprint.c	(revision 9)
+++ 	(revision )
@@ -1,5 +1,0 @@
-#include	<ctype.h>
-
-int (isprint)(int c) {
-	return isprint(c);
-}
Index: trunk/minix/lib/ansi/ispunct.c
===================================================================
--- trunk/minix/lib/ansi/ispunct.c	(revision 9)
+++ 	(revision )
@@ -1,5 +1,0 @@
-#include	<ctype.h>
-
-int (ispunct)(int c) {
-	return ispunct(c);
-}
Index: trunk/minix/lib/ansi/isspace.c
===================================================================
--- trunk/minix/lib/ansi/isspace.c	(revision 9)
+++ 	(revision )
@@ -1,5 +1,0 @@
-#include	<ctype.h>
-
-int (isspace)(int c) {
-	return isspace(c);
-}
Index: trunk/minix/lib/ansi/isupper.c
===================================================================
--- trunk/minix/lib/ansi/isupper.c	(revision 9)
+++ 	(revision )
@@ -1,5 +1,0 @@
-#include	<ctype.h>
-
-int (isupper)(int c) {
-	return isupper(c);
-}
Index: trunk/minix/lib/ansi/isxdigit.c
===================================================================
--- trunk/minix/lib/ansi/isxdigit.c	(revision 9)
+++ 	(revision )
@@ -1,5 +1,0 @@
-#include	<ctype.h>
-
-int (isxdigit)(int c) {
-	return isxdigit(c);
-}
Index: trunk/minix/lib/ansi/labs.c
===================================================================
--- trunk/minix/lib/ansi/labs.c	(revision 9)
+++ 	(revision )
@@ -1,13 +1,0 @@
-/*
- * (c) copyright 1987 by the Vrije Universiteit, Amsterdam, The Netherlands.
- * See the copyright notice in the ACK home directory, in the file "Copyright".
- */
-/* $Header: /cvsup/minix/src/lib/ansi/labs.c,v 1.1.1.1 2005/04/21 14:56:05 beng Exp $ */
-
-#include	<stdlib.h>
-
-long
-labs(register long l)
-{
-	return l >= 0 ? l : -l;
-}
Index: trunk/minix/lib/ansi/ldiv.c
===================================================================
--- trunk/minix/lib/ansi/ldiv.c	(revision 9)
+++ 	(revision )
@@ -1,31 +1,0 @@
-/*
- * (c) copyright 1987 by the Vrije Universiteit, Amsterdam, The Netherlands.
- * See the copyright notice in the ACK home directory, in the file "Copyright".
- */
-/* $Header: /cvsup/minix/src/lib/ansi/ldiv.c,v 1.1.1.1 2005/04/21 14:56:05 beng Exp $ */
-
-#include	<stdlib.h>
-
-static long tmp = -1;
-
-ldiv_t
-ldiv(register long numer, register long denom)
-{
-	ldiv_t r;
-
-	/* The assignment of tmp should not be optimized !! */
-	if (tmp == -1) {
-		tmp = (tmp / 2 == 0);
-	}
-	if (numer == 0) {
-		r.quot = numer / denom;		/* might trap if denom == 0 */
-		r.rem = numer % denom;
-	} else if ( !tmp && ((numer < 0) != (denom < 0))) {
-		r.quot = (numer / denom) + 1;
-		r.rem = numer - (numer / denom + 1) * denom;
-	} else {
-		r.quot = numer / denom;
-		r.rem = numer % denom;
-	}
-	return r;
-}
Index: trunk/minix/lib/ansi/loc_time.h
===================================================================
--- trunk/minix/lib/ansi/loc_time.h	(revision 9)
+++ 	(revision )
@@ -1,26 +1,0 @@
-/*
- * loc_time.h - some local definitions
- */
-/* $Header: /cvsup/minix/src/lib/ansi/loc_time.h,v 1.1.1.1 2005/04/21 14:56:05 beng Exp $ */
-
-#define	YEAR0		1900			/* the first year */
-#define	EPOCH_YR	1970		/* EPOCH = Jan 1 1970 00:00:00 */
-#define	SECS_DAY	(24L * 60L * 60L)
-#define	LEAPYEAR(year)	(!((year) % 4) && (((year) % 100) || !((year) % 400)))
-#define	YEARSIZE(year)	(LEAPYEAR(year) ? 366 : 365)
-#define	FIRSTSUNDAY(timp)	(((timp)->tm_yday - (timp)->tm_wday + 420) % 7)
-#define	FIRSTDAYOF(timp)	(((timp)->tm_wday - (timp)->tm_yday + 420) % 7)
-#define	TIME_MAX	ULONG_MAX
-#define	ABB_LEN		3
-
-extern const int _ytab[2][12];
-extern const char *_days[];
-extern const char *_months[];
-
-void _tzset(void);
-unsigned _dstget(struct tm *timep);
-
-extern long _timezone;
-extern long _dst_off;
-extern int _daylight;
-extern char *_tzname[2];
Index: trunk/minix/lib/ansi/localeconv.c
===================================================================
--- trunk/minix/lib/ansi/localeconv.c	(revision 9)
+++ 	(revision )
@@ -1,36 +1,0 @@
-/*
- * localeconv - set components of a struct according to current locale
- */
-/* $Header: /cvsup/minix/src/lib/ansi/localeconv.c,v 1.1.1.1 2005/04/21 14:56:05 beng Exp $ */
-
-#include	<limits.h>
-#include	<locale.h>
-
-extern struct lconv _lc;
-
-struct lconv *
-localeconv(void)
-{
-	register struct lconv *lcp = &_lc;
-
-	lcp->decimal_point = ".";
-	lcp->thousands_sep = "";
-	lcp->grouping = "";
-	lcp->int_curr_symbol = "";
-	lcp->currency_symbol = "";
-	lcp->mon_decimal_point = "";
-	lcp->mon_thousands_sep = "";
-	lcp->mon_grouping = "";
-	lcp->positive_sign = "";
-	lcp->negative_sign = "";
-	lcp->int_frac_digits = CHAR_MAX;
-	lcp->frac_digits = CHAR_MAX;
-	lcp->p_cs_precedes = CHAR_MAX;
-	lcp->p_sep_by_space = CHAR_MAX;
-	lcp->n_cs_precedes = CHAR_MAX;
-	lcp->n_sep_by_space = CHAR_MAX;
-	lcp->p_sign_posn = CHAR_MAX;
-	lcp->n_sign_posn = CHAR_MAX;
-
-	return lcp;
-}
Index: trunk/minix/lib/ansi/localtime.c
===================================================================
--- trunk/minix/lib/ansi/localtime.c	(revision 9)
+++ 	(revision )
@@ -1,34 +1,0 @@
-/*
- * localtime - convert a calendar time into broken down time
- */
-/* $Header: /cvsup/minix/src/lib/ansi/localtime.c,v 1.1.1.1 2005/04/21 14:56:05 beng Exp $ */
-
-#include	<time.h>
-#include	"loc_time.h"
-
-/* We must be careful, since an int can't represent all the seconds in a day.
- * Hence the adjustment of minutes when adding timezone and dst information.
- * This assumes that both must be expressable in multiples of a minute.
- * Furthermore, it is assumed that both fit into an integer when expressed as
- * minutes (this is about 22 days, so this should not cause any problems). 
- */
-struct tm *
-localtime(const time_t *timer)
-{
-	struct tm *timep;
-	unsigned dst;
-
-	_tzset();
-	timep = gmtime(timer);			/* tm->tm_isdst == 0 */
-	timep->tm_min -= _timezone / 60;
-	timep->tm_sec -= _timezone % 60;
-	mktime(timep);
-
-	dst = _dstget(timep);
-	if (dst) {
-		timep->tm_min += dst / 60;
-		timep->tm_sec += dst % 60;
-		mktime(timep);
-	}
-	return timep;
-}
Index: trunk/minix/lib/ansi/malloc.c
===================================================================
--- trunk/minix/lib/ansi/malloc.c	(revision 9)
+++ 	(revision )
@@ -1,205 +1,0 @@
-/* $Header: /cvsup/minix/src/lib/ansi/malloc.c,v 1.1.1.1 2005/04/21 14:56:05 beng Exp $ */
-
-/* replace undef by define */
-#undef	 DEBUG		/* check assertions */
-#undef	 SLOWDEBUG	/* some extra test loops (requires DEBUG) */
-
-#ifndef DEBUG
-#define NDEBUG
-#endif
-
-#include	<stdlib.h>
-#include	<string.h>
-#include	<errno.h>
-#include	<assert.h>
-
-#if _EM_WSIZE == _EM_PSIZE
-#define	ptrint		int
-#else
-#define	ptrint		long
-#endif
-
-#if	_EM_PSIZE == 2
-#define BRKSIZE		1024
-#else
-#define BRKSIZE		4096
-#endif
-#define	PTRSIZE		((int) sizeof(void *))
-#define Align(x,a)	(((x) + (a - 1)) & ~(a - 1))
-#define NextSlot(p)	(* (void **) ((p) - PTRSIZE))
-#define NextFree(p)	(* (void **) (p))
-
-/*
- * A short explanation of the data structure and algorithms.
- * An area returned by malloc() is called a slot. Each slot
- * contains the number of bytes requested, but preceeded by
- * an extra pointer to the next the slot in memory.
- * '_bottom' and '_top' point to the first/last slot.
- * More memory is asked for using brk() and appended to top.
- * The list of free slots is maintained to keep malloc() fast.
- * '_empty' points the the first free slot. Free slots are
- * linked together by a pointer at the start of the
- * user visable part, so just after the next-slot pointer.
- * Free slots are merged together by free().
- */
-
-extern void *_sbrk(int);
-extern int _brk(void *);
-static void *_bottom, *_top, *_empty;
-
-static int grow(size_t len)
-{
-  register char *p;
-
-  assert(NextSlot((char *)_top) == 0);
-  if ((char *) _top + len < (char *) _top
-      || (p = (char *)Align((ptrint)_top + len, BRKSIZE)) < (char *) _top ) {
-	errno = ENOMEM;
-	return(0);
-  }
-  if (_brk(p) != 0)
-	return(0);
-  NextSlot((char *)_top) = p;
-  NextSlot(p) = 0;
-  free(_top);
-  _top = p;
-  return 1;
-}
-
-void *
-malloc(size_t size)
-{
-  register char *prev, *p, *next, *new;
-  register unsigned len, ntries;
-
-  if (size == 0)
-	return NULL;
-
-  for (ntries = 0; ntries < 2; ntries++) {
-	if ((len = Align(size, PTRSIZE) + PTRSIZE) < 2 * PTRSIZE) {
-		errno = ENOMEM;
-		return NULL;
-	}
-	if (_bottom == 0) {
-		if ((p = _sbrk(2 * PTRSIZE)) == (char *) -1)
-			return NULL;
-		p = (char *) Align((ptrint)p, PTRSIZE);
-		p += PTRSIZE;
-		_top = _bottom = p;
-		NextSlot(p) = 0;
-	}
-#ifdef SLOWDEBUG
-	for (p = _bottom; (next = NextSlot(p)) != 0; p = next)
-		assert(next > p);
-	assert(p == _top);
-#endif
-	for (prev = 0, p = _empty; p != 0; prev = p, p = NextFree(p)) {
-		next = NextSlot(p);
-		new = p + len;	/* easily overflows!! */
-		if (new > next || new <= p)
-			continue;		/* too small */
-		if (new + PTRSIZE < next) {	/* too big, so split */
-			/* + PTRSIZE avoids tiny slots on free list */
-			NextSlot(new) = next;
-			NextSlot(p) = new;
-			NextFree(new) = NextFree(p);
-			NextFree(p) = new;
-		}
-		if (prev)
-			NextFree(prev) = NextFree(p);
-		else
-			_empty = NextFree(p);
-		return p;
-	}
-	if (grow(len) == 0)
-		break;
-  }
-  assert(ntries != 2);
-  return NULL;
-}
-
-void *
-realloc(void *oldp, size_t size)
-{
-  register char *prev, *p, *next, *new;
-  char *old = oldp;
-  register size_t len, n;
-
-  if (old == 0)
-	return malloc(size);
-  if (size == 0) {
-	free(old);
-	return NULL;
-  }
-  len = Align(size, PTRSIZE) + PTRSIZE;
-  next = NextSlot(old);
-  n = (int)(next - old);			/* old length */
-  /*
-   * extend old if there is any free space just behind it
-   */
-  for (prev = 0, p = _empty; p != 0; prev = p, p = NextFree(p)) {
-	if (p > next)
-		break;
-	if (p == next) {	/* 'next' is a free slot: merge */
-		NextSlot(old) = NextSlot(p);
-		if (prev)
-			NextFree(prev) = NextFree(p);
-		else
-			_empty = NextFree(p);
-		next = NextSlot(old);
-		break;
-	}
-  }
-  new = old + len;
-  /*
-   * Can we use the old, possibly extended slot?
-   */
-  if (new <= next && new >= old) {		/* it does fit */
-	if (new + PTRSIZE < next) {		/* too big, so split */
-		/* + PTRSIZE avoids tiny slots on free list */
-		NextSlot(new) = next;
-		NextSlot(old) = new;
-		free(new);
-	}
-	return old;
-  }
-  if ((new = malloc(size)) == NULL)		/* it didn't fit */
-	return NULL;
-  memcpy(new, old, n);				/* n < size */
-  free(old);
-  return new;
-}
-
-void
-free(void *ptr)
-{
-  register char *prev, *next;
-  char *p = ptr;
-
-  if (p == 0)
-	return;
-
-  assert(NextSlot(p) > p);
-  for (prev = 0, next = _empty; next != 0; prev = next, next = NextFree(next))
-	if (p < next)
-		break;
-  NextFree(p) = next;
-  if (prev)
-	NextFree(prev) = p;
-  else
-	_empty = p;
-  if (next) {
-	assert(NextSlot(p) <= next);
-	if (NextSlot(p) == next) {		/* merge p and next */
-		NextSlot(p) = NextSlot(next);
-		NextFree(p) = NextFree(next);
-	}
-  }
-  if (prev) {
-	assert(NextSlot(prev) <= p);
-	if (NextSlot(prev) == p) {		/* merge prev and p */
-		NextSlot(prev) = NextSlot(p);
-		NextFree(prev) = NextFree(p);
-	}
-  }
-}
Index: trunk/minix/lib/ansi/mblen.c
===================================================================
--- trunk/minix/lib/ansi/mblen.c	(revision 9)
+++ 	(revision )
@@ -1,18 +1,0 @@
-/*
- * (c) copyright 1987 by the Vrije Universiteit, Amsterdam, The Netherlands.
- * See the copyright notice in the ACK home directory, in the file "Copyright".
- */
-/* $Header: /cvsup/minix/src/lib/ansi/mblen.c,v 1.1.1.1 2005/04/21 14:56:05 beng Exp $ */
-
-#include	<stdlib.h>
-#include	<limits.h>
-
-#define	CHAR_SHIFT	8
-
-int
-mblen(const char *s, size_t n)
-{
-	if (s == (const char *)NULL) return 0;	/* no state dependent codings */
-	if (n <= 0) return 0;
-	return (*s != 0);
-}
Index: trunk/minix/lib/ansi/mbstowcs.c
===================================================================
--- trunk/minix/lib/ansi/mbstowcs.c	(revision 9)
+++ 	(revision )
@@ -1,20 +1,0 @@
-/*
- * (c) copyright 1987 by the Vrije Universiteit, Amsterdam, The Netherlands.
- * See the copyright notice in the ACK home directory, in the file "Copyright".
- */
-/* $Header: /cvsup/minix/src/lib/ansi/mbstowcs.c,v 1.1.1.1 2005/04/21 14:56:05 beng Exp $ */
-
-#include	<stdlib.h>
-
-size_t
-mbstowcs(register wchar_t *pwcs, register const char *s, size_t n)
-{
-	register int i = n;
-
-	while (--i >= 0) {
-		if (!(*pwcs++ = *s++))
-			return n - i - 1;
-	}
-	return n - i;
-}
-
Index: trunk/minix/lib/ansi/mbtowc.c
===================================================================
--- trunk/minix/lib/ansi/mbtowc.c	(revision 9)
+++ 	(revision )
@@ -1,17 +1,0 @@
-/*
- * (c) copyright 1987 by the Vrije Universiteit, Amsterdam, The Netherlands.
- * See the copyright notice in the ACK home directory, in the file "Copyright".
- */
-/* $Header: /cvsup/minix/src/lib/ansi/mbtowc.c,v 1.1.1.1 2005/04/21 14:56:05 beng Exp $ */
-
-#include	<stdlib.h>
-#include	<limits.h>
-
-int
-mbtowc(wchar_t *pwc, register const char *s, size_t n)
-{
-	if (s == (const char *)NULL) return 0;
-	if (n <= 0) return 0;
-	if (pwc) *pwc = *s;
-	return (*s != 0);
-}
Index: trunk/minix/lib/ansi/memchr.c
===================================================================
--- trunk/minix/lib/ansi/memchr.c	(revision 9)
+++ 	(revision )
@@ -1,23 +1,0 @@
-/*
- * (c) copyright 1987 by the Vrije Universiteit, Amsterdam, The Netherlands.
- * See the copyright notice in the ACK home directory, in the file "Copyright".
- */
-/* $Header: /cvsup/minix/src/lib/ansi/memchr.c,v 1.1.1.1 2005/04/21 14:56:05 beng Exp $ */
-
-#include	<string.h>
-
-void *
-memchr(const void *s, register int c, register size_t n)
-{
-	register const unsigned char *s1 = s;
-
-	c = (unsigned char) c;
-	if (n) {
-		n++;
-		while (--n > 0) {
-			if (*s1++ != c) continue;
-			return (void *) --s1;
-		}
-	}
-	return NULL;
-}
Index: trunk/minix/lib/ansi/memcmp.c
===================================================================
--- trunk/minix/lib/ansi/memcmp.c	(revision 9)
+++ 	(revision )
@@ -1,22 +1,0 @@
-/*
- * (c) copyright 1987 by the Vrije Universiteit, Amsterdam, The Netherlands.
- * See the copyright notice in the ACK home directory, in the file "Copyright".
- */
-/* $Id: memcmp.c,v 1.1.1.1 2005/04/21 14:56:05 beng Exp $ */
-
-#include	<string.h>
-
-int
-memcmp(const void *s1, const void *s2, size_t n)
-{
-	register const unsigned char *p1 = s1, *p2 = s2;
-
-	if (n) {
-		n++;
-		while (--n > 0) {
-			if (*p1++ == *p2++) continue;
-			return *--p1 - *--p2;
-		}
-	}
-	return 0;
-}
Index: trunk/minix/lib/ansi/memcpy.c
===================================================================
--- trunk/minix/lib/ansi/memcpy.c	(revision 9)
+++ 	(revision )
@@ -1,23 +1,0 @@
-/*
- * (c) copyright 1987 by the Vrije Universiteit, Amsterdam, The Netherlands.
- * See the copyright notice in the ACK home directory, in the file "Copyright".
- */
-/* $Header: /cvsup/minix/src/lib/ansi/memcpy.c,v 1.1.1.1 2005/04/21 14:56:05 beng Exp $ */
-
-#include	<string.h>
-
-void *
-memcpy(void *s1, const void *s2, register size_t n)
-{
-	register char *p1 = s1;
-	register const char *p2 = s2;
-
-
-	if (n) {
-		n++;
-		while (--n > 0) {
-			*p1++ = *p2++;
-		}
-	}
-	return s1;
-}
Index: trunk/minix/lib/ansi/memmove.c
===================================================================
--- trunk/minix/lib/ansi/memmove.c	(revision 9)
+++ 	(revision )
@@ -1,32 +1,0 @@
-/*
- * (c) copyright 1987 by the Vrije Universiteit, Amsterdam, The Netherlands.
- * See the copyright notice in the ACK home directory, in the file "Copyright".
- */
-/* $Header: /cvsup/minix/src/lib/ansi/memmove.c,v 1.1.1.1 2005/04/21 14:56:05 beng Exp $ */
-
-#include	<string.h>
-
-void *
-memmove(void *s1, const void *s2, register size_t n)
-{
-	register char *p1 = s1;
-	register const char *p2 = s2;
-
-	if (n>0) {
-		if (p2 <= p1 && p2 + n > p1) {
-			/* overlap, copy backwards */
-			p1 += n;
-			p2 += n;
-			n++;
-			while (--n > 0) {
-				*--p1 = *--p2;
-			}
-		} else {
-			n++;
-			while (--n > 0) {
-				*p1++ = *p2++;
-			}
-		}
-	}
-	return s1;
-}
Index: trunk/minix/lib/ansi/memset.c
===================================================================
--- trunk/minix/lib/ansi/memset.c	(revision 9)
+++ 	(revision )
@@ -1,21 +1,0 @@
-/*
- * (c) copyright 1987 by the Vrije Universiteit, Amsterdam, The Netherlands.
- * See the copyright notice in the ACK home directory, in the file "Copyright".
- */
-/* $Header: /cvsup/minix/src/lib/ansi/memset.c,v 1.1.1.1 2005/04/21 14:56:05 beng Exp $ */
-
-#include	<string.h>
-
-void *
-memset(void *s, register int c, register size_t n)
-{
-	register char *s1 = s;
-
-	if (n>0) {
-		n++;
-		while (--n > 0) {
-			*s1++ = c;
-		}
-	}
-	return s;
-}
Index: trunk/minix/lib/ansi/misc.c
===================================================================
--- trunk/minix/lib/ansi/misc.c	(revision 9)
+++ 	(revision )
@@ -1,410 +1,0 @@
-/*
- * misc - data and miscellaneous routines
- */
-/* $Header: /cvsup/minix/src/lib/ansi/misc.c,v 1.2 2005/06/17 13:00:04 jnherder Exp $ */
-
-#include	<ctype.h>
-#include	<time.h>
-#include	<stdlib.h>
-#include	<string.h>
-
-#if	defined(__BSD4_2)
-
-struct timeval {
-	long	tv_sec;		/* seconds */
-	long	tv_usec;	/* and microseconds */
-};
-
-struct timezone {
-	int	tz_minuteswest;	/* minutes west of Greenwich */
-	int	tz_dsttime;	/* type of dst correction */
-};
-
-int _gettimeofday(struct timeval *tp, struct timezone *tzp);
-
-#elif	!defined(_POSIX_SOURCE) && !defined(__USG)
-#if	!defined(_MINIX)		/* MINIX has no ftime() */
-struct timeb {
-	long	time;
-	unsigned short millitm;
-	short	timezone;
-	short	dstflag;
-};
-void _ftime(struct timeb *bp);
-#endif
-#endif
-
-#include	"loc_time.h"
-
-#define	RULE_LEN	120
-#define	TZ_LEN		10
-
-/* Make sure that the strings do not end up in ROM.
- * These strings probably contain the wrong value, and we cannot obtain the
- * right value from the system. TZ is the only help.
- */
-static char ntstr[TZ_LEN + 1] = "GMT";	/* string for normal time */
-static char dststr[TZ_LEN + 1] = "GDT";	/* string for daylight saving */
-
-long	_timezone = 0;
-long	_dst_off = 60 * 60;
-int	_daylight = 0;
-char	*_tzname[2] = {ntstr, dststr};
-
-#if	defined(__USG) || defined(_POSIX_SOURCE)
-char	*tzname[2] = {ntstr, dststr};
-
-#if	defined(__USG)
-long	timezone = 0;
-int	daylight = 0;
-#endif
-#endif
-
-static struct dsttype {
-	char ds_type;		/* Unknown, Julian, Zero-based or M */
-	int ds_date[3];		/* months, weeks, days */
-	long ds_sec;		/* usually 02:00:00 */
-}	dststart = { 'U', { 0, 0, 0 }, 2 * 60 * 60 }
-	, dstend = { 'U', { 0, 0, 0 }, 2 * 60 * 60 };
-
-const char *_days[] = {
-			"Sunday", "Monday", "Tuesday", "Wednesday",
-			"Thursday", "Friday", "Saturday"
-		};
-
-const char *_months[] = {
-			"January", "February", "March",
-			"April", "May", "June",
-			"July", "August", "September",
-			"October", "November", "December"
-		};
-
-const int _ytab[2][12] = {
-		{ 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31 },
-		{ 31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31 }
-	};
-
-static const char *
-parseZoneName(register char *buf, register const char *p)
-{
-	register int n = 0;
-
-	if (*p == ':') return NULL;
-	while (*p && !isdigit(*p) && *p != ',' && *p != '-' && *p != '+') {
-		if (n < TZ_LEN)
-			*buf++ = *p;
-		p++;
-		n++;
-	}
-	if (n < 3) return NULL;				/* error */
-	*buf = '\0';
-	return p;
-}
-
-static const char *
-parseTime(register long *tm, const char *p, register struct dsttype *dst)
-{
-	register int n = 0;
-	register const char *q = p;
-	char ds_type = (dst ? dst->ds_type : '\0');
-
-	if (dst) dst->ds_type = 'U';
-
-	*tm = 0;
-	while(*p >= '0' && *p <= '9') {
-		n = 10 * n + (*p++ - '0');
-	}
-	if (q == p) return NULL;	/* "The hour shall be required" */
-	if (n < 0 || n >= 24)	return NULL;
-	*tm = n * 60 * 60;
-	if (*p == ':') {
-		p++;
-		n = 0;
-		while(*p >= '0' && *p <= '9') {
-			n = 10 * n + (*p++ - '0');
-		}
-		if (q == p) return NULL;	/* format error */
-		if (n < 0 || n >= 60)	return NULL;
-		*tm += n * 60;
-		if (*p == ':') {
-			p++;
-			n = 0;
-			while(*p >= '0' && *p <= '9') {
-				n = 10 * n + (*p++ - '0');
-			}
-			if (q == p) return NULL;	/* format error */
-			if (n < 0 || n >= 60)	return NULL;
-			*tm += n;
-		}
-	}
-	if (dst) {
-		dst->ds_type = ds_type;
-		dst->ds_sec = *tm;
-	}
-	return p;
-}
-
-static const char *
-parseDate(register char *buf, register const char *p, struct dsttype *dstinfo)
-{
-	register const char *q;
-	register int n = 0;
-	int cnt = 0;
-	const int bnds[3][2] =	{	{ 1, 12 },
-					{ 1, 5 },
-					{ 0, 6}
-				 };
-	char ds_type;
-
-	if (*p != 'M') {
-		if (*p == 'J') {
-			*buf++ = *p++;
-			ds_type = 'J';
-		}
-		else	ds_type = 'Z';
-		q = p;
-		while(*p >= '0' && *p <= '9') {
-			n = 10 * n + (*p - '0');
-			*buf++ = *p++;
-		}
-		if (q == p) return NULL;	/* format error */
-		if (n < (ds_type == 'J') || n > 365) return NULL;
-		dstinfo->ds_type = ds_type;
-		dstinfo->ds_date[0] = n;
-		return p;
-	}
-	ds_type = 'M';
-	do {
-		*buf++ = *p++;
-		q = p;
-		n = 0;
-		while(*p >= '0' && *p <= '9') {
-			n = 10 * n + (*p - '0');
-			*buf++ = *p++;
-		}
-		if (q == p) return NULL;	/* format error */
-		if (n < bnds[cnt][0] || n > bnds[cnt][1]) return NULL;
-		dstinfo->ds_date[cnt] = n;
-		cnt++;
-	} while (cnt < 3 && *p == '.');
-	if (cnt != 3) return NULL;
-	*buf = '\0';
-	dstinfo->ds_type = ds_type;
-	return p;
-}
-
-static const char *
-parseRule(register char *buf, register const char *p)
-{
-	long time;
-	register const char *q;
-
-	if (!(p = parseDate(buf, p, &dststart))) return NULL;
-	buf += strlen(buf);
-	if (*p == '/') {
-		q = ++p;
-		if (!(p = parseTime(&time, p, &dststart))) return NULL;
-		while( p != q) *buf++ = *q++;
-	}
-	if (*p != ',') return NULL;
-	p++;
-	if (!(p = parseDate(buf, p, &dstend))) return NULL;
-	buf += strlen(buf);
-	if (*p == '/') {
-		q = ++p;
-		if (!(p = parseTime(&time, p, &dstend))) return NULL;
-		while(*buf++ = *q++);
-	}
-	if (*p) return NULL;
-	return p;
-}
-
-/* The following routine parses timezone information in POSIX-format. For
- * the requirements, see IEEE Std 1003.1-1988 section 8.1.1.
- * The function returns as soon as it spots an error.
- */
-static void
-parseTZ(const char *p)
-{
-	long tz, dst = 60 * 60, sign = 1;
-	static char lastTZ[2 * RULE_LEN];
-	static char buffer[RULE_LEN];
-
-	if (!p) return;
-
-	if (*p == ':') {
-		/*
-		 * According to POSIX, this is implementation defined.
-		 * Since it depends on the particular operating system, we
-		 * can do nothing.
-		 */
-		return;
-	}
-
-	if (!strcmp(lastTZ, p)) return;		/* nothing changed */
-
-	*_tzname[0] = '\0';
-	*_tzname[1] = '\0';
-	dststart.ds_type = 'U';
-	dststart.ds_sec = 2 * 60 * 60;
-	dstend.ds_type = 'U';
-	dstend.ds_sec = 2 * 60 * 60;
-
-	if (strlen(p) > 2 * RULE_LEN) return;
-	strcpy(lastTZ, p);
-
-	if (!(p = parseZoneName(buffer, p))) return;
-
-	if (*p == '-') {
-		sign = -1;
-		p++;
-	} else if (*p == '+') p++;
-
-	if (!(p = parseTime(&tz, p, NULL))) return;
-	tz *= sign;
-	_timezone = tz;
-	strncpy(_tzname[0], buffer, TZ_LEN);
-
-	if (!(_daylight = (*p != '\0'))) return;
-
-	buffer[0] = '\0';
-	if (!(p = parseZoneName(buffer, p))) return;
-	strncpy(_tzname[1], buffer, TZ_LEN);
-
-	buffer[0] = '\0';
-	if (*p && (*p != ','))
-		if (!(p = parseTime(&dst, p, NULL))) return;
-	_dst_off = dst;			/* dst was initialized to 1 hour */
-	if (*p) {
-		if (*p != ',') return;
-		p++;
-		if (strlen(p) > RULE_LEN) return;
-		if (!(p = parseRule(buffer, p))) return;
-	}
-}
-
-void
-_tzset(void)
-{
-#if	defined(__BSD4_2)
-
-	struct timeval tv;
-	struct timezone tz;
-
-	_gettimeofday(&tv, &tz);
-	_daylight = tz.tz_dsttime;
-	_timezone = tz.tz_minuteswest * 60L;
-
-#elif	!defined(_POSIX_SOURCE) && !defined(__USG)
-
-#if	!defined(_MINIX)		/* MINIX has no ftime() */
-	struct timeb time;
-
-	_ftime(&time);
-	_timezone = time.timezone * 60L;
-	_daylight = time.dstflag;
-#endif
-
-#endif	/* !_POSIX_SOURCE && !__USG */
-
-	parseTZ(getenv("TZ"));		/* should go inside #if */
-
-#if	defined(__USG) || defined(_POSIX_SOURCE)
-	tzname[0] = _tzname[0];
-	tzname[1] = _tzname[1];
-#if	defined(__USG)
-	timezone = _timezone;
-	daylight = _daylight;
-#endif
-#endif	/* __USG || _POSIX_SOURCE */
-}
-
-static int
-last_sunday(register int day, register struct tm *timep)
-{
-	int first = FIRSTSUNDAY(timep);
-
-	if (day >= 58 && LEAPYEAR(YEAR0 + timep->tm_year)) day++;
-	if (day < first) return first;
-	return day - (day - first) % 7;
-}
-
-static int
-date_of(register struct dsttype *dst, struct tm *timep)
-{
-	int leap = LEAPYEAR(YEAR0 + timep->tm_year);
-	int firstday, tmpday;
-	register int day, month;
-
-	if (dst->ds_type != 'M') {
-		return dst->ds_date[0] -
-			    (dst->ds_type == 'J'
-				&& leap
-				&& dst->ds_date[0] < 58);
-	}
-	day = 0;
-	month = 1;
-	while (month < dst->ds_date[0]) {
-		day += _ytab[leap][month - 1];
-		month++;
-	}
-	firstday = (day + FIRSTDAYOF(timep)) % 7;
-	tmpday = day;
-	day += (dst->ds_date[2] - firstday + 7) % 7
-		+ 7 * (dst->ds_date[1] - 1);
-	if (day >= tmpday + _ytab[leap][month-1]) day -= 7;
-	return day;
-}
-
-/*
- * The default dst transitions are those for Western Europe (except Great
- * Britain). 
- */
-unsigned
-_dstget(register struct tm *timep)
-{
-	int begindst, enddst;
-	register struct dsttype *dsts = &dststart, *dste = &dstend;
-	int do_dst = 0;
-
-	if (_daylight == -1)
-		_tzset();
-
-	timep->tm_isdst = _daylight;
-	if (!_daylight) return 0;
-
-	if (dsts->ds_type != 'U')
-		begindst = date_of(dsts, timep);
-	else begindst = last_sunday(89, timep);	/* last Sun before Apr */
-	if (dste->ds_type != 'U')
-		enddst = date_of(dste, timep);
-	else enddst = last_sunday(272, timep);	/* last Sun in Sep */
-
-	/* assume begindst != enddst (otherwise it would be no use) */
-	if (begindst < enddst) {		/* northern hemisphere */
-		if (timep->tm_yday > begindst && timep->tm_yday < enddst)
-			do_dst = 1;
-	} else {				/* southern hemisphere */
-		if (timep->tm_yday > begindst || timep->tm_yday < enddst)
-			do_dst = 1;
-	}
-
-	if (!do_dst
-	    && (timep->tm_yday == begindst || timep->tm_yday == enddst)) {
-		long dsttranssec;	/* transition when day is this old */
-		long cursec;
-
-		if (timep->tm_yday == begindst)
-			dsttranssec = dsts->ds_sec;
-		else	dsttranssec = dste->ds_sec;
-		cursec = ((timep->tm_hour * 60) + timep->tm_min) * 60L
-			    + timep->tm_sec;
-
-		if ((timep->tm_yday == begindst && cursec >= dsttranssec)
-		    || (timep->tm_yday == enddst && cursec < dsttranssec))
-			do_dst = 1;
-	}
-	if (do_dst) return _dst_off;
-	timep->tm_isdst = 0;
-	return 0;
-}
Index: trunk/minix/lib/ansi/mktime.c
===================================================================
--- trunk/minix/lib/ansi/mktime.c	(revision 9)
+++ 	(revision )
@@ -1,132 +1,0 @@
-/*
- * mktime - convert local time into calendar time
- */
-/* $Header: /cvsup/minix/src/lib/ansi/mktime.c,v 1.1.1.1 2005/04/21 14:56:06 beng Exp $ */
-
-/* Michael A. Temari <temari@ix.netcom.com>   03/01/96    */
-/*   -  fixed bug is structure fixup code                 */
-
-#include	<time.h>
-#include	<limits.h>
-#include	"loc_time.h"
-
-/* The code assumes that unsigned long can be converted to time_t.
- * A time_t should not be wider than unsigned long, since this would mean
- * that the check for overflow at the end could fail.
- */
-time_t
-mktime(register struct tm *timep)
-{
-	register long day, year;
-	register int tm_year;
-	int yday, month;
-	register unsigned long seconds;
-	int overflow;
-	unsigned dst;
-
-	timep->tm_min += timep->tm_sec / 60;
-	timep->tm_sec %= 60;
-	if (timep->tm_sec < 0) {
-		timep->tm_sec += 60;
-		timep->tm_min--;
-	}
-	timep->tm_hour += timep->tm_min / 60;
-	timep->tm_min = timep->tm_min % 60;
-	if (timep->tm_min < 0) {
-		timep->tm_min += 60;
-		timep->tm_hour--;
-	}
-	day = timep->tm_hour / 24;
-	timep->tm_hour= timep->tm_hour % 24;
-	if (timep->tm_hour < 0) {
-		timep->tm_hour += 24;
-		day--;
-	}
-	timep->tm_year += timep->tm_mon / 12;
-	timep->tm_mon %= 12;
-	if (timep->tm_mon < 0) {
-		timep->tm_mon += 12;
-		timep->tm_year--;
-	}
-	day += (timep->tm_mday - 1);
-	while (day < 0) {
-		if(--timep->tm_mon < 0) {
-			timep->tm_year--;
-			timep->tm_mon = 11;
-		}
-		day += _ytab[LEAPYEAR(YEAR0 + timep->tm_year)][timep->tm_mon];
-	}
-	while (day >= _ytab[LEAPYEAR(YEAR0 + timep->tm_year)][timep->tm_mon]) {
-		day -= _ytab[LEAPYEAR(YEAR0 + timep->tm_year)][timep->tm_mon];
-		if (++(timep->tm_mon) == 12) {
-			timep->tm_mon = 0;
-			timep->tm_year++;
-		}
-	}
-	timep->tm_mday = day + 1;
-	_tzset();			/* set timezone and dst info  */
-	year = EPOCH_YR;
-	if (timep->tm_year < year - YEAR0) return (time_t)-1;
-	seconds = 0;
-	day = 0;			/* means days since day 0 now */
-	overflow = 0;
-
-	/* Assume that when day becomes negative, there will certainly
-	 * be overflow on seconds.
-	 * The check for overflow needs not to be done for leapyears
-	 * divisible by 400.
-	 * The code only works when year (1970) is not a leapyear.
-	 */
-#if	EPOCH_YR != 1970
-#error	EPOCH_YR != 1970
-#endif
-	tm_year = timep->tm_year + YEAR0;
-
-	if (LONG_MAX / 365 < tm_year - year) overflow++;
-	day = (tm_year - year) * 365;
-	if (LONG_MAX - day < (tm_year - year) / 4 + 1) overflow++;
-	day += (tm_year - year) / 4
-		+ ((tm_year % 4) && tm_year % 4 < year % 4);
-	day -= (tm_year - year) / 100
-		+ ((tm_year % 100) && tm_year % 100 < year % 100);
-	day += (tm_year - year) / 400
-		+ ((tm_year % 400) && tm_year % 400 < year % 400);
-
-	yday = month = 0;
-	while (month < timep->tm_mon) {
-		yday += _ytab[LEAPYEAR(tm_year)][month];
-		month++;
-	}
-	yday += (timep->tm_mday - 1);
-	if (day + yday < 0) overflow++;
-	day += yday;
-
-	timep->tm_yday = yday;
-	timep->tm_wday = (day + 4) % 7;		/* day 0 was thursday (4) */
-
-	seconds = ((timep->tm_hour * 60L) + timep->tm_min) * 60L + timep->tm_sec;
-
-	if ((TIME_MAX - seconds) / SECS_DAY < day) overflow++;
-	seconds += day * SECS_DAY;
-
-	/* Now adjust according to timezone and daylight saving time */
-
-	if (((_timezone > 0) && (TIME_MAX - _timezone < seconds))
-	    || ((_timezone < 0) && (seconds < -_timezone)))
-		overflow++;
-	seconds += _timezone;
-
-	if (timep->tm_isdst < 0)
-		dst = _dstget(timep);
-	else if (timep->tm_isdst)
-		dst = _dst_off;
-	else dst = 0;
-
-	if (dst > seconds) overflow++;	/* dst is always non-negative */
-	seconds -= dst;
-
-	if (overflow) return (time_t)-1;
-
-	if ((time_t)seconds != seconds) return (time_t)-1;
-	return (time_t)seconds;
-}
Index: trunk/minix/lib/ansi/qsort.c
===================================================================
--- trunk/minix/lib/ansi/qsort.c	(revision 9)
+++ 	(revision )
@@ -1,139 +1,0 @@
-/*
- * (c) copyright 1987 by the Vrije Universiteit, Amsterdam, The Netherlands.
- * See the copyright notice in the ACK home directory, in the file "Copyright".
- */
-/* $Header: /cvsup/minix/src/lib/ansi/qsort.c,v 1.1.1.1 2005/04/21 14:56:06 beng Exp $ */
-
-#include	<stdlib.h>
-
-static	void qsort1(char *, char *, size_t);
-static	int (*qcompar)(const char *, const char *);
-static	void qexchange(char *, char *, size_t);
-static	void q3exchange(char *, char *, char *, size_t);
-
-void
-qsort(void *base, size_t nel, size_t width,
-      int (*compar)(const void *, const void *))
-{
-	/* when nel is 0, the expression '(nel - 1) * width' is wrong */
-	if (!nel) return;
-	qcompar = (int (*)(const char *, const char *)) compar;
-	qsort1(base, (char *)base + (nel - 1) * width, width);
-}
-
-static void
-qsort1(char *a1, char *a2, register size_t width)
-{
-	register char *left, *right;
-	register char *lefteq, *righteq;
-	int cmp;
-
-	for (;;) {
-		if (a2 <= a1) return;
-		left = a1;
-		right = a2;
-		lefteq = righteq = a1 + width * (((a2-a1)+width)/(2*width));
-		/*
-		   Pick an element in the middle of the array.
-		   We will collect the equals around it.
-		   "lefteq" and "righteq" indicate the left and right
-		   bounds of the equals respectively.
-		   Smaller elements end up left of it, larger elements end
-		   up right of it.
-		*/
-again:
-		while (left < lefteq && (cmp = (*qcompar)(left, lefteq)) <= 0) {
-			if (cmp < 0) {
-				/* leave it where it is */
-				left += width;
-			}
-			else {
-				/* equal, so exchange with the element to
-				   the left of the "equal"-interval.
-				*/
-				lefteq -= width;
-				qexchange(left, lefteq, width);
-			}
-		}
-		while (right > righteq) {
-			if ((cmp = (*qcompar)(right, righteq)) < 0) {
-				/* smaller, should go to left part
-				*/
-				if (left < lefteq) {
-					/* yes, we had a larger one at the
-					   left, so we can just exchange
-					*/
-					qexchange(left, right, width);
-					left += width;
-					right -= width;
-					goto again;
-				}
-				/* no more room at the left part, so we
-				   move the "equal-interval" one place to the
-				   right, and the smaller element to the
-				   left of it.
-				   This is best expressed as a three-way
-				   exchange.
-				*/
-				righteq += width;
-				q3exchange(left, righteq, right, width);
-				lefteq += width;
-				left = lefteq;
-			}
-			else if (cmp == 0) {
-				/* equal, so exchange with the element to
-				   the right of the "equal-interval"
-				*/
-				righteq += width;
-				qexchange(right, righteq, width);
-			}
-			else	/* just leave it */ right -= width;
-		}
-		if (left < lefteq) {
-			/* larger element to the left, but no more room,
-			   so move the "equal-interval" one place to the
-			   left, and the larger element to the right
-			   of it.
-			*/
-			lefteq -= width;
-			q3exchange(right, lefteq, left, width);
-			righteq -= width;
-			right = righteq;
-			goto again;
-		}
-		/* now sort the "smaller" part */
-		qsort1(a1, lefteq - width, width);
-		/* and now the larger, saving a subroutine call
-		   because of the for(;;)
-		*/
-		a1 = righteq + width;
-	}
-	/*NOTREACHED*/
-}
-
-static void
-qexchange(register char *p, register char *q,
-	  register size_t n)
-{
-	register int c;
-
-	while (n-- > 0) {
-		c = *p;
-		*p++ = *q;
-		*q++ = c;
-	}
-}
-
-static void
-q3exchange(register char *p, register char *q, register char *r,
-	   register size_t n)
-{
-	register int c;
-
-	while (n-- > 0) {
-		c = *p;
-		*p++ = *r;
-		*r++ = *q;
-		*q++ = c;
-	}
-}
Index: trunk/minix/lib/ansi/raise.c
===================================================================
--- trunk/minix/lib/ansi/raise.c	(revision 9)
+++ 	(revision )
@@ -1,21 +1,0 @@
-/*
- * (c) copyright 1987 by the Vrije Universiteit, Amsterdam, The Netherlands.
- * See the copyright notice in the ACK home directory, in the file "Copyright".
- */
-/* $Header: /cvsup/minix/src/lib/ansi/raise.c,v 1.1.1.1 2005/04/21 14:56:06 beng Exp $ */
-
-#if	defined(_POSIX_SOURCE)
-#include	<sys/types.h>
-#endif
-#include	<signal.h>
-
-int _kill(int pid, int sig);
-pid_t _getpid(void);
-
-int
-raise(int sig)
-{
-	if (sig < 0 || sig > _NSIG)
-		return -1;
-	return _kill(_getpid(), sig);
-}
Index: trunk/minix/lib/ansi/rand.c
===================================================================
--- trunk/minix/lib/ansi/rand.c	(revision 9)
+++ 	(revision )
@@ -1,20 +1,0 @@
-/*
- * (c) copyright 1987 by the Vrije Universiteit, Amsterdam, The Netherlands.
- * See the copyright notice in the ACK home directory, in the file "Copyright".
- */
-/* $Header: /cvsup/minix/src/lib/ansi/rand.c,v 1.1.1.1 2005/04/21 14:56:06 beng Exp $ */
-
-#include	<stdlib.h>
-
-static unsigned long int next = 1;
-
-int rand(void)
-{
-	next = next * 1103515245 + 12345;
-	return (unsigned int)(next/(2 * (RAND_MAX +1L)) % (RAND_MAX+1L));
-}
-
-void srand(unsigned int seed)
-{
-	next = seed;
-}
Index: trunk/minix/lib/ansi/setlocale.c
===================================================================
--- trunk/minix/lib/ansi/setlocale.c	(revision 9)
+++ 	(revision )
@@ -1,28 +1,0 @@
-/*
- * setlocale - set the programs locale
- */
-/* $Header: /cvsup/minix/src/lib/ansi/setlocale.c,v 1.1.1.1 2005/04/21 14:56:06 beng Exp $ */
-
-#include	<locale.h>
-#include	<string.h>
-
-struct lconv _lc;
-
-char *
-setlocale(int category, const char *locale)
-{
-	if (!locale) return "C";
-	if (*locale && strcmp(locale, "C")) return (char *)NULL;
-	
-	switch(category) {
-	case LC_ALL:
-	case LC_CTYPE:
-	case LC_COLLATE:
-	case LC_TIME:
-	case LC_NUMERIC:
-	case LC_MONETARY:
-		return *locale ? (char *)locale : "C";
-	default:
-		return (char *)NULL;
-	}
-}
Index: trunk/minix/lib/ansi/sigmisc.c
===================================================================
--- trunk/minix/lib/ansi/sigmisc.c	(revision 9)
+++ 	(revision )
@@ -1,39 +1,0 @@
-/*
- * sigmisc.c - used to get a signal mask
- */
-/* $Header: /cvsup/minix/src/lib/ansi/sigmisc.c,v 1.1.1.1 2005/04/21 14:56:06 beng Exp $ */
-
-#if	defined(_POSIX_SOURCE)
-
-/* This can't be done in setjmp.e, since SIG_SETMASK is defined in
- * <signal.h>. This is a C-file, which can't be included.
- */
-
-#include	<sys/types.h>
-#include	<signal.h>
-#include	<stddef.h>
-
-int _sigprocmask(int, sigset_t *, sigset_t *);
-
-static void
-__testsigset(void) {
-	/* This switch compiles when a sigset_t has the right size. */
-	switch(0) {
-	case 0: 
-	case sizeof(sigset_t) <= sizeof(long): break;
-	}
-}
-
-void
-__newsigset(sigset_t *p)
-{
-	/* The SIG_SETMASK is not significant */
-	_sigprocmask(SIG_SETMASK, NULL, p);
-}
-
-void
-__oldsigset(sigset_t *p)
-{
-	_sigprocmask(SIG_SETMASK, p, NULL);
-}
-#endif	/* _POSIX_SOURCE */
Index: trunk/minix/lib/ansi/signal.c
===================================================================
--- trunk/minix/lib/ansi/signal.c	(revision 9)
+++ 	(revision )
@@ -1,35 +1,0 @@
-/* SYSVR4 and ANSI compatible signal(2). */
-
-#include <lib.h>
-#define sigaction	_sigaction
-#define sigemptyset	_sigemptyset
-#include <signal.h>
-
-PUBLIC sighandler_t signal(sig, disp)
-int sig;			/* signal number */
-sighandler_t disp;		/* signal handler, or SIG_DFL, or SIG_IGN */
-{
-  struct sigaction sa, osa;
-
-  if (sig <= 0 || sig > _NSIG || sig == SIGKILL) {
-	errno = EINVAL;
-	return(SIG_ERR);
-  }
-  sigemptyset(&sa.sa_mask);
-
-#ifdef WANT_UNRELIABLE_SIGNALS
-  /* Allow the signal being handled to interrupt the signal handler. */
-  sa.sa_flags = SA_NODEFER;
-
-  /* When signal is caught, reset signal handler to SIG_DFL for all but
-   * SIGILL and SIGTRAP.
-   */
-  if (sig != SIGILL && sig != SIGTRAP) sa.sa_flags |= SA_RESETHAND;
-#else
-  sa.sa_flags = 0;
-#endif
-
-  sa.sa_handler = disp;
-  if (sigaction(sig, &sa, &osa) < 0) return(SIG_ERR);
-  return(osa.sa_handler);
-}
Index: trunk/minix/lib/ansi/strcat.c
===================================================================
--- trunk/minix/lib/ansi/strcat.c	(revision 9)
+++ 	(revision )
@@ -1,20 +1,0 @@
-/*
- * (c) copyright 1987 by the Vrije Universiteit, Amsterdam, The Netherlands.
- * See the copyright notice in the ACK home directory, in the file "Copyright".
- */
-/* $Header: /cvsup/minix/src/lib/ansi/strcat.c,v 1.1.1.1 2005/04/21 14:56:06 beng Exp $ */
-
-#include	<string.h>
-
-char *
-strcat(char *ret, register const char *s2)
-{
-	register char *s1 = ret;
-
-	while (*s1++ != '\0')
-		/* EMPTY */ ;
-	s1--;
-	while (*s1++ = *s2++)
-		/* EMPTY */ ;
-	return ret;
-}
Index: trunk/minix/lib/ansi/strchr.c
===================================================================
--- trunk/minix/lib/ansi/strchr.c	(revision 9)
+++ 	(revision )
@@ -1,18 +1,0 @@
-/*
- * (c) copyright 1987 by the Vrije Universiteit, Amsterdam, The Netherlands.
- * See the copyright notice in the ACK home directory, in the file "Copyright".
- */
-/* $Header: /cvsup/minix/src/lib/ansi/strchr.c,v 1.1.1.1 2005/04/21 14:56:06 beng Exp $ */
-
-#include	<string.h>
-
-char *
-strchr(register const char *s, register int c)
-{
-	c = (char) c;
-
-	while (c != *s) {
-		if (*s++ == '\0') return NULL;
-	}
-	return (char *)s;
-}
Index: trunk/minix/lib/ansi/strcmp.c
===================================================================
--- trunk/minix/lib/ansi/strcmp.c	(revision 9)
+++ 	(revision )
@@ -1,20 +1,0 @@
-/*
- * (c) copyright 1987 by the Vrije Universiteit, Amsterdam, The Netherlands.
- * See the copyright notice in the ACK home directory, in the file "Copyright".
- */
-/* $Id: strcmp.c,v 1.1.1.1 2005/04/21 14:56:06 beng Exp $ */
-
-#include	<string.h>
-
-int
-strcmp(register const char *s1, register const char *s2)
-{
-	while (*s1 == *s2++) {
-		if (*s1++ == '\0') {
-			return 0;
-		}
-	}
-	if (*s1 == '\0') return -1;
-	if (*--s2 == '\0') return 1;
-	return (unsigned char) *s1 - (unsigned char) *s2;
-}
Index: trunk/minix/lib/ansi/strcoll.c
===================================================================
--- trunk/minix/lib/ansi/strcoll.c	(revision 9)
+++ 	(revision )
@@ -1,19 +1,0 @@
-/*
- * (c) copyright 1987 by the Vrije Universiteit, Amsterdam, The Netherlands.
- * See the copyright notice in the ACK home directory, in the file "Copyright".
- */
-/* $Header: /cvsup/minix/src/lib/ansi/strcoll.c,v 1.1.1.1 2005/04/21 14:56:06 beng Exp $ */
-
-#include	<string.h>
-#include	<locale.h>
-
-int
-strcoll(register const char *s1, register const char *s2)
-{
-	while (*s1 == *s2++) {
-		if (*s1++ == '\0') {
-			return 0;
-		}
-	}
-	return *s1 - *--s2;
-}
Index: trunk/minix/lib/ansi/strcpy.c
===================================================================
--- trunk/minix/lib/ansi/strcpy.c	(revision 9)
+++ 	(revision )
@@ -1,18 +1,0 @@
-/*
- * (c) copyright 1987 by the Vrije Universiteit, Amsterdam, The Netherlands.
- * See the copyright notice in the ACK home directory, in the file "Copyright".
- */
-/* $Header: /cvsup/minix/src/lib/ansi/strcpy.c,v 1.1.1.1 2005/04/21 14:56:06 beng Exp $ */
-
-#include	<string.h>
-
-char *
-strcpy(char *ret, register const char *s2)
-{
-	register char *s1 = ret;
-
-	while (*s1++ = *s2++)
-		/* EMPTY */ ;
-
-	return ret;
-}
Index: trunk/minix/lib/ansi/strcspn.c
===================================================================
--- trunk/minix/lib/ansi/strcspn.c	(revision 9)
+++ 	(revision )
@@ -1,21 +1,0 @@
-/*
- * (c) copyright 1987 by the Vrije Universiteit, Amsterdam, The Netherlands.
- * See the copyright notice in the ACK home directory, in the file "Copyright".
- */
-/* $Header: /cvsup/minix/src/lib/ansi/strcspn.c,v 1.1.1.1 2005/04/21 14:56:06 beng Exp $ */
-
-#include	<string.h>
-
-size_t
-strcspn(const char *string, const char *notin)
-{
-	register const char *s1, *s2;
-
-	for (s1 = string; *s1; s1++) {
-		for(s2 = notin; *s2 != *s1 && *s2; s2++)
-			/* EMPTY */ ;
-		if (*s2)
-			break;
-	}
-	return s1 - string;
-}
Index: trunk/minix/lib/ansi/strerror.c
===================================================================
--- trunk/minix/lib/ansi/strerror.c	(revision 9)
+++ 	(revision )
@@ -1,22 +1,0 @@
-/*
- * (c) copyright 1987 by the Vrije Universiteit, Amsterdam, The Netherlands.
- * See the copyright notice in the ACK home directory, in the file "Copyright".
- */
-/* $Header: /cvsup/minix/src/lib/ansi/strerror.c,v 1.1.1.1 2005/04/21 14:56:06 beng Exp $ */
-
-#include	<string.h>
-
-/*
- * I don't know why, but X3J11 says that strerror() should be in declared
- * in <string.h>.  That is why the function is defined here.
- */
-char *
-strerror(register int errnum)
-{
-	extern const char *_sys_errlist[];
-	extern const int _sys_nerr;
-
-  	if (errnum < 0 || errnum >= _sys_nerr)
-		return "unknown error";
-	return (char *)_sys_errlist[errnum];
-}
Index: trunk/minix/lib/ansi/strftime.c
===================================================================
--- trunk/minix/lib/ansi/strftime.c	(revision 9)
+++ 	(revision )
@@ -1,172 +1,0 @@
-/*
- * strftime - convert a structure to a string, controlled by an argument
- */
-/* $Header: /cvsup/minix/src/lib/ansi/strftime.c,v 1.1.1.1 2005/04/21 14:56:06 beng Exp $ */
-
-#include	<time.h>
-#include	"loc_time.h"
-
-/* The width can be -1 in both s_prnt() as in u_prnt(). This
- * indicates that as many characters as needed should be printed.
- */
-static char *
-s_prnt(char *s, size_t maxsize, const char *str, int width)
-{
-	while (width > 0 || (width < 0 && *str)) {
-		if (!maxsize) break;
-		*s++ = *str++;
-		maxsize--;
-		width--;
-	}
-	return s;
-}
-
-static char *
-u_prnt(char *s, size_t maxsize, unsigned val, int width)
-{
-	int c;
-
-	c = val % 10;
-	val = val / 10;
-	if (--width > 0 || (width < 0 && val != 0))
-		s = u_prnt(s, (maxsize ? maxsize - 1 : 0), val, width);
-	if (maxsize) *s++ = c + '0';
-	return s;
-}
-
-size_t
-strftime(char *s, size_t maxsize,
-		const char *format, const struct tm *timeptr)
-{
-	size_t n;
-	char *firsts, *olds;
-
-	if (!format) return 0;
-
-	_tzset();	/* for %Z conversion */
-	firsts = s;
-	while (maxsize && *format) {
-		while (maxsize && *format && *format != '%') {
-			*s++ = *format++;
-			maxsize--;
-		}
-		if (!maxsize || !*format) break;
-		format++;
-
-		olds = s;
-		switch (*format++) {
-		case 'a':
-			s = s_prnt(s, maxsize,
-					_days[timeptr->tm_wday], ABB_LEN);
-			maxsize -= s - olds;
-			break;
-		case 'A':
-			s = s_prnt(s, maxsize, _days[timeptr->tm_wday], -1);
-			maxsize -= s - olds;
-			break;
-		case 'b':
-			s = s_prnt(s, maxsize,
-					_months[timeptr->tm_mon], ABB_LEN);
-			maxsize -= s - olds;
-			break;
-		case 'B':
-			s = s_prnt(s, maxsize, _months[timeptr->tm_mon], -1);
-			maxsize -= s - olds;
-			break;
-		case 'c':
-			n = strftime(s, maxsize,
-					"%a %b %d %H:%M:%S %Y", timeptr);
-			if (n) maxsize -= n;
-			else maxsize = 0;
-			s += n;
-			break;
-		case 'd':
-			s = u_prnt(s, maxsize, timeptr->tm_mday, 2);
-			maxsize -= s - olds;
-			break;
-		case 'H':
-			s = u_prnt(s, maxsize, timeptr->tm_hour, 2);
-			maxsize -= s - olds;
-			break;
-		case 'I':
-			s = u_prnt(s, maxsize,
-					(timeptr->tm_hour + 11) % 12 + 1, 2);
-			maxsize -= s - olds;
-			break;
-		case 'j':
-			s = u_prnt(s, maxsize, timeptr->tm_yday + 1, 3);
-			maxsize -= s - olds;
-			break;
-		case 'm':
-			s = u_prnt(s, maxsize, timeptr->tm_mon + 1, 2);
-			maxsize -= s - olds;
-			break;
-		case 'M':
-			s = u_prnt(s, maxsize, timeptr->tm_min, 2);
-			maxsize -= s - olds;
-			break;
-		case 'p':
-			s = s_prnt(s, maxsize,
-				    (timeptr->tm_hour < 12) ? "AM" : "PM", 2);
-			maxsize -= s - olds;
-			break;
-		case 'S':
-			s = u_prnt(s, maxsize, timeptr->tm_sec, 2);
-			maxsize -= s - olds;
-			break;
-		case 'U':
-			s = u_prnt(s, maxsize,		/* ??? */
-			    (timeptr->tm_yday + 7 - timeptr->tm_wday) / 7, 2);
-			maxsize -= s - olds;
-			break;
-		case 'w':
-			s = u_prnt(s, maxsize, timeptr->tm_wday, 1);
-			maxsize -= s - olds;
-			break;
-		case 'W':
-			s = u_prnt(s, maxsize,		/* ??? */
-			    (timeptr->tm_yday+7-(timeptr->tm_wday+6)%7)/7,2);
-			maxsize -= s - olds;
-			break;
-		case 'x':
-			n = strftime(s, maxsize, "%a %b %d %Y", timeptr);
-			if (n) maxsize -= n;
-			else maxsize = 0;
-			s += n;
-			break;
-		case 'X':
-			n = strftime(s, maxsize, "%H:%M:%S", timeptr);
-			if (n) maxsize -= n;
-			else maxsize = 0;
-			s += n;
-			break;
-		case 'y':
-			s = u_prnt(s, maxsize, timeptr->tm_year % 100, 2);
-			maxsize -= s - olds;
-			break;
-		case 'Y':
-			s = u_prnt(s, maxsize, timeptr->tm_year + YEAR0, -1);
-			maxsize -= s - olds;
-			break;
-		case 'Z':
-			s = s_prnt(s, maxsize,
-					_tzname[(timeptr->tm_isdst > 0)], -1);
-			maxsize -= s - olds;
-			break;
-		case '%':
-			*s++ = '%';
-			maxsize--;
-			break;
-		default:
-			/* A conversion error. Leave the loop. */
-			while (*format) format++;
-			break;
-		}
-
-	}
-	if (maxsize) {
-		*s = '\0';
-		return s - firsts;
-	}
-	return 0;	/* The buffer is full */
-}
Index: trunk/minix/lib/ansi/strlen.c
===================================================================
--- trunk/minix/lib/ansi/strlen.c	(revision 9)
+++ 	(revision )
@@ -1,18 +1,0 @@
-/*
- * (c) copyright 1987 by the Vrije Universiteit, Amsterdam, The Netherlands.
- * See the copyright notice in the ACK home directory, in the file "Copyright".
- */
-/* $Header: /cvsup/minix/src/lib/ansi/strlen.c,v 1.1.1.1 2005/04/21 14:56:06 beng Exp $ */
-
-#include	<string.h>
-
-size_t
-strlen(const char *org)
-{
-	register const char *s = org;
-
-	while (*s++)
-		/* EMPTY */ ;
-
-	return --s - org;
-}
Index: trunk/minix/lib/ansi/strncat.c
===================================================================
--- trunk/minix/lib/ansi/strncat.c	(revision 9)
+++ 	(revision )
@@ -1,25 +1,0 @@
-/*
- * (c) copyright 1987 by the Vrije Universiteit, Amsterdam, The Netherlands.
- * See the copyright notice in the ACK home directory, in the file "Copyright".
- */
-/* $Header: /cvsup/minix/src/lib/ansi/strncat.c,v 1.1.1.1 2005/04/21 14:56:06 beng Exp $ */
-
-#include	<string.h>
-
-char *
-strncat(char *ret, register const char *s2, size_t n)
-{
-	register char *s1 = ret;
-
-	if (n > 0) {
-		while (*s1++)
-			/* EMPTY */ ;
-		s1--;
-		while (*s1++ = *s2++)  {
-			if (--n > 0) continue;
-			*s1 = '\0';
-			break;
-		}
-		return ret;
-	} else return s1;
-}
Index: trunk/minix/lib/ansi/strncmp.c
===================================================================
--- trunk/minix/lib/ansi/strncmp.c	(revision 9)
+++ 	(revision )
@@ -1,26 +1,0 @@
-/*
- * (c) copyright 1987 by the Vrije Universiteit, Amsterdam, The Netherlands.
- * See the copyright notice in the ACK home directory, in the file "Copyright".
- */
-/* $Id: strncmp.c,v 1.1.1.1 2005/04/21 14:56:06 beng Exp $ */
-
-#include	<string.h>
-
-int
-strncmp(register const char *s1, register const char *s2, register size_t n)
-{
-	if (n) {
-		do {
-			if (*s1 != *s2++)
-				break;
-			if (*s1++ == '\0')
-				return 0;
-		} while (--n > 0);
-		if (n > 0) {
-			if (*s1 == '\0') return -1;
-			if (*--s2 == '\0') return 1;
-			return (unsigned char) *s1 - (unsigned char) *s2;
-		}
-	}
-	return 0;
-}
Index: trunk/minix/lib/ansi/strncpy.c
===================================================================
--- trunk/minix/lib/ansi/strncpy.c	(revision 9)
+++ 	(revision )
@@ -1,24 +1,0 @@
-/*
- * (c) copyright 1987 by the Vrije Universiteit, Amsterdam, The Netherlands.
- * See the copyright notice in the ACK home directory, in the file "Copyright".
- */
-/* $Header: /cvsup/minix/src/lib/ansi/strncpy.c,v 1.1.1.1 2005/04/21 14:56:06 beng Exp $ */
-
-#include	<string.h>
-
-char *
-strncpy(char *ret, register const char *s2, register size_t n)
-{
-	register char *s1 = ret;
-
-	if (n>0) {
-		while((*s1++ = *s2++) && --n > 0)
-			/* EMPTY */ ;
-		if ((*--s2 == '\0') && --n > 0) {
-			do {
-				*s1++ = '\0';
-			} while(--n > 0);
-		}
-	}
-	return ret;
-}
Index: trunk/minix/lib/ansi/strpbrk.c
===================================================================
--- trunk/minix/lib/ansi/strpbrk.c	(revision 9)
+++ 	(revision )
@@ -1,22 +1,0 @@
-/*
- * (c) copyright 1987 by the Vrije Universiteit, Amsterdam, The Netherlands.
- * See the copyright notice in the ACK home directory, in the file "Copyright".
- */
-/* $Header: /cvsup/minix/src/lib/ansi/strpbrk.c,v 1.1.1.1 2005/04/21 14:56:06 beng Exp $ */
-
-#include	<string.h>
-
-char *
-strpbrk(register const char *string, register const char *brk)
-{
-	register const char *s1;
-
-	while (*string) {
-		for (s1 = brk; *s1 && *s1 != *string; s1++)
-			/* EMPTY */ ;
-		if (*s1)
-			return (char *)string;
-		string++;
-	}
-	return (char *)NULL;
-}
Index: trunk/minix/lib/ansi/strrchr.c
===================================================================
--- trunk/minix/lib/ansi/strrchr.c	(revision 9)
+++ 	(revision )
@@ -1,22 +1,0 @@
-/*
- * (c) copyright 1987 by the Vrije Universiteit, Amsterdam, The Netherlands.
- * See the copyright notice in the ACK home directory, in the file "Copyright".
- */
-/* $Header: /cvsup/minix/src/lib/ansi/strrchr.c,v 1.1.1.1 2005/04/21 14:56:06 beng Exp $ */
-
-#include	<string.h>
-
-char *
-strrchr(register const char *s, int c)
-{
-	register const char *result = NULL;
-
-	c = (char) c;
-
-	do {
-		if (c == *s)
-			result = s;
-	} while (*s++ != '\0');
-
-	return (char *)result;
-}
Index: trunk/minix/lib/ansi/strspn.c
===================================================================
--- trunk/minix/lib/ansi/strspn.c	(revision 9)
+++ 	(revision )
@@ -1,21 +1,0 @@
-/*
- * (c) copyright 1987 by the Vrije Universiteit, Amsterdam, The Netherlands.
- * See the copyright notice in the ACK home directory, in the file "Copyright".
- */
-/* $Header: /cvsup/minix/src/lib/ansi/strspn.c,v 1.1.1.1 2005/04/21 14:56:06 beng Exp $ */
-
-#include	<string.h>
-
-size_t
-strspn(const char *string, const char *in)
-{
-	register const char *s1, *s2;
-
-	for (s1 = string; *s1; s1++) {
-		for (s2 = in; *s2 && *s2 != *s1; s2++)
-			/* EMPTY */ ;
-		if (*s2 == '\0')
-			break;
-	}
-	return s1 - string;
-}
Index: trunk/minix/lib/ansi/strstr.c
===================================================================
--- trunk/minix/lib/ansi/strstr.c	(revision 9)
+++ 	(revision )
@@ -1,19 +1,0 @@
-/*
- * (c) copyright 1987 by the Vrije Universiteit, Amsterdam, The Netherlands.
- * See the copyright notice in the ACK home directory, in the file "Copyright".
- */
-/* $Header: /cvsup/minix/src/lib/ansi/strstr.c,v 1.1.1.1 2005/04/21 14:56:06 beng Exp $ */
-
-#include	<string.h>
-
-char *
-strstr(register const char *s, register const char *wanted)
-{
-	register const size_t len = strlen(wanted);
-
-	if (len == 0) return (char *)s;
-	while (*s != *wanted || strncmp(s, wanted, len))
-		if (*s++ == '\0')
-			return (char *)NULL;
-	return (char *)s;
-}
Index: trunk/minix/lib/ansi/strtok.c
===================================================================
--- trunk/minix/lib/ansi/strtok.c	(revision 9)
+++ 	(revision )
@@ -1,31 +1,0 @@
-/*
- * (c) copyright 1987 by the Vrije Universiteit, Amsterdam, The Netherlands.
- * See the copyright notice in the ACK home directory, in the file "Copyright".
- */
-/* $Header: /cvsup/minix/src/lib/ansi/strtok.c,v 1.1.1.1 2005/04/21 14:56:06 beng Exp $ */
-
-#include	<string.h>
-
-char *
-strtok(register char *string, const char *separators)
-{
-	register char *s1, *s2;
-	static char *savestring;
-
-	if (string == NULL) {
-		string = savestring;
-		if (string == NULL) return (char *)NULL;
-	}
-
-	s1 = string + strspn(string, separators);
-	if (*s1 == '\0') {
-		savestring = NULL;
-		return (char *)NULL;
-	}
-
-	s2 = strpbrk(s1, separators);
-	if (s2 != NULL)
-		*s2++ = '\0';
-	savestring = s2;
-	return s1;
-}
Index: trunk/minix/lib/ansi/strtol.c
===================================================================
--- trunk/minix/lib/ansi/strtol.c	(revision 9)
+++ 	(revision )
@@ -1,101 +1,0 @@
-/*
- * (c) copyright 1987 by the Vrije Universiteit, Amsterdam, The Netherlands.
- * See the copyright notice in the ACK home directory, in the file "Copyright".
- */
-/* $Header: /cvsup/minix/src/lib/ansi/strtol.c,v 1.1.1.1 2005/04/21 14:56:06 beng Exp $ */
-
-#include	<ctype.h>
-#include	<errno.h>
-#include	<limits.h>
-#include	<stdlib.h>
-
-static unsigned long
-string2long(register const char *nptr, char **endptr,
-			int base, int is_signed);
-
-long int
-strtol(register const char *nptr, char **endptr, int base)
-{
-	return (signed long)string2long(nptr, endptr, base, 1);
-}
-
-unsigned long int
-strtoul(register const char *nptr, char **endptr, int base)
-{
-	return (unsigned long)string2long(nptr, endptr, base, 0);
-}
-
-#define between(a, c, z)  ((unsigned) ((c) - (a)) <= (unsigned) ((z) - (a)))
-
-static unsigned long
-string2long(register const char *nptr, char ** const endptr,
-			int base, int is_signed)
-{
-	register unsigned int v;
-	register unsigned long val = 0;
-	register int c;
-	int ovfl = 0, sign = 1;
-	const char *startnptr = nptr, *nrstart;
-
-	if (endptr) *endptr = (char *)nptr;
-	while (isspace(*nptr)) nptr++;
-	c = *nptr;
-
-	if (c == '-' || c == '+') {
-		if (c == '-') sign = -1;
-		nptr++;
-	}
-	nrstart = nptr;			/* start of the number */
-
-	/* When base is 0, the syntax determines the actual base */
-	if (base == 0)
-		if (*nptr == '0')
-			if (*++nptr == 'x' || *nptr == 'X') {
-				base = 16;
-				nptr++;
-			}
-			else	base = 8;
-		else	base = 10;
-	else if (base==16 && *nptr=='0' && (*++nptr =='x' || *nptr =='X'))
-		nptr++;
-
-	for (;;) {
-		c = *nptr;
-		if (between('0', c, '9')) {
-			v = c - '0';
-		} else
-		if (between('a', c, 'z')) {
-			v = c - 'a' + 0xa;
-		} else
-		if (between('A', c, 'Z')) {
-			v = c - 'A' + 0xA;
-		} else {
-			break;
-		}
-		if (v >= base) break;
-		if (val > (ULONG_MAX - v) / base) ovfl++;
-		val = (val * base) + v;
-		nptr++;
-	}
-	if (endptr) {
-		if (nrstart == nptr) *endptr = (char *)startnptr;
-		else *endptr = (char *)nptr;
-	}
-
-	if (!ovfl) {
-		/* Overflow is only possible when converting a signed long. */
-		if (is_signed
-		    && (   (sign < 0 && val > -(unsigned long)LONG_MIN)
-			|| (sign > 0 && val > LONG_MAX)))
-		    ovfl++;
-	}
-
-	if (ovfl) {
-		errno = ERANGE;
-		if (is_signed)
-			if (sign < 0) return LONG_MIN;
-			else return LONG_MAX;
-		else return ULONG_MAX;
-	}
-	return (long) sign * val;
-}
Index: trunk/minix/lib/ansi/strxfrm.c
===================================================================
--- trunk/minix/lib/ansi/strxfrm.c	(revision 9)
+++ 	(revision )
@@ -1,24 +1,0 @@
-/*
- * (c) copyright 1987 by the Vrije Universiteit, Amsterdam, The Netherlands.
- * See the copyright notice in the ACK home directory, in the file "Copyright".
- */
-/* $Header: /cvsup/minix/src/lib/ansi/strxfrm.c,v 1.1.1.1 2005/04/21 14:56:06 beng Exp $ */
-
-#include	<string.h>
-
-size_t
-strxfrm(register char *s1, register const char *save, register size_t n)
-{
-	register const char *s2 = save;
-
-	while (*s2) {
-		if (n > 1) {
-			n--;
-			*s1++ = *s2++;
-		} else
-			s2++;
-	}
-	if (n > 0)
-		*s1++ = '\0';
-	return s2 - save;
-}
Index: trunk/minix/lib/ansi/system.c
===================================================================
--- trunk/minix/lib/ansi/system.c	(revision 9)
+++ 	(revision )
@@ -1,59 +1,0 @@
-/*
- * (c) copyright 1987 by the Vrije Universiteit, Amsterdam, The Netherlands.
- * See the copyright notice in the ACK home directory, in the file "Copyright".
- */
-/* $Header: /cvsup/minix/src/lib/ansi/system.c,v 1.1.1.1 2005/04/21 14:56:06 beng Exp $ */
-
-#if	defined(_POSIX_SOURCE)
-#include	<sys/types.h>
-#endif
-#include	<stdlib.h>
-#include	<signal.h>
-
-extern pid_t _fork(void);
-extern pid_t _wait(int *);
-extern void _exit(int);
-extern void _execve(const char *path, const char ** argv, const char ** envp);
-extern int _close(int);
-
-#define	FAIL	127
-
-extern const char ***_penviron;
-static const char *exec_tab[] = {
-	"sh",			/* argv[0] */
-	"-c",			/* argument to the shell */
-	NULL,			/* to be filled with user command */
-	NULL			/* terminating NULL */
-	};
-
-int
-system(const char *str)
-{
-	int pid, exitstatus, waitval;
-	int i;
-
-	if ((pid = _fork()) < 0) return str ? -1 : 0;
-
-	if (pid == 0) {
-		for (i = 3; i <= 20; i++)
-			_close(i);
-		if (!str) str = "cd .";		/* just testing for a shell */
-		exec_tab[2] = str;		/* fill in command */
-		_execve("/bin/sh", exec_tab, *_penviron);
-		/* get here if execve fails ... */
-		_exit(FAIL);	/* see manual page */
-	}
-	while ((waitval = _wait(&exitstatus)) != pid) {
-		if (waitval == -1) break;
-	}
-	if (waitval == -1) {
-		/* no child ??? or maybe interrupted ??? */
-		exitstatus = -1;
-	}
-	if (!str) {
-		if (exitstatus == FAIL << 8)		/* execve() failed */
-			exitstatus = 0;
-		else exitstatus = 1;			/* /bin/sh exists */
-	}
-	return exitstatus;
-}
Index: trunk/minix/lib/ansi/tolower.c
===================================================================
--- trunk/minix/lib/ansi/tolower.c	(revision 9)
+++ 	(revision )
@@ -1,5 +1,0 @@
-#include	<ctype.h>
-
-int tolower(int c) {
-	return isupper(c) ? c - 'A' + 'a' : c ;
-}
Index: trunk/minix/lib/ansi/toupper.c
===================================================================
--- trunk/minix/lib/ansi/toupper.c	(revision 9)
+++ 	(revision )
@@ -1,5 +1,0 @@
-#include	<ctype.h>
-
-int toupper(int c) {
-	return islower(c) ? c - 'a' + 'A' : c ;
-}
Index: trunk/minix/lib/ansi/tzset.c
===================================================================
--- trunk/minix/lib/ansi/tzset.c	(revision 9)
+++ 	(revision )
@@ -1,15 +1,0 @@
-/*
- * tzset - set timezone information
- */
-/* $Header: /cvsup/minix/src/lib/ansi/tzset.c,v 1.1.1.1 2005/04/21 14:56:06 beng Exp $ */
-
-/* This function is present for System V && POSIX */
-
-#include	<time.h>
-#include	"loc_time.h"
-
-void
-tzset(void)
-{
-	_tzset();	/* does the job */
-}
Index: trunk/minix/lib/ansi/wcstombs.c
===================================================================
--- trunk/minix/lib/ansi/wcstombs.c	(revision 9)
+++ 	(revision )
@@ -1,21 +1,0 @@
-/*
- * (c) copyright 1987 by the Vrije Universiteit, Amsterdam, The Netherlands.
- * See the copyright notice in the ACK home directory, in the file "Copyright".
- */
-/* $Header: /cvsup/minix/src/lib/ansi/wcstombs.c,v 1.1.1.1 2005/04/21 14:56:06 beng Exp $ */
-
-#include	<stdlib.h>
-#include	<locale.h>
-#include	<limits.h>
-
-size_t
-wcstombs(register char *s, register const wchar_t *pwcs, size_t n)
-{
-	register int i = n;
-
-	while (--i >= 0) {
-		if (!(*s++ = *pwcs++))
-			break;
-	}
-	return n - i - 1;
-}
Index: trunk/minix/lib/ansi/wctomb.c
===================================================================
--- trunk/minix/lib/ansi/wctomb.c	(revision 9)
+++ 	(revision )
@@ -1,20 +1,0 @@
-/*
- * (c) copyright 1987 by the Vrije Universiteit, Amsterdam, The Netherlands.
- * See the copyright notice in the ACK home directory, in the file "Copyright".
- */
-/* $Header: /cvsup/minix/src/lib/ansi/wctomb.c,v 1.1.1.1 2005/04/21 14:56:06 beng Exp $ */
-
-#include	<stdlib.h>
-#include	<limits.h>
-
-int
-/* was: wctomb(char *s, wchar_t wchar) 
- * This conflicts with prototype, so it was changed to:
- */
-wctomb(char *s, wchar_t wchar)
-{
-	if (!s) return 0;		/* no state dependent codings */
-
-	*s = wchar;
-	return 1;
-}
Index: trunk/minix/lib/curses/Makedepend-ack
===================================================================
--- trunk/minix/lib/curses/Makedepend-ack	(revision 9)
+++ 	(revision )
@@ -1,41 +1,0 @@
-depend-ack:
-	rm .depend-ack
-	touch .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -E' beep.c | sed -e 's:^\(.\):../obj-ack//./curses/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -E' charpick.c | sed -e 's:^\(.\):../obj-ack//./curses/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -E' curs_set.c | sed -e 's:^\(.\):../obj-ack//./curses/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -E' cursesio.c | sed -e 's:^\(.\):../obj-ack//./curses/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -E' endwin.c | sed -e 's:^\(.\):../obj-ack//./curses/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -E' flash.c | sed -e 's:^\(.\):../obj-ack//./curses/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -E' initscr.c | sed -e 's:^\(.\):../obj-ack//./curses/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -E' longname.c | sed -e 's:^\(.\):../obj-ack//./curses/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -E' move.c | sed -e 's:^\(.\):../obj-ack//./curses/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -E' mvcursor.c | sed -e 's:^\(.\):../obj-ack//./curses/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -E' newwin.c | sed -e 's:^\(.\):../obj-ack//./curses/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -E' options.c | sed -e 's:^\(.\):../obj-ack//./curses/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -E' overlay.c | sed -e 's:^\(.\):../obj-ack//./curses/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -E' prntscan.c | sed -e 's:^\(.\):../obj-ack//./curses/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -E' refresh.c | sed -e 's:^\(.\):../obj-ack//./curses/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -E' scrreg.c | sed -e 's:^\(.\):../obj-ack//./curses/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -E' setterm.c | sed -e 's:^\(.\):../obj-ack//./curses/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -E' tabsize.c | sed -e 's:^\(.\):../obj-ack//./curses/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -E' termmisc.c | sed -e 's:^\(.\):../obj-ack//./curses/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -E' unctrl.c | sed -e 's:^\(.\):../obj-ack//./curses/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -E' update.c | sed -e 's:^\(.\):../obj-ack//./curses/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -E' waddch.c | sed -e 's:^\(.\):../obj-ack//./curses/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -E' waddstr.c | sed -e 's:^\(.\):../obj-ack//./curses/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -E' wbox.c | sed -e 's:^\(.\):../obj-ack//./curses/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -E' wclear.c | sed -e 's:^\(.\):../obj-ack//./curses/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -E' wclrtobot.c | sed -e 's:^\(.\):../obj-ack//./curses/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -E' wclrtoeol.c | sed -e 's:^\(.\):../obj-ack//./curses/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -E' wdelch.c | sed -e 's:^\(.\):../obj-ack//./curses/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -E' wdeleteln.c | sed -e 's:^\(.\):../obj-ack//./curses/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -E' werase.c | sed -e 's:^\(.\):../obj-ack//./curses/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -E' wgetch.c | sed -e 's:^\(.\):../obj-ack//./curses/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -E' wgetstr.c | sed -e 's:^\(.\):../obj-ack//./curses/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -E' windel.c | sed -e 's:^\(.\):../obj-ack//./curses/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -E' winmove.c | sed -e 's:^\(.\):../obj-ack//./curses/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -E' winsch.c | sed -e 's:^\(.\):../obj-ack//./curses/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -E' winscrol.c | sed -e 's:^\(.\):../obj-ack//./curses/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -E' winsertln.c | sed -e 's:^\(.\):../obj-ack//./curses/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -E' wintouch.c | sed -e 's:^\(.\):../obj-ack//./curses/\1:' >> .depend-ack
Index: trunk/minix/lib/curses/Makedepend-gnu
===================================================================
--- trunk/minix/lib/curses/Makedepend-gnu	(revision 9)
+++ 	(revision )
@@ -1,41 +1,0 @@
-depend-gnu:
-	rm .depend-gnu
-	touch .depend-gnu
-	mkdep 'gcc -O -D_MINIX -D_POSIX_SOURCE -E' beep.c | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./curses/\1:' >> .depend-gnu
-	mkdep 'gcc -O -D_MINIX -D_POSIX_SOURCE -E' charpick.c | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./curses/\1:' >> .depend-gnu
-	mkdep 'gcc -O -D_MINIX -D_POSIX_SOURCE -E' curs_set.c | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./curses/\1:' >> .depend-gnu
-	mkdep 'gcc -O -D_MINIX -D_POSIX_SOURCE -E' cursesio.c | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./curses/\1:' >> .depend-gnu
-	mkdep 'gcc -O -D_MINIX -D_POSIX_SOURCE -E' endwin.c | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./curses/\1:' >> .depend-gnu
-	mkdep 'gcc -O -D_MINIX -D_POSIX_SOURCE -E' flash.c | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./curses/\1:' >> .depend-gnu
-	mkdep 'gcc -O -D_MINIX -D_POSIX_SOURCE -E' initscr.c | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./curses/\1:' >> .depend-gnu
-	mkdep 'gcc -O -D_MINIX -D_POSIX_SOURCE -E' longname.c | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./curses/\1:' >> .depend-gnu
-	mkdep 'gcc -O -D_MINIX -D_POSIX_SOURCE -E' move.c | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./curses/\1:' >> .depend-gnu
-	mkdep 'gcc -O -D_MINIX -D_POSIX_SOURCE -E' mvcursor.c | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./curses/\1:' >> .depend-gnu
-	mkdep 'gcc -O -D_MINIX -D_POSIX_SOURCE -E' newwin.c | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./curses/\1:' >> .depend-gnu
-	mkdep 'gcc -O -D_MINIX -D_POSIX_SOURCE -E' options.c | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./curses/\1:' >> .depend-gnu
-	mkdep 'gcc -O -D_MINIX -D_POSIX_SOURCE -E' overlay.c | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./curses/\1:' >> .depend-gnu
-	mkdep 'gcc -O -D_MINIX -D_POSIX_SOURCE -E' prntscan.c | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./curses/\1:' >> .depend-gnu
-	mkdep 'gcc -O -D_MINIX -D_POSIX_SOURCE -E' refresh.c | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./curses/\1:' >> .depend-gnu
-	mkdep 'gcc -O -D_MINIX -D_POSIX_SOURCE -E' scrreg.c | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./curses/\1:' >> .depend-gnu
-	mkdep 'gcc -O -D_MINIX -D_POSIX_SOURCE -E' setterm.c | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./curses/\1:' >> .depend-gnu
-	mkdep 'gcc -O -D_MINIX -D_POSIX_SOURCE -E' tabsize.c | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./curses/\1:' >> .depend-gnu
-	mkdep 'gcc -O -D_MINIX -D_POSIX_SOURCE -E' termmisc.c | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./curses/\1:' >> .depend-gnu
-	mkdep 'gcc -O -D_MINIX -D_POSIX_SOURCE -E' unctrl.c | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./curses/\1:' >> .depend-gnu
-	mkdep 'gcc -O -D_MINIX -D_POSIX_SOURCE -E' update.c | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./curses/\1:' >> .depend-gnu
-	mkdep 'gcc -O -D_MINIX -D_POSIX_SOURCE -E' waddch.c | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./curses/\1:' >> .depend-gnu
-	mkdep 'gcc -O -D_MINIX -D_POSIX_SOURCE -E' waddstr.c | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./curses/\1:' >> .depend-gnu
-	mkdep 'gcc -O -D_MINIX -D_POSIX_SOURCE -E' wbox.c | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./curses/\1:' >> .depend-gnu
-	mkdep 'gcc -O -D_MINIX -D_POSIX_SOURCE -E' wclear.c | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./curses/\1:' >> .depend-gnu
-	mkdep 'gcc -O -D_MINIX -D_POSIX_SOURCE -E' wclrtobot.c | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./curses/\1:' >> .depend-gnu
-	mkdep 'gcc -O -D_MINIX -D_POSIX_SOURCE -E' wclrtoeol.c | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./curses/\1:' >> .depend-gnu
-	mkdep 'gcc -O -D_MINIX -D_POSIX_SOURCE -E' wdelch.c | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./curses/\1:' >> .depend-gnu
-	mkdep 'gcc -O -D_MINIX -D_POSIX_SOURCE -E' wdeleteln.c | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./curses/\1:' >> .depend-gnu
-	mkdep 'gcc -O -D_MINIX -D_POSIX_SOURCE -E' werase.c | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./curses/\1:' >> .depend-gnu
-	mkdep 'gcc -O -D_MINIX -D_POSIX_SOURCE -E' wgetch.c | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./curses/\1:' >> .depend-gnu
-	mkdep 'gcc -O -D_MINIX -D_POSIX_SOURCE -E' wgetstr.c | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./curses/\1:' >> .depend-gnu
-	mkdep 'gcc -O -D_MINIX -D_POSIX_SOURCE -E' windel.c | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./curses/\1:' >> .depend-gnu
-	mkdep 'gcc -O -D_MINIX -D_POSIX_SOURCE -E' winmove.c | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./curses/\1:' >> .depend-gnu
-	mkdep 'gcc -O -D_MINIX -D_POSIX_SOURCE -E' winsch.c | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./curses/\1:' >> .depend-gnu
-	mkdep 'gcc -O -D_MINIX -D_POSIX_SOURCE -E' winscrol.c | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./curses/\1:' >> .depend-gnu
-	mkdep 'gcc -O -D_MINIX -D_POSIX_SOURCE -E' winsertln.c | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./curses/\1:' >> .depend-gnu
-	mkdep 'gcc -O -D_MINIX -D_POSIX_SOURCE -E' wintouch.c | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./curses/\1:' >> .depend-gnu
Index: trunk/minix/lib/curses/Makefile
===================================================================
--- trunk/minix/lib/curses/Makefile	(revision 9)
+++ 	(revision )
@@ -1,311 +1,0 @@
-#Generated from ./curses/Makefile.in
-all: all-ack
-
-all-ack:
-all-gnu:
-
-makefiles: Makefile
-Makedepend-ack Makedepend-gnu: 
-	sh ../generate.sh ./curses ../obj-ack/ ../obj-gnu
-
-Makefile: Makefile.in Makedepend-ack Makedepend-gnu
-	sh ../generate.sh ./curses ../obj-ack/ ../obj-gnu
-	@echo
-	@echo *Attention*
-	@echo Makefile is regenerated... rerun command to see changes
-	@echo *Attention*
-	@echo
-
-depend: depend-ack
-all-ack: ../obj-ack//libcurses.a
-
-../obj-ack//libcurses.a: ../obj-ack//libcurses.a(beep.o)
-../obj-ack//libcurses.a: ../obj-ack//libcurses.a(charpick.o)
-../obj-ack//libcurses.a: ../obj-ack//libcurses.a(curs_set.o)
-../obj-ack//libcurses.a: ../obj-ack//libcurses.a(cursesio.o)
-../obj-ack//libcurses.a: ../obj-ack//libcurses.a(endwin.o)
-../obj-ack//libcurses.a: ../obj-ack//libcurses.a(flash.o)
-../obj-ack//libcurses.a: ../obj-ack//libcurses.a(initscr.o)
-../obj-ack//libcurses.a: ../obj-ack//libcurses.a(longname.o)
-../obj-ack//libcurses.a: ../obj-ack//libcurses.a(move.o)
-../obj-ack//libcurses.a: ../obj-ack//libcurses.a(mvcursor.o)
-../obj-ack//libcurses.a: ../obj-ack//libcurses.a(newwin.o)
-../obj-ack//libcurses.a: ../obj-ack//libcurses.a(options.o)
-../obj-ack//libcurses.a: ../obj-ack//libcurses.a(overlay.o)
-../obj-ack//libcurses.a: ../obj-ack//libcurses.a(prntscan.o)
-../obj-ack//libcurses.a: ../obj-ack//libcurses.a(refresh.o)
-../obj-ack//libcurses.a: ../obj-ack//libcurses.a(scrreg.o)
-../obj-ack//libcurses.a: ../obj-ack//libcurses.a(setterm.o)
-../obj-ack//libcurses.a: ../obj-ack//libcurses.a(tabsize.o)
-../obj-ack//libcurses.a: ../obj-ack//libcurses.a(termmisc.o)
-../obj-ack//libcurses.a: ../obj-ack//libcurses.a(unctrl.o)
-../obj-ack//libcurses.a: ../obj-ack//libcurses.a(update.o)
-../obj-ack//libcurses.a: ../obj-ack//libcurses.a(waddch.o)
-../obj-ack//libcurses.a: ../obj-ack//libcurses.a(waddstr.o)
-../obj-ack//libcurses.a: ../obj-ack//libcurses.a(wbox.o)
-../obj-ack//libcurses.a: ../obj-ack//libcurses.a(wclear.o)
-../obj-ack//libcurses.a: ../obj-ack//libcurses.a(wclrtobot.o)
-../obj-ack//libcurses.a: ../obj-ack//libcurses.a(wclrtoeol.o)
-../obj-ack//libcurses.a: ../obj-ack//libcurses.a(wdelch.o)
-../obj-ack//libcurses.a: ../obj-ack//libcurses.a(wdeleteln.o)
-../obj-ack//libcurses.a: ../obj-ack//libcurses.a(werase.o)
-../obj-ack//libcurses.a: ../obj-ack//libcurses.a(wgetch.o)
-../obj-ack//libcurses.a: ../obj-ack//libcurses.a(wgetstr.o)
-../obj-ack//libcurses.a: ../obj-ack//libcurses.a(windel.o)
-../obj-ack//libcurses.a: ../obj-ack//libcurses.a(winmove.o)
-../obj-ack//libcurses.a: ../obj-ack//libcurses.a(winsch.o)
-../obj-ack//libcurses.a: ../obj-ack//libcurses.a(winscrol.o)
-../obj-ack//libcurses.a: ../obj-ack//libcurses.a(winsertln.o)
-../obj-ack//libcurses.a: ../obj-ack//libcurses.a(wintouch.o)
-
-../obj-ack//libcurses.a:
-	ar cr ../obj-ack//libcurses.a ../obj-ack//./curses/*.o
-	rm ../obj-ack//./curses/*.o
-
-../obj-ack//libcurses.a(beep.o): beep.c
-	cc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-ack//./curses/beep.o beep.c
-../obj-ack//libcurses.a(charpick.o): charpick.c
-	cc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-ack//./curses/charpick.o charpick.c
-../obj-ack//libcurses.a(curs_set.o): curs_set.c
-	cc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-ack//./curses/curs_set.o curs_set.c
-../obj-ack//libcurses.a(cursesio.o): cursesio.c
-	cc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-ack//./curses/cursesio.o cursesio.c
-../obj-ack//libcurses.a(endwin.o): endwin.c
-	cc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-ack//./curses/endwin.o endwin.c
-../obj-ack//libcurses.a(flash.o): flash.c
-	cc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-ack//./curses/flash.o flash.c
-../obj-ack//libcurses.a(initscr.o): initscr.c
-	cc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-ack//./curses/initscr.o initscr.c
-../obj-ack//libcurses.a(longname.o): longname.c
-	cc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-ack//./curses/longname.o longname.c
-../obj-ack//libcurses.a(move.o): move.c
-	cc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-ack//./curses/move.o move.c
-../obj-ack//libcurses.a(mvcursor.o): mvcursor.c
-	cc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-ack//./curses/mvcursor.o mvcursor.c
-../obj-ack//libcurses.a(newwin.o): newwin.c
-	cc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-ack//./curses/newwin.o newwin.c
-../obj-ack//libcurses.a(options.o): options.c
-	cc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-ack//./curses/options.o options.c
-../obj-ack//libcurses.a(overlay.o): overlay.c
-	cc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-ack//./curses/overlay.o overlay.c
-../obj-ack//libcurses.a(prntscan.o): prntscan.c
-	cc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-ack//./curses/prntscan.o prntscan.c
-../obj-ack//libcurses.a(refresh.o): refresh.c
-	cc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-ack//./curses/refresh.o refresh.c
-../obj-ack//libcurses.a(scrreg.o): scrreg.c
-	cc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-ack//./curses/scrreg.o scrreg.c
-../obj-ack//libcurses.a(setterm.o): setterm.c
-	cc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-ack//./curses/setterm.o setterm.c
-../obj-ack//libcurses.a(tabsize.o): tabsize.c
-	cc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-ack//./curses/tabsize.o tabsize.c
-../obj-ack//libcurses.a(termmisc.o): termmisc.c
-	cc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-ack//./curses/termmisc.o termmisc.c
-../obj-ack//libcurses.a(unctrl.o): unctrl.c
-	cc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-ack//./curses/unctrl.o unctrl.c
-../obj-ack//libcurses.a(update.o): update.c
-	cc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-ack//./curses/update.o update.c
-../obj-ack//libcurses.a(waddch.o): waddch.c
-	cc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-ack//./curses/waddch.o waddch.c
-../obj-ack//libcurses.a(waddstr.o): waddstr.c
-	cc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-ack//./curses/waddstr.o waddstr.c
-../obj-ack//libcurses.a(wbox.o): wbox.c
-	cc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-ack//./curses/wbox.o wbox.c
-../obj-ack//libcurses.a(wclear.o): wclear.c
-	cc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-ack//./curses/wclear.o wclear.c
-../obj-ack//libcurses.a(wclrtobot.o): wclrtobot.c
-	cc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-ack//./curses/wclrtobot.o wclrtobot.c
-../obj-ack//libcurses.a(wclrtoeol.o): wclrtoeol.c
-	cc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-ack//./curses/wclrtoeol.o wclrtoeol.c
-../obj-ack//libcurses.a(wdelch.o): wdelch.c
-	cc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-ack//./curses/wdelch.o wdelch.c
-../obj-ack//libcurses.a(wdeleteln.o): wdeleteln.c
-	cc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-ack//./curses/wdeleteln.o wdeleteln.c
-../obj-ack//libcurses.a(werase.o): werase.c
-	cc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-ack//./curses/werase.o werase.c
-../obj-ack//libcurses.a(wgetch.o): wgetch.c
-	cc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-ack//./curses/wgetch.o wgetch.c
-../obj-ack//libcurses.a(wgetstr.o): wgetstr.c
-	cc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-ack//./curses/wgetstr.o wgetstr.c
-../obj-ack//libcurses.a(windel.o): windel.c
-	cc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-ack//./curses/windel.o windel.c
-../obj-ack//libcurses.a(winmove.o): winmove.c
-	cc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-ack//./curses/winmove.o winmove.c
-../obj-ack//libcurses.a(winsch.o): winsch.c
-	cc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-ack//./curses/winsch.o winsch.c
-../obj-ack//libcurses.a(winscrol.o): winscrol.c
-	cc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-ack//./curses/winscrol.o winscrol.c
-../obj-ack//libcurses.a(winsertln.o): winsertln.c
-	cc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-ack//./curses/winsertln.o winsertln.c
-../obj-ack//libcurses.a(wintouch.o): wintouch.c
-	cc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-ack//./curses/wintouch.o wintouch.c
-
-all-gnu: ../obj-gnu/libcurses.a
-
-../obj-gnu/libcurses.a: ../obj-gnu/./curses/beep.o
-../obj-gnu/libcurses.a: ../obj-gnu/./curses/charpick.o
-../obj-gnu/libcurses.a: ../obj-gnu/./curses/curs_set.o
-../obj-gnu/libcurses.a: ../obj-gnu/./curses/cursesio.o
-../obj-gnu/libcurses.a: ../obj-gnu/./curses/endwin.o
-../obj-gnu/libcurses.a: ../obj-gnu/./curses/flash.o
-../obj-gnu/libcurses.a: ../obj-gnu/./curses/initscr.o
-../obj-gnu/libcurses.a: ../obj-gnu/./curses/longname.o
-../obj-gnu/libcurses.a: ../obj-gnu/./curses/move.o
-../obj-gnu/libcurses.a: ../obj-gnu/./curses/mvcursor.o
-../obj-gnu/libcurses.a: ../obj-gnu/./curses/newwin.o
-../obj-gnu/libcurses.a: ../obj-gnu/./curses/options.o
-../obj-gnu/libcurses.a: ../obj-gnu/./curses/overlay.o
-../obj-gnu/libcurses.a: ../obj-gnu/./curses/prntscan.o
-../obj-gnu/libcurses.a: ../obj-gnu/./curses/refresh.o
-../obj-gnu/libcurses.a: ../obj-gnu/./curses/scrreg.o
-../obj-gnu/libcurses.a: ../obj-gnu/./curses/setterm.o
-../obj-gnu/libcurses.a: ../obj-gnu/./curses/tabsize.o
-../obj-gnu/libcurses.a: ../obj-gnu/./curses/termmisc.o
-../obj-gnu/libcurses.a: ../obj-gnu/./curses/unctrl.o
-../obj-gnu/libcurses.a: ../obj-gnu/./curses/update.o
-../obj-gnu/libcurses.a: ../obj-gnu/./curses/waddch.o
-../obj-gnu/libcurses.a: ../obj-gnu/./curses/waddstr.o
-../obj-gnu/libcurses.a: ../obj-gnu/./curses/wbox.o
-../obj-gnu/libcurses.a: ../obj-gnu/./curses/wclear.o
-../obj-gnu/libcurses.a: ../obj-gnu/./curses/wclrtobot.o
-../obj-gnu/libcurses.a: ../obj-gnu/./curses/wclrtoeol.o
-../obj-gnu/libcurses.a: ../obj-gnu/./curses/wdelch.o
-../obj-gnu/libcurses.a: ../obj-gnu/./curses/wdeleteln.o
-../obj-gnu/libcurses.a: ../obj-gnu/./curses/werase.o
-../obj-gnu/libcurses.a: ../obj-gnu/./curses/wgetch.o
-../obj-gnu/libcurses.a: ../obj-gnu/./curses/wgetstr.o
-../obj-gnu/libcurses.a: ../obj-gnu/./curses/windel.o
-../obj-gnu/libcurses.a: ../obj-gnu/./curses/winmove.o
-../obj-gnu/libcurses.a: ../obj-gnu/./curses/winsch.o
-../obj-gnu/libcurses.a: ../obj-gnu/./curses/winscrol.o
-../obj-gnu/libcurses.a: ../obj-gnu/./curses/winsertln.o
-../obj-gnu/libcurses.a: ../obj-gnu/./curses/wintouch.o
-
-../obj-gnu/libcurses.a:
-	gar cr ../obj-gnu/libcurses.a $?
-
-../obj-gnu/./curses/beep.o: beep.c
-	gcc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-gnu/./curses/beep.o beep.c
-
-../obj-gnu/./curses/charpick.o: charpick.c
-	gcc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-gnu/./curses/charpick.o charpick.c
-
-../obj-gnu/./curses/curs_set.o: curs_set.c
-	gcc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-gnu/./curses/curs_set.o curs_set.c
-
-../obj-gnu/./curses/cursesio.o: cursesio.c
-	gcc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-gnu/./curses/cursesio.o cursesio.c
-
-../obj-gnu/./curses/endwin.o: endwin.c
-	gcc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-gnu/./curses/endwin.o endwin.c
-
-../obj-gnu/./curses/flash.o: flash.c
-	gcc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-gnu/./curses/flash.o flash.c
-
-../obj-gnu/./curses/initscr.o: initscr.c
-	gcc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-gnu/./curses/initscr.o initscr.c
-
-../obj-gnu/./curses/longname.o: longname.c
-	gcc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-gnu/./curses/longname.o longname.c
-
-../obj-gnu/./curses/move.o: move.c
-	gcc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-gnu/./curses/move.o move.c
-
-../obj-gnu/./curses/mvcursor.o: mvcursor.c
-	gcc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-gnu/./curses/mvcursor.o mvcursor.c
-
-../obj-gnu/./curses/newwin.o: newwin.c
-	gcc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-gnu/./curses/newwin.o newwin.c
-
-../obj-gnu/./curses/options.o: options.c
-	gcc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-gnu/./curses/options.o options.c
-
-../obj-gnu/./curses/overlay.o: overlay.c
-	gcc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-gnu/./curses/overlay.o overlay.c
-
-../obj-gnu/./curses/prntscan.o: prntscan.c
-	gcc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-gnu/./curses/prntscan.o prntscan.c
-
-../obj-gnu/./curses/refresh.o: refresh.c
-	gcc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-gnu/./curses/refresh.o refresh.c
-
-../obj-gnu/./curses/scrreg.o: scrreg.c
-	gcc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-gnu/./curses/scrreg.o scrreg.c
-
-../obj-gnu/./curses/setterm.o: setterm.c
-	gcc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-gnu/./curses/setterm.o setterm.c
-
-../obj-gnu/./curses/tabsize.o: tabsize.c
-	gcc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-gnu/./curses/tabsize.o tabsize.c
-
-../obj-gnu/./curses/termmisc.o: termmisc.c
-	gcc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-gnu/./curses/termmisc.o termmisc.c
-
-../obj-gnu/./curses/unctrl.o: unctrl.c
-	gcc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-gnu/./curses/unctrl.o unctrl.c
-
-../obj-gnu/./curses/update.o: update.c
-	gcc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-gnu/./curses/update.o update.c
-
-../obj-gnu/./curses/waddch.o: waddch.c
-	gcc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-gnu/./curses/waddch.o waddch.c
-
-../obj-gnu/./curses/waddstr.o: waddstr.c
-	gcc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-gnu/./curses/waddstr.o waddstr.c
-
-../obj-gnu/./curses/wbox.o: wbox.c
-	gcc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-gnu/./curses/wbox.o wbox.c
-
-../obj-gnu/./curses/wclear.o: wclear.c
-	gcc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-gnu/./curses/wclear.o wclear.c
-
-../obj-gnu/./curses/wclrtobot.o: wclrtobot.c
-	gcc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-gnu/./curses/wclrtobot.o wclrtobot.c
-
-../obj-gnu/./curses/wclrtoeol.o: wclrtoeol.c
-	gcc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-gnu/./curses/wclrtoeol.o wclrtoeol.c
-
-../obj-gnu/./curses/wdelch.o: wdelch.c
-	gcc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-gnu/./curses/wdelch.o wdelch.c
-
-../obj-gnu/./curses/wdeleteln.o: wdeleteln.c
-	gcc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-gnu/./curses/wdeleteln.o wdeleteln.c
-
-../obj-gnu/./curses/werase.o: werase.c
-	gcc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-gnu/./curses/werase.o werase.c
-
-../obj-gnu/./curses/wgetch.o: wgetch.c
-	gcc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-gnu/./curses/wgetch.o wgetch.c
-
-../obj-gnu/./curses/wgetstr.o: wgetstr.c
-	gcc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-gnu/./curses/wgetstr.o wgetstr.c
-
-../obj-gnu/./curses/windel.o: windel.c
-	gcc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-gnu/./curses/windel.o windel.c
-
-../obj-gnu/./curses/winmove.o: winmove.c
-	gcc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-gnu/./curses/winmove.o winmove.c
-
-../obj-gnu/./curses/winsch.o: winsch.c
-	gcc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-gnu/./curses/winsch.o winsch.c
-
-../obj-gnu/./curses/winscrol.o: winscrol.c
-	gcc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-gnu/./curses/winscrol.o winscrol.c
-
-../obj-gnu/./curses/winsertln.o: winsertln.c
-	gcc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-gnu/./curses/winsertln.o winsertln.c
-
-../obj-gnu/./curses/wintouch.o: wintouch.c
-	gcc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-gnu/./curses/wintouch.o wintouch.c
-
-
-
-
-clean::
-	rm -f ../obj-ack//./curses/*
-	rm -f ../obj-gnu/./curses/*
-
-include Makedepend-ack
-include .depend-ack
-
-include Makedepend-gnu
-include .depend-gnu
Index: trunk/minix/lib/curses/Makefile.in
===================================================================
--- trunk/minix/lib/curses/Makefile.in	(revision 9)
+++ 	(revision )
@@ -1,47 +1,0 @@
-# Makefile for lib/curses.
-
-CFLAGS="-O -D_MINIX -D_POSIX_SOURCE"
-
-LIBRARIES=libcurses
-
-libcurses_FILES=" \
-	beep.c \
-	charpick.c \
-	curs_set.c \
-	cursesio.c \
-	endwin.c \
-	flash.c \
-	initscr.c \
-	longname.c \
-	move.c \
-	mvcursor.c \
-	newwin.c \
-	options.c \
-	overlay.c \
-	prntscan.c \
-	refresh.c \
-	scrreg.c \
-	setterm.c \
-	tabsize.c \
-	termmisc.c \
-	unctrl.c \
-	update.c \
-	waddch.c \
-	waddstr.c \
-	wbox.c \
-	wclear.c \
-	wclrtobot.c \
-	wclrtoeol.c \
-	wdelch.c \
-	wdeleteln.c \
-	werase.c \
-	wgetch.c \
-	wgetstr.c \
-	windel.c \
-	winmove.c \
-	winsch.c \
-	winscrol.c \
-	winsertln.c \
-	wintouch.c"
-
-TYPE=both
Index: trunk/minix/lib/curses/beep.c
===================================================================
--- trunk/minix/lib/curses/beep.c	(revision 9)
+++ 	(revision )
@@ -1,14 +1,0 @@
-#include <curses.h>
-#include "curspriv.h"
-#include <termcap.h>
-
-extern char *bl, *vb;
-
-/* Beep() sounds the terminal bell. */
-void beep()
-{
-  if (bl)
-	tputs(bl, 1, outc);
-  else if (vb)
-	tputs(vb, 1, outc);
-}
Index: trunk/minix/lib/curses/charpick.c
===================================================================
--- trunk/minix/lib/curses/charpick.c	(revision 9)
+++ 	(revision )
@@ -1,40 +1,0 @@
-#include <curses.h>
-#include "curspriv.h"
-
-/****************************************************************/
-/* Winch(win) returns the character at the current position in	*/
-/* Window 'win'.						*/
-/****************************************************************/
-
-int winch(win)
-WINDOW *win;
-{
-  return((win->_line[win->_cury][win->_curx]) & 0xff);
-}				/* winch */
-
-/****************************************************************/
-/* Mvinch() moves the stdscr cursor to a new position, then	*/
-/* Returns the character at that position.			*/
-/****************************************************************/
-
-int mvinch(y, x)
-int y;
-int x;
-{
-  if (wmove(stdscr, y, x) == ERR) return(ERR);
-  return((stdscr->_line[stdscr->_cury][stdscr->_curx]) & 0xff);
-}
-
-/****************************************************************/
-/* Mvwinch() moves the cursor of window 'win' to a new posi-	*/
-/* Tion, then returns the character at that position.		*/
-/****************************************************************/
-
-int mvwinch(win, y, x)
-WINDOW *win;
-int y;
-int x;
-{
-  if (wmove(win, y, x) == ERR) return(ERR);
-  return((win->_line[win->_cury][win->_curx]) & 0xff);
-}
Index: trunk/minix/lib/curses/curs_set.c
===================================================================
--- trunk/minix/lib/curses/curs_set.c	(revision 9)
+++ 	(revision )
@@ -1,26 +1,0 @@
-#include <curses.h>
-#include "curspriv.h"
-#include <termcap.h>
-
-extern char *vi, *ve, *vs;
-
-/* Sets cursor visibility to unvisible=0; normal visible=1 or very good
- * visible=2. 
-*/
-void curs_set(visibility)
-int visibility;
-{
-  switch (visibility) {
-      case 0:
-	if (vi) tputs(vi, 1, outc);
-	break;
-      case 1:
-	if (ve) tputs(ve, 1, outc);
-	break;
-      case 2:
-	if (vs)
-		tputs(vs, 1, outc);
-	else if (ve)
-		tputs(ve, 1, outc);
-  }
-}
Index: trunk/minix/lib/curses/cursesio.c
===================================================================
--- trunk/minix/lib/curses/cursesio.c	(revision 9)
+++ 	(revision )
@@ -1,223 +1,0 @@
-#include <stdlib.h>
-#include <termcap.h>
-#include <sys/types.h>
-#include <sys/ioctl.h>
-#include <curses.h>
-#include "curspriv.h"
-
-struct termios _orig_tty, _tty;
-cursv _cursvar;
-
-WINDOW *stdscr, *curscr;
-int LINES, COLS;
-bool NONL;
-
-char termcap[1024];		/* termcap buffer */
-char tc[200];			/* area to hold string capabilities */
-char *ttytype;			/* terminal type from env */
-static char *arp;		/* pointer for use in tgetstr */
-char *cp;			/* character pointer */
-
-char *cl;			/* clear screen capability */
-char *cm;			/* cursor motion capability */
-char *so;			/* start standout capability */
-char *se;			/* end standout capability */
-char *mr;			/* start of reverse */
-char *me;			/* revert to normal */
-char *mb;			/* start of blink */
-char *md;			/* start of bold */
-char *us;			/* start of underscore */
-char *ue;			/* end of underscore */
-char *vi;			/* cursor invisible */
-char *ve;			/* cursor normal */
-char *vs;			/* cursor good visible */
-char *as;			/* alternative charset start */
-char *ae;			/* alternative charset end */
-char *bl;			/* ring the bell */
-char *vb;			/* visual bell */
-
-/* fatal - report error and die. Never returns */
-void fatal(s)
-char *s;
-{
-  (void) fprintf(stderr, "curses: %s\n", s);
-  exit(1);
-}
-
-/* Outc - call putchar, necessary because putchar is a macro. */
-void outc(c)
-int c;
-{
-  putchar(c);
-}
-
-/* Move cursor to r,c */
-void poscur(r, c)
-int r, c;
-{
-  tputs(tgoto(cm, c, r), 1, outc);
-}
-
-/* Clear the screen */
-void clrscr()
-{
-  tputs(cl, 1, outc);
-}
-
-/* This are terminal independent characters which can be used in curses */
-
-unsigned int ACS_ULCORNER;
-unsigned int ACS_LLCORNER;
-unsigned int ACS_URCORNER;
-unsigned int ACS_LRCORNER;
-unsigned int ACS_RTEE;
-unsigned int ACS_LTEE;
-unsigned int ACS_BTEE;
-unsigned int ACS_TTEE;
-unsigned int ACS_HLINE;
-unsigned int ACS_VLINE;
-unsigned int ACS_PLUS;
-unsigned int ACS_S1;
-unsigned int ACS_S9;
-unsigned int ACS_DIAMOND;
-unsigned int ACS_CKBOARD;
-unsigned int ACS_DEGREE;
-unsigned int ACS_PLMINUS;
-unsigned int ACS_BULLET;
-unsigned int ACS_LARROW;
-unsigned int ACS_RARROW;
-unsigned int ACS_DARROW;
-unsigned int ACS_UARROW;
-unsigned int ACS_BOARD;
-unsigned int ACS_LANTERN;
-unsigned int ACS_BLOCK;
-
-/* These defines describe the full set of grafic block characters which
- * can be defined via termcap.
- */
-
-#define RIGHTARROW  0
-#define LEFTARROW   1
-#define DOWNARROW   2
-#define UPARROW     3
-#define FULLSQUARE  4
-#define GREYSQUARE  5
-#define EMPTYSQUARE 6
-#define LATERN      7
-#define DIAMOND     8
-#define DEGREE      9
-#define PLUSMINUS  10
-#define DOWNRIGHT  11
-#define UPRIGHT    12
-#define UPLEFT     13
-#define DOWNLEFT   14
-#define CROSS      15
-#define UPLINE     16
-#define UPMIDLINE  17
-#define MIDLINE    18
-#define DOMIDLINE  19
-#define DOWNLINE   20
-#define TEELEFT    21
-#define TEERIGHT   22
-#define TEEHEAD    23
-#define TEENORMAL  24
-#define VERTLINE   25
-#define PARAGRAPH  26
-
-unsigned int _cursgraftable[27] =
-{
- '>', '<', 'v', '^', '#', ':', ' ', '#', '+', '\'', '#', '+', '+',
- '+', '+', '+', '-', ' ', '-', ' ', '_', '+', '+', '+', '+', '|'
-};
-char _cursident[28] = "+,.-0ahI`fgjklmnopqrstuvwx~";
-
-int setterm(type)
-char *type;
-{
-  unsigned char *ac;
-  int i;
-#ifdef TIOCGWINSZ
-  struct winsize wsize;
-#endif
-
-  if (tgetent(termcap, type) != 1) return ERR;
-
-#ifdef TIOCGWINSZ
-  if (ioctl(0, TIOCGWINSZ, &wsize) == 0) {
-	LINES = wsize.ws_row != 0 ? wsize.ws_row : tgetnum("li");
-	COLS = wsize.ws_col != 0 ? wsize.ws_col : tgetnum("co");
-  } else {
-#endif
-	LINES = tgetnum("li");
-	COLS = tgetnum("co");
-#ifdef TIOCGWINSZ
-  }
-#endif
-  arp = tc;
-  cl = tgetstr("cl", &arp);
-  so = tgetstr("so", &arp);
-  se = tgetstr("se", &arp);
-  cm = tgetstr("cm", &arp);
-  mr = tgetstr("mr", &arp);
-  me = tgetstr("me", &arp);
-  mb = tgetstr("mb", &arp);
-  md = tgetstr("md", &arp);
-  us = tgetstr("us", &arp);
-  ue = tgetstr("ue", &arp);
-  vi = tgetstr("vi", &arp);
-  ve = tgetstr("ve", &arp);
-  vs = tgetstr("vs", &arp);
-  as = tgetstr("as", &arp);
-  ae = tgetstr("ae", &arp);
-  ac = (unsigned char *) tgetstr("ac", &arp);
-  bl = tgetstr("bl", &arp);
-  vb = tgetstr("vb", &arp);
-
-  if (ac) {
-	while (*ac) {
-		i = 0;
-		while (*ac != _cursident[i]) i++;
-		_cursgraftable[i] = *++ac | A_ALTCHARSET;
-		ac++;
-	}
-  }
-
-  ACS_ULCORNER = _cursgraftable[UPLEFT];
-  ACS_LLCORNER = _cursgraftable[DOWNLEFT];
-  ACS_URCORNER = _cursgraftable[UPRIGHT];
-  ACS_LRCORNER = _cursgraftable[DOWNRIGHT];
-  ACS_RTEE = _cursgraftable[TEERIGHT];
-  ACS_LTEE = _cursgraftable[TEELEFT];
-  ACS_BTEE = _cursgraftable[TEEHEAD];
-  ACS_TTEE = _cursgraftable[TEENORMAL];
-  ACS_HLINE = _cursgraftable[MIDLINE];
-  ACS_VLINE = _cursgraftable[VERTLINE];
-  ACS_PLUS = _cursgraftable[CROSS];
-  ACS_S1 = _cursgraftable[UPLINE];
-  ACS_S9 = _cursgraftable[DOWNLINE];
-  ACS_DIAMOND = _cursgraftable[DIAMOND];
-  ACS_CKBOARD = _cursgraftable[GREYSQUARE];
-  ACS_DEGREE = _cursgraftable[DEGREE];
-  ACS_PLMINUS = _cursgraftable[PLUSMINUS];
-  ACS_BULLET = 'o';		/* where the hell is a bullet defined in
-			 * termcap ??? */
-  ACS_LARROW = _cursgraftable[LEFTARROW];
-  ACS_RARROW = _cursgraftable[RIGHTARROW];
-  ACS_DARROW = _cursgraftable[DOWNARROW];
-  ACS_UARROW = _cursgraftable[UPARROW];
-  ACS_BOARD = _cursgraftable[EMPTYSQUARE];
-  ACS_LANTERN = _cursgraftable[LATERN];
-  ACS_BLOCK = _cursgraftable[FULLSQUARE];
-  /* Wow, I got it! */
-  return OK;
-}
-
-void gettmode()
-{
-  tcgetattr(0, &_orig_tty);
-  tcgetattr(0, &_tty);
-  _cursvar.echoit = (_tty.c_lflag & ECHO) != 0;
-  _cursvar.rawmode = (_tty.c_lflag & (ICANON|ISIG)) == 0;
-  _cursvar.cbrkmode = (_tty.c_lflag & (ICANON|ISIG)) == ISIG;
-  NONL = (_tty.c_iflag & ICRNL) != 0;
-}
Index: trunk/minix/lib/curses/curspriv.h
===================================================================
--- trunk/minix/lib/curses/curspriv.h	(revision 9)
+++ 	(revision )
@@ -1,36 +1,0 @@
-/* Constants */
-#define	_SUBWIN		1		/* window is a subwindow */
-#define	_ENDLINE	2		/* last winline is last screen line */
-#define	_FULLWIN	4		/* window fills screen */
-#define	_SCROLLWIN	8		/* window lwr rgt is screen lwr rgt */
-
-#define	_NO_CHANGE	-1		/* flags line edge unchanged */
-#define	_BREAKCHAR	0x03		/* ^C character */
-#define _DCCHAR		0x08		/* Delete Char char (BS) */
-#define _DLCHAR		0x1b		/* Delete Line char (ESC) */
-#define	_GOCHAR		0x11		/* ^Q character */
-#define	_PRINTCHAR	0x10		/* ^P character */
-#define	_STOPCHAR	0x13		/* ^S character */
-#define	 NUNGETCH	10		/* max # chars to ungetch() */
-
-#define max(a,b) (((a) > (b)) ? (a) : (b))
-#define min(a,b) (((a) < (b)) ? (a) : (b))
-
-/* Character mask definitions. */
-#define CHR_MSK	((int) 0x00ff)		/* ASCIIZ character mask */
-#define	ATR_MSK	((int) 0xff00)		/* attribute mask */
-#define ATR_NRM	((int) 0x0000)		/* no special attributes */
-
-/* Type declarations. */
-
-typedef	struct {
-  WINDOW  *tmpwin;			/* window used for updates */
-  int	   cursrow;			/* position of physical cursor */
-  int	   curscol;
-  bool     rawmode;
-  bool     cbrkmode;
-  bool     echoit;
-} cursv;
-
-/* External variables */
-extern	cursv   _cursvar;		/* curses variables */
Index: trunk/minix/lib/curses/endwin.c
===================================================================
--- trunk/minix/lib/curses/endwin.c	(revision 9)
+++ 	(revision )
@@ -1,18 +1,0 @@
-#include <curses.h>
-#include "curspriv.h"
-#include <termcap.h>
-
-int endwin()
-{
-  extern char *me;
-
-  curs_set(1);
-  poscur(LINES - 1, 0);
-  refresh();
-  tputs(me, 1, outc);
-  delwin(stdscr);
-  delwin(curscr);
-  delwin(_cursvar.tmpwin);
-  resetty();
-  return(OK);
-}
Index: trunk/minix/lib/curses/flash.c
===================================================================
--- trunk/minix/lib/curses/flash.c	(revision 9)
+++ 	(revision )
@@ -1,14 +1,0 @@
-#include <curses.h>
-#include "curspriv.h"
-#include <termcap.h>
-
-extern char *bl, *vb;
-
-/* Flash() flashes the terminal screen. */
-void flash()
-{
-  if (vb)
-	tputs(vb, 1, outc);
-  else if (bl)
-	tputs(bl, 1, outc);
-}
Index: trunk/minix/lib/curses/initscr.c
===================================================================
--- trunk/minix/lib/curses/initscr.c	(revision 9)
+++ 	(revision )
@@ -1,19 +1,0 @@
-/* initscr.c - initialize the curses library */
-
-#include <stdlib.h>
-#include <curses.h>
-#include "curspriv.h"
-
-WINDOW *initscr()
-{
-  char *term;
-
-  if ((term = getenv("TERM")) == NULL) return NULL;
-  setterm(term);
-  gettmode();
-  if ((_cursvar.tmpwin = newwin(LINES, COLS, 0, 0)) == NULL) return NULL;
-  if ((curscr = newwin(LINES, COLS, 0, 0)) == NULL) return NULL;
-  if ((stdscr = newwin(LINES, COLS, 0, 0)) == NULL) return NULL;
-  clearok(curscr, TRUE);
-  return(stdscr);
-}
Index: trunk/minix/lib/curses/longname.c
===================================================================
--- trunk/minix/lib/curses/longname.c	(revision 9)
+++ 	(revision )
@@ -1,12 +1,0 @@
-#include <curses.h>
-#include "curspriv.h"
-
-/****************************************************************/
-/* Longname() returns a pointer to a string describing the	*/
-/* User terminal.						*/
-/****************************************************************/
-
-char *longname()
-{
-  return("not implemented");
-}
Index: trunk/minix/lib/curses/move.c
===================================================================
--- trunk/minix/lib/curses/move.c	(revision 9)
+++ 	(revision )
@@ -1,18 +1,0 @@
-#include <curses.h>
-#include "curspriv.h"
-
-/****************************************************************/
-/* Wmove() moves the cursor in window 'win' to position (x,y).	*/
-/****************************************************************/
-
-int wmove(win, y, x)
-WINDOW *win;
-int y;
-int x;
-{
-  if ((x<0) || (x>win->_maxx) || (y<win->_regtop) || (y>win->_regbottom)) 
-	return(ERR);
-  win->_curx = x;
-  win->_cury = y;
-  return(OK);
-}
Index: trunk/minix/lib/curses/mvcursor.c
===================================================================
--- trunk/minix/lib/curses/mvcursor.c	(revision 9)
+++ 	(revision )
@@ -1,20 +1,0 @@
-#include <curses.h>
-#include "curspriv.h"
-
-/****************************************************************/
-/* Mvcur(oldy,oldx,newy,newx) the display cursor to <newy,newx>	*/
-/****************************************************************/
-
-int mvcur(oldy, oldx, newy, newx)
-int oldy;
-int oldx;
-int newy;
-int newx;
-{
-  if ((newy >= LINES) || (newx >= COLS) || (newy < 0) || (newx < 0))
-	return(ERR);
-  poscur(newy, newx);
-  _cursvar.cursrow = newy;
-  _cursvar.curscol = newx;
-  return(OK);
-}
Index: trunk/minix/lib/curses/newwin.c
===================================================================
--- trunk/minix/lib/curses/newwin.c	(revision 9)
+++ 	(revision )
@@ -1,144 +1,0 @@
-#include <stdlib.h>
-#include <curses.h>
-#include "curspriv.h"
-
-/****************************************************************/
-/* Makenew() allocates all data for a new window except the	*/
-/* Actual lines themselves.					*/
-/****************************************************************/
-
-_PROTOTYPE(static WINDOW *makenew, (int nlines, int ncols, int begy,int begx));
-
-static WINDOW *makenew(num_lines, num_columns, begy, begx)
-int num_lines, num_columns, begy, begx;
-{
-  int i;
-  WINDOW *win;
-
-  /* Allocate the window structure itself */
-  if ((win = (WINDOW *) malloc(sizeof(WINDOW))) == NULL) 
-	return((WINDOW *) ERR);
-
-  /* Allocate the line pointer array */
-  if ((win->_line = (int **) calloc(num_lines, sizeof(int *))) == NULL) {
-	free(win);
-	return((WINDOW *) ERR);
-  }
-
-  /* Allocate the minchng and maxchng arrays */
-  if ((win->_minchng = (int *) calloc(num_lines, sizeof(int))) == NULL) {
-	free(win);
-	free(win->_line);
-	return((WINDOW *) ERR);
-  }
-  if ((win->_maxchng = (int *) calloc(num_lines, sizeof(int))) == NULL) {
-	free(win);
-	free(win->_line);
-	free(win->_minchng);
-	return((WINDOW *) ERR);
-  }
-
-  /* Initialize window variables */
-  win->_curx = 0;
-  win->_cury = 0;
-  win->_maxy = num_lines - 1;
-  win->_maxx = num_columns - 1;
-  win->_begy = begy;
-  win->_begx = begx;
-  win->_flags = 0;
-  win->_attrs = ATR_NRM;
-  win->_tabsize = 8;
-  win->_clear = FALSE;
-  win->_leave = FALSE;
-  win->_scroll = FALSE;
-  win->_nodelay = FALSE;
-  win->_keypad = FALSE;
-  win->_regtop = 0;
-  win->_regbottom = num_lines - 1;
-
-  /* Init to say window unchanged */
-  for (i = 0; i < num_lines; i++) {
-	win->_minchng[i] = 0;
-	win->_maxchng[i] = num_columns - 1;
-  }
-
-  /* Set flags for window properties */
-  if ((begy + num_lines) == LINES) {
-	win->_flags |= _ENDLINE;
-	if ((begx == 0) && (num_columns == COLS) && (begy == 0))
-		win->_flags |= _FULLWIN;
-  }				/* if */
-  if (((begy + num_lines) == LINES) && ((begx + num_columns) == COLS))
-	win->_flags |= _SCROLLWIN;
-  return(win);
-}
-
-
-/****************************************************************/
-/* Newwin() creates a new window with size num_lines * num_co-	*/
-/* Lumns, and origin begx,begy relative to the SCREEN. Special	*/
-/* Case: if num_lines and/or num_columns is 0, the remainder of	*/
-/* The screen is used.						*/
-/****************************************************************/
-WINDOW *newwin(num_lines, num_columns, begy, begx)
-int num_lines, num_columns, begy, begx;
-{
-  WINDOW *win;
-  int *ptr;
-  int i, j;
-
-  if (num_lines == 0) num_lines = LINES - begy;
-  if (num_columns == 0) num_columns = COLS - begx;
-  if ((win = makenew(num_lines, num_columns, begy, begx)) == (WINDOW *) ERR)
-	return((WINDOW *) ERR);
-  for (i = 0; i < num_lines; i++) {	/* make and clear the lines */
-	if ((win->_line[i] = (int *)calloc(num_columns, sizeof(int))) == NULL){
-		for (j = 0; j < i; j++)	/* if error, free all the data */
-			free(win->_line[j]);
-		free(win->_minchng);
-		free(win->_maxchng);
-		free(win->_line);
-		free(win);
-		return((WINDOW *) ERR);
-	} else {
-		for (ptr = win->_line[i]; ptr < win->_line[i] + num_columns;)
-			*ptr++ = ' ' | ATR_NRM;
-	}
-  }
-  return(win);
-}
-
-
-/****************************************************************/
-/* Subwin() creates a sub-window in the 'orig' window, with	*/
-/* Size num_lines * num_columns, and with origin begx, begy	*/
-/* Relative to the SCREEN. Special case: if num_lines and/or	*/
-/* Num_columns is 0, the remainder of the original window is	*/
-/* Used. The subwindow uses the original window's line buffers	*/
-/* To store it's own lines.					*/
-/****************************************************************/
-WINDOW *subwin(orig, num_lines, num_columns, begy, begx)
-WINDOW *orig;
-int num_lines, num_columns, begy, begx;
-{
-  WINDOW *win;
-  int i, j, k;
-
-  /* Make sure window fits inside the original one */
-  if (begy < orig->_begy || begx < orig->_begx ||
-		      (begy + num_lines) > (orig->_begy + orig->_maxy) ||
-		      (begx + num_columns) > (orig->_begx + orig->_maxx) )
-	return((WINDOW *) ERR);
-
-  if (num_lines == 0) num_lines = orig->_maxy - (begy - orig->_begy);
-  if (num_columns == 0) num_columns = orig->_maxx - (begx - orig->_begx);
-  if ((win = makenew(num_lines, num_columns, begy, begx)) == (WINDOW *) ERR)
-	return((WINDOW *) ERR);
-
-  /* Set line pointers the same as in the original window */
-  j = begy - orig->_begy;
-  k = begx - orig->_begx;
-  for (i = 0; i < num_lines; i++) win->_line[i] = (orig->_line[j++]) + k;
-  win->_flags |= _SUBWIN;
-  return(win);
-}
Index: trunk/minix/lib/curses/options.c
===================================================================
--- trunk/minix/lib/curses/options.c	(revision 9)
+++ 	(revision )
@@ -1,87 +1,0 @@
-#include <curses.h>
-#include "curspriv.h"
-
-static bool hasold = FALSE;	/* for remembering old cursor type */
-static int oldmode;
-
-/****************************************************************/
-/* Idlok() is used to set  flag for using the terminal insert/	*/
-/* Delete line capabilities. This is not relevant for the PC	*/
-/* Version of curses, and thus nothing is done.			*/
-/****************************************************************/
-void idlok(win, flag)
-WINDOW *win;
-bool flag;
-{
-}
-
-/****************************************************************/
-/* Clearok() marks window 'win' to cause screen clearing and	*/
-/* Redraw the next time a refresh is done.			*/
-/****************************************************************/
-void clearok(win, flag)
-WINDOW *win;
-bool flag;
-{
-  if (win == curscr)
-	_cursvar.tmpwin->_clear = flag;
-  else
-	win->_clear = flag;
-}
-
-/****************************************************************/
-/* Leaveok() marks window 'win' to allow the update routines	*/
-/* To leave the hardware cursor where it happens to be at the	*/
-/* End of update. Usually used in combination with cursoff().	*/
-/****************************************************************/
-
-void leaveok(win, flag)
-WINDOW *win;
-bool flag;
-{
-  win->_leave = flag;
-}
-
-/****************************************************************/
-/* Scrollok() marks window 'win' to allow the scrolling region	*/
-/* Of it to actually scroll.					*/
-/****************************************************************/
-void scrollok(win, flag)
-WINDOW *win;
-bool flag;
-{
-  win->_scroll = flag;
-}
-
-/****************************************************************/
-/* Nodelay() marks the window to make character input non-	*/
-/* Waiting, i.e. if there is no character to get, -1 will be	*/
-/* Returned.							*/
-/****************************************************************/
-void nodelay(win, flag)
-WINDOW *win;
-bool flag;
-{
-  win->_nodelay = flag;
-}
-
-/****************************************************************/
-/* Keypad() marks window 'win' to use the special keypad mode.	*/
-/****************************************************************/
-void keypad(win, flag)
-WINDOW *win;
-bool flag;
-{
-  win->_keypad = flag;
-}
-
-/****************************************************************/
-/* Meta() allows use of any alternate character set allowed by	*/
-/* The terminal. We always allow this on the PC, so this one	*/
-/* Does nothing.						*/
-/****************************************************************/
-void meta(win, flag)
-WINDOW *win;
-bool flag;
-{
-}
Index: trunk/minix/lib/curses/overlay.c
===================================================================
--- trunk/minix/lib/curses/overlay.c	(revision 9)
+++ 	(revision )
@@ -1,124 +1,0 @@
-/****************************************************************/
-/* Overlay() and overwrite() functions of the PCcurses package	*/
-/*								*/
-/****************************************************************/
-/* This version of curses is based on ncurses, a curses version	*/
-/* Originally written by Pavel Curtis at Cornell University.	*/
-/* I have made substantial changes to make it run on IBM PC's,	*/
-/* And therefore consider myself free to make it public domain.	*/
-/*		Bjorn Larsson (...mcvax!enea!infovax!bl)	*/
-/****************************************************************/
-/* 1.0:	Release:					870515	*/
-/****************************************************************/
-/* Modified to run under the MINIX operating system by Don Cope */
-/* These changes are also released into the public domain.      */
-/* 							900906  */
-/****************************************************************/
-
-#include <curses.h>
-#include "curspriv.h"
-
-/****************************************************************/
-/* Overlay() overwrites 'win1' upon 'win2', with origins alig-	*/
-/* Ned. Overlay is transparent; blanks from 'win1' are not	*/
-/* Copied to 'win2'.						*/
-/****************************************************************/
-void overlay(win1, win2)
-WINDOW *win1, *win2;
-{
-  int *minchng;
-  int *maxchng;
-  int *w1ptr;
-  int *w2ptr;
-  int attrs;
-  int col;
-  int line;
-  int last_line;
-  int last_col;
-
-  last_col = min(win1->_maxx, win2->_maxx);
-  last_line = min(win1->_maxy, win2->_maxy);
-  attrs = win2->_attrs & ATR_MSK;
-  minchng = win2->_minchng;
-  maxchng = win2->_maxchng;
-
-  for (line = 0; line <= last_line; line++) {
-	register short fc, lc = 0;
-	w1ptr = win1->_line[line];
-	w2ptr = win2->_line[line];
-	fc = _NO_CHANGE;
-	for (col = 0; col <= last_col; col++) {
-		if ((*w1ptr & CHR_MSK) != ' ') {
-			*w2ptr = (*w1ptr & CHR_MSK) | attrs;
-			if (fc == _NO_CHANGE) fc = col;
-			lc = col;
-		}
-		w1ptr++;
-		w2ptr++;
-	}
-
-	if (*minchng == _NO_CHANGE) {
-		*minchng = fc;
-		*maxchng = lc;
-	} else if (fc != _NO_CHANGE) {
-		if (fc < *minchng) *minchng = fc;
-		if (lc > *maxchng) *maxchng = lc;
-	}
-	minchng++;
-	maxchng++;
-  }				/* for */
-}				/* overlay */
-
-/****************************************************************/
-/* Overwrite() overwrites 'win1' upon 'win2', with origins	*/
-/* Aligned. Overwrite is non-transparent; blanks from 'win1'	*/
-/* Are copied to 'win2'.					*/
-/****************************************************************/
-void overwrite(win1, win2)
-WINDOW *win1, *win2;
-{
-  int *minchng;
-  int *maxchng;
-  int *w1ptr;
-  int *w2ptr;
-  int attrs;
-  int col;
-  int line;
-  int last_line;
-  int last_col;
-
-  last_col = min(win1->_maxx, win2->_maxx);
-  last_line = min(win1->_maxy, win2->_maxy);
-  attrs = win2->_attrs & ATR_MSK;
-  minchng = win2->_minchng;
-  maxchng = win2->_maxchng;
-
-  for (line = 0; line <= last_line; line++) {
-	register short fc, lc = 0;
-
-	w1ptr = win1->_line[line];
-	w2ptr = win2->_line[line];
-	fc = _NO_CHANGE;
-
-	for (col = 0; col <= last_col; col++) {
-		if ((*w1ptr & CHR_MSK) != (*w2ptr & CHR_MSK)) {
-			*w2ptr = (*w1ptr & CHR_MSK) | attrs;
-
-			if (fc == _NO_CHANGE) fc = col;
-			lc = col;
-		}
-		w1ptr++;
-		w2ptr++;
-	}			/* for */
-
-	if (*minchng == _NO_CHANGE) {
-		*minchng = fc;
-		*maxchng = lc;
-	} else if (fc != _NO_CHANGE) {
-		if (fc < *minchng) *minchng = fc;
-		if (lc > *maxchng) *maxchng = lc;
-	}
-	minchng++;
-	maxchng++;
-  }
-}
Index: trunk/minix/lib/curses/prntscan.c
===================================================================
--- trunk/minix/lib/curses/prntscan.c	(revision 9)
+++ 	(revision )
@@ -1,129 +1,0 @@
-#include <string.h>
-#include <curses.h>
-#include "curspriv.h"
-
-static char printscanbuf[513];	/* buffer used during I/O */
-
-/****************************************************************/
-/* Wprintw(win,fmt,args) does a printf() in window 'win'.	*/
-/****************************************************************/
-int wprintw(WINDOW *win, const char *fmt, ...)
-{
-  va_list args;
-
-  va_start(args, fmt);
-  vsprintf(printscanbuf, fmt, args);
-  if (waddstr(win, printscanbuf) == ERR) return(ERR);
-  return(strlen(printscanbuf));
-}
-
-/****************************************************************/
-/* Printw(fmt,args) does a printf() in stdscr.			*/
-/****************************************************************/
-int printw(const char *fmt, ...)
-{
-  va_list args;
-
-  va_start(args, fmt);
-  vsprintf(printscanbuf, fmt, args);
-  if (waddstr(stdscr, printscanbuf) == ERR) return(ERR);
-  return(strlen(printscanbuf));
-}				/* printw */
-
-/****************************************************************/
-/* Mvprintw(fmt,args) moves the stdscr cursor to a new posi-	*/
-/* tion, then does a printf() in stdscr.			*/
-/****************************************************************/
-int mvprintw(int y, int x, const char *fmt, ...)
-{
-  va_list args;
-
-  va_start(args, fmt);
-  if (wmove(stdscr, y, x) == ERR) return(ERR);
-  vsprintf(printscanbuf, fmt, args);
-  if (waddstr(stdscr, printscanbuf) == ERR) return(ERR);
-  return(strlen(printscanbuf));
-}
-
-/****************************************************************/
-/* Mvwprintw(win,fmt,args) moves the window 'win's cursor to	*/
-/* A new position, then does a printf() in window 'win'.	*/
-/****************************************************************/
-int mvwprintw(WINDOW *win, int y, int x, const char *fmt, ...)
-{
-  va_list args;
-
-  va_start(args, fmt);
-  if (wmove(win, y, x) == ERR) return(ERR);
-  vsprintf(printscanbuf, fmt, args);
-  if (waddstr(win, printscanbuf) == ERR) return(ERR);
-  return(strlen(printscanbuf));
-}				/* mvwprintw */
-
-/****************************************************************/
-/* Wscanw(win,fmt,args) gets a string via window 'win', then	*/
-/* Scans the string using format 'fmt' to extract the values	*/
-/* And put them in the variables pointed to the arguments.	*/
-/****************************************************************/
-int wscanw(WINDOW *win, const char *fmt, ...)
-{
-  va_list args;
-
-  va_start(args, fmt);
-  wrefresh(win);		/* set cursor */
-  if (wgetstr(win, printscanbuf) == ERR)	/* get string */
-	return(ERR);
-  return(vsscanf(printscanbuf, fmt, args));
-}				/* wscanw */
-
-/****************************************************************/
-/* Scanw(fmt,args) gets a string via stdscr, then scans the	*/
-/* String using format 'fmt' to extract the values and put them	*/
-/* In the variables pointed to the arguments.			*/
-/****************************************************************/
-int scanw(const char *fmt, ...)
-{
-  va_list args;
-
-  va_start(args, fmt);
-  wrefresh(stdscr);		/* set cursor */
-  if (wgetstr(stdscr, printscanbuf) == ERR)	/* get string */
-	return(ERR);
-  return(vsscanf(printscanbuf, fmt, args));
-}				/* scanw */
-
-/****************************************************************/
-/* Mvscanw(y,x,fmt,args) moves stdscr's cursor to a new posi-	*/
-/* Tion, then gets a string via stdscr and scans the string	*/
-/* Using format 'fmt' to extract the values and put them in the	*/
-/* Variables pointed to the arguments.				*/
-/****************************************************************/
-int mvscanw(int y, int x, const char *fmt, ...)
-{
-  va_list args;
-
-  va_start(args, fmt);
-  if (wmove(stdscr, y, x) == ERR) return(ERR);
-  wrefresh(stdscr);		/* set cursor */
-  if (wgetstr(stdscr, printscanbuf) == ERR)	/* get string */
-	return(ERR);
-  return(vsscanf(printscanbuf, fmt, args));
-}				/* mvscanw */
-
-/****************************************************************/
-/* Mvwscanw(win,y,x,fmt,args) moves window 'win's cursor to a	*/
-/* New position, then gets a string via 'win' and scans the	*/
-/* String using format 'fmt' to extract the values and put them	*/
-/* In the variables pointed to the arguments.			*/
-/****************************************************************/
-int mvwscanw(WINDOW *win, int y, int x, const char *fmt, ...)
-{
-  va_list args;
-
-  va_start(args, fmt);
-  if (wmove(win, y, x) == ERR) return(ERR);
-  wrefresh(win);		/* set cursor */
-  if (wgetstr(win, printscanbuf) == ERR)	/* get string */
-	return(ERR);
-  return(vsscanf(printscanbuf, fmt, args));
-}				/* mvwscanw */
Index: trunk/minix/lib/curses/refresh.c
===================================================================
--- trunk/minix/lib/curses/refresh.c	(revision 9)
+++ 	(revision )
@@ -1,72 +1,0 @@
-/* refresh.c */
-
-#include <curses.h>
-#include "curspriv.h"
-
-/* Wrefresh() updates window win's area of the physical screen.	*/
-void wrefresh(win)
-WINDOW *win;
-{
-  if (win == curscr)
-	curscr->_clear = TRUE;
-  else
-	wnoutrefresh(win);
-  doupdate();
-}
-
-/****************************************************************/
-/* Wnoutrefresh() updates the image of the desired screen,	*/
-/* Without doing physical update (copies window win's image to	*/
-/* The _cursvar.tmpwin window, which is hidden from the user).	*/
-/****************************************************************/
-
-void wnoutrefresh(win)
-register WINDOW *win;
-{
-  register int *dst;		/* start destination in temp window */
-  register int *end;		/* end destination in temp window */
-  register int *src;		/* source in user window */
-  register int first;		/* first changed char on line */
-  register int last;		/* last changed char on line */
-  WINDOW *nscr;
-  int begy;			/* window's place on screen */
-  int begx;
-  int i;
-  int j;
-
-  nscr = _cursvar.tmpwin;
-  begy = win->_begy;
-  begx = win->_begx;
-
-  for (i = 0, j = begy; i <= win->_maxy; i++, j++) {
-	if (win->_minchng[i] != _NO_CHANGE) {
-		first = win->_minchng[i];
-		last = win->_maxchng[i];
-		dst = &(nscr->_line[j][begx + first]);
-		end = &(nscr->_line[j][begx + last]);
-		src = &(win->_line[i][first]);
-
-		while (dst <= end)	/* copy user line to temp window */
-			*dst++ = *src++;
-
-		first += begx;	/* nscr's min/max change positions */
-		last += begx;
-
-		if ((nscr->_minchng[j] == _NO_CHANGE) || (nscr->_minchng[j] > first))
-			nscr->_minchng[j] = first;
-		if (last > nscr->_maxchng[j]) nscr->_maxchng[j] = last;
-
-		win->_minchng[i] = _NO_CHANGE;	/* updated now */
-	}			/* if */
-	win->_maxchng[i] = _NO_CHANGE;	/* updated now */
-  }				/* for */
-
-  if (win->_clear) {
-	win->_clear = FALSE;
-	nscr->_clear = TRUE;
-  }				/* if */
-  if (!win->_leave) {
-	nscr->_cury = win->_cury + begy;
-	nscr->_curx = win->_curx + begx;
-  }				/* if */
-}				/* wnoutrefresh */
Index: trunk/minix/lib/curses/scrreg.c
===================================================================
--- trunk/minix/lib/curses/scrreg.c	(revision 9)
+++ 	(revision )
@@ -1,58 +1,0 @@
-/****************************************************************/
-/* Wsetscrreg() routine of the PCcurses package			*/
-/*								*/
-/****************************************************************/
-/* This version of curses is based on ncurses, a curses version	*/
-/* Originally written by Pavel Curtis at Cornell University.	*/
-/* I have made substantial changes to make it run on IBM PC's,	*/
-/* And therefore consider myself free to make it public domain.	*/
-/*		Bjorn Larsson (...mcvax!enea!infovax!bl)	*/
-/****************************************************************/
-/* 1.0:	Release:					870515	*/
-/****************************************************************/
-/* Modified to run under the MINIX operating system by Don Cope */
-/* These changes are also released into the public domain.      */
-/* 							900906  */
-/****************************************************************/
-
-#include <curses.h>
-#include "curspriv.h"
-
-/****************************************************************/
-/* Wsetscrreg() set the scrolling region of window 'win' to in-	*/
-/* Clude all lines between 'top' and 'bottom'.			*/
-/****************************************************************/
-
-int wsetscrreg(win, top, bottom)
-WINDOW *win;
-int top;
-int bottom;
-{
-  if ((0 <= top) &&
-      (top <= win->_cury)
-      &&
-      (win->_cury <= bottom)
-      &&
-      (bottom <= win->_maxy)
-	) {
-	win->_regtop = top;
-	win->_regbottom = bottom;
-	return(OK);
-  }
-
-   /* If */ 
-  else
-	return(ERR);
-}				/* wsetscrreg */
-
-/****************************************************************/
-/* Setscrreg() set the scrolling region of stdscr to include	*/
-/* All lines between 'top' and 'bottom'.			*/
-/****************************************************************/
-
-int setscrreg(top, bottom)
-int top;
-int bottom;
-{
-  return(wsetscrreg(stdscr, top, bottom));
-}				/* setscrreg */
Index: trunk/minix/lib/curses/setterm.c
===================================================================
--- trunk/minix/lib/curses/setterm.c	(revision 9)
+++ 	(revision )
@@ -1,76 +1,0 @@
-#include <curses.h>
-#include "curspriv.h"
-
-_PROTOTYPE( static void ttysetflags, (void) );
-
-static void ttysetflags()
-{
-  _tty.c_iflag |= ICRNL | IXON;
-  _tty.c_oflag |= OPOST | ONLCR;
-  _tty.c_lflag |= ECHO | ICANON | IEXTEN | ISIG;
-
-  if (_cursvar.rawmode) {
-	_tty.c_iflag &= ~(ICRNL | IXON);
-	_tty.c_oflag &= ~(OPOST);
-	_tty.c_lflag &= ~(ICANON | IEXTEN | ISIG);
-  }
-  if (_cursvar.cbrkmode) {
-	_tty.c_lflag &= ~(ICANON);
-  }
-  if (!_cursvar.echoit) {
-	_tty.c_lflag &= ~(ECHO | ECHONL);
-  }
-  if (NONL) {
-	_tty.c_iflag &= ~(ICRNL);
-	_tty.c_oflag &= ~(ONLCR);
-  }
-  tcsetattr(0, TCSANOW, &_tty);
-}				/* ttysetflags */
-
-void raw()
-{
-  _cursvar.rawmode = TRUE;
-  ttysetflags();
-}				/* raw */
-
-void noraw()
-{
-  _cursvar.rawmode = FALSE;
-  ttysetflags();
-}				/* noraw */
-
-void echo()
-{
-  _cursvar.echoit = TRUE;
-  ttysetflags();
-}
-
-void noecho()
-{
-  _cursvar.echoit = FALSE;
-  ttysetflags();
-}
-
-void nl()
-{
-  NONL = FALSE;
-  ttysetflags();
-}				/* nl */
-
-void nonl()
-{
-  NONL = TRUE;
-  ttysetflags();
-}				/* nonl */
-
-void cbreak()
-{
-  _cursvar.cbrkmode = TRUE;
-  ttysetflags();
-}				/* cbreak */
-
-void nocbreak()
-{
-  _cursvar.cbrkmode = FALSE;
-  ttysetflags();
-}				/* nocbreak */
Index: trunk/minix/lib/curses/tabsize.c
===================================================================
--- trunk/minix/lib/curses/tabsize.c	(revision 9)
+++ 	(revision )
@@ -1,50 +1,0 @@
-/****************************************************************/
-/* Tabsize() routines of the PCcurses package			*/
-/*								*/
-/****************************************************************/
-/* This version of curses is based on ncurses, a curses version	*/
-/* Originally written by Pavel Curtis at Cornell University.	*/
-/* I have made substantial changes to make it run on IBM PC's,	*/
-/* And therefore consider myself free to make it public domain.	*/
-/*		Bjorn Larsson (...mcvax!enea!infovax!bl)	*/
-/****************************************************************/
-/* 1.0:	Release:					870515	*/
-/****************************************************************/
-/* Modified to run under the MINIX operating system by Don Cope */
-/* These changes are also released into the public domain.      */
-/* 							900906  */
-/****************************************************************/
-
-#include <curses.h>
-#include "curspriv.h"
-
-/****************************************************************/
-/* Wtabsize(win,ts) sets the tabsize of window 'win' to 'ts',	*/
-/* And returns the original value.				*/
-/****************************************************************/
-
-int wtabsize(win, ts)
-WINDOW *win;
-int ts;
-{
-  int origval;
-
-  origval = win->_tabsize;
-  win->_tabsize = ts;
-  return(origval);
-}				/* wtabsize */
-
-/****************************************************************/
-/* Tabsize(ts) sets the tabsize of stdscr to 'ts', and returns	*/
-/* The original value.						*/
-/****************************************************************/
-
-int tabsize(ts)
-int ts;
-{
-  int origval;
-
-  origval = stdscr->_tabsize;
-  stdscr->_tabsize = ts;
-  return(origval);
-}				/* tabsize */
Index: trunk/minix/lib/curses/termmisc.c
===================================================================
--- trunk/minix/lib/curses/termmisc.c	(revision 9)
+++ 	(revision )
@@ -1,63 +1,0 @@
-#include <curses.h>
-#include "curspriv.h"
-
-/* Static variables or saving terminal modes */
-
-int fixterm()
-{
-  return(OK);
-}				/* fixterm */
-
-int resetterm()
-{
-  return(OK);
-}
-
-int saveoldterm()
-{
-  return(OK);
-}				/* saveoldterm */
-
-int saveterm()
-{
-  return(OK);
-}				/* saveterm */
-
-int baudrate()
-{
-  return(19200);
-}				/* baudrate */
-
-/****************************************************************/
-/* Erasechar(), killchar() returns std MSDOS erase chars.	*/
-/****************************************************************/
-
-int erasechar()
-{
-  return(_DCCHAR);		/* character delete char */
-}				/* erasechar */
-
-int killchar()
-{
-  return(_DLCHAR);		/* line delete char */
-}				/* killchar */
-
-/****************************************************************/
-/* Savetty() and resetty() saves and restores the terminal I/O	*/
-/* Settings.							*/
-/****************************************************************/
-
-int savetty()
-{
-  return(OK);
-}				/* savetty */
-
-/****************************************************************/
-/* Setupterm() sets up the terminal. On a PC, it is always suc-	*/
-/* Cessful, and returns 1.					*/
-/****************************************************************/
-
-int setupterm()
-{
-  return(1);
-}				/* setupterm */
Index: trunk/minix/lib/curses/unctrl.c
===================================================================
--- trunk/minix/lib/curses/unctrl.c	(revision 9)
+++ 	(revision )
@@ -1,45 +1,0 @@
-/****************************************************************/
-/* Unctrl() routines of the PCcurses package			*/
-/*								*/
-/****************************************************************/
-/* This version of curses is based on ncurses, a curses version	*/
-/* Originally written by Pavel Curtis at Cornell University.	*/
-/* I have made substantial changes to make it run on IBM PC's,	*/
-/* And therefore consider myself free to make it public domain.	*/
-/*		Bjorn Larsson (...mcvax!enea!infovax!bl)	*/
-/****************************************************************/
-/* 1.0:	Release:					870515	*/
-/****************************************************************/
-/* Modified to run under the MINIX operating system by Don Cope */
-/* These changes are also released into the public domain.      */
-/* 							900906  */
-/****************************************************************/
-
-#include <curses.h>
-#include "curspriv.h"
-
-static char strbuf[3] = {0, 0, 0};
-
-/****************************************************************/
-/* Unctrl() returns a char pointer to a string corresponding to	*/
-/* Argument character 'c'.					*/
-/****************************************************************/
-
-char *unctrl(c)
-char c;
-{
-  int ic = c;
-  ic &= 0xff;
-
-  if ((ic >= ' ') && (ic != 0x7f)) {	/* normal characters */
-	strbuf[0] = ic;
-	strbuf[1] = '\0';
-	return(strbuf);
-  }				/* if */
-  strbuf[0] = '^';		/* '^' prefix */
-  if (c == 0x7f)		/* DEL */
-	strbuf[1] = '?';
-  else				/* other control */
-	strbuf[1] = ic + '@';
-  return(strbuf);
-}				/* unctrl */
Index: trunk/minix/lib/curses/update.c
===================================================================
--- trunk/minix/lib/curses/update.c	(revision 9)
+++ 	(revision )
@@ -1,173 +1,0 @@
-#include <curses.h>
-#include "curspriv.h"
-#include <termcap.h>
-
-static WINDOW *twin;		/* used by many routines */
-
-/****************************************************************/
-/* Gotoxy() moves the physical cursor to the desired address on */
-/* The screen. We don't optimize here - on a PC, it takes more  */
-/* Time to optimize than to do things directly.                 */
-/****************************************************************/
-
-_PROTOTYPE(static void gotoxy, (int row, int col ));
-_PROTOTYPE(static void newattr, (int ch ));
-_PROTOTYPE(static void Putchar, (int ch ));
-_PROTOTYPE(static void clrupdate, (WINDOW *scr ));
-_PROTOTYPE(static void transformline, (int lineno ));
-
-static void gotoxy(row, col)
-int row, col;
-{
-  poscur(row, col);
-  _cursvar.cursrow = row;
-  _cursvar.curscol = col;
-}
-
-/* Update attributes */
-static void newattr(ch)
-int ch;
-{
-  extern char *me, *as, *ae, *mb, *md, *mr, *so, *us;
-  static int lastattr = 0;
-
-  if (lastattr != (ch &= ATR_MSK)) {
-	lastattr = ch;
-
-	tputs(me, 1, outc);
-	if (ae) tputs(ae, 1, outc);
-
-	if (ch & A_ALTCHARSET)
-		if (as) tputs(as, 1, outc);
-	if (ch & A_BLINK) tputs(mb, 1, outc);
-	if (ch & A_BOLD) tputs(md, 1, outc);
-	if (ch & A_REVERSE) tputs(mr, 1, outc);
-	if (ch & A_STANDOUT) tputs(so, 1, outc);
-	if (ch & A_UNDERLINE) tputs(us, 1, outc);
-  }
-}
-
-/* Putchar() writes a character, with attributes, to the physical
-   screen, but avoids writing to the lower right screen position.
-   Should it care about am?
-*/
-
-/* Output char with attribute */
-static void Putchar(ch)
-int ch;
-{
-  if ((_cursvar.cursrow < LINES) || (_cursvar.curscol < COLS)) {
-	newattr(ch);
-	putchar(ch);
-  }
-}
-
-/****************************************************************/
-/* Clrupdate(scr) updates the screen by clearing it and then    */
-/* Redraw it in it's entirety.					*/
-/****************************************************************/
-
-static void clrupdate(scr)
-WINDOW *scr;
-{
-  register int *src;
-  register int *dst;
-  register int i;
-  register int j;
-  WINDOW *w;
-
-  w = curscr;
-
-  if (scr != w) {		/* copy scr to curscr */
-	for (i = 0; i < LINES; i++) {
-		src = scr->_line[i];
-		dst = w->_line[i];
-		for (j = 0; j < COLS; j++) *dst++ = *src++;
-	}			/* for */
-  }				/* if */
-  newattr(scr->_attrs);
-  clrscr();
-  scr->_clear = FALSE;
-  for (i = 0; i < LINES; i++) {	/* update physical screen */
-	src = w->_line[i];
-	j = 0;
-	while (j < COLS) {
-		if (*src != (' ' | ATR_NRM)) {
-			gotoxy(i, j);
-			while (j < COLS && (*src != (' ' | ATR_NRM))) {
-				Putchar(*src++);
-				j++;
-			}
-		} else {
-			src++;
-			j++;
-		}
-	}			/* for */
-  }				/* for */
-  fflush(stdout);
-}				/* clrupdate */
-
-/****************************************************************/
-/* Transformline() updates the given physical line to look      */
-/* Like the corresponding line in _cursvar.tmpwin.		*/
-/****************************************************************/
-
-static void transformline(lineno)
-register int lineno;
-{
-  register int *dstp;
-  register int *srcp;
-  register int dstc;
-  register int srcc;
-  int x;
-  int endx;
-
-  x = twin->_minchng[lineno];
-  endx = twin->_maxchng[lineno];
-  dstp = curscr->_line[lineno] + x;
-  srcp = twin->_line[lineno] + x;
-
-  while (x <= endx) {
-	if ((*dstp != *srcp) || (dstc != srcc)) {
-		gotoxy(lineno, x);
-		while (x <= endx && ((*dstp != *srcp) || (dstc != srcc))) {
-			Putchar(*srcp);
-			*dstp++ = *srcp++;
-			x++;
-		}
-	} else {
-		*dstp++ = *srcp++;
-		x++;
-	}
-  }				/* for */
-  twin->_minchng[lineno] = _NO_CHANGE;
-  twin->_maxchng[lineno] = _NO_CHANGE;
-}				/* transformline */
-
-/****************************************************************/
-/* Doupdate() updates the physical screen to look like _curs-   */
-/* Var.tmpwin if curscr is not 'Clear-marked'. Otherwise it     */
-/* Updates the screen to look like curscr.                      */
-/****************************************************************/
-
-void doupdate()
-{
-  int i;
-
-  twin = _cursvar.tmpwin;
-  if (curscr->_clear)
-	clrupdate(curscr);
-  else {
-	if (twin->_clear)
-		clrupdate(twin);
-	else {
-		for (i = 0; i < LINES; i++)
-			if (twin->_minchng[i] != _NO_CHANGE)
-				transformline(i);
-	}
-  }
-  curscr->_curx = twin->_curx;
-  curscr->_cury = twin->_cury;
-  gotoxy(curscr->_cury, curscr->_curx);
-  fflush(stdout);
-}				/* doupdate */
Index: trunk/minix/lib/curses/waddch.c
===================================================================
--- trunk/minix/lib/curses/waddch.c	(revision 9)
+++ 	(revision )
@@ -1,95 +1,0 @@
-#include <curses.h>
-#include "curspriv.h"
-
-/****************************************************************/
-/* Newline() does line advance and returns the new cursor line.	*/
-/* If error, return -1.						*/
-/****************************************************************/
-
-_PROTOTYPE( static short newline, (WINDOW *win, int lin));
-
-static short newline(win, lin)
-WINDOW *win;
-int lin;
-{
-  if (++lin > win->_regbottom) {
-	lin--;
-	if (win->_scroll)
-		scroll(win);
-	else
-		return(-1);
-  }				/* if */
-  return(lin);
-}				/* newline */
-
-/****************************************************************/
-/* Waddch() inserts character 'c' at the current cursor posi-	*/
-/* Tion in window 'win', and takes any actions as dictated by	*/
-/* The character.						*/
-/****************************************************************/
-
-int waddch(win, c)
-WINDOW *win;
-int c;
-{
-  int x = win->_curx;
-  int y = win->_cury;
-  int newx;
-  int ch = c;
-  int ts = win->_tabsize;
-
-  ch &= (A_ALTCHARSET | 0xff);
-  if (y > win->_maxy || x > win->_maxx || y < 0 || x < 0) return(ERR);
-  switch (ch) {
-      case '\t':
-	for (newx = ((x / ts) + 1) * ts; x < newx; x++) {
-		if (waddch(win, ' ') == ERR) return(ERR);
-		if (win->_curx == 0)	/* if tab to next line */
-			return(OK);	/* exit the loop */
-	}
-	return(OK);
-
-      case '\n':
-	if (NONL) x = 0;
-	if ((y = newline(win, y)) < 0) return (ERR);
-	break;
-
-      case '\r':	x = 0;	break;
-
-      case '\b':
-	if (--x < 0)		/* no back over left margin */
-		x = 0;
-	break;
-
-      case 0x7f:
-	{
-		if (waddch(win, '^') == ERR) return(ERR);
-		return(waddch(win, '?'));
-	}
-
-      default:
-	if (ch < ' ') {		/* handle control chars */
-		if (waddch(win, '^') == ERR) return(ERR);
-		return(waddch(win, c + '@'));
-	}
-	ch |= (win->_attrs & ATR_MSK);
-	if (win->_line[y][x] != ch) {	/* only if data change */
-		if (win->_minchng[y] == _NO_CHANGE)
-			win->_minchng[y] = win->_maxchng[y] = x;
-		else if (x < win->_minchng[y])
-			win->_minchng[y] = x;
-		else if (x > win->_maxchng[y])
-			win->_maxchng[y] = x;
-	}			/* if */
-	win->_line[y][x++] = ch;
-	if (x > win->_maxx) {	/* wrap around test */
-		x = 0;
-		if ((y = newline(win, y)) < 0) return(ERR);
-	}
-	break;
-
-  }				/* switch */
-  win->_curx = x;
-  win->_cury = y;
-  return(OK);
-}
Index: trunk/minix/lib/curses/waddstr.c
===================================================================
--- trunk/minix/lib/curses/waddstr.c	(revision 9)
+++ 	(revision )
@@ -1,18 +1,0 @@
-#include <curses.h>
-#include "curspriv.h"
-
-/****************************************************************/
-/* Waddstr() inserts string 'str' at the current cursor posi-	*/
-/* Tion in window 'win', and takes any actions as dictated by	*/
-/* The characters.						*/
-/****************************************************************/
-
-int waddstr(win, str)
-WINDOW *win;
-char *str;
-{
-  while (*str) {
-	if (waddch(win, *str++) == ERR) return(ERR);
-  }
-  return(OK);
-}
Index: trunk/minix/lib/curses/wbox.c
===================================================================
--- trunk/minix/lib/curses/wbox.c	(revision 9)
+++ 	(revision )
@@ -1,65 +1,0 @@
-#include <curses.h>
-#include "curspriv.h"
-
-/****************************************************************/
-/* Wbox(win,ymin,xmin,ymax,xmax,v,h) draws a box in window	*/
-/* 'win', enclosing the area xmin-xmax and ymin-xmax. If	*/
-/* Xmax and/or ymax is 0, the window max value is used. 'v' and	*/
-/* 'h' are the vertical and horizontal characters to use. If	*/
-/* 'v' and 'h' are 0, wbox will use the alternate character set */
-/* In a pretty way.						*/
-/****************************************************************/
-
-int wbox(win, ymin, xmin, ymax, xmax, v, h)
-WINDOW *win;
-int ymin, xmin, ymax, xmax;
-unsigned int v;
-unsigned int h;
-{
-  unsigned int vc, hc, ulc, urc, llc, lrc;	/* corner chars */
-  int i;
-
-  if (ymax == 0) ymax = win->_maxy;
-  if (xmax == 0) xmax = win->_maxx;
-
-  if (ymin >= win->_maxy || ymax > win->_maxy ||
-      xmin >= win->_maxx || xmax > win->_maxx ||
-      ymin >= ymax || xmin >= xmax)
-	return(ERR);
-
-  vc = v;
-  hc = h;
-  ulc = urc = llc = lrc = vc;	/* default same as vertical */
-
-  if (v == 0 && h == 0) {
-	ulc = ACS_ULCORNER;
-	urc = ACS_URCORNER;
-	llc = ACS_LLCORNER;
-	lrc = ACS_LRCORNER;
-	hc = ACS_HLINE;
-	vc = ACS_VLINE;
-  }
-  for (i = xmin + 1; i <= xmax - 1; i++) {
-	win->_line[ymin][i] = hc | win->_attrs;
-	win->_line[ymax][i] = hc | win->_attrs;
-  }
-  for (i = ymin + 1; i <= ymax - 1; i++) {
-	win->_line[i][xmin] = vc | win->_attrs;
-	win->_line[i][xmax] = vc | win->_attrs;
-  }
-  win->_line[ymin][xmin] = ulc | win->_attrs;
-  win->_line[ymin][xmax] = urc | win->_attrs;
-  win->_line[ymax][xmin] = llc | win->_attrs;
-  win->_line[ymax][xmax] = lrc | win->_attrs;
-
-  for (i = ymin; i <= ymax; i++) {
-	if (win->_minchng[i] == _NO_CHANGE) {
-		win->_minchng[i] = xmin;
-		win->_maxchng[i] = xmax;
-	} else {
-		win->_minchng[i] = min(win->_minchng[i], xmin);
-		win->_maxchng[i] = max(win->_maxchng[i], xmax);
-	}
-  }
-  return(OK);
-}
Index: trunk/minix/lib/curses/wclear.c
===================================================================
--- trunk/minix/lib/curses/wclear.c	(revision 9)
+++ 	(revision )
@@ -1,14 +1,0 @@
-#include <curses.h>
-#include "curspriv.h"
-
-/****************************************************************/
-/* Wclear() fills all lines of window 'win' with blanks, and	*/
-/* Marks the window to be cleared at next refresh operation.	*/
-/****************************************************************/
-
-void wclear(win)
-WINDOW *win;
-{
-  werase(win);
-  win->_clear = TRUE;
-}				/* wclear */
Index: trunk/minix/lib/curses/wclrtobot.c
===================================================================
--- trunk/minix/lib/curses/wclrtobot.c	(revision 9)
+++ 	(revision )
@@ -1,35 +1,0 @@
-#include <curses.h>
-#include "curspriv.h"
-
-/****************************************************************/
-/* Wclrtobot() fills the right half of the cursor line of	*/
-/* Window 'win', and all lines below it with blanks.		*/
-/****************************************************************/
-
-int wclrtobot(win)
-WINDOW *win;
-{
-  int y, minx, startx, *ptr, *end, *maxx, blank;
-
-  blank = ' ' | (win->_attrs & ATR_MSK);
-  startx = win->_curx;
-  for (y = win->_cury; y <= win->_regbottom; y++) {
-	minx = _NO_CHANGE;
-	end = &win->_line[y][win->_maxx];
-	for (ptr = &win->_line[y][startx]; ptr <= end; ptr++) {
-		if (*ptr != blank) {
-			maxx = ptr;
-			if (minx == _NO_CHANGE) minx = ptr - win->_line[y];
-			*ptr = blank;
-		}		/* if */
-	}			/* for */
-	if (minx != _NO_CHANGE) {
-		if ((win->_minchng[y] > minx) || (win->_minchng[y] == _NO_CHANGE))
-			win->_minchng[y] = minx;
-		if (win->_maxchng[y] < maxx - win->_line[y])
-			win->_maxchng[y] = maxx - win->_line[y];
-	}			/* if */
-	startx = 0;
-  }
-  return(OK);
-}
Index: trunk/minix/lib/curses/wclrtoeol.c
===================================================================
--- trunk/minix/lib/curses/wclrtoeol.c	(revision 9)
+++ 	(revision )
@@ -1,36 +1,0 @@
-#include <curses.h>
-#include "curspriv.h"
-
-/****************************************************************/
-/* Wclrtoeol() fills the half of the cursor line to the right	*/
-/* Of the cursor in window 'win' with blanks.			*/
-/****************************************************************/
-
-int wclrtoeol(win)
-WINDOW *win;
-{
-  int *maxx, *ptr, *end, y, x, minx, blank;
-
-  y = win->_cury;
-  x = win->_curx;
-  blank = ' ' | (win->_attrs & ATR_MSK);
-
-  end = &win->_line[y][win->_maxx];
-  minx = _NO_CHANGE;
-  maxx = &win->_line[y][x];
-  for (ptr = maxx; ptr <= end; ptr++) {
-	if (*ptr != blank) {
-		maxx = ptr;
-		if (minx == _NO_CHANGE) minx = ptr - win->_line[y];
-		*ptr = blank;
-	}			/* if */
-  }				/* for */
-
-  if (minx != _NO_CHANGE) {
-	if (win->_minchng[y] > minx || win->_minchng[y] == _NO_CHANGE)
-		win->_minchng[y] = minx;
-	if (win->_maxchng[y] < maxx - win->_line[y])
-		win->_maxchng[y] = maxx - win->_line[y];
-  }
-  return(OK);
-}
Index: trunk/minix/lib/curses/wdelch.c
===================================================================
--- trunk/minix/lib/curses/wdelch.c	(revision 9)
+++ 	(revision )
@@ -1,28 +1,0 @@
-#include <curses.h>
-#include "curspriv.h"
-
-/* Wdelch() deletes the character at the window cursor, and the
-   characters to the right of it are shifted left, inserting a
-   space at the last position of the line.
-*/
-
-int wdelch(win)
-WINDOW *win;
-{
-  int *temp1;
-  int *temp2;
-  int *end;
-  int y = win->_cury;
-  int x = win->_curx;
-  int maxx = win->_maxx;
-
-  end = &win->_line[y][maxx];
-  temp1 = &win->_line[y][x];
-  temp2 = temp1 + 1;
-  while (temp1 < end) *temp1++ = *temp2++;
-  *temp1 = ' ' | (win->_attrs & ATR_MSK);
-  win->_maxchng[y] = maxx;
-  if (win->_minchng[y] == _NO_CHANGE || win->_minchng[y] > x)
-	win->_minchng[y] = x;
-  return(OK);
-}
Index: trunk/minix/lib/curses/wdeleteln.c
===================================================================
--- trunk/minix/lib/curses/wdeleteln.c	(revision 9)
+++ 	(revision )
@@ -1,28 +1,0 @@
-#include <curses.h>
-#include "curspriv.h"
-
-/****************************************************************/
-/* Wdeleteln() deletes the line at the window cursor, and the	*/
-/* Lines below it are shifted up, inserting a blank line at	*/
-/* The bottom of the window.					*/
-/****************************************************************/
-
-int wdeleteln(win)
-WINDOW *win;
-{
-  int *end, *temp, y, blank;
-
-  blank = ' ' | (win->_attrs & ATR_MSK);
-
-  temp = win->_line[win->_cury];
-  for (y = win->_cury; y < win->_regbottom; y++) {
-	win->_line[y] = win->_line[y + 1];
-	win->_minchng[y] = 0;
-	win->_maxchng[y] = win->_maxx;
-  }
-  win->_minchng[y] = 0;
-  win->_maxchng[y] = win->_maxx;
-  win->_line[win->_regbottom] = temp;
-  for (end = &(temp[win->_maxx]); temp <= end;) *temp++ = blank;
-  return(OK);
-}
Index: trunk/minix/lib/curses/werase.c
===================================================================
--- trunk/minix/lib/curses/werase.c	(revision 9)
+++ 	(revision )
@@ -1,26 +1,0 @@
-#include <curses.h>
-#include "curspriv.h"
-
-/****************************************************************/
-/* Werase() fills all lines of window 'win' with blanks and po-	*/
-/* Sitions the cursor at home in the scroll region.		*/
-/****************************************************************/
-
-void werase(win)
-WINDOW *win;
-{
-  int *end, *start, y, blank;
-
-  blank = ' ' | (win->_attrs & ATR_MSK);
-
-  for (y = win->_regtop; y <= win->_regbottom; y++) {	/* clear all lines */
-	start = win->_line[y];
-	end = &start[win->_maxx];
-	while (start <= end)	/* clear all line */
-		*start++ = blank;
-	win->_minchng[y] = 0;
-	win->_maxchng[y] = win->_maxx;
-  }
-  win->_cury = win->_regtop;	/* cursor home */
-  win->_curx = 0;
-}
Index: trunk/minix/lib/curses/wgetch.c
===================================================================
--- trunk/minix/lib/curses/wgetch.c	(revision 9)
+++ 	(revision )
@@ -1,26 +1,0 @@
-#include <curses.h>
-#include <stdio.h>
-#include "curspriv.h"
-
-int wgetch(win)
-WINDOW *win;
-{
-  bool weset = FALSE;
-  char inp;
-
-  if (!win->_scroll && (win->_flags & _FULLWIN)
-      && win->_curx == win->_maxx - 1 && win->_cury == win->_maxy - 1)
-	return ERR;
-  if (_cursvar.echoit && !_cursvar.rawmode) {
-	cbreak();
-	weset++;
-  }
-  inp = getchar();
-  if (_cursvar.echoit) {
-	mvwaddch(curscr, win->_cury + win->_begy,
-		 win->_curx + win->_begx, inp);
-	waddch(win, inp);
-  }
-  if (weset) nocbreak();
-  return inp;
-}
Index: trunk/minix/lib/curses/wgetstr.c
===================================================================
--- trunk/minix/lib/curses/wgetstr.c	(revision 9)
+++ 	(revision )
@@ -1,22 +1,0 @@
-#include <curses.h>
-#include "curspriv.h"
-
-/****************************************************************/
-/* Wgetstr(win,str) reads in a string (terminated by \n or \r)	*/
-/* To the buffer pointed to by 'str', and displays the input	*/
-/* In window 'win'. The user's erase and kill characters are	*/
-/* Active.							*/
-/****************************************************************/
-
-int wgetstr(win, str)
-WINDOW *win;
-char *str;
-{
-  while ((*str = wgetch(win)) != ERR && *str != '\n') str++;
-  if (*str == ERR) {
-	*str = '\0';
-	return ERR;
-  }
-  *str = '\0';
-  return OK;
-}
Index: trunk/minix/lib/curses/windel.c
===================================================================
--- trunk/minix/lib/curses/windel.c	(revision 9)
+++ 	(revision )
@@ -1,41 +1,0 @@
-/****************************************************************/
-/* Delwin() routine of the PCcurses package.			*/
-/*								*/
-/****************************************************************/
-/* This version of curses is based on ncurses, a curses version	*/
-/* Originally written by Pavel Curtis at Cornell University.	*/
-/* I have made substantial changes to make it run on IBM PC's,	*/
-/* And therefore consider myself free to make it public domain.	*/
-/*		Bjorn Larsson (...mcvax!enea!infovax!bl)	*/
-/****************************************************************/
-/* 1.0:	Release:					870515	*/
-/****************************************************************/
-/* Modified to run under the MINIX operating system by Don Cope */
-/* These changes are also released into the public domain.      */
-/* 							900906  */
-/****************************************************************/
-
-#include <stdlib.h>
-#include <curses.h>
-#include "curspriv.h"
-
-/****************************************************************/
-/* Delwin() deallocates all data allocated by 'win'. If 'win'	*/
-/* Is a subwindow, it uses the original window's lines for sto-	*/
-/* Rage, and thus the line arrays are not deallocated.		*/
-/****************************************************************/
-
-void delwin(win)
-WINDOW *win;
-{
-  int i;
-
-  if (!(win->_flags & _SUBWIN)) {	/* subwindow uses 'parent's' lines */
-	for (i = 0; i <= win->_maxy && win->_line[i]; i++)
-		free(win->_line[i]);
-  }
-  free(win->_minchng);
-  free(win->_maxchng);
-  free(win->_line);
-  free(win);
-}				/* delwin */
Index: trunk/minix/lib/curses/winmove.c
===================================================================
--- trunk/minix/lib/curses/winmove.c	(revision 9)
+++ 	(revision )
@@ -1,36 +1,0 @@
-/****************************************************************/
-/* Mvwin() routine of the PCcurses package			*/
-/*								*/
-/****************************************************************/
-/* This version of curses is based on ncurses, a curses version	*/
-/* Originally written by Pavel Curtis at Cornell University.	*/
-/* I have made substantial changes to make it run on IBM PC's,	*/
-/* And therefore consider myself free to make it public domain.	*/
-/*		Bjorn Larsson (...mcvax!enea!infovax!bl)	*/
-/****************************************************************/
-/* 1.0:	Release:					870515	*/
-/****************************************************************/
-/* Modified to run under the MINIX operating system by Don Cope */
-/* These changes are also released into the public domain.      */
-/* 							900906  */
-/****************************************************************/
-
-#include <curses.h>
-#include "curspriv.h"
-
-/****************************************************************/
-/* Mvwin() moves window 'win' to position (begx, begy) on the	*/
-/* Screen.							*/
-/****************************************************************/
-
-int mvwin(win, begy, begx)
-WINDOW *win;
-int begy, begx;
-{
-  if ((begy + win->_maxy) > (LINES - 1) || (begx + win->_maxx) > (COLS - 1))
-	return(ERR);
-  win->_begy = begy;
-  win->_begx = begx;
-  touchwin(win);
-  return(OK);
-}				/* mvwin */
Index: trunk/minix/lib/curses/winsch.c
===================================================================
--- trunk/minix/lib/curses/winsch.c	(revision 9)
+++ 	(revision )
@@ -1,31 +1,0 @@
-#include <curses.h>
-#include "curspriv.h"
-
-/* Winsch() inserts character 'c' at the cursor position in
-   window 'win'. The cursor is advanced.
-*/
-
-int winsch(win, c)
-WINDOW *win;
-char c;
-{
-  int *temp1;
-  int *temp2;
-  int *end;
-  int x = win->_curx;
-  int y = win->_cury;
-  int maxx = win->_maxx;
-
-  if ((c < ' ') && (c == '\n' || c == '\r' || c == '\t' || c == '\b'))
-	return(waddch(win, c));
-  end = &win->_line[y][x];
-  temp1 = &win->_line[y][maxx];
-  temp2 = temp1 - 1;
-  if (c < ' ')			/* if CTRL-char make space for 2 */
-	temp2--;
-  while (temp1 > end) *temp1-- = *temp2--;
-  win->_maxchng[y] = maxx;
-  if ((win->_minchng[y] == _NO_CHANGE) || (win->_minchng[y] > x))
-	win->_minchng[y] = x;
-  return(waddch(win, c));	/* fixes CTRL-chars too */
-}				/* winsch */
Index: trunk/minix/lib/curses/winscrol.c
===================================================================
--- trunk/minix/lib/curses/winscrol.c	(revision 9)
+++ 	(revision )
@@ -1,55 +1,0 @@
-/****************************************************************/
-/* Scroll() routine of the PCcurses package			*/
-/*								*/
-/****************************************************************/
-/* This version of curses is based on ncurses, a curses version	*/
-/* Originally written by Pavel Curtis at Cornell University.	*/
-/* I have made substantial changes to make it run on IBM PC's,	*/
-/* And therefore consider myself free to make it public domain.	*/
-/*		Bjorn Larsson (...mcvax!enea!infovax!bl)	*/
-/****************************************************************/
-/* 1.0:	Release:					870515	*/
-/****************************************************************/
-/* Modified to run under the MINIX operating system by Don Cope */
-/* These changes are also released into the public domain.      */
-/* 							900906  */
-/****************************************************************/
-
-#include <curses.h>
-#include "curspriv.h"
-
-/****************************************************************/
-/* Scroll() scrolls the scrolling region of 'win', but only if	*/
-/* Scrolling is allowed and if the cursor is inside the scrol-	*/
-/* Ling region.							*/
-/****************************************************************/
-
-void scroll(win)
-WINDOW *win;
-{
-  int i;
-  int *ptr;
-  int *temp;
-  static int blank;
-
-  blank = ' ' | (win->_attrs & ATR_MSK);
-  if ((!win->_scroll)		/* check if window scrolls */
-      ||(win->_cury < win->_regtop)	/* and cursor in region */
-      ||(win->_cury > win->_regbottom)
-	)
-	return;
-
-  temp = win->_line[win->_regtop];
-  for (i = win->_regtop; i < win->_regbottom; i++) {
-	win->_line[i] = win->_line[i + 1];	/* re-arrange line pointers */
-	win->_minchng[i] = 0;
-	win->_maxchng[i] = win->_maxx;
-  }
-  for (ptr = temp; ptr - temp <= win->_maxx; ptr++)
-	*ptr = blank;		/* make a blank line */
-  win->_line[win->_regbottom] = temp;
-  if (win->_cury > win->_regtop)/* if not on top line */
-	win->_cury--;		/* cursor scrolls too */
-  win->_minchng[win->_regbottom] = 0;
-  win->_maxchng[win->_regbottom] = win->_maxx;
-}				/* scroll */
Index: trunk/minix/lib/curses/winsertln.c
===================================================================
--- trunk/minix/lib/curses/winsertln.c	(revision 9)
+++ 	(revision )
@@ -1,26 +1,0 @@
-#include <curses.h>
-#include "curspriv.h"
-
-/****************************************************************/
-/* Winsertln() inserts a blank line instead of the cursor line	*/
-/* In window 'win' and pushes other lines down.			*/
-/****************************************************************/
-
-int winsertln(win)
-WINDOW *win;
-{
-  int *temp, *end, y, blank;
-
-  blank = ' ' | (win->_attrs & ATR_MSK);
-  temp = win->_line[win->_regbottom];
-  for (y = win->_regbottom; y > win->_cury; y--) {
-	win->_line[y] = win->_line[y - 1];
-	win->_minchng[y] = 0;
-	win->_maxchng[y] = win->_maxx;
-  }
-  win->_line[win->_cury] = temp;
-  for (end = &temp[win->_maxx]; temp <= end; temp++) *temp = blank;
-  win->_minchng[win->_cury] = 0;
-  win->_maxchng[win->_cury] = win->_maxx;
-  return(OK);
-}
Index: trunk/minix/lib/curses/wintouch.c
===================================================================
--- trunk/minix/lib/curses/wintouch.c	(revision 9)
+++ 	(revision )
@@ -1,40 +1,0 @@
-/****************************************************************/
-/* Touchwin() routine of the PCcurses package			*/
-/*								*/
-/****************************************************************/
-/* This version of curses is based on ncurses, a curses version	*/
-/* Originally written by Pavel Curtis at Cornell University.	*/
-/* I have made substantial changes to make it run on IBM PC's,	*/
-/* And therefore consider myself free to make it public domain.	*/
-/*		Bjorn Larsson (...mcvax!enea!infovax!bl)	*/
-/****************************************************************/
-/* 1.0:	Release:					870515	*/
-/****************************************************************/
-/* Modified to run under the MINIX operating system by Don Cope */
-/* These changes are also released into the public domain.      */
-/* 							900906  */
-/****************************************************************/
-
-#include <curses.h>
-#include "curspriv.h"
-
-/****************************************************************/
-/* Touchwin() marks all lines of window 'win' as changed, from	*/
-/* The first to the last character on the line.			*/
-/****************************************************************/
-
-void touchwin(win)
-WINDOW *win;
-{
-  int y;
-  int maxy;
-  int maxx;
-
-  maxy = win->_maxy;
-  maxx = win->_maxx;
-
-  for (y = 0; y <= maxy; y++) {
-	win->_minchng[y] = 0;
-	win->_maxchng[y] = maxx;
-  }				/* for */
-}				/* touchwin */
Index: trunk/minix/lib/dummy/Makedepend-ack
===================================================================
--- trunk/minix/lib/dummy/Makedepend-ack	(revision 9)
+++ 	(revision )
@@ -1,4 +1,0 @@
-depend-ack:
-	rm .depend-ack
-	touch .depend-ack
-	mkdep 'cc  -E' dummy.c | sed -e 's:^\(.\):../obj-ack//./dummy/\1:' >> .depend-ack
Index: trunk/minix/lib/dummy/Makedepend-gnu
===================================================================
--- trunk/minix/lib/dummy/Makedepend-gnu	(revision 9)
+++ 	(revision )
@@ -1,4 +1,0 @@
-depend-gnu:
-	rm .depend-gnu
-	touch .depend-gnu
-	mkdep 'gcc  -E' dummy.c | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./dummy/\1:' >> .depend-gnu
Index: trunk/minix/lib/dummy/Makefile
===================================================================
--- trunk/minix/lib/dummy/Makefile	(revision 9)
+++ 	(revision )
@@ -1,52 +1,0 @@
-#Generated from ./dummy/Makefile.in
-all: all-ack
-
-all-ack:
-all-gnu:
-
-makefiles: Makefile
-Makedepend-ack Makedepend-gnu: 
-	sh ../generate.sh ./dummy ../obj-ack/ ../obj-gnu
-
-Makefile: Makefile.in Makedepend-ack Makedepend-gnu
-	sh ../generate.sh ./dummy ../obj-ack/ ../obj-gnu
-	@echo
-	@echo *Attention*
-	@echo Makefile is regenerated... rerun command to see changes
-	@echo *Attention*
-	@echo
-
-depend: depend-ack
-all-ack: ../obj-ack//libm.a
-
-../obj-ack//libm.a: ../obj-ack//libm.a(dummy.o)
-
-../obj-ack//libm.a:
-	ar cr ../obj-ack//libm.a ../obj-ack//./dummy/*.o
-	rm ../obj-ack//./dummy/*.o
-
-../obj-ack//libm.a(dummy.o): dummy.c
-	cc  -c -o ../obj-ack//./dummy/dummy.o dummy.c
-
-all-gnu: ../obj-gnu/libm.a
-
-../obj-gnu/libm.a: ../obj-gnu/./dummy/dummy.o
-
-../obj-gnu/libm.a:
-	gar cr ../obj-gnu/libm.a $?
-
-../obj-gnu/./dummy/dummy.o: dummy.c
-	gcc  -c -o ../obj-gnu/./dummy/dummy.o dummy.c
-
-
-
-
-clean::
-	rm -f ../obj-ack//./dummy/*
-	rm -f ../obj-gnu/./dummy/*
-
-include Makedepend-ack
-include .depend-ack
-
-include Makedepend-gnu
-include .depend-gnu
Index: trunk/minix/lib/dummy/Makefile.in
===================================================================
--- trunk/minix/lib/dummy/Makefile.in	(revision 9)
+++ 	(revision )
@@ -1,13 +1,0 @@
-# Makefile for lib/dummy.
-
-# Make a dummy libm library so that -lm works.
-
-
-LIBRARIES=libm
-
-libm_FILES=dummy.c
-
-TYPE=both
-
-#dummy.c:
-#	echo "int __dummy__;" > $@
Index: trunk/minix/lib/dummy/dummy.c
===================================================================
--- trunk/minix/lib/dummy/dummy.c	(revision 9)
+++ 	(revision )
@@ -1,1 +1,0 @@
-int __dummy__;
Index: trunk/minix/lib/editline/Makedepend-ack
===================================================================
--- trunk/minix/lib/editline/Makedepend-ack	(revision 9)
+++ 	(revision )
@@ -1,6 +1,0 @@
-depend-ack:
-	rm .depend-ack
-	touch .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -DANSI_ARROWS -DHAVE_STDLIB -DHAVE_TCGETATTR -DHIDE -DUSE_DIRENT 	-DHIST_SIZE=100 -DUSE_TERMCAP -DSYS_UNIX -wo -E' editline.c | sed -e 's:^\(.\):../obj-ack//./editline/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -DANSI_ARROWS -DHAVE_STDLIB -DHAVE_TCGETATTR -DHIDE -DUSE_DIRENT 	-DHIST_SIZE=100 -DUSE_TERMCAP -DSYS_UNIX -wo -E' complete.c | sed -e 's:^\(.\):../obj-ack//./editline/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -DANSI_ARROWS -DHAVE_STDLIB -DHAVE_TCGETATTR -DHIDE -DUSE_DIRENT 	-DHIST_SIZE=100 -DUSE_TERMCAP -DSYS_UNIX -wo -E' sysunix.c | sed -e 's:^\(.\):../obj-ack//./editline/\1:' >> .depend-ack
Index: trunk/minix/lib/editline/Makedepend-gnu
===================================================================
--- trunk/minix/lib/editline/Makedepend-gnu	(revision 9)
+++ 	(revision )
@@ -1,6 +1,0 @@
-depend-gnu:
-	rm .depend-gnu
-	touch .depend-gnu
-	mkdep 'gcc -O -D_MINIX -D_POSIX_SOURCE -DANSI_ARROWS -DHAVE_STDLIB -DHAVE_TCGETATTR -DHIDE -DUSE_DIRENT 	-DHIST_SIZE=100 -DUSE_TERMCAP -DSYS_UNIX -wo -E' editline.c | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./editline/\1:' >> .depend-gnu
-	mkdep 'gcc -O -D_MINIX -D_POSIX_SOURCE -DANSI_ARROWS -DHAVE_STDLIB -DHAVE_TCGETATTR -DHIDE -DUSE_DIRENT 	-DHIST_SIZE=100 -DUSE_TERMCAP -DSYS_UNIX -wo -E' complete.c | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./editline/\1:' >> .depend-gnu
-	mkdep 'gcc -O -D_MINIX -D_POSIX_SOURCE -DANSI_ARROWS -DHAVE_STDLIB -DHAVE_TCGETATTR -DHIDE -DUSE_DIRENT 	-DHIST_SIZE=100 -DUSE_TERMCAP -DSYS_UNIX -wo -E' sysunix.c | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./editline/\1:' >> .depend-gnu
Index: trunk/minix/lib/editline/Makefile
===================================================================
--- trunk/minix/lib/editline/Makefile	(revision 9)
+++ 	(revision )
@@ -1,66 +1,0 @@
-#Generated from ./editline/Makefile.in
-all: all-ack
-
-all-ack:
-all-gnu:
-
-makefiles: Makefile
-Makedepend-ack Makedepend-gnu: 
-	sh ../generate.sh ./editline ../obj-ack/ ../obj-gnu
-
-Makefile: Makefile.in Makedepend-ack Makedepend-gnu
-	sh ../generate.sh ./editline ../obj-ack/ ../obj-gnu
-	@echo
-	@echo *Attention*
-	@echo Makefile is regenerated... rerun command to see changes
-	@echo *Attention*
-	@echo
-
-depend: depend-ack
-all-ack: ../obj-ack//libedit.a
-
-../obj-ack//libedit.a: ../obj-ack//libedit.a(editline.o)
-../obj-ack//libedit.a: ../obj-ack//libedit.a(complete.o)
-../obj-ack//libedit.a: ../obj-ack//libedit.a(sysunix.o)
-
-../obj-ack//libedit.a:
-	ar cr ../obj-ack//libedit.a ../obj-ack//./editline/*.o
-	rm ../obj-ack//./editline/*.o
-
-../obj-ack//libedit.a(editline.o): editline.c
-	cc -O -D_MINIX -D_POSIX_SOURCE -DANSI_ARROWS -DHAVE_STDLIB -DHAVE_TCGETATTR -DHIDE -DUSE_DIRENT 	-DHIST_SIZE=100 -DUSE_TERMCAP -DSYS_UNIX -wo -c -o ../obj-ack//./editline/editline.o editline.c
-../obj-ack//libedit.a(complete.o): complete.c
-	cc -O -D_MINIX -D_POSIX_SOURCE -DANSI_ARROWS -DHAVE_STDLIB -DHAVE_TCGETATTR -DHIDE -DUSE_DIRENT 	-DHIST_SIZE=100 -DUSE_TERMCAP -DSYS_UNIX -wo -c -o ../obj-ack//./editline/complete.o complete.c
-../obj-ack//libedit.a(sysunix.o): sysunix.c
-	cc -O -D_MINIX -D_POSIX_SOURCE -DANSI_ARROWS -DHAVE_STDLIB -DHAVE_TCGETATTR -DHIDE -DUSE_DIRENT 	-DHIST_SIZE=100 -DUSE_TERMCAP -DSYS_UNIX -wo -c -o ../obj-ack//./editline/sysunix.o sysunix.c
-
-all-gnu: ../obj-gnu/libedit.a
-
-../obj-gnu/libedit.a: ../obj-gnu/./editline/editline.o
-../obj-gnu/libedit.a: ../obj-gnu/./editline/complete.o
-../obj-gnu/libedit.a: ../obj-gnu/./editline/sysunix.o
-
-../obj-gnu/libedit.a:
-	gar cr ../obj-gnu/libedit.a $?
-
-../obj-gnu/./editline/editline.o: editline.c
-	gcc -O -D_MINIX -D_POSIX_SOURCE -DANSI_ARROWS -DHAVE_STDLIB -DHAVE_TCGETATTR -DHIDE -DUSE_DIRENT 	-DHIST_SIZE=100 -DUSE_TERMCAP -DSYS_UNIX -wo -c -o ../obj-gnu/./editline/editline.o editline.c
-
-../obj-gnu/./editline/complete.o: complete.c
-	gcc -O -D_MINIX -D_POSIX_SOURCE -DANSI_ARROWS -DHAVE_STDLIB -DHAVE_TCGETATTR -DHIDE -DUSE_DIRENT 	-DHIST_SIZE=100 -DUSE_TERMCAP -DSYS_UNIX -wo -c -o ../obj-gnu/./editline/complete.o complete.c
-
-../obj-gnu/./editline/sysunix.o: sysunix.c
-	gcc -O -D_MINIX -D_POSIX_SOURCE -DANSI_ARROWS -DHAVE_STDLIB -DHAVE_TCGETATTR -DHIDE -DUSE_DIRENT 	-DHIST_SIZE=100 -DUSE_TERMCAP -DSYS_UNIX -wo -c -o ../obj-gnu/./editline/sysunix.o sysunix.c
-
-
-
-
-clean::
-	rm -f ../obj-ack//./editline/*
-	rm -f ../obj-gnu/./editline/*
-
-include Makedepend-ack
-include .depend-ack
-
-include Makedepend-gnu
-include .depend-gnu
Index: trunk/minix/lib/editline/Makefile.in
===================================================================
--- trunk/minix/lib/editline/Makefile.in	(revision 9)
+++ 	(revision )
@@ -1,44 +1,0 @@
-##  $Revision: 1.2 $
-##
-##  Unix makefile for editline library.
-##
-
-
-##  Set your options:
-##	-DANSI_ARROWS		ANSI arrows keys work like emacs.
-##	-DHAVE_STDLIB		Have <stdlib.h>.
-##	-DHAVE_TCGETATTR	Have , .
-##	-DHAVE_TERMIO		Have "struct termio" and <termio.h>
-##	(If neither of above two, we use <sgttyb.h> and BSD ioctl's)
-##	-DHIDE			Make static functions static (non debug).
-##	-DHIST_SIZE=n		History size.
-##	-DNEED_STRDUP		Don't have .
-##	-DUNIQUE_HISTORY	Don't save command if same as last one.
-##	-DUSE_DIRENT		Use <dirent.h>, not <sys/dir.h>?
-##	-DUSE_TERMCAP		Use the termcap library for terminal size
-##				see LDFLAGS, below, if you set this.
-##	-DNEED_PERROR		Don't have  (used in testit)
-DEFS="-DANSI_ARROWS -DHAVE_STDLIB -DHAVE_TCGETATTR -DHIDE -DUSE_DIRENT \
-	-DHIST_SIZE=100 -DUSE_TERMCAP -DSYS_UNIX"
-#-DNEED_STRDUP
-
-CFLAGS="-O -D_MINIX -D_POSIX_SOURCE $DEFS -wo"
-#CC1	= $(CC) $(CFLAGS) -c
-
-##  If you have -DUSE_TERMCAP, set this as appropriate:
-#LDFLAGS = -ltermlib
-#LDFLAGS = -ltermcap
-
-##  End of configuration.
-
-#SOURCES	= editline.c complete.c sysunix.c
-#LIBRARY = ../libedit.a
-LIBRARIES=libedit
-#OBJECTS	= editline.o complete.o sysunix.o
-libedit_FILES="editline.c complete.c sysunix.c"
-#SHARFILES =	README Makefile editline.3 editline.h unix.h editline.c \
-
-TYPE=both
-#include ../Makefile.inc
-
-#$(call ADDDEPENDENCIES,$(libedit_OBJECTS),editline.h)
Index: trunk/minix/lib/editline/README
===================================================================
--- trunk/minix/lib/editline/README	(revision 9)
+++ 	(revision )
@@ -1,59 +1,0 @@
-$Revision: 1.1.1.1 $
-
-This is a line-editing library.  It can be linked into almost any
-program to provide command-line editing and recall.
-
-It is call-compatible with the FSF readline library, but it is a
-fraction of the size (and offers fewer features).  It does not use
-standard I/O.  It is distributed under a "C News-like" copyright.
-
-Configuration is done in the Makefile.  Type "make testit" to get
-a small slow shell for testing.
-
-An earlier version was distributed with Byron's rc.  Principal
-changes over that version include:
-	Faster.
-	Is eight-bit clean (thanks to brendan@cs.widener.edu)
-	Written in K&R C, but ANSI compliant (gcc all warnings)
-	Propagates EOF properly; rc trip test now passes
-	Doesn't need or use or provide memmove.
-	More robust
-	Calling sequence changed to be compatible with readline.
-	Test program, new manpage, better configuration
-	More system-independant; includes Unix and OS-9 support.
-
-This contains some changes since the posting to comp.sources.misc:
-	Bugfix for completion on absolute pathnames.
-	Better handling of M-n versus showing raw 8bit chars.
-	Better signal handling.
-	Now supports termios/termio/sgttyb ioctl's.
-	Add M-m command to toggle how 8bit data is displayed.
-
-There is one known bug:
-	History-searching redraws the line wrong if the text
-	retrieved is shorter then the prompt.
-
-Enjoy,
-	Rich $alz
-	<rsalz@osf.org>
-
- Copyright 1992,1993 Simmule Turner and Rich Salz.  All rights reserved.
-
- This software is not subject to any license of the American Telephone
- and Telegraph Company or of the Regents of the University of California.
-
- Permission is granted to anyone to use this software for any purpose on
- any computer system, and to alter it and redistribute it freely, subject
- to the following restrictions:
- 1. The authors are not responsible for the consequences of use of this
-    software, no matter how awful, even if they arise from flaws in it.
- 2. The origin of this software must not be misrepresented, either by
-    explicit claim or by omission.  Since few users ever read sources,
-    credits must appear in the documentation.
- 3. Altered versions must be plainly marked as such, and must not be
-    misrepresented as being the original software.  Since few users
-    ever read sources, credits must appear in the documentation.
- 4. This notice may not be removed or altered.
-
---
-$PchId: README,v 1.3 1996/02/22 21:18:51 philip Exp $
Index: trunk/minix/lib/editline/complete.c
===================================================================
--- trunk/minix/lib/editline/complete.c	(revision 9)
+++ 	(revision )
@@ -1,254 +1,0 @@
-/*  $Revision: 1.1.1.1 $
-**
-**  History and file completion functions for editline library.
-*/
-#include "editline.h"
-
-
-#if	defined(NEED_STRDUP)
-/*
-**  Return an allocated copy of a string.
-*/
-char *
-strdup(p)
-    char	*p;
-{
-    char	*new;
-
-    if ((new = NEW(char, strlen(p) + 1)) != NULL)
-	(void)strcpy(new, p);
-    return new;
-}
-#endif	/* defined(NEED_STRDUP) */
-
-/*
-**  strcmp-like sorting predicate for qsort.
-*/
-STATIC int
-compare(p1, p2)
-    CONST void	*p1;
-    CONST void	*p2;
-{
-    CONST char	**v1;
-    CONST char	**v2;
-
-    v1 = (CONST char **)p1;
-    v2 = (CONST char **)p2;
-    return strcmp(*v1, *v2);
-}
-
-/*
-**  Fill in *avp with an array of names that match file, up to its length.
-**  Ignore . and .. .
-*/
-STATIC int
-FindMatches(dir, file, avp)
-    char	*dir;
-    char	*file;
-    char	***avp;
-{
-    char	**av;
-    char	**new;
-    char	*p;
-    DIR		*dp;
-    DIRENTRY	*ep;
-    SIZE_T	ac;
-    SIZE_T	len;
-    SIZE_T	choices;
-    SIZE_T	total;
-#define MAX_TOTAL	(256 << sizeof(char *))
-
-    if ((dp = opendir(dir)) == NULL)
-	return 0;
-
-    av = NULL;
-    ac = 0;
-    len = strlen(file);
-    choices = 0;
-    total = 0;
-    while ((ep = readdir(dp)) != NULL) {
-	p = ep->d_name;
-	if (p[0] == '.' && (p[1] == '\0' || (p[1] == '.' && p[2] == '\0')))
-	    continue;
-	if (len && strncmp(p, file, len) != 0)
-	    continue;
-
-	choices++;
-	if ((total += strlen(p)) > MAX_TOTAL) {
-	    /* This is a bit too much. */
-	    while (ac > 0) DISPOSE(av[--ac]);
-	    continue;
-	}
-
-	if ((ac % MEM_INC) == 0) {
-	    if ((new = NEW(char*, ac + MEM_INC)) == NULL) {
-		total = 0;
-		break;
-	    }
-	    if (ac) {
-		COPYFROMTO(new, av, ac * sizeof (char **));
-		DISPOSE(av);
-	    }
-	    *avp = av = new;
-	}
-
-	if ((av[ac] = strdup(p)) == NULL) {
-	    if (ac == 0)
-		DISPOSE(av);
-	    total = 0;
-	    break;
-	}
-	ac++;
-    }
-
-    /* Clean up and return. */
-    (void)closedir(dp);
-    if (total > MAX_TOTAL) {
-	char many[sizeof(total) * 3];
-	p = many + sizeof(many);
-	*--p = '\0';
-	while (choices > 0) {
-	   *--p = '0' + choices % 10;
-	   choices /= 10;
-	}
-	while (p > many + sizeof(many) - 8) *--p = ' ';
-	if ((p = strdup(p)) != NULL) av[ac++] = p;
-	if ((p = strdup("choices")) != NULL) av[ac++] = p;
-    } else {
-	if (ac)
-	    qsort(av, ac, sizeof (char **), compare);
-    }
-    return ac;
-}
-
-/*
-**  Split a pathname into allocated directory and trailing filename parts.
-*/
-STATIC int
-SplitPath(path, dirpart, filepart)
-    char	*path;
-    char	**dirpart;
-    char	**filepart;
-{
-    static char	DOT[] = ".";
-    char	*dpart;
-    char	*fpart;
-
-    if ((fpart = strrchr(path, '/')) == NULL) {
-	if ((dpart = strdup(DOT)) == NULL)
-	    return -1;
-	if ((fpart = strdup(path)) == NULL) {
-	    DISPOSE(dpart);
-	    return -1;
-	}
-    }
-    else {
-	if ((dpart = strdup(path)) == NULL)
-	    return -1;
-	dpart[fpart - path + 1] = '\0';
-	if ((fpart = strdup(++fpart)) == NULL) {
-	    DISPOSE(dpart);
-	    return -1;
-	}
-    }
-    *dirpart = dpart;
-    *filepart = fpart;
-    return 0;
-}
-
-/*
-**  Attempt to complete the pathname, returning an allocated copy.
-**  Fill in *unique if we completed it, or set it to 0 if ambiguous.
-*/
-char *
-rl_complete(pathname, unique)
-    char	*pathname;
-    int		*unique;
-{
-    char	**av;
-    char	*dir;
-    char	*file;
-    char	*new;
-    char	*p;
-    SIZE_T	ac;
-    SIZE_T	end;
-    SIZE_T	i;
-    SIZE_T	j;
-    SIZE_T	len;
-
-    if (SplitPath(pathname, &dir, &file) < 0)
-	return NULL;
-    if ((ac = FindMatches(dir, file, &av)) == 0) {
-	DISPOSE(dir);
-	DISPOSE(file);
-	return NULL;
-    }
-
-    p = NULL;
-    len = strlen(file);
-    if (ac == 1) {
-	/* Exactly one match -- finish it off. */
-	*unique = 1;
-	j = strlen(av[0]) - len + 2;
-	if ((p = NEW(char, j + 1)) != NULL) {
-	    COPYFROMTO(p, av[0] + len, j);
-	    if ((new = NEW(char, strlen(dir) + strlen(av[0]) + 2)) != NULL) {
-		(void)strcpy(new, dir);
-		(void)strcat(new, "/");
-		(void)strcat(new, av[0]);
-		rl_add_slash(new, p);
-		DISPOSE(new);
-	    }
-	}
-    }
-    else {
-	*unique = 0;
-	if (len) {
-	    /* Find largest matching substring. */
-	    for (i = len, end = strlen(av[0]); i < end; i++)
-		for (j = 1; j < ac; j++)
-		    if (av[0][i] != av[j][i])
-			goto breakout;
-  breakout:
-	    if (i > len) {
-		j = i - len + 1;
-		if ((p = NEW(char, j)) != NULL) {
-		    COPYFROMTO(p, av[0] + len, j);
-		    p[j - 1] = '\0';
-		}
-	    }
-	}
-    }
-
-    /* Clean up and return. */
-    DISPOSE(dir);
-    DISPOSE(file);
-    for (i = 0; i < ac; i++)
-	DISPOSE(av[i]);
-    DISPOSE(av);
-    return p;
-}
-
-/*
-**  Return all possible completions.
-*/
-int
-rl_list_possib(pathname, avp)
-    char	*pathname;
-    char	***avp;
-{
-    char	*dir;
-    char	*file;
-    int		ac;
-
-    if (SplitPath(pathname, &dir, &file) < 0)
-	return 0;
-    ac = FindMatches(dir, file, avp);
-    DISPOSE(dir);
-    DISPOSE(file);
-    return ac;
-}
-
-/*
- * $PchId: complete.c,v 1.3 1996/02/22 21:18:51 philip Exp $
- */
Index: trunk/minix/lib/editline/editline.c
===================================================================
--- trunk/minix/lib/editline/editline.c	(revision 9)
+++ 	(revision )
@@ -1,1469 +1,0 @@
-/*  $Revision: 1.1.1.1 $
-**
-**  Main editing routines for editline library.
-*/
-#include "editline.h"
-#include <signal.h>
-#include <ctype.h>
-
-/*
-**  Manifest constants.
-*/
-#define SCREEN_WIDTH	80
-#define SCREEN_ROWS	24
-#define NO_ARG		(-1)
-#define DEL		127
-#define CTL(x)		((x) & 0x1F)
-#define ISCTL(x)	((x) && (x) < ' ')
-#define UNCTL(x)	((x) + 64)
-#define META(x)		((x) | 0x80)
-#define ISMETA(x)	((x) & 0x80)
-#define UNMETA(x)	((x) & 0x7F)
-#if	!defined(HIST_SIZE)
-#define HIST_SIZE	20
-#endif	/* !defined(HIST_SIZE) */
-
-/*
-**  Command status codes.
-*/
-typedef enum _STATUS {
-    CSdone, CSeof, CSmove, CSdispatch, CSstay, CSsignal
-} STATUS;
-
-/*
-**  The type of case-changing to perform.
-*/
-typedef enum _CASE {
-    TOupper, TOlower
-} CASE;
-
-/*
-**  Key to command mapping.
-*/
-typedef struct _KEYMAP {
-    CHAR	Key;
-    STATUS	(*Function)();
-} KEYMAP;
-
-/*
-**  Command history structure.
-*/
-typedef struct _HISTORY {
-    int		Size;
-    int		Pos;
-    CHAR	*Lines[HIST_SIZE];
-} HISTORY;
-
-/*
-**  Globals.
-*/
-int		rl_eof;
-int		rl_erase;
-int		rl_intr;
-int		rl_kill;
-int		rl_quit;
-
-STATIC CHAR		NIL[] = "";
-STATIC CONST CHAR	*Input = NIL;
-STATIC CHAR		*Line;
-STATIC CONST char	*Prompt;
-STATIC CHAR		*Yanked;
-STATIC char		*Screen;
-STATIC char		NEWLINE[]= CRLF;
-STATIC HISTORY		H;
-STATIC int		Repeat;
-STATIC int		End;
-STATIC int		Mark;
-STATIC int		OldPoint;
-STATIC int		Point;
-STATIC int		PushBack;
-STATIC int		Pushed;
-STATIC int		Signal;
-FORWARD KEYMAP		Map[33];
-FORWARD KEYMAP		MetaMap[17];
-STATIC SIZE_T		Length;
-STATIC SIZE_T		ScreenCount;
-STATIC SIZE_T		ScreenSize;
-STATIC char		*backspace;
-STATIC int		TTYwidth;
-STATIC int		TTYrows;
-
-/* Display print 8-bit chars as `M-x' or as the actual 8-bit char? */
-int		rl_meta_chars = 0;
-
-/*
-**  Declarations.
-*/
-STATIC CHAR	*editinput();
-extern int	read();
-extern int	write();
-#if	defined(USE_TERMCAP)
-extern char	*getenv();
-extern char	*tgetstr();
-extern int	tgetent();
-#endif	/* defined(USE_TERMCAP) */
-
-
-/*
-**  TTY input/output functions.
-*/
-
-STATIC void
-TTYflush()
-{
-    if (ScreenCount) {
-	(void)write(1, Screen, ScreenCount);
-	ScreenCount = 0;
-    }
-}
-
-STATIC void
-TTYput(c)
-    CHAR	c;
-{
-    Screen[ScreenCount] = c;
-    if (++ScreenCount >= ScreenSize - 1) {
-	ScreenSize += SCREEN_INC;
-	RENEW(Screen, char, ScreenSize);
-    }
-}
-
-STATIC void
-TTYputs(p)
-    CHAR	*p;
-{
-    while (*p)
-	TTYput(*p++);
-}
-
-STATIC void
-TTYshow(c)
-    CHAR	c;
-{
-    if (c == DEL) {
-	TTYput('^');
-	TTYput('?');
-    }
-    else if (ISCTL(c)) {
-	TTYput('^');
-	TTYput(UNCTL(c));
-    }
-    else if (rl_meta_chars && ISMETA(c)) {
-	TTYput('M');
-	TTYput('-');
-	TTYput(UNMETA(c));
-    }
-    else
-	TTYput(c);
-}
-
-STATIC void
-TTYstring(p)
-    CHAR	*p;
-{
-    while (*p)
-	TTYshow(*p++);
-}
-
-STATIC unsigned int
-TTYget()
-{
-    CHAR	c;
-
-    TTYflush();
-    if (Pushed) {
-	Pushed = 0;
-	return PushBack;
-    }
-    if (*Input)
-	return *Input++;
-    return read(0, &c, (SIZE_T)1) == 1 ? c : EOF;
-}
-
-#define TTYback()	(backspace ? TTYputs((CHAR *)backspace) : TTYput('\b'))
-
-STATIC void
-TTYbackn(n)
-    int		n;
-{
-    while (--n >= 0)
-	TTYback();
-}
-
-STATIC void
-TTYinfo()
-{
-    static int		init;
-#if	defined(USE_TERMCAP)
-    char		*term;
-    char		buff[2048];
-    char		*bp;
-#endif	/* defined(USE_TERMCAP) */
-#if	defined(TIOCGWINSZ)
-    struct winsize	W;
-#endif	/* defined(TIOCGWINSZ) */
-
-    if (init) {
-#if	defined(TIOCGWINSZ)
-	/* Perhaps we got resized. */
-	if (ioctl(0, TIOCGWINSZ, &W) >= 0
-	 && W.ws_col > 0 && W.ws_row > 0) {
-	    TTYwidth = (int)W.ws_col;
-	    TTYrows = (int)W.ws_row;
-	}
-#endif	/* defined(TIOCGWINSZ) */
-	return;
-    }
-    init++;
-
-    TTYwidth = TTYrows = 0;
-#if	defined(USE_TERMCAP)
-    bp = &buff[0];
-    if ((term = getenv("TERM")) == NULL)
-	term = "dumb";
-    if (tgetent(buff, term) < 0) {
-       TTYwidth = SCREEN_WIDTH;
-       TTYrows = SCREEN_ROWS;
-       return;
-    }
-    if ((backspace = tgetstr("le", &bp)) != NULL)
-	backspace = strdup(backspace);
-    TTYwidth = tgetnum("co");
-    TTYrows = tgetnum("li");
-#endif	/* defined(USE_TERMCAP) */
-
-#if	defined(TIOCGWINSZ)
-    if (ioctl(0, TIOCGWINSZ, &W) >= 0) {
-	TTYwidth = (int)W.ws_col;
-	TTYrows = (int)W.ws_row;
-    }
-#endif	/* defined(TIOCGWINSZ) */
-
-    if (TTYwidth <= 0 || TTYrows <= 0) {
-	TTYwidth = SCREEN_WIDTH;
-	TTYrows = SCREEN_ROWS;
-    }
-}
-
-
-
-/*
-**  Print an array of words in columns.
-*/
-STATIC void
-columns(ac, av)
-    int		ac;
-    CHAR	**av;
-{
-    CHAR	*p;
-    int		i;
-    int		j;
-    int		k;
-    int		len;
-    int		skip;
-    int		longest;
-    int		cols;
-
-    /* Find longest name, determine column count from that. */
-    for (longest = 0, i = 0; i < ac; i++)
-	if ((j = strlen((char *)av[i])) > longest)
-	    longest = j;
-    cols = TTYwidth / (longest + 3);
-
-    TTYputs((CHAR *)NEWLINE);
-    for (skip = ac / cols + 1, i = 0; i < skip; i++) {
-	for (j = i; j < ac; j += skip) {
-	    for (p = av[j], len = strlen((char *)p), k = len; --k >= 0; p++)
-		TTYput(*p);
-	    if (j + skip < ac)
-		while (++len < longest + 3)
-		    TTYput(' ');
-	}
-	TTYputs((CHAR *)NEWLINE);
-    }
-}
-
-STATIC void
-reposition()
-{
-    int		i;
-    CHAR	*p;
-
-    TTYput('\r');
-    TTYputs((CONST CHAR *)Prompt);
-    for (i = Point, p = Line; --i >= 0; p++)
-	TTYshow(*p);
-}
-
-STATIC void
-left(Change)
-    STATUS	Change;
-{
-    TTYback();
-    if (Point) {
-	if (ISCTL(Line[Point - 1]))
-	    TTYback();
-        else if (rl_meta_chars && ISMETA(Line[Point - 1])) {
-	    TTYback();
-	    TTYback();
-	}
-    }
-    if (Change == CSmove)
-	Point--;
-}
-
-STATIC void
-right(Change)
-    STATUS	Change;
-{
-    TTYshow(Line[Point]);
-    if (Change == CSmove)
-	Point++;
-}
-
-STATIC STATUS
-ring_bell()
-{
-    TTYput('\07');
-    TTYflush();
-    return CSstay;
-}
-
-STATIC STATUS
-do_macro(c)
-    unsigned int	c;
-{
-    CHAR		name[4];
-
-    name[0] = '_';
-    name[1] = c;
-    name[2] = '_';
-    name[3] = '\0';
-
-    if ((Input = (CHAR *)getenv((char *)name)) == NULL) {
-	Input = NIL;
-	return ring_bell();
-    }
-    return CSstay;
-}
-
-STATIC STATUS
-do_forward(move)
-    STATUS	move;
-{
-    int		i;
-    CHAR	*p;
-
-    i = 0;
-    do {
-	p = &Line[Point];
-	for ( ; Point < End && (*p == ' ' || !isalnum(*p)); Point++, p++)
-	    if (move == CSmove)
-		right(CSstay);
-
-	for (; Point < End && isalnum(*p); Point++, p++)
-	    if (move == CSmove)
-		right(CSstay);
-
-	if (Point == End)
-	    break;
-    } while (++i < Repeat);
-
-    return CSstay;
-}
-
-STATIC STATUS
-do_case(type)
-    CASE	type;
-{
-    int		i;
-    int		end;
-    int		count;
-    CHAR	*p;
-
-    (void)do_forward(CSstay);
-    if (OldPoint != Point) {
-	if ((count = Point - OldPoint) < 0)
-	    count = -count;
-	Point = OldPoint;
-	if ((end = Point + count) > End)
-	    end = End;
-	for (i = Point, p = &Line[i]; i < end; i++, p++) {
-	    if (type == TOupper) {
-		if (islower(*p))
-		    *p = toupper(*p);
-	    }
-	    else if (isupper(*p))
-		*p = tolower(*p);
-	    right(CSmove);
-	}
-    }
-    return CSstay;
-}
-
-STATIC STATUS
-case_down_word()
-{
-    return do_case(TOlower);
-}
-
-STATIC STATUS
-case_up_word()
-{
-    return do_case(TOupper);
-}
-
-STATIC void
-ceol()
-{
-    int		extras;
-    int		i;
-    CHAR	*p;
-
-    for (extras = 0, i = Point, p = &Line[i]; i <= End; i++, p++) {
-	TTYput(' ');
-	if (ISCTL(*p)) {
-	    TTYput(' ');
-	    extras++;
-	}
-	else if (rl_meta_chars && ISMETA(*p)) {
-	    TTYput(' ');
-	    TTYput(' ');
-	    extras += 2;
-	}
-    }
-
-    for (i += extras; i > Point; i--)
-	TTYback();
-}
-
-STATIC void
-clear_line()
-{
-    Point = -strlen(Prompt);
-    TTYput('\r');
-    ceol();
-    Point = 0;
-    End = 0;
-    Line[0] = '\0';
-}
-
-STATIC STATUS
-insert_string(p)
-    CHAR	*p;
-{
-    SIZE_T	len;
-    int		i;
-    CHAR	*new;
-    CHAR	*q;
-
-    len = strlen((char *)p);
-    if (End + len >= Length) {
-	if ((new = NEW(CHAR, Length + len + MEM_INC)) == NULL)
-	    return CSstay;
-	if (Length) {
-	    COPYFROMTO(new, Line, Length);
-	    DISPOSE(Line);
-	}
-	Line = new;
-	Length += len + MEM_INC;
-    }
-
-    for (q = &Line[Point], i = End - Point; --i >= 0; )
-	q[len + i] = q[i];
-    COPYFROMTO(&Line[Point], p, len);
-    End += len;
-    Line[End] = '\0';
-    TTYstring(&Line[Point]);
-    Point += len;
-
-    return Point == End ? CSstay : CSmove;
-}
-
-STATIC STATUS
-redisplay()
-{
-    TTYputs((CONST CHAR *)NEWLINE);
-    TTYputs((CONST CHAR *)Prompt);
-    TTYstring(Line);
-    return CSmove;
-}
-
-STATIC STATUS
-toggle_meta_mode()
-{
-    rl_meta_chars = ! rl_meta_chars;
-    return redisplay();
-}
-
-
-
-STATIC CHAR *
-next_hist()
-{
-    return H.Pos >= H.Size - 1 ? NULL : H.Lines[++H.Pos];
-}
-
-STATIC CHAR *
-prev_hist()
-{
-    return H.Pos == 0 ? NULL : H.Lines[--H.Pos];
-}
-
-STATIC STATUS
-do_insert_hist(p)
-    CHAR	*p;
-{
-    if (p == NULL)
-	return ring_bell();
-    Point = 0;
-    reposition();
-    ceol();
-    End = 0;
-    return insert_string(p);
-}
-
-STATIC STATUS
-do_hist(move)
-    CHAR	*(*move)();
-{
-    CHAR	*p;
-    int		i;
-
-    i = 0;
-    do {
-	if ((p = (*move)()) == NULL)
-	    return ring_bell();
-    } while (++i < Repeat);
-    return do_insert_hist(p);
-}
-
-STATIC STATUS
-h_next()
-{
-    return do_hist(next_hist);
-}
-
-STATIC STATUS
-h_prev()
-{
-    return do_hist(prev_hist);
-}
-
-STATIC STATUS
-h_first()
-{
-    return do_insert_hist(H.Lines[H.Pos = 0]);
-}
-
-STATIC STATUS
-h_last()
-{
-    return do_insert_hist(H.Lines[H.Pos = H.Size - 1]);
-}
-
-/*
-**  Return zero if pat appears as a substring in text.
-*/
-STATIC int
-substrcmp(text, pat, len)
-    char	*text;
-    char	*pat;
-    int		len;
-{
-    char	c;
-
-    if ((c = *pat) == '\0')
-        return *text == '\0';
-    for ( ; *text; text++)
-        if (*text == c && strncmp(text, pat, len) == 0)
-            return 0;
-    return 1;
-}
-
-STATIC CHAR *
-search_hist(search, move)
-    CHAR	*search;
-    CHAR	*(*move)();
-{
-    static CHAR	*old_search;
-    int		len;
-    int		pos;
-    int		(*match)();
-    char	*pat;
-
-    /* Save or get remembered search pattern. */
-    if (search && *search) {
-	if (old_search)
-	    DISPOSE(old_search);
-	old_search = (CHAR *)strdup((char *)search);
-    }
-    else {
-	if (old_search == NULL || *old_search == '\0')
-            return NULL;
-	search = old_search;
-    }
-
-    /* Set up pattern-finder. */
-    if (*search == '^') {
-	match = strncmp;
-	pat = (char *)(search + 1);
-    }
-    else {
-	match = substrcmp;
-	pat = (char *)search;
-    }
-    len = strlen(pat);
-
-    for (pos = H.Pos; (*move)() != NULL; )
-	if ((*match)((char *)H.Lines[H.Pos], pat, len) == 0)
-            return H.Lines[H.Pos];
-    H.Pos = pos;
-    return NULL;
-}
-
-STATIC STATUS
-h_search()
-{
-    static int	Searching;
-    CONST char	*old_prompt;
-    CHAR	*(*move)();
-    CHAR	*p;
-
-    if (Searching)
-	return ring_bell();
-    Searching = 1;
-
-    clear_line();
-    old_prompt = Prompt;
-    Prompt = "Search: ";
-    TTYputs((CONST CHAR *)Prompt);
-    move = Repeat == NO_ARG ? prev_hist : next_hist;
-    p = editinput();
-    Prompt = old_prompt;
-    Searching = 0;
-    TTYputs((CONST CHAR *)Prompt);
-    if (p == NULL && Signal > 0) {
-	Signal = 0;
-	clear_line();
-	return redisplay();
-    }
-    p = search_hist(p, move);
-    clear_line();
-    if (p == NULL) {
-	(void)ring_bell();
-	return redisplay();
-    }
-    return do_insert_hist(p);
-}
-
-STATIC STATUS
-fd_char()
-{
-    int		i;
-
-    i = 0;
-    do {
-	if (Point >= End)
-	    break;
-	right(CSmove);
-    } while (++i < Repeat);
-    return CSstay;
-}
-
-STATIC void
-save_yank(begin, i)
-    int		begin;
-    int		i;
-{
-    if (Yanked) {
-	DISPOSE(Yanked);
-	Yanked = NULL;
-    }
-
-    if (i < 1)
-	return;
-
-    if ((Yanked = NEW(CHAR, (SIZE_T)i + 1)) != NULL) {
-	COPYFROMTO(Yanked, &Line[begin], i);
-	Yanked[i] = '\0';
-    }
-}
-
-STATIC STATUS
-delete_string(count)
-    int		count;
-{
-    int		i;
-    CHAR	*p;
-
-    if (count <= 0 || End == Point)
-	return ring_bell();
-
-    if (count == 1 && Point == End - 1) {
-	/* Optimize common case of delete at end of line. */
-	End--;
-	p = &Line[Point];
-	i = 1;
-	TTYput(' ');
-	if (ISCTL(*p)) {
-	    i = 2;
-	    TTYput(' ');
-	}
-	else if (rl_meta_chars && ISMETA(*p)) {
-	    i = 3;
-	    TTYput(' ');
-	    TTYput(' ');
-	}
-	TTYbackn(i);
-	*p = '\0';
-	return CSmove;
-    }
-    if (Point + count > End && (count = End - Point) <= 0)
-	return CSstay;
-
-    if (count > 1)
-	save_yank(Point, count);
-
-    for (p = &Line[Point], i = End - (Point + count) + 1; --i >= 0; p++)
-	p[0] = p[count];
-    ceol();
-    End -= count;
-    TTYstring(&Line[Point]);
-    return CSmove;
-}
-
-STATIC STATUS
-bk_char()
-{
-    int		i;
-
-    i = 0;
-    do {
-	if (Point == 0)
-	    break;
-	left(CSmove);
-    } while (++i < Repeat);
-
-    return CSstay;
-}
-
-STATIC STATUS
-bk_del_char()
-{
-    int		i;
-
-    i = 0;
-    do {
-	if (Point == 0)
-	    break;
-	left(CSmove);
-    } while (++i < Repeat);
-
-    return delete_string(i);
-}
-
-STATIC STATUS
-kill_line()
-{
-    int		i;
-
-    if (Repeat != NO_ARG) {
-	if (Repeat < Point) {
-	    i = Point;
-	    Point = Repeat;
-	    reposition();
-	    (void)delete_string(i - Point);
-	}
-	else if (Repeat > Point) {
-	    right(CSmove);
-	    (void)delete_string(Repeat - Point - 1);
-	}
-	return CSmove;
-    }
-
-    save_yank(Point, End - Point);
-    Line[Point] = '\0';
-    ceol();
-    End = Point;
-    return CSstay;
-}
-
-STATIC STATUS
-insert_char(c)
-    int		c;
-{
-    STATUS	s;
-    CHAR	buff[2];
-    CHAR	*p;
-    CHAR	*q;
-    int		i;
-
-    if (Repeat == NO_ARG || Repeat < 2) {
-	buff[0] = c;
-	buff[1] = '\0';
-	return insert_string(buff);
-    }
-
-    if ((p = NEW(CHAR, Repeat + 1)) == NULL)
-	return CSstay;
-    for (i = Repeat, q = p; --i >= 0; )
-	*q++ = c;
-    *q = '\0';
-    Repeat = 0;
-    s = insert_string(p);
-    DISPOSE(p);
-    return s;
-}
-
-STATIC STATUS
-meta()
-{
-    unsigned int	c;
-    KEYMAP		*kp;
-
-    if ((c = TTYget()) == EOF)
-	return CSeof;
-#if	defined(ANSI_ARROWS)
-    /* Also include VT-100 arrows. */
-    if (c == '[' || c == 'O')
-	switch (c = TTYget()) {
-	default:	return ring_bell();
-	case EOF:	return CSeof;
-	case 'A':	return h_prev();
-	case 'B':	return h_next();
-	case 'C':	return fd_char();
-	case 'D':	return bk_char();
-	}
-#endif	/* defined(ANSI_ARROWS) */
-
-    if (isdigit(c)) {
-	for (Repeat = c - '0'; (c = TTYget()) != EOF && isdigit(c); )
-	    Repeat = Repeat * 10 + c - '0';
-	Pushed = 1;
-	PushBack = c;
-	return CSstay;
-    }
-
-    if (isupper(c))
-	return do_macro(c);
-    for (kp = MetaMap; kp->Function; kp++)
-	if (kp->Key == c)
-	    return (*kp->Function)();
-
-    return ring_bell();
-}
-
-STATIC STATUS
-emacs(c)
-    unsigned int	c;
-{
-    STATUS		s;
-    KEYMAP		*kp;
-
-    OldPoint = Point;
-    if (rl_meta_chars && ISMETA(c)) {
-	Pushed = 1;
-	PushBack = UNMETA(c);
-	return meta();
-    }
-    for (kp = Map; kp->Function; kp++)
-	if (kp->Key == c)
-	    break;
-    s = kp->Function ? (*kp->Function)() : insert_char((int)c);
-    if (!Pushed)
-	/* No pushback means no repeat count; hacky, but true. */
-	Repeat = NO_ARG;
-    return s;
-}
-
-STATIC STATUS
-TTYspecial(c)
-    unsigned int	c;
-{
-    if (ISMETA(c))
-	return CSdispatch;
-
-    if (c == rl_erase || c == DEL)
-	return bk_del_char();
-    if (c == rl_kill) {
-	if (Point != 0) {
-	    Point = 0;
-	    reposition();
-	}
-	Repeat = NO_ARG;
-	return kill_line();
-    }
-    if (c == rl_eof && Point == 0 && End == 0)
-	return CSeof;
-    if (c == rl_intr) {
-	Signal = SIGINT;
-	return CSsignal;
-    }
-    if (c == rl_quit) {
-	Signal = SIGQUIT;
-	return CSeof;
-    }
-
-    return CSdispatch;
-}
-
-STATIC CHAR *
-editinput()
-{
-    unsigned int	c;
-
-    Repeat = NO_ARG;
-    OldPoint = Point = Mark = End = 0;
-    Line[0] = '\0';
-
-    Signal = -1;
-    while ((c = TTYget()) != EOF)
-	switch (TTYspecial(c)) {
-	case CSdone:
-	    return Line;
-	case CSeof:
-	    return NULL;
-	case CSsignal:
-	    return (CHAR *)"";
-	case CSmove:
-	    reposition();
-	    break;
-	case CSdispatch:
-	    switch (emacs(c)) {
-	    case CSdone:
-		return Line;
-	    case CSeof:
-		return NULL;
-	    case CSsignal:
-		return (CHAR *)"";
-	    case CSmove:
-		reposition();
-		break;
-	    case CSdispatch:
-	    case CSstay:
-		break;
-	    }
-	    break;
-	case CSstay:
-	    break;
-	}
-    return NULL;
-}
-
-STATIC void
-hist_add(p)
-    CHAR	*p;
-{
-    int		i;
-
-    if ((p = (CHAR *)strdup((char *)p)) == NULL)
-	return;
-    if (H.Size < HIST_SIZE)
-	H.Lines[H.Size++] = p;
-    else {
-	DISPOSE(H.Lines[0]);
-	for (i = 0; i < HIST_SIZE - 1; i++)
-	    H.Lines[i] = H.Lines[i + 1];
-	H.Lines[i] = p;
-    }
-    H.Pos = H.Size - 1;
-}
-
-/*
-**  For compatibility with FSF readline.
-*/
-/* ARGSUSED0 */
-void
-rl_reset_terminal(p)
-    char	*p;
-{
-}
-
-void
-rl_initialize()
-{
-}
-
-char *
-readline(prompt)
-    CONST char	*prompt;
-{
-    CHAR	*line;
-    int		s;
-
-    if (Line == NULL) {
-	Length = MEM_INC;
-	if ((Line = NEW(CHAR, Length)) == NULL)
-	    return NULL;
-    }
-
-    TTYinfo();
-    rl_ttyset(0);
-    hist_add(NIL);
-    ScreenSize = SCREEN_INC;
-    Screen = NEW(char, ScreenSize);
-    Prompt = prompt ? prompt : (char *)NIL;
-    TTYputs((CONST CHAR *)Prompt);
-    if ((line = editinput()) != NULL) {
-	line = (CHAR *)strdup((char *)line);
-	TTYputs((CHAR *)NEWLINE);
-	TTYflush();
-    }
-    rl_ttyset(1);
-    DISPOSE(Screen);
-    DISPOSE(H.Lines[--H.Size]);
-
-    if (line != NULL && *line != '\0'
-#if	defined(UNIQUE_HISTORY)
-	&& !(H.Pos && strcmp((char *) line, (char *) H.Lines[H.Pos - 1]) == 0)
-#endif	/* defined(UNIQUE_HISTORY) */
-	&& !(H.Size && strcmp((char *) line, (char *) H.Lines[H.Size - 1]) == 0)
-    ) {
-	hist_add(line);
-    }
-
-    if (Signal > 0) {
-	s = Signal;
-	Signal = 0;
-	(void)kill(getpid(), s);
-    }
-    return (char *)line;
-}
-
-void
-add_history(p)
-    char	*p;
-{
-#ifdef obsolete		/* Made part of readline(). -- kjb */
-    if (p == NULL || *p == '\0')
-	return;
-
-#if	defined(UNIQUE_HISTORY)
-    if (H.Pos && strcmp(p, (char *) H.Lines[H.Pos - 1]) == 0)
-        return;
-#endif	/* defined(UNIQUE_HISTORY) */
-    if (H.Size && strcmp(p, (char *) H.Lines[H.Size - 1]) == 0)
-	return;
-    hist_add((CHAR *)p);
-#endif
-}
-
-
-
-STATIC STATUS
-beg_line()
-{
-    if (Point) {
-	Point = 0;
-	return CSmove;
-    }
-    return CSstay;
-}
-
-STATIC STATUS
-del_char()
-{
-    return delete_string(Repeat == NO_ARG ? 1 : Repeat);
-}
-
-STATIC STATUS
-end_line()
-{
-    if (Point != End) {
-	Point = End;
-	return CSmove;
-    }
-    return CSstay;
-}
-
-STATIC char	SEPS[] = "\"#$&'()*:;<=>?[\\]^`{|}~\n\t ";
-
-/*
-**  Move back to the beginning of the current word and return an
-**  allocated copy of it.
-*/
-STATIC CHAR *
-find_word()
-{
-    CHAR	*p, *q;
-    CHAR	*new;
-    SIZE_T	len;
-
-    p = &Line[Point];
-    while (p > Line) {
-	p--;
-	if (p > Line && p[-1] == '\\') {
-	    p--;
-	} else {
-	    if (strchr(SEPS, (char) *p) != NULL) {
-		p++;
-		break;
-	    }
-	}
-    }
-    len = Point - (p - Line) + 1;
-    if ((new = NEW(CHAR, len)) == NULL)
-	return NULL;
-    q = new;
-    while (p < &Line[Point]) {
-	if (*p == '\\') {
-	    if (++p == &Line[Point]) break;
-	}
-	*q++ = *p++;
-    }
-    *q = '\0';
-    return new;
-}
-
-STATIC STATUS
-c_possible()
-{
-    CHAR	**av;
-    CHAR	*word;
-    int		ac;
-
-    word = find_word();
-    ac = rl_list_possib((char *)word, (char ***)&av);
-    if (word)
-	DISPOSE(word);
-    if (ac) {
-	columns(ac, av);
-	while (--ac >= 0)
-	    DISPOSE(av[ac]);
-	DISPOSE(av);
-	return CSmove;
-    }
-    return ring_bell();
-}
-
-STATIC STATUS
-c_complete()
-{
-    CHAR	*p, *q;
-    CHAR	*word, *new;
-    SIZE_T	len;
-    int		unique;
-    STATUS	s;
-
-    word = find_word();
-    p = (CHAR *)rl_complete((char *)word, &unique);
-    if (word)
-	DISPOSE(word);
-    if (p) {
-	len = strlen((char *)p);
-	word = p;
-	new = q = NEW(CHAR, 2 * len + 1);
-	while (*p) {
-	    if ((*p < ' ' || strchr(SEPS, (char) *p) != NULL)
-				&& (!unique || p[1] != 0)) {
-		*q++ = '\\';
-	    }
-	    *q++ = *p++;
-	}
-	*q = '\0';
-	DISPOSE(word);
-	if (len > 0) {
-	    s = insert_string(new);
-#if ANNOYING_NOISE
-	    if (!unique)
-		(void)ring_bell();
-#endif
-	}
-	DISPOSE(new);
-	if (len > 0) return s;
-    }
-    return c_possible();
-}
-
-STATIC STATUS
-accept_line()
-{
-    Line[End] = '\0';
-    return CSdone;
-}
-
-STATIC STATUS
-transpose()
-{
-    CHAR	c;
-
-    if (Point) {
-	if (Point == End)
-	    left(CSmove);
-	c = Line[Point - 1];
-	left(CSstay);
-	Line[Point - 1] = Line[Point];
-	TTYshow(Line[Point - 1]);
-	Line[Point++] = c;
-	TTYshow(c);
-    }
-    return CSstay;
-}
-
-STATIC STATUS
-quote()
-{
-    unsigned int	c;
-
-    return (c = TTYget()) == EOF ? CSeof : insert_char((int)c);
-}
-
-STATIC STATUS
-wipe()
-{
-    int		i;
-
-    if (Mark > End)
-	return ring_bell();
-
-    if (Point > Mark) {
-	i = Point;
-	Point = Mark;
-	Mark = i;
-	reposition();
-    }
-
-    return delete_string(Mark - Point);
-}
-
-STATIC STATUS
-mk_set()
-{
-    Mark = Point;
-    return CSstay;
-}
-
-STATIC STATUS
-exchange()
-{
-    unsigned int	c;
-
-    if ((c = TTYget()) != CTL('X'))
-	return c == EOF ? CSeof : ring_bell();
-
-    if ((c = Mark) <= End) {
-	Mark = Point;
-	Point = c;
-	return CSmove;
-    }
-    return CSstay;
-}
-
-STATIC STATUS
-yank()
-{
-    if (Yanked && *Yanked)
-	return insert_string(Yanked);
-    return CSstay;
-}
-
-STATIC STATUS
-copy_region()
-{
-    if (Mark > End)
-	return ring_bell();
-
-    if (Point > Mark)
-	save_yank(Mark, Point - Mark);
-    else
-	save_yank(Point, Mark - Point);
-
-    return CSstay;
-}
-
-STATIC STATUS
-move_to_char()
-{
-    unsigned int	c;
-    int			i;
-    CHAR		*p;
-
-    if ((c = TTYget()) == EOF)
-	return CSeof;
-    for (i = Point + 1, p = &Line[i]; i < End; i++, p++)
-	if (*p == c) {
-	    Point = i;
-	    return CSmove;
-	}
-    return CSstay;
-}
-
-STATIC STATUS
-fd_word()
-{
-    return do_forward(CSmove);
-}
-
-STATIC STATUS
-fd_kill_word()
-{
-    int		i;
-
-    (void)do_forward(CSstay);
-    if (OldPoint != Point) {
-	i = Point - OldPoint;
-	Point = OldPoint;
-	return delete_string(i);
-    }
-    return CSstay;
-}
-
-STATIC STATUS
-bk_word()
-{
-    int		i;
-    CHAR	*p;
-
-    i = 0;
-    do {
-	for (p = &Line[Point]; p > Line && !isalnum(p[-1]); p--)
-	    left(CSmove);
-
-	for (; p > Line && p[-1] != ' ' && isalnum(p[-1]); p--)
-	    left(CSmove);
-
-	if (Point == 0)
-	    break;
-    } while (++i < Repeat);
-
-    return CSstay;
-}
-
-STATIC STATUS
-bk_kill_word()
-{
-    (void)bk_word();
-    if (OldPoint != Point)
-	return delete_string(OldPoint - Point);
-    return CSstay;
-}
-
-STATIC int
-argify(line, avp)
-    CHAR	*line;
-    CHAR	***avp;
-{
-    CHAR	*c;
-    CHAR	**p;
-    CHAR	**new;
-    int		ac;
-    int		i;
-
-    i = MEM_INC;
-    if ((*avp = p = NEW(CHAR*, i))== NULL)
-	 return 0;
-
-    for (c = line; isspace(*c); c++)
-	continue;
-    if (*c == '\n' || *c == '\0')
-	return 0;
-
-    for (ac = 0, p[ac++] = c; *c && *c != '\n'; ) {
-	if (isspace(*c)) {
-	    *c++ = '\0';
-	    if (*c && *c != '\n') {
-		if (ac + 1 == i) {
-		    new = NEW(CHAR*, i + MEM_INC);
-		    if (new == NULL) {
-			p[ac] = NULL;
-			return ac;
-		    }
-		    COPYFROMTO(new, p, i * sizeof (char **));
-		    i += MEM_INC;
-		    DISPOSE(p);
-		    *avp = p = new;
-		}
-		p[ac++] = c;
-	    }
-	}
-	else
-	    c++;
-    }
-    *c = '\0';
-    p[ac] = NULL;
-    return ac;
-}
-
-STATIC STATUS
-last_argument()
-{
-    CHAR	**av;
-    CHAR	*p;
-    STATUS	s;
-    int		ac;
-
-    if (H.Size == 1 || (p = H.Lines[H.Size - 2]) == NULL)
-	return ring_bell();
-
-    if ((p = (CHAR *)strdup((char *)p)) == NULL)
-	return CSstay;
-    ac = argify(p, &av);
-
-    if (Repeat != NO_ARG)
-	s = Repeat < ac ? insert_string(av[Repeat]) : ring_bell();
-    else
-	s = ac ? insert_string(av[ac - 1]) : CSstay;
-
-    if (ac)
-	DISPOSE(av);
-    DISPOSE(p);
-    return s;
-}
-
-STATIC KEYMAP	Map[33] = {
-    {	CTL('@'),	mk_set		},
-    {	CTL('A'),	beg_line	},
-    {	CTL('B'),	bk_char		},
-    {	CTL('D'),	del_char	},
-    {	CTL('E'),	end_line	},
-    {	CTL('F'),	fd_char		},
-    {	CTL('G'),	ring_bell	},
-    {	CTL('H'),	bk_del_char	},
-    {	CTL('I'),	c_complete	},
-    {	CTL('J'),	accept_line	},
-    {	CTL('K'),	kill_line	},
-    {	CTL('L'),	redisplay	},
-    {	CTL('M'),	accept_line	},
-    {	CTL('N'),	h_next		},
-    {	CTL('O'),	ring_bell	},
-    {	CTL('P'),	h_prev		},
-    {	CTL('Q'),	ring_bell	},
-    {	CTL('R'),	h_search	},
-    {	CTL('S'),	ring_bell	},
-    {	CTL('T'),	transpose	},
-    {	CTL('U'),	ring_bell	},
-    {	CTL('V'),	quote		},
-    {	CTL('W'),	bk_kill_word	},
-    {	CTL('X'),	exchange	},
-    {	CTL('Y'),	yank		},
-    {	CTL('Z'),	end_line	},
-    {	CTL('['),	meta		},
-    {	CTL(']'),	move_to_char	},
-    {	CTL('^'),	ring_bell	},
-    {	CTL('_'),	ring_bell	},
-    {	0,		NULL		}
-};
-
-STATIC KEYMAP	MetaMap[17]= {
-    {	CTL('H'),	wipe		},
-    {	DEL,		wipe		},
-    {	' ',		mk_set		},
-    {	'.',		last_argument	},
-    {	'<',		h_first		},
-    {	'>',		h_last		},
-    {	'?',		c_possible	},
-    {	'b',		bk_word		},
-    {	'd',		fd_kill_word	},
-    {	'f',		fd_word		},
-    {	'l',		case_down_word	},
-    {	'm',		toggle_meta_mode },
-    {	'u',		case_up_word	},
-    {	'y',		yank		},
-    {	'w',		copy_region	},
-    {	0,		NULL		}
-};
-
-/*
- * $PchId: editline.c,v 1.4 1996/02/22 21:16:56 philip Exp $
- */
Index: trunk/minix/lib/editline/editline.h
===================================================================
--- trunk/minix/lib/editline/editline.h	(revision 9)
+++ 	(revision )
@@ -1,79 +1,0 @@
-/*  $Revision: 1.1.1.1 $
-**
-**  Internal header file for editline library.
-*/
-#include <stdio.h>
-#if	defined(HAVE_STDLIB)
-#include <stdlib.h>
-#include <string.h>
-#endif	/* defined(HAVE_STDLIB) */
-#if	defined(SYS_UNIX)
-#include "unix.h"
-#endif	/* defined(SYS_UNIX) */
-#if	defined(SYS_OS9)
-#include "os9.h"
-#endif	/* defined(SYS_OS9) */
-
-#if	!defined(SIZE_T)
-#define SIZE_T	unsigned int
-#endif	/* !defined(SIZE_T) */
-
-typedef unsigned char	CHAR;
-
-#if	defined(HIDE)
-#define STATIC	static
-#else
-#define STATIC	/* NULL */
-#endif	/* !defined(HIDE) */
-
-#if	!defined(CONST)
-#if	defined(__STDC__)
-#define CONST	const
-#else
-#define CONST
-#endif	/* defined(__STDC__) */
-#endif	/* !defined(CONST) */
-
-
-#define MEM_INC		64
-#define SCREEN_INC	256
-
-#define DISPOSE(p)	free((char *)(p))
-#define NEW(T, c)	\
-	((T *)malloc((unsigned int)(sizeof (T) * (c))))
-#define RENEW(p, T, c)	\
-	(p = (T *)realloc((char *)(p), (unsigned int)(sizeof (T) * (c))))
-#define COPYFROMTO(new, p, len)	\
-	(void)memcpy((char *)(new), (char *)(p), (int)(len))
-
-
-/*
-**  Variables and routines internal to this package.
-*/
-extern int	rl_eof;
-extern int	rl_erase;
-extern int	rl_intr;
-extern int	rl_kill;
-extern int	rl_quit;
-extern char	*rl_complete();
-extern int	rl_list_possib();
-extern void	rl_ttyset();
-extern void	rl_add_slash();
-
-#if	!defined(HAVE_STDLIB)
-extern char	*getenv();
-extern char	*malloc();
-extern char	*realloc();
-extern char	*memcpy();
-extern char	*strcat();
-extern char	*strchr();
-extern char	*strrchr();
-extern char	*strcpy();
-extern int	strcmp();
-extern int	strlen();
-extern int	strncmp();
-#endif	/* !defined(HAVE_STDLIB) */
-
-#if	defined(NEED_STRDUP)
-extern char	*strdup();
-#endif
Index: trunk/minix/lib/editline/sysunix.c
===================================================================
--- trunk/minix/lib/editline/sysunix.c	(revision 9)
+++ 	(revision )
@@ -1,120 +1,0 @@
-/*  $Revision: 1.1.1.1 $
-**
-**  Unix system-dependant routines for editline library.
-*/
-#include "editline.h"
-
-#if	defined(HAVE_TCGETATTR)
-#include <termios.h>
-
-void
-rl_ttyset(Reset)
-    int				Reset;
-{
-    static struct termios	old;
-    struct termios		new;
-
-    if (Reset == 0) {
-	(void)tcgetattr(0, &old);
-	rl_erase = old.c_cc[VERASE];
-	rl_kill = old.c_cc[VKILL];
-	rl_eof = old.c_cc[VEOF];
-	rl_intr = old.c_cc[VINTR];
-	rl_quit = old.c_cc[VQUIT];
-
-	new = old;
-	new.c_lflag &= ~(ECHO | ICANON | ISIG | IEXTEN);
-	new.c_iflag &= ~(ICRNL);
-	new.c_cc[VMIN] = 1;
-	new.c_cc[VTIME] = 0;
-	(void)tcsetattr(0, TCSADRAIN, &new);
-    }
-    else
-	(void)tcsetattr(0, TCSADRAIN, &old);
-}
-
-#else
-#if	defined(HAVE_TERMIO)
-#include <termio.h>
-
-void
-rl_ttyset(Reset)
-    int				Reset;
-{
-    static struct termio	old;
-    struct termio		new;
-
-    if (Reset == 0) {
-	(void)ioctl(0, TCGETA, &old);
-	rl_erase = old.c_cc[VERASE];
-	rl_kill = old.c_cc[VKILL];
-	rl_eof = old.c_cc[VEOF];
-	rl_intr = old.c_cc[VINTR];
-	rl_quit = old.c_cc[VQUIT];
-
-	new = old;
-	new.c_cc[VINTR] = -1;
-	new.c_cc[VQUIT] = -1;
-	new.c_lflag &= ~(ECHO | ICANON);
-	new.c_cc[VMIN] = 1;
-	new.c_cc[VTIME] = 0;
-	(void)ioctl(0, TCSETAW, &new);
-    }
-    else
-	(void)ioctl(0, TCSETAW, &old);
-}
-
-#else
-#include <sgtty.h>
-
-void
-rl_ttyset(Reset)
-    int				Reset;
-{
-    static struct sgttyb	old_sgttyb;
-    static struct tchars	old_tchars;
-    struct sgttyb		new_sgttyb;
-    struct tchars		new_tchars;
-
-    if (Reset == 0) {
-	(void)ioctl(0, TIOCGETP, &old_sgttyb);
-	rl_erase = old_sgttyb.sg_erase;
-	rl_kill = old_sgttyb.sg_kill;
-
-	(void)ioctl(0, TIOCGETC, &old_tchars);
-	rl_eof = old_tchars.t_eofc;
-	rl_intr = old_tchars.t_intrc;
-	rl_quit = old_tchars.t_quitc;
-
-	new_sgttyb = old_sgttyb;
-	new_sgttyb.sg_flags &= ~ECHO;
-	new_sgttyb.sg_flags |= RAW;
-	(void)ioctl(0, TIOCSETP, &new_sgttyb);
-
-	new_tchars = old_tchars;
-	new_tchars.t_intrc = -1;
-	new_tchars.t_quitc = -1;
-	(void)ioctl(0, TIOCSETC, &new_tchars);
-    }
-    else {
-	(void)ioctl(0, TIOCSETP, &old_sgttyb);
-	(void)ioctl(0, TIOCSETC, &old_tchars);
-    }
-}
-#endif	/* defined(HAVE_TERMIO) */
-#endif	/* defined(HAVE_TCGETATTR) */
-
-void
-rl_add_slash(path, p)
-    char	*path;
-    char	*p;
-{
-    struct stat	Sb;
-
-    if (stat(path, &Sb) >= 0)
-	(void)strcat(p, S_ISDIR(Sb.st_mode) ? "/" : " ");
-}
-
-/*
- * $PchId: sysunix.c,v 1.4 1996/02/22 21:16:56 philip Exp $
- */
Index: trunk/minix/lib/editline/testit.c
===================================================================
--- trunk/minix/lib/editline/testit.c	(revision 9)
+++ 	(revision )
@@ -1,68 +1,0 @@
-/*  $Revision: 1.1.1.1 $
-**
-**  A "micro-shell" to test editline library.
-**  If given any arguments, commands aren't executed.
-*/
-#include <stdio.h>
-#if	defined(HAVE_STDLIB)
-#include <stdlib.h>
-#endif	/* defined(HAVE_STDLIB) */
-
-extern char	*readline();
-extern void	add_history();
-
-#if	!defined(HAVE_STDLIB)
-extern int	chdir();
-extern int	free();
-extern int	strncmp();
-extern int	system();
-extern void	exit();
-extern char	*getenv();
-#endif	/* !defined(HAVE_STDLIB) */
-
-
-#if	defined(NEED_PERROR)
-void
-perror(s)
-    char	*s;
-{
-    extern int	errno;
-
-    (voidf)printf(stderr, "%s: error %d\n", s, errno);
-}
-#endif	/* defined(NEED_PERROR) */
-
-
-/* ARGSUSED1 */
-int
-main(ac, av)
-    int		ac;
-    char	*av[];
-{
-    char	*prompt;
-    char	*p;
-    int		doit;
-
-    doit = ac == 1;
-    if ((prompt = getenv("TESTPROMPT")) == NULL)
-	prompt = "testit>  ";
-
-    while ((p = readline(prompt)) != NULL) {
-	(void)printf("\t\t\t|%s|\n", p);
-	if (doit)
-	    if (strncmp(p, "cd ", 3) == 0) {
-		if (chdir(&p[3]) < 0)
-		    perror(&p[3]);
-	    }
-	    else if (system(p) != 0)
-		perror(p);
-	add_history(p);
-	free(p);
-    }
-    exit(0);
-    /* NOTREACHED */
-}
-
-/*
- * $PchId: testit.c,v 1.3 1996/02/22 21:18:51 philip Exp $
- */
Index: trunk/minix/lib/editline/unix.h
===================================================================
--- trunk/minix/lib/editline/unix.h	(revision 9)
+++ 	(revision )
@@ -1,26 +1,0 @@
-/*  $Revision: 1.1.1.1 $
-**
-**  Editline system header file for Unix.
-*/
-
-#define CRLF		"\r\n"
-#define FORWARD		STATIC
-
-#include <sys/types.h>
-#include <sys/stat.h>
-
-#if	defined(USE_DIRENT)
-#include <dirent.h>
-typedef struct dirent	DIRENTRY;
-#else
-#include <sys/dir.h>
-typedef struct direct	DIRENTRY;
-#endif	/* defined(USE_DIRENT) */
-
-#if	!defined(S_ISDIR)
-#define S_ISDIR(m)		(((m) & S_IFMT) == S_IFDIR)
-#endif	/* !defined(S_ISDIR) */
-
-/*
- * $PchId: unix.h,v 1.3 1996/02/22 21:18:51 philip Exp $
- */
Index: trunk/minix/lib/end/Makedepend-ack
===================================================================
--- trunk/minix/lib/end/Makedepend-ack	(revision 9)
+++ 	(revision )
@@ -1,7 +1,0 @@
-depend-ack:
-	rm .depend-ack
-	touch .depend-ack
-	mkdep 'cc  -E' edata.s | sed -e 's:^\(.\):../obj-ack//./end/\1:' >> .depend-ack
-	mkdep 'cc  -E' em_end.s | sed -e 's:^\(.\):../obj-ack//./end/\1:' >> .depend-ack
-	mkdep 'cc  -E' end.s | sed -e 's:^\(.\):../obj-ack//./end/\1:' >> .depend-ack
-	mkdep 'cc  -E' etext.s | sed -e 's:^\(.\):../obj-ack//./end/\1:' >> .depend-ack
Index: trunk/minix/lib/end/Makedepend-gnu
===================================================================
--- trunk/minix/lib/end/Makedepend-gnu	(revision 9)
+++ 	(revision )
@@ -1,7 +1,0 @@
-depend-gnu:
-	rm .depend-gnu
-	touch .depend-gnu
-	mkdep 'gcc  -E -x assembler-with-cpp -I.' edata.s | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./end/\1:' >> .depend-gnu
-	mkdep 'gcc  -E -x assembler-with-cpp -I.' em_end.s | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./end/\1:' >> .depend-gnu
-	mkdep 'gcc  -E -x assembler-with-cpp -I.' end.s | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./end/\1:' >> .depend-gnu
-	mkdep 'gcc  -E -x assembler-with-cpp -I.' etext.s | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./end/\1:' >> .depend-gnu
Index: trunk/minix/lib/end/Makefile
===================================================================
--- trunk/minix/lib/end/Makefile	(revision 9)
+++ 	(revision )
@@ -1,77 +1,0 @@
-#Generated from ./end/Makefile.in
-all: all-ack
-
-all-ack:
-all-gnu:
-
-makefiles: Makefile
-Makedepend-ack Makedepend-gnu: 
-	sh ../generate.sh ./end ../obj-ack/ ../obj-gnu
-
-Makefile: Makefile.in Makedepend-ack Makedepend-gnu
-	sh ../generate.sh ./end ../obj-ack/ ../obj-gnu
-	@echo
-	@echo *Attention*
-	@echo Makefile is regenerated... rerun command to see changes
-	@echo *Attention*
-	@echo
-
-depend: depend-ack
-all-ack: ../obj-ack//end.a
-
-../obj-ack//end.a: ../obj-ack//end.a(edata.o)
-../obj-ack//end.a: ../obj-ack//end.a(em_end.o)
-../obj-ack//end.a: ../obj-ack//end.a(end.o)
-../obj-ack//end.a: ../obj-ack//end.a(etext.o)
-
-../obj-ack//end.a:
-	ar cr ../obj-ack//end.a ../obj-ack//./end/*.o
-	rm ../obj-ack//./end/*.o
-
-../obj-ack//end.a(edata.o): edata.s
-	cc  -c -o ../obj-ack//./end/edata.o edata.s
-../obj-ack//end.a(em_end.o): em_end.s
-	cc  -c -o ../obj-ack//./end/em_end.o em_end.s
-../obj-ack//end.a(end.o): end.s
-	cc  -c -o ../obj-ack//./end/end.o end.s
-../obj-ack//end.a(etext.o): etext.s
-	cc  -c -o ../obj-ack//./end/etext.o etext.s
-
-all-gnu: ../obj-gnu/end.a
-
-../obj-gnu/end.a: ../obj-gnu/./end/edata.o
-../obj-gnu/end.a: ../obj-gnu/./end/em_end.o
-../obj-gnu/end.a: ../obj-gnu/./end/end.o
-../obj-gnu/end.a: ../obj-gnu/./end/etext.o
-
-../obj-gnu/end.a:
-	gar cr ../obj-gnu/end.a $?
-
-../obj-gnu/./end/edata.o: edata.s
-	gcc  -E -x assembler-with-cpp -I. edata.s | asmconv -mi386 ack gnu > ../obj-gnu/./end/edata.s.gnu || true
-	gas -o ../obj-gnu/./end/edata.o ../obj-gnu/./end/edata.s.gnu
-
-../obj-gnu/./end/em_end.o: em_end.s
-	gcc  -E -x assembler-with-cpp -I. em_end.s | asmconv -mi386 ack gnu > ../obj-gnu/./end/em_end.s.gnu || true
-	gas -o ../obj-gnu/./end/em_end.o ../obj-gnu/./end/em_end.s.gnu
-
-../obj-gnu/./end/end.o: end.s
-	gcc  -E -x assembler-with-cpp -I. end.s | asmconv -mi386 ack gnu > ../obj-gnu/./end/end.s.gnu || true
-	gas -o ../obj-gnu/./end/end.o ../obj-gnu/./end/end.s.gnu
-
-../obj-gnu/./end/etext.o: etext.s
-	gcc  -E -x assembler-with-cpp -I. etext.s | asmconv -mi386 ack gnu > ../obj-gnu/./end/etext.s.gnu || true
-	gas -o ../obj-gnu/./end/etext.o ../obj-gnu/./end/etext.s.gnu
-
-
-
-
-clean::
-	rm -f ../obj-ack//./end/*
-	rm -f ../obj-gnu/./end/*
-
-include Makedepend-ack
-include .depend-ack
-
-include Makedepend-gnu
-include .depend-gnu
Index: trunk/minix/lib/end/Makefile.in
===================================================================
--- trunk/minix/lib/end/Makefile.in	(revision 9)
+++ 	(revision )
@@ -1,11 +1,0 @@
-# Makefile for lib/end.
-
-LIBRARIES=end
-
-end_FILES=" \
-	edata.s \
-	em_end.s \
-	end.s \
-	etext.s"
-
-TYPE=both
Index: trunk/minix/lib/end/edata.s
===================================================================
--- trunk/minix/lib/end/edata.s	(revision 9)
+++ 	(revision )
@@ -1,7 +1,0 @@
-#
-.sect .text
-.sect .rom
-.sect .data
-.align _EM_WSIZE
-.define _edata
-_edata:
Index: trunk/minix/lib/end/em_end.s
===================================================================
--- trunk/minix/lib/end/em_end.s	(revision 9)
+++ 	(revision )
@@ -1,21 +1,0 @@
-#
-.sect .text
-.align _EM_WSIZE
-.define __etext, endtext
-__etext:
-endtext:
-.sect .rom
-.align _EM_WSIZE
-.define endrom
-endrom:
-.sect .data
-.align _EM_WSIZE
-.define __edata, enddata
-__edata:
-enddata:
-.sect .bss
-.align _EM_WSIZE
-.sect .end	! only for declaration of _end, __end or endbss.
-.define __end, endbss
-__end:
-endbss:
Index: trunk/minix/lib/end/end.s
===================================================================
--- trunk/minix/lib/end/end.s	(revision 9)
+++ 	(revision )
@@ -1,7 +1,0 @@
-.sect .text
-.sect .rom
-.sect .data
-.sect .bss
-.sect .end	! only for declaration of _end, __end or endbss.
-.define _end
-_end:
Index: trunk/minix/lib/end/etext.s
===================================================================
--- trunk/minix/lib/end/etext.s	(revision 9)
+++ 	(revision )
@@ -1,5 +1,0 @@
-#
-.sect .text
-.align _EM_WSIZE
-.define _etext
-_etext:
Index: trunk/minix/lib/float/FP.compile
===================================================================
--- trunk/minix/lib/float/FP.compile	(revision 9)
+++ 	(revision )
@@ -1,20 +1,0 @@
-#!/bin/sh
-#							Author: Kees J. Bot
-# Compile one soft FP source file.
-# (These files shouldn't be optimized normally, but the 16-bit C compiler
-# only optimizes scratch register allocation a bit with -O.  To the 32-bit
-# compiler -O is a no-op.)
-
-case $#:$1 in
-1:*.c)	;;
-*)	echo "$0: $1: not a C file" >&2; exit 1
-esac
-
-base="`basename "$1" .c`"
-trap 'rm -f tmp.s "$base.s"; exit 1' 2
-
-cc -O -I. -D_MINIX -D_POSIX_SOURCE -S "$1" &&
-mv "$base.s" tmp.s &&
-sed -f FP.script tmp.s > "$base.s" &&
-cc -c "$base.s" &&
-rm tmp.s "$base.s"
Index: trunk/minix/lib/float/FP.script
===================================================================
--- trunk/minix/lib/float/FP.script	(revision 9)
+++ 	(revision )
@@ -1,39 +1,0 @@
-s/_adf4/.adf4/
-s/_adf8/.adf8/
-s/_cff4/.cff4/
-s/_cff8/.cff8/
-s/_cfi/.cfi/
-s/_cfu/.cfu/
-s/_cif4/.cif4/
-s/_cif8/.cif8/
-s/_cmf4/.cmf4/
-s/_cmf8/.cmf8/
-s/_cuf4/.cuf4/
-s/_cuf8/.cuf8/
-s/_dvf4/.dvf4/
-s/_dvf8/.dvf8/
-s/_fef4/.fef4/
-s/_fef8/.fef8/
-s/_fif4/.fif4/
-s/_fif8/.fif8/
-s/_mlf4/.mlf4/
-s/_mlf8/.mlf8/
-s/_ngf4/.ngf4/
-s/_ngf8/.ngf8/
-s/_sbf4/.sbf4/
-s/_sbf8/.sbf8/
-s/_zrf4/.zrf4/
-s/_zrf8/.zrf8/
-s/_add_ext/.add_ext/
-s/_div_ext/.div_ext/
-s/_mul_ext/.mul_ext/
-s/_nrm_ext/.nrm_ext/
-s/_sft_ext/.sft_ext/
-s/_sub_ext/.sub_ext/
-s/_zrf_ext/.zrf_ext/
-s/_compact/.compact/
-s/_extend/.extend/
-s/_b64_add/.b64_add/
-s/_b64_sft/.b64_sft/
-s/_b64_rsft/.b64_rsft/
-s/_b64_lsft/.b64_lsft/
Index: trunk/minix/lib/float/FP_bias.h
===================================================================
--- trunk/minix/lib/float/FP_bias.h	(revision 9)
+++ 	(revision )
@@ -1,28 +1,0 @@
-/*
-  (c) copyright 1988 by the Vrije Universiteit, Amsterdam, The Netherlands.
-  See the copyright notice in the ACK home directory, in the file "Copyright".
-*/
-
-/* $Header: /cvsup/minix/src/lib/float/FP_bias.h,v 1.1.1.1 2005/04/21 14:56:10 beng Exp $ */
-
-/*
-	include file for floating point package
-*/
-
-		/*	FLOAT FORMAT EXPONENT BIAS	*/
-
-#define	SGL_BIAS	 127	/* excess  128 notation used	*/
-#define	DBL_BIAS	1023	/* excess 1024 notation used	*/
-#define	EXT_BIAS	   0	/* 2s-complement notation used	*/
-				/* this is possible because the	*/
-				/* sign is in a seperate word	*/
-		
-		/*	VARIOUS MAX AND MIN VALUES	*/
-		/*	1) FOR THE DIFFERENT FORMATS	*/
-
-#define	SGL_MAX		   254	/*	standard definition	*/
-#define	SGL_MIN		     1	/*	standard definition	*/
-#define	DBL_MAX		  2046	/*	standard definition	*/
-#define	DBL_MIN		     1	/*	standard definition	*/
-#define EXT_MAX		 16383	/*	standard minimum	*/
-#define EXT_MIN		-16382	/*	standard minimum	*/
Index: trunk/minix/lib/float/FP_shift.h
===================================================================
--- trunk/minix/lib/float/FP_shift.h	(revision 9)
+++ 	(revision )
@@ -1,49 +1,0 @@
-/*
-  (c) copyright 1988 by the Vrije Universiteit, Amsterdam, The Netherlands.
-  See the copyright notice in the ACK home directory, in the file "Copyright".
-*/
-
-/* $Header: /cvsup/minix/src/lib/float/FP_shift.h,v 1.1.1.1 2005/04/21 14:56:10 beng Exp $ */
-
-/*
-	include file for floating point package
-*/
-
-# define	CARRYBIT	0x80000000L
-# define	NORMBIT		0x80000000L
-# define	EXP_STORE	16
-
-
-				/* parameters for Single Precision */
-#define SGL_EXPSHIFT	7
-#define SGL_M1LEFT	8
-#define SGL_ZERO	0xffffff80L
-#define SGL_EXACT	0xff
-#define SGL_RUNPACK	SGL_M1LEFT
-
-#define SGL_ROUNDUP	0x80
-#define	SGL_CARRYOUT	0x01000000L
-#define	SGL_MASK	0x007fffffL
-
-				/* parameters for Double Precision */
-				/* used in extend.c */
-
-#define DBL_EXPSHIFT	4
-
-#define DBL_M1LEFT	11
-
-#define	DBL_RPACK	(32-DBL_M1LEFT)
-#define	DBL_LPACK	DBL_M1LEFT
-
-				/* used in compact.c */
-
-#define DBL_ZERO	0xfffffd00L
-
-#define DBL_EXACT	0x7ff
-
-#define DBL_RUNPACK	DBL_M1LEFT
-#define DBL_LUNPACK	(32-DBL_RUNPACK)
-
-#define DBL_ROUNDUP	0x400
-#define	DBL_CARRYOUT	0x00200000L
-#define	DBL_MASK	0x000fffffL
Index: trunk/minix/lib/float/FP_trap.h
===================================================================
--- trunk/minix/lib/float/FP_trap.h	(revision 9)
+++ 	(revision )
@@ -1,22 +1,0 @@
-/*
-  (c) copyright 1988 by the Vrije Universiteit, Amsterdam, The Netherlands.
-  See the copyright notice in the ACK home directory, in the file "Copyright".
-*/
-
-/* $Header: /cvsup/minix/src/lib/float/FP_trap.h,v 1.1.1.1 2005/04/21 14:56:10 beng Exp $ */
-
-/*
-	include file for floating point package
-*/
-
-			/*	EM TRAPS	*/
-
-#define	EIOVFL	3	/* Integer  Overflow		*/
-#define	EFOVFL	4	/* Floating Overflow		*/
-#define	EFUNFL	5	/* Floating Underflow		*/
-#define	EIDIVZ	6	/* Integer  Divide by 0		*/
-#define	EFDIVZ	7	/* Floating Divide by 0.0	*/
-#define	EIUND	8	/* Integer  Undefined Number	*/
-#define	EFUND	9	/* Floating Undefined Number	*/
-#define	ECONV	10	/* Conversion Error		*/
-# define trap(x) _fptrp(x)
Index: trunk/minix/lib/float/FP_types.h
===================================================================
--- trunk/minix/lib/float/FP_types.h	(revision 9)
+++ 	(revision )
@@ -1,113 +1,0 @@
-/*
-  (c) copyright 1988 by the Vrije Universiteit, Amsterdam, The Netherlands.
-  See the copyright notice in the ACK home directory, in the file "Copyright".
-*/
-
-/* $Header: /cvsup/minix/src/lib/float/FP_types.h,v 1.1.1.1 2005/04/21 14:56:10 beng Exp $ */
-
-/********************************************************/
-/*
-	Type definitions for C Floating Point Package
-	include file for floating point package
-*/
-/********************************************************/
-/*
-	THESE STRUCTURES ARE USED TO ADDRESS THE INDIVIDUAL
-	PARTS OF THE FLOATING POINT NUMBER REPRESENTATIONS.
-
-	THREE STRUCTURES ARE DEFINED:
-		SINGLE:	single precision floating format
-		DOUBLE:	double precision floating format
-		EXTEND:	double precision extended format
-*/
-/********************************************************/
-
-#ifndef __FPTYPES
-#define __FPTYPES
-
-typedef	struct	{
-	unsigned long	h_32;	/* higher 32 bits of 64 */
-	unsigned long	l_32;	/* lower  32 bits of 64 */
-}	B64;
-
-typedef	unsigned long	SINGLE;
-
-typedef	struct	{
-	unsigned long	d[2];
-}	DOUBLE;
-
-typedef	struct	{	/* expanded float format	*/
-	short	sign;
-	short	exp;
-	B64	mantissa;
-#define m1 mantissa.h_32
-#define m2 mantissa.l_32
-} EXTEND;
-
-struct	fef4_returns {
-	int	e;
-	SINGLE	f;
-};
-
-struct	fef8_returns {
-	int	e;
-	DOUBLE	f;
-};
-
-struct fif4_returns {
-	SINGLE ipart;
-	SINGLE fpart;
-};
-
-struct fif8_returns {
-	DOUBLE ipart;
-	DOUBLE fpart;
-};
-
-#if __STDC__
-#define _PROTOTYPE(function, params)	function params
-#else
-#define _PROTOTYPE(function, params)	function()
-#endif
-_PROTOTYPE( void add_ext, (EXTEND *e1, EXTEND *e2));
-_PROTOTYPE( void mul_ext, (EXTEND *e1, EXTEND *e2));
-_PROTOTYPE( void div_ext, (EXTEND *e1, EXTEND *e2));
-_PROTOTYPE( void sub_ext, (EXTEND *e1, EXTEND *e2));
-_PROTOTYPE( void sft_ext, (EXTEND *e1, EXTEND *e2));
-_PROTOTYPE( void nrm_ext, (EXTEND *e1));
-_PROTOTYPE( void zrf_ext, (EXTEND *e1));
-_PROTOTYPE( void extend, (unsigned long *from, EXTEND *to, int size));
-_PROTOTYPE( void compact, (EXTEND *from, unsigned long *to, int size));
-_PROTOTYPE( void _fptrp, (int));
-_PROTOTYPE( void adf4, (SINGLE s2, SINGLE s1));
-_PROTOTYPE( void adf8, (DOUBLE s2, DOUBLE s1));
-_PROTOTYPE( void sbf4, (SINGLE s2, SINGLE s1));
-_PROTOTYPE( void sbf8, (DOUBLE s2, DOUBLE s1));
-_PROTOTYPE( void dvf4, (SINGLE s2, SINGLE s1));
-_PROTOTYPE( void dvf8, (DOUBLE s2, DOUBLE s1));
-_PROTOTYPE( void mlf4, (SINGLE s2, SINGLE s1));
-_PROTOTYPE( void mlf8, (DOUBLE s2, DOUBLE s1));
-_PROTOTYPE( void ngf4, (SINGLE f));
-_PROTOTYPE( void ngf8, (DOUBLE f));
-_PROTOTYPE( void zrf4, (SINGLE *l));
-_PROTOTYPE( void zrf8, (DOUBLE *z));
-_PROTOTYPE( void cff4, (DOUBLE src));
-_PROTOTYPE( void cff8, (SINGLE src));
-_PROTOTYPE( void cif4, (int ss, long src));
-_PROTOTYPE( void cif8, (int ss, long src));
-_PROTOTYPE( void cuf4, (int ss, long src));
-_PROTOTYPE( void cuf8, (int ss, long src));
-_PROTOTYPE( long cfu, (int ds, int ss, DOUBLE src));
-_PROTOTYPE( long cfi, (int ds, int ss, DOUBLE src));
-_PROTOTYPE( int cmf4, (SINGLE s2, SINGLE s1));
-_PROTOTYPE( int cmf8, (DOUBLE d1, DOUBLE d2));
-_PROTOTYPE( void fef4, (struct fef4_returns *r, SINGLE s1));
-_PROTOTYPE( void fef8, (struct fef8_returns *r, DOUBLE s1));
-_PROTOTYPE( void fif4, (struct fif4_returns *p, SINGLE x, SINGLE y));
-_PROTOTYPE( void fif8, (struct fif8_returns *p, DOUBLE x, DOUBLE y));
-
-_PROTOTYPE( void b64_sft, (B64 *, int));
-_PROTOTYPE( void b64_lsft, (B64 *));
-_PROTOTYPE( void b64_rsft, (B64 *));
-_PROTOTYPE( int b64_add, (B64 *, B64 *));
-#endif
Index: trunk/minix/lib/float/add_ext.c
===================================================================
--- trunk/minix/lib/float/add_ext.c	(revision 9)
+++ 	(revision )
@@ -1,56 +1,0 @@
-/*
-  (c) copyright 1988 by the Vrije Universiteit, Amsterdam, The Netherlands.
-  See the copyright notice in the ACK home directory, in the file "Copyright".
-*/
-
-/* $Header: /cvsup/minix/src/lib/float/add_ext.c,v 1.1.1.1 2005/04/21 14:56:10 beng Exp $ */
-
-/*
-	ADD TWO EXTENDED FORMAT NUMBERS
-*/
-
-#include "FP_types.h"
-
-void
-add_ext(e1,e2)
-register EXTEND	*e1,*e2;
-{
-	if ((e2->m1 | e2->m2) == 0L) {
-		return;
-	}
-	if ((e1->m1 | e1->m2) == 0L) {
-		*e1 = *e2;
-		return;
-	}
-	sft_ext(e1, e2);	/* adjust mantissas to equal powers */
-	if (e1->sign != e2->sign) {
-		/* e1 + e2 = e1 - (-e2) */
-		if (e2->m1 > e1->m1 ||
-                    (e2->m1 == e1->m1 && e2->m2 > e1->m2)) {
-                	/*      abs(e2) > abs(e1) */
-			EXTEND x;
-
-			x = *e1;
-			*e1 = *e2;
-                	if (x.m2 > e1->m2) {
-                        	e1->m1 -= 1;    /* carry in */
-                	}
-                	e1->m1 -= x.m1;
-                	e1->m2 -= x.m2;
-        	}
-        	else {
-                	if (e2->m2 > e1->m2)
-                        	e1->m1 -= 1;    /* carry in */
-                	e1->m1 -= e2->m1;
-                	e1->m2 -= e2->m2;
-        	}
-	}
-	else {
-		if (b64_add(&e1->mantissa,&e2->mantissa)) {	/* addition carry */
-			b64_rsft(&e1->mantissa);	/* shift mantissa one bit RIGHT */
-			e1->m1 |= 0x80000000L;	/* set max bit	*/
-			e1->exp++;		/* increase the exponent */
-		}
-	}
-	nrm_ext(e1);
-}
Index: trunk/minix/lib/float/adder.c
===================================================================
--- trunk/minix/lib/float/adder.c	(revision 9)
+++ 	(revision )
@@ -1,50 +1,0 @@
-/*
-  (c) copyright 1988 by the Vrije Universiteit, Amsterdam, The Netherlands.
-  See the copyright notice in the ACK home directory, in the file "Copyright".
-*/
-
-/* $Header: /cvsup/minix/src/lib/float/adder.c,v 1.1.1.1 2005/04/21 14:56:10 beng Exp $ */
-
-/*
- *	these are the routines the routines to do 32 and  64-bit addition
- */
-
-# ifdef	EXT_DEBUG
-# include <stdio.h>
-# endif
-
-# include "FP_types.h"
-# define	UNKNOWN -1
-# define	TRUE	 1
-# define	FALSE	 0
-# define	MAXBIT	0x80000000L
-
-	/*
-	 *	add 64 bits
-	 */
-int
-b64_add(e1,e2)
-		/*
-		 * pointers to 64 bit 'registers'
-		 */
-register	B64	*e1,*e2;
-{
-		register	int	overflow;
-				int	carry;
-
-			/* add higher pair of 32 bits */
-	overflow = ((unsigned long) 0xFFFFFFFF - e1->h_32 < e2->h_32);
-	e1->h_32 += e2->h_32;
-
-			/* add lower pair of 32 bits */
-	carry = ((unsigned long) 0xFFFFFFFF - e1->l_32 < e2->l_32);
-	e1->l_32 += e2->l_32;
-# ifdef	EXT_DEBUG
-	printf("\t\t\t\t\tb64_add: overflow (%d); internal carry(%d)\n",
-					overflow,carry);
-	fflush(stdout);
-# endif
-	if ((carry) && (++e1->h_32 == 0))
-		return(TRUE);		/* had a 64 bit overflow */
-	return(overflow);		/* return status from higher add */
-}
Index: trunk/minix/lib/float/adder.h
===================================================================
--- trunk/minix/lib/float/adder.h	(revision 9)
+++ 	(revision )
@@ -1,15 +1,0 @@
-/*
-  (c) copyright 1988 by the Vrije Universiteit, Amsterdam, The Netherlands.
-  See the copyright notice in the ACK home directory, in the file "Copyright".
-*/
-
-/* $Header: /cvsup/minix/src/lib/float/adder.h,v 1.1.1.1 2005/04/21 14:56:10 beng Exp $ */
-
-/*
- *	include file for 32 & 64 bit addition
- */
-
-typedef	struct	B64 {
-	unsigned long	h_32;	/* higher 32 bits of 64 */
-	unsigned long	l_32;	/* lower  32 bits of 64 */
-}	B64;
Index: trunk/minix/lib/float/adf4.c
===================================================================
--- trunk/minix/lib/float/adf4.c	(revision 9)
+++ 	(revision )
@@ -1,32 +1,0 @@
-/*
-  (c) copyright 1988 by the Vrije Universiteit, Amsterdam, The Netherlands.
-  See the copyright notice in the ACK home directory, in the file "Copyright".
-*/
-
-/* $Header: /cvsup/minix/src/lib/float/adf4.c,v 1.1.1.1 2005/04/21 14:56:10 beng Exp $ */
-
-/*
-	ADD TWO FLOATS - SINGLE (ADF 4)
-*/
-
-#include	"FP_types.h"
-
-void
-adf4(s2,s1)
-SINGLE	s1,s2;
-{
-	EXTEND	e1,e2;
-	int	swap = 0;
-
-	if (s1 == (SINGLE) 0) {
-		s1 = s2;
-		return;
-	}
-	if (s2 == (SINGLE) 0) {
-		return;
-	}
-	extend(&s1,&e1,sizeof(SINGLE));
-	extend(&s2,&e2,sizeof(SINGLE));
-	add_ext(&e1,&e2);
-	compact(&e1,&s1,sizeof(SINGLE));
-}
Index: trunk/minix/lib/float/adf8.c
===================================================================
--- trunk/minix/lib/float/adf8.c	(revision 9)
+++ 	(revision )
@@ -1,32 +1,0 @@
-/*
-  (c) copyright 1988 by the Vrije Universiteit, Amsterdam, The Netherlands.
-  See the copyright notice in the ACK home directory, in the file "Copyright".
-*/
-
-/* $Header: /cvsup/minix/src/lib/float/adf8.c,v 1.1.1.1 2005/04/21 14:56:10 beng Exp $ */
-
-/*
-	ADD TWO FLOATS - DOUBLE (ADF 8)
-*/
-
-#include	"FP_types.h"
-
-void
-adf8(s2,s1)
-DOUBLE	s1,s2;
-{
-	EXTEND	e1,e2;
-
-	if (s1.d[0] == 0 && s1.d[1] == 0) {
-		s1 = s2;
-		return;
-	}
-	if (s2.d[0] == 0 && s2.d[1] == 0) {
-		return;
-	}
-
-	extend(&s1.d[0],&e1,sizeof(DOUBLE));
-	extend(&s2.d[0],&e2,sizeof(DOUBLE));
-	add_ext(&e1,&e2);
-	compact(&e1,&s1.d[0],sizeof(DOUBLE));
-}
Index: trunk/minix/lib/float/byte_order.h
===================================================================
--- trunk/minix/lib/float/byte_order.h	(revision 9)
+++ 	(revision )
@@ -1,6 +1,0 @@
-#define CHAR_UNSIGNED	0
-#define MSB_AT_LOW_ADDRESS	0
-#define MSW_AT_LOW_ADDRESS	0
-#define FL_MSB_AT_LOW_ADDRESS	0
-#define FL_MSW_AT_LOW_ADDRESS	0
-#define FL_MSL_AT_LOW_ADDRESS	0
Index: trunk/minix/lib/float/cff4.c
===================================================================
--- trunk/minix/lib/float/cff4.c	(revision 9)
+++ 	(revision )
@@ -1,28 +1,0 @@
-/*
-  (c) copyright 1988 by the Vrije Universiteit, Amsterdam, The Netherlands.
-  See the copyright notice in the ACK home directory, in the file "Copyright".
-*/
-
-/* $Header: /cvsup/minix/src/lib/float/cff4.c,v 1.1.1.1 2005/04/21 14:56:10 beng Exp $ */
-
-/*
-		CONVERT DOUBLE TO SINGLE (CFF 8 4)
-
-	This routine works quite simply. A floating point
-	of size 08 is converted to extended format.
-	This extended variable is converted back to
-	a floating point of size 04.
-
-*/
-
-#include	"FP_types.h"
-
-void
-cff4(src)
-DOUBLE	src;	/* the source itself -	THIS TIME it's DOUBLE */
-{
-	EXTEND	buf;
-
-	extend(&src.d[0],&buf,sizeof(DOUBLE));	/* no matter what */
-	compact(&buf,&(src.d[1]),sizeof(SINGLE));
-}
Index: trunk/minix/lib/float/cff8.c
===================================================================
--- trunk/minix/lib/float/cff8.c	(revision 9)
+++ 	(revision )
@@ -1,28 +1,0 @@
-/*
-  (c) copyright 1988 by the Vrije Universiteit, Amsterdam, The Netherlands.
-  See the copyright notice in the ACK home directory, in the file "Copyright".
-*/
-
-/* $Header: /cvsup/minix/src/lib/float/cff8.c,v 1.1.1.1 2005/04/21 14:56:10 beng Exp $ */
-
-/*
-		CONVERT SINGLE TO DOUBLE (CFF 4 8)
-
-	This routine works quite simply. A floating point
-	of size 04 is converted to extended format.
-	This extended variable is converted back to
-	a floating point of size 08.
-
-*/
-
-#include "FP_types.h"
-
-void
-cff8(src)
-SINGLE	src;
-{
-	EXTEND	buf;
-
-	extend(&src,&buf,sizeof(SINGLE));	/* no matter what */
-	compact(&buf, &src,sizeof(DOUBLE));
-}
Index: trunk/minix/lib/float/cfi.c
===================================================================
--- trunk/minix/lib/float/cfi.c	(revision 9)
+++ 	(revision )
@@ -1,52 +1,0 @@
-/*
-  (c) copyright 1988 by the Vrije Universiteit, Amsterdam, The Netherlands.
-  See the copyright notice in the ACK home directory, in the file "Copyright".
-*/
-
-/* $Header: /cvsup/minix/src/lib/float/cfi.c,v 1.1.1.1 2005/04/21 14:56:10 beng Exp $ */
-
-/*
-		CONVERT FLOAT TO SIGNED (CFI m n)
-
-		N.B. The caller must know what it is getting.
-		     A LONG is always returned. If it is an
-		     integer the high byte is cleared first.
-*/
-
-#include "FP_trap.h"
-#include "FP_types.h"
-#include "FP_shift.h"
-
-long
-cfi(ds,ss,src)
-int	ds;	/* destination size (2 or 4) */
-int	ss;	/* source size	    (4 or 8) */
-DOUBLE	src;	/* assume worst case */
-{
-	EXTEND	buf;
-	long	new;
-	short	max_exp;
-
-	extend(&src.d[0],&buf,ss);	/* get extended format */
-	if (buf.exp < 0) {	/* no conversion needed */
-		src.d[ss == 8] = 0L;
-		return(0L);
-	}
-	max_exp = (ds << 3) - 2;	/* signed numbers */
-				/* have more limited max_exp */
-	if (buf.exp > max_exp) {
-		if (buf.exp == max_exp+1 && buf.sign && buf.m1 == NORMBIT &&
-		    buf.m2 == 0L) {
-		}
-		else {
-			trap(EIOVFL);	/* integer overflow	*/
-			buf.exp %= max_exp; /* truncate	*/
-		}
-	}
-	new = buf.m1 >> (31-buf.exp);
-	if (buf.sign)
-		new = -new;
-done:
-	src.d[ss == 8] = new;
-	return(new);
-}
Index: trunk/minix/lib/float/cfu.c
===================================================================
--- trunk/minix/lib/float/cfu.c	(revision 9)
+++ 	(revision )
@@ -1,43 +1,0 @@
-/*
-  (c) copyright 1988 by the Vrije Universiteit, Amsterdam, The Netherlands.
-  See the copyright notice in the ACK home directory, in the file "Copyright".
-*/
-
-/* $Header: /cvsup/minix/src/lib/float/cfu.c,v 1.1.1.1 2005/04/21 14:56:10 beng Exp $ */
-
-/*
-		CONVERT FLOAT TO UNSIGNED (CFU m n)
-
-		N.B. The caller must know what it is getting.
-		     A LONG is always returned. If it is an
-		     integer the high byte is cleared first.
-*/
-
-#include "FP_trap.h"
-#include "FP_types.h"
-
-long
-cfu(ds,ss,src)
-int	ds;	/* destination size (2 or 4) */
-int	ss;	/* source size	    (4 or 8) */
-DOUBLE	src;	/* assume worst case */
-{
-	EXTEND	buf;
-	long	new;
-	short	newint, max_exp;
-
-	extend(&src.d[0],&buf,ss);	/* get extended format	*/
-	if (buf.exp < 0) {	/* no conversion needed	*/
-		src.d[ss == 8] = 0L;
-		return(0L);
-	}
-	max_exp = (ds << 3) - 1;
-	if (buf.exp > max_exp) {
-		trap(EIOVFL);	/* integer overflow	*/
-		buf.exp %= max_exp;
-	}
-	new = buf.m1 >> (31-buf.exp);
-done:
-	src.d[ss == 8] = new;
-	return(new);
-}
Index: trunk/minix/lib/float/cif4.c
===================================================================
--- trunk/minix/lib/float/cif4.c	(revision 9)
+++ 	(revision )
@@ -1,56 +1,0 @@
-/*
-  (c) copyright 1988 by the Vrije Universiteit, Amsterdam, The Netherlands.
-  See the copyright notice in the ACK home directory, in the file "Copyright".
-*/
-
-/* $Header: /cvsup/minix/src/lib/float/cif4.c,v 1.1.1.1 2005/04/21 14:56:10 beng Exp $ */
-
-/*
-	CONVERT INTEGER TO SINGLE (CIF n 4)
-
-	THIS ROUTINE WORKS BY FILLING AN EXTENDED
-	WITH THE INTEGER VALUE IN EXTENDED FORMAT
-	AND USES COMPACT() TO PUT IT INTO THE PROPER
-	FLOATING POINT PRECISION.
-*/
-
-#include "FP_types.h"
-
-void
-cif4(ss,src)
-int	ss;	/* source size */
-long	src;	/* largest possible integer to convert */
-{
-	EXTEND	buf;
-	short	*ipt;
-	long	i_src;
-	SINGLE	*result;
-
-	zrf_ext(&buf);
-	if (ss == sizeof(long))	{
-		buf.exp = 31;
-		i_src = src;
-		result = (SINGLE *) &src;
-	}
-	else	{
-		ipt = (short *) &src;
-		i_src = (long) *ipt;
-		buf.exp = 15;
-		result = (SINGLE *) &ss;
-	}
-	if (i_src == 0)	{
-		*result = (SINGLE) 0L;
-		return;
-	}
-			/* ESTABLISHED THAT src != 0	*/
-			/* adjust exponent field	*/
-	buf.sign = (i_src < 0) ? 0x8000 : 0;
-			/* clear sign bit of integer	*/
-			/* move to mantissa field	*/
-	buf.m1 = (i_src < 0) ? -i_src : i_src;
-			/* adjust mantissa field	*/
-	if (ss != sizeof(long))
-		buf.m1 <<= 16;
-	nrm_ext(&buf);		/* adjust mantissa field	*/
-	compact(&buf, result,sizeof(SINGLE));	/* put on stack */
-}
Index: trunk/minix/lib/float/cif8.c
===================================================================
--- trunk/minix/lib/float/cif8.c	(revision 9)
+++ 	(revision )
@@ -1,55 +1,0 @@
-/*
-  (c) copyright 1988 by the Vrije Universiteit, Amsterdam, The Netherlands.
-  See the copyright notice in the ACK home directory, in the file "Copyright".
-*/
-
-/* $Header: /cvsup/minix/src/lib/float/cif8.c,v 1.1.1.1 2005/04/21 14:56:10 beng Exp $ */
-
-/*
-	CONVERT INTEGER TO FLOAT (CIF n 8)
-
-	THIS ROUTINE WORKS BY FILLING AN EXTENDED
-	WITH THE INTEGER VALUE IN EXTENDED FORMAT
-	AND USES COMPACT() TO PUT IT INTO THE PROPER
-	FLOATING POINT PRECISION.
-*/
-
-#include "FP_types.h"
-
-void
-cif8(ss,src)
-int	ss;	/* source size */
-long	src;	/* largest possible integer to convert */
-{
-	EXTEND	buf;
-	DOUBLE	*result;	/* for return value */
-	short	*ipt;
-	long	i_src;
-
-	result = (DOUBLE *) ((void *) &ss);	/* always */
-	zrf_ext(&buf);
-	if (ss == sizeof(long))	{
-		buf.exp = 31;
-		i_src = src;
-	}
-	else	{
-		ipt = (short *) &src;
-		i_src = (long) *ipt;
-		buf.exp = 15;
-	}
-	if (i_src == 0)	{
-		zrf8(result);
-		return;
-	}
-			/* ESTABLISHED THAT src != 0	*/
-			/* adjust exponent field	*/
-	buf.sign = (i_src < 0) ? 0x8000 : 0;
-			/* clear sign bit of integer	*/
-			/* move to mantissa field	*/
-	buf.m1 = (i_src < 0) ? -i_src : i_src;
-			/* adjust mantissa field	*/
-	if (ss != sizeof(long))
-		buf.m1 <<= 16;
-	nrm_ext(&buf);
-	compact(&buf,&result->d[0],8);
-}
Index: trunk/minix/lib/float/cmf4.c
===================================================================
--- trunk/minix/lib/float/cmf4.c	(revision 9)
+++ 	(revision )
@@ -1,40 +1,0 @@
-/*
-  (c) copyright 1988 by the Vrije Universiteit, Amsterdam, The Netherlands.
-  See the copyright notice in the ACK home directory, in the file "Copyright".
-*/
-
-/* $Header: /cvsup/minix/src/lib/float/cmf4.c,v 1.1.1.1 2005/04/21 14:56:10 beng Exp $ */
-
-/*
-	COMPARE	SINGLES (CMF 4)
-*/
-
-#include	"FP_types.h"
-#include	"get_put.h"
-
-int
-cmf4(f1,f2)
-SINGLE	f1,f2;
-{
-		/*
-		 * return ((f1 < f2) ? 1 : (f1 - f2))
-		 */
-#define SIGN(x) (((x) < 0) ? -1 : 1)
-        int	sign1,sign2;
-	long	l1,l2;
-
-	l1 = get4((char *) &f1);
-	l2 = get4((char *) &f2);
-
-	if (l1 == l2) return 0;
-
-        sign1 = SIGN(l1);
-        sign2 = SIGN(l2);
-        if (sign1 != sign2) {
-		if ((l1 & 0x7fffffff) == 0 &&
-		    (l2 & 0x7fffffff) == 0) return 0;
-                return ((sign1 > 0) ? -1 : 1);
-	}
-
-	return (sign1 * ((l1 < l2) ? 1 : -1));
-}
Index: trunk/minix/lib/float/cmf8.c
===================================================================
--- trunk/minix/lib/float/cmf8.c	(revision 9)
+++ 	(revision )
@@ -1,61 +1,0 @@
-/*
-  (c) copyright 1988 by the Vrije Universiteit, Amsterdam, The Netherlands.
-  See the copyright notice in the ACK home directory, in the file "Copyright".
-*/
-
-/* $Header: /cvsup/minix/src/lib/float/cmf8.c,v 1.1.1.1 2005/04/21 14:56:10 beng Exp $ */
-
-/*
-	COMPARE	DOUBLES (CMF 8)
-*/
-
-#include	"FP_types.h"
-#include	"get_put.h"
-
-int
-cmf8(d1,d2)
-DOUBLE	d1,d2;
-{
-#define	SIGN(x)	(((x) < 0) ? -1 : 1)
-		/*
-		 * return ((d1 < d2) ? 1 : (d1 > d2) ? -1 : 0))
-		 */
-	long	l1,l2;
-	int	sign1,sign2;
-	int	rv;
-
-#if FL_MSL_AT_LOW_ADDRESS
-	l1 = get4((char *)&d1);
-	l2 = get4((char *)&d2);
-#else
-	l1 = get4(((char *)&d1+4));
-	l2 = get4(((char *)&d2+4));
-#endif
-	sign1 = SIGN(l1);
-	sign2 = SIGN(l2);
-	if (sign1 != sign2) {
-		l1 &= 0x7fffffff;
-		l2 &= 0x7fffffff;
-		if (l1 != 0 || l2 != 0) {
-			return ((sign1 > 0) ? -1 : 1);
-		}
-	}
-	if (l1 != l2)	{	/* we can decide here */
-		rv = l1 < l2 ? 1 : -1;
-	}
-	else	{ 		/* decide in 2nd half */
-		unsigned long u1, u2;
-#if FL_MSL_AT_LOW_ADDRESS
-		u1 = get4(((char *)&d1 + 4));
-		u2 = get4(((char *)&d2 + 4));
-#else
-		u1 = get4((char *)&d1);
-		u2 = get4((char *)&d2);
-#endif
-		if (u1 == u2)
-			return(0);
-		if (u1 < u2) rv = 1;
-		else rv = -1;
-	}
-	return sign1 * rv;
-}
Index: trunk/minix/lib/float/compact.c
===================================================================
--- trunk/minix/lib/float/compact.c	(revision 9)
+++ 	(revision )
@@ -1,202 +1,0 @@
-/*
-  (c) copyright 1988 by the Vrije Universiteit, Amsterdam, The Netherlands.
-  See the copyright notice in the ACK home directory, in the file "Copyright".
-*/
-
-/* $Header: /cvsup/minix/src/lib/float/compact.c,v 1.1.1.1 2005/04/21 14:56:10 beng Exp $ */
-
-/*
-	COMPACT EXTEND FORMAT INTO FLOAT OF PROPER SIZE
-*/
-
-# include "FP_bias.h"
-# include "FP_shift.h"
-# include "FP_trap.h"
-# include "FP_types.h"
-# include "get_put.h"
-
-void
-compact(f,to,size)
-EXTEND	*f;
-unsigned long	*to;
-int	size;
-{
-	int	error = 0;
-
-	if (size == sizeof(DOUBLE)) {
-	/*
-	 * COMPACT EXTENDED INTO DOUBLE
-	 */
-		DOUBLE *DBL = (DOUBLE *) (void *) to;
-
-		if ((f->m1|(f->m2 & DBL_ZERO)) == 0L)	{
-			zrf8(DBL);
-			return;
-		}
-		f->exp += DBL_BIAS;	/* restore proper bias	*/
-		if (f->exp > DBL_MAX)	{
-dbl_over:			trap(EFOVFL);
-			f->exp = DBL_MAX+1;
-			f->m1 = 0;
-			f->m2 = 0;
-			if (error++)
-				return;
-		}
-		else if (f->exp < DBL_MIN)	{
-			b64_rsft(&(f->mantissa));
-			if (f->exp < 0) {
-				b64_sft(&(f->mantissa), -f->exp);
-				f->exp = 0;
-			}
-			/* underflow ??? */
-		}
-			
-		/* local CAST conversion		*/
-
-		/* because of special format shift only 10 bits */
-		/* bit shift mantissa 10 bits		*/
-
-		/* first align within words, then do store operation */
-
-		DBL->d[0] = f->m1 >> DBL_RUNPACK;   /* plus 22 == 32 */
-		DBL->d[1] = f->m2 >> DBL_RUNPACK;   /* plus 22 == 32 */
-		DBL->d[1] |= (f->m1 << DBL_LUNPACK); /* plus 10 == 32 */
-
-		/* if not exact then round to nearest	*/
-		/* on a tie, round to even */
-
-#ifdef EXCEPTION_INEXACT
-		if ((f->m2 & DBL_EXACT) != 0) {
-		    INEXACT();
-#endif
-		    if (((f->m2 & DBL_EXACT) > DBL_ROUNDUP)
-			|| ((f->m2 & DBL_EXACT) == DBL_ROUNDUP
-			    && (f->m2 & (DBL_ROUNDUP << 1)))) {
-			DBL->d[1]++;	/* rounding up	*/
-			if (DBL->d[1] == 0L) { /* carry out	*/
-			    DBL->d[0]++;
-
-			    if (f->exp == 0 && (DBL->d[0] & ~DBL_MASK)) {
-					f->exp++;
-				}
-			    if (DBL->d[0] & DBL_CARRYOUT) { /* carry out */
-				if (DBL->d[0] & 01)
-				    DBL->d[1] = CARRYBIT;
-				DBL->d[0] >>= 1;
-				f->exp++;
-			    }
-			}
-			/*	check for overflow			*/
-			if (f->exp > DBL_MAX)
-		    		goto dbl_over;
-		    }
-#ifdef EXCEPTION_INEXACT
-		}
-#endif
-
-		/*
-		 * STORE EXPONENT AND SIGN:
-		 *
-		 * 1) clear leading bits (B4-B15)
-		 * 2) shift and store exponent
-		 */
-
-		DBL->d[0] &= DBL_MASK;
-		DBL->d[0] |= 
-			((long) (f->exp << DBL_EXPSHIFT) << EXP_STORE);
-		if (f->sign)
-			DBL->d[0] |= CARRYBIT;
-
-		/*
-		 * STORE MANTISSA
-		 */
-
-#if FL_MSL_AT_LOW_ADDRESS
-		put4(DBL->d[0], (char *) &DBL->d[0]);
-		put4(DBL->d[1], (char *) &DBL->d[1]);
-#else
-		{ unsigned long l;
-		  put4(DBL->d[1], (char *) &l);
-		  put4(DBL->d[0], (char *) &DBL->d[1]);
-		  DBL->d[0] = l;
-		}
-#endif
-	}
-	else {
-		/*
-		 * COMPACT EXTENDED INTO FLOAT
-		 */
-		SINGLE	*SGL;
-
-		/* local CAST conversion		*/
-		SGL = (SINGLE *) (void *) to;
-		if ((f->m1 & SGL_ZERO) == 0L)	{
-			*SGL = 0L;
-			return;
-		}
-		f->exp += SGL_BIAS;	/* restore bias	*/
-		if (f->exp > SGL_MAX)	{
-sgl_over:			trap(EFOVFL);
-			f->exp = SGL_MAX+1;
-			f->m1 = 0L;
-			f->m2 = 0L;
-			if (error++)
-				return;
-		}
-		else if (f->exp < SGL_MIN)	{
-			b64_rsft(&(f->mantissa));
-			if (f->exp < 0) {
-				b64_sft(&(f->mantissa), -f->exp);
-				f->exp = 0;
-			}
-			/* underflow ??? */
-		}
-
-		/* shift mantissa and store	*/
-		*SGL = (f->m1 >> SGL_RUNPACK);
-
-		/* check for rounding to nearest	*/
-		/* on a tie, round to even		*/
-#ifdef EXCEPTION_INEXACT
-		if (f->m2 != 0 ||
-		    (f->m1 & SGL_EXACT) != 0L) {
-			INEXACT();
-#endif
-		        if (((f->m1 & SGL_EXACT) > SGL_ROUNDUP)
-			    || ((f->m1 & SGL_EXACT) == SGL_ROUNDUP
-			        && (f->m1 & (SGL_ROUNDUP << 1)))) {
-				(*SGL)++;
-				if (f->exp == 0 && (*SGL & ~SGL_MASK)) {
-					f->exp++;
-				}
-			/* check normal */
-				if (*SGL & SGL_CARRYOUT)	{
-					*SGL >>= 1;
-					f->exp++;
-				}
-				if (f->exp > SGL_MAX)
-					goto sgl_over;
-			}
-#ifdef EXCEPTION_INEXACT
-		}
-#endif
-
-		/*
-		 * STORE EXPONENT AND SIGN:
-		 *
-		 * 1) clear leading bit of fraction
-		 * 2) shift and store exponent
-		 */
-
-		*SGL &= SGL_MASK; /* B23-B31 are 0 */
-		*SGL |= ((long) (f->exp << SGL_EXPSHIFT) << EXP_STORE);
-		if (f->sign)
-			*SGL |= CARRYBIT;
-
-		/*
-		 * STORE MANTISSA
-		 */
-
-		put4(*SGL, (char *) &SGL);
-	}
-}
Index: trunk/minix/lib/float/cuf4.c
===================================================================
--- trunk/minix/lib/float/cuf4.c	(revision 9)
+++ 	(revision )
@@ -1,57 +1,0 @@
-/*
-  (c) copyright 1988 by the Vrije Universiteit, Amsterdam, The Netherlands.
-  See the copyright notice in the ACK home directory, in the file "Copyright".
-*/
-
-/* $Header: /cvsup/minix/src/lib/float/cuf4.c,v 1.1.1.1 2005/04/21 14:56:10 beng Exp $ */
-
-/*
-	CONVERT INTEGER TO SINGLE (CUF n 4)
-
-	THIS ROUTINE WORKS BY FILLING AN EXTENDED
-	WITH THE INTEGER VALUE IN EXTENDED FORMAT
-	AND USES COMPACT() TO PUT IT INTO THE PROPER
-	FLOATING POINT PRECISION.
-*/
-
-#include "FP_types.h"
-
-void
-cuf4(ss,src)
-int	ss;	/* source size */
-long	src;	/* largest possible integer to convert */
-{
-	EXTEND	buf;
-	short	*ipt;
-	SINGLE	*result;
-	long	i_src;
-
-	zrf_ext(&buf);
-	if (ss == sizeof(long))	{
-		buf.exp = 31;
-		i_src = src;
-		result = (SINGLE *) &src;
-	}
-	else	{
-		ipt = (short *) &src;
-		i_src = (long) *ipt;
-		buf.exp = 15;
-		result = (SINGLE *) ((void *) &ss);
-	}
-	if (i_src == 0)	{
-		*result = (SINGLE) 0L;
-		return;
-	}
-			/* ESTABLISHED THAT src != 0	*/
-
-			/* adjust exponent field	*/
-	if (ss != sizeof(long))
-		i_src <<= 16;
-
-			/* move to mantissa field	*/
-	buf.m1 = i_src;
-
-			/* adjust mantissa field	*/
-	nrm_ext(&buf);
-	compact(&buf,result,4);
-}
Index: trunk/minix/lib/float/cuf8.c
===================================================================
--- trunk/minix/lib/float/cuf8.c	(revision 9)
+++ 	(revision )
@@ -1,54 +1,0 @@
-/*
-  (c) copyright 1988 by the Vrije Universiteit, Amsterdam, The Netherlands.
-  See the copyright notice in the ACK home directory, in the file "Copyright".
-*/
-
-/* $Header: /cvsup/minix/src/lib/float/cuf8.c,v 1.1.1.1 2005/04/21 14:56:10 beng Exp $ */
-
-/*
-	CONVERT INTEGER TO FLOAT (CUF n 8)
-
-	THIS ROUTINE WORKS BY FILLING AN EXTENDED
-	WITH THE INTEGER VALUE IN EXTENDED FORMAT
-	AND USES COMPACT() TO PUT IT INTO THE PROPER
-	FLOATING POINT PRECISION.
-*/
-
-#include "FP_types.h"
-
-void
-cuf8(ss,src)
-int	ss;	/* source size */
-long	src;	/* largest possible integer to convert */
-{
-	EXTEND	buf;
-	short	*ipt;
-	long	i_src;
-
-	zrf_ext(&buf);
-	if (ss == sizeof(long))	{
-		buf.exp = 31;
-		i_src = src;
-	}
-	else	{
-		ipt = (short *) &src;
-		i_src = (long) *ipt;
-		buf.exp = 15;
-	}
-	if (i_src == 0)	{
-		zrf8((DOUBLE *)((void *)&ss));
-		return;
-	}
-			/* ESTABLISHED THAT src != 0	*/
-
-			/* adjust exponent field	*/
-	if (ss != sizeof(long))
-		i_src <<= 16;
-
-			/* move to mantissa field	*/
-	buf.m1 = i_src;
-
-			/* adjust mantissa field	*/
-	nrm_ext(&buf);
-	compact(&buf,(unsigned long *) (void *)&ss,8);
-}
Index: trunk/minix/lib/float/div_ext.c
===================================================================
--- trunk/minix/lib/float/div_ext.c	(revision 9)
+++ 	(revision )
@@ -1,266 +1,0 @@
-/*
-  (c) copyright 1988 by the Vrije Universiteit, Amsterdam, The Netherlands.
-  See the copyright notice in the ACK home directory, in the file "Copyright".
-*/
-
-/* $Header: /cvsup/minix/src/lib/float/div_ext.c,v 1.1.1.1 2005/04/21 14:56:10 beng Exp $ */
-
-/*
-	DIVIDE EXTENDED FORMAT
-*/
-
-#include "FP_bias.h"
-#include "FP_trap.h"
-#include "FP_types.h"
-
-/*
-	November 15, 1984
-
-	This is a routine to do the work.
-	There are two versions: 
-	One is based on the partial products method
-	and makes no use possible machine instructions
-	to divide (hardware dividers).
-	The other is used when USE_DIVIDE is defined. It is much faster on
-	machines with fast 4 byte operations.
-*/
-/********************************************************/
-
-void
-div_ext(e1,e2)
-EXTEND	*e1,*e2;
-{
-	short	error = 0;
-	B64		result;
-	register	unsigned long	*lp;
-#ifndef USE_DIVIDE
-	short	count;
-#else
-	unsigned short u[9], v[5];
-	register int j;
-	register unsigned short *u_p = u;
-	int maxv = 4;
-#endif
-
-	if ((e2->m1 | e2->m2) == 0) {
-                /*
-                 * Exception 8.2 - Divide by zero
-                 */
-		trap(EFDIVZ);
-		e1->m1 = e1->m2 = 0L;
-		e1->exp = EXT_MAX;
-		return;
-	}
-	if ((e1->m1 | e1->m2) == 0) {	/* 0 / anything == 0 */
-		e1->exp = 0;	/* make sure */
-		return;
-	}
-#ifndef USE_DIVIDE
-	/*
-	 * numbers are right shifted one bit to make sure
-	 * that m1 is quaranteed to be larger if its
-	 * maximum bit is set
-	 */
-	b64_rsft(&e1->mantissa);	/* 64 bit shift right */
-	b64_rsft(&e2->mantissa);	/* 64 bit shift right */
-	e1->exp++;
-	e2->exp++;
-#endif
-	/*	check for underflow, divide by zero, etc	*/
-	e1->sign ^= e2->sign;
-	e1->exp -= e2->exp;
-
-#ifndef USE_DIVIDE
-		/* do division of mantissas	*/
-		/* uses partial product method	*/
-		/* init control variables	*/
-
-	count = 64;
-	result.h_32 = 0L;
-	result.l_32 = 0L;
-
-		/* partial product division loop */
-
-	while (count--)	{
-		/* first left shift result 1 bit	*/
-		/* this is ALWAYS done			*/
-
-		b64_lsft(&result);
-
-		/* compare dividend and divisor		*/
-		/* if dividend >= divisor add a bit	*/
-		/* and subtract divisior from dividend	*/
-
-		if ( (e1->m1 < e2->m1) ||
-			((e1->m1 == e2->m1) && (e1->m2 < e2->m2) ))
-			;	/* null statement */
-				/* i.e., don't add or subtract */
-		else	{
-			result.l_32++;	/* ADD	*/
-			if (e2->m2 > e1->m2)
-				e1->m1 -= 1;	/* carry in */
-			e1->m1 -= e2->m1;	/* do SUBTRACTION */
-			e1->m2 -= e2->m2;	/*    SUBTRACTION */
-		}
-
-		/*	shift dividend left one bit OR	*/
-		/*	IF it equals ZERO we can break out	*/
-		/*	of the loop, but still must shift	*/
-		/*	the quotient the remaining count bits	*/
-		/* NB	save the results of this test in error	*/
-		/*	if not zero, then the result is inexact. */
-		/* 	this would be reported in IEEE standard	*/
-
-		/*	lp points to dividend			*/
-		lp = &e1->m1;
-
-		error = ((*lp | *(lp+1)) != 0L) ? 1 : 0;
-		if (error)	{	/* more work */
-			/*	assume max bit == 0 (see above)	*/
-			b64_lsft(&e1->mantissa);
-			continue;
-		}
-		else
-			break;	/* leave loop	*/
-	}	/* end of divide by subtraction loop	*/
-
-	if (count > 0)	{
-		lp = &result.h_32;
-		if (count > 31) {	/* move to higher word */
-			*lp = *(lp+1);
-			count -= 32;
-			*(lp+1) = 0L;	/* clear low word	*/
-		}
-		if (*lp)
-			*lp <<= count;	/* shift rest of way	*/
-		lp++;	/*  == &result.l_32	*/
-		if (*lp) {
-			result.h_32 |= (*lp >> 32-count);
-			*lp <<= count;
-		}
-	}
-#else /* USE_DIVIDE */
-
-	u[4] = (e1->m2 & 1) << 15;
-	b64_rsft(&(e1->mantissa));
-	u[0] = e1->m1 >> 16;
-	u[1] = e1->m1;
-	u[2] = e1->m2 >> 16;
-	u[3] = e1->m2;
-	u[5] = 0; u[6] = 0; u[7] = 0;
-	v[1] = e2->m1 >> 16;
-	v[2] = e2->m1;
-	v[3] = e2->m2 >> 16;
-	v[4] = e2->m2;
-	while (! v[maxv]) maxv--;
-	result.h_32 = 0;
-	result.l_32 = 0;
-	lp = &result.h_32;
-
-	/*
-	 * Use an algorithm of Knuth (The art of programming, Seminumerical
-	 * algorithms), to divide u by v. u and v are both seen as numbers
-	 * with base 65536. 
-	 */
-	for (j = 0; j <= 3; j++, u_p++) {
-		unsigned long q_est, temp;
-
-		if (j == 2) lp++;
-		if (u_p[0] == 0 && u_p[1] < v[1]) continue;
-		temp = ((unsigned long)u_p[0] << 16) + u_p[1];
-		if (u_p[0] >= v[1]) {
-			q_est = 0x0000FFFFL;
-		}
-		else {
-			q_est = temp / v[1];
-		}
-		temp -= q_est * v[1];
-		while (temp < 0x10000 && v[2]*q_est > ((temp<<16)+u_p[2])) {
-			q_est--;
-			temp += v[1];
-		}
-		/*	Now, according to Knuth, we have an estimate of the
-			quotient, that is either correct or one too big, but
-			almost always correct.
-		*/
-		if (q_est != 0)  {
-			int i;
-			unsigned long k = 0;
-			int borrow = 0;
-
-			for (i = maxv; i > 0; i--) {
-				unsigned long tmp = q_est * v[i] + k + borrow;
-				unsigned short md = tmp;
-
-				borrow = (md > u_p[i]);
-				u_p[i] -= md;
-				k = tmp >> 16;
-			}
-			k += borrow;
-			borrow = u_p[0] < k;
-			u_p[0] -= k;
-
-			if (borrow) {
-				/* So, this does not happen often; the estimate
-				   was one too big; correct this
-				*/
-				*lp |= (j & 1) ? (q_est - 1) : ((q_est-1)<<16);
-				borrow = 0;
-				for (i = maxv; i > 0; i--) {
-					unsigned long tmp 
-					    = v[i]+(unsigned long)u_p[i]+borrow;
-					
-					u_p[i] = tmp;
-					borrow = tmp >> 16;
-				}
-				u_p[0] += borrow;
-			}
-			else *lp |= (j & 1) ? q_est : (q_est<<16);
-		}
-	}
-#ifdef	EXCEPTION_INEXACT
-	u_p = &u[0];
-	for (j = 7; j >= 0; j--) {
-		if (*u_p++) {
-			error = 1;
-			break;
-		}
-	}
-#endif
-#endif
-
-#ifdef  EXCEPTION_INEXACT
-        if (error)      {
-                /*
-                 * report here exception 8.5 - Inexact
-                 * from Draft 8.0 of IEEE P754:
-                 * In the absence of an invalid operation exception,
-                 * if the rounded result of an operation is not exact or if
-                 * it overflows without a trap, then the inexact exception
-                 * shall be assigned. The rounded or overflowed result
-                 * shall be delivered to the destination.
-                 */
-                INEXACT();
-#endif
-	e1->mantissa = result;
-
-	nrm_ext(e1);
-	if (e1->exp < EXT_MIN)	{
-		/*
-		 * Exception 8.4 - Underflow
-		 */
-		trap(EFUNFL);	/* underflow */
-		e1->exp = EXT_MIN;
-		e1->m1 = e1->m2 = 0L;
-		return;
-	}
-	if (e1->exp >= EXT_MAX) {
-                /*
-                 * Exception 8.3 - Overflow
-                 */
-                trap(EFOVFL);   /* overflow */
-                e1->exp = EXT_MAX;
-                e1->m1 = e1->m2 = 0L;
-                return;
-        }
-}
Index: trunk/minix/lib/float/dvf4.c
===================================================================
--- trunk/minix/lib/float/dvf4.c	(revision 9)
+++ 	(revision )
@@ -1,26 +1,0 @@
-/*
-  (c) copyright 1988 by the Vrije Universiteit, Amsterdam, The Netherlands.
-  See the copyright notice in the ACK home directory, in the file "Copyright".
-*/
-
-/* $Header: /cvsup/minix/src/lib/float/dvf4.c,v 1.1.1.1 2005/04/21 14:56:10 beng Exp $ */
-
-/*
-	DIVIDE TWO SINGLES - SINGLE Precision (dvf 4)
-*/
-
-#include	"FP_types.h"
-
-void
-dvf4(s2,s1)
-SINGLE	s1,s2;
-{
-	EXTEND	e1,e2;
-
-	extend(&s1,&e1,sizeof(SINGLE));
-	extend(&s2,&e2,sizeof(SINGLE));
-
-		/* do a divide */
-	div_ext(&e1,&e2);
-	compact(&e1,&s1,sizeof(SINGLE));
-}
Index: trunk/minix/lib/float/dvf8.c
===================================================================
--- trunk/minix/lib/float/dvf8.c	(revision 9)
+++ 	(revision )
@@ -1,26 +1,0 @@
-/*
-  (c) copyright 1988 by the Vrije Universiteit, Amsterdam, The Netherlands.
-  See the copyright notice in the ACK home directory, in the file "Copyright".
-*/
-
-/* $Header: /cvsup/minix/src/lib/float/dvf8.c,v 1.1.1.1 2005/04/21 14:56:10 beng Exp $ */
-
-/*
-	DIVIDE TWO FLOATS - DOUBLE Precision (DVF 8)
-*/
-
-#include	"FP_types.h"
-
-void
-dvf8(s2,s1)
-DOUBLE	s1,s2;
-{
-	EXTEND	e1,e2;
-
-	extend(&s1.d[0],&e1,sizeof(DOUBLE));
-	extend(&s2.d[0],&e2,sizeof(DOUBLE));
-
-		/* do a divide */
-	div_ext(&e1,&e2);
-	compact(&e1,&s1.d[0],sizeof(DOUBLE));
-}
Index: trunk/minix/lib/float/extend.c
===================================================================
--- trunk/minix/lib/float/extend.c	(revision 9)
+++ 	(revision )
@@ -1,111 +1,0 @@
-/*
-  (c) copyright 1988 by the Vrije Universiteit, Amsterdam, The Netherlands.
-  See the copyright notice in the ACK home directory, in the file "Copyright".
-*/
-
-/* $Header: /cvsup/minix/src/lib/float/extend.c,v 1.1.1.1 2005/04/21 14:56:10 beng Exp $ */
-
-/*
-	CONVERTS FLOATING POINT TO EXTENDED FORMAT
-
-	Two sizes of FLOATING Point are known:
-		SINGLE and DOUBLE
-*/
-/********************************************************/
-/*
-	It is not required to normalize in extended
-	format, but it has been chosen to do so.
-	Extended Format is as follows (at exit):
-
-->sign	S000 0000 | 0000 0000		<SIGN>
-->exp	0EEE EEEE | EEEE EEEE		<EXPONENT>
-->m1	LFFF FFFF | FFFF FFFF		<L.Fraction>
-	FFFF FFFF | FFFF FFFF		<Fraction>
-->m2	FFFF FFFF | FFFF FFFF		<Fraction>
-	FFFF F000 | 0000 0000		<Fraction>
-*/
-/********************************************************/
-
-#include "FP_bias.h"
-#include "FP_shift.h"
-#include "FP_types.h"
-#include "get_put.h"
-/********************************************************/
-
-void
-extend(from,to,size)
-unsigned long	*from;
-EXTEND	*to;
-int	size;
-{
-	register char *cpt1;
-	unsigned long	tmp;
-	int	leadbit = 0;
-
-	cpt1 = (char *) from;
-
-#if FL_MSL_AT_LOW_ADDRESS
-#if FL_MSW_AT_LOW_ADDRESS
-	to->exp = uget2(cpt1);
-#else
-	to->exp = uget2(cpt1+2);
-#endif
-#else
-#if FL_MSW_AT_LOW_ADDRESS
-	to->exp = uget2(cpt1+(size == sizeof(DOUBLE) ? 4 : 0));
-#else
-	to->exp = uget2(cpt1+(size == sizeof(DOUBLE) ? 6 : 2));
-#endif
-#endif
-	to->sign = (to->exp & 0x8000);	/* set sign bit */
-	to->exp ^= to->sign;
-	if (size == sizeof(DOUBLE))
-		to->exp >>= DBL_EXPSHIFT;
-	else
-		to->exp >>= SGL_EXPSHIFT;
-	if (to->exp > 0)
-		leadbit++;	/* will set Lead bit later	*/
-	else to->exp++;
-
-	if (size == sizeof(DOUBLE))	{
-#if FL_MSL_AT_LOW_ADDRESS
-		to->m1 = get4(cpt1);
-		cpt1 += 4;
-		tmp = get4(cpt1);
-#else
-		tmp = get4(cpt1);
-		cpt1 += 4;
-		to->m1 = get4(cpt1);
-#endif
-		if (to->exp == 1 && to->m1 == 0 && tmp == 0) {
-			to->exp = 0;
-			to->sign = 0;
-			to->m1 = 0;
-			to->m2 = 0;
-			return;
-		}
-		to->m1 <<= DBL_M1LEFT;		/* shift	*/
-		to->exp -= DBL_BIAS;		/* remove bias	*/
-		to->m1 |= (tmp>>DBL_RPACK);	/* plus 10 == 32	*/
-		to->m2 = (tmp<<DBL_LPACK);	/* plus 22 == 32	*/
-	}
-	else	{	/* size == sizeof(SINGLE)		*/
-		to->m1 = get4(cpt1);
-		to->m1  <<= SGL_M1LEFT;	/* shift	*/
-		if (to->exp == 1 && to->m1 == 0) {
-			to->exp = 0;
-			to->sign = 0;
-			to->m1 = 0;
-			to->m2 = 0;
-			return;
-		}
-		to->exp -= SGL_BIAS;		/* remove bias	*/
-		to->m2 = 0L;
-	}
-
-	to->m1 |= NORMBIT;				/* set bit L	*/
-	if (leadbit == 0) {		/* set or clear Leading Bit	*/
-		to->m1 &= ~NORMBIT;			/* clear bit L	*/
-		nrm_ext(to);				/* and normalize */
-	}
-}
Index: trunk/minix/lib/float/fef4.c
===================================================================
--- trunk/minix/lib/float/fef4.c	(revision 9)
+++ 	(revision )
@@ -1,33 +1,0 @@
-/*
-  (c) copyright 1988 by the Vrije Universiteit, Amsterdam, The Netherlands.
-  See the copyright notice in the ACK home directory, in the file "Copyright".
-*/
-
-/* $Header: /cvsup/minix/src/lib/float/fef4.c,v 1.1.1.1 2005/04/21 14:56:10 beng Exp $ */
-
-/*
-	SEPERATE INTO EXPONENT AND FRACTION (FEF 4)
-*/
-
-#include	"FP_types.h"
-
-void
-fef4(r,s1)
-SINGLE	s1;
-struct fef4_returns	*r;
-{
-	EXTEND	buf;
-	register struct fef4_returns	*p = r;	/* make copy; r might refer
-						   to itself (see table)
-						*/
-
-	extend(&s1,&buf,sizeof(SINGLE));
-	if (buf.exp == 0 && buf.m1 == 0 && buf.m2 == 0) {
-		p->e = 0;
-	}
-	else {
-		p->e = buf.exp+1;
-		buf.exp = -1;
-	}
-	compact(&buf,&p->f,sizeof(SINGLE));
-}
Index: trunk/minix/lib/float/fef8.c
===================================================================
--- trunk/minix/lib/float/fef8.c	(revision 9)
+++ 	(revision )
@@ -1,33 +1,0 @@
-/*
-  (c) copyright 1988 by the Vrije Universiteit, Amsterdam, The Netherlands.
-  See the copyright notice in the ACK home directory, in the file "Copyright".
-*/
-
-/* $Header: /cvsup/minix/src/lib/float/fef8.c,v 1.1.1.1 2005/04/21 14:56:11 beng Exp $ */
-
-/*
-	SEPERATE DOUBLE INTO EXPONENT AND FRACTION (FEF 8)
-*/
-
-#include	"FP_types.h"
-
-void
-fef8(r, s1)
-DOUBLE	s1;
-struct fef8_returns *r;
-{
-	EXTEND	buf;
-	register struct fef8_returns *p = r;	/* make copy, r might refer
-						   to itself (see table)
-						*/
-
-	extend(&s1.d[0],&buf,sizeof(DOUBLE));
-	if (buf.exp == 0 && buf.m1 == 0 && buf.m2 == 0) {
-		p->e = 0;
-	}
-	else {
-		p->e = buf.exp + 1;
-		buf.exp = -1;
-	}
-	compact(&buf,&p->f.d[0],sizeof(DOUBLE));
-}
Index: trunk/minix/lib/float/fif4.c
===================================================================
--- trunk/minix/lib/float/fif4.c	(revision 9)
+++ 	(revision )
@@ -1,46 +1,0 @@
-/*
-  (c) copyright 1988 by the Vrije Universiteit, Amsterdam, The Netherlands.
-  See the copyright notice in the ACK home directory, in the file "Copyright".
-*/
-
-/* $Header: /cvsup/minix/src/lib/float/fif4.c,v 1.1.1.1 2005/04/21 14:56:11 beng Exp $ */
-
-/*
-	MULTIPLY AND DISMEMBER PARTS (FIF 4)
-*/
-
-#include "FP_types.h"
-#include "FP_shift.h"
-
-void
-fif4(p,x,y)
-SINGLE	x,y;
-struct fif4_returns *p;
-{
-
-	EXTEND	e1,e2;
-
-	extend(&y,&e1,sizeof(SINGLE));
-	extend(&x,&e2,sizeof(SINGLE));
-		/* do a multiply */
-	mul_ext(&e1,&e2);
-	e2 = e1;
-	compact(&e2,&y,sizeof(SINGLE));
-	if (e1.exp < 0) {
-		p->ipart = 0;
-		p->fpart = y;
-		return;
-	}
-	if (e1.exp > 30 - SGL_M1LEFT) {
-		p->ipart = y;
-		p->fpart = 0;
-		return;
-	}
-	b64_sft(&e1.mantissa, 63 - e1.exp);
-	b64_sft(&e1.mantissa, e1.exp - 63);	/* "loose" low order bits */
-	compact(&e1,&(p->ipart),sizeof(SINGLE));
-	extend(&(p->ipart), &e2, sizeof(SINGLE));
-	extend(&y, &e1, sizeof(SINGLE));
-	sub_ext(&e1, &e2);
-	compact(&e1, &(p->fpart), sizeof(SINGLE));
-}
Index: trunk/minix/lib/float/fif8.c
===================================================================
--- trunk/minix/lib/float/fif8.c	(revision 9)
+++ 	(revision )
@@ -1,48 +1,0 @@
-/*
-  (c) copyright 1988 by the Vrije Universiteit, Amsterdam, The Netherlands.
-  See the copyright notice in the ACK home directory, in the file "Copyright".
-*/
-
-/* $Header: /cvsup/minix/src/lib/float/fif8.c,v 1.1.1.1 2005/04/21 14:56:11 beng Exp $ */
-
-/*
-	MULTIPLY AND DISMEMBER PARTS (FIF 8)
-*/
-
-#include "FP_types.h"
-#include "FP_shift.h"
-
-void
-fif8(p,x,y)
-DOUBLE	x,y;
-struct fif8_returns *p;
-{
-
-	EXTEND	e1,e2;
-
-	extend(&y.d[0],&e1,sizeof(DOUBLE));
-	extend(&x.d[0],&e2,sizeof(DOUBLE));
-		/* do a multiply */
-	mul_ext(&e1,&e2);
-	e2 = e1;
-	compact(&e2, &y.d[0], sizeof(DOUBLE));
-	if (e1.exp < 0) {
-		p->ipart.d[0] = 0;
-		p->ipart.d[1] = 0;
-		p->fpart = y;
-		return;
-	}
-	if (e1.exp > 62 - DBL_M1LEFT) {
-		p->ipart = y;
-		p->fpart.d[0] = 0;
-		p->fpart.d[1] = 0;
-		return;
-	}
-	b64_sft(&e1.mantissa, 63 - e1.exp);
-	b64_sft(&e1.mantissa, e1.exp - 63);	/* "loose" low order bits */
-	compact(&e1, &(p->ipart.d[0]), sizeof(DOUBLE));
-	extend(&(p->ipart.d[0]), &e2, sizeof(DOUBLE));
-	extend(&y.d[0], &e1, sizeof(DOUBLE));
-	sub_ext(&e1, &e2);
-	compact(&e1, &(p->fpart.d[0]), sizeof(DOUBLE));
-}
Index: trunk/minix/lib/float/fptrp.s
===================================================================
--- trunk/minix/lib/float/fptrp.s	(revision 9)
+++ 	(revision )
@@ -1,19 +1,0 @@
-#
-.sect .text; .sect .rom; .sect .data; .sect .bss
-.define __fptrp
-.sect .text
-__fptrp:
-#if __i386
-	push	ebp
-	mov	ebp, esp
-	mov	eax, 8(bp)
-	call	.Xtrp
-	leave
-	ret
-#else /* i86 */
-	push	bp
-	mov	bp, sp
-	mov	ax, 4(bp)
-	call	.Xtrp
-	jmp	.cret
-#endif
Index: trunk/minix/lib/float/get_put.h
===================================================================
--- trunk/minix/lib/float/get_put.h	(revision 9)
+++ 	(revision )
@@ -1,41 +1,0 @@
-/*
-  (c) copyright 1988 by the Vrije Universiteit, Amsterdam, The Netherlands.
-  See the copyright notice in the ACK home directory, in the file "Copyright".
-*/
-
-/* $Header: /cvsup/minix/src/lib/float/get_put.h,v 1.1.1.1 2005/04/21 14:56:11 beng Exp $ */
-
-#include <byte_order.h>
-
-#if CHAR_UNSIGNED
-#define Xchar(ch)	(ch)
-#else
-#define Xchar(ch)	((ch) & 0377)
-#endif
-
-#define BYTES_REVERSED (MSB_AT_LOW_ADDRESS != FL_MSB_AT_LOW_ADDRESS)
-#define WORDS_REVERSED (MSW_AT_LOW_ADDRESS != FL_MSW_AT_LOW_ADDRESS)
-#define LONGS_REVERSED (FL_MSL_AT_LOW_ADDRESS)
-
-#if BYTES_REVERSED
-#define uget2(c)	(Xchar((c)[1]) | ((unsigned) Xchar((c)[0]) << 8))
-#define Xput2(i, c)	(((c)[1] = (i)), ((c)[0] = (i) >> 8))
-#define put2(i, c)	{ register int j = (i); Xput2(j, c); }
-#else
-#define uget2(c)	(* ((unsigned short *) (c)))
-#define Xput2(i, c)	(* ((short *) (c)) = (i))
-#define put2(i, c)	Xput2(i, c)
-#endif
-
-#define get2(c)		((short) uget2(c))
-
-#if WORDS_REVERSED || BYTES_REVERSED
-#define get4(c)		(uget2((c)+2) | ((long) uget2(c) << 16))
-#define put4(l, c)	{ register long x=(l); \
-			  Xput2((int)x,(c)+2); \
-			  Xput2((int)(x>>16),(c)); \
-			}
-#else
-#define get4(c)		(* ((long *) (c)))
-#define put4(l, c)	(* ((long *) (c)) = (l))
-#endif
Index: trunk/minix/lib/float/mlf4.c
===================================================================
--- trunk/minix/lib/float/mlf4.c	(revision 9)
+++ 	(revision )
@@ -1,25 +1,0 @@
-/*
-  (c) copyright 1988 by the Vrije Universiteit, Amsterdam, The Netherlands.
-  See the copyright notice in the ACK home directory, in the file "Copyright".
-*/
-
-/* $Header: /cvsup/minix/src/lib/float/mlf4.c,v 1.1.1.1 2005/04/21 14:56:11 beng Exp $ */
-
-/*
- * Multiply Single Precesion Float (MLF 4)
- */
-
-#include	"FP_types.h"
-
-void
-mlf4(s2,s1)
-SINGLE	s1,s2;
-{
-	EXTEND	e1,e2;
-
-	extend(&s1,&e1,sizeof(SINGLE));
-	extend(&s2,&e2,sizeof(SINGLE));
-		/* do a multiply */
-	mul_ext(&e1,&e2);
-	compact(&e1,&s1,sizeof(SINGLE));
-}
Index: trunk/minix/lib/float/mlf8.c
===================================================================
--- trunk/minix/lib/float/mlf8.c	(revision 9)
+++ 	(revision )
@@ -1,25 +1,0 @@
-/*
-  (c) copyright 1988 by the Vrije Universiteit, Amsterdam, The Netherlands.
-  See the copyright notice in the ACK home directory, in the file "Copyright".
-*/
-
-/* $Header: /cvsup/minix/src/lib/float/mlf8.c,v 1.1.1.1 2005/04/21 14:56:11 beng Exp $ */
-
-/*
- * Multiply Double Precision Float (MLF 8)
- */
-
-#include	"FP_types.h"
-
-void
-mlf8(s2,s1)
-DOUBLE	s1,s2;
-{
-	EXTEND	e1,e2;
-
-	extend(&s1.d[0],&e1,sizeof(DOUBLE));
-	extend(&s2.d[0],&e2,sizeof(DOUBLE));
-		/* do a multiply */
-	mul_ext(&e1,&e2);
-	compact(&e1,&s1.d[0],sizeof(DOUBLE));
-}
Index: trunk/minix/lib/float/mul_ext.c
===================================================================
--- trunk/minix/lib/float/mul_ext.c	(revision 9)
+++ 	(revision )
@@ -1,98 +1,0 @@
-/*
-  (c) copyright 1988 by the Vrije Universiteit, Amsterdam, The Netherlands.
-  See the copyright notice in the ACK home directory, in the file "Copyright".
-*/
-
-/* $Header: /cvsup/minix/src/lib/float/mul_ext.c,v 1.1.1.1 2005/04/21 14:56:11 beng Exp $ */
-
-/*
-	ROUTINE TO MULTIPLY TWO EXTENDED FORMAT NUMBERS
-*/
-
-# include "FP_bias.h"
-# include "FP_trap.h"
-# include "FP_types.h"
-# include "FP_shift.h"
-
-void
-mul_ext(e1,e2)
-EXTEND	*e1,*e2;
-{
-	register int	i,j;		/* loop control	*/
-	unsigned short	mp[4];		/* multiplier */
-	unsigned short	mc[4];		/* multipcand */
-	unsigned short	result[8];	/* result */
-	register unsigned short *pres;
-
-	/* first save the sign (XOR)			*/
-	e1->sign ^= e2->sign;
-
-	/* compute new exponent */
-	e1->exp += e2->exp + 1;
-	/* 128 bit multiply of mantissas			*/
-
-		/* assign unknown long formats		*/
-		/* to known unsigned word formats	*/
-	mp[0] = e1->m1 >> 16;
-	mp[1] = (unsigned short) e1->m1;
-	mp[2] = e1->m2 >> 16;
-	mp[3] = (unsigned short) e1->m2;
-	mc[0] = e2->m1 >> 16;
-	mc[1] = (unsigned short) e2->m1;
-	mc[2] = e2->m2 >> 16;
-	mc[3] = (unsigned short) e2->m2;
-	for (i = 8; i--;) {
-		result[i] = 0;
-	}
-	/*
-	 *	fill registers with their components
-	 */
-	for(i=4, pres = &result[4];i--;pres--) if (mp[i]) {
-		unsigned short k = 0;
-		unsigned long mpi = mp[i];
-		for(j=4;j--;) {
-			unsigned long tmp = (unsigned long)pres[j] + k;
-			if (mc[j]) tmp += mpi * mc[j];
-			pres[j] = tmp;
-			k = tmp >> 16;
-		}
-		pres[-1] = k;
-	}
-        if (! (result[0] & 0x8000)) {
-                e1->exp--;
-                for (i = 0; i <= 3; i++) {
-                        result[i] <<= 1;
-                        if (result[i+1]&0x8000) result[i] |= 1;
-                }
-                result[4] <<= 1;
-        }
-
-	/*
-	 *	combine the registers to a total
-	 */
-	e1->m1 = ((unsigned long)(result[0]) << 16) + result[1];
-	e1->m2 = ((unsigned long)(result[2]) << 16) + result[3];
-	if (result[4] & 0x8000) {
-		if (++e1->m2 == 0)
-			if (++e1->m1 == 0) {
-				e1->m1 = NORMBIT;
-				e1->exp++;
-			}
-	}
-
-					/* check for overflow	*/
-	if (e1->exp >= EXT_MAX)	{
-		trap(EFOVFL);
-			/* if caught 			*/
-			/* return signed infinity	*/
-		e1->exp = EXT_MAX;
-infinity:	e1->m1 = e1->m2 =0L;
-		return;
-	}
-				/* check for underflow	*/
-	if (e1->exp < EXT_MIN)	{
-		trap(EFUNFL);
-		e1->exp = EXT_MIN;
-		goto infinity;
-	}
-}
Index: trunk/minix/lib/float/ngf4.c
===================================================================
--- trunk/minix/lib/float/ngf4.c	(revision 9)
+++ 	(revision )
@@ -1,27 +1,0 @@
-/*
-  (c) copyright 1988 by the Vrije Universiteit, Amsterdam, The Netherlands.
-  See the copyright notice in the ACK home directory, in the file "Copyright".
-*/
-
-/* $Header: /cvsup/minix/src/lib/float/ngf4.c,v 1.1.1.1 2005/04/21 14:56:11 beng Exp $ */
-
-/*
-		NEGATE A FLOATING POINT (NGF 4)
-*/
-/********************************************************/
-
-#include "FP_types.h"
-#include "get_put.h"
-
-#define OFF ((FL_MSW_AT_LOW_ADDRESS ? 0 : 2) + (FL_MSB_AT_LOW_ADDRESS ? 0 : 1))
-void
-ngf4(f)
-SINGLE	f;
-{
-	unsigned char *p;
-
-	if (f != (SINGLE) 0) {
-		p = (unsigned char *) &f + OFF;
-		*p ^= 0x80;
-	}
-}
Index: trunk/minix/lib/float/ngf8.c
===================================================================
--- trunk/minix/lib/float/ngf8.c	(revision 9)
+++ 	(revision )
@@ -1,28 +1,0 @@
-/*
-  (c) copyright 1988 by the Vrije Universiteit, Amsterdam, The Netherlands.
-  See the copyright notice in the ACK home directory, in the file "Copyright".
-*/
-
-/* $Header: /cvsup/minix/src/lib/float/ngf8.c,v 1.1.1.1 2005/04/21 14:56:11 beng Exp $ */
-
-/*
-		NEGATE A FLOATING POINT (NGF 8)
-*/
-/********************************************************/
-
-#include "FP_types.h"
-#include "get_put.h"
-
-#define OFF ((FL_MSL_AT_LOW_ADDRESS ? 0 : 4) + (FL_MSW_AT_LOW_ADDRESS ? 0 : 2) + (FL_MSB_AT_LOW_ADDRESS ? 0 : 1))
-
-void
-ngf8(f)
-DOUBLE	f;
-{
-	unsigned char	*p;
-
-	if (f.d[0] != 0 || f.d[1] != 0) {
-		p = (unsigned char *) &f + OFF;
-		*p ^= 0x80;
-	}
-}
Index: trunk/minix/lib/float/nrm_ext.c
===================================================================
--- trunk/minix/lib/float/nrm_ext.c	(revision 9)
+++ 	(revision )
@@ -1,50 +1,0 @@
-/*
-  (c) copyright 1988 by the Vrije Universiteit, Amsterdam, The Netherlands.
-  See the copyright notice in the ACK home directory, in the file "Copyright".
-*/
-
-/* $Header: /cvsup/minix/src/lib/float/nrm_ext.c,v 1.1.1.1 2005/04/21 14:56:11 beng Exp $ */
-
-/********************************************************/
-/*
-	NORMALIZE an EXTENDED FORMAT NUMBER
-*/
-/********************************************************/
-
-#include "FP_shift.h"
-#include "FP_types.h"
-
-void
-nrm_ext(e1)
-EXTEND	*e1;
-{
-		/* we assume that the mantissa != 0	*/
-		/* if it is then just return		*/
-		/* to let it be a problem elsewhere	*/
-		/* THAT IS, The exponent is not set to	*/
-		/* zero. If we don't test here an	*/
-		/* infinite loop is generated when	*/
-		/* mantissa is zero			*/
-
-	if ((e1->m1 | e1->m2) == 0L)
-		return;
-
-		/* if top word is zero mov low word	*/
-		/* to top word, adjust exponent value	*/
-	if (e1->m1 == 0L)	{
-		e1->m1 = e1->m2;
-		e1->m2 = 0L;
-		e1->exp -= 32;
-	}
-	if ((e1->m1 & NORMBIT) == 0) {
-		unsigned long l = ((unsigned long)NORMBIT >> 1);
-		int cnt = -1;
-
-		while (! (l & e1->m1)) {
-			l >>= 1;
-			cnt--;
-		}
-		e1->exp += cnt;
-		b64_sft(&(e1->mantissa), cnt);
-	}
-}
Index: trunk/minix/lib/float/sbf4.c
===================================================================
--- trunk/minix/lib/float/sbf4.c	(revision 9)
+++ 	(revision )
@@ -1,27 +1,0 @@
-/*
- (c) copyright 1988 by the Vrije Universiteit, Amsterdam, The Netherlands.
-  See the copyright notice in the ACK home directory, in the file "Copyright".
-*/
-
-/* $Header: /cvsup/minix/src/lib/float/sbf4.c,v 1.1.1.1 2005/04/21 14:56:11 beng Exp $ */
-
-/*
-	SUBTRACT TWO FLOATS - SINGLE Precision (SBF 4)
-*/
-
-#include	"FP_types.h"
-
-void
-sbf4(s2,s1)
-SINGLE	s1,s2;
-{
-	EXTEND e1,e2;
-
-	if (s2 == (SINGLE) 0) {
-		return;
-	}
-	extend(&s1,&e1,sizeof(SINGLE));
-	extend(&s2,&e2,sizeof(SINGLE));
-	sub_ext(&e1,&e2);
-	compact(&e1,&s1,sizeof(SINGLE));
-}
Index: trunk/minix/lib/float/sbf8.c
===================================================================
--- trunk/minix/lib/float/sbf8.c	(revision 9)
+++ 	(revision )
@@ -1,27 +1,0 @@
-/*
-  (c) copyright 1988 by the Vrije Universiteit, Amsterdam, The Netherlands.
-  See the copyright notice in the ACK home directory, in the file "Copyright".
-*/
-
-/* $Header: /cvsup/minix/src/lib/float/sbf8.c,v 1.1.1.1 2005/04/21 14:56:11 beng Exp $ */
-
-/*
-	SUBTRACT TWO FLOATS - DOUBLE Precision (SBF 8)
-*/
-
-#include	"FP_types.h"
-
-void
-sbf8(s2,s1)
-DOUBLE	s1,s2;
-{
-	EXTEND e1, e2;
-
-	if (s2.d[0] == 0 && s2.d[1] == 0) {
-		return;
-	}
-	extend(&s1.d[0],&e1,sizeof(DOUBLE));
-	extend(&s2.d[0],&e2,sizeof(DOUBLE));
-	sub_ext(&e1,&e2);
-	compact(&e1,&s1.d[0],sizeof(DOUBLE));
-}
Index: trunk/minix/lib/float/sft_ext.c
===================================================================
--- trunk/minix/lib/float/sft_ext.c	(revision 9)
+++ 	(revision )
@@ -1,39 +1,0 @@
-/*
-  (c) copyright 1988 by the Vrije Universiteit, Amsterdam, The Netherlands.
-  See the copyright notice in the ACK home directory, in the file "Copyright".
-*/
-
-/* $Header: /cvsup/minix/src/lib/float/sft_ext.c,v 1.1.1.1 2005/04/21 14:56:11 beng Exp $ */
-
-/*
-	SHIFT TWO EXTENDED NUMBERS INTO PROPER
-	ALIGNMENT FOR ADDITION (exponents are equal)
-	Numbers should not be zero on entry.
-*/
-
-#include "FP_types.h"
-
-void
-sft_ext(e1,e2)
-EXTEND	*e1,*e2;
-{
-	register	EXTEND	*s;
-	register	int	diff;
-
-	diff = e1->exp - e2->exp;
-
-	if (!diff)
-		return;	/* exponents are equal	*/
-
-	if (diff < 0)	{ /* e2 is larger	*/
-			/* shift e1		*/
-		diff = -diff;
-		s = e1;
-	}
-	else		/* e1 is larger		*/
-			/* shift e2		*/
-		s = e2;
-
-	s->exp += diff;
-	b64_sft(&(s->mantissa), diff);
-}
Index: trunk/minix/lib/float/shifter.c
===================================================================
--- trunk/minix/lib/float/shifter.c	(revision 9)
+++ 	(revision )
@@ -1,75 +1,0 @@
-/*
-  (c) copyright 1988 by the Vrije Universiteit, Amsterdam, The Netherlands.
-  See the copyright notice in the ACK home directory, in the file "Copyright".
-*/
-
-/* $Header: /cvsup/minix/src/lib/float/shifter.c,v 1.1.1.1 2005/04/21 14:56:11 beng Exp $ */
-
-# include "FP_types.h"
-
-void
-b64_sft(e1,n)
-B64	*e1;
-int	n;
-{
-	if (n > 0) {
-		if (n > 63) {
-			e1->l_32 = 0;
-			e1->h_32 = 0;
-			return;
-		}
-		if (n >= 32) {
-			e1->l_32 = e1->h_32;
-			e1->h_32 = 0;
-			n -= 32;
-		}
-		if (n > 0) {
-			e1->l_32 >>= n;
-			if (e1->h_32 != 0) {
-				e1->l_32 |= (e1->h_32 << (32 - n));
-				e1->h_32 >>= n;
-			}
-		}
-		return;
-	}
-	n = -n;
-	if (n > 0) {
-		if (n > 63) {
-			e1->l_32 = 0;
-			e1->h_32 = 0;
-			return;
-		}
-		if (n >= 32) {
-			e1->h_32 = e1->l_32;
-			e1->l_32 = 0;
-			n -= 32;
-		}
-		if (n > 0) {
-			e1->h_32 <<= n;
-			if (e1->l_32 != 0) {
-				e1->h_32 |= (e1->l_32 >> (32 - n));
-				e1->l_32 <<= n;
-			}
-		}
-	}
-}
-
-void
-b64_lsft(e1)
-B64	*e1;
-{
-	/*	shift left 1 bit */
-	e1->h_32 <<= 1;
-	if (e1->l_32 & 0x80000000L) e1->h_32 |= 1;
-	e1->l_32 <<= 1;
-}
-
-void
-b64_rsft(e1)
-B64	*e1;
-{
-	/*	shift right 1 bit */
-	e1->l_32 >>= 1;
-	if (e1->h_32 & 1) e1->l_32 |= 0x80000000L;
-	e1->h_32 >>= 1;
-}
Index: trunk/minix/lib/float/sub_ext.c
===================================================================
--- trunk/minix/lib/float/sub_ext.c	(revision 9)
+++ 	(revision )
@@ -1,53 +1,0 @@
-/*
-  (c) copyright 1988 by the Vrije Universiteit, Amsterdam, The Netherlands.
-  See the copyright notice in the ACK home directory, in the file "Copyright".
-*/
-
-/* $Header: /cvsup/minix/src/lib/float/sub_ext.c,v 1.1.1.1 2005/04/21 14:56:11 beng Exp $ */
-
-/*
-	SUBTRACT 2 EXTENDED FORMAT NUMBERS
-*/
-
-#include "FP_types.h"
-
-void
-sub_ext(e1,e2)
-EXTEND	*e1,*e2;
-{
-	if ((e2->m1 | e2->m2) == 0L) {
-		return;
-	}
-	if ((e1->m1 | e1->m2) == 0L) {
-		*e1 = *e2;
-		e1->sign = e2->sign ? 0 : 1;
-		return;
-	}
-	sft_ext(e1, e2);
-	if (e1->sign != e2->sign) {
-		/* e1 - e2 = e1 + (-e2) */
-		if (b64_add(&e1->mantissa,&e2->mantissa)) { /* addition carry */
-                	b64_rsft(&e1->mantissa);      /* shift mantissa one bit RIGHT */
-                	e1->m1 |= 0x80000000L;  /* set max bit  */
-                	e1->exp++;              /* increase the exponent */
-        	}
-	}
-        else if (e2->m1 > e1->m1 ||
-                 (e2->m1 == e1->m1 && e2->m2 > e1->m2)) {
-		/*	abs(e2) > abs(e1) */
-		if (e1->m2 > e2->m2) {
-			e2->m1 -= 1;	/* carry in */
-		}
-		e2->m1 -= e1->m1;
-		e2->m2 -= e1->m2;
-		*e1 = *e2;
-		e1->sign = e2->sign ? 0 : 1;
-	}
-	else {
-		if (e2->m2 > e1->m2)
-			e1->m1 -= 1;	/* carry in */
-		e1->m1 -= e2->m1;
-		e1->m2 -= e2->m2;
-	}
-	nrm_ext(e1);
-}
Index: trunk/minix/lib/float/zrf4.c
===================================================================
--- trunk/minix/lib/float/zrf4.c	(revision 9)
+++ 	(revision )
@@ -1,19 +1,0 @@
-/*
-  (c) copyright 1988 by the Vrije Universiteit, Amsterdam, The Netherlands.
-  See the copyright notice in the ACK home directory, in the file "Copyright".
-*/
-
-/* $Header: /cvsup/minix/src/lib/float/zrf4.c,v 1.1.1.1 2005/04/21 14:56:11 beng Exp $ */
-
-/*
-	return a zero float (ZRF 4)
-*/
-
-#include "FP_types.h"
-
-void
-zrf4(l)
-SINGLE	*l;
-{
-	*l = 0L;
-}
Index: trunk/minix/lib/float/zrf8.c
===================================================================
--- trunk/minix/lib/float/zrf8.c	(revision 9)
+++ 	(revision )
@@ -1,21 +1,0 @@
-/*
-  (c) copyright 1988 by the Vrije Universiteit, Amsterdam, The Netherlands.
-  See the copyright notice in the ACK home directory, in the file "Copyright".
-*/
-
-/* $Header: /cvsup/minix/src/lib/float/zrf8.c,v 1.1.1.1 2005/04/21 14:56:11 beng Exp $ */
-
-/*
-	return a zero double (ZRF 8)
-*/
-
-#include "FP_types.h"
-
-void
-zrf8(z)
-DOUBLE	*z;
-{
-
-	z->d[0] = 0L;
-	z->d[1] = 0L;
-}
Index: trunk/minix/lib/float/zrf_ext.c
===================================================================
--- trunk/minix/lib/float/zrf_ext.c	(revision 9)
+++ 	(revision )
@@ -1,22 +1,0 @@
-/*
-  (c) copyright 1988 by the Vrije Universiteit, Amsterdam, The Netherlands.
-  See the copyright notice in the ACK home directory, in the file "Copyright".
-*/
-
-/* $Header: /cvsup/minix/src/lib/float/zrf_ext.c,v 1.1.1.1 2005/04/21 14:56:11 beng Exp $ */
-
-/*
-	ZERO and return EXTEND FORMAT FLOAT
-*/
-
-#include "FP_types.h"
-
-void
-zrf_ext(e)
-EXTEND	*e;
-{
-	e->m1 = 0;
-	e->m2 = 0;
-	e->exp = 0;
-	e->sign = 0;
-}
Index: trunk/minix/lib/fphook/fltpr.c
===================================================================
--- trunk/minix/lib/fphook/fltpr.c	(revision 9)
+++ 	(revision )
@@ -1,12 +1,0 @@
-#include	<stdio.h>
-#include	<stdlib.h>
-#include	"../stdio/loc_incl.h"
-
-int _fp_hook = 1;
-
-char *
-_f_print(va_list *ap, int flags, char *s, char c, int precision)
-{
-	fprintf(stderr,"cannot print floating point\n");
-	exit(EXIT_FAILURE);
-}
Index: trunk/minix/lib/fphook/fphook.c
===================================================================
--- trunk/minix/lib/fphook/fphook.c	(revision 9)
+++ 	(revision )
@@ -1,195 +1,0 @@
-/*
- * fltpr.c - print floating point numbers
- */
-/* $Header: /cvsup/minix/src/lib/fphook/fphook.c,v 1.1.1.1 2005/04/21 14:56:11 beng Exp $ */
-
-#ifndef	NOFLOAT
-#include	<string.h>
-#include	<stdarg.h>
-#include	"../stdio/loc_incl.h"
-int _fp_hook = 1;
-
-static char *
-_pfloat(long double r, register char *s, int n, int flags)
-{
-	register char *s1;
-	int sign, dp;
-	register int i;
-
-	s1 = _fcvt(r, n, &dp, &sign);
-	if (sign)
-		*s++ = '-';
-	else if (flags & FL_SIGN)
-		*s++ = '+';
-	else if (flags & FL_SPACE)
-		*s++ = ' ';
-
-	if (dp<=0)
-		*s++ = '0';
-	for (i=dp; i>0; i--)
-		if (*s1) *s++ = *s1++;
-		else *s++ = '0';
-	if (((i=n) > 0) || (flags & FL_ALT))
-		*s++ = '.';
-	while (++dp <= 0) {
-		if (--i<0)
-			break;
-		*s++ = '0';
-	}
-	while (--i >= 0)
-		if (*s1) *s++ = *s1++;
-		else *s++ = '0';
-	return s;
-}
-
-static char *
-_pscien(long double r, register char *s, int n, int flags)
-{
-	int sign, dp; 
-	register char *s1;
-
-	s1 = _ecvt(r, n + 1, &dp, &sign);
-	if (sign)
-		*s++ = '-';
-	else if (flags & FL_SIGN)
-		*s++ = '+';
-	else if (flags & FL_SPACE)
-		*s++ = ' ';
-
-	*s++ = *s1++;
-	if ((n > 0) || (flags & FL_ALT))
-		*s++ = '.';
-	while (--n >= 0)
-		if (*s1) *s++ = *s1++;
-		else *s++ = '0';
-	*s++ = 'e';
-	if ( r != 0 ) --dp ;
-	if ( dp<0 ) {
-		*s++ = '-' ; dp= -dp ;
-	} else {
-		*s++ = '+' ;
-	}
-	if (dp >= 100) {
-		*s++ = '0' + (dp / 100);
-		dp %= 100;
-	}
-	*s++ = '0' + (dp/10);
-	*s++ = '0' + (dp%10);
-	return s;
-}
-
-#define	NDIGINEXP(exp)		(((exp) >= 100 || (exp) <= -100) ? 3 : 2)
-#define	LOW_EXP			-4
-#define	USE_EXP(exp, ndigits)	(((exp) < LOW_EXP + 1) || (exp >= ndigits + 1))
-
-static char *
-_gcvt(long double value, int ndigit, char *s, int flags)
-{
-	int sign, dp;
-	register char *s1, *s2;
-	register int i;
-	register int nndigit = ndigit;
-
-	s1 = _ecvt(value, ndigit, &dp, &sign);
-	s2 = s;
-	if (sign) *s2++ = '-';
-	else if (flags & FL_SIGN)
-		*s2++ = '+';
-	else if (flags & FL_SPACE)
-		*s2++ = ' ';
-
-	if (!(flags & FL_ALT))
-		for (i = nndigit - 1; i > 0 && s1[i] == '0'; i--)
-			nndigit--;
-
-	if (USE_EXP(dp,ndigit))	{
-		/* Use E format */
-		dp--;
-		*s2++ = *s1++;
-		if ((nndigit > 1) || (flags & FL_ALT)) *s2++ = '.';
-		while (--nndigit > 0) *s2++ = *s1++;
-		*s2++ = 'e';
-		if (dp < 0) {
-			*s2++ = '-';
-			dp = -dp;
-		}
-		else	 *s2++ = '+';
-		s2 += NDIGINEXP(dp);
-		*s2 = 0;
-		for (i = NDIGINEXP(dp); i > 0; i--) {
-			*--s2 = dp % 10 + '0';
-			dp /= 10;
-		}
-		return s;
-	}
-	/* Use f format */
-	if (dp <= 0) {
-		if (*s1 != '0')	{
-			/* otherwise the whole number is 0 */
-			*s2++ = '0';
-			*s2++ = '.';
-		}
-		while (dp < 0) {
-			dp++;
-			*s2++ = '0';
-		}
-	}
-	for (i = 1; i <= nndigit; i++) {
-		*s2++ = *s1++;
-		if (i == dp) *s2++ = '.';
-	}
-	if (i <= dp) {
-		while (i++ <= dp) *s2++ = '0';
-		*s2++ = '.';
-	}
-	if ((s2[-1]=='.') && !(flags & FL_ALT)) s2--;
-	*s2 = '\0';
-	return s;
-}
-
-char *
-_f_print(va_list *ap, int flags, char *s, char c, int precision)
-{
-	register char *old_s = s;
-	long double ld_val;
-
-	if (flags & FL_LONGDOUBLE) ld_val = va_arg(*ap, long double);
-	else ld_val = (long double) va_arg(*ap, double);
-
-	switch(c) {
-	case 'f':
-		s = _pfloat(ld_val, s, precision, flags);
-		break;
-	case 'e':
-	case 'E':
-		s = _pscien(ld_val, s, precision , flags);
-		break;
-	case 'g':
-	case 'G':
-		s = _gcvt(ld_val, precision, s, flags);
-		s += strlen(s);
-		break;
-	}
-	if ( c == 'E' || c == 'G') {
-		while (*old_s && *old_s != 'e') old_s++;
-		if (*old_s == 'e') *old_s = 'E';
-	}
-	return s;
-}
-#endif	/* NOFLOAT */
-/* $Header: /cvsup/minix/src/lib/fphook/fphook.c,v 1.1.1.1 2005/04/21 14:56:11 beng Exp $ */
-
-#include <stdlib.h>
-#include "../ansi/ext_fmt.h"
-
-void _str_ext_cvt(const char *s, char **ss, struct EXTEND *e);
-double _ext_dbl_cvt(struct EXTEND *e);
-
-double
-strtod(const char *p, char **pp)
-{
-	struct EXTEND e;
-
-	_str_ext_cvt(p, pp, &e);
-	return _ext_dbl_cvt(&e);
-}
Index: trunk/minix/lib/fphook/strtod.c
===================================================================
--- trunk/minix/lib/fphook/strtod.c	(revision 9)
+++ 	(revision )
@@ -1,9 +1,0 @@
-#include	<stdio.h>
-#include	<stdlib.h>
-
-double
-strtod(const char *p, char **pp)
-{
-	fprintf(stderr,"cannot print floating point\n");
-	exit(EXIT_FAILURE);
-}
Index: trunk/minix/lib/generate.sh
===================================================================
--- trunk/minix/lib/generate.sh	(revision 9)
+++ 	(revision )
@@ -1,257 +1,0 @@
-#!/bin/sh
-# called with parameters: 1:dir 2:ackbase 3:gnubase
-
-exec  >Makefile
-exec 3>Makedepend-ack
-exec 4>Makedepend-gnu
-touch  .depend-ack
-touch  .depend-gnu
-
-echo "#Generated from $1/Makefile.in"
-
-ACKBASE=$2
-GNUBASE=$3
-OBJDIR=$1
-
-RECURSIVE_TARGETS="clean depend depend-ack depend-gnu"
-
-if [ -z $ACKBASE ]; then echo ACKBASE is not set!; exit 1; fi
-if [ -z $GNUBASE ]; then echo GNUBASE is not set!; exit 1; fi
-
-. Makefile.in
-
-#to enable library debugging, enable the next line
-#CFLAGS=$CFLAGS" -g"
-
-echo "all: all-ack"
-echo
-echo "all-ack:"
-echo "all-gnu:"
-echo
-echo "makefiles: Makefile"
-echo "Makedepend-ack Makedepend-gnu: "
-echo "	sh $0 $OBJDIR $ACKBASE $GNUBASE"
-echo
-echo "Makefile: Makefile.in Makedepend-ack Makedepend-gnu"
-echo "	sh $0 $OBJDIR $ACKBASE $GNUBASE"
-echo "	@echo"
-echo "	@echo *Attention*"
-echo "	@echo Makefile is regenerated... rerun command to see changes"
-echo "	@echo *Attention*"
-echo "	@echo"
-echo
-if [ ! -z "$SUBDIRS" ]; then
-	echo "all-ack: makefiles"
-	for dir in $SUBDIRS
-	{
-		if [ $TYPE = "both" -o $TYPE = "ack" ]; then
-			echo "	mkdir -p $ACKBASE/$OBJDIR/$dir"
-		fi
-		echo "	cd $dir && \$(MAKE) \$@"
-	}
-	echo
-	echo "all-gnu: makefiles"
-	for dir in $SUBDIRS
-	{
-		if [ $TYPE = "both" -o $TYPE = "gnu" ]; then
-			echo "	mkdir -p $GNUBASE/$OBJDIR/$dir"
-		fi
-		
-		echo "	cd $dir && \$(MAKE) \$@"
-	}
-	echo
-	echo "$RECURSIVE_TARGETS:: makefiles"
-	for dir in $SUBDIRS
-	{
-		#if [ $TYPE = "both" -o $TYPE = "ack" ]; then
-			#echo "	mkdir -p $ACKBASE/$OBJDIR/$dir"
-		#fi
-		#if [ $TYPE = "both" -o $TYPE = "gnu" ]; then
-			#echo "	mkdir -p $GNUBASE/$OBJDIR/$dir"
-		#fi
-		
-		echo "	cd $dir && \$(MAKE) \$@"
-	}
-	echo
-	for dir in $SUBDIRS
-	{
-		echo "makefiles: $dir/Makefile"
-	}
-	echo
-	for dir in $SUBDIRS
-	{
-		echo "$dir/Makefile: $dir/Makefile.in"
-		echo "	cd $dir && sh ../$0 $OBJDIR/$dir ../$ACKBASE ../$GNUBASE && \$(MAKE) makefiles"
-	}
-else
-
-echo "depend: depend-ack"
-
-echo "depend-ack:" >&3
-echo "	rm .depend-ack" >&3
-echo "	touch .depend-ack" >&3
-
-echo "depend-gnu:" >&4
-echo "	rm .depend-gnu" >&4
-echo "	touch .depend-gnu" >&4
-
-ackCommands()
-{
-	dstfile=$1
-	srcfile=$2
-	dstdir=`dirname $dstfile`
-	
-	case $srcfile in
-	*.s | *.c | *.e )
-		echo "	cc $CFLAGS -c -o $dstfile $srcfile"
-		
-		echo "	mkdep 'cc $CFLAGS -E' $srcfile | sed -e 's:^\(.\):$dstdir/\1:' >> .depend-ack" >&3
-		;;
-	*.mod )
-		echo "	m2 $M2FLAGS -c -o $dstfile $srcfile"
-		
-		echo "	mkdep 'm2 $M2FLAGS -E' $srcfile | sed -e 's:^\(.\):$dstdir/\1:' >> .depend-ack" >&3
-		;;
-	*.fc )
-		echo "	sh ./FP.compile $dstfile $srcfile"
-		
-		echo "	mkdep 'cc -E' $srcfile | sed -e 's:^\(.\):$dstdir/\1:' >> .depend-ack" >&3
-		;;
-	esac
-}
-
-gnuCommands()
-{
-	dstfile=$1
-	srcfile=$2
-	dstdir=`dirname $dstfile`
-	sedcmd="sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):$dstdir/\1:'"
-	
-	case $srcfile in
-	*.s )
-		echo "	gcc $CFLAGS -E -x assembler-with-cpp -I. $srcfile | asmconv -mi386 ack gnu > $GNUBASE/$OBJDIR/$srcfile.gnu || true"
-		echo "	gas -o $dstfile $GNUBASE/$OBJDIR/$srcfile.gnu"
-		
-		echo "	mkdep 'gcc $CFLAGS -E -x assembler-with-cpp -I.' $srcfile | $sedcmd >> .depend-gnu" >&4
-		;;
-	*.gs )
-		echo "	gas -o $dstfile $srcfile"
-		
-		echo "	mkdep 'gcc $CFLAGS -E -x assembler-with-cpp -I.' $srcfile | $sedcmd >> .depend-gnu" >&4
-		;;
-	*.c )
-		echo "	gcc $CFLAGS -c -o $dstfile $srcfile"
-		
-		echo "	mkdep 'gcc $CFLAGS -E' $srcfile | $sedcmd >> .depend-gnu" >&4
-		;;
-	#*.mod )
-	#	echo "	\$(M2C) -o $dstfile $srcfile"
-	#	;;
-	#*.fc )
-	#	echo "	sh ./FP.COMPILE $srcfile"
-	#	;;
-	esac
-	echo
-}
-
-#libraries
-for lib in $LIBRARIES
-{
-	if [ $TYPE = "both" -o $TYPE = "ack" ]; then
-		echo "all-ack: $ACKBASE/$lib.a"
-		eval "FILES=\$${lib}_FILES" 
-		echo
-		for f in $FILES
-		{
-			o=`echo $f | sed -e 's/\\..*\$/\.o/'`
-			echo "$ACKBASE/$lib.a: $ACKBASE/$lib.a($o)"
-		}
-		echo
-		echo "$ACKBASE/$lib.a:"
-		echo "	ar cr $ACKBASE/$lib.a $ACKBASE/$OBJDIR/*.o"
-		echo "	rm $ACKBASE/$OBJDIR/*.o"
-		echo
-		for f in $FILES
-		{
-			o=`echo $f | sed -e 's/\\..*\$/\.o/'`
-			echo "$ACKBASE/$lib.a($o): $f"
-			
-			ackCommands $ACKBASE/$OBJDIR/$o $f
-		}
-		echo
-	fi
-	
-	if [ $TYPE = "both" -o $TYPE = "gnu" ]; then
-		echo "all-gnu: $GNUBASE/$lib.a"
-		eval "FILES=\$${lib}_FILES" 
-		echo
-		for f in $FILES
-		{
-			o=`echo $f | sed -e 's/\\..*\$/\.o/'`
-			echo "$GNUBASE/$lib.a: $GNUBASE/$OBJDIR/$o"
-		}
-		echo
-		echo "$GNUBASE/$lib.a:"
-		echo "	gar cr $GNUBASE/$lib.a \$?"
-		echo
-		for f in $FILES
-		{
-			o=`echo $f | sed -e 's/\\..*\$/\.o/'`
-			
-			echo "$GNUBASE/$OBJDIR/$o: $f"
-			
-			gnuCommands $GNUBASE/$OBJDIR/$o $f
-		}
-		echo
-	fi
-}
-echo
-
-#start files
-for f in $STARTFILES
-{
-	o=`echo $f | sed -e 's/\\..*\$/\.o/'`
-	
-	if [ $TYPE = "both" -o $TYPE = "ack" ]; then
-		echo "all-ack: $ACKBASE/$o"
-		echo
-		echo "$ACKBASE/$o: $f"
-		ackCommands $ACKBASE/$o $f
-		echo
-	fi
-	if [ $TYPE = "both" -o $TYPE = "gnu" ]; then
-		echo "all-gnu: $GNUBASE/$o"
-		echo
-		echo "$GNUBASE/$o: $f"
-		gnuCommands $GNUBASE/$o $f
-		echo
-	fi
-}
-
-fi # elif of if [ -n "$SUBDIRS" ]
-echo
-echo "clean::"
-if [ $TYPE = "both" -o $TYPE = "ack" ]; then
-	echo "	rm -f $ACKBASE/$OBJDIR/*"
-fi
-if [ $TYPE = "both" -o $TYPE = "gnu" ]; then
-	echo "	rm -f $GNUBASE/$OBJDIR/*"
-fi
-
-if [ $OBJDIR = "." ]; then
-	echo
-	echo "install: install-ack"
-	echo
-	echo "install-ack: all-ack"
-	echo "	cp $ACKBASE/*.[ao] /usr/lib/i386"
-	echo
-	echo "install-gnu: all-gnu"
-	echo "	cp $GNUBASE/*.[ao] /usr/gnu/lib"
-fi
-
-echo
-echo "include Makedepend-ack"
-echo "include .depend-ack"
-echo
-echo "include Makedepend-gnu"
-echo "include .depend-gnu"
Index: trunk/minix/lib/gnu/Makefile
===================================================================
--- trunk/minix/lib/gnu/Makefile	(revision 9)
+++ 	(revision )
@@ -1,55 +1,0 @@
-#Generated from ./gnu/Makefile.in
-all: all-ack
-
-all-ack:
-all-gnu:
-
-makefiles: Makefile
-Makedepend-ack Makedepend-gnu: 
-	sh ../generate.sh ./gnu ../obj-ack/ ../obj-gnu
-
-Makefile: Makefile.in Makedepend-ack Makedepend-gnu
-	sh ../generate.sh ./gnu ../obj-ack/ ../obj-gnu
-	@echo
-	@echo *Attention*
-	@echo Makefile is regenerated... rerun command to see changes
-	@echo *Attention*
-	@echo
-
-all-ack: makefiles
-	cd end && $(MAKE) $@
-	cd ieee_float && $(MAKE) $@
-	cd rts && $(MAKE) $@
-
-all-gnu: makefiles
-	mkdir -p ../obj-gnu/./gnu/end
-	cd end && $(MAKE) $@
-	mkdir -p ../obj-gnu/./gnu/ieee_float
-	cd ieee_float && $(MAKE) $@
-	mkdir -p ../obj-gnu/./gnu/rts
-	cd rts && $(MAKE) $@
-
-clean depend depend-ack depend-gnu:: makefiles
-	cd end && $(MAKE) $@
-	cd ieee_float && $(MAKE) $@
-	cd rts && $(MAKE) $@
-
-makefiles: end/Makefile
-makefiles: ieee_float/Makefile
-makefiles: rts/Makefile
-
-end/Makefile: end/Makefile.in
-	cd end && sh ../../generate.sh ./gnu/end ../../obj-ack/ ../../obj-gnu && $(MAKE) makefiles
-ieee_float/Makefile: ieee_float/Makefile.in
-	cd ieee_float && sh ../../generate.sh ./gnu/ieee_float ../../obj-ack/ ../../obj-gnu && $(MAKE) makefiles
-rts/Makefile: rts/Makefile.in
-	cd rts && sh ../../generate.sh ./gnu/rts ../../obj-ack/ ../../obj-gnu && $(MAKE) makefiles
-
-clean::
-	rm -f ../obj-gnu/./gnu/*
-
-include Makedepend-ack
-include .depend-ack
-
-include Makedepend-gnu
-include .depend-gnu
Index: trunk/minix/lib/gnu/Makefile.in
===================================================================
--- trunk/minix/lib/gnu/Makefile.in	(revision 9)
+++ 	(revision )
@@ -1,7 +1,0 @@
-
-SUBDIRS=" \
-	end \
-	ieee_float \
-	rts"
-
-TYPE=gnu
Index: trunk/minix/lib/gnu/end/Makedepend-ack
===================================================================
--- trunk/minix/lib/gnu/end/Makedepend-ack	(revision 9)
+++ 	(revision )
@@ -1,3 +1,0 @@
-depend-ack:
-	rm .depend-ack
-	touch .depend-ack
Index: trunk/minix/lib/gnu/end/Makedepend-gnu
===================================================================
--- trunk/minix/lib/gnu/end/Makedepend-gnu	(revision 9)
+++ 	(revision )
@@ -1,4 +1,0 @@
-depend-gnu:
-	rm .depend-gnu
-	touch .depend-gnu
-	mkdep 'gcc  -E -x assembler-with-cpp -I.' gnu_end.gs | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../../obj-gnu/./gnu/end/\1:' >> .depend-gnu
Index: trunk/minix/lib/gnu/end/Makefile
===================================================================
--- trunk/minix/lib/gnu/end/Makefile	(revision 9)
+++ 	(revision )
@@ -1,40 +1,0 @@
-#Generated from ./gnu/end/Makefile.in
-all: all-ack
-
-all-ack:
-all-gnu:
-
-makefiles: Makefile
-Makedepend-ack Makedepend-gnu: 
-	sh ../../generate.sh ./gnu/end ../../obj-ack/ ../../obj-gnu
-
-Makefile: Makefile.in Makedepend-ack Makedepend-gnu
-	sh ../../generate.sh ./gnu/end ../../obj-ack/ ../../obj-gnu
-	@echo
-	@echo *Attention*
-	@echo Makefile is regenerated... rerun command to see changes
-	@echo *Attention*
-	@echo
-
-depend: depend-ack
-all-gnu: ../../obj-gnu/end.a
-
-../../obj-gnu/end.a: ../../obj-gnu/./gnu/end/gnu_end.o
-
-../../obj-gnu/end.a:
-	gar cr ../../obj-gnu/end.a $?
-
-../../obj-gnu/./gnu/end/gnu_end.o: gnu_end.gs
-	gas -o ../../obj-gnu/./gnu/end/gnu_end.o gnu_end.gs
-
-
-
-
-clean::
-	rm -f ../../obj-gnu/./gnu/end/*
-
-include Makedepend-ack
-include .depend-ack
-
-include Makedepend-gnu
-include .depend-gnu
Index: trunk/minix/lib/gnu/end/Makefile.in
===================================================================
--- trunk/minix/lib/gnu/end/Makefile.in	(revision 9)
+++ 	(revision )
@@ -1,7 +1,0 @@
-
-LIBRARIES=end
-
-end_FILES=gnu_end.gs
-
-TYPE=gnu
-
Index: trunk/minix/lib/gnu/end/gnu_end.gs
===================================================================
--- trunk/minix/lib/gnu/end/gnu_end.gs	(revision 9)
+++ 	(revision )
@@ -1,5 +1,0 @@
-
-.stabs "endbss",11,0,0,0
-.stabs "__end",1,0,0,0
-
-
Index: trunk/minix/lib/gnu/ieee_float/Makedepend-ack
===================================================================
--- trunk/minix/lib/gnu/ieee_float/Makedepend-ack	(revision 9)
+++ 	(revision )
@@ -1,3 +1,0 @@
-depend-ack:
-	rm .depend-ack
-	touch .depend-ack
Index: trunk/minix/lib/gnu/ieee_float/Makedepend-gnu
===================================================================
--- trunk/minix/lib/gnu/ieee_float/Makedepend-gnu	(revision 9)
+++ 	(revision )
@@ -1,9 +1,0 @@
-depend-gnu:
-	rm .depend-gnu
-	touch .depend-gnu
-	mkdep 'gcc -O -I.. -E' frexp.c | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../../obj-gnu/./gnu/ieee_float/\1:' >> .depend-gnu
-	mkdep 'gcc -O -I.. -E' isinf.c | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../../obj-gnu/./gnu/ieee_float/\1:' >> .depend-gnu
-	mkdep 'gcc -O -I.. -E' isnan.c | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../../obj-gnu/./gnu/ieee_float/\1:' >> .depend-gnu
-	mkdep 'gcc -O -I.. -E' ldexp.c | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../../obj-gnu/./gnu/ieee_float/\1:' >> .depend-gnu
-	mkdep 'gcc -O -I.. -E' modf.c | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../../obj-gnu/./gnu/ieee_float/\1:' >> .depend-gnu
-	mkdep 'gcc -O -I.. -E' fphook.c | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../../obj-gnu/./gnu/ieee_float/\1:' >> .depend-gnu
Index: trunk/minix/lib/gnu/ieee_float/Makefile
===================================================================
--- trunk/minix/lib/gnu/ieee_float/Makefile	(revision 9)
+++ 	(revision )
@@ -1,60 +1,0 @@
-#Generated from ./gnu/ieee_float/Makefile.in
-all: all-ack
-
-all-ack:
-all-gnu:
-
-makefiles: Makefile
-Makedepend-ack Makedepend-gnu: 
-	sh ../../generate.sh ./gnu/ieee_float ../../obj-ack/ ../../obj-gnu
-
-Makefile: Makefile.in Makedepend-ack Makedepend-gnu
-	sh ../../generate.sh ./gnu/ieee_float ../../obj-ack/ ../../obj-gnu
-	@echo
-	@echo *Attention*
-	@echo Makefile is regenerated... rerun command to see changes
-	@echo *Attention*
-	@echo
-
-depend: depend-ack
-all-gnu: ../../obj-gnu/libc.a
-
-../../obj-gnu/libc.a: ../../obj-gnu/./gnu/ieee_float/frexp.o
-../../obj-gnu/libc.a: ../../obj-gnu/./gnu/ieee_float/isinf.o
-../../obj-gnu/libc.a: ../../obj-gnu/./gnu/ieee_float/isnan.o
-../../obj-gnu/libc.a: ../../obj-gnu/./gnu/ieee_float/ldexp.o
-../../obj-gnu/libc.a: ../../obj-gnu/./gnu/ieee_float/modf.o
-../../obj-gnu/libc.a: ../../obj-gnu/./gnu/ieee_float/fphook.o
-
-../../obj-gnu/libc.a:
-	gar cr ../../obj-gnu/libc.a $?
-
-../../obj-gnu/./gnu/ieee_float/frexp.o: frexp.c
-	gcc -O -I.. -c -o ../../obj-gnu/./gnu/ieee_float/frexp.o frexp.c
-
-../../obj-gnu/./gnu/ieee_float/isinf.o: isinf.c
-	gcc -O -I.. -c -o ../../obj-gnu/./gnu/ieee_float/isinf.o isinf.c
-
-../../obj-gnu/./gnu/ieee_float/isnan.o: isnan.c
-	gcc -O -I.. -c -o ../../obj-gnu/./gnu/ieee_float/isnan.o isnan.c
-
-../../obj-gnu/./gnu/ieee_float/ldexp.o: ldexp.c
-	gcc -O -I.. -c -o ../../obj-gnu/./gnu/ieee_float/ldexp.o ldexp.c
-
-../../obj-gnu/./gnu/ieee_float/modf.o: modf.c
-	gcc -O -I.. -c -o ../../obj-gnu/./gnu/ieee_float/modf.o modf.c
-
-../../obj-gnu/./gnu/ieee_float/fphook.o: fphook.c
-	gcc -O -I.. -c -o ../../obj-gnu/./gnu/ieee_float/fphook.o fphook.c
-
-
-
-
-clean::
-	rm -f ../../obj-gnu/./gnu/ieee_float/*
-
-include Makedepend-ack
-include .depend-ack
-
-include Makedepend-gnu
-include .depend-gnu
Index: trunk/minix/lib/gnu/ieee_float/Makefile.in
===================================================================
--- trunk/minix/lib/gnu/ieee_float/Makefile.in	(revision 9)
+++ 	(revision )
@@ -1,14 +1,0 @@
-
-CFLAGS="-O -I.."
-
-LIBRARIES=libc
-
-libc_FILES=" \
-	frexp.c \
-	isinf.c \
-	isnan.c \
-	ldexp.c \
-	modf.c \
-	fphook.c"
-
-TYPE=gnu
Index: trunk/minix/lib/gnu/ieee_float/fphook.c
===================================================================
--- trunk/minix/lib/gnu/ieee_float/fphook.c	(revision 9)
+++ 	(revision )
@@ -1,195 +1,0 @@
-/*
- * fltpr.c - print floating point numbers
- */
-/* $Header: /cvsup/minix/src/lib/gnu/ieee_float/fphook.c,v 1.1 2005/10/10 15:28:15 beng Exp $ */
-
-#ifndef	NOFLOAT
-#include	<string.h>
-#include	<stdarg.h>
-#include	"../stdio/loc_incl.h"
-int _fp_hook = 1;
-
-static char *
-_pfloat(long double r, register char *s, int n, int flags)
-{
-	register char *s1;
-	int sign, dp;
-	register int i;
-
-	s1 = _fcvt(r, n, &dp, &sign);
-	if (sign)
-		*s++ = '-';
-	else if (flags & FL_SIGN)
-		*s++ = '+';
-	else if (flags & FL_SPACE)
-		*s++ = ' ';
-
-	if (dp<=0)
-		*s++ = '0';
-	for (i=dp; i>0; i--)
-		if (*s1) *s++ = *s1++;
-		else *s++ = '0';
-	if (((i=n) > 0) || (flags & FL_ALT))
-		*s++ = '.';
-	while (++dp <= 0) {
-		if (--i<0)
-			break;
-		*s++ = '0';
-	}
-	while (--i >= 0)
-		if (*s1) *s++ = *s1++;
-		else *s++ = '0';
-	return s;
-}
-
-static char *
-_pscien(long double r, register char *s, int n, int flags)
-{
-	int sign, dp; 
-	register char *s1;
-
-	s1 = _ecvt(r, n + 1, &dp, &sign);
-	if (sign)
-		*s++ = '-';
-	else if (flags & FL_SIGN)
-		*s++ = '+';
-	else if (flags & FL_SPACE)
-		*s++ = ' ';
-
-	*s++ = *s1++;
-	if ((n > 0) || (flags & FL_ALT))
-		*s++ = '.';
-	while (--n >= 0)
-		if (*s1) *s++ = *s1++;
-		else *s++ = '0';
-	*s++ = 'e';
-	if ( r != 0 ) --dp ;
-	if ( dp<0 ) {
-		*s++ = '-' ; dp= -dp ;
-	} else {
-		*s++ = '+' ;
-	}
-	if (dp >= 100) {
-		*s++ = '0' + (dp / 100);
-		dp %= 100;
-	}
-	*s++ = '0' + (dp/10);
-	*s++ = '0' + (dp%10);
-	return s;
-}
-
-#define	NDIGINEXP(exp)		(((exp) >= 100 || (exp) <= -100) ? 3 : 2)
-#define	LOW_EXP			-4
-#define	USE_EXP(exp, ndigits)	(((exp) < LOW_EXP + 1) || (exp >= ndigits + 1))
-
-static char *
-_gcvt(long double value, int ndigit, char *s, int flags)
-{
-	int sign, dp;
-	register char *s1, *s2;
-	register int i;
-	register int nndigit = ndigit;
-
-	s1 = _ecvt(value, ndigit, &dp, &sign);
-	s2 = s;
-	if (sign) *s2++ = '-';
-	else if (flags & FL_SIGN)
-		*s2++ = '+';
-	else if (flags & FL_SPACE)
-		*s2++ = ' ';
-
-	if (!(flags & FL_ALT))
-		for (i = nndigit - 1; i > 0 && s1[i] == '0'; i--)
-			nndigit--;
-
-	if (USE_EXP(dp,ndigit))	{
-		/* Use E format */
-		dp--;
-		*s2++ = *s1++;
-		if ((nndigit > 1) || (flags & FL_ALT)) *s2++ = '.';
-		while (--nndigit > 0) *s2++ = *s1++;
-		*s2++ = 'e';
-		if (dp < 0) {
-			*s2++ = '-';
-			dp = -dp;
-		}
-		else	 *s2++ = '+';
-		s2 += NDIGINEXP(dp);
-		*s2 = 0;
-		for (i = NDIGINEXP(dp); i > 0; i--) {
-			*--s2 = dp % 10 + '0';
-			dp /= 10;
-		}
-		return s;
-	}
-	/* Use f format */
-	if (dp <= 0) {
-		if (*s1 != '0')	{
-			/* otherwise the whole number is 0 */
-			*s2++ = '0';
-			*s2++ = '.';
-		}
-		while (dp < 0) {
-			dp++;
-			*s2++ = '0';
-		}
-	}
-	for (i = 1; i <= nndigit; i++) {
-		*s2++ = *s1++;
-		if (i == dp) *s2++ = '.';
-	}
-	if (i <= dp) {
-		while (i++ <= dp) *s2++ = '0';
-		*s2++ = '.';
-	}
-	if ((s2[-1]=='.') && !(flags & FL_ALT)) s2--;
-	*s2 = '\0';
-	return s;
-}
-
-char *
-_f_print(va_list *ap, int flags, char *s, char c, int precision)
-{
-	register char *old_s = s;
-	long double ld_val;
-
-	if (flags & FL_LONGDOUBLE) ld_val = va_arg(*ap, long double);
-	else ld_val = (long double) va_arg(*ap, double);
-
-	switch(c) {
-	case 'f':
-		s = _pfloat(ld_val, s, precision, flags);
-		break;
-	case 'e':
-	case 'E':
-		s = _pscien(ld_val, s, precision , flags);
-		break;
-	case 'g':
-	case 'G':
-		s = _gcvt(ld_val, precision, s, flags);
-		s += strlen(s);
-		break;
-	}
-	if ( c == 'E' || c == 'G') {
-		while (*old_s && *old_s != 'e') old_s++;
-		if (*old_s == 'e') *old_s = 'E';
-	}
-	return s;
-}
-#endif	/* NOFLOAT */
-/* $Header: /cvsup/minix/src/lib/gnu/ieee_float/fphook.c,v 1.1 2005/10/10 15:28:15 beng Exp $ */
-
-#include <stdlib.h>
-#include "../ansi/ext_fmt.h"
-
-void _str_ext_cvt(const char *s, char **ss, struct EXTEND *e);
-double _ext_dbl_cvt(struct EXTEND *e);
-
-double
-strtod(const char *p, char **pp)
-{
-	struct EXTEND e;
-
-	_str_ext_cvt(p, pp, &e);
-	return _ext_dbl_cvt(&e);
-}
Index: trunk/minix/lib/gnu/ieee_float/frexp.c
===================================================================
--- trunk/minix/lib/gnu/ieee_float/frexp.c	(revision 9)
+++ 	(revision )
@@ -1,60 +1,0 @@
-/*
-libc/ieee_float/frexp.c
-
-Created:	Oct 14, 1993 by Philip Homburg <philip@cs.vu.nl>
-
-Implementation of frexp that directly manipulates the exponent bits in an
-ieee float
-*/
-
-#include <sys/types.h>
-#include <math.h>
-
-#include "ieee_float.h"
-
-double frexp(value, eptr)
-double value;
-int *eptr;
-{
-	struct f64 *f64p;
-	int exp, exp_bias;
-	double factor;
-
-	f64p= (struct f64 *)&value;
-	exp_bias= 0;
-
-	exp= F64_GET_EXP(f64p);
-	if (exp == F64_EXP_MAX)
-	{	/* Either infinity or Nan */
-		*eptr= 0;
-		return value;
-	}
-	if (exp == 0)
-	{
-		/* Either 0 or denormal */
-		if (F64_GET_MANT_LOW(f64p) == 0 &&
-			F64_GET_MANT_HIGH(f64p) == 0)
-		{
-			*eptr= 0;
-			return value;
-		}
-
-		/* Multiply by 2^64 */
-		factor= 65536.0;	/* 2^16 */
-		factor *= factor;	/* 2^32 */
-		factor *= factor;	/* 2^64 */
-		value *= factor;
-		exp_bias= 64;
-		exp= F64_GET_EXP(f64p);
-	}
-
-	exp= exp - F64_EXP_BIAS - exp_bias + 1;
-	*eptr= exp;
-	F64_SET_EXP(f64p, F64_EXP_BIAS-1);
-
-	return value;
-}
-
-/*
- * $PchId: frexp.c,v 1.3 1996/02/22 21:01:39 philip Exp $
- */
Index: trunk/minix/lib/gnu/ieee_float/ieee_float.h
===================================================================
--- trunk/minix/lib/gnu/ieee_float/ieee_float.h	(revision 9)
+++ 	(revision )
@@ -1,51 +1,0 @@
-/*
-libc/ieee_float/ieee_float.h
-
-Created:	Oct 14, 1993 by Philip Homburg <philip@cs.vu.nl>
-
-Define structures and macros for manipulating IEEE floats
-*/
-
-#ifndef IEEE_FLOAT_H
-#define IEEE_FLOAT_H
-
-#define isnan __IsNan
-
-struct f64
-{
-	u32_t low_word;
-	u32_t high_word;
-};
-
-#define F64_SIGN_SHIFT	31
-#define F64_SIGN_MASK	1
-
-#define F64_EXP_SHIFT	20
-#define F64_EXP_MASK	0x7ff
-#define F64_EXP_BIAS	1023
-#define F64_EXP_MAX	2047
-
-#define F64_MANT_SHIFT	0
-#define F64_MANT_MASK	0xfffff
-
-#define F64_GET_SIGN(fp)	(((fp)->high_word >> F64_SIGN_SHIFT) & \
-					F64_SIGN_MASK)
-#define F64_GET_EXP(fp)		(((fp)->high_word >> F64_EXP_SHIFT) & \
-					F64_EXP_MASK)
-#define F64_SET_EXP(fp, val)	((fp)->high_word= ((fp)->high_word &	\
-				~(F64_EXP_MASK << F64_EXP_SHIFT)) | 	\
-				(((val) & F64_EXP_MASK) << F64_EXP_SHIFT))
-
-#define F64_GET_MANT_LOW(fp)		((fp)->low_word)
-#define F64_SET_MANT_LOW(fp, val)	((fp)->low_word= (val))
-#define F64_GET_MANT_HIGH(fp)	(((fp)->high_word >> F64_MANT_SHIFT) & \
-					F64_MANT_MASK)
-#define F64_SET_MANT_HIGH(fp, val)	((fp)->high_word= ((fp)->high_word & \
-				~(F64_MANT_MASK << F64_MANT_SHIFT)) |	\
-				(((val) & F64_MANT_MASK) << F64_MANT_SHIFT))
-
-#endif /* IEEE_FLOAT_H */
-
-/*
- * $PchId: ieee_float.h,v 1.3 1996/02/22 21:01:39 philip Exp $
- */
Index: trunk/minix/lib/gnu/ieee_float/isinf.c
===================================================================
--- trunk/minix/lib/gnu/ieee_float/isinf.c	(revision 9)
+++ 	(revision )
@@ -1,31 +1,0 @@
-/*
-libc/ieee_float/isinf.c
-
-Created:	Oct 14, 1993 by Philip Homburg <philip@cs.vu.nl>
-
-Implementation of isinf that directly tests the bits in an ieee float
-*/
-
-#define _MINIX_SOURCE
-
-#include <sys/types.h>
-#include <math.h>
-
-#include "ieee_float.h"
-
-int isinf(value)
-double value;
-{
-	struct f64 *f64p;
-	int exp;
-
-	f64p= (struct f64 *)&value;
-	exp= F64_GET_EXP(f64p);
-	if (exp != F64_EXP_MAX)
-		return 0;
-	return F64_GET_MANT_LOW(f64p) == 0 && F64_GET_MANT_HIGH(f64p) == 0;
-}
-
-/*
- * $PchId: isinf.c,v 1.3 1996/02/22 21:01:39 philip Exp $
- */
Index: trunk/minix/lib/gnu/ieee_float/isnan.c
===================================================================
--- trunk/minix/lib/gnu/ieee_float/isnan.c	(revision 9)
+++ 	(revision )
@@ -1,31 +1,0 @@
-/*
-libc/ieee_float/isnan.c
-
-Created:	Oct 14, 1993 by Philip Homburg <philip@cs.vu.nl>
-
-Implementation of isnan that directly tests the bits in an ieee float
-*/
-
-#define _MINIX_SOURCE
-
-#include <sys/types.h>
-#include <math.h>
-
-#include "ieee_float.h"
-
-int isnan(value)
-double value;
-{
-	struct f64 *f64p;
-	int exp;
-
-	f64p= (struct f64 *)&value;
-	exp= F64_GET_EXP(f64p);
-	if (exp != F64_EXP_MAX)
-		return 0;
-	return F64_GET_MANT_LOW(f64p) != 0 || F64_GET_MANT_HIGH(f64p) != 0;
-}
-
-/*
- * $PchId: isnan.c,v 1.3 1996/02/22 21:01:39 philip Exp $
- */
Index: trunk/minix/lib/gnu/ieee_float/ldexp.c
===================================================================
--- trunk/minix/lib/gnu/ieee_float/ldexp.c	(revision 9)
+++ 	(revision )
@@ -1,99 +1,0 @@
-/*
-libc/ieee_float/ldexp.c
-
-Created:	Oct 14, 1993 by Philip Homburg <philip@cs.vu.nl>
-
-Implementation of ldexp that directly manipulates the exponent bits in an
-ieee float
-*/
-
-#include <sys/types.h>
-#include <errno.h>
-#include <math.h>
-
-#include "ieee_float.h"
-
-double ldexp(value, exp)
-double value;
-int exp;
-{
-	struct f64 *f64p;
-	int oldexp, exp_bias;
-	double factor;
-
-	f64p= (struct f64 *)&value;
-	exp_bias= 0;
-
-	oldexp= F64_GET_EXP(f64p);
-	if (oldexp == F64_EXP_MAX)
-	{	/* Either infinity or Nan */
-		return value;
-	}
-	if (oldexp == 0)
-	{
-		/* Either 0 or denormal */
-		if (F64_GET_MANT_LOW(f64p) == 0 &&
-			F64_GET_MANT_HIGH(f64p) == 0)
-		{
-			return value;
-		}
-	}
-
-	/* If exp is too large (> 2*F64_EXP_MAX) or too small
-	 * (< -2*F64_EXP_MAX) return HUGE_VAL or 0. This prevents overflows
-	 * in exp if exp is really weird
-	 */
-	if (exp >= 2*F64_EXP_MAX)
-	{
-		errno= ERANGE;
-		return HUGE_VAL;
-	}
-	if (exp <= -2*F64_EXP_MAX)
-	{
-		errno= ERANGE;
-		return 0;
-	}
-	
-	/* Normalize a denormal */
-	if (oldexp == 0)
-	{
-		/* Multiply by 2^64 */
-		factor= 65536.0;	/* 2^16 */
-		factor *= factor;	/* 2^32 */
-		factor *= factor;	/* 2^64 */
-		value *= factor;
-		exp= -64;
-		oldexp= F64_GET_EXP(f64p);
-	}
-
-	exp= oldexp + exp;
-	if (exp >= F64_EXP_MAX)
-	{	/* Overflow */
-		errno= ERANGE;
-		return HUGE_VAL;
-	}
-	if (exp > 0)
-	{
-		/* Normal */
-		F64_SET_EXP(f64p, exp);
-		return value;
-	}
-	/* Denormal, or underflow. */
-	exp += 64;
-	F64_SET_EXP(f64p, exp);
-	/* Divide by 2^64 */
-	factor= 65536.0;	/* 2^16 */
-	factor *= factor;	/* 2^32 */
-	factor *= factor;	/* 2^64 */
-	value /= factor;
-	if (value == 0.0)
-	{
-		/* Underflow */
-		errno= ERANGE;
-	}
-	return value;
-}
-
-/*
- * $PchId: ldexp.c,v 1.3 1996/02/22 21:01:39 philip Exp $
- */
Index: trunk/minix/lib/gnu/ieee_float/modf.c
===================================================================
--- trunk/minix/lib/gnu/ieee_float/modf.c	(revision 9)
+++ 	(revision )
@@ -1,61 +1,0 @@
-/*
-libc/ieee_float/modf.c
-
-Created:	Oct 14, 1993 by Philip Homburg <philip@cs.vu.nl>
-
-Implementation of modf that directly manipulates the exponent bits in an
-ieee float
-*/
-
-#include <sys/types.h>
-#include <math.h>
-
-#include "ieee_float.h"
-
-double modf(value, iptr)
-double value;
-double *iptr;
-{
-	struct f64 *f64p;
-	double tmp;
-	int exp;
-	int mask_bits;
-	u32_t mant;
-
-	f64p= (struct f64 *)&value;
-
-	exp= F64_GET_EXP(f64p);
-	exp -= F64_EXP_BIAS;
-	if (exp < 0)
-	{
-		*iptr= 0;
-		return value;
-	}
-	mask_bits= 52-exp;
-	if (mask_bits <= 0)
-	{
-		*iptr= value;
-		return 0;
-	}
-	tmp= value;
-	if (mask_bits >= 32)
-	{
-		F64_SET_MANT_LOW(f64p, 0);
-		mask_bits -= 32;
-		mant= F64_GET_MANT_HIGH(f64p);
-		mant &= ~((1 << mask_bits)-1);
-		F64_SET_MANT_HIGH(f64p, mant);
-	}
-	else
-	{
-		mant= F64_GET_MANT_LOW(f64p);
-		mant &= ~((1 << mask_bits)-1);
-		F64_SET_MANT_LOW(f64p, mant);
-	}
-	*iptr= value;
-	return tmp-value;
-}
-
-/*
- * $PchId: modf.c,v 1.3 1996/02/22 21:01:39 philip Exp $
- */
Index: trunk/minix/lib/gnu/rts/Makedepend-ack
===================================================================
--- trunk/minix/lib/gnu/rts/Makedepend-ack	(revision 9)
+++ 	(revision )
@@ -1,3 +1,0 @@
-depend-ack:
-	rm .depend-ack
-	touch .depend-ack
Index: trunk/minix/lib/gnu/rts/Makedepend-gnu
===================================================================
--- trunk/minix/lib/gnu/rts/Makedepend-gnu	(revision 9)
+++ 	(revision )
@@ -1,7 +1,0 @@
-depend-gnu:
-	rm .depend-gnu
-	touch .depend-gnu
-	mkdep 'gcc  -E -x assembler-with-cpp -I.' _longjmp.gs | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../../obj-gnu/./gnu/rts/\1:' >> .depend-gnu
-	mkdep 'gcc  -E -x assembler-with-cpp -I.' _setjmp.gs | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../../obj-gnu/./gnu/rts/\1:' >> .depend-gnu
-	mkdep 'gcc  -E -x assembler-with-cpp -I.' longjmp.gs | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../../obj-gnu/./gnu/rts/\1:' >> .depend-gnu
-	mkdep 'gcc  -E -x assembler-with-cpp -I.' setjmp.gs | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../../obj-gnu/./gnu/rts/\1:' >> .depend-gnu
Index: trunk/minix/lib/gnu/rts/Makefile
===================================================================
--- trunk/minix/lib/gnu/rts/Makefile	(revision 9)
+++ 	(revision )
@@ -1,52 +1,0 @@
-#Generated from ./gnu/rts/Makefile.in
-all: all-ack
-
-all-ack:
-all-gnu:
-
-makefiles: Makefile
-Makedepend-ack Makedepend-gnu: 
-	sh ../../generate.sh ./gnu/rts ../../obj-ack/ ../../obj-gnu
-
-Makefile: Makefile.in Makedepend-ack Makedepend-gnu
-	sh ../../generate.sh ./gnu/rts ../../obj-ack/ ../../obj-gnu
-	@echo
-	@echo *Attention*
-	@echo Makefile is regenerated... rerun command to see changes
-	@echo *Attention*
-	@echo
-
-depend: depend-ack
-all-gnu: ../../obj-gnu/libc.a
-
-../../obj-gnu/libc.a: ../../obj-gnu/./gnu/rts/_longjmp.o
-../../obj-gnu/libc.a: ../../obj-gnu/./gnu/rts/_setjmp.o
-../../obj-gnu/libc.a: ../../obj-gnu/./gnu/rts/longjmp.o
-../../obj-gnu/libc.a: ../../obj-gnu/./gnu/rts/setjmp.o
-
-../../obj-gnu/libc.a:
-	gar cr ../../obj-gnu/libc.a $?
-
-../../obj-gnu/./gnu/rts/_longjmp.o: _longjmp.gs
-	gas -o ../../obj-gnu/./gnu/rts/_longjmp.o _longjmp.gs
-
-../../obj-gnu/./gnu/rts/_setjmp.o: _setjmp.gs
-	gas -o ../../obj-gnu/./gnu/rts/_setjmp.o _setjmp.gs
-
-../../obj-gnu/./gnu/rts/longjmp.o: longjmp.gs
-	gas -o ../../obj-gnu/./gnu/rts/longjmp.o longjmp.gs
-
-../../obj-gnu/./gnu/rts/setjmp.o: setjmp.gs
-	gas -o ../../obj-gnu/./gnu/rts/setjmp.o setjmp.gs
-
-
-
-
-clean::
-	rm -f ../../obj-gnu/./gnu/rts/*
-
-include Makedepend-ack
-include .depend-ack
-
-include Makedepend-gnu
-include .depend-gnu
Index: trunk/minix/lib/gnu/rts/Makefile.in
===================================================================
--- trunk/minix/lib/gnu/rts/Makefile.in	(revision 9)
+++ 	(revision )
@@ -1,10 +1,0 @@
-
-LIBRARIES=libc
-
-libc_FILES=" \
-	_longjmp.gs \
-	_setjmp.gs \
-	longjmp.gs \
-	setjmp.gs"
-
-TYPE=gnu
Index: trunk/minix/lib/gnu/rts/_longjmp.gs
===================================================================
--- trunk/minix/lib/gnu/rts/_longjmp.gs	(revision 9)
+++ 	(revision )
@@ -1,38 +1,0 @@
-/ _longjmp.gnu.s
-/
-/ Created:	Oct 15, 1993 by Philip Homburg <philip@cs.vu.nl>
-
-.text
-.globl __longjmp
-__longjmp:
-	movl	4(%esp), %eax		# jmp_buf
-	cmpl	$0, 0(%eax)			# save mask?
-	je		1f
-	leal	4(%eax), %ebx		# pointer to sigset_t
-	pushl	%ebx
-	call	___oldsigset		# restore mask
-	addl	$4, %esp
-	movl	4(%esp), %eax		# jmp_buf
-1:	
-	movl	8(%esp), %ecx		# result value
-	movl	12(%eax), %esp 		# restore stack pointer
-
-	movl	8(%eax), %ebx 		# restore program counter
-	movl	%ebx, 0(%esp)
-
-	pushl	%ecx			# save result code
-	
-	movl	16(%eax), %ebp		# restore frame pointer
-	movl	20(%eax), %ebx
-	movl	24(%eax), %ecx
-	movl	28(%eax), %edx
-	movl	32(%eax), %esi
-	movl	36(%eax), %edi
-	pop	%eax
-	testl	%eax, %eax
-	jz	1f
-	ret
-1:	movl	$1, %eax
-	ret
-
-/ $PchId: _longjmp.gnu.s,v 1.4 1996/03/12 19:30:02 philip Exp $
Index: trunk/minix/lib/gnu/rts/_setjmp.gs
===================================================================
--- trunk/minix/lib/gnu/rts/_setjmp.gs	(revision 9)
+++ 	(revision )
@@ -1,32 +1,0 @@
-/ _setjmp.gnu.s
-/
-/ Created:	Oct 14, 1993 by Philip Homburg <philip@cs.vu.nl>
-
-.text
-.globl ___setjmp
-___setjmp:
-	movl	4(%esp), %eax		# jmp_buf
-	movl	%ebx, 20(%eax)		# save ebx
-	movl	0(%esp), %ebx
-	movl	%ebx, 8(%eax)		# save program counter
-	movl	%esp, 12(%eax)		# save stack pointer
-	movl	%ebp, 16(%eax)		# save frame pointer
-	movl	20(%eax), %ebx 		# restore ebx
-	movl	%ecx, 24(%eax)
-	movl	%edx, 28(%eax)
-	movl	%esi, 32(%eax)
-	movl	%edi, 36(%eax)
-	
-	movl	8(%esp), %ebx		# save mask?
-	movl	%ebx, 0(%eax)		# save whether to restore mask
-	testl	%ebx, %ebx
-	jz		1f
-	leal	4(%eax), %ebx		# pointer to sigset_t
-	pushl	%ebx
-	call	___newsigset		# save mask	
-	addl	$4, %esp
-1:
-	movl	$0, %eax
-	ret
-
-/ $PchId: _setjmp.gnu.s,v 1.4 1996/03/12 19:30:54 philip Exp $
Index: trunk/minix/lib/gnu/rts/longjmp.gs
===================================================================
--- trunk/minix/lib/gnu/rts/longjmp.gs	(revision 9)
+++ 	(revision )
@@ -1,6 +1,0 @@
-	.text
-.globl	_longjmp
-_longjmp:
-	jmp	__longjmp
-
-/ $PchId: longjmp.gnu.s,v 1.4 1996/03/12 19:31:18 philip Exp $
Index: trunk/minix/lib/gnu/rts/setjmp.gs
===================================================================
--- trunk/minix/lib/gnu/rts/setjmp.gs	(revision 9)
+++ 	(revision )
@@ -1,6 +1,0 @@
-	.text
-.globl	_setjmp
-_setjmp:
-	jmp	___setjmp
-
-/ $PchId: setjmp.gnu.s,v 1.4 1996/03/12 19:31:18 philip Exp $
Index: trunk/minix/lib/i386/Makefile
===================================================================
--- trunk/minix/lib/i386/Makefile	(revision 9)
+++ 	(revision )
@@ -1,67 +1,0 @@
-#Generated from ./i386/Makefile.in
-all: all-ack
-
-all-ack:
-all-gnu:
-
-makefiles: Makefile
-Makedepend-ack Makedepend-gnu: 
-	sh ../generate.sh ./i386 ../obj-ack/ ../obj-gnu
-
-Makefile: Makefile.in Makedepend-ack Makedepend-gnu
-	sh ../generate.sh ./i386 ../obj-ack/ ../obj-gnu
-	@echo
-	@echo *Attention*
-	@echo Makefile is regenerated... rerun command to see changes
-	@echo *Attention*
-	@echo
-
-all-ack: makefiles
-	mkdir -p ../obj-ack//./i386/int64
-	cd int64 && $(MAKE) $@
-	mkdir -p ../obj-ack//./i386/misc
-	cd misc && $(MAKE) $@
-	mkdir -p ../obj-ack//./i386/rts
-	cd rts && $(MAKE) $@
-	mkdir -p ../obj-ack//./i386/string
-	cd string && $(MAKE) $@
-
-all-gnu: makefiles
-	mkdir -p ../obj-gnu/./i386/int64
-	cd int64 && $(MAKE) $@
-	mkdir -p ../obj-gnu/./i386/misc
-	cd misc && $(MAKE) $@
-	mkdir -p ../obj-gnu/./i386/rts
-	cd rts && $(MAKE) $@
-	mkdir -p ../obj-gnu/./i386/string
-	cd string && $(MAKE) $@
-
-clean depend depend-ack depend-gnu:: makefiles
-	cd int64 && $(MAKE) $@
-	cd misc && $(MAKE) $@
-	cd rts && $(MAKE) $@
-	cd string && $(MAKE) $@
-
-makefiles: int64/Makefile
-makefiles: misc/Makefile
-makefiles: rts/Makefile
-makefiles: string/Makefile
-
-int64/Makefile: int64/Makefile.in
-	cd int64 && sh ../../generate.sh ./i386/int64 ../../obj-ack/ ../../obj-gnu && $(MAKE) makefiles
-misc/Makefile: misc/Makefile.in
-	cd misc && sh ../../generate.sh ./i386/misc ../../obj-ack/ ../../obj-gnu && $(MAKE) makefiles
-rts/Makefile: rts/Makefile.in
-	cd rts && sh ../../generate.sh ./i386/rts ../../obj-ack/ ../../obj-gnu && $(MAKE) makefiles
-string/Makefile: string/Makefile.in
-	cd string && sh ../../generate.sh ./i386/string ../../obj-ack/ ../../obj-gnu && $(MAKE) makefiles
-
-clean::
-	rm -f ../obj-ack//./i386/*
-	rm -f ../obj-gnu/./i386/*
-
-include Makedepend-ack
-include .depend-ack
-
-include Makedepend-gnu
-include .depend-gnu
Index: trunk/minix/lib/i386/Makefile.in
===================================================================
--- trunk/minix/lib/i386/Makefile.in	(revision 9)
+++ 	(revision )
@@ -1,9 +1,0 @@
-# Makefile for lib/i386.
-
-SUBDIRS="\
-	int64 \
-	misc \
-	rts \
-	string"
-
-TYPE=both
Index: trunk/minix/lib/i386/em/byte_order.h
===================================================================
--- trunk/minix/lib/i386/em/byte_order.h	(revision 9)
+++ 	(revision )
@@ -1,6 +1,0 @@
-#define CHAR_UNSIGNED	0
-#define MSB_AT_LOW_ADDRESS	0
-#define MSW_AT_LOW_ADDRESS	0
-#define FL_MSB_AT_LOW_ADDRESS	0
-#define FL_MSW_AT_LOW_ADDRESS	0
-#define FL_MSL_AT_LOW_ADDRESS	0
Index: trunk/minix/lib/i386/em/em_adf4.s
===================================================================
--- trunk/minix/lib/i386/em/em_adf4.s	(revision 9)
+++ 	(revision )
@@ -1,11 +1,0 @@
-.sect .text; .sect .rom; .sect .data; .sect .bss
-.define .adf4
-
-	.sect .text
-.adf4:
-	mov	bx,sp
-	flds	4(bx)
-	fadds	8(bx)
-	fstps	8(bx)
-	wait
-	ret
Index: trunk/minix/lib/i386/em/em_adf8.s
===================================================================
--- trunk/minix/lib/i386/em/em_adf8.s	(revision 9)
+++ 	(revision )
@@ -1,11 +1,0 @@
-.sect .text; .sect .rom; .sect .data; .sect .bss
-.define .adf8
-
-	.sect .text
-.adf8:
-	mov	bx,sp
-	fldd	4(bx)
-	faddd	12(bx)
-	fstpd	12(bx)
-	wait
-	ret
Index: trunk/minix/lib/i386/em/em_adi.s
===================================================================
--- trunk/minix/lib/i386/em/em_adi.s	(revision 9)
+++ 	(revision )
@@ -1,18 +1,0 @@
-.sect .text; .sect .rom; .sect .data; .sect .bss
-.define .adi
-
-	! #bytes in ecx , top of stack in eax
-	.sect .text
-.adi:
-	pop     ebx              ! return address
-	cmp     ecx,4
-	jne     9f
-	pop     ecx
-	add     eax,ecx
-	jmp     ebx
-9:
-.extern	EODDZ
-.extern .trp
-	mov     eax,EODDZ
-	push	ebx
-	jmp     .trp
Index: trunk/minix/lib/i386/em/em_and.s
===================================================================
--- trunk/minix/lib/i386/em/em_and.s	(revision 9)
+++ 	(revision )
@@ -1,20 +1,0 @@
-.sect .text; .sect .rom; .sect .data; .sect .bss
-.define	.and
-
-	! #bytes in ecx
-	! save edi; it might be a register variable
-
-	.sect .text
-.and:
-	pop	ebx		! return address
-	mov	edx,edi
-	mov	edi,esp
-	add	edi,ecx
-	sar	ecx,2
-1:
-	pop	eax
-	and	eax,(edi)
-	stos
-	loop	1b
-	mov	edi,edx
-	jmp	ebx
Index: trunk/minix/lib/i386/em/em_blm.s
===================================================================
--- trunk/minix/lib/i386/em/em_blm.s	(revision 9)
+++ 	(revision )
@@ -1,16 +1,0 @@
-.sect .text; .sect .rom; .sect .data; .sect .bss
-.sect .text
-.define .blm
-
-	! ecx: count in words
-.blm:
-	mov	ebx,esp
-	mov	eax,esi
-	mov	edx,edi
-	mov	edi,4(ebx)
-	mov	esi,8(ebx)
-	rep	movs
-	mov	esi,eax
-	mov	edi,edx
-	ret	8
-
Index: trunk/minix/lib/i386/em/em_cff4.s
===================================================================
--- trunk/minix/lib/i386/em/em_cff4.s	(revision 9)
+++ 	(revision )
@@ -1,19 +1,0 @@
-.sect .text; .sect .rom; .sect .data; .sect .bss
-.define .cff4
-
-	.sect .text
-.cff4:
-	mov	bx,sp
-	fldd	4(bx)
-	fstcw	4(bx)
-	wait
-	mov	dx,4(bx)
-	and	4(bx),0xf3ff	! set to rounding mode
-	wait
-	fldcw	4(bx)
-	fstps	8(bx)
-	mov	4(bx),dx
-	wait
-	fldcw	4(bx)
-	wait
-	ret
Index: trunk/minix/lib/i386/em/em_cff8.s
===================================================================
--- trunk/minix/lib/i386/em/em_cff8.s	(revision 9)
+++ 	(revision )
@@ -1,10 +1,0 @@
-.sect .text; .sect .rom; .sect .data; .sect .bss
-.define .cff8
-
-	.sect .text
-.cff8:
-	mov	bx,sp
-	flds	4(bx)
-	fstpd	4(bx)
-	wait
-	ret
Index: trunk/minix/lib/i386/em/em_cfi.s
===================================================================
--- trunk/minix/lib/i386/em/em_cfi.s	(revision 9)
+++ 	(revision )
@@ -1,27 +1,0 @@
-.sect .text; .sect .rom; .sect .data; .sect .bss
-.define .cfi
-
-	.sect .text
-.cfi:
-	mov	bx,sp
-	fstcw	4(bx)
-	wait
-	mov	dx,4(bx)
-	or	4(bx),0xc00	! truncating mode
-	wait
-	fldcw	4(bx)
-	cmp	8(bx),4
-	jne	2f
-				! loc 4 loc ? cfi
-	flds	12(bx)
-	fistpl	12(bx)
-1:
-	mov	4(bx),dx
-	wait
-	fldcw	4(bx)
-	ret
-2:
-				! loc 8 loc ? cfi
-	fldd	12(bx)
-	fistpl	16(bx)
-	jmp	1b
Index: trunk/minix/lib/i386/em/em_cfu.s
===================================================================
--- trunk/minix/lib/i386/em/em_cfu.s	(revision 9)
+++ 	(revision )
@@ -1,38 +1,0 @@
-.sect .text; .sect .rom; .sect .data; .sect .bss
-.define .cfu
-
-	.sect .text
-.cfu:
-	mov	bx,sp
-	fstcw	4(bx)
-	wait
-	mov	dx,4(bx)
-	or	4(bx),0xc00	! truncating mode
-	wait
-	fldcw	4(bx)
-	cmp	8(bx),4
-	jne	2f
-				! loc 4 loc ? cfu
-	flds	12(bx)
-	fabs			! ???
-	fiaddl	(bigmin)
-	fistpl	12(bx)
-	wait
-	mov	ax,12(bx)
-	sub	ax,(bigmin)
-	mov	12(bx),ax
-1:
-	mov	4(bx),dx
-	wait
-	fldcw	4(bx)
-	ret
-2:
-				! loc 8 loc ? cfu
-	fldd	12(bx)
-	fabs			! ???
-	fiaddl	(bigmin)
-	fistpl	16(bx)
-	mov	ax,16(bx)
-	sub	ax,(bigmin)
-	mov	16(bx),ax
-	jmp	1b
Index: trunk/minix/lib/i386/em/em_cif4.s
===================================================================
--- trunk/minix/lib/i386/em/em_cif4.s	(revision 9)
+++ 	(revision )
@@ -1,10 +1,0 @@
-.sect .text; .sect .rom; .sect .data; .sect .bss
-.define .cif4
-
-	.sect .text
-.cif4:
-	mov	bx,sp
-	fildl	8(bx)
-	fstps	8(bx)
-	wait
-	ret
Index: trunk/minix/lib/i386/em/em_cif8.s
===================================================================
--- trunk/minix/lib/i386/em/em_cif8.s	(revision 9)
+++ 	(revision )
@@ -1,10 +1,0 @@
-.sect .text; .sect .rom; .sect .data; .sect .bss
-.define .cif8
-
-	.sect .text
-.cif8:
-	mov	bx,sp
-	fildl	8(bx)
-	fstpd	4(bx)
-	wait
-	ret
Index: trunk/minix/lib/i386/em/em_cii.s
===================================================================
--- trunk/minix/lib/i386/em/em_cii.s	(revision 9)
+++ 	(revision )
@@ -1,31 +1,0 @@
-.sect .text; .sect .rom; .sect .data; .sect .bss
-.define .cii
-
-.sect .text
-.cii:
-	pop     ebx              ! return address
-				! pop     ecx, dest. size
-				! pop     edx, src. size
-				! eax is source
-	cmp	edx,1
-	jne	2f
-	movsxb	eax,al
-	mov	edx,4
-	jmp	1f
-2:
-	cmp	edx,2
-	jne	1f
-	cwde			! convert from 2 to 4 bytes
-	mov	edx,4
-1:
-	cmp     edx,ecx
-	jne     9f
-	cmp	edx,4
-	jne	9f
-	jmp     ebx
-9:
-.extern EILLINS
-.extern .fat
-	mov     eax,EILLINS
-	push    eax
-	jmp     .fat
Index: trunk/minix/lib/i386/em/em_cmf4.s
===================================================================
--- trunk/minix/lib/i386/em/em_cmf4.s	(revision 9)
+++ 	(revision )
@@ -1,22 +1,0 @@
-.sect .text; .sect .rom; .sect .data; .sect .bss
-.define .cmf4
-
-	.sect .text
-.cmf4:
-	mov	bx,sp
-	xor	cx,cx
-	flds	8(bx)
-	flds	4(bx)
-	fcompp			! compare and pop operands
-	fstsw	ax
-	wait
-	sahf
-	je	1f
-	jb	2f
-	dec	cx
-	jmp	1f
-2:
-	inc	cx
-1:
-	mov	ax,cx
-	ret
Index: trunk/minix/lib/i386/em/em_cmf8.s
===================================================================
--- trunk/minix/lib/i386/em/em_cmf8.s	(revision 9)
+++ 	(revision )
@@ -1,22 +1,0 @@
-.sect .text; .sect .rom; .sect .data; .sect .bss
-.define .cmf8
-
-	.sect .text
-.cmf8:
-	mov	bx,sp
-	xor	cx,cx
-	fldd	12(bx)
-	fldd	4(bx)
-	fcompp			! compare and pop operands
-	fstsw	ax
-	wait
-	sahf
-	je	1f
-	jb	2f
-	dec	cx
-	jmp	1f
-2:
-	inc	cx
-1:
-	mov	ax,cx
-	ret
Index: trunk/minix/lib/i386/em/em_cms.s
===================================================================
--- trunk/minix/lib/i386/em/em_cms.s	(revision 9)
+++ 	(revision )
@@ -1,23 +1,0 @@
-.sect .text; .sect .rom; .sect .data; .sect .bss
-.define .cms
-
-	! #bytes in ecx
-	.sect .text
-.cms:
-	pop     ebx              ! return address
-	mov     edx,esp
-	push	esi
-	push	edi
-	mov     esi,edx
-	add     edx,ecx
-	mov     edi,edx
-	add     edx,ecx
-	sar     ecx,2
-	repe cmps
-	je      1f
-	inc     ecx
-1:
-	pop	edi
-	pop	esi
-	mov     esp,edx
-	jmp     ebx
Index: trunk/minix/lib/i386/em/em_com.s
===================================================================
--- trunk/minix/lib/i386/em/em_com.s	(revision 9)
+++ 	(revision )
@@ -1,14 +1,0 @@
-.sect .text; .sect .rom; .sect .data; .sect .bss
-.define	.com
-
-	! #bytes in ecx
-	.sect .text
-.com:
-	mov	ebx,esp
-	add	ebx,4
-	sar	ecx,2
-1:
-	not	(ebx)
-	add	ebx,4
-	loop	1b
-	ret
Index: trunk/minix/lib/i386/em/em_csa4.s
===================================================================
--- trunk/minix/lib/i386/em/em_csa4.s	(revision 9)
+++ 	(revision )
@@ -1,27 +1,0 @@
-.sect .text; .sect .rom; .sect .data; .sect .bss
-.define .csa4
-
-.sect .text
-.csa4:
-				! ebx, descriptor address
-				! eax, index
-	mov     edx,(ebx)         ! default
-	sub     eax,4(ebx)
-	cmp     eax,8(ebx)
-	ja      1f
-	sal     eax,2
-	add	ebx,eax
-	mov     ebx,12(ebx)
-	test    ebx,ebx
-	jnz     2f
-1:
-	mov     ebx,edx
-	test    ebx,ebx
-	jnz     2f
-.extern ECASE
-.extern .fat
-	mov     eax,ECASE
-	push    eax
-	jmp     .fat
-2:
-	jmp     ebx
Index: trunk/minix/lib/i386/em/em_csb4.s
===================================================================
--- trunk/minix/lib/i386/em/em_csb4.s	(revision 9)
+++ 	(revision )
@@ -1,29 +1,0 @@
-.sect .text; .sect .rom; .sect .data; .sect .bss
-.define .csb4
-
-.sect .text
-.csb4:
-				!ebx, descriptor address
-				!eax,  index
-	mov	edx,(ebx)
-	mov	ecx,4(ebx)
-1:
-	add	ebx,8
-	dec     ecx
-	jl      4f
-	cmp     eax,(ebx)
-	jne     1b
-	mov	ebx,4(ebx)
-2:
-	test    ebx,ebx
-	jnz     3f
-.extern ECASE
-.extern .fat
-	mov     eax,ECASE
-	push    eax
-	jmp     .fat
-3:
-	jmp     ebx
-4:
-	mov	ebx,edx
-	jmp	2b
Index: trunk/minix/lib/i386/em/em_cuf4.s
===================================================================
--- trunk/minix/lib/i386/em/em_cuf4.s	(revision 9)
+++ 	(revision )
@@ -1,15 +1,0 @@
-.sect .text; .sect .rom; .sect .data; .sect .bss
-.define .cuf4
-
-	.sect .text
-.cuf4:
-	mov	bx,sp
-	fildl	8(bx)
-	cmp	8(bx),0
-	jge	1f
-	fisubl	(bigmin)
-	fisubl	(bigmin)
-1:
-	fstps	8(bx)
-	wait
-	ret
Index: trunk/minix/lib/i386/em/em_cuf8.s
===================================================================
--- trunk/minix/lib/i386/em/em_cuf8.s	(revision 9)
+++ 	(revision )
@@ -1,15 +1,0 @@
-.sect .text; .sect .rom; .sect .data; .sect .bss
-.define .cuf8
-
-	.sect .text
-.cuf8:
-	mov	bx,sp
-	fildl	8(bx)
-	cmp	8(bx),0
-	jge	1f
-	fisubl	(bigmin)
-	fisubl	(bigmin)
-1:
-	fstpd	4(bx)
-	wait
-	ret
Index: trunk/minix/lib/i386/em/em_cuu.s
===================================================================
--- trunk/minix/lib/i386/em/em_cuu.s	(revision 9)
+++ 	(revision )
@@ -1,22 +1,0 @@
-.sect .text; .sect .rom; .sect .data; .sect .bss
-.define .ciu
-.define .cui
-.define .cuu
-
-.sect .text
-.ciu:
-.cui:
-.cuu:
-	pop     ebx              ! return address
-				! pop     ecx, dest. size
-				! pop     edx, source size
-				! eax is source
-	cmp     edx,ecx
-	jne     8f
-	jmp     ebx
-8:
-.extern EILLINS
-.extern .fat
-	mov     eax,EILLINS
-	push    eax
-	jmp     .fat
Index: trunk/minix/lib/i386/em/em_dup.s
===================================================================
--- trunk/minix/lib/i386/em/em_dup.s	(revision 9)
+++ 	(revision )
@@ -1,17 +1,0 @@
-.sect .text; .sect .rom; .sect .data; .sect .bss
-.define	.dup
-
-	! #bytes in ecx
-	.sect .text
-.dup:
-	pop	ebx		! return address
-	mov	eax,esi
-	mov	edx,edi
-	mov	esi,esp
-	sub	esp,ecx
-	mov	edi,esp
-	sar	ecx,2
-	rep movs
-	mov	esi,eax
-	mov	edi,edx
-	jmp	ebx
Index: trunk/minix/lib/i386/em/em_dvf4.s
===================================================================
--- trunk/minix/lib/i386/em/em_dvf4.s	(revision 9)
+++ 	(revision )
@@ -1,11 +1,0 @@
-.sect .text; .sect .rom; .sect .data; .sect .bss
-.define .dvf4
-
-	.sect .text
-.dvf4:
-	mov	bx,sp
-	flds	8(bx)
-	fdivs	4(bx)
-	fstps	8(bx)
-	wait
-	ret
Index: trunk/minix/lib/i386/em/em_dvf8.s
===================================================================
--- trunk/minix/lib/i386/em/em_dvf8.s	(revision 9)
+++ 	(revision )
@@ -1,11 +1,0 @@
-.sect .text; .sect .rom; .sect .data; .sect .bss
-.define .dvf8
-
-	.sect .text
-.dvf8:
-	mov	bx,sp
-	fldd	12(bx)
-	fdivd	4(bx)
-	fstpd	12(bx)
-	wait
-	ret
Index: trunk/minix/lib/i386/em/em_dvi.s
===================================================================
--- trunk/minix/lib/i386/em/em_dvi.s	(revision 9)
+++ 	(revision )
@@ -1,21 +1,0 @@
-.sect .text; .sect .rom; .sect .data; .sect .bss
-.define .dvi
-
-        ! #bytes in eax
-	.sect .text
-.dvi:
-        pop     ebx              ! return address
-        cmp     eax,4
-        jne     1f
-        pop     eax
-        cwd
-        pop     ecx
-        idiv    ecx
-        push    eax
-        jmp     ebx
-1:
-.extern EODDZ
-.extern .trp
-        mov     eax,EODDZ
-        push    ebx
-        jmp     .trp
Index: trunk/minix/lib/i386/em/em_dvu.s
===================================================================
--- trunk/minix/lib/i386/em/em_dvu.s	(revision 9)
+++ 	(revision )
@@ -1,21 +1,0 @@
-.sect .text; .sect .rom; .sect .data; .sect .bss
-.define .dvu
-
-	! #bytes in eax
-	.sect .text
-.dvu:
-	pop     ebx              ! return address
-	cmp     eax,4
-	jne     1f
-	pop     eax
-	xor     edx,edx
-	pop     ecx
-	div     ecx
-	push    eax
-	jmp     ebx
-1:
-.extern EODDZ
-.extern .trp
-	mov     eax,EODDZ
-	push    ebx
-	jmp     .trp
Index: trunk/minix/lib/i386/em/em_error.s
===================================================================
--- trunk/minix/lib/i386/em/em_error.s	(revision 9)
+++ 	(revision )
@@ -1,32 +1,0 @@
-.sect .text; .sect .rom; .sect .data; .sect .bss
-.define .error
-.define .Xtrp
-
-	! eax is trap number
-	! all registers must be saved
-	! because return is possible
-	! May only be called with error no's <16
-.sect .text
-.error:
-	mov  ecx,eax
-	mov  ebx,1
-	sal  ebx,cl
-.extern .ignmask
-.extern .trp
-	test ebx,(.ignmask)
-	jne  2f
-	call    .trp
-2:
-	ret
-
-.Xtrp:
-	pusha
-	cmp	eax,16
-	jge	1f
-	call	.error
-	popa
-	ret
-1:
-	call	.trp
-	popa
-	ret
Index: trunk/minix/lib/i386/em/em_exg.s
===================================================================
--- trunk/minix/lib/i386/em/em_exg.s	(revision 9)
+++ 	(revision )
@@ -1,22 +1,0 @@
-.sect .text; .sect .rom; .sect .data; .sect .bss
-.define .exg
-
-	! #bytes in ecx
-.sect .text
-.exg:
-	push	edi
-	mov	edi,esp
-	add	edi,8
-	mov	ebx,edi
-	add	ebx,ecx
-	sar     ecx,2
-1:
-	mov	eax,(ebx)
-	xchg	eax,(edi)
-	mov	(ebx),eax
-	add	edi,4
-	add	ebx,4
-	loop	1b
-2:
-	pop	edi
-	ret
Index: trunk/minix/lib/i386/em/em_fat.s
===================================================================
--- trunk/minix/lib/i386/em/em_fat.s	(revision 9)
+++ 	(revision )
@@ -1,10 +1,0 @@
-.sect .text; .sect .rom; .sect .data; .sect .bss
-.sect .text
-.define .fat
-
-.fat:
-.extern .trp
-.extern .stop
-	call    .trp
-	call    .stop
-	! no return
Index: trunk/minix/lib/i386/em/em_fef4.s
===================================================================
--- trunk/minix/lib/i386/em/em_fef4.s	(revision 9)
+++ 	(revision )
@@ -1,49 +1,0 @@
-.sect .text; .sect .rom; .sect .data; .sect .bss
-.define .fef4
-
-	.sect .text
-.fef4:
-				! this could be simpler, if only the
-				! fxtract instruction was emulated properly
-	mov	bx,sp
-	mov	ax,8(bx)
-	and	ax,0x7f800000
-	je	1f		! zero exponent
-	shr	ax,23
-	sub	ax,126
-	mov	cx,ax		! exponent in cx
-	mov	ax,8(bx)
-	and	ax,0x807fffff
-	or	ax,0x3f000000	! load -1 exponent
-	mov	bx,4(bx)
-	mov	4(bx),ax
-	mov	(bx),cx
-	ret
-1:				! we get here on zero exp
-	mov	ax,8(bx)
-	and	ax,0x007fffff
-	jne	1f		! zero result
-	mov	bx,4(bx)
-	mov	(bx),ax
-	mov	4(bx),ax
-	ret
-1:				! otherwise unnormalized number
-	mov	cx,8(bx)
-	and	cx,0x807fffff
-	mov	dx,cx
-	and	cx,0x80000000
-	mov	ax,-125
-2:
-	test	dx,0x800000
-	jne	1f
-	dec	ax
-	shl	dx,1
-	or	dx,cx
-	jmp	2b
-1:
-	mov	bx,4(bx)
-	mov	(bx),ax
-	and	dx,0x807fffff
-	or	dx,0x3f000000	! load -1 exponent
-	mov	4(bx),dx
-	ret
Index: trunk/minix/lib/i386/em/em_fef8.s
===================================================================
--- trunk/minix/lib/i386/em/em_fef8.s	(revision 9)
+++ 	(revision )
@@ -1,56 +1,0 @@
-.sect .text; .sect .rom; .sect .data; .sect .bss
-.define .fef8
-
-	.sect .text
-.fef8:
-				! this could be simpler, if only the
-				! fxtract instruction was emulated properly
-	mov	bx,sp
-	mov	ax,12(bx)
-	and	ax,0x7ff00000
-	je	1f		! zero exponent
-	shr	ax,20
-	sub	ax,1022
-	mov	cx,ax		! exponent in cx
-	mov	ax,12(bx)
-	and	ax,0x800fffff
-	or	ax,0x3fe00000	! load -1 exponent
-	mov	dx,8(bx)
-	mov	bx,4(bx)
-	mov	4(bx),dx
-	mov	8(bx),ax
-	mov	(bx),cx
-	ret
-1:				! we get here on zero exp
-	mov	ax,12(bx)
-	and	ax,0xfffff
-	or	ax,8(bx)
-	jne	1f		! zero result
-	mov	bx,4(bx)
-	mov	(bx),ax
-	mov	4(bx),ax
-	mov	8(bx),ax
-	ret
-1:				! otherwise unnormalized number
-	mov	cx,12(bx)
-	and	cx,0x800fffff
-	mov	dx,cx
-	and	cx,0x80000000
-	mov	ax,-1021
-2:
-	test	dx,0x100000
-	jne	1f
-	dec	ax
-	shl	8(bx),1
-	rcl	dx,1
-	or	dx,cx
-	jmp	2b
-1:
-	and	dx,0x800fffff
-	or	dx,0x3fe00000	! load -1 exponent
-	mov	cx,8(bx)
-	mov	bx,4(bx)
-	mov	(bx),ax
-	mov	8(bx),dx
-	mov	4(bx),cx
-	ret
Index: trunk/minix/lib/i386/em/em_fif4.s
===================================================================
--- trunk/minix/lib/i386/em/em_fif4.s	(revision 9)
+++ 	(revision )
@@ -1,37 +1,0 @@
-.sect .text; .sect .rom; .sect .data; .sect .bss
-.define .fif4
-
-	.sect .text
-.fif4:
-	mov	bx,sp
-	flds	8(bx)
-	fmuls	12(bx)		! multiply
-	fld	st		! copy result
-	ftst			! test sign; handle negative separately
-	fstsw	ax
-	wait
-	sahf			! result of test in condition codes
-	jb	1f
-	frndint			! this one rounds (?)
-	fcom	st(1)		! compare with original; if <=, then OK
-	fstsw	ax
-	wait
-	sahf
-	jbe	2f
-	fisubs	(one)		! else subtract 1
-	jmp	2f
-1:				! here, negative case
-	frndint			! this one rounds (?)
-	fcom	st(1)		! compare with original; if >=, then OK
-	fstsw	ax
-	wait
-	sahf
-	jae	2f
-	fiadds	(one)		! else add 1
-2:
-	fsub	st(1),st	! subtract integer part
-	mov	bx,4(bx)
-	fstps	(bx)
-	fstps	4(bx)
-	wait
-	ret
Index: trunk/minix/lib/i386/em/em_fif8.s
===================================================================
--- trunk/minix/lib/i386/em/em_fif8.s	(revision 9)
+++ 	(revision )
@@ -1,37 +1,0 @@
-.sect .text; .sect .rom; .sect .data; .sect .bss
-.define .fif8
-
-	.sect .text
-.fif8:
-	mov	bx,sp
-	fldd	8(bx)
-	fmuld	16(bx)		! multiply
-	fld	st		! and copy result
-	ftst			! test sign; handle negative separately
-	fstsw	ax
-	wait
-	sahf			! result of test in condition codes
-	jb	1f
-	frndint			! this one rounds (?)
-	fcom	st(1)		! compare with original; if <=, then OK
-	fstsw	ax
-	wait
-	sahf
-	jbe	2f
-	fisubs	(one)		! else subtract 1
-	jmp	2f
-1:				! here, negative case
-	frndint			! this one rounds (?)
-	fcom	st(1)		! compare with original; if >=, then OK
-	fstsw	ax
-	wait
-	sahf
-	jae	2f
-	fiadds	(one)		! else add 1
-2:
-	fsub	st(1),st	! subtract integer part
-	mov	bx,4(bx)
-	fstpd	(bx)
-	fstpd	8(bx)
-	wait
-	ret
Index: trunk/minix/lib/i386/em/em_fp8087.s
===================================================================
--- trunk/minix/lib/i386/em/em_fp8087.s	(revision 9)
+++ 	(revision )
@@ -1,10 +1,0 @@
-.sect .text; .sect .rom; .sect .data; .sect .bss
-.define one, bigmin
-
-	.sect .rom
-one:
-	.data2	1
-two:
-	.data2	2
-bigmin:
-	.data4 	-2147483648
Index: trunk/minix/lib/i386/em/em_gto.s
===================================================================
--- trunk/minix/lib/i386/em/em_gto.s	(revision 9)
+++ 	(revision )
@@ -1,8 +1,0 @@
-.sect .text; .sect .rom; .sect .data; .sect .bss
-.sect .text
-.define .gto
-
-.gto:
-	mov     ebp,8(ebx)
-	mov     esp,4(ebx)
-	jmp     (ebx)
Index: trunk/minix/lib/i386/em/em_hol0.s
===================================================================
--- trunk/minix/lib/i386/em/em_hol0.s	(revision 9)
+++ 	(revision )
@@ -1,7 +1,0 @@
-.sect .text; .sect .rom; .sect .data; .sect .bss
-
-.define hol0
-.sect .data
-hol0:
-	.data4	0, 0
-	.data4	0, 0
Index: trunk/minix/lib/i386/em/em_iaar.s
===================================================================
--- trunk/minix/lib/i386/em/em_iaar.s	(revision 9)
+++ 	(revision )
@@ -1,18 +1,0 @@
-.sect .text; .sect .rom; .sect .data; .sect .bss
-.sect .text
-.define .iaar
-
-.iaar:
-	pop     ecx
-	pop     edx
-	cmp     edx,4
-.extern .unknown
-	jne     .unknown
-	pop     ebx     ! descriptor address
-	pop     eax     ! index
-	sub     eax,(ebx)
-	mul     8(ebx)
-	pop	ebx	! array base
-	add     ebx,eax
-	push	ecx
-	ret
Index: trunk/minix/lib/i386/em/em_ilar.s
===================================================================
--- trunk/minix/lib/i386/em/em_ilar.s	(revision 9)
+++ 	(revision )
@@ -1,15 +1,0 @@
-.sect .text; .sect .rom; .sect .data; .sect .bss
-.sect .text
-.define .ilar
-
-.ilar:
-	pop     ecx
-	pop     edx
-.extern .unknown
-	cmp     edx,4
-	jne     .unknown
-	pop     ebx      ! descriptor address
-	pop     eax      ! index
-	push    ecx
-.extern .lar4
-	jmp    .lar4
Index: trunk/minix/lib/i386/em/em_inn.s
===================================================================
--- trunk/minix/lib/i386/em/em_inn.s	(revision 9)
+++ 	(revision )
@@ -1,32 +1,0 @@
-.sect .text; .sect .rom; .sect .data; .sect .bss
-.sect .text
-.define .inn
-
-	! #bytes in ecx
-	! bit # in eax
-.inn:
-	xor     edx,edx
-	mov     ebx,8
-	div     ebx
-	mov     ebx,esp
-	add	ebx,4
-	add     ebx,eax
-	cmp     eax,ecx
-	jae     1f
-	movb	al,(ebx)
-	mov	ebx,edx
-	testb   al,bits(ebx)
-	jz      1f
-	mov	eax,1
-	jmp	2f
-1:
-	xor	eax,eax
-2:
-	pop	ebx
-	add     esp,ecx
-	! eax is result
-	jmp     ebx
-
-	.sect .rom
-bits:
-	.data1 1,2,4,8,16,32,64,128
Index: trunk/minix/lib/i386/em/em_ior.s
===================================================================
--- trunk/minix/lib/i386/em/em_ior.s	(revision 9)
+++ 	(revision )
@@ -1,18 +1,0 @@
-.sect .text; .sect .rom; .sect .data; .sect .bss
-.sect .text
-.define	.ior
-
-	! #bytes in ecx
-.ior:
-	pop	ebx		! return address
-	mov	edx,edi
-	mov	edi,esp
-	add	edi,ecx
-	sar	ecx,2
-1:
-	pop	eax
-	or	eax,(edi)
-	stos
-	loop	1b
-	mov	edi,edx
-	jmp	ebx
Index: trunk/minix/lib/i386/em/em_isar.s
===================================================================
--- trunk/minix/lib/i386/em/em_isar.s	(revision 9)
+++ 	(revision )
@@ -1,15 +1,0 @@
-.sect .text; .sect .rom; .sect .data; .sect .bss
-.sect .text
-.define .isar
-
-.isar:
-	pop     ecx
-	pop     eax
-	cmp     eax,4
-.extern .unknown
-	jne     .unknown
-	pop     ebx      ! descriptor address
-	pop     eax      ! index
-	push    ecx
-.extern .sar4
-	jmp    .sar4
Index: trunk/minix/lib/i386/em/em_lar4.s
===================================================================
--- trunk/minix/lib/i386/em/em_lar4.s	(revision 9)
+++ 	(revision )
@@ -1,37 +1,0 @@
-.sect .text; .sect .rom; .sect .data; .sect .bss
-.sect .text
-.define .lar4
-
-.lar4:
-				! ebx, descriptor address
-				! eax, index
-	sub     eax,(ebx)
-	mov     ecx,8(ebx)
-	imul    ecx
-	pop	ebx
-	pop	edx		! base address
-	add     edx,eax
-	sar     ecx,1
-	jnb     1f
-	xor     eax,eax
-	movb	al,(edx)
-	push    eax
-	jmp     ebx
-1:
-	sar     ecx,1
-	jnb     1f
-	xor     eax,eax
-	o16 mov	ax,(edx)
-	push    eax
-	jmp     ebx
-1:
-	xchg	edx,esi		! saved esi
-	mov	eax,ecx
-	sal	eax,2
-	sub     esp,eax
-	mov	eax,edi		! save edi
-	mov     edi,esp
-	rep movs
-	mov	edi,eax
-	mov	esi,edx
-	jmp     ebx
Index: trunk/minix/lib/i386/em/em_loi.s
===================================================================
--- trunk/minix/lib/i386/em/em_loi.s	(revision 9)
+++ 	(revision )
@@ -1,44 +1,0 @@
-.sect .text; .sect .rom; .sect .data; .sect .bss
-.sect .text
-.define .loi
-.define .los
-
-	! #bytes in ecx
-	! address in ebx
-	! save esi/edi. they might be register variables
-.los:
-	pop	edx
-	mov     eax,ecx
-	sar     ecx,1
-	jnb     1f
-	movsxb	eax,(ebx)
-	push    eax
-	jmp     edx
-1:
-	sar     ecx,1
-	jnb     1f
-	movsx	eax,(ebx)
-	push    eax
-	jmp     edx
-1:
-	push	edx
-	mov	edx,esi
-	mov	esi,ebx
-	pop	ebx
-	sub     esp,eax
-	jmp	1f
-
-.loi:
-	! only called with size >= 4
-	mov	edx,esi
-	mov	esi,ebx
-	pop	ebx
-	sub	esp,ecx
-	sar	ecx,2
-1:
-	mov	eax,edi
-	mov     edi,esp
-	rep movs
-	mov	esi,edx
-	mov	edi,eax
-	jmp     ebx
Index: trunk/minix/lib/i386/em/em_mlf4.s
===================================================================
--- trunk/minix/lib/i386/em/em_mlf4.s	(revision 9)
+++ 	(revision )
@@ -1,11 +1,0 @@
-.sect .text; .sect .rom; .sect .data; .sect .bss
-.define .mlf4
-
-	.sect .text
-.mlf4:
-	mov	bx,sp
-	flds	4(bx)
-	fmuls	8(bx)
-	fstps	8(bx)
-	wait
-	ret
Index: trunk/minix/lib/i386/em/em_mlf8.s
===================================================================
--- trunk/minix/lib/i386/em/em_mlf8.s	(revision 9)
+++ 	(revision )
@@ -1,11 +1,0 @@
-.sect .text; .sect .rom; .sect .data; .sect .bss
-.define .mlf8
-
-	.sect .text
-.mlf8:
-	mov	bx,sp
-	fldd	4(bx)
-	fmuld	12(bx)
-	fstpd	12(bx)
-	wait
-	ret
Index: trunk/minix/lib/i386/em/em_mli.s
===================================================================
--- trunk/minix/lib/i386/em/em_mli.s	(revision 9)
+++ 	(revision )
@@ -1,20 +1,0 @@
-.sect .text; .sect .rom; .sect .data; .sect .bss
-.sect .text
-.define .mli
-
-	! #bytes in eax
-.mli:
-	pop     ebx              ! return address
-	cmp     eax,4
-	jne     1f
-	pop     eax
-	pop     ecx
-	mul     ecx
-	push    eax
-	jmp     ebx
-1:
-.extern EODDZ
-.extern .trp
-	mov     eax,EODDZ
-	push    ebx
-	jmp     .trp
Index: trunk/minix/lib/i386/em/em_mon.s
===================================================================
--- trunk/minix/lib/i386/em/em_mon.s	(revision 9)
+++ 	(revision )
@@ -1,7 +1,0 @@
-.sect .text; .sect .rom; .sect .data; .sect .bss
-.sect .text
-.define .mon
-
-.mon:
-.extern .stop
-	call    .stop
Index: trunk/minix/lib/i386/em/em_ngf4.s
===================================================================
--- trunk/minix/lib/i386/em/em_ngf4.s	(revision 9)
+++ 	(revision )
@@ -1,11 +1,0 @@
-.sect .text; .sect .rom; .sect .data; .sect .bss
-.define .ngf4
-
-	.sect .text
-.ngf4:
-	mov	bx,sp
-	flds	4(bx)
-	fchs
-	fstps	4(bx)
-	wait
-	ret
Index: trunk/minix/lib/i386/em/em_ngf8.s
===================================================================
--- trunk/minix/lib/i386/em/em_ngf8.s	(revision 9)
+++ 	(revision )
@@ -1,11 +1,0 @@
-.sect .text; .sect .rom; .sect .data; .sect .bss
-.define .ngf8
-
-	.sect .text
-.ngf8:
-	mov	bx,sp
-	fldd	4(bx)
-	fchs
-	fstpd	4(bx)
-	wait
-	ret
Index: trunk/minix/lib/i386/em/em_ngi.s
===================================================================
--- trunk/minix/lib/i386/em/em_ngi.s	(revision 9)
+++ 	(revision )
@@ -1,19 +1,0 @@
-.sect .text; .sect .rom; .sect .data; .sect .bss
-.sect .text
-.define .ngi
-
-	! #bytes in eax
-.ngi:
-	pop     ebx              ! return address
-	cmp     eax,4
-	jne     1f
-	pop     ecx
-	neg     ecx
-	push    ecx
-	jmp     ebx
-1:
-.extern EODDZ
-.extern .trp
-	mov     eax,EODDZ
-	push    ebx
-	jmp     .trp
Index: trunk/minix/lib/i386/em/em_nop.s
===================================================================
--- trunk/minix/lib/i386/em/em_nop.s	(revision 9)
+++ 	(revision )
@@ -1,10 +1,0 @@
-.sect .text; .sect .rom; .sect .data; .sect .bss
-.sect .text
-.define .nop
-.extern printd, printc, hol0
-
-.nop:
-	mov     eax,(hol0)
-	call    printd
-	movb    al,'\n'
-	jmp     printc
Index: trunk/minix/lib/i386/em/em_print.s
===================================================================
--- trunk/minix/lib/i386/em/em_print.s	(revision 9)
+++ 	(revision )
@@ -1,47 +1,0 @@
-.sect .text; .sect .rom; .sect .data; .sect .bss
-.sect .text
-.define	printc,printd,prints
-
-	! argument in eax
-	! uses ebx
-prints:
-	xchg	eax,ebx
-1:
-	movb	al,(ebx)
-	inc	ebx
-	testb	al,al
-	jz	2f
-	call	printc
-	jmp	1b
-2:
-	ret
-
-	! argument in eax
-	! uses ecx and edx
-printd:
-	xor	edx,edx
-	mov	ecx,10
-	div	ecx
-	test	eax,eax
-	jz	1f
-	push	edx
-	call	printd
-	pop	edx
-1:
-	xchg	eax,edx
-	addb	al,'0'
-
-	! argument in eax
-printc:
-	push	eax
-	mov	ebx,esp
-	mov	eax,1
-	push	eax
-	push	ebx
-	push	eax
-	call	__write
-	pop	ebx
-	pop	ebx
-	pop	ebx
-	pop	ebx
-	ret
Index: trunk/minix/lib/i386/em/em_rck.s
===================================================================
--- trunk/minix/lib/i386/em/em_rck.s	(revision 9)
+++ 	(revision )
@@ -1,20 +1,0 @@
-.sect .text; .sect .rom; .sect .data; .sect .bss
-.sect .text
-.define .rck
-
-	! descriptor address in ebx
-	! value in eax, must be left there
-.rck:
-	cmp     eax,(ebx)
-	jl      2f
-	cmp     eax,4(ebx)
-	jg      2f
-	ret
-2:
-	push    eax
-.extern ERANGE
-.extern .error
-	mov     eax,ERANGE
-	call    .error
-	pop     eax
-	ret
Index: trunk/minix/lib/i386/em/em_rmi.s
===================================================================
--- trunk/minix/lib/i386/em/em_rmi.s	(revision 9)
+++ 	(revision )
@@ -1,21 +1,0 @@
-.sect .text; .sect .rom; .sect .data; .sect .bss
-.sect .text
-.define .rmi
-
-	! #bytes in eax
-.rmi:
-	pop     ebx              ! return address
-	cmp     eax,4
-	jne     1f
-	pop     eax
-	cwd
-	pop     ecx
-	idiv    ecx
-	push    edx
-	jmp     ebx
-1:
-.extern EODDZ
-.extern .trp
-	mov     eax,EODDZ
-	push    ebx
-	jmp     .trp
Index: trunk/minix/lib/i386/em/em_rmu.s
===================================================================
--- trunk/minix/lib/i386/em/em_rmu.s	(revision 9)
+++ 	(revision )
@@ -1,21 +1,0 @@
-.sect .text; .sect .rom; .sect .data; .sect .bss
-.sect .text
-.define .rmu
-
-	! #bytes in eax
-.rmu:
-	pop     ebx              ! return address
-	cmp     eax,4
-	jne     1f
-	pop     eax
-	xor     edx,edx
-	pop     ecx
-	idiv    ecx
-	push    edx
-	jmp     ebx
-1:
-.extern EODDZ
-.extern .trp
-	mov     eax,EODDZ
-	push    ebx
-	jmp     .trp
Index: trunk/minix/lib/i386/em/em_rol.s
===================================================================
--- trunk/minix/lib/i386/em/em_rol.s	(revision 9)
+++ 	(revision )
@@ -1,20 +1,0 @@
-.sect .text; .sect .rom; .sect .data; .sect .bss
-.sect .text
-.define .rol
-
-	! #bytes in eax
-.rol:
-	pop     edx              ! return address
-	cmp     eax,4
-	jne     1f
-	pop     eax
-	pop     ecx
-	rol     eax,cl
-	push    eax
-	jmp     edx
-1:
-.extern EODDZ
-.extern .trp
-	mov     eax,EODDZ
-	push    edx
-	jmp     .trp
Index: trunk/minix/lib/i386/em/em_ror.s
===================================================================
--- trunk/minix/lib/i386/em/em_ror.s	(revision 9)
+++ 	(revision )
@@ -1,20 +1,0 @@
-.sect .text; .sect .rom; .sect .data; .sect .bss
-.sect .text
-.define .ror
-
-	! #bytes in eax
-.ror:
-	pop     edx              ! return address
-	cmp     eax,4
-	jne     1f
-	pop     eax
-	pop     ecx
-	ror     eax,cl
-	push    eax
-	jmp     edx
-1:
-.extern EODDZ
-.extern .trp
-	mov     eax,EODDZ
-	push    edx
-	jmp     .trp
Index: trunk/minix/lib/i386/em/em_sar4.s
===================================================================
--- trunk/minix/lib/i386/em/em_sar4.s	(revision 9)
+++ 	(revision )
@@ -1,33 +1,0 @@
-.sect .text; .sect .rom; .sect .data; .sect .bss
-.sect .text
-.define .sar4
-
-.sar4:
-				! ebx, descriptor address
-				! eax, index
-	sub     eax,(ebx)
-	mov     ecx,8(ebx)
-	imul    ecx
-	pop	ebx
-	pop	edx		! base address
-	add     edx,eax
-	sar     ecx,1
-	jnb     1f
-	pop     eax
-	movb	(edx),al
-	jmp     ebx
-1:
-	sar     ecx,1
-	jnb     1f
-	pop     eax
-	o16 mov (edx),ax
-	jmp     ebx
-1:
-	xchg	edi,edx		! edi = base address, edx is saved edi
-	mov	eax,esi
-	mov     esi,esp
-	rep movs
-	mov     esp,esi
-	mov	esi,eax
-	mov	edi,edx
-	jmp     ebx
Index: trunk/minix/lib/i386/em/em_sbf4.s
===================================================================
--- trunk/minix/lib/i386/em/em_sbf4.s	(revision 9)
+++ 	(revision )
@@ -1,11 +1,0 @@
-.sect .text; .sect .rom; .sect .data; .sect .bss
-.define .sbf4
-
-	.sect .text
-.sbf4:
-	mov	bx,sp
-	flds	8(bx)
-	fsubs	4(bx)
-	fstps	8(bx)
-	wait
-	ret
Index: trunk/minix/lib/i386/em/em_sbf8.s
===================================================================
--- trunk/minix/lib/i386/em/em_sbf8.s	(revision 9)
+++ 	(revision )
@@ -1,11 +1,0 @@
-.sect .text; .sect .rom; .sect .data; .sect .bss
-.define .sbf8
-
-	.sect .text
-.sbf8:
-	mov	bx,sp
-	fldd	12(bx)
-	fsubd	4(bx)
-	fstpd	12(bx)
-	wait
-	ret
Index: trunk/minix/lib/i386/em/em_sbi.s
===================================================================
--- trunk/minix/lib/i386/em/em_sbi.s	(revision 9)
+++ 	(revision )
@@ -1,19 +1,0 @@
-.sect .text; .sect .rom; .sect .data; .sect .bss
-.sect .text
-.define .sbi
-
-	! #bytes in ecx , top of stack in eax
-.sbi:
-	pop     ebx              ! return subress
-	cmp     ecx,4
-	jne     1f
-	pop     ecx
-	sub     eax,ecx
-	neg     eax
-	jmp     ebx
-1:
-.extern EODDZ
-.extern .trp
-	mov     eax,EODDZ
-	push    ebx
-	jmp     .trp
Index: trunk/minix/lib/i386/em/em_set.s
===================================================================
--- trunk/minix/lib/i386/em/em_set.s	(revision 9)
+++ 	(revision )
@@ -1,42 +1,0 @@
-.sect .text; .sect .rom; .sect .data; .sect .bss
-.sect .text
-.define .set
-
-	! #bytes in ecx
-	! bit # in eax
-.set:
-	pop     ebx              ! return address
-	xor     edx,edx
-!ifdef create set
-	sub	esp,ecx
-	push	ebx
-	push	edi
-	mov     ebx,esp
-	xor	edi,edi
-	sar	ecx,2
-1:
-	mov     8(ebx)(edi),edx
-	add	edi,4
-	loop	1b
-!endif
-	mov     ebx,8
-	div     ebx
-	cmp     eax,edi
-	jae     2f
-	mov	edi,edx
-	movb	dl,bits(edi)
-	mov     edi,esp
-	add     edi,eax
-	orb     8(edi),dl
-	pop	edi
-	ret
-2:
-.extern ESET
-.extern .trp
-	pop	edi
-	mov     eax,ESET
-	jmp     .trp
-
-	.sect .rom
-bits:
-	.data1   1,2,4,8,16,32,64,128
Index: trunk/minix/lib/i386/em/em_sli.s
===================================================================
--- trunk/minix/lib/i386/em/em_sli.s	(revision 9)
+++ 	(revision )
@@ -1,20 +1,0 @@
-.sect .text; .sect .rom; .sect .data; .sect .bss
-.sect .text
-.define .sli
-
-	! #bytes in eax
-.sli:
-	pop     edx              ! return address
-	cmp     eax,4
-	jne     1f
-	pop     eax
-	pop     ecx
-	sal     eax,cl
-	push    eax
-	jmp     edx
-1:
-.extern EODDZ
-.extern .trp
-	mov     eax,EODDZ
-	push    edx
-	jmp     .trp
Index: trunk/minix/lib/i386/em/em_sri.s
===================================================================
--- trunk/minix/lib/i386/em/em_sri.s	(revision 9)
+++ 	(revision )
@@ -1,20 +1,0 @@
-.sect .text; .sect .rom; .sect .data; .sect .bss
-.sect .text
-.define .sri
-
-	! #bytes in eax
-.sri:
-	pop     edx              ! return address
-	cmp     eax,4
-	jne     1f
-	pop     eax
-	pop     ecx
-	sar     eax,cl
-	push    eax
-	jmp     edx
-1:
-.extern EODDZ
-.extern .trp
-	mov     eax,EODDZ
-	push    edx
-	jmp     .trp
Index: trunk/minix/lib/i386/em/em_sti.s
===================================================================
--- trunk/minix/lib/i386/em/em_sti.s	(revision 9)
+++ 	(revision )
@@ -1,41 +1,0 @@
-.sect .text; .sect .rom; .sect .data; .sect .bss
-.sect .text
-.define .sti
-.define .sts
-
-	! #bytes in ecx
-	! address in ebx
-	! save edi/esi. they might be register variables
-.sts:
-	pop	edx
-	sar     ecx,1
-	jnb     1f
-	pop     eax
-	movb	(ebx),al
-	jmp     edx
-1:
-	sar     ecx,1
-	jnb     1f
-	pop     eax
-	o16 mov	(ebx),ax
-	jmp     edx
-1:
-	push	edx
-	mov	edx,edi
-	mov	edi,ebx
-	pop	ebx
-	jmp	1f
-.sti:
-	! only called with count >> 4
-	mov	edx,edi
-	mov	edi,ebx
-	pop	ebx
-	sar	ecx,2
-1:
-	mov	eax,esi
-	mov     esi,esp
-	rep movs
-	mov     esp,esi
-	mov	edi,edx
-	mov	esi,eax
-	jmp     ebx
Index: trunk/minix/lib/i386/em/em_stop.s
===================================================================
--- trunk/minix/lib/i386/em/em_stop.s	(revision 9)
+++ 	(revision )
@@ -1,5 +1,0 @@
-.sect .text; .sect .rom; .sect .data; .sect .bss
-.sect .text
-.define .stop
-.stop:
-	jmp	___exit
Index: trunk/minix/lib/i386/em/em_trp.s
===================================================================
--- trunk/minix/lib/i386/em/em_trp.s	(revision 9)
+++ 	(revision )
@@ -1,18 +1,0 @@
-.sect .text; .sect .rom; .sect .data; .sect .bss
-.sect .text
-.define .trp
-.extern .trppc, .stop
-
-		! eax is trap number
-.trp:
-	xor     ebx,ebx
-	xchg    ebx,(.trppc)
-	test    ebx,ebx
-	jz      2f
-	push    eax
-	call    ebx
-	pop     eax
-	ret
-2:
-	push	eax
-	call    .stop
Index: trunk/minix/lib/i386/em/em_unknown.s
===================================================================
--- trunk/minix/lib/i386/em/em_unknown.s	(revision 9)
+++ 	(revision )
@@ -1,9 +1,0 @@
-.sect .text; .sect .rom; .sect .data; .sect .bss
-.sect .text
-.define .unknown
-.extern EILLINS, .fat
-
-.unknown:
-	mov  eax,EILLINS
-	push eax
-	jmp  .fat
Index: trunk/minix/lib/i386/em/em_xor.s
===================================================================
--- trunk/minix/lib/i386/em/em_xor.s	(revision 9)
+++ 	(revision )
@@ -1,18 +1,0 @@
-.sect .text; .sect .rom; .sect .data; .sect .bss
-.sect .text
-.define	.xor
-
-	! #bytes in ecx
-.xor:
-	pop	ebx		! return address
-	mov	edx,edi
-	mov	edi,esp
-	add	edi,ecx
-	sar	ecx,2
-1:
-	pop	eax
-	xor	eax,(edi)
-	stos
-	loop	1b
-	mov	edi,edx
-	jmp	ebx
Index: trunk/minix/lib/i386/head/em_abs.h
===================================================================
--- trunk/minix/lib/i386/head/em_abs.h	(revision 9)
+++ 	(revision )
@@ -1,35 +1,0 @@
-/* $Header: /cvsup/minix/src/lib/i386/head/em_abs.h,v 1.1.1.1 2005/04/21 14:56:12 beng Exp $ */
-/*
- * (c) copyright 1987 by the Vrije Universiteit, Amsterdam, The Netherlands.
- * See the copyright notice in the ACK home directory, in the file "Copyright".
- */
-#define LINO_AD         0
-#define FILN_AD         4
-
-#define LINO            (*(int    *)(_hol0()+LINO_AD))
-#define FILN            (*(char  **)(_hol0()+FILN_AD))
-
-#define EARRAY          0
-#define ERANGE          1
-#define ESET            2
-#define EIOVFL          3
-#define EFOVFL          4
-#define EFUNFL          5
-#define EIDIVZ          6
-#define EFDIVZ          7
-#define EIUND           8
-#define EFUND           9
-#define ECONV           10
-
-#define ESTACK          16
-#define EHEAP           17
-#define EILLINS         18
-#define EODDZ           19
-#define ECASE           20
-#define EMEMFLT         21
-#define EBADPTR         22
-#define EBADPC          23
-#define EBADLAE         24
-#define EBADMON         25
-#define EBADLIN         26
-#define EBADGTO         27
Index: trunk/minix/lib/i386/head/em_head.s
===================================================================
--- trunk/minix/lib/i386/head/em_head.s	(revision 9)
+++ 	(revision )
@@ -1,20 +1,0 @@
-#
-.sect .text; .sect .rom; .sect .data; .sect .bss
-.define ERANGE,ESET,EHEAP,ECASE,EILLINS,EIDIVZ,EODDZ
-.define .trppc, .ignmask
-
-ERANGE		= 1
-ESET		= 2
-EIDIVZ		= 6
-EHEAP		= 17
-EILLINS		= 18
-EODDZ		= 19
-ECASE		= 20
-
-#include <em_abs.h>
-
-.sect .data
-.trppc:
-	.data4	0
-.ignmask:
-	.data4	EIOVFL | EIUND | ECONV | EFOVFL | EFUNFL
Index: trunk/minix/lib/i386/int64/Makedepend-ack
===================================================================
--- trunk/minix/lib/i386/int64/Makedepend-ack	(revision 9)
+++ 	(revision )
@@ -1,15 +1,0 @@
-depend-ack:
-	rm .depend-ack
-	touch .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -E' add64.s | sed -e 's:^\(.\):../../obj-ack//./i386/int64/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -E' add64u.s | sed -e 's:^\(.\):../../obj-ack//./i386/int64/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -E' cmp64.s | sed -e 's:^\(.\):../../obj-ack//./i386/int64/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -E' cv64u.s | sed -e 's:^\(.\):../../obj-ack//./i386/int64/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -E' cvu64.s | sed -e 's:^\(.\):../../obj-ack//./i386/int64/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -E' diff64.s | sed -e 's:^\(.\):../../obj-ack//./i386/int64/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -E' div64u.s | sed -e 's:^\(.\):../../obj-ack//./i386/int64/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -E' ex64.s | sed -e 's:^\(.\):../../obj-ack//./i386/int64/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -E' make64.s | sed -e 's:^\(.\):../../obj-ack//./i386/int64/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -E' mul64u.s | sed -e 's:^\(.\):../../obj-ack//./i386/int64/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -E' sub64.s | sed -e 's:^\(.\):../../obj-ack//./i386/int64/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -E' sub64u.s | sed -e 's:^\(.\):../../obj-ack//./i386/int64/\1:' >> .depend-ack
Index: trunk/minix/lib/i386/int64/Makedepend-gnu
===================================================================
--- trunk/minix/lib/i386/int64/Makedepend-gnu	(revision 9)
+++ 	(revision )
@@ -1,15 +1,0 @@
-depend-gnu:
-	rm .depend-gnu
-	touch .depend-gnu
-	mkdep 'gcc -O -D_MINIX -D_POSIX_SOURCE -E -x assembler-with-cpp -I.' add64.s | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../../obj-gnu/./i386/int64/\1:' >> .depend-gnu
-	mkdep 'gcc -O -D_MINIX -D_POSIX_SOURCE -E -x assembler-with-cpp -I.' add64u.s | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../../obj-gnu/./i386/int64/\1:' >> .depend-gnu
-	mkdep 'gcc -O -D_MINIX -D_POSIX_SOURCE -E -x assembler-with-cpp -I.' cmp64.s | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../../obj-gnu/./i386/int64/\1:' >> .depend-gnu
-	mkdep 'gcc -O -D_MINIX -D_POSIX_SOURCE -E -x assembler-with-cpp -I.' cv64u.s | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../../obj-gnu/./i386/int64/\1:' >> .depend-gnu
-	mkdep 'gcc -O -D_MINIX -D_POSIX_SOURCE -E -x assembler-with-cpp -I.' cvu64.s | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../../obj-gnu/./i386/int64/\1:' >> .depend-gnu
-	mkdep 'gcc -O -D_MINIX -D_POSIX_SOURCE -E -x assembler-with-cpp -I.' diff64.s | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../../obj-gnu/./i386/int64/\1:' >> .depend-gnu
-	mkdep 'gcc -O -D_MINIX -D_POSIX_SOURCE -E -x assembler-with-cpp -I.' div64u.s | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../../obj-gnu/./i386/int64/\1:' >> .depend-gnu
-	mkdep 'gcc -O -D_MINIX -D_POSIX_SOURCE -E -x assembler-with-cpp -I.' ex64.s | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../../obj-gnu/./i386/int64/\1:' >> .depend-gnu
-	mkdep 'gcc -O -D_MINIX -D_POSIX_SOURCE -E -x assembler-with-cpp -I.' make64.s | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../../obj-gnu/./i386/int64/\1:' >> .depend-gnu
-	mkdep 'gcc -O -D_MINIX -D_POSIX_SOURCE -E -x assembler-with-cpp -I.' mul64u.s | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../../obj-gnu/./i386/int64/\1:' >> .depend-gnu
-	mkdep 'gcc -O -D_MINIX -D_POSIX_SOURCE -E -x assembler-with-cpp -I.' sub64.s | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../../obj-gnu/./i386/int64/\1:' >> .depend-gnu
-	mkdep 'gcc -O -D_MINIX -D_POSIX_SOURCE -E -x assembler-with-cpp -I.' sub64u.s | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../../obj-gnu/./i386/int64/\1:' >> .depend-gnu
Index: trunk/minix/lib/i386/int64/Makefile
===================================================================
--- trunk/minix/lib/i386/int64/Makefile	(revision 9)
+++ 	(revision )
@@ -1,141 +1,0 @@
-#Generated from ./i386/int64/Makefile.in
-all: all-ack
-
-all-ack:
-all-gnu:
-
-makefiles: Makefile
-Makedepend-ack Makedepend-gnu: 
-	sh ../../generate.sh ./i386/int64 ../../obj-ack/ ../../obj-gnu
-
-Makefile: Makefile.in Makedepend-ack Makedepend-gnu
-	sh ../../generate.sh ./i386/int64 ../../obj-ack/ ../../obj-gnu
-	@echo
-	@echo *Attention*
-	@echo Makefile is regenerated... rerun command to see changes
-	@echo *Attention*
-	@echo
-
-depend: depend-ack
-all-ack: ../../obj-ack//libc.a
-
-../../obj-ack//libc.a: ../../obj-ack//libc.a(add64.o)
-../../obj-ack//libc.a: ../../obj-ack//libc.a(add64u.o)
-../../obj-ack//libc.a: ../../obj-ack//libc.a(cmp64.o)
-../../obj-ack//libc.a: ../../obj-ack//libc.a(cv64u.o)
-../../obj-ack//libc.a: ../../obj-ack//libc.a(cvu64.o)
-../../obj-ack//libc.a: ../../obj-ack//libc.a(diff64.o)
-../../obj-ack//libc.a: ../../obj-ack//libc.a(div64u.o)
-../../obj-ack//libc.a: ../../obj-ack//libc.a(ex64.o)
-../../obj-ack//libc.a: ../../obj-ack//libc.a(make64.o)
-../../obj-ack//libc.a: ../../obj-ack//libc.a(mul64u.o)
-../../obj-ack//libc.a: ../../obj-ack//libc.a(sub64.o)
-../../obj-ack//libc.a: ../../obj-ack//libc.a(sub64u.o)
-
-../../obj-ack//libc.a:
-	ar cr ../../obj-ack//libc.a ../../obj-ack//./i386/int64/*.o
-	rm ../../obj-ack//./i386/int64/*.o
-
-../../obj-ack//libc.a(add64.o): add64.s
-	cc -O -D_MINIX -D_POSIX_SOURCE -c -o ../../obj-ack//./i386/int64/add64.o add64.s
-../../obj-ack//libc.a(add64u.o): add64u.s
-	cc -O -D_MINIX -D_POSIX_SOURCE -c -o ../../obj-ack//./i386/int64/add64u.o add64u.s
-../../obj-ack//libc.a(cmp64.o): cmp64.s
-	cc -O -D_MINIX -D_POSIX_SOURCE -c -o ../../obj-ack//./i386/int64/cmp64.o cmp64.s
-../../obj-ack//libc.a(cv64u.o): cv64u.s
-	cc -O -D_MINIX -D_POSIX_SOURCE -c -o ../../obj-ack//./i386/int64/cv64u.o cv64u.s
-../../obj-ack//libc.a(cvu64.o): cvu64.s
-	cc -O -D_MINIX -D_POSIX_SOURCE -c -o ../../obj-ack//./i386/int64/cvu64.o cvu64.s
-../../obj-ack//libc.a(diff64.o): diff64.s
-	cc -O -D_MINIX -D_POSIX_SOURCE -c -o ../../obj-ack//./i386/int64/diff64.o diff64.s
-../../obj-ack//libc.a(div64u.o): div64u.s
-	cc -O -D_MINIX -D_POSIX_SOURCE -c -o ../../obj-ack//./i386/int64/div64u.o div64u.s
-../../obj-ack//libc.a(ex64.o): ex64.s
-	cc -O -D_MINIX -D_POSIX_SOURCE -c -o ../../obj-ack//./i386/int64/ex64.o ex64.s
-../../obj-ack//libc.a(make64.o): make64.s
-	cc -O -D_MINIX -D_POSIX_SOURCE -c -o ../../obj-ack//./i386/int64/make64.o make64.s
-../../obj-ack//libc.a(mul64u.o): mul64u.s
-	cc -O -D_MINIX -D_POSIX_SOURCE -c -o ../../obj-ack//./i386/int64/mul64u.o mul64u.s
-../../obj-ack//libc.a(sub64.o): sub64.s
-	cc -O -D_MINIX -D_POSIX_SOURCE -c -o ../../obj-ack//./i386/int64/sub64.o sub64.s
-../../obj-ack//libc.a(sub64u.o): sub64u.s
-	cc -O -D_MINIX -D_POSIX_SOURCE -c -o ../../obj-ack//./i386/int64/sub64u.o sub64u.s
-
-all-gnu: ../../obj-gnu/libc.a
-
-../../obj-gnu/libc.a: ../../obj-gnu/./i386/int64/add64.o
-../../obj-gnu/libc.a: ../../obj-gnu/./i386/int64/add64u.o
-../../obj-gnu/libc.a: ../../obj-gnu/./i386/int64/cmp64.o
-../../obj-gnu/libc.a: ../../obj-gnu/./i386/int64/cv64u.o
-../../obj-gnu/libc.a: ../../obj-gnu/./i386/int64/cvu64.o
-../../obj-gnu/libc.a: ../../obj-gnu/./i386/int64/diff64.o
-../../obj-gnu/libc.a: ../../obj-gnu/./i386/int64/div64u.o
-../../obj-gnu/libc.a: ../../obj-gnu/./i386/int64/ex64.o
-../../obj-gnu/libc.a: ../../obj-gnu/./i386/int64/make64.o
-../../obj-gnu/libc.a: ../../obj-gnu/./i386/int64/mul64u.o
-../../obj-gnu/libc.a: ../../obj-gnu/./i386/int64/sub64.o
-../../obj-gnu/libc.a: ../../obj-gnu/./i386/int64/sub64u.o
-
-../../obj-gnu/libc.a:
-	gar cr ../../obj-gnu/libc.a $?
-
-../../obj-gnu/./i386/int64/add64.o: add64.s
-	gcc -O -D_MINIX -D_POSIX_SOURCE -E -x assembler-with-cpp -I. add64.s | asmconv -mi386 ack gnu > ../../obj-gnu/./i386/int64/add64.s.gnu || true
-	gas -o ../../obj-gnu/./i386/int64/add64.o ../../obj-gnu/./i386/int64/add64.s.gnu
-
-../../obj-gnu/./i386/int64/add64u.o: add64u.s
-	gcc -O -D_MINIX -D_POSIX_SOURCE -E -x assembler-with-cpp -I. add64u.s | asmconv -mi386 ack gnu > ../../obj-gnu/./i386/int64/add64u.s.gnu || true
-	gas -o ../../obj-gnu/./i386/int64/add64u.o ../../obj-gnu/./i386/int64/add64u.s.gnu
-
-../../obj-gnu/./i386/int64/cmp64.o: cmp64.s
-	gcc -O -D_MINIX -D_POSIX_SOURCE -E -x assembler-with-cpp -I. cmp64.s | asmconv -mi386 ack gnu > ../../obj-gnu/./i386/int64/cmp64.s.gnu || true
-	gas -o ../../obj-gnu/./i386/int64/cmp64.o ../../obj-gnu/./i386/int64/cmp64.s.gnu
-
-../../obj-gnu/./i386/int64/cv64u.o: cv64u.s
-	gcc -O -D_MINIX -D_POSIX_SOURCE -E -x assembler-with-cpp -I. cv64u.s | asmconv -mi386 ack gnu > ../../obj-gnu/./i386/int64/cv64u.s.gnu || true
-	gas -o ../../obj-gnu/./i386/int64/cv64u.o ../../obj-gnu/./i386/int64/cv64u.s.gnu
-
-../../obj-gnu/./i386/int64/cvu64.o: cvu64.s
-	gcc -O -D_MINIX -D_POSIX_SOURCE -E -x assembler-with-cpp -I. cvu64.s | asmconv -mi386 ack gnu > ../../obj-gnu/./i386/int64/cvu64.s.gnu || true
-	gas -o ../../obj-gnu/./i386/int64/cvu64.o ../../obj-gnu/./i386/int64/cvu64.s.gnu
-
-../../obj-gnu/./i386/int64/diff64.o: diff64.s
-	gcc -O -D_MINIX -D_POSIX_SOURCE -E -x assembler-with-cpp -I. diff64.s | asmconv -mi386 ack gnu > ../../obj-gnu/./i386/int64/diff64.s.gnu || true
-	gas -o ../../obj-gnu/./i386/int64/diff64.o ../../obj-gnu/./i386/int64/diff64.s.gnu
-
-../../obj-gnu/./i386/int64/div64u.o: div64u.s
-	gcc -O -D_MINIX -D_POSIX_SOURCE -E -x assembler-with-cpp -I. div64u.s | asmconv -mi386 ack gnu > ../../obj-gnu/./i386/int64/div64u.s.gnu || true
-	gas -o ../../obj-gnu/./i386/int64/div64u.o ../../obj-gnu/./i386/int64/div64u.s.gnu
-
-../../obj-gnu/./i386/int64/ex64.o: ex64.s
-	gcc -O -D_MINIX -D_POSIX_SOURCE -E -x assembler-with-cpp -I. ex64.s | asmconv -mi386 ack gnu > ../../obj-gnu/./i386/int64/ex64.s.gnu || true
-	gas -o ../../obj-gnu/./i386/int64/ex64.o ../../obj-gnu/./i386/int64/ex64.s.gnu
-
-../../obj-gnu/./i386/int64/make64.o: make64.s
-	gcc -O -D_MINIX -D_POSIX_SOURCE -E -x assembler-with-cpp -I. make64.s | asmconv -mi386 ack gnu > ../../obj-gnu/./i386/int64/make64.s.gnu || true
-	gas -o ../../obj-gnu/./i386/int64/make64.o ../../obj-gnu/./i386/int64/make64.s.gnu
-
-../../obj-gnu/./i386/int64/mul64u.o: mul64u.s
-	gcc -O -D_MINIX -D_POSIX_SOURCE -E -x assembler-with-cpp -I. mul64u.s | asmconv -mi386 ack gnu > ../../obj-gnu/./i386/int64/mul64u.s.gnu || true
-	gas -o ../../obj-gnu/./i386/int64/mul64u.o ../../obj-gnu/./i386/int64/mul64u.s.gnu
-
-../../obj-gnu/./i386/int64/sub64.o: sub64.s
-	gcc -O -D_MINIX -D_POSIX_SOURCE -E -x assembler-with-cpp -I. sub64.s | asmconv -mi386 ack gnu > ../../obj-gnu/./i386/int64/sub64.s.gnu || true
-	gas -o ../../obj-gnu/./i386/int64/sub64.o ../../obj-gnu/./i386/int64/sub64.s.gnu
-
-../../obj-gnu/./i386/int64/sub64u.o: sub64u.s
-	gcc -O -D_MINIX -D_POSIX_SOURCE -E -x assembler-with-cpp -I. sub64u.s | asmconv -mi386 ack gnu > ../../obj-gnu/./i386/int64/sub64u.s.gnu || true
-	gas -o ../../obj-gnu/./i386/int64/sub64u.o ../../obj-gnu/./i386/int64/sub64u.s.gnu
-
-
-
-
-clean::
-	rm -f ../../obj-ack//./i386/int64/*
-	rm -f ../../obj-gnu/./i386/int64/*
-
-include Makedepend-ack
-include .depend-ack
-
-include Makedepend-gnu
-include .depend-gnu
Index: trunk/minix/lib/i386/int64/Makefile.in
===================================================================
--- trunk/minix/lib/i386/int64/Makefile.in	(revision 9)
+++ 	(revision )
@@ -1,21 +1,0 @@
-# Makefile for lib/i386/int64.
-
-CFLAGS="-O -D_MINIX -D_POSIX_SOURCE"
-
-LIBRARIES=libc
-
-libc_FILES=" \
-	add64.s \
-	add64u.s \
-	cmp64.s \
-	cv64u.s \
-	cvu64.s \
-	diff64.s \
-	div64u.s \
-	ex64.s \
-	make64.s \
-	mul64u.s \
-	sub64.s \
-	sub64u.s"
-
-TYPE=both
Index: trunk/minix/lib/i386/int64/add64.s
===================================================================
--- trunk/minix/lib/i386/int64/add64.s	(revision 9)
+++ 	(revision )
@@ -1,17 +1,0 @@
-!	add64() - 64 bit addition			Author: Kees J. Bot
-!								7 Dec 1995
-.sect .text
-.define _add64
-
-_add64:				! u64_t add64(u64_t i, u64_t j);
-	mov	eax, 4(esp)
-	mov	edx, 8(esp)
-	add	edx, 16(esp)
-	mov	(eax), edx
-	mov	edx, 12(esp)
-	adc	edx, 20(esp)
-	mov	4(eax), edx
-	ret
-
-!
-! $PchId: add64.ack.s,v 1.2 1996/04/11 18:59:57 philip Exp $
Index: trunk/minix/lib/i386/int64/add64u.s
===================================================================
--- trunk/minix/lib/i386/int64/add64u.s	(revision 9)
+++ 	(revision )
@@ -1,18 +1,0 @@
-!	add64u() - unsigned to 64 bit addition		Author: Kees J. Bot
-!								7 Dec 1995
-.sect .text
-.define _add64u, _add64ul
-
-_add64u:			! u64_t add64u(u64_t i, unsigned j);
-_add64ul:			! u64_t add64ul(u64_t i, unsigned long j);
-	mov	eax, 4(esp)
-	mov	edx, 8(esp)
-	add	edx, 16(esp)
-	mov	(eax), edx
-	mov	edx, 12(esp)
-	adc	edx, 0
-	mov	4(eax), edx
-	ret
-
-!
-! $PchId: add64u.ack.s,v 1.2 1996/04/11 18:59:57 philip Exp $
Index: trunk/minix/lib/i386/int64/cmp64.s
===================================================================
--- trunk/minix/lib/i386/int64/cmp64.s	(revision 9)
+++ 	(revision )
@@ -1,31 +1,0 @@
-!	cmp64*() - 64 bit compare			Author: Kees J. Bot
-!								7 Dec 1995
-.sect .text
-.define _cmp64, _cmp64u, _cmp64ul
-
-_cmp64:				! int cmp64(u64_t i, u64_t j);
-	mov	ecx, esp
-cmp64:	xor	eax, eax
-	mov	edx, 4(ecx)
-	sub	edx, 12(ecx)
-	mov	edx, 8(ecx)
-	sbb	edx, 16(ecx)
-	sbb	eax, eax		! eax = - (i < j)
-	mov	edx, 12(ecx)
-	sub	edx, 4(ecx)
-	mov	edx, 16(ecx)
-	sbb	edx, 8(ecx)
-	adc	eax, 0			! eax = (i > j) - (i < j)
-	ret
-
-_cmp64u:			! int cmp64u(u64_t i, unsigned j);
-_cmp64ul:			! int cmp64ul(u64_t i, unsigned long j);
-	mov	ecx, esp
-	push	16(ecx)
-	mov	16(ecx), 0
-	call	cmp64
-	pop	16(ecx)
-	ret
-
-!
-! $PchId: cmp64.ack.s,v 1.2 1996/04/11 18:59:57 philip Exp $
Index: trunk/minix/lib/i386/int64/cv64u.s
===================================================================
--- trunk/minix/lib/i386/int64/cv64u.s	(revision 9)
+++ 	(revision )
@@ -1,15 +1,0 @@
-!	cv64u() - 64 bit converted to unsigned		Author: Kees J. Bot
-!								7 Dec 1995
-.sect .text
-.define _cv64u, _cv64ul
-
-_cv64u:				! unsigned cv64u(u64_t i);
-_cv64ul:			! unsigned long cv64ul(u64_t i);
-	mov	eax, 4(esp)
-	cmp	8(esp), 0		! return ULONG_MAX if really big
-	jz	0f
-	mov	eax, -1
-0:	ret
-
-!
-! $PchId: cv64u.ack.s,v 1.2 1996/04/11 18:59:57 philip Exp $
Index: trunk/minix/lib/i386/int64/cvu64.s
===================================================================
--- trunk/minix/lib/i386/int64/cvu64.s	(revision 9)
+++ 	(revision )
@@ -1,15 +1,0 @@
-!	cvu64() - unsigned converted to 64 bit		Author: Kees J. Bot
-!								7 Dec 1995
-.sect .text
-.define _cvu64, _cvul64
-
-_cvu64:				! u64_t cvu64(unsigned i);
-_cvul64:			! u64_t cvul64(unsigned long i);
-	mov	eax, 4(esp)
-	mov	edx, 8(esp)
-	mov	(eax), edx
-	mov	4(eax), 0
-	ret
-
-!
-! $PchId: cvu64.ack.s,v 1.2 1996/04/11 18:59:57 philip Exp $
Index: trunk/minix/lib/i386/int64/diff64.s
===================================================================
--- trunk/minix/lib/i386/int64/diff64.s	(revision 9)
+++ 	(revision )
@@ -1,12 +1,0 @@
-!	diff64() - 64 bit subtraction giving unsigned 	Author: Kees J. Bot
-!								7 Dec 1995
-.sect .text
-.define _diff64
-
-_diff64:			! unsigned diff64(u64_t i, u64_t j);
-	mov	eax, 4(esp)
-	sub	eax, 12(esp)
-	ret
-
-!
-! $PchId: diff64.ack.s,v 1.2 1996/04/11 18:59:57 philip Exp $
Index: trunk/minix/lib/i386/int64/div64u.s
===================================================================
--- trunk/minix/lib/i386/int64/div64u.s	(revision 9)
+++ 	(revision )
@@ -1,22 +1,0 @@
-!	div64u() - 64 bit divided by unsigned giving unsigned long
-!							Author: Kees J. Bot
-!								7 Dec 1995
-.sect .text
-.define _div64u, _rem64u
-
-_div64u:			! unsigned long div64u(u64_t i, unsigned j);
-	xor	edx, edx
-	mov	eax, 8(esp)		! i = (ih<<32) + il
-	div	12(esp)			! ih = q * j + r
-	mov	eax, 4(esp)
-	div	12(esp)			! i / j = (q<<32) + ((r<<32) + il) / j
-	ret
-
-_rem64u:			! unsigned rem64u(u64_t i, unsigned j);
-	pop	ecx
-	call	_div64u
-	mov	eax, edx
-	jmp	ecx
-
-!
-! $PchId: div64u.ack.s,v 1.2 1996/04/11 18:59:57 philip Exp $
Index: trunk/minix/lib/i386/int64/ex64.s
===================================================================
--- trunk/minix/lib/i386/int64/ex64.s	(revision 9)
+++ 	(revision )
@@ -1,16 +1,0 @@
-!	ex64*() - extract low or high 32 bits of a 64 bit number
-!							Author: Kees J. Bot
-!								7 Dec 1995
-.sect .text
-.define _ex64lo, _ex64hi
-
-_ex64lo:			! unsigned long ex64lo(u64_t i);
-	mov	eax, 4(esp)
-	ret
-
-_ex64hi:			! unsigned long ex64hi(u64_t i);
-	mov	eax, 8(esp)
-	ret
-
-!
-! $PchId: ex64.ack.s,v 1.2 1996/04/11 18:59:57 philip Exp $
Index: trunk/minix/lib/i386/int64/make64.s
===================================================================
--- trunk/minix/lib/i386/int64/make64.s	(revision 9)
+++ 	(revision )
@@ -1,16 +1,0 @@
-!	make64() - make a 64 bit number from two 32 bit halves
-!							Author: Kees J. Bot
-!								7 Dec 1995
-.sect .text
-.define _make64
-
-_make64:		    ! u64_t make64(unsigned long lo, unsigned long hi);
-	mov	eax, 4(esp)
-	mov	edx, 8(esp)
-	mov	(eax), edx
-	mov	edx, 12(esp)
-	mov	4(eax), edx
-	ret
-
-!
-! $PchId: make64.ack.s,v 1.2 1996/04/11 18:59:57 philip Exp $
Index: trunk/minix/lib/i386/int64/mul64u.s
===================================================================
--- trunk/minix/lib/i386/int64/mul64u.s	(revision 9)
+++ 	(revision )
@@ -1,17 +1,0 @@
-!	mul64u() - unsigned long by unsigned multiply giving 64 bit result
-!							Author: Kees J. Bot
-!								7 Dec 1995
-.sect .text
-.define _mul64u
-
-_mul64u:			! u64_t mul64u(unsigned long i, unsigned j);
-	mov	ecx, 4(esp)
-	mov	eax, 8(esp)
-	mul	12(esp)
-	mov	(ecx), eax
-	mov	4(ecx), edx
-	mov	eax, ecx
-	ret
-
-!
-! $PchId: mul64u.ack.s,v 1.2 1996/04/11 18:59:57 philip Exp $
Index: trunk/minix/lib/i386/int64/sub64.s
===================================================================
--- trunk/minix/lib/i386/int64/sub64.s	(revision 9)
+++ 	(revision )
@@ -1,17 +1,0 @@
-!	sub64() - 64 bit subtraction			Author: Kees J. Bot
-!								7 Dec 1995
-.sect .text
-.define _sub64
-
-_sub64:				! u64_t sub64(u64_t i, u64_t j);
-	mov	eax, 4(esp)
-	mov	edx, 8(esp)
-	sub	edx, 16(esp)
-	mov	(eax), edx
-	mov	edx, 12(esp)
-	sbb	edx, 20(esp)
-	mov	4(eax), edx
-	ret
-
-!
-! $PchId: sub64.ack.s,v 1.2 1996/04/11 18:59:57 philip Exp $
Index: trunk/minix/lib/i386/int64/sub64u.s
===================================================================
--- trunk/minix/lib/i386/int64/sub64u.s	(revision 9)
+++ 	(revision )
@@ -1,18 +1,0 @@
-!	sub64() - unsigned from 64 bit subtraction	Author: Kees J. Bot
-!								7 Dec 1995
-.sect .text
-.define _sub64u, _sub64ul
-
-_sub64u:			! u64_t sub64u(u64_t i, unsigned j);
-_sub64ul:			! u64_t sub64ul(u64_t i, unsigned long j);
-	mov	eax, 4(esp)
-	mov	edx, 8(esp)
-	sub	edx, 16(esp)
-	mov	(eax), edx
-	mov	edx, 12(esp)
-	sbb	edx, 0
-	mov	4(eax), edx
-	ret
-
-!
-! $PchId: sub64u.ack.s,v 1.2 1996/04/11 18:59:57 philip Exp $
Index: trunk/minix/lib/i386/misc/Makedepend-ack
===================================================================
--- trunk/minix/lib/i386/misc/Makedepend-ack	(revision 9)
+++ 	(revision )
@@ -1,20 +1,0 @@
-depend-ack:
-	rm .depend-ack
-	touch .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -E' alloca.s | sed -e 's:^\(.\):../../obj-ack//./i386/misc/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -E' get_bp.s | sed -e 's:^\(.\):../../obj-ack//./i386/misc/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -E' getprocessor.s | sed -e 's:^\(.\):../../obj-ack//./i386/misc/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -E' io_inb.s | sed -e 's:^\(.\):../../obj-ack//./i386/misc/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -E' io_inl.s | sed -e 's:^\(.\):../../obj-ack//./i386/misc/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -E' io_insb.s | sed -e 's:^\(.\):../../obj-ack//./i386/misc/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -E' io_insl.s | sed -e 's:^\(.\):../../obj-ack//./i386/misc/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -E' io_insw.s | sed -e 's:^\(.\):../../obj-ack//./i386/misc/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -E' io_intr.s | sed -e 's:^\(.\):../../obj-ack//./i386/misc/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -E' io_inw.s | sed -e 's:^\(.\):../../obj-ack//./i386/misc/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -E' io_outb.s | sed -e 's:^\(.\):../../obj-ack//./i386/misc/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -E' io_outl.s | sed -e 's:^\(.\):../../obj-ack//./i386/misc/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -E' io_outsb.s | sed -e 's:^\(.\):../../obj-ack//./i386/misc/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -E' io_outsl.s | sed -e 's:^\(.\):../../obj-ack//./i386/misc/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -E' io_outsw.s | sed -e 's:^\(.\):../../obj-ack//./i386/misc/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -E' io_outw.s | sed -e 's:^\(.\):../../obj-ack//./i386/misc/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -E' oneC_sum.s | sed -e 's:^\(.\):../../obj-ack//./i386/misc/\1:' >> .depend-ack
Index: trunk/minix/lib/i386/misc/Makedepend-gnu
===================================================================
--- trunk/minix/lib/i386/misc/Makedepend-gnu	(revision 9)
+++ 	(revision )
@@ -1,20 +1,0 @@
-depend-gnu:
-	rm .depend-gnu
-	touch .depend-gnu
-	mkdep 'gcc -O -D_MINIX -D_POSIX_SOURCE -E -x assembler-with-cpp -I.' alloca.s | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../../obj-gnu/./i386/misc/\1:' >> .depend-gnu
-	mkdep 'gcc -O -D_MINIX -D_POSIX_SOURCE -E -x assembler-with-cpp -I.' get_bp.s | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../../obj-gnu/./i386/misc/\1:' >> .depend-gnu
-	mkdep 'gcc -O -D_MINIX -D_POSIX_SOURCE -E -x assembler-with-cpp -I.' getprocessor.s | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../../obj-gnu/./i386/misc/\1:' >> .depend-gnu
-	mkdep 'gcc -O -D_MINIX -D_POSIX_SOURCE -E -x assembler-with-cpp -I.' io_inb.s | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../../obj-gnu/./i386/misc/\1:' >> .depend-gnu
-	mkdep 'gcc -O -D_MINIX -D_POSIX_SOURCE -E -x assembler-with-cpp -I.' io_inl.s | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../../obj-gnu/./i386/misc/\1:' >> .depend-gnu
-	mkdep 'gcc -O -D_MINIX -D_POSIX_SOURCE -E -x assembler-with-cpp -I.' io_insb.s | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../../obj-gnu/./i386/misc/\1:' >> .depend-gnu
-	mkdep 'gcc -O -D_MINIX -D_POSIX_SOURCE -E -x assembler-with-cpp -I.' io_insl.s | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../../obj-gnu/./i386/misc/\1:' >> .depend-gnu
-	mkdep 'gcc -O -D_MINIX -D_POSIX_SOURCE -E -x assembler-with-cpp -I.' io_insw.s | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../../obj-gnu/./i386/misc/\1:' >> .depend-gnu
-	mkdep 'gcc -O -D_MINIX -D_POSIX_SOURCE -E -x assembler-with-cpp -I.' io_intr.s | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../../obj-gnu/./i386/misc/\1:' >> .depend-gnu
-	mkdep 'gcc -O -D_MINIX -D_POSIX_SOURCE -E -x assembler-with-cpp -I.' io_inw.s | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../../obj-gnu/./i386/misc/\1:' >> .depend-gnu
-	mkdep 'gcc -O -D_MINIX -D_POSIX_SOURCE -E -x assembler-with-cpp -I.' io_outb.s | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../../obj-gnu/./i386/misc/\1:' >> .depend-gnu
-	mkdep 'gcc -O -D_MINIX -D_POSIX_SOURCE -E -x assembler-with-cpp -I.' io_outl.s | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../../obj-gnu/./i386/misc/\1:' >> .depend-gnu
-	mkdep 'gcc -O -D_MINIX -D_POSIX_SOURCE -E -x assembler-with-cpp -I.' io_outsb.s | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../../obj-gnu/./i386/misc/\1:' >> .depend-gnu
-	mkdep 'gcc -O -D_MINIX -D_POSIX_SOURCE -E -x assembler-with-cpp -I.' io_outsl.s | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../../obj-gnu/./i386/misc/\1:' >> .depend-gnu
-	mkdep 'gcc -O -D_MINIX -D_POSIX_SOURCE -E -x assembler-with-cpp -I.' io_outsw.s | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../../obj-gnu/./i386/misc/\1:' >> .depend-gnu
-	mkdep 'gcc -O -D_MINIX -D_POSIX_SOURCE -E -x assembler-with-cpp -I.' io_outw.s | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../../obj-gnu/./i386/misc/\1:' >> .depend-gnu
-	mkdep 'gcc -O -D_MINIX -D_POSIX_SOURCE -E -x assembler-with-cpp -I.' oneC_sum.s | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../../obj-gnu/./i386/misc/\1:' >> .depend-gnu
Index: trunk/minix/lib/i386/misc/Makefile
===================================================================
--- trunk/minix/lib/i386/misc/Makefile	(revision 9)
+++ 	(revision )
@@ -1,181 +1,0 @@
-#Generated from ./i386/misc/Makefile.in
-all: all-ack
-
-all-ack:
-all-gnu:
-
-makefiles: Makefile
-Makedepend-ack Makedepend-gnu: 
-	sh ../../generate.sh ./i386/misc ../../obj-ack/ ../../obj-gnu
-
-Makefile: Makefile.in Makedepend-ack Makedepend-gnu
-	sh ../../generate.sh ./i386/misc ../../obj-ack/ ../../obj-gnu
-	@echo
-	@echo *Attention*
-	@echo Makefile is regenerated... rerun command to see changes
-	@echo *Attention*
-	@echo
-
-depend: depend-ack
-all-ack: ../../obj-ack//libc.a
-
-../../obj-ack//libc.a: ../../obj-ack//libc.a(alloca.o)
-../../obj-ack//libc.a: ../../obj-ack//libc.a(get_bp.o)
-../../obj-ack//libc.a: ../../obj-ack//libc.a(getprocessor.o)
-../../obj-ack//libc.a: ../../obj-ack//libc.a(io_inb.o)
-../../obj-ack//libc.a: ../../obj-ack//libc.a(io_inl.o)
-../../obj-ack//libc.a: ../../obj-ack//libc.a(io_insb.o)
-../../obj-ack//libc.a: ../../obj-ack//libc.a(io_insl.o)
-../../obj-ack//libc.a: ../../obj-ack//libc.a(io_insw.o)
-../../obj-ack//libc.a: ../../obj-ack//libc.a(io_intr.o)
-../../obj-ack//libc.a: ../../obj-ack//libc.a(io_inw.o)
-../../obj-ack//libc.a: ../../obj-ack//libc.a(io_outb.o)
-../../obj-ack//libc.a: ../../obj-ack//libc.a(io_outl.o)
-../../obj-ack//libc.a: ../../obj-ack//libc.a(io_outsb.o)
-../../obj-ack//libc.a: ../../obj-ack//libc.a(io_outsl.o)
-../../obj-ack//libc.a: ../../obj-ack//libc.a(io_outsw.o)
-../../obj-ack//libc.a: ../../obj-ack//libc.a(io_outw.o)
-../../obj-ack//libc.a: ../../obj-ack//libc.a(oneC_sum.o)
-
-../../obj-ack//libc.a:
-	ar cr ../../obj-ack//libc.a ../../obj-ack//./i386/misc/*.o
-	rm ../../obj-ack//./i386/misc/*.o
-
-../../obj-ack//libc.a(alloca.o): alloca.s
-	cc -O -D_MINIX -D_POSIX_SOURCE -c -o ../../obj-ack//./i386/misc/alloca.o alloca.s
-../../obj-ack//libc.a(get_bp.o): get_bp.s
-	cc -O -D_MINIX -D_POSIX_SOURCE -c -o ../../obj-ack//./i386/misc/get_bp.o get_bp.s
-../../obj-ack//libc.a(getprocessor.o): getprocessor.s
-	cc -O -D_MINIX -D_POSIX_SOURCE -c -o ../../obj-ack//./i386/misc/getprocessor.o getprocessor.s
-../../obj-ack//libc.a(io_inb.o): io_inb.s
-	cc -O -D_MINIX -D_POSIX_SOURCE -c -o ../../obj-ack//./i386/misc/io_inb.o io_inb.s
-../../obj-ack//libc.a(io_inl.o): io_inl.s
-	cc -O -D_MINIX -D_POSIX_SOURCE -c -o ../../obj-ack//./i386/misc/io_inl.o io_inl.s
-../../obj-ack//libc.a(io_insb.o): io_insb.s
-	cc -O -D_MINIX -D_POSIX_SOURCE -c -o ../../obj-ack//./i386/misc/io_insb.o io_insb.s
-../../obj-ack//libc.a(io_insl.o): io_insl.s
-	cc -O -D_MINIX -D_POSIX_SOURCE -c -o ../../obj-ack//./i386/misc/io_insl.o io_insl.s
-../../obj-ack//libc.a(io_insw.o): io_insw.s
-	cc -O -D_MINIX -D_POSIX_SOURCE -c -o ../../obj-ack//./i386/misc/io_insw.o io_insw.s
-../../obj-ack//libc.a(io_intr.o): io_intr.s
-	cc -O -D_MINIX -D_POSIX_SOURCE -c -o ../../obj-ack//./i386/misc/io_intr.o io_intr.s
-../../obj-ack//libc.a(io_inw.o): io_inw.s
-	cc -O -D_MINIX -D_POSIX_SOURCE -c -o ../../obj-ack//./i386/misc/io_inw.o io_inw.s
-../../obj-ack//libc.a(io_outb.o): io_outb.s
-	cc -O -D_MINIX -D_POSIX_SOURCE -c -o ../../obj-ack//./i386/misc/io_outb.o io_outb.s
-../../obj-ack//libc.a(io_outl.o): io_outl.s
-	cc -O -D_MINIX -D_POSIX_SOURCE -c -o ../../obj-ack//./i386/misc/io_outl.o io_outl.s
-../../obj-ack//libc.a(io_outsb.o): io_outsb.s
-	cc -O -D_MINIX -D_POSIX_SOURCE -c -o ../../obj-ack//./i386/misc/io_outsb.o io_outsb.s
-../../obj-ack//libc.a(io_outsl.o): io_outsl.s
-	cc -O -D_MINIX -D_POSIX_SOURCE -c -o ../../obj-ack//./i386/misc/io_outsl.o io_outsl.s
-../../obj-ack//libc.a(io_outsw.o): io_outsw.s
-	cc -O -D_MINIX -D_POSIX_SOURCE -c -o ../../obj-ack//./i386/misc/io_outsw.o io_outsw.s
-../../obj-ack//libc.a(io_outw.o): io_outw.s
-	cc -O -D_MINIX -D_POSIX_SOURCE -c -o ../../obj-ack//./i386/misc/io_outw.o io_outw.s
-../../obj-ack//libc.a(oneC_sum.o): oneC_sum.s
-	cc -O -D_MINIX -D_POSIX_SOURCE -c -o ../../obj-ack//./i386/misc/oneC_sum.o oneC_sum.s
-
-all-gnu: ../../obj-gnu/libc.a
-
-../../obj-gnu/libc.a: ../../obj-gnu/./i386/misc/alloca.o
-../../obj-gnu/libc.a: ../../obj-gnu/./i386/misc/get_bp.o
-../../obj-gnu/libc.a: ../../obj-gnu/./i386/misc/getprocessor.o
-../../obj-gnu/libc.a: ../../obj-gnu/./i386/misc/io_inb.o
-../../obj-gnu/libc.a: ../../obj-gnu/./i386/misc/io_inl.o
-../../obj-gnu/libc.a: ../../obj-gnu/./i386/misc/io_insb.o
-../../obj-gnu/libc.a: ../../obj-gnu/./i386/misc/io_insl.o
-../../obj-gnu/libc.a: ../../obj-gnu/./i386/misc/io_insw.o
-../../obj-gnu/libc.a: ../../obj-gnu/./i386/misc/io_intr.o
-../../obj-gnu/libc.a: ../../obj-gnu/./i386/misc/io_inw.o
-../../obj-gnu/libc.a: ../../obj-gnu/./i386/misc/io_outb.o
-../../obj-gnu/libc.a: ../../obj-gnu/./i386/misc/io_outl.o
-../../obj-gnu/libc.a: ../../obj-gnu/./i386/misc/io_outsb.o
-../../obj-gnu/libc.a: ../../obj-gnu/./i386/misc/io_outsl.o
-../../obj-gnu/libc.a: ../../obj-gnu/./i386/misc/io_outsw.o
-../../obj-gnu/libc.a: ../../obj-gnu/./i386/misc/io_outw.o
-../../obj-gnu/libc.a: ../../obj-gnu/./i386/misc/oneC_sum.o
-
-../../obj-gnu/libc.a:
-	gar cr ../../obj-gnu/libc.a $?
-
-../../obj-gnu/./i386/misc/alloca.o: alloca.s
-	gcc -O -D_MINIX -D_POSIX_SOURCE -E -x assembler-with-cpp -I. alloca.s | asmconv -mi386 ack gnu > ../../obj-gnu/./i386/misc/alloca.s.gnu || true
-	gas -o ../../obj-gnu/./i386/misc/alloca.o ../../obj-gnu/./i386/misc/alloca.s.gnu
-
-../../obj-gnu/./i386/misc/get_bp.o: get_bp.s
-	gcc -O -D_MINIX -D_POSIX_SOURCE -E -x assembler-with-cpp -I. get_bp.s | asmconv -mi386 ack gnu > ../../obj-gnu/./i386/misc/get_bp.s.gnu || true
-	gas -o ../../obj-gnu/./i386/misc/get_bp.o ../../obj-gnu/./i386/misc/get_bp.s.gnu
-
-../../obj-gnu/./i386/misc/getprocessor.o: getprocessor.s
-	gcc -O -D_MINIX -D_POSIX_SOURCE -E -x assembler-with-cpp -I. getprocessor.s | asmconv -mi386 ack gnu > ../../obj-gnu/./i386/misc/getprocessor.s.gnu || true
-	gas -o ../../obj-gnu/./i386/misc/getprocessor.o ../../obj-gnu/./i386/misc/getprocessor.s.gnu
-
-../../obj-gnu/./i386/misc/io_inb.o: io_inb.s
-	gcc -O -D_MINIX -D_POSIX_SOURCE -E -x assembler-with-cpp -I. io_inb.s | asmconv -mi386 ack gnu > ../../obj-gnu/./i386/misc/io_inb.s.gnu || true
-	gas -o ../../obj-gnu/./i386/misc/io_inb.o ../../obj-gnu/./i386/misc/io_inb.s.gnu
-
-../../obj-gnu/./i386/misc/io_inl.o: io_inl.s
-	gcc -O -D_MINIX -D_POSIX_SOURCE -E -x assembler-with-cpp -I. io_inl.s | asmconv -mi386 ack gnu > ../../obj-gnu/./i386/misc/io_inl.s.gnu || true
-	gas -o ../../obj-gnu/./i386/misc/io_inl.o ../../obj-gnu/./i386/misc/io_inl.s.gnu
-
-../../obj-gnu/./i386/misc/io_insb.o: io_insb.s
-	gcc -O -D_MINIX -D_POSIX_SOURCE -E -x assembler-with-cpp -I. io_insb.s | asmconv -mi386 ack gnu > ../../obj-gnu/./i386/misc/io_insb.s.gnu || true
-	gas -o ../../obj-gnu/./i386/misc/io_insb.o ../../obj-gnu/./i386/misc/io_insb.s.gnu
-
-../../obj-gnu/./i386/misc/io_insl.o: io_insl.s
-	gcc -O -D_MINIX -D_POSIX_SOURCE -E -x assembler-with-cpp -I. io_insl.s | asmconv -mi386 ack gnu > ../../obj-gnu/./i386/misc/io_insl.s.gnu || true
-	gas -o ../../obj-gnu/./i386/misc/io_insl.o ../../obj-gnu/./i386/misc/io_insl.s.gnu
-
-../../obj-gnu/./i386/misc/io_insw.o: io_insw.s
-	gcc -O -D_MINIX -D_POSIX_SOURCE -E -x assembler-with-cpp -I. io_insw.s | asmconv -mi386 ack gnu > ../../obj-gnu/./i386/misc/io_insw.s.gnu || true
-	gas -o ../../obj-gnu/./i386/misc/io_insw.o ../../obj-gnu/./i386/misc/io_insw.s.gnu
-
-../../obj-gnu/./i386/misc/io_intr.o: io_intr.s
-	gcc -O -D_MINIX -D_POSIX_SOURCE -E -x assembler-with-cpp -I. io_intr.s | asmconv -mi386 ack gnu > ../../obj-gnu/./i386/misc/io_intr.s.gnu || true
-	gas -o ../../obj-gnu/./i386/misc/io_intr.o ../../obj-gnu/./i386/misc/io_intr.s.gnu
-
-../../obj-gnu/./i386/misc/io_inw.o: io_inw.s
-	gcc -O -D_MINIX -D_POSIX_SOURCE -E -x assembler-with-cpp -I. io_inw.s | asmconv -mi386 ack gnu > ../../obj-gnu/./i386/misc/io_inw.s.gnu || true
-	gas -o ../../obj-gnu/./i386/misc/io_inw.o ../../obj-gnu/./i386/misc/io_inw.s.gnu
-
-../../obj-gnu/./i386/misc/io_outb.o: io_outb.s
-	gcc -O -D_MINIX -D_POSIX_SOURCE -E -x assembler-with-cpp -I. io_outb.s | asmconv -mi386 ack gnu > ../../obj-gnu/./i386/misc/io_outb.s.gnu || true
-	gas -o ../../obj-gnu/./i386/misc/io_outb.o ../../obj-gnu/./i386/misc/io_outb.s.gnu
-
-../../obj-gnu/./i386/misc/io_outl.o: io_outl.s
-	gcc -O -D_MINIX -D_POSIX_SOURCE -E -x assembler-with-cpp -I. io_outl.s | asmconv -mi386 ack gnu > ../../obj-gnu/./i386/misc/io_outl.s.gnu || true
-	gas -o ../../obj-gnu/./i386/misc/io_outl.o ../../obj-gnu/./i386/misc/io_outl.s.gnu
-
-../../obj-gnu/./i386/misc/io_outsb.o: io_outsb.s
-	gcc -O -D_MINIX -D_POSIX_SOURCE -E -x assembler-with-cpp -I. io_outsb.s | asmconv -mi386 ack gnu > ../../obj-gnu/./i386/misc/io_outsb.s.gnu || true
-	gas -o ../../obj-gnu/./i386/misc/io_outsb.o ../../obj-gnu/./i386/misc/io_outsb.s.gnu
-
-../../obj-gnu/./i386/misc/io_outsl.o: io_outsl.s
-	gcc -O -D_MINIX -D_POSIX_SOURCE -E -x assembler-with-cpp -I. io_outsl.s | asmconv -mi386 ack gnu > ../../obj-gnu/./i386/misc/io_outsl.s.gnu || true
-	gas -o ../../obj-gnu/./i386/misc/io_outsl.o ../../obj-gnu/./i386/misc/io_outsl.s.gnu
-
-../../obj-gnu/./i386/misc/io_outsw.o: io_outsw.s
-	gcc -O -D_MINIX -D_POSIX_SOURCE -E -x assembler-with-cpp -I. io_outsw.s | asmconv -mi386 ack gnu > ../../obj-gnu/./i386/misc/io_outsw.s.gnu || true
-	gas -o ../../obj-gnu/./i386/misc/io_outsw.o ../../obj-gnu/./i386/misc/io_outsw.s.gnu
-
-../../obj-gnu/./i386/misc/io_outw.o: io_outw.s
-	gcc -O -D_MINIX -D_POSIX_SOURCE -E -x assembler-with-cpp -I. io_outw.s | asmconv -mi386 ack gnu > ../../obj-gnu/./i386/misc/io_outw.s.gnu || true
-	gas -o ../../obj-gnu/./i386/misc/io_outw.o ../../obj-gnu/./i386/misc/io_outw.s.gnu
-
-../../obj-gnu/./i386/misc/oneC_sum.o: oneC_sum.s
-	gcc -O -D_MINIX -D_POSIX_SOURCE -E -x assembler-with-cpp -I. oneC_sum.s | asmconv -mi386 ack gnu > ../../obj-gnu/./i386/misc/oneC_sum.s.gnu || true
-	gas -o ../../obj-gnu/./i386/misc/oneC_sum.o ../../obj-gnu/./i386/misc/oneC_sum.s.gnu
-
-
-
-
-clean::
-	rm -f ../../obj-ack//./i386/misc/*
-	rm -f ../../obj-gnu/./i386/misc/*
-
-include Makedepend-ack
-include .depend-ack
-
-include Makedepend-gnu
-include .depend-gnu
Index: trunk/minix/lib/i386/misc/Makefile.in
===================================================================
--- trunk/minix/lib/i386/misc/Makefile.in	(revision 9)
+++ 	(revision )
@@ -1,26 +1,0 @@
-# Makefile for lib/i386/misc.
-
-CFLAGS="-O -D_MINIX -D_POSIX_SOURCE"
-
-LIBRARIES=libc
-
-libc_FILES=" \
-	alloca.s \
-	get_bp.s \
-	getprocessor.s \
-	io_inb.s \
-	io_inl.s \
-	io_insb.s \
-	io_insl.s \
-	io_insw.s \
-	io_intr.s \
-	io_inw.s \
-	io_outb.s \
-	io_outl.s \
-	io_outsb.s \
-	io_outsl.s \
-	io_outsw.s \
-	io_outw.s \
-	oneC_sum.s"
-
-TYPE=both
Index: trunk/minix/lib/i386/misc/alloca.s
===================================================================
--- trunk/minix/lib/i386/misc/alloca.s	(revision 9)
+++ 	(revision )
@@ -1,33 +1,0 @@
-#
-!	alloca() - allocate space on the stack		Author: Kees J. Bot
-!								2 Dec 1993
-.sect .text; .sect .rom; .sect .data; .sect .bss
-
-.sect .text
-	.align	16
-.define _alloca
-_alloca:
-#if __ACK__
-	pop	ecx		! Return address
-	pop	eax		! Bytes to allocate
-	add	eax, 2*4+3	! Add space for two saved register variables
-	andb	al, 0xFC	! Align
-	mov	ebx, esp	! Keep current esp
-	sub	esp, eax	! Lower stack
-	mov	eax, esp	! Return value
-	push	4(ebx)		! Push what is probably the saved esi
-	push	(ebx)		! Saved edi
-				! Now ACK can still do:
-				!	pop edi; pop esi; leave; ret
-	push	eax		! Dummy argument
-	jmp	ecx
-#else
-	pop	ecx		! Return address
-	pop	eax		! Bytes to allocate
-	add	eax, 3
-	andb	al, 0xFC	! Align
-	sub	esp, eax	! Lower stack
-	mov	eax, esp	! Return value
-	push	eax		! Dummy argument
-	jmp	ecx
-#endif
Index: trunk/minix/lib/i386/misc/get_bp.s
===================================================================
--- trunk/minix/lib/i386/misc/get_bp.s	(revision 9)
+++ 	(revision )
@@ -1,16 +1,0 @@
-! get_bp.s
-!
-! return EBP in EAX
-!
-! Created:	Sep 7, 1992 by Philip Homburg
-
-.sect .text; .sect .rom; .sect .data; .sect .bss
-
-.sect .text
-.define _get_bp
-_get_bp:
-	mov	eax, ebp
-	ret
-
-! $PchId: get_bp.ack.s,v 1.3 1996/02/23 08:30:52 philip Exp $
-
Index: trunk/minix/lib/i386/misc/getprocessor.s
===================================================================
--- trunk/minix/lib/i386/misc/getprocessor.s	(revision 9)
+++ 	(revision )
@@ -1,56 +1,0 @@
-!	getprocessor() - determine processor type	Author: Kees J. Bot
-!								26 Jan 1994
-
-.sect .text; .sect .rom; .sect .data; .sect .bss
-.sect .text
-
-! int getprocessor(void);
-!	Return 386, 486, 586, ...
-
-.define	_getprocessor
-
-_getprocessor:
-	push	ebp
-	mov	ebp, esp
-	and	esp, 0xFFFFFFFC	! Align stack to avoid AC fault
-	mov	ecx, 0x00040000	! Try to flip the AC bit introduced on the 486
-	call	flip
-	mov	eax, 386	! 386 if it didn't react to "flipping"
-	jz	gotprocessor
-	mov	ecx, 0x00200000	! Try to flip the ID bit introduced on the 586
-	call	flip
-	mov	eax, 486	! 486 if it didn't react
-	jz	gotprocessor
-	pushf
-	pusha			! Save the world
-	mov	eax, 1
-	.data1	0x0F, 0xA2	! CPUID instruction tells the processor type
-	andb	ah, 0x0F	! Extract the family (5, 6, ...)
-	movzxb	eax, ah
-	cmp	eax, 15		! 15: extended family
-	jne	direct
-	mov	eax, 6		! Make it 686
-direct:
-	imul	eax, 100	! 500, 600, ...
-	add	eax, 86		! 586, 686, ...
-	mov	7*4(esp), eax	! Pass eax through
-	popa
-	popf
-gotprocessor:
-	leave
-	ret
-
-flip:
-	pushf			! Push eflags
-	pop	eax		! eax = eflags
-	mov	edx, eax	! Save original eflags
-	xor	eax, ecx	! Flip the bit to test
-	push	eax		! Push modified eflags value
-	popf			! Load modified eflags register
-	pushf
-	pop	eax		! Get it again
-	push	edx
-	popf			! Restore original eflags register
-	xor	eax, edx	! See if the bit changed
-	test	eax, ecx
-	ret
Index: trunk/minix/lib/i386/misc/io_inb.s
===================================================================
--- trunk/minix/lib/i386/misc/io_inb.s	(revision 9)
+++ 	(revision )
@@ -1,14 +1,0 @@
-!	inb() - Input one byte				Author: Kees J. Bot
-!								18 Mar 1996
-!	unsigned inb(U16_t port);
-
-.sect .text
-.define _inb
-_inb:
-	push	ebp
-	mov	ebp, esp
-	mov	edx, 8(ebp)		! port
-	xor	eax, eax
-	inb	dx			! read 1 byte
-	pop	ebp
-	ret
Index: trunk/minix/lib/i386/misc/io_inl.s
===================================================================
--- trunk/minix/lib/i386/misc/io_inl.s	(revision 9)
+++ 	(revision )
@@ -1,13 +1,0 @@
-!	inl() - Input one dword				Author: Kees J. Bot
-!								18 Mar 1996
-!	unsigned inl(U16_t port);
-
-.sect .text
-.define _inl
-_inl:
-	push	ebp
-	mov	ebp, esp
-	mov	edx, 8(ebp)		! port
-	in	dx			! read 1 dword
-	pop	ebp
-	ret
Index: trunk/minix/lib/i386/misc/io_insb.s
===================================================================
--- trunk/minix/lib/i386/misc/io_insb.s	(revision 9)
+++ 	(revision )
@@ -1,18 +1,0 @@
-!	insb() - Input a byte array			Author: Kees J. Bot
-!								18 Mar 1996
-!	void insb(U16_t port, void *buf, size_t count);
-
-.sect .text
-.define _insb
-_insb:
-	push	ebp
-	mov	ebp, esp
-	cld
-	push	edi
-	mov	edx, 8(ebp)		! port
-	mov	edi, 12(ebp)		! buf
-	mov	ecx, 16(ebp)		! byte count
-   rep	insb				! input many bytes
-	pop	edi
-	pop	ebp
-	ret
Index: trunk/minix/lib/i386/misc/io_insl.s
===================================================================
--- trunk/minix/lib/i386/misc/io_insl.s	(revision 9)
+++ 	(revision )
@@ -1,19 +1,0 @@
-!	insl() - Input a dword array			Author: Kees J. Bot
-!								18 Mar 1996
-!	void insl(U16_t port, void *buf, size_t count);
-
-.sect .text
-.define _insl
-_insl:
-	push	ebp
-	mov	ebp, esp
-	cld
-	push	edi
-	mov	edx, 8(ebp)		! port
-	mov	edi, 12(ebp)		! buf
-	mov	ecx, 16(ebp)		! byte count
-	shr	ecx, 2			! dword count
-   rep	ins				! input many dwords
-	pop	edi
-	pop	ebp
-	ret
Index: trunk/minix/lib/i386/misc/io_insw.s
===================================================================
--- trunk/minix/lib/i386/misc/io_insw.s	(revision 9)
+++ 	(revision )
@@ -1,19 +1,0 @@
-!	insw() - Input a word array			Author: Kees J. Bot
-!								18 Mar 1996
-!	void insw(U16_t port, void *buf, size_t count);
-
-.sect .text
-.define _insw
-_insw:
-	push	ebp
-	mov	ebp, esp
-	cld
-	push	edi
-	mov	edx, 8(ebp)		! port
-	mov	edi, 12(ebp)		! buf
-	mov	ecx, 16(ebp)		! byte count
-	shr	ecx, 1			! word count
-rep o16	ins				! input many words
-	pop	edi
-	pop	ebp
-	ret
Index: trunk/minix/lib/i386/misc/io_intr.s
===================================================================
--- trunk/minix/lib/i386/misc/io_intr.s	(revision 9)
+++ 	(revision )
@@ -1,16 +1,0 @@
-!	intr_disable(), intr_enable - Disable/Enable hardware interrupts.
-!							Author: Kees J. Bot
-!								18 Mar 1996
-!	void intr_disable(void);
-!	void intr_enable(void);
-
-.sect .text
-.define _intr_disable
-_intr_disable:
-	cli
-	ret
-
-.define _intr_enable
-_intr_enable:
-	sti
-	ret
Index: trunk/minix/lib/i386/misc/io_inw.s
===================================================================
--- trunk/minix/lib/i386/misc/io_inw.s	(revision 9)
+++ 	(revision )
@@ -1,14 +1,0 @@
-!	inw() - Input one word				Author: Kees J. Bot
-!								18 Mar 1996
-!	unsigned inw(U16_t port);
-
-.sect .text
-.define _inw
-_inw:
-	push	ebp
-	mov	ebp, esp
-	mov	edx, 8(ebp)		! port
-	xor	eax, eax
-    o16	in	dx			! read 1 word
-	pop	ebp
-	ret
Index: trunk/minix/lib/i386/misc/io_outb.s
===================================================================
--- trunk/minix/lib/i386/misc/io_outb.s	(revision 9)
+++ 	(revision )
@@ -1,14 +1,0 @@
-!	outb() - Output one byte			Author: Kees J. Bot
-!								18 Mar 1996
-!	void outb(U16_t port, U8_t value);
-
-.sect .text
-.define _outb
-_outb:
-	push	ebp
-	mov	ebp, esp
-	mov	edx, 8(ebp)		! port
-	mov	eax, 8+4(ebp)		! value
-	outb	dx			! output 1 byte
-	pop	ebp
-	ret
Index: trunk/minix/lib/i386/misc/io_outl.s
===================================================================
--- trunk/minix/lib/i386/misc/io_outl.s	(revision 9)
+++ 	(revision )
@@ -1,14 +1,0 @@
-!	outl() - Output one dword			Author: Kees J. Bot
-!								18 Mar 1996
-!	void outl(U16_t port, u32_t value);
-
-.sect .text
-.define _outl
-_outl:
-	push	ebp
-	mov	ebp, esp
-	mov	edx, 8(ebp)		! port
-	mov	eax, 8+4(ebp)		! value
-	out	dx			! output 1 dword
-	pop	ebp
-	ret
Index: trunk/minix/lib/i386/misc/io_outsb.s
===================================================================
--- trunk/minix/lib/i386/misc/io_outsb.s	(revision 9)
+++ 	(revision )
@@ -1,18 +1,0 @@
-!	outsb() - Output a byte array		Author: Kees J. Bot
-!								18 Mar 1996
-!	void outsb(U16_t port, void *buf, size_t count);
-
-.sect .text
-.define _outsb
-_outsb:
-	push	ebp
-	mov	ebp, esp
-	cld
-	push	esi
-	mov	edx, 8(ebp)		! port
-	mov	esi, 12(ebp)		! buf
-	mov	ecx, 16(ebp)		! byte count
-   rep	outsb				! output many bytes
-	pop	esi
-	pop	ebp
-	ret
Index: trunk/minix/lib/i386/misc/io_outsl.s
===================================================================
--- trunk/minix/lib/i386/misc/io_outsl.s	(revision 9)
+++ 	(revision )
@@ -1,19 +1,0 @@
-!	outsl() - Output a dword array		Author: Kees J. Bot
-!								18 Mar 1996
-!	void outsl(U16_t port, void *buf, size_t count);
-
-.sect .text
-.define _outsl
-_outsl:
-	push	ebp
-	mov	ebp, esp
-	cld
-	push	esi
-	mov	edx, 8(ebp)		! port
-	mov	esi, 12(ebp)		! buf
-	mov	ecx, 16(ebp)		! byte count
-	shr	ecx, 2			! dword count
-   rep	outs				! output many dwords
-	pop	esi
-	pop	ebp
-	ret
Index: trunk/minix/lib/i386/misc/io_outsw.s
===================================================================
--- trunk/minix/lib/i386/misc/io_outsw.s	(revision 9)
+++ 	(revision )
@@ -1,19 +1,0 @@
-!	outsw() - Output a word array		Author: Kees J. Bot
-!								18 Mar 1996
-!	void outsw(U16_t port, void *buf, size_t count);
-
-.sect .text
-.define _outsw
-_outsw:
-	push	ebp
-	mov	ebp, esp
-	cld
-	push	esi
-	mov	edx, 8(ebp)		! port
-	mov	esi, 12(ebp)		! buf
-	mov	ecx, 16(ebp)		! byte count
-	shr	ecx, 1			! word count
-rep o16	outs				! output many words
-	pop	esi
-	pop	ebp
-	ret
Index: trunk/minix/lib/i386/misc/io_outw.s
===================================================================
--- trunk/minix/lib/i386/misc/io_outw.s	(revision 9)
+++ 	(revision )
@@ -1,14 +1,0 @@
-!	outw() - Output one word			Author: Kees J. Bot
-!								18 Mar 1996
-!	void outw(U16_t port, U16_t value);
-
-.sect .text
-.define _outw
-_outw:
-	push	ebp
-	mov	ebp, esp
-	mov	edx, 8(ebp)		! port
-	mov	eax, 8+4(ebp)		! value
-    o16	out	dx			! output 1 word
-	pop	ebp
-	ret
Index: trunk/minix/lib/i386/misc/oneC_sum.s
===================================================================
--- trunk/minix/lib/i386/misc/oneC_sum.s	(revision 9)
+++ 	(revision )
@@ -1,80 +1,0 @@
-!	oneC_sum() - One complement`s checksum		Author: Kees J. Bot
-!								9 May 1995
-! See RFC 1071, "Computing the Internet checksum"
-! See also the C version of this code.
-
-.sect .text
-
-.define _oneC_sum
-	.align	16
-_oneC_sum:
-	push	ebp
-	mov	ebp, esp
-	push	esi
-	push	edi
-	movzx	eax, 8(ebp)		! Checksum of previous block
-	mov	esi, 12(ebp)		! Data to compute checksum over
-	mov	edi, 16(ebp)		! Number of bytes
-
-	xor	edx, edx
-	xorb	cl, cl
-align:	test	esi, 3			! Is the data aligned?
-	jz	aligned
-	test	edi, edi
-	jz	0f
-	movb	dl, (esi)		! Rotate the first unaligned bytes
-	dec	edi			! into the edx register
-0:	inc	esi
-	ror	edx, 8
-	ror	eax, 8			! Rotate the checksum likewise
-	addb	cl, 8			! Number of bits rotated
-	jmp	align
-aligned:add	eax, edx		! Summate the unaligned bytes
-	adc	eax, 0			! Add carry back in for one`s complement
-
-	jmp	add6test
-	.align	16
-add6:	add	eax, (esi)		! Six times unrolled loop, see below
-	adc	eax, 4(esi)
-	adc	eax, 8(esi)
-	adc	eax, 12(esi)
-	adc	eax, 16(esi)
-	adc	eax, 20(esi)
-	adc	eax, 0
-	add	esi, 24
-add6test:
-	sub	edi, 24
-	jae	add6
-	add	edi, 24
-
-	jmp	add1test
-	.align	16
-add1:	add	eax, (esi)		! while ((edi -= 4) >= 0)
-	adc	eax, 0			!	eax += *esi++;
-	add	esi, 4			! edi += 4;
-add1test:
-	sub	edi, 4
-	jae	add1
-	add	edi, 4
-
-	jz	done			! Are there extra bytes?
-	mov	edx, (esi)		! Load extra bytes in a full dword
-	and	edx, mask-4(edi*4)	! Mask off excess
-	add	eax, edx		! Add in the last bits
-	adc	eax, 0
-done:	rol	eax, cl			! Undo the rotation at the beginning
-	mov	edx, eax
-	shr	eax, 16
-  o16	add	ax, dx			! Add the two words in eax to form
-  o16	adc	ax, 0			! a 16 bit sum
-	pop	edi
-	pop	esi
-	pop	ebp
-	ret
-
-.sect .rom
-	.align	4
-mask:	.data4	0x000000FF, 0x0000FFFF, 0x00FFFFFF
-
-!
-! $PchId: oneC_sum.ack.s,v 1.2 1996/03/12 19:33:51 philip Exp $
Index: trunk/minix/lib/i386/rts/Makedepend-ack
===================================================================
--- trunk/minix/lib/i386/rts/Makedepend-ack	(revision 9)
+++ 	(revision )
@@ -1,10 +1,0 @@
-depend-ack:
-	rm .depend-ack
-	touch .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -E' __sigreturn.s | sed -e 's:^\(.\):../../obj-ack//./i386/rts/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -E' _ipc.s | sed -e 's:^\(.\):../../obj-ack//./i386/rts/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -E' _ipcnew.s | sed -e 's:^\(.\):../../obj-ack//./i386/rts/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -E' brksize.s | sed -e 's:^\(.\):../../obj-ack//./i386/rts/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -E' crtso.s | sed -e 's:^\(.\):../../obj-ack/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -E' m2rtso.s | sed -e 's:^\(.\):../../obj-ack/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -E' prtso.s | sed -e 's:^\(.\):../../obj-ack/\1:' >> .depend-ack
Index: trunk/minix/lib/i386/rts/Makedepend-gnu
===================================================================
--- trunk/minix/lib/i386/rts/Makedepend-gnu	(revision 9)
+++ 	(revision )
@@ -1,10 +1,0 @@
-depend-gnu:
-	rm .depend-gnu
-	touch .depend-gnu
-	mkdep 'gcc -O -D_MINIX -D_POSIX_SOURCE -E -x assembler-with-cpp -I.' __sigreturn.s | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../../obj-gnu/./i386/rts/\1:' >> .depend-gnu
-	mkdep 'gcc -O -D_MINIX -D_POSIX_SOURCE -E -x assembler-with-cpp -I.' _ipc.s | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../../obj-gnu/./i386/rts/\1:' >> .depend-gnu
-	mkdep 'gcc -O -D_MINIX -D_POSIX_SOURCE -E -x assembler-with-cpp -I.' _ipcnew.s | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../../obj-gnu/./i386/rts/\1:' >> .depend-gnu
-	mkdep 'gcc -O -D_MINIX -D_POSIX_SOURCE -E -x assembler-with-cpp -I.' brksize.s | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../../obj-gnu/./i386/rts/\1:' >> .depend-gnu
-	mkdep 'gcc -O -D_MINIX -D_POSIX_SOURCE -E -x assembler-with-cpp -I.' crtso.s | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../../obj-gnu/\1:' >> .depend-gnu
-	mkdep 'gcc -O -D_MINIX -D_POSIX_SOURCE -E -x assembler-with-cpp -I.' m2rtso.s | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../../obj-gnu/\1:' >> .depend-gnu
-	mkdep 'gcc -O -D_MINIX -D_POSIX_SOURCE -E -x assembler-with-cpp -I.' prtso.s | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../../obj-gnu/\1:' >> .depend-gnu
Index: trunk/minix/lib/i386/rts/Makefile
===================================================================
--- trunk/minix/lib/i386/rts/Makefile	(revision 9)
+++ 	(revision )
@@ -1,113 +1,0 @@
-#Generated from ./i386/rts/Makefile.in
-all: all-ack
-
-all-ack:
-all-gnu:
-
-makefiles: Makefile
-Makedepend-ack Makedepend-gnu: 
-	sh ../../generate.sh ./i386/rts ../../obj-ack/ ../../obj-gnu
-
-Makefile: Makefile.in Makedepend-ack Makedepend-gnu
-	sh ../../generate.sh ./i386/rts ../../obj-ack/ ../../obj-gnu
-	@echo
-	@echo *Attention*
-	@echo Makefile is regenerated... rerun command to see changes
-	@echo *Attention*
-	@echo
-
-depend: depend-ack
-all-ack: ../../obj-ack//libc.a
-
-../../obj-ack//libc.a: ../../obj-ack//libc.a(__sigreturn.o)
-../../obj-ack//libc.a: ../../obj-ack//libc.a(_ipc.o)
-../../obj-ack//libc.a: ../../obj-ack//libc.a(_ipcnew.o)
-../../obj-ack//libc.a: ../../obj-ack//libc.a(brksize.o)
-
-../../obj-ack//libc.a:
-	ar cr ../../obj-ack//libc.a ../../obj-ack//./i386/rts/*.o
-	rm ../../obj-ack//./i386/rts/*.o
-
-../../obj-ack//libc.a(__sigreturn.o): __sigreturn.s
-	cc -O -D_MINIX -D_POSIX_SOURCE -c -o ../../obj-ack//./i386/rts/__sigreturn.o __sigreturn.s
-../../obj-ack//libc.a(_ipc.o): _ipc.s
-	cc -O -D_MINIX -D_POSIX_SOURCE -c -o ../../obj-ack//./i386/rts/_ipc.o _ipc.s
-../../obj-ack//libc.a(_ipcnew.o): _ipcnew.s
-	cc -O -D_MINIX -D_POSIX_SOURCE -c -o ../../obj-ack//./i386/rts/_ipcnew.o _ipcnew.s
-../../obj-ack//libc.a(brksize.o): brksize.s
-	cc -O -D_MINIX -D_POSIX_SOURCE -c -o ../../obj-ack//./i386/rts/brksize.o brksize.s
-
-all-gnu: ../../obj-gnu/libc.a
-
-../../obj-gnu/libc.a: ../../obj-gnu/./i386/rts/__sigreturn.o
-../../obj-gnu/libc.a: ../../obj-gnu/./i386/rts/_ipc.o
-../../obj-gnu/libc.a: ../../obj-gnu/./i386/rts/_ipcnew.o
-../../obj-gnu/libc.a: ../../obj-gnu/./i386/rts/brksize.o
-
-../../obj-gnu/libc.a:
-	gar cr ../../obj-gnu/libc.a $?
-
-../../obj-gnu/./i386/rts/__sigreturn.o: __sigreturn.s
-	gcc -O -D_MINIX -D_POSIX_SOURCE -E -x assembler-with-cpp -I. __sigreturn.s | asmconv -mi386 ack gnu > ../../obj-gnu/./i386/rts/__sigreturn.s.gnu || true
-	gas -o ../../obj-gnu/./i386/rts/__sigreturn.o ../../obj-gnu/./i386/rts/__sigreturn.s.gnu
-
-../../obj-gnu/./i386/rts/_ipc.o: _ipc.s
-	gcc -O -D_MINIX -D_POSIX_SOURCE -E -x assembler-with-cpp -I. _ipc.s | asmconv -mi386 ack gnu > ../../obj-gnu/./i386/rts/_ipc.s.gnu || true
-	gas -o ../../obj-gnu/./i386/rts/_ipc.o ../../obj-gnu/./i386/rts/_ipc.s.gnu
-
-../../obj-gnu/./i386/rts/_ipcnew.o: _ipcnew.s
-	gcc -O -D_MINIX -D_POSIX_SOURCE -E -x assembler-with-cpp -I. _ipcnew.s | asmconv -mi386 ack gnu > ../../obj-gnu/./i386/rts/_ipcnew.s.gnu || true
-	gas -o ../../obj-gnu/./i386/rts/_ipcnew.o ../../obj-gnu/./i386/rts/_ipcnew.s.gnu
-
-../../obj-gnu/./i386/rts/brksize.o: brksize.s
-	gcc -O -D_MINIX -D_POSIX_SOURCE -E -x assembler-with-cpp -I. brksize.s | asmconv -mi386 ack gnu > ../../obj-gnu/./i386/rts/brksize.s.gnu || true
-	gas -o ../../obj-gnu/./i386/rts/brksize.o ../../obj-gnu/./i386/rts/brksize.s.gnu
-
-
-
-all-ack: ../../obj-ack//crtso.o
-
-../../obj-ack//crtso.o: crtso.s
-	cc -O -D_MINIX -D_POSIX_SOURCE -c -o ../../obj-ack//crtso.o crtso.s
-
-all-gnu: ../../obj-gnu/crtso.o
-
-../../obj-gnu/crtso.o: crtso.s
-	gcc -O -D_MINIX -D_POSIX_SOURCE -E -x assembler-with-cpp -I. crtso.s | asmconv -mi386 ack gnu > ../../obj-gnu/./i386/rts/crtso.s.gnu || true
-	gas -o ../../obj-gnu/crtso.o ../../obj-gnu/./i386/rts/crtso.s.gnu
-
-
-all-ack: ../../obj-ack//m2rtso.o
-
-../../obj-ack//m2rtso.o: m2rtso.s
-	cc -O -D_MINIX -D_POSIX_SOURCE -c -o ../../obj-ack//m2rtso.o m2rtso.s
-
-all-gnu: ../../obj-gnu/m2rtso.o
-
-../../obj-gnu/m2rtso.o: m2rtso.s
-	gcc -O -D_MINIX -D_POSIX_SOURCE -E -x assembler-with-cpp -I. m2rtso.s | asmconv -mi386 ack gnu > ../../obj-gnu/./i386/rts/m2rtso.s.gnu || true
-	gas -o ../../obj-gnu/m2rtso.o ../../obj-gnu/./i386/rts/m2rtso.s.gnu
-
-
-all-ack: ../../obj-ack//prtso.o
-
-../../obj-ack//prtso.o: prtso.s
-	cc -O -D_MINIX -D_POSIX_SOURCE -c -o ../../obj-ack//prtso.o prtso.s
-
-all-gnu: ../../obj-gnu/prtso.o
-
-../../obj-gnu/prtso.o: prtso.s
-	gcc -O -D_MINIX -D_POSIX_SOURCE -E -x assembler-with-cpp -I. prtso.s | asmconv -mi386 ack gnu > ../../obj-gnu/./i386/rts/prtso.s.gnu || true
-	gas -o ../../obj-gnu/prtso.o ../../obj-gnu/./i386/rts/prtso.s.gnu
-
-
-
-clean::
-	rm -f ../../obj-ack//./i386/rts/*
-	rm -f ../../obj-gnu/./i386/rts/*
-
-include Makedepend-ack
-include .depend-ack
-
-include Makedepend-gnu
-include .depend-gnu
Index: trunk/minix/lib/i386/rts/Makefile.in
===================================================================
--- trunk/minix/lib/i386/rts/Makefile.in	(revision 9)
+++ 	(revision )
@@ -1,18 +1,0 @@
-# Makefile for lib/i386/rts.
-
-CFLAGS="-O -D_MINIX -D_POSIX_SOURCE"
-
-LIBRARIES=libc
-
-libc_FILES=" \
-	__sigreturn.s \
-	_ipc.s \
-	_ipcnew.s \
-	brksize.s"
-	
-STARTFILES="\
-	crtso.s \
-	m2rtso.s \
-	prtso.s"
-
-TYPE=both
Index: trunk/minix/lib/i386/rts/__sigreturn.s
===================================================================
--- trunk/minix/lib/i386/rts/__sigreturn.s	(revision 9)
+++ 	(revision )
@@ -1,10 +1,0 @@
-! This routine is the low-level code for returning from signals.  
-! It calls __sigreturn, which is the normal "system call" routine.
-! Both ___sigreturn and __sigreturn are needed.
-.sect .text; .sect .rom; .sect .data; .sect .bss
-.sect .text
-.define ___sigreturn
-.extern __sigreturn
-___sigreturn:
-	add esp, 16
-	jmp __sigreturn
Index: trunk/minix/lib/i386/rts/_ipc.s
===================================================================
--- trunk/minix/lib/i386/rts/_ipc.s	(revision 9)
+++ 	(revision )
@@ -1,79 +1,0 @@
-.sect .text; .sect .rom; .sect .data; .sect .bss
-.define __echo, __notify, __send, __receive, __sendrec 
-
-! See src/kernel/ipc.h for C definitions
-SEND = 1
-RECEIVE = 2
-SENDREC = 3 
-NOTIFY = 4
-ECHO = 8
-SYSVEC = 33			! trap to kernel 
-
-SRC_DST = 8			! source/ destination process 
-ECHO_MESS = 8			! echo doesn't have SRC_DST 
-MESSAGE = 12			! message pointer 
-
-!*========================================================================*
-!                           IPC assembly routines			  *
-!*========================================================================*
-! all message passing routines save ebp, but destroy eax and ecx.
-.define __echo, __notify, __send, __receive, __sendrec 
-.sect .text
-__send:
-	push	ebp
-	mov	ebp, esp
-	push	ebx
-	mov	eax, SRC_DST(ebp)	! eax = dest-src
-	mov	ebx, MESSAGE(ebp)	! ebx = message pointer
-	mov	ecx, SEND		! _send(dest, ptr)
-	int	SYSVEC			! trap to the kernel
-	pop	ebx
-	pop	ebp
-	ret
-
-__receive:
-	push	ebp
-	mov	ebp, esp
-	push	ebx
-	mov	eax, SRC_DST(ebp)	! eax = dest-src
-	mov	ebx, MESSAGE(ebp)	! ebx = message pointer
-	mov	ecx, RECEIVE		! _receive(src, ptr)
-	int	SYSVEC			! trap to the kernel
-	pop	ebx
-	pop	ebp
-	ret
-
-__sendrec:
-	push	ebp
-	mov	ebp, esp
-	push	ebx
-	mov	eax, SRC_DST(ebp)	! eax = dest-src
-	mov	ebx, MESSAGE(ebp)	! ebx = message pointer
-	mov	ecx, SENDREC		! _sendrec(srcdest, ptr)
-	int	SYSVEC			! trap to the kernel
-	pop	ebx
-	pop	ebp
-	ret
-
-__notify:
-	push	ebp
-	mov	ebp, esp
-	push	ebx
-	mov	eax, SRC_DST(ebp)	! ebx = destination 
-	mov	ecx, NOTIFY		! _notify(srcdst)
-	int	SYSVEC			! trap to the kernel
-	pop	ebx
-	pop	ebp
-	ret
-
-__echo:
-	push	ebp
-	mov	ebp, esp
-	push	ebx
-	mov	ebx, ECHO_MESS(ebp)	! ebx = message pointer
-	mov	ecx, ECHO		! _echo(srcdest, ptr)
-	int	SYSVEC			! trap to the kernel
-	pop	ebx
-	pop	ebp
-	ret
-
Index: trunk/minix/lib/i386/rts/_ipcnew.s
===================================================================
--- trunk/minix/lib/i386/rts/_ipcnew.s	(revision 9)
+++ 	(revision )
@@ -1,75 +1,0 @@
-.sect .text; .sect .rom; .sect .data; .sect .bss
-.define __ipc_request, __ipc_reply, __ipc_notify, __ipc_receive
-
-! See src/kernel/ipc.h for C definitions.
-IPC_REQUEST = 16		! each gets a distinct bit
-IPC_REPLY = 32
-IPC_NOTIFY = 64
-IPC_RECEIVE = 128
-
-SYSVEC = 33			! trap to kernel 
-
-! Offsets of arguments relative to stack pointer.
-SRC_DST = 8			! source/ destination process 
-SEND_MSG = 12			! message pointer for sending 
-EVENT_SET = 12			! notification event set 
-RECV_MSG = 16			! message pointer for receiving 
-
-
-!*========================================================================*
-!                           IPC assembly routines			  *
-!*========================================================================*
-! all message passing routines save ebp, but destroy eax, ecx, and edx.
-.define __ipc_request, __ipc_reply, __ipc_notify, __ipc_receive
-.sect .text
-
-__ipc_request:
-	push	ebp
-	mov	ebp, esp
-	push	ebx
-	mov	eax, SRC_DST(ebp)	! eax = destination
-	mov	ebx, SEND_MSG(ebp)	! ebx = message pointer
-	mov	ecx, IPC_REQUEST	! _ipc_request(dst, ptr)
-	int	SYSVEC			! trap to the kernel
-	pop	ebx
-	pop	ebp
-	ret
-
-__ipc_reply:
-	push	ebp
-	mov	ebp, esp
-	push	ebx
-	mov	eax, SRC_DST(ebp)	! eax = destination
-	mov	ebx, SEND_MSG(ebp)	! ebx = message pointer
-	mov	ecx, IPC_REPLY		! _ipc_reply(dst, ptr)
-	int	SYSVEC			! trap to the kernel
-	pop	ebx
-	pop	ebp
-	ret
-
-__ipc_receive:
-	push	ebp
-	mov	ebp, esp
-	push	ebx
-	mov	eax, SRC_DST(ebp)	! eax = source
-	mov	edx, EVENT_SET(ebp)	! ebx = event set
-	mov	ebx, RCV_MSG(ebp)	! ebx = message pointer
-	mov	ecx, IPC_RECEIVE	! _ipc_receive(src, events, ptr)
-	int	SYSVEC			! trap to the kernel
-	pop	ebx
-	pop	ebp
-	ret
-
-__ipc_notify:
-	push	ebp
-	mov	ebp, esp
-	push	ebx
-	mov	eax, SRC_DST(ebp)	! ebx = destination 
-	mov	edx, EVENT_SET(ebp)	! edx = event set 
-	mov	ecx, IPC_NOTIFY		! _ipc_notify(dst, events)
-	int	SYSVEC			! trap to the kernel
-	pop	ebx
-	pop	ebp
-	ret
-
-
Index: trunk/minix/lib/i386/rts/brksize.s
===================================================================
--- trunk/minix/lib/i386/rts/brksize.s	(revision 9)
+++ 	(revision )
@@ -1,5 +1,0 @@
-.sect .text; .sect .rom; .sect .data; .sect .bss
-.define __brksize
-.sect .data
-.extern endbss, __brksize
-__brksize: .data4 endbss
Index: trunk/minix/lib/i386/rts/crtso.s
===================================================================
--- trunk/minix/lib/i386/rts/crtso.s	(revision 9)
+++ 	(revision )
@@ -1,72 +1,0 @@
-! This is the C run-time start-off routine.  It's job is to take the
-! arguments as put on the stack by EXEC, and to parse them and set them up the
-! way _main expects them.
-! It also initializes _environ when this variable isn't defined by the
-! programmer.  The detection of whether _environ belong to us is rather
-! simplistic.  We simply check for some magic value, but there is no other
-! way.
-
-.sect .text; .sect .rom; .sect .data; .sect .bss
-
-.define begtext, begdata, begbss
-.sect .text
-begtext:
-.sect .rom
-begrom:
-.sect .data
-begdata:
-.sect .bss
-begbss:
-
-.define crtso, __penviron, __penvp, __fpu_present
-.extern _main, _exit
-.sect .text
-crtso:
-	xor     ebp, ebp		! clear for backtrace of core files
-	mov     eax, (esp)		! argc
-	lea     edx, 4(esp)		! argv
-	lea     ecx, 8(esp)(eax*4)	! envp
-
-	! Test if environ is in the initialized data area and is set to our
-	! magic number.  If so then it is not redefined by the user.
-	mov	ebx, _environ
-	cmp	ebx, __edata		! within initialized data?
-	jae	0f
-	testb	bl, 3			! aligned?
-	jnz	0f
-	cmp	(ebx), 0x53535353	! is it our _environ?
-	jne	0f
-	mov	(__penviron), ebx	! _penviron = &environ;
-0:	mov	ebx, (__penviron)
-	mov	(ebx), ecx		! *_penviron = envp;
-
-	push	ecx			! push envp
-	push	edx			! push argv
-	push	eax			! push argc
-
-	! Test the EM bit of the MSW to determine if an FPU is present and
-	! set __fpu_present if one is found.
-	smsw	ax
-	testb	al, 0x4			! EM bit in MSW
-	setz	(__fpu_present)		! True if not set
-
-	call	_main			! main(argc, argv, envp)
-
-	push	eax			! push exit status
-	call	_exit
-
-	hlt				! force a trap if exit fails
-
-.sect .rom
-	.data4	0			! Separate I&D: *NULL == 0
-					! Also keeps the first string in the
-					! program from appearing at location 0!
-.sect .data
-__penviron:
-	.data4	__penvp			! Pointer to environ, or hidden pointer
-
-.sect .bss
-	.comm	__penvp, 4		! Hidden environment vector
-	.comm	__fpu_present, 4	! FPU present flag
-
-.extern endtext				! Force loading of end labels.
Index: trunk/minix/lib/i386/rts/m2rtso.s
===================================================================
--- trunk/minix/lib/i386/rts/m2rtso.s	(revision 9)
+++ 	(revision )
@@ -1,67 +1,0 @@
-! This is the Modula-2 run-time start-off routine.  It's job is to take the
-! arguments as put on the stack by EXEC, and to parse them and set them up the
-! way _m_a_i_n expects them.
-
-.sect .text; .sect .rom; .sect .data; .sect .bss
-
-.define begtext, begdata, begbss
-.sect .text
-begtext:
-.sect .rom
-begrom:
-.sect .data
-begdata:
-.sect .bss
-begbss:
-
-.define m2rtso, hol0, __penviron, __penvp, __fpu_present
-.sect .text
-m2rtso:
-	xor	ebp, ebp		! clear for backtrace of core files
-	mov	eax, (esp)		! argc
-	lea	edx, 4(esp)		! argv
-	lea	ecx, 8(esp)(eax*4)	! envp
-
-	! Test if environ is in the initialized data area and is set to our
-	! magic number.  If so then it is not redefined by the user.
-	mov	ebx, _environ
-	cmp	ebx, __edata		! within initialized data?
-	jae	0f
-	testb	bl, 3			! aligned?
-	jnz	0f
-	cmp	(ebx), 0x53535353	! is it our environ?
-	jne	0f
-	mov	(__penviron), ebx	! _penviron = &environ;
-0:	mov	ebx, (__penviron)
-	mov	(ebx), ecx		! *_penviron = envp;
-
-	push	ecx			! push envp
-	push	edx			! push argv
-	push	eax			! push argc
-
-	! Test the EM bit of the MSW to determine if an FPU is present and
-	! set __fpu_present if one is found.
-	smsw	ax
-	testb	al, 0x4			! EM bit in MSW
-	setz	(__fpu_present)		! True if not set
-
-	call	__m_a_i_n		! run Modula-2 program
-
-	push	eax			! push exit status
-	call	__exit
-
-	hlt				! force a trap if exit fails
-
-.sect .rom
-	.data4	0			! Separate I&D: *NULL == 0
-					! Also keeps the first string in the
-					! program from appearing at location 0!
-.sect .data
-__penviron:
-	.data4	__penvp			! Pointer to environ, or hidden pointer
-
-.sect .bss
-	.comm	__penvp, 4		! Hidden environment vector
-	.comm	__fpu_present, 4	! FPU present flag
-
-.extern endtext				! Force loading of end labels.
Index: trunk/minix/lib/i386/rts/prtso.s
===================================================================
--- trunk/minix/lib/i386/rts/prtso.s	(revision 9)
+++ 	(revision )
@@ -1,69 +1,0 @@
-! This is the Pascal run-time start-off routine.  It's job is to take the
-! arguments as put on the stack by EXEC, and to parse them and set them up the
-! way _m_a_i_n expects them.
-
-.sect .text; .sect .rom; .sect .data; .sect .bss
-
-.define begtext, begdata, begbss
-.sect .text
-begtext:
-.sect .rom
-begrom:
-.sect .data
-begdata:
-.sect .bss
-begbss:
-
-.define prtso, hol0, __penviron, __penvp, __fpu_present
-.sect .text
-prtso:
-	xor	ebp, ebp		! clear for backtrace of core files
-	mov	eax, (esp)		! argc
-	lea	edx, 4(esp)		! argv
-	lea	ecx, 8(esp)(eax*4)	! envp
-
-	! Test if environ is in the initialized data area and is set to our
-	! magic number.  If so then it is not redefined by the user.
-	mov	ebx, _environ
-	cmp	ebx, __edata		! within initialized data?
-	jae	0f
-	testb	bl, 3			! aligned?
-	jnz	0f
-	cmp	(ebx), 0x53535353	! is it our environ?
-	jne	0f
-	mov	(__penviron), ebx	! _penviron = &environ;
-0:	mov	ebx, (__penviron)
-	mov	(ebx), ecx		! *_penviron = envp;
-
-	push	ecx			! push envp
-	push	edx			! push argv
-	push	eax			! push argc
-
-	! Test the EM bit of the MSW to determine if an FPU is present and
-	! set __fpu_present if one is found.
-	smsw	ax
-	testb	al, 0x4			! EM bit in MSW
-	setz	(__fpu_present)		! True if not set
-
-	mov	(.ignmask), 56
-
-	call	__m_a_i_n		! Run Pascal program
-
-	push	eax			! push exit status
-	call	__exit
-
-	hlt				! force a trap if exit fails
-
-.sect .rom
-	.data4	0			! Separate I&D: *NULL == 0
-					! Also keeps the first string in the
-					! program from appearing at location 0!
-.sect .data
-__penviron:
-	.data4	__penvp			! Pointer to environ, or hidden pointer
-
-.sect .bss
-	.comm	__penvp, 4		! Hidden environment vector
-	.comm	__fpu_present, 4	! FPU present flag
-
-.extern endtext				! Force loading of end labels.
Index: trunk/minix/lib/i386/string/Makedepend-ack
===================================================================
--- trunk/minix/lib/i386/string/Makedepend-ack	(revision 9)
+++ 	(revision )
@@ -1,28 +1,0 @@
-depend-ack:
-	rm .depend-ack
-	touch .depend-ack
-	mkdep 'cc  -E' _memmove.s | sed -e 's:^\(.\):../../obj-ack//./i386/string/\1:' >> .depend-ack
-	mkdep 'cc  -E' _strncat.s | sed -e 's:^\(.\):../../obj-ack//./i386/string/\1:' >> .depend-ack
-	mkdep 'cc  -E' _strncmp.s | sed -e 's:^\(.\):../../obj-ack//./i386/string/\1:' >> .depend-ack
-	mkdep 'cc  -E' _strncpy.s | sed -e 's:^\(.\):../../obj-ack//./i386/string/\1:' >> .depend-ack
-	mkdep 'cc  -E' _strnlen.s | sed -e 's:^\(.\):../../obj-ack//./i386/string/\1:' >> .depend-ack
-	mkdep 'cc  -E' bcmp.s | sed -e 's:^\(.\):../../obj-ack//./i386/string/\1:' >> .depend-ack
-	mkdep 'cc  -E' bcopy.s | sed -e 's:^\(.\):../../obj-ack//./i386/string/\1:' >> .depend-ack
-	mkdep 'cc  -E' bzero.s | sed -e 's:^\(.\):../../obj-ack//./i386/string/\1:' >> .depend-ack
-	mkdep 'cc  -E' index.s | sed -e 's:^\(.\):../../obj-ack//./i386/string/\1:' >> .depend-ack
-	mkdep 'cc  -E' memchr.s | sed -e 's:^\(.\):../../obj-ack//./i386/string/\1:' >> .depend-ack
-	mkdep 'cc  -E' memcmp.s | sed -e 's:^\(.\):../../obj-ack//./i386/string/\1:' >> .depend-ack
-	mkdep 'cc  -E' memcpy.s | sed -e 's:^\(.\):../../obj-ack//./i386/string/\1:' >> .depend-ack
-	mkdep 'cc  -E' memmove.s | sed -e 's:^\(.\):../../obj-ack//./i386/string/\1:' >> .depend-ack
-	mkdep 'cc  -E' memset.s | sed -e 's:^\(.\):../../obj-ack//./i386/string/\1:' >> .depend-ack
-	mkdep 'cc  -E' rindex.s | sed -e 's:^\(.\):../../obj-ack//./i386/string/\1:' >> .depend-ack
-	mkdep 'cc  -E' strcat.s | sed -e 's:^\(.\):../../obj-ack//./i386/string/\1:' >> .depend-ack
-	mkdep 'cc  -E' strchr.s | sed -e 's:^\(.\):../../obj-ack//./i386/string/\1:' >> .depend-ack
-	mkdep 'cc  -E' strcmp.s | sed -e 's:^\(.\):../../obj-ack//./i386/string/\1:' >> .depend-ack
-	mkdep 'cc  -E' strcpy.s | sed -e 's:^\(.\):../../obj-ack//./i386/string/\1:' >> .depend-ack
-	mkdep 'cc  -E' strlen.s | sed -e 's:^\(.\):../../obj-ack//./i386/string/\1:' >> .depend-ack
-	mkdep 'cc  -E' strncat.s | sed -e 's:^\(.\):../../obj-ack//./i386/string/\1:' >> .depend-ack
-	mkdep 'cc  -E' strncmp.s | sed -e 's:^\(.\):../../obj-ack//./i386/string/\1:' >> .depend-ack
-	mkdep 'cc  -E' strncpy.s | sed -e 's:^\(.\):../../obj-ack//./i386/string/\1:' >> .depend-ack
-	mkdep 'cc  -E' strnlen.s | sed -e 's:^\(.\):../../obj-ack//./i386/string/\1:' >> .depend-ack
-	mkdep 'cc  -E' strrchr.s | sed -e 's:^\(.\):../../obj-ack//./i386/string/\1:' >> .depend-ack
Index: trunk/minix/lib/i386/string/Makedepend-gnu
===================================================================
--- trunk/minix/lib/i386/string/Makedepend-gnu	(revision 9)
+++ 	(revision )
@@ -1,28 +1,0 @@
-depend-gnu:
-	rm .depend-gnu
-	touch .depend-gnu
-	mkdep 'gcc  -E -x assembler-with-cpp -I.' _memmove.s | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../../obj-gnu/./i386/string/\1:' >> .depend-gnu
-	mkdep 'gcc  -E -x assembler-with-cpp -I.' _strncat.s | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../../obj-gnu/./i386/string/\1:' >> .depend-gnu
-	mkdep 'gcc  -E -x assembler-with-cpp -I.' _strncmp.s | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../../obj-gnu/./i386/string/\1:' >> .depend-gnu
-	mkdep 'gcc  -E -x assembler-with-cpp -I.' _strncpy.s | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../../obj-gnu/./i386/string/\1:' >> .depend-gnu
-	mkdep 'gcc  -E -x assembler-with-cpp -I.' _strnlen.s | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../../obj-gnu/./i386/string/\1:' >> .depend-gnu
-	mkdep 'gcc  -E -x assembler-with-cpp -I.' bcmp.s | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../../obj-gnu/./i386/string/\1:' >> .depend-gnu
-	mkdep 'gcc  -E -x assembler-with-cpp -I.' bcopy.s | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../../obj-gnu/./i386/string/\1:' >> .depend-gnu
-	mkdep 'gcc  -E -x assembler-with-cpp -I.' bzero.s | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../../obj-gnu/./i386/string/\1:' >> .depend-gnu
-	mkdep 'gcc  -E -x assembler-with-cpp -I.' index.s | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../../obj-gnu/./i386/string/\1:' >> .depend-gnu
-	mkdep 'gcc  -E -x assembler-with-cpp -I.' memchr.s | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../../obj-gnu/./i386/string/\1:' >> .depend-gnu
-	mkdep 'gcc  -E -x assembler-with-cpp -I.' memcmp.s | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../../obj-gnu/./i386/string/\1:' >> .depend-gnu
-	mkdep 'gcc  -E -x assembler-with-cpp -I.' memcpy.s | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../../obj-gnu/./i386/string/\1:' >> .depend-gnu
-	mkdep 'gcc  -E -x assembler-with-cpp -I.' memmove.s | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../../obj-gnu/./i386/string/\1:' >> .depend-gnu
-	mkdep 'gcc  -E -x assembler-with-cpp -I.' memset.s | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../../obj-gnu/./i386/string/\1:' >> .depend-gnu
-	mkdep 'gcc  -E -x assembler-with-cpp -I.' rindex.s | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../../obj-gnu/./i386/string/\1:' >> .depend-gnu
-	mkdep 'gcc  -E -x assembler-with-cpp -I.' strcat.s | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../../obj-gnu/./i386/string/\1:' >> .depend-gnu
-	mkdep 'gcc  -E -x assembler-with-cpp -I.' strchr.s | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../../obj-gnu/./i386/string/\1:' >> .depend-gnu
-	mkdep 'gcc  -E -x assembler-with-cpp -I.' strcmp.s | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../../obj-gnu/./i386/string/\1:' >> .depend-gnu
-	mkdep 'gcc  -E -x assembler-with-cpp -I.' strcpy.s | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../../obj-gnu/./i386/string/\1:' >> .depend-gnu
-	mkdep 'gcc  -E -x assembler-with-cpp -I.' strlen.s | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../../obj-gnu/./i386/string/\1:' >> .depend-gnu
-	mkdep 'gcc  -E -x assembler-with-cpp -I.' strncat.s | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../../obj-gnu/./i386/string/\1:' >> .depend-gnu
-	mkdep 'gcc  -E -x assembler-with-cpp -I.' strncmp.s | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../../obj-gnu/./i386/string/\1:' >> .depend-gnu
-	mkdep 'gcc  -E -x assembler-with-cpp -I.' strncpy.s | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../../obj-gnu/./i386/string/\1:' >> .depend-gnu
-	mkdep 'gcc  -E -x assembler-with-cpp -I.' strnlen.s | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../../obj-gnu/./i386/string/\1:' >> .depend-gnu
-	mkdep 'gcc  -E -x assembler-with-cpp -I.' strrchr.s | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../../obj-gnu/./i386/string/\1:' >> .depend-gnu
Index: trunk/minix/lib/i386/string/Makefile
===================================================================
--- trunk/minix/lib/i386/string/Makefile	(revision 9)
+++ 	(revision )
@@ -1,245 +1,0 @@
-#Generated from ./i386/string/Makefile.in
-all: all-ack
-
-all-ack:
-all-gnu:
-
-makefiles: Makefile
-Makedepend-ack Makedepend-gnu: 
-	sh ../../generate.sh ./i386/string ../../obj-ack/ ../../obj-gnu
-
-Makefile: Makefile.in Makedepend-ack Makedepend-gnu
-	sh ../../generate.sh ./i386/string ../../obj-ack/ ../../obj-gnu
-	@echo
-	@echo *Attention*
-	@echo Makefile is regenerated... rerun command to see changes
-	@echo *Attention*
-	@echo
-
-depend: depend-ack
-all-ack: ../../obj-ack//libc.a
-
-../../obj-ack//libc.a: ../../obj-ack//libc.a(_memmove.o)
-../../obj-ack//libc.a: ../../obj-ack//libc.a(_strncat.o)
-../../obj-ack//libc.a: ../../obj-ack//libc.a(_strncmp.o)
-../../obj-ack//libc.a: ../../obj-ack//libc.a(_strncpy.o)
-../../obj-ack//libc.a: ../../obj-ack//libc.a(_strnlen.o)
-../../obj-ack//libc.a: ../../obj-ack//libc.a(bcmp.o)
-../../obj-ack//libc.a: ../../obj-ack//libc.a(bcopy.o)
-../../obj-ack//libc.a: ../../obj-ack//libc.a(bzero.o)
-../../obj-ack//libc.a: ../../obj-ack//libc.a(index.o)
-../../obj-ack//libc.a: ../../obj-ack//libc.a(memchr.o)
-../../obj-ack//libc.a: ../../obj-ack//libc.a(memcmp.o)
-../../obj-ack//libc.a: ../../obj-ack//libc.a(memcpy.o)
-../../obj-ack//libc.a: ../../obj-ack//libc.a(memmove.o)
-../../obj-ack//libc.a: ../../obj-ack//libc.a(memset.o)
-../../obj-ack//libc.a: ../../obj-ack//libc.a(rindex.o)
-../../obj-ack//libc.a: ../../obj-ack//libc.a(strcat.o)
-../../obj-ack//libc.a: ../../obj-ack//libc.a(strchr.o)
-../../obj-ack//libc.a: ../../obj-ack//libc.a(strcmp.o)
-../../obj-ack//libc.a: ../../obj-ack//libc.a(strcpy.o)
-../../obj-ack//libc.a: ../../obj-ack//libc.a(strlen.o)
-../../obj-ack//libc.a: ../../obj-ack//libc.a(strncat.o)
-../../obj-ack//libc.a: ../../obj-ack//libc.a(strncmp.o)
-../../obj-ack//libc.a: ../../obj-ack//libc.a(strncpy.o)
-../../obj-ack//libc.a: ../../obj-ack//libc.a(strnlen.o)
-../../obj-ack//libc.a: ../../obj-ack//libc.a(strrchr.o)
-
-../../obj-ack//libc.a:
-	ar cr ../../obj-ack//libc.a ../../obj-ack//./i386/string/*.o
-	rm ../../obj-ack//./i386/string/*.o
-
-../../obj-ack//libc.a(_memmove.o): _memmove.s
-	cc  -c -o ../../obj-ack//./i386/string/_memmove.o _memmove.s
-../../obj-ack//libc.a(_strncat.o): _strncat.s
-	cc  -c -o ../../obj-ack//./i386/string/_strncat.o _strncat.s
-../../obj-ack//libc.a(_strncmp.o): _strncmp.s
-	cc  -c -o ../../obj-ack//./i386/string/_strncmp.o _strncmp.s
-../../obj-ack//libc.a(_strncpy.o): _strncpy.s
-	cc  -c -o ../../obj-ack//./i386/string/_strncpy.o _strncpy.s
-../../obj-ack//libc.a(_strnlen.o): _strnlen.s
-	cc  -c -o ../../obj-ack//./i386/string/_strnlen.o _strnlen.s
-../../obj-ack//libc.a(bcmp.o): bcmp.s
-	cc  -c -o ../../obj-ack//./i386/string/bcmp.o bcmp.s
-../../obj-ack//libc.a(bcopy.o): bcopy.s
-	cc  -c -o ../../obj-ack//./i386/string/bcopy.o bcopy.s
-../../obj-ack//libc.a(bzero.o): bzero.s
-	cc  -c -o ../../obj-ack//./i386/string/bzero.o bzero.s
-../../obj-ack//libc.a(index.o): index.s
-	cc  -c -o ../../obj-ack//./i386/string/index.o index.s
-../../obj-ack//libc.a(memchr.o): memchr.s
-	cc  -c -o ../../obj-ack//./i386/string/memchr.o memchr.s
-../../obj-ack//libc.a(memcmp.o): memcmp.s
-	cc  -c -o ../../obj-ack//./i386/string/memcmp.o memcmp.s
-../../obj-ack//libc.a(memcpy.o): memcpy.s
-	cc  -c -o ../../obj-ack//./i386/string/memcpy.o memcpy.s
-../../obj-ack//libc.a(memmove.o): memmove.s
-	cc  -c -o ../../obj-ack//./i386/string/memmove.o memmove.s
-../../obj-ack//libc.a(memset.o): memset.s
-	cc  -c -o ../../obj-ack//./i386/string/memset.o memset.s
-../../obj-ack//libc.a(rindex.o): rindex.s
-	cc  -c -o ../../obj-ack//./i386/string/rindex.o rindex.s
-../../obj-ack//libc.a(strcat.o): strcat.s
-	cc  -c -o ../../obj-ack//./i386/string/strcat.o strcat.s
-../../obj-ack//libc.a(strchr.o): strchr.s
-	cc  -c -o ../../obj-ack//./i386/string/strchr.o strchr.s
-../../obj-ack//libc.a(strcmp.o): strcmp.s
-	cc  -c -o ../../obj-ack//./i386/string/strcmp.o strcmp.s
-../../obj-ack//libc.a(strcpy.o): strcpy.s
-	cc  -c -o ../../obj-ack//./i386/string/strcpy.o strcpy.s
-../../obj-ack//libc.a(strlen.o): strlen.s
-	cc  -c -o ../../obj-ack//./i386/string/strlen.o strlen.s
-../../obj-ack//libc.a(strncat.o): strncat.s
-	cc  -c -o ../../obj-ack//./i386/string/strncat.o strncat.s
-../../obj-ack//libc.a(strncmp.o): strncmp.s
-	cc  -c -o ../../obj-ack//./i386/string/strncmp.o strncmp.s
-../../obj-ack//libc.a(strncpy.o): strncpy.s
-	cc  -c -o ../../obj-ack//./i386/string/strncpy.o strncpy.s
-../../obj-ack//libc.a(strnlen.o): strnlen.s
-	cc  -c -o ../../obj-ack//./i386/string/strnlen.o strnlen.s
-../../obj-ack//libc.a(strrchr.o): strrchr.s
-	cc  -c -o ../../obj-ack//./i386/string/strrchr.o strrchr.s
-
-all-gnu: ../../obj-gnu/libc.a
-
-../../obj-gnu/libc.a: ../../obj-gnu/./i386/string/_memmove.o
-../../obj-gnu/libc.a: ../../obj-gnu/./i386/string/_strncat.o
-../../obj-gnu/libc.a: ../../obj-gnu/./i386/string/_strncmp.o
-../../obj-gnu/libc.a: ../../obj-gnu/./i386/string/_strncpy.o
-../../obj-gnu/libc.a: ../../obj-gnu/./i386/string/_strnlen.o
-../../obj-gnu/libc.a: ../../obj-gnu/./i386/string/bcmp.o
-../../obj-gnu/libc.a: ../../obj-gnu/./i386/string/bcopy.o
-../../obj-gnu/libc.a: ../../obj-gnu/./i386/string/bzero.o
-../../obj-gnu/libc.a: ../../obj-gnu/./i386/string/index.o
-../../obj-gnu/libc.a: ../../obj-gnu/./i386/string/memchr.o
-../../obj-gnu/libc.a: ../../obj-gnu/./i386/string/memcmp.o
-../../obj-gnu/libc.a: ../../obj-gnu/./i386/string/memcpy.o
-../../obj-gnu/libc.a: ../../obj-gnu/./i386/string/memmove.o
-../../obj-gnu/libc.a: ../../obj-gnu/./i386/string/memset.o
-../../obj-gnu/libc.a: ../../obj-gnu/./i386/string/rindex.o
-../../obj-gnu/libc.a: ../../obj-gnu/./i386/string/strcat.o
-../../obj-gnu/libc.a: ../../obj-gnu/./i386/string/strchr.o
-../../obj-gnu/libc.a: ../../obj-gnu/./i386/string/strcmp.o
-../../obj-gnu/libc.a: ../../obj-gnu/./i386/string/strcpy.o
-../../obj-gnu/libc.a: ../../obj-gnu/./i386/string/strlen.o
-../../obj-gnu/libc.a: ../../obj-gnu/./i386/string/strncat.o
-../../obj-gnu/libc.a: ../../obj-gnu/./i386/string/strncmp.o
-../../obj-gnu/libc.a: ../../obj-gnu/./i386/string/strncpy.o
-../../obj-gnu/libc.a: ../../obj-gnu/./i386/string/strnlen.o
-../../obj-gnu/libc.a: ../../obj-gnu/./i386/string/strrchr.o
-
-../../obj-gnu/libc.a:
-	gar cr ../../obj-gnu/libc.a $?
-
-../../obj-gnu/./i386/string/_memmove.o: _memmove.s
-	gcc  -E -x assembler-with-cpp -I. _memmove.s | asmconv -mi386 ack gnu > ../../obj-gnu/./i386/string/_memmove.s.gnu || true
-	gas -o ../../obj-gnu/./i386/string/_memmove.o ../../obj-gnu/./i386/string/_memmove.s.gnu
-
-../../obj-gnu/./i386/string/_strncat.o: _strncat.s
-	gcc  -E -x assembler-with-cpp -I. _strncat.s | asmconv -mi386 ack gnu > ../../obj-gnu/./i386/string/_strncat.s.gnu || true
-	gas -o ../../obj-gnu/./i386/string/_strncat.o ../../obj-gnu/./i386/string/_strncat.s.gnu
-
-../../obj-gnu/./i386/string/_strncmp.o: _strncmp.s
-	gcc  -E -x assembler-with-cpp -I. _strncmp.s | asmconv -mi386 ack gnu > ../../obj-gnu/./i386/string/_strncmp.s.gnu || true
-	gas -o ../../obj-gnu/./i386/string/_strncmp.o ../../obj-gnu/./i386/string/_strncmp.s.gnu
-
-../../obj-gnu/./i386/string/_strncpy.o: _strncpy.s
-	gcc  -E -x assembler-with-cpp -I. _strncpy.s | asmconv -mi386 ack gnu > ../../obj-gnu/./i386/string/_strncpy.s.gnu || true
-	gas -o ../../obj-gnu/./i386/string/_strncpy.o ../../obj-gnu/./i386/string/_strncpy.s.gnu
-
-../../obj-gnu/./i386/string/_strnlen.o: _strnlen.s
-	gcc  -E -x assembler-with-cpp -I. _strnlen.s | asmconv -mi386 ack gnu > ../../obj-gnu/./i386/string/_strnlen.s.gnu || true
-	gas -o ../../obj-gnu/./i386/string/_strnlen.o ../../obj-gnu/./i386/string/_strnlen.s.gnu
-
-../../obj-gnu/./i386/string/bcmp.o: bcmp.s
-	gcc  -E -x assembler-with-cpp -I. bcmp.s | asmconv -mi386 ack gnu > ../../obj-gnu/./i386/string/bcmp.s.gnu || true
-	gas -o ../../obj-gnu/./i386/string/bcmp.o ../../obj-gnu/./i386/string/bcmp.s.gnu
-
-../../obj-gnu/./i386/string/bcopy.o: bcopy.s
-	gcc  -E -x assembler-with-cpp -I. bcopy.s | asmconv -mi386 ack gnu > ../../obj-gnu/./i386/string/bcopy.s.gnu || true
-	gas -o ../../obj-gnu/./i386/string/bcopy.o ../../obj-gnu/./i386/string/bcopy.s.gnu
-
-../../obj-gnu/./i386/string/bzero.o: bzero.s
-	gcc  -E -x assembler-with-cpp -I. bzero.s | asmconv -mi386 ack gnu > ../../obj-gnu/./i386/string/bzero.s.gnu || true
-	gas -o ../../obj-gnu/./i386/string/bzero.o ../../obj-gnu/./i386/string/bzero.s.gnu
-
-../../obj-gnu/./i386/string/index.o: index.s
-	gcc  -E -x assembler-with-cpp -I. index.s | asmconv -mi386 ack gnu > ../../obj-gnu/./i386/string/index.s.gnu || true
-	gas -o ../../obj-gnu/./i386/string/index.o ../../obj-gnu/./i386/string/index.s.gnu
-
-../../obj-gnu/./i386/string/memchr.o: memchr.s
-	gcc  -E -x assembler-with-cpp -I. memchr.s | asmconv -mi386 ack gnu > ../../obj-gnu/./i386/string/memchr.s.gnu || true
-	gas -o ../../obj-gnu/./i386/string/memchr.o ../../obj-gnu/./i386/string/memchr.s.gnu
-
-../../obj-gnu/./i386/string/memcmp.o: memcmp.s
-	gcc  -E -x assembler-with-cpp -I. memcmp.s | asmconv -mi386 ack gnu > ../../obj-gnu/./i386/string/memcmp.s.gnu || true
-	gas -o ../../obj-gnu/./i386/string/memcmp.o ../../obj-gnu/./i386/string/memcmp.s.gnu
-
-../../obj-gnu/./i386/string/memcpy.o: memcpy.s
-	gcc  -E -x assembler-with-cpp -I. memcpy.s | asmconv -mi386 ack gnu > ../../obj-gnu/./i386/string/memcpy.s.gnu || true
-	gas -o ../../obj-gnu/./i386/string/memcpy.o ../../obj-gnu/./i386/string/memcpy.s.gnu
-
-../../obj-gnu/./i386/string/memmove.o: memmove.s
-	gcc  -E -x assembler-with-cpp -I. memmove.s | asmconv -mi386 ack gnu > ../../obj-gnu/./i386/string/memmove.s.gnu || true
-	gas -o ../../obj-gnu/./i386/string/memmove.o ../../obj-gnu/./i386/string/memmove.s.gnu
-
-../../obj-gnu/./i386/string/memset.o: memset.s
-	gcc  -E -x assembler-with-cpp -I. memset.s | asmconv -mi386 ack gnu > ../../obj-gnu/./i386/string/memset.s.gnu || true
-	gas -o ../../obj-gnu/./i386/string/memset.o ../../obj-gnu/./i386/string/memset.s.gnu
-
-../../obj-gnu/./i386/string/rindex.o: rindex.s
-	gcc  -E -x assembler-with-cpp -I. rindex.s | asmconv -mi386 ack gnu > ../../obj-gnu/./i386/string/rindex.s.gnu || true
-	gas -o ../../obj-gnu/./i386/string/rindex.o ../../obj-gnu/./i386/string/rindex.s.gnu
-
-../../obj-gnu/./i386/string/strcat.o: strcat.s
-	gcc  -E -x assembler-with-cpp -I. strcat.s | asmconv -mi386 ack gnu > ../../obj-gnu/./i386/string/strcat.s.gnu || true
-	gas -o ../../obj-gnu/./i386/string/strcat.o ../../obj-gnu/./i386/string/strcat.s.gnu
-
-../../obj-gnu/./i386/string/strchr.o: strchr.s
-	gcc  -E -x assembler-with-cpp -I. strchr.s | asmconv -mi386 ack gnu > ../../obj-gnu/./i386/string/strchr.s.gnu || true
-	gas -o ../../obj-gnu/./i386/string/strchr.o ../../obj-gnu/./i386/string/strchr.s.gnu
-
-../../obj-gnu/./i386/string/strcmp.o: strcmp.s
-	gcc  -E -x assembler-with-cpp -I. strcmp.s | asmconv -mi386 ack gnu > ../../obj-gnu/./i386/string/strcmp.s.gnu || true
-	gas -o ../../obj-gnu/./i386/string/strcmp.o ../../obj-gnu/./i386/string/strcmp.s.gnu
-
-../../obj-gnu/./i386/string/strcpy.o: strcpy.s
-	gcc  -E -x assembler-with-cpp -I. strcpy.s | asmconv -mi386 ack gnu > ../../obj-gnu/./i386/string/strcpy.s.gnu || true
-	gas -o ../../obj-gnu/./i386/string/strcpy.o ../../obj-gnu/./i386/string/strcpy.s.gnu
-
-../../obj-gnu/./i386/string/strlen.o: strlen.s
-	gcc  -E -x assembler-with-cpp -I. strlen.s | asmconv -mi386 ack gnu > ../../obj-gnu/./i386/string/strlen.s.gnu || true
-	gas -o ../../obj-gnu/./i386/string/strlen.o ../../obj-gnu/./i386/string/strlen.s.gnu
-
-../../obj-gnu/./i386/string/strncat.o: strncat.s
-	gcc  -E -x assembler-with-cpp -I. strncat.s | asmconv -mi386 ack gnu > ../../obj-gnu/./i386/string/strncat.s.gnu || true
-	gas -o ../../obj-gnu/./i386/string/strncat.o ../../obj-gnu/./i386/string/strncat.s.gnu
-
-../../obj-gnu/./i386/string/strncmp.o: strncmp.s
-	gcc  -E -x assembler-with-cpp -I. strncmp.s | asmconv -mi386 ack gnu > ../../obj-gnu/./i386/string/strncmp.s.gnu || true
-	gas -o ../../obj-gnu/./i386/string/strncmp.o ../../obj-gnu/./i386/string/strncmp.s.gnu
-
-../../obj-gnu/./i386/string/strncpy.o: strncpy.s
-	gcc  -E -x assembler-with-cpp -I. strncpy.s | asmconv -mi386 ack gnu > ../../obj-gnu/./i386/string/strncpy.s.gnu || true
-	gas -o ../../obj-gnu/./i386/string/strncpy.o ../../obj-gnu/./i386/string/strncpy.s.gnu
-
-../../obj-gnu/./i386/string/strnlen.o: strnlen.s
-	gcc  -E -x assembler-with-cpp -I. strnlen.s | asmconv -mi386 ack gnu > ../../obj-gnu/./i386/string/strnlen.s.gnu || true
-	gas -o ../../obj-gnu/./i386/string/strnlen.o ../../obj-gnu/./i386/string/strnlen.s.gnu
-
-../../obj-gnu/./i386/string/strrchr.o: strrchr.s
-	gcc  -E -x assembler-with-cpp -I. strrchr.s | asmconv -mi386 ack gnu > ../../obj-gnu/./i386/string/strrchr.s.gnu || true
-	gas -o ../../obj-gnu/./i386/string/strrchr.o ../../obj-gnu/./i386/string/strrchr.s.gnu
-
-
-
-
-clean::
-	rm -f ../../obj-ack//./i386/string/*
-	rm -f ../../obj-gnu/./i386/string/*
-
-include Makedepend-ack
-include .depend-ack
-
-include Makedepend-gnu
-include .depend-gnu
Index: trunk/minix/lib/i386/string/Makefile.in
===================================================================
--- trunk/minix/lib/i386/string/Makefile.in	(revision 9)
+++ 	(revision )
@@ -1,32 +1,0 @@
-# Makefile for lib/i386/string.
-
-LIBRARIES=libc
-
-libc_FILES=" \
-	_memmove.s \
-	_strncat.s \
-	_strncmp.s \
-	_strncpy.s \
-	_strnlen.s \
-	bcmp.s \
-	bcopy.s \
-	bzero.s \
-	index.s \
-	memchr.s \
-	memcmp.s \
-	memcpy.s \
-	memmove.s \
-	memset.s \
-	rindex.s \
-	strcat.s \
-	strchr.s \
-	strcmp.s \
-	strcpy.s \
-	strlen.s \
-	strncat.s \
-	strncmp.s \
-	strncpy.s \
-	strnlen.s \
-	strrchr.s"
-
-TYPE=both
Index: trunk/minix/lib/i386/string/README
===================================================================
--- trunk/minix/lib/i386/string/README	(revision 9)
+++ 	(revision )
@@ -1,52 +1,0 @@
-Notes on i80386 string assembly routines.		Author: Kees J. Bot
-								2 Jan 1994
-
-Remarks.
-    All routines set up proper stack frames, so that stack traces can be
-    derived from core dumps.  String routines are often the ones that
-    get the bad pointer.
-
-    Flags are often not right in boundary cases (zero string length) on
-    repeated string scanning or comparing instructions.  This has been
-    handled in sometimes nonobvious ways.
-
-    Only the eax, edx, and ecx registers are not preserved, all other
-    registers are.  This is what GCC expects.  (ACK sees ebx as scratch
-    too.)  The direction byte is assumed to be wrong, and left clear on
-    exit.
-
-Assumptions.
-    The average string is short, so short strings should not suffer from
-    smart tricks to copy, compare, or search large strings fast.  This
-    means that the routines are fast on average, but not optimal for
-    long strings.
-
-    It doesn't pay to use word or longword operations on strings, the
-    setup time hurts the average case.
-
-    Memory blocks are probably large and on word or longword boundaries.
-
-    No unaligned word moves are done.  Again the setup time may hurt the
-    average case.  Furthermore, the author likes to enable the alignment
-    check on a 486.
-
-String routines.
-    They have been implemented using byte string instructions.  The
-    length of a string it usually determined first, followed by the
-    actual operation.
-
-Strcmp.
-    This is the only string routine that uses a loop, and not
-    instructions with a repeat prefix.  Problem is that we don't know
-    how long the string is.  Scanning for the end costs if the strings
-    are unequal in the first few bytes.
-
-Strchr.
-    The character we look for is often not there, or at some distance
-    from the start.  The string is scanned twice, for the terminating
-    zero and the character searched, in chunks of increasing length.
-
-Memory routines.
-    Memmove, memcpy, and memset use word or longword instructions if the
-    address(es) are at word or longword boundaries.  No tricks to get
-    alignment after doing a few bytes.  No unaligned operations.
Index: trunk/minix/lib/i386/string/_memmove.s
===================================================================
--- trunk/minix/lib/i386/string/_memmove.s	(revision 9)
+++ 	(revision )
@@ -1,58 +1,0 @@
-!	_memmove()					Author: Kees J. Bot
-!								2 Jan 1994
-.sect .text; .sect .rom; .sect .data; .sect .bss
-
-! void *_memmove(void *s1, const void *s2, size_t n)
-!	Copy a chunk of memory.  Handle overlap.
-!
-.sect .text
-.define __memmove, __memcpy
-	.align	16
-__memmove:
-	push	ebp
-	mov	ebp, esp
-	push	esi
-	push	edi
-	mov	edi, 8(ebp)	! String s1
-	mov	esi, 12(ebp)	! String s2
-	mov	ecx, 16(ebp)	! Length
-	mov	eax, edi
-	sub	eax, esi
-	cmp	eax, ecx
-	jb	downwards	! if (s2 - s1) < n then copy downwards
-__memcpy:
-	cld			! Clear direction bit: upwards
-	cmp	ecx, 16
-	jb	upbyte		! Don't bother being smart with short arrays
-	mov	eax, esi
-	or	eax, edi
-	testb	al, 1
-	jnz	upbyte		! Bit 0 set, use byte copy
-	testb	al, 2
-	jnz	upword		! Bit 1 set, use word copy
-uplword:shrd	eax, ecx, 2	! Save low 2 bits of ecx in eax
-	shr	ecx, 2
-	rep
-	movs			! Copy longwords.
-	shld	ecx, eax, 2	! Restore excess count
-upword:	shr	ecx, 1
-	rep
-    o16	movs			! Copy words
-	adc	ecx, ecx	! One more byte?
-upbyte:	rep
-	movsb			! Copy bytes
-done:	mov	eax, 8(ebp)	! Absolutely noone cares about this value
-	pop	edi
-	pop	esi
-	pop	ebp
-	ret
-
-! Handle bad overlap by copying downwards, don't bother to do word copies.
-downwards:
-	std			! Set direction bit: downwards
-	lea	esi, -1(esi)(ecx*1)
-	lea	edi, -1(edi)(ecx*1)
-	rep
-	movsb			! Copy bytes
-	cld
-	jmp	done
Index: trunk/minix/lib/i386/string/_strncat.s
===================================================================
--- trunk/minix/lib/i386/string/_strncat.s	(revision 9)
+++ 	(revision )
@@ -1,41 +1,0 @@
-!	_strncat()					Author: Kees J. Bot
-!								1 Jan 1994
-.sect .text; .sect .rom; .sect .data; .sect .bss
-
-! char *_strncat(char *s1, const char *s2, size_t edx)
-!	Append string s2 to s1.
-!
-.sect .text
-.define __strncat
-	.align	16
-__strncat:
-	push	ebp
-	mov	ebp, esp
-	push	esi
-	push	edi
-	mov	edi, 8(ebp)	! String s1
-	mov	ecx, -1
-	xorb	al, al		! Null byte
-	cld
-	repne
-	scasb			! Look for the zero byte in s1
-	dec	edi		! Back one up (and clear 'Z' flag)
-	push	edi		! Save end of s1
-	mov	edi, 12(ebp)	! edi = string s2
-	mov	ecx, edx	! Maximum count
-	repne
-	scasb			! Look for the end of s2
-	jne	no0
-	inc	ecx		! Exclude null byte
-no0:	sub	edx, ecx	! Number of bytes in s2
-	mov	ecx, edx
-	mov	esi, 12(ebp)	! esi = string s2
-	pop	edi		! edi = end of string s1
-	rep
-	movsb			! Copy bytes
-	stosb			! Add a terminating null
-	mov	eax, 8(ebp)	! Return s1
-	pop	edi
-	pop	esi
-	pop	ebp
-	ret
Index: trunk/minix/lib/i386/string/_strncmp.s
===================================================================
--- trunk/minix/lib/i386/string/_strncmp.s	(revision 9)
+++ 	(revision )
@@ -1,35 +1,0 @@
-!	strncmp()					Author: Kees J. Bot
-!								1 Jan 1994
-.sect .text; .sect .rom; .sect .data; .sect .bss
-
-! int strncmp(const char *s1, const char *s2, size_t ecx)
-!	Compare two strings.
-!
-.sect .text
-.define __strncmp
-	.align	16
-__strncmp:
-	push	ebp
-	mov	ebp, esp
-	push	esi
-	push	edi
-	test	ecx, ecx	! Max length is zero?
-	je	done
-	mov	esi, 8(ebp)	! esi = string s1
-	mov	edi, 12(ebp)	! edi = string s2
-	cld
-compare:
-	cmpsb			! Compare two bytes
-	jne	done
-	cmpb	-1(esi), 0	! End of string?
-	je	done
-	dec	ecx		! Length limit reached?
-	jne	compare
-done:	seta	al		! al = (s1 > s2)
-	setb	ah		! ah = (s1 < s2)
-	subb	al, ah
-	movsxb	eax, al		! eax = (s1 > s2) - (s1 < s2), i.e. -1, 0, 1
-	pop	edi
-	pop	esi
-	pop	ebp
-	ret
Index: trunk/minix/lib/i386/string/_strncpy.s
===================================================================
--- trunk/minix/lib/i386/string/_strncpy.s	(revision 9)
+++ 	(revision )
@@ -1,24 +1,0 @@
-!	_strncpy()					Author: Kees J. Bot
-!								1 Jan 1994
-.sect .text; .sect .rom; .sect .data; .sect .bss
-
-! char *_strncpy(char *s1, const char *s2, size_t ecx)
-!	Copy string s2 to s1.
-!
-.sect .text
-.define __strncpy
-	.align	16
-__strncpy:
-	mov	edi, 12(ebp)	! edi = string s2
-	xorb	al, al		! Look for a zero byte
-	mov	edx, ecx	! Save maximum count
-	cld
-	repne
-	scasb			! Look for end of s2
-	sub	edx, ecx	! Number of bytes in s2 including null
-	xchg	ecx, edx
-	mov	esi, 12(ebp)	! esi = string s2
-	mov	edi, 8(ebp)	! edi = string s1
-	rep
-	movsb			! Copy bytes
-	ret
Index: trunk/minix/lib/i386/string/_strnlen.s
===================================================================
--- trunk/minix/lib/i386/string/_strnlen.s	(revision 9)
+++ 	(revision )
@@ -1,28 +1,0 @@
-!	_strnlen()					Author: Kees J. Bot
-!								1 Jan 1994
-.sect .text; .sect .rom; .sect .data; .sect .bss
-
-! size_t _strnlen(const char *s, size_t ecx)
-!	Return the length of a string.
-!
-.sect .text
-.define __strnlen
-	.align	16
-__strnlen:
-	push	ebp
-	mov	ebp, esp
-	push	edi
-	mov	edi, 8(ebp)	! edi = string
-	xorb	al, al		! Look for a zero byte
-	mov	edx, ecx	! Save maximum count
-	cmpb	cl, 1		! 'Z' bit must be clear if ecx = 0
-	cld
-	repne
-	scasb			! Look for zero
-	jne	no0
-	inc	ecx		! Don't count zero byte
-no0:	mov	eax, edx
-	sub	eax, ecx	! Compute bytes scanned
-	pop	edi
-	pop	ebp
-	ret
Index: trunk/minix/lib/i386/string/bcmp.s
===================================================================
--- trunk/minix/lib/i386/string/bcmp.s	(revision 9)
+++ 	(revision )
@@ -1,28 +1,0 @@
-!	bcmp()						Author: Kees J. Bot
-!								2 Jan 1994
-.sect .text; .sect .rom; .sect .data; .sect .bss
-
-! int bcmp(const void *s1, const void *s2, size_t n)
-!	Compare two chunks of memory.
-!	This is a BSD routine that escaped from the kernel.  Don't use.
-!	(Alas it is not without some use, it reports the number of bytes
-!	after the bytes that are equal.  So it can't be simply replaced.)
-!
-.sect .text
-.define _bcmp
-	.align	16
-_bcmp:
-	push	ebp
-	mov	ebp, esp
-	push	16(ebp)
-	push	12(ebp)
-	push	8(ebp)
-	call	_memcmp		! Let memcmp do the work
-	test	eax, eax
-	jz	equal
-	sub	edx, 8(ebp)	! Memcmp was nice enough to leave "esi" in edx
-	dec	edx		! Number of bytes that are equal
-	mov	eax, 16(ebp)
-	sub	eax, edx	! Number of bytes that are unequal
-equal:	leave
-	ret
Index: trunk/minix/lib/i386/string/bcopy.s
===================================================================
--- trunk/minix/lib/i386/string/bcopy.s	(revision 9)
+++ 	(revision )
@@ -1,16 +1,0 @@
-!	bcopy()						Author: Kees J. Bot
-!								2 Jan 1994
-.sect .text; .sect .rom; .sect .data; .sect .bss
-
-! void bcopy(const void *s1, void *s2, size_t n)
-!	Copy a chunk of memory.  Handle overlap.
-!	This is a BSD routine that escaped from the kernel.  Don't use.
-!
-.sect .text
-.define _bcopy
-	.align	16
-_bcopy:
-	mov	eax, 4(esp)	! Exchange string arguments
-	xchg	eax, 8(esp)
-	mov	4(esp), eax
-	jmp	__memmove	! Call the proper routine
Index: trunk/minix/lib/i386/string/bzero.s
===================================================================
--- trunk/minix/lib/i386/string/bzero.s	(revision 9)
+++ 	(revision )
@@ -1,20 +1,0 @@
-!	bzero()						Author: Kees J. Bot
-!								2 Jan 1994
-.sect .text; .sect .rom; .sect .data; .sect .bss
-
-! void bzero(void *s, size_t n)
-!	Set a chunk of memory to zero.
-!	This is a BSD routine that escaped from the kernel.  Don't use.
-!
-.sect .text
-.define _bzero
-	.align	16
-_bzero:
-	push	ebp
-	mov	ebp, esp
-	push	12(ebp)		! Size
-	push	0		! Zero
-	push	8(ebp)		! String
-	call	_memset		! Call the proper routine
-	leave
-	ret
Index: trunk/minix/lib/i386/string/index.s
===================================================================
--- trunk/minix/lib/i386/string/index.s	(revision 9)
+++ 	(revision )
@@ -1,13 +1,0 @@
-!	index()						Author: Kees J. Bot
-!								2 Jan 1994
-.sect .text; .sect .rom; .sect .data; .sect .bss
-
-! char *index(const char *s, int c)
-!	Look for a character in a string.  Has suffered from a hostile
-!	takeover by strchr().
-!
-.sect .text
-.define _index
-	.align	16
-_index:
-	jmp	_strchr
Index: trunk/minix/lib/i386/string/memchr.s
===================================================================
--- trunk/minix/lib/i386/string/memchr.s	(revision 9)
+++ 	(revision )
@@ -1,30 +1,0 @@
-!	memchr()					Author: Kees J. Bot
-!								2 Jan 1994
-.sect .text; .sect .rom; .sect .data; .sect .bss
-
-! void *memchr(const void *s, int c, size_t n)
-!	Look for a character in a chunk of memory.
-!
-.sect .text
-.define _memchr
-	.align	16
-_memchr:
-	push	ebp
-	mov	ebp, esp
-	push	edi
-	mov	edi, 8(ebp)	! edi = string
-	movb	al, 12(ebp)	! The character to look for
-	mov	ecx, 16(ebp)	! Length
-	cmpb	cl, 1		! 'Z' bit must be clear if ecx = 0
-	cld
-	repne
-	scasb
-	jne	failure
-	lea	eax, -1(edi)	! Found
-	pop	edi
-	pop	ebp
-	ret
-failure:xor	eax, eax
-	pop	edi
-	pop	ebp
-	ret
Index: trunk/minix/lib/i386/string/memcmp.s
===================================================================
--- trunk/minix/lib/i386/string/memcmp.s	(revision 9)
+++ 	(revision )
@@ -1,56 +1,0 @@
-!	memcmp()					Author: Kees J. Bot
-!								2 Jan 1994
-.sect .text; .sect .rom; .sect .data; .sect .bss
-
-! int memcmp(const void *s1, const void *s2, size_t n)
-!	Compare two chunks of memory.
-!
-.sect .text
-.define _memcmp
-	.align	16
-_memcmp:
-	cld
-	push	ebp
-	mov	ebp, esp
-	push	esi
-	push	edi
-	mov	esi, 8(ebp)	! String s1
-	mov	edi, 12(ebp)	! String s2
-	mov	ecx, 16(ebp)	! Length
-	cmp	ecx, 16
-	jb	cbyte		! Don't bother being smart with short arrays
-	mov	eax, esi
-	or	eax, edi
-	testb	al, 1
-	jnz	cbyte		! Bit 0 set, use byte compare
-	testb	al, 2
-	jnz	cword		! Bit 1 set, use word compare
-clword:	shrd	eax, ecx, 2	! Save low two bits of ecx in eax
-	shr	ecx, 2
-	repe
-	cmps			! Compare longwords
-	sub	esi, 4
-	sub	edi, 4
-	inc	ecx		! Recompare the last longword
-	shld	ecx, eax, 2	! And any excess bytes
-	jmp	last
-cword:	shrd	eax, ecx, 1	! Save low bit of ecx in eax
-	shr	ecx, 1
-	repe
-    o16	cmps			! Compare words
-	sub	esi, 2
-	sub	edi, 2
-	inc	ecx		! Recompare the last word
-	shld	ecx, eax, 1	! And one more byte?
-cbyte:	test	ecx, ecx	! Set 'Z' flag if ecx = 0
-last:	repe
-	cmpsb			! Look for the first differing byte
-	seta	al		! al = (s1 > s2)
-	setb	ah		! ah = (s1 < s2)
-	subb	al, ah
-	movsxb	eax, al		! eax = (s1 > s2) - (s1 < s2), i.e. -1, 0, 1
-	mov	edx, esi	! For bcmp() to play with
-	pop	edi
-	pop	esi
-	pop	ebp
-	ret
Index: trunk/minix/lib/i386/string/memcpy.s
===================================================================
--- trunk/minix/lib/i386/string/memcpy.s	(revision 9)
+++ 	(revision )
@@ -1,24 +1,0 @@
-!	memcpy()					Author: Kees J. Bot
-!								2 Jan 1994
-.sect .text; .sect .rom; .sect .data; .sect .bss
-
-! void *memcpy(void *s1, const void *s2, size_t n)
-!	Copy a chunk of memory.
-!	This routine need not handle overlap, so it does not handle overlap.
-!	One could simply call __memmove, the cost of the overlap check is
-!	negligible, but you are dealing with a programmer who believes that
-!	if anything can go wrong, it should go wrong.
-!
-.sect .text
-.define _memcpy
-	.align	16
-_memcpy:
-	push	ebp
-	mov	ebp, esp
-	push	esi
-	push	edi
-	mov	edi, 8(ebp)	! String s1
-	mov	esi, 12(ebp)	! String s2
-	mov	ecx, 16(ebp)	! Length
-	! No overlap check here
-	jmp	__memcpy	! Call the part of __memmove that copies up
Index: trunk/minix/lib/i386/string/memmove.s
===================================================================
--- trunk/minix/lib/i386/string/memmove.s	(revision 9)
+++ 	(revision )
@@ -1,12 +1,0 @@
-!	memmove()					Author: Kees J. Bot
-!								2 Jan 1994
-.sect .text; .sect .rom; .sect .data; .sect .bss
-
-! void *memmove(void *s1, const void *s2, size_t n)
-!	Copy a chunk of memory.  Handle overlap.
-!
-.sect .text
-.define _memmove
-	.align	16
-_memmove:
-	jmp	__memmove	! Call common code
Index: trunk/minix/lib/i386/string/memset.s
===================================================================
--- trunk/minix/lib/i386/string/memset.s	(revision 9)
+++ 	(revision )
@@ -1,44 +1,0 @@
-!	memset()					Author: Kees J. Bot
-!								2 Jan 1994
-.sect .text; .sect .rom; .sect .data; .sect .bss
-
-! void *memset(void *s, int c, size_t n)
-!	Set a chunk of memory to the same byte value.
-!
-.sect .text
-.define _memset
-	.align	16
-_memset:
-	push	ebp
-	mov	ebp, esp
-	push	edi
-	mov	edi, 8(ebp)	! The string
-	movzxb	eax, 12(ebp)	! The fill byte
-	mov	ecx, 16(ebp)	! Length
-	cld
-	cmp	ecx, 16
-	jb	sbyte		! Don't bother being smart with short arrays
-	test	edi, 1
-	jnz	sbyte		! Bit 0 set, use byte store
-	test	edi, 2
-	jnz	sword		! Bit 1 set, use word store
-slword:	movb	ah, al
-	mov	edx, eax
-	sal	edx, 16
-	or	eax, edx	! One byte to four bytes
-	shrd	edx, ecx, 2	! Save low two bits of ecx in edx
-	shr	ecx, 2
-	rep
-	stos			! Store longwords.
-	shld	ecx, edx, 2	! Restore low two bits
-sword:	movb	ah, al		! One byte to two bytes
-	shr	ecx, 1
-	rep
-    o16	stos			! Store words
-	adc	ecx, ecx	! One more byte?
-sbyte:	rep
-	stosb			! Store bytes
-done:	mov	eax, 8(ebp)	! Return some value you have no need for
-	pop	edi
-	pop	ebp
-	ret
Index: trunk/minix/lib/i386/string/rindex.s
===================================================================
--- trunk/minix/lib/i386/string/rindex.s	(revision 9)
+++ 	(revision )
@@ -1,13 +1,0 @@
-!	rindex()					Author: Kees J. Bot
-!								2 Jan 1994
-.sect .text; .sect .rom; .sect .data; .sect .bss
-
-! char *rindex(const char *s, int c)
-!	Look for the last occurrence a character in a string.  Has suffered
-!	from a hostile takeover by strrchr().
-!
-.sect .text
-.define _rindex
-	.align	16
-_rindex:
-	jmp	_strrchr
Index: trunk/minix/lib/i386/string/strcat.s
===================================================================
--- trunk/minix/lib/i386/string/strcat.s	(revision 9)
+++ 	(revision )
@@ -1,13 +1,0 @@
-!	strcat()					Author: Kees J. Bot
-!								1 Jan 1994
-.sect .text; .sect .rom; .sect .data; .sect .bss
-
-! char *strcat(char *s1, const char *s2)
-!	Append string s2 to s1.
-!
-.sect .text
-.define _strcat
-	.align	16
-_strcat:
-	mov	edx, -1		! Unlimited length
-	jmp	__strncat	! Common code
Index: trunk/minix/lib/i386/string/strchr.s
===================================================================
--- trunk/minix/lib/i386/string/strchr.s	(revision 9)
+++ 	(revision )
@@ -1,41 +1,0 @@
-!	strchr()					Author: Kees J. Bot
-!								1 Jan 1994
-.sect .text; .sect .rom; .sect .data; .sect .bss
-
-! char *strchr(const char *s, int c)
-!	Look for a character in a string.
-!
-.sect .text
-.define _strchr
-	.align	16
-_strchr:
-	push	ebp
-	mov	ebp, esp
-	push	edi
-	cld
-	mov	edi, 8(ebp)	! edi = string
-	mov	edx, 16		! Look at small chunks of the string
-next:	shl	edx, 1		! Chunks become bigger each time
-	mov	ecx, edx
-	xorb	al, al		! Look for the zero at the end
-	repne
-	scasb
-	pushf			! Remember the flags
-	sub	ecx, edx
-	neg	ecx		! Some or all of the chunk
-	sub	edi, ecx	! Step back
-	movb	al, 12(ebp)	! The character to look for
-	repne
-	scasb
-	je	found
-	popf			! Did we find the end of string earlier?
-	jne	next		! No, try again
-	xor	eax, eax	! Return NULL
-	pop	edi
-	pop	ebp
-	ret
-found:	pop	eax		! Get rid of those flags
-	lea	eax, -1(edi)	! Address of byte found
-	pop	edi
-	pop	ebp
-	ret
Index: trunk/minix/lib/i386/string/strcmp.s
===================================================================
--- trunk/minix/lib/i386/string/strcmp.s	(revision 9)
+++ 	(revision )
@@ -1,13 +1,0 @@
-!	strcmp()					Author: Kees J. Bot
-!								1 Jan 1994
-.sect .text; .sect .rom; .sect .data; .sect .bss
-
-! int strcmp(const char *s1, const char *s2)
-!	Compare two strings.
-!
-.sect .text
-.define _strcmp
-	.align	16
-_strcmp:
-	mov	ecx, -1		! Unlimited length
-	jmp	__strncmp	! Common code
Index: trunk/minix/lib/i386/string/strcpy.s
===================================================================
--- trunk/minix/lib/i386/string/strcpy.s	(revision 9)
+++ 	(revision )
@@ -1,22 +1,0 @@
-!	strcpy()					Author: Kees J. Bot
-!								1 Jan 1994
-.sect .text; .sect .rom; .sect .data; .sect .bss
-
-! char *strcpy(char *s1, const char *s2)
-!	Copy string s2 to s1.
-!
-.sect .text
-.define _strcpy
-	.align	16
-_strcpy:
-	push	ebp
-	mov	ebp, esp
-	push	esi
-	push	edi
-	mov	ecx, -1		! Unlimited length
-	call	__strncpy	! Common code
-	mov	eax, 8(ebp)	! Return s1
-	pop	edi
-	pop	esi
-	pop	ebp
-	ret
Index: trunk/minix/lib/i386/string/strlen.s
===================================================================
--- trunk/minix/lib/i386/string/strlen.s	(revision 9)
+++ 	(revision )
@@ -1,13 +1,0 @@
-!	strlen()					Author: Kees J. Bot
-!								1 Jan 1994
-.sect .text; .sect .rom; .sect .data; .sect .bss
-
-! size_t strlen(const char *s)
-!	Return the length of a string.
-!
-.sect .text
-.define _strlen
-	.align	16
-_strlen:
-	mov	ecx, -1		! Unlimited length
-	jmp	__strnlen	! Common code
Index: trunk/minix/lib/i386/string/strncat.s
===================================================================
--- trunk/minix/lib/i386/string/strncat.s	(revision 9)
+++ 	(revision )
@@ -1,13 +1,0 @@
-!	strncat()					Author: Kees J. Bot
-!								1 Jan 1994
-.sect .text; .sect .rom; .sect .data; .sect .bss
-
-! size_t strncat(char *s1, const char *s2, size_t n)
-!	Append string s2 to s1.
-!
-.sect .text
-.define _strncat
-	.align	16
-_strncat:
-	mov	edx, 12(esp)	! Maximum length
-	jmp	__strncat	! Common code
Index: trunk/minix/lib/i386/string/strncmp.s
===================================================================
--- trunk/minix/lib/i386/string/strncmp.s	(revision 9)
+++ 	(revision )
@@ -1,13 +1,0 @@
-!	strncmp()					Author: Kees J. Bot
-!								1 Jan 1994
-.sect .text; .sect .rom; .sect .data; .sect .bss
-
-! int strncmp(const char *s1, const char *s2, size_t n)
-!	Compare two strings.
-!
-.sect .text
-.define _strncmp
-	.align	16
-_strncmp:
-	mov	ecx, 12(esp)	! Maximum length
-	jmp	__strncmp	! Common code
Index: trunk/minix/lib/i386/string/strncpy.s
===================================================================
--- trunk/minix/lib/i386/string/strncpy.s	(revision 9)
+++ 	(revision )
@@ -1,25 +1,0 @@
-!	strncpy()					Author: Kees J. Bot
-!								1 Jan 1994
-.sect .text; .sect .rom; .sect .data; .sect .bss
-
-! char *strncpy(char *s1, const char *s2, size_t n)
-!	Copy string s2 to s1.
-!
-.sect .text
-.define _strncpy
-	.align	16
-_strncpy:
-	push	ebp
-	mov	ebp, esp
-	push	esi
-	push	edi
-	mov	ecx, 16(ebp)	! Maximum length
-	call	__strncpy	! Common code
-	mov	ecx, edx	! Number of bytes not copied
-	rep
-	stosb			! strncpy always copies n bytes by null padding
-	mov	eax, 8(ebp)	! Return s1
-	pop	edi
-	pop	esi
-	pop	ebp
-	ret
Index: trunk/minix/lib/i386/string/strnlen.s
===================================================================
--- trunk/minix/lib/i386/string/strnlen.s	(revision 9)
+++ 	(revision )
@@ -1,13 +1,0 @@
-!	strnlen()					Author: Kees J. Bot
-!								1 Jan 1994
-.sect .text; .sect .rom; .sect .data; .sect .bss
-
-! size_t strnlen(const char *s, size_t n)
-!	Return the length of a string.
-!
-.sect .text
-.define _strnlen
-	.align	16
-_strnlen:
-	mov	ecx, 8(esp)	! Maximum length
-	jmp	__strnlen	! Common code
Index: trunk/minix/lib/i386/string/strrchr.s
===================================================================
--- trunk/minix/lib/i386/string/strrchr.s	(revision 9)
+++ 	(revision )
@@ -1,36 +1,0 @@
-!	strrchr()					Author: Kees J. Bot
-!								2 Jan 1994
-.sect .text; .sect .rom; .sect .data; .sect .bss
-
-! char *strrchr(const char *s, int c)
-!	Look for the last occurrence a character in a string.
-!
-.sect .text
-.define _strrchr
-	.align	16
-_strrchr:
-	push	ebp
-	mov	ebp, esp
-	push	edi
-	mov	edi, 8(ebp)	! edi = string
-	mov	ecx, -1
-	xorb	al, al
-	cld
-	repne
-	scasb			! Look for the end of the string
-	not	ecx		! -1 - ecx = Length of the string + null
-	dec	edi		! Put edi back on the zero byte
-	movb	al, 12(ebp)	! The character to look for
-	std			! Downwards search
-	repne
-	scasb
-	cld			! Direction bit back to default
-	jne	failure
-	lea	eax, 1(edi)	! Found it
-	pop	edi
-	pop	ebp
-	ret
-failure:xor	eax, eax	! Not there
-	pop	edi
-	pop	ebp
-	ret
Index: trunk/minix/lib/i86/em/em_adi.s
===================================================================
--- trunk/minix/lib/i86/em/em_adi.s	(revision 9)
+++ 	(revision )
@@ -1,24 +1,0 @@
-.define .adi
-
-	.text
-.adi:
-	pop     bx 
-	cmp     cx,#2
-	jne     1f
-	pop     cx
-	add     ax,cx
-	jmp     (bx)
-1:
-	cmp     cx,#4
-	jne     9f
-	pop     dx
-	pop     cx
-	add     ax,cx
-	pop     cx
-	adc     dx,cx
-	push    dx
-	jmp     (bx)
-9:
-.extern .trpilin
-	push	bx
-	jmp     .trpilin
Index: trunk/minix/lib/i86/em/em_and.s
===================================================================
--- trunk/minix/lib/i86/em/em_and.s	(revision 9)
+++ 	(revision )
@@ -1,19 +1,0 @@
-.define	.and
-
-	! #bytes in cx
-	! save di; it might be a register variable
-
-	.text
-.and:
-	pop	bx		! return address
-	mov	dx,di
-	mov	di,sp
-	add	di,cx
-	sar	cx,#1
-1:
-	pop	ax
-	and	ax,(di)
-	stos
-	loop	1b
-	mov	di,dx
-	jmp	(bx)
Index: trunk/minix/lib/i86/em/em_blm.s
===================================================================
--- trunk/minix/lib/i86/em/em_blm.s	(revision 9)
+++ 	(revision )
@@ -1,15 +1,0 @@
-.define .blm
-.text
-
-	! cx: count in words
-.blm:
-	mov	bx,sp
-	mov	ax,si
-	mov	dx,di
-	mov	di,2(bx)
-	mov	si,4(bx)
-	rep
-	mov
-	mov	si,ax
-	mov	di,dx
-	ret	4
Index: trunk/minix/lib/i86/em/em_cii.s
===================================================================
--- trunk/minix/lib/i86/em/em_cii.s	(revision 9)
+++ 	(revision )
@@ -1,37 +1,0 @@
-.define .cii
-
-.text
-.cii:
-	pop     bx              ! return address
-				! pop     cx, dest. size
-				! pop     dx, src. size
-				! ax is first word of source
-	cmp	dx,#1
-	jne	2f
-	cbw
-	mov	dx,#2
-2:
-	cmp     dx,cx
-	je      8f
-	cmp     dx,#2
-	je      1f
-	cmp     dx,#4
-	jne     9f
-	cmp     cx,#2
-	jne     9f
-	pop     dx
-8:
-	jmp     (bx)
-1:
-	cmp     cx,#4
-	jne     9f
-	cwd
-	push    dx
-	jmp     (bx)
-9:
-	push    ax              ! push low source
-EILLINS = 18
-.extern .fat
-	mov     ax,#EILLINS
-	push    ax
-	jmp     .fat
Index: trunk/minix/lib/i86/em/em_cmi4.s
===================================================================
--- trunk/minix/lib/i86/em/em_cmi4.s	(revision 9)
+++ 	(revision )
@@ -1,27 +1,0 @@
-.define .cmi4
-
-.text
-.cmi4:
-	pop     bx              ! return address
-	pop     cx
-	pop     dx
-	pop     ax
-	push	si
-	mov	si,sp
-	xchg	bx,2(si)
-	pop	si
-	cmp     bx,dx
-	jg      1f
-	jl      2f
-	cmp     ax,cx
-	ja      1f
-	je      3f
-2:
-	mov	ax,#-1
-	ret
-3:
-	xor	ax,ax
-	ret
-1:
-	mov	ax,#1
-	ret
Index: trunk/minix/lib/i86/em/em_cms.s
===================================================================
--- trunk/minix/lib/i86/em/em_cms.s	(revision 9)
+++ 	(revision )
@@ -1,23 +1,0 @@
-.define .cms
-
-	! #bytes in cx
-	.text
-.cms:
-	pop     bx              ! return address
-	mov     dx,sp
-	push	si
-	push	di
-	mov     si,dx
-	add     dx,cx
-	mov     di,dx
-	add     dx,cx
-	sar     cx,#1
-	repe
-	cmp
-	je      1f
-	inc     cx
-1:
-	pop	di
-	pop	si
-	mov     sp,dx
-	jmp     (bx)
Index: trunk/minix/lib/i86/em/em_cmu4.s
===================================================================
--- trunk/minix/lib/i86/em/em_cmu4.s	(revision 9)
+++ 	(revision )
@@ -1,27 +1,0 @@
-.define .cmu4
-
-.text
-.cmu4:
-	pop     bx              ! return address
-	pop     cx
-	pop     dx
-	pop     ax
-	push	si
-	mov	si,sp
-	xchg	bx,2(si)
-	pop	si
-	cmp     bx,dx
-	ja      1f
-	jb      2f
-	cmp     ax,cx
-	ja      1f
-	je      3f
-2:
-	mov	ax,#-1
-	ret
-3:
-	xor	ax,ax
-	ret
-1:
-	mov	ax,#1
-	ret
Index: trunk/minix/lib/i86/em/em_com.s
===================================================================
--- trunk/minix/lib/i86/em/em_com.s	(revision 9)
+++ 	(revision )
@@ -1,15 +1,0 @@
-.define	.com
-
-	! #bytes in cx
-	.text
-.com:
-	mov	bx,sp
-	inc	bx
-	inc	bx
-	sar	cx,#1
-1:
-	not	(bx)
-	inc	bx
-	inc	bx
-	loop	1b
-	ret
Index: trunk/minix/lib/i86/em/em_csa2.s
===================================================================
--- trunk/minix/lib/i86/em/em_csa2.s	(revision 9)
+++ 	(revision )
@@ -1,26 +1,0 @@
-.define .csa2
-
-.text
-.csa2:
-				! bx, descriptor address
-				! ax, index
-	mov     dx,(bx)         ! default
-	sub     ax,2(bx)
-	cmp     ax,4(bx)
-	ja      1f
-	sal     ax,#1
-	add	bx,ax
-	mov     bx,6(bx)
-	test    bx,bx
-	jnz     2f
-1:
-	mov     bx,dx
-	test    bx,bx
-	jnz     2f
-ECASE = 20
-.extern .fat
-	mov     ax,#ECASE
-	push    ax
-	jmp     .fat
-2:
-	jmp     (bx)
Index: trunk/minix/lib/i86/em/em_csa4.s
===================================================================
--- trunk/minix/lib/i86/em/em_csa4.s	(revision 9)
+++ 	(revision )
@@ -1,30 +1,0 @@
-.sect .text; .sect .rom; .sect .data; .sect .bss
-.define .csa4
-
-.sect .text
-.csa4:
-				! bx, descriptor address
-				! ax, dx: index
-	mov	cx,(bx)         ! default
-	sub     ax,2(bx)
-				! ignore high order word; if non-zero, the
-				! case descriptor would not fit anyway
-	cmp	ax,6(bx)
-	ja	1f
-2:
-	sal     ax,#1
-	add	bx,ax
-	mov     bx,10(bx)
-	test    bx,bx
-	jnz     2f
-1:
-	mov	bx,cx
-	test    bx,bx
-	jnz     2f
-ECASE = 20
-.extern .fat
-	mov     ax,#ECASE
-	push    ax
-	jmp     .fat
-2:
-	jmp     (bx)
Index: trunk/minix/lib/i86/em/em_csb2.s
===================================================================
--- trunk/minix/lib/i86/em/em_csb2.s	(revision 9)
+++ 	(revision )
@@ -1,28 +1,0 @@
-.define .csb2
-
-.text
-.csb2:
-				!bx, descriptor address
-				!ax,  index
-	mov	dx,(bx)
-	mov	cx,2(bx)
-1:
-	add	bx,#4
-	dec     cx
-	jl      4f
-	cmp     ax,(bx)
-	jne     1b
-	mov	bx,2(bx)
-2:
-	test    bx,bx
-	jnz     3f
-ECASE = 20
-.extern .fat
-	mov     ax,#ECASE
-	push    ax
-	jmp     .fat
-3:
-	jmp     (bx)
-4:
-	mov	bx,dx
-	jmp	2b
Index: trunk/minix/lib/i86/em/em_csb4.s
===================================================================
--- trunk/minix/lib/i86/em/em_csb4.s	(revision 9)
+++ 	(revision )
@@ -1,33 +1,0 @@
-.sect .text; .sect .rom; .sect .data; .sect .bss
-.define .csb4
-
-.sect .text
-.csb4:
-				!bx: descriptor address
-				!ax, dx:  index
-	push	(bx)		! default
-	mov	cx,2(bx)	! count (ignore high order word, the descriptor
-				! would not fit anyway)
-1:
-	add	bx,#6
-	dec     cx
-	jl      4f
-	cmp     ax,(bx)
-	jne     1b
-	cmp	dx,2(bx)
-	jne     1b
-	pop	bx
-	mov	bx,4(bx)
-2:
-	test    bx,bx
-	jnz     3f
-ECASE = 20
-.extern .fat
-	mov     ax,#ECASE
-	push    ax
-	jmp     .fat
-3:
-	jmp	(bx)
-4:
-	pop	bx
-	jmp	2b
Index: trunk/minix/lib/i86/em/em_cuu.s
===================================================================
--- trunk/minix/lib/i86/em/em_cuu.s	(revision 9)
+++ 	(revision )
@@ -1,36 +1,0 @@
-.define .ciu
-.define .cui
-.define .cuu
-
-.text
-.ciu:
-.cui:
-.cuu:
-	pop     bx              ! return address
-				! pop     cx, dest. size
-				! pop     dx, source size
-				! ax is low word of source
-	cmp     dx,cx
-	je      8f
-	cmp     dx,#2
-	je      1f
-	cmp     dx,#4
-	jne     9f
-	cmp     cx,#2
-	jne     9f
-	pop     dx
-8:
-	jmp     (bx)
-1:
-	cmp     cx,#4
-	jne     9f
-	xor     dx,dx
-	push    dx
-	jmp     (bx)
-9:
-	push    ax              ! to help debugging ?
-EILLINS = 18
-.extern .fat
-	mov     ax,#EILLINS
-	push    ax
-	jmp     .fat
Index: trunk/minix/lib/i86/em/em_dup.s
===================================================================
--- trunk/minix/lib/i86/em/em_dup.s	(revision 9)
+++ 	(revision )
@@ -1,17 +1,0 @@
-.define	.dup
-
-	! #bytes in cx
-	.text
-.dup:
-	pop	bx		! return address
-	mov	ax,si
-	mov	dx,di
-	mov	si,sp
-	sub	sp,cx
-	mov	di,sp
-	sar	cx,#1
-	rep
-	mov
-	mov	si,ax
-	mov	di,dx
-	jmp	(bx)
Index: trunk/minix/lib/i86/em/em_dvi4.s
===================================================================
--- trunk/minix/lib/i86/em/em_dvi4.s	(revision 9)
+++ 	(revision )
@@ -1,90 +1,0 @@
-.define .dvi4
-
-yl=6
-yh=8
-xl=10
-xh=12
-
-.text
-.dvi4:
-	push	si
-	push	di
-	mov     si,sp           ! copy of sp
-	mov     bx,yl(si)
-	mov     ax,yh(si)
-	cwd
-	mov     di,dx
-	cmp     dx,ax
-	jne     7f
-	and     dx,dx
-	jge     1f
-	neg     bx
-	je      7f
-1:
-	xor     dx,dx
-	mov     cx,xl(si)
-	mov     ax,xh(si)
-	and     ax,ax
-	jge     2f
-	neg     ax
-	neg     cx
-	sbb     ax,dx
-	not     di
-2:
-	div     bx
-	xchg    ax,cx
-	div     bx              ! cx = high abs(result), ax=low abs(result)
-9:
-	and     di,di
-	jge     1f
-	neg     cx
-	neg     ax
-	sbb     cx,#0
-1:
-			! cx is high order result
-			! ax is low order result
-	mov	dx,cx
-	pop	di
-	pop	si
-	ret	8	! result in ax/dx
-
-7:
-	push    dx              ! sign of y
-	mov     di,ax
-	xor     bx,bx
-	and     di,di
-	jge     1f
-	neg     di
-	neg     yl(si)
-	sbb     di,bx
-1:
-	mov     ax,xl(si)
-	mov     dx,xh(si)
-	and     dx,dx
-	jge     1f
-	neg     dx
-	neg     ax
-	sbb     dx,bx
-	not     -2(si)
-1:
-	mov     cx,#16
-1:
-	shl     ax,#1
-	rcl     dx,#1
-	rcl     bx,#1
-	cmp     di,bx
-	ja      3f
-	jb      2f
-	cmp     yl(si),dx
-	jbe     2f
-3:
-	loop    1b
-	jmp     1f
-2:
-	sub     dx,yl(si)
-	sbb     bx,di
-	inc     ax
-	loop    1b
-1:
-	pop     di              ! di=sign of result,ax= result
-	jmp     9b
Index: trunk/minix/lib/i86/em/em_dvu4.s
===================================================================
--- trunk/minix/lib/i86/em/em_dvu4.s	(revision 9)
+++ 	(revision )
@@ -1,54 +1,0 @@
-.define .dvu4
-
-yl=6
-yh=8
-xl=10
-xh=12
-
-.text
-.dvu4:
-	push	si
-	push	di
-	mov     si,sp           ! copy of sp
-	mov     bx,yl(si)
-	mov     ax,yh(si)
-	or      ax,ax
-	jne     7f
-	xor     dx,dx
-	mov     cx,xl(si)
-	mov     ax,xh(si)
-	div     bx
-	xchg    ax,cx
-	div     bx
-9:
-			! cx is high order result
-			! ax is low order result
-	mov	dx,cx
-	pop	di
-	pop	si
-	ret	8	! result in ax/dx
-
-7:
-	mov     di,ax
-	xor     bx,bx
-	mov     ax,xl(si)
-	mov     dx,xh(si)
-	mov     cx,#16
-1:
-	shl     ax,#1
-	rcl     dx,#1
-	rcl     bx,#1
-	cmp     di,bx
-	ja      3f
-	jb      2f
-	cmp     yl(si),dx
-	jbe     2f
-3:
-	loop    1b
-	jmp     9b
-2:
-	sub     dx,yl(si)
-	sbb     bx,di
-	inc     ax
-	loop    1b
-	jmp     9b
Index: trunk/minix/lib/i86/em/em_error.s
===================================================================
--- trunk/minix/lib/i86/em/em_error.s	(revision 9)
+++ 	(revision )
@@ -1,41 +1,0 @@
-.define .error
-.define .Xtrp
-
-	! ax is trap number
-	! all registers must be saved
-	! because return is possible
-	! May only be called with error no's <16
-.text
-.error:
-	push bp
-	push si
-	push di
-	push dx
-	push cx
-	push bx
-	push ax
-	mov  cx,ax
-	mov  bx,#1
-	sal  bx,cl
-.extern .ignmask
-.extern .trp
-	test bx,.ignmask
-	jne  2f
-	call    .trp
-2:
-	pop  ax
-	pop  bx
-	pop  cx
-	pop  dx
-	pop  di
-	pop  si
-	pop  bp
-	ret
-
-.Xtrp:
-	cmp	ax,#16
-	jge	1f
-	call	.error
-	ret
-1:
-	jmp	.trp
Index: trunk/minix/lib/i86/em/em_exg.s
===================================================================
--- trunk/minix/lib/i86/em/em_exg.s	(revision 9)
+++ 	(revision )
@@ -1,21 +1,0 @@
-.define .exg
-
-	! #bytes in cx
-.text
-.exg:
-	push	di
-	mov	sp,di
-	add	di,#4
-	mov	bx,di
-	add	bx,cx
-	sar     cx,#1
-1:
-	mov	ax,(bx)
-	xchg	ax,(di)
-	mov	(bx),ax
-	add	di,#2
-	add	bx,#2
-	loop	1b
-2:
-	pop	di
-	ret
Index: trunk/minix/lib/i86/em/em_fat.s
===================================================================
--- trunk/minix/lib/i86/em/em_fat.s	(revision 9)
+++ 	(revision )
@@ -1,9 +1,0 @@
-.define .fat
-.text
-
-.fat:
-.extern .trp
-.extern .stop
-	call    .trp
-	call    .stop
-	! no return
Index: trunk/minix/lib/i86/em/em_fp8087.s
===================================================================
--- trunk/minix/lib/i86/em/em_fp8087.s	(revision 9)
+++ 	(revision )
@@ -1,615 +1,0 @@
-.define .adf4, .adf8, .sbf4, .sbf8, .mlf4, .mlf8, .dvf4, .dvf8
-.define .ngf4, .ngf8, .fif4, .fif8, .fef4, .fef8
-.define .cif4, .cif8, .cuf4, .cuf8, .cfi, .cfu, .cff4, .cff8
-.define .cmf4, .cmf8
-.sect .text; .sect .rom; .sect .data; .sect .bss
-
-!	$Header: /cvsup/minix/src/lib/i86/em/em_fp8087.s,v 1.1.1.1 2005/04/21 14:56:13 beng Exp $
-
-!	Implement interface to floating point package for Intel 8087
-
-	.sect .rom
-one:
-	.data2	1
-two:
-	.data2	2
-bigmin:
-	.data2	0, -32768
-
-	.sect .text
-.adf4:
-	mov	bx,sp
-	wait
-	flds	2(bx)
-	wait
-	fadds	6(bx)
-	wait
-	fstps	6(bx)
-	wait
-	ret
-.adf8:
-	mov	bx,sp
-	wait
-	fldd	2(bx)
-	wait
-	faddd	10(bx)
-	wait
-	fstpd	10(bx)
-	wait
-	ret
-
-.sbf4:
-	mov	bx,sp
-	wait
-	flds	6(bx)
-	wait
-	fsubs	2(bx)
-	wait
-	fstps	6(bx)
-	wait
-	ret
-
-.sbf8:
-	mov	bx,sp
-	wait
-	fldd	10(bx)
-	wait
-	fsubd	2(bx)
-	wait
-	fstpd	10(bx)
-	wait
-	ret
-
-.mlf4:
-	mov	bx,sp
-	wait
-	flds	2(bx)
-	wait
-	fmuls	6(bx)
-	wait
-	fstps	6(bx)
-	wait
-	ret
-.mlf8:
-	mov	bx,sp
-	wait
-	fldd	2(bx)
-	wait
-	fmuld	10(bx)
-	wait
-	fstpd	10(bx)
-	wait
-	ret
-
-.dvf4:
-	mov	bx,sp
-	wait
-	flds	6(bx)
-	wait
-	fdivs	2(bx)
-	wait
-	fstps	6(bx)
-	wait
-	ret
-
-.dvf8:
-	mov	bx,sp
-	wait
-	fldd	10(bx)
-	wait
-	fdivd	2(bx)
-	wait
-	fstpd	10(bx)
-	wait
-	ret
-
-.ngf4:
-	mov	bx,sp
-	wait
-	flds	2(bx)
-	wait
-	fchs
-	wait
-	fstps	2(bx)
-	wait
-	ret
-
-.ngf8:
-	mov	bx,sp
-	wait
-	fldd	2(bx)
-	wait
-	fchs
-	wait
-	fstpd	2(bx)
-	wait
-	ret
-
-.fif4:
-	mov	bx,sp
-	push	bx		! make room for FP status word
-	wait
-	flds	4(bx)
-	wait
-	fmuls	8(bx)		! multiply
-	wait
-	fld	st		! copy result
-	wait
-	ftst			! test sign; handle negative separately
-	wait
-	fstsw	-2(bx)
-	wait
-	mov	ax,-2(bx)
-	sahf			! result of test in condition codes
-	jb	1f
-	frndint			! this one rounds (?)
-	wait
-	fcom	st(1)		! compare with original; if <=, then OK
-	wait
-	fstsw	-2(bx)
-	wait
-	mov	ax,-2(bx)
-	sahf
-	jbe	2f
-	fisubs	one		! else subtract 1
-	wait
-	jmp	2f
-1:				! here, negative case
-	frndint			! this one rounds (?)
-	wait
-	fcom	st(1)		! compare with original; if >=, then OK
-	wait
-	fstsw	-2(bx)
-	wait
-	mov	ax,-2(bx)
-	sahf
-	jae	2f
-	fiadds	one		! else add 1
-	wait
-2:
-	fsub	st(1),st	! subtract integer part
-	wait
-	mov	bx,2(bx)
-	fstps	(bx)
-	wait
-	fstps	4(bx)
-	wait
-	pop	bx
-	ret
-
-.fif8:
-	mov	bx,sp
-	push	bx		! make room for FP status word
-	wait
-	fldd	4(bx)
-	wait
-	fmuld	12(bx)		! multiply
-	wait
-	fld	st		! and copy result
-	wait
-	ftst			! test sign; handle negative separately
-	wait
-	fstsw	-2(bx)
-	wait
-	mov	ax,-2(bx)
-	sahf			! result of test in condition codes
-	jb	1f
-	frndint			! this one rounds (?)
-	wait
-	fcom	st(1)		! compare with original; if <=, then OK
-	wait
-	fstsw	-2(bx)
-	wait
-	mov	ax,-2(bx)
-	sahf
-	jbe	2f
-	fisubs	one		! else subtract 1
-	wait
-	jmp	2f
-1:				! here, negative case
-	frndint			! this one rounds (?)
-	wait
-	fcom	st(1)		! compare with original; if >=, then OK
-	wait
-	fstsw	-2(bx)
-	wait
-	mov	ax,-2(bx)
-	sahf
-	jae	2f
-	fiadds	one		! else add 1
-	wait
-2:
-	fsub	st(1),st	! subtract integer part
-	mov	bx,2(bx)
-	fstpd	(bx)
-	wait
-	fstpd	8(bx)
-	wait
-	pop	bx
-	ret
-
-.fef4:
-				! this could be simpler, if only the
-				! fxtract instruction was emulated properly
-	mov	bx,sp
-	mov	ax,6(bx)
-	and	ax,#077600
-	je	1f		! zero exponent
-	mov	cx,#7
-	shr	ax,cl
-	sub	ax,#126
-	mov	cx,ax		! exponent in cx
-	mov	ax,6(bx)
-	and	ax,#0100177
-	or	ax,#0037400	! load -1 exponent
-	mov	dx,4(bx)
-	mov	bx,2(bx)
-	mov	4(bx),ax
-	mov	2(bx),dx
-	mov	(bx),cx
-	ret
-1:				! we get here on zero exp
-	mov	ax,6(bx)
-	and	ax,#0177
-	or	ax,4(bx)
-	jne	1f		! zero result
-	xor	ax,ax
-	mov	bx,2(bx)
-	mov	(bx),ax
-	mov	2(bx),ax
-	mov	4(bx),ax
-	ret
-1:				! otherwise unnormalized number
-	mov	cx,6(bx)
-	and	cx,#0100177
-	mov	dx,cx
-	and	cx,#0x8000
-	mov	ax,#-125
-2:
-	test	dx,#0x80
-	jne	1f
-	dec	ax
-	shl	4(bx),#1
-	rcl	dx,#1
-	or	dx,cx
-	jmp	2b
-1:
-	mov	cx,4(bx)
-	mov	bx,2(bx)
-	mov	(bx),ax
-	mov	2(bx),cx
-	and	dx,#0100177
-	or	dx,#0037400	! load -1 exponent
-	mov	4(bx),dx
-	ret
-
-.fef8:
-				! this could be simpler, if only the
-				! fxtract instruction was emulated properly
-	mov	bx,sp
-	mov	ax,10(bx)
-	and	ax,#077760
-	je	1f		! zero exponent
-	mov	cx,#4
-	shr	ax,cl
-	sub	ax,#1022
-	mov	cx,ax		! exponent in cx
-	mov	ax,10(bx)
-	and	ax,#0100017
-	or	ax,#0037740	! load -1 exponent
-	push	8(bx)
-	push	6(bx)
-	push	4(bx)
-	mov	bx,2(bx)
-	pop	2(bx)
-	pop	4(bx)
-	pop	6(bx)
-	mov	8(bx),ax
-	mov	(bx),cx
-	ret
-1:				! we get here on zero exp
-	mov	ax,10(bx)
-	and	ax,#017
-	or	ax,8(bx)
-	or	ax,6(bx)
-	or	ax,4(bx)
-	jne	1f		! zero result
-	xor	ax,ax
-	mov	bx,2(bx)
-	mov	(bx),ax
-	mov	2(bx),ax
-	mov	4(bx),ax
-	mov	6(bx),ax
-	mov	8(bx),ax
-	ret
-1:				! otherwise unnormalized number
-	mov	cx,10(bx)
-	and	cx,#0100017
-	mov	dx,cx
-	and	cx,#0x8000
-	mov	ax,#-1021
-2:
-	test	dx,#0x10
-	jne	1f
-	dec	ax
-	shl	4(bx),#1
-	rcl	6(bx),#1
-	rcl	8(bx),#1
-	rcl	dx,#1
-	or	dx,cx
-	jmp	2b
-1:
-	and	dx,#0100017
-	or	dx,#0037740	! load -1 exponent
-	mov	cx,8(bx)
-	push	6(bx)
-	push	4(bx)
-	mov	bx,2(bx)
-	mov	(bx),ax
-	mov	8(bx),dx
-	mov	6(bx),cx
-	pop	2(bx)
-	pop	4(bx)
-	ret
-
-.cif4:
-	mov	bx,sp
-	cmp	2(bx),#2
-	jne	1f
-	wait
-	filds	4(bx)
-	wait
-	fstps	2(bx)
-	wait
-	ret
-1:
-	wait
-	fildl	4(bx)
-	wait
-	fstps	4(bx)
-	wait
-	ret
-
-.cif8:
-	mov	bx,sp
-	cmp	2(bx),#2
-	jne	1f
-	wait
-	filds	4(bx)
-	wait
-	fstpd	2(bx)
-	wait
-	ret
-1:
-	wait
-	fildl	4(bx)
-	wait
-	fstpd	2(bx)
-	wait
-	ret
-
-.cuf4:
-	mov	bx,sp
-	cmp	2(bx),#2
-	jne	1f
-	mov	ax,4(bx)
-	mov	2(bx),ax
-	mov	4(bx),#0
-	wait
-	fildl	2(bx)
-	wait
-	fstps	2(bx)
-	wait
-	ret
-1:
-	wait
-	fildl	4(bx)
-	wait
-	cmp	6(bx),#0
-	jge	1f
-2:
-	wait
-	fisubl	bigmin
-	wait
-	fisubl	bigmin
-1:
-	wait
-	fstps	4(bx)
-	wait
-	ret
-
-.cuf8:
-	mov	bx,sp
-	cmp	2(bx),#2
-	jne	1f
-	mov	6(bx),#0
-1:
-	wait
-	fildl	4(bx)
-	wait
-	cmp	6(bx),#0
-	jge	1f
-2:
-	wait
-	fisubl	bigmin
-	wait
-	fisubl	bigmin
-1:
-	wait
-	fstpd	2(bx)
-	wait
-	ret
-
-.cfi:
-	mov	bx,sp
-	push	bx
-	wait
-	fstcw	-2(bx)
-	wait
-	mov	dx,-2(bx)
-	or	-2(bx),#0xc00	! truncating mode
-	wait
-	fldcw	-2(bx)
-	pop	ax
-	cmp	4(bx),#4
-	jne	2f
-				! loc 4 loc ? cfi
-	wait
-	flds	6(bx)
-	wait
-	fistpl	6(bx)
-	wait
-	cmp	2(bx),#2
-	jne	1f
-	mov	ax,6(bx)
-1:
-	mov	4(bx),dx
-	wait
-	fldcw	4(bx)
-	wait
-	ret
-2:
-				! loc 8 loc ? cfi
-	wait
-	fldd	6(bx)
-	wait
-	fistpl	10(bx)
-	wait
-	cmp	2(bx),#2
-	jne	1b
-	mov	ax,10(bx)
-	jmp	1b
-
-.cfu:
-	mov	bx,sp
-	push	bx
-	wait
-	fstcw	-2(bx)
-	wait
-	mov	dx,-2(bx)
-	and	-2(bx),#0xf3ff
-	or	-2(bx),#0x400	! to -infinity
-	wait
-	fldcw	-2(bx)
-	wait
-	pop	ax
-	cmp	4(bx),#4
-	jne	2f
-				! loc 4 loc ? cfu
-	flds	6(bx)
-	wait
-	fabs			! ???
-	wait
-	fiaddl	bigmin
-	fistpl	6(bx)
-	wait
-	mov	ax,8(bx)
-	sub	ax,bigmin+2
-	mov	8(bx),ax
-	cmp	2(bx),#2
-	jne	1f
-	mov	ax,6(bx)
-1:
-	mov	4(bx),dx
-	wait
-	fldcw	4(bx)
-	wait
-	ret
-2:
-	wait
-				! loc 8 loc ? cfu
-	fldd	6(bx)
-	wait
-	fabs			! ???
-	wait
-	fiaddl	bigmin
-	fistpl	10(bx)
-	wait
-	mov	ax,12(bx)
-	sub	ax,bigmin+2
-	mov	12(bx),ax
-	cmp	2(bx),#2
-	jne	1b
-	mov	ax,10(bx)
-	jmp	1b
-
-.cff4:
-	mov	bx,sp
-	wait
-	fldd	2(bx)
-	wait
-	fstcw	2(bx)
-	wait
-	mov	dx,2(bx)
-	and	2(bx),#0xf3ff	! set to rounding mode
-	wait
-	fldcw	2(bx)
-	wait
-	fstps	6(bx)
-	mov	2(bx),dx
-	wait
-	fldcw	2(bx)
-	wait
-	ret
-
-.cff8:
-	mov	bx,sp
-	wait
-	flds	2(bx)
-	wait
-	fstpd	2(bx)
-	wait
-	ret
-
-.cmf4:
-	mov	bx,sp
-	push	bx		! room for 8087 status word
-	xor	cx,cx
-	wait
-	flds	6(bx)
-	wait
-	flds	2(bx)
-	wait
-	fcompp			! compare and pop operands
-	wait
-	fstsw	-2(bx)
-	wait
-	mov	ax,-2(bx)
-	sahf
-	je	1f
-	jb	2f
-	dec	cx
-	jmp	1f
-2:
-	inc	cx
-1:
-	mov	ax,cx
-	pop	bx
-	ret
-
-
-.cmf8:
-	mov	bx,sp
-	push	bx		! room for 8087 status word
-	xor	cx,cx
-	wait
-	fldd	10(bx)
-	wait
-	fldd	2(bx)
-	wait
-	fcompp			! compare and pop operands
-	wait
-	fstsw	-2(bx)
-	wait
-	mov	ax,-2(bx)
-	sahf
-	je	1f
-	jb	2f
-	dec	cx
-	jmp	1f
-2:
-	inc	cx
-1:
-	mov	ax,cx
-	pop	bx
-	ret
Index: trunk/minix/lib/i86/em/em_gto.s
===================================================================
--- trunk/minix/lib/i86/em/em_gto.s	(revision 9)
+++ 	(revision )
@@ -1,7 +1,0 @@
-.define .gto
-.text
-
-.gto:
-	mov     bp,4(bx)
-	mov     sp,2(bx)
-	jmp     @(bx)
Index: trunk/minix/lib/i86/em/em_hol0.s
===================================================================
--- trunk/minix/lib/i86/em/em_hol0.s	(revision 9)
+++ 	(revision )
@@ -1,5 +1,0 @@
-.define hol0
-.data
-hol0:
-	.data2	0, 0
-	.data2	0, 0
Index: trunk/minix/lib/i86/em/em_iaar.s
===================================================================
--- trunk/minix/lib/i86/em/em_iaar.s	(revision 9)
+++ 	(revision )
@@ -1,17 +1,0 @@
-.define .iaar
-.text
-
-.iaar:
-	pop     cx
-	pop     dx
-	cmp     dx,#2
-.extern .unknown
-	jne     .unknown
-	pop     bx      ! descriptor address
-	pop     ax      ! index
-	sub     ax,(bx)
-	mul     4(bx)
-	pop     bx      ! array base
-	add     bx,ax
-	push	cx
-	ret
Index: trunk/minix/lib/i86/em/em_ilar.s
===================================================================
--- trunk/minix/lib/i86/em/em_ilar.s	(revision 9)
+++ 	(revision )
@@ -1,14 +1,0 @@
-.define .ilar
-.text
-
-.ilar:
-	pop     cx
-	pop     dx
-.extern .unknown
-	cmp     dx,#2
-	jne     .unknown
-	pop     bx      ! descriptor address
-	pop     ax      ! index
-	push    cx
-.extern .lar2
-	jmp    .lar2
Index: trunk/minix/lib/i86/em/em_inn.s
===================================================================
--- trunk/minix/lib/i86/em/em_inn.s	(revision 9)
+++ 	(revision )
@@ -1,31 +1,0 @@
-.define .inn
-.text
-
-	! #bytes in cx
-	! bit # in ax
-.inn:
-	xor     dx,dx
-	mov     bx,#8
-	div     bx
-	mov     bx,sp
-	add	bx,#2
-	add     bx,ax
-	cmp     ax,cx
-	jae     1f
-	movb	al,(bx)
-	mov	bx,dx
-	testb   al,bits(bx)
-	jz      1f
-	mov	ax,#1
-	jmp	2f
-1:
-	xor	ax,ax
-2:
-	pop	bx
-	add     sp,cx
-	! ax is result
-	jmp     (bx)
-
-	.data
-bits:
-	.data1 1,2,4,8,16,32,64,128
Index: trunk/minix/lib/i86/em/em_ior.s
===================================================================
--- trunk/minix/lib/i86/em/em_ior.s	(revision 9)
+++ 	(revision )
@@ -1,17 +1,0 @@
-.define	.ior
-.text
-
-	! #bytes in cx
-.ior:
-	pop	bx		! return address
-	mov	dx,di
-	mov	di,sp
-	add	di,cx
-	sar	cx,#1
-1:
-	pop	ax
-	or	ax,(di)
-	stos
-	loop	1b
-	mov	di,dx
-	jmp	(bx)
Index: trunk/minix/lib/i86/em/em_isar.s
===================================================================
--- trunk/minix/lib/i86/em/em_isar.s	(revision 9)
+++ 	(revision )
@@ -1,14 +1,0 @@
-.define .isar
-.text
-
-.isar:
-	pop     cx
-	pop     ax
-	cmp     ax,#2
-.extern .unknown
-	jne     .unknown
-	pop     bx      ! descriptor address
-	pop     ax      ! index
-	push    cx
-.extern .sar2
-	jmp    .sar2
Index: trunk/minix/lib/i86/em/em_lar2.s
===================================================================
--- trunk/minix/lib/i86/em/em_lar2.s	(revision 9)
+++ 	(revision )
@@ -1,35 +1,0 @@
-.define .lar2
-.text
-
-.lar2:
-				! bx, descriptor address
-				! ax, index
-	pop	cx
-	pop	dx		! base address
-	push	cx
-	push	si
-	mov	si,dx
-	sub     ax,(bx)
-	mov     cx,4(bx)
-	imul    cx
-	add     si,ax
-	sar     cx,#1
-	jnb     1f
-	xorb    ah,ah
-	lodsb
-	pop	si
-	pop	bx
-	push    ax
-	jmp     (bx)
-1:
-	pop	dx		! saved si
-	mov	ax,4(bx)
-	pop	bx		! return address
-	sub     sp,ax
-	mov	ax,di		! save di
-	mov     di,sp
-	rep
-	mov
-	mov	di,ax
-	mov	si,dx
-	jmp     (bx)
Index: trunk/minix/lib/i86/em/em_lfr6.s
===================================================================
--- trunk/minix/lib/i86/em/em_lfr6.s	(revision 9)
+++ 	(revision )
@@ -1,10 +1,0 @@
-.define .lfr6
-.text
-.extern .retarea
-
-.lfr6:
-	pop	bx
-	push	.retarea+4
-	push	.retarea+2
-	push	.retarea
-	jmp	(bx)
Index: trunk/minix/lib/i86/em/em_lfr8.s
===================================================================
--- trunk/minix/lib/i86/em/em_lfr8.s	(revision 9)
+++ 	(revision )
@@ -1,11 +1,0 @@
-.define .lfr8
-.text
-.extern .retarea
-
-.lfr8:
-	pop	bx
-	push	.retarea+6
-	push	.retarea+4
-	push	.retarea+2
-	push	.retarea
-	jmp	(bx)
Index: trunk/minix/lib/i86/em/em_loi.s
===================================================================
--- trunk/minix/lib/i86/em/em_loi.s	(revision 9)
+++ 	(revision )
@@ -1,38 +1,0 @@
-.define .loi
-.define .los
-.text
-
-	! #bytes in cx
-	! address in bx
-	! save si/di. they might be register variables
-.los:
-	mov	dx,si
-	mov	si,bx
-	pop	bx
-	mov	ax,cx
-	sar	cx,#1
-	jnb	1f
-	xorb	ah,ah
-	lodsb
-	mov	si,dx
-	push	ax
-	jmp	(bx)
-1:
-	sub	sp,ax
-	jmp	1f
-
-.loi:
-	! only called with size > 4
-	mov	dx,si
-	mov	si,bx
-	pop     bx
-	sub     sp,cx
-	sar     cx,#1
-1:
-	mov	ax,di
-	mov     di,sp
-	rep
-	mov
-	mov	si,dx
-	mov	di,ax
-	jmp     (bx)
Index: trunk/minix/lib/i86/em/em_mli4.s
===================================================================
--- trunk/minix/lib/i86/em/em_mli4.s	(revision 9)
+++ 	(revision )
@@ -1,25 +1,0 @@
-.define .mli4
-.text
-
-yl=2
-yh=4
-	! x * y
-	! xl in ax
-	! xh in dx
-
-.mli4:
-	mov	bx,sp
-	push	dx
-	mov	cx,ax
-	mul	yh(bx)           ! xl*yh
-	pop	dx
-	push	ax
-	mov	ax,dx
-	mul	yl(bx)		! xh * yl
-	pop	dx
-	add     dx,ax           ! xh*yl+xl*yh
-	mov     ax,cx
-	mov	cx,dx
-	mul     yl(bx)           ! xl*yl
-	add     dx,cx
-	ret	4
Index: trunk/minix/lib/i86/em/em_mon.s
===================================================================
--- trunk/minix/lib/i86/em/em_mon.s	(revision 9)
+++ 	(revision )
@@ -1,6 +1,0 @@
-.define .mon
-.text
-
-.mon:
-.extern .stop
-	call    .stop
Index: trunk/minix/lib/i86/em/em_nop.s
===================================================================
--- trunk/minix/lib/i86/em/em_nop.s	(revision 9)
+++ 	(revision )
@@ -1,4 +1,0 @@
-.define .nop
-.text
-.nop:
-	ret
Index: trunk/minix/lib/i86/em/em_rck.s
===================================================================
--- trunk/minix/lib/i86/em/em_rck.s	(revision 9)
+++ 	(revision )
@@ -1,19 +1,0 @@
-.define .rck
-.text
-
-	! descriptor address in bx
-	! value in ax, must be left there
-.rck:
-	cmp     ax,(bx)
-	jl      2f
-	cmp     ax,2(bx)
-	jg      2f
-	ret
-2:
-	push    ax
-ERANGE = 1
-.extern .error
-	mov     ax,#ERANGE
-	call    .error
-	pop     ax
-	ret
Index: trunk/minix/lib/i86/em/em_ret6.s
===================================================================
--- trunk/minix/lib/i86/em/em_ret6.s	(revision 9)
+++ 	(revision )
@@ -1,10 +1,0 @@
-.define .ret6
-.text
-.extern .retarea
-
-.ret6:
-	pop	bx
-	pop	.retarea
-	pop	.retarea+2
-	pop	.retarea+4
-	jmp	(bx)
Index: trunk/minix/lib/i86/em/em_ret8.s
===================================================================
--- trunk/minix/lib/i86/em/em_ret8.s	(revision 9)
+++ 	(revision )
@@ -1,11 +1,0 @@
-.define .ret8
-.text
-.extern .retarea
-
-.ret8:
-	pop	bx
-	pop	.retarea
-	pop	.retarea+2
-	pop	.retarea+4
-	pop	.retarea+6
-	jmp	(bx)
Index: trunk/minix/lib/i86/em/em_retarea.s
===================================================================
--- trunk/minix/lib/i86/em/em_retarea.s	(revision 9)
+++ 	(revision )
@@ -1,5 +1,0 @@
-.define .retarea
-
-.bss
-.retarea:
-	.zerow 8/2
Index: trunk/minix/lib/i86/em/em_return.s
===================================================================
--- trunk/minix/lib/i86/em/em_return.s	(revision 9)
+++ 	(revision )
@@ -1,17 +1,0 @@
-.define .sdret, .dsret, .sret, .dret, .cret 
-.text
-
-.dsret:
-	pop	di
-.sret:
-	pop	si
-.cret:
-	mov	sp,bp
-	pop	bp
-	ret
-
-.sdret:
-	pop	si
-.dret:
-	pop	di
-	jmp	.cret
Index: trunk/minix/lib/i86/em/em_rmi4.s
===================================================================
--- trunk/minix/lib/i86/em/em_rmi4.s	(revision 9)
+++ 	(revision )
@@ -1,89 +1,0 @@
-.define .rmi4
-.text
-
-yl=6
-yh=8
-xl=10
-xh=12
-
-.rmi4:
-	push	si
-	push	di
-	mov     si,sp           ! copy of sp
-	mov     bx,yl(si)
-	mov     ax,yh(si)
-	cwd
-	cmp     dx,ax
-	jne     7f
-	and     dx,dx
-	jge     1f
-	neg     bx
-	je      7f
-1:
-	xor     dx,dx
-	mov     cx,xl(si)
-	mov     ax,xh(si)
-	and     ax,ax
-	jge     2f
-	neg     ax
-	neg     cx
-	sbb     ax,dx
-2:
-	div     bx
-	xchg    ax,cx
-	div     bx              ! dx= result(low), 0=result(high)
-	xor     bx,bx
-9:
-	cmp     xh(si),#0
-	jge     1f
-	neg     bx
-	neg     dx
-	sbb     bx,#0
-1:
-			! bx is high order result
-			! dx is low order result
-	mov	ax,dx
-	mov	dx,bx	! result in ax/dx
-	pop	di
-	pop	si
-	ret	8
-
-7:
-	mov     di,ax
-	xor     bx,bx
-	and     di,di
-	jge     1f
-	neg     di
-	neg     yl(si)
-	sbb     di,bx
-1:
-	mov     ax,xl(si)
-	mov     dx,xh(si)
-	and     dx,dx
-	jge     1f
-	neg     dx
-	neg     ax
-	sbb     dx,bx
-1:
-	mov     cx,#16
-1:
-	shl     ax,#1
-	rcl     dx,#1
-	rcl     bx,#1
-	cmp     di,bx
-	ja      3f
-	jb      2f
-	cmp     yl(si),dx
-	jbe     2f
-3:
-	loop    1b
-		! dx=result(low), bx=result(high)
-	jmp     9b
-2:
-	sub     dx,yl(si)
-	sbb     bx,di
-	inc     ax
-	loop    1b
-1:
-		! dx=result(low), bx=result(high)
-	jmp     9b
Index: trunk/minix/lib/i86/em/em_rmu4.s
===================================================================
--- trunk/minix/lib/i86/em/em_rmu4.s	(revision 9)
+++ 	(revision )
@@ -1,61 +1,0 @@
-.define .rmu4
-.text
-
-yl=6
-yh=8
-xl=10
-xh=12
-
-.rmu4:
-	push	si
-	push	di
-	mov     si,sp           ! copy of sp
-	mov     bx,yl(si)
-	mov     ax,yh(si)
-	or      ax,ax
-	jne     7f
-1:
-	xor     dx,dx
-	mov     cx,xl(si)
-	mov     ax,xh(si)
-2:
-	div     bx
-	xchg    ax,cx
-	div     bx
-	xor     bx,bx
-9:
-			! bx is high order result
-			! dx is low order result
-	mov	ax,dx
-	mov	dx,bx
-	pop	di
-	pop	si
-	ret	8	! result in ax/dx
-
-7:
-	mov     di,ax
-	xor     bx,bx
-	mov     ax,xl(si)
-	mov     dx,xh(si)
-	mov     cx,#16
-1:
-	shl     ax,#1
-	rcl     dx,#1
-	rcl     bx,#1
-	cmp     di,bx
-	ja      3f
-	jb      2f
-	cmp     yl(si),dx
-	jbe     2f
-3:
-	loop    1b
-		! dx=result(low), bx=result(high)
-	jmp     9b
-2:
-	sub     dx,yl(si)
-	sbb     bx,di
-	inc     ax
-	loop    1b
-1:
-		! dx=result(low), bx=result(high)
-	jmp     9b
Index: trunk/minix/lib/i86/em/em_sar2.s
===================================================================
--- trunk/minix/lib/i86/em/em_sar2.s	(revision 9)
+++ 	(revision )
@@ -1,33 +1,0 @@
-.define .sar2
-.text
-
-.sar2:
-				! bx, descriptor address
-				! ax, index
-	pop	cx
-	pop	dx		! base address
-	push	cx
-	xchg	di,dx		! di = base address, dx is saved di
-	sub     ax,(bx)
-	mov     cx,4(bx)
-	push	dx
-	imul    cx
-	pop	dx
-	add     di,ax
-	sar     cx,#1
-	jnb     1f
-	pop	bx
-	pop     ax
-	stosb
-	mov	di,dx
-	jmp     (bx)
-1:
-	pop	bx
-	mov	ax,si
-	mov     si,sp
-	rep
-	mov
-	mov     sp,si
-	mov	si,ax
-	mov	di,dx
-	jmp     (bx)
Index: trunk/minix/lib/i86/em/em_sbi.s
===================================================================
--- trunk/minix/lib/i86/em/em_sbi.s	(revision 9)
+++ 	(revision )
@@ -1,27 +1,0 @@
-.define .sbi
-.text
-
-	! #bytes in cx , top of stack in ax
-.sbi:
-	pop     bx              ! return subress
-	cmp     cx,#2
-	jne     1f
-	pop     cx
-	sub     ax,cx
-	neg     ax
-	jmp     (bx)
-1:
-	cmp     cx,#4
-	jne     9f
-	pop     dx
-	pop     cx
-	sub     cx,ax
-	mov     ax,cx
-	pop     cx
-	sbb     cx,dx
-	push    cx
-	jmp     (bx)
-9:
-.extern .trpilin
-	push    bx
-	jmp     .trpilin
Index: trunk/minix/lib/i86/em/em_set.s
===================================================================
--- trunk/minix/lib/i86/em/em_set.s	(revision 9)
+++ 	(revision )
@@ -1,43 +1,0 @@
-.define .set
-.text
-
-	! #bytes in cx
-	! bit # in ax
-.set:
-	pop     bx              ! return address
-	xor     dx,dx
-!ifdef create set
-	sub	sp,cx
-	push	bx
-	push	di
-	mov     bx,sp
-	xor	di,di
-	sar	cx,#1
-1:
-	mov     4(bx)(di),dx
-	inc	di
-	inc	di
-	loop	1b
-!endif
-	mov     bx,#8
-	div     bx
-	cmp     ax,di
-	jae     2f
-	mov	di,dx
-	movb	dl,bits(di)
-	mov     di,sp
-	add     di,ax
-	orb     4(di),dl
-	pop	di
-	ret
-2:
-ESET = 2
-.extern .error
-	pop	di
-	mov     ax,#ESET
-	call	.error
-	ret
-
-	.data
-bits:
-	.data1   1,2,4,8,16,32,64,128
Index: trunk/minix/lib/i86/em/em_stb.s
===================================================================
--- trunk/minix/lib/i86/em/em_stb.s	(revision 9)
+++ 	(revision )
@@ -1,16 +1,0 @@
-.define ___stb
-.text
-
-	! Routine for copying structs.
-___stb:
-	mov	bx,sp
-	push	si
-	push	di
-	mov	cx,2(bx)
-	mov	si,4(bx)
-	mov	di,6(bx)
-	rep
-	movb
-	pop	di
-	pop	si
-	ret
Index: trunk/minix/lib/i86/em/em_sti.s
===================================================================
--- trunk/minix/lib/i86/em/em_sti.s	(revision 9)
+++ 	(revision )
@@ -1,32 +1,0 @@
-.define .sti
-.define .sts
-.text
-
-	! #bytes in cx
-	! address in bx
-	! save di/si. they might be register variables
-.sts:
-	mov	dx,di		! save di
-	mov	di,bx
-	pop     bx              ! return address
-	sar     cx,#1
-	jnb     1f
-	pop     ax
-	stosb
-	mov	di,dx
-	jmp     (bx)
-.sti:
-	! only called with count > 4
-	mov	dx,di
-	mov	di,bx
-	pop	bx
-	sar	cx,#1
-1:
-	mov	ax,si
-	mov     si,sp
-	rep
-	mov
-	mov     sp,si
-	mov	di,dx
-	mov	si,ax
-	jmp     (bx)
Index: trunk/minix/lib/i86/em/em_stop.s
===================================================================
--- trunk/minix/lib/i86/em/em_stop.s	(revision 9)
+++ 	(revision )
@@ -1,4 +1,0 @@
-.define .stop
-.text
-.stop:
-	call	__exit
Index: trunk/minix/lib/i86/em/em_trp.s
===================================================================
--- trunk/minix/lib/i86/em/em_trp.s	(revision 9)
+++ 	(revision )
@@ -1,138 +1,0 @@
-.define .trpdivz
-.define .trpilin
-.define .trpcase
-.define .trprang
-.define .trpset
-.define .trpnofp
-.define .trpheap
-.define .trp
-
-.bss
-.M: .zerow 24/2
-
-.text
-.extern .trpdivz
-.extern .trpilin
-.extern .trpcase
-.extern .trprang
-.extern .trpset
-.extern .trpnofp
-.extern .trpheap
-.extern .trp
-
-.trpdivz:
-mov ax,#6
-mov dx,#.Mdivz
-jmp .Trp
-.trpilin:
-mov ax,#18
-mov dx,#.Milin
-jmp .Trp
-.trpcase:
-mov ax,#20
-mov dx,#.Mcase
-jmp .Trp
-.trprang:
-mov ax,#1
-mov dx,#.Mrang
-jmp .Trp
-.trpset:
-mov ax,#2
-mov dx,#.Mset
-jmp .Trp
-.trpnofp:
-mov ax,#18
-mov dx,#.Mnofp
-jmp .Trp
-.trpheap:
-mov ax,#17
-mov dx,#.Mheap
-jmp .Trp
-
-.Trp:
-xor     bx,bx
-.extern .trppc
-xchg    bx,.trppc
-test    bx,bx
-jz      2f
-push    ax
-call    (bx)
-pop     ax
-ret
-2:
-mov bx,#22
-push bx
-push dx
-mov ax,#2
-push ax
-call .Write
-call __exit
-
-.trp:
-mov dx,ax
-cmp dx,#21
-jae 1f
-sal dx,#1
-mov bx,#.Mtable
-add bx,dx
-mov bx,(bx)
-test bx,bx
-jz 1f
-mov dx,bx
-jmp 2f
-1:
-mov bx,#.Mtrp+14
-mov cx,#6
-mov dx,ax
-1:
-and dx,#7
-add dx,'0'
-movb (bx),dl
-dec bx
-sar dx,#1
-sar dx,#1
-sar dx,#1
-loop 1b
-mov dx,#.Mtrp
-2:
-jmp .Trp
-
-.Write:
-push bp
-mov bp,sp
-mov .M+2,#4
-mov bx,4(bp)
-mov .M+4,bx
-mov bx,8(bp)
-mov .M+6,bx
-mov bx,6(bp)
-mov .M+10,bx
-mov ax,#.M
-push ax
-mov ax,#1
-push ax
-
-mov ax,#1
-mov bx,#.M
-mov cx,#3
-int 32
-mov sp,bp
-pop bp
-ret
-
-
-.data
-.Mtable:
-	.data2 0,	.Mrang,	.Mset,	0,	0,	0,	.Mdivz,	0
-	.data2 0,	0,	0,	0,	0,	0,	0,	0
-	.data2 0,	.Mheap,	.Milin,	.Milin,	.Mcase
-
-.Mdivz: .asciz "Error: Division by 0 \n"
-.Milin: .asciz "Illegal EM instruct'n\n"
-.Mcase: .asciz "Err in EM case instr \n"
-.Mrang: .asciz "Variable out of range\n"
-.Mset:  .asciz "Err in EM set instr  \n"
-.Mnofp: .asciz "Floating pt not impl.\n"
-.Mheap: .asciz "Heap overflow        \n"
-
-.Mtrp:	.asciz "EM trap 0000000 octal\n"
Index: trunk/minix/lib/i86/em/em_unknown.s
===================================================================
--- trunk/minix/lib/i86/em/em_unknown.s	(revision 9)
+++ 	(revision )
@@ -1,9 +1,0 @@
-.define .unknown
-.text
-.extern .fat
-EILLINS = 18
-
-.unknown:
-	mov  ax,#EILLINS
-	push ax
-	jmp  .fat
Index: trunk/minix/lib/i86/em/em_vars.s
===================================================================
--- trunk/minix/lib/i86/em/em_vars.s	(revision 9)
+++ 	(revision )
@@ -1,12 +1,0 @@
-.define .reghp, .limhp, .ignmask, .trppc
-.extern .reghp, .limhp, .ignmask, .trppc
-
-.data
-.reghp:
-	.data2   endbss
-.limhp:
-	.data2   endbss
-.ignmask:
-	.data2   1336
-.trppc:
-	.data2   0
Index: trunk/minix/lib/i86/em/em_xor.s
===================================================================
--- trunk/minix/lib/i86/em/em_xor.s	(revision 9)
+++ 	(revision )
@@ -1,17 +1,0 @@
-.define	.xor
-.text
-
-	! #bytes in cx
-.xor:
-	pop	bx		! return address
-	mov	dx,di
-	mov	di,sp
-	add	di,cx
-	sar	cx,#1
-1:
-	pop	ax
-	xor	ax,(di)
-	stos
-	loop	1b
-	mov	di,dx
-	jmp	(bx)
Index: trunk/minix/lib/i86/int64/add64.s
===================================================================
--- trunk/minix/lib/i86/int64/add64.s	(revision 9)
+++ 	(revision )
@@ -1,24 +1,0 @@
-!	add64() - 64 bit addition			Author: Kees J. Bot
-!								24 Dec 1995
-.sect .text
-.define _add64
-
-_add64:				! u64_t add64(u64_t i, u64_t j);
-	push	bp
-	mov	bp, sp
-	mov	bx, 4(bp)
-	mov	ax, 6(bp)
-	add	ax, 14(bp)
-	mov	(bx), ax
-	mov	ax, 8(bp)
-	adc	ax, 16(bp)
-	mov	2(bx), ax
-	mov	ax, 10(bp)
-	adc	ax, 18(bp)
-	mov	4(bx), ax
-	mov	ax, 12(bp)
-	adc	ax, 20(bp)
-	mov	6(bx), ax
-	mov	ax, bx
-	pop	bp
-	ret
Index: trunk/minix/lib/i86/int64/add64u.s
===================================================================
--- trunk/minix/lib/i86/int64/add64u.s	(revision 9)
+++ 	(revision )
@@ -1,30 +1,0 @@
-!	add64u() - unsigned to 64 bit addition		Author: Kees J. Bot
-!								24 Dec 1995
-.sect .text
-.define _add64u, _add64ul
-
-_add64u:			! u64_t add64u(u64_t i, unsigned j);
-	push	bp
-	mov	bp, sp
-	xor	cx, cx
-	jmp	0f
-_add64ul:			! u64_t add64ul(u64_t i, unsigned long j);
-	push	bp
-	mov	bp, sp
-	mov	cx, 16(bp)
-0:	mov	bx, 4(bp)
-	mov	ax, 6(bp)
-	add	ax, 14(bp)
-	mov	(bx), ax
-	mov	ax, 8(bp)
-	adc	ax, cx
-	mov	2(bx), ax
-	mov	ax, 10(bp)
-	adc	ax, #0
-	mov	4(bx), ax
-	mov	ax, 12(bp)
-	adc	ax, #0
-	mov	6(bx), ax
-	mov	ax, bx
-	pop	bp
-	ret
Index: trunk/minix/lib/i86/int64/cmp64.s
===================================================================
--- trunk/minix/lib/i86/int64/cmp64.s	(revision 9)
+++ 	(revision )
@@ -1,52 +1,0 @@
-!	cmp64*() - 64 bit compare			Author: Kees J. Bot
-!								24 Dec 1995
-.sect .text
-.define _cmp64, _cmp64u, _cmp64ul
-
-_cmp64:				! int cmp64(u64_t i, u64_t j);
-	mov	bx, sp
-cmp64:	xor	ax, ax
-	mov	dx, 2(bx)
-	sub	dx, 10(bx)
-	mov	dx, 4(bx)
-	sbb	dx, 12(bx)
-	mov	dx, 6(bx)
-	sbb	dx, 14(bx)
-	mov	dx, 8(bx)
-	sbb	dx, 16(bx)
-	sbb	ax, ax			! ax = - (i < j)
-	mov	dx, 10(bx)
-	sub	dx, 2(bx)
-	mov	dx, 12(bx)
-	sbb	dx, 4(bx)
-	mov	dx, 14(bx)
-	sbb	dx, 6(bx)
-	mov	dx, 16(bx)
-	sbb	dx, 8(bx)
-	adc	ax, #0			! ax = (i > j) - (i < j)
-	ret
-
-_cmp64u:			! int cmp64u(u64_t i, unsigned j);
-	mov	bx, sp
-	push	16(bx)
-	mov	16(bx), #0
-	push	14(bx)
-	mov	14(bx), #0
-	push	12(bx)
-	mov	12(bx), #0
-	call	cmp64
-	pop	12(bx)
-	pop	14(bx)
-	pop	16(bx)
-	ret
-
-_cmp64ul:			! int cmp64ul(u64_t i, unsigned long j);
-	mov	bx, sp
-	push	14(bx)
-	mov	14(bx), #0
-	push	12(bx)
-	mov	12(bx), #0
-	call	cmp64
-	pop	12(bx)
-	pop	14(bx)
-	ret
Index: trunk/minix/lib/i86/int64/cv64u.s
===================================================================
--- trunk/minix/lib/i86/int64/cv64u.s	(revision 9)
+++ 	(revision )
@@ -1,21 +1,0 @@
-!	cv64u() - 64 bit converted to unsigned		Author: Kees J. Bot
-!								24 Dec 1995
-.sect .text
-.define _cv64u, _cv64ul
-
-_cv64u:				! unsigned cv64u(u64_t i);
-	mov	bx, sp
-	mov	cx, 4(bx)
-	jmp	0f
-
-_cv64ul:			! unsigned long cv64ul(u64_t i);
-	mov	bx, sp
-	xor	cx, cx
-0:	mov	ax, 2(bx)
-	mov	dx, 4(bx)
-	or	cx, 6(bx)
-	or	cx, 8(bx)		! return UINT/ULONG_MAX if really big
-	jz	0f
-	mov	ax, #-1
-	mov	dx, ax
-0:	ret
Index: trunk/minix/lib/i86/int64/cvu64.s
===================================================================
--- trunk/minix/lib/i86/int64/cvu64.s	(revision 9)
+++ 	(revision )
@@ -1,21 +1,0 @@
-!	cvu64() - unsigned converted to 64 bit		Author: Kees J. Bot
-!								24 Dec 1995
-.sect .text
-.define _cvu64, _cvul64
-
-_cvu64:				! u64_t cvu64(unsigned i);
-	mov	bx, sp
-	xor	dx, dx
-	jmp	0f
-
-_cvul64:			! u64_t cvul64(unsigned long i);
-	mov	bx, sp
-	mov	dx, 6(bx)
-0:	mov	ax, 4(bx)
-	mov	bx, 2(bx)
-	mov	(bx), ax
-	mov	2(bx), dx
-	mov	4(bx), #0
-	mov	6(bx), #0
-	mov	ax, bx
-	ret
Index: trunk/minix/lib/i86/int64/diff64.s
===================================================================
--- trunk/minix/lib/i86/int64/diff64.s	(revision 9)
+++ 	(revision )
@@ -1,10 +1,0 @@
-!	diff64() - 64 bit subtraction giving unsigned 	Author: Kees J. Bot
-!								24 Dec 1995
-.sect .text
-.define _diff64
-
-_diff64:			! unsigned diff64(u64_t i, u64_t j);
-	mov	bx, sp
-	mov	ax, 2(bx)
-	sub	ax, 10(bx)
-	ret
Index: trunk/minix/lib/i86/int64/div64u.s
===================================================================
--- trunk/minix/lib/i86/int64/div64u.s	(revision 9)
+++ 	(revision )
@@ -1,26 +1,0 @@
-!	div64u() - 64 bit divided by unsigned giving unsigned long
-!							Author: Kees J. Bot
-!								24 Dec 1995
-.sect .text
-.define _div64u, _rem64u
-
-_div64u:			! unsigned long div64u(u64_t i, unsigned j);
-	mov	bx, sp
-div64u:	xor	dx, dx
-	mov	ax, 8(bx)
-	div	10(bx)
-	mov	ax, 6(bx)
-	div	10(bx)
-	mov	ax, 4(bx)
-	div	10(bx)			! division bits 16-31
-	mov	cx, ax
-	mov	ax, 2(bx)
-	div	10(bx)			! division bits 0-15
-	xchg	dx, cx			! division in dx:ax, remainder in cx
-	ret
-
-_rem64u:			! unsigned rem64u(u64_t i, unsigned j);
-	mov	bx, sp
-	call	div64u
-	mov	ax, cx
-	ret
Index: trunk/minix/lib/i86/int64/ex64.s
===================================================================
--- trunk/minix/lib/i86/int64/ex64.s	(revision 9)
+++ 	(revision )
@@ -1,17 +1,0 @@
-!	ex64*() - extract low or high 32 bits of a 64 bit number
-!							Author: Kees J. Bot
-!								24 Dec 1995
-.sect .text
-.define _ex64lo, _ex64hi
-
-_ex64lo:			! unsigned long ex64lo(u64_t i);
-	mov	bx, sp
-	mov	ax, 2(bx)
-	mov	dx, 4(bx)
-	ret
-
-_ex64hi:			! unsigned long ex64hi(u64_t i);
-	mov	bx, sp
-	mov	ax, 6(bx)
-	mov	dx, 8(bx)
-	ret
Index: trunk/minix/lib/i86/int64/make64.s
===================================================================
--- trunk/minix/lib/i86/int64/make64.s	(revision 9)
+++ 	(revision )
@@ -1,19 +1,0 @@
-!	make64() - make a 64 bit number from two 32 bit halves
-!							Author: Kees J. Bot
-!								24 Dec 1995
-.sect .text
-.define _make64
-
-_make64:		    ! u64_t make64(unsigned long lo, unsigned long hi);
-	mov	bx, sp
-	mov	ax, 4(bx)
-	mov	dx, 6(bx)
-	mov	cx, 8(bx)
-	push	10(bx)
-	mov	bx, 2(bx)
-	mov	(bx), ax
-	mov	2(bx), dx
-	mov	4(bx), cx
-	pop	6(bx)
-	mov	ax, bx
-	ret
Index: trunk/minix/lib/i86/int64/mul64u.s
===================================================================
--- trunk/minix/lib/i86/int64/mul64u.s	(revision 9)
+++ 	(revision )
@@ -1,23 +1,0 @@
-!	mul64u() - unsigned long by unsigned multiply giving 64 bit result
-!							Author: Kees J. Bot
-!								24 Dec 1995
-.sect .text
-.define _mul64u
-
-_mul64u:			! u64_t mul64u(unsigned long i, unsigned j);
-	push	bp
-	mov	bp, sp
-	mov	bx, 4(bp)
-	mov	ax, 6(bp)
-	mul	10(bp)
-	mov	(bx), ax
-	mov	2(bx), dx
-	mov	ax, 8(bp)
-	mul	10(bp)
-	add	2(bx), ax
-	adc	dx, #0
-	mov	4(bx), dx
-	mov	6(bx), #0
-	mov	ax, bx
-	pop	bp
-	ret
Index: trunk/minix/lib/i86/int64/sub64.s
===================================================================
--- trunk/minix/lib/i86/int64/sub64.s	(revision 9)
+++ 	(revision )
@@ -1,24 +1,0 @@
-!	sub64() - 64 bit subtraction			Author: Kees J. Bot
-!								24 Dec 1995
-.sect .text
-.define _sub64
-
-_sub64:				! u64_t sub64(u64_t i, u64_t j);
-	push	bp
-	mov	bp, sp
-	mov	bx, 4(bp)
-	mov	ax, 6(bp)
-	sub	ax, 14(bp)
-	mov	(bx), ax
-	mov	ax, 8(bp)
-	sbb	ax, 16(bp)
-	mov	2(bx), ax
-	mov	ax, 10(bp)
-	sbb	ax, 18(bp)
-	mov	4(bx), ax
-	mov	ax, 12(bp)
-	sbb	ax, 20(bp)
-	mov	6(bx), ax
-	mov	ax, bx
-	pop	bp
-	ret
Index: trunk/minix/lib/i86/int64/sub64u.s
===================================================================
--- trunk/minix/lib/i86/int64/sub64u.s	(revision 9)
+++ 	(revision )
@@ -1,30 +1,0 @@
-!	sub64u() - unsigned from 64 bit subtraction	Author: Kees J. Bot
-!								24 Dec 1995
-.sect .text
-.define _sub64u, _sub64ul
-
-_sub64u:			! u64_t sub64u(u64_t i, unsigned j);
-	push	bp
-	mov	bp, sp
-	xor	cx, cx
-	jmp	0f
-_sub64ul:			! u64_t sub64ul(u64_t i, unsigned long j);
-	push	bp
-	mov	bp, sp
-	mov	cx, 16(bp)
-0:	mov	bx, 4(bp)
-	mov	ax, 6(bp)
-	sub	ax, 14(bp)
-	mov	(bx), ax
-	mov	ax, 8(bp)
-	sbb	ax, cx
-	mov	2(bx), ax
-	mov	ax, 10(bp)
-	sbb	ax, #0
-	mov	4(bx), ax
-	mov	ax, 12(bp)
-	sbb	ax, #0
-	mov	6(bx), ax
-	mov	ax, bx
-	pop	bp
-	ret
Index: trunk/minix/lib/i86/misc/alloca.s
===================================================================
--- trunk/minix/lib/i86/misc/alloca.s	(revision 9)
+++ 	(revision )
@@ -1,23 +1,0 @@
-#
-!	alloca() - allocate space on the stack		Author: Kees J. Bot
-!								26 Jan 1994
-
-#if __ACK__	/* BCC can't do alloca(), register saving is wrong. */
-
-.text
-.define _alloca
-_alloca:
-	pop	cx		! Return address
-	pop	ax		! Bytes to allocate
-	add	ax, #2*2+1	! Add space for two saved register variables
-	andb	al, #0xFE	! Align
-	mov	bx, sp		! Keep current sp
-	sub	sp, ax		! Lower stack
-	mov	ax, sp		! Return value
-	push	2(bx)		! Push what is probably the saved si
-	push	(bx)		! Saved di
-				! Now ACK can still do:
-				!	pop di; pop si; mov sp, bp; pop bp; ret
-	push	ax		! Dummy argument
-	jmp	(cx)
-#endif
Index: trunk/minix/lib/i86/misc/get_bp.s
===================================================================
--- trunk/minix/lib/i86/misc/get_bp.s	(revision 9)
+++ 	(revision )
@@ -1,15 +1,0 @@
-! get_bp.s
-!
-! return BP in AX
-!
-! Created:	Sep 7, 1992 by Philip Homburg
-
-.sect .text; .sect .rom; .sect .data; .sect .bss
-
-.sect .text
-.define _get_bp
-_get_bp:
-	mov	ax, bp
-	ret
-
-! $PchId: get_bp.ack.s,v 1.3 1996/02/23 08:27:48 philip Exp $
Index: trunk/minix/lib/i86/misc/getprocessor.s
===================================================================
--- trunk/minix/lib/i86/misc/getprocessor.s	(revision 9)
+++ 	(revision )
@@ -1,92 +1,0 @@
-!	getprocessor() - determine processor type	Author: Kees J. Bot
-!								26 Jan 1994
-
-.text
-
-	o32 = 0x66		! 32 bit operand size prefix
-
-! int getprocessor(void);
-!	Return 86, 186, 286, 386, 486, 586, ...
-
-.define	_getprocessor
-
-_getprocessor:
-	push	bp
-	mov	bp, sp
-	push	sp		! see if pushed sp == sp
-	pop	ax
-	cmp	ax, sp
-	jz	new_processor
-	mov	cx, #0x0120	! see if shifts are mod 32
-	shlb	ch, cl		! zero tells if 86
-	mov	ax, #86
-	jz	got_processor
-	mov	ax, #186
-	jmp	got_processor
-
-new_processor:			! see if high bits are set in saved IDT
-	sub	sp, #6		! space for IDT ptr
-	sidt	-6(bp)		! save 3 word IDT ptr
-	cmpb	-1(bp), #0xFF	! top byte of IDT ptr is always FF on 286
-	mov	ax, #286
-	je	got_processor
-
-! 386, 486, 586
-	and	sp, #0xFFFC	! Align stack to avoid AC fault (needed?)
-	mov	cx, #0x0004	! Try to flip the AC bit introduced on the 486
-	call	flip
-	mov	ax, #386	! 386 if it didn't react to "flipping"
-	jz	got_processor
-	mov	cx, #0x0020	! Try to flip the ID bit introduced on the 586
-	call	flip
-	mov	ax, #486	! 486 if it didn't react
-	jz	got_processor
-	.data1	o32
-	pushf
-	.data1	o32
-	pusha			! Save the world
-	.data1	o32
-	xor	ax, ax
-	inc	ax		! eax = 1
-	.data1	0x0F, 0xA2	! CPUID instruction tells the processor type
-	andb	ah, #0x0F	! Extract the family (5, 6, ...)
-	movb	al, ah
-	movb	ah, #100
-	mulb	ah		! 500, 600, ...
-	add	ax, #86		! 586, 686, ...
-	mov	bx, sp
-	mov	7*4(bx), ax	! Pass ax through
-	.data1	o32
-	popa
-	.data1	o32
-	popf
-
-got_processor:
-	mov	sp, bp
-	pop	bp
-	ret
-
-flip:
-	push	bx		! Save bx and realign stack to multiple of 4
-	.data1	o32		! About to operate on a 32 bit object
-	pushf			! Push eflags
-	pop	ax
-	pop	dx		! dx:ax = eflags
-	mov	bx, dx		! Save original eflags (high word only)
-	xor	dx, cx		! Flip the bit to test
-	push	dx
-	push	ax		! Push modified eflags value
-	.data1	o32
-	popf			! Load modified eflags register
-	.data1	o32
-	pushf
-	pop	ax
-	pop	dx		! Get it again
-	push	bx
-	push	ax
-	.data1	o32
-	popf			! Restore original eflags register
-	xor	dx, bx		! See if the bit changed
-	test	dx, cx
-	pop	bx		! Restore bx
-	ret
Index: trunk/minix/lib/i86/misc/hton86.s
===================================================================
--- trunk/minix/lib/i86/misc/hton86.s	(revision 9)
+++ 	(revision )
@@ -1,25 +1,0 @@
-!	htonX(), ntohX() - Host to network byte order conversion
-!							Author: Kees J. Bot
-!								7 Jan 1997
-!
-! This is a little endian 8086, so we swap bytes to/from the big endian network
-! order.  The normal <net/hton.h> macros are not used, they give lousy code.
-
-.text
-.define _htons, _ntohs
-_htons:
-_ntohs:
-	mov	bx, sp
-	movb	ah, 2(bx)	! Load bytes into ax in reverse order
-	movb	al, 3(bx)
-	ret
-
-.define _htonl, _ntohl
-_htonl:
-_ntohl:
-	mov	bx, sp
-	movb	dh, 2(bx)	! Load bytes into dx:ax in reverse order
-	movb	dl, 3(bx)
-	movb	ah, 4(bx)
-	movb	al, 5(bx)
-	ret
Index: trunk/minix/lib/i86/misc/io_inb.s
===================================================================
--- trunk/minix/lib/i86/misc/io_inb.s	(revision 9)
+++ 	(revision )
@@ -1,14 +1,0 @@
-!	inb() - Input one byte				Author: Kees J. Bot
-!								18 Mar 1996
-!	unsigned inb(U16_t port);
-
-.sect .text
-.define _inb
-_inb:
-	push	bp
-	mov	bp, sp
-	mov	dx, 4(bp)		! port
-	inb	dx			! read 1 byte
-	xorb	ah, ah
-	pop	bp
-	ret
Index: trunk/minix/lib/i86/misc/io_inl.s
===================================================================
--- trunk/minix/lib/i86/misc/io_inl.s	(revision 9)
+++ 	(revision )
@@ -1,23 +1,0 @@
-!	inl() - Input one dword				Author: Kees J. Bot
-!								18 Mar 1996
-!	unsigned inl(U16_t port);
-
-	o32 = 0x66
-
-.sect .text
-.define _inl
-_inl:
-	push	bp
-	mov	bp, sp
-	pushf
-	cli				! eax is not interrupt safe
-	mov	dx, 4(bp)		! port
-	.data1	o32
-	in	dx			! read 1 dword
-	.data1	o32
-	push	ax			! push eax
-	pop	ax
-	pop	dx			! dx:ax = eax
-	popf
-	pop	bp
-	ret
Index: trunk/minix/lib/i86/misc/io_insb.s
===================================================================
--- trunk/minix/lib/i86/misc/io_insb.s	(revision 9)
+++ 	(revision )
@@ -1,21 +1,0 @@
-!	insb() - Input a byte array			Author: Kees J. Bot
-!								18 Mar 1996
-!	void insb(U16_t port, void *buf, size_t count);
-
-.sect .text
-.define _insb
-_insb:
-	push	bp
-	mov	bp, sp
-	cld
-	push	di
-	mov	dx, 4(bp)		! port
-	mov	di, 6(bp)		! buf
-	mov	cx, 8(bp)		! byte count
-	jcxz	1f
-0:	inb	dx			! input 1 byte
-	stosb				! write 1 byte
-	loop	0b			! many times
-1:	pop	di
-	pop	bp
-	ret
Index: trunk/minix/lib/i86/misc/io_insl.s
===================================================================
--- trunk/minix/lib/i86/misc/io_insl.s	(revision 9)
+++ 	(revision )
@@ -1,22 +1,0 @@
-!	insl() - Input a dword array			Author: Kees J. Bot
-!								18 Mar 1996
-!	void insl(U16_t port, void *buf, size_t count);
-
-	o32 = 0x66
-
-.sect .text
-.define _insl
-_insl:
-	push	bp
-	mov	bp, sp
-	cld
-	push	di
-	mov	dx, 4(bp)		! port
-	mov	di, 6(bp)		! buf
-	mov	cx, 8(bp)		! byte count
-	shr	cx, #2			! dword count
-	.data1	o32
-   rep	ins				! input many dwords
-	pop	di
-	pop	bp
-	ret
Index: trunk/minix/lib/i86/misc/io_insw.s
===================================================================
--- trunk/minix/lib/i86/misc/io_insw.s	(revision 9)
+++ 	(revision )
@@ -1,19 +1,0 @@
-!	insw() - Input a word array			Author: Kees J. Bot
-!								18 Mar 1996
-!	void insw(U16_t port, void *buf, size_t count);
-
-.sect .text
-.define _insw
-_insw:
-	push	bp
-	mov	bp, sp
-	cld
-	push	di
-	mov	dx, 4(bp)		! port
-	mov	di, 6(bp)		! buf
-	mov	cx, 8(bp)		! byte count
-	shr	cx, #1			! word count
-   rep	ins				! input many words
-	pop	di
-	pop	bp
-	ret
Index: trunk/minix/lib/i86/misc/io_intr.s
===================================================================
--- trunk/minix/lib/i86/misc/io_intr.s	(revision 9)
+++ 	(revision )
@@ -1,16 +1,0 @@
-!	intr_disable(), intr_enable - Disable/Enable hardware interrupts.
-!							Author: Kees J. Bot
-!								18 Mar 1996
-!	void intr_disable(void);
-!	void intr_enable(void);
-
-.sect .text
-.define _intr_disable
-_intr_disable:
-	cli
-	ret
-
-.define _intr_enable
-_intr_enable:
-	sti
-	ret
Index: trunk/minix/lib/i86/misc/io_inw.s
===================================================================
--- trunk/minix/lib/i86/misc/io_inw.s	(revision 9)
+++ 	(revision )
@@ -1,13 +1,0 @@
-!	inw() - Input one word				Author: Kees J. Bot
-!								18 Mar 1996
-!	unsigned inw(U16_t port);
-
-.sect .text
-.define _inw
-_inw:
-	push	bp
-	mov	bp, sp
-	mov	dx, 4(bp)		! port
-	in	dx			! read 1 word
-	pop	bp
-	ret
Index: trunk/minix/lib/i86/misc/io_outb.s
===================================================================
--- trunk/minix/lib/i86/misc/io_outb.s	(revision 9)
+++ 	(revision )
@@ -1,14 +1,0 @@
-!	outb() - Output one byte			Author: Kees J. Bot
-!								18 Mar 1996
-!	void outb(U16_t port, U8_t value);
-
-.sect .text
-.define _outb
-_outb:
-	push	bp
-	mov	bp, sp
-	mov	dx, 4(bp)		! port
-	mov	ax, 4+2(bp)		! value
-	outb	dx			! output 1 byte
-	pop	bp
-	ret
Index: trunk/minix/lib/i86/misc/io_outl.s
===================================================================
--- trunk/minix/lib/i86/misc/io_outl.s	(revision 9)
+++ 	(revision )
@@ -1,21 +1,0 @@
-!	outl() - Output one dword			Author: Kees J. Bot
-!								18 Mar 1996
-!	void outl(U16_t port, u32_t value);
-
-	o32 = 0x66
-
-.sect .text
-.define _outl
-_outl:
-	push	bp
-	mov	bp, sp
-	pushf
-	cli				! eax is not interrupt safe
-	mov	dx, 4(bp)		! port
-	.data1	o32
-	mov	ax, 4+2(bp)		! value
-	.data1	o32
-	out	dx			! output 1 dword
-	popf
-	pop	bp
-	ret
Index: trunk/minix/lib/i86/misc/io_outsb.s
===================================================================
--- trunk/minix/lib/i86/misc/io_outsb.s	(revision 9)
+++ 	(revision )
@@ -1,21 +1,0 @@
-!	outsb() - Output a byte array		Author: Kees J. Bot
-!								18 Mar 1996
-!	void outsb(U16_t port, void *buf, size_t count);
-
-.sect .text
-.define _outsb
-_outsb:
-	push	bp
-	mov	bp, sp
-	cld
-	push	si
-	mov	dx, 4(bp)		! port
-	mov	si, 6(bp)		! buf
-	mov	cx, 8(bp)		! byte count
-	jcxz	1f
-0:	lodsb				! read 1 byte
-	outb	dx			! output 1 byte
-	loop	0b			! many times
-1:	pop	si
-	pop	bp
-	ret
Index: trunk/minix/lib/i86/misc/io_outsl.s
===================================================================
--- trunk/minix/lib/i86/misc/io_outsl.s	(revision 9)
+++ 	(revision )
@@ -1,22 +1,0 @@
-!	outsl() - Output a dword array		Author: Kees J. Bot
-!								18 Mar 1996
-!	void outsl(U16_t port, void *buf, size_t count);
-
-	o32 = 0x66
-
-.sect .text
-.define _outsl
-_outsl:
-	push	bp
-	mov	bp, sp
-	cld
-	push	si
-	mov	dx, 4(bp)		! port
-	mov	si, 6(bp)		! buf
-	mov	cx, 8(bp)		! byte count
-	shr	cx, #2			! dword count
-	.data1	o32
-   rep	outs				! output many dwords
-	pop	si
-	pop	bp
-	ret
Index: trunk/minix/lib/i86/misc/io_outsw.s
===================================================================
--- trunk/minix/lib/i86/misc/io_outsw.s	(revision 9)
+++ 	(revision )
@@ -1,19 +1,0 @@
-!	outsw() - Output a word array		Author: Kees J. Bot
-!								18 Mar 1996
-!	void outsw(U16_t port, void *buf, size_t count);
-
-.sect .text
-.define _outsw
-_outsw:
-	push	bp
-	mov	bp, sp
-	cld
-	push	si
-	mov	dx, 4(bp)		! port
-	mov	si, 6(bp)		! buf
-	mov	cx, 8(bp)		! byte count
-	shr	cx, #1			! word count
-   rep	outs				! output many words
-	pop	si
-	pop	bp
-	ret
Index: trunk/minix/lib/i86/misc/io_outw.s
===================================================================
--- trunk/minix/lib/i86/misc/io_outw.s	(revision 9)
+++ 	(revision )
@@ -1,14 +1,0 @@
-!	outw() - Output one word			Author: Kees J. Bot
-!								18 Mar 1996
-!	void outw(U16_t port, U16_t value);
-
-.sect .text
-.define _outw
-_outw:
-	push	bp
-	mov	bp, sp
-	mov	dx, 4(bp)		! port
-	mov	ax, 4+2(bp)		! value
-	out	dx			! output 1 word
-	pop	bp
-	ret
Index: trunk/minix/lib/i86/misc/oneC_sum.s
===================================================================
--- trunk/minix/lib/i86/misc/oneC_sum.s	(revision 9)
+++ 	(revision )
@@ -1,68 +1,0 @@
-!	oneC_sum() - One complement`s checksum		Author: Kees J. Bot
-!								23 May 1998
-! See RFC 1071, "Computing the Internet checksum"
-! See also the C version of this code.
-
-.text
-
-.define _oneC_sum
-	.align	4
-_oneC_sum:
-	push	bp
-	mov	bp, sp
-	push	si
-	push	di
-	mov	ax, 4(bp)		! Checksum of previous block
-	mov	si, 6(bp)		! Data to compute checksum over
-	mov	di, 8(bp)		! Number of bytes
-
-	xor	dx, dx
-	xorb	cl, cl
-align:	test	si, #1			! Is the data aligned?
-	jz	aligned
-	test	di, di
-	jz	0f
-	movb	dh, (si)		! First unaligned byte in high half of
-	dec	di			! the dx register, i.e. rotate 8 bits
-0:	inc	si
-	movb	cl, #8			! Number of bits "rotated"
-	ror	ax, cl			! Rotate the checksum likewise
-aligned:add	ax, dx			! Summate the unaligned byte
-	adc	ax, #0			! Add carry back in for one`s complement
-
-	jmp	add6test
-	.align	4
-add6:	add	ax, (si)		! Six times unrolled loop, see below
-	adc	ax, 2(si)
-	adc	ax, 4(si)
-	adc	ax, 6(si)
-	adc	ax, 8(si)
-	adc	ax, 10(si)
-	adc	ax, #0
-	add	si, #12
-add6test:
-	sub	di, #12
-	jae	add6
-	add	di, #12
-
-	jmp	add1test
-	.align	4
-add1:	add	ax, (si)		! while ((di -= 2) >= 0)
-	adc	ax, #0			!	ax += *si++;
-	add	si, #2			! di += 2;
-add1test:
-	sub	di, #2
-	jae	add1
-	add	di, #2
-
-	jz	done			! Is there an extra byte?
-	movb	dl, (si)		! Load extra byte in word
-	xorb	dh, dh
-	add	ax, dx			! Add in the last bits
-	adc	ax, #0
-done:
-	rol	ax, cl			! Undo the rotation at the beginning
-	pop	di
-	pop	si
-	pop	bp
-	ret
Index: trunk/minix/lib/i86/rts/__sigreturn.s
===================================================================
--- trunk/minix/lib/i86/rts/__sigreturn.s	(revision 9)
+++ 	(revision )
@@ -1,10 +1,0 @@
-! This routine is the low-level code for returning from signals.  
-! It calls __sigreturn, which is the normal "system call" routine.
-! Both ___sigreturn and __sigreturn are needed.
-.sect .text; .sect .rom; .sect .data; .sect .bss
-.sect .text
-.define ___sigreturn
-.extern __sigreturn
-___sigreturn:
-	add sp, #8
-	jmp __sigreturn
Index: trunk/minix/lib/i86/rts/_sendrec.s
===================================================================
--- trunk/minix/lib/i86/rts/_sendrec.s	(revision 9)
+++ 	(revision )
@@ -1,32 +1,0 @@
-.define __send, __receive, __sendrec
-
-! See ../h/com.h for C definitions
-SEND = 1
-RECEIVE = 2
-BOTH = 3
-SYSVEC = 32
-
-!*========================================================================*
-!                           _send and _receive                            *
-!*========================================================================*
-! _send(), _receive(), _sendrec() all save bp, but destroy ax, bx, and cx.
-.extern __send, __receive, __sendrec
-__send:	mov cx,*SEND		! _send(dest, ptr)
-	jmp L0
-
-__receive:
-	mov cx,*RECEIVE		! _receive(src, ptr)
-	jmp L0
-
-__sendrec:
-	mov cx,*BOTH		! _sendrec(srcdest, ptr)
-	jmp L0
-
-  L0:	push bp			! save bp
-	mov bp,sp		! can't index off sp
-	mov ax,4(bp)		! ax = dest-src
-	mov bx,6(bp)		! bx = message pointer
-	int SYSVEC		! trap to the kernel
-	pop bp			! restore bp
-	ret			! return
-
Index: trunk/minix/lib/i86/rts/brksize.s
===================================================================
--- trunk/minix/lib/i86/rts/brksize.s	(revision 9)
+++ 	(revision )
@@ -1,4 +1,0 @@
-.define __brksize
-.data
-.extern endbss, __brksize
-__brksize: .data2 endbss
Index: trunk/minix/lib/i86/rts/ncrtso.s
===================================================================
--- trunk/minix/lib/i86/rts/ncrtso.s	(revision 9)
+++ 	(revision )
@@ -1,54 +1,0 @@
-! This is the C run-time start-off routine.  It's job is to take the
-! arguments as put on the stack by EXEC, and to parse them and set them up the
-! way _main expects them.
-! It also initializes _environ when this variable isn't defined by the
-! programmer.  The detection of whether _environ belong to us is rather
-! simplistic.  We simply check for some magic value, but there is no other
-! way.
-
-.extern _main, _exit, crtso, __penviron, __penvp
-.extern begtext, begdata, begbss, endtext, enddata, endbss
-.text
-begtext:
-crtso:
-	xor	bp, bp			! clear for backtrace of core files
-	mov	bx, sp
-	mov	ax, (bx)		! argc
-	lea	dx, 2(bx)		! argv
-	lea	cx, 4(bx)
-	add	cx, ax
-	add	cx, ax			! envp
-
-	! Test if environ is in the initialized data area and is set to our
-	! magic number.  If so then it is not redefined by the user.
-	mov	bx, #_environ
-	cmp	bx, #__edata		! within initialized data?
-	jae	0f
-	testb	bl, #1			! aligned?
-	jnz	0f
-	cmp	(bx), #0x5353		! is it our environ?
-	jne	0f
-	mov	__penviron, bx		! _penviron = &environ;
-0:	mov	bx, __penviron
-	mov	(bx), cx		! *_penviron = envp;
-
-	push	cx			! push envp
-	push	dx			! push argv
-	push	ax			! push argc
-
-	call	_main			! main(argc, argv, envp)
-
-	push	ax			! push exit status
-	call	_exit
-
-	hlt				! force a trap if exit fails
-
-.data
-begdata:
-	.data2	0			! for sep I&D: *NULL == 0
-__penviron:
-	.data2	__penvp			! Pointer to environ, or hidden pointer
-
-.bss
-begbss:
-	.comm	__penvp, 2		! Hidden environment vector
Index: trunk/minix/lib/i86/rts/nm2rtso.s
===================================================================
--- trunk/minix/lib/i86/rts/nm2rtso.s	(revision 9)
+++ 	(revision )
@@ -1,50 +1,0 @@
-! This is the Modula-2 run-time start-off routine.  It's job is to take the
-! arguments as put on the stack by EXEC, and to parse them and set them up the
-! way _m_a_i_n expects them.
-
-.extern __m_a_i_n, _exit, m2rtso, hol0, __penvp
-.extern begtext, begdata, begbss, endtext, enddata, endbss
-.text
-begtext:
-m2rtso:
-	xor	bp, bp			! clear for backtrace of core files
-	mov	bx, sp
-	mov	ax, (bx)		! argc
-	lea	dx, 2(bx)		! argv
-	lea	cx, 4(bx)
-	add	cx, ax
-	add	cx, ax			! envp
-
-	! Test if environ is in the initialized data area and is set to our
-	! magic number.  If so then it is not redefined by the user.
-	mov	bx, #_environ
-	cmp	bx, #__edata		! within initialized data?
-	jae	0f
-	testb	bl, #1			! aligned?
-	jnz	0f
-	cmp	(bx), #0x5353		! is it our environ?
-	jne	0f
-	mov	__penviron, bx		! _penviron = &environ;
-0:	mov	bx, __penviron
-	mov	(bx), cx		! *_penviron = envp;
-
-	push	cx			! push envp
-	push	dx			! push argv
-	push	ax			! push argc
-
-	call	__m_a_i_n		! run Modula-2 program
-
-	push	ax			! push exit status
-	call	__exit
-
-	hlt				! force a trap if exit fails
-
-.data
-begdata:
-	.data2	0			! for sep I&D: *NULL == 0
-__penviron:
-	.data2	__penvp			! Pointer to environ, or hidden pointer
-
-.bss
-begbss:
-	.comm	__penvp, 2		! Hidden environment vector
Index: trunk/minix/lib/i86/rts/nprtso.s
===================================================================
--- trunk/minix/lib/i86/rts/nprtso.s	(revision 9)
+++ 	(revision )
@@ -1,52 +1,0 @@
-! This is the Pascal run-time start-off routine.  It's job is to take the
-! arguments as put on the stack by EXEC, and to parse them and set them up the
-! way _m_a_i_n expects them.
-
-.extern __m_a_i_n, _exit, prtso, hol0, __penvp
-.extern begtext, begdata, begbss, endtext, enddata, endbss
-.text
-begtext:
-prtso:
-	xor	bp, bp			! clear for backtrace of core files
-	mov	bx, sp
-	mov	ax, (bx)		! argc
-	lea	dx, 2(bx)		! argv
-	lea	cx, 4(bx)
-	add	cx, ax
-	add	cx, ax			! envp
-
-	! Test if environ is in the initialized data area and is set to our
-	! magic number.  If so then it is not redefined by the user.
-	mov	bx, #_environ
-	cmp	bx, #__edata		! within initialized data?
-	jae	0f
-	testb	bl, #1			! aligned?
-	jnz	0f
-	cmp	(bx), #0x5353		! is it our environ?
-	jne	0f
-	mov	__penviron, bx		! _penviron = &environ;
-0:	mov	bx, __penviron
-	mov	(bx), cx		! *_penviron = envp;
-
-	push	cx			! push envp
-	push	dx			! push argv
-	push	ax			! push argc
-
-	mov	.ignmask, #56
-
-	call	__m_a_i_n		! run Pascal program
-
-	push	ax			! push exit status
-	call	__exit
-
-	hlt				! force a trap if exit fails
-
-.data
-begdata:
-	.data2	0			! for sep I&D: *NULL == 0
-__penviron:
-	.data2	__penvp			! Pointer to environ, or hidden pointer
-
-.bss
-begbss:
-	.comm	__penvp, 2		! Hidden environment vector
Index: trunk/minix/lib/i86/string/README
===================================================================
--- trunk/minix/lib/i86/string/README	(revision 9)
+++ 	(revision )
@@ -1,5 +1,0 @@
-Notes on i8086 string assembly routines.		Author: Kees J. Bot
-								27 Jan 1994
-
-These routines are simply translations of the 386 code, so all comments
-to that code apply here.
Index: trunk/minix/lib/i86/string/_memmove.s
===================================================================
--- trunk/minix/lib/i86/string/_memmove.s	(revision 9)
+++ 	(revision )
@@ -1,50 +1,0 @@
-!	_memmove()					Author: Kees J. Bot
-!								27 Jan 1994
-.sect .text; .sect .rom; .sect .data; .sect .bss
-
-! void *_memmove(void *s1, const void *s2, size_t n)
-!	Copy a chunk of memory.  Handle overlap.
-!
-.sect .text
-.define __memmove, __memcpy
-__memmove:
-	push	bp
-	mov	bp, sp
-	push	si
-	push	di
-	mov	di, 4(bp)	! String s1
-	mov	si, 6(bp)	! String s2
-	mov	cx, 8(bp)	! Length
-	mov	ax, di
-	sub	ax, si
-	cmp	ax, cx
-	jb	downwards	! if (s2 - s1) < n then copy downwards
-__memcpy:
-	cld			! Clear direction bit: upwards
-	cmp	cx, #16
-	jb	upbyte		! Don't bother being smart with short arrays
-	mov	ax, si
-	or	ax, di
-	testb	al, #1
-	jnz	upbyte		! Bit 0 set, use byte copy
-upword:	shr	cx, #1
-    rep	movs			! Copy words
-	adc	cx, cx		! One more byte?
-upbyte:
-    rep	movsb			! Copy bytes
-done:	mov	ax, 4(bp)	! Absolutely noone cares about this value
-	pop	di
-	pop	si
-	pop	bp
-	ret
-
-! Handle bad overlap by copying downwards, don't bother to do word copies.
-downwards:
-	std			! Set direction bit: downwards
-	add	si, cx
-	dec	si
-	add	di, cx
-	dec	di
-    rep	movsb			! Copy bytes
-	cld
-	jmp	done
Index: trunk/minix/lib/i86/string/_strncat.s
===================================================================
--- trunk/minix/lib/i86/string/_strncat.s	(revision 9)
+++ 	(revision )
@@ -1,37 +1,0 @@
-!	_strncat()					Author: Kees J. Bot
-!								27 Jan 1994
-.sect .text; .sect .rom; .sect .data; .sect .bss
-
-! char *_strncat(char *s1, const char *s2, size_t dx)
-!	Append string s2 to s1.
-!
-.sect .text
-.define __strncat
-__strncat:
-	push	bp
-	mov	bp, sp
-	push	si
-	push	di
-	mov	di, 4(bp)	! String s1
-	mov	cx, #-1
-	xorb	al, al		! Null byte
-	cld
-  repne	scasb			! Look for the zero byte in s1
-	dec	di		! Back one up (and clear 'Z' flag)
-	push	di		! Save end of s1
-	mov	di, 6(bp)	! di = string s2
-	mov	cx, dx		! Maximum count
-  repne	scasb			! Look for the end of s2
-	jne	no0
-	inc	cx		! Exclude null byte
-no0:	sub	dx, cx		! Number of bytes in s2
-	mov	cx, dx
-	mov	si, 6(bp)	! si = string s2
-	pop	di		! di = end of string s1
-    rep	movsb			! Copy bytes
-	stosb			! Add a terminating null
-	mov	ax, 4(bp)	! Return s1
-	pop	di
-	pop	si
-	pop	bp
-	ret
Index: trunk/minix/lib/i86/string/_strncmp.s
===================================================================
--- trunk/minix/lib/i86/string/_strncmp.s	(revision 9)
+++ 	(revision )
@@ -1,36 +1,0 @@
-!	strncmp()					Author: Kees J. Bot
-!								27 Jan 1994
-.sect .text; .sect .rom; .sect .data; .sect .bss
-
-! int strncmp(const char *s1, const char *s2, size_t cx)
-!	Compare two strings.
-!
-.sect .text
-.define __strncmp
-__strncmp:
-	push	bp
-	mov	bp, sp
-	push	si
-	push	di
-	xor	ax, ax		! Prepare return value
-	test	cx, cx		! Max length is zero?
-	je	equal
-	mov	si, 4(bp)	! si = string s1
-	mov	di, 6(bp)	! di = string s2
-	cld
-compare:
-	cmpsb			! Compare two bytes
-	jne	unequal
-	cmpb	-1(si), #0	! End of string?
-	je	equal
-	dec	cx		! Length limit reached?
-	jne	compare
-	jmp	equal
-unequal:
-	ja	after
-	sub	ax, #2		! if (s1 < s2) ax -= 2;
-after:	inc	ax		! ax++, now it's -1 or 1
-equal:	pop	di
-	pop	si
-	pop	bp
-	ret
Index: trunk/minix/lib/i86/string/_strncpy.s
===================================================================
--- trunk/minix/lib/i86/string/_strncpy.s	(revision 9)
+++ 	(revision )
@@ -1,21 +1,0 @@
-!	_strncpy()					Author: Kees J. Bot
-!								27 Jan 1994
-.sect .text; .sect .rom; .sect .data; .sect .bss
-
-! char *_strncpy(char *s1, const char *s2, size_t cx)
-!	Copy string s2 to s1.
-!
-.sect .text
-.define __strncpy
-__strncpy:
-	mov	di, 6(bp)	! di = string s2
-	xorb	al, al		! Look for a zero byte
-	mov	dx, cx		! Save maximum count
-	cld
-  repne	scasb			! Look for end of s2
-	sub	dx, cx		! Number of bytes in s2 including null
-	xchg	cx, dx
-	mov	si, 6(bp)	! si = string s2
-	mov	di, 4(bp)	! di = string s1
-    rep	movsb			! Copy bytes
-	ret
Index: trunk/minix/lib/i86/string/_strnlen.s
===================================================================
--- trunk/minix/lib/i86/string/_strnlen.s	(revision 9)
+++ 	(revision )
@@ -1,26 +1,0 @@
-!	_strnlen()					Author: Kees J. Bot
-!								27 Jan 1994
-.sect .text; .sect .rom; .sect .data; .sect .bss
-
-! size_t _strnlen(const char *s, size_t cx)
-!	Return the length of a string.
-!
-.sect .text
-.define __strnlen
-__strnlen:
-	push	bp
-	mov	bp, sp
-	push	di
-	mov	di, 4(bp)	! di = string
-	xorb	al, al		! Look for a zero byte
-	mov	dx, cx		! Save maximum count
-	cmpb	cl, #1		! 'Z' bit must be clear if cx = 0
-	cld
-  repne	scasb			! Look for zero
-	jne	no0
-	inc	cx		! Don't count zero byte
-no0:	mov	ax, dx
-	sub	ax, cx		! Compute bytes scanned
-	pop	di
-	pop	bp
-	ret
Index: trunk/minix/lib/i86/string/bcmp.s
===================================================================
--- trunk/minix/lib/i86/string/bcmp.s	(revision 9)
+++ 	(revision )
@@ -1,28 +1,0 @@
-!	bcmp()						Author: Kees J. Bot
-!								27 Jan 1994
-.sect .text; .sect .rom; .sect .data; .sect .bss
-
-! int bcmp(const void *s1, const void *s2, size_t n)
-!	Compare two chunks of memory.
-!	This is a BSD routine that escaped from the kernel.  Don't use.
-!	(Alas it is not without some use, it reports the number of bytes
-!	after the bytes that are equal.  So it can't be simply replaced.)
-!
-.sect .text
-.define _bcmp
-_bcmp:
-	push	bp
-	mov	bp, sp
-	push	8(bp)
-	push	6(bp)
-	push	4(bp)
-	call	_memcmp		! Let memcmp do the work
-	mov	sp, bp
-	test	ax, ax
-	jz	equal
-	sub	dx, 4(bp)	! Memcmp was nice enough to leave "si" in dx
-	dec	dx		! Number of bytes that are equal
-	mov	ax, 8(bp)
-	sub	ax, dx		! Number of bytes that are unequal
-equal:	pop	bp
-	ret
Index: trunk/minix/lib/i86/string/bcopy.s
===================================================================
--- trunk/minix/lib/i86/string/bcopy.s	(revision 9)
+++ 	(revision )
@@ -1,19 +1,0 @@
-!	bcopy()						Author: Kees J. Bot
-!								27 Jan 1994
-.sect .text; .sect .rom; .sect .data; .sect .bss
-
-! void bcopy(const void *s1, void *s2, size_t n)
-!	Copy a chunk of memory.  Handle overlap.
-!	This is a BSD routine that escaped from the kernel.  Don't use.
-!
-.sect .text
-.define _bcopy
-.extern __memmove
-_bcopy:
-	pop	cx
-	pop	ax
-	pop	dx		! Pop return address and arguments
-	push	ax
-	push	dx		! Arguments reversed
-	push	cx
-	jmp	__memmove	! Call the proper routine
Index: trunk/minix/lib/i86/string/bzero.s
===================================================================
--- trunk/minix/lib/i86/string/bzero.s	(revision 9)
+++ 	(revision )
@@ -1,21 +1,0 @@
-!	bzero()						Author: Kees J. Bot
-!								27 Jan 1994
-.sect .text; .sect .rom; .sect .data; .sect .bss
-
-! void bzero(void *s, size_t n)
-!	Set a chunk of memory to zero.
-!	This is a BSD routine that escaped from the kernel.  Don't use.
-!
-.sect .text
-.define _bzero
-_bzero:
-	push	bp
-	mov	bp, sp
-	push	6(bp)		! Size
-	xor	ax, ax
-	push	ax		! Zero
-	push	4(bp)		! String
-	call	_memset		! Call the proper routine
-	mov	sp, bp
-	pop	bp
-	ret
Index: trunk/minix/lib/i86/string/index.s
===================================================================
--- trunk/minix/lib/i86/string/index.s	(revision 9)
+++ 	(revision )
@@ -1,12 +1,0 @@
-!	index()						Author: Kees J. Bot
-!								27 Jan 1994
-.sect .text; .sect .rom; .sect .data; .sect .bss
-
-! char *index(const char *s, int c)
-!	Look for a character in a string.  Has suffered from a hostile
-!	takeover by strchr().
-!
-.sect .text
-.define _index
-_index:
-	jmp	_strchr
Index: trunk/minix/lib/i86/string/memchr.s
===================================================================
--- trunk/minix/lib/i86/string/memchr.s	(revision 9)
+++ 	(revision )
@@ -1,28 +1,0 @@
-!	memchr()					Author: Kees J. Bot
-!								27 Jan 1994
-.sect .text; .sect .rom; .sect .data; .sect .bss
-
-! void *memchr(const void *s, int c, size_t n)
-!	Look for a character in a chunk of memory.
-!
-.sect .text
-.define _memchr
-_memchr:
-	push	bp
-	mov	bp, sp
-	push	di
-	mov	di, 4(bp)	! di = string
-	movb	al, 6(bp)	! The character to look for
-	mov	cx, 8(bp)	! Length
-	cmpb	cl, #1		! 'Z' bit must be clear if cx = 0
-	cld
-  repne	scasb
-	jne	failure
-	lea	ax, -1(di)	! Found
-	pop	di
-	pop	bp
-	ret
-failure:xor	ax, ax
-	pop	di
-	pop	bp
-	ret
Index: trunk/minix/lib/i86/string/memcmp.s
===================================================================
--- trunk/minix/lib/i86/string/memcmp.s	(revision 9)
+++ 	(revision )
@@ -1,44 +1,0 @@
-!	memcmp()					Author: Kees J. Bot
-!								27 Jan 1994
-.sect .text; .sect .rom; .sect .data; .sect .bss
-
-! int memcmp(const void *s1, const void *s2, size_t n)
-!	Compare two chunks of memory.
-!
-.sect .text
-.define _memcmp
-_memcmp:
-	cld
-	push	bp
-	mov	bp, sp
-	push	si
-	push	di
-	xor	ax, ax		! Prepare return value
-	mov	si, 4(bp)	! String s1
-	mov	di, 6(bp)	! String s2
-	mov	cx, 8(bp)	! Length
-	cmp	cx, #16
-	jb	cbyte		! Don't bother being smart with short arrays
-	mov	dx, si
-	or	dx, di
-	andb	dl, #1
-	jnz	cbyte		! Bit 0 set, use byte compare
-cword:	sar	cx, #1
-	adcb	dl, dl		! Save carry
-   repe	cmps			! Compare words
-	mov	cx, #2		! Recompare the last word
-	sub	si, cx
-	sub	di, cx
-	addb	cl, dl		! One more byte?
-cbyte:	test	cx, cx		! Set 'Z' flag if cx = 0
-last:
-   repe	cmpsb			! Look for the first differing byte
-	je	equal
-	ja	after
-	sub	ax, #2		! if (s1 < s2) ax -= 2;
-after:	inc	ax		! ax++, now it's -1 or 1
-equal:	mov	dx, si		! For bcmp() to play with
-	pop	di
-	pop	si
-	pop	bp
-	ret
Index: trunk/minix/lib/i86/string/memcpy.s
===================================================================
--- trunk/minix/lib/i86/string/memcpy.s	(revision 9)
+++ 	(revision )
@@ -1,23 +1,0 @@
-!	memcpy()					Author: Kees J. Bot
-!								27 Jan 1994
-.sect .text; .sect .rom; .sect .data; .sect .bss
-
-! void *memcpy(void *s1, const void *s2, size_t n)
-!	Copy a chunk of memory.
-!	This routine need not handle overlap, so it does not handle overlap.
-!	One could simply call __memmove, the cost of the overlap check is
-!	negligible, but you are dealing with a programmer who believes that
-!	if anything can go wrong, it should go wrong.
-!
-.sect .text
-.define _memcpy
-_memcpy:
-	push	bp
-	mov	bp, sp
-	push	si
-	push	di
-	mov	di, 4(bp)	! String s1
-	mov	si, 6(bp)	! String s2
-	mov	cx, 8(bp)	! Length
-	! No overlap check here
-	jmp	__memcpy	! Call the part of __memmove that copies up
Index: trunk/minix/lib/i86/string/memmove.s
===================================================================
--- trunk/minix/lib/i86/string/memmove.s	(revision 9)
+++ 	(revision )
@@ -1,11 +1,0 @@
-!	memmove()					Author: Kees J. Bot
-!								27 Jan 1994
-.sect .text; .sect .rom; .sect .data; .sect .bss
-
-! void *memmove(void *s1, const void *s2, size_t n)
-!	Copy a chunk of memory.  Handle overlap.
-!
-.sect .text
-.define _memmove
-_memmove:
-	jmp	__memmove	! Call common code
Index: trunk/minix/lib/i86/string/memset.s
===================================================================
--- trunk/minix/lib/i86/string/memset.s	(revision 9)
+++ 	(revision )
@@ -1,31 +1,0 @@
-!	memset()					Author: Kees J. Bot
-!								27 Jan 1994
-.sect .text; .sect .rom; .sect .data; .sect .bss
-
-! void *memset(void *s, int c, size_t n)
-!	Set a chunk of memory to the same byte value.
-!
-.sect .text
-.define _memset
-_memset:
-	push	bp
-	mov	bp, sp
-	push	di
-	mov	di, 4(bp)	! The string
-	movb	al, 6(bp)	! The fill byte
-	mov	cx, 8(bp)	! Length
-	cld
-	cmp	cx, #16
-	jb	sbyte		! Don't bother being smart with short arrays
-	test	di, #1
-	jnz	sbyte		! Bit 0 set, use byte store
-sword:	movb	ah, al		! One byte to two bytes
-	sar	cx, #1
-    rep	stos			! Store words
-    	adc	cx, cx		! One more byte?
-sbyte:
-    rep	stosb			! Store bytes
-done:	mov	ax, 4(bp)	! Return some value you have no need for
-	pop	di
-	pop	bp
-	ret
Index: trunk/minix/lib/i86/string/rindex.s
===================================================================
--- trunk/minix/lib/i86/string/rindex.s	(revision 9)
+++ 	(revision )
@@ -1,12 +1,0 @@
-!	rindex()					Author: Kees J. Bot
-!								27 Jan 1994
-.sect .text; .sect .rom; .sect .data; .sect .bss
-
-! char *rindex(const char *s, int c)
-!	Look for the last occurrence a character in a string.  Has suffered
-!	from a hostile takeover by strrchr().
-!
-.sect .text
-.define _rindex
-_rindex:
-	jmp	_strrchr
Index: trunk/minix/lib/i86/string/strcat.s
===================================================================
--- trunk/minix/lib/i86/string/strcat.s	(revision 9)
+++ 	(revision )
@@ -1,12 +1,0 @@
-!	strcat()					Author: Kees J. Bot
-!								27 Jan 1994
-.sect .text; .sect .rom; .sect .data; .sect .bss
-
-! char *strcat(char *s1, const char *s2)
-!	Append string s2 to s1.
-!
-.sect .text
-.define _strcat
-_strcat:
-	mov	dx, #-1		! Unlimited length
-	jmp	__strncat	! Common code
Index: trunk/minix/lib/i86/string/strchr.s
===================================================================
--- trunk/minix/lib/i86/string/strchr.s	(revision 9)
+++ 	(revision )
@@ -1,38 +1,0 @@
-!	strchr()					Author: Kees J. Bot
-!								27 Jan 1994
-.sect .text; .sect .rom; .sect .data; .sect .bss
-
-! char *strchr(const char *s, int c)
-!	Look for a character in a string.
-!
-.sect .text
-.define _strchr
-_strchr:
-	push	bp
-	mov	bp, sp
-	push	di
-	cld
-	mov	di, 4(bp)	! di = string
-	mov	dx, #16		! Look at small chunks of the string
-next:	shl	dx, #1		! Chunks become bigger each time
-	mov	cx, dx
-	xorb	al, al		! Look for the zero at the end
-  repne	scasb
-	pushf			! Remember the flags
-	sub	cx, dx
-	neg	cx		! Some or all of the chunk
-	sub	di, cx		! Step back
-	movb	al, 6(bp)	! The character to look for
-  repne	scasb
-	je	found
-	popf			! Did we find the end of string earlier?
-	jne	next		! No, try again
-	xor	ax, ax		! Return NULL
-	pop	di
-	pop	bp
-	ret
-found:	pop	ax		! Get rid of those flags
-	lea	ax, -1(di)	! Address of byte found
-	pop	di
-	pop	bp
-	ret
Index: trunk/minix/lib/i86/string/strcmp.s
===================================================================
--- trunk/minix/lib/i86/string/strcmp.s	(revision 9)
+++ 	(revision )
@@ -1,12 +1,0 @@
-!	strcmp()					Author: Kees J. Bot
-!								27 Jan 1994
-.sect .text; .sect .rom; .sect .data; .sect .bss
-
-! int strcmp(const char *s1, const char *s2)
-!	Compare two strings.
-!
-.sect .text
-.define _strcmp
-_strcmp:
-	mov	cx, #-1		! Unlimited length
-	jmp	__strncmp	! Common code
Index: trunk/minix/lib/i86/string/strcpy.s
===================================================================
--- trunk/minix/lib/i86/string/strcpy.s	(revision 9)
+++ 	(revision )
@@ -1,21 +1,0 @@
-!	strcpy()					Author: Kees J. Bot
-!								27 Jan 1994
-.sect .text; .sect .rom; .sect .data; .sect .bss
-
-! char *strcpy(char *s1, const char *s2)
-!	Copy string s2 to s1.
-!
-.sect .text
-.define _strcpy
-_strcpy:
-	push	bp
-	mov	bp, sp
-	push	si
-	push	di
-	mov	cx, #-1		! Unlimited length
-	call	__strncpy	! Common code
-	mov	ax, 4(bp)	! Return s1
-	pop	di
-	pop	si
-	pop	bp
-	ret
Index: trunk/minix/lib/i86/string/strlen.s
===================================================================
--- trunk/minix/lib/i86/string/strlen.s	(revision 9)
+++ 	(revision )
@@ -1,12 +1,0 @@
-!	strlen()					Author: Kees J. Bot
-!								27 Jan 1994
-.sect .text; .sect .rom; .sect .data; .sect .bss
-
-! size_t strlen(const char *s)
-!	Return the length of a string.
-!
-.sect .text
-.define _strlen
-_strlen:
-	mov	cx, #-1		! Unlimited length
-	jmp	__strnlen	! Common code
Index: trunk/minix/lib/i86/string/strncat.s
===================================================================
--- trunk/minix/lib/i86/string/strncat.s	(revision 9)
+++ 	(revision )
@@ -1,13 +1,0 @@
-!	strncat()					Author: Kees J. Bot
-!								27 Jan 1994
-.sect .text; .sect .rom; .sect .data; .sect .bss
-
-! size_t strncat(char *s1, const char *s2, size_t n)
-!	Append string s2 to s1.
-!
-.sect .text
-.define _strncat
-_strncat:
-	mov	bx, sp
-	mov	dx, 6(bx)	! Maximum length
-	jmp	__strncat	! Common code
Index: trunk/minix/lib/i86/string/strncmp.s
===================================================================
--- trunk/minix/lib/i86/string/strncmp.s	(revision 9)
+++ 	(revision )
@@ -1,13 +1,0 @@
-!	strncmp()					Author: Kees J. Bot
-!								27 Jan 1994
-.sect .text; .sect .rom; .sect .data; .sect .bss
-
-! int strncmp(const char *s1, const char *s2, size_t n)
-!	Compare two strings.
-!
-.sect .text
-.define _strncmp
-_strncmp:
-	mov	bx, sp
-	mov	cx, 6(bx)	! Maximum length
-	jmp	__strncmp	! Common code
Index: trunk/minix/lib/i86/string/strncpy.s
===================================================================
--- trunk/minix/lib/i86/string/strncpy.s	(revision 9)
+++ 	(revision )
@@ -1,23 +1,0 @@
-!	strncpy()					Author: Kees J. Bot
-!								27 Jan 1994
-.sect .text; .sect .rom; .sect .data; .sect .bss
-
-! char *strncpy(char *s1, const char *s2, size_t n)
-!	Copy string s2 to s1.
-!
-.sect .text
-.define _strncpy
-_strncpy:
-	push	bp
-	mov	bp, sp
-	push	si
-	push	di
-	mov	cx, 8(bp)	! Maximum length
-	call	__strncpy	! Common code
-	mov	cx, dx		! Number of bytes not copied
-    rep	stosb			! strncpy always copies n bytes by null padding
-	mov	ax, 4(bp)	! Return s1
-	pop	di
-	pop	si
-	pop	bp
-	ret
Index: trunk/minix/lib/i86/string/strnlen.s
===================================================================
--- trunk/minix/lib/i86/string/strnlen.s	(revision 9)
+++ 	(revision )
@@ -1,13 +1,0 @@
-!	strnlen()					Author: Kees J. Bot
-!								27 Jan 1994
-.sect .text; .sect .rom; .sect .data; .sect .bss
-
-! size_t strnlen(const char *s, size_t n)
-!	Return the length of a string.
-!
-.sect .text
-.define _strnlen
-_strnlen:
-	mov	bx, sp
-	mov	cx, 4(bx)	! Maximum length
-	jmp	__strnlen	! Common code
Index: trunk/minix/lib/i86/string/strrchr.s
===================================================================
--- trunk/minix/lib/i86/string/strrchr.s	(revision 9)
+++ 	(revision )
@@ -1,33 +1,0 @@
-!	strrchr()					Author: Kees J. Bot
-!								27 Jan 1994
-.sect .text; .sect .rom; .sect .data; .sect .bss
-
-! char *strrchr(const char *s, int c)
-!	Look for the last occurrence a character in a string.
-!
-.sect .text
-.define _strrchr
-_strrchr:
-	push	bp
-	mov	bp, sp
-	push	di
-	mov	di, 4(bp)	! di = string
-	mov	cx, #-1
-	xorb	al, al
-	cld
-  repne	scasb			! Look for the end of the string
-	not	cx		! -1 - cx = Length of the string + null
-	dec	di		! Put di back on the zero byte
-	movb	al, 6(bp)	! The character to look for
-	std			! Downwards search
-  repne	scasb
-	cld			! Direction bit back to default
-	jne	failure
-	lea	ax, 1(di)	! Found it
-	pop	di
-	pop	bp
-	ret
-failure:xor	ax, ax		! Not there
-	pop	di
-	pop	bp
-	ret
Index: trunk/minix/lib/ip/Makedepend-ack
===================================================================
--- trunk/minix/lib/ip/Makedepend-ack	(revision 9)
+++ 	(revision )
@@ -1,55 +1,0 @@
-depend-ack:
-	rm .depend-ack
-	touch .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -I. -DNDEBUG -E' accept.c | sed -e 's:^\(.\):../obj-ack//./ip/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -I. -DNDEBUG -E' bind.c | sed -e 's:^\(.\):../obj-ack//./ip/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -I. -DNDEBUG -E' connect.c | sed -e 's:^\(.\):../obj-ack//./ip/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -I. -DNDEBUG -E' dhcp_gettag.c | sed -e 's:^\(.\):../obj-ack//./ip/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -I. -DNDEBUG -E' dhcp_settag.c | sed -e 's:^\(.\):../obj-ack//./ip/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -I. -DNDEBUG -E' domainname.c | sed -e 's:^\(.\):../obj-ack//./ip/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -I. -DNDEBUG -E' ether_line.c | sed -e 's:^\(.\):../obj-ack//./ip/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -I. -DNDEBUG -E' ethera2n.c | sed -e 's:^\(.\):../obj-ack//./ip/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -I. -DNDEBUG -E' ethere2a.c | sed -e 's:^\(.\):../obj-ack//./ip/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -I. -DNDEBUG -E' etherh2n.c | sed -e 's:^\(.\):../obj-ack//./ip/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -I. -DNDEBUG -E' ethern2h.c | sed -e 's:^\(.\):../obj-ack//./ip/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -I. -DNDEBUG -E' getdomain.c | sed -e 's:^\(.\):../obj-ack//./ip/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -I. -DNDEBUG -E' gethnmadr.c | sed -e 's:^\(.\):../obj-ack//./ip/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -I. -DNDEBUG -E' gethostent.c | sed -e 's:^\(.\):../obj-ack//./ip/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -I. -DNDEBUG -E' gethostname.c | sed -e 's:^\(.\):../obj-ack//./ip/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -I. -DNDEBUG -E' getifaddrs.c | sed -e 's:^\(.\):../obj-ack//./ip/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -I. -DNDEBUG -E' getnetbyaddr.c | sed -e 's:^\(.\):../obj-ack//./ip/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -I. -DNDEBUG -E' getnetbyname.c | sed -e 's:^\(.\):../obj-ack//./ip/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -I. -DNDEBUG -E' getnetent.c | sed -e 's:^\(.\):../obj-ack//./ip/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -I. -DNDEBUG -E' getpeername.c | sed -e 's:^\(.\):../obj-ack//./ip/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -I. -DNDEBUG -E' getproto.c | sed -e 's:^\(.\):../obj-ack//./ip/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -I. -DNDEBUG -E' getprotoent.c | sed -e 's:^\(.\):../obj-ack//./ip/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -I. -DNDEBUG -E' getprotoname.c | sed -e 's:^\(.\):../obj-ack//./ip/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -I. -DNDEBUG -E' getservent.c | sed -e 's:^\(.\):../obj-ack//./ip/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -I. -DNDEBUG -E' getsockname.c | sed -e 's:^\(.\):../obj-ack//./ip/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -I. -DNDEBUG -E' getsockopt.c | sed -e 's:^\(.\):../obj-ack//./ip/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -I. -DNDEBUG -E' getsrvbyname.c | sed -e 's:^\(.\):../obj-ack//./ip/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -I. -DNDEBUG -E' getsrvbyport.c | sed -e 's:^\(.\):../obj-ack//./ip/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -I. -DNDEBUG -E' hton.c | sed -e 's:^\(.\):../obj-ack//./ip/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -I. -DNDEBUG -E' inet_addr.c | sed -e 's:^\(.\):../obj-ack//./ip/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -I. -DNDEBUG -E' inet_network.c | sed -e 's:^\(.\):../obj-ack//./ip/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -I. -DNDEBUG -E' inet_ntoa.c | sed -e 's:^\(.\):../obj-ack//./ip/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -I. -DNDEBUG -E' listen.c | sed -e 's:^\(.\):../obj-ack//./ip/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -I. -DNDEBUG -E' memcspn.c | sed -e 's:^\(.\):../obj-ack//./ip/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -I. -DNDEBUG -E' oneC_sum.c | sed -e 's:^\(.\):../obj-ack//./ip/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -I. -DNDEBUG -E' rcmd.c | sed -e 's:^\(.\):../obj-ack//./ip/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -I. -DNDEBUG -E' recv.c | sed -e 's:^\(.\):../obj-ack//./ip/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -I. -DNDEBUG -E' recvfrom.c | sed -e 's:^\(.\):../obj-ack//./ip/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -I. -DNDEBUG -E' res_comp.c | sed -e 's:^\(.\):../obj-ack//./ip/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -I. -DNDEBUG -E' res_init.c | sed -e 's:^\(.\):../obj-ack//./ip/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -I. -DNDEBUG -E' res_mkquery.c | sed -e 's:^\(.\):../obj-ack//./ip/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -I. -DNDEBUG -E' res_query.c | sed -e 's:^\(.\):../obj-ack//./ip/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -I. -DNDEBUG -E' res_send.c | sed -e 's:^\(.\):../obj-ack//./ip/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -I. -DNDEBUG -E' ruserok.c | sed -e 's:^\(.\):../obj-ack//./ip/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -I. -DNDEBUG -E' send.c | sed -e 's:^\(.\):../obj-ack//./ip/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -I. -DNDEBUG -E' sendto.c | sed -e 's:^\(.\):../obj-ack//./ip/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -I. -DNDEBUG -E' servxcheck.c | sed -e 's:^\(.\):../obj-ack//./ip/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -I. -DNDEBUG -E' sethostent.c | sed -e 's:^\(.\):../obj-ack//./ip/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -I. -DNDEBUG -E' setsockopt.c | sed -e 's:^\(.\):../obj-ack//./ip/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -I. -DNDEBUG -E' shutdown.c | sed -e 's:^\(.\):../obj-ack//./ip/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -I. -DNDEBUG -E' socket.c | sed -e 's:^\(.\):../obj-ack//./ip/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -I. -DNDEBUG -E' strcasecmp.c | sed -e 's:^\(.\):../obj-ack//./ip/\1:' >> .depend-ack
Index: trunk/minix/lib/ip/Makedepend-gnu
===================================================================
--- trunk/minix/lib/ip/Makedepend-gnu	(revision 9)
+++ 	(revision )
@@ -1,55 +1,0 @@
-depend-gnu:
-	rm .depend-gnu
-	touch .depend-gnu
-	mkdep 'gcc -O -D_MINIX -D_POSIX_SOURCE -I. -DNDEBUG -E' accept.c | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./ip/\1:' >> .depend-gnu
-	mkdep 'gcc -O -D_MINIX -D_POSIX_SOURCE -I. -DNDEBUG -E' bind.c | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./ip/\1:' >> .depend-gnu
-	mkdep 'gcc -O -D_MINIX -D_POSIX_SOURCE -I. -DNDEBUG -E' connect.c | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./ip/\1:' >> .depend-gnu
-	mkdep 'gcc -O -D_MINIX -D_POSIX_SOURCE -I. -DNDEBUG -E' dhcp_gettag.c | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./ip/\1:' >> .depend-gnu
-	mkdep 'gcc -O -D_MINIX -D_POSIX_SOURCE -I. -DNDEBUG -E' dhcp_settag.c | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./ip/\1:' >> .depend-gnu
-	mkdep 'gcc -O -D_MINIX -D_POSIX_SOURCE -I. -DNDEBUG -E' domainname.c | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./ip/\1:' >> .depend-gnu
-	mkdep 'gcc -O -D_MINIX -D_POSIX_SOURCE -I. -DNDEBUG -E' ether_line.c | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./ip/\1:' >> .depend-gnu
-	mkdep 'gcc -O -D_MINIX -D_POSIX_SOURCE -I. -DNDEBUG -E' ethera2n.c | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./ip/\1:' >> .depend-gnu
-	mkdep 'gcc -O -D_MINIX -D_POSIX_SOURCE -I. -DNDEBUG -E' ethere2a.c | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./ip/\1:' >> .depend-gnu
-	mkdep 'gcc -O -D_MINIX -D_POSIX_SOURCE -I. -DNDEBUG -E' etherh2n.c | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./ip/\1:' >> .depend-gnu
-	mkdep 'gcc -O -D_MINIX -D_POSIX_SOURCE -I. -DNDEBUG -E' ethern2h.c | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./ip/\1:' >> .depend-gnu
-	mkdep 'gcc -O -D_MINIX -D_POSIX_SOURCE -I. -DNDEBUG -E' getdomain.c | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./ip/\1:' >> .depend-gnu
-	mkdep 'gcc -O -D_MINIX -D_POSIX_SOURCE -I. -DNDEBUG -E' gethnmadr.c | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./ip/\1:' >> .depend-gnu
-	mkdep 'gcc -O -D_MINIX -D_POSIX_SOURCE -I. -DNDEBUG -E' gethostent.c | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./ip/\1:' >> .depend-gnu
-	mkdep 'gcc -O -D_MINIX -D_POSIX_SOURCE -I. -DNDEBUG -E' gethostname.c | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./ip/\1:' >> .depend-gnu
-	mkdep 'gcc -O -D_MINIX -D_POSIX_SOURCE -I. -DNDEBUG -E' getifaddrs.c | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./ip/\1:' >> .depend-gnu
-	mkdep 'gcc -O -D_MINIX -D_POSIX_SOURCE -I. -DNDEBUG -E' getnetbyaddr.c | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./ip/\1:' >> .depend-gnu
-	mkdep 'gcc -O -D_MINIX -D_POSIX_SOURCE -I. -DNDEBUG -E' getnetbyname.c | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./ip/\1:' >> .depend-gnu
-	mkdep 'gcc -O -D_MINIX -D_POSIX_SOURCE -I. -DNDEBUG -E' getnetent.c | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./ip/\1:' >> .depend-gnu
-	mkdep 'gcc -O -D_MINIX -D_POSIX_SOURCE -I. -DNDEBUG -E' getpeername.c | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./ip/\1:' >> .depend-gnu
-	mkdep 'gcc -O -D_MINIX -D_POSIX_SOURCE -I. -DNDEBUG -E' getproto.c | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./ip/\1:' >> .depend-gnu
-	mkdep 'gcc -O -D_MINIX -D_POSIX_SOURCE -I. -DNDEBUG -E' getprotoent.c | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./ip/\1:' >> .depend-gnu
-	mkdep 'gcc -O -D_MINIX -D_POSIX_SOURCE -I. -DNDEBUG -E' getprotoname.c | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./ip/\1:' >> .depend-gnu
-	mkdep 'gcc -O -D_MINIX -D_POSIX_SOURCE -I. -DNDEBUG -E' getservent.c | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./ip/\1:' >> .depend-gnu
-	mkdep 'gcc -O -D_MINIX -D_POSIX_SOURCE -I. -DNDEBUG -E' getsockname.c | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./ip/\1:' >> .depend-gnu
-	mkdep 'gcc -O -D_MINIX -D_POSIX_SOURCE -I. -DNDEBUG -E' getsockopt.c | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./ip/\1:' >> .depend-gnu
-	mkdep 'gcc -O -D_MINIX -D_POSIX_SOURCE -I. -DNDEBUG -E' getsrvbyname.c | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./ip/\1:' >> .depend-gnu
-	mkdep 'gcc -O -D_MINIX -D_POSIX_SOURCE -I. -DNDEBUG -E' getsrvbyport.c | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./ip/\1:' >> .depend-gnu
-	mkdep 'gcc -O -D_MINIX -D_POSIX_SOURCE -I. -DNDEBUG -E' hton.c | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./ip/\1:' >> .depend-gnu
-	mkdep 'gcc -O -D_MINIX -D_POSIX_SOURCE -I. -DNDEBUG -E' inet_addr.c | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./ip/\1:' >> .depend-gnu
-	mkdep 'gcc -O -D_MINIX -D_POSIX_SOURCE -I. -DNDEBUG -E' inet_network.c | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./ip/\1:' >> .depend-gnu
-	mkdep 'gcc -O -D_MINIX -D_POSIX_SOURCE -I. -DNDEBUG -E' inet_ntoa.c | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./ip/\1:' >> .depend-gnu
-	mkdep 'gcc -O -D_MINIX -D_POSIX_SOURCE -I. -DNDEBUG -E' listen.c | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./ip/\1:' >> .depend-gnu
-	mkdep 'gcc -O -D_MINIX -D_POSIX_SOURCE -I. -DNDEBUG -E' memcspn.c | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./ip/\1:' >> .depend-gnu
-	mkdep 'gcc -O -D_MINIX -D_POSIX_SOURCE -I. -DNDEBUG -E' oneC_sum.c | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./ip/\1:' >> .depend-gnu
-	mkdep 'gcc -O -D_MINIX -D_POSIX_SOURCE -I. -DNDEBUG -E' rcmd.c | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./ip/\1:' >> .depend-gnu
-	mkdep 'gcc -O -D_MINIX -D_POSIX_SOURCE -I. -DNDEBUG -E' recv.c | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./ip/\1:' >> .depend-gnu
-	mkdep 'gcc -O -D_MINIX -D_POSIX_SOURCE -I. -DNDEBUG -E' recvfrom.c | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./ip/\1:' >> .depend-gnu
-	mkdep 'gcc -O -D_MINIX -D_POSIX_SOURCE -I. -DNDEBUG -E' res_comp.c | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./ip/\1:' >> .depend-gnu
-	mkdep 'gcc -O -D_MINIX -D_POSIX_SOURCE -I. -DNDEBUG -E' res_init.c | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./ip/\1:' >> .depend-gnu
-	mkdep 'gcc -O -D_MINIX -D_POSIX_SOURCE -I. -DNDEBUG -E' res_mkquery.c | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./ip/\1:' >> .depend-gnu
-	mkdep 'gcc -O -D_MINIX -D_POSIX_SOURCE -I. -DNDEBUG -E' res_query.c | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./ip/\1:' >> .depend-gnu
-	mkdep 'gcc -O -D_MINIX -D_POSIX_SOURCE -I. -DNDEBUG -E' res_send.c | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./ip/\1:' >> .depend-gnu
-	mkdep 'gcc -O -D_MINIX -D_POSIX_SOURCE -I. -DNDEBUG -E' ruserok.c | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./ip/\1:' >> .depend-gnu
-	mkdep 'gcc -O -D_MINIX -D_POSIX_SOURCE -I. -DNDEBUG -E' send.c | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./ip/\1:' >> .depend-gnu
-	mkdep 'gcc -O -D_MINIX -D_POSIX_SOURCE -I. -DNDEBUG -E' sendto.c | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./ip/\1:' >> .depend-gnu
-	mkdep 'gcc -O -D_MINIX -D_POSIX_SOURCE -I. -DNDEBUG -E' servxcheck.c | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./ip/\1:' >> .depend-gnu
-	mkdep 'gcc -O -D_MINIX -D_POSIX_SOURCE -I. -DNDEBUG -E' sethostent.c | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./ip/\1:' >> .depend-gnu
-	mkdep 'gcc -O -D_MINIX -D_POSIX_SOURCE -I. -DNDEBUG -E' setsockopt.c | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./ip/\1:' >> .depend-gnu
-	mkdep 'gcc -O -D_MINIX -D_POSIX_SOURCE -I. -DNDEBUG -E' shutdown.c | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./ip/\1:' >> .depend-gnu
-	mkdep 'gcc -O -D_MINIX -D_POSIX_SOURCE -I. -DNDEBUG -E' socket.c | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./ip/\1:' >> .depend-gnu
-	mkdep 'gcc -O -D_MINIX -D_POSIX_SOURCE -I. -DNDEBUG -E' strcasecmp.c | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./ip/\1:' >> .depend-gnu
Index: trunk/minix/lib/ip/Makefile
===================================================================
--- trunk/minix/lib/ip/Makefile	(revision 9)
+++ 	(revision )
@@ -1,409 +1,0 @@
-#Generated from ./ip/Makefile.in
-all: all-ack
-
-all-ack:
-all-gnu:
-
-makefiles: Makefile
-Makedepend-ack Makedepend-gnu: 
-	sh ../generate.sh ./ip ../obj-ack/ ../obj-gnu
-
-Makefile: Makefile.in Makedepend-ack Makedepend-gnu
-	sh ../generate.sh ./ip ../obj-ack/ ../obj-gnu
-	@echo
-	@echo *Attention*
-	@echo Makefile is regenerated... rerun command to see changes
-	@echo *Attention*
-	@echo
-
-depend: depend-ack
-all-ack: ../obj-ack//libc.a
-
-../obj-ack//libc.a: ../obj-ack//libc.a(accept.o)
-../obj-ack//libc.a: ../obj-ack//libc.a(bind.o)
-../obj-ack//libc.a: ../obj-ack//libc.a(connect.o)
-../obj-ack//libc.a: ../obj-ack//libc.a(dhcp_gettag.o)
-../obj-ack//libc.a: ../obj-ack//libc.a(dhcp_settag.o)
-../obj-ack//libc.a: ../obj-ack//libc.a(domainname.o)
-../obj-ack//libc.a: ../obj-ack//libc.a(ether_line.o)
-../obj-ack//libc.a: ../obj-ack//libc.a(ethera2n.o)
-../obj-ack//libc.a: ../obj-ack//libc.a(ethere2a.o)
-../obj-ack//libc.a: ../obj-ack//libc.a(etherh2n.o)
-../obj-ack//libc.a: ../obj-ack//libc.a(ethern2h.o)
-../obj-ack//libc.a: ../obj-ack//libc.a(getdomain.o)
-../obj-ack//libc.a: ../obj-ack//libc.a(gethnmadr.o)
-../obj-ack//libc.a: ../obj-ack//libc.a(gethostent.o)
-../obj-ack//libc.a: ../obj-ack//libc.a(gethostname.o)
-../obj-ack//libc.a: ../obj-ack//libc.a(getifaddrs.o)
-../obj-ack//libc.a: ../obj-ack//libc.a(getnetbyaddr.o)
-../obj-ack//libc.a: ../obj-ack//libc.a(getnetbyname.o)
-../obj-ack//libc.a: ../obj-ack//libc.a(getnetent.o)
-../obj-ack//libc.a: ../obj-ack//libc.a(getpeername.o)
-../obj-ack//libc.a: ../obj-ack//libc.a(getproto.o)
-../obj-ack//libc.a: ../obj-ack//libc.a(getprotoent.o)
-../obj-ack//libc.a: ../obj-ack//libc.a(getprotoname.o)
-../obj-ack//libc.a: ../obj-ack//libc.a(getservent.o)
-../obj-ack//libc.a: ../obj-ack//libc.a(getsockname.o)
-../obj-ack//libc.a: ../obj-ack//libc.a(getsockopt.o)
-../obj-ack//libc.a: ../obj-ack//libc.a(getsrvbyname.o)
-../obj-ack//libc.a: ../obj-ack//libc.a(getsrvbyport.o)
-../obj-ack//libc.a: ../obj-ack//libc.a(hton.o)
-../obj-ack//libc.a: ../obj-ack//libc.a(inet_addr.o)
-../obj-ack//libc.a: ../obj-ack//libc.a(inet_network.o)
-../obj-ack//libc.a: ../obj-ack//libc.a(inet_ntoa.o)
-../obj-ack//libc.a: ../obj-ack//libc.a(listen.o)
-../obj-ack//libc.a: ../obj-ack//libc.a(memcspn.o)
-../obj-ack//libc.a: ../obj-ack//libc.a(oneC_sum.o)
-../obj-ack//libc.a: ../obj-ack//libc.a(rcmd.o)
-../obj-ack//libc.a: ../obj-ack//libc.a(recv.o)
-../obj-ack//libc.a: ../obj-ack//libc.a(recvfrom.o)
-../obj-ack//libc.a: ../obj-ack//libc.a(res_comp.o)
-../obj-ack//libc.a: ../obj-ack//libc.a(res_init.o)
-../obj-ack//libc.a: ../obj-ack//libc.a(res_mkquery.o)
-../obj-ack//libc.a: ../obj-ack//libc.a(res_query.o)
-../obj-ack//libc.a: ../obj-ack//libc.a(res_send.o)
-../obj-ack//libc.a: ../obj-ack//libc.a(ruserok.o)
-../obj-ack//libc.a: ../obj-ack//libc.a(send.o)
-../obj-ack//libc.a: ../obj-ack//libc.a(sendto.o)
-../obj-ack//libc.a: ../obj-ack//libc.a(servxcheck.o)
-../obj-ack//libc.a: ../obj-ack//libc.a(sethostent.o)
-../obj-ack//libc.a: ../obj-ack//libc.a(setsockopt.o)
-../obj-ack//libc.a: ../obj-ack//libc.a(shutdown.o)
-../obj-ack//libc.a: ../obj-ack//libc.a(socket.o)
-../obj-ack//libc.a: ../obj-ack//libc.a(strcasecmp.o)
-
-../obj-ack//libc.a:
-	ar cr ../obj-ack//libc.a ../obj-ack//./ip/*.o
-	rm ../obj-ack//./ip/*.o
-
-../obj-ack//libc.a(accept.o): accept.c
-	cc -O -D_MINIX -D_POSIX_SOURCE -I. -DNDEBUG -c -o ../obj-ack//./ip/accept.o accept.c
-../obj-ack//libc.a(bind.o): bind.c
-	cc -O -D_MINIX -D_POSIX_SOURCE -I. -DNDEBUG -c -o ../obj-ack//./ip/bind.o bind.c
-../obj-ack//libc.a(connect.o): connect.c
-	cc -O -D_MINIX -D_POSIX_SOURCE -I. -DNDEBUG -c -o ../obj-ack//./ip/connect.o connect.c
-../obj-ack//libc.a(dhcp_gettag.o): dhcp_gettag.c
-	cc -O -D_MINIX -D_POSIX_SOURCE -I. -DNDEBUG -c -o ../obj-ack//./ip/dhcp_gettag.o dhcp_gettag.c
-../obj-ack//libc.a(dhcp_settag.o): dhcp_settag.c
-	cc -O -D_MINIX -D_POSIX_SOURCE -I. -DNDEBUG -c -o ../obj-ack//./ip/dhcp_settag.o dhcp_settag.c
-../obj-ack//libc.a(domainname.o): domainname.c
-	cc -O -D_MINIX -D_POSIX_SOURCE -I. -DNDEBUG -c -o ../obj-ack//./ip/domainname.o domainname.c
-../obj-ack//libc.a(ether_line.o): ether_line.c
-	cc -O -D_MINIX -D_POSIX_SOURCE -I. -DNDEBUG -c -o ../obj-ack//./ip/ether_line.o ether_line.c
-../obj-ack//libc.a(ethera2n.o): ethera2n.c
-	cc -O -D_MINIX -D_POSIX_SOURCE -I. -DNDEBUG -c -o ../obj-ack//./ip/ethera2n.o ethera2n.c
-../obj-ack//libc.a(ethere2a.o): ethere2a.c
-	cc -O -D_MINIX -D_POSIX_SOURCE -I. -DNDEBUG -c -o ../obj-ack//./ip/ethere2a.o ethere2a.c
-../obj-ack//libc.a(etherh2n.o): etherh2n.c
-	cc -O -D_MINIX -D_POSIX_SOURCE -I. -DNDEBUG -c -o ../obj-ack//./ip/etherh2n.o etherh2n.c
-../obj-ack//libc.a(ethern2h.o): ethern2h.c
-	cc -O -D_MINIX -D_POSIX_SOURCE -I. -DNDEBUG -c -o ../obj-ack//./ip/ethern2h.o ethern2h.c
-../obj-ack//libc.a(getdomain.o): getdomain.c
-	cc -O -D_MINIX -D_POSIX_SOURCE -I. -DNDEBUG -c -o ../obj-ack//./ip/getdomain.o getdomain.c
-../obj-ack//libc.a(gethnmadr.o): gethnmadr.c
-	cc -O -D_MINIX -D_POSIX_SOURCE -I. -DNDEBUG -c -o ../obj-ack//./ip/gethnmadr.o gethnmadr.c
-../obj-ack//libc.a(gethostent.o): gethostent.c
-	cc -O -D_MINIX -D_POSIX_SOURCE -I. -DNDEBUG -c -o ../obj-ack//./ip/gethostent.o gethostent.c
-../obj-ack//libc.a(gethostname.o): gethostname.c
-	cc -O -D_MINIX -D_POSIX_SOURCE -I. -DNDEBUG -c -o ../obj-ack//./ip/gethostname.o gethostname.c
-../obj-ack//libc.a(getifaddrs.o): getifaddrs.c
-	cc -O -D_MINIX -D_POSIX_SOURCE -I. -DNDEBUG -c -o ../obj-ack//./ip/getifaddrs.o getifaddrs.c
-../obj-ack//libc.a(getnetbyaddr.o): getnetbyaddr.c
-	cc -O -D_MINIX -D_POSIX_SOURCE -I. -DNDEBUG -c -o ../obj-ack//./ip/getnetbyaddr.o getnetbyaddr.c
-../obj-ack//libc.a(getnetbyname.o): getnetbyname.c
-	cc -O -D_MINIX -D_POSIX_SOURCE -I. -DNDEBUG -c -o ../obj-ack//./ip/getnetbyname.o getnetbyname.c
-../obj-ack//libc.a(getnetent.o): getnetent.c
-	cc -O -D_MINIX -D_POSIX_SOURCE -I. -DNDEBUG -c -o ../obj-ack//./ip/getnetent.o getnetent.c
-../obj-ack//libc.a(getpeername.o): getpeername.c
-	cc -O -D_MINIX -D_POSIX_SOURCE -I. -DNDEBUG -c -o ../obj-ack//./ip/getpeername.o getpeername.c
-../obj-ack//libc.a(getproto.o): getproto.c
-	cc -O -D_MINIX -D_POSIX_SOURCE -I. -DNDEBUG -c -o ../obj-ack//./ip/getproto.o getproto.c
-../obj-ack//libc.a(getprotoent.o): getprotoent.c
-	cc -O -D_MINIX -D_POSIX_SOURCE -I. -DNDEBUG -c -o ../obj-ack//./ip/getprotoent.o getprotoent.c
-../obj-ack//libc.a(getprotoname.o): getprotoname.c
-	cc -O -D_MINIX -D_POSIX_SOURCE -I. -DNDEBUG -c -o ../obj-ack//./ip/getprotoname.o getprotoname.c
-../obj-ack//libc.a(getservent.o): getservent.c
-	cc -O -D_MINIX -D_POSIX_SOURCE -I. -DNDEBUG -c -o ../obj-ack//./ip/getservent.o getservent.c
-../obj-ack//libc.a(getsockname.o): getsockname.c
-	cc -O -D_MINIX -D_POSIX_SOURCE -I. -DNDEBUG -c -o ../obj-ack//./ip/getsockname.o getsockname.c
-../obj-ack//libc.a(getsockopt.o): getsockopt.c
-	cc -O -D_MINIX -D_POSIX_SOURCE -I. -DNDEBUG -c -o ../obj-ack//./ip/getsockopt.o getsockopt.c
-../obj-ack//libc.a(getsrvbyname.o): getsrvbyname.c
-	cc -O -D_MINIX -D_POSIX_SOURCE -I. -DNDEBUG -c -o ../obj-ack//./ip/getsrvbyname.o getsrvbyname.c
-../obj-ack//libc.a(getsrvbyport.o): getsrvbyport.c
-	cc -O -D_MINIX -D_POSIX_SOURCE -I. -DNDEBUG -c -o ../obj-ack//./ip/getsrvbyport.o getsrvbyport.c
-../obj-ack//libc.a(hton.o): hton.c
-	cc -O -D_MINIX -D_POSIX_SOURCE -I. -DNDEBUG -c -o ../obj-ack//./ip/hton.o hton.c
-../obj-ack//libc.a(inet_addr.o): inet_addr.c
-	cc -O -D_MINIX -D_POSIX_SOURCE -I. -DNDEBUG -c -o ../obj-ack//./ip/inet_addr.o inet_addr.c
-../obj-ack//libc.a(inet_network.o): inet_network.c
-	cc -O -D_MINIX -D_POSIX_SOURCE -I. -DNDEBUG -c -o ../obj-ack//./ip/inet_network.o inet_network.c
-../obj-ack//libc.a(inet_ntoa.o): inet_ntoa.c
-	cc -O -D_MINIX -D_POSIX_SOURCE -I. -DNDEBUG -c -o ../obj-ack//./ip/inet_ntoa.o inet_ntoa.c
-../obj-ack//libc.a(listen.o): listen.c
-	cc -O -D_MINIX -D_POSIX_SOURCE -I. -DNDEBUG -c -o ../obj-ack//./ip/listen.o listen.c
-../obj-ack//libc.a(memcspn.o): memcspn.c
-	cc -O -D_MINIX -D_POSIX_SOURCE -I. -DNDEBUG -c -o ../obj-ack//./ip/memcspn.o memcspn.c
-../obj-ack//libc.a(oneC_sum.o): oneC_sum.c
-	cc -O -D_MINIX -D_POSIX_SOURCE -I. -DNDEBUG -c -o ../obj-ack//./ip/oneC_sum.o oneC_sum.c
-../obj-ack//libc.a(rcmd.o): rcmd.c
-	cc -O -D_MINIX -D_POSIX_SOURCE -I. -DNDEBUG -c -o ../obj-ack//./ip/rcmd.o rcmd.c
-../obj-ack//libc.a(recv.o): recv.c
-	cc -O -D_MINIX -D_POSIX_SOURCE -I. -DNDEBUG -c -o ../obj-ack//./ip/recv.o recv.c
-../obj-ack//libc.a(recvfrom.o): recvfrom.c
-	cc -O -D_MINIX -D_POSIX_SOURCE -I. -DNDEBUG -c -o ../obj-ack//./ip/recvfrom.o recvfrom.c
-../obj-ack//libc.a(res_comp.o): res_comp.c
-	cc -O -D_MINIX -D_POSIX_SOURCE -I. -DNDEBUG -c -o ../obj-ack//./ip/res_comp.o res_comp.c
-../obj-ack//libc.a(res_init.o): res_init.c
-	cc -O -D_MINIX -D_POSIX_SOURCE -I. -DNDEBUG -c -o ../obj-ack//./ip/res_init.o res_init.c
-../obj-ack//libc.a(res_mkquery.o): res_mkquery.c
-	cc -O -D_MINIX -D_POSIX_SOURCE -I. -DNDEBUG -c -o ../obj-ack//./ip/res_mkquery.o res_mkquery.c
-../obj-ack//libc.a(res_query.o): res_query.c
-	cc -O -D_MINIX -D_POSIX_SOURCE -I. -DNDEBUG -c -o ../obj-ack//./ip/res_query.o res_query.c
-../obj-ack//libc.a(res_send.o): res_send.c
-	cc -O -D_MINIX -D_POSIX_SOURCE -I. -DNDEBUG -c -o ../obj-ack//./ip/res_send.o res_send.c
-../obj-ack//libc.a(ruserok.o): ruserok.c
-	cc -O -D_MINIX -D_POSIX_SOURCE -I. -DNDEBUG -c -o ../obj-ack//./ip/ruserok.o ruserok.c
-../obj-ack//libc.a(send.o): send.c
-	cc -O -D_MINIX -D_POSIX_SOURCE -I. -DNDEBUG -c -o ../obj-ack//./ip/send.o send.c
-../obj-ack//libc.a(sendto.o): sendto.c
-	cc -O -D_MINIX -D_POSIX_SOURCE -I. -DNDEBUG -c -o ../obj-ack//./ip/sendto.o sendto.c
-../obj-ack//libc.a(servxcheck.o): servxcheck.c
-	cc -O -D_MINIX -D_POSIX_SOURCE -I. -DNDEBUG -c -o ../obj-ack//./ip/servxcheck.o servxcheck.c
-../obj-ack//libc.a(sethostent.o): sethostent.c
-	cc -O -D_MINIX -D_POSIX_SOURCE -I. -DNDEBUG -c -o ../obj-ack//./ip/sethostent.o sethostent.c
-../obj-ack//libc.a(setsockopt.o): setsockopt.c
-	cc -O -D_MINIX -D_POSIX_SOURCE -I. -DNDEBUG -c -o ../obj-ack//./ip/setsockopt.o setsockopt.c
-../obj-ack//libc.a(shutdown.o): shutdown.c
-	cc -O -D_MINIX -D_POSIX_SOURCE -I. -DNDEBUG -c -o ../obj-ack//./ip/shutdown.o shutdown.c
-../obj-ack//libc.a(socket.o): socket.c
-	cc -O -D_MINIX -D_POSIX_SOURCE -I. -DNDEBUG -c -o ../obj-ack//./ip/socket.o socket.c
-../obj-ack//libc.a(strcasecmp.o): strcasecmp.c
-	cc -O -D_MINIX -D_POSIX_SOURCE -I. -DNDEBUG -c -o ../obj-ack//./ip/strcasecmp.o strcasecmp.c
-
-all-gnu: ../obj-gnu/libc.a
-
-../obj-gnu/libc.a: ../obj-gnu/./ip/accept.o
-../obj-gnu/libc.a: ../obj-gnu/./ip/bind.o
-../obj-gnu/libc.a: ../obj-gnu/./ip/connect.o
-../obj-gnu/libc.a: ../obj-gnu/./ip/dhcp_gettag.o
-../obj-gnu/libc.a: ../obj-gnu/./ip/dhcp_settag.o
-../obj-gnu/libc.a: ../obj-gnu/./ip/domainname.o
-../obj-gnu/libc.a: ../obj-gnu/./ip/ether_line.o
-../obj-gnu/libc.a: ../obj-gnu/./ip/ethera2n.o
-../obj-gnu/libc.a: ../obj-gnu/./ip/ethere2a.o
-../obj-gnu/libc.a: ../obj-gnu/./ip/etherh2n.o
-../obj-gnu/libc.a: ../obj-gnu/./ip/ethern2h.o
-../obj-gnu/libc.a: ../obj-gnu/./ip/getdomain.o
-../obj-gnu/libc.a: ../obj-gnu/./ip/gethnmadr.o
-../obj-gnu/libc.a: ../obj-gnu/./ip/gethostent.o
-../obj-gnu/libc.a: ../obj-gnu/./ip/gethostname.o
-../obj-gnu/libc.a: ../obj-gnu/./ip/getifaddrs.o
-../obj-gnu/libc.a: ../obj-gnu/./ip/getnetbyaddr.o
-../obj-gnu/libc.a: ../obj-gnu/./ip/getnetbyname.o
-../obj-gnu/libc.a: ../obj-gnu/./ip/getnetent.o
-../obj-gnu/libc.a: ../obj-gnu/./ip/getpeername.o
-../obj-gnu/libc.a: ../obj-gnu/./ip/getproto.o
-../obj-gnu/libc.a: ../obj-gnu/./ip/getprotoent.o
-../obj-gnu/libc.a: ../obj-gnu/./ip/getprotoname.o
-../obj-gnu/libc.a: ../obj-gnu/./ip/getservent.o
-../obj-gnu/libc.a: ../obj-gnu/./ip/getsockname.o
-../obj-gnu/libc.a: ../obj-gnu/./ip/getsockopt.o
-../obj-gnu/libc.a: ../obj-gnu/./ip/getsrvbyname.o
-../obj-gnu/libc.a: ../obj-gnu/./ip/getsrvbyport.o
-../obj-gnu/libc.a: ../obj-gnu/./ip/hton.o
-../obj-gnu/libc.a: ../obj-gnu/./ip/inet_addr.o
-../obj-gnu/libc.a: ../obj-gnu/./ip/inet_network.o
-../obj-gnu/libc.a: ../obj-gnu/./ip/inet_ntoa.o
-../obj-gnu/libc.a: ../obj-gnu/./ip/listen.o
-../obj-gnu/libc.a: ../obj-gnu/./ip/memcspn.o
-../obj-gnu/libc.a: ../obj-gnu/./ip/oneC_sum.o
-../obj-gnu/libc.a: ../obj-gnu/./ip/rcmd.o
-../obj-gnu/libc.a: ../obj-gnu/./ip/recv.o
-../obj-gnu/libc.a: ../obj-gnu/./ip/recvfrom.o
-../obj-gnu/libc.a: ../obj-gnu/./ip/res_comp.o
-../obj-gnu/libc.a: ../obj-gnu/./ip/res_init.o
-../obj-gnu/libc.a: ../obj-gnu/./ip/res_mkquery.o
-../obj-gnu/libc.a: ../obj-gnu/./ip/res_query.o
-../obj-gnu/libc.a: ../obj-gnu/./ip/res_send.o
-../obj-gnu/libc.a: ../obj-gnu/./ip/ruserok.o
-../obj-gnu/libc.a: ../obj-gnu/./ip/send.o
-../obj-gnu/libc.a: ../obj-gnu/./ip/sendto.o
-../obj-gnu/libc.a: ../obj-gnu/./ip/servxcheck.o
-../obj-gnu/libc.a: ../obj-gnu/./ip/sethostent.o
-../obj-gnu/libc.a: ../obj-gnu/./ip/setsockopt.o
-../obj-gnu/libc.a: ../obj-gnu/./ip/shutdown.o
-../obj-gnu/libc.a: ../obj-gnu/./ip/socket.o
-../obj-gnu/libc.a: ../obj-gnu/./ip/strcasecmp.o
-
-../obj-gnu/libc.a:
-	gar cr ../obj-gnu/libc.a $?
-
-../obj-gnu/./ip/accept.o: accept.c
-	gcc -O -D_MINIX -D_POSIX_SOURCE -I. -DNDEBUG -c -o ../obj-gnu/./ip/accept.o accept.c
-
-../obj-gnu/./ip/bind.o: bind.c
-	gcc -O -D_MINIX -D_POSIX_SOURCE -I. -DNDEBUG -c -o ../obj-gnu/./ip/bind.o bind.c
-
-../obj-gnu/./ip/connect.o: connect.c
-	gcc -O -D_MINIX -D_POSIX_SOURCE -I. -DNDEBUG -c -o ../obj-gnu/./ip/connect.o connect.c
-
-../obj-gnu/./ip/dhcp_gettag.o: dhcp_gettag.c
-	gcc -O -D_MINIX -D_POSIX_SOURCE -I. -DNDEBUG -c -o ../obj-gnu/./ip/dhcp_gettag.o dhcp_gettag.c
-
-../obj-gnu/./ip/dhcp_settag.o: dhcp_settag.c
-	gcc -O -D_MINIX -D_POSIX_SOURCE -I. -DNDEBUG -c -o ../obj-gnu/./ip/dhcp_settag.o dhcp_settag.c
-
-../obj-gnu/./ip/domainname.o: domainname.c
-	gcc -O -D_MINIX -D_POSIX_SOURCE -I. -DNDEBUG -c -o ../obj-gnu/./ip/domainname.o domainname.c
-
-../obj-gnu/./ip/ether_line.o: ether_line.c
-	gcc -O -D_MINIX -D_POSIX_SOURCE -I. -DNDEBUG -c -o ../obj-gnu/./ip/ether_line.o ether_line.c
-
-../obj-gnu/./ip/ethera2n.o: ethera2n.c
-	gcc -O -D_MINIX -D_POSIX_SOURCE -I. -DNDEBUG -c -o ../obj-gnu/./ip/ethera2n.o ethera2n.c
-
-../obj-gnu/./ip/ethere2a.o: ethere2a.c
-	gcc -O -D_MINIX -D_POSIX_SOURCE -I. -DNDEBUG -c -o ../obj-gnu/./ip/ethere2a.o ethere2a.c
-
-../obj-gnu/./ip/etherh2n.o: etherh2n.c
-	gcc -O -D_MINIX -D_POSIX_SOURCE -I. -DNDEBUG -c -o ../obj-gnu/./ip/etherh2n.o etherh2n.c
-
-../obj-gnu/./ip/ethern2h.o: ethern2h.c
-	gcc -O -D_MINIX -D_POSIX_SOURCE -I. -DNDEBUG -c -o ../obj-gnu/./ip/ethern2h.o ethern2h.c
-
-../obj-gnu/./ip/getdomain.o: getdomain.c
-	gcc -O -D_MINIX -D_POSIX_SOURCE -I. -DNDEBUG -c -o ../obj-gnu/./ip/getdomain.o getdomain.c
-
-../obj-gnu/./ip/gethnmadr.o: gethnmadr.c
-	gcc -O -D_MINIX -D_POSIX_SOURCE -I. -DNDEBUG -c -o ../obj-gnu/./ip/gethnmadr.o gethnmadr.c
-
-../obj-gnu/./ip/gethostent.o: gethostent.c
-	gcc -O -D_MINIX -D_POSIX_SOURCE -I. -DNDEBUG -c -o ../obj-gnu/./ip/gethostent.o gethostent.c
-
-../obj-gnu/./ip/gethostname.o: gethostname.c
-	gcc -O -D_MINIX -D_POSIX_SOURCE -I. -DNDEBUG -c -o ../obj-gnu/./ip/gethostname.o gethostname.c
-
-../obj-gnu/./ip/getifaddrs.o: getifaddrs.c
-	gcc -O -D_MINIX -D_POSIX_SOURCE -I. -DNDEBUG -c -o ../obj-gnu/./ip/getifaddrs.o getifaddrs.c
-
-../obj-gnu/./ip/getnetbyaddr.o: getnetbyaddr.c
-	gcc -O -D_MINIX -D_POSIX_SOURCE -I. -DNDEBUG -c -o ../obj-gnu/./ip/getnetbyaddr.o getnetbyaddr.c
-
-../obj-gnu/./ip/getnetbyname.o: getnetbyname.c
-	gcc -O -D_MINIX -D_POSIX_SOURCE -I. -DNDEBUG -c -o ../obj-gnu/./ip/getnetbyname.o getnetbyname.c
-
-../obj-gnu/./ip/getnetent.o: getnetent.c
-	gcc -O -D_MINIX -D_POSIX_SOURCE -I. -DNDEBUG -c -o ../obj-gnu/./ip/getnetent.o getnetent.c
-
-../obj-gnu/./ip/getpeername.o: getpeername.c
-	gcc -O -D_MINIX -D_POSIX_SOURCE -I. -DNDEBUG -c -o ../obj-gnu/./ip/getpeername.o getpeername.c
-
-../obj-gnu/./ip/getproto.o: getproto.c
-	gcc -O -D_MINIX -D_POSIX_SOURCE -I. -DNDEBUG -c -o ../obj-gnu/./ip/getproto.o getproto.c
-
-../obj-gnu/./ip/getprotoent.o: getprotoent.c
-	gcc -O -D_MINIX -D_POSIX_SOURCE -I. -DNDEBUG -c -o ../obj-gnu/./ip/getprotoent.o getprotoent.c
-
-../obj-gnu/./ip/getprotoname.o: getprotoname.c
-	gcc -O -D_MINIX -D_POSIX_SOURCE -I. -DNDEBUG -c -o ../obj-gnu/./ip/getprotoname.o getprotoname.c
-
-../obj-gnu/./ip/getservent.o: getservent.c
-	gcc -O -D_MINIX -D_POSIX_SOURCE -I. -DNDEBUG -c -o ../obj-gnu/./ip/getservent.o getservent.c
-
-../obj-gnu/./ip/getsockname.o: getsockname.c
-	gcc -O -D_MINIX -D_POSIX_SOURCE -I. -DNDEBUG -c -o ../obj-gnu/./ip/getsockname.o getsockname.c
-
-../obj-gnu/./ip/getsockopt.o: getsockopt.c
-	gcc -O -D_MINIX -D_POSIX_SOURCE -I. -DNDEBUG -c -o ../obj-gnu/./ip/getsockopt.o getsockopt.c
-
-../obj-gnu/./ip/getsrvbyname.o: getsrvbyname.c
-	gcc -O -D_MINIX -D_POSIX_SOURCE -I. -DNDEBUG -c -o ../obj-gnu/./ip/getsrvbyname.o getsrvbyname.c
-
-../obj-gnu/./ip/getsrvbyport.o: getsrvbyport.c
-	gcc -O -D_MINIX -D_POSIX_SOURCE -I. -DNDEBUG -c -o ../obj-gnu/./ip/getsrvbyport.o getsrvbyport.c
-
-../obj-gnu/./ip/hton.o: hton.c
-	gcc -O -D_MINIX -D_POSIX_SOURCE -I. -DNDEBUG -c -o ../obj-gnu/./ip/hton.o hton.c
-
-../obj-gnu/./ip/inet_addr.o: inet_addr.c
-	gcc -O -D_MINIX -D_POSIX_SOURCE -I. -DNDEBUG -c -o ../obj-gnu/./ip/inet_addr.o inet_addr.c
-
-../obj-gnu/./ip/inet_network.o: inet_network.c
-	gcc -O -D_MINIX -D_POSIX_SOURCE -I. -DNDEBUG -c -o ../obj-gnu/./ip/inet_network.o inet_network.c
-
-../obj-gnu/./ip/inet_ntoa.o: inet_ntoa.c
-	gcc -O -D_MINIX -D_POSIX_SOURCE -I. -DNDEBUG -c -o ../obj-gnu/./ip/inet_ntoa.o inet_ntoa.c
-
-../obj-gnu/./ip/listen.o: listen.c
-	gcc -O -D_MINIX -D_POSIX_SOURCE -I. -DNDEBUG -c -o ../obj-gnu/./ip/listen.o listen.c
-
-../obj-gnu/./ip/memcspn.o: memcspn.c
-	gcc -O -D_MINIX -D_POSIX_SOURCE -I. -DNDEBUG -c -o ../obj-gnu/./ip/memcspn.o memcspn.c
-
-../obj-gnu/./ip/oneC_sum.o: oneC_sum.c
-	gcc -O -D_MINIX -D_POSIX_SOURCE -I. -DNDEBUG -c -o ../obj-gnu/./ip/oneC_sum.o oneC_sum.c
-
-../obj-gnu/./ip/rcmd.o: rcmd.c
-	gcc -O -D_MINIX -D_POSIX_SOURCE -I. -DNDEBUG -c -o ../obj-gnu/./ip/rcmd.o rcmd.c
-
-../obj-gnu/./ip/recv.o: recv.c
-	gcc -O -D_MINIX -D_POSIX_SOURCE -I. -DNDEBUG -c -o ../obj-gnu/./ip/recv.o recv.c
-
-../obj-gnu/./ip/recvfrom.o: recvfrom.c
-	gcc -O -D_MINIX -D_POSIX_SOURCE -I. -DNDEBUG -c -o ../obj-gnu/./ip/recvfrom.o recvfrom.c
-
-../obj-gnu/./ip/res_comp.o: res_comp.c
-	gcc -O -D_MINIX -D_POSIX_SOURCE -I. -DNDEBUG -c -o ../obj-gnu/./ip/res_comp.o res_comp.c
-
-../obj-gnu/./ip/res_init.o: res_init.c
-	gcc -O -D_MINIX -D_POSIX_SOURCE -I. -DNDEBUG -c -o ../obj-gnu/./ip/res_init.o res_init.c
-
-../obj-gnu/./ip/res_mkquery.o: res_mkquery.c
-	gcc -O -D_MINIX -D_POSIX_SOURCE -I. -DNDEBUG -c -o ../obj-gnu/./ip/res_mkquery.o res_mkquery.c
-
-../obj-gnu/./ip/res_query.o: res_query.c
-	gcc -O -D_MINIX -D_POSIX_SOURCE -I. -DNDEBUG -c -o ../obj-gnu/./ip/res_query.o res_query.c
-
-../obj-gnu/./ip/res_send.o: res_send.c
-	gcc -O -D_MINIX -D_POSIX_SOURCE -I. -DNDEBUG -c -o ../obj-gnu/./ip/res_send.o res_send.c
-
-../obj-gnu/./ip/ruserok.o: ruserok.c
-	gcc -O -D_MINIX -D_POSIX_SOURCE -I. -DNDEBUG -c -o ../obj-gnu/./ip/ruserok.o ruserok.c
-
-../obj-gnu/./ip/send.o: send.c
-	gcc -O -D_MINIX -D_POSIX_SOURCE -I. -DNDEBUG -c -o ../obj-gnu/./ip/send.o send.c
-
-../obj-gnu/./ip/sendto.o: sendto.c
-	gcc -O -D_MINIX -D_POSIX_SOURCE -I. -DNDEBUG -c -o ../obj-gnu/./ip/sendto.o sendto.c
-
-../obj-gnu/./ip/servxcheck.o: servxcheck.c
-	gcc -O -D_MINIX -D_POSIX_SOURCE -I. -DNDEBUG -c -o ../obj-gnu/./ip/servxcheck.o servxcheck.c
-
-../obj-gnu/./ip/sethostent.o: sethostent.c
-	gcc -O -D_MINIX -D_POSIX_SOURCE -I. -DNDEBUG -c -o ../obj-gnu/./ip/sethostent.o sethostent.c
-
-../obj-gnu/./ip/setsockopt.o: setsockopt.c
-	gcc -O -D_MINIX -D_POSIX_SOURCE -I. -DNDEBUG -c -o ../obj-gnu/./ip/setsockopt.o setsockopt.c
-
-../obj-gnu/./ip/shutdown.o: shutdown.c
-	gcc -O -D_MINIX -D_POSIX_SOURCE -I. -DNDEBUG -c -o ../obj-gnu/./ip/shutdown.o shutdown.c
-
-../obj-gnu/./ip/socket.o: socket.c
-	gcc -O -D_MINIX -D_POSIX_SOURCE -I. -DNDEBUG -c -o ../obj-gnu/./ip/socket.o socket.c
-
-../obj-gnu/./ip/strcasecmp.o: strcasecmp.c
-	gcc -O -D_MINIX -D_POSIX_SOURCE -I. -DNDEBUG -c -o ../obj-gnu/./ip/strcasecmp.o strcasecmp.c
-
-
-
-
-clean::
-	rm -f ../obj-ack//./ip/*
-	rm -f ../obj-gnu/./ip/*
-
-include Makedepend-ack
-include .depend-ack
-
-include Makedepend-gnu
-include .depend-gnu
Index: trunk/minix/lib/ip/Makefile.in
===================================================================
--- trunk/minix/lib/ip/Makefile.in	(revision 9)
+++ 	(revision )
@@ -1,63 +1,0 @@
-# Makefile for lib/ip.
-#
-# Note: The oneC_sum.c file is not used if there is an assembly equivalent.
-
-CFLAGS="-O -D_MINIX -D_POSIX_SOURCE -I. -DNDEBUG"
-
-LIBRARIES=libc
-
-libc_FILES=" \
-	accept.c \
-	bind.c \
-	connect.c \
-	dhcp_gettag.c \
-	dhcp_settag.c \
-	domainname.c \
-	ether_line.c \
-	ethera2n.c \
-	ethere2a.c \
-	etherh2n.c \
-	ethern2h.c \
-	getdomain.c \
-	gethnmadr.c \
-	gethostent.c \
-	gethostname.c \
-	getifaddrs.c \
-	getnetbyaddr.c \
-	getnetbyname.c \
-	getnetent.c \
-	getpeername.c \
-	getproto.c \
-	getprotoent.c \
-	getprotoname.c \
-	getservent.c \
-	getsockname.c \
-	getsockopt.c \
-	getsrvbyname.c \
-	getsrvbyport.c \
-	hton.c \
-	inet_addr.c \
-	inet_network.c \
-	inet_ntoa.c \
-	listen.c \
-	memcspn.c \
-	oneC_sum.c \
-	rcmd.c \
-	recv.c \
-	recvfrom.c \
-	res_comp.c \
-	res_init.c \
-	res_mkquery.c \
-	res_query.c \
-	res_send.c \
-	ruserok.c \
-	send.c \
-	sendto.c \
-	servxcheck.c \
-	sethostent.c \
-	setsockopt.c \
-	shutdown.c \
-	socket.c \
-	strcasecmp.c"
-
-TYPE=both
Index: trunk/minix/lib/ip/accept.c
===================================================================
--- trunk/minix/lib/ip/accept.c	(revision 9)
+++ 	(revision )
@@ -1,65 +1,0 @@
-#include <errno.h>
-#include <fcntl.h>
-#include <stdio.h>
-#include <unistd.h>
-#include <string.h>
-#include <sys/ioctl.h>
-#include <sys/socket.h>
-#include <netinet/in.h>
-
-#include <net/netlib.h>
-#include <net/gen/in.h>
-#include <net/gen/tcp.h>
-#include <net/gen/tcp_io.h>
-#include <net/gen/udp.h>
-#include <net/gen/udp_io.h>
-
-#define DEBUG 0
-
-static int _tcp_accept(int socket, struct sockaddr *_RESTRICT address,
-	socklen_t *_RESTRICT address_len);
-
-int accept(int socket, struct sockaddr *_RESTRICT address,
-	socklen_t *_RESTRICT address_len)
-{
-	int r;
-
-	r= _tcp_accept(socket, address, address_len);
-	return r;
-
-#if DEBUG
-	fprintf(stderr, "accept: not implemented for fd %d\n", socket);
-#endif
-	errno= ENOSYS;
-	return -1;
-}
-
-static int _tcp_accept(int socket, struct sockaddr *_RESTRICT address,
-	socklen_t *_RESTRICT address_len)
-{
-	int r, s1, t_errno;
-	tcp_cookie_t cookie;
-
-	s1= open(TCP_DEVICE, O_RDWR);
-	if (s1 == -1)
-		return s1;
-	r= ioctl(s1, NWIOGTCPCOOKIE, &cookie);
-	if (r == -1)
-	{
-		t_errno= errno;
-		close(s1);
-		errno= t_errno;
-		return -1;
-	}
-	r= ioctl(socket, NWIOTCPACCEPTTO, &cookie);
-	if (r == -1)
-	{
-		t_errno= errno;
-		close(s1);
-		errno= t_errno;
-		return -1;
-	}
-	if (address != NULL)
-		getpeername(s1, address, address_len);
-	return s1;
-}
Index: trunk/minix/lib/ip/bind.c
===================================================================
--- trunk/minix/lib/ip/bind.c	(revision 9)
+++ 	(revision )
@@ -1,153 +1,0 @@
-#include <errno.h>
-#include <stdio.h>
-#include <string.h>
-#include <sys/ioctl.h>
-#include <sys/socket.h>
-#include <netinet/in.h>
-
-#include <net/gen/in.h>
-#include <net/gen/tcp.h>
-#include <net/gen/tcp_io.h>
-#include <net/gen/udp.h>
-#include <net/gen/udp_io.h>
-
-#define DEBUG 0
-
-static int _tcp_bind(int socket, const struct sockaddr *address,
-	socklen_t address_len, nwio_tcpconf_t *tcpconfp);
-static int _udp_bind(int socket, const struct sockaddr *address,
-	socklen_t address_len, nwio_udpopt_t *udpoptp);
-
-int bind(int socket, const struct sockaddr *address, socklen_t address_len)
-{
-	int r;
-	nwio_tcpconf_t tcpconf;
-	nwio_udpopt_t udpopt;
-
-	r= ioctl(socket, NWIOGTCPCONF, &tcpconf);
-	if (r != -1 || (errno != ENOTTY && errno != EBADIOCTL))
-	{
-		if (r == -1)
-			return r;
-		r= _tcp_bind(socket, address, address_len, &tcpconf);
-#if DEBUG
-		if (r == -1)
-		{
-			int t_errno= errno;
-			fprintf(stderr, "bind(tcp) failed: %s\n",
-				strerror(errno));
-			errno= t_errno;
-		}
-#endif
-		return r;
-	}
-
-	r= ioctl(socket, NWIOGUDPOPT, &udpopt);
-	if (r != -1 || (errno != ENOTTY && errno != EBADIOCTL))
-	{
-		if (r == -1)
-			return r;
-		return _udp_bind(socket, address, address_len, &udpopt);
-	}
-
-#if DEBUG
-	fprintf(stderr, "bind: not implemented for fd %d\n", socket);
-#endif
-	errno= ENOSYS;
-	return -1;
-}
-
-static int _tcp_bind(int socket, const struct sockaddr *address,
-	socklen_t address_len, nwio_tcpconf_t *tcpconfp)
-{
-	int r;
-	nwio_tcpconf_t tcpconf;
-	struct sockaddr_in *sinp;
-
-	sinp= (struct sockaddr_in *)address;
-	if (sinp->sin_family != AF_INET || address_len != sizeof(*sinp))
-	{
-#if DEBUG
-		fprintf(stderr, "bind(tcp): sin_family = %d, len = %d\n",
-			sinp->sin_family, address_len);
-#endif
-		errno= EAFNOSUPPORT;
-		return -1;
-	}
-
-	if (sinp->sin_addr.s_addr != INADDR_ANY &&
-		sinp->sin_addr.s_addr != tcpconfp->nwtc_locaddr)
-	{
-		errno= EADDRNOTAVAIL;
-		return -1;
-	}
-
-	tcpconf.nwtc_flags= 0;
-
-	if (sinp->sin_port == 0)
-		tcpconf.nwtc_flags |= NWTC_LP_SEL;
-	else
-	{
-		tcpconf.nwtc_flags |= NWTC_LP_SET;
-		tcpconf.nwtc_locport= sinp->sin_port;
-	}
-
-	r= ioctl(socket, NWIOSTCPCONF, &tcpconf);
-	return r;
-}
-
-static int _udp_bind(int socket, const struct sockaddr *address,
-	socklen_t address_len, nwio_udpopt_t *udpoptp)
-{
-	int r;
-	unsigned long curr_flags;
-	nwio_udpopt_t udpopt;
-	struct sockaddr_in *sinp;
-
-	sinp= (struct sockaddr_in *)address;
-	if (sinp->sin_family != AF_INET || address_len != sizeof(*sinp))
-	{
-#if DEBUG
-		fprintf(stderr, "bind(udp): sin_family = %d, len = %d\n",
-			sinp->sin_family, address_len);
-#endif
-		errno= EAFNOSUPPORT;
-		return -1;
-	}
-
-	if (sinp->sin_addr.s_addr != INADDR_ANY &&
-		sinp->sin_addr.s_addr != udpoptp->nwuo_locaddr)
-	{
-		errno= EADDRNOTAVAIL;
-		return -1;
-	}
-
-	udpopt.nwuo_flags= 0;
-
-	if (sinp->sin_port == 0)
-		udpopt.nwuo_flags |= NWUO_LP_SEL;
-	else
-	{
-		udpopt.nwuo_flags |= NWUO_LP_SET;
-		udpopt.nwuo_locport= sinp->sin_port;
-	}
-
-	curr_flags= udpoptp->nwuo_flags;
-	if (!(curr_flags & NWUO_ACC_MASK))
-		udpopt.nwuo_flags |= NWUO_EXCL;
-	if (!(curr_flags & (NWUO_EN_LOC|NWUO_DI_LOC)))
-		udpopt.nwuo_flags |= NWUO_EN_LOC;
-	if (!(curr_flags & (NWUO_EN_BROAD|NWUO_DI_BROAD)))
-		udpopt.nwuo_flags |= NWUO_EN_BROAD;
-	if (!(curr_flags & (NWUO_RP_SET|NWUO_RP_ANY)))
-		udpopt.nwuo_flags |= NWUO_RP_ANY;
-	if (!(curr_flags & (NWUO_RA_SET|NWUO_RA_ANY)))
-		udpopt.nwuo_flags |= NWUO_RA_ANY;
-	if (!(curr_flags & (NWUO_RWDATONLY|NWUO_RWDATALL)))
-		udpopt.nwuo_flags |= NWUO_RWDATALL;
-	if (!(curr_flags & (NWUO_EN_IPOPT|NWUO_DI_IPOPT)))
-		udpopt.nwuo_flags |= NWUO_DI_IPOPT;
-
-	r= ioctl(socket, NWIOSUDPOPT, &udpopt);
-	return r;
-}
Index: trunk/minix/lib/ip/connect.c
===================================================================
--- trunk/minix/lib/ip/connect.c	(revision 9)
+++ 	(revision )
@@ -1,138 +1,0 @@
-#include <errno.h>
-#include <fcntl.h>
-#include <stdio.h>
-#include <string.h>
-#include <sys/ioctl.h>
-#include <sys/socket.h>
-#include <netinet/in.h>
-
-#include <net/gen/in.h>
-#include <net/gen/tcp.h>
-#include <net/gen/tcp_io.h>
-#include <net/gen/udp.h>
-#include <net/gen/udp_io.h>
-
-#define DEBUG 0
-
-static int _tcp_connect(int socket, const struct sockaddr *address,
-	socklen_t address_len, nwio_tcpconf_t *tcpconfp);
-static int _udp_connect(int socket, const struct sockaddr *address,
-	socklen_t address_len, nwio_udpopt_t *udpoptp);
-
-int connect(int socket, const struct sockaddr *address,
-	socklen_t address_len)
-{
-	int r;
-	nwio_tcpconf_t tcpconf;
-	nwio_udpopt_t udpopt;
-
-	r= ioctl(socket, NWIOGTCPCONF, &tcpconf);
-	if (r != -1 || (errno != ENOTTY && errno != EBADIOCTL))
-	{
-		if (r == -1)
-		{
-			/* Bad file descriptor */
-			return -1;
-		}
-		return _tcp_connect(socket, address, address_len, &tcpconf);
-	}
-
-	r= ioctl(socket, NWIOGUDPOPT, &udpopt);
-	if (r != -1 || (errno != ENOTTY && errno != EBADIOCTL))
-	{
-		if (r == -1)
-		{
-			/* Bad file descriptor */
-			return -1;
-		}
-		return _udp_connect(socket, address, address_len, &udpopt);
-	}
-#if DEBUG
-	fprintf(stderr, "connect: not implemented for fd %d\n", socket);
-#endif
-	errno= ENOSYS;
-	return -1;
-}
-
-static int _tcp_connect(int socket, const struct sockaddr *address,
-	socklen_t address_len, nwio_tcpconf_t *tcpconfp)
-{
-	int r;
-	struct sockaddr_in *sinp;
-	nwio_tcpconf_t tcpconf;
-	nwio_tcpcl_t tcpcl;
-
-	if (address_len != sizeof(*sinp))
-	{
-		errno= EINVAL;
-		return -1;
-	}
-	sinp= (struct sockaddr_in *)address;
-	if (sinp->sin_family != AF_INET)
-	{
-		errno= EINVAL;
-		return -1;
-	}
-	tcpconf.nwtc_flags= NWTC_SET_RA | NWTC_SET_RP;
-	if ((tcpconfp->nwtc_flags & NWTC_LOCPORT_MASK) == NWTC_LP_UNSET)
-		tcpconf.nwtc_flags |= NWTC_LP_SEL;
-	tcpconf.nwtc_remaddr= sinp->sin_addr.s_addr;
-	tcpconf.nwtc_remport= sinp->sin_port;
-
-	if (ioctl(socket, NWIOSTCPCONF, &tcpconf) == -1)
-        {
-		/* Ignore EISCONN error. The NWIOTCPCONN ioctl will get the
-		 * right error.
-		 */
-		if (errno != EISCONN)
-			return -1;
-	}
-
-	tcpcl.nwtcl_flags= TCF_DEFAULT;
-
-	r= fcntl(socket, F_GETFL);
-	if (r == 1)
-		return -1;
-	if (r & O_NONBLOCK)
-		tcpcl.nwtcl_flags |= TCF_ASYNCH;
-
-	r= ioctl(socket, NWIOTCPCONN, &tcpcl);
-	return r;
-}
-
-static int _udp_connect(int socket, const struct sockaddr *address,
-	socklen_t address_len, nwio_udpopt_t *udpoptp)
-{
-	int r;
-	struct sockaddr_in *sinp;
-	nwio_udpopt_t udpopt;
-
-	if (address == NULL)
-	{
-		/* Unset remote address */
-		udpopt.nwuo_flags= NWUO_RP_ANY | NWUO_RA_ANY;
-
-		r= ioctl(socket, NWIOSUDPOPT, &udpopt);
-		return r;
-	}
-
-	if (address_len != sizeof(*sinp))
-	{
-		errno= EINVAL;
-		return -1;
-	}
-	sinp= (struct sockaddr_in *)address;
-	if (sinp->sin_family != AF_INET)
-	{
-		errno= EINVAL;
-		return -1;
-	}
-	udpopt.nwuo_flags= NWUO_RP_SET | NWUO_RA_SET;
-	if ((udpoptp->nwuo_flags & NWUO_LOCPORT_MASK) == NWUO_LP_ANY)
-		udpopt.nwuo_flags |= NWUO_LP_SEL;
-	udpopt.nwuo_remaddr= sinp->sin_addr.s_addr;
-	udpopt.nwuo_remport= sinp->sin_port;
-
-	r= ioctl(socket, NWIOSUDPOPT, &udpopt);
-	return r;
-}
Index: trunk/minix/lib/ip/dhcp_gettag.c
===================================================================
--- trunk/minix/lib/ip/dhcp_gettag.c	(revision 9)
+++ 	(revision )
@@ -1,55 +1,0 @@
-/*	dhcp_gettag()					Author: Kees J. Bot
- *								1 Dec 2000
- */
-#define nil ((void*)0)
-#include <stddef.h>
-#include <string.h>
-#include <sys/types.h>
-#include <net/hton.h>
-#include <net/gen/in.h>
-#include <net/gen/dhcp.h>
-
-#define arraysize(a)	(sizeof(a) / sizeof((a)[0]))
-
-int dhcp_gettag(dhcp_t *dp, int searchtag, u8_t **pdata, size_t *plen)
-{
-    /* Find a tag in the options field, or possibly in the file or sname
-     * fields.  Return true iff found, and return the data and/or length if
-     * their pointers are non-null.
-     */
-    u8_t *p;
-    u8_t *optfield[3];
-    size_t optlen[3];
-    int i, tag, len;
-
-    /* The DHCP magic number must be correct, or no tags. */
-    if (dp->magic != DHCP_MAGIC) return 0;
-
-    optfield[0]= dp->options;
-    optlen[0]= arraysize(dp->options);
-    optfield[1]= dp->file;
-    optlen[1]= 0;		/* Unknown if used for options yet. */
-    optfield[2]= dp->sname;
-    optlen[2]= 0;
-
-    for (i= 0; i < 3; i++) {
-	p= optfield[i];
-	while (p < optfield[i] + optlen[i]) {
-	    tag= *p++;
-	    if (tag == 255) break;
-	    len= tag == 0 ? 0 : *p++;
-	    if (tag == searchtag) {
-		if (pdata != nil) *pdata= p;
-		if (plen != nil) *plen= len;
-		return 1;
-	    }
-	    if (tag == DHCP_TAG_OVERLOAD) {
-		/* There are also options in the file or sname field. */
-		if (*p & 1) optlen[1]= arraysize(dp->file);
-		if (*p & 2) optlen[1]= arraysize(dp->sname);
-	    }
-	    p += len;
-	}
-    }
-    return 0;
-}
Index: trunk/minix/lib/ip/dhcp_settag.c
===================================================================
--- trunk/minix/lib/ip/dhcp_settag.c	(revision 9)
+++ 	(revision )
@@ -1,57 +1,0 @@
-/*	dhcp_init(), dhcp_settag()			Author: Kees J. Bot
- *								1 Dec 2000
- */
-#define nil ((void*)0)
-#include <stddef.h>
-#include <string.h>
-#include <sys/types.h>
-#include <net/hton.h>
-#include <net/gen/in.h>
-#include <net/gen/dhcp.h>
-
-#define arraysize(a)	(sizeof(a) / sizeof((a)[0]))
-#define arraylimit(a)	((a) + arraysize(a))
-
-void dhcp_init(dhcp_t *dp)
-{
-    /* Initialize a DHCP packet. */
-    memset(dp, 0, offsetof(dhcp_t, magic));
-    dp->magic= DHCP_MAGIC;
-    memset(dp->options, 255, sizeof(dp->options));
-}
-
-int dhcp_settag(dhcp_t *dp, int tag, void *data, size_t len)
-{
-    /* Add a tag to a DHCP packet.  No padding.  Only do the options field.
-     * (This is Minix, we don't need megabytes of silly bits of data.)
-     * The length may be zero to delete a tag.
-     */
-    u8_t *p;
-    int n;
-
-    if (tag <= 0 || tag >= 255) return 0;
-
-    for (p= dp->options; p < arraylimit(dp->options) && *p != 255; p += n) {
-	n= 1 + 1 + p[1];
-	if (*p == tag) {
-	    /* The tag is already there, remove it so it gets replaced. */
-	    memmove(p, p + n, arraylimit(dp->options) - (p + n));
-	    memset(arraylimit(dp->options) - n, 255, n);
-	    n= 0;
-	}
-    }
-
-    /* Add tag. */
-    if (len == 0) {
-	/* We're merely deleting a tag. */
-    } else
-    if (p + 1 + 1 + len <= arraylimit(dp->options)) {
-	*p++ = tag;
-	*p++ = len;
-	memcpy(p, data, len);
-    } else {
-	/* Oops, it didn't fit?  Is this really Minix??? */
-	return 0;
-    }
-    return 1;
-}
Index: trunk/minix/lib/ip/domainname.c
===================================================================
--- trunk/minix/lib/ip/domainname.c	(revision 9)
+++ 	(revision )
@@ -1,30 +1,0 @@
-/*
-domainname.c
-*/
-
-#include <stdio.h>
-#include <string.h>
-#include <net/netlib.h>
-
-int getdomainname(domain, size)
-char *domain;
-size_t size;
-{
-	FILE *domainfile;
-	char *line;
-
-	domainfile= fopen("/etc/domainname", "r");
-	if (!domainfile)
-	{
-		return -1;
-	}
-
-	line= fgets(domain, size, domainfile);
-	fclose(domainfile);
-	if (!line)
-		return -1;
-	line= strchr(domain, '\n');
-	if (line)
-		*line= '\0';
-	return 0;
-}
Index: trunk/minix/lib/ip/ether.h
===================================================================
--- trunk/minix/lib/ip/ether.h	(revision 9)
+++ 	(revision )
@@ -1,151 +1,0 @@
-/* $Id: ether.h,v 1.1.1.1 2005/04/21 14:56:15 beng Exp $ */
-
-/* Interface definitions for ethernet access library */
-
-typedef union etheraddr
-{
-    unsigned char bytes[6];		/* byteorder safe initialization */
-    unsigned short shorts[3];		/* force 2-byte alignment */
-}
-	  ether_addr;
-
-typedef struct etherpacket
-{
-    ether_addr dest;
-    ether_addr src;
-    unsigned char type[2];		/* in network byte order! */
-    unsigned short pktlen;		/* length of pktbuf ONLY */
-    char *pktbuf;
-}
-	    ether_packet;
-
-typedef struct ethervec
-{
-    ether_addr dest;
-    ether_addr src;
-    unsigned char type[2];		/* in network byte order! */
-    unsigned short iovcnt;		/* number of iovec to use */
-    struct iovec *iov;			/* ptr to array of iovec */
-}
-	 ether_vec;
-
-#ifndef __ETHER_BCAST_ADDR__
-extern ether_addr ether_bcast_addr;
-#endif
-
-#ifdef __STDC__
-
-int ether_open (char *name, unsigned type, ether_addr * address);
-
-ether_addr *ether_address (int fd, ether_addr * address);
-
-ether_addr *ether_intfaddr (char *intf, ether_addr * address);
-
-char **ether_interfaces (void);
-
-int ether_write (int fd, ether_packet * packet);
-
-int ether_writev (int fd, ether_vec * packet);
-
-int ether_read (int fd, ether_packet * packet);
-
-int ether_readv (int fd, ether_vec * packet);
-
-int ether_blocking (int fd, int state);
-
-int ether_send_self (int fd);
-
-int ether_mcast_self (int fd);
-
-int ether_bcast_self (int fd);
-
-char *ether_ntoa (ether_addr *);
-
-ether_addr *ether_aton (char *);
-
-#ifdef __GNUC__
-
-/*
- * Avoid stupid warnings if structs aren't defined
- */
-
-typedef struct in_addr *_ether_NoNsEnSe;
-typedef struct hostent *_ether_nOnSeNsE;
-
-#endif
-
-char *ether_e2a (ether_addr *, char *);
-
-ether_addr *ether_a2e (char *, ether_addr *);
-
-struct in_addr *ether_e2ip (ether_addr *, struct in_addr *);
-
-ether_addr *ether_ip2e (struct in_addr *, ether_addr *);
-
-char *ether_e2host (ether_addr *, char *);
-
-ether_addr *ether_host2e (char *, ether_addr *);
-
-ether_addr *ether_hostent2e (struct hostent *, ether_addr *);
-
-#else
-
-int ether_open ();
-ether_addr *ether_address ();
-ether_addr *ether_intfaddr ();
-char **ether_interfaces ();
-int ether_write ();
-int ether_writev ();
-int ether_read ();
-int ether_readv ();
-int ether_blocking ();
-int ether_send_self ();
-int ether_mcast_self ();
-int ether_bcast_self ();
-
-char *ether_ntoa ();
-ether_addr *ether_aton ();
-char *ether_e2a ();
-ether_addr *ether_a2e ();
-struct in_addr *ether_e2ip ();
-ether_addr *ether_ip2e ();
-char *ether_e2host ();
-ether_addr *ether_host2e ();
-ether_addr *ether_hostent2e ();
-
-#endif
-
-#undef ether_cmp			/* lose def from netinet/if_ether.h */
-
-#define ether_cmp(addr1,addr2) \
- ((addr1)->shorts[0] != (addr2)->shorts[0] \
-  || (addr1)->shorts[1] != (addr2)->shorts[1] \
-  || (addr1)->shorts[2] != (addr2)->shorts[2])
-
-#define ETHERSTRLEN 18			/* max length of "xx:xx:xx:xx:xx:xx" */
-
-#ifdef NOFILE				/* i.e. we have included sys/param.h */
-#ifndef MAXHOSTNAMELEN			/* but MAXHOSTNAMELEN still isnt set */
-#define MAXHOSTNAMELEN 64
-#endif
-#endif
-
-/* should be defined in terms of ether_packet struct; need offsetof() macro */
-
-#define ETHER_DST	0
-#define ETHER_SRC	6
-#define ETHER_TYPE	12
-#define ETHER_PKT	14
-#define ETHER_MIN	46
-#define ETHER_MAX	1500
-
-#define ETHER_MINTYPE	0x5DD		/* lowest protocol not valid IEEE802 */
-#define ETHER_MAXTYPE	0xFFFF		/* largest possible protocol */
-
-#define ETHER_MCAST(addr) (((unsigned char *) (addr))[0] & 0x01)
-
-#ifdef NT_ALLTYPES
-#define ETHER_ALLTYPES NT_ALLTYPES
-#else
-#define ETHER_ALLTYPES ((unsigned) -1)
-#endif
Index: trunk/minix/lib/ip/ether_line.c
===================================================================
--- trunk/minix/lib/ip/ether_line.c	(revision 9)
+++ 	(revision )
@@ -1,58 +1,0 @@
-/*
-**  ETHER_LINE
-**
-**	This routine parses the array pointed to by "line" (which should be
-**	from a file in the format of /etc/ethers) and returns in "eaddr" the
-**	ethernet address at the start of the line and the corresponding host
-**	name in "hostname".  It assumes either tabs or spaces separate the
-**	two.  The buffer pointed to by "hostname" must be big enough to hold
-**	the host name plus a NULL byte.
-**	The function returns 0 on success and 1 on failure.
-**	Arguments are assumed sensible.  Null pointers will probably cause
-**	exceptions.
-**	Author: Gregory J. Sharp, July 1990
-**	Adapted to MINIX: Philip Homburg, May 1992
-*/
-
-#include <sys/types.h>
-#include <ctype.h>
-#include <stdlib.h>
-#include <net/gen/ether.h>
-#include <net/gen/if_ether.h>
-
-int
-ether_line(line, eaddr, hostname)
-char *			line;
-struct ether_addr *	eaddr;
-char *			hostname;
-{
-    register int i;
-    register unsigned long val;
-
-/* skip leading white space */
-    while (*line != '\n' && (*line == ' ' || *line == '\t'))
-	line++;
-
-/* read the ethernet address */
-    for (i = 0; i < 5; i++)
-    {
-	val = (unsigned long) strtol(line, &line, 16);
-	if (val > 255 || *line++ != ':')
-	    return 1;
-	eaddr->ea_addr[i] = val & 0xff;
-    }
-    val = (unsigned long) strtol(line, &line, 16);
-    if (val > 255 || (*line != ' ' && *line != '\t'))
-	return 1;
-    eaddr->ea_addr[i] = val & 0xff;
-
-/* skip leading white space */
-    while (*line != '\n' && (*line == ' ' || *line == '\t'))
-	line++;
-
-/* read in the hostname */
-    while (!isspace(*line))
-	*hostname++ = *line++;
-    *hostname = '\0';
-    return 0;
-}
Index: trunk/minix/lib/ip/ethera2n.c
===================================================================
--- trunk/minix/lib/ip/ethera2n.c	(revision 9)
+++ 	(revision )
@@ -1,42 +1,0 @@
-/*
-ethera2n.c
-
-Convert an ASCII string with an ethernet address into a struct ether_addr.
-
-Created:	Nov 17, 1992 by Philip Homburg
-*/
-
-#include <sys/types.h>
-#include <stdlib.h>
-#include <net/netlib.h>
-#include <net/gen/ether.h>
-#include <net/gen/if_ether.h>
-
-struct ether_addr *ether_aton(s)
-_CONST char *s;
-{
-	static struct ether_addr ea;
-
-	int i;
-	long v;
-	char *check;
-
-	if (s == NULL)
-		return NULL;
-
-	for (i=0; i<6; i++)
-	{
-		v= strtol(s, &check, 16);
-		if (v<0 || v>255)
-			return NULL;
-		if ((i<5 && check[0] != ':') || (i == 5 && check[0] != '\0'))
-			return NULL;
-		ea.ea_addr[i]= v;
-		s= check+1;
-	}
-	return &ea;
-}
-
-/*
- * $PchId: ethera2n.c,v 1.3 1996/02/22 21:10:01 philip Exp $
- */
Index: trunk/minix/lib/ip/ethere2a.c
===================================================================
--- trunk/minix/lib/ip/ethere2a.c	(revision 9)
+++ 	(revision )
@@ -1,50 +1,0 @@
-/* $Id: ethere2a.c,v 1.1.1.1 2005/04/21 14:56:16 beng Exp $ */
-/* This file was part of the etherlib package. */
-
-#include <stdio.h>
-
-#ifdef _MINIX
-#include <sys/types.h>
-#include <stdlib.h>
-
-#include <net/gen/ether.h>
-#include <net/gen/if_ether.h>
-
-#define ETHERSTRLEN 18			/* max length of "xx:xx:xx:xx:xx:xx" */
-#define ether_addr	ether_addr_t
-#define bytes		ea_addr
-char *ether_e2a _ARGS(( ether_addr_t *a, char *e ));
-#else
-#include "libether.h"
-#endif
-
-char *
-ether_e2a (addr, estring)
-ether_addr *addr;
-char *estring;
-{
-#ifdef lint
-    char *sprintf ();
-#endif
-    if (estring == NULL)
-	estring = (char *) malloc (ETHERSTRLEN);
-
-    if (estring != NULL)
-	(void) sprintf (estring, "%x:%x:%x:%x:%x:%x",
-			addr->bytes[0], addr->bytes[1], addr->bytes[2],
-			addr->bytes[3], addr->bytes[4], addr->bytes[5]);
-    return (estring);
-}
-
-#ifndef ETHERDB
-
-char *
-ether_ntoa (addr)
-ether_addr *addr;
-{
-    static char estring[ETHERSTRLEN];
-
-    return (ether_e2a (addr, estring));
-}
-
-#endif
Index: trunk/minix/lib/ip/etherh2n.c
===================================================================
--- trunk/minix/lib/ip/etherh2n.c	(revision 9)
+++ 	(revision )
@@ -1,33 +1,0 @@
-/*
-etherh2n.c
-
-Created:	May 20, 1992 by Philip Homburg
-*/
-
-#include <stdio.h>
-#include <string.h>
-#include <net/gen/if_ether.h>
-
-int
-ether_hostton(hostname, e)
-char *hostname;
-struct ether_addr *e;
-{
-	FILE *etherf;
-	char b[256], hn[256];
-
-	etherf= fopen(_PATH_ETHERS, "r");
-	if (etherf == NULL)
-		return 1;
-
-	while(fgets(b, sizeof(b), etherf) != NULL)
-	{
-		if (ether_line(b, e, hn) == 0 && strcmp(hn, hostname) == 0)
-		{
-			fclose(etherf);
-			return 0;
-		}
-	}
-	fclose(etherf);
-	return 1;
-}
Index: trunk/minix/lib/ip/ethern2h.c
===================================================================
--- trunk/minix/lib/ip/ethern2h.c	(revision 9)
+++ 	(revision )
@@ -1,37 +1,0 @@
-/*
-ethern2h.c
-
-Created:	Nov 12, 1992 by Philip Homburg
-*/
-
-#include <sys/types.h>
-#include <stdio.h>
-#include <string.h>
-#include <net/gen/ether.h>
-#include <net/gen/if_ether.h>
-
-int
-ether_ntohost(hostname, e)
-char *hostname;
-struct ether_addr *e;
-{
-	FILE *etherf;
-	char b[256];
-	struct ether_addr e_tmp;
-
-	etherf= fopen(_PATH_ETHERS, "r");
-	if (etherf == NULL)
-		return 1;
-
-	while(fgets(b, sizeof(b), etherf) != NULL)
-	{
-		if (ether_line(b, &e_tmp, hostname) == 0 && 
-		memcmp(&e_tmp, e, sizeof(e_tmp)) == 0)
-		{
-			fclose(etherf);
-			return 0;
-		}
-	}
-	fclose(etherf);
-	return 1;
-}
Index: trunk/minix/lib/ip/getdomain.c
===================================================================
--- trunk/minix/lib/ip/getdomain.c	(revision 9)
+++ 	(revision )
@@ -1,23 +1,0 @@
-/*	getdomainname()					Author: Kees J. Bot
- *								2 Dec 1994
- */
-#define nil 0
-#include <sys/types.h>
-#include <sys/utsname.h>
-#include <unistd.h>
-#include <string.h>
-
-int getdomainname(char *domain, size_t size)
-{
-	char nodename[256];
-	char *dot;
-
-	if (gethostname(nodename, sizeof(nodename)) < 0)
-		return -1;
-	nodename[sizeof(nodename)-1]= 0;
-	if ((dot= strchr(nodename, '.')) == nil) dot= ".";
-
-	strncpy(domain, dot+1, size);
-	if (size > 0) domain[size-1]= 0;
-	return 0;
-}
Index: trunk/minix/lib/ip/gethnmadr.c
===================================================================
--- trunk/minix/lib/ip/gethnmadr.c	(revision 9)
+++ 	(revision )
@@ -1,335 +1,0 @@
-/*
- * Copyright (c) 1985, 1988 Regents of the University of California.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms are permitted
- * provided that: (1) source distributions retain this entire copyright
- * notice and comment, and (2) distributions including binaries display
- * the following acknowledgement:  ``This product includes software
- * developed by the University of California, Berkeley and its contributors''
- * in the documentation or other materials provided with the distribution
- * and in all advertising materials mentioning features or use of this
- * software. Neither the name of the University nor the names of its
- * contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
- * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)gethostnamadr.c	6.41 (Berkeley) 6/1/90";
-#endif /* LIBC_SCCS and not lint */
-
-#ifdef _MINIX
-#include <sys/types.h>
-#include <ctype.h>
-#include <errno.h>
-#include <stdio.h>
-#include <string.h>
-
-#include <net/hton.h>
-#include <net/gen/nameser.h>
-#include <net/gen/netdb.h>
-#include <net/gen/in.h>
-#include <net/gen/inet.h>
-#include <net/gen/resolv.h>
-#include <net/gen/socket.h>
-#else
-#include <sys/param.h>
-#include <sys/socket.h>
-#include <netinet/in.h>
-#include <ctype.h>
-#include <netdb.h>
-#include <stdio.h>
-#include <errno.h>
-#include <arpa/inet.h>
-#include <arpa/nameser.h>
-#include <resolv.h>
-#endif /* AMOEABA */
-
-#define	MAXALIASES	35
-#define	MAXADDRS	35
-
-static char *h_addr_ptrs[MAXADDRS + 1];
-
-#ifdef _MINIX
-struct in_addr
-{
-	ipaddr_t s_addr;
-};
-union querybuf;
-
-extern int dn_skipname _ARGS(( const u_char *comp_dn, const u_char *eom ));
-#define getshort _getshort
-static struct hostent *getanswer _ARGS(( union querybuf *answer, int anslen, 
-	int iquery ));
-#define bcmp memcmp
-#define bcopy(s, d, l) memcpy(d, s, l)
-#endif /* _MINIX */
-
-static struct hostent host;
-static char *host_aliases[MAXALIASES];
-static char hostbuf[BUFSIZ+1];
-static struct in_addr host_addr;
-
-#ifndef _MINIX
-char *strpbrk();
-#endif /* !_MINIX */
-
-#if PACKETSZ > 1024
-#define	MAXPACKET	PACKETSZ
-#else
-#define	MAXPACKET	1024
-#endif
-
-typedef union querybuf
-{
-	dns_hdr_t hdr;
-	u_char buf[MAXPACKET];
-} querybuf_t;
-
-typedef union align {
-    long al;
-    char ac;
-} align_t;
-
-static struct hostent *
-getanswer(answer, anslen, iquery)
-	querybuf_t *answer;
-	int anslen;
-	int iquery;
-{
-	register dns_hdr_t *hp;
-	register u_char *cp;
-	register int n;
-	u_char *eom;
-	char *bp, **ap;
-	int type, class, buflen, ancount, qdcount;
-	int haveanswer, getclass = C_ANY;
-	char **hap;
-
-	eom = answer->buf + anslen;
-	/*
-	 * find first satisfactory answer
-	 */
-	hp = &answer->hdr;
-	ancount = ntohs(hp->dh_ancount);
-	qdcount = ntohs(hp->dh_qdcount);
-	bp = hostbuf;
-	buflen = sizeof(hostbuf);
-	cp = answer->buf + sizeof(dns_hdr_t);
-	if (qdcount) {
-		if (iquery) {
-			if ((n = dn_expand((u_char *)answer->buf, eom,
-			     cp, (u_char *)bp, buflen)) < 0) {
-				h_errno = NO_RECOVERY;
-				return ((struct hostent *) NULL);
-			}
-			cp += n + QFIXEDSZ;
-			host.h_name = bp;
-			n = strlen(bp) + 1;
-			bp += n;
-			buflen -= n;
-		} else
-			cp += dn_skipname(cp, eom) + QFIXEDSZ;
-		while (--qdcount > 0)
-			cp += dn_skipname(cp, eom) + QFIXEDSZ;
-	} else if (iquery) {
-		if (hp->dh_flag1 & DHF_AA)
-			h_errno = HOST_NOT_FOUND;
-		else
-			h_errno = TRY_AGAIN;
-		return ((struct hostent *) NULL);
-	}
-	ap = host_aliases;
-	*ap = NULL;
-	host.h_aliases = host_aliases;
-	hap = h_addr_ptrs;
-	*hap = NULL;
-#if BSD >= 43 || defined(h_addr)	/* new-style hostent structure */
-	host.h_addr_list = h_addr_ptrs;
-#endif
-	haveanswer = 0;
-	while (--ancount >= 0 && cp < eom) {
-		if ((n = dn_expand((u_char *)answer->buf, eom, cp, (u_char *)bp,
-			buflen)) < 0)
-			break;
-		cp += n;
-		type = getshort(cp);
- 		cp += sizeof(u_short);
-		class = getshort(cp);
- 		cp += sizeof(u_short) + sizeof(u_long);
-		n = getshort(cp);
-		cp += sizeof(u_short);
-		if (type == T_CNAME) {
-			cp += n;
-			if (ap >= &host_aliases[MAXALIASES-1])
-				continue;
-			*ap++ = bp;
-			n = strlen(bp) + 1;
-			bp += n;
-			buflen -= n;
-			continue;
-		}
-		if (iquery && type == T_PTR) {
-			if ((n = dn_expand((u8_t *)answer->buf, eom,
-			    cp, (u8_t *)bp, buflen)) < 0) {
-				cp += n;
-				continue;
-			}
-			cp += n;
-			host.h_name = bp;
-			return(&host);
-		}
-		if (iquery || type != T_A)  {
-#ifdef DEBUG
-			if (_res.options & RES_DEBUG)
-				printf("unexpected answer type %d, size %d\n",
-					type, n);
-#endif
-			cp += n;
-			continue;
-		}
-		if (haveanswer) {
-			if (n != host.h_length) {
-				cp += n;
-				continue;
-			}
-			if (class != getclass) {
-				cp += n;
-				continue;
-			}
-		} else {
-			host.h_length = n;
-			getclass = class;
-			host.h_addrtype = (class == C_IN) ? AF_INET : AF_UNSPEC;
-			if (!iquery) {
-				host.h_name = bp;
-				bp += strlen(bp) + 1;
-			}
-		}
-
-		bp += (size_t)(sizeof(align_t) - 
-						((u_long)bp % sizeof(align_t)));
-
-		if (bp + n >= &hostbuf[sizeof(hostbuf)]) {
-#ifdef DEBUG
-			if (_res.options & RES_DEBUG)
-				printf("size (%d) too big\n", n);
-#endif
-			break;
-		}
-		bcopy(cp, *hap++ = bp, n);
-		bp +=n;
-		cp += n;
-		haveanswer++;
-	}
-	if (haveanswer) {
-		*ap = NULL;
-#if BSD >= 43 || defined(h_addr)	/* new-style hostent structure */
-		*hap = NULL;
-#else
-		host.h_addr = h_addr_ptrs[0];
-#endif
-		return (&host);
-	} else {
-		h_errno = TRY_AGAIN;
-		return ((struct hostent *) NULL);
-	}
-}
-
-struct hostent *
-gethostbyname(name)
-	_CONST char *name;
-{
-	querybuf_t buf;
-	register _CONST char *cp;
-	int n;
-
-	/*
-	 * disallow names consisting only of digits/dots, unless
-	 * they end in a dot.
-	 */
-	if (isdigit(name[0]))
-		for (cp = name;; ++cp) {
-			if (!*cp) {
-				if (*--cp == '.')
-					break;
-				/*
-				 * All-numeric, no dot at the end.
-				 * Fake up a hostent as if we'd actually
-				 * done a lookup.  What if someone types
-				 * 255.255.255.255?  The test below will
-				 * succeed spuriously... ???
-				 */
-				if ((host_addr.s_addr = inet_addr(name)) == -1) {
-					h_errno = HOST_NOT_FOUND;
-					return((struct hostent *) NULL);
-				}
-				host.h_name = (char *) name;
-				host.h_aliases = host_aliases;
-				host_aliases[0] = NULL;
-				host.h_addrtype = AF_INET;
-				host.h_length = sizeof(u_long);
-				h_addr_ptrs[0] = (char *)&host_addr;
-				h_addr_ptrs[1] = (char *)0;
-#if BSD >= 43 || defined(h_addr)	/* new-style hostent structure */
-				host.h_addr_list = h_addr_ptrs;
-#else
-				host.h_addr = h_addr_ptrs[0];
-#endif
-				return (&host);
-			}
-			if (!isdigit(*cp) && *cp != '.') 
-				break;
-		}
-
-	if ((n = res_search((char*)name, C_IN, T_A, buf.buf, sizeof(buf))) < 0) {
-#ifdef DEBUG
-		if (_res.options & RES_DEBUG)
-			printf("res_search failed\n");
-#endif
-		return ((struct hostent *) NULL);
-	}
-	return (getanswer(&buf, n, 0));
-}
-
-struct hostent *
-gethostbyaddr(addr, len, type)
-	const char *addr;
-	int len, type;
-{
-	int n;
-	querybuf_t buf;
-	register struct hostent *hp;
-	char qbuf[MAXDNAME];
-	
-	if (type != AF_INET)
-		return ((struct hostent *) NULL);
-	(void)sprintf(qbuf, "%u.%u.%u.%u.in-addr.arpa",
-		((unsigned)addr[3] & 0xff),
-		((unsigned)addr[2] & 0xff),
-		((unsigned)addr[1] & 0xff),
-		((unsigned)addr[0] & 0xff));
-	n = res_query(qbuf, C_IN, T_PTR, (u8_t *)&buf, sizeof(buf));
-	if (n < 0) {
-#ifdef DEBUG
-		if (_res.options & RES_DEBUG)
-			printf("res_query failed\n");
-#endif
-		return ((struct hostent *) NULL);
-	}
-	hp = getanswer(&buf, n, 1);
-	if (hp == NULL)
-		return ((struct hostent *) NULL);
-	hp->h_addrtype = type;
-	hp->h_length = len;
-	h_addr_ptrs[0] = (char *)&host_addr;
-	h_addr_ptrs[1] = (char *)0;
-	host_addr = *(struct in_addr *)addr;
-#if BSD < 43 && !defined(h_addr)	/* new-style hostent structure */
-	hp->h_addr = h_addr_ptrs[0];
-#endif
-	return(hp);
-}
Index: trunk/minix/lib/ip/gethostent.c
===================================================================
--- trunk/minix/lib/ip/gethostent.c	(revision 9)
+++ 	(revision )
@@ -1,168 +1,0 @@
-/*	gethostent() - Interface to /etc/hosts		Author: Kees J. Bot
- *								31 May 1999
- */
-
-/* Prefix the functions defined here with underscores to distinguish them
- * from the newer replacements in the resolver library.
- */
-#define sethostent	_sethostent
-#define endhostent	_endhostent
-#define gethostent	_gethostent
-#define gethostbyname	_gethostbyname
-#define gethostbyaddr	_gethostbyaddr
-
-#define nil 0
-#include <sys/types.h>
-#include <stdio.h>
-#include <string.h>
-#include <net/gen/netdb.h>
-#include <net/gen/in.h>
-#include <net/gen/inet.h>
-#include <net/gen/socket.h>
-
-#define arraysize(a)	(sizeof(a) / sizeof((a)[0]))
-#define arraylimit(a)	((a) + arraysize(a))
-#define isspace(c)	((unsigned) (c) <= ' ')
-
-static char HOSTS[]= _PATH_HOSTS;
-static char *hosts= HOSTS;	/* Current hosts file. */
-static FILE *hfp;		/* Open hosts file. */
-
-void sethostent(int stayopen)
-/* Start search.  (Same as ending it.) */
-{
-    endhostent();
-}
-
-void endhostent(void)
-/* End search and reinitialize. */
-{
-    if (hfp != nil) {
-	fclose(hfp);
-	hfp= nil;
-    }
-    hosts= _PATH_HOSTS;
-}
-
-struct hostent *gethostent(void)
-/* Return the next entry from the hosts files. */
-{
-    static char line[256];	/* One line in a hosts file. */
-    static ipaddr_t addr;	/* IP address found first on the line. */
-    static char *names[16];	/* Pointers to the words on the line. */
-    static char *addrs[2]= {	/* List of IP addresses (just one.) */
-	(char *) &addr,
-	nil,
-    };
-    static struct hostent host = {
-	nil,			/* h_name, will set to names[1]. */
-	names + 2,		/* h_aliases, the rest of the names. */
-	AF_INET,		/* h_addrtype */
-	sizeof(ipaddr_t),	/* Size of an address in the address list. */
-	addrs,			/* List of IP addresses. */
-    };
-    static char nexthosts[128];	/* Next hosts file to include. */
-    char *lp, **np;
-    int c;
-
-    for (;;) {
-	if (hfp == nil) {
-	    /* No hosts file open, try to open the next one. */
-	    if (hosts == 0) return nil;
-	    if ((hfp= fopen(hosts, "r")) == nil) { hosts= nil; continue; }
-	}
-
-	/* Read a line. */
-	lp= line;
-	while ((c= getc(hfp)) != EOF && c != '\n') {
-	    if (lp < arraylimit(line)) *lp++= c;
-	}
-
-	/* EOF?  Then close and prepare for reading the next file. */
-	if (c == EOF) {
-	    fclose(hfp);
-	    hfp= nil;
-	    hosts= nil;
-	    continue;
-	}
-
-	if (lp == arraylimit(line)) continue;
-	*lp= 0;
-
-	/* Break the line up in words. */
-	np= names;
-	lp= line;
-	for (;;) {
-	    while (isspace(*lp) && *lp != 0) lp++;
-	    if (*lp == 0 || *lp == '#') break;
-	    if (np == arraylimit(names)) break;
-	    *np++= lp;
-	    while (!isspace(*lp) && *lp != 0) lp++;
-	    if (*lp == 0) break;
-	    *lp++= 0;
-	}
-
-	if (np == arraylimit(names)) continue;
-	*np= nil;
-
-	/* Special "include file" directive. */
-	if (np == names + 2 && strcmp(names[0], "include") == 0) {
-	    fclose(hfp);
-	    hfp= nil;
-	    hosts= nil;
-	    if (strlen(names[1]) < sizeof(nexthosts)) {
-		strcpy(nexthosts, names[1]);
-		hosts= nexthosts;
-	    }
-	    continue;
-	}
-
-	/* At least two words, the first of which is an IP address. */
-	if (np < names + 2) continue;
-	if (!inet_aton((char *) names[0], &addr)) continue;
-	host.h_name= (char *) names[1];
-
-	return &host;
-    }
-}
-
-/* Rest kept in reserve, we probably never need 'em. */
-#if XXX
-struct hostent *gethostbyname(const char *name)
-{
-    struct hostent *he;
-    char **pa;
-    char alias[256];
-    char *domain;
-    
-    sethostent(0);
-    while ((he= gethostent()) != nil) {
-	if (strcasecmp(he->h_name, name) == 0) goto found;
-
-	domain= strchr(he->h_name, '.');
-	for (pa= he->h_aliases; *pa != nil; pa++) {
-	    strcpy(alias, *pa);
-	    if (domain != nil && strchr(alias, '.') == nil) {
-		strcat(alias, domain);
-	    }
-	    if (strcasecmp(alias, name) == 0) goto found;
-	}
-    }
-  found:
-    endhostent();
-    return he;
-}
-
-struct hostent *gethostbyaddr(const char *addr, int len, int type)
-{
-    struct hostent *he;
-
-    sethostent(0);
-    while ((he= gethostent()) != nil) {
-	if (he->h_name[0] == '%') continue;
-	if (type == AF_INET && memcmp(he->h_addr, addr, len) == 0) break;
-    }
-    endhostent();
-    return he;
-}
-#endif
Index: trunk/minix/lib/ip/gethostname.c
===================================================================
--- trunk/minix/lib/ip/gethostname.c	(revision 9)
+++ 	(revision )
@@ -1,27 +1,0 @@
-/* gethostname(2) system call emulation */
-
-#include <sys/types.h>
-#include <fcntl.h>
-#include <stdlib.h>
-#include <string.h>
-#include <unistd.h>
-#include <net/gen/netdb.h>
-
-#define HOSTNAME_FILE "/etc/hostname.file"
-
-int gethostname(char *buf, size_t len)
-{
-	int fd;
-	int r;
-	char *nl;
-
-	if ((fd= open(HOSTNAME_FILE, O_RDONLY)) < 0) return -1;
-
-	r= read(fd, buf, len);
-	close(fd);
-	if (r == -1) return -1;
-
-	buf[len-1]= '\0';
-	if ((nl= strchr(buf, '\n')) != NULL) *nl= '\0';
-	return 0;
-}
Index: trunk/minix/lib/ip/getifaddrs.c
===================================================================
--- trunk/minix/lib/ip/getifaddrs.c	(revision 9)
+++ 	(revision )
@@ -1,71 +1,0 @@
-#include <errno.h>
-#include <stdio.h>
-#include <string.h>
-#include <stdlib.h>
-#include <fcntl.h>
-#include <ifaddrs.h>
-#include <sys/ioctl.h>
-#include <sys/socket.h>
-#include <sys/types.h>
-#include <netinet/in.h>
-
-#include <net/gen/in.h>
-#include <net/gen/ip_io.h>
-#include <net/gen/tcp.h>
-#include <net/gen/tcp_io.h>
-#include <net/gen/udp.h>
-#include <net/gen/udp_io.h>
-
-int
-getifaddrs(struct ifaddrs **ifap)
-{
-	static int fd = -1;
-	nwio_ipconf_t ipconf;
-	int flags, err, r;
-	static struct ifaddrs ifa;
-	static struct sockaddr_in addr, netmask;
-
-	memset(&ifa, 0, sizeof(ifa));
-	memset(&addr, 0, sizeof(addr));
-	memset(&netmask, 0, sizeof(netmask));
-	ifa.ifa_next = NULL;
-	ifa.ifa_name = "ip";
-	addr.sin_family = netmask.sin_family = AF_INET;
-	ifa.ifa_addr = (struct sockaddr *) &addr;
-	ifa.ifa_netmask = (struct sockaddr *) &netmask;
-	addr.sin_addr.s_addr = 0;
-	netmask.sin_addr.s_addr = 0;
-
-	if(fd < 0) {
-		char *ipd;
-		if(!(ipd=getenv("IP_DEVICE")))
-			ipd="/dev/ip";
-		if((fd = open(ipd, O_RDWR)) < 0)
-			return -1;
-	}
-
-	/* Code taken from commands/simple/ifconfig.c. */
-
-	if((flags = fcntl(fd, F_GETFL)) < 0 ||
-	   fcntl(fd, F_SETFL, flags | O_NONBLOCK) < 0 ||
-	   ioctl(fd, NWIOGIPCONF, &ipconf))
-		return 0;	/* Report interface as down. */
-
-	addr.sin_addr.s_addr = ipconf.nwic_ipaddr;
-	netmask.sin_addr.s_addr = ipconf.nwic_netmask;
-	if(addr.sin_addr.s_addr) ifa.ifa_flags = IFF_UP;
-
-	/* Just report on this interface. */
-
-	*ifap = &ifa;
-
-	return 0;
-}
-
-void
-freeifaddrs(struct ifaddrs *ifp)
-{
-	/* getifaddrs points to static data, so no need to free. */
-	;
-}
-
Index: trunk/minix/lib/ip/getnetbyaddr.c
===================================================================
--- trunk/minix/lib/ip/getnetbyaddr.c	(revision 9)
+++ 	(revision )
@@ -1,56 +1,0 @@
-/*
- * Copyright (c) 1983, 1993
- *	The Regents of the University of California.  All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- *    must display the following acknowledgement:
- *	This product includes software developed by the University of
- *	California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- *    may be used to endorse or promote products derived from this software
- *    without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)getnetbyaddr.c	8.1 (Berkeley) 6/4/93";
-#endif /* LIBC_SCCS and not lint */
-
-#include <net/gen/netdb.h>
-
-extern int _net_stayopen;
-
-struct netent *
-getnetbyaddr(net, type)
-	register long net;
-	register int type;
-{
-	register struct netent *p;
-
-	setnetent(_net_stayopen);
-	while (p = getnetent())
-		if (p->n_addrtype == type && p->n_net == net)
-			break;
-	if (!_net_stayopen)
-		endnetent();
-	return (p);
-}
Index: trunk/minix/lib/ip/getnetbyname.c
===================================================================
--- trunk/minix/lib/ip/getnetbyname.c	(revision 9)
+++ 	(revision )
@@ -1,62 +1,0 @@
-/*
- * Copyright (c) 1983, 1993
- *	The Regents of the University of California.  All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- *    must display the following acknowledgement:
- *	This product includes software developed by the University of
- *	California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- *    may be used to endorse or promote products derived from this software
- *    without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)getnetbyname.c	8.1 (Berkeley) 6/4/93";
-#endif /* LIBC_SCCS and not lint */
-
-#include <string.h>
-#include <net/gen/netdb.h>
-
-extern int _net_stayopen;
-
-struct netent *
-getnetbyname(name)
-	register const char *name;
-{
-	register struct netent *p;
-	register char **cp;
-
-	setnetent(_net_stayopen);
-	while (p = getnetent()) {
-		if (strcmp(p->n_name, name) == 0)
-			break;
-		for (cp = p->n_aliases; *cp != 0; cp++)
-			if (strcmp(*cp, name) == 0)
-				goto found;
-	}
-found:
-	if (!_net_stayopen)
-		endnetent();
-	return (p);
-}
Index: trunk/minix/lib/ip/getnetent.c
===================================================================
--- trunk/minix/lib/ip/getnetent.c	(revision 9)
+++ 	(revision )
@@ -1,121 +1,0 @@
-/*
- * Copyright (c) 1983, 1993
- *	The Regents of the University of California.  All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- *    must display the following acknowledgement:
- *	This product includes software developed by the University of
- *	California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- *    may be used to endorse or promote products derived from this software
- *    without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)getnetent.c	8.1 (Berkeley) 6/4/93";
-#endif /* LIBC_SCCS and not lint */
-
-#include <sys/types.h>
-#include <stdio.h>
-#include <string.h>
-#include <net/gen/in.h>
-#include <net/gen/netdb.h>
-#include <net/gen/inet.h>
-#include <net/gen/socket.h>
-
-#define	MAXALIASES	35
-
-static FILE *netf;
-static char line[BUFSIZ+1];
-static struct netent net;
-static char *net_aliases[MAXALIASES];
-int _net_stayopen;
-
-void
-setnetent(f)
-	int f;
-{
-	if (netf == NULL)
-		netf = fopen(_PATH_NETWORKS, "r" );
-	else
-		rewind(netf);
-	_net_stayopen |= f;
-}
-
-void
-endnetent()
-{
-	if (netf) {
-		fclose(netf);
-		netf = NULL;
-	}
-	_net_stayopen = 0;
-}
-
-struct netent *
-getnetent()
-{
-	char *p;
-	register char *cp, **q;
-
-	if (netf == NULL && (netf = fopen(_PATH_NETWORKS, "r" )) == NULL)
-		return (NULL);
-again:
-	p = fgets(line, BUFSIZ, netf);
-	if (p == NULL)
-		return (NULL);
-	if (*p == '#')
-		goto again;
-	cp = strpbrk(p, "#\n");
-	if (cp == NULL)
-		goto again;
-	*cp = '\0';
-	net.n_name = p;
-	cp = strpbrk(p, " \t");
-	if (cp == NULL)
-		goto again;
-	*cp++ = '\0';
-	while (*cp == ' ' || *cp == '\t')
-		cp++;
-	p = strpbrk(cp, " \t");
-	if (p != NULL)
-		*p++ = '\0';
-	net.n_net = inet_network(cp);
-	net.n_addrtype = AF_INET;
-	q = net.n_aliases = net_aliases;
-	if (p != NULL) 
-		cp = p;
-	while (cp && *cp) {
-		if (*cp == ' ' || *cp == '\t') {
-			cp++;
-			continue;
-		}
-		if (q < &net_aliases[MAXALIASES - 1])
-			*q++ = cp;
-		cp = strpbrk(cp, " \t");
-		if (cp != NULL)
-			*cp++ = '\0';
-	}
-	*q = NULL;
-	return (&net);
-}
Index: trunk/minix/lib/ip/getpeername.c
===================================================================
--- trunk/minix/lib/ip/getpeername.c	(revision 9)
+++ 	(revision )
@@ -1,70 +1,0 @@
-#include <errno.h>
-#include <stdio.h>
-#include <string.h>
-#include <sys/ioctl.h>
-#include <sys/socket.h>
-#include <netinet/in.h>
-
-#include <net/gen/in.h>
-#include <net/gen/tcp.h>
-#include <net/gen/tcp_io.h>
-#include <net/gen/udp.h>
-#include <net/gen/udp_io.h>
-
-#define DEBUG 0
-
-static int _tcp_getpeername(int socket, struct sockaddr *_RESTRICT address,
-	socklen_t *_RESTRICT address_len, nwio_tcpconf_t *tcpconfp);
-
-int getpeername(int socket, struct sockaddr *_RESTRICT address,
-	socklen_t *_RESTRICT address_len)
-{
-	int r;
-	nwio_tcpconf_t tcpconf;
-
-	r= ioctl(socket, NWIOGTCPCONF, &tcpconf);
-	if (r != -1 || errno != ENOTTY)
-	{
-		if (r == -1)
-		{
-			/* Bad file descriptor */
-			return -1;
-		}
-		return _tcp_getpeername(socket, address, address_len,
-			&tcpconf);
-	}
-
-#if DEBUG
-	fprintf(stderr, "getpeername: not implemented for fd %d\n", socket);
-#endif
-	errno= ENOSYS;
-	return -1;
-}
-
-static int _tcp_getpeername(int socket, struct sockaddr *_RESTRICT address,
-	socklen_t *_RESTRICT address_len, nwio_tcpconf_t *tcpconfp)
-{
-	socklen_t len;
-	struct sockaddr_in sin;
-
-	if (tcpconfp->nwtc_remaddr == 0 ||
-		tcpconfp->nwtc_remport == 0)
-	{
-		errno= ENOTCONN;
-		return -1;
-	}
-
-	memset(&sin, '\0', sizeof(sin));
-	sin.sin_family= AF_INET;
-	sin.sin_addr.s_addr= tcpconfp->nwtc_remaddr;
-	sin.sin_port= tcpconfp->nwtc_remport;
-
-	len= *address_len;
-	if (len > sizeof(sin))
-		len= sizeof(sin);
-	memcpy(address, &sin, len);
-	*address_len= len;
-
-	return 0;
-}
-
Index: trunk/minix/lib/ip/getproto.c
===================================================================
--- trunk/minix/lib/ip/getproto.c	(revision 9)
+++ 	(revision )
@@ -1,46 +1,0 @@
-/*
- * Copyright (c) 1983 Regents of the University of California.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms are permitted
- * provided that: (1) source distributions retain this entire copyright
- * notice and comment, and (2) distributions including binaries display
- * the following acknowledgement:  ``This product includes software
- * developed by the University of California, Berkeley and its contributors''
- * in the documentation or other materials provided with the distribution
- * and in all advertising materials mentioning features or use of this
- * software. Neither the name of the University nor the names of its
- * contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
- * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)getproto.c	5.6 (Berkeley) 6/1/90";
-#endif /* LIBC_SCCS and not lint */
-
-#include <stddef.h>
-
-#ifdef _MINIX
-#include <ansi.h>
-#include <net/gen/netdb.h>
-#endif
-
-extern int _proto_stayopen;
-
-struct protoent *
-getprotobynumber(proto)
-	register int proto;
-{
-	register struct protoent *p;
-
-	setprotoent(_proto_stayopen);
-	while (p = getprotoent())
-		if (p->p_proto == proto)
-			break;
-	if (!_proto_stayopen)
-		endprotoent();
-	return (p);
-}
Index: trunk/minix/lib/ip/getprotoent.c
===================================================================
--- trunk/minix/lib/ip/getprotoent.c	(revision 9)
+++ 	(revision )
@@ -1,124 +1,0 @@
-/*
- * Copyright (c) 1983 Regents of the University of California.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms are permitted
- * provided that: (1) source distributions retain this entire copyright
- * notice and comment, and (2) distributions including binaries display
- * the following acknowledgement:  ``This product includes software
- * developed by the University of California, Berkeley and its contributors''
- * in the documentation or other materials provided with the distribution
- * and in all advertising materials mentioning features or use of this
- * software. Neither the name of the University nor the names of its
- * contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
- * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)getprotoent.c	5.7 (Berkeley) 6/1/90";
-#endif /* LIBC_SCCS and not lint */
-
-#include <ctype.h>
-#include <stdio.h>
-#include <stdlib.h>
-
-#ifdef _MINIX
-#include <net/gen/netdb.h>
-
-static char *any _ARGS(( char *cp, char *match ));
-#endif
-
-#define	MAXALIASES	35
-
-static FILE *protof = NULL;
-static char line[BUFSIZ+1];
-static struct protoent proto;
-static char *proto_aliases[MAXALIASES];
-int _proto_stayopen;
-
-void
-setprotoent(f)
-	int f;
-{
-	if (protof == NULL)
-		protof = fopen(_PATH_PROTOCOLS, "r" );
-	else
-		rewind(protof);
-	_proto_stayopen |= f;
-}
-
-void
-endprotoent()
-{
-	if (protof) {
-		fclose(protof);
-		protof = NULL;
-	}
-	_proto_stayopen = 0;
-}
-
-struct protoent *
-getprotoent()
-{
-	char *p;
-	register char *cp, **q;
-
-	if (protof == NULL && (protof = fopen(_PATH_PROTOCOLS, "r" )) == NULL)
-		return (NULL);
-again:
-	if ((p = fgets(line, BUFSIZ, protof)) == NULL)
-		return (NULL);
-	if (*p == '#')
-		goto again;
-	cp = any(p, "#\n");
-	if (cp == NULL)
-		goto again;
-	*cp = '\0';
-	proto.p_name = p;
-	cp = any(p, " \t");
-	if (cp == NULL)
-		goto again;
-	*cp++ = '\0';
-	while (*cp == ' ' || *cp == '\t')
-		cp++;
-	p = any(cp, " \t");
-	if (p != NULL)
-		*p++ = '\0';
-	proto.p_proto = atoi(cp);
-	q = proto.p_aliases = proto_aliases;
-	if (p != NULL) {
-		cp = p;
-		while (cp && *cp) {
-			if (*cp == ' ' || *cp == '\t') {
-				cp++;
-				continue;
-			}
-			if (q < &proto_aliases[MAXALIASES - 1])
-				*q++ = cp;
-			cp = any(cp, " \t");
-			if (cp != NULL)
-				*cp++ = '\0';
-		}
-	}
-	*q = NULL;
-	return (&proto);
-}
-
-static char *
-any(cp, match)
-	register char *cp;
-	char *match;
-{
-	register char *mp, c;
-
-	while (c = *cp) {
-		for (mp = match; *mp; mp++)
-			if (*mp == c)
-				return (cp);
-		cp++;
-	}
-	return ((char *)0);
-}
Index: trunk/minix/lib/ip/getprotoname.c
===================================================================
--- trunk/minix/lib/ip/getprotoname.c	(revision 9)
+++ 	(revision )
@@ -1,62 +1,0 @@
-/*
- * Copyright (c) 1983, 1993
- *	The Regents of the University of California.  All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- *    must display the following acknowledgement:
- *	This product includes software developed by the University of
- *	California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- *    may be used to endorse or promote products derived from this software
- *    without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)getprotoname.c	8.1 (Berkeley) 6/4/93";
-#endif /* LIBC_SCCS and not lint */
-
-#include <netdb.h>
-#include <string.h>
-
-extern int _proto_stayopen;
-
-struct protoent *
-getprotobyname(name)
-	register const char *name;
-{
-	register struct protoent *p;
-	register char **cp;
-
-	setprotoent(_proto_stayopen);
-	while ( (p = getprotoent()) ) {
-		if (strcmp(p->p_name, name) == 0)
-			break;
-		for (cp = p->p_aliases; *cp != 0; cp++)
-			if (strcmp(*cp, name) == 0)
-				goto found;
-	}
-found:
-	if (!_proto_stayopen)
-		endprotoent();
-	return (p);
-}
Index: trunk/minix/lib/ip/getservent.c
===================================================================
--- trunk/minix/lib/ip/getservent.c	(revision 9)
+++ 	(revision )
@@ -1,126 +1,0 @@
-/*
- * Copyright (c) 1983 Regents of the University of California.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms are permitted
- * provided that: (1) source distributions retain this entire copyright
- * notice and comment, and (2) distributions including binaries display
- * the following acknowledgement:  ``This product includes software
- * developed by the University of California, Berkeley and its contributors''
- * in the documentation or other materials provided with the distribution
- * and in all advertising materials mentioning features or use of this
- * software. Neither the name of the University nor the names of its
- * contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
- * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)getservent.c	5.8 (Berkeley) 6/1/90";
-#endif /* LIBC_SCCS and not lint */
-
-#include <sys/types.h>
-#include <ctype.h>
-#include <stdio.h>
-#include <stdlib.h>
-
-#include <net/hton.h>
-#include <net/gen/netdb.h>
-
-#define	MAXALIASES	35
-
-static FILE *servf = NULL;
-static char line[BUFSIZ+1];
-static struct servent serv;
-static char *serv_aliases[MAXALIASES];
-int _serv_stayopen;
-
-static char *any _ARGS(( char *cp, char *match ));
-
-void
-setservent(f)
-	int f;
-{
-	if (servf == NULL)
-		servf = fopen(_PATH_SERVICES, "r" );
-	else
-		rewind(servf);
-	_serv_stayopen |= f;
-}
-
-void
-endservent()
-{
-	if (servf) {
-		fclose(servf);
-		servf = NULL;
-	}
-	_serv_stayopen = 0;
-}
-
-struct servent *
-getservent()
-{
-	char *p;
-	register char *cp, **q;
-
-	if (servf == NULL && (servf = fopen(_PATH_SERVICES, "r" )) == NULL)
-		return (NULL);
-again:
-	if ((p = fgets(line, BUFSIZ, servf)) == NULL)
-		return (NULL);
-	if (*p == '#')
-		goto again;
-	cp = any(p, "#\n");
-	if (cp == NULL)
-		goto again;
-	*cp = '\0';
-	serv.s_name = p;
-	p = any(p, " \t");
-	if (p == NULL)
-		goto again;
-	*p++ = '\0';
-	while (*p == ' ' || *p == '\t')
-		p++;
-	cp = any(p, ",/");
-	if (cp == NULL)
-		goto again;
-	*cp++ = '\0';
-	serv.s_port = htons((u16_t)atoi(p));
-	serv.s_proto = cp;
-	q = serv.s_aliases = serv_aliases;
-	cp = any(cp, " \t");
-	if (cp != NULL)
-		*cp++ = '\0';
-	while (cp && *cp) {
-		if (*cp == ' ' || *cp == '\t') {
-			cp++;
-			continue;
-		}
-		if (q < &serv_aliases[MAXALIASES - 1])
-			*q++ = cp;
-		cp = any(cp, " \t");
-		if (cp != NULL)
-			*cp++ = '\0';
-	}
-	*q = NULL;
-	return (&serv);
-}
-
-static char *
-any(cp, match)
-	register char *cp;
-	char *match;
-{
-	register char *mp, c;
-
-	while (c = *cp) {
-		for (mp = match; *mp; mp++)
-			if (*mp == c)
-				return (cp);
-		cp++;
-	}
-	return ((char *)0);
-}
Index: trunk/minix/lib/ip/getsockname.c
===================================================================
--- trunk/minix/lib/ip/getsockname.c	(revision 9)
+++ 	(revision )
@@ -1,79 +1,0 @@
-/*
-
-   getsockname()
-
-   from socket emulation library for Minix 2.0.x
-
-*/
-
-
-#include <errno.h>
-#include <stdio.h>
-#include <string.h>
-#include <sys/ioctl.h>
-#include <sys/socket.h>
-#include <netinet/in.h>
-
-#include <net/gen/in.h>
-#include <net/gen/tcp.h>
-#include <net/gen/tcp_io.h>
-#include <net/gen/udp.h>
-#include <net/gen/udp_io.h>
-
-
-/*
-#define DEBUG 0
-*/
-
-/*
-   getsockname...
-*/
-int getsockname(int fd, struct sockaddr *_RESTRICT address, 
-   socklen_t *_RESTRICT address_len)
-{
-	nwio_tcpconf_t tcpconf;
-	socklen_t len;
-	struct sockaddr_in sin;
-
-#ifdef DEBUG
-	fprintf(stderr,"mnx_getsockname: ioctl fd %d.\n", fd);
-#endif
-	if (ioctl(fd, NWIOGTCPCONF, &tcpconf)==-1) {
-#ifdef DEBUG
-	   fprintf(stderr,"mnx_getsockname: error %d\n", errno);
-#endif
-	   return (-1);
-	   }
-#ifdef DEBUG1
-	fprintf(stderr, "mnx_getsockname: from %s, %u",
-			inet_ntoa(tcpconf.nwtc_remaddr),
-			ntohs(tcpconf.nwtc_remport));
-	fprintf(stderr," for %s, %u\n",
-			inet_ntoa(tcpconf.nwtc_locaddr),
-			ntohs(tcpconf.nwtc_locport));
-#endif
-/*
-	addr->sin_addr.s_addr = tcpconf.nwtc_remaddr ;
-	addr->sin_port = tcpconf.nwtc_locport;
-*/
-	memset(&sin, '\0', sizeof(sin));
-	sin.sin_family= AF_INET;
-	sin.sin_addr.s_addr= tcpconf.nwtc_locaddr ;
-	sin.sin_port= tcpconf.nwtc_locport;
-
-	len= *address_len;
-	if (len > sizeof(sin))
-		len= sizeof(sin);
-	memcpy(address, &sin, len);
-	*address_len= len;
-
-	return 0;
-}
-
-
-
-
-
-
-
-
Index: trunk/minix/lib/ip/getsockopt.c
===================================================================
--- trunk/minix/lib/ip/getsockopt.c	(revision 9)
+++ 	(revision )
@@ -1,141 +1,0 @@
-#include <assert.h>
-#include <errno.h>
-#include <stdio.h>
-#include <string.h>
-#include <sys/ioctl.h>
-#include <sys/socket.h>
-#include <sys/types.h>
-#include <netinet/tcp.h>
-
-#include <net/gen/in.h>
-#include <net/gen/tcp.h>
-#include <net/gen/tcp_io.h>
-#include <net/gen/udp.h>
-#include <net/gen/udp_io.h>
-
-#define DEBUG 0
-
-static int _tcp_getsockopt(int socket, int level, int option_name,
-	void *_RESTRICT option_value, socklen_t *_RESTRICT option_len);
-static int _udp_getsockopt(int socket, int level, int option_name,
-	void *_RESTRICT option_value, socklen_t *_RESTRICT option_len);
-
-int getsockopt(int socket, int level, int option_name,
-        void *_RESTRICT option_value, socklen_t *_RESTRICT option_len)
-{
-	int r;
-	nwio_tcpopt_t tcpopt;
-	nwio_udpopt_t udpopt;
-
-	r= ioctl(socket, NWIOGTCPOPT, &tcpopt);
-	if (r != -1 || errno != ENOTTY)
-	{
-		if (r == -1)
-		{
-			/* Bad file descriptor */
-			return -1;
-		}
-		return _tcp_getsockopt(socket, level, option_name,
-			option_value, option_len);
-	}
-
-	r= ioctl(socket, NWIOGUDPOPT, &udpopt);
-	if (r != -1 || errno != ENOTTY)
-	{
-		if (r == -1)
-		{
-			/* Bad file descriptor */
-			return -1;
-		}
-		return _udp_getsockopt(socket, level, option_name,
-			option_value, option_len);
-	}
-
-#if DEBUG
-	fprintf(stderr, "getsockopt: not implemented for fd %d\n", socket);
-#endif
-	errno= ENOTSOCK;
-	return -1;
-}
-
-static int _tcp_getsockopt(int socket, int level, int option_name,
-	void *_RESTRICT option_value, socklen_t *_RESTRICT option_len)
-{
-	int i, r, err;
-
-	if (level == SOL_SOCKET && option_name == SO_KEEPALIVE)
-	{
-		i= 1;	/* Keepalive is always on */
-		if (*option_len < sizeof(i))
-			memcpy(option_value, &i, *option_len);
-		else
-			memcpy(option_value, &i, sizeof(i));
-		*option_len= sizeof(i);
-		return 0;
-	}
-	if (level == SOL_SOCKET && option_name == SO_ERROR)
-	{
-		r= ioctl(socket, NWIOTCPGERROR, &err);
-		if (r != 0)
-			return r;
-		if (*option_len < sizeof(err))
-			memcpy(option_value, &err, *option_len);
-		else
-			memcpy(option_value, &err, sizeof(err));
-		*option_len= sizeof(err);
-		return 0;
-	}
-	if (level == SOL_SOCKET && option_name == SO_RCVBUF)
-	{
-		i= 32*1024;	/* Receive buffer in the current
-				 * implementation
-				 */
-		if (*option_len < sizeof(i))
-			memcpy(option_value, &i, *option_len);
-		else
-			memcpy(option_value, &i, sizeof(i));
-		*option_len= sizeof(i);
-		return 0;
-	}
-	if (level == SOL_SOCKET && option_name == SO_SNDBUF)
-	{
-		i= 32*1024;	/* Send buffer in the current implementation */
-		if (*option_len < sizeof(i))
-			memcpy(option_value, &i, *option_len);
-		else
-			memcpy(option_value, &i, sizeof(i));
-		*option_len= sizeof(i);
-		return 0;
-	}
-	if (level == IPPROTO_TCP && option_name == TCP_NODELAY)
-	{
-		i= 0;	/* nodelay is always off */
-		if (*option_len < sizeof(i))
-			memcpy(option_value, &i, *option_len);
-		else
-			memcpy(option_value, &i, sizeof(i));
-		*option_len= sizeof(i);
-		return 0;
-	}
-#if DEBUG
-	fprintf(stderr, "_tcp_getsocketopt: level %d, name %d\n",
-		level, option_name);
-#endif
-
-	errno= ENOPROTOOPT;
-	return -1;
-}
-
-static int _udp_getsockopt(int socket, int level, int option_name,
-	void *_RESTRICT option_value, socklen_t *_RESTRICT option_len)
-{
-	int i;
-
-#if DEBUG
-	fprintf(stderr, "_udp_getsocketopt: level %d, name %d\n",
-		level, option_name);
-#endif
-
-	errno= ENOSYS;
-	return -1;
-}
Index: trunk/minix/lib/ip/getsrvbyname.c
===================================================================
--- trunk/minix/lib/ip/getsrvbyname.c	(revision 9)
+++ 	(revision )
@@ -1,52 +1,0 @@
-/*
- * Copyright (c) 1983 Regents of the University of California.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms are permitted
- * provided that: (1) source distributions retain this entire copyright
- * notice and comment, and (2) distributions including binaries display
- * the following acknowledgement:  ``This product includes software
- * developed by the University of California, Berkeley and its contributors''
- * in the documentation or other materials provided with the distribution
- * and in all advertising materials mentioning features or use of this
- * software. Neither the name of the University nor the names of its
- * contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
- * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)getservbyname.c	5.6 (Berkeley) 6/1/90";
-#endif /* LIBC_SCCS and not lint */
-
-#include <string.h>
-
-#include <net/gen/netdb.h>
-
-extern int _serv_stayopen;
-
-struct servent *
-getservbyname(name, proto)
-	const char *name, *proto;
-{
-	register struct servent *p;
-	register char **cp;
-
-	setservent(_serv_stayopen);
-	while (p = getservent()) {
-		if (strcmp(name, p->s_name) == 0)
-			goto gotname;
-		for (cp = p->s_aliases; *cp; cp++)
-			if (strcmp(name, *cp) == 0)
-				goto gotname;
-		continue;
-gotname:
-		if (proto == 0 || strcmp(p->s_proto, proto) == 0)
-			break;
-	}
-	if (!_serv_stayopen)
-		endservent();
-	return (p);
-}
Index: trunk/minix/lib/ip/getsrvbyport.c
===================================================================
--- trunk/minix/lib/ip/getsrvbyport.c	(revision 9)
+++ 	(revision )
@@ -1,50 +1,0 @@
-/*
- * Copyright (c) 1983 Regents of the University of California.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms are permitted
- * provided that: (1) source distributions retain this entire copyright
- * notice and comment, and (2) distributions including binaries display
- * the following acknowledgement:  ``This product includes software
- * developed by the University of California, Berkeley and its contributors''
- * in the documentation or other materials provided with the distribution
- * and in all advertising materials mentioning features or use of this
- * software. Neither the name of the University nor the names of its
- * contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
- * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)getservbyport.c	5.6 (Berkeley) 6/1/90";
-#endif /* LIBC_SCCS and not lint */
-
-#include <stddef.h>
-#include <string.h>
-
-#ifdef _MINIX
-#include <net/gen/netdb.h>
-#endif
-
-extern int _serv_stayopen;
-
-struct servent *
-getservbyport(port, proto)
-	int port;
-	const char *proto;
-{
-	register struct servent *p;
-
-	setservent(_serv_stayopen);
-	while (p = getservent()) {
-		if (p->s_port != port)
-			continue;
-		if (proto == 0 || strcmp(p->s_proto, proto) == 0)
-			break;
-	}
-	if (!_serv_stayopen)
-		endservent();
-	return (p);
-}
Index: trunk/minix/lib/ip/hton.c
===================================================================
--- trunk/minix/lib/ip/hton.c	(revision 9)
+++ 	(revision )
@@ -1,18 +1,0 @@
-/*
-hton.c
-*/
-
-#include <sys/types.h>
-#include <minix/config.h>
-#include <net/hton.h>
-
-u16_t _tmp;
-u32_t _tmp_l;
-
-#if _WORD_SIZE > 2
-u16_t (htons)(u16_t x) { return HTONS(x); }
-u16_t (ntohs)(u16_t x) { return NTOHS(x); }
-u32_t (htonl)(u32_t x) { return HTONL(x); }
-u32_t (ntohl)(u32_t x) { return NTOHL(x); }
-#endif
-
Index: trunk/minix/lib/ip/inet_addr.c
===================================================================
--- trunk/minix/lib/ip/inet_addr.c	(revision 9)
+++ 	(revision )
@@ -1,149 +1,0 @@
-/*
- * Copyright (c) 1983, 1990 Regents of the University of California.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms are permitted provided
- * that: (1) source distributions retain this entire copyright notice and
- * comment, and (2) distributions including binaries display the following
- * acknowledgement:  ``This product includes software developed by the
- * University of California, Berkeley and its contributors'' in the
- * documentation or other materials provided with the distribution and in
- * all advertising materials mentioning features or use of this software.
- * Neither the name of the University nor the names of its contributors may
- * be used to endorse or promote products derived from this software without
- * specific prior written permission.
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED
- * WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)inet_addr.c	5.8 (Berkeley) 6/23/90";
-#endif /* LIBC_SCCS and not lint */
-
-#if _MINIX
-#include <sys/types.h>
-#include <ctype.h>
-#include <errno.h>
-
-#include <net/hton.h>
-#include <net/gen/in.h>
-#include <net/gen/inet.h>
-#endif
-
-#ifdef __STDC__
-#define _CONST	const
-#else
-#define _CONST
-#endif
-
-/*
- * Ascii internet address interpretation routine.
- * The value returned is in network order.
- */
-ipaddr_t
-inet_addr(cp)
-	register _CONST char *cp;
-{
-	ipaddr_t val;
-
-	if (inet_aton(cp, &val))
-		return (val);
-	errno= EINVAL;
-	return (ipaddr_t)-1;
-}
-
-/* 
- * Check whether "cp" is a valid ascii representation
- * of an Internet address and convert to a binary address.
- * Returns 1 if the address is valid, 0 if not.
- * This replaces inet_addr, the return value from which
- * cannot distinguish between failure and a local broadcast address.
- */
-
-int
-inet_aton(cp, addr)
-	register _CONST char *cp;
-	ipaddr_t *addr;
-{
-	register u32_t val, base, n;
-	register char c;
-	u32_t parts[4], *pp = parts;
-
-	for (;;) {
-		/*
-		 * Collect number up to ``.''.
-		 * Values are specified as for C:
-		 * 0x=hex, 0=octal, other=decimal.
-		 */
-		val = 0; base = 10;
-		if (*cp == '0') {
-			if (*++cp == 'x' || *cp == 'X')
-				base = 16, cp++;
-			else
-				base = 8;
-		}
-		while ((c = *cp) != '\0') {
-			if (isascii(c) && isdigit(c)) {
-				val = (val * base) + (c - '0');
-				cp++;
-				continue;
-			}
-			if (base == 16 && isascii(c) && isxdigit(c)) {
-				val = (val << 4) + 
-					(c + 10 - (islower(c) ? 'a' : 'A'));
-				cp++;
-				continue;
-			}
-			break;
-		}
-		if (*cp == '.') {
-			/*
-			 * Internet format:
-			 *	a.b.c.d
-			 *	a.b.c	(with c treated as 16-bits)
-			 *	a.b	(with b treated as 24 bits)
-			 */
-			if (pp >= parts + 3 || val > 0xff)
-				return (0);
-			*pp++ = val, cp++;
-		} else
-			break;
-	}
-	/*
-	 * Check for trailing characters.
-	 */
-	if (*cp && (!isascii(*cp) || !isspace(*cp)))
-		return (0);
-	/*
-	 * Concoct the address according to
-	 * the number of parts specified.
-	 */
-	n = pp - parts + 1;
-	switch (n) {
-
-	case 1:				/* a -- 32 bits */
-		break;
-
-	case 2:				/* a.b -- 8.24 bits */
-		if (val > 0xffffff)
-			return (0);
-		val |= parts[0] << 24;
-		break;
-
-	case 3:				/* a.b.c -- 8.8.16 bits */
-		if (val > 0xffff)
-			return (0);
-		val |= (parts[0] << 24) | (parts[1] << 16);
-		break;
-
-	case 4:				/* a.b.c.d -- 8.8.8.8 bits */
-		if (val > 0xff)
-			return (0);
-		val |= (parts[0] << 24) | (parts[1] << 16) | (parts[2] << 8);
-		break;
-	}
-	if (addr)
-		*addr = htonl(val);
-	return (1);
-}
Index: trunk/minix/lib/ip/inet_network.c
===================================================================
--- trunk/minix/lib/ip/inet_network.c	(revision 9)
+++ 	(revision )
@@ -1,95 +1,0 @@
-/*
- * Copyright (c) 1983, 1993
- *	The Regents of the University of California.  All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- *    must display the following acknowledgement:
- *	This product includes software developed by the University of
- *	California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- *    may be used to endorse or promote products derived from this software
- *    without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)inet_network.c	8.1 (Berkeley) 6/4/93";
-#endif /* LIBC_SCCS and not lint */
-
-#include <sys/types.h>
-#include <ctype.h>
-#include <net/gen/in.h>
-#include <net/gen/inet.h>
-
-#define INADDR_NONE	((ipaddr_t) -1)
-
-/*
- * Internet network address interpretation routine.
- * The library routines call this routine to interpret
- * network numbers.
- */
-ipaddr_t
-inet_network(cp)
-	register const char *cp;
-{
-	register ipaddr_t val, base, n;
-	register char c;
-	ipaddr_t parts[4], *pp = parts;
-	register int i;
-
-again:
-	val = 0; base = 10;
-	if (*cp == '0')
-		base = 8, cp++;
-	if (*cp == 'x' || *cp == 'X')
-		base = 16, cp++;
-	while (c = *cp) {
-		if (isdigit(c)) {
-			val = (val * base) + (c - '0');
-			cp++;
-			continue;
-		}
-		if (base == 16 && isxdigit(c)) {
-			val = (val << 4) + (c + 10 - (islower(c) ? 'a' : 'A'));
-			cp++;
-			continue;
-		}
-		break;
-	}
-	if (*cp == '.') {
-		if (pp >= parts + 4)
-			return (INADDR_NONE);
-		*pp++ = val, cp++;
-		goto again;
-	}
-	if (*cp && !isspace(*cp))
-		return (INADDR_NONE);
-	*pp++ = val;
-	n = pp - parts;
-	if (n > 4)
-		return (INADDR_NONE);
-	for (val = 0, i = 0; i < n; i++) {
-		val <<= 8;
-		val |= parts[i] & 0xff;
-	}
-	return (val);
-}
Index: trunk/minix/lib/ip/inet_ntoa.c
===================================================================
--- trunk/minix/lib/ip/inet_ntoa.c	(revision 9)
+++ 	(revision )
@@ -1,45 +1,0 @@
-/*
- * Copyright (c) 1983 Regents of the University of California.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms are permitted
- * provided that: (1) source distributions retain this entire copyright
- * notice and comment, and (2) distributions including binaries display
- * the following acknowledgement:  ``This product includes software
- * developed by the University of California, Berkeley and its contributors''
- * in the documentation or other materials provided with the distribution
- * and in all advertising materials mentioning features or use of this
- * software. Neither the name of the University nor the names of its
- * contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
- * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)inet_ntoa.c	5.5 (Berkeley) 6/1/90";
-#endif /* LIBC_SCCS and not lint */
-
-/*
- * Convert network-format internet address
- * to base 256 d.d.d.d representation.
- */
-
-#include <sys/types.h>
-#include <stdio.h>
-
-#include <net/gen/in.h>
-#include <net/gen/inet.h>
-
-char *
-inet_ntoa(in)
-	ipaddr_t in;
-{
-	static char b[18];
-	register u8_t *p;
-
-	p = (u8_t *)&in;
-	sprintf(b, "%d.%d.%d.%d", p[0], p[1], p[2], p[3]);
-	return (b);
-}
Index: trunk/minix/lib/ip/listen.c
===================================================================
--- trunk/minix/lib/ip/listen.c	(revision 9)
+++ 	(revision )
@@ -1,30 +1,0 @@
-#include <errno.h>
-#include <stdio.h>
-#include <string.h>
-#include <sys/ioctl.h>
-#include <sys/socket.h>
-#include <netinet/in.h>
-
-#include <net/gen/in.h>
-#include <net/gen/tcp.h>
-#include <net/gen/tcp_io.h>
-#include <net/gen/udp.h>
-#include <net/gen/udp_io.h>
-
-#define DEBUG 0
-
-int listen(int socket, int backlog)
-{
-	int r;
-
-	r= ioctl(socket, NWIOTCPLISTENQ, &backlog);
-	if (r != -1 || errno != EBADIOCTL)
-		return r;
-
-#if DEBUG
-	fprintf(stderr, "listen: not implemented for fd %d\n", socket);
-#endif
-	errno= ENOSYS;
-	return -1;
-}
-
Index: trunk/minix/lib/ip/memcspn.c
===================================================================
--- trunk/minix/lib/ip/memcspn.c	(revision 9)
+++ 	(revision )
@@ -1,22 +1,0 @@
-/*
- * (c) copyright 1987 by the Vrije Universiteit, Amsterdam, The Netherlands.
- * See the copyright notice in the ACK home directory, in the file "Copyright".
- */
-/* $Header: /cvsup/minix/src/lib/ip/memcspn.c,v 1.1.1.1 2005/04/21 14:56:18 beng Exp $ */
-
-#include	<string.h>
-
-size_t
-memcspn(const char *string, size_t strlen, const char *notin, size_t notinlen)
-{
-	register const char *s1, *s2;
-	int i,j;
-
-	for (s1 = string, i = 0; i<strlen; s1++, i++) {
-		for(s2 = notin, j = 0; *s2 != *s1 && j < notinlen; s2++, j++)
-			/* EMPTY */ ;
-		if (j != notinlen)
-			break;
-	}
-	return s1 - string;
-}
Index: trunk/minix/lib/ip/oneC_sum.c
===================================================================
--- trunk/minix/lib/ip/oneC_sum.c	(revision 9)
+++ 	(revision )
@@ -1,61 +1,0 @@
-/*	oneC_sum() - One complement's checksum		Author: Kees J. Bot
- *								8 May 1995
- * See RFC 1071, "Computing the Internet checksum"
- */
-
-#include <sys/types.h>
-#include <net/gen/oneCsum.h>
-
-u16_t oneC_sum(U16_t prev, void *data, size_t size)
-{
-	u8_t *dptr;
-	size_t n;
-	u16_t word;
-	u32_t sum;
-	int swap= 0;
-
-	sum= prev;
-	dptr= data;
-	n= size;
-
-	swap= ((size_t) dptr & 1);
-	if (swap) {
-		sum= ((sum & 0xFF) << 8) | ((sum & 0xFF00) >> 8);
-		if (n > 0) {
-			((u8_t *) &word)[0]= 0;
-			((u8_t *) &word)[1]= dptr[0];
-			sum+= (u32_t) word;
-			dptr+= 1;
-			n-= 1;
-		}
-	}
-
-	while (n >= 8) {
-		sum+= (u32_t) ((u16_t *) dptr)[0]
-		    + (u32_t) ((u16_t *) dptr)[1]
-		    + (u32_t) ((u16_t *) dptr)[2]
-		    + (u32_t) ((u16_t *) dptr)[3];
-		dptr+= 8;
-		n-= 8;
-	}
-
-	while (n >= 2) {
-		sum+= (u32_t) ((u16_t *) dptr)[0];
-		dptr+= 2;
-		n-= 2;
-	}
-
-	if (n > 0) {
-		((u8_t *) &word)[0]= dptr[0];
-		((u8_t *) &word)[1]= 0;
-		sum+= (u32_t) word;
-	}
-
-	sum= (sum & 0xFFFF) + (sum >> 16);
-	if (sum > 0xFFFF) sum++;
-
-	if (swap) {
-		sum= ((sum & 0xFF) << 8) | ((sum & 0xFF00) >> 8);
-	}
-	return sum;
-}
Index: trunk/minix/lib/ip/rcmd.c
===================================================================
--- trunk/minix/lib/ip/rcmd.c	(revision 9)
+++ 	(revision )
@@ -1,284 +1,0 @@
-/*
- * Copyright (c) 1983 Regents of the University of California.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms are permitted
- * provided that: (1) source distributions retain this entire copyright
- * notice and comment, and (2) distributions including binaries display
- * the following acknowledgement:  ``This product includes software
- * developed by the University of California, Berkeley and its contributors''
- * in the documentation or other materials provided with the distribution
- * and in all advertising materials mentioning features or use of this
- * software. Neither the name of the University nor the names of its
- * contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
- * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)rcmd.c	5.22 (Berkeley) 6/1/90";
-#endif /* LIBC_SCCS and not lint */
-
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <sys/ioctl.h>
-#include <ctype.h>
-#include <errno.h>
-#include <fcntl.h>
-#include <limits.h>
-#include <pwd.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <signal.h>
-#include <string.h>
-#include <unistd.h>
-#include <net/gen/netdb.h>
-#include <net/gen/in.h>
-#include <net/gen/tcp.h>
-#include <net/gen/tcp_io.h>
-#include <net/hton.h>
-#include <net/netlib.h>
-
-#define MAXHOSTNAMELEN	256
-#define MAXPATHLEN PATH_MAX
-
-#ifdef __STDC__
-#define CONST	const
-#else
-#define CONST
-#endif
-
-extern	errno;
-
-int rcmd(ahost, rport, locuser, remuser, cmd, fd2p)
-char **ahost;
-int rport;
-CONST char *locuser, *remuser, *cmd;
-int *fd2p;
-{
-	int fd, fd2, result;
-	struct hostent *hp;
-	int n;
-	static tcpport_t lport;
-	nwio_tcpconf_t tcpconf;
-	nwio_tcpcl_t tcpconnopt;
-	pid_t pid;
-	char num[8];
-	char c;
-	char *tcp_device;
-
-	fd= -1;
-	fd2= -1;
-
-	if (lport == 0) {
-		pid = getpid();
-		lport = 1;
-		do {
-			lport = (lport << 1) | (pid & 1);
-
-			pid >>= 1;
-		} while (lport < TCPPORT_RESERVED/2);
-	}
-
-	tcp_device= getenv("TCP_DEVICE");
-	if (tcp_device == NULL)
-		tcp_device= TCP_DEVICE;
-	hp= gethostbyname(*ahost);
-	if (!hp)
-	{
-		fprintf(stderr, "%s: unknown host\n", *ahost);
-		return -1;
-	}
-	*ahost= hp->h_name;
-	n = TCPPORT_RESERVED/2;
-	do
-	{
-		if (--lport < TCPPORT_RESERVED/2)
-			lport = TCPPORT_RESERVED-1;
-		fd= open (tcp_device, O_RDWR);
-		if (fd<0)
-		{
-			fprintf(stderr, "unable to open %s: %s\n",
-				tcp_device, strerror(errno));
-			goto bad;
-		}
-		tcpconf.nwtc_flags= NWTC_LP_SET | NWTC_SET_RA | NWTC_SET_RP |
-			NWTC_EXCL;
-		tcpconf.nwtc_locport= htons(lport);
-		tcpconf.nwtc_remport= rport;
-		tcpconf.nwtc_remaddr= *(ipaddr_t *)hp->h_addr;
-
-		result= ioctl(fd, NWIOSTCPCONF, &tcpconf);
-		if (result<0)
-		{
-			if (errno == EADDRINUSE)
-			{
-				close(fd);
-				continue;
-			}
-			fprintf(stderr, "unable to ioctl(NWIOSTCPCONF): %s\n",
-				strerror(errno));
-			goto bad;
-		}
-		tcpconf.nwtc_flags= NWTC_SHARED;
-		result= ioctl(fd, NWIOSTCPCONF, &tcpconf);
-		if (result<0)
-		{
-			fprintf(stderr, "unable to ioctl(NWIOSTCPCONF): %s\n",
-				strerror(errno));
-			goto bad;
-		}
-		tcpconnopt.nwtcl_flags= 0;
-
-		do
-		{
-			result= ioctl (fd, NWIOTCPCONN, &tcpconnopt);
-			if (result<0 && errno == EAGAIN)
-			{
-				sleep(2);
-			}
-		} while (result<0 && errno == EAGAIN);
-		if (result<0 && errno != EADDRINUSE)
-		{
-			fprintf(stderr,
-				"unable to ioctl(NWIOTCPCONN): %s\n",
-				strerror(errno));
-			goto bad;
-		}
-		if (result>=0)
-			break;
-	} while (--n > 0);
-	if (n == 0)
-	{
-		fprintf(stderr, "can't get port\n");
-		return -1;
-	}
-	if (!fd2p)
-	{
-		if (write(fd, "", 1) != 1)
-		{
-			fprintf(stderr, "unable to write: %s", strerror(errno));
-			goto bad;
-		}
-	}
-	else
-	{
-		fd2= open (tcp_device, O_RDWR);
-		if (fd2<0)
-		{
-			fprintf(stderr, "unable to open %s: %s\n",
-				tcp_device, strerror(errno));
-			goto bad;
-		}
-		tcpconf.nwtc_flags= NWTC_LP_SET | NWTC_UNSET_RA | 
-			NWTC_UNSET_RP | NWTC_SHARED;
-		tcpconf.nwtc_locport= htons(lport);
-
-		result= ioctl(fd2, NWIOSTCPCONF, &tcpconf);
-		if (result<0)
-		{
-			fprintf(stderr,
-				"unable to ioctl(NWIOSTCPCONF): %s\n",
-				strerror(errno));
-			goto bad;
-		}
-		pid= fork();
-		if (pid<0)
-		{
-			fprintf(stderr, "unable to fork: %s\n",
-				strerror(errno));
-			goto bad;
-		}
-		if (!pid)
-		{
-			alarm(0);
-			signal(SIGALRM, SIG_DFL);
-			alarm(30); /* give up after half a minute */
-			tcpconnopt.nwtcl_flags= 0;
-
-			do
-			{
-				result= ioctl (fd2, NWIOTCPLISTEN,
-					&tcpconnopt);
-				if (result<0 && errno == EAGAIN)
-				{
-					sleep(2);
-				}
-			} while (result<0 && errno == EAGAIN);
-			if (result<0 && errno != EADDRINUSE)
-			{
-				fprintf(stderr,
-					"unable to ioctl(NWIOTCPLISTEN): %s\n",
-					strerror(errno));
-				exit(1);
-			}
-			if (result>=0)
-				exit(0);
-			else
-				exit(1);
-		}
-		/*
-		 * This sleep is a HACK.  The command that we are starting
-		 * will try to connect to the fd2 port.  It seems that for
-		 * this to succeed the child process must have already made
-		 * the call to ioctl above (the NWIOTCPLISTEN) call.
-		 * The sleep gives the child a chance to make the call
-		 * before the parent sends the port number to the
-		 * command being started.
-		 */
-		sleep(1);
-
-		sprintf(num, "%d", lport);
-		if (write(fd, num, strlen(num)+1) != strlen(num)+1)
-		{
-			fprintf(stderr, "unable to write: %s\n",
-				strerror(errno));
-			goto bad;
-		}
-
-	}
-	write (fd, locuser, strlen(locuser)+1);
-	write (fd, remuser, strlen(remuser)+1);
-	write (fd, cmd, strlen(cmd)+1);
-	if (read(fd, &c, 1) != 1)
-	{
-		fprintf(stderr, "unable to read: %s\n", strerror(errno) );
-		goto bad;
-	}
-	if (c != 0)
-	{
-		while (read(fd, &c, 1) == 1)
-		{
-			write(2, &c, 1);
-			if (c == '\n')
-				break;
-		}
-		goto bad;
-	}
-	if (fd2p)
-	{
-		*fd2p= fd2;
-		result= ioctl(fd2, NWIOGTCPCONF, &tcpconf);
-		if (result<0)
-		{
-			fprintf(stderr, "unable to ioctl(NWIOGTCPCONF): %s\n",
-				strerror(errno) );
-			goto bad;
-		}
-		if (ntohs(tcpconf.nwtc_remport) >= TCPPORT_RESERVED)
-		{
-			fprintf(stderr, "unable to setup 2nd channel\n");
-			goto bad;
-		}
-	}
-	return fd;
-
-bad:
-	if (fd>=0)
-		close(fd);
-	if (fd2>=0)
-		close(fd2);
-	return -1;
-}
Index: trunk/minix/lib/ip/recv.c
===================================================================
--- trunk/minix/lib/ip/recv.c	(revision 9)
+++ 	(revision )
@@ -1,8 +1,0 @@
-#include <stdlib.h>
-#include <sys/socket.h>
-
-ssize_t recv(int socket, void *buffer, size_t length, int flags)
-{
-	return recvfrom(socket, buffer, length, flags, NULL, NULL);
-}
-
Index: trunk/minix/lib/ip/recvfrom.c
===================================================================
--- trunk/minix/lib/ip/recvfrom.c	(revision 9)
+++ 	(revision )
@@ -1,125 +1,0 @@
-#undef NDEBUG
-
-#include <assert.h>
-#include <errno.h>
-#include <stdlib.h>
-#include <stdio.h>
-#include <string.h>
-#include <unistd.h>
-#include <sys/ioctl.h>
-#include <sys/socket.h>
-#include <netinet/in.h>
-
-#include <net/gen/in.h>
-#include <net/gen/udp.h>
-#include <net/gen/udp_hdr.h>
-#include <net/gen/udp_io.h>
-
-#define DEBUG 0
-
-static ssize_t _udp_recvfrom(int socket, void *_RESTRICT buffer, size_t length,
-	int flags, struct sockaddr *_RESTRICT address,
-	socklen_t *_RESTRICT address_len, nwio_udpopt_t *udpoptp);
-
-ssize_t recvfrom(int socket, void *_RESTRICT buffer, size_t length,
-	int flags, struct sockaddr *_RESTRICT address,
-	socklen_t *_RESTRICT address_len)
-{
-	int r;
-	nwio_udpopt_t udpopt;
-
-	fprintf(stderr, "recvfrom: for fd %d\n", socket);
-
-	r= ioctl(socket, NWIOGUDPOPT, &udpopt);
-	if (r != -1 || (errno != ENOTTY && errno != EBADIOCTL))
-	{
-		if (r == -1)
-			return r;
-		return _udp_recvfrom(socket, buffer, length, flags,
-			address, address_len, &udpopt);
-	}
-
-#if DEBUG
-	fprintf(stderr, "recvfrom: not implemented for fd %d\n", socket);
-#endif
-	errno= ENOSYS;
-	assert(0);
-	return -1;
-}
-
-static ssize_t _udp_recvfrom(int socket, void *_RESTRICT buffer, size_t length,
-	int flags, struct sockaddr *_RESTRICT address,
-	socklen_t *_RESTRICT address_len, nwio_udpopt_t *udpoptp)
-{
-	int r, t_errno;
-	size_t buflen, len;
-	void *buf;
-	struct sockaddr_in *sinp;
-	udp_io_hdr_t *io_hdrp;
-	struct sockaddr_in sin;
-
-	if (flags)
-	{
-#if DEBUG
-		fprintf(stderr, "recvfrom(udp): flags not implemented\n");
-#endif
-		errno= ENOSYS;
-		return -1;
-	}
-
-	if (udpoptp->nwuo_flags & NWUO_RWDATONLY)
-	{
-#if DEBUG
-		fprintf(stderr,
-			"recvfrom(udp): NWUO_RWDATONLY not implemented\n");
-#endif
-		errno= ENOSYS;
-		return -1;
-	}
-
-	buflen= sizeof(*io_hdrp) + length;
-	if (buflen < length)
-	{	
-		/* Overflow */
-		errno= EMSGSIZE;
-		return -1;
-	}
-	buf= malloc(buflen);
-	if (buf == NULL)
-		return -1;
-
-	r= read(socket, buf, buflen);
-	if (r == -1)
-	{
-		t_errno= errno;
-#if DEBUG
-		fprintf(stderr, "recvfrom(udp): read failed: %s\n",
-			strerror(errno));
-		fprintf(stderr, "udp opt flags = 0x%x\n", udpoptp->nwuo_flags);
-#endif
-		free(buf);
-		errno= t_errno;
-		return -1;
-	}
-
-	assert(r >= sizeof(*io_hdrp));
-	length= r-sizeof(*io_hdrp);
-
-	io_hdrp= buf;
-	memcpy(buffer, &io_hdrp[1], length);
-
-	if (address != NULL)
-	{
-		sin.sin_family= AF_INET;
-		sin.sin_addr.s_addr= io_hdrp->uih_src_addr;
-		sin.sin_port= io_hdrp->uih_src_port;
-		len= *address_len;
-		if (len > sizeof(sin))
-			len= sizeof(sin);
-		memcpy(address, &sin, len);
-		*address_len= sizeof(sin);
-	}	
-	free(buf);
-	return length;
-}
-
Index: trunk/minix/lib/ip/res_comp.c
===================================================================
--- trunk/minix/lib/ip/res_comp.c	(revision 9)
+++ 	(revision )
@@ -1,347 +1,0 @@
-/*
- * Copyright (c) 1985 Regents of the University of California.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms are permitted provided
- * that: (1) source distributions retain this entire copyright notice and
- * comment, and (2) distributions including binaries display the following
- * acknowledgement:  ``This product includes software developed by the
- * University of California, Berkeley and its contributors'' in the
- * documentation or other materials provided with the distribution and in
- * all advertising materials mentioning features or use of this software.
- * Neither the name of the University nor the names of its contributors may
- * be used to endorse or promote products derived from this software without
- * specific prior written permission.
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED
- * WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)res_comp.c	6.18 (Berkeley) 6/27/90";
-#endif /* LIBC_SCCS and not lint */
-
-#if _MINIX
-#include <sys/types.h>
-#include <stdlib.h>
-
-#include <net/gen/in.h>
-#include <net/gen/nameser.h>
-#include <net/gen/resolv.h>
-
-static int dn_find _ARGS(( const u_char *exp_dn, const u_char *msg,
-	u_char **dnptrs, u_char **lastdnptr ));
-int dn_skipname _ARGS(( const u_char *comp_dn, const u_char *eom ));
-
-#define getshort _getshort
-#define getlong _getlong
-#define putshort __putshort
-#define putlong __putlong
-#else
-#include <sys/types.h>
-#include <stdio.h>
-#include <arpa/nameser.h>
-
-static dn_find();
-#endif
-
-#ifdef __STDC__
-#define CONST	const
-#else
-#define CONST
-#endif
-
-/*
- * Expand compressed domain name 'comp_dn' to full domain name.
- * 'msg' is a pointer to the begining of the message,
- * 'eomorig' points to the first location after the message,
- * 'exp_dn' is a pointer to a buffer of size 'length' for the result.
- * Return size of compressed name or -1 if there was an error.
- */
-dn_expand(msg, eomorig, comp_dn, exp_dn, length)
-	CONST u_char *msg, *eomorig, *comp_dn;
-	u_char *exp_dn;
-	int length;
-{
-	register CONST u_char *cp;
-	register u_char *dn;
-	register int n, c;
-	CONST u_char *eom;
-	int len = -1, checked = 0;
-
-	dn = exp_dn;
-	cp = comp_dn;
-	eom = exp_dn + length;
-	/*
-	 * fetch next label in domain name
-	 */
-	while (n = *cp++) {
-		/*
-		 * Check for indirection
-		 */
-		switch (n & INDIR_MASK) {
-		case 0:
-			if (dn != exp_dn) {
-				if (dn >= eom)
-					return (-1);
-				*dn++ = '.';
-			}
-			if (dn+n >= eom)
-				return (-1);
-			checked += n + 1;
-			while (--n >= 0) {
-				if ((c = *cp++) == '.') {
-					if (dn + n + 2 >= eom)
-						return (-1);
-					*dn++ = '\\';
-				}
-				*dn++ = c;
-				if (cp >= eomorig)	/* out of range */
-					return(-1);
-			}
-			break;
-
-		case INDIR_MASK:
-			if (len < 0)
-				len = cp - comp_dn + 1;
-			cp = msg + (((n & 0x3f) << 8) | (*cp & 0xff));
-			if (cp < msg || cp >= eomorig)	/* out of range */
-				return(-1);
-			checked += 2;
-			/*
-			 * Check for loops in the compressed name;
-			 * if we've looked at the whole message,
-			 * there must be a loop.
-			 */
-			if (checked >= eomorig - msg)
-				return (-1);
-			break;
-
-		default:
-			return (-1);			/* flag error */
-		}
-	}
-	*dn = '\0';
-	if (len < 0)
-		len = cp - comp_dn;
-	return (len);
-}
-
-/*
- * Compress domain name 'exp_dn' into 'comp_dn'.
- * Return the size of the compressed name or -1.
- * 'length' is the size of the array pointed to by 'comp_dn'.
- * 'dnptrs' is a list of pointers to previous compressed names. dnptrs[0]
- * is a pointer to the beginning of the message. The list ends with NULL.
- * 'lastdnptr' is a pointer to the end of the arrary pointed to
- * by 'dnptrs'. Side effect is to update the list of pointers for
- * labels inserted into the message as we compress the name.
- * If 'dnptr' is NULL, we don't try to compress names. If 'lastdnptr'
- * is NULL, we don't update the list.
- */
-int
-dn_comp(exp_dn, comp_dn, length, dnptrs, lastdnptr)
-	CONST u_char *exp_dn;
-	u_char *comp_dn;
-	int length;
-	u_char **dnptrs, **lastdnptr;
-{
-	register u_char *cp;
-	register CONST u_char *dn;
-	register int c, l;
-	u_char **cpp, **lpp, *sp, *eob;
-	u_char *msg;
-
-	dn = exp_dn;
-	cp = comp_dn;
-	eob = cp + length;
-	if (dnptrs != NULL) {
-		if ((msg = *dnptrs++) != NULL) {
-			for (cpp = dnptrs; *cpp != NULL; cpp++)
-				;
-			lpp = cpp;	/* end of list to search */
-		}
-	} else
-		msg = NULL;
-	for (c = *dn++; c != '\0'; ) {
-		/* look to see if we can use pointers */
-		if (msg != NULL) {
-			if ((l = dn_find(dn-1, msg, dnptrs, lpp)) >= 0) {
-				if (cp+1 >= eob)
-					return (-1);
-				*cp++ = (l >> 8) | INDIR_MASK;
-				*cp++ = l % 256;
-				return (cp - comp_dn);
-			}
-			/* not found, save it */
-			if (lastdnptr != NULL && cpp < lastdnptr-1) {
-				*cpp++ = cp;
-				*cpp = NULL;
-			}
-		}
-		sp = cp++;	/* save ptr to length byte */
-		do {
-			if (c == '.') {
-				c = *dn++;
-				break;
-			}
-			if (c == '\\') {
-				if ((c = *dn++) == '\0')
-					break;
-			}
-			if (cp >= eob) {
-				if (msg != NULL)
-					*lpp = NULL;
-				return (-1);
-			}
-			*cp++ = c;
-		} while ((c = *dn++) != '\0');
-		/* catch trailing '.'s but not '..' */
-		if ((l = cp - sp - 1) == 0 && c == '\0') {
-			cp--;
-			break;
-		}
-		if (l <= 0 || l > MAXLABEL) {
-			if (msg != NULL)
-				*lpp = NULL;
-			return (-1);
-		}
-		*sp = l;
-	}
-	if (cp >= eob) {
-		if (msg != NULL)
-			*lpp = NULL;
-		return (-1);
-	}
-	*cp++ = '\0';
-	return (cp - comp_dn);
-}
-
-/*
- * Skip over a compressed domain name. Return the size or -1.
- */
-dn_skipname(comp_dn, eom)
-	CONST u_char *comp_dn, *eom;
-{
-	register CONST u_char *cp;
-	register int n;
-
-	cp = comp_dn;
-	while (cp < eom && (n = *cp++)) {
-		/*
-		 * check for indirection
-		 */
-		switch (n & INDIR_MASK) {
-		case 0:		/* normal case, n == len */
-			cp += n;
-			continue;
-		default:	/* illegal type */
-			return (-1);
-		case INDIR_MASK:	/* indirection */
-			cp++;
-		}
-		break;
-	}
-	return (cp - comp_dn);
-}
-
-/*
- * Search for expanded name from a list of previously compressed names.
- * Return the offset from msg if found or -1.
- * dnptrs is the pointer to the first name on the list,
- * not the pointer to the start of the message.
- */
-static int
-dn_find(exp_dn, msg, dnptrs, lastdnptr)
-	CONST u_char *exp_dn, *msg;
-	u_char **dnptrs, **lastdnptr;
-{
-	CONST register u_char *dn, *cp;
-	register u_char **cpp;
-	register int n;
-	CONST u_char *sp;
-
-	for (cpp = dnptrs; cpp < lastdnptr; cpp++) {
-		dn = exp_dn;
-		sp = cp = *cpp;
-		while (n = *cp++) {
-			/*
-			 * check for indirection
-			 */
-			switch (n & INDIR_MASK) {
-			case 0:		/* normal case, n == len */
-				while (--n >= 0) {
-					if (*dn == '.')
-						goto next;
-					if (*dn == '\\')
-						dn++;
-					if (*dn++ != *cp++)
-						goto next;
-				}
-				if ((n = *dn++) == '\0' && *cp == '\0')
-					return (sp - msg);
-				if (n == '.')
-					continue;
-				goto next;
-
-			default:	/* illegal type */
-				return (-1);
-
-			case INDIR_MASK:	/* indirection */
-				cp = msg + (((n & 0x3f) << 8) | *cp);
-			}
-		}
-		if (*dn == '\0')
-			return (sp - msg);
-	next:	;
-	}
-	return (-1);
-}
-
-/*
- * Routines to insert/extract short/long's. Must account for byte
- * order and non-alignment problems. This code at least has the
- * advantage of being portable.
- *
- * used by sendmail.
- */
-
-u16_t
-getshort(msgp)
-	CONST u8_t *msgp;
-{
-	return ((msgp[0] << 8) | (msgp[1] << 0));
-}
-
-u32_t
-getlong(msgp)
-	CONST u8_t *msgp;
-{
-	return (  ((u32_t) msgp[0] << 24)
-		| ((u32_t) msgp[1] << 16)
-		| ((u32_t) msgp[2] <<  8)
-		| ((u32_t) msgp[3] <<  0));
-}
-
-
-void
-putshort(s, msgp)
-	register U16_t s;
-	register u8_t *msgp;
-{
-
-	msgp[1] = s;
-	msgp[0] = s >> 8;
-}
-
-void
-putlong(l, msgp)
-	register u32_t l;
-	register u8_t *msgp;
-{
-
-	msgp[3] = l;
-	msgp[2] = (l >>= 8);
-	msgp[1] = (l >>= 8);
-	msgp[0] = l >> 8;
-}
Index: trunk/minix/lib/ip/res_init.c
===================================================================
--- trunk/minix/lib/ip/res_init.c	(revision 9)
+++ 	(revision )
@@ -1,197 +1,0 @@
-/*-
- * Copyright (c) 1985, 1989 Regents of the University of California.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms are permitted provided
- * that: (1) source distributions retain this entire copyright notice and
- * comment, and (2) distributions including binaries display the following
- * acknowledgement:  ``This product includes software developed by the
- * University of California, Berkeley and its contributors'' in the
- * documentation or other materials provided with the distribution and in
- * all advertising materials mentioning features or use of this software.
- * Neither the name of the University nor the names of its contributors may
- * be used to endorse or promote products derived from this software without
- * specific prior written permission.
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED
- * WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)res_init.c	6.14 (Berkeley) 6/27/90";
-#endif /* LIBC_SCCS and not lint */
-
-#if _MINIX
-#include <sys/types.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <unistd.h>
-
-#include <net/hton.h>
-#include <net/gen/in.h>
-#include <net/gen/inet.h>
-#include <net/gen/nameser.h>
-#include <net/gen/netdb.h>
-#include <net/gen/resolv.h>
-#include <net/gen/socket.h>
-
-#define index(s,c) strchr(s,c)
-#else
-#include <sys/types.h>
-#include <sys/socket.h>
-#include <netinet/in.h>
-#include <stdio.h>
-#include <arpa/nameser.h>
-#include <resolv.h>
-#endif
-
-/*
- * Resolver state
- */
-struct state _res;
-
-/*
- * Set up default settings.  If the configuration file exist, the values
- * there will have precedence.  Otherwise, the server address is set to
- * 127.0.0.1 (localhost) and the default domain name comes from gethostname().
- *
- * The configuration file should only be used if you want to redefine your
- * domain or run without a server on your machine.
- *
- * Return 0 if completes successfully, -1 on error
- */
-int
-res_init()
-{
-	register FILE *fp;
-	register char *cp, **pp;
-	register int n;
-	char buf[BUFSIZ];
-	int haveenv = 0;
-	int havesearch = 0;
-	struct servent* servent;
-	u16_t nameserver_port;
-
-	/* Resolver state default settings */
-	_res.retrans = RES_TIMEOUT;	/* retransmition time interval */
-	_res.retry = 4;			/* number of times to retransmit */
-	_res.options = RES_DEFAULT;	/* options flags */
-	_res.nscount = 0;		/* number of name servers */
-	_res.defdname[0] = 0;		/* domain */
-
-	servent= getservbyname("domain", NULL);
-	if (!servent)
-	{
-		h_errno= NO_RECOVERY;
-		return -1;
-	}
-	nameserver_port= servent->s_port;
-
-	/* Allow user to override the local domain definition */
-	if ((cp = getenv("LOCALDOMAIN")) != NULL) {
-		(void)strncpy(_res.defdname, cp, sizeof(_res.defdname));
-		haveenv++;
-	}
-
-	if ((fp = fopen(_PATH_RESCONF, "r")) != NULL) {
-	    /* read the config file */
-	    while (fgets(buf, sizeof(buf), fp) != NULL) {
-		/* read default domain name */
-		if (!strncmp(buf, "domain", sizeof("domain") - 1)) {
-		    if (haveenv)	/* skip if have from environ */
-			    continue;
-		    cp = buf + sizeof("domain") - 1;
-		    while (*cp == ' ' || *cp == '\t')
-			    cp++;
-		    if ((*cp == '\0') || (*cp == '\n'))
-			    continue;
-		    (void)strncpy(_res.defdname, cp, sizeof(_res.defdname) - 1);
-		    if ((cp = index(_res.defdname, '\n')) != NULL)
-			    *cp = '\0';
-		    havesearch = 0;
-		    continue;
-		}
-		/* set search list */
-		if (!strncmp(buf, "search", sizeof("search") - 1)) {
-		    if (haveenv)	/* skip if have from environ */
-			    continue;
-		    cp = buf + sizeof("search") - 1;
-		    while (*cp == ' ' || *cp == '\t')
-			    cp++;
-		    if ((*cp == '\0') || (*cp == '\n'))
-			    continue;
-		    (void)strncpy(_res.defdname, cp, sizeof(_res.defdname) - 1);
-		    if ((cp = index(_res.defdname, '\n')) != NULL)
-			    *cp = '\0';
-		    /*
-		     * Set search list to be blank-separated strings
-		     * on rest of line.
-		     */
-		    cp = _res.defdname;
-		    pp = _res.dnsrch;
-		    *pp++ = cp;
-		    for (n = 0; *cp && pp < _res.dnsrch + MAXDNSRCH; cp++) {
-			    if (*cp == ' ' || *cp == '\t') {
-				    *cp = 0;
-				    n = 1;
-			    } else if (n) {
-				    *pp++ = cp;
-				    n = 0;
-			    }
-		    }
-		    /* null terminate last domain if there are excess */
-		    while (*cp != '\0' && *cp != ' ' && *cp != '\t')
-			    cp++;
-		    *cp = '\0';
-		    *pp++ = 0;
-		    havesearch = 1;
-		    continue;
-		}
-		/* read nameservers to query */
-		if (!strncmp(buf, "nameserver", sizeof("nameserver") - 1) &&
-		   _res.nscount < MAXNS) {
-		    cp = buf + sizeof("nameserver") - 1;
-		    while (*cp == ' ' || *cp == '\t')
-			    cp++;
-		    if ((*cp == '\0') || (*cp == '\n'))
-			    continue;
-		    if (!inet_aton(cp, &_res.nsaddr_list[_res.nscount]))
-			    continue;
-		    _res.nsport_list[_res.nscount]= nameserver_port;
-		    _res.nscount++;
-		    continue;
-		}
-	    }
-	    (void) fclose(fp);
-	}
-	if (_res.nscount == 0) {
-		/* "localhost" is the default nameserver. */
-		_res.nsaddr_list[0]= HTONL(0x7F000001);
-		_res.nsport_list[0]= nameserver_port;
-		_res.nscount= 1;
-	}
-	if (_res.defdname[0] == 0) {
-		if (gethostname(buf, sizeof(_res.defdname)) == 0 &&
-		   (cp = index(buf, '.')))
-			(void)strcpy(_res.defdname, cp + 1);
-	}
-
-	/* find components of local domain that might be searched */
-	if (havesearch == 0) {
-		pp = _res.dnsrch;
-		*pp++ = _res.defdname;
-		for (cp = _res.defdname, n = 0; *cp; cp++)
-			if (*cp == '.')
-				n++;
-		cp = _res.defdname;
-		for (; n >= LOCALDOMAINPARTS && pp < _res.dnsrch + MAXDFLSRCH;
-		    n--) {
-			cp = index(cp, '.');
-			*pp++ = ++cp;
-		}
-		*pp++ = 0;
-	}
-	_res.options |= RES_INIT;
-	return (0);
-}
Index: trunk/minix/lib/ip/res_mkquery.c
===================================================================
--- trunk/minix/lib/ip/res_mkquery.c	(revision 9)
+++ 	(revision )
@@ -1,218 +1,0 @@
-/*
- * Copyright (c) 1985 Regents of the University of California.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms are permitted
- * provided that: (1) source distributions retain this entire copyright
- * notice and comment, and (2) distributions including binaries display
- * the following acknowledgement:  ``This product includes software
- * developed by the University of California, Berkeley and its contributors''
- * in the documentation or other materials provided with the distribution
- * and in all advertising materials mentioning features or use of this
- * software. Neither the name of the University nor the names of its
- * contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
- * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)res_mkquery.c	6.12 (Berkeley) 6/1/90";
-#endif /* LIBC_SCCS and not lint */
-
-#if _MINIX
-#include <sys/types.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-
-#include <net/hton.h>
-#include <net/gen/in.h>
-#include <net/gen/nameser.h>
-#include <net/gen/resolv.h>
-
-#define bzero(b,l) memset(b,0,l)
-#define bcopy(s,d,l) memcpy(d,s,l)
-
-#define putshort __putshort
-#define putlong __putlong
-#else
-#include <stdio.h>
-#include <sys/types.h>
-#include <netinet/in.h>
-#include <arpa/nameser.h>
-#include <resolv.h>
-#endif
-
-#ifdef __STDC__
-#define _CONST	const
-#else
-#define _CONST
-#endif
-
-/*
- * Form all types of queries.
- * Returns the size of the result or -1.
- */
-res_mkquery(op, dname, class, type, data, datalen, newrr, buf, buflen)
-	int op;			/* opcode of query */
-	_CONST char *dname;	/* domain name */
-	int class, type;	/* class and type of query */
-	_CONST char *data;	/* resource record data */
-	int datalen;		/* length of data */
-	_CONST struct rrec *newrr; /* new rr for modify or append */
-	char *buf;		/* buffer to put query */
-	int buflen;		/* size of buffer */
-{
-	register dns_hdr_t *hp;
-	register char *cp;
-	register int n;
-	char *dnptrs[10], **dpp, **lastdnptr;
-
-#ifdef DEBUG
-	if (_res.options & RES_DEBUG)
-		printf("res_mkquery(%d, %s, %d, %d)\n", op, dname, class, type);
-#endif /* DEBUG */
-	/*
-	 * Initialize header fields.
-	 */
-	if ((buf == NULL) || (buflen < sizeof(dns_hdr_t)))
-		return(-1);
-	bzero(buf, sizeof(dns_hdr_t));
-	hp = (dns_hdr_t *) buf;
-	hp->dh_id = htons(++_res.id);
-	hp->dh_flag1= 0;
-	hp->dh_flag2= 0;
-	hp->dh_flag1 |= (op << 3) & DHF_OPCODE;
-	hp->dh_flag2 |= ((_res.options & RES_PRIMARY) != 0 ? 1 : 0) << 6;
-	hp->dh_flag1 |= (_res.options & RES_RECURSE) != 0 ? 1 : 0;
-	hp->dh_flag2 |= NOERROR & DHF_RCODE;
-	cp = buf + sizeof(dns_hdr_t);
-	buflen -= sizeof(dns_hdr_t);
-	dpp = dnptrs;
-	*dpp++ = buf;
-	*dpp++ = NULL;
-	lastdnptr = dnptrs + sizeof(dnptrs)/sizeof(dnptrs[0]);
-	/*
-	 * perform opcode specific processing
-	 */
-	switch (op) {
-	case QUERY:
-		if ((buflen -= QFIXEDSZ) < 0)
-			return(-1);
-		if ((n = dn_comp((u8_t *)dname, (u8_t *)cp, buflen, 
-			(u8_t **)dnptrs, (u8_t **)lastdnptr)) < 0)
-			return (-1);
-		cp += n;
-		buflen -= n;
-		putshort(type, (u8_t *)cp);
-		cp += sizeof(u_short);
-		putshort(class, (u8_t *)cp);
-		cp += sizeof(u_short);
-		hp->dh_qdcount = HTONS(1);
-		if (op == QUERY || data == NULL)
-			break;
-		/*
-		 * Make an additional record for completion domain.
-		 */
-		buflen -= RRFIXEDSZ;
-		if ((n = dn_comp((u8_t *)data, (u8_t *)cp, buflen, 
-			(u8_t **)dnptrs, (u8_t **)lastdnptr)) < 0)
-			return (-1);
-		cp += n;
-		buflen -= n;
-		putshort(T_NULL, (u8_t *)cp);
-		cp += sizeof(u_short);
-		putshort(class, (u8_t *)cp);
-		cp += sizeof(u_short);
-		putlong(0, (u8_t *)cp);
-		cp += sizeof(u_long);
-		putshort(0, (u8_t *)cp);
-		cp += sizeof(u_short);
-		hp->dh_arcount = HTONS(1);
-		break;
-
-	case IQUERY:
-		/*
-		 * Initialize answer section
-		 */
-		if (buflen < 1 + RRFIXEDSZ + datalen)
-			return (-1);
-		*cp++ = '\0';	/* no domain name */
-		putshort(type, (u8_t *)cp);
-		cp += sizeof(u_short);
-		putshort(class, (u8_t *)cp);
-		cp += sizeof(u_short);
-		putlong(0, (u8_t *)cp);
-		cp += sizeof(u_long);
-		putshort(datalen, (u8_t *)cp);
-		cp += sizeof(u_short);
-		if (datalen) {
-			bcopy(data, cp, datalen);
-			cp += datalen;
-		}
-		hp->dh_ancount = HTONS(1);
-		break;
-
-#ifdef ALLOW_UPDATES
-	/*
-	 * For UPDATEM/UPDATEMA, do UPDATED/UPDATEDA followed by UPDATEA
-	 * (Record to be modified is followed by its replacement in msg.)
-	 */
-	case UPDATEM:
-	case UPDATEMA:
-
-	case UPDATED:
-		/*
-		 * The res code for UPDATED and UPDATEDA is the same; user
-		 * calls them differently: specifies data for UPDATED; server
-		 * ignores data if specified for UPDATEDA.
-		 */
-	case UPDATEDA:
-		buflen -= RRFIXEDSZ + datalen;
-		if ((n = dn_comp(dname, cp, buflen, dnptrs, lastdnptr)) < 0)
-			return (-1);
-		cp += n;
-		putshort(type, cp);
-                cp += sizeof(u_short);
-                putshort(class, cp);
-                cp += sizeof(u_short);
-		putlong(0, cp);
-		cp += sizeof(u_long);
-		putshort(datalen, cp);
-                cp += sizeof(u_short);
-		if (datalen) {
-			bcopy(data, cp, datalen);
-			cp += datalen;
-		}
-		if ( (op == UPDATED) || (op == UPDATEDA) ) {
-			hp->ancount = HTONS(0);
-			break;
-		}
-		/* Else UPDATEM/UPDATEMA, so drop into code for UPDATEA */
-
-	case UPDATEA:	/* Add new resource record */
-		buflen -= RRFIXEDSZ + datalen;
-		if ((n = dn_comp(dname, cp, buflen, dnptrs, lastdnptr)) < 0)
-			return (-1);
-		cp += n;
-		putshort(newrr->r_type, cp);
-                cp += sizeof(u_short);
-                putshort(newrr->r_class, cp);
-                cp += sizeof(u_short);
-		putlong(0, cp);
-		cp += sizeof(u_long);
-		putshort(newrr->r_size, cp);
-                cp += sizeof(u_short);
-		if (newrr->r_size) {
-			bcopy(newrr->r_data, cp, newrr->r_size);
-			cp += newrr->r_size;
-		}
-		hp->ancount = HTONS(0);
-		break;
-
-#endif /* ALLOW_UPDATES */
-	}
-	return (cp - buf);
-}
Index: trunk/minix/lib/ip/res_query.c
===================================================================
--- trunk/minix/lib/ip/res_query.c	(revision 9)
+++ 	(revision )
@@ -1,297 +1,0 @@
-/*
- * Copyright (c) 1988 Regents of the University of California.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms are permitted
- * provided that: (1) source distributions retain this entire copyright
- * notice and comment, and (2) distributions including binaries display
- * the following acknowledgement:  ``This product includes software
- * developed by the University of California, Berkeley and its contributors''
- * in the documentation or other materials provided with the distribution
- * and in all advertising materials mentioning features or use of this
- * software. Neither the name of the University nor the names of its
- * contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
- * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)res_query.c	5.7 (Berkeley) 6/1/90";
-#endif /* LIBC_SCCS and not lint */
-
-#if _MINIX
-#include <sys/types.h>
-#include <ctype.h>
-#include <errno.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-
-#include <net/hton.h>
-#include <net/gen/in.h>
-#include <net/gen/nameser.h>
-#include <net/gen/netdb.h>
-#include <net/gen/resolv.h>
-
-#define bcopy(s,d,l) memcpy(d,s,l)
-
-#define hostalias __hostalias
-#else
-#include <sys/param.h>
-#include <sys/socket.h>
-#include <netinet/in.h>
-#include <ctype.h>
-#include <netdb.h>
-#include <stdio.h>
-#include <errno.h>
-#include <string.h>
-#include <arpa/inet.h>
-#include <arpa/nameser.h>
-#include <resolv.h>
-
-extern int errno;
-#endif
-
-#if __STDC__
-#define CONST	const
-#else
-#define CONST
-#endif
-
-#if PACKETSZ > 1024
-#define MAXPACKET	PACKETSZ
-#else
-#define MAXPACKET	1024
-#endif
-
-int h_errno;
-
-/*
- * Formulate a normal query, send, and await answer.
- * Returned answer is placed in supplied buffer "answer".
- * Perform preliminary check of answer, returning success only
- * if no error is indicated and the answer count is nonzero.
- * Return the size of the response on success, -1 on error.
- * Error number is left in h_errno.
- * Caller must parse answer and determine whether it answers the question.
- */
-int
-res_query(name, class, type, answer, anslen)
-	char *name;		/* domain name */
-	int class, type;	/* class and type of query */
-	u_char *answer;		/* buffer to put answer */
-	int anslen;		/* size of answer buffer */
-{
-	char buf[MAXPACKET];
-	dns_hdr_t *hp;
-	int n;
-
-	if ((_res.options & RES_INIT) == 0 && res_init() == -1)
-		return (-1);
-#ifdef DEBUG
-	if (_res.options & RES_DEBUG)
-		printf("res_query(%s, %d, %d)\n", name, class, type);
-#endif
-	n = res_mkquery(QUERY, name, class, type, (char *)NULL, 0, NULL,
-	    buf, sizeof(buf));
-
-	if (n <= 0) {
-#ifdef DEBUG
-		if (_res.options & RES_DEBUG)
-			printf("res_query: mkquery failed\n");
-#endif
-		h_errno = NO_RECOVERY;
-		return (n);
-	}
-	n = res_send(buf, n, (char *)answer, anslen);
-	if (n < 0) {
-#ifdef DEBUG
-		if (_res.options & RES_DEBUG)
-			printf("res_query: send error(%d)\n", errno);
-#endif
-		h_errno = TRY_AGAIN;
-		return(n);
-	}
-
-	hp = (dns_hdr_t *) answer;
-	if ((hp->dh_flag2 & DHF_RCODE) != NOERROR || 
-		ntohs(hp->dh_ancount) == 0) {
-#ifdef DEBUG
-		if (_res.options & RES_DEBUG)
-			printf("rcode = %d, ancount=%d\n", 
-				hp->dh_flag2 & DHF_RCODE,
-			    ntohs(hp->dh_ancount));
-#endif
-		switch (hp->dh_flag2 & DHF_RCODE) {
-			case NXDOMAIN:
-				h_errno = HOST_NOT_FOUND;
-				break;
-			case SERVFAIL:
-				h_errno = TRY_AGAIN;
-				break;
-			case NOERROR:
-				h_errno = NO_DATA;
-				break;
-			case FORMERR:
-			case NOTIMP:
-			case REFUSED:
-			default:
-				h_errno = NO_RECOVERY;
-				break;
-		}
-		return (-1);
-	}
-	return(n);
-}
-
-/*
- * Formulate a normal query, send, and retrieve answer in supplied buffer.
- * Return the size of the response on success, -1 on error.
- * If enabled, implement search rules until answer or unrecoverable failure
- * is detected.  Error number is left in h_errno.
- * Only useful for queries in the same name hierarchy as the local host
- * (not, for example, for host address-to-name lookups in domain in-addr.arpa).
- */
-res_search(name, class, type, answer, anslen)
-	char *name;		/* domain name */
-	int class, type;	/* class and type of query */
-	u_char *answer;		/* buffer to put answer */
-	int anslen;		/* size of answer */
-{
-	register char *cp, **domain;
-	int n, ret, got_nodata = 0;
-
-	if ((_res.options & RES_INIT) == 0 && res_init() == -1)
-		return (-1);
-
-	errno = 0;
-	h_errno = HOST_NOT_FOUND;		/* default, if we never query */
-	for (cp = name, n = 0; *cp; cp++)
-		if (*cp == '.')
-			n++;
-	if (n == 0 && (cp = hostalias(name)))
-		return (res_query(cp, class, type, answer, anslen));
-
-	/*
-	 * We do at least one level of search if
-	 *	- there is no dot and RES_DEFNAME is set, or
-	 *	- there is at least one dot, there is no trailing dot,
-	 *	  and RES_DNSRCH is set.
-	 */
-	if ((n == 0 && _res.options & RES_DEFNAMES) ||
-	   (n != 0 && *--cp != '.' && _res.options & RES_DNSRCH))
-	     for (domain = _res.dnsrch; *domain; domain++) {
-		ret = res_querydomain(name, *domain, class, type,
-		    answer, anslen);
-		if (ret > 0)
-			return (ret);
-		/*
-		 * If no server present, give up.
-		 * If name isn't found in this domain,
-		 * keep trying higher domains in the search list
-		 * (if that's enabled).
-		 * On a NO_DATA error, keep trying, otherwise
-		 * a wildcard entry of another type could keep us
-		 * from finding this entry higher in the domain.
-		 * If we get some other error (negative answer or
-		 * server failure), then stop searching up,
-		 * but try the input name below in case it's fully-qualified.
-		 */
-		if (errno == ECONNREFUSED) {
-			h_errno = TRY_AGAIN;
-			return (-1);
-		}
-		if (h_errno == NO_DATA)
-			got_nodata++;
-		if ((h_errno != HOST_NOT_FOUND && h_errno != NO_DATA) ||
-		    (_res.options & RES_DNSRCH) == 0)
-			break;
-	}
-	/*
-	 * If the search/default failed, try the name as fully-qualified,
-	 * but only if it contained at least one dot (even trailing).
-	 * This is purely a heuristic; we assume that any reasonable query
-	 * about a top-level domain (for servers, SOA, etc) will not use
-	 * res_search.
-	 */
-	if (n && (ret = res_querydomain(name, (char *)NULL, class, type,
-	    answer, anslen)) > 0)
-		return (ret);
-	if (got_nodata)
-		h_errno = NO_DATA;
-	return (-1);
-}
-
-/*
- * Perform a call on res_query on the concatenation of name and domain,
- * removing a trailing dot from name if domain is NULL.
- */
-int
-res_querydomain(name, domain, class, type, answer, anslen)
-	char *name, *domain;
-	int class, type;	/* class and type of query */
-	u_char *answer;		/* buffer to put answer */
-	int anslen;		/* size of answer */
-{
-	char nbuf[2*MAXDNAME+2];
-	char *longname = nbuf;
-	int n;
-
-#ifdef DEBUG
-	if (_res.options & RES_DEBUG)
-		printf("res_querydomain(%s, %s, %d, %d)\n",
-		    name, domain, class, type);
-#endif
-	if (domain == NULL) {
-		/*
-		 * Check for trailing '.';
-		 * copy without '.' if present.
-		 */
-		n = strlen(name) - 1;
-		if (name[n] == '.' && n < sizeof(nbuf) - 1) {
-			bcopy(name, nbuf, n);
-			nbuf[n] = '\0';
-		} else
-			longname = name;
-	} else
-		(void)sprintf(nbuf, "%.*s.%.*s",
-		    MAXDNAME, name, MAXDNAME, domain);
-
-	return (res_query(longname, class, type, answer, anslen));
-}
-
-char *
-hostalias(name)
-	register CONST char *name;
-{
-	register char *C1, *C2;
-	FILE *fp;
-	char *file;
-	char buf[BUFSIZ];
-	static char abuf[MAXDNAME];
-
-	file = getenv("HOSTALIASES");
-	if (file == NULL || (fp = fopen(file, "r")) == NULL)
-		return (NULL);
-	buf[sizeof(buf) - 1] = '\0';
-	while (fgets(buf, sizeof(buf), fp)) {
-		for (C1 = buf; *C1 && !isspace(*C1); ++C1);
-		if (!*C1)
-			break;
-		*C1 = '\0';
-		if (!strcasecmp(buf, name)) {
-			while (isspace(*++C1));
-			if (!*C1)
-				break;
-			for (C2 = C1 + 1; *C2 && !isspace(*C2); ++C2);
-			abuf[sizeof(abuf) - 1] = *C2 = '\0';
-			(void)strncpy(abuf, C1, sizeof(abuf) - 1);
-			fclose(fp);
-			return (abuf);
-		}
-	}
-	fclose(fp);
-	return (NULL);
-}
Index: trunk/minix/lib/ip/res_send.c
===================================================================
--- trunk/minix/lib/ip/res_send.c	(revision 9)
+++ 	(revision )
@@ -1,903 +1,0 @@
-/*
- * Copyright (c) 1985, 1989 Regents of the University of California.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- *    must display the following acknowledgement:
- *	This product includes software developed by the University of
- *	California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- *    may be used to endorse or promote products derived from this software
- *    without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)res_send.c	6.27 (Berkeley) 2/24/91";
-#endif /* LIBC_SCCS and not lint */
-
-/*
- * Send query to name server and wait for reply.
- */
-
-#if !_MINIX
-#include <sys/param.h>
-#include <sys/time.h>
-#include <sys/socket.h>
-#include <sys/uio.h>
-#include <netinet/in.h>
-#include <arpa/nameser.h>
-#include <stdio.h>
-#include <errno.h>
-#include <resolv.h>
-#include <unistd.h>
-#include <string.h>
-
-#else /* _MINIX */
-
-#include <sys/types.h>
-#include <sys/ioctl.h>
-#include <sys/stat.h>
-#include <assert.h>
-#include <errno.h>
-#include <fcntl.h>
-#include <signal.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <unistd.h>
-
-#include <net/hton.h>
-
-#include <net/netlib.h>
-#include <net/gen/in.h>
-#include <net/gen/inet.h>
-#include <net/gen/netdb.h>
-#include <net/gen/nameser.h>
-#include <net/gen/resolv.h>
-#include <net/gen/tcp.h>
-#include <net/gen/tcp_io.h>
-#include <net/gen/udp.h>
-#include <net/gen/udp_hdr.h>
-#include <net/gen/udp_io.h>
-
-static int tcp_connect _ARGS(( ipaddr_t host, Tcpport_t port, int *terrno ));
-static int tcpip_writeall _ARGS(( int fd, const char *buf, size_t siz ));
-static int udp_connect _ARGS(( void ));
-static int udp_sendto _ARGS(( int fd, const char *buf, unsigned buflen,
-				ipaddr_t addr, Udpport_t port ));
-static int udp_receive _ARGS(( int fd, char *buf, unsigned buflen,
-				time_t timeout ));
-static void alarm_handler _ARGS(( int sig ));
-
-#endif /* !_MINIX */
-
-static int s = -1;	/* socket used for communications */
-#if !_MINIX
-static struct sockaddr no_addr;
-
-#ifndef FD_SET
-#define	NFDBITS		32
-#define	FD_SETSIZE	32
-#define	FD_SET(n, p)	((p)->fds_bits[(n)/NFDBITS] |= (1 << ((n) % NFDBITS)))
-#define	FD_CLR(n, p)	((p)->fds_bits[(n)/NFDBITS] &= ~(1 << ((n) % NFDBITS)))
-#define	FD_ISSET(n, p)	((p)->fds_bits[(n)/NFDBITS] & (1 << ((n) % NFDBITS)))
-#define FD_ZERO(p)	bzero((char *)(p), sizeof(*(p)))
-#endif /* FD_SET */
-#endif /* _MINIX */
-
-res_send(buf, buflen, answer, anslen)
-	const char *buf;
-	int buflen;
-	char *answer;
-	int anslen;
-{
-	register int n;
-	int try, v_circuit, resplen, ns;
-	int gotsomewhere = 0, connected = 0;
-	int connreset = 0;
-#if !_MINIX
-	u_short id, len;
-#else /* _MINIX */
-	u16_t id, len;
-#endif /* !_MINIX */
-	char *cp;
-#if !_MINIX
-	fd_set dsmask;
-	struct timeval timeout;
-	HEADER *hp = (HEADER *) buf;
-	HEADER *anhp = (HEADER *) answer;
-	struct iovec iov[2];
-#else /* _MINIX */
-	time_t timeout;
-	dns_hdr_t *hp = (dns_hdr_t *) buf;
-	dns_hdr_t *anhp = (dns_hdr_t *) answer;
-#endif /* !_MINIX */
-	int terrno = ETIMEDOUT;
-	char junk[512];
-
-#ifdef DEBUG
-	if (_res.options & RES_DEBUG) {
-		printf("res_send()\n");
-		__p_query(buf);
-	}
-#endif /* DEBUG */
-	if (!(_res.options & RES_INIT))
-		if (res_init() == -1) {
-			return(-1);
-		}
-
-	v_circuit = (_res.options & RES_USEVC) || buflen > PACKETSZ;
-#if !_MINIX
-	id = hp->id;
-#else /* _MINIX */
-	id = hp->dh_id;
-#endif /* !_MINIX */
-	/*
-	 * Send request, RETRY times, or until successful
-	 */
-	for (try = 0; try < _res.retry; try++) {
-	   for (ns = 0; ns < _res.nscount; ns++) {
-#ifdef DEBUG
-#if !_MINIX
-		if (_res.options & RES_DEBUG)
-			printf("Querying server (# %d) address = %s\n", ns+1,
-			      inet_ntoa(_res.nsaddr_list[ns].sin_addr));
-#else /* _MINIX */
-		if (_res.options & RES_DEBUG)
-			printf("Querying server (# %d) address = %s\n", ns+1,
-			      inet_ntoa(_res.nsaddr_list[ns]));
-#endif /* !_MINIX */
-#endif /* DEBUG */
-	usevc:
-		if (v_circuit) {
-#if !_MINIX
-			int truncated = 0;
-
-			/*
-			 * Use virtual circuit;
-			 * at most one attempt per server.
-			 */
-			try = _res.retry;
-			if (s < 0) {
-				s = socket(AF_INET, SOCK_STREAM, 0);
-				if (s < 0) {
-					terrno = errno;
-#ifdef DEBUG
-					if (_res.options & RES_DEBUG)
-					    perror("socket (vc) failed");
-#endif /* DEBUG */
-					continue;
-				}
-				if (connect(s,
-				    (struct sockaddr *)&(_res.nsaddr_list[ns]),
-				    sizeof(struct sockaddr)) < 0) {
-					terrno = errno;
-#ifdef DEBUG
-					if (_res.options & RES_DEBUG)
-					    perror("connect failed");
-#endif /* DEBUG */
-					(void) close(s);
-					s = -1;
-					continue;
-				}
-			}
-			/*
-			 * Send length & message
-			 */
-			len = htons((u_short)buflen);
-			iov[0].iov_base = (caddr_t)&len;
-			iov[0].iov_len = sizeof(len);
-			iov[1].iov_base = (char *)buf;
-			iov[1].iov_len = buflen;
-			if (writev(s, iov, 2) != sizeof(len) + buflen) {
-				terrno = errno;
-#ifdef DEBUG
-				if (_res.options & RES_DEBUG)
-					perror("write failed");
-#endif /* DEBUG */
-				(void) close(s);
-				s = -1;
-				continue;
-			}
-			/*
-			 * Receive length & response
-			 */
-			cp = answer;
-			len = sizeof(short);
-			while (len != 0 &&
-			    (n = read(s, (char *)cp, (int)len)) > 0) {
-				cp += n;
-				len -= n;
-			}
-			if (n <= 0) {
-				terrno = errno;
-#ifdef DEBUG
-				if (_res.options & RES_DEBUG)
-					perror("read failed");
-#endif /* DEBUG */
-				(void) close(s);
-				s = -1;
-				/*
-				 * A long running process might get its TCP
-				 * connection reset if the remote server was
-				 * restarted.  Requery the server instead of
-				 * trying a new one.  When there is only one
-				 * server, this means that a query might work
-				 * instead of failing.  We only allow one reset
-				 * per query to prevent looping.
-				 */
-				if (terrno == ECONNRESET && !connreset) {
-					connreset = 1;
-					ns--;
-				}
-				continue;
-			}
-			cp = answer;
-			if ((resplen = ntohs(*(u_short *)cp)) > anslen) {
-#ifdef DEBUG
-				if (_res.options & RES_DEBUG)
-					fprintf(stderr, "response truncated\n");
-#endif /* DEBUG */
-				len = anslen;
-				truncated = 1;
-			} else
-				len = resplen;
-			while (len != 0 &&
-			   (n = read(s, (char *)cp, (int)len)) > 0) {
-				cp += n;
-				len -= n;
-			}
-			if (n <= 0) {
-				terrno = errno;
-#ifdef DEBUG
-				if (_res.options & RES_DEBUG)
-					perror("read failed");
-#endif /* DEBUG */
-				(void) close(s);
-				s = -1;
-				continue;
-			}
-			if (truncated) {
-				/*
-				 * Flush rest of answer
-				 * so connection stays in synch.
-				 */
-				anhp->tc = 1;
-				len = resplen - anslen;
-				while (len != 0) {
-					n = (len > sizeof(junk) ?
-					    sizeof(junk) : len);
-					if ((n = read(s, junk, n)) > 0)
-						len -= n;
-					else
-						break;
-				}
-			}
-#else /* _MINIX */
-			int truncated = 0;
-			int nbytes;
-
-			/*
-			 * Use virtual circuit;
-			 * at most one attempt per server.
-			 */
-			try = _res.retry;
-			if (s < 0) 
-			{
-				s= tcp_connect(_res.nsaddr_list[ns],
-					_res.nsport_list[ns], &terrno);
-				if (s == -1)
-					continue;
-			}
-			/*
-			 * Send length & message
-			 */
-			len = htons((u_short)buflen);
-			nbytes= tcpip_writeall(s, (char *)&len, 
-				sizeof(len));
-			if (nbytes != sizeof(len))
-			{
-				terrno= errno;
-#ifdef DEBUG
-				if (_res.options & RES_DEBUG)
-					fprintf(stderr, "write failed: %s\n",
-					strerror(terrno));
-#endif /* DEBUG */
-				close(s);
-				s= -1;
-				continue;
-			}
-			nbytes= tcpip_writeall(s, buf, buflen);
-			if (nbytes != buflen)
-			{
-				terrno= errno;
-#ifdef DEBUG
-				if (_res.options & RES_DEBUG)
-					fprintf(stderr, "write failed: %s\n",
-					strerror(terrno));
-#endif /* DEBUG */
-				close(s);
-				s= -1;
-				continue;
-			}
-			/*
-			 * Receive length & response
-			 */
-			cp = answer;
-			len = sizeof(short);
-			while (len != 0)
-			{
-				n = read(s, (char *)cp, (int)len);
-				if (n <= 0)
-					break;
-				cp += n;
-				assert(len >= n);
-				len -= n;
-			}
-			if (len) {
-				terrno = errno;
-#ifdef DEBUG
-				if (_res.options & RES_DEBUG)
-					fprintf(stderr, "read failed: %s\n",
-						strerror(terrno));
-#endif /* DEBUG */
-				close(s);
-				s= -1;
-				/*
-				 * A long running process might get its TCP
-				 * connection reset if the remote server was
-				 * restarted.  Requery the server instead of
-				 * trying a new one.  When there is only one
-				 * server, this means that a query might work
-				 * instead of failing.  We only allow one reset
-				 * per query to prevent looping.
-				 */
-				if (terrno == ECONNRESET && !connreset) {
-					connreset = 1;
-					ns--;
-				}
-				continue;
-			}
-			cp = answer;
-			if ((resplen = ntohs(*(u_short *)cp)) > anslen) {
-#ifdef DEBUG
-				if (_res.options & RES_DEBUG)
-					fprintf(stderr, "response truncated\n");
-#endif /* DEBUG */
-				len = anslen;
-				truncated = 1;
-			} else
-				len = resplen;
-			while (len != 0)
-			{
-				n= read(s, (char *)cp, (int)len);
-				if (n <= 0)
-					break;
-				cp += n;
-				assert(len >= n);
-				len -= n;
-			}
-			if (len) {
-				terrno = errno;
-#ifdef DEBUG
-				if (_res.options & RES_DEBUG)
-					fprintf(stderr, "read failed: %s\n",
-						strerror(terrno));
-#endif /* DEBUG */
-				close(s);
-				s= -1;
-				continue;
-			}
-			if (truncated) {
-				/*
-				 * Flush rest of answer
-				 * so connection stays in synch.
-				 */
-				anhp->dh_flag1 |= DHF_TC;
-				len = resplen - anslen;
-				while (len != 0) {
-					n = (len > sizeof(junk) ?
-					    sizeof(junk) : len);
-					n = read(s, junk, n);
-					if (n <= 0)
-					{
-						assert(len >= n);
-						len -= n;
-					}
-					else
-						break;
-				}
-			}
-#endif /* _MINIX */
-		} else {
-#if !_MINIX
-			/*
-			 * Use datagrams.
-			 */
-			if (s < 0) {
-				s = socket(AF_INET, SOCK_DGRAM, 0);
-				if (s < 0) {
-					terrno = errno;
-#ifdef DEBUG
-					if (_res.options & RES_DEBUG)
-					    perror("socket (dg) failed");
-#endif /* DEBUG */
-					continue;
-				}
-			}
-#if	BSD >= 43
-			/*
-			 * I'm tired of answering this question, so:
-			 * On a 4.3BSD+ machine (client and server,
-			 * actually), sending to a nameserver datagram
-			 * port with no nameserver will cause an
-			 * ICMP port unreachable message to be returned.
-			 * If our datagram socket is "connected" to the
-			 * server, we get an ECONNREFUSED error on the next
-			 * socket operation, and select returns if the
-			 * error message is received.  We can thus detect
-			 * the absence of a nameserver without timing out.
-			 * If we have sent queries to at least two servers,
-			 * however, we don't want to remain connected,
-			 * as we wish to receive answers from the first
-			 * server to respond.
-			 */
-			if (_res.nscount == 1 || (try == 0 && ns == 0)) {
-				/*
-				 * Don't use connect if we might
-				 * still receive a response
-				 * from another server.
-				 */
-				if (connected == 0) {
-			if (connect(s, (struct sockaddr *)&_res.nsaddr_list[ns],
-					    sizeof(struct sockaddr)) < 0) {
-#ifdef DEBUG
-						if (_res.options & RES_DEBUG)
-							perror("connect");
-#endif /* DEBUG */
-						continue;
-					}
-					connected = 1;
-				}
-				if (send(s, buf, buflen, 0) != buflen) {
-#ifdef DEBUG
-					if (_res.options & RES_DEBUG)
-						perror("send");
-#endif /* DEBUG */
-					continue;
-				}
-			} else {
-				/*
-				 * Disconnect if we want to listen
-				 * for responses from more than one server.
-				 */
-				if (connected) {
-					(void) connect(s, &no_addr,
-					    sizeof(no_addr));
-					connected = 0;
-				}
-#endif /* BSD */
-				if (sendto(s, buf, buflen, 0,
-				    (struct sockaddr *)&_res.nsaddr_list[ns],
-				    sizeof(struct sockaddr)) != buflen) {
-#ifdef DEBUG
-					if (_res.options & RES_DEBUG)
-						perror("sendto");
-#endif /* DEBUG */
-					continue;
-				}
-#if	BSD >= 43
-			}
-#endif /* BSD */
-
-			/*
-			 * Wait for reply
-			 */
-			timeout.tv_sec = (_res.retrans << try);
-			if (try > 0)
-				timeout.tv_sec /= _res.nscount;
-			if (timeout.tv_sec <= 0)
-				timeout.tv_sec = 1;
-			timeout.tv_usec = 0;
-wait:
-			FD_ZERO(&dsmask);
-			FD_SET(s, &dsmask);
-			n = select(s+1, &dsmask, (fd_set *)NULL,
-				(fd_set *)NULL, &timeout);
-			if (n < 0) {
-#ifdef DEBUG
-				if (_res.options & RES_DEBUG)
-					perror("select");
-#endif /* DEBUG */
-				continue;
-			}
-			if (n == 0) {
-				/*
-				 * timeout
-				 */
-#ifdef DEBUG
-				if (_res.options & RES_DEBUG)
-					printf("timeout\n");
-#endif /* DEBUG */
-#if BSD >= 43
-				gotsomewhere = 1;
-#endif
-				continue;
-			}
-			if ((resplen = recv(s, answer, anslen, 0)) <= 0) {
-#ifdef DEBUG
-				if (_res.options & RES_DEBUG)
-					perror("recvfrom");
-#endif /* DEBUG */
-				continue;
-			}
-			gotsomewhere = 1;
-			if (id != anhp->id) {
-				/*
-				 * response from old query, ignore it
-				 */
-#ifdef DEBUG
-				if (_res.options & RES_DEBUG) {
-					printf("old answer:\n");
-					__p_query(answer);
-				}
-#endif /* DEBUG */
-				goto wait;
-			}
-			if (!(_res.options & RES_IGNTC) && anhp->tc) {
-				/*
-				 * get rest of answer;
-				 * use TCP with same server.
-				 */
-#ifdef DEBUG
-				if (_res.options & RES_DEBUG)
-					printf("truncated answer\n");
-#endif /* DEBUG */
-				(void) close(s);
-				s = -1;
-				v_circuit = 1;
-				goto usevc;
-			}
-#else /* _MINIX */
-			/*
-			 * Use datagrams.
-			 */
-			if (s < 0) {
-				s = udp_connect();
-				if (s < 0) {
-					terrno = errno;
-#ifdef DEBUG
-					if (_res.options & RES_DEBUG)
-					    perror("udp_connect failed");
-#endif /* DEBUG */
-					continue;
-				}
-			}
-			if (udp_sendto(s, buf, buflen, _res.nsaddr_list[ns],
-				_res.nsport_list[ns]) != buflen) {
-#ifdef DEBUG
-				if (_res.options & RES_DEBUG)
-					perror("sendto");
-#endif /* DEBUG */
-				continue;
-			}
-
-			/*
-			 * Wait for reply
-			 */
-			timeout= (_res.retrans << try);
-			if (try > 0)
-				timeout /= _res.nscount;
-			if (timeout <= 0)
-				timeout= 1;
-wait:
-			if ((resplen= udp_receive(s, answer, anslen, timeout))
-				== -1)
-			{
-				if (errno == EINTR)
-				{
-				/*
-				 * timeout
-				 */
-#ifdef DEBUG
-					if (_res.options & RES_DEBUG)
-						printf("timeout\n");
-#endif /* DEBUG */
-					gotsomewhere = 1;
-				}
-				else
-				{
-#ifdef DEBUG
-				if (_res.options & RES_DEBUG)
-					perror("udp_receive");
-#endif /* DEBUG */
-				}
-				continue;
-			}
-			gotsomewhere = 1;
-			if (id != anhp->dh_id) {
-				/*
-				 * response from old query, ignore it
-				 */
-#ifdef DEBUG
-				if (_res.options & RES_DEBUG) {
-					printf("old answer:\n");
-					__p_query(answer);
-				}
-#endif /* DEBUG */
-				goto wait;
-			}
-			if (!(_res.options & RES_IGNTC) &&
-				(anhp->dh_flag1 & DHF_TC)) {
-				/*
-				 * get rest of answer;
-				 * use TCP with same server.
-				 */
-#ifdef DEBUG
-				if (_res.options & RES_DEBUG)
-					printf("truncated answer\n");
-#endif /* DEBUG */
-				(void) close(s);
-				s = -1;
-				v_circuit = 1;
-				goto usevc;
-			}
-#endif /* !_MINIX */
-		}
-#ifdef DEBUG
-		if (_res.options & RES_DEBUG) {
-			printf("got answer:\n");
-			__p_query(answer);
-		}
-#endif /* DEBUG */
-		/*
-		 * If using virtual circuits, we assume that the first server
-		 * is preferred * over the rest (i.e. it is on the local
-		 * machine) and only keep that one open.
-		 * If we have temporarily opened a virtual circuit,
-		 * or if we haven't been asked to keep a socket open,
-		 * close the socket.
-		 */
-		if ((v_circuit &&
-		    ((_res.options & RES_USEVC) == 0 || ns != 0)) ||
-		    (_res.options & RES_STAYOPEN) == 0) {
-			(void) close(s);
-			s = -1;
-		}
-		return (resplen);
-	   }
-	}
-	if (s >= 0) {
-		(void) close(s);
-		s = -1;
-	}
-	if (v_circuit == 0)
-		if (gotsomewhere == 0)
-			errno = ECONNREFUSED;	/* no nameservers found */
-		else
-			errno = ETIMEDOUT;	/* no answer obtained */
-	else
-		errno = terrno;
-	return (-1);
-}
-
-/*
- * This routine is for closing the socket if a virtual circuit is used and
- * the program wants to close it.  This provides support for endhostent()
- * which expects to close the socket.
- *
- * This routine is not expected to be user visible.
- */
-void
-_res_close()
-{
-	if (s != -1) {
-		(void) close(s);
-		s = -1;
-	}
-}
-
-#if _MINIX
-static int tcp_connect(host, port, terrno)
-ipaddr_t host;
-tcpport_t port;
-int *terrno;
-{
-	char *dev_name;
-	int fd;
-	int error;
-	nwio_tcpconf_t tcpconf;
-	nwio_tcpcl_t clopt;
-
-	dev_name= getenv("TCP_DEVICE");
-	if (!dev_name)
-		dev_name= TCP_DEVICE;
-	fd= open(dev_name, O_RDWR);
-	if (fd == -1)
-	{
-		*terrno= errno;
-		return -1;
-	}
-	tcpconf.nwtc_flags= NWTC_EXCL | NWTC_LP_SEL | NWTC_SET_RA | NWTC_SET_RP;
-	tcpconf.nwtc_remaddr= host;
-	tcpconf.nwtc_remport= port;
-	error= ioctl(fd, NWIOSTCPCONF, &tcpconf);
-	if (error == -1)
-	{
-		*terrno= errno;
-		close(fd);
-		return -1;
-	}
-	clopt.nwtcl_flags= 0;
-	error= ioctl(fd, NWIOTCPCONN, &clopt);
-	if (error == -1)
-	{
-		*terrno= errno;
-		close(fd);
-		return -1;
-	}
-	*terrno= 0;
-	return fd;
-}
-
-static int tcpip_writeall(fd, buf, siz)
-int fd;
-const char *buf;
-size_t siz;
-{
-	size_t siz_org;
-	int nbytes;
-
-	siz_org= siz;
-
-	while (siz)
-	{
-		nbytes= write(fd, buf, siz);
-		if (nbytes <= 0)
-			return siz_org-siz;
-		assert(siz >= nbytes);
-		buf += nbytes;
-		siz -= nbytes;
-	}
-	return siz_org;
-}
-
-
-static int udp_connect()
-{
-	nwio_udpopt_t udpopt;
-	char *dev_name;
-	int fd, r, terrno;
-
-	dev_name= getenv("UDP_DEVICE");
-	if (!dev_name)
-		dev_name= UDP_DEVICE;
-	fd= open(dev_name, O_RDWR);
-	if (fd == -1)
-		return -1;
-
-	udpopt.nwuo_flags= NWUO_COPY | NWUO_LP_SEL | NWUO_EN_LOC |
-		NWUO_EN_BROAD | NWUO_RP_ANY | NWUO_RA_ANY | NWUO_RWDATALL |
-		NWUO_DI_IPOPT;
-	r= ioctl(fd, NWIOSUDPOPT, &udpopt);
-	if (r == -1)
-	{
-		terrno= errno;
-		close(fd);
-		errno= terrno;
-		return -1;
-	}
-	return fd;
-}
-
-static int udp_sendto(fd, buf, buflen, addr, port)
-int fd;
-const char *buf;
-unsigned buflen;
-ipaddr_t addr;
-udpport_t port;
-{
-	char *newbuf;
-	udp_io_hdr_t *udp_io_hdr;
-	int r, terrno;
-
-	newbuf= malloc(sizeof(*udp_io_hdr) + buflen);
-	if (newbuf == NULL)
-	{
-		errno= ENOMEM;
-		return -1;
-	}
-	udp_io_hdr= (udp_io_hdr_t *)newbuf;
-	udp_io_hdr->uih_dst_addr= addr;
-	udp_io_hdr->uih_dst_port= port;
-	udp_io_hdr->uih_ip_opt_len= 0;
-	udp_io_hdr->uih_data_len= buflen;
-
-	memcpy(newbuf + sizeof(*udp_io_hdr), buf, buflen);
-	r= write(fd, newbuf, sizeof(*udp_io_hdr) + buflen);
-	terrno= errno;
-	free(newbuf);
-	if (r >= sizeof(*udp_io_hdr))
-		r -= sizeof(*udp_io_hdr);
-	errno= terrno;
-	return r;
-}
-
-static void alarm_handler(sig)
-int sig;
-{
-	signal(SIGALRM, alarm_handler);
-	alarm(1);
-}
-
-static int udp_receive(fd, buf, buflen, timeout)
-int fd;
-char *buf;
-unsigned buflen;
-time_t timeout;
-{
-	char *newbuf;
-	udp_io_hdr_t *udp_io_hdr;
-	int r, terrno;
-	void (*u_handler) _ARGS(( int sig ));
-	time_t u_timeout;
-
-	newbuf= malloc(sizeof(*udp_io_hdr) + buflen);
-	if (newbuf == NULL)
-	{
-		errno= ENOMEM;
-		return -1;
-	}
-
-	u_handler= signal(SIGALRM, alarm_handler);
-	u_timeout= alarm(timeout);
-
-	r= read(fd, newbuf, sizeof(*udp_io_hdr) + buflen);
-	terrno= errno;
-
-	if (r < 0 || r <= sizeof(*udp_io_hdr))
-	{
-		if (r > 0)
-			r= 0;
-		free(newbuf);
-
-
-		alarm(0);
-		signal(SIGALRM, u_handler);
-		alarm(u_timeout);
-
-		errno= terrno;
-		return r;
-	}
-
-	memcpy(buf, newbuf + sizeof(*udp_io_hdr), r - sizeof(*udp_io_hdr));
-	free(newbuf);
-
-	alarm(0);
-	signal(SIGALRM, u_handler);
-	alarm(u_timeout);
-
-	return r-sizeof(*udp_io_hdr);
-}
-
-#endif
Index: trunk/minix/lib/ip/ruserok.c
===================================================================
--- trunk/minix/lib/ip/ruserok.c	(revision 9)
+++ 	(revision )
@@ -1,187 +1,0 @@
-/*	ruserok() - hosts.equiv and .rhosts check	Author: Kees J. Bot
- *								25 May 2001
- *
- * Under Minix one can use IP addresses, CIDR network blocks, and hostnames
- * with wildcards in .rhosts files.  Only the iruserok() interface can be
- * used, and the IP address is reverse/forward crosschecked if a hostname
- * match is done.  Ruserok() is dead and buried.  The superuser parameter is
- * ignored, because it makes root too special.  Most users on Minix can be
- * root, so hosts.equiv would become useless if root can't use it.  Likewise
- * .rhosts isn't checked to be root or user owned and stuff, users have to
- * be careful themselves.
- */
-
-#include <sys/types.h>
-#include <string.h>
-#include <stdio.h>
-#include <ctype.h>
-#include <limits.h>
-#include <pwd.h>
-#include <net/hton.h>
-#include <net/gen/in.h>
-#include <net/gen/netdb.h>
-#include <net/gen/inet.h>
-#include <net/gen/socket.h>
-#include <net/gen/nameser.h>
-
-/* Odd global variable.  Seems to be used by lpd(8). */
-int	__check_rhosts_file = 1;
-
-static int cidr_aton(char *word, ipaddr_t *addr, ipaddr_t *mask)
-/* Try to interpret 'word' as an CIDR spec, e.g. 172.16.102.64/27. */
-{
-    char *slash;
-    int r;
-    static char S32[]= "/32";
-
-    if (*word == 0) return 0;
-
-    if ((slash= strchr(word, '/')) == NULL) slash= S32;
-
-    *slash= 0;
-    r= inet_aton(word, addr);
-    *slash++= '/';
-    if (!r) return 0;
-
-    r= 0;
-    while ((*slash - '0') < 10u) {
-	r= 10*r + (*slash++ - '0');
-	if (r > 32) return 0;
-    }
-    if (*slash != 0 || slash[-1] == '/') return 0;
-    *mask= htonl(r == 0 ? 0L : (0xFFFFFFFFUL >> (32 - r)) << (32 - r));
-    return 1;
-}
-
-static int match(const char *word, const char *pattern)
-/* Match word onto a pattern.  Pattern may contain the * wildcard. */
-{
-    unsigned cw, cp;
-#define lc(c, d) ((((c)= (d)) - 'A') <= ('Z' - 'A') ? (c)+= ('a' - 'A') : 0)
-
-    for (;;) {
-	lc(cw, *word);
-	lc(cp, *pattern);
-
-	if (cp == '*') {
-	    do pattern++; while (*pattern == '*');
-	    lc(cp, *pattern);
-	    if (cp == 0) return 1;
-
-	    while (cw != 0) {
-		if (cw == cp && match(word+1, pattern+1)) return 1;
-		word++;
-		lc(cw, *word);
-	    }
-	    return 0;
-	} else
-	if (cw == 0 || cp == 0) {
-	    return cw == cp;
-	} else
-	if (cw == cp) {
-	    word++;
-	    pattern++;
-	} else {
-	    return 0;
-	}
-    }
-#undef lc
-}
-
-static int get_name(ipaddr_t addr, char *name)
-/* Do a reverse lookup on the remote IP address followed by a forward lookup
- * to check if the host has that address.  Return true if this is so, return
- * either the true name or the ascii IP address in name[].
- */
-{
-    struct hostent *he;
-    int ok, i;
-
-    ok= 0;
-    he= gethostbyaddr((char *) &addr, sizeof(addr), AF_INET);
-    if (he != NULL) {
-	strcpy(name, he->h_name);
-	he= gethostbyname(name);
-
-	if (he != NULL && he->h_addrtype == AF_INET) {
-	    for (i= 0; he->h_addr_list[i] != NULL; i++) {
-		if (memcmp(he->h_addr_list[i], &addr, sizeof(addr)) == 0) {
-		    ok= 1;
-		    break;
-		}
-	    }
-	}
-    }
-    strcpy(name, ok ? he->h_name : inet_ntoa(addr));
-    return ok;
-}
-
-int __ivaliduser(FILE *hostf, unsigned long raddr,
-    const char *luser, const char *ruser)
-{
-    register char *p;
-    char buf[MAXDNAME + 128];		/* host + login */
-    char rhost[MAXDNAME];		/* remote host */
-    char *word[2];
-    int i, ch, got_name;
-    ipaddr_t addr, mask;
-
-    got_name = -1;
-
-    while (fgets(buf, sizeof(buf), hostf)) {
-	/* Skip lines that are too long. */
-	if (strchr(buf, '\n') == NULL) {
-	    while ((ch = fgetc(hostf)) != '\n' && ch != EOF);
-	    continue;
-	}
-	i = 0;
-	p = buf;
-	for (;;) {
-	    while (isspace(*p)) *p++ = '\0';
-	    if (*p == '\0') break;
-	    if (i < 2) word[i] = p;
-	    i++;
-	    while (*p != '\0' && !isspace(*p)) p++;
-	}
-	if (i != 1 && i != 2) continue;
-	if (word[0][0] == '#') continue;
-	if (strcmp(ruser, i == 2 ? word[1] : luser) != 0) continue;
-
-	if (cidr_aton(word[0], &addr, &mask)) {
-	    if (((raddr ^ addr) & mask) == 0) return (0);
-	    continue;
-	}
-
-	if (got_name == -1) got_name = get_name(raddr, rhost);
-	if (match(rhost, word[0])) return (0);
-    }
-    return (-1);
-}
-
-int iruserok(unsigned long raddr, int superuser,
-    const char *ruser, const char *luser)
-{
-    /* Returns 0 if ok, -1 if not ok. */
-    struct passwd *pwd;
-    FILE *hostf;
-    int i, r;
-    char pbuf[PATH_MAX];
-
-    for (i = 0; i < 2; i++) {
-	if (i == 0) {
-	    strcpy(pbuf, _PATH_HEQUIV);
-	} else {
-	    if (!__check_rhosts_file) return (-1);
-	    if ((pwd = getpwnam(luser)) == NULL) return (-1);
-	    (void)strcpy(pbuf, pwd->pw_dir);
-	    (void)strcat(pbuf, "/.rhosts");
-	}
-
-	if ((hostf = fopen(pbuf, "r")) == NULL) return (-1);
-
-	r = __ivaliduser(hostf, raddr, luser, ruser);
-	(void)fclose(hostf);
-	if (r == 0) return (0);
-    }
-    return (-1);
-}
Index: trunk/minix/lib/ip/send.c
===================================================================
--- trunk/minix/lib/ip/send.c	(revision 9)
+++ 	(revision )
@@ -1,11 +1,0 @@
-#include <stdlib.h>
-#include <sys/socket.h>
-
-ssize_t send(int socket, const void *buffer, size_t length, int flags)
-{
-	struct sockaddr sa;
-
-	sa.sa_family= AF_UNSPEC;
-	return sendto(socket, buffer, length, flags, &sa, sizeof(sa));
-}
-
Index: trunk/minix/lib/ip/sendto.c
===================================================================
--- trunk/minix/lib/ip/sendto.c	(revision 9)
+++ 	(revision )
@@ -1,123 +1,0 @@
-#undef NDEBUG
-
-#include <assert.h>
-#include <errno.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <unistd.h>
-#include <sys/ioctl.h>
-#include <sys/socket.h>
-#include <netinet/in.h>
-
-#include <net/gen/in.h>
-#include <net/gen/udp.h>
-#include <net/gen/udp_hdr.h>
-#include <net/gen/udp_io.h>
-
-#define DEBUG 0
-
-static ssize_t _udp_sendto(int socket, const void *message, size_t length,
-	int flags, const struct sockaddr *dest_addr, socklen_t dest_len,
-	nwio_udpopt_t *udpoptp);
-
-ssize_t sendto(int socket, const void *message, size_t length, int flags,
-	const struct sockaddr *dest_addr, socklen_t dest_len)
-{
-	int r;
-	nwio_udpopt_t udpopt;
-
-	r= ioctl(socket, NWIOGUDPOPT, &udpopt);
-	if (r != -1 || (errno != ENOTTY && errno != EBADIOCTL))
-	{
-		if (r == -1)
-			return r;
-		return _udp_sendto(socket, message, length, flags,
-			dest_addr, dest_len, &udpopt);
-	}
-
-#if DEBUG
-	fprintf(stderr, "sendto: not implemented for fd %d\n", socket);
-#endif
-	errno= ENOSYS;
-	return -1;
-}
-
-static ssize_t _udp_sendto(int socket, const void *message, size_t length,
-	int flags, const struct sockaddr *dest_addr, socklen_t dest_len,
-	nwio_udpopt_t *udpoptp)
-{
-	int r, t_errno;
-	size_t buflen;
-	void *buf;
-	struct sockaddr_in *sinp;
-	udp_io_hdr_t *io_hdrp;
-
-	if (flags)
-	{
-#if DEBUG
-		fprintf(stderr, "sendto(udp): flags not implemented\n");
-#endif
-		errno= ENOSYS;
-		return -1;
-	}
-
-	if (udpoptp->nwuo_flags & NWUO_RWDATONLY)
-		return write(socket, message, length);
-
-	if ((udpoptp->nwuo_flags & NWUO_RP_ANY) ||
-		(udpoptp->nwuo_flags & NWUO_RA_ANY))
-	{
-		/* Check destination address */
-		if (dest_len < sizeof(*sinp))
-		{
-			errno= EINVAL;
-			return -1;
-		}
-		sinp= (struct sockaddr_in *)dest_addr;
-		if (sinp->sin_family != AF_INET)
-		{
-			errno= EAFNOSUPPORT;
-			return -1;
-		}
-	}
-
-	buflen= sizeof(*io_hdrp) + length;
-	if (buflen < length)
-	{	
-		/* Overflow */
-		errno= EMSGSIZE;
-		return -1;
-	}
-	buf= malloc(buflen);
-	if (buf == NULL)
-		return -1;
-
-	io_hdrp= buf;
-	io_hdrp->uih_src_addr= 0;	/* Unused */
-	io_hdrp->uih_src_port= 0;	/* Will cause error if NWUO_LP_ANY */
-	if (udpoptp->nwuo_flags & NWUO_RA_ANY)
-		io_hdrp->uih_dst_addr= sinp->sin_addr.s_addr;
-	else
-		io_hdrp->uih_dst_addr= 0;
-	if (udpoptp->nwuo_flags & NWUO_RP_ANY)
-		io_hdrp->uih_dst_port= sinp->sin_port;
-	else
-		io_hdrp->uih_dst_port= 0;
-	io_hdrp->uih_ip_opt_len= 0;
-	io_hdrp->uih_data_len= 0;
-
-	memcpy(&io_hdrp[1], message, length);
-	r= write(socket, buf, buflen);
-	if (r == -1)
-	{
-		t_errno= errno;
-		free(buf);
-		errno= t_errno;
-		return -1;
-	}
-	assert(r == buflen);
-	free(buf);
-	return length;
-}
-
Index: trunk/minix/lib/ip/servxcheck.c
===================================================================
--- trunk/minix/lib/ip/servxcheck.c	(revision 9)
+++ 	(revision )
@@ -1,302 +1,0 @@
-/*	servxcheck() - Service access check.		Author: Kees J. Bot
- *								8 Jan 1997
- */
-#define nil 0
-#define ioctl _ioctl
-#define open _open
-#define write _write
-#define close _close
-#include <sys/types.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <errno.h>
-#include <string.h>
-#include <fcntl.h>
-#include <unistd.h>
-#include <time.h>
-#include <sys/ioctl.h>
-#include <net/hton.h>
-#include <net/gen/in.h>
-#include <net/gen/tcp.h>
-#include <net/gen/tcp_io.h>
-#include <net/gen/inet.h>
-#include <net/gen/socket.h>
-#include <net/gen/netdb.h>
-
-/* Default service access file. */
-static const char *path_servacces = _PATH_SERVACCES;
-
-#define WLEN	256
-
-static int getword(FILE *fp, char *word)
-/* Read a word from the file open by 'fp', skip whitespace and comments.
- * Colon and semicolon are returned as a one character "word".  Returns
- * word[0] or EOF.
- */
-{
-    int c;
-    char *pw;
-    int wc;
-
-    wc= 0;
-    for (;;) {
-	if ((c= getc(fp)) == EOF) return EOF;
-	if (c == '#') { wc= 1; continue; }
-	if (c == '\n') { wc= 0; continue; }
-	if (wc) continue;
-	if (c <= ' ') continue;
-	break;
-    }
-
-    pw= word;
-    if (c == ':' || c == ';') {
-	    *pw++ = c;
-    } else {
-	do {
-	    if (pw < word + WLEN-1) *pw++ = c;
-	    c= getc(fp);
-	} while (c != EOF && c > ' ' && c != ':' && c != ';');
-	if (c != EOF) ungetc(c, fp);
-    }
-    *pw= 0;
-    return word[0];
-}
-
-static int netspec(char *word, ipaddr_t *addr, ipaddr_t *mask)
-/* Try to interpret 'word' as an network spec, e.g. 172.16.102.64/27. */
-{
-    char *slash;
-    int r;
-    static char S32[]= "/32";
-
-    if (*word == 0) return 0;
-
-    if ((slash= strchr(word, '/')) == NULL) slash= S32;
-
-    *slash= 0;
-    r= inet_aton(word, addr);
-    *slash++= '/';
-    if (!r) return 0;
-
-    r= 0;
-    while ((*slash - '0') < 10u) {
-	r= 10*r + (*slash++ - '0');
-	if (r > 32) return 0;
-    }
-    if (*slash != 0 || slash[-1] == '/') return 0;
-    *mask= htonl(r == 0 ? 0L : (0xFFFFFFFFUL >> (32 - r)) << (32 - r));
-    return 1;
-}
-
-static int match(const char *word, const char *pattern)
-/* Match word onto a pattern.  Pattern may contain the * wildcard. */
-{
-    unsigned cw, cp;
-#define lc(c, d) ((((c)= (d)) - 'A') <= ('Z' - 'A') ? (c)+= ('a' - 'A') : 0)
-
-    for (;;) {
-	lc(cw, *word);
-	lc(cp, *pattern);
-
-	if (cp == '*') {
-	    do pattern++; while (*pattern == '*');
-	    lc(cp, *pattern);
-	    if (cp == 0) return 1;
-
-	    while (cw != 0) {
-		if (cw == cp && match(word+1, pattern+1)) return 1;
-		word++;
-		lc(cw, *word);
-	    }
-	    return 0;
-	} else
-	if (cw == 0 || cp == 0) {
-	    return cw == cp;
-	} else
-	if (cw == cp) {
-	    word++;
-	    pattern++;
-	} else {
-	    return 0;
-	}
-    }
-#undef lc
-}
-
-static int get_name(ipaddr_t addr, char *name)
-/* Do a reverse lookup on the remote IP address followed by a forward lookup
- * to check if the host has that address.  Return true if this is so, return
- * either the true name or the ascii IP address in name[].
- */
-{
-    struct hostent *he;
-    int i;
-
-    he= gethostbyaddr((char *) &addr, sizeof(addr), AF_INET);
-    if (he != NULL) {
-	strcpy(name, he->h_name);
-	he= gethostbyname(name);
-
-	if (he != NULL && he->h_addrtype == AF_INET) {
-	    for (i= 0; he->h_addr_list[i] != NULL; i++) {
-		if (memcmp(he->h_addr_list[i], &addr, sizeof(addr)) == 0) {
-		    strcpy(name, he->h_name);
-		    return 1;
-		}
-	    }
-	}
-    }
-    strcpy(name, inet_ntoa(addr));
-    return 0;
-}
-
-/* "state" and "log" flags, made to be bitwise comparable. */
-#define DEFFAIL		 0x01
-#define FAIL		(0x02 | DEFFAIL)
-#define PASS		 0x04
-
-int servxcheck(ipaddr_t peer, const char *service,
-		void (*logf)(int pass, const char *name))
-{
-    FILE *fp;
-    char word[WLEN];
-    char name[WLEN];
-    int c;
-    int got_name, slist, seen, explicit, state, log;
-    ipaddr_t addr, mask;
-
-    /* Localhost? */
-    if ((peer & HTONL(0xFF000000)) == HTONL(0x7F000000)) return 1;
-
-    if ((fp= fopen(path_servacces, "r")) == nil) {
-	/* Succeed on error, fail if simply nonexistent. */
-	return (errno != ENOENT);
-    }
-
-    slist= 1;		/* Services list (before the colon.) */
-    seen= 0;		/* Given service not yet seen. */
-    explicit= 0;	/* Service mentioned explicitly. */
-    got_name= -1;	/* No reverse lookup done yet. */
-    log= FAIL;		/* By default log failures only. */
-    state= DEFFAIL;	/* Access denied until we know better. */
-
-    while ((c= getword(fp, word)) != EOF) {
-	if (c == ':') {
-	    slist= 0;		/* Switch to access list. */
-	} else
-	if (c == ';') {
-	    slist= 1;		/* Back to list of services. */
-	    seen= 0;
-	} else
-	if (slist) {
-	    /* Traverse services list. */
-
-	    if (match(service, word)) {
-		/* Service has been spotted! */
-		if (match(word, service)) {
-		    /* Service mentioned without wildcards. */
-		    seen= explicit= 1;
-		} else {
-		    /* Matched by a wildcard. */
-		    if (!explicit) seen= 1;
-		}
-	    }
-	} else {
-	    /* Traverse access list. */
-
-	    if (c == 'l' && strcmp(word, "log") == 0) {
-		if (seen) {
-		    /* Log failures and successes. */
-		    log= FAIL|PASS;
-		}
-		continue;
-	    }
-
-	    if (c != '-' && c != '+') {
-		if (logf == nil) {
-		    fprintf(stderr, "%s: strange check word '%s'\n",
-			path_servacces, word);
-		}
-		continue;
-	    }
-
-	    if (seen) {
-		if (state == DEFFAIL) {
-		    /* First check determines the default. */
-		    state= c == '+' ? FAIL : PASS;
-		}
-
-		if ((state == PASS) == (c == '+')) {
-		    /* This check won't change state. */
-		} else
-		if (word[1] == 0) {
-		    /* Lone + or - allows all or none. */
-		    state= c == '-' ? FAIL : PASS;
-		} else
-		if (netspec(word+1, &addr, &mask)) {
-		    /* Remote host is on the specified network? */
-		    if (((peer ^ addr) & mask) == 0) {
-			state= c == '-' ? FAIL : PASS;
-		    }
-		} else {
-		    /* Name check. */
-		    if (got_name == -1) {
-			got_name= get_name(peer, name);
-		    }
-
-		    /* Remote host name matches the word? */
-		    if (!got_name) {
-			state= FAIL;
-		    } else
-		    if (match(name, word+1)) {
-			state= c == '-' ? FAIL : PASS;
-		    }
-		}
-	    }
-	}
-    }
-    fclose(fp);
-
-    if ((log & state) != 0) {
-	/* Log the result of the check. */
-	if (got_name == -1) (void) get_name(peer, name);
-
-	if (logf != nil) {
-	    (*logf)(state == PASS, name);
-	} else {
-	    int lfd;
-	    char line[128+WLEN];
-	    time_t t;
-	    struct tm *tm;
-	    char month[][4]= {
-		"Jan", "Feb", "Mar", "Apr", "May", "Jun",
-		"Jul", "Aug", "Sep", "Oct", "Nov", "Dec",
-	    };
-
-	    if ((lfd= open("/usr/adm/log", O_WRONLY|O_APPEND)) != -1) {
-		time(&t);
-		tm= localtime(&t);
-		sprintf(line, "%s %02d %02d:%02d:%02d service '%s' %s to %s\n",
-		    month[tm->tm_mon],
-		    tm->tm_mday,
-		    tm->tm_hour, tm->tm_min, tm->tm_sec,
-		    service,
-		    state == PASS ? "granted" : "denied",
-		    name);
-		(void) write(lfd, line, strlen(line));
-		close(lfd);
-	    }
-	}
-    }
-    return state == PASS;
-}
-
-char *servxfile(const char *file)
-/* Specify a file to use for the access checks other than the default.  Return
- * the old path.
- */
-{
-    const char *oldpath= path_servacces;
-    path_servacces= file;
-    return (char *) oldpath;	/* (avoid const poisoning) */
-}
Index: trunk/minix/lib/ip/sethostent.c
===================================================================
--- trunk/minix/lib/ip/sethostent.c	(revision 9)
+++ 	(revision )
@@ -1,84 +1,0 @@
-/*	$OpenBSD: sethostent.c,v 1.1 1997/03/12 10:42:11 downsj Exp $	*/
-
-/*
- * Copyright (c) 1985, 1993
- *	The Regents of the University of California.  All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- *    must display the following acknowledgement:
- *	This product includes software developed by the University of
- *	California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- *    may be used to endorse or promote products derived from this software
- *    without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-#if 0
-static char sccsid[] = "@(#)sethostent.c	8.1 (Berkeley) 6/4/93";
-static char rcsid[] = "$From: sethostent.c,v 8.5 1996/09/28 06:51:07 vixie Exp $";
-#else
-static char rcsid[] = "$OpenBSD: sethostent.c,v 1.1 1997/03/12 10:42:11 downsj Exp $";
-#endif
-#endif /* LIBC_SCCS and not lint */
-
-#ifdef notyet
-#include <sys/types.h>
-#include <sys/param.h>
-#include <netinet/in.h>
-#include <arpa/nameser.h>
-#include <netdb.h>
-#include <resolv.h>
-#else
-#include <sys/types.h>
-#include <net/gen/in.h>
-#include <net/gen/nameser.h>
-#include <net/gen/netdb.h>
-#include <net/gen/resolv.h>
-#endif
-
-void
-sethostent(stayopen)
-	int stayopen;
-{
-	if ((_res.options & RES_INIT) == 0 && res_init() == -1)
-		return;
-	if (stayopen)
-	{
-		_res.options |= RES_STAYOPEN;
-#ifdef __minix_vmd
-		_res.options |= RES_USEVC;
-#endif
-	}
-}
-
-void
-endhostent()
-{
-	_res.options &= ~(RES_STAYOPEN | RES_USEVC);
-	_res_close();
-}
-
-/*
- * $PchId: sethostent.c,v 1.2 2000/04/01 18:27:16 philip Exp $
- */
Index: trunk/minix/lib/ip/setsockopt.c
===================================================================
--- trunk/minix/lib/ip/setsockopt.c	(revision 9)
+++ 	(revision )
@@ -1,164 +1,0 @@
-#include <assert.h>
-#include <errno.h>
-#include <stdio.h>
-#include <sys/ioctl.h>
-#include <sys/socket.h>
-#include <sys/types.h>
-#include <netinet/tcp.h>
-
-#include <net/gen/in.h>
-#include <net/gen/tcp.h>
-#include <net/gen/tcp_io.h>
-#include <net/gen/udp.h>
-#include <net/gen/udp_io.h>
-
-#define DEBUG 0
-
-static int _tcp_setsockopt(int socket, int level, int option_name,
-	const void *option_value, socklen_t option_len);
-
-static int _udp_setsockopt(int socket, int level, int option_name,
-	const void *option_value, socklen_t option_len);
-
-int setsockopt(int socket, int level, int option_name,
-        const void *option_value, socklen_t option_len)
-{
-	int r;
-	nwio_tcpopt_t tcpopt;
-	nwio_udpopt_t udpopt;
-
-	r= ioctl(socket, NWIOGTCPOPT, &tcpopt);
-	if (r != -1 || errno != ENOTTY)
-	{
-		if (r == -1)
-		{
-			/* Bad file descriptor */
-			return -1;
-		}
-		return _tcp_setsockopt(socket, level, option_name,
-			option_value, option_len);
-	}
-
-	r= ioctl(socket, NWIOGUDPOPT, &udpopt);
-	if (r != -1 || errno != ENOTTY)
-	{
-		if (r == -1)
-		{
-			/* Bad file descriptor */
-			return -1;
-		}
-		return _udp_setsockopt(socket, level, option_name,
-			option_value, option_len);
-	}
-
-#if DEBUG
-	fprintf(stderr, "setsockopt: not implemented for fd %d\n", socket);
-#endif
-	errno= ENOTSOCK;
-	return -1;
-}
-
-static int _tcp_setsockopt(int socket, int level, int option_name,
-	const void *option_value, socklen_t option_len)
-{
-	int i;
-
-	if (level == SOL_SOCKET && option_name == SO_KEEPALIVE)
-	{
-		if (option_len != sizeof(i))
-		{
-			errno= EINVAL;
-			return -1;
-		}
-		i= *(int *)option_value;
-		if (!i)
-		{
-			/* At the moment there is no way to turn off 
-			 * keepalives.
-			 */
-			errno= ENOSYS;
-			return -1;
-		}
-		return 0;
-	}
-	if (level == SOL_SOCKET && option_name == SO_RCVBUF)
-	{
-		if (option_len != sizeof(i))
-		{
-			errno= EINVAL;
-			return -1;
-		}
-		i= *(int *)option_value;
-		if (i > 32*1024)
-		{
-			/* The receive buffer is limited to 32K at the moment.
-			 */
-			errno= ENOSYS;
-			return -1;
-		}
-		/* There is no way to reduce the receive buffer, do we have to
-		 * let this call fail for smaller buffers?
-		 */
-		return 0;
-	}
-	if (level == SOL_SOCKET && option_name == SO_SNDBUF)
-	{
-		if (option_len != sizeof(i))
-		{
-			errno= EINVAL;
-			return -1;
-		}
-		i= *(int *)option_value;
-		if (i > 32*1024)
-		{
-			/* The send buffer is limited to 32K at the moment.
-			 */
-			errno= ENOSYS;
-			return -1;
-		}
-		/* There is no way to reduce the send buffer, do we have to
-		 * let this call fail for smaller buffers?
-		 */
-		return 0;
-	}
-	if (level == IPPROTO_TCP && option_name == TCP_NODELAY)
-	{
-		if (option_len != sizeof(i))
-		{
-			errno= EINVAL;
-			return -1;
-		}
-		i= *(int *)option_value;
-		if (i)
-		{
-			/* At the moment there is no way to turn on 
-			 * nodelay.
-			 */
-			errno= ENOSYS;
-			return -1;
-		}
-		return 0;
-	}
-#if DEBUG
-	fprintf(stderr, "_tcp_setsocketopt: level %d, name %d\n",
-		level, option_name);
-#endif
-
-	errno= ENOSYS;
-	return -1;
-}
-
-static int _udp_setsockopt(int socket, int level, int option_name,
-	const void *option_value, socklen_t option_len)
-{
-	int i;
-
-#if DEBUG
-	fprintf(stderr, "_udp_setsocketopt: level %d, name %d\n",
-		level, option_name);
-#endif
-
-	errno= ENOSYS;
-	return -1;
-}
-
Index: trunk/minix/lib/ip/shutdown.c
===================================================================
--- trunk/minix/lib/ip/shutdown.c	(revision 9)
+++ 	(revision )
@@ -1,54 +1,0 @@
-#include <errno.h>
-#include <stdio.h>
-#include <sys/ioctl.h>
-#include <sys/socket.h>
-
-#include <net/gen/in.h>
-#include <net/gen/tcp.h>
-#include <net/gen/tcp_io.h>
-
-#define DEBUG 1
-
-static int _tcp_shutdown(int socket, int how);
-
-int shutdown(int socket, int how)
-{
-	int r;
-	nwio_tcpconf_t tcpconf;
-
-	r= ioctl(socket, NWIOGTCPCONF, &tcpconf);
-	if (r != -1 || errno != ENOTTY)
-	{
-		if (r == -1)
-		{
-			/* Bad file descriptor */
-			return -1;
-		}
-		return _tcp_shutdown(socket, how);
-	}
-#if DEBUG
-	fprintf(stderr, "shutdown: not implemented for fd %d\n", socket);
-#endif
-	errno= ENOSYS;
-	return -1;
-}
-
-static int _tcp_shutdown(int socket, int how)
-{
-	int r;
-
-	if (how == SHUT_WR || how == SHUT_RDWR)
-	{
-		r= ioctl(socket, NWIOTCPSHUTDOWN, NULL);
-		if (r == -1)
-			return -1;
-		if (how == SHUT_WR)
-			return 0;
-	}
-
-	/* We can't shutdown the read side of the socket. */
-	errno= ENOSYS;
-	return -1;
-}
-
-
Index: trunk/minix/lib/ip/socket.c
===================================================================
--- trunk/minix/lib/ip/socket.c	(revision 9)
+++ 	(revision )
@@ -1,90 +1,0 @@
-#include <errno.h>
-#include <fcntl.h>
-#include <signal.h>
-#include <stdio.h>
-#include <unistd.h>
-#include <sys/socket.h>
-
-#include <net/netlib.h>
-#include <netinet/in.h>
-
-#define DEBUG 0
-
-static int _tcp_socket(int protocol);
-static int _udp_socket(int protocol);
-
-int socket(int domain, int type, int protocol)
-{
-#if DEBUG
-	fprintf(stderr, "socket: domain %d, type %d, protocol %d\n",
-		domain, type, protocol);
-#endif
-	if (domain != AF_INET)
-	{
-#if DEBUG
-		fprintf(stderr, "socket: bad domain %d\n", domain);
-#endif
-		errno= EAFNOSUPPORT;
-		return -1;
-	}
-	if (type == SOCK_STREAM)
-		return _tcp_socket(protocol);
-
-	if (type == SOCK_DGRAM)
-		return _udp_socket(protocol);
-
-#if DEBUG
-	fprintf(stderr, "socket: nothing for domain %d, type %d, protocol %d\n",
-		domain, type, protocol);
-#endif
-	errno= EPROTOTYPE;
-	return -1;
-}
-
-static int _tcp_socket(int protocol)
-{
-	int fd;
-	if (protocol != 0 && protocol != IPPROTO_TCP)
-	{
-#if DEBUG
-		fprintf(stderr, "socket(tcp): bad protocol %d\n", protocol);
-#endif
-		errno= EPROTONOSUPPORT;
-		return -1;
-	}
-	fd= open(TCP_DEVICE, O_RDWR);
-	return fd;
-}
-
-static int _udp_socket(int protocol)
-{
-	int r, fd, t_errno;
-	struct sockaddr_in sin;
-
-	if (protocol != 0 && protocol != IPPROTO_UDP)
-	{
-#if DEBUG
-		fprintf(stderr, "socket(udp): bad protocol %d\n", protocol);
-#endif
-		errno= EPROTONOSUPPORT;
-		return -1;
-	}
-	fd= open(UDP_DEVICE, O_RDWR);
-	if (fd == -1)
-		return fd;
-
-	/* Bind is implict for UDP sockets? */
-	sin.sin_family= AF_INET;
-	sin.sin_addr.s_addr= INADDR_ANY;
-	sin.sin_port= 0;
-	r= bind(fd, (struct sockaddr *)&sin, sizeof(sin));
-	if (r != 0)
-	{
-		t_errno= errno;
-		close(fd);
-		errno= t_errno;
-		return -1;
-	}
-	return fd;
-}
-
Index: trunk/minix/lib/ip/strcasecmp.c
===================================================================
--- trunk/minix/lib/ip/strcasecmp.c	(revision 9)
+++ 	(revision )
@@ -1,43 +1,0 @@
-/*
-strcasecmp.c
-
-Created Oct 14, 1991 by Philip Homburg
-*/
-
-#include <ctype.h>
-#include <string.h>
-
-#ifdef __STDC__
-#define _CONST	const
-#else
-#define _CONST
-#endif
-
-int
-strcasecmp(s1, s2)
-_CONST char *s1, *s2;
-{
-	int c1, c2;
-	while (c1= toupper(*s1++), c2= toupper(*s2++), c1 == c2 && (c1 & c2))
-		;
-	if (c1 & c2)
-		return c1 < c2 ? -1 : 1;
-	return c1 ? 1 : (c2 ? -1 : 0);
-}
-
-int
-strncasecmp(s1, s2, len)
-_CONST char *s1, *s2;
-size_t len;
-{
-	int c1, c2;
-	do {
-		if (len == 0)
-			return 0;
-		len--;
-	} while (c1= toupper(*s1++), c2= toupper(*s2++), c1 == c2 && (c1 & c2))
-		;
-	if (c1 & c2)
-		return c1 < c2 ? -1 : 1;
-	return c1 ? 1 : (c2 ? -1 : 0);
-}
Index: trunk/minix/lib/math/Makedepend-ack
===================================================================
--- trunk/minix/lib/math/Makedepend-ack	(revision 9)
+++ 	(revision )
@@ -1,20 +1,0 @@
-depend-ack:
-	rm .depend-ack
-	touch .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -E' asin.c | sed -e 's:^\(.\):../obj-ack//./math/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -E' atan.c | sed -e 's:^\(.\):../obj-ack//./math/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -E' atan2.c | sed -e 's:^\(.\):../obj-ack//./math/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -E' ceil.c | sed -e 's:^\(.\):../obj-ack//./math/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -E' exp.c | sed -e 's:^\(.\):../obj-ack//./math/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -E' fabs.c | sed -e 's:^\(.\):../obj-ack//./math/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -E' floor.c | sed -e 's:^\(.\):../obj-ack//./math/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -E' fmod.c | sed -e 's:^\(.\):../obj-ack//./math/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -E' hugeval.c | sed -e 's:^\(.\):../obj-ack//./math/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -E' log.c | sed -e 's:^\(.\):../obj-ack//./math/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -E' log10.c | sed -e 's:^\(.\):../obj-ack//./math/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -E' pow.c | sed -e 's:^\(.\):../obj-ack//./math/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -E' sin.c | sed -e 's:^\(.\):../obj-ack//./math/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -E' sinh.c | sed -e 's:^\(.\):../obj-ack//./math/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -E' sqrt.c | sed -e 's:^\(.\):../obj-ack//./math/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -E' tan.c | sed -e 's:^\(.\):../obj-ack//./math/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -E' tanh.c | sed -e 's:^\(.\):../obj-ack//./math/\1:' >> .depend-ack
Index: trunk/minix/lib/math/Makedepend-gnu
===================================================================
--- trunk/minix/lib/math/Makedepend-gnu	(revision 9)
+++ 	(revision )
@@ -1,20 +1,0 @@
-depend-gnu:
-	rm .depend-gnu
-	touch .depend-gnu
-	mkdep 'gcc -O -D_MINIX -D_POSIX_SOURCE -E' asin.c | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./math/\1:' >> .depend-gnu
-	mkdep 'gcc -O -D_MINIX -D_POSIX_SOURCE -E' atan.c | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./math/\1:' >> .depend-gnu
-	mkdep 'gcc -O -D_MINIX -D_POSIX_SOURCE -E' atan2.c | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./math/\1:' >> .depend-gnu
-	mkdep 'gcc -O -D_MINIX -D_POSIX_SOURCE -E' ceil.c | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./math/\1:' >> .depend-gnu
-	mkdep 'gcc -O -D_MINIX -D_POSIX_SOURCE -E' exp.c | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./math/\1:' >> .depend-gnu
-	mkdep 'gcc -O -D_MINIX -D_POSIX_SOURCE -E' fabs.c | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./math/\1:' >> .depend-gnu
-	mkdep 'gcc -O -D_MINIX -D_POSIX_SOURCE -E' floor.c | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./math/\1:' >> .depend-gnu
-	mkdep 'gcc -O -D_MINIX -D_POSIX_SOURCE -E' fmod.c | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./math/\1:' >> .depend-gnu
-	mkdep 'gcc -O -D_MINIX -D_POSIX_SOURCE -E' hugeval.c | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./math/\1:' >> .depend-gnu
-	mkdep 'gcc -O -D_MINIX -D_POSIX_SOURCE -E' log.c | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./math/\1:' >> .depend-gnu
-	mkdep 'gcc -O -D_MINIX -D_POSIX_SOURCE -E' log10.c | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./math/\1:' >> .depend-gnu
-	mkdep 'gcc -O -D_MINIX -D_POSIX_SOURCE -E' pow.c | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./math/\1:' >> .depend-gnu
-	mkdep 'gcc -O -D_MINIX -D_POSIX_SOURCE -E' sin.c | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./math/\1:' >> .depend-gnu
-	mkdep 'gcc -O -D_MINIX -D_POSIX_SOURCE -E' sinh.c | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./math/\1:' >> .depend-gnu
-	mkdep 'gcc -O -D_MINIX -D_POSIX_SOURCE -E' sqrt.c | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./math/\1:' >> .depend-gnu
-	mkdep 'gcc -O -D_MINIX -D_POSIX_SOURCE -E' tan.c | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./math/\1:' >> .depend-gnu
-	mkdep 'gcc -O -D_MINIX -D_POSIX_SOURCE -E' tanh.c | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./math/\1:' >> .depend-gnu
Index: trunk/minix/lib/math/Makefile
===================================================================
--- trunk/minix/lib/math/Makefile	(revision 9)
+++ 	(revision )
@@ -1,164 +1,0 @@
-#Generated from ./math/Makefile.in
-all: all-ack
-
-all-ack:
-all-gnu:
-
-makefiles: Makefile
-Makedepend-ack Makedepend-gnu: 
-	sh ../generate.sh ./math ../obj-ack/ ../obj-gnu
-
-Makefile: Makefile.in Makedepend-ack Makedepend-gnu
-	sh ../generate.sh ./math ../obj-ack/ ../obj-gnu
-	@echo
-	@echo *Attention*
-	@echo Makefile is regenerated... rerun command to see changes
-	@echo *Attention*
-	@echo
-
-depend: depend-ack
-all-ack: ../obj-ack//libc.a
-
-../obj-ack//libc.a: ../obj-ack//libc.a(asin.o)
-../obj-ack//libc.a: ../obj-ack//libc.a(atan.o)
-../obj-ack//libc.a: ../obj-ack//libc.a(atan2.o)
-../obj-ack//libc.a: ../obj-ack//libc.a(ceil.o)
-../obj-ack//libc.a: ../obj-ack//libc.a(exp.o)
-../obj-ack//libc.a: ../obj-ack//libc.a(fabs.o)
-../obj-ack//libc.a: ../obj-ack//libc.a(floor.o)
-../obj-ack//libc.a: ../obj-ack//libc.a(fmod.o)
-../obj-ack//libc.a: ../obj-ack//libc.a(hugeval.o)
-../obj-ack//libc.a: ../obj-ack//libc.a(log.o)
-../obj-ack//libc.a: ../obj-ack//libc.a(log10.o)
-../obj-ack//libc.a: ../obj-ack//libc.a(pow.o)
-../obj-ack//libc.a: ../obj-ack//libc.a(sin.o)
-../obj-ack//libc.a: ../obj-ack//libc.a(sinh.o)
-../obj-ack//libc.a: ../obj-ack//libc.a(sqrt.o)
-../obj-ack//libc.a: ../obj-ack//libc.a(tan.o)
-../obj-ack//libc.a: ../obj-ack//libc.a(tanh.o)
-
-../obj-ack//libc.a:
-	ar cr ../obj-ack//libc.a ../obj-ack//./math/*.o
-	rm ../obj-ack//./math/*.o
-
-../obj-ack//libc.a(asin.o): asin.c
-	cc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-ack//./math/asin.o asin.c
-../obj-ack//libc.a(atan.o): atan.c
-	cc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-ack//./math/atan.o atan.c
-../obj-ack//libc.a(atan2.o): atan2.c
-	cc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-ack//./math/atan2.o atan2.c
-../obj-ack//libc.a(ceil.o): ceil.c
-	cc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-ack//./math/ceil.o ceil.c
-../obj-ack//libc.a(exp.o): exp.c
-	cc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-ack//./math/exp.o exp.c
-../obj-ack//libc.a(fabs.o): fabs.c
-	cc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-ack//./math/fabs.o fabs.c
-../obj-ack//libc.a(floor.o): floor.c
-	cc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-ack//./math/floor.o floor.c
-../obj-ack//libc.a(fmod.o): fmod.c
-	cc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-ack//./math/fmod.o fmod.c
-../obj-ack//libc.a(hugeval.o): hugeval.c
-	cc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-ack//./math/hugeval.o hugeval.c
-../obj-ack//libc.a(log.o): log.c
-	cc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-ack//./math/log.o log.c
-../obj-ack//libc.a(log10.o): log10.c
-	cc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-ack//./math/log10.o log10.c
-../obj-ack//libc.a(pow.o): pow.c
-	cc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-ack//./math/pow.o pow.c
-../obj-ack//libc.a(sin.o): sin.c
-	cc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-ack//./math/sin.o sin.c
-../obj-ack//libc.a(sinh.o): sinh.c
-	cc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-ack//./math/sinh.o sinh.c
-../obj-ack//libc.a(sqrt.o): sqrt.c
-	cc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-ack//./math/sqrt.o sqrt.c
-../obj-ack//libc.a(tan.o): tan.c
-	cc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-ack//./math/tan.o tan.c
-../obj-ack//libc.a(tanh.o): tanh.c
-	cc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-ack//./math/tanh.o tanh.c
-
-all-gnu: ../obj-gnu/libc.a
-
-../obj-gnu/libc.a: ../obj-gnu/./math/asin.o
-../obj-gnu/libc.a: ../obj-gnu/./math/atan.o
-../obj-gnu/libc.a: ../obj-gnu/./math/atan2.o
-../obj-gnu/libc.a: ../obj-gnu/./math/ceil.o
-../obj-gnu/libc.a: ../obj-gnu/./math/exp.o
-../obj-gnu/libc.a: ../obj-gnu/./math/fabs.o
-../obj-gnu/libc.a: ../obj-gnu/./math/floor.o
-../obj-gnu/libc.a: ../obj-gnu/./math/fmod.o
-../obj-gnu/libc.a: ../obj-gnu/./math/hugeval.o
-../obj-gnu/libc.a: ../obj-gnu/./math/log.o
-../obj-gnu/libc.a: ../obj-gnu/./math/log10.o
-../obj-gnu/libc.a: ../obj-gnu/./math/pow.o
-../obj-gnu/libc.a: ../obj-gnu/./math/sin.o
-../obj-gnu/libc.a: ../obj-gnu/./math/sinh.o
-../obj-gnu/libc.a: ../obj-gnu/./math/sqrt.o
-../obj-gnu/libc.a: ../obj-gnu/./math/tan.o
-../obj-gnu/libc.a: ../obj-gnu/./math/tanh.o
-
-../obj-gnu/libc.a:
-	gar cr ../obj-gnu/libc.a $?
-
-../obj-gnu/./math/asin.o: asin.c
-	gcc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-gnu/./math/asin.o asin.c
-
-../obj-gnu/./math/atan.o: atan.c
-	gcc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-gnu/./math/atan.o atan.c
-
-../obj-gnu/./math/atan2.o: atan2.c
-	gcc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-gnu/./math/atan2.o atan2.c
-
-../obj-gnu/./math/ceil.o: ceil.c
-	gcc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-gnu/./math/ceil.o ceil.c
-
-../obj-gnu/./math/exp.o: exp.c
-	gcc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-gnu/./math/exp.o exp.c
-
-../obj-gnu/./math/fabs.o: fabs.c
-	gcc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-gnu/./math/fabs.o fabs.c
-
-../obj-gnu/./math/floor.o: floor.c
-	gcc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-gnu/./math/floor.o floor.c
-
-../obj-gnu/./math/fmod.o: fmod.c
-	gcc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-gnu/./math/fmod.o fmod.c
-
-../obj-gnu/./math/hugeval.o: hugeval.c
-	gcc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-gnu/./math/hugeval.o hugeval.c
-
-../obj-gnu/./math/log.o: log.c
-	gcc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-gnu/./math/log.o log.c
-
-../obj-gnu/./math/log10.o: log10.c
-	gcc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-gnu/./math/log10.o log10.c
-
-../obj-gnu/./math/pow.o: pow.c
-	gcc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-gnu/./math/pow.o pow.c
-
-../obj-gnu/./math/sin.o: sin.c
-	gcc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-gnu/./math/sin.o sin.c
-
-../obj-gnu/./math/sinh.o: sinh.c
-	gcc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-gnu/./math/sinh.o sinh.c
-
-../obj-gnu/./math/sqrt.o: sqrt.c
-	gcc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-gnu/./math/sqrt.o sqrt.c
-
-../obj-gnu/./math/tan.o: tan.c
-	gcc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-gnu/./math/tan.o tan.c
-
-../obj-gnu/./math/tanh.o: tanh.c
-	gcc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-gnu/./math/tanh.o tanh.c
-
-
-
-
-clean::
-	rm -f ../obj-ack//./math/*
-	rm -f ../obj-gnu/./math/*
-
-include Makedepend-ack
-include .depend-ack
-
-include Makedepend-gnu
-include .depend-gnu
Index: trunk/minix/lib/math/Makefile.in
===================================================================
--- trunk/minix/lib/math/Makefile.in	(revision 9)
+++ 	(revision )
@@ -1,26 +1,0 @@
-# Makefile for lib/math.
-
-CFLAGS="-O -D_MINIX -D_POSIX_SOURCE"
-
-LIBRARIES=libc
-
-libc_FILES=" \
-	asin.c \
-	atan.c \
-	atan2.c \
-	ceil.c \
-	exp.c \
-	fabs.c \
-	floor.c \
-	fmod.c \
-	hugeval.c \
-	log.c \
-	log10.c \
-	pow.c \
-	sin.c \
-	sinh.c \
-	sqrt.c \
-	tan.c \
-	tanh.c"
-
-TYPE=both
Index: trunk/minix/lib/math/asin.c
===================================================================
--- trunk/minix/lib/math/asin.c	(revision 9)
+++ 	(revision )
@@ -1,82 +1,0 @@
-/*
- * (c) copyright 1988 by the Vrije Universiteit, Amsterdam, The Netherlands.
- * See the copyright notice in the ACK home directory, in the file "Copyright".
- *
- * Author: Ceriel J.H. Jacobs
- */
-/* $Header: /cvsup/minix/src/lib/math/asin.c,v 1.1.1.1 2005/04/21 14:56:24 beng Exp $ */
-
-#include	<math.h>
-#include	<errno.h>
-#include	"localmath.h"
-
-static double
-asin_acos(double x, int cosfl)
-{
-	int negative = x < 0;
-	int     i;
-	double  g;
-	static double p[] = {
-		-0.27368494524164255994e+2,
-		 0.57208227877891731407e+2,
-		-0.39688862997540877339e+2,
-		 0.10152522233806463645e+2,
-		-0.69674573447350646411e+0
-	};
-	static double q[] = {
-		-0.16421096714498560795e+3,
-		 0.41714430248260412556e+3,
-		-0.38186303361750149284e+3,
-		 0.15095270841030604719e+3,
-		-0.23823859153670238830e+2,
-		 1.0
-	};
-
-	if (__IsNan(x)) {
-		errno = EDOM;
-		return x;
-	}
-
-	if (negative) {
-		x = -x;
-	}
-	if (x > 0.5) {
-		i = 1;
-		if (x > 1) {
-			errno = EDOM;
-			return 0;
-		}
-		g = 0.5 - 0.5 * x;
-		x = - sqrt(g);
-		x += x;
-	}
-	else {
-		/* ??? avoid underflow ??? */
-		i = 0;
-		g = x * x;
-	}
-	x += x * g * POLYNOM4(g, p) / POLYNOM5(g, q);
-	if (cosfl) {
-		if (! negative) x = -x;
-	}
-	if ((cosfl == 0) == (i == 1)) {
-		x = (x + M_PI_4) + M_PI_4;
-	}
-	else if (cosfl && negative && i == 1) {
-		x = (x + M_PI_2) + M_PI_2;
-	}
-	if (! cosfl && negative) x = -x;
-	return x;
-}
-
-double
-asin(double x)
-{
-	return asin_acos(x, 0);
-}
-
-double
-acos(double x)
-{
-	return asin_acos(x, 1);
-}
Index: trunk/minix/lib/math/atan.c
===================================================================
--- trunk/minix/lib/math/atan.c	(revision 9)
+++ 	(revision )
@@ -1,72 +1,0 @@
-/*
- * (c) copyright 1988 by the Vrije Universiteit, Amsterdam, The Netherlands.
- * See the copyright notice in the ACK home directory, in the file "Copyright".
- *
- * Author: Ceriel J.H. Jacobs
- */
-/* $Header: /cvsup/minix/src/lib/math/atan.c,v 1.1.1.1 2005/04/21 14:56:24 beng Exp $ */
-
-#include	<float.h>
-#include	<math.h>
-#include	<errno.h>
-#include	"localmath.h"
-
-double
-atan(double x)
-{
-	/*      Algorithm and coefficients from:
-			"Software manual for the elementary functions"
-			by W.J. Cody and W. Waite, Prentice-Hall, 1980
-	*/
-
-	static double p[] = {
-		-0.13688768894191926929e+2,
-		-0.20505855195861651981e+2,
-		-0.84946240351320683534e+1,
-		-0.83758299368150059274e+0
-	};
-	static double q[] = {
-		 0.41066306682575781263e+2,
-		 0.86157349597130242515e+2,
-		 0.59578436142597344465e+2,
-		 0.15024001160028576121e+2,
-		 1.0
-	};
-	static double a[] = {
-		0.0,
-		0.52359877559829887307710723554658381,  /* pi/6 */
-		M_PI_2,
-		1.04719755119659774615421446109316763   /* pi/3 */
-	};
-
-	int     neg = x < 0;
-	int     n;
-	double  g;
-
-	if (__IsNan(x)) {
-		errno = EDOM;
-		return x;
-	}
-	if (neg) {
-		x = -x;
-	}
-	if (x > 1.0) {
-		x = 1.0/x;
-		n = 2;
-	}
-	else    n = 0;
-
-	if (x > 0.26794919243112270647) {       /* 2-sqtr(3) */
-		n = n + 1;
-		x = (((0.73205080756887729353*x-0.5)-0.5)+x)/
-			(1.73205080756887729353+x);
-	}
-
-	/* ??? avoid underflow ??? */
-
-	g = x * x;
-	x += x * g * POLYNOM3(g, p) / POLYNOM4(g, q);
-	if (n > 1) x = -x;
-	x += a[n];
-	return neg ? -x : x;
-}
Index: trunk/minix/lib/math/atan2.c
===================================================================
--- trunk/minix/lib/math/atan2.c	(revision 9)
+++ 	(revision )
@@ -1,42 +1,0 @@
-/*
- * (c) copyright 1988 by the Vrije Universiteit, Amsterdam, The Netherlands.
- * See the copyright notice in the ACK home directory, in the file "Copyright".
- *
- * Author: Ceriel J.H. Jacobs
- */
-/* $Header: /cvsup/minix/src/lib/math/atan2.c,v 1.1.1.1 2005/04/21 14:56:24 beng Exp $ */
-
-#include	<math.h>
-#include	<errno.h>
-#include	"localmath.h"
-
-double
-atan2(double y, double x)
-{
-	double absx, absy, val;
-
-	if (x == 0 && y == 0) {
-		errno = EDOM;
-		return 0;
-	}
-	absy = y < 0 ? -y : y;
-	absx = x < 0 ? -x : x;
-	if (absy - absx == absy) {
-		/* x negligible compared to y */
-		return y < 0 ? -M_PI_2 : M_PI_2;
-	}
-	if (absx - absy == absx) {
-		/* y negligible compared to x */
-		val = 0.0;
-	}
-	else	val = atan(y/x);
-	if (x > 0) {
-		/* first or fourth quadrant; already correct */
-		return val;
-	}
-	if (y < 0) {
-		/* third quadrant */
-		return val - M_PI;
-	}
-	return val + M_PI;
-}
Index: trunk/minix/lib/math/ceil.c
===================================================================
--- trunk/minix/lib/math/ceil.c	(revision 9)
+++ 	(revision )
@@ -1,20 +1,0 @@
-/*
- * (c) copyright 1988 by the Vrije Universiteit, Amsterdam, The Netherlands.
- * See the copyright notice in the ACK home directory, in the file "Copyright".
- *
- * Author: Ceriel J.H. Jacobs
- */
-/* $Header: /cvsup/minix/src/lib/math/ceil.c,v 1.1.1.1 2005/04/21 14:56:26 beng Exp $ */
-
-#include	<math.h>
-
-double
-ceil(double x)
-{
-	double val;
-
-	return modf(x, &val) > 0 ? val + 1.0 : val ;
-	/*	this also works if modf always returns a positive
-		fractional part
-	*/
-}
Index: trunk/minix/lib/math/exp.c
===================================================================
--- trunk/minix/lib/math/exp.c	(revision 9)
+++ 	(revision )
@@ -1,72 +1,0 @@
-/*
- * (c) copyright 1988 by the Vrije Universiteit, Amsterdam, The Netherlands.
- * See the copyright notice in the ACK home directory, in the file "Copyright".
- *
- * Author: Ceriel J.H. Jacobs
- */
-/* $Header: /cvsup/minix/src/lib/math/exp.c,v 1.1.1.1 2005/04/21 14:56:26 beng Exp $ */
-
-#include	<math.h>
-#include	<float.h>
-#include	<errno.h>
-#include	"localmath.h"
-
-
-double
-exp(double x)
-{
-	/*	Algorithm and coefficients from:
-			"Software manual for the elementary functions"
-			by W.J. Cody and W. Waite, Prentice-Hall, 1980
-	*/
-
-	static double p[] = {
-		0.25000000000000000000e+0,
-		0.75753180159422776666e-2,
-		0.31555192765684646356e-4
-	};
-
-	static double q[] = {
-		0.50000000000000000000e+0,
-		0.56817302698551221787e-1,
-		0.63121894374398503557e-3,
-		0.75104028399870046114e-6
-	};
-	double	xn, g;
-	int	n;
-	int	negative = x < 0;
-
-	if (__IsNan(x)) {
-		errno = EDOM;
-		return x;
-	}
-	if (x < M_LN_MIN_D) {
-		errno = ERANGE;
-		return 0.0;
-	}
-	if (x > M_LN_MAX_D) {
-		errno = ERANGE;
-		return HUGE_VAL;
-	}
-
-	if (negative) x = -x;
- 
-	/* ??? avoid underflow ??? */
-
-	n = x * M_LOG2E + 0.5;	/* 1/ln(2) = log2(e), 0.5 added for rounding */
-	xn = n;
-	{
-		double	x1 = (long) x;
-		double	x2 = x - x1;
-
-		g = ((x1-xn*0.693359375)+x2) - xn*(-2.1219444005469058277e-4);
-	}
-	if (negative) {
-		g = -g;
-		n = -n;
-	}
-	xn = g * g;
-	x = g * POLYNOM2(xn, p);
-	n += 1;
-	return (ldexp(0.5 + x/(POLYNOM3(xn, q) - x), n));
-}
Index: trunk/minix/lib/math/fabs.c
===================================================================
--- trunk/minix/lib/math/fabs.c	(revision 9)
+++ 	(revision )
@@ -1,13 +1,0 @@
-/*
- * (c) copyright 1988 by the Vrije Universiteit, Amsterdam, The Netherlands.
- * See the copyright notice in the ACK home directory, in the file "Copyright".
- *
- * Author: Ceriel J.H. Jacobs
- */
-/* $Header: /cvsup/minix/src/lib/math/fabs.c,v 1.1.1.1 2005/04/21 14:56:26 beng Exp $ */
-
-double
-fabs(double x)
-{
-	return  x < 0 ? -x : x;
-}
Index: trunk/minix/lib/math/floor.c
===================================================================
--- trunk/minix/lib/math/floor.c	(revision 9)
+++ 	(revision )
@@ -1,20 +1,0 @@
-/*
- * (c) copyright 1988 by the Vrije Universiteit, Amsterdam, The Netherlands.
- * See the copyright notice in the ACK home directory, in the file "Copyright".
- *
- * Author: Ceriel J.H. Jacobs
- */
-/* $Header: /cvsup/minix/src/lib/math/floor.c,v 1.1.1.1 2005/04/21 14:56:26 beng Exp $ */
-
-#include	<math.h>
-
-double
-floor(double x)
-{
-	double val;
-
-	return modf(x, &val) < 0 ? val - 1.0 : val ;
-	/*	this also works if modf always returns a positive
-		fractional part
-	*/
-}
Index: trunk/minix/lib/math/fmod.c
===================================================================
--- trunk/minix/lib/math/fmod.c	(revision 9)
+++ 	(revision )
@@ -1,34 +1,0 @@
-/*
- * (c) copyright 1988 by the Vrije Universiteit, Amsterdam, The Netherlands.
- * See the copyright notice in the ACK home directory, in the file "Copyright".
- *
- * Author: Hans van Eck
- */
-/* $Header: /cvsup/minix/src/lib/math/fmod.c,v 1.1.1.1 2005/04/21 14:56:26 beng Exp $ */
-
-#include	<math.h>
-#include	<errno.h>
-
-double
-fmod(double x, double y)
-{
-	long	i;
-	double val;
-	double frac;
-
-	if (y == 0) {
-		errno = EDOM;
-		return 0;
-	}
-	frac = modf( x / y, &val);
-
-	return frac * y;
-
-/*
-	val = x / y;
-	if (val > LONG_MIN && val < LONG_MAX) {
-		i = val;
-		return x - i * y;
-	}
-*/
-}
Index: trunk/minix/lib/math/hugeval.c
===================================================================
--- trunk/minix/lib/math/hugeval.c	(revision 9)
+++ 	(revision )
@@ -1,14 +1,0 @@
-/*
- * (c) copyright 1990 by the Vrije Universiteit, Amsterdam, The Netherlands.
- * See the copyright notice in the ACK home directory, in the file "Copyright".
- *
- * Author: Hans van Eck
- */
-/* $Header: /cvsup/minix/src/lib/math/hugeval.c,v 1.1.1.1 2005/04/21 14:56:26 beng Exp $ */
-#include	<math.h>
-
-double
-__huge_val(void)
-{
-	return 1.0e+1000;	/* This will generate a warning */
-}
Index: trunk/minix/lib/math/localmath.h
===================================================================
--- trunk/minix/lib/math/localmath.h	(revision 9)
+++ 	(revision )
@@ -1,42 +1,0 @@
-/*
- * localmath.h - This header is used by the mathematical library.
- */
-/* $Header: /cvsup/minix/src/lib/math/localmath.h,v 1.1.1.1 2005/04/21 14:56:26 beng Exp $ */
-
-/* some constants (Hart & Cheney) */
-#define	M_PI		3.14159265358979323846264338327950288
-#define	M_2PI		6.28318530717958647692528676655900576
-#define	M_3PI_4		2.35619449019234492884698253745962716
-#define	M_PI_2		1.57079632679489661923132169163975144
-#define	M_3PI_8		1.17809724509617246442349126872981358
-#define	M_PI_4		0.78539816339744830961566084581987572
-#define	M_PI_8		0.39269908169872415480783042290993786
-#define	M_1_PI		0.31830988618379067153776752674502872
-#define	M_2_PI		0.63661977236758134307553505349005744
-#define	M_4_PI		1.27323954473516268615107010698011488
-#define	M_E		2.71828182845904523536028747135266250
-#define	M_LOG2E		1.44269504088896340735992468100189213
-#define	M_LOG10E	0.43429448190325182765112891891660508
-#define	M_LN2		0.69314718055994530941723212145817657
-#define	M_LN10		2.30258509299404568401799145468436421
-#define	M_SQRT2		1.41421356237309504880168872420969808
-#define	M_1_SQRT2	0.70710678118654752440084436210484904
-#define	M_EULER		0.57721566490153286060651209008240243
-
-/* macros for constructing polynomials */
-#define	POLYNOM1(x, a)	((a)[1]*(x)+(a)[0])
-#define	POLYNOM2(x, a)	(POLYNOM1((x),(a)+1)*(x)+(a)[0])
-#define	POLYNOM3(x, a)	(POLYNOM2((x),(a)+1)*(x)+(a)[0])
-#define	POLYNOM4(x, a)	(POLYNOM3((x),(a)+1)*(x)+(a)[0])
-#define	POLYNOM5(x, a)	(POLYNOM4((x),(a)+1)*(x)+(a)[0])
-#define	POLYNOM6(x, a)	(POLYNOM5((x),(a)+1)*(x)+(a)[0])
-#define	POLYNOM7(x, a)	(POLYNOM6((x),(a)+1)*(x)+(a)[0])
-#define	POLYNOM8(x, a)	(POLYNOM7((x),(a)+1)*(x)+(a)[0])
-#define	POLYNOM9(x, a)	(POLYNOM8((x),(a)+1)*(x)+(a)[0])
-#define	POLYNOM10(x, a)	(POLYNOM9((x),(a)+1)*(x)+(a)[0])
-#define	POLYNOM11(x, a)	(POLYNOM10((x),(a)+1)*(x)+(a)[0])
-#define	POLYNOM12(x, a)	(POLYNOM11((x),(a)+1)*(x)+(a)[0])
-#define	POLYNOM13(x, a)	(POLYNOM12((x),(a)+1)*(x)+(a)[0])
-
-#define	M_LN_MAX_D	(M_LN2 * DBL_MAX_EXP)
-#define	M_LN_MIN_D	(M_LN2 * (DBL_MIN_EXP - 1))
Index: trunk/minix/lib/math/log.c
===================================================================
--- trunk/minix/lib/math/log.c	(revision 9)
+++ 	(revision )
@@ -1,67 +1,0 @@
-/*
- * (c) copyright 1988 by the Vrije Universiteit, Amsterdam, The Netherlands.
- * See the copyright notice in the ACK home directory, in the file "Copyright".
- *
- * Author: Ceriel J.H. Jacobs
- */
-/* $Header: /cvsup/minix/src/lib/math/log.c,v 1.1.1.1 2005/04/21 14:56:26 beng Exp $ */
-
-#include	<math.h>
-#include	<float.h>
-#include	<errno.h>
-#include	"localmath.h"
-
-double
-log(double x)
-{
-	/*	Algorithm and coefficients from:
-			"Software manual for the elementary functions"
-			by W.J. Cody and W. Waite, Prentice-Hall, 1980
-	*/
-	static double a[] = {
-		-0.64124943423745581147e2,
-		 0.16383943563021534222e2,
-		-0.78956112887491257267e0
-	};
-	static double b[] = {
-		-0.76949932108494879777e3,
-		 0.31203222091924532844e3,
-		-0.35667977739034646171e2,
-		 1.0
-	};
-
-	double	znum, zden, z, w;
-	int	exponent;
-
-	if (__IsNan(x)) {
-		errno = EDOM;
-		return x;
-	}
-	if (x < 0) {
-		errno = EDOM;
-		return -HUGE_VAL;
-	}
-	else if (x == 0) {
-		errno = ERANGE;
-		return -HUGE_VAL;
-	}
-
-	if (x <= DBL_MAX) {
-	}
-	else return x;	/* for infinity and Nan */
-	x = frexp(x, &exponent);
-	if (x > M_1_SQRT2) {
-		znum = (x - 0.5) - 0.5;
-		zden = x * 0.5 + 0.5;
-	}
-	else {
-		znum = x - 0.5;
-		zden = znum * 0.5 + 0.5;
-		exponent--;
-	}
-	z = znum/zden; w = z * z;
-	x = z + z * w * (POLYNOM2(w,a)/POLYNOM3(w,b));
-	z = exponent;
-	x += z * (-2.121944400546905827679e-4);
-	return x + z * 0.693359375;
-}
Index: trunk/minix/lib/math/log10.c
===================================================================
--- trunk/minix/lib/math/log10.c	(revision 9)
+++ 	(revision )
@@ -1,30 +1,0 @@
-/*
- * (c) copyright 1988 by the Vrije Universiteit, Amsterdam, The Netherlands.
- * See the copyright notice in the ACK home directory, in the file "Copyright".
- *
- * Author: Ceriel J.H. Jacobs
- */
-/* $Header: /cvsup/minix/src/lib/math/log10.c,v 1.1.1.1 2005/04/21 14:56:26 beng Exp $ */
-
-#include	<math.h>
-#include	<errno.h>
-#include	"localmath.h"
-
-double
-log10(double x)
-{
-	if (__IsNan(x)) {
-		errno = EDOM;
-		return x;
-	}
-	if (x < 0) {
-		errno = EDOM;
-		return -HUGE_VAL;
-	}
-	else if (x == 0) {
-		errno = ERANGE;
-		return -HUGE_VAL;
-	}
-
-	return log(x) / M_LN10;
-}
Index: trunk/minix/lib/math/pow.c
===================================================================
--- trunk/minix/lib/math/pow.c	(revision 9)
+++ 	(revision )
@@ -1,54 +1,0 @@
-/*
- * (c) copyright 1988 by the Vrije Universiteit, Amsterdam, The Netherlands.
- * See the copyright notice in the ACK home directory, in the file "Copyright".
- *
- * Author: Ceriel J.H. Jacobs
- */
-/* $Header: /cvsup/minix/src/lib/math/pow.c,v 1.1.1.1 2005/04/21 14:56:26 beng Exp $ */
-
-#include	<math.h>
-#include	<float.h>
-#include	<errno.h>
-#include	"localmath.h"
-
-double
-pow(double x, double y)
-{
-	/*	Simple version for now. The Cody and Waite book has
-		a very complicated, much more precise version, but
-		this version has machine-dependent arrays A1 and A2,
-		and I don't know yet how to solve this ???
-	*/
-	double dummy;
-	int	result_neg = 0;
-
-	if ((x == 0 && y == 0) ||
-	    (x < 0 && modf(y, &dummy) != 0)) {
-		errno = EDOM;
-		return 0;
-	}
-
-	if (x == 0) return x;
-
-	if (x < 0) {
-		if (modf(y/2.0, &dummy) != 0) {
-			/* y was odd */
-			result_neg = 1;
-		}
-		x = -x;
-	}
-	x = log(x);
-
-	if (x < 0) {
-		x = -x;
-		y = -y;
-	}
-	/* Beware of overflow in the multiplication */
-	if (x > 1.0 && y > DBL_MAX/x) {
-		errno = ERANGE;
-		return result_neg ? -HUGE_VAL : HUGE_VAL;
-	}
-
-	x = exp(x * y);
-	return result_neg ? -x : x;
-}
Index: trunk/minix/lib/math/sin.c
===================================================================
--- trunk/minix/lib/math/sin.c	(revision 9)
+++ 	(revision )
@@ -1,99 +1,0 @@
-/*
- * (c) copyright 1988 by the Vrije Universiteit, Amsterdam, The Netherlands.
- * See the copyright notice in the ACK home directory, in the file "Copyright".
- *
- * Author: Ceriel J.H. Jacobs
- */
-/* $Header: /cvsup/minix/src/lib/math/sin.c,v 1.1.1.1 2005/04/21 14:56:26 beng Exp $ */
-
-#include	<math.h>
-#include	<float.h>
-#include	<errno.h>
-#include	"localmath.h"
-
-static double
-sinus(double x, int cos_flag)
-{
-	/*      Algorithm and coefficients from:
-			"Software manual for the elementary functions"
-			by W.J. Cody and W. Waite, Prentice-Hall, 1980
-	*/
-
-	static double r[] = {
-		-0.16666666666666665052e+0,
-		 0.83333333333331650314e-2,
-		-0.19841269841201840457e-3,
-		 0.27557319210152756119e-5,
-		-0.25052106798274584544e-7,
-		 0.16058936490371589114e-9,
-		-0.76429178068910467734e-12,
-		 0.27204790957888846175e-14
-	};
-
-	double  y;
-	int     neg = 1;
-
-	if (__IsNan(x)) {
-		errno = EDOM;
-		return x;
-	}
-	if (x < 0) {
-		x = -x;
-		neg = -1;
-	}
-	if (cos_flag) {
-		neg = 1;
-		y = M_PI_2 + x;
-	}
-	else    y = x;
-
-	/* ??? avoid loss of significance, if y is too large, error ??? */
-
-	y = y * M_1_PI + 0.5;
-
-	if (y >= DBL_MAX/M_PI) return 0.0;
-
-	/*      Use extended precision to calculate reduced argument.
-		Here we used 12 bits of the mantissa for a1.
-		Also split x in integer part x1 and fraction part x2.
-	*/
-#define A1 3.1416015625
-#define A2 -8.908910206761537356617e-6
-	{
-		double x1, x2;
-
-		modf(y, &y);
-		if (modf(0.5*y, &x1)) neg = -neg;
-		if (cos_flag) y -= 0.5;
-		x2 = modf(x, &x1);
-		x = x1 - y * A1;
-		x += x2;
-		x -= y * A2;
-#undef A1
-#undef A2
-	}
- 
-	if (x < 0) {
-		neg = -neg;
-		x = -x;
-	}
-
-	/* ??? avoid underflow ??? */
-
-	y = x * x;
-	x += x * y * POLYNOM7(y, r);
-	return neg==-1 ? -x : x;
-}
-
-double
-sin(double x)
-{
-	return sinus(x, 0);
-}
-
-double
-cos(double x)
-{
-	if (x < 0) x = -x;
-	return sinus(x, 1);
-}
Index: trunk/minix/lib/math/sinh.c
===================================================================
--- trunk/minix/lib/math/sinh.c	(revision 9)
+++ 	(revision )
@@ -1,81 +1,0 @@
-/*
- * (c) copyright 1988 by the Vrije Universiteit, Amsterdam, The Netherlands.
- * See the copyright notice in the ACK home directory, in the file "Copyright".
- *
- * Author: Ceriel J.H. Jacobs
- */
-/* $Header: /cvsup/minix/src/lib/math/sinh.c,v 1.1.1.1 2005/04/21 14:56:26 beng Exp $ */
-
-#include	<math.h>
-#include	<float.h>
-#include	<errno.h>
-#include	"localmath.h"
-
-static double
-sinh_cosh(double x, int cosh_flag)
-{
-	/*	Algorithm and coefficients from:
-			"Software manual for the elementary functions"
-			by W.J. Cody and W. Waite, Prentice-Hall, 1980
-	*/
-
-	static double p[] = {
-		-0.35181283430177117881e+6,
-		-0.11563521196851768270e+5,
-		-0.16375798202630751372e+3,
-		-0.78966127417357099479e+0
-	};
-	static double q[] = {
-		-0.21108770058106271242e+7,
-		 0.36162723109421836460e+5,
-		-0.27773523119650701167e+3,
-		 1.0
-	};
-	int	negative = x < 0;
-	double	y = negative ? -x : x;
-
-	if (__IsNan(x)) {
-		errno = EDOM;
-		return x;
-	}
-	if (! cosh_flag && y <= 1.0) {
-		/* ??? check for underflow ??? */
-		y = y * y;
-		return x + x * y * POLYNOM3(y, p)/POLYNOM3(y,q);
-	}
-
-	if (y >= M_LN_MAX_D) {
-		/* exp(y) would cause overflow */
-#define LNV	0.69316101074218750000e+0
-#define VD2M1	0.52820835025874852469e-4
-		double	w = y - LNV;
-		
-		if (w < M_LN_MAX_D+M_LN2-LNV) {
-			x = exp(w);
-			x += VD2M1 * x;
-		}
-		else {
-			errno = ERANGE;
-			x = HUGE_VAL;
-		}
-	}
-	else {
-		double	z = exp(y);
-		
-		x = 0.5 * (z + (cosh_flag ? 1.0 : -1.0)/z);
-	}
-	return negative ? -x : x;
-}
-
-double
-sinh(double x)
-{
-	return sinh_cosh(x, 0);
-}
-
-double
-cosh(double x)
-{
-	if (x < 0) x = -x;
-	return sinh_cosh(x, 1);
-}
Index: trunk/minix/lib/math/sqrt.c
===================================================================
--- trunk/minix/lib/math/sqrt.c	(revision 9)
+++ 	(revision )
@@ -1,43 +1,0 @@
-/*
- * (c) copyright 1988 by the Vrije Universiteit, Amsterdam, The Netherlands.
- * See the copyright notice in the ACK home directory, in the file "Copyright".
- *
- * Author: Ceriel J.H. Jacobs
- */
-/* $Header: /cvsup/minix/src/lib/math/sqrt.c,v 1.1.1.1 2005/04/21 14:56:26 beng Exp $ */
-
-#include	<math.h>
-#include	<float.h>
-#include	<errno.h>
-
-#define NITER	5
-
-double
-sqrt(double x)
-{
-	int exponent;
-	double val;
-
-	if (__IsNan(x)) {
-		errno = EDOM;
-		return x;
-	}
-	if (x <= 0) {
-		if (x < 0) errno = EDOM;
-		return 0;
-	}
-
-	if (x > DBL_MAX) return x;	/* for infinity */
-
-	val = frexp(x, &exponent);
-	if (exponent & 1) {
-		exponent--;
-		val *= 2;
-	}
-	val = ldexp(val + 1.0, exponent/2 - 1);
-	/* was: val = (val + 1.0)/2.0; val = ldexp(val, exponent/2); */
-	for (exponent = NITER - 1; exponent >= 0; exponent--) {
-		val = (val + x / val) / 2.0;
-	}
-	return val;
-}
Index: trunk/minix/lib/math/tan.c
===================================================================
--- trunk/minix/lib/math/tan.c	(revision 9)
+++ 	(revision )
@@ -1,76 +1,0 @@
-/*
- * (c) copyright 1988 by the Vrije Universiteit, Amsterdam, The Netherlands.
- * See the copyright notice in the ACK home directory, in the file "Copyright".
- *
- * Author: Ceriel J.H. Jacobs
- */
-/* $Header: /cvsup/minix/src/lib/math/tan.c,v 1.1.1.1 2005/04/21 14:56:26 beng Exp $ */
-
-#include	<math.h>
-#include	<float.h>
-#include	<errno.h>
-#include	"localmath.h"
-
-double
-tan(double x)
-{
-	/*      Algorithm and coefficients from:
-			"Software manual for the elementary functions"
-			by W.J. Cody and W. Waite, Prentice-Hall, 1980
-	*/
-
-	int negative = x < 0;
-	int invert = 0;
-	double  y;
-	static double   p[] = {
-		 1.0,
-		-0.13338350006421960681e+0,
-		 0.34248878235890589960e-2,
-		-0.17861707342254426711e-4
-	};
-	static double   q[] = {
-		 1.0,
-		-0.46671683339755294240e+0,
-		 0.25663832289440112864e-1,
-		-0.31181531907010027307e-3,
-		 0.49819433993786512270e-6
-	};
-
-	if (__IsNan(x)) {
-		errno = EDOM;
-		return x;
-	}
-	if (negative) x = -x;
- 
-	/* ??? avoid loss of significance, error if x is too large ??? */
-
-	y = x * M_2_PI + 0.5;
-
-	if (y >= DBL_MAX/M_PI_2) return 0.0;
-
-	/*      Use extended precision to calculate reduced argument.
-		Here we used 12 bits of the mantissa for a1.
-		Also split x in integer part x1 and fraction part x2.
-	*/
-    #define A1 1.57080078125
-    #define A2 -4.454455103380768678308e-6
-	{
-		double x1, x2;
-
-		modf(y, &y);
-		if (modf(0.5*y, &x1)) invert = 1;
-		x2 = modf(x, &x1);
-		x = x1 - y * A1;
-		x += x2;
-		x -= y * A2;
-    #undef A1
-    #undef A2
-	}
-
-	/* ??? avoid underflow ??? */
-	y = x * x;
-	x += x * y * POLYNOM2(y, p+1);
-	y = POLYNOM4(y, q);
-	if (negative) x = -x;
-	return invert ? -y/x : x/y;
-}
Index: trunk/minix/lib/math/tanh.c
===================================================================
--- trunk/minix/lib/math/tanh.c	(revision 9)
+++ 	(revision )
@@ -1,55 +1,0 @@
-/*
- * (c) copyright 1988 by the Vrije Universiteit, Amsterdam, The Netherlands.
- * See the copyright notice in the ACK home directory, in the file "Copyright".
- *
- * Author: Ceriel J.H. Jacobs
- */
-/* $Header: /cvsup/minix/src/lib/math/tanh.c,v 1.1.1.1 2005/04/21 14:56:26 beng Exp $ */
-
-#include	<float.h>
-#include	<math.h>
-#include	<errno.h>
-#include	"localmath.h"
-
-double
-tanh(double x)
-{
-	/*	Algorithm and coefficients from:
-			"Software manual for the elementary functions"
-			by W.J. Cody and W. Waite, Prentice-Hall, 1980
-	*/
-
-	static double p[] = {
-		-0.16134119023996228053e+4,
-		-0.99225929672236083313e+2,
-		-0.96437492777225469787e+0
-	};
-	static double q[] = {
-		 0.48402357071988688686e+4,
-		 0.22337720718962312926e+4,
-		 0.11274474380534949335e+3,
-		 1.0
-	};
-	int 	negative = x < 0;
-
-	if (__IsNan(x)) {
-		errno = EDOM;
-		return x;
-	}
-	if (negative) x = -x;
-
-	if (x >= 0.5*M_LN_MAX_D) {
-		x = 1.0;
-	}
-#define LN3D2	0.54930614433405484570e+0	/* ln(3)/2 */
-	else if (x > LN3D2) {
-		x = 0.5 - 1.0/(exp(x+x)+1.0);
-		x += x;
-	}
-	else {
-		/* ??? avoid underflow ??? */
-		double g = x*x;
-		x += x * g * POLYNOM2(g, p)/POLYNOM3(g, q);
-	}
-	return negative ? -x : x;
-}
Index: trunk/minix/lib/other/Makedepend-ack
===================================================================
--- trunk/minix/lib/other/Makedepend-ack	(revision 9)
+++ 	(revision )
@@ -1,79 +1,0 @@
-depend-ack:
-	rm .depend-ack
-	touch .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -I../../servers -E' _allocmem.c | sed -e 's:^\(.\):../obj-ack//./other/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -I../../servers -E' _brk.c | sed -e 's:^\(.\):../obj-ack//./other/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -I../../servers -E' _devctl.c | sed -e 's:^\(.\):../obj-ack//./other/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -I../../servers -E' __pm_findproc.c | sed -e 's:^\(.\):../obj-ack//./other/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -I../../servers -E' _freemem.c | sed -e 's:^\(.\):../obj-ack//./other/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -I../../servers -E' _getnpid.c | sed -e 's:^\(.\):../obj-ack//./other/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -I../../servers -E' _getsigset.c | sed -e 's:^\(.\):../obj-ack//./other/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -I../../servers -E' _getnprocnr.c | sed -e 's:^\(.\):../obj-ack//./other/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -I../../servers -E' _getpprocnr.c | sed -e 's:^\(.\):../obj-ack//./other/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -I../../servers -E' _getprocnr.c | sed -e 's:^\(.\):../obj-ack//./other/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -I../../servers -E' _getsysinfo.c | sed -e 's:^\(.\):../obj-ack//./other/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -I../../servers -E' _reboot.c | sed -e 's:^\(.\):../obj-ack//./other/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -I../../servers -E' _seekdir.c | sed -e 's:^\(.\):../obj-ack//./other/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -I../../servers -E' _svrctl.c | sed -e 's:^\(.\):../obj-ack//./other/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -I../../servers -E' asynchio.c | sed -e 's:^\(.\):../obj-ack//./other/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -I../../servers -E' basename.c | sed -e 's:^\(.\):../obj-ack//./other/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -I../../servers -E' bcmp.c | sed -e 's:^\(.\):../obj-ack//./other/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -I../../servers -E' bcopy.c | sed -e 's:^\(.\):../obj-ack//./other/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -I../../servers -E' bzero.c | sed -e 's:^\(.\):../obj-ack//./other/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -I../../servers -E' configfile.c | sed -e 's:^\(.\):../obj-ack//./other/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -I../../servers -E' crypt.c | sed -e 's:^\(.\):../obj-ack//./other/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -I../../servers -E' ctermid.c | sed -e 's:^\(.\):../obj-ack//./other/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -I../../servers -E' cuserid.c | sed -e 's:^\(.\):../obj-ack//./other/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -I../../servers -E' environ.c | sed -e 's:^\(.\):../obj-ack//./other/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -I../../servers -E' errno.c | sed -e 's:^\(.\):../obj-ack//./other/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -I../../servers -E' fdopen.c | sed -e 's:^\(.\):../obj-ack//./other/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -I../../servers -E' ffs.c | sed -e 's:^\(.\):../obj-ack//./other/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -I../../servers -E' flock.c | sed -e 's:^\(.\):../obj-ack//./other/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -I../../servers -E' fslib.c | sed -e 's:^\(.\):../obj-ack//./other/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -I../../servers -E' fts.c | sed -e 's:^\(.\):../obj-ack//./other/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -I../../servers -E' fsversion.c | sed -e 's:^\(.\):../obj-ack//./other/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -I../../servers -E' getgrent.c | sed -e 's:^\(.\):../obj-ack//./other/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -I../../servers -E' getlogin.c | sed -e 's:^\(.\):../obj-ack//./other/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -I../../servers -E' getpagesize.c | sed -e 's:^\(.\):../obj-ack//./other/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -I../../servers -E' getpass.c | sed -e 's:^\(.\):../obj-ack//./other/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -I../../servers -E' getpwent.c | sed -e 's:^\(.\):../obj-ack//./other/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -I../../servers -E' getttyent.c | sed -e 's:^\(.\):../obj-ack//./other/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -I../../servers -E' getw.c | sed -e 's:^\(.\):../obj-ack//./other/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -I../../servers -E' hypot.c | sed -e 's:^\(.\):../obj-ack//./other/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -I../../servers -E' index.c | sed -e 's:^\(.\):../obj-ack//./other/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -I../../servers -E' itoa.c | sed -e 's:^\(.\):../obj-ack//./other/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -I../../servers -E' loadname.c | sed -e 's:^\(.\):../obj-ack//./other/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -I../../servers -E' lock.c | sed -e 's:^\(.\):../obj-ack//./other/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -I../../servers -E' lrand.c | sed -e 's:^\(.\):../obj-ack//./other/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -I../../servers -E' lsearch.c | sed -e 's:^\(.\):../obj-ack//./other/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -I../../servers -E' memccpy.c | sed -e 's:^\(.\):../obj-ack//./other/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -I../../servers -E' mstats.c | sed -e 's:^\(.\):../obj-ack//./other/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -I../../servers -E' mtab.c | sed -e 's:^\(.\):../obj-ack//./other/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -I../../servers -E' nlist.c | sed -e 's:^\(.\):../obj-ack//./other/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -I../../servers -E' paramvalue.c | sed -e 's:^\(.\):../obj-ack//./other/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -I../../servers -E' peekpoke.c | sed -e 's:^\(.\):../obj-ack//./other/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -I../../servers -E' popen.c | sed -e 's:^\(.\):../obj-ack//./other/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -I../../servers -E' putenv.c | sed -e 's:^\(.\):../obj-ack//./other/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -I../../servers -E' putw.c | sed -e 's:^\(.\):../obj-ack//./other/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -I../../servers -E' random.c | sed -e 's:^\(.\):../obj-ack//./other/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -I../../servers -E' rindex.c | sed -e 's:^\(.\):../obj-ack//./other/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -I../../servers -E' setenv.c | sed -e 's:^\(.\):../obj-ack//./other/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -I../../servers -E' setgroups.c | sed -e 's:^\(.\):../obj-ack//./other/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -I../../servers -E' settimeofday.c | sed -e 's:^\(.\):../obj-ack//./other/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -I../../servers -E' stderr.c | sed -e 's:^\(.\):../obj-ack//./other/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -I../../servers -E' strdup.c | sed -e 's:^\(.\):../obj-ack//./other/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -I../../servers -E' strtok_r.c | sed -e 's:^\(.\):../obj-ack//./other/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -I../../servers -E' swab.c | sed -e 's:^\(.\):../obj-ack//./other/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -I../../servers -E' sys_eniop.c | sed -e 's:^\(.\):../obj-ack//./other/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -I../../servers -E' syscall.c | sed -e 's:^\(.\):../obj-ack//./other/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -I../../servers -E' sysconf.c | sed -e 's:^\(.\):../obj-ack//./other/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -I../../servers -E' syslog.c | sed -e 's:^\(.\):../obj-ack//./other/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -I../../servers -E' taskcall.c | sed -e 's:^\(.\):../obj-ack//./other/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -I../../servers -E' telldir.c | sed -e 's:^\(.\):../obj-ack//./other/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -I../../servers -E' termcap.c | sed -e 's:^\(.\):../obj-ack//./other/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -I../../servers -E' ttyname.c | sed -e 's:^\(.\):../obj-ack//./other/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -I../../servers -E' ttyslot.c | sed -e 's:^\(.\):../obj-ack//./other/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -I../../servers -E' v8regerror.c | sed -e 's:^\(.\):../obj-ack//./other/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -I../../servers -E' v8regexp.c | sed -e 's:^\(.\):../obj-ack//./other/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -I../../servers -E' v8regsub.c | sed -e 's:^\(.\):../obj-ack//./other/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -I../../servers -E' writev.c | sed -e 's:^\(.\):../obj-ack//./other/\1:' >> .depend-ack
Index: trunk/minix/lib/other/Makedepend-gnu
===================================================================
--- trunk/minix/lib/other/Makedepend-gnu	(revision 9)
+++ 	(revision )
@@ -1,79 +1,0 @@
-depend-gnu:
-	rm .depend-gnu
-	touch .depend-gnu
-	mkdep 'gcc -O -D_MINIX -D_POSIX_SOURCE -I../../servers -E' _allocmem.c | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./other/\1:' >> .depend-gnu
-	mkdep 'gcc -O -D_MINIX -D_POSIX_SOURCE -I../../servers -E' _brk.c | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./other/\1:' >> .depend-gnu
-	mkdep 'gcc -O -D_MINIX -D_POSIX_SOURCE -I../../servers -E' _devctl.c | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./other/\1:' >> .depend-gnu
-	mkdep 'gcc -O -D_MINIX -D_POSIX_SOURCE -I../../servers -E' __pm_findproc.c | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./other/\1:' >> .depend-gnu
-	mkdep 'gcc -O -D_MINIX -D_POSIX_SOURCE -I../../servers -E' _freemem.c | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./other/\1:' >> .depend-gnu
-	mkdep 'gcc -O -D_MINIX -D_POSIX_SOURCE -I../../servers -E' _getnpid.c | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./other/\1:' >> .depend-gnu
-	mkdep 'gcc -O -D_MINIX -D_POSIX_SOURCE -I../../servers -E' _getsigset.c | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./other/\1:' >> .depend-gnu
-	mkdep 'gcc -O -D_MINIX -D_POSIX_SOURCE -I../../servers -E' _getnprocnr.c | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./other/\1:' >> .depend-gnu
-	mkdep 'gcc -O -D_MINIX -D_POSIX_SOURCE -I../../servers -E' _getpprocnr.c | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./other/\1:' >> .depend-gnu
-	mkdep 'gcc -O -D_MINIX -D_POSIX_SOURCE -I../../servers -E' _getprocnr.c | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./other/\1:' >> .depend-gnu
-	mkdep 'gcc -O -D_MINIX -D_POSIX_SOURCE -I../../servers -E' _getsysinfo.c | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./other/\1:' >> .depend-gnu
-	mkdep 'gcc -O -D_MINIX -D_POSIX_SOURCE -I../../servers -E' _reboot.c | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./other/\1:' >> .depend-gnu
-	mkdep 'gcc -O -D_MINIX -D_POSIX_SOURCE -I../../servers -E' _seekdir.c | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./other/\1:' >> .depend-gnu
-	mkdep 'gcc -O -D_MINIX -D_POSIX_SOURCE -I../../servers -E' _svrctl.c | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./other/\1:' >> .depend-gnu
-	mkdep 'gcc -O -D_MINIX -D_POSIX_SOURCE -I../../servers -E' asynchio.c | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./other/\1:' >> .depend-gnu
-	mkdep 'gcc -O -D_MINIX -D_POSIX_SOURCE -I../../servers -E' basename.c | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./other/\1:' >> .depend-gnu
-	mkdep 'gcc -O -D_MINIX -D_POSIX_SOURCE -I../../servers -E' bcmp.c | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./other/\1:' >> .depend-gnu
-	mkdep 'gcc -O -D_MINIX -D_POSIX_SOURCE -I../../servers -E' bcopy.c | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./other/\1:' >> .depend-gnu
-	mkdep 'gcc -O -D_MINIX -D_POSIX_SOURCE -I../../servers -E' bzero.c | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./other/\1:' >> .depend-gnu
-	mkdep 'gcc -O -D_MINIX -D_POSIX_SOURCE -I../../servers -E' configfile.c | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./other/\1:' >> .depend-gnu
-	mkdep 'gcc -O -D_MINIX -D_POSIX_SOURCE -I../../servers -E' crypt.c | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./other/\1:' >> .depend-gnu
-	mkdep 'gcc -O -D_MINIX -D_POSIX_SOURCE -I../../servers -E' ctermid.c | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./other/\1:' >> .depend-gnu
-	mkdep 'gcc -O -D_MINIX -D_POSIX_SOURCE -I../../servers -E' cuserid.c | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./other/\1:' >> .depend-gnu
-	mkdep 'gcc -O -D_MINIX -D_POSIX_SOURCE -I../../servers -E' environ.c | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./other/\1:' >> .depend-gnu
-	mkdep 'gcc -O -D_MINIX -D_POSIX_SOURCE -I../../servers -E' errno.c | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./other/\1:' >> .depend-gnu
-	mkdep 'gcc -O -D_MINIX -D_POSIX_SOURCE -I../../servers -E' fdopen.c | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./other/\1:' >> .depend-gnu
-	mkdep 'gcc -O -D_MINIX -D_POSIX_SOURCE -I../../servers -E' ffs.c | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./other/\1:' >> .depend-gnu
-	mkdep 'gcc -O -D_MINIX -D_POSIX_SOURCE -I../../servers -E' flock.c | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./other/\1:' >> .depend-gnu
-	mkdep 'gcc -O -D_MINIX -D_POSIX_SOURCE -I../../servers -E' fslib.c | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./other/\1:' >> .depend-gnu
-	mkdep 'gcc -O -D_MINIX -D_POSIX_SOURCE -I../../servers -E' fts.c | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./other/\1:' >> .depend-gnu
-	mkdep 'gcc -O -D_MINIX -D_POSIX_SOURCE -I../../servers -E' fsversion.c | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./other/\1:' >> .depend-gnu
-	mkdep 'gcc -O -D_MINIX -D_POSIX_SOURCE -I../../servers -E' getgrent.c | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./other/\1:' >> .depend-gnu
-	mkdep 'gcc -O -D_MINIX -D_POSIX_SOURCE -I../../servers -E' getlogin.c | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./other/\1:' >> .depend-gnu
-	mkdep 'gcc -O -D_MINIX -D_POSIX_SOURCE -I../../servers -E' getpagesize.c | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./other/\1:' >> .depend-gnu
-	mkdep 'gcc -O -D_MINIX -D_POSIX_SOURCE -I../../servers -E' getpass.c | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./other/\1:' >> .depend-gnu
-	mkdep 'gcc -O -D_MINIX -D_POSIX_SOURCE -I../../servers -E' getpwent.c | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./other/\1:' >> .depend-gnu
-	mkdep 'gcc -O -D_MINIX -D_POSIX_SOURCE -I../../servers -E' getttyent.c | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./other/\1:' >> .depend-gnu
-	mkdep 'gcc -O -D_MINIX -D_POSIX_SOURCE -I../../servers -E' getw.c | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./other/\1:' >> .depend-gnu
-	mkdep 'gcc -O -D_MINIX -D_POSIX_SOURCE -I../../servers -E' hypot.c | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./other/\1:' >> .depend-gnu
-	mkdep 'gcc -O -D_MINIX -D_POSIX_SOURCE -I../../servers -E' index.c | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./other/\1:' >> .depend-gnu
-	mkdep 'gcc -O -D_MINIX -D_POSIX_SOURCE -I../../servers -E' itoa.c | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./other/\1:' >> .depend-gnu
-	mkdep 'gcc -O -D_MINIX -D_POSIX_SOURCE -I../../servers -E' loadname.c | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./other/\1:' >> .depend-gnu
-	mkdep 'gcc -O -D_MINIX -D_POSIX_SOURCE -I../../servers -E' lock.c | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./other/\1:' >> .depend-gnu
-	mkdep 'gcc -O -D_MINIX -D_POSIX_SOURCE -I../../servers -E' lrand.c | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./other/\1:' >> .depend-gnu
-	mkdep 'gcc -O -D_MINIX -D_POSIX_SOURCE -I../../servers -E' lsearch.c | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./other/\1:' >> .depend-gnu
-	mkdep 'gcc -O -D_MINIX -D_POSIX_SOURCE -I../../servers -E' memccpy.c | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./other/\1:' >> .depend-gnu
-	mkdep 'gcc -O -D_MINIX -D_POSIX_SOURCE -I../../servers -E' mstats.c | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./other/\1:' >> .depend-gnu
-	mkdep 'gcc -O -D_MINIX -D_POSIX_SOURCE -I../../servers -E' mtab.c | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./other/\1:' >> .depend-gnu
-	mkdep 'gcc -O -D_MINIX -D_POSIX_SOURCE -I../../servers -E' nlist.c | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./other/\1:' >> .depend-gnu
-	mkdep 'gcc -O -D_MINIX -D_POSIX_SOURCE -I../../servers -E' paramvalue.c | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./other/\1:' >> .depend-gnu
-	mkdep 'gcc -O -D_MINIX -D_POSIX_SOURCE -I../../servers -E' peekpoke.c | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./other/\1:' >> .depend-gnu
-	mkdep 'gcc -O -D_MINIX -D_POSIX_SOURCE -I../../servers -E' popen.c | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./other/\1:' >> .depend-gnu
-	mkdep 'gcc -O -D_MINIX -D_POSIX_SOURCE -I../../servers -E' putenv.c | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./other/\1:' >> .depend-gnu
-	mkdep 'gcc -O -D_MINIX -D_POSIX_SOURCE -I../../servers -E' putw.c | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./other/\1:' >> .depend-gnu
-	mkdep 'gcc -O -D_MINIX -D_POSIX_SOURCE -I../../servers -E' random.c | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./other/\1:' >> .depend-gnu
-	mkdep 'gcc -O -D_MINIX -D_POSIX_SOURCE -I../../servers -E' rindex.c | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./other/\1:' >> .depend-gnu
-	mkdep 'gcc -O -D_MINIX -D_POSIX_SOURCE -I../../servers -E' setenv.c | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./other/\1:' >> .depend-gnu
-	mkdep 'gcc -O -D_MINIX -D_POSIX_SOURCE -I../../servers -E' setgroups.c | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./other/\1:' >> .depend-gnu
-	mkdep 'gcc -O -D_MINIX -D_POSIX_SOURCE -I../../servers -E' settimeofday.c | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./other/\1:' >> .depend-gnu
-	mkdep 'gcc -O -D_MINIX -D_POSIX_SOURCE -I../../servers -E' stderr.c | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./other/\1:' >> .depend-gnu
-	mkdep 'gcc -O -D_MINIX -D_POSIX_SOURCE -I../../servers -E' strdup.c | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./other/\1:' >> .depend-gnu
-	mkdep 'gcc -O -D_MINIX -D_POSIX_SOURCE -I../../servers -E' strtok_r.c | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./other/\1:' >> .depend-gnu
-	mkdep 'gcc -O -D_MINIX -D_POSIX_SOURCE -I../../servers -E' swab.c | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./other/\1:' >> .depend-gnu
-	mkdep 'gcc -O -D_MINIX -D_POSIX_SOURCE -I../../servers -E' sys_eniop.c | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./other/\1:' >> .depend-gnu
-	mkdep 'gcc -O -D_MINIX -D_POSIX_SOURCE -I../../servers -E' syscall.c | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./other/\1:' >> .depend-gnu
-	mkdep 'gcc -O -D_MINIX -D_POSIX_SOURCE -I../../servers -E' sysconf.c | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./other/\1:' >> .depend-gnu
-	mkdep 'gcc -O -D_MINIX -D_POSIX_SOURCE -I../../servers -E' syslog.c | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./other/\1:' >> .depend-gnu
-	mkdep 'gcc -O -D_MINIX -D_POSIX_SOURCE -I../../servers -E' taskcall.c | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./other/\1:' >> .depend-gnu
-	mkdep 'gcc -O -D_MINIX -D_POSIX_SOURCE -I../../servers -E' telldir.c | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./other/\1:' >> .depend-gnu
-	mkdep 'gcc -O -D_MINIX -D_POSIX_SOURCE -I../../servers -E' termcap.c | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./other/\1:' >> .depend-gnu
-	mkdep 'gcc -O -D_MINIX -D_POSIX_SOURCE -I../../servers -E' ttyname.c | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./other/\1:' >> .depend-gnu
-	mkdep 'gcc -O -D_MINIX -D_POSIX_SOURCE -I../../servers -E' ttyslot.c | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./other/\1:' >> .depend-gnu
-	mkdep 'gcc -O -D_MINIX -D_POSIX_SOURCE -I../../servers -E' v8regerror.c | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./other/\1:' >> .depend-gnu
-	mkdep 'gcc -O -D_MINIX -D_POSIX_SOURCE -I../../servers -E' v8regexp.c | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./other/\1:' >> .depend-gnu
-	mkdep 'gcc -O -D_MINIX -D_POSIX_SOURCE -I../../servers -E' v8regsub.c | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./other/\1:' >> .depend-gnu
-	mkdep 'gcc -O -D_MINIX -D_POSIX_SOURCE -I../../servers -E' writev.c | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./other/\1:' >> .depend-gnu
Index: trunk/minix/lib/other/Makefile
===================================================================
--- trunk/minix/lib/other/Makefile	(revision 9)
+++ 	(revision )
@@ -1,577 +1,0 @@
-#Generated from ./other/Makefile.in
-all: all-ack
-
-all-ack:
-all-gnu:
-
-makefiles: Makefile
-Makedepend-ack Makedepend-gnu: 
-	sh ../generate.sh ./other ../obj-ack/ ../obj-gnu
-
-Makefile: Makefile.in Makedepend-ack Makedepend-gnu
-	sh ../generate.sh ./other ../obj-ack/ ../obj-gnu
-	@echo
-	@echo *Attention*
-	@echo Makefile is regenerated... rerun command to see changes
-	@echo *Attention*
-	@echo
-
-depend: depend-ack
-all-ack: ../obj-ack//libc.a
-
-../obj-ack//libc.a: ../obj-ack//libc.a(_allocmem.o)
-../obj-ack//libc.a: ../obj-ack//libc.a(_brk.o)
-../obj-ack//libc.a: ../obj-ack//libc.a(_devctl.o)
-../obj-ack//libc.a: ../obj-ack//libc.a(__pm_findproc.o)
-../obj-ack//libc.a: ../obj-ack//libc.a(_freemem.o)
-../obj-ack//libc.a: ../obj-ack//libc.a(_getnpid.o)
-../obj-ack//libc.a: ../obj-ack//libc.a(_getsigset.o)
-../obj-ack//libc.a: ../obj-ack//libc.a(_getnprocnr.o)
-../obj-ack//libc.a: ../obj-ack//libc.a(_getpprocnr.o)
-../obj-ack//libc.a: ../obj-ack//libc.a(_getprocnr.o)
-../obj-ack//libc.a: ../obj-ack//libc.a(_getsysinfo.o)
-../obj-ack//libc.a: ../obj-ack//libc.a(_reboot.o)
-../obj-ack//libc.a: ../obj-ack//libc.a(_seekdir.o)
-../obj-ack//libc.a: ../obj-ack//libc.a(_svrctl.o)
-../obj-ack//libc.a: ../obj-ack//libc.a(asynchio.o)
-../obj-ack//libc.a: ../obj-ack//libc.a(basename.o)
-../obj-ack//libc.a: ../obj-ack//libc.a(bcmp.o)
-../obj-ack//libc.a: ../obj-ack//libc.a(bcopy.o)
-../obj-ack//libc.a: ../obj-ack//libc.a(bzero.o)
-../obj-ack//libc.a: ../obj-ack//libc.a(configfile.o)
-../obj-ack//libc.a: ../obj-ack//libc.a(crypt.o)
-../obj-ack//libc.a: ../obj-ack//libc.a(ctermid.o)
-../obj-ack//libc.a: ../obj-ack//libc.a(cuserid.o)
-../obj-ack//libc.a: ../obj-ack//libc.a(environ.o)
-../obj-ack//libc.a: ../obj-ack//libc.a(errno.o)
-../obj-ack//libc.a: ../obj-ack//libc.a(fdopen.o)
-../obj-ack//libc.a: ../obj-ack//libc.a(ffs.o)
-../obj-ack//libc.a: ../obj-ack//libc.a(flock.o)
-../obj-ack//libc.a: ../obj-ack//libc.a(fslib.o)
-../obj-ack//libc.a: ../obj-ack//libc.a(fts.o)
-../obj-ack//libc.a: ../obj-ack//libc.a(fsversion.o)
-../obj-ack//libc.a: ../obj-ack//libc.a(getgrent.o)
-../obj-ack//libc.a: ../obj-ack//libc.a(getlogin.o)
-../obj-ack//libc.a: ../obj-ack//libc.a(getpagesize.o)
-../obj-ack//libc.a: ../obj-ack//libc.a(getpass.o)
-../obj-ack//libc.a: ../obj-ack//libc.a(getpwent.o)
-../obj-ack//libc.a: ../obj-ack//libc.a(getttyent.o)
-../obj-ack//libc.a: ../obj-ack//libc.a(getw.o)
-../obj-ack//libc.a: ../obj-ack//libc.a(hypot.o)
-../obj-ack//libc.a: ../obj-ack//libc.a(index.o)
-../obj-ack//libc.a: ../obj-ack//libc.a(itoa.o)
-../obj-ack//libc.a: ../obj-ack//libc.a(loadname.o)
-../obj-ack//libc.a: ../obj-ack//libc.a(lock.o)
-../obj-ack//libc.a: ../obj-ack//libc.a(lrand.o)
-../obj-ack//libc.a: ../obj-ack//libc.a(lsearch.o)
-../obj-ack//libc.a: ../obj-ack//libc.a(memccpy.o)
-../obj-ack//libc.a: ../obj-ack//libc.a(mstats.o)
-../obj-ack//libc.a: ../obj-ack//libc.a(mtab.o)
-../obj-ack//libc.a: ../obj-ack//libc.a(nlist.o)
-../obj-ack//libc.a: ../obj-ack//libc.a(paramvalue.o)
-../obj-ack//libc.a: ../obj-ack//libc.a(peekpoke.o)
-../obj-ack//libc.a: ../obj-ack//libc.a(popen.o)
-../obj-ack//libc.a: ../obj-ack//libc.a(putenv.o)
-../obj-ack//libc.a: ../obj-ack//libc.a(putw.o)
-../obj-ack//libc.a: ../obj-ack//libc.a(random.o)
-../obj-ack//libc.a: ../obj-ack//libc.a(rindex.o)
-../obj-ack//libc.a: ../obj-ack//libc.a(setenv.o)
-../obj-ack//libc.a: ../obj-ack//libc.a(setgroups.o)
-../obj-ack//libc.a: ../obj-ack//libc.a(settimeofday.o)
-../obj-ack//libc.a: ../obj-ack//libc.a(stderr.o)
-../obj-ack//libc.a: ../obj-ack//libc.a(strdup.o)
-../obj-ack//libc.a: ../obj-ack//libc.a(strtok_r.o)
-../obj-ack//libc.a: ../obj-ack//libc.a(swab.o)
-../obj-ack//libc.a: ../obj-ack//libc.a(sys_eniop.o)
-../obj-ack//libc.a: ../obj-ack//libc.a(syscall.o)
-../obj-ack//libc.a: ../obj-ack//libc.a(sysconf.o)
-../obj-ack//libc.a: ../obj-ack//libc.a(syslog.o)
-../obj-ack//libc.a: ../obj-ack//libc.a(taskcall.o)
-../obj-ack//libc.a: ../obj-ack//libc.a(telldir.o)
-../obj-ack//libc.a: ../obj-ack//libc.a(termcap.o)
-../obj-ack//libc.a: ../obj-ack//libc.a(ttyname.o)
-../obj-ack//libc.a: ../obj-ack//libc.a(ttyslot.o)
-../obj-ack//libc.a: ../obj-ack//libc.a(v8regerror.o)
-../obj-ack//libc.a: ../obj-ack//libc.a(v8regexp.o)
-../obj-ack//libc.a: ../obj-ack//libc.a(v8regsub.o)
-../obj-ack//libc.a: ../obj-ack//libc.a(writev.o)
-
-../obj-ack//libc.a:
-	ar cr ../obj-ack//libc.a ../obj-ack//./other/*.o
-	rm ../obj-ack//./other/*.o
-
-../obj-ack//libc.a(_allocmem.o): _allocmem.c
-	cc -O -D_MINIX -D_POSIX_SOURCE -I../../servers -c -o ../obj-ack//./other/_allocmem.o _allocmem.c
-../obj-ack//libc.a(_brk.o): _brk.c
-	cc -O -D_MINIX -D_POSIX_SOURCE -I../../servers -c -o ../obj-ack//./other/_brk.o _brk.c
-../obj-ack//libc.a(_devctl.o): _devctl.c
-	cc -O -D_MINIX -D_POSIX_SOURCE -I../../servers -c -o ../obj-ack//./other/_devctl.o _devctl.c
-../obj-ack//libc.a(__pm_findproc.o): __pm_findproc.c
-	cc -O -D_MINIX -D_POSIX_SOURCE -I../../servers -c -o ../obj-ack//./other/__pm_findproc.o __pm_findproc.c
-../obj-ack//libc.a(_freemem.o): _freemem.c
-	cc -O -D_MINIX -D_POSIX_SOURCE -I../../servers -c -o ../obj-ack//./other/_freemem.o _freemem.c
-../obj-ack//libc.a(_getnpid.o): _getnpid.c
-	cc -O -D_MINIX -D_POSIX_SOURCE -I../../servers -c -o ../obj-ack//./other/_getnpid.o _getnpid.c
-../obj-ack//libc.a(_getsigset.o): _getsigset.c
-	cc -O -D_MINIX -D_POSIX_SOURCE -I../../servers -c -o ../obj-ack//./other/_getsigset.o _getsigset.c
-../obj-ack//libc.a(_getnprocnr.o): _getnprocnr.c
-	cc -O -D_MINIX -D_POSIX_SOURCE -I../../servers -c -o ../obj-ack//./other/_getnprocnr.o _getnprocnr.c
-../obj-ack//libc.a(_getpprocnr.o): _getpprocnr.c
-	cc -O -D_MINIX -D_POSIX_SOURCE -I../../servers -c -o ../obj-ack//./other/_getpprocnr.o _getpprocnr.c
-../obj-ack//libc.a(_getprocnr.o): _getprocnr.c
-	cc -O -D_MINIX -D_POSIX_SOURCE -I../../servers -c -o ../obj-ack//./other/_getprocnr.o _getprocnr.c
-../obj-ack//libc.a(_getsysinfo.o): _getsysinfo.c
-	cc -O -D_MINIX -D_POSIX_SOURCE -I../../servers -c -o ../obj-ack//./other/_getsysinfo.o _getsysinfo.c
-../obj-ack//libc.a(_reboot.o): _reboot.c
-	cc -O -D_MINIX -D_POSIX_SOURCE -I../../servers -c -o ../obj-ack//./other/_reboot.o _reboot.c
-../obj-ack//libc.a(_seekdir.o): _seekdir.c
-	cc -O -D_MINIX -D_POSIX_SOURCE -I../../servers -c -o ../obj-ack//./other/_seekdir.o _seekdir.c
-../obj-ack//libc.a(_svrctl.o): _svrctl.c
-	cc -O -D_MINIX -D_POSIX_SOURCE -I../../servers -c -o ../obj-ack//./other/_svrctl.o _svrctl.c
-../obj-ack//libc.a(asynchio.o): asynchio.c
-	cc -O -D_MINIX -D_POSIX_SOURCE -I../../servers -c -o ../obj-ack//./other/asynchio.o asynchio.c
-../obj-ack//libc.a(basename.o): basename.c
-	cc -O -D_MINIX -D_POSIX_SOURCE -I../../servers -c -o ../obj-ack//./other/basename.o basename.c
-../obj-ack//libc.a(bcmp.o): bcmp.c
-	cc -O -D_MINIX -D_POSIX_SOURCE -I../../servers -c -o ../obj-ack//./other/bcmp.o bcmp.c
-../obj-ack//libc.a(bcopy.o): bcopy.c
-	cc -O -D_MINIX -D_POSIX_SOURCE -I../../servers -c -o ../obj-ack//./other/bcopy.o bcopy.c
-../obj-ack//libc.a(bzero.o): bzero.c
-	cc -O -D_MINIX -D_POSIX_SOURCE -I../../servers -c -o ../obj-ack//./other/bzero.o bzero.c
-../obj-ack//libc.a(configfile.o): configfile.c
-	cc -O -D_MINIX -D_POSIX_SOURCE -I../../servers -c -o ../obj-ack//./other/configfile.o configfile.c
-../obj-ack//libc.a(crypt.o): crypt.c
-	cc -O -D_MINIX -D_POSIX_SOURCE -I../../servers -c -o ../obj-ack//./other/crypt.o crypt.c
-../obj-ack//libc.a(ctermid.o): ctermid.c
-	cc -O -D_MINIX -D_POSIX_SOURCE -I../../servers -c -o ../obj-ack//./other/ctermid.o ctermid.c
-../obj-ack//libc.a(cuserid.o): cuserid.c
-	cc -O -D_MINIX -D_POSIX_SOURCE -I../../servers -c -o ../obj-ack//./other/cuserid.o cuserid.c
-../obj-ack//libc.a(environ.o): environ.c
-	cc -O -D_MINIX -D_POSIX_SOURCE -I../../servers -c -o ../obj-ack//./other/environ.o environ.c
-../obj-ack//libc.a(errno.o): errno.c
-	cc -O -D_MINIX -D_POSIX_SOURCE -I../../servers -c -o ../obj-ack//./other/errno.o errno.c
-../obj-ack//libc.a(fdopen.o): fdopen.c
-	cc -O -D_MINIX -D_POSIX_SOURCE -I../../servers -c -o ../obj-ack//./other/fdopen.o fdopen.c
-../obj-ack//libc.a(ffs.o): ffs.c
-	cc -O -D_MINIX -D_POSIX_SOURCE -I../../servers -c -o ../obj-ack//./other/ffs.o ffs.c
-../obj-ack//libc.a(flock.o): flock.c
-	cc -O -D_MINIX -D_POSIX_SOURCE -I../../servers -c -o ../obj-ack//./other/flock.o flock.c
-../obj-ack//libc.a(fslib.o): fslib.c
-	cc -O -D_MINIX -D_POSIX_SOURCE -I../../servers -c -o ../obj-ack//./other/fslib.o fslib.c
-../obj-ack//libc.a(fts.o): fts.c
-	cc -O -D_MINIX -D_POSIX_SOURCE -I../../servers -c -o ../obj-ack//./other/fts.o fts.c
-../obj-ack//libc.a(fsversion.o): fsversion.c
-	cc -O -D_MINIX -D_POSIX_SOURCE -I../../servers -c -o ../obj-ack//./other/fsversion.o fsversion.c
-../obj-ack//libc.a(getgrent.o): getgrent.c
-	cc -O -D_MINIX -D_POSIX_SOURCE -I../../servers -c -o ../obj-ack//./other/getgrent.o getgrent.c
-../obj-ack//libc.a(getlogin.o): getlogin.c
-	cc -O -D_MINIX -D_POSIX_SOURCE -I../../servers -c -o ../obj-ack//./other/getlogin.o getlogin.c
-../obj-ack//libc.a(getpagesize.o): getpagesize.c
-	cc -O -D_MINIX -D_POSIX_SOURCE -I../../servers -c -o ../obj-ack//./other/getpagesize.o getpagesize.c
-../obj-ack//libc.a(getpass.o): getpass.c
-	cc -O -D_MINIX -D_POSIX_SOURCE -I../../servers -c -o ../obj-ack//./other/getpass.o getpass.c
-../obj-ack//libc.a(getpwent.o): getpwent.c
-	cc -O -D_MINIX -D_POSIX_SOURCE -I../../servers -c -o ../obj-ack//./other/getpwent.o getpwent.c
-../obj-ack//libc.a(getttyent.o): getttyent.c
-	cc -O -D_MINIX -D_POSIX_SOURCE -I../../servers -c -o ../obj-ack//./other/getttyent.o getttyent.c
-../obj-ack//libc.a(getw.o): getw.c
-	cc -O -D_MINIX -D_POSIX_SOURCE -I../../servers -c -o ../obj-ack//./other/getw.o getw.c
-../obj-ack//libc.a(hypot.o): hypot.c
-	cc -O -D_MINIX -D_POSIX_SOURCE -I../../servers -c -o ../obj-ack//./other/hypot.o hypot.c
-../obj-ack//libc.a(index.o): index.c
-	cc -O -D_MINIX -D_POSIX_SOURCE -I../../servers -c -o ../obj-ack//./other/index.o index.c
-../obj-ack//libc.a(itoa.o): itoa.c
-	cc -O -D_MINIX -D_POSIX_SOURCE -I../../servers -c -o ../obj-ack//./other/itoa.o itoa.c
-../obj-ack//libc.a(loadname.o): loadname.c
-	cc -O -D_MINIX -D_POSIX_SOURCE -I../../servers -c -o ../obj-ack//./other/loadname.o loadname.c
-../obj-ack//libc.a(lock.o): lock.c
-	cc -O -D_MINIX -D_POSIX_SOURCE -I../../servers -c -o ../obj-ack//./other/lock.o lock.c
-../obj-ack//libc.a(lrand.o): lrand.c
-	cc -O -D_MINIX -D_POSIX_SOURCE -I../../servers -c -o ../obj-ack//./other/lrand.o lrand.c
-../obj-ack//libc.a(lsearch.o): lsearch.c
-	cc -O -D_MINIX -D_POSIX_SOURCE -I../../servers -c -o ../obj-ack//./other/lsearch.o lsearch.c
-../obj-ack//libc.a(memccpy.o): memccpy.c
-	cc -O -D_MINIX -D_POSIX_SOURCE -I../../servers -c -o ../obj-ack//./other/memccpy.o memccpy.c
-../obj-ack//libc.a(mstats.o): mstats.c
-	cc -O -D_MINIX -D_POSIX_SOURCE -I../../servers -c -o ../obj-ack//./other/mstats.o mstats.c
-../obj-ack//libc.a(mtab.o): mtab.c
-	cc -O -D_MINIX -D_POSIX_SOURCE -I../../servers -c -o ../obj-ack//./other/mtab.o mtab.c
-../obj-ack//libc.a(nlist.o): nlist.c
-	cc -O -D_MINIX -D_POSIX_SOURCE -I../../servers -c -o ../obj-ack//./other/nlist.o nlist.c
-../obj-ack//libc.a(paramvalue.o): paramvalue.c
-	cc -O -D_MINIX -D_POSIX_SOURCE -I../../servers -c -o ../obj-ack//./other/paramvalue.o paramvalue.c
-../obj-ack//libc.a(peekpoke.o): peekpoke.c
-	cc -O -D_MINIX -D_POSIX_SOURCE -I../../servers -c -o ../obj-ack//./other/peekpoke.o peekpoke.c
-../obj-ack//libc.a(popen.o): popen.c
-	cc -O -D_MINIX -D_POSIX_SOURCE -I../../servers -c -o ../obj-ack//./other/popen.o popen.c
-../obj-ack//libc.a(putenv.o): putenv.c
-	cc -O -D_MINIX -D_POSIX_SOURCE -I../../servers -c -o ../obj-ack//./other/putenv.o putenv.c
-../obj-ack//libc.a(putw.o): putw.c
-	cc -O -D_MINIX -D_POSIX_SOURCE -I../../servers -c -o ../obj-ack//./other/putw.o putw.c
-../obj-ack//libc.a(random.o): random.c
-	cc -O -D_MINIX -D_POSIX_SOURCE -I../../servers -c -o ../obj-ack//./other/random.o random.c
-../obj-ack//libc.a(rindex.o): rindex.c
-	cc -O -D_MINIX -D_POSIX_SOURCE -I../../servers -c -o ../obj-ack//./other/rindex.o rindex.c
-../obj-ack//libc.a(setenv.o): setenv.c
-	cc -O -D_MINIX -D_POSIX_SOURCE -I../../servers -c -o ../obj-ack//./other/setenv.o setenv.c
-../obj-ack//libc.a(setgroups.o): setgroups.c
-	cc -O -D_MINIX -D_POSIX_SOURCE -I../../servers -c -o ../obj-ack//./other/setgroups.o setgroups.c
-../obj-ack//libc.a(settimeofday.o): settimeofday.c
-	cc -O -D_MINIX -D_POSIX_SOURCE -I../../servers -c -o ../obj-ack//./other/settimeofday.o settimeofday.c
-../obj-ack//libc.a(stderr.o): stderr.c
-	cc -O -D_MINIX -D_POSIX_SOURCE -I../../servers -c -o ../obj-ack//./other/stderr.o stderr.c
-../obj-ack//libc.a(strdup.o): strdup.c
-	cc -O -D_MINIX -D_POSIX_SOURCE -I../../servers -c -o ../obj-ack//./other/strdup.o strdup.c
-../obj-ack//libc.a(strtok_r.o): strtok_r.c
-	cc -O -D_MINIX -D_POSIX_SOURCE -I../../servers -c -o ../obj-ack//./other/strtok_r.o strtok_r.c
-../obj-ack//libc.a(swab.o): swab.c
-	cc -O -D_MINIX -D_POSIX_SOURCE -I../../servers -c -o ../obj-ack//./other/swab.o swab.c
-../obj-ack//libc.a(sys_eniop.o): sys_eniop.c
-	cc -O -D_MINIX -D_POSIX_SOURCE -I../../servers -c -o ../obj-ack//./other/sys_eniop.o sys_eniop.c
-../obj-ack//libc.a(syscall.o): syscall.c
-	cc -O -D_MINIX -D_POSIX_SOURCE -I../../servers -c -o ../obj-ack//./other/syscall.o syscall.c
-../obj-ack//libc.a(sysconf.o): sysconf.c
-	cc -O -D_MINIX -D_POSIX_SOURCE -I../../servers -c -o ../obj-ack//./other/sysconf.o sysconf.c
-../obj-ack//libc.a(syslog.o): syslog.c
-	cc -O -D_MINIX -D_POSIX_SOURCE -I../../servers -c -o ../obj-ack//./other/syslog.o syslog.c
-../obj-ack//libc.a(taskcall.o): taskcall.c
-	cc -O -D_MINIX -D_POSIX_SOURCE -I../../servers -c -o ../obj-ack//./other/taskcall.o taskcall.c
-../obj-ack//libc.a(telldir.o): telldir.c
-	cc -O -D_MINIX -D_POSIX_SOURCE -I../../servers -c -o ../obj-ack//./other/telldir.o telldir.c
-../obj-ack//libc.a(termcap.o): termcap.c
-	cc -O -D_MINIX -D_POSIX_SOURCE -I../../servers -c -o ../obj-ack//./other/termcap.o termcap.c
-../obj-ack//libc.a(ttyname.o): ttyname.c
-	cc -O -D_MINIX -D_POSIX_SOURCE -I../../servers -c -o ../obj-ack//./other/ttyname.o ttyname.c
-../obj-ack//libc.a(ttyslot.o): ttyslot.c
-	cc -O -D_MINIX -D_POSIX_SOURCE -I../../servers -c -o ../obj-ack//./other/ttyslot.o ttyslot.c
-../obj-ack//libc.a(v8regerror.o): v8regerror.c
-	cc -O -D_MINIX -D_POSIX_SOURCE -I../../servers -c -o ../obj-ack//./other/v8regerror.o v8regerror.c
-../obj-ack//libc.a(v8regexp.o): v8regexp.c
-	cc -O -D_MINIX -D_POSIX_SOURCE -I../../servers -c -o ../obj-ack//./other/v8regexp.o v8regexp.c
-../obj-ack//libc.a(v8regsub.o): v8regsub.c
-	cc -O -D_MINIX -D_POSIX_SOURCE -I../../servers -c -o ../obj-ack//./other/v8regsub.o v8regsub.c
-../obj-ack//libc.a(writev.o): writev.c
-	cc -O -D_MINIX -D_POSIX_SOURCE -I../../servers -c -o ../obj-ack//./other/writev.o writev.c
-
-all-gnu: ../obj-gnu/libc.a
-
-../obj-gnu/libc.a: ../obj-gnu/./other/_allocmem.o
-../obj-gnu/libc.a: ../obj-gnu/./other/_brk.o
-../obj-gnu/libc.a: ../obj-gnu/./other/_devctl.o
-../obj-gnu/libc.a: ../obj-gnu/./other/__pm_findproc.o
-../obj-gnu/libc.a: ../obj-gnu/./other/_freemem.o
-../obj-gnu/libc.a: ../obj-gnu/./other/_getnpid.o
-../obj-gnu/libc.a: ../obj-gnu/./other/_getsigset.o
-../obj-gnu/libc.a: ../obj-gnu/./other/_getnprocnr.o
-../obj-gnu/libc.a: ../obj-gnu/./other/_getpprocnr.o
-../obj-gnu/libc.a: ../obj-gnu/./other/_getprocnr.o
-../obj-gnu/libc.a: ../obj-gnu/./other/_getsysinfo.o
-../obj-gnu/libc.a: ../obj-gnu/./other/_reboot.o
-../obj-gnu/libc.a: ../obj-gnu/./other/_seekdir.o
-../obj-gnu/libc.a: ../obj-gnu/./other/_svrctl.o
-../obj-gnu/libc.a: ../obj-gnu/./other/asynchio.o
-../obj-gnu/libc.a: ../obj-gnu/./other/basename.o
-../obj-gnu/libc.a: ../obj-gnu/./other/bcmp.o
-../obj-gnu/libc.a: ../obj-gnu/./other/bcopy.o
-../obj-gnu/libc.a: ../obj-gnu/./other/bzero.o
-../obj-gnu/libc.a: ../obj-gnu/./other/configfile.o
-../obj-gnu/libc.a: ../obj-gnu/./other/crypt.o
-../obj-gnu/libc.a: ../obj-gnu/./other/ctermid.o
-../obj-gnu/libc.a: ../obj-gnu/./other/cuserid.o
-../obj-gnu/libc.a: ../obj-gnu/./other/environ.o
-../obj-gnu/libc.a: ../obj-gnu/./other/errno.o
-../obj-gnu/libc.a: ../obj-gnu/./other/fdopen.o
-../obj-gnu/libc.a: ../obj-gnu/./other/ffs.o
-../obj-gnu/libc.a: ../obj-gnu/./other/flock.o
-../obj-gnu/libc.a: ../obj-gnu/./other/fslib.o
-../obj-gnu/libc.a: ../obj-gnu/./other/fts.o
-../obj-gnu/libc.a: ../obj-gnu/./other/fsversion.o
-../obj-gnu/libc.a: ../obj-gnu/./other/getgrent.o
-../obj-gnu/libc.a: ../obj-gnu/./other/getlogin.o
-../obj-gnu/libc.a: ../obj-gnu/./other/getpagesize.o
-../obj-gnu/libc.a: ../obj-gnu/./other/getpass.o
-../obj-gnu/libc.a: ../obj-gnu/./other/getpwent.o
-../obj-gnu/libc.a: ../obj-gnu/./other/getttyent.o
-../obj-gnu/libc.a: ../obj-gnu/./other/getw.o
-../obj-gnu/libc.a: ../obj-gnu/./other/hypot.o
-../obj-gnu/libc.a: ../obj-gnu/./other/index.o
-../obj-gnu/libc.a: ../obj-gnu/./other/itoa.o
-../obj-gnu/libc.a: ../obj-gnu/./other/loadname.o
-../obj-gnu/libc.a: ../obj-gnu/./other/lock.o
-../obj-gnu/libc.a: ../obj-gnu/./other/lrand.o
-../obj-gnu/libc.a: ../obj-gnu/./other/lsearch.o
-../obj-gnu/libc.a: ../obj-gnu/./other/memccpy.o
-../obj-gnu/libc.a: ../obj-gnu/./other/mstats.o
-../obj-gnu/libc.a: ../obj-gnu/./other/mtab.o
-../obj-gnu/libc.a: ../obj-gnu/./other/nlist.o
-../obj-gnu/libc.a: ../obj-gnu/./other/paramvalue.o
-../obj-gnu/libc.a: ../obj-gnu/./other/peekpoke.o
-../obj-gnu/libc.a: ../obj-gnu/./other/popen.o
-../obj-gnu/libc.a: ../obj-gnu/./other/putenv.o
-../obj-gnu/libc.a: ../obj-gnu/./other/putw.o
-../obj-gnu/libc.a: ../obj-gnu/./other/random.o
-../obj-gnu/libc.a: ../obj-gnu/./other/rindex.o
-../obj-gnu/libc.a: ../obj-gnu/./other/setenv.o
-../obj-gnu/libc.a: ../obj-gnu/./other/setgroups.o
-../obj-gnu/libc.a: ../obj-gnu/./other/settimeofday.o
-../obj-gnu/libc.a: ../obj-gnu/./other/stderr.o
-../obj-gnu/libc.a: ../obj-gnu/./other/strdup.o
-../obj-gnu/libc.a: ../obj-gnu/./other/strtok_r.o
-../obj-gnu/libc.a: ../obj-gnu/./other/swab.o
-../obj-gnu/libc.a: ../obj-gnu/./other/sys_eniop.o
-../obj-gnu/libc.a: ../obj-gnu/./other/syscall.o
-../obj-gnu/libc.a: ../obj-gnu/./other/sysconf.o
-../obj-gnu/libc.a: ../obj-gnu/./other/syslog.o
-../obj-gnu/libc.a: ../obj-gnu/./other/taskcall.o
-../obj-gnu/libc.a: ../obj-gnu/./other/telldir.o
-../obj-gnu/libc.a: ../obj-gnu/./other/termcap.o
-../obj-gnu/libc.a: ../obj-gnu/./other/ttyname.o
-../obj-gnu/libc.a: ../obj-gnu/./other/ttyslot.o
-../obj-gnu/libc.a: ../obj-gnu/./other/v8regerror.o
-../obj-gnu/libc.a: ../obj-gnu/./other/v8regexp.o
-../obj-gnu/libc.a: ../obj-gnu/./other/v8regsub.o
-../obj-gnu/libc.a: ../obj-gnu/./other/writev.o
-
-../obj-gnu/libc.a:
-	gar cr ../obj-gnu/libc.a $?
-
-../obj-gnu/./other/_allocmem.o: _allocmem.c
-	gcc -O -D_MINIX -D_POSIX_SOURCE -I../../servers -c -o ../obj-gnu/./other/_allocmem.o _allocmem.c
-
-../obj-gnu/./other/_brk.o: _brk.c
-	gcc -O -D_MINIX -D_POSIX_SOURCE -I../../servers -c -o ../obj-gnu/./other/_brk.o _brk.c
-
-../obj-gnu/./other/_devctl.o: _devctl.c
-	gcc -O -D_MINIX -D_POSIX_SOURCE -I../../servers -c -o ../obj-gnu/./other/_devctl.o _devctl.c
-
-../obj-gnu/./other/__pm_findproc.o: __pm_findproc.c
-	gcc -O -D_MINIX -D_POSIX_SOURCE -I../../servers -c -o ../obj-gnu/./other/__pm_findproc.o __pm_findproc.c
-
-../obj-gnu/./other/_freemem.o: _freemem.c
-	gcc -O -D_MINIX -D_POSIX_SOURCE -I../../servers -c -o ../obj-gnu/./other/_freemem.o _freemem.c
-
-../obj-gnu/./other/_getnpid.o: _getnpid.c
-	gcc -O -D_MINIX -D_POSIX_SOURCE -I../../servers -c -o ../obj-gnu/./other/_getnpid.o _getnpid.c
-
-../obj-gnu/./other/_getsigset.o: _getsigset.c
-	gcc -O -D_MINIX -D_POSIX_SOURCE -I../../servers -c -o ../obj-gnu/./other/_getsigset.o _getsigset.c
-
-../obj-gnu/./other/_getnprocnr.o: _getnprocnr.c
-	gcc -O -D_MINIX -D_POSIX_SOURCE -I../../servers -c -o ../obj-gnu/./other/_getnprocnr.o _getnprocnr.c
-
-../obj-gnu/./other/_getpprocnr.o: _getpprocnr.c
-	gcc -O -D_MINIX -D_POSIX_SOURCE -I../../servers -c -o ../obj-gnu/./other/_getpprocnr.o _getpprocnr.c
-
-../obj-gnu/./other/_getprocnr.o: _getprocnr.c
-	gcc -O -D_MINIX -D_POSIX_SOURCE -I../../servers -c -o ../obj-gnu/./other/_getprocnr.o _getprocnr.c
-
-../obj-gnu/./other/_getsysinfo.o: _getsysinfo.c
-	gcc -O -D_MINIX -D_POSIX_SOURCE -I../../servers -c -o ../obj-gnu/./other/_getsysinfo.o _getsysinfo.c
-
-../obj-gnu/./other/_reboot.o: _reboot.c
-	gcc -O -D_MINIX -D_POSIX_SOURCE -I../../servers -c -o ../obj-gnu/./other/_reboot.o _reboot.c
-
-../obj-gnu/./other/_seekdir.o: _seekdir.c
-	gcc -O -D_MINIX -D_POSIX_SOURCE -I../../servers -c -o ../obj-gnu/./other/_seekdir.o _seekdir.c
-
-../obj-gnu/./other/_svrctl.o: _svrctl.c
-	gcc -O -D_MINIX -D_POSIX_SOURCE -I../../servers -c -o ../obj-gnu/./other/_svrctl.o _svrctl.c
-
-../obj-gnu/./other/asynchio.o: asynchio.c
-	gcc -O -D_MINIX -D_POSIX_SOURCE -I../../servers -c -o ../obj-gnu/./other/asynchio.o asynchio.c
-
-../obj-gnu/./other/basename.o: basename.c
-	gcc -O -D_MINIX -D_POSIX_SOURCE -I../../servers -c -o ../obj-gnu/./other/basename.o basename.c
-
-../obj-gnu/./other/bcmp.o: bcmp.c
-	gcc -O -D_MINIX -D_POSIX_SOURCE -I../../servers -c -o ../obj-gnu/./other/bcmp.o bcmp.c
-
-../obj-gnu/./other/bcopy.o: bcopy.c
-	gcc -O -D_MINIX -D_POSIX_SOURCE -I../../servers -c -o ../obj-gnu/./other/bcopy.o bcopy.c
-
-../obj-gnu/./other/bzero.o: bzero.c
-	gcc -O -D_MINIX -D_POSIX_SOURCE -I../../servers -c -o ../obj-gnu/./other/bzero.o bzero.c
-
-../obj-gnu/./other/configfile.o: configfile.c
-	gcc -O -D_MINIX -D_POSIX_SOURCE -I../../servers -c -o ../obj-gnu/./other/configfile.o configfile.c
-
-../obj-gnu/./other/crypt.o: crypt.c
-	gcc -O -D_MINIX -D_POSIX_SOURCE -I../../servers -c -o ../obj-gnu/./other/crypt.o crypt.c
-
-../obj-gnu/./other/ctermid.o: ctermid.c
-	gcc -O -D_MINIX -D_POSIX_SOURCE -I../../servers -c -o ../obj-gnu/./other/ctermid.o ctermid.c
-
-../obj-gnu/./other/cuserid.o: cuserid.c
-	gcc -O -D_MINIX -D_POSIX_SOURCE -I../../servers -c -o ../obj-gnu/./other/cuserid.o cuserid.c
-
-../obj-gnu/./other/environ.o: environ.c
-	gcc -O -D_MINIX -D_POSIX_SOURCE -I../../servers -c -o ../obj-gnu/./other/environ.o environ.c
-
-../obj-gnu/./other/errno.o: errno.c
-	gcc -O -D_MINIX -D_POSIX_SOURCE -I../../servers -c -o ../obj-gnu/./other/errno.o errno.c
-
-../obj-gnu/./other/fdopen.o: fdopen.c
-	gcc -O -D_MINIX -D_POSIX_SOURCE -I../../servers -c -o ../obj-gnu/./other/fdopen.o fdopen.c
-
-../obj-gnu/./other/ffs.o: ffs.c
-	gcc -O -D_MINIX -D_POSIX_SOURCE -I../../servers -c -o ../obj-gnu/./other/ffs.o ffs.c
-
-../obj-gnu/./other/flock.o: flock.c
-	gcc -O -D_MINIX -D_POSIX_SOURCE -I../../servers -c -o ../obj-gnu/./other/flock.o flock.c
-
-../obj-gnu/./other/fslib.o: fslib.c
-	gcc -O -D_MINIX -D_POSIX_SOURCE -I../../servers -c -o ../obj-gnu/./other/fslib.o fslib.c
-
-../obj-gnu/./other/fts.o: fts.c
-	gcc -O -D_MINIX -D_POSIX_SOURCE -I../../servers -c -o ../obj-gnu/./other/fts.o fts.c
-
-../obj-gnu/./other/fsversion.o: fsversion.c
-	gcc -O -D_MINIX -D_POSIX_SOURCE -I../../servers -c -o ../obj-gnu/./other/fsversion.o fsversion.c
-
-../obj-gnu/./other/getgrent.o: getgrent.c
-	gcc -O -D_MINIX -D_POSIX_SOURCE -I../../servers -c -o ../obj-gnu/./other/getgrent.o getgrent.c
-
-../obj-gnu/./other/getlogin.o: getlogin.c
-	gcc -O -D_MINIX -D_POSIX_SOURCE -I../../servers -c -o ../obj-gnu/./other/getlogin.o getlogin.c
-
-../obj-gnu/./other/getpagesize.o: getpagesize.c
-	gcc -O -D_MINIX -D_POSIX_SOURCE -I../../servers -c -o ../obj-gnu/./other/getpagesize.o getpagesize.c
-
-../obj-gnu/./other/getpass.o: getpass.c
-	gcc -O -D_MINIX -D_POSIX_SOURCE -I../../servers -c -o ../obj-gnu/./other/getpass.o getpass.c
-
-../obj-gnu/./other/getpwent.o: getpwent.c
-	gcc -O -D_MINIX -D_POSIX_SOURCE -I../../servers -c -o ../obj-gnu/./other/getpwent.o getpwent.c
-
-../obj-gnu/./other/getttyent.o: getttyent.c
-	gcc -O -D_MINIX -D_POSIX_SOURCE -I../../servers -c -o ../obj-gnu/./other/getttyent.o getttyent.c
-
-../obj-gnu/./other/getw.o: getw.c
-	gcc -O -D_MINIX -D_POSIX_SOURCE -I../../servers -c -o ../obj-gnu/./other/getw.o getw.c
-
-../obj-gnu/./other/hypot.o: hypot.c
-	gcc -O -D_MINIX -D_POSIX_SOURCE -I../../servers -c -o ../obj-gnu/./other/hypot.o hypot.c
-
-../obj-gnu/./other/index.o: index.c
-	gcc -O -D_MINIX -D_POSIX_SOURCE -I../../servers -c -o ../obj-gnu/./other/index.o index.c
-
-../obj-gnu/./other/itoa.o: itoa.c
-	gcc -O -D_MINIX -D_POSIX_SOURCE -I../../servers -c -o ../obj-gnu/./other/itoa.o itoa.c
-
-../obj-gnu/./other/loadname.o: loadname.c
-	gcc -O -D_MINIX -D_POSIX_SOURCE -I../../servers -c -o ../obj-gnu/./other/loadname.o loadname.c
-
-../obj-gnu/./other/lock.o: lock.c
-	gcc -O -D_MINIX -D_POSIX_SOURCE -I../../servers -c -o ../obj-gnu/./other/lock.o lock.c
-
-../obj-gnu/./other/lrand.o: lrand.c
-	gcc -O -D_MINIX -D_POSIX_SOURCE -I../../servers -c -o ../obj-gnu/./other/lrand.o lrand.c
-
-../obj-gnu/./other/lsearch.o: lsearch.c
-	gcc -O -D_MINIX -D_POSIX_SOURCE -I../../servers -c -o ../obj-gnu/./other/lsearch.o lsearch.c
-
-../obj-gnu/./other/memccpy.o: memccpy.c
-	gcc -O -D_MINIX -D_POSIX_SOURCE -I../../servers -c -o ../obj-gnu/./other/memccpy.o memccpy.c
-
-../obj-gnu/./other/mstats.o: mstats.c
-	gcc -O -D_MINIX -D_POSIX_SOURCE -I../../servers -c -o ../obj-gnu/./other/mstats.o mstats.c
-
-../obj-gnu/./other/mtab.o: mtab.c
-	gcc -O -D_MINIX -D_POSIX_SOURCE -I../../servers -c -o ../obj-gnu/./other/mtab.o mtab.c
-
-../obj-gnu/./other/nlist.o: nlist.c
-	gcc -O -D_MINIX -D_POSIX_SOURCE -I../../servers -c -o ../obj-gnu/./other/nlist.o nlist.c
-
-../obj-gnu/./other/paramvalue.o: paramvalue.c
-	gcc -O -D_MINIX -D_POSIX_SOURCE -I../../servers -c -o ../obj-gnu/./other/paramvalue.o paramvalue.c
-
-../obj-gnu/./other/peekpoke.o: peekpoke.c
-	gcc -O -D_MINIX -D_POSIX_SOURCE -I../../servers -c -o ../obj-gnu/./other/peekpoke.o peekpoke.c
-
-../obj-gnu/./other/popen.o: popen.c
-	gcc -O -D_MINIX -D_POSIX_SOURCE -I../../servers -c -o ../obj-gnu/./other/popen.o popen.c
-
-../obj-gnu/./other/putenv.o: putenv.c
-	gcc -O -D_MINIX -D_POSIX_SOURCE -I../../servers -c -o ../obj-gnu/./other/putenv.o putenv.c
-
-../obj-gnu/./other/putw.o: putw.c
-	gcc -O -D_MINIX -D_POSIX_SOURCE -I../../servers -c -o ../obj-gnu/./other/putw.o putw.c
-
-../obj-gnu/./other/random.o: random.c
-	gcc -O -D_MINIX -D_POSIX_SOURCE -I../../servers -c -o ../obj-gnu/./other/random.o random.c
-
-../obj-gnu/./other/rindex.o: rindex.c
-	gcc -O -D_MINIX -D_POSIX_SOURCE -I../../servers -c -o ../obj-gnu/./other/rindex.o rindex.c
-
-../obj-gnu/./other/setenv.o: setenv.c
-	gcc -O -D_MINIX -D_POSIX_SOURCE -I../../servers -c -o ../obj-gnu/./other/setenv.o setenv.c
-
-../obj-gnu/./other/setgroups.o: setgroups.c
-	gcc -O -D_MINIX -D_POSIX_SOURCE -I../../servers -c -o ../obj-gnu/./other/setgroups.o setgroups.c
-
-../obj-gnu/./other/settimeofday.o: settimeofday.c
-	gcc -O -D_MINIX -D_POSIX_SOURCE -I../../servers -c -o ../obj-gnu/./other/settimeofday.o settimeofday.c
-
-../obj-gnu/./other/stderr.o: stderr.c
-	gcc -O -D_MINIX -D_POSIX_SOURCE -I../../servers -c -o ../obj-gnu/./other/stderr.o stderr.c
-
-../obj-gnu/./other/strdup.o: strdup.c
-	gcc -O -D_MINIX -D_POSIX_SOURCE -I../../servers -c -o ../obj-gnu/./other/strdup.o strdup.c
-
-../obj-gnu/./other/strtok_r.o: strtok_r.c
-	gcc -O -D_MINIX -D_POSIX_SOURCE -I../../servers -c -o ../obj-gnu/./other/strtok_r.o strtok_r.c
-
-../obj-gnu/./other/swab.o: swab.c
-	gcc -O -D_MINIX -D_POSIX_SOURCE -I../../servers -c -o ../obj-gnu/./other/swab.o swab.c
-
-../obj-gnu/./other/sys_eniop.o: sys_eniop.c
-	gcc -O -D_MINIX -D_POSIX_SOURCE -I../../servers -c -o ../obj-gnu/./other/sys_eniop.o sys_eniop.c
-
-../obj-gnu/./other/syscall.o: syscall.c
-	gcc -O -D_MINIX -D_POSIX_SOURCE -I../../servers -c -o ../obj-gnu/./other/syscall.o syscall.c
-
-../obj-gnu/./other/sysconf.o: sysconf.c
-	gcc -O -D_MINIX -D_POSIX_SOURCE -I../../servers -c -o ../obj-gnu/./other/sysconf.o sysconf.c
-
-../obj-gnu/./other/syslog.o: syslog.c
-	gcc -O -D_MINIX -D_POSIX_SOURCE -I../../servers -c -o ../obj-gnu/./other/syslog.o syslog.c
-
-../obj-gnu/./other/taskcall.o: taskcall.c
-	gcc -O -D_MINIX -D_POSIX_SOURCE -I../../servers -c -o ../obj-gnu/./other/taskcall.o taskcall.c
-
-../obj-gnu/./other/telldir.o: telldir.c
-	gcc -O -D_MINIX -D_POSIX_SOURCE -I../../servers -c -o ../obj-gnu/./other/telldir.o telldir.c
-
-../obj-gnu/./other/termcap.o: termcap.c
-	gcc -O -D_MINIX -D_POSIX_SOURCE -I../../servers -c -o ../obj-gnu/./other/termcap.o termcap.c
-
-../obj-gnu/./other/ttyname.o: ttyname.c
-	gcc -O -D_MINIX -D_POSIX_SOURCE -I../../servers -c -o ../obj-gnu/./other/ttyname.o ttyname.c
-
-../obj-gnu/./other/ttyslot.o: ttyslot.c
-	gcc -O -D_MINIX -D_POSIX_SOURCE -I../../servers -c -o ../obj-gnu/./other/ttyslot.o ttyslot.c
-
-../obj-gnu/./other/v8regerror.o: v8regerror.c
-	gcc -O -D_MINIX -D_POSIX_SOURCE -I../../servers -c -o ../obj-gnu/./other/v8regerror.o v8regerror.c
-
-../obj-gnu/./other/v8regexp.o: v8regexp.c
-	gcc -O -D_MINIX -D_POSIX_SOURCE -I../../servers -c -o ../obj-gnu/./other/v8regexp.o v8regexp.c
-
-../obj-gnu/./other/v8regsub.o: v8regsub.c
-	gcc -O -D_MINIX -D_POSIX_SOURCE -I../../servers -c -o ../obj-gnu/./other/v8regsub.o v8regsub.c
-
-../obj-gnu/./other/writev.o: writev.c
-	gcc -O -D_MINIX -D_POSIX_SOURCE -I../../servers -c -o ../obj-gnu/./other/writev.o writev.c
-
-
-
-
-clean::
-	rm -f ../obj-ack//./other/*
-	rm -f ../obj-gnu/./other/*
-
-include Makedepend-ack
-include .depend-ack
-
-include Makedepend-gnu
-include .depend-gnu
Index: trunk/minix/lib/other/Makefile.in
===================================================================
--- trunk/minix/lib/other/Makefile.in	(revision 9)
+++ 	(revision )
@@ -1,85 +1,0 @@
-# Makefile for lib/other.
-
-CFLAGS="-O -D_MINIX -D_POSIX_SOURCE -I../../servers"
-
-LIBRARIES=libc
-
-libc_FILES=" \
-	_allocmem.c \
-	_brk.c \
-	_devctl.c \
-	__pm_findproc.c \
-	_freemem.c \
-	_getnpid.c \
-	_getsigset.c \
-	_getnprocnr.c \
-	_getpprocnr.c \
-	_getprocnr.c \
-	_getsysinfo.c \
-	_reboot.c \
-	_seekdir.c \
-	_svrctl.c \
-	asynchio.c \
-	basename.c \
-	bcmp.c \
-	bcopy.c \
-	bzero.c \
-	configfile.c \
-	crypt.c \
-	ctermid.c \
-	cuserid.c \
-	environ.c \
-	errno.c \
-	fdopen.c \
-	ffs.c \
-	flock.c \
-	fslib.c \
-	fts.c \
-	fsversion.c \
-	getgrent.c \
-	getlogin.c \
-	getpagesize.c \
-	getpass.c \
-	getpwent.c \
-	getttyent.c \
-	getw.c \
-	hypot.c \
-	index.c \
-	itoa.c \
-	loadname.c \
-	lock.c \
-	lrand.c \
-	lsearch.c \
-	memccpy.c \
-	mstats.c \
-	mtab.c \
-	nlist.c \
-	paramvalue.c \
-	peekpoke.c \
-	popen.c \
-	putenv.c \
-	putw.c \
-	random.c \
-	rindex.c \
-	setenv.c \
-	setgroups.c \
-	settimeofday.c \
-	stderr.c \
-	strdup.c \
-	strtok_r.c \
-	swab.c \
-	sys_eniop.c \
-	syscall.c \
-	sysconf.c \
-	syslog.c \
-	taskcall.c \
-	telldir.c \
-	termcap.c \
-	ttyname.c \
-	ttyslot.c \
-	v8regerror.c \
-	v8regexp.c \
-	v8regsub.c \
-	writev.c"
-
-TYPE=both
Index: trunk/minix/lib/other/__pm_findproc.c
===================================================================
--- trunk/minix/lib/other/__pm_findproc.c	(revision 9)
+++ 	(revision )
@@ -1,19 +1,0 @@
-#include <lib.h>
-#define _pm_findproc	__pm_findproc
-#include <unistd.h>
-#include <string.h>
-
-PUBLIC int _pm_findproc(proc_name, proc_nr)
-char *proc_name;		/* name of process to search for */
-int *proc_nr;			/* return process number here */
-{
-  message m;
-
-  m.m1_p1 = proc_name;
-  m.m1_i1 = -1;			/* search by name */
-  m.m1_i2 = strlen(proc_name) + 1;
-  if (_syscall(MM, GETPROCNR, &m) < 0) return(-1);
-  *proc_nr = m.m1_i1;
-  return(0);
-}
-
Index: trunk/minix/lib/other/_allocmem.c
===================================================================
--- trunk/minix/lib/other/_allocmem.c	(revision 9)
+++ 	(revision )
@@ -1,16 +1,0 @@
-#include <lib.h>
-#define allocmem	_allocmem
-#include <unistd.h>
-
-
-PUBLIC int allocmem(size, base)
-phys_bytes size;			/* size of mem chunk requested */
-phys_bytes *base;			/* return base address */
-{
-  message m;
-  m.m4_l1 = size;		
-  if (_syscall(MM, ALLOCMEM, &m) < 0) return(-1);
-  *base = m.m4_l2;
-  return(0);
-}
-
Index: trunk/minix/lib/other/_brk.c
===================================================================
--- trunk/minix/lib/other/_brk.c	(revision 9)
+++ 	(revision )
@@ -1,44 +1,0 @@
-#include <lib.h>
-#define brk	_brk
-#define sbrk	_sbrk
-#include <unistd.h>
-
-extern char *_brksize;
-
-/* Both OSF/1 and SYSVR4 man pages specify that brk(2) returns int.
- * However, BSD4.3 specifies that brk() returns char*.  POSIX omits
- * brk() on the grounds that it imposes a memory model on an architecture.
- * For this reason, brk() and sbrk() are not in the lib/posix directory.
- * On the other hand, they are so crucial to correct operation of so many
- * parts of the system, that we have chosen to hide the name brk using _brk,
- * as with system calls.  In this way, if a user inadvertently defines a
- * procedure brk, MINIX may continue to work because the true call is _brk.
- */
-PUBLIC int brk(addr)
-char *addr;
-{
-  message m;
-
-  if (addr != _brksize) {
-	m.m1_p1 = addr;
-	if (_syscall(MM, BRK, &m) < 0) return(-1);
-	_brksize = m.m2_p1;
-  }
-  return(0);
-}
-
-
-PUBLIC char *sbrk(incr)
-int incr;
-{
-  char *newsize, *oldsize;
-
-  oldsize = _brksize;
-  newsize = _brksize + incr;
-  if ((incr > 0 && newsize < oldsize) || (incr < 0 && newsize > oldsize))
-	return( (char *) -1);
-  if (brk(newsize) == 0)
-	return(oldsize);
-  else
-	return( (char *) -1);
-}
Index: trunk/minix/lib/other/_devctl.c
===================================================================
--- trunk/minix/lib/other/_devctl.c	(revision 9)
+++ 	(revision )
@@ -1,16 +1,0 @@
-#include <lib.h>
-#define devctl	_devctl
-#include <unistd.h>
-
-
-PUBLIC int devctl(int ctl_req, int proc_nr, int dev_nr, int dev_style)
-{
-  message m;
-  m.m4_l1 = ctl_req;
-  m.m4_l2 = proc_nr;
-  m.m4_l3 = dev_nr;
-  m.m4_l4 = dev_style;
-  if (_syscall(FS, DEVCTL, &m) < 0) return(-1);
-  return(0);
-}
-
Index: trunk/minix/lib/other/_freemem.c
===================================================================
--- trunk/minix/lib/other/_freemem.c	(revision 9)
+++ 	(revision )
@@ -1,16 +1,0 @@
-#include <lib.h>
-#define freemem	_freemem
-#include <unistd.h>
-
-
-PUBLIC int freemem(size, base)
-phys_bytes size;			/* size of mem chunk requested */
-phys_bytes base;			/* base address of mem chunk */
-{
-  message m;
-  m.m4_l1 = size;		
-  m.m4_l2 = base;		
-  if (_syscall(MM, FREEMEM, &m) < 0) return(-1);
-  return(0);
-}
-
Index: trunk/minix/lib/other/_getnpid.c
===================================================================
--- trunk/minix/lib/other/_getnpid.c	(revision 9)
+++ 	(revision )
@@ -1,11 +1,0 @@
-#include <lib.h>
-#define getnpid	_getnpid
-#include <unistd.h>
-
-PUBLIC pid_t getnpid(int proc_nr)
-{
-  message m;
-  m.m1_i1 = proc_nr;		/* search pid for this process */
-  if (_syscall(MM, GETPID, &m) < 0) return ( (pid_t) -1);
-  return( (pid_t) m.m2_i2);	/* return search result */
-}
Index: trunk/minix/lib/other/_getnprocnr.c
===================================================================
--- trunk/minix/lib/other/_getnprocnr.c	(revision 9)
+++ 	(revision )
@@ -1,14 +1,0 @@
-#include <lib.h>
-#define getnprocnr	_getnprocnr
-#include <unistd.h>
-
-
-PUBLIC int getnprocnr(pid_t pid)
-{
-  message m;
-  m.m1_i1 = pid;		/* pass pid >=0 to search for */
-  m.m1_i2 = 0;			/* don't pass name to search for */
-  if (_syscall(PM_PROC_NR, GETPROCNR, &m) < 0) return(-1);
-  return(m.m1_i1);		/* return search result */
-}
-
Index: trunk/minix/lib/other/_getpprocnr.c
===================================================================
--- trunk/minix/lib/other/_getpprocnr.c	(revision 9)
+++ 	(revision )
@@ -1,14 +1,0 @@
-#include <lib.h>
-#define getpprocnr	_getpprocnr
-#include <unistd.h>
-
-
-PUBLIC int getpprocnr()
-{
-  message m;
-  m.m1_i1 = -1;			/* don't pass pid to search for */
-  m.m1_i2 = 0;			/* don't pass name to search for */
-  if (_syscall(PM_PROC_NR, GETPROCNR, &m) < 0) return(-1);
-  return(m.m1_i2);		/* return parent process number */
-}
-
Index: trunk/minix/lib/other/_getprocnr.c
===================================================================
--- trunk/minix/lib/other/_getprocnr.c	(revision 9)
+++ 	(revision )
@@ -1,14 +1,0 @@
-#include <lib.h>
-#define getprocnr	_getprocnr
-#include <unistd.h>
-
-
-PUBLIC int getprocnr()
-{
-  message m;
-  m.m1_i1 = -1;			/* don't pass pid to search for */
-  m.m1_i2 = 0;			/* don't pass name to search for */
-  if (_syscall(PM_PROC_NR, GETPROCNR, &m) < 0) return(-1);
-  return(m.m1_i1);		/* return own process number */
-}
-
Index: trunk/minix/lib/other/_getsigset.c
===================================================================
--- trunk/minix/lib/other/_getsigset.c	(revision 9)
+++ 	(revision )
@@ -1,15 +1,0 @@
-#include <lib.h>
-#define getsigset	_getsigset
-#include <unistd.h>
-
-
-PUBLIC int getsigset(sp)
-sigset_t *sp;				/* where to put it */
-{
-  message m;
-  m.m2_i1 = SELF;			/* request own signal set */
-  if (_syscall(PM_PROC_NR, PROCSTAT, &m) < 0) return(-1);
-  *sp = m.m2_l1;
-  return(0);
-}
-
Index: trunk/minix/lib/other/_getsysinfo.c
===================================================================
--- trunk/minix/lib/other/_getsysinfo.c	(revision 9)
+++ 	(revision )
@@ -1,17 +1,0 @@
-#include <lib.h>
-#define getsysinfo	_getsysinfo
-#include <unistd.h>
-
-
-PUBLIC int getsysinfo(who, what, where)
-int who;			/* from whom to request info */
-int what;			/* what information is requested */
-void *where;			/* where to put it */
-{
-  message m;
-  m.m1_i1 = what;
-  m.m1_p1 = where;
-  if (_syscall(who, GETSYSINFO, &m) < 0) return(-1);
-  return(0);
-}
-
Index: trunk/minix/lib/other/_reboot.c
===================================================================
--- trunk/minix/lib/other/_reboot.c	(revision 9)
+++ 	(revision )
@@ -1,24 +1,0 @@
-/* reboot.c - Systemcall interface to mm/signal.c::do_reboot()
-
-   author: Edvard Tuinder  v892231@si.hhs.NL
- */
-
-#include <lib.h>
-#define reboot	_reboot
-#include <unistd.h>
-#include <stdarg.h>
-
-int reboot(int how, ...)
-{
-  message m;
-  va_list ap;
-
-  va_start(ap, how);
-  if ((m.m1_i1 = how) == RBT_MONITOR) {
-	m.m1_p1 = va_arg(ap, char *);
-	m.m1_i2 = va_arg(ap, size_t);
-  }
-  va_end(ap);
-
-  return _syscall(MM, REBOOT, &m);
-}
Index: trunk/minix/lib/other/_seekdir.c
===================================================================
--- trunk/minix/lib/other/_seekdir.c	(revision 9)
+++ 	(revision )
@@ -1,32 +1,0 @@
-/*	seekdir()					Author: Kees J. Bot
- *								24 Apr 1989
- */
-#define nil 0
-#include <lib.h>
-#define lseek	_lseek
-#define readdir	_readdir
-#define seekdir	_seekdir
-#include <sys/types.h>
-#include <dirent.h>
-#include <unistd.h>
-#include <errno.h>
-
-int seekdir(DIR *dp, off_t pos)
-/* Seek to position pos in a directory. */
-{
-	int off;
-
-	if (dp == nil) { errno= EBADF; return -1; }
-
-	dp->_count= 0;
-	dp->_ptr= dp->_buf;
-
-	off= pos & (sizeof(dp->_buf) - 1);
-	dp->_pos= pos - off;
-
-	if (lseek(dp->_fd, dp->_pos, SEEK_SET) == -1) return -1;
-
-	while (dp->_pos < pos && readdir(dp) != nil) {}
-
-	return 0;
-}
Index: trunk/minix/lib/other/_svrctl.c
===================================================================
--- trunk/minix/lib/other/_svrctl.c	(revision 9)
+++ 	(revision )
@@ -1,29 +1,0 @@
-/*	svrctl() - special server control functions.	Author: Kees J. Bot
- *								24 Apr 1994
- */
-#include <lib.h>
-#include <stdio.h>
-#define svrctl _svrctl
-#include <sys/svrctl.h>
-
-int svrctl(int request, void *argp)
-{
-	message m;
-
-	m.m2_i1 = request;
-	m.m2_p1 = argp;
-
-	switch ((request >> 8) & 0xFF) {
-	case 'M':
-	case 'S':
-		/* MM handles calls for itself and the kernel. */
-		return _syscall(MM, SVRCTL, &m);
-	case 'F':
-	case 'I':
-		/* FS handles calls for itself and inet. */
-		return _syscall(FS, SVRCTL, &m);
-	default:
-		errno = EINVAL;
-		return -1;
-	}
-}
Index: trunk/minix/lib/other/asynchio.c
===================================================================
--- trunk/minix/lib/other/asynchio.c	(revision 9)
+++ 	(revision )
@@ -1,154 +1,0 @@
-/*	asyn_init(), asyn_read(), asyn_write(), asyn_ioctl(),
- *	asyn_wait(), asyn_synch(), asyn_close()
- *							Author: Kees J. Bot
- *								26 Jan 1995
- * Thise are just stub routines that are call compatible with
- * the asynchio(3) library of Minix-vmd.  See asynchio.h.
- */
-#define nil 0
-#define alarm	_alarm
-#define ioctl	_ioctl
-#define read	_read
-#define sigaction _sigaction
-#define sigfillset _sigfillset
-#define time	_time
-#define write	_write
-#include <lib.h>
-#include <time.h>
-#include <sys/ioctl.h>
-#include <sys/asynchio.h>
-#include <stdlib.h>
-#include <unistd.h>
-#include <string.h>
-#include <signal.h>
-
-#define IO_IDLE		0
-#define IO_INPROGRESS	1
-#define IO_RESULT	2
-
-#define OP_NOOP		0
-#define OP_READ		1
-#define OP_WRITE	2
-#define OP_IOCTL	3
-
-static asynchio_t *asyn_current;
-
-void asyn_init(asynchio_t *asyn)
-{
-	asyn->state= IO_IDLE;
-	asyn->op= OP_NOOP;
-}
-
-static ssize_t operation(int op, asynchio_t *asyn, int fd, int req,
-						void *data, ssize_t count)
-{
-	switch (asyn->state) {
-	case IO_INPROGRESS:
-		if (asyn_current != asyn && asyn->op != op) abort();
-		/*FALL THROUGH*/
-	case IO_IDLE:
-		asyn_current= asyn;
-		asyn->op= op;
-		asyn->fd= fd;
-		asyn->req= req;
-		asyn->data= data;
-		asyn->count= count;
-		asyn->state= IO_INPROGRESS;
-		errno= EINPROGRESS;
-		return -1;
-	case IO_RESULT:
-		if (asyn_current != asyn && asyn->op != op) abort();
-		errno= asyn->errno;
-		return asyn->count;
-	}
-}
-
-ssize_t asyn_read(asynchio_t *asyn, int fd, void *buf, size_t len)
-{
-	return operation(OP_READ, asyn, fd, 0, buf, len);
-}
-
-ssize_t asyn_write(asynchio_t *asyn, int fd, const void *buf, size_t len)
-{
-	return operation(OP_WRITE, asyn, fd, 0, (void *) buf, len);
-}
-
-int asyn_ioctl(asynchio_t *asyn, int fd, unsigned long request, void *data)
-{
-	return operation(OP_IOCTL, asyn, fd, request, data, 0);
-}
-
-static void time_out(int sig)
-{
-	alarm(1);
-}
-
-int asyn_wait(asynchio_t *asyn, int flags, struct timeval *to)
-{
-	time_t now;
-	unsigned old_timer, new_timer;
-	struct sigaction old_sa, new_sa;
-
-	if (asyn_current != asyn) abort();
-	if (flags & ASYN_NONBLOCK) abort();
-
-	if (asyn->state == IO_RESULT) {
-		asyn->state= IO_IDLE;
-		asyn->op= OP_NOOP;
-		return 0;
-	}
-
-	if (to != nil) {
-		now= time(nil);
-		if (to->tv_sec <= now) { errno= EINTR; return -1; }
-		old_timer= alarm(0);
-		new_sa.sa_handler= time_out;
-		sigfillset(&new_sa.sa_mask);
-		new_sa.sa_flags= 0;
-		sigaction(SIGALRM, &new_sa, &old_sa);
-		new_timer= to->tv_sec - now;
-		if (new_timer < old_timer) {
-			new_timer= old_timer;
-		}
-		alarm(new_timer);
-	}
-	switch (asyn->op) {
-	case OP_NOOP:
-		asyn->count= pause();
-		asyn->errno= errno;
-	case OP_READ:
-		asyn->count= read(asyn->fd, asyn->data, asyn->count);
-		asyn->errno= errno;
-		break;
-	case OP_WRITE:
-		asyn->count= write(asyn->fd, asyn->data, asyn->count);
-		asyn->errno= errno;
-		break;
-	case OP_IOCTL:
-		asyn->count= ioctl(asyn->fd, asyn->req, asyn->data);
-		asyn->errno= errno;
-		break;
-	}
-	if (to != nil) {
-		alarm(0);
-		sigaction(SIGALRM, &old_sa, (struct sigaction *)0);
-		alarm(old_timer);
-	}
-
-	if (asyn->count == -1 && asyn->errno == EINTR) {
-		errno= EINTR;
-		return -1;
-	} else {
-		asyn->state= IO_RESULT;
-		return 0;
-	}
-}
-
-int asyn_synch(asynchio_t *asyn, int fd)
-{
-}
-
-int asyn_close(asynchio_t *asyn, int fd)
-{
-	asyn_init(asyn);
-}
Index: trunk/minix/lib/other/basename.c
===================================================================
--- trunk/minix/lib/other/basename.c	(revision 9)
+++ 	(revision )
@@ -1,30 +1,0 @@
-/*
-basename.c
-*/
-
-#include <libgen.h>
-#include <string.h>
-
-char *basename(path)
-char *path;
-{
-	size_t len;
-	char *cp;
-
-	if (path == NULL)
-		return ".";
-	len= strlen(path);
-	if (len == 0)
-		return ".";
-	while (path[len-1] == '/')
-	{
-		if (len == 1)
-			return path;	/* just "/" */
-		len--;
-		path[len]= '\0';
-	}
-	cp= strrchr(path, '/');
-	if (cp != NULL)
-		return cp+1;
-	return path;
-}
Index: trunk/minix/lib/other/bcmp.c
===================================================================
--- trunk/minix/lib/other/bcmp.c	(revision 9)
+++ 	(revision )
@@ -1,12 +1,0 @@
-#include <lib.h>
-/* bcmp - Berklix equivalent of memcmp  */
-
-#include <string.h>
-
-int bcmp(s1, s2, length)	/* == 0 or != 0 for equality and inequality */ 
-_CONST void *s1;
-_CONST void *s2;
-size_t length;
-{
-  return(memcmp(s1, s2, length));
-}
Index: trunk/minix/lib/other/bcopy.c
===================================================================
--- trunk/minix/lib/other/bcopy.c	(revision 9)
+++ 	(revision )
@@ -1,12 +1,0 @@
-#include <lib.h>
-/* bcopy - Berklix equivalent of memcpy  */
-
-#include <string.h>
-
-void bcopy(src, dst, length)
-_CONST void *src;
-void *dst;
-size_t length;
-{
-  (void) memcpy(dst, src, length);
-}
Index: trunk/minix/lib/other/bzero.c
===================================================================
--- trunk/minix/lib/other/bzero.c	(revision 9)
+++ 	(revision )
@@ -1,11 +1,0 @@
-#include <lib.h>
-/* bzero - Berklix subset of memset  */
-
-#include <string.h>
-
-void bzero(dst, length)
-void *dst;
-size_t length;
-{
-  (void) memset(dst, 0, length);
-}
Index: trunk/minix/lib/other/configfile.c
===================================================================
--- trunk/minix/lib/other/configfile.c	(revision 9)
+++ 	(revision )
@@ -1,574 +1,0 @@
-/*	config_read(), _delete(), _length() - Generic config file routines.
- *							Author: Kees J. Bot
- *								5 Jun 1999
- */
-#define nil ((void*)0)
-#if __minix_vmd
-#include <minix/stubs.h>
-#else
-#define fstat _fstat
-#define stat _stat
-#endif
-#include <sys/types.h>
-#include <stdio.h>
-#include <stddef.h>
-#include <stdlib.h>
-#include <errno.h>
-#include <string.h>
-#include <time.h>
-#include <sys/stat.h>
-#if __minix_vmd
-#include <minix/asciictype.h>
-#else
-#include <ctype.h>
-#endif
-#define _c /* not const */
-#include <configfile.h>
-
-typedef struct configfile {	/* List of (included) configuration files. */
-	struct configfile *next;	/* A list indeed. */
-	time_t		ctime;		/* Last changed time, -1 if no file. */
-	char		name[1];	/* File name. */
-} configfile_t;
-
-/* Size of a configfile_t given a file name of length 'len'. */
-#define configfilesize(len)	(offsetof(configfile_t, name) + 1 + (len))
-
-typedef struct firstconfig {	/* First file and first word share a slot. */
-	configfile_t	*filelist;
-	char		new;		/* Set when created. */
-	config_t	config1;
-} firstconfig_t;
-
-/* Size of a config_t given a word of lenght 'len'.  Same for firstconfig_t. */
-#define config0size()		(offsetof(config_t, word))
-#define configsize(len)		(config0size() + 1 + (len))
-#define firstconfigsize(len)	\
-			(offsetof(firstconfig_t, config1) + configsize(len))
-
-/* Translate address of first config word to enclosing firstconfig_t and vv. */
-#define cfg2fcfg(p)	\
-    ((firstconfig_t *) ((char *) (p) - offsetof(firstconfig_t, config1)))
-#define fcfg2cfg(p)	(&(p)->config1)
-
-/* Variables used while building data. */
-static configfile_t *c_files;		/* List of (included) config files. */
-static int c_flags;			/* Flags argument of config_read(). */
-static FILE *c_fp;			/* Current open file. */
-static char *c_file;			/* Current open file name. */
-static unsigned c_line;			/* Current line number. */
-static int c;				/* Next character. */
-
-static void *allocate(void *mem, size_t size)
-/* Like realloc(), but checked. */
-{
-    if ((mem= realloc(mem, size)) == nil) {
-	fprintf(stderr, "\"%s\", line %u: Out of memory\n", c_file, c_line);
-	exit(1);
-    }
-    return mem;
-}
-
-#define deallocate(mem)	free(mem)
-
-static void delete_filelist(configfile_t *cfgf)
-/* Delete configuration file list. */
-{
-    void *junk;
-
-    while (cfgf != nil) {
-	junk= cfgf;
-	cfgf= cfgf->next;
-	deallocate(junk);
-    }
-}
-
-static void delete_config(config_t *cfg)
-/* Delete configuration file data. */
-{
-    config_t *next, *list, *junk;
-
-    next= cfg;
-    list= nil;
-    for (;;) {
-	if (next != nil) {
-	    /* Push the 'next' chain in reverse on the 'list' chain, putting
-	     * a leaf cell (next == nil) on top of 'list'.
-	     */
-	    junk= next;
-	    next= next->next;
-	    junk->next= list;
-	    list= junk;
-	} else
-	if (list != nil) {
-	    /* Delete the leaf cell.  If it has a sublist then that becomes
-	     * the 'next' chain.
-	     */
-	    junk= list;
-	    next= list->list;
-	    list= list->next;
-	    deallocate(junk);
-	} else {
-	    /* Both chains are gone. */
-	    break;
-	}
-    }
-}
-
-void config_delete(config_t *cfg1)
-/* Delete configuration file data, being careful with the odd first one. */
-{
-    firstconfig_t *fcfg= cfg2fcfg(cfg1);
-
-    delete_filelist(fcfg->filelist);
-    delete_config(fcfg->config1.next);
-    delete_config(fcfg->config1.list);
-    deallocate(fcfg);
-}
-
-static void nextc(void)
-/* Read the next character of the current file into 'c'. */
-{
-    if (c == '\n') c_line++;
-    c= getc(c_fp);
-    if (c == EOF && ferror(c_fp)) {
-	fprintf(stderr, "\"%s\", line %u: %s\n",
-	    c_file, c_line, strerror(errno));
-	exit(1);
-    }
-}
-
-static void skipwhite(void)
-/* Skip whitespace and comments. */
-{
-    while (isspace(c)) {
-	nextc();
-	if (c == '#') {
-	    do nextc(); while (c != EOF && c != '\n');
-	}
-    }
-}
-
-static void parse_err(void)
-/* Tell user that you can't parse past the current character. */
-{
-    char sc[2];
-
-    sc[0]= c;
-    sc[1]= 0;
-    fprintf(stderr, "\"%s\", line %u: parse error at '%s'\n",
-	c_file, c_line, c == EOF ? "EOF" : sc);
-    exit(1);
-}
-
-static config_t *read_word(void)
-/* Read a word or string. */
-{
-    config_t *w;
-    size_t i, len;
-    int q;
-    static char SPECIAL[] = "!#$%&*+-./:<=>?[\\]^_|~";
-
-    i= 0;
-    len= 32;
-    w= allocate(nil, configsize(32));
-    w->next= nil;
-    w->list= nil;
-    w->file= c_file;
-    w->line= c_line;
-    w->flags= 0;
-
-    /* Is it a quoted string? */
-    if (c == '\'' || c == '"') {
-	q= c;	/* yes */
-	nextc();
-    } else {
-	q= -1;	/* no */
-    }
-
-    for (;;) {
-	if (i == len) {
-	    len+= 32;
-	    w= allocate(w, configsize(len));
-	}
-
-	if (q == -1) {
-	    /* A word consists of letters, numbers and a few special chars. */
-	    if (!isalnum(c) && c < 0x80 && strchr(SPECIAL, c) == nil) break;
-	} else {
-	    /* Strings are made up of anything except newlines. */
-	    if (c == EOF || c == '\n') {
-		fprintf(stderr,
-		    "\"%s\", line %u: string at line %u not closed\n",
-		    c_file, c_line, w->line);
-		exit(1);
-		break;
-	    }
-	    if (c == q) {	/* Closing quote? */
-		nextc();
-		break;
-	    }
-	}
-
-	if (c != '\\') {	/* Simply add non-escapes. */
-	    w->word[i++]= c;
-	    nextc();
-	} else {		/* Interpret an escape. */
-	    nextc();
-	    if (isspace(c)) {
-		skipwhite();
-		continue;
-	    }
-
-	    if (c_flags & CFG_ESCAPED) {
-		w->word[i++]= '\\';	/* Keep the \ for the caller. */
-		if (i == len) {
-		    len+= 32;
-		    w= allocate(w, configsize(len));
-		}
-		w->flags |= CFG_ESCAPED;
-	    }
-
-	    if (isdigit(c)) {		/* Octal escape */
-		int n= 3;
-		int d= 0;
-
-		do {
-		    d= d * 010 + (c - '0');
-		    nextc();
-		} while (--n > 0 && isdigit(c));
-		w->word[i++]= d;
-	    } else
-	    if (c == 'x' || c == 'X') {	/* Hex escape */
-		int n= 2;
-		int d= 0;
-
-		nextc();
-		if (!isxdigit(c)) {
-		    fprintf(stderr, "\"%s\", line %u: bad hex escape\n",
-			c_file, c_line);
-		    exit(1);
-		}
-		do {
-		    d= d * 0x10 + (islower(c) ? (c - 'a' + 0xa) :
-				    isupper(c) ? (c - 'A' + 0xA) :
-				    (c - '0'));
-		    nextc();
-		} while (--n > 0 && isxdigit(c));
-		w->word[i++]= d;
-	    } else {
-		switch (c) {
-		case 'a':	c= '\a';	break;
-		case 'b':	c= '\b';	break;
-		case 'e':	c= '\033';	break;
-		case 'f':	c= '\f';	break;
-		case 'n':	c= '\n';	break;
-		case 'r':	c= '\r';	break;
-		case 's':	c= ' ';		break;
-		case 't':	c= '\t';	break;
-		case 'v':	c= '\v';	break;
-		default:	/* Anything else is kept as-is. */;
-		}
-		w->word[i++]= c;
-		nextc();
-	    }
-	}
-    }
-    w->word[i]= 0;
-    if (q != -1) {
-	w->flags |= CFG_STRING;
-    } else {
-	int f;
-	char *end;
-	static char base[]= { 0, 010, 10, 0x10 };
-
-	if (i == 0) parse_err();
-
-	/* Can the word be used as a number? */
-	for (f= 0; f < 4; f++) {
-	    (void) strtol(w->word, &end, base[f]);
-	    if (*end == 0) w->flags |= 1 << (f + 0);
-	    (void) strtoul(w->word, &end, base[f]);
-	    if (*end == 0) w->flags |= 1 << (f + 4);
-	}
-    }
-    return allocate(w, configsize(i));
-}
-
-static config_t *read_file(const char *file);
-static config_t *read_list(void);
-
-static config_t *read_line(void)
-/* Read and return one line of the config file. */
-{
-    config_t *cline, **pcline, *clist;
-
-    cline= nil;
-    pcline= &cline;
-
-    for (;;) {
-	skipwhite();
-
-	if (c == EOF || c == '}') {
-if(0)	    if (cline != nil) parse_err();
-	    break;
-	} else
-	if (c == ';') {
-	    nextc();
-	    if (cline != nil) break;
-	} else
-	if (cline != nil && c == '{') {
-	    /* A sublist. */
-	    nextc();
-	    clist= allocate(nil, config0size());
-	    clist->next= nil;
-	    clist->file= c_file;
-	    clist->line= c_line;
-	    clist->list= read_list();
-	    clist->flags= CFG_SUBLIST;
-	    *pcline= clist;
-	    pcline= &clist->next;
-	    if (c != '}') parse_err();
-	    nextc();
-	} else {
-	    *pcline= read_word();
-	    pcline= &(*pcline)->next;
-	}
-    }
-    return cline;
-}
-
-static config_t *read_list(void)
-/* Read and return a list of config file commands. */
-{
-    config_t *clist, **pclist, *cline;
-
-    clist= nil;
-    pclist= &clist;
-
-    while ((cline= read_line()) != nil) {
-	if (strcmp(cline->word, "include") == 0) {
-	    config_t *file= cline->next;
-	    if (file == nil || file->next != nil || !config_isatom(file)) {
-		fprintf(stderr,
-		    "\"%s\", line %u: 'include' command requires an argument\n",
-		    c_file, cline->line);
-		exit(1);
-	    }
-	    if (file->flags & CFG_ESCAPED) {
-		char *p, *q;
-		p= q= file->word;
-		for (;;) {
-		    if ((*q = *p) == '\\') *q = *++p;
-		    if (*q == 0) break;
-		    p++;
-		    q++;
-		}
-	    }
-	    file= read_file(file->word);
-	    delete_config(cline);
-	    *pclist= file;
-	    while (*pclist != nil) pclist= &(*pclist)->next;
-	} else {
-	    config_t *cfg= allocate(nil, config0size());
-	    cfg->next= nil;
-	    cfg->list= cline;
-	    cfg->file= cline->file;
-	    cfg->line= cline->line;
-	    cfg->flags= CFG_SUBLIST;
-	    *pclist= cfg;
-	    pclist= &cfg->next;
-	}
-    }
-    return clist;
-}
-
-static config_t *read_file(const char *file)
-/* Read and return a configuration file. */
-{
-    configfile_t *cfgf;
-    config_t *cfg;
-    struct stat st;
-    FILE *old_fp;	/* old_* variables store current file context. */
-    char *old_file;
-    unsigned old_line;
-    int old_c;
-    size_t n;
-    char *slash;
-
-    old_fp= c_fp;
-    old_file= c_file;
-    old_line= c_line;
-    old_c= c;
-
-    n= 0;
-    if (file[0] != '/' && old_file != nil
-			&& (slash= strrchr(old_file, '/')) != nil) {
-	n= slash - old_file + 1;
-    }
-    cfgf= allocate(nil, configfilesize(n + strlen(file)));
-    memcpy(cfgf->name, old_file, n);
-    strcpy(cfgf->name + n, file);
-    cfgf->next= c_files;
-    c_files= cfgf;
-
-    c_file= cfgf->name;
-    c_line= 0;
-
-    if ((c_fp= fopen(file, "r")) == nil || fstat(fileno(c_fp), &st) < 0) {
-	if (errno != ENOENT) {
-	    fprintf(stderr, "\"%s\", line 1: %s\n", file, strerror(errno));
-	    exit(1);
-	}
-	cfgf->ctime= -1;
-	c= EOF;
-    } else {
-	cfgf->ctime= st.st_ctime;
-	c= '\n';
-    }
-
-    cfg= read_list();
-    if (c != EOF) parse_err();
-
-    if (c_fp != nil) fclose(c_fp);
-    c_fp= old_fp;
-    c_file= old_file;
-    c_line= old_line;
-    c= old_c;
-    return cfg;
-}
-
-config_t *config_read(const char *file, int flags, config_t *cfg)
-/* Read and parse a configuration file. */
-{
-    if (cfg != nil) {
-	/* First check if any of the involved files has changed. */
-	firstconfig_t *fcfg;
-	configfile_t *cfgf;
-	struct stat st;
-
-	fcfg= cfg2fcfg(cfg);
-	for (cfgf= fcfg->filelist; cfgf != nil; cfgf= cfgf->next) {
-	    if (stat(cfgf->name, &st) < 0) {
-		if (errno != ENOENT) break;
-		st.st_ctime= -1;
-	    }
-	    if (st.st_ctime != cfgf->ctime) break;
-	}
-
-	if (cfgf == nil) return cfg;	/* Everything as it was. */
-	config_delete(cfg);		/* Otherwise delete and reread. */
-    }
-
-    errno= 0;
-    c_files= nil;
-    c_flags= flags;
-    cfg= read_file(file);
-
-    if (cfg != nil) {
-	/* Change first word to have a hidden pointer to a file list. */
-	size_t len= strlen(cfg->word);
-	firstconfig_t *fcfg;
-
-	fcfg= allocate(cfg, firstconfigsize(len));
-	memmove(&fcfg->config1, fcfg, configsize(len));
-	fcfg->filelist= c_files;
-	fcfg->new= 1;
-	return fcfg2cfg(fcfg);
-    }
-    /* Couldn't read (errno != 0) of nothing read (errno == 0). */
-    delete_filelist(c_files);
-    delete_config(cfg);
-    return nil;
-}
-
-int config_renewed(config_t *cfg)
-{
-    int new;
-
-    if (cfg == nil) {
-	new= 1;
-    } else {
-	new= cfg2fcfg(cfg)->new;
-	cfg2fcfg(cfg)->new= 0;
-    }
-    return new;
-}
-
-size_t config_length(config_t *cfg)
-/* Count the number of items on a list. */
-{
-    size_t n= 0;
-
-    while (cfg != nil) {
-	n++;
-	cfg= cfg->next;
-    }
-    return n;
-}
-
-#if TEST
-#include <unistd.h>
-
-static void print_list(int indent, config_t *cfg);
-
-static void print_words(int indent, config_t *cfg)
-{
-    while (cfg != nil) {
-	if (config_isatom(cfg)) {
-	    if (config_isstring(cfg)) fputc('"', stdout);
-	    printf("%s", cfg->word);
-	    if (config_isstring(cfg)) fputc('"', stdout);
-	} else {
-	    printf("{\n");
-	    print_list(indent+4, cfg->list);
-	    printf("%*s}", indent, "");
-	}
-	cfg= cfg->next;
-	if (cfg != nil) fputc(' ', stdout);
-    }
-    printf(";\n");
-}
-
-static void print_list(int indent, config_t *cfg)
-{
-    while (cfg != nil) {
-	if (!config_issub(cfg)) {
-	    fprintf(stderr, "Cell at \"%s\", line %u is not a sublist\n");
-	    break;
-	}
-	printf("%*s", indent, "");
-	print_words(indent, cfg->list);
-	cfg= cfg->next;
-    }
-}
-
-static void print_config(config_t *cfg)
-{
-    if (!config_renewed(cfg)) {
-	printf("# Config didn't change\n");
-    } else {
-	print_list(0, cfg);
-    }
-}
-
-int main(int argc, char **argv)
-{
-    config_t *cfg;
-    int c;
-
-    if (argc != 2) {
-	fprintf(stderr, "One config file name please\n");
-	exit(1);
-    }
-
-    cfg= nil;
-    do {
-	cfg= config_read(argv[1], CFG_ESCAPED, cfg);
-	print_config(cfg);
-	if (!isatty(0)) break;
-	while ((c= getchar()) != EOF && c != '\n') {}
-    } while (c != EOF);
-    return 0;
-}
-#endif /* TEST */
Index: trunk/minix/lib/other/crypt.c
===================================================================
--- trunk/minix/lib/other/crypt.c	(revision 9)
+++ 	(revision )
@@ -1,115 +1,0 @@
-/*	crypt() - one-way password encryption function	Author: Kees J. Bot
- *								7 Feb 1994
- * This routine does not encrypt anything, it uses the pwdauth
- * program to do the hard work.
- */
-#define nil ((void*)0)
-#define pipe _pipe
-#define fork _fork
-#define close _close
-#define dup2 _dup2
-#define execl _execl
-#define read _read
-#define _exit __exit
-#define write _write
-#define waitpid _waitpid
-#include <sys/types.h>
-#include <unistd.h>
-#include <string.h>
-#include <stdio.h>
-#include <errno.h>
-#include <stdarg.h>
-#include <sys/wait.h>
-
-/* Set-uid root program to read /etc/shadow or encrypt passwords. */
-static char PWDAUTH[] = "/usr/lib/pwdauth";
-#define LEN	1024
-
-static void tell(const char *s0, ...)
-{
-	va_list ap;
-	const char *s;
-
-	va_start(ap, s0);
-	s= s0;
-	while (s != nil) {
-		(void) write(2, s, strlen(s));
-		s= va_arg(ap, const char *);
-	}
-	va_end(ap);
-}
-
-char *crypt(const char *key, const char *salt)
-{
-	pid_t pid;
-	int status;
-	int pfd[2];
-	static char pwdata[LEN];
-	char *p= pwdata;
-	const char *k= key;
-	const char *s= salt;
-	int n;
-
-	/* Fill pwdata[] with the key and salt. */
-	while ((*p++ = *k++) != 0) if (p == pwdata+LEN-1) goto fail;
-	while ((*p++ = *s++) != 0) if (p == pwdata+LEN-0) goto fail;
-
-	if (pipe(pfd) < 0) goto fail;
-
-	/* Prefill the pipe. */
-	(void) write(pfd[1], pwdata, p - pwdata);
-
-	switch ((pid= fork())) {
-	case -1:
-		close(pfd[0]);
-		close(pfd[1]);
-		goto fail;
-	case 0:
-		/* Connect both input and output to the pipe. */
-		if (pfd[0] != 0) {
-			dup2(pfd[0], 0);
-			close(pfd[0]);
-		}
-		if (pfd[1] != 1) {
-			dup2(pfd[1], 1);
-			close(pfd[1]);
-		}
-
-		execl(PWDAUTH, PWDAUTH, (char *) nil);
-
-		tell("crypt(): ", PWDAUTH, ": ", strerror(errno), "\r\n",
-								(char *) nil);
-		/* No pwdauth?  Fail! */
-		(void) read(0, pwdata, LEN);
-		_exit(1);
-	}
-	close(pfd[1]);
-
-	status= -1;
-	while (waitpid(pid, &status, 0) == -1 && errno == EINTR) {}
-	if (status != 0) {
-		close(pfd[0]);
-		goto fail;
-	}
-
-	/* Read and return the result.  Check if it contains exactly one
-	 * string.
-	 */
-	n= read(pfd[0], pwdata, LEN);
-	close(pfd[0]);
-	if (n < 0) goto fail;
-	p = pwdata + n;
-	n = 0;
-	while (p > pwdata) if (*--p == 0) n++;
-	if (n != 1) goto fail;
-	return pwdata;
-
-fail:
-	pwdata[0] = salt[0] ^ 1;		/* make result != salt */
-	pwdata[1] = 0;
-	return pwdata;
-}
-
-/*
- * $PchId: crypt.c,v 1.5 1996/04/11 07:46:11 philip Exp $
- */
Index: trunk/minix/lib/other/ctermid.c
===================================================================
--- trunk/minix/lib/other/ctermid.c	(revision 9)
+++ 	(revision )
@@ -1,32 +1,0 @@
-/*  ctermid(3)
- *
- *  Author: Terrence Holm          Aug. 1988
- *
- *
- *  Ctermid(3) returns a pointer to a string naming the controlling
- *  terminal. If <name_space> is NULL then local PRIVATE storage
- *  is used, otherwise <name_space> must point to storage of at
- *  least L_ctermid characters.
- *
- *  Returns a pointer to "/dev/tty".
- */
-
-#include <lib.h>
-#include <string.h>
-#include <stdio.h>
-
-_PROTOTYPE( char *ctermid, (char *name_space));
-
-#ifndef L_ctermid
-#define L_ctermid  9
-#endif
-
-char *ctermid(name_space)
-char *name_space;
-{
-  PRIVATE char termid[L_ctermid];
-
-  if (name_space == (char *)NULL) name_space = termid;
-  strcpy(name_space, "/dev/tty");
-  return(name_space);
-}
Index: trunk/minix/lib/other/cuserid.c
===================================================================
--- trunk/minix/lib/other/cuserid.c	(revision 9)
+++ 	(revision )
@@ -1,33 +1,0 @@
-/*  cuserid(3)
- *
- *  Author: Terrence W. Holm          Sept. 1987
- */
-
-#include <lib.h>
-#include <pwd.h>
-#include <string.h>
-#include <unistd.h>
-#include <stdio.h>
-
-#ifndef  L_cuserid
-#define  L_cuserid   9
-#endif
-
-char *cuserid(user_name)
-char *user_name;
-{
-  PRIVATE char userid[L_cuserid];
-  struct passwd *pw_entry;
-
-  if (user_name == (char *)NULL) user_name = userid;
-
-  pw_entry = getpwuid(geteuid());
-
-  if (pw_entry == (struct passwd *)NULL) {
-	*user_name = '\0';
-	return((char *)NULL);
-  }
-  strcpy(user_name, pw_entry->pw_name);
-
-  return(user_name);
-}
Index: trunk/minix/lib/other/environ.c
===================================================================
--- trunk/minix/lib/other/environ.c	(revision 9)
+++ 	(revision )
@@ -1,20 +1,0 @@
-/*
- * environ.c - define the variable environ
- */
-/* $Header: /cvsup/minix/src/lib/other/environ.c,v 1.1.1.1 2005/04/21 14:56:26 beng Exp $ */
-/*
- * This file defines the variable environ and initializes it with a magic
- * value.  The C run-time start-off routine tests whether the variable
- * environ is initialized with this value.  If it is not, it is assumed
- * that it is defined by the user.  Only two bytes are tested, since we
- * don't know the endian-ness and alignment restrictions of the machine.
- * This means that the low-order two-bytes should be equal to the
- * high-order two-bytes on machines with four-byte pointers.  In fact, all
- * the bytes in the pointer are the same, just in case.
- */
-
-#if _EM_PSIZE==2
-char **environ = (char **) 0x5353;
-#else
-char **environ = (char **) 0x53535353;
-#endif
Index: trunk/minix/lib/other/errno.c
===================================================================
--- trunk/minix/lib/other/errno.c	(revision 9)
+++ 	(revision )
@@ -1,4 +1,0 @@
-#include <lib.h>
-/* errno.c - declare variable errno             Author: F. Meulenbroeks */
-
-int errno = 0;
Index: trunk/minix/lib/other/fdopen.c
===================================================================
--- trunk/minix/lib/other/fdopen.c	(revision 9)
+++ 	(revision )
@@ -1,73 +1,0 @@
-/*
- * fdopen - convert a (UNIX) file descriptor into a FILE pointer
- */
-/* $Header: /cvsup/minix/src/lib/other/fdopen.c,v 1.2 2005/09/06 10:15:57 beng Exp $ */
-
-#include	<stdlib.h>
-#include	"../stdio/loc_incl.h"
-#include	<stdio.h>
-#include	<sys/stat.h>
-
-FILE *
-fdopen(fd, mode)
-int fd;
-_CONST char *mode;
-{
-	register int i;
-	struct stat st;
-	FILE *stream;
-	int flags = 0;
-
-	if (fd < 0) return (FILE *)NULL;
-	for (i = 0; __iotab[i] != 0 ; i++) 
-		if (i >= FOPEN_MAX-1)
-			return (FILE *)NULL;
-
-	switch(*mode++) {
-	case 'r':
-		flags |= _IOREAD | _IOREADING;
-		break;
-	case 'a':
-		flags |= _IOAPPEND;
-	case 'w':
-		flags |= _IOWRITE | _IOWRITING;
-		break;
-	default:
-		return (FILE *)NULL;
-	}
-	while(*mode) {
-		switch(*mode++) {
-		case 'b':
-			continue;
-		case '+':
-			flags |= _IOREAD | _IOWRITE;
-			continue;
-		/* The sequence may be followed by aditional characters */
-		default:
-			break;
-		}
-		break;
-	}
-
-	if ( fstat( fd, &st ) < 0 ) {
-		return (FILE *)NULL;
-	}
-	
-	if ( st.st_mode & S_IFIFO ) {
-		flags |= _IOFIFO;
-	}
-	
-	if ((stream = (FILE *) malloc(sizeof(FILE))) == NULL) {
-		return (FILE *)NULL;
-	}
-
-	if ((flags & _IOREAD) && (flags & _IOWRITE))
-		flags &= ~(_IOREADING | _IOWRITING);
-
-	stream->_count = 0;
-	stream->_fd = fd;
-	stream->_flags = flags;
-	stream->_buf = NULL;
-	__iotab[i] = stream;
-	return stream;
-}
Index: trunk/minix/lib/other/ffs.c
===================================================================
--- trunk/minix/lib/other/ffs.c	(revision 9)
+++ 	(revision )
@@ -1,17 +1,0 @@
-#include <lib.h>
-/*  ffs(3)
- *
- *  Author: Terrence W. Holm          Sep. 1988
- */
-_PROTOTYPE( int ffs, (int word));
-
-int ffs(word)
-int word;
-{
-  int i;
-
-  if (word == 0) return(0);
-
-  for (i = 1;; ++i, word >>= 1)
-	if (word & 1) return(i);
-}
Index: trunk/minix/lib/other/flock.c
===================================================================
--- trunk/minix/lib/other/flock.c	(revision 9)
+++ 	(revision )
@@ -1,32 +1,0 @@
-
-/* Library routines
- *
- * Porting to Minix 2.0.0
- * Author:	Giovanni Falzoni <gfalzoni@pointest.com>
- *
- * $Id: flock.c,v 1.1 2005/10/31 14:31:05 beng Exp $
- */
-#include <sys/types.h>
-#include <fcntl.h>
-#include <string.h>
-#include <errno.h>
-#include <unistd.h>
-
-/*
- *	Name:		int flock(int fd, int mode);
- *	Function:	Implements the flock function in Minix.
- */
-int flock(int fd, int mode)
-{
-  struct flock lck;
-  register int retcode;
-
-  memset((void *) &lck, 0, sizeof(struct flock));
-  lck.l_type = mode & ~LOCK_NB;
-  lck.l_pid = getpid();
-  if ((retcode = fcntl(fd, mode & LOCK_NB ? F_SETLK : F_SETLKW, &lck)) < 0 && errno == EAGAIN)
-	errno = EWOULDBLOCK;
-  return retcode;
-}
-
-/** flock.c **/
Index: trunk/minix/lib/other/fslib.c
===================================================================
--- trunk/minix/lib/other/fslib.c	(revision 9)
+++ 	(revision )
@@ -1,191 +1,0 @@
-/* fslib.c - routines needed by fs and fs utilities */
-
-#include <minix/config.h>	/* for unused stuff in <minix/type.h> :-( */
-#include <ansi.h>
-#include <limits.h>
-#include <dirent.h>
-#include <sys/types.h>
-#include <minix/const.h>
-#include <minix/type.h>		/* for unshort :-( */
-#include "fs/const.h"		/* depends of -I flag in Makefile */
-#include "fs/type.h"		/* ditto */
-#include "fs/inode.h"		/* ditto */
-#include "fs/super.h"
-#include <minix/fslib.h>
-
-/* The next routine is copied from fsck.c and mkfs.c...  (Re)define some
- * things for consistency.  Some things should be done better.
- */
-
-/* Convert from bit count to a block count. The usual expression
- *
- *	(nr_bits + (1 << BITMAPSHIFT) - 1) >> BITMAPSHIFT
- *
- * doesn't work because of overflow.
- *
- * Other overflow bugs, such as the expression for N_ILIST overflowing when
- * s_inodes is just over V*_INODES_PER_BLOCK less than the maximum+1, are not
- * fixed yet, because that number of inodes is silly.
- */
-/* The above comment doesn't all apply now bit_t is long.  Overflow is now
- * unlikely, but negative bit counts are now possible (though unlikely)
- * and give silly results.
- */ 
-PUBLIC int bitmapsize(nr_bits, block_size)
-bit_t nr_bits;
-int block_size;
-{
-  int nr_blocks;
-
-  nr_blocks = (int) (nr_bits / FS_BITS_PER_BLOCK(block_size));
-  if (((bit_t) nr_blocks * FS_BITS_PER_BLOCK(block_size)) < nr_bits) ++nr_blocks;
-  return(nr_blocks);
-}
-
-
-/*===========================================================================*
- *				conv2					     *
- *===========================================================================*/
-PUBLIC unsigned conv2(norm, w)
-int norm;			/* TRUE if no swap, FALSE for byte swap */
-int w;				/* promotion of 16-bit word to be swapped */
-{
-/* Possibly swap a 16-bit word between 8086 and 68000 byte order. */
-
-  if (norm) return( (unsigned) w & 0xFFFF);
-  return( ((w&BYTE) << 8) | ( (w>>8) & BYTE));
-}
-
-
-/*===========================================================================*
- *				conv4					     *
- *===========================================================================*/
-PUBLIC long conv4(norm, x)
-int norm;			/* TRUE if no swap, FALSE for byte swap */
-long x;				/* 32-bit long to be byte swapped */
-{
-/* Possibly swap a 32-bit long between 8086 and 68000 byte order. */
-
-  unsigned lo, hi;
-  long l;
-  
-  if (norm) return(x);			/* byte order was already ok */
-  lo = conv2(FALSE, (int) x & 0xFFFF);	/* low-order half, byte swapped */
-  hi = conv2(FALSE, (int) (x>>16) & 0xFFFF);	/* high-order half, swapped */
-  l = ( (long) lo <<16) | hi;
-  return(l);
-}
-
-
-/*===========================================================================*
- *				conv_inode				     *
- *===========================================================================*/
-PUBLIC void conv_inode(rip, dip, dip2, rw_flag, magic)
-register struct inode *rip;	/* pointer to the in-core inode struct */
-register d1_inode *dip;		/* pointer to the V1 on-disk inode struct */
-register d2_inode *dip2;	/* pointer to the V2 on-disk inode struct */
-int rw_flag;			/* READING or WRITING */
-int magic;			/* magic number of file system */
-{ 
-/* Copy the inode from the disk block to the in-core table or vice versa.
- * If the fourth parameter below is FALSE, the bytes are swapped.
- */
-  switch (magic) {
-	case SUPER_MAGIC:	old_icopy(rip, dip,  rw_flag, TRUE);	break;
-	case SUPER_REV:		old_icopy(rip, dip,  rw_flag, FALSE);	break;
-	case SUPER_V3:
-	case SUPER_V2:		new_icopy(rip, dip2, rw_flag, TRUE);	break;
-	case SUPER_V2_REV:	new_icopy(rip, dip2, rw_flag, FALSE);	break;
-  } 
-}
-
-
-/*===========================================================================*
- *				old_icopy				     *
- *===========================================================================*/
-PUBLIC void old_icopy(rip, dip, direction, norm)
-register struct inode *rip;	/* pointer to the in-core inode struct */
-register d1_inode *dip;		/* pointer to the d1_inode inode struct */
-int direction;			/* READING (from disk) or WRITING (to disk) */
-int norm;			/* TRUE = do not swap bytes; FALSE = swap */
-
-{
-/* 4 different on-disk inode layouts are supported, one for each combination
- * of V1.x/V2.x * bytes-swapped/not-swapped.  When an inode is read or written
- * this routine handles the conversions so that the information in the inode
- * table is independent of the disk structure from which the inode came.
- * The old_icopy routine copies to and from V1 disks.
- */
-
-  int i;
-
-  if (direction == READING) {
-	/* Copy V1.x inode to the in-core table, swapping bytes if need be. */
-	rip->i_mode    = conv2(norm, dip->d1_mode);
-	rip->i_uid     = conv2(norm,dip->d1_uid );
-	rip->i_size    = conv4(norm,dip->d1_size);
-	rip->i_mtime   = conv4(norm,dip->d1_mtime);
-	rip->i_atime   = 0;
-	rip->i_ctime   = 0;
-	rip->i_nlinks  = (nlink_t) dip->d1_nlinks;	/* 1 char */
-	rip->i_gid     = (gid_t) dip->d1_gid;		/* 1 char */
-	rip->i_ndzones = V1_NR_DZONES;
-	rip->i_nindirs = V1_INDIRECTS;
-	for (i = 0; i < V1_NR_TZONES; i++)
-		rip->i_zone[i] = conv2(norm, (int) dip->d1_zone[i]);
-  } else {
-	/* Copying V1.x inode to disk from the in-core table. */
-	dip->d1_mode   = conv2(norm,rip->i_mode);
-	dip->d1_uid    = conv2(norm,rip->i_uid );
-	dip->d1_size   = conv4(norm,rip->i_size);
-	dip->d1_mtime  = conv4(norm,rip->i_mtime);
-	dip->d1_nlinks = (nlink_t) rip->i_nlinks;	/* 1 char */
-	dip->d1_gid    = (gid_t) rip->i_gid;		/* 1 char */
-	for (i = 0; i < V1_NR_TZONES; i++)
-		dip->d1_zone[i] = conv2(norm, (int) rip->i_zone[i]);
-  }
-}
-
-
-/*===========================================================================*
- *				new_icopy				     *
- *===========================================================================*/
-PUBLIC void new_icopy(rip, dip, direction, norm)
-register struct inode *rip;	/* pointer to the in-core inode struct */
-register d2_inode *dip;	/* pointer to the d2_inode struct */
-int direction;			/* READING (from disk) or WRITING (to disk) */
-int norm;			/* TRUE = do not swap bytes; FALSE = swap */
-
-{
-/* Same as old_icopy, but to/from V2 disk layout. */
-
-  int i;
-
-  if (direction == READING) {
-	/* Copy V2.x inode to the in-core table, swapping bytes if need be. */
-	rip->i_mode    = conv2(norm,dip->d2_mode);
-	rip->i_uid     = conv2(norm,dip->d2_uid );
-	rip->i_nlinks  = conv2(norm,(int) dip->d2_nlinks);
-	rip->i_gid     = conv2(norm,(int) dip->d2_gid );
-	rip->i_size    = conv4(norm,dip->d2_size);
-	rip->i_atime   = conv4(norm,dip->d2_atime);
-	rip->i_ctime   = conv4(norm,dip->d2_ctime);
-	rip->i_mtime   = conv4(norm,dip->d2_mtime);
-	rip->i_ndzones = V2_NR_DZONES;
-	rip->i_nindirs = V2_INDIRECTS(rip->i_sp->s_block_size);
-	for (i = 0; i < V2_NR_TZONES; i++)
-		rip->i_zone[i] = conv4(norm, (long) dip->d2_zone[i]);
-  } else {
-	/* Copying V2.x inode to disk from the in-core table. */
-	dip->d2_mode   = conv2(norm,rip->i_mode);
-	dip->d2_uid    = conv2(norm,rip->i_uid );
-	dip->d2_nlinks = conv2(norm,rip->i_nlinks);
-	dip->d2_gid    = conv2(norm,rip->i_gid );
-	dip->d2_size   = conv4(norm,rip->i_size);
-	dip->d2_atime  = conv4(norm,rip->i_atime);
-	dip->d2_ctime  = conv4(norm,rip->i_ctime);
-	dip->d2_mtime  = conv4(norm,rip->i_mtime);
-	for (i = 0; i < V2_NR_TZONES; i++)
-		dip->d2_zone[i] = conv4(norm, (long) rip->i_zone[i]);
-  }
-}
Index: trunk/minix/lib/other/fsversion.c
===================================================================
--- trunk/minix/lib/other/fsversion.c	(revision 9)
+++ 	(revision )
@@ -1,52 +1,0 @@
-/* This procedure examines a file system and figures out whether it is
- * version 1 or version 2.  It returns the result as an int.  If the
- * file system is neither, it returns -1.  A typical call is:
- *
- *	n = fsversion("/dev/hd1", "df");
- *
- * The first argument is the special file for the file system. 
- * The second is the program name, which is used in error messages.
- */
-
-#include <sys/types.h>
-#include <minix/config.h>
-#include <minix/const.h>
-#include <minix/minlib.h>
-#include <minix/type.h>
-#include <fcntl.h>
-#include <unistd.h>
-#include <stdio.h>
-
-#include "fs/const.h"
-#include "fs/type.h"
-#include "fs/super.h"
-
-static struct super_block super, *sp;
-
-int fsversion(dev, prog)
-char *dev, *prog;
-{
-  int fd;
-
-  if ((fd = open(dev, O_RDONLY)) < 0) {
-	std_err(prog);
-	std_err(" cannot open ");
-	perror(dev);
-	return(-1);
-  }
-
-  lseek(fd, (off_t) SUPER_BLOCK_BYTES, SEEK_SET);	/* skip boot block */
-  if (read(fd, (char *) &super, (unsigned) SUPER_SIZE) != SUPER_SIZE) {
-	std_err(prog);
-	std_err(" cannot read super block on ");
-	perror(dev);
-	close(fd);
-	return(-1);
-  }
-  close(fd);
-  sp = &super;
-  if (sp->s_magic == SUPER_MAGIC) return(1);
-  if (sp->s_magic == SUPER_V2) return(2);
-  if (sp->s_magic == SUPER_V3) return(3);
-  return(-1);
-}
Index: trunk/minix/lib/other/fts.c
===================================================================
--- trunk/minix/lib/other/fts.c	(revision 9)
+++ 	(revision )
@@ -1,1217 +1,0 @@
-/*-
- * Copyright (c) 1990, 1993, 1994
- *	The Regents of the University of California.  All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- *    must display the following acknowledgement:
- *	This product includes software developed by the University of
- *	California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- *    may be used to endorse or promote products derived from this software
- *    without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * $OpenBSD: fts.c,v 1.22 1999/10/03 19:22:22 millert Exp $
- */
-
-#if 0
-#if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)fts.c	8.6 (Berkeley) 8/14/94";
-#endif /* LIBC_SCCS and not lint */
-#endif
-
-#define MAX(a, b)   ((a) > (b) ? (a) : (b))
-#define MIN(a, b)   ((a) < (b) ? (a) : (b))
-
-
-#define _POSIX_SOURCE 1
-#define _MINIX 1
-
-#include "namespace.h"
-#include <sys/param.h>
-#include <sys/stat.h>
-
-#include <dirent.h>
-#include <limits.h>
-#include <errno.h>
-#include <fcntl.h>
-#include <fts.h>
-#include <stdlib.h>
-#include <string.h>
-#include <unistd.h>
-#include "un-namespace.h"
-
-static FTSENT	*fts_alloc(FTS *, char *, int);
-static FTSENT	*fts_build(FTS *, int);
-static void	 fts_lfree(FTSENT *);
-static void	 fts_load(FTS *, FTSENT *);
-static size_t	 fts_maxarglen(char * const *);
-static void	 fts_padjust(FTS *, FTSENT *);
-static int	 fts_palloc(FTS *, size_t);
-static FTSENT	*fts_sort(FTS *, FTSENT *, int);
-static u_short	 fts_stat(FTS *, FTSENT *, int);
-static int	 fts_safe_changedir(FTS *, FTSENT *, int, char *);
-static int	 fts_ufslinks(FTS *, const FTSENT *);
-
-#define	ISDOT(a)	(a[0] == '.' && (!a[1] || (a[1] == '.' && !a[2])))
-
-#define	CLR(opt)	(sp->fts_options &= ~(opt))
-#define	ISSET(opt)	(sp->fts_options & (opt))
-#define	SET(opt)	(sp->fts_options |= (opt))
-
-#define	FCHDIR(sp, fd)	(!ISSET(FTS_NOCHDIR) && fchdir(fd))
-
-/* fts_build flags */
-#define	BCHILD		1		/* fts_children */
-#define	BNAMES		2		/* fts_children, names only */
-#define	BREAD		3		/* fts_read */
-
-/*
- * Internal representation of an FTS, including extra implementation
- * details.  The FTS returned from fts_open points to this structure's
- * ftsp_fts member (and can be cast to an _fts_private as required)
- */
-struct _fts_private {
-	FTS		ftsp_fts;
-	dev_t		ftsp_dev;
-	int		ftsp_linksreliable;
-};
-
-/*
- * The "FTS_NOSTAT" option can avoid a lot of calls to stat(2) if it
- * knows that a directory could not possibly have subdirectories.  This
- * is decided by looking at the link count: a subdirectory would
- * increment its parent's link count by virtue of its own ".." entry.
- * This assumption only holds for UFS-like filesystems that implement
- * links and directories this way, so we must punt for others.
- */
-
-static const char *ufslike_filesystems[] = {
-	"ufs",
-	"nfs",
-	"nfs4",
-	"ext2fs",
-	0
-};
-
-static void *reallocf(void *ptr, size_t size)
-{
-	void *p;
-	if((p = realloc(ptr, size))) return p;
-	if(ptr) free(ptr);
-	return NULL;
-}
-
-FTS *
-fts_open(argv, options, compar)
-	char * const *argv;
-	int options;
-	int (*compar)(const FTSENT * const *, const FTSENT * const *);
-{
-	struct _fts_private *priv;
-	FTS *sp;
-	FTSENT *p, *root;
-	int nitems;
-	FTSENT *parent, *tmp;
-	int len;
-
-	/* Options check. */
-	if (options & ~FTS_OPTIONMASK) {
-		errno = EINVAL;
-		return (NULL);
-	}
-
-	/* Allocate/initialize the stream. */
-	if ((priv = malloc(sizeof(*priv))) == NULL)
-		return (NULL);
-	memset(priv, 0, sizeof(*priv));
-	sp = &priv->ftsp_fts;
-	sp->fts_compar = compar;
-	sp->fts_options = options;
-
-	/* Shush, GCC. */
-	tmp = NULL;
-
-	/* Logical walks turn on NOCHDIR; symbolic links are too hard. */
-	if (ISSET(FTS_LOGICAL))
-		SET(FTS_NOCHDIR);
-
-	/*
-	 * Start out with 1K of path space, and enough, in any case,
-	 * to hold the user's paths.
-	 */
-	if (fts_palloc(sp, MAX(fts_maxarglen(argv), PATH_MAX)))
-		goto mem1;
-
-	/* Allocate/initialize root's parent. */
-	if ((parent = fts_alloc(sp, "", 0)) == NULL)
-		goto mem2;
-	parent->fts_level = FTS_ROOTPARENTLEVEL;
-
-	/* Allocate/initialize root(s). */
-	for (root = NULL, nitems = 0; *argv != NULL; ++argv, ++nitems) {
-		/* Don't allow zero-length paths. */
-		if ((len = strlen(*argv)) == 0) {
-			errno = ENOENT;
-			goto mem3;
-		}
-
-		p = fts_alloc(sp, *argv, len);
-		p->fts_level = FTS_ROOTLEVEL;
-		p->fts_parent = parent;
-		p->fts_accpath = p->fts_name;
-		p->fts_info = fts_stat(sp, p, ISSET(FTS_COMFOLLOW));
-
-		/* Command-line "." and ".." are real directories. */
-		if (p->fts_info == FTS_DOT)
-			p->fts_info = FTS_D;
-
-		/*
-		 * If comparison routine supplied, traverse in sorted
-		 * order; otherwise traverse in the order specified.
-		 */
-		if (compar) {
-			p->fts_link = root;
-			root = p;
-		} else {
-			p->fts_link = NULL;
-			if (root == NULL)
-				tmp = root = p;
-			else {
-				tmp->fts_link = p;
-				tmp = p;
-			}
-		}
-	}
-	if (compar && nitems > 1)
-		root = fts_sort(sp, root, nitems);
-
-	/*
-	 * Allocate a dummy pointer and make fts_read think that we've just
-	 * finished the node before the root(s); set p->fts_info to FTS_INIT
-	 * so that everything about the "current" node is ignored.
-	 */
-	if ((sp->fts_cur = fts_alloc(sp, "", 0)) == NULL)
-		goto mem3;
-	sp->fts_cur->fts_link = root;
-	sp->fts_cur->fts_info = FTS_INIT;
-
-	/*
-	 * If using chdir(2), grab a file descriptor pointing to dot to ensure
-	 * that we can get back here; this could be avoided for some paths,
-	 * but almost certainly not worth the effort.  Slashes, symbolic links,
-	 * and ".." are all fairly nasty problems.  Note, if we can't get the
-	 * descriptor we run anyway, just more slowly.
-	 */
-	if (!ISSET(FTS_NOCHDIR) && (sp->fts_rfd = _open(".", O_RDONLY, 0)) < 0)
-		SET(FTS_NOCHDIR);
-
-	return (sp);
-
-mem3:	fts_lfree(root);
-	free(parent);
-mem2:	free(sp->fts_path);
-mem1:	free(sp);
-	return (NULL);
-}
-
-static void
-fts_load(sp, p)
-	FTS *sp;
-	FTSENT *p;
-{
-	int len;
-	char *cp;
-
-	/*
-	 * Load the stream structure for the next traversal.  Since we don't
-	 * actually enter the directory until after the preorder visit, set
-	 * the fts_accpath field specially so the chdir gets done to the right
-	 * place and the user can access the first node.  From fts_open it's
-	 * known that the path will fit.
-	 */
-	len = p->fts_pathlen = p->fts_namelen;
-	memmove(sp->fts_path, p->fts_name, len + 1);
-	if ((cp = strrchr(p->fts_name, '/')) && (cp != p->fts_name || cp[1])) {
-		len = strlen(++cp);
-		memmove(p->fts_name, cp, len + 1);
-		p->fts_namelen = len;
-	}
-	p->fts_accpath = p->fts_path = sp->fts_path;
-	sp->fts_dev = p->fts_dev;
-}
-
-int
-fts_close(sp)
-	FTS *sp;
-{
-	FTSENT *freep, *p;
-	int saved_errno;
-
-	/*
-	 * This still works if we haven't read anything -- the dummy structure
-	 * points to the root list, so we step through to the end of the root
-	 * list which has a valid parent pointer.
-	 */
-	if (sp->fts_cur) {
-		for (p = sp->fts_cur; p->fts_level >= FTS_ROOTLEVEL;) {
-			freep = p;
-			p = p->fts_link != NULL ? p->fts_link : p->fts_parent;
-			free(freep);
-		}
-		free(p);
-	}
-
-	/* Free up child linked list, sort array, path buffer. */
-	if (sp->fts_child)
-		fts_lfree(sp->fts_child);
-	if (sp->fts_array)
-		free(sp->fts_array);
-	free(sp->fts_path);
-
-	/* Return to original directory, save errno if necessary. */
-	if (!ISSET(FTS_NOCHDIR)) {
-		saved_errno = fchdir(sp->fts_rfd) ? errno : 0;
-		(void)_close(sp->fts_rfd);
-
-		/* Set errno and return. */
-		if (saved_errno != 0) {
-			/* Free up the stream pointer. */
-			free(sp);
-			errno = saved_errno;
-			return (-1);
-		}
-	}
-
-	/* Free up the stream pointer. */
-	free(sp);
-	return (0);
-}
-
-/*
- * Special case of "/" at the end of the path so that slashes aren't
- * appended which would cause paths to be written as "....//foo".
- */
-#define	NAPPEND(p)							\
-	(p->fts_path[p->fts_pathlen - 1] == '/'				\
-	    ? p->fts_pathlen - 1 : p->fts_pathlen)
-
-FTSENT *
-fts_read(sp)
-	FTS *sp;
-{
-	FTSENT *p, *tmp;
-	int instr;
-	char *t;
-	int saved_errno;
-
-	/* If finished or unrecoverable error, return NULL. */
-	if (sp->fts_cur == NULL || ISSET(FTS_STOP))
-		return (NULL);
-
-	/* Set current node pointer. */
-	p = sp->fts_cur;
-
-	/* Save and zero out user instructions. */
-	instr = p->fts_instr;
-	p->fts_instr = FTS_NOINSTR;
-
-	/* Any type of file may be re-visited; re-stat and re-turn. */
-	if (instr == FTS_AGAIN) {
-		p->fts_info = fts_stat(sp, p, 0);
-		return (p);
-	}
-
-	/*
-	 * Following a symlink -- SLNONE test allows application to see
-	 * SLNONE and recover.  If indirecting through a symlink, have
-	 * keep a pointer to current location.  If unable to get that
-	 * pointer, follow fails.
-	 */
-	if (instr == FTS_FOLLOW &&
-	    (p->fts_info == FTS_SL || p->fts_info == FTS_SLNONE)) {
-		p->fts_info = fts_stat(sp, p, 1);
-		if (p->fts_info == FTS_D && !ISSET(FTS_NOCHDIR)) {
-			if ((p->fts_symfd = _open(".", O_RDONLY, 0)) < 0) {
-				p->fts_errno = errno;
-				p->fts_info = FTS_ERR;
-			} else
-				p->fts_flags |= FTS_SYMFOLLOW;
-		}
-		return (p);
-	}
-
-	/* Directory in pre-order. */
-	if (p->fts_info == FTS_D) {
-		/* If skipped or crossed mount point, do post-order visit. */
-		if (instr == FTS_SKIP ||
-		    (ISSET(FTS_XDEV) && p->fts_dev != sp->fts_dev)) {
-			if (p->fts_flags & FTS_SYMFOLLOW)
-				(void)_close(p->fts_symfd);
-			if (sp->fts_child) {
-				fts_lfree(sp->fts_child);
-				sp->fts_child = NULL;
-			}
-			p->fts_info = FTS_DP;
-			return (p);
-		}
-
-		/* Rebuild if only read the names and now traversing. */
-		if (sp->fts_child != NULL && ISSET(FTS_NAMEONLY)) {
-			CLR(FTS_NAMEONLY);
-			fts_lfree(sp->fts_child);
-			sp->fts_child = NULL;
-		}
-
-		/*
-		 * Cd to the subdirectory.
-		 *
-		 * If have already read and now fail to chdir, whack the list
-		 * to make the names come out right, and set the parent errno
-		 * so the application will eventually get an error condition.
-		 * Set the FTS_DONTCHDIR flag so that when we logically change
-		 * directories back to the parent we don't do a chdir.
-		 *
-		 * If haven't read do so.  If the read fails, fts_build sets
-		 * FTS_STOP or the fts_info field of the node.
-		 */
-		if (sp->fts_child != NULL) {
-			if (fts_safe_changedir(sp, p, -1, p->fts_accpath)) {
-				p->fts_errno = errno;
-				p->fts_flags |= FTS_DONTCHDIR;
-				for (p = sp->fts_child; p != NULL;
-				    p = p->fts_link)
-					p->fts_accpath =
-					    p->fts_parent->fts_accpath;
-			}
-		} else if ((sp->fts_child = fts_build(sp, BREAD)) == NULL) {
-			if (ISSET(FTS_STOP))
-				return (NULL);
-			return (p);
-		}
-		p = sp->fts_child;
-		sp->fts_child = NULL;
-		goto name;
-	}
-
-	/* Move to the next node on this level. */
-next:	tmp = p;
-	if ((p = p->fts_link) != NULL) {
-		free(tmp);
-
-		/*
-		 * If reached the top, return to the original directory (or
-		 * the root of the tree), and load the paths for the next root.
-		 */
-		if (p->fts_level == FTS_ROOTLEVEL) {
-			if (FCHDIR(sp, sp->fts_rfd)) {
-				SET(FTS_STOP);
-				return (NULL);
-			}
-			fts_load(sp, p);
-			return (sp->fts_cur = p);
-		}
-
-		/*
-		 * User may have called fts_set on the node.  If skipped,
-		 * ignore.  If followed, get a file descriptor so we can
-		 * get back if necessary.
-		 */
-		if (p->fts_instr == FTS_SKIP)
-			goto next;
-		if (p->fts_instr == FTS_FOLLOW) {
-			p->fts_info = fts_stat(sp, p, 1);
-			if (p->fts_info == FTS_D && !ISSET(FTS_NOCHDIR)) {
-				if ((p->fts_symfd =
-				    _open(".", O_RDONLY, 0)) < 0) {
-					p->fts_errno = errno;
-					p->fts_info = FTS_ERR;
-				} else
-					p->fts_flags |= FTS_SYMFOLLOW;
-			}
-			p->fts_instr = FTS_NOINSTR;
-		}
-
-name:		t = sp->fts_path + NAPPEND(p->fts_parent);
-		*t++ = '/';
-		memmove(t, p->fts_name, p->fts_namelen + 1);
-		return (sp->fts_cur = p);
-	}
-
-	/* Move up to the parent node. */
-	p = tmp->fts_parent;
-	free(tmp);
-
-	if (p->fts_level == FTS_ROOTPARENTLEVEL) {
-		/*
-		 * Done; free everything up and set errno to 0 so the user
-		 * can distinguish between error and EOF.
-		 */
-		free(p);
-		errno = 0;
-		return (sp->fts_cur = NULL);
-	}
-
-	/* NUL terminate the pathname. */
-	sp->fts_path[p->fts_pathlen] = '\0';
-
-	/*
-	 * Return to the parent directory.  If at a root node or came through
-	 * a symlink, go back through the file descriptor.  Otherwise, cd up
-	 * one directory.
-	 */
-	if (p->fts_level == FTS_ROOTLEVEL) {
-		if (FCHDIR(sp, sp->fts_rfd)) {
-			SET(FTS_STOP);
-			return (NULL);
-		}
-	} else if (p->fts_flags & FTS_SYMFOLLOW) {
-		if (FCHDIR(sp, p->fts_symfd)) {
-			saved_errno = errno;
-			(void)_close(p->fts_symfd);
-			errno = saved_errno;
-			SET(FTS_STOP);
-			return (NULL);
-		}
-		(void)_close(p->fts_symfd);
-	} else if (!(p->fts_flags & FTS_DONTCHDIR) &&
-	    fts_safe_changedir(sp, p->fts_parent, -1, "..")) {
-		SET(FTS_STOP);
-		return (NULL);
-	}
-	p->fts_info = p->fts_errno ? FTS_ERR : FTS_DP;
-	return (sp->fts_cur = p);
-}
-
-/*
- * Fts_set takes the stream as an argument although it's not used in this
- * implementation; it would be necessary if anyone wanted to add global
- * semantics to fts using fts_set.  An error return is allowed for similar
- * reasons.
- */
-/* ARGSUSED */
-int
-fts_set(sp, p, instr)
-	FTS *sp;
-	FTSENT *p;
-	int instr;
-{
-	if (instr != 0 && instr != FTS_AGAIN && instr != FTS_FOLLOW &&
-	    instr != FTS_NOINSTR && instr != FTS_SKIP) {
-		errno = EINVAL;
-		return (1);
-	}
-	p->fts_instr = instr;
-	return (0);
-}
-
-FTSENT *
-fts_children(sp, instr)
-	FTS *sp;
-	int instr;
-{
-	FTSENT *p;
-	int fd;
-
-	if (instr != 0 && instr != FTS_NAMEONLY) {
-		errno = EINVAL;
-		return (NULL);
-	}
-
-	/* Set current node pointer. */
-	p = sp->fts_cur;
-
-	/*
-	 * Errno set to 0 so user can distinguish empty directory from
-	 * an error.
-	 */
-	errno = 0;
-
-	/* Fatal errors stop here. */
-	if (ISSET(FTS_STOP))
-		return (NULL);
-
-	/* Return logical hierarchy of user's arguments. */
-	if (p->fts_info == FTS_INIT)
-		return (p->fts_link);
-
-	/*
-	 * If not a directory being visited in pre-order, stop here.  Could
-	 * allow FTS_DNR, assuming the user has fixed the problem, but the
-	 * same effect is available with FTS_AGAIN.
-	 */
-	if (p->fts_info != FTS_D /* && p->fts_info != FTS_DNR */)
-		return (NULL);
-
-	/* Free up any previous child list. */
-	if (sp->fts_child != NULL)
-		fts_lfree(sp->fts_child);
-
-	if (instr == FTS_NAMEONLY) {
-		SET(FTS_NAMEONLY);
-		instr = BNAMES;
-	} else
-		instr = BCHILD;
-
-	/*
-	 * If using chdir on a relative path and called BEFORE fts_read does
-	 * its chdir to the root of a traversal, we can lose -- we need to
-	 * chdir into the subdirectory, and we don't know where the current
-	 * directory is, so we can't get back so that the upcoming chdir by
-	 * fts_read will work.
-	 */
-	if (p->fts_level != FTS_ROOTLEVEL || p->fts_accpath[0] == '/' ||
-	    ISSET(FTS_NOCHDIR))
-		return (sp->fts_child = fts_build(sp, instr));
-
-	if ((fd = _open(".", O_RDONLY, 0)) < 0)
-		return (NULL);
-	sp->fts_child = fts_build(sp, instr);
-	if (fchdir(fd))
-		return (NULL);
-	(void)_close(fd);
-	return (sp->fts_child);
-}
-
-#ifndef fts_get_clientptr
-#error "fts_get_clientptr not defined"
-#endif
-
-void *
-(fts_get_clientptr)(FTS *sp)
-{
-
-	return (fts_get_clientptr(sp));
-}
-
-#ifndef fts_get_stream
-#error "fts_get_stream not defined"
-#endif
-
-FTS *
-(fts_get_stream)(FTSENT *p)
-{
-	return (fts_get_stream(p));
-}
-
-void
-fts_set_clientptr(FTS *sp, void *clientptr)
-{
-
-	sp->fts_clientptr = clientptr;
-}
-
-/*
- * This is the tricky part -- do not casually change *anything* in here.  The
- * idea is to build the linked list of entries that are used by fts_children
- * and fts_read.  There are lots of special cases.
- *
- * The real slowdown in walking the tree is the stat calls.  If FTS_NOSTAT is
- * set and it's a physical walk (so that symbolic links can't be directories),
- * we can do things quickly.  First, if it's a 4.4BSD file system, the type
- * of the file is in the directory entry.  Otherwise, we assume that the number
- * of subdirectories in a node is equal to the number of links to the parent.
- * The former skips all stat calls.  The latter skips stat calls in any leaf
- * directories and for any files after the subdirectories in the directory have
- * been found, cutting the stat calls by about 2/3.
- */
-static FTSENT *
-fts_build(sp, type)
-	FTS *sp;
-	int type;
-{
-	struct dirent *dp;
-	FTSENT *p, *head;
-	int nitems;
-	FTSENT *cur, *tail;
-	DIR *dirp;
-	void *oldaddr;
-	size_t dnamlen;
-	int cderrno, descend, len, level, maxlen, nlinks, oflag, saved_errno,
-	    nostat, doadjust;
-	char *cp;
-
-	/* Set current node pointer. */
-	cur = sp->fts_cur;
-
-	/*
-	 * Open the directory for reading.  If this fails, we're done.
-	 * If being called from fts_read, set the fts_info field.
-	 */
-#ifdef FTS_WHITEOUT
-	if (ISSET(FTS_WHITEOUT))
-		oflag = DTF_NODUP | DTF_REWIND;
-	else
-		oflag = DTF_HIDEW | DTF_NODUP | DTF_REWIND;
-#else
-#define __opendir2(path, flag) opendir(path)
-#endif
-	if ((dirp = __opendir2(cur->fts_accpath, oflag)) == NULL) {
-		if (type == BREAD) {
-			cur->fts_info = FTS_DNR;
-			cur->fts_errno = errno;
-		}
-		return (NULL);
-	}
-
-	/*
-	 * Nlinks is the number of possible entries of type directory in the
-	 * directory if we're cheating on stat calls, 0 if we're not doing
-	 * any stat calls at all, -1 if we're doing stats on everything.
-	 */
-	if (type == BNAMES) {
-		nlinks = 0;
-		/* Be quiet about nostat, GCC. */
-		nostat = 0;
-	} else if (ISSET(FTS_NOSTAT) && ISSET(FTS_PHYSICAL)) {
-		if (fts_ufslinks(sp, cur))
-			nlinks = cur->fts_nlink - (ISSET(FTS_SEEDOT) ? 0 : 2);
-		else
-			nlinks = -1;
-		nostat = 1;
-	} else {
-		nlinks = -1;
-		nostat = 0;
-	}
-
-#ifdef notdef
-	(void)printf("nlinks == %d (cur: %d)\n", nlinks, cur->fts_nlink);
-	(void)printf("NOSTAT %d PHYSICAL %d SEEDOT %d\n",
-	    ISSET(FTS_NOSTAT), ISSET(FTS_PHYSICAL), ISSET(FTS_SEEDOT));
-#endif
-	/*
-	 * If we're going to need to stat anything or we want to descend
-	 * and stay in the directory, chdir.  If this fails we keep going,
-	 * but set a flag so we don't chdir after the post-order visit.
-	 * We won't be able to stat anything, but we can still return the
-	 * names themselves.  Note, that since fts_read won't be able to
-	 * chdir into the directory, it will have to return different path
-	 * names than before, i.e. "a/b" instead of "b".  Since the node
-	 * has already been visited in pre-order, have to wait until the
-	 * post-order visit to return the error.  There is a special case
-	 * here, if there was nothing to stat then it's not an error to
-	 * not be able to stat.  This is all fairly nasty.  If a program
-	 * needed sorted entries or stat information, they had better be
-	 * checking FTS_NS on the returned nodes.
-	 */
-	cderrno = 0;
-	if (nlinks || type == BREAD) {
-		if (fts_safe_changedir(sp, cur, dirfd(dirp), NULL)) {
-			if (nlinks && type == BREAD)
-				cur->fts_errno = errno;
-			cur->fts_flags |= FTS_DONTCHDIR;
-			descend = 0;
-			cderrno = errno;
-		} else
-			descend = 1;
-	} else
-		descend = 0;
-
-	/*
-	 * Figure out the max file name length that can be stored in the
-	 * current path -- the inner loop allocates more path as necessary.
-	 * We really wouldn't have to do the maxlen calculations here, we
-	 * could do them in fts_read before returning the path, but it's a
-	 * lot easier here since the length is part of the dirent structure.
-	 *
-	 * If not changing directories set a pointer so that can just append
-	 * each new name into the path.
-	 */
-	len = NAPPEND(cur);
-	if (ISSET(FTS_NOCHDIR)) {
-		cp = sp->fts_path + len;
-		*cp++ = '/';
-	} else {
-		/* GCC, you're too verbose. */
-		cp = NULL;
-	}
-	len++;
-	maxlen = sp->fts_pathlen - len;
-
-	level = cur->fts_level + 1;
-
-	/* Read the directory, attaching each entry to the `link' pointer. */
-	doadjust = 0;
-	for (head = tail = NULL, nitems = 0; dirp && (dp = readdir(dirp));) {
-		dnamlen = strlen(dp->d_name);
-		if (!ISSET(FTS_SEEDOT) && ISDOT(dp->d_name))
-			continue;
-
-		if ((p = fts_alloc(sp, dp->d_name, (int)dnamlen)) == NULL)
-			goto mem1;
-		if (dnamlen >= maxlen) {	/* include space for NUL */
-			oldaddr = sp->fts_path;
-			if (fts_palloc(sp, dnamlen + len + 1)) {
-				/*
-				 * No more memory for path or structures.  Save
-				 * errno, free up the current structure and the
-				 * structures already allocated.
-				 */
-mem1:				saved_errno = errno;
-				if (p)
-					free(p);
-				fts_lfree(head);
-				(void)closedir(dirp);
-				cur->fts_info = FTS_ERR;
-				SET(FTS_STOP);
-				errno = saved_errno;
-				return (NULL);
-			}
-			/* Did realloc() change the pointer? */
-			if (oldaddr != sp->fts_path) {
-				doadjust = 1;
-				if (ISSET(FTS_NOCHDIR))
-					cp = sp->fts_path + len;
-			}
-			maxlen = sp->fts_pathlen - len;
-		}
-
-		if (len + dnamlen >= USHRT_MAX) {
-			/*
-			 * In an FTSENT, fts_pathlen is a u_short so it is
-			 * possible to wraparound here.  If we do, free up
-			 * the current structure and the structures already
-			 * allocated, then error out with ENAMETOOLONG.
-			 */
-			free(p);
-			fts_lfree(head);
-			(void)closedir(dirp);
-			cur->fts_info = FTS_ERR;
-			SET(FTS_STOP);
-			errno = ENAMETOOLONG;
-			return (NULL);
-		}
-		p->fts_level = level;
-		p->fts_parent = sp->fts_cur;
-		p->fts_pathlen = len + dnamlen;
-
-#ifdef FTS_WHITEOUT
-		if (dp->d_type == DT_WHT)
-			p->fts_flags |= FTS_ISW;
-#endif
-
-		if (cderrno) {
-			if (nlinks) {
-				p->fts_info = FTS_NS;
-				p->fts_errno = cderrno;
-			} else
-				p->fts_info = FTS_NSOK;
-			p->fts_accpath = cur->fts_accpath;
-		} else if (nlinks == 0
-#ifdef DT_DIR
-		    || (nostat &&
-		    dp->d_type != DT_DIR && dp->d_type != DT_UNKNOWN)
-#endif
-		    ) {
-			p->fts_accpath =
-			    ISSET(FTS_NOCHDIR) ? p->fts_path : p->fts_name;
-			p->fts_info = FTS_NSOK;
-		} else {
-			/* Build a file name for fts_stat to stat. */
-			if (ISSET(FTS_NOCHDIR)) {
-				p->fts_accpath = p->fts_path;
-				memmove(cp, p->fts_name, p->fts_namelen + 1);
-			} else
-				p->fts_accpath = p->fts_name;
-			/* Stat it. */
-			p->fts_info = fts_stat(sp, p, 0);
-
-			/* Decrement link count if applicable. */
-			if (nlinks > 0 && (p->fts_info == FTS_D ||
-			    p->fts_info == FTS_DC || p->fts_info == FTS_DOT))
-				--nlinks;
-		}
-
-		/* We walk in directory order so "ls -f" doesn't get upset. */
-		p->fts_link = NULL;
-		if (head == NULL)
-			head = tail = p;
-		else {
-			tail->fts_link = p;
-			tail = p;
-		}
-		++nitems;
-	}
-	if (dirp)
-		(void)closedir(dirp);
-
-	/*
-	 * If realloc() changed the address of the path, adjust the
-	 * addresses for the rest of the tree and the dir list.
-	 */
-	if (doadjust)
-		fts_padjust(sp, head);
-
-	/*
-	 * If not changing directories, reset the path back to original
-	 * state.
-	 */
-	if (ISSET(FTS_NOCHDIR)) {
-		if (len == sp->fts_pathlen || nitems == 0)
-			--cp;
-		*cp = '\0';
-	}
-
-	/*
-	 * If descended after called from fts_children or after called from
-	 * fts_read and nothing found, get back.  At the root level we use
-	 * the saved fd; if one of fts_open()'s arguments is a relative path
-	 * to an empty directory, we wind up here with no other way back.  If
-	 * can't get back, we're done.
-	 */
-	if (descend && (type == BCHILD || !nitems) &&
-	    (cur->fts_level == FTS_ROOTLEVEL ?
-	    FCHDIR(sp, sp->fts_rfd) :
-	    fts_safe_changedir(sp, cur->fts_parent, -1, ".."))) {
-		cur->fts_info = FTS_ERR;
-		SET(FTS_STOP);
-		return (NULL);
-	}
-
-	/* If didn't find anything, return NULL. */
-	if (!nitems) {
-		if (type == BREAD)
-			cur->fts_info = FTS_DP;
-		return (NULL);
-	}
-
-	/* Sort the entries. */
-	if (sp->fts_compar && nitems > 1)
-		head = fts_sort(sp, head, nitems);
-	return (head);
-}
-
-static u_short
-fts_stat(sp, p, follow)
-	FTS *sp;
-	FTSENT *p;
-	int follow;
-{
-	FTSENT *t;
-	dev_t dev;
-	ino_t ino;
-	struct stat *sbp, sb;
-	int saved_errno;
-
-	/* If user needs stat info, stat buffer already allocated. */
-	sbp = ISSET(FTS_NOSTAT) ? &sb : p->fts_statp;
-
-#ifdef FTS_WHITEOUT
-	/* Check for whiteout. */
-	if (p->fts_flags & FTS_ISW) {
-		if (sbp != &sb) {
-			memset(sbp, '\0', sizeof(*sbp));
-			sbp->st_mode = S_IFWHT;
-		}
-		return (FTS_W);
-	}
-#endif
-
-	/*
-	 * If doing a logical walk, or application requested FTS_FOLLOW, do
-	 * a stat(2).  If that fails, check for a non-existent symlink.  If
-	 * fail, set the errno from the stat call.
-	 */
-	if (ISSET(FTS_LOGICAL) || follow) {
-		if (stat(p->fts_accpath, sbp)) {
-			saved_errno = errno;
-			if (!lstat(p->fts_accpath, sbp)) {
-				errno = 0;
-				return (FTS_SLNONE);
-			}
-			p->fts_errno = saved_errno;
-			goto err;
-		}
-	} else if (lstat(p->fts_accpath, sbp)) {
-		p->fts_errno = errno;
-err:		memset(sbp, 0, sizeof(struct stat));
-		return (FTS_NS);
-	}
-
-	if (S_ISDIR(sbp->st_mode)) {
-		/*
-		 * Set the device/inode.  Used to find cycles and check for
-		 * crossing mount points.  Also remember the link count, used
-		 * in fts_build to limit the number of stat calls.  It is
-		 * understood that these fields are only referenced if fts_info
-		 * is set to FTS_D.
-		 */
-		dev = p->fts_dev = sbp->st_dev;
-		ino = p->fts_ino = sbp->st_ino;
-		p->fts_nlink = sbp->st_nlink;
-
-		if (ISDOT(p->fts_name))
-			return (FTS_DOT);
-
-		/*
-		 * Cycle detection is done by brute force when the directory
-		 * is first encountered.  If the tree gets deep enough or the
-		 * number of symbolic links to directories is high enough,
-		 * something faster might be worthwhile.
-		 */
-		for (t = p->fts_parent;
-		    t->fts_level >= FTS_ROOTLEVEL; t = t->fts_parent)
-			if (ino == t->fts_ino && dev == t->fts_dev) {
-				p->fts_cycle = t;
-				return (FTS_DC);
-			}
-		return (FTS_D);
-	}
-	if (S_ISLNK(sbp->st_mode))
-		return (FTS_SL);
-	if (S_ISREG(sbp->st_mode))
-		return (FTS_F);
-	return (FTS_DEFAULT);
-}
-
-/*
- * The comparison function takes pointers to pointers to FTSENT structures.
- * Qsort wants a comparison function that takes pointers to void.
- * (Both with appropriate levels of const-poisoning, of course!)
- * Use a trampoline function to deal with the difference.
- */
-static int
-fts_compar(const void *a, const void *b)
-{
-	FTS *parent;
-
-	parent = (*(const FTSENT * const *)a)->fts_fts;
-	return (*parent->fts_compar)(a, b);
-}
-
-static FTSENT *
-fts_sort(sp, head, nitems)
-	FTS *sp;
-	FTSENT *head;
-	int nitems;
-{
-	FTSENT **ap, *p;
-
-	/*
-	 * Construct an array of pointers to the structures and call qsort(3).
-	 * Reassemble the array in the order returned by qsort.  If unable to
-	 * sort for memory reasons, return the directory entries in their
-	 * current order.  Allocate enough space for the current needs plus
-	 * 40 so don't realloc one entry at a time.
-	 */
-	if (nitems > sp->fts_nitems) {
-		sp->fts_nitems = nitems + 40;
-		if ((sp->fts_array = reallocf(sp->fts_array,
-		    sp->fts_nitems * sizeof(FTSENT *))) == NULL) {
-			sp->fts_nitems = 0;
-			return (head);
-		}
-	}
-	for (ap = sp->fts_array, p = head; p; p = p->fts_link)
-		*ap++ = p;
-	qsort(sp->fts_array, nitems, sizeof(FTSENT *), fts_compar);
-	for (head = *(ap = sp->fts_array); --nitems; ++ap)
-		ap[0]->fts_link = ap[1];
-	ap[0]->fts_link = NULL;
-	return (head);
-}
-
-static FTSENT *
-fts_alloc(sp, name, namelen)
-	FTS *sp;
-	char *name;
-	int namelen;
-{
-	FTSENT *p;
-	size_t len;
-
-	struct ftsent_withstat {
-		FTSENT	ent;
-		struct	stat statbuf;
-	};
-
-	/*
-	 * The file name is a variable length array and no stat structure is
-	 * necessary if the user has set the nostat bit.  Allocate the FTSENT
-	 * structure, the file name and the stat structure in one chunk, but
-	 * be careful that the stat structure is reasonably aligned.
-	 */
-	if (ISSET(FTS_NOSTAT))
-		len = sizeof(FTSENT) + namelen + 1;
-	else
-		len = sizeof(struct ftsent_withstat) + namelen + 1;
-
-	if ((p = malloc(len)) == NULL)
-		return (NULL);
-
-	if (ISSET(FTS_NOSTAT)) {
-		p->fts_name = (char *)(p + 1);
-		p->fts_statp = NULL;
-	} else {
-		p->fts_name = (char *)((struct ftsent_withstat *)p + 1);
-		p->fts_statp = &((struct ftsent_withstat *)p)->statbuf;
-	}
-
-	/* Copy the name and guarantee NUL termination. */
-	memcpy(p->fts_name, name, namelen);
-	p->fts_name[namelen] = '\0';
-	p->fts_namelen = namelen;
-	p->fts_path = sp->fts_path;
-	p->fts_errno = 0;
-	p->fts_flags = 0;
-	p->fts_instr = FTS_NOINSTR;
-	p->fts_number = 0;
-	p->fts_pointer = NULL;
-	p->fts_fts = sp;
-	return (p);
-}
-
-static void
-fts_lfree(head)
-	FTSENT *head;
-{
-	FTSENT *p;
-
-	/* Free a linked list of structures. */
-	while ((p = head)) {
-		head = head->fts_link;
-		free(p);
-	}
-}
-
-/*
- * Allow essentially unlimited paths; find, rm, ls should all work on any tree.
- * Most systems will allow creation of paths much longer than PATH_MAX, even
- * though the kernel won't resolve them.  Add the size (not just what's needed)
- * plus 256 bytes so don't realloc the path 2 bytes at a time.
- */
-static int
-fts_palloc(sp, more)
-	FTS *sp;
-	size_t more;
-{
-
-	sp->fts_pathlen += more + 256;
-	/*
-	 * Check for possible wraparound.  In an FTS, fts_pathlen is
-	 * a signed int but in an FTSENT it is an unsigned short.
-	 * We limit fts_pathlen to USHRT_MAX to be safe in both cases.
-	 */
-	if (sp->fts_pathlen < 0 || sp->fts_pathlen >= USHRT_MAX) {
-		if (sp->fts_path)
-			free(sp->fts_path);
-		sp->fts_path = NULL;
-		errno = ENAMETOOLONG;
-		return (1);
-	}
-	sp->fts_path = reallocf(sp->fts_path, sp->fts_pathlen);
-	return (sp->fts_path == NULL);
-}
-
-/*
- * When the path is realloc'd, have to fix all of the pointers in structures
- * already returned.
- */
-static void
-fts_padjust(sp, head)
-	FTS *sp;
-	FTSENT *head;
-{
-	FTSENT *p;
-	char *addr = sp->fts_path;
-
-#define	ADJUST(p) do {							\
-	if ((p)->fts_accpath != (p)->fts_name) {			\
-		(p)->fts_accpath =					\
-		    (char *)addr + ((p)->fts_accpath - (p)->fts_path);	\
-	}								\
-	(p)->fts_path = addr;						\
-} while (0)
-	/* Adjust the current set of children. */
-	for (p = sp->fts_child; p; p = p->fts_link)
-		ADJUST(p);
-
-	/* Adjust the rest of the tree, including the current level. */
-	for (p = head; p->fts_level >= FTS_ROOTLEVEL;) {
-		ADJUST(p);
-		p = p->fts_link ? p->fts_link : p->fts_parent;
-	}
-}
-
-static size_t
-fts_maxarglen(argv)
-	char * const *argv;
-{
-	size_t len, max;
-
-	for (max = 0; *argv; ++argv)
-		if ((len = strlen(*argv)) > max)
-			max = len;
-	return (max + 1);
-}
-
-/*
- * Change to dir specified by fd or p->fts_accpath without getting
- * tricked by someone changing the world out from underneath us.
- * Assumes p->fts_dev and p->fts_ino are filled in.
- */
-static int
-fts_safe_changedir(sp, p, fd, path)
-	FTS *sp;
-	FTSENT *p;
-	int fd;
-	char *path;
-{
-	int ret, oerrno, newfd;
-	struct stat sb;
-
-	newfd = fd;
-	if (ISSET(FTS_NOCHDIR))
-		return (0);
-	if (fd < 0 && (newfd = _open(path, O_RDONLY, 0)) < 0)
-		return (-1);
-	if (_fstat(newfd, &sb)) {
-		ret = -1;
-		goto bail;
-	}
-	if (p->fts_dev != sb.st_dev || p->fts_ino != sb.st_ino) {
-		errno = ENOENT;		/* disinformation */
-		ret = -1;
-		goto bail;
-	}
-	ret = fchdir(newfd);
-bail:
-	oerrno = errno;
-	if (fd < 0)
-		(void)_close(newfd);
-	errno = oerrno;
-	return (ret);
-}
-
-/*
- * Check if the filesystem for "ent" has UFS-style links.
- */
-static int
-fts_ufslinks(FTS *sp, const FTSENT *ent)
-{
-	struct _fts_private *priv;
-	const char **cpp;
-
-	priv = (struct _fts_private *)sp;
-	priv->ftsp_linksreliable = 0;
-	return 0;
-}
Index: trunk/minix/lib/other/getgrent.c
===================================================================
--- trunk/minix/lib/other/getgrent.c	(revision 9)
+++ 	(revision )
@@ -1,150 +1,0 @@
-/*	getgrent(), getgrgid(), getgrnam() - group file routines
- *
- *							Author: Kees J. Bot
- *								31 Jan 1994
- */
-#define nil 0
-#define open _open
-#define fcntl _fcntl
-#define read _read
-#define close _close
-#include <sys/types.h>
-#include <grp.h>
-#include <string.h>
-#include <stdlib.h>
-#include <unistd.h>
-#include <fcntl.h>
-
-#define arraysize(a)	(sizeof(a) / sizeof((a)[0]))
-#define arraylimit(a)	((a) + arraysize(a))
-
-static char GROUP[]= "/etc/group";	/* The group file. */
-static const char *grfile;		/* Current group file. */
-
-static char buf[1024];			/* Read buffer. */
-static char grline[512];		/* One line from the group file. */
-static struct group entry;		/* Entry to fill and return. */
-static char *members[64];		/* Group members with the entry. */
-static int grfd= -1;			/* Filedescriptor to the file. */
-static char *bufptr;			/* Place in buf. */
-static ssize_t buflen= 0;		/* Remaining characters in buf. */
-static char *lineptr;			/* Place in the line. */
-
-void endgrent(void)
-/* Close the group file. */
-{
-	if (grfd >= 0) {
-		(void) close(grfd);
-		grfd= -1;
-		buflen= 0;
-	}
-}
-
-int setgrent(void)
-/* Open the group file. */
-{
-	if (grfd >= 0) endgrent();
-
-	if (grfile == nil) grfile= GROUP;
-
-	if ((grfd= open(grfile, O_RDONLY)) < 0) return -1;
-	(void) fcntl(grfd, F_SETFD, fcntl(grfd, F_GETFD) | FD_CLOEXEC);
-	return 0;
-}
-
-void setgrfile(const char *file)
-/* Prepare for reading an alternate group file. */
-{
-	endgrent();
-	grfile= file;
-}
-
-static int getline(void)
-/* Get one line from the group file, return 0 if bad or EOF. */
-{
-	lineptr= grline;
-
-	do {
-		if (buflen == 0) {
-			if ((buflen= read(grfd, buf, sizeof(buf))) <= 0)
-				return 0;
-			bufptr= buf;
-		}
-
-		if (lineptr == arraylimit(grline)) return 0;
-		buflen--;
-	} while ((*lineptr++ = *bufptr++) != '\n');
-
-	lineptr= grline;
-	return 1;
-}
-
-static char *scan_punct(int punct)
-/* Scan for a field separator in a line, return the start of the field. */
-{
-	char *field= lineptr;
-	char *last;
-
-	for (;;) {
-		last= lineptr;
-		if (*lineptr == 0) return nil;
-		if (*lineptr == '\n') break;
-		if (*lineptr++ == punct) break;
-		if (lineptr[-1] == ':') return nil;	/* :::,,,:,,,? */
-	}
-	*last= 0;
-	return field;
-}
-
-struct group *getgrent(void)
-/* Read one entry from the group file. */
-{
-	char *p;
-	char **mem;
-
-	/* Open the file if not yet open. */
-	if (grfd < 0 && setgrent() < 0) return nil;
-
-	/* Until a good line is read. */
-	for (;;) {
-		if (!getline()) return nil;	/* EOF or corrupt. */
-
-		if ((entry.gr_name= scan_punct(':')) == nil) continue;
-		if ((entry.gr_passwd= scan_punct(':')) == nil) continue;
-		if ((p= scan_punct(':')) == nil) continue;
-		entry.gr_gid= strtol(p, nil, 0);
-
-		entry.gr_mem= mem= members;
-		if (*lineptr != '\n') {
-			do {
-				if ((*mem= scan_punct(',')) == nil) goto again;
-				if (mem < arraylimit(members) - 1) mem++;
-			} while (*lineptr != 0);
-		}
-		*mem= nil;
-		return &entry;
-	again:;
-	}
-}
-
-struct group *getgrgid(_mnx_Gid_t gid)
-/* Return the group file entry belonging to the user-id. */
-{
-	struct group *gr;
-
-	endgrent();
-	while ((gr= getgrent()) != nil && gr->gr_gid != gid) {}
-	endgrent();
-	return gr;
-}
-
-struct group *getgrnam(const char *name)
-/* Return the group file entry belonging to the user name. */
-{
-	struct group *gr;
-
-	endgrent();
-	while ((gr= getgrent()) != nil && strcmp(gr->gr_name, name) != 0) {}
-	endgrent();
-	return gr;
-}
Index: trunk/minix/lib/other/getlogin.c
===================================================================
--- trunk/minix/lib/other/getlogin.c	(revision 9)
+++ 	(revision )
@@ -1,28 +1,0 @@
-/*  getlogin(3)
- *
- *  Author: Terrence W. Holm          Aug. 1988
- */
-
-#include <lib.h>
-#include <pwd.h>
-#include <unistd.h>
-#include <string.h>
-#include <stdio.h>
-
-#ifndef  L_cuserid
-#define  L_cuserid   9
-#endif
-
-char *getlogin()
-{
-  PRIVATE char userid[L_cuserid];
-  struct passwd *pw_entry;
-
-  pw_entry = getpwuid(getuid());
-
-  if (pw_entry == (struct passwd *)NULL) return((char *)NULL);
-
-  strcpy(userid, pw_entry->pw_name);
-
-  return(userid);
-}
Index: trunk/minix/lib/other/getpagesize.c
===================================================================
--- trunk/minix/lib/other/getpagesize.c	(revision 9)
+++ 	(revision )
@@ -1,11 +1,0 @@
-/*
-getpagesize.c
-*/
-
-#include <unistd.h>
-
-int getpagesize(void)
-{
-	/* We don't have paging. Pretend that we do. */
-	return 4096;
-}
Index: trunk/minix/lib/other/getpass.c
===================================================================
--- trunk/minix/lib/other/getpass.c	(revision 9)
+++ 	(revision )
@@ -1,75 +1,0 @@
-/*	getpass() - read a password		Author: Kees J. Bot
- *							Feb 16 1993
- */
-#define open _open
-#define sigaction _sigaction
-#define sigemptyset _sigemptyset
-#define tcgetattr _tcgetattr
-#define tcsetattr _tcsetattr
-#define write _write
-#define read _read
-#define close _close
-#include <sys/types.h>
-#include <fcntl.h>
-#include <unistd.h>
-#include <signal.h>
-#include <termios.h>
-#include <string.h>
-
-static int intr;
-
-static void catch(int sig)
-{
-	intr= 1;
-}
-
-char *getpass(const char *prompt)
-{
-	struct sigaction osa, sa;
-	struct termios cooked, raw;
-	static char password[32+1];
-	int fd, n= 0;
-
-	/* Try to open the controlling terminal. */
-	if ((fd= open("/dev/tty", O_RDONLY)) < 0) return NULL;
-
-	/* Trap interrupts unless ignored. */
-	intr= 0;
-	sigaction(SIGINT, NULL, &osa);
-	if (osa.sa_handler != SIG_IGN) {
-		sigemptyset(&sa.sa_mask);
-		sa.sa_flags= 0;
-		sa.sa_handler= catch;
-		sigaction(SIGINT, &sa, &osa);
-	}
-
-	/* Set the terminal to non-echo mode. */
-	tcgetattr(fd, &cooked);
-	raw= cooked;
-	raw.c_iflag|= ICRNL;
-	raw.c_lflag&= ~ECHO;
-	raw.c_lflag|= ECHONL;
-	raw.c_oflag|= OPOST | ONLCR;
-	tcsetattr(fd, TCSANOW, &raw);
-
-	/* Print the prompt.  (After setting non-echo!) */
-	write(2, prompt, strlen(prompt));
-
-	/* Read the password, 32 characters max. */
-	while (read(fd, password+n, 1) > 0) {
-		if (password[n] == '\n') break;
-		if (n < 32) n++;
-	}
-	password[n]= 0;
-
-	/* Terminal back to cooked mode. */
-	tcsetattr(fd, TCSANOW, &cooked);
-
-	close(fd);
-
-	/* Interrupt? */
-	sigaction(SIGINT, &osa, NULL);
-	if (intr) raise(SIGINT);
-
-	return password;
-}
Index: trunk/minix/lib/other/getpwent.c
===================================================================
--- trunk/minix/lib/other/getpwent.c	(revision 9)
+++ 	(revision )
@@ -1,143 +1,0 @@
-/*	getpwent(), getpwuid(), getpwnam() - password file routines
- *
- *							Author: Kees J. Bot
- *								31 Jan 1994
- */
-#define nil 0
-#define open _open
-#define fcntl _fcntl
-#define read _read
-#define close _close
-#include <sys/types.h>
-#include <pwd.h>
-#include <string.h>
-#include <stdlib.h>
-#include <unistd.h>
-#include <fcntl.h>
-
-#define arraysize(a)	(sizeof(a) / sizeof((a)[0]))
-#define arraylimit(a)	((a) + arraysize(a))
-
-static char PASSWD[]= "/etc/passwd";	/* The password file. */
-static const char *pwfile;		/* Current password file. */
-
-static char buf[1024];			/* Read buffer. */
-static char pwline[256];		/* One line from the password file. */
-static struct passwd entry;		/* Entry to fill and return. */
-static int pwfd= -1;			/* Filedescriptor to the file. */
-static char *bufptr;			/* Place in buf. */
-static ssize_t buflen= 0;		/* Remaining characters in buf. */
-static char *lineptr;			/* Place in the line. */
-
-void endpwent(void)
-/* Close the password file. */
-{
-	if (pwfd >= 0) {
-		(void) close(pwfd);
-		pwfd= -1;
-		buflen= 0;
-	}
-}
-
-int setpwent(void)
-/* Open the password file. */
-{
-	if (pwfd >= 0) endpwent();
-
-	if (pwfile == nil) pwfile= PASSWD;
-
-	if ((pwfd= open(pwfile, O_RDONLY)) < 0) return -1;
-	(void) fcntl(pwfd, F_SETFD, fcntl(pwfd, F_GETFD) | FD_CLOEXEC);
-	return 0;
-}
-
-void setpwfile(const char *file)
-/* Prepare for reading an alternate password file. */
-{
-	endpwent();
-	pwfile= file;
-}
-
-static int getline(void)
-/* Get one line from the password file, return 0 if bad or EOF. */
-{
-	lineptr= pwline;
-
-	do {
-		if (buflen == 0) {
-			if ((buflen= read(pwfd, buf, sizeof(buf))) <= 0)
-				return 0;
-			bufptr= buf;
-		}
-
-		if (lineptr == arraylimit(pwline)) return 0;
-		buflen--;
-	} while ((*lineptr++ = *bufptr++) != '\n');
-
-	lineptr= pwline;
-	return 1;
-}
-
-static char *scan_colon(void)
-/* Scan for a field separator in a line, return the start of the field. */
-{
-	char *field= lineptr;
-	char *last;
-
-	for (;;) {
-		last= lineptr;
-		if (*lineptr == 0) return nil;
-		if (*lineptr == '\n') break;
-		if (*lineptr++ == ':') break;
-	}
-	*last= 0;
-	return field;
-}
-
-struct passwd *getpwent(void)
-/* Read one entry from the password file. */
-{
-	char *p;
-
-	/* Open the file if not yet open. */
-	if (pwfd < 0 && setpwent() < 0) return nil;
-
-	/* Until a good line is read. */
-	for (;;) {
-		if (!getline()) return nil;	/* EOF or corrupt. */
-
-		if ((entry.pw_name= scan_colon()) == nil) continue;
-		if ((entry.pw_passwd= scan_colon()) == nil) continue;
-		if ((p= scan_colon()) == nil) continue;
-		entry.pw_uid= strtol(p, nil, 0);
-		if ((p= scan_colon()) == nil) continue;
-		entry.pw_gid= strtol(p, nil, 0);
-		if ((entry.pw_gecos= scan_colon()) == nil) continue;
-		if ((entry.pw_dir= scan_colon()) == nil) continue;
-		if ((entry.pw_shell= scan_colon()) == nil) continue;
-
-		if (*lineptr == 0) return &entry;
-	}
-}
-
-struct passwd *getpwuid(_mnx_Uid_t uid)
-/* Return the password file entry belonging to the user-id. */
-{
-	struct passwd *pw;
-
-	endpwent();
-	while ((pw= getpwent()) != nil && pw->pw_uid != uid) {}
-	endpwent();
-	return pw;
-}
-
-struct passwd *getpwnam(const char *name)
-/* Return the password file entry belonging to the user name. */
-{
-	struct passwd *pw;
-
-	endpwent();
-	while ((pw= getpwent()) != nil && strcmp(pw->pw_name, name) != 0) {}
-	endpwent();
-	return pw;
-}
Index: trunk/minix/lib/other/getttyent.c
===================================================================
--- trunk/minix/lib/other/getttyent.c	(revision 9)
+++ 	(revision )
@@ -1,153 +1,0 @@
-/*	getttyent(3) - get a ttytab entry		Author: Kees J. Bot
- *								28 Oct 1995
- */
-#define nil 0
-#define open _open
-#define close _close
-#define fcntl _fcntl
-#define read _read
-#include <string.h>
-#include <sys/types.h>
-#include <ttyent.h>
-#include <unistd.h>
-#include <fcntl.h>
-
-#define arraysize(a)	(sizeof(a) / sizeof((a)[0]))
-#define arraylimit(a)	((a) + arraysize(a))
-
-static char TTYTAB[]= "/etc/ttytab";	/* The table of terminal devices. */
-
-static char buf[512];			/* Read buffer. */
-static char ttline[256];		/* One line from the ttytab file. */
-static char *ttargv[32];		/* Compound arguments. */
-static struct ttyent entry;		/* Entry to fill and return. */
-static int ttfd= -1;			/* Filedescriptor to the file. */
-static char *bufptr;			/* Place in buf. */
-static ssize_t buflen= 0;		/* Remaining characters in buf. */
-static char *lineptr;			/* Place in the line. */
-static char **argvptr;			/* Place in word lists. */
-
-void endttyent(void)
-/* Close the ttytab file. */
-{
-	if (ttfd >= 0) {
-		(void) close(ttfd);
-		ttfd= -1;
-		buflen= 0;
-	}
-}
-
-int setttyent(void)
-/* Open the ttytab file. */
-{
-	if (ttfd >= 0) endttyent();
-
-	if ((ttfd= open(TTYTAB, O_RDONLY)) < 0) return -1;
-	(void) fcntl(ttfd, F_SETFD, fcntl(ttfd, F_GETFD) | FD_CLOEXEC);
-	return 0;
-}
-
-static int getline(void)
-/* Get one line from the ttytab file, return 0 if bad or EOF. */
-{
-	lineptr= ttline;
-	argvptr= ttargv;
-
-	do {
-		if (buflen == 0) {
-			if ((buflen= read(ttfd, buf, sizeof(buf))) <= 0)
-				return 0;
-			bufptr= buf;
-		}
-
-		if (lineptr == arraylimit(ttline)) return 0;
-		buflen--;
-	} while ((*lineptr++ = *bufptr++) != '\n');
-
-	lineptr= ttline;
-	return 1;
-}
-
-static int white(int c)
-/* Whitespace? */
-{
-	return c == ' ' || c == '\t';
-}
-
-static char *scan_white(int quoted)
-/* Scan for a field separator in a line, return the start of the field.
- * "quoted" is set if we have to watch out for double quotes.
- */
-{
-	char *field, *last;
-
-	while (white(*lineptr)) lineptr++;
-	if (!quoted && *lineptr == '#') return nil;
-
-	field= lineptr;
-	for (;;) {
-		last= lineptr;
-		if (*lineptr == 0) return nil;
-		if (*lineptr == '\n') break;
-		if (quoted && *lineptr == '"') return field;
-		if (white(*lineptr++)) break;
-	}
-	*last= 0;
-	return *field == 0 ? nil : field;
-}
-
-static char **scan_quoted(void)
-/* Read a field that may be a quoted list of words. */
-{
-	char *p, **field= argvptr;
-
-	while (white(*lineptr)) lineptr++;
-
-	if (*lineptr == '"') {
-		/* Quoted list of words. */
-		lineptr++;
-		while ((p= scan_white(1)) != nil && *p != '"') {
-			if (argvptr == arraylimit(ttargv)) return nil;
-			*argvptr++= p;
-		}
-		if (*lineptr == '"') *lineptr++= 0;
-	} else {
-		/* Just one word. */
-		if ((p= scan_white(0)) == nil) return nil;
-		if (argvptr == arraylimit(ttargv)) return nil;
-		*argvptr++= p;
-	}
-	if (argvptr == arraylimit(ttargv)) return nil;
-	*argvptr++= nil;
-	return field;
-}
-
-struct ttyent *getttyent(void)
-/* Read one entry from the ttytab file. */
-{
-	/* Open the file if not yet open. */
-	if (ttfd < 0 && setttyent() < 0) return nil;
-
-	/* Look for a line with something on it. */
-	for (;;) {
-		if (!getline()) return nil;	/* EOF or corrupt. */
-
-		if ((entry.ty_name= scan_white(0)) == nil) continue;
-		entry.ty_type= scan_white(0);
-		entry.ty_getty= scan_quoted();
-		entry.ty_init= scan_quoted();
-
-		return &entry;
-	}
-}
-
-struct ttyent *getttynam(const char *name)
-/* Return the ttytab file entry for a given tty. */
-{
-	struct ttyent *tty;
-
-	endttyent();
-	while ((tty= getttyent()) != nil && strcmp(tty->ty_name, name) != 0) {}
-	endttyent();
-	return tty;
-}
Index: trunk/minix/lib/other/getw.c
===================================================================
--- trunk/minix/lib/other/getw.c	(revision 9)
+++ 	(revision )
@@ -1,22 +1,0 @@
-/*
- * getw - read a word from a stream
- */
-/* $Header: /cvsup/minix/src/lib/other/getw.c,v 1.1.1.1 2005/04/21 14:56:27 beng Exp $ */
-
-#include	<stdio.h>
-
-_PROTOTYPE(int getw, (FILE *stream ));
-
-int getw(stream)
-register FILE *stream;
-{
-	register int cnt = sizeof(int);
-	int w;
-	register char *p = (char *) &w;
-
-	while (cnt--) {
-		*p++ = getc(stream);
-	}
-	if (feof(stream) || ferror(stream)) return EOF;
-	return w;
-}
Index: trunk/minix/lib/other/hypot.c
===================================================================
--- trunk/minix/lib/other/hypot.c	(revision 9)
+++ 	(revision )
@@ -1,43 +1,0 @@
-/*
- * (c) copyright 1988 by the Vrije Universiteit, Amsterdam, The Netherlands.
- * See the copyright notice in the ACK home directory, in the file "Copyright".
- *
- * Author: Ceriel J.H. Jacobs
- */
-
-#include <math.h>
-
-struct complex {
-	double r,i;
-};
-
-_PROTOTYPE(double hypot, (double x, double y ));
-_PROTOTYPE(double cabs, (struct complex p_compl ));
-
-/* $Header: /cvsup/minix/src/lib/other/hypot.c,v 1.1.1.1 2005/04/21 14:56:27 beng Exp $ */
-
-double
-hypot(x, y)
-double x, y;
-{
-	/*	Computes sqrt(x*x+y*y), avoiding overflow */
-
-	if (x < 0) x = -x;
-	if (y < 0) y = -y;
-	if (x > y) {
-		double t = y;
-		y = x;
-		x = t;
-	}
-	/* sqrt(x*x+y*y) = sqrt(y*y*(x*x/(y*y)+1.0)) = y*sqrt(x*x/(y*y)+1.0) */
-	if (y == 0.0) return 0.0;
-	x /= y;
-	return y*sqrt(x*x+1.0);
-}
-
-double
-cabs(p_compl)
-struct complex p_compl;
-{
-	return hypot(p_compl.r, p_compl.i);
-}
Index: trunk/minix/lib/other/index.c
===================================================================
--- trunk/minix/lib/other/index.c	(revision 9)
+++ 	(revision )
@@ -1,11 +1,0 @@
-#include <lib.h>
-/* index - find first occurrence of a character in a string */
-
-#include <string.h>
-
-char *index(s, charwanted)	/* found char, or NULL if none */
-_CONST char *s;
-char charwanted;
-{
-  return(strchr(s, charwanted));
-}
Index: trunk/minix/lib/other/itoa.c
===================================================================
--- trunk/minix/lib/other/itoa.c	(revision 9)
+++ 	(revision )
@@ -1,36 +1,0 @@
-#include <lib.h>
-/* Integer to ASCII for signed decimal integers. */
-
-PRIVATE int next;
-PRIVATE char qbuf[8];
-
-_PROTOTYPE( char *itoa, (int n));
-
-char *itoa(n)
-int n;
-{
-  register int r, k;
-  int flag = 0;
-
-  next = 0;
-  if (n < 0) {
-	qbuf[next++] = '-';
-	n = -n;
-  }
-  if (n == 0) {
-	qbuf[next++] = '0';
-  } else {
-	k = 10000;
-	while (k > 0) {
-		r = n / k;
-		if (flag || r > 0) {
-			qbuf[next++] = '0' + r;
-			flag = 1;
-		}
-		n -= r * k;
-		k = k / 10;
-	}
-  }
-  qbuf[next] = 0;
-  return(qbuf);
-}
Index: trunk/minix/lib/other/loadname.c
===================================================================
--- trunk/minix/lib/other/loadname.c	(revision 9)
+++ 	(revision )
@@ -1,19 +1,0 @@
-#include <lib.h>
-#include <string.h>
-
-PUBLIC void _loadname(name, msgptr)
-_CONST char *name;
-message *msgptr;
-{
-/* This function is used to load a string into a type m3 message. If the
- * string fits in the message, it is copied there.  If not, a pointer to
- * it is passed.
- */
-
-  register size_t k;
-
-  k = strlen(name) + 1;
-  msgptr->m3_i1 = k;
-  msgptr->m3_p1 = (char *) name;
-  if (k <= sizeof msgptr->m3_ca1) strcpy(msgptr->m3_ca1, name);
-}
Index: trunk/minix/lib/other/lock.c
===================================================================
--- trunk/minix/lib/other/lock.c	(revision 9)
+++ 	(revision )
@@ -1,62 +1,0 @@
-#include <lib.h>
-#include <errno.h>
-#include <sys/types.h>
-#include <unistd.h>
-#include <string.h>
-#include <fcntl.h>
-#include <stdio.h>
-#if _ANSI
-#include <stdlib.h>
-#endif
-
-typedef enum {
-  False, True
-} BOOLEAN;
-
-#define LOCKDIR "/tmp/"		/* or /usr/tmp/ as the case may be */
-#define MAXTRIES 3
-#define NAPTIME (unsigned int)5
-
-PRIVATE _PROTOTYPE( char *lockpath, (char *name));
-_PROTOTYPE( void syserr, (char *errstring));
-_PROTOTYPE( BOOLEAN lock, (char *name));
-_PROTOTYPE( void unlock, (char *name));
-
-void
-syserr(errstring)
-char *errstring;
-{
-	fprintf(stderr,"couldn't %s\n", errstring);
-	exit(1);
-}
-
-BOOLEAN lock(name)		/* acquire lock */
-char *name;
-{
-  char *path;
-  int fd, tries;
-
-  path = lockpath(name);
-  tries = 0;
-  while ((fd = creat(path, 0)) == -1 && errno == EACCES) {
-	if (++tries >= MAXTRIES) return(False);
-	sleep(NAPTIME);
-  }
-  if (fd == -1 || close(fd) == -1) syserr("lock");
-  return(True);
-}
-
-void unlock(name)		/* free lock */
-char *name;
-{
-  if (unlink(lockpath(name)) == -1) syserr("unlock");
-}
-
-PRIVATE char *lockpath(name)	/* generate lock file path */
-char *name;
-{
-  PRIVATE char path[20];
-
-  strcpy(path, LOCKDIR);
-  return(strcat(path, name));
-}
Index: trunk/minix/lib/other/lrand.c
===================================================================
--- trunk/minix/lib/other/lrand.c	(revision 9)
+++ 	(revision )
@@ -1,53 +1,0 @@
-/*  lrand(3)
- *
- *  Author: Terrence W. Holm          Nov. 1988
- *
- *
- *  A prime modulus multiplicative linear congruential
- *  generator (PMMLCG), or "Lehmer generator".
- *  Implementation directly derived from the article:
- *
- *	S. K. Park and K. W. Miller
- *	Random Number Generators: Good Ones are Hard to Find
- *	CACM vol 31, #10. Oct. 1988. pp 1192-1201.
- *
- *
- *  Using the following multiplier and modulus, we obtain a
- *  generator which:
- *
- *	1)  Has a full period: 1 to 2^31 - 2.
- *	2)  Is testably "random" (see the article).
- *	3)  Has a known implementation by E. L. Schrage.
- */
-
-#include <lib.h>
-
-_PROTOTYPE( long seed, (long lseed));
-_PROTOTYPE( long lrand, (void));
-
-#define  A	  16807L	/* A "good" multiplier	  */
-#define  M   2147483647L	/* Modulus: 2^31 - 1	  */
-#define  Q       127773L	/* M / A		  */
-#define  R         2836L	/* M % A		  */
-
-PRIVATE long _lseed = 1L;
-
-long seed(lseed)
-long lseed;
-{
-  long previous_seed = _lseed;
-
-  _lseed = lseed;
-
-  return(previous_seed);
-}
-
-
-long lrand()
-{
-  _lseed = A * (_lseed % Q) - R * (_lseed / Q);
-
-  if (_lseed < 0) _lseed += M;
-
-  return(_lseed);
-}
Index: trunk/minix/lib/other/lsearch.c
===================================================================
--- trunk/minix/lib/other/lsearch.c	(revision 9)
+++ 	(revision )
@@ -1,50 +1,0 @@
-#include <lib.h>
-#include <string.h>
-/*  lsearch(3)  and  lfind(3)
- *
- *  Author: Terrence W. Holm          Sep. 1988
- */
-
-#include <stddef.h>
-
-_PROTOTYPE( char *lsearch, (char *key, char *base,
-			    unsigned *count, unsigned width,
-			    int (*keycmp)(const void *, const void *)));
-_PROTOTYPE( char *lfind, (char *key, char *base,
-			    unsigned *count, unsigned width,
-			    int (*keycmp)(const void *, const void *)));
-
-char *lsearch(key, base, count, width, keycmp)
-char *key;
-char *base;
-unsigned *count;
-unsigned width;
-_PROTOTYPE( int (*keycmp), (const void *, const void *));
-{
-  char *entry;
-  char *last = base + *count * width;
-
-  for (entry = base; entry < last; entry += width)
-	if (keycmp(key, entry) == 0) return(entry);
-
-  bcopy(key, last, width);
-  *count += 1;
-  return(last);
-}
-
-
-char *lfind(key, base, count, width, keycmp)
-char *key;
-char *base;
-unsigned *count;
-unsigned width;
-_PROTOTYPE( int (*keycmp), (const void *, const void *));
-{
-  char *entry;
-  char *last = base + *count * width;
-
-  for (entry = base; entry < last; entry += width)
-	if (keycmp(key, entry) == 0) return(entry);
-
-  return((char *)NULL);
-}
Index: trunk/minix/lib/other/memccpy.c
===================================================================
--- trunk/minix/lib/other/memccpy.c	(revision 9)
+++ 	(revision )
@@ -1,39 +1,0 @@
-#include <lib.h>
-/* memccpy - copy bytes up to a certain char
- *
- * CHARBITS should be defined only if the compiler lacks "unsigned char".
- * It should be a mask, e.g. 0377 for an 8-bit machine.
- */
-
-#include <ansi.h>
-#include <stddef.h>
-
-_PROTOTYPE( void *memccpy, (void *dst, const void *src,
-			    int ucharstop, size_t size));
-#ifndef CHARBITS
-#	define	UNSCHAR(c)	((unsigned char)(c))
-#else
-#	define	UNSCHAR(c)	((c)&CHARBITS)
-#endif
-
-void *memccpy(dst, src, ucharstop, size)
-void * dst;
-_CONST void * src;
-int ucharstop;
-_SIZET size;
-{
-  register char *d;
-  register _CONST char *s;
-  register _SIZET n;
-  register int uc;
-
-  if (size <= 0) return( (void *) NULL);
-
-  s = (char *) src;
-  d = (char *) dst;
-  uc = UNSCHAR(ucharstop);
-  for (n = size; n > 0; n--)
-	if (UNSCHAR(*d++ = *s++) == (char) uc) return( (void *) d);
-
-  return( (void *) NULL);
-}
Index: trunk/minix/lib/other/mstats.c
===================================================================
--- trunk/minix/lib/other/mstats.c	(revision 9)
+++ 	(revision )
@@ -1,23 +1,0 @@
-#include <minix/config.h>
-
-#if ENABLE_MESSAGE_STATS
-
-#include <lib.h>
-#include <unistd.h>
-
-PUBLIC int mstats(struct message_statentry *ms, int entries, int reset)
-{
-	message m;
-
-	m.m1_i1 = entries;
-	m.m1_i2 = reset;
-	m.m1_p1 = (void *) ms;
-
-	if(_syscall(MM, MSTATS, &m) < 0) {
-		return -1;
-	}
-
-	return m.m_type;
-}
-
-#endif
Index: trunk/minix/lib/other/mtab.c
===================================================================
--- trunk/minix/lib/other/mtab.c	(revision 9)
+++ 	(revision )
@@ -1,205 +1,0 @@
-/* This package consists of 4 routines for handling the /etc/mtab file.
- * The /etc/mtab file contains information about the root and mounted file
- * systems as a series of lines, each one with exactly four fields separated 
- * by one space as follows:
- *
- *	special mounted_on version rw_flag
- *
- * where 
- *	special is the name of the block special file
- *	mounted_on is the directory on which it is mounted
- *	version is either 1 or 2 for MINIX V1 and V2 file systems
- *	rw_flag is rw or ro for read/write or read only
- *
- * An example /etc/mtab:
- *
- *	/dev/ram / 2 rw
- *	/dev/hd1 /usr 2 rw
- *	/dev/fd0 /user 1 ro
- *
- *
- * The four routines for handling /etc/mtab are as follows.  They use two
- * (hidden) internal buffers, mtab_in for input and mtab_out for output.
- *
- *	load_mtab(&prog_name)		   - read /etc/mtab into mtab_in
- *	get_mtab_entry(&s1, &s2, &s3, &s4) - arrays that are filled in
- *	put_mtab_entry(&s1, &s2, &s3, &s4) - append a line to mtab_out
- *	rewrite_mtab(&prog_name)	   - write mtab_out to /etc/mtab
- *
- * If load_mtab and rewrite_mtab work, they return 0.  If they fail, they
- * print their own error messages on stderr and return -1.  When get_mtab_entry
- * runs out of entries to return, it sets the first pointer to NULL and returns
- * -1 instead of 0.  Also, rewrite_mtab returns -1 if it fails.
- */
- 
-#include <sys/types.h>
-#include <minix/minlib.h>
-#include <ctype.h>
-#include <fcntl.h>
-#include <stdlib.h>
-#include <string.h>
-#include <unistd.h>
-#include <stdio.h>
-
-#define BUF_SIZE   512		  /* size of the /etc/mtab buffer */
-
-char *etc_mtab = "/etc/mtab";	  /* name of the /etc/mtab file */
-static char mtab_in[BUF_SIZE+1];  /* holds /etc/mtab when it is read in */
-static char mtab_out[BUF_SIZE+1]; /* buf to build /etc/mtab for output later */
-static char *iptr = mtab_in;	  /* pointer to next line to feed out. */
-static char *optr = mtab_out;	  /* pointer to place where next line goes */
-
-_PROTOTYPE(int load_mtab, (char *prog_name ));
-_PROTOTYPE(int rewrite_mtab, (char *prog_name ));
-_PROTOTYPE(int get_mtab_entry, (char *special, char *mounted_on, 
-					char *version, char *rw_flag));
-_PROTOTYPE(int put_mtab_entry, (char *special, char *mounted_on, 
-					char *version, char *rw_flag));
-_PROTOTYPE(void err, (char *prog_name, char *str ));
-
-
-int load_mtab(prog_name)
-char *prog_name;
-{
-/* Read in /etc/mtab and store it in /etc/mtab. */
-
-  int fd, n;
-  char *ptr;
-
-  /* Open the file. */
-  fd = open(etc_mtab, O_RDONLY);
-  if (fd < 0) {
-	err(prog_name, ": cannot open ");
-	return(-1);
-  }
-
-  /* File opened.  Read it in. */
-  n = read(fd, mtab_in, BUF_SIZE);
-  if (n <= 0) {
-	/* Read failed. */
-	err(prog_name, ": cannot read ");
-	return(-1);
-  }
-  if (n == BUF_SIZE) {
-	/* Some nut has mounted 50 file systems or something like that. */
-	std_err(prog_name);
-	std_err(": file too large: ");
-	std_err(etc_mtab);
-	return(-1);
-  }
-
-  close(fd);
-
-  /* Replace all the whitespace by '\0'. */
-  ptr = mtab_in;
-  while (*ptr != '\0') {
-	if (isspace(*ptr)) *ptr = '\0';
-	ptr++;
-  }
-  return(0);
-}
-
-
-int rewrite_mtab(prog_name)
-char *prog_name;
-{
-/* Write mtab_out to /etc/mtab. */
-
-  int fd, n;
-
-  /* Do a creat to truncate the file. */
-  fd = creat(etc_mtab, 0777);
-  if (fd < 0) {
-	err(prog_name, ": cannot overwrite ");
-	return(-1);
-  }
-
-  /* File created.  Write it. */
-  n = write(fd, mtab_out, (unsigned int)(optr - mtab_out));
-  if (n <= 0) {
-	/* Write failed. */
-	err(prog_name, " could not write ");
-	return(-1);
-  }
-
-  close(fd);
-  return(0);
-}
-
-
-int get_mtab_entry(special, mounted_on, version, rw_flag)
-char *special;
-char *mounted_on;
-char *version;
-char *rw_flag;
-{
-/* Return the next entry from mtab_in. */
-
-  if (iptr >= &mtab_in[BUF_SIZE]) {
-	special[0] = '\0';
-	return(-1);
-  }
-
-  strcpy(special, iptr);
-  while (isprint(*iptr)) iptr++;
-  while (*iptr == '\0'&& iptr < &mtab_in[BUF_SIZE]) iptr++;
-
-  strcpy(mounted_on, iptr);
-  while (isprint(*iptr)) iptr++;
-  while (*iptr == '\0'&& iptr < &mtab_in[BUF_SIZE]) iptr++;
-
-  strcpy(version, iptr);
-  while (isprint(*iptr)) iptr++;
-  while (*iptr == '\0'&& iptr < &mtab_in[BUF_SIZE]) iptr++;
-
-  strcpy(rw_flag, iptr);
-  while (isprint(*iptr)) iptr++;
-  while (*iptr == '\0'&& iptr < &mtab_in[BUF_SIZE]) iptr++;
-  return(0);
-}
-
-
-int put_mtab_entry(special, mounted_on, version, rw_flag)
-char *special;
-char *mounted_on;
-char *version;
-char *rw_flag;
-{
-/* Append an entry to the mtab_out buffer. */
-
-  int n1, n2, n3, n4;
-
-  n1 = strlen(special);
-  n2 = strlen(mounted_on);
-  n3 = strlen(version);
-  n4 = strlen(rw_flag);
-
-  if (optr + n1 + n2 + n3 + n4 + 5 >= &mtab_out[BUF_SIZE]) return(-1);
-  strcpy(optr, special);
-  optr += n1;
-  *optr++ = ' ';
-
-  strcpy(optr, mounted_on);
-  optr += n2;
-  *optr++ = ' ';
-
-  strcpy(optr, version);
-  optr += n3;
-  *optr++ = ' ';
-
-  strcpy(optr, rw_flag);
-  optr += n4;
-  *optr++ = '\n';
-  return(0);
-}
-
-
-void
-err(prog_name, str)
-char *prog_name, *str;
-{
-  std_err(prog_name); 
-  std_err(str);
-  std_err(etc_mtab);
-  perror(" ");
-}
Index: trunk/minix/lib/other/namespace.h
===================================================================
--- trunk/minix/lib/other/namespace.h	(revision 9)
+++ 	(revision )
@@ -1,163 +1,0 @@
-/*
- * Copyright (c) 2001 Daniel Eischen <deischen@FreeBSD.org>.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * $FreeBSD: src/lib/libc/include/namespace.h,v 1.16 2003/05/01 19:03:13 nectar Exp $
- */
-
-#ifndef _NAMESPACE_H_
-#define _NAMESPACE_H_
-
-/*
- * Adjust names so that headers declare "hidden" names.
- *
- * README: When modifying this file don't forget to make the appropriate
- *         changes in un-namespace.h!!!
- */
-
-/*
- * ISO C (C90) section.  Most names in libc aren't in ISO C, so they
- * should be here.  Most aren't here...
- */
-#define		err				_err
-#define		warn				_warn
-#define		nsdispatch			_nsdispatch
-
-/*
- * Prototypes for syscalls/functions that need to be overridden
- * in libc_r/libpthread.
- */
-#define		accept				_accept
-#define		__acl_aclcheck_fd		___acl_aclcheck_fd
-#define		__acl_delete_fd			___acl_delete_fd
-#define		__acl_get_fd			___acl_get_fd
-#define		__acl_set_fd			___acl_set_fd
-#define		bind				_bind
-#define		__cap_get_fd			___cap_get_fd
-#define		__cap_set_fd			___cap_set_fd
-#define		close				_close
-#define		connect				_connect
-#define		dup				_dup
-#define		dup2				_dup2
-#define		execve				_execve
-#define		fcntl				_fcntl
-/*#define		flock				_flock */
-#define		flockfile			_flockfile
-#define		fpathconf			_fpathconf
-#define		fstat				_fstat
-#define		fstatfs				_fstatfs
-#define		fsync				_fsync
-#define		funlockfile			_funlockfile
-#define		getdirentries			_getdirentries
-#define		getlogin			_getlogin
-#define		getpeername			_getpeername
-#define		getprogname			_getprogname
-#define		getsockname			_getsockname
-#define		getsockopt			_getsockopt
-#define		ioctl				_ioctl
-/* #define		kevent				_kevent */
-#define		listen				_listen
-#define		nanosleep			_nanosleep
-#define		open				_open
-#define		poll				_poll
-#define		pthread_cond_broadcast		_pthread_cond_broadcast
-#define		pthread_cond_destroy		_pthread_cond_destroy
-#define		pthread_cond_init		_pthread_cond_init
-#define		pthread_cond_signal		_pthread_cond_signal
-#define		pthread_cond_timedwait		_pthread_cond_timedwait
-#define		pthread_cond_wait		_pthread_cond_wait
-#define		pthread_exit			_pthread_exit
-#define		pthread_getspecific		_pthread_getspecific
-#define		pthread_key_create		_pthread_key_create
-#define		pthread_key_delete		_pthread_key_delete
-#define		pthread_main_np			_pthread_main_np
-#define		pthread_mutex_destroy		_pthread_mutex_destroy
-#define		pthread_mutex_init		_pthread_mutex_init
-#define		pthread_mutex_lock		_pthread_mutex_lock
-#define		pthread_mutex_trylock		_pthread_mutex_trylock
-#define		pthread_mutex_unlock		_pthread_mutex_unlock
-#define		pthread_mutexattr_destroy	_pthread_mutexattr_destroy
-#define		pthread_mutexattr_init		_pthread_mutexattr_init
-#define		pthread_mutexattr_settype	_pthread_mutexattr_settype
-#define		pthread_once			_pthread_once
-#define		pthread_rwlock_destroy		_pthread_rwlock_destroy
-#define		pthread_rwlock_init		_pthread_rwlock_init
-#define		pthread_rwlock_rdlock		_pthread_rwlock_rdlock
-#define		pthread_rwlock_wrlock		_pthread_rwlock_wrlock
-#define		pthread_rwlock_tryrdlock	_pthread_rwlock_tryrdlock
-#define		pthread_rwlock_trywrlock	_pthread_rwlock_trywrlock
-#define		pthread_rwlock_unlock		_pthread_rwlock_unlock
-#define		pthread_self			_pthread_self
-#define		pthread_setspecific		_pthread_setspecific
-#define		pthread_sigmask			_pthread_sigmask
-#define		read				_read
-#define		readv				_readv
-#define		recvfrom			_recvfrom
-#define		recvmsg				_recvmsg
-#define		select				_select
-#define		sendmsg				_sendmsg
-#define		sendto				_sendto
-#define		setsockopt			_setsockopt
-/*#define		sigaction			_sigaction*/
-#define		sigprocmask			_sigprocmask
-#define		sigsuspend			_sigsuspend
-#define		socket				_socket
-#define		socketpair			_socketpair
-#define		wait4				_wait4
-#define		waitpid				_waitpid
-#define		write				_write
-#define		writev				_writev
-
-
-/*
- * Other hidden syscalls/functions that libc_r needs to override
- * but are not used internally by libc.
- *
- * XXX - When modifying libc to use one of the following, remove
- * the prototype from below and place it in the list above.
- */
-#if 0
-#define		creat				_creat
-#define		fchflags			_fchflags
-#define		fchmod				_fchmod
-#define		ftrylockfile			_ftrylockfile
-#define		msync				_msync
-#define		nfssvc				_nfssvc
-#define		pause				_pause
-#define		pthread_rwlockattr_init		_pthread_rwlockattr_init
-#define		pthread_rwlockattr_destroy	_pthread_rwlockattr_destroy
-#define		sched_yield			_sched_yield
-#define		sendfile			_sendfile
-#define		shutdown			_shutdown
-#define		sigaltstack			_sigaltstack
-#define		sigpending			_sigpending
-#define		sigreturn			_sigreturn
-#define		sigsetmask			_sigsetmask
-#define		sleep				_sleep
-#define		system				_system
-#define		tcdrain				_tcdrain
-#define		wait				_wait
-#endif
-
-#endif /* _NAMESPACE_H_ */
Index: trunk/minix/lib/other/nlist.c
===================================================================
--- trunk/minix/lib/other/nlist.c	(revision 9)
+++ 	(revision )
@@ -1,71 +1,0 @@
-/*
- * "nlist.c", Peter Valkenburg, january 1989.
- */
- 
-#include <lib.h>
-#include <string.h>
-#include <a.out.h>
-#include <sys/types.h>
-#include <fcntl.h>
-#include <unistd.h>
-#include <stdio.h>
-
-#define fail(fp)	(fclose(fp), -1)	/* ret. exp. when nlist fails */
-
-_PROTOTYPE( int nlist, (char *file, struct nlist nl[]));
-
-/*
- * Nlist fills fields n_sclass and n_value of array nl with values found in
- * non-stripped executable file.  Entries that are not found have their
- * n_value/n_sclass fields set to 0.  Nl ends with a 0 or nul string n_name.
- * The return value is -1 on failure, else the number of entries not found.
- */
-int nlist(file, nl)
-char *file;
-struct nlist nl[];
-{
-	int nents, nsrch, nfound, i;
-	struct nlist nlent;
-	FILE *fp;
-	struct exec hd;
-
-	/* open executable with namelist */
-	if ((fp = fopen(file, "r")) == NULL)
-		return -1;
-		
-	/* get header and seek to start of namelist */	
-	if (fread((char *) &hd, sizeof(struct exec), 1, fp) != 1 ||
-	    BADMAG(hd) || fseek(fp, A_SYMPOS(hd), SEEK_SET) != 0)
-		return fail(fp);
-	
-	/* determine number of entries searched for & reset fields */
-	nsrch = 0;
-	while (nl[nsrch].n_name != NULL && *(nl[nsrch].n_name) != '\0') {
-		nl[nsrch].n_sclass = 0;
-		nl[nsrch].n_value = 0;
-		nl[nsrch].n_type = 0;		/* for compatability */
-		nsrch++;
-	}
-
-	/* loop through namelist & fill in user array */
-	nfound = 0;
-	for (nents = (hd.a_syms & 0xFFFF) / sizeof(struct nlist);
-	     nents > 0; nents--) {
-		if (nsrch == nfound)
-			break;			/* no need to look further */
-		if (fread((char *) &nlent, sizeof(struct nlist), 1, fp) != 1)
-			return fail(fp);	  
-		for (i = 0; i < nsrch; i++)
-			if (nl[i].n_sclass == 0 &&
-			    strncmp(nl[i].n_name, nlent.n_name,
-			    	    sizeof(nlent.n_name)) == 0) {
-				nl[i] = nlent;
-				nfound++;
-				break;
-			}
-	}
-
-	(void) fclose(fp);
-	
-	return nsrch - nfound;
-}
Index: trunk/minix/lib/other/paramvalue.c
===================================================================
--- trunk/minix/lib/other/paramvalue.c	(revision 9)
+++ 	(revision )
@@ -1,51 +1,0 @@
-/*	paramvalue() - decode kernel parameter values	Author: Kees J. Bot
- *								7 May 1994
- * The kernel returns the results of parameter queries
- * by the XXQUERYPARAM svrctl calls as an array of hex digits, like this:
- * "75020000,080C0000".  These are the values of two four-byte variables.
- * Paramvalue() decodes such a string.
- */
-#define nil 0
-#include <stddef.h>
-#include <stdlib.h>
-#include <string.h>
-#include <sys/types.h>
-#include <minix/queryparam.h>
-
-size_t paramvalue(char **value, void *address, size_t size)
-/* Decode the string *value storing the result in the object at address with
- * the given size.  *value is left at the next parameter, *address is padded
- * with zeros if needed, and the actual size of the value is returned.
- */
-{
-	unsigned char *addr= address;
-	char *v= *value;
-	int nibble;
-	size_t n;
-
-	n= 0;
-
-	while (*v != 0 && *v != ',') {
-		nibble= *v++ - '0';
-		if (nibble > 0x9) nibble= nibble + '0' - 'A' + 0xA;
-		if (nibble > 0xF) nibble= nibble + 'A' - 'a';
-		if (size > 0) {
-			if (n % 2 == 0) {
-				*addr= nibble << 4;
-			} else {
-				*addr++|= nibble;
-				size--;
-			}
-			n++;
-		}
-	}
-	while (size > 0) { *addr++= 0; size--; }
-	while (*v != 0 && *v++ != ',') {}
-	*value= v;
-	return n / 2;
-}
-
-
-/*
- * $PchId: paramvalue.c,v 1.3 1996/02/22 09:15:56 philip Exp $
- */
Index: trunk/minix/lib/other/peekpoke.c
===================================================================
--- trunk/minix/lib/other/peekpoke.c	(revision 9)
+++ 	(revision )
@@ -1,49 +1,0 @@
-/* Peek and poke using /dev/mem.
- *
- * Callers now ought to check the return values.
- *
- * Calling peek() requires read permission on /dev/mem, and consumes
- * a file descriptor.  Calling poke() requires write permission, and
- * consumes another file descriptor.
- */
-
-#include <sys/types.h>
-#include <fcntl.h>
-#include <unistd.h>
-
-_PROTOTYPE( int peek, (unsigned segment, unsigned offset));
-_PROTOTYPE( int poke, (unsigned segment, unsigned offset, unsigned value));
-
-#define SEGSIZE 0x10
-
-int peek(segment, offset)
-unsigned segment;
-unsigned offset;
-{
-  unsigned char chvalue;
-  static int infd = -1;
-
-  if (infd < 0) infd = open("/dev/mem", O_RDONLY);
-  if (infd < 0 ||
-      lseek(infd, (unsigned long) segment * SEGSIZE + offset, SEEK_SET) < 0 ||
-      read(infd, (char *) &chvalue, (unsigned) 1) != 1)
-	return(-1);
-  return(chvalue);
-}
-
-int poke(segment, offset, value)
-unsigned segment;
-unsigned offset;
-unsigned value;
-{
-  unsigned char chvalue;
-  static int outfd = -1;
-
-  chvalue = value;
-  if (outfd < 0) outfd = open("/dev/mem", O_WRONLY);
-  if (outfd < 0 ||
-      lseek(outfd, (unsigned long) segment * SEGSIZE + offset, SEEK_SET) < 0 ||
-      write(outfd, (char *) &chvalue, (unsigned) 1) != 1)
-	return(-1);
-  return(chvalue);
-}
Index: trunk/minix/lib/other/popen.c
===================================================================
--- trunk/minix/lib/other/popen.c	(revision 9)
+++ 	(revision )
@@ -1,122 +1,0 @@
-/*
- * popen - open a pipe
- */
-/* $Header: /cvsup/minix/src/lib/other/popen.c,v 1.1.1.1 2005/04/21 14:56:27 beng Exp $ */
-
-#include	<sys/types.h>
-#include	<limits.h>
-#include	<errno.h>
-#include	<signal.h>
-#include	<stdio.h>
-
-#if	defined(__BSD4_2)
-union wait {
-	int	w_status;
-};
-typedef union wait wait_arg;
-#else
-typedef int wait_arg;
-#endif	/* __BSD4_2 */
-
-#include	"../stdio/loc_incl.h"
-
-#ifdef _ANSI
-int _close(int d);
-int _dup2(int oldd, int newd);		/* not present in System 5 */
-int _execl(const char *name, const char *_arg, ... );
-pid_t _fork(void);
-int _pipe(int fildes[2]);
-pid_t _wait(wait_arg *status);
-void _exit(int status);
-#endif
-
-static int pids[OPEN_MAX];
-
-FILE *
-popen(command, type)
-_CONST char *command;
-_CONST char *type;
-{
-	int piped[2];
-	int Xtype = *type == 'r' ? 0 : *type == 'w' ? 1 : 2;
-	int pid;
-
-	if (Xtype == 2 ||
-	    _pipe(piped) < 0 ||
-	    (pid = _fork()) < 0) return 0;
-	
-	if (pid == 0) {
-		/* child */
-		register int *p;
-
-		for (p = pids; p < &pids[OPEN_MAX]; p++) {
-			if (*p) _close((int)(p - pids));
-		}
-		_close(piped[Xtype]);
-		_dup2(piped[!Xtype], !Xtype);
-		_close(piped[!Xtype]);
-		_execl("/bin/sh", "sh", "-c", command, (char *) 0);
-		_exit(127);	/* like system() ??? */
-	}
-
-	pids[piped[Xtype]] = pid;
-	_close(piped[!Xtype]);
-	return fdopen(piped[Xtype], type);
-}
-
-#if	defined(__BSD4_2)
-#define	ret_val	status.w_status
-#else
-#define	ret_val	status
-#endif
-
-int
-pclose(stream)
-FILE *stream;
-{
-	int fd = fileno(stream);
-	wait_arg status;
-	int wret;
-
-#ifdef _ANSI
-	void (*intsave)(int) = signal(SIGINT, SIG_IGN);
-	void (*quitsave)(int) = signal(SIGQUIT, SIG_IGN);
-#else
-	void (*intsave)() = signal(SIGINT, SIG_IGN);
-	void (*quitsave)() = signal(SIGQUIT, SIG_IGN);
-#endif
-	fclose(stream);
-	while ((wret = _wait(&status)) != -1) {
-		if (wret == pids[fd]) break;
-	}
-	if (wret == -1) ret_val = -1;
-	signal(SIGINT, intsave);
-	signal(SIGQUIT, quitsave);
-	pids[fd] = 0;
-	return ret_val;
-}
-
-#if	defined(__USG)
-int _dup(int fildes);
-
-static int
-_dup2(oldd, newd)
-int oldd, newd;
-{
-	int i = 0, fd, tmp;
-	int fdbuf[_NFILES];
-
-	/* ignore the error on the close() */
-	tmp = errno; (void) _close(newd); errno = tmp;
-	while ((fd = _dup(oldd)) != newd) {
-		if (fd == -1) break;
-		fdbuf[i++] = fd;
-	}
-	tmp = errno;
-	while (--i >= 0) {
-		_close(fdbuf[i]);
-	}
-	errno = tmp;
-	return -(fd == -1);
-}
-#endif	/* __USG */
Index: trunk/minix/lib/other/putenv.c
===================================================================
--- trunk/minix/lib/other/putenv.c	(revision 9)
+++ 	(revision )
@@ -1,79 +1,0 @@
-/*
- * (c) copyright 1989 by the Vrije Universiteit, Amsterdam, The Netherlands.
- * See the copyright notice in the ACK home directory, in the file "Copyright".
- */
-/* $Header: /cvsup/minix/src/lib/other/putenv.c,v 1.1.1.1.8.1 2006/05/03 21:13:45 beng Exp $ */
-
-#include	<stdlib.h>
-#include	<string.h>
-
-#define	ENTRY_INC	10
-#define	rounded(x)	(((x / ENTRY_INC) + 1) * ENTRY_INC)
-
-extern _CONST char ***_penviron;
-
-int
-putenv(name)
-char *name;
-{
-	register _CONST char **v = *_penviron;
-	register char *r;
-	static int size = 0;
-	/* When size != 0, it contains the number of entries in the
-	 * table (including the final NULL pointer). This means that the
-	 * last non-null entry  is environ[size - 2].
-	 */
-
-	if (!name) return 0;
-	if (*_penviron == NULL) return 1;
-	if (r = strchr(name, '=')) {
-		register _CONST char *p, *q;
-
-		*r = '\0';
-
-		if (v != NULL) {
-			while ((p = *v) != NULL) {
-				q = name;
-				while (*q && (*q++ == *p++))
-					/* EMPTY */ ;
-				if (*q || (*p != '=')) {
-					v++;
-				} else {
-					/* The name was already in the
-					 * environment.
-					 */
-					*r = '=';
-					*v = name;
-					return 0;
-				}
-			}
-		}
-		*r = '=';
-		v = *_penviron;
-	}
-
-	if (!size) {
-		register _CONST char **p;
-		register int i = 0;
-
-		if (v)
-			do {
-				i++;
-			} while (*v++);
-		if (!(v = malloc(rounded(i) * sizeof(char **))))
-			return 1;
-		size = i;
-		p = *_penviron;
-		*_penviron = v;
-		while (*v++ = *p++);		/* copy the environment */
-		v = *_penviron;
-	} else if (!(size % ENTRY_INC)) {
-		if (!(v = realloc(*_penviron, rounded(size) * sizeof(char **))))
-			return 1;
-		*_penviron = v;
-	}
-	v[size - 1] = name;
-	v[size] = NULL;
-	size++;
-	return 0;
-}
Index: trunk/minix/lib/other/putw.c
===================================================================
--- trunk/minix/lib/other/putw.c	(revision 9)
+++ 	(revision )
@@ -1,23 +1,0 @@
-/* 
- * putw - write an word on a stream
- */
-/* $Header: /cvsup/minix/src/lib/other/putw.c,v 1.1.1.1 2005/04/21 14:56:27 beng Exp $ */
-
-#include	<stdio.h>
-
-_PROTOTYPE(int putw, (int w, FILE *stream ));
-
-int
-putw(w, stream)
-int w;
-register FILE *stream;
-{
-	register int cnt = sizeof(int);
-	register char *p = (char *) &w;
-
-	while (cnt--) {
-		putc(*p++, stream);
-	}
-	if (ferror(stream)) return EOF;
-	return w;
-}
Index: trunk/minix/lib/other/random.c
===================================================================
--- trunk/minix/lib/other/random.c	(revision 9)
+++ 	(revision )
@@ -1,363 +1,0 @@
-/*
- * Copyright (c) 1983, 1993
- *	The Regents of the University of California.  All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- *    must display the following acknowledgement:
- *	This product includes software developed by the University of
- *	California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- *    may be used to endorse or promote products derived from this software
- *    without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)random.c	8.1 (Berkeley) 6/4/93";
-#endif /* LIBC_SCCS and not lint */
-
-#include <stdio.h>
-#include <stdlib.h>
-
-/*
- * random.c:
- *
- * An improved random number generation package.  In addition to the standard
- * rand()/srand() like interface, this package also has a special state info
- * interface.  The initstate() routine is called with a seed, an array of
- * bytes, and a count of how many bytes are being passed in; this array is
- * then initialized to contain information for random number generation with
- * that much state information.  Good sizes for the amount of state
- * information are 32, 64, 128, and 256 bytes.  The state can be switched by
- * calling the setstate() routine with the same array as was initiallized
- * with initstate().  By default, the package runs with 128 bytes of state
- * information and generates far better random numbers than a linear
- * congruential generator.  If the amount of state information is less than
- * 32 bytes, a simple linear congruential R.N.G. is used.
- *
- * Internally, the state information is treated as an array of longs; the
- * zeroeth element of the array is the type of R.N.G. being used (small
- * integer); the remainder of the array is the state information for the
- * R.N.G.  Thus, 32 bytes of state information will give 7 longs worth of
- * state information, which will allow a degree seven polynomial.  (Note:
- * the zeroeth word of state information also has some other information
- * stored in it -- see setstate() for details).
- * 
- * The random number generation technique is a linear feedback shift register
- * approach, employing trinomials (since there are fewer terms to sum up that
- * way).  In this approach, the least significant bit of all the numbers in
- * the state table will act as a linear feedback shift register, and will
- * have period 2^deg - 1 (where deg is the degree of the polynomial being
- * used, assuming that the polynomial is irreducible and primitive).  The
- * higher order bits will have longer periods, since their values are also
- * influenced by pseudo-random carries out of the lower bits.  The total
- * period of the generator is approximately deg*(2**deg - 1); thus doubling
- * the amount of state information has a vast influence on the period of the
- * generator.  Note: the deg*(2**deg - 1) is an approximation only good for
- * large deg, when the period of the shift register is the dominant factor.
- * With deg equal to seven, the period is actually much longer than the
- * 7*(2**7 - 1) predicted by this formula.
- */
-
-/*
- * For each of the currently supported random number generators, we have a
- * break value on the amount of state information (you need at least this
- * many bytes of state info to support this random number generator), a degree
- * for the polynomial (actually a trinomial) that the R.N.G. is based on, and
- * the separation between the two lower order coefficients of the trinomial.
- */
-#define	TYPE_0		0		/* linear congruential */
-#define	BREAK_0		8
-#define	DEG_0		0
-#define	SEP_0		0
-
-#define	TYPE_1		1		/* x**7 + x**3 + 1 */
-#define	BREAK_1		32
-#define	DEG_1		7
-#define	SEP_1		3
-
-#define	TYPE_2		2		/* x**15 + x + 1 */
-#define	BREAK_2		64
-#define	DEG_2		15
-#define	SEP_2		1
-
-#define	TYPE_3		3		/* x**31 + x**3 + 1 */
-#define	BREAK_3		128
-#define	DEG_3		31
-#define	SEP_3		3
-
-#define	TYPE_4		4		/* x**63 + x + 1 */
-#define	BREAK_4		256
-#define	DEG_4		63
-#define	SEP_4		1
-
-/*
- * Array versions of the above information to make code run faster --
- * relies on fact that TYPE_i == i.
- */
-#define	MAX_TYPES	5		/* max number of types above */
-
-static int degrees[MAX_TYPES] =	{ DEG_0, DEG_1, DEG_2, DEG_3, DEG_4 };
-static int seps [MAX_TYPES] =	{ SEP_0, SEP_1, SEP_2, SEP_3, SEP_4 };
-
-/*
- * Initially, everything is set up as if from:
- *
- *	initstate(1, &randtbl, 128);
- *
- * Note that this initialization takes advantage of the fact that srandom()
- * advances the front and rear pointers 10*rand_deg times, and hence the
- * rear pointer which starts at 0 will also end up at zero; thus the zeroeth
- * element of the state information, which contains info about the current
- * position of the rear pointer is just
- *
- *	MAX_TYPES * (rptr - state) + TYPE_3 == TYPE_3.
- */
-
-static long randtbl[DEG_3 + 1] = {
-	TYPE_3,
-	0x9a319039, 0x32d9c024, 0x9b663182, 0x5da1f342, 0xde3b81e0, 0xdf0a6fb5,
-	0xf103bc02, 0x48f340fb, 0x7449e56b, 0xbeb1dbb0, 0xab5c5918, 0x946554fd,
-	0x8c2e680f, 0xeb3d799f, 0xb11ee0b7, 0x2d436b86, 0xda672e2a, 0x1588ca88,
-	0xe369735d, 0x904f35f7, 0xd7158fd6, 0x6fa6f051, 0x616e6b96, 0xac94efdc,
-	0x36413f93, 0xc622c298, 0xf5a42ab8, 0x8a88d77b, 0xf5ad9d0e, 0x8999220b,
-	0x27fb47b9,
-};
-
-/*
- * fptr and rptr are two pointers into the state info, a front and a rear
- * pointer.  These two pointers are always rand_sep places aparts, as they
- * cycle cyclically through the state information.  (Yes, this does mean we
- * could get away with just one pointer, but the code for random() is more
- * efficient this way).  The pointers are left positioned as they would be
- * from the call
- *
- *	initstate(1, randtbl, 128);
- *
- * (The position of the rear pointer, rptr, is really 0 (as explained above
- * in the initialization of randtbl) because the state table pointer is set
- * to point to randtbl[1] (as explained below).
- */
-static long *fptr = &randtbl[SEP_3 + 1];
-static long *rptr = &randtbl[1];
-
-/*
- * The following things are the pointer to the state information table, the
- * type of the current generator, the degree of the current polynomial being
- * used, and the separation between the two pointers.  Note that for efficiency
- * of random(), we remember the first location of the state information, not
- * the zeroeth.  Hence it is valid to access state[-1], which is used to
- * store the type of the R.N.G.  Also, we remember the last location, since
- * this is more efficient than indexing every time to find the address of
- * the last element to see if the front and rear pointers have wrapped.
- */
-static long *state = &randtbl[1];
-static int rand_type = TYPE_3;
-static int rand_deg = DEG_3;
-static int rand_sep = SEP_3;
-static long *end_ptr = &randtbl[DEG_3 + 1];
-
-/*
- * srandom:
- *
- * Initialize the random number generator based on the given seed.  If the
- * type is the trivial no-state-information type, just remember the seed.
- * Otherwise, initializes state[] based on the given "seed" via a linear
- * congruential generator.  Then, the pointers are set to known locations
- * that are exactly rand_sep places apart.  Lastly, it cycles the state
- * information a given number of times to get rid of any initial dependencies
- * introduced by the L.C.R.N.G.  Note that the initialization of randtbl[]
- * for default usage relies on values produced by this routine.
- */
-void
-srandom(x)
-	u_int x;
-{
-	register int i, j;
-
-	if (rand_type == TYPE_0)
-		state[0] = x;
-	else {
-		j = 1;
-		state[0] = x;
-		for (i = 1; i < rand_deg; i++)
-			state[i] = 1103515245 * state[i - 1] + 12345;
-		fptr = &state[rand_sep];
-		rptr = &state[0];
-		for (i = 0; i < 10 * rand_deg; i++)
-			(void)random();
-	}
-}
-
-/*
- * initstate:
- *
- * Initialize the state information in the given array of n bytes for future
- * random number generation.  Based on the number of bytes we are given, and
- * the break values for the different R.N.G.'s, we choose the best (largest)
- * one we can and set things up for it.  srandom() is then called to
- * initialize the state information.
- * 
- * Note that on return from srandom(), we set state[-1] to be the type
- * multiplexed with the current value of the rear pointer; this is so
- * successive calls to initstate() won't lose this information and will be
- * able to restart with setstate().
- * 
- * Note: the first thing we do is save the current state, if any, just like
- * setstate() so that it doesn't matter when initstate is called.
- *
- * Returns a pointer to the old state.
- */
-char *
-initstate(seed, arg_state, n)
-	u_int seed;			/* seed for R.N.G. */
-	char *arg_state;		/* pointer to state array */
-	size_t n;			/* # bytes of state info */
-{
-	register char *ostate = (char *)(&state[-1]);
-
-	if (rand_type == TYPE_0)
-		state[-1] = rand_type;
-	else
-		state[-1] = MAX_TYPES * (rptr - state) + rand_type;
-	if (n < BREAK_0) {
-		(void)fprintf(stderr,
-		    "random: not enough state (%d bytes); ignored.\n", n);
-		return(0);
-	}
-	if (n < BREAK_1) {
-		rand_type = TYPE_0;
-		rand_deg = DEG_0;
-		rand_sep = SEP_0;
-	} else if (n < BREAK_2) {
-		rand_type = TYPE_1;
-		rand_deg = DEG_1;
-		rand_sep = SEP_1;
-	} else if (n < BREAK_3) {
-		rand_type = TYPE_2;
-		rand_deg = DEG_2;
-		rand_sep = SEP_2;
-	} else if (n < BREAK_4) {
-		rand_type = TYPE_3;
-		rand_deg = DEG_3;
-		rand_sep = SEP_3;
-	} else {
-		rand_type = TYPE_4;
-		rand_deg = DEG_4;
-		rand_sep = SEP_4;
-	}
-	state = &(((long *)arg_state)[1]);	/* first location */
-	end_ptr = &state[rand_deg];	/* must set end_ptr before srandom */
-	srandom(seed);
-	if (rand_type == TYPE_0)
-		state[-1] = rand_type;
-	else
-		state[-1] = MAX_TYPES*(rptr - state) + rand_type;
-	return(ostate);
-}
-
-/*
- * setstate:
- *
- * Restore the state from the given state array.
- *
- * Note: it is important that we also remember the locations of the pointers
- * in the current state information, and restore the locations of the pointers
- * from the old state information.  This is done by multiplexing the pointer
- * location into the zeroeth word of the state information.
- *
- * Note that due to the order in which things are done, it is OK to call
- * setstate() with the same state as the current state.
- *
- * Returns a pointer to the old state information.
- */
-char *
-setstate(arg_state)
-	const char *arg_state;
-{
-	register long *new_state = (long *)arg_state;
-	register int type = new_state[0] % MAX_TYPES;
-	register int rear = new_state[0] / MAX_TYPES;
-	char *ostate = (char *)(&state[-1]);
-
-	if (rand_type == TYPE_0)
-		state[-1] = rand_type;
-	else
-		state[-1] = MAX_TYPES * (rptr - state) + rand_type;
-	switch(type) {
-	case TYPE_0:
-	case TYPE_1:
-	case TYPE_2:
-	case TYPE_3:
-	case TYPE_4:
-		rand_type = type;
-		rand_deg = degrees[type];
-		rand_sep = seps[type];
-		break;
-	default:
-		(void)fprintf(stderr,
-		    "random: state info corrupted; not changed.\n");
-	}
-	state = &new_state[1];
-	if (rand_type != TYPE_0) {
-		rptr = &state[rear];
-		fptr = &state[(rear + rand_sep) % rand_deg];
-	}
-	end_ptr = &state[rand_deg];		/* set end_ptr too */
-	return(ostate);
-}
-
-/*
- * random:
- *
- * If we are using the trivial TYPE_0 R.N.G., just do the old linear
- * congruential bit.  Otherwise, we do our fancy trinomial stuff, which is
- * the same in all the other cases due to all the global variables that have
- * been set up.  The basic operation is to add the number at the rear pointer
- * into the one at the front pointer.  Then both pointers are advanced to
- * the next location cyclically in the table.  The value returned is the sum
- * generated, reduced to 31 bits by throwing away the "least random" low bit.
- *
- * Note: the code takes advantage of the fact that both the front and
- * rear pointers can't wrap on the same call by not testing the rear
- * pointer if the front one has wrapped.
- *
- * Returns a 31-bit random number.
- */
-long
-random()
-{
-	long i;
-
-	if (rand_type == TYPE_0)
-		i = state[0] = (state[0] * 1103515245 + 12345) & 0x7fffffff;
-	else {
-		*fptr += *rptr;
-		i = (*fptr >> 1) & 0x7fffffff;	/* chucking least random bit */
-		if (++fptr >= end_ptr) {
-			fptr = state;
-			++rptr;
-		} else if (++rptr >= end_ptr)
-			rptr = state;
-	}
-	return(i);
-}
Index: trunk/minix/lib/other/rindex.c
===================================================================
--- trunk/minix/lib/other/rindex.c	(revision 9)
+++ 	(revision )
@@ -1,11 +1,0 @@
-#include <lib.h>
-/* rindex - find last occurrence of a character in a string  */
-
-#include <string.h>
-
-char *rindex(s, charwanted)	/* found char, or NULL if none */
-_CONST char *s;
-char charwanted;
-{
-  return(strrchr(s, charwanted));
-}
Index: trunk/minix/lib/other/setenv.c
===================================================================
--- trunk/minix/lib/other/setenv.c	(revision 9)
+++ 	(revision )
@@ -1,25 +1,0 @@
-
-#include	<stdlib.h>
-#include	<string.h>
-
-int
-setenv(const char *name, const char *val, int overwrite)
-{
-	char *bf;
-	int r;
-
-	if(!overwrite && getenv(name))
-		return 0;
-
-	if(!(bf=malloc(strlen(name)+strlen(val)+2)))
-		return -1;
-
-	strcpy(bf, name);
-	strcat(bf, "=");
-	strcat(bf, val);
-
-	r = putenv(bf);
-
-	return r == 0 ? 0 : -1;
-}
-
Index: trunk/minix/lib/other/setgroups.c
===================================================================
--- trunk/minix/lib/other/setgroups.c	(revision 9)
+++ 	(revision )
@@ -1,53 +1,0 @@
-/*
-setgroups.c
-*/
-
-#include <errno.h>
-#include <unistd.h>
-#include <string.h>
-#include <grp.h>
-
-int setgroups(int ngroups, const gid_t *gidset)
-{
-	if(ngroups > 1) {
-		/* Supplementary groups not implemented */
-		errno= EINVAL;
-		return -1;
-	}
-
-	if(ngroups == 1)
-		return setgid(gidset[0]);
-
-	return 0;
-}
-
-int initgroups(const char *name, gid_t basegid)
-{
-	struct group *gr;
-	int r, found = 0;
-	if((r = setgid(basegid)) < 0)
-		return r;
-
-	setgrent();
-	while (!found && (gr = getgrent()) != NULL) {
-		char **mem;
-		for(mem = gr->gr_mem; mem && *mem; mem++) {
-			if(!strcmp(name, *mem)) {
-				found = 1;
-				break;
-			}
-		}
-	}
-	endgrent();
-
-	/* Because supplemental groups aren't implemented, this call
-	 * should fail if the user is in any supplemental groups.
-	 */
-	if(found) {
-		errno = EINVAL;
-		return -1;
-	}
-
-	return 0;
-}
-
Index: trunk/minix/lib/other/settimeofday.c
===================================================================
--- trunk/minix/lib/other/settimeofday.c	(revision 9)
+++ 	(revision )
@@ -1,14 +1,0 @@
-/*
-settimeofday.c
-*/
-
-#define stime _stime
-
-#include <sys/time.h>
-#include <time.h>
-
-int settimeofday(const struct timeval *tp, const void *tzp)
-{
-	/* Ignore time zones */
-	return stime(&tp->tv_sec);
-}
Index: trunk/minix/lib/other/stderr.c
===================================================================
--- trunk/minix/lib/other/stderr.c	(revision 9)
+++ 	(revision )
@@ -1,14 +1,0 @@
-#include <lib.h>
-#include <sys/types.h>
-#include <unistd.h>
-
-_PROTOTYPE( void std_err, (char *s));
-
-void std_err(s)
-char *s;
-{
-  register char *p = s;
-
-  while (*p != 0) p++;
-  write(2, s, (int) (p - s));
-}
Index: trunk/minix/lib/other/strdup.c
===================================================================
--- trunk/minix/lib/other/strdup.c	(revision 9)
+++ 	(revision )
@@ -1,23 +1,0 @@
-/*
-lib/other/strdup.c
-*/
-
-#include <stdlib.h>
-#include <string.h>
-
-char *strdup(s1)
-const char *s1;
-{
-	size_t len;
-	char *s2;
-
-	len= strlen(s1)+1;
-
-	s2= malloc(len);
-	if (s2 == NULL)
-		return NULL;
-	strcpy(s2, s1);
-
-	return s2;
-}
-
Index: trunk/minix/lib/other/strtok_r.c
===================================================================
--- trunk/minix/lib/other/strtok_r.c	(revision 9)
+++ 	(revision )
@@ -1,169 +1,0 @@
-/*
- * Copyright (c) 1998 Softweyr LLC.  All rights reserved.
- *
- * strtok_r, from Berkeley strtok
- * Oct 13, 1998 by Wes Peters <wes@softweyr.com>
- *
- * Copyright (c) 1988, 1993
- *	The Regents of the University of California.  All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notices, this list of conditions and the following disclaimer.
- * 
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notices, this list of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the distribution.
- * 
- * 3. All advertising materials mentioning features or use of this software
- *    must display the following acknowledgement:
- *
- *	This product includes software developed by Softweyr LLC, the
- *      University of California, Berkeley, and its contributors.
- *
- * 4. Neither the name of the University nor the names of its contributors
- *    may be used to endorse or promote products derived from this software
- *    without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY SOFTWEYR LLC, THE REGENTS AND CONTRIBUTORS
- * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
- * PARTICULAR PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL SOFTWEYR LLC, THE
- * REGENTS, OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
- * TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
- * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
- * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
- * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef lint
-static const char rcsid[] =
-  "$FreeBSD: src/lib/libc/string/strtok.c,v 1.2.6.1 2001/07/09 23:30:07 obrien Exp $";
-#endif
-
-#include <stddef.h>
-#include <string.h>
-
-char *
-strtok_r(char *s, const char *delim, char **last)
-{
-    char *spanp;
-    int c, sc;
-    char *tok;
-
-    if (s == NULL && (s = *last) == NULL)
-    {
-	return NULL;
-    }
-
-    /*
-     * Skip (span) leading delimiters (s += strspn(s, delim), sort of).
-     */
-cont:
-    c = *s++;
-    for (spanp = (char *)delim; (sc = *spanp++) != 0; )
-    {
-	if (c == sc)
-	{
-	    goto cont;
-	}
-    }
-
-    if (c == 0)		/* no non-delimiter characters */
-    {
-	*last = NULL;
-	return NULL;
-    }
-    tok = s - 1;
-
-    /*
-     * Scan token (scan for delimiters: s += strcspn(s, delim), sort of).
-     * Note that delim must have one NUL; we stop if we see that, too.
-     */
-    for (;;)
-    {
-	c = *s++;
-	spanp = (char *)delim;
-	do
-	{
-	    if ((sc = *spanp++) == c)
-	    {
-		if (c == 0)
-		{
-		    s = NULL;
-		}
-		else
-		{
-		    char *w = s - 1;
-		    *w = '\0';
-		}
-		*last = s;
-		return tok;
-	    }
-	}
-	while (sc != 0);
-    }
-    /* NOTREACHED */
-}
-
-
-#if 0
-char *
-strtok(char *s, const char *delim)
-{
-    static char *last;
-
-    return strtok_r(s, delim, &last);
-}
-#endif
-
-#if defined(DEBUG_STRTOK)
-
-/*
- * Test the tokenizer.
- */
-int
-main()
-{
-    char test[80], blah[80];
-    char *sep = "\\/:;=-";
-    char *word, *phrase, *brkt, *brkb;
-
-    printf("String tokenizer test:\n");
-
-    strcpy(test, "This;is.a:test:of=the/string\\tokenizer-function.");
-
-    for (word = strtok(test, sep);
-	 word;
-	 word = strtok(NULL, sep))
-    {
-	printf("Next word is \"%s\".\n", word);
-    }
-
-    phrase = "foo";
-
-    strcpy(test, "This;is.a:test:of=the/string\\tokenizer-function.");
-
-    for (word = strtok_r(test, sep, &brkt);
-	 word;
-	 word = strtok_r(NULL, sep, &brkt))
-    {
-	strcpy(blah, "blah:blat:blab:blag");
-
-	for (phrase = strtok_r(blah, sep, &brkb);
-	     phrase;
-	     phrase = strtok_r(NULL, sep, &brkb))
-	{
-	    printf("So far we're at %s:%s\n", word, phrase);
-	}
-    }
-
-    return 0;
-}
-
-#endif /* DEBUG_STRTOK */
Index: trunk/minix/lib/other/swab.c
===================================================================
--- trunk/minix/lib/other/swab.c	(revision 9)
+++ 	(revision )
@@ -1,22 +1,0 @@
-#include <lib.h>
-/*  swab(3)
- *
- *  Author: Terrence W. Holm          Sep. 1988
- */
-_PROTOTYPE( void swab, (char *from, char *to, int count));
-
-void swab(from, to, count)
-char *from;
-char *to;
-int count;
-{
-  register char temp;
-
-  count >>= 1;
-
-  while (--count >= 0) {
-	temp = *from++;
-	*to++ = *from++;
-	*to++ = temp;
-  }
-}
Index: trunk/minix/lib/other/sys_eniop.c
===================================================================
--- trunk/minix/lib/other/sys_eniop.c	(revision 9)
+++ 	(revision )
@@ -1,14 +1,0 @@
-#include "../syslib/syslib.h"
-
-/*===========================================================================*
- *                               sys_enable_iop				     *    
- *===========================================================================*/
-PUBLIC int sys_enable_iop(proc_nr)
-int proc_nr;			/* number of process to allow I/O */
-{
-    message m_iop;
-    m_iop.IO_ENDPT = proc_nr;
-    return _taskcall(SYSTASK, SYS_IOPENABLE, &m_iop);
-}
-
-
Index: trunk/minix/lib/other/syscall.c
===================================================================
--- trunk/minix/lib/other/syscall.c	(revision 9)
+++ 	(revision )
@@ -1,22 +1,0 @@
-#include <lib.h>
-
-PUBLIC int _syscall(who, syscallnr, msgptr)
-int who;
-int syscallnr;
-register message *msgptr;
-{
-  int status;
-
-  msgptr->m_type = syscallnr;
-  status = _sendrec(who, msgptr);
-  if (status != 0) {
-	/* 'sendrec' itself failed. */
-	/* XXX - strerror doesn't know all the codes */
-	msgptr->m_type = status;
-  }
-  if (msgptr->m_type < 0) {
-	errno = -msgptr->m_type;
-	return(-1);
-  }
-  return(msgptr->m_type);
-}
Index: trunk/minix/lib/other/sysconf.c
===================================================================
--- trunk/minix/lib/other/sysconf.c	(revision 9)
+++ 	(revision )
@@ -1,55 +1,0 @@
-/* sysconf.c						POSIX 4.8.1
- *	long int sysconf(int name);
- *
- *	POSIX allows some of the values in <limits.h> to be increased at
- *	run time.  The sysconf() function allows such values to be checked
- *	at run time.  MINIX does not use this facility - the run time
- *	limits are those given in <limits.h>.
- */
-
-#include <lib.h>
-#include <unistd.h>
-#include <time.h>
-
-PUBLIC long int sysconf(name)
-int name;			/* property being inspected */
-{
-  switch(name) {
-	case _SC_ARG_MAX:
-		return (long) ARG_MAX;
-
-	case _SC_CHILD_MAX:
-		return (long) CHILD_MAX;
-
-	case _SC_CLK_TCK:
-		return (long) CLOCKS_PER_SEC;
-
-	case _SC_NGROUPS_MAX:
-		return (long) NGROUPS_MAX;
-
-	case _SC_OPEN_MAX:
-		return (long) OPEN_MAX;
-
-	case _SC_JOB_CONTROL:
-		return -1L;			/* no job control */
-
-	case _SC_SAVED_IDS:
-		return -1L;			/* no saved uid/gid */
-
-	case _SC_VERSION:
-		return (long) _POSIX_VERSION;
-
-	case _SC_STREAM_MAX:
-		return (long) STREAM_MAX;
-
-	case _SC_TZNAME_MAX:
-		return (long) TZNAME_MAX;
-
-	case _SC_PAGESIZE:
-		return getpagesize();
-
-	default:
-		errno = EINVAL;
-		return -1L;
-  }
-}
Index: trunk/minix/lib/other/syslog.c
===================================================================
--- trunk/minix/lib/other/syslog.c	(revision 9)
+++ 	(revision )
@@ -1,167 +1,0 @@
-/* Copyright (c) 1983, 1988, 1993
- * The Regents of the University of California.  All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- *    must display the following acknowledgement:
- *      This product includes software developed by the University of
- *      California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- *    may be used to endorse or promote products derived from this software
- *    without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * #if defined(LIBC_SCCS) && !defined(lint)
- * static char sccsid[] = "@(#)syslog.c    8.4 (Berkeley) 3/18/94";
- * #endif
- *
- * Author: Eric Allman
- * Modified to use UNIX domain IPC by Ralph Campbell
- * Patched March 12, 1996 by A. Ian Vogelesang <vogelesang@hdshq.com>
- * Rewritten by Martin Mares <mj@atrey.karlin.mff.cuni.cz> on May 14, 1997
- * Rewritten by G. Falzoni <gfalzoni@inwind.it> for porting to Minix
- *
- * $Id: syslog.c,v 1.2 2006/04/03 15:03:07 beng Exp $
- */
-#include <sys/types.h>
-#include <stdlib.h>
-#include <stdio.h>
-#include <string.h>
-#include <stdarg.h>
-#include <time.h>
-#include <fcntl.h>
-#include <unistd.h>
-#include <syslog.h>
-#include <sys/ioctl.h>
-#include <net/netlib.h>
-#include <net/hton.h>
-#include <net/gen/in.h>
-#include <net/gen/udp.h>
-#include <net/gen/udp_io.h>
-#include <net/gen/netdb.h>
-#include <errno.h>
-#include <net/gen/inet.h>
-
-static int LogPid = (-1);
-static int nfd = (-1);
-static int LogFacility = LOG_USER;
-static int LogFlags = 0;
-static char TagBuffer[40] = "syslog";
-
-/*
-** OPENLOG -- open system log
-** 	- establishes a channel to syslogd using UDP device
-**	  (port 514 is used _ syslog/udp)
-**	- stores program tag (if not NULL) and other options
-**	  for use by syslog
-*/
-void openlog(const char *ident, int option, int facility)
-{
-  struct nwio_udpopt udpopt;
-
-  /* Stores logging flags */
-  LogFlags = option & (LOG_PID | LOG_PERROR | LOG_CONS);
-  /* Stores process id. if LOG_PID was specified */
-  if (option & LOG_PID) LogPid = getpid();
-  /* Stores the requested facility */
-  LogFacility = facility;
-  /* Stores log tag if supplied */
-  if (ident != NULL && *ident != '0' && ident != TagBuffer) {
-	strncpy(TagBuffer, ident, sizeof(TagBuffer));
-	TagBuffer[sizeof(TagBuffer) - 1] = '0';
-  }
-
-  /* Opens channel to syslog daemon via UDP device */
-  /* Static values used to minimize code */
-  if (option & LOG_NDELAY) {
-	/* Opens UDP device */
-	if ((nfd = open(UDP_DEVICE, O_RDWR)) < 0) {
-		 /* Report error */ ;
-	}
-	/* Sets options for UDP device */
-	udpopt.nwuo_flags = NWUO_SHARED | NWUO_LP_SET | NWUO_DI_LOC |
-		NWUO_DI_BROAD | NWUO_RP_SET | NWUO_RA_SET |
-		NWUO_RWDATONLY | NWUO_DI_IPOPT;
-	udpopt.nwuo_locaddr = udpopt.nwuo_remaddr = htonl(0x7F000001L);
-	udpopt.nwuo_locport = udpopt.nwuo_remport = htons(514);
-	if (ioctl(nfd, NWIOSUDPOPT, &udpopt) < 0 ||
-	    ioctl(nfd, NWIOGUDPOPT, &udpopt) < 0) {
-		 /* Report error */ ;
-	}
-  }
-  return;
-}
-
-/*
-**  SYSLOG -- print message on log file
-**
-**  This routine looks a lot like printf, except that it outputs to the
-**  log file instead of the standard output.  Also:
-**	- adds a timestamp,
-**	- prints the module name in front of the message,
-**	- has some other formatting types (or will sometime),
-**	- adds a newline on the end of the message.
-**
-** The output of this routine is intended to be read by syslogd(8).
-*/
-void syslog(int lprty, const char *msg,...)
-{
-  time_t now;
-  char buff[512];
-  int len, rc;
-  va_list ap;
-
-  /* First log message open chnnel to syslog */
-  if (nfd < 0) openlog(TagBuffer, LogFlags | LOG_NDELAY, LogFacility);
-  time(&now);
-  len = sprintf(buff, "<%d>%.15s %s: ",
-		LogFacility | lprty, ctime(&now) + 4, TagBuffer);
-  if (LogFlags & LOG_PID) {
-	len -= 2;
-	len += sprintf(buff + len, "[%d]: ", LogPid);
-  }
-  va_start(ap, msg);
-  len += vsprintf(buff + len, msg, ap);
-  va_end(ap);
-  rc = write(nfd, buff, len);
-  if ((rc != len && LogFlags & LOG_CONS) || LogFlags & LOG_PERROR) {
-	write(STDERR_FILENO, buff, len);
-	write(STDERR_FILENO, "\n", 1);
-  }
-  return;
-}
-
-/*
-**  CLOSELOG -- close access to syslogd
-**	- closes UDP channel
-**	- restores default values
-*/
-void closelog(void)
-{
-
-  close(nfd);
-  LogPid = nfd = -1;
-  LogFacility = LOG_USER;
-  LogFlags = 0;
-  return;
-}
-
-/** syslog.c **/
Index: trunk/minix/lib/other/taskcall.c
===================================================================
--- trunk/minix/lib/other/taskcall.c	(revision 9)
+++ 	(revision )
@@ -1,20 +1,0 @@
-/* _taskcall() is the same as _syscall() except it returns negative error
- * codes directly and not in errno.  This is a better interface for MM and
- * FS.
- */
-
-#include <lib.h>
-#include <minix/syslib.h>
-
-PUBLIC int _taskcall(who, syscallnr, msgptr)
-int who;
-int syscallnr;
-register message *msgptr;
-{
-  int status;
-
-  msgptr->m_type = syscallnr;
-  status = _sendrec(who, msgptr);
-  if (status != 0) return(status);
-  return(msgptr->m_type);
-}
Index: trunk/minix/lib/other/telldir.c
===================================================================
--- trunk/minix/lib/other/telldir.c	(revision 9)
+++ 	(revision )
@@ -1,16 +1,0 @@
-/*	telldir()					Author: Kees J. Bot
- *								24 Apr 1989
- */
-#define nil 0
-#include <lib.h>
-#include <sys/types.h>
-#include <dirent.h>
-#include <errno.h>
-
-off_t telldir(DIR *dp)
-/* Return the current read position in a directory. */
-{
-	if (dp == nil) { errno= EBADF; return -1; }
-
-	return dp->_pos;
-}
Index: trunk/minix/lib/other/termcap.c
===================================================================
--- trunk/minix/lib/other/termcap.c	(revision 9)
+++ 	(revision )
@@ -1,325 +1,0 @@
-/*
- *	termcap.c	V1.1	20/7/87		agc	Joypace Ltd
- *
- *	Copyright Joypace Ltd, London, UK, 1987. All rights reserved.
- *	This file may be freely distributed provided that this notice
- *	remains attached.
- *
- *	A public domain implementation of the termcap(3) routines.
- *
- *
- *
- *	 Klamer Schutte	      V1.2    Nov. 1988
- *
- *   - Can match multiple terminal names		 [tgetent]
- *   - Removal of **area assignments			 [tgetstr]
- *
- *	 Terrence W. Holm     V1.3    May, Sep, Oct.  1988
- *
- *   - Correct when TERM != name and TERMCAP is defined	 [tgetent]
- *   - Correct the comparison for the terminal name 	 [tgetent]
- *   - Correct the value of ^x escapes              	 [tgetstr]
- *   - Added %r to reverse row/column			 [tgoto]
- *   - Fixed end of definition test			 [tgetnum/flag/str]
- *
- *	 Terrence W. Holm     V1.4    Jan. 1989
- *
- *   - Incorporated Klamer's V1.2 fixes into V1.3
- *   - Added %d, (old %d is now %2)			 [tgoto]
- *   - Allow '#' comments in definition file		 [tgetent]
- */
-
-#include <lib.h>
-#include <termcap.h>
-#include <ctype.h>
-#include <stdlib.h>
-#include <string.h>
-#include <stdio.h>
-
-char *capab = (char *)NULL;		/* the capability itself */
-
-#if 0
-/*  The following are not yet used.  */
-extern short ospeed;		/* output speed */
-extern char PC;			/* padding character */
-extern char *BC;		/* back cursor movement */
-extern char *UP;		/* up cursor movement */
-#endif
-
-/*
- *	tgetent - get the termcap entry for terminal name, and put it
- *	in bp (which must be an array of 1024 chars). Returns 1 if
- *	termcap entry found, 0 if not found, and -1 if file not found.
- */
-
-int tgetent(bp, name)
-char *bp;
-char *name;
-{
-  FILE *fp;
-  char *file;
-  char *term;
-  short len = strlen(name);
-
-  capab = bp;
-
-  /* If TERMCAP begins with a '/' then use TERMCAP as the path	 */
-  /* Name of the termcap definitions file. If TERMCAP is a	 */
-  /* Definition and TERM equals "name" then use TERMCAP as the	 */
-  /* Definition. Otherwise use "/etc/termcap" as the path name.	 */
-
-  if ((file = getenv("TERMCAP")) == (char *)NULL)
-	file = "/etc/termcap";
-  else if (*file != '/')
-	if ((term = getenv("TERM")) != (char *)NULL && strcmp(term, name) == 0) {
-		*bp = '\0';
-		strncat(bp, file, 1023);
-		return(1);
-	} else
-		file = "/etc/termcap";
-
-  if ((fp = fopen(file, "r")) == (FILE *) NULL) {
-	capab = (char *)NULL;		/* no valid termcap  */
-	return(-1);
-  }
-  for (;;) {
-	/* Read in each definition */
-	int def_len = 0;
-	char *cp = bp;
-
-	do {
-		if (fgets(&bp[def_len], (unsigned int)(1024 - def_len), fp) == (char *)NULL) {
-			fclose(fp);
-			capab = (char *)NULL;	/* no valid termcap */
-			return(0);
-		}
-		def_len = strlen(bp) - 2;
-	} while (bp[def_len] == '\\');
-
-	while (isspace(*cp)) cp++;
-
-	/* Comment lines start with a '#'  */
-	if (*cp == '#') continue;
-
-	/* See if any of the terminal names in this definition */
-	/* Match "name".						 */
-
-	do {
-		if (strncmp(name, cp, len) == 0 &&
-		    (cp[len] == '|' || cp[len] == ':')) {
-			fclose(fp);
-			return(1);
-		}
-		while ((*cp) && (*cp != '|') && (*cp != ':')) cp++;
-	} while (*cp++ == '|');
-  }
-}
-
-
-/*
- *	tgetnum - get the numeric terminal capability corresponding
- *	to id. Returns the value, -1 if invalid.
- */
-
-int tgetnum(id)
-char *id;
-{
-  register char *cp = capab;
-
-  if (cp == (char *)NULL || id == (char *)NULL) return(-1);
-
-  for (;;) {
-	while (*cp++ != ':')
-		if (cp[-1] == '\0') return(-1);
-
-	while (isspace(*cp)) cp++;
-
-	if (strncmp(cp, id, 2) == 0 && cp[2] == '#') return(atoi(cp + 3));
-  }
-}
-
-
-/*
- *	tgetflag - get the boolean flag corresponding to id. Returns -1
- *	if invalid, 0 if the flag is not in termcap entry, or 1 if it is
- *	present.
- */
-
-int tgetflag(id)
-char *id;
-{
-  register char *cp = capab;
-
-  if (cp == (char *)NULL || id == (char *)NULL) return(-1);
-
-  for (;;) {
-	while (*cp++ != ':')
-		if (cp[-1] == '\0') return(0);
-
-	while (isspace(*cp)) cp++;
-
-	if (strncmp(cp, id, 2) == 0) return(1);
-  }
-}
-
-
-/*
- *	tgetstr - get the string capability corresponding to id and place
- *	it in area (advancing area at same time). Expand escape sequences
- *	etc. Returns the string, or NULL if it can't do it.
- */
-
-char *tgetstr(id, area)
-char *id;
-char **area;
-{
-  register char *cp = capab;
-  register char *wsp = *area;	/* workspace pointer  */
-
-  if (cp == (char *)NULL || id == (char *)NULL) return((char *)NULL);
-
-  for (;;) {
-	while (*cp++ != ':')
-		if (cp[-1] == '\0') return((char *)NULL);
-
-	while (isspace(*cp)) cp++;
-
-	if (strncmp(cp, id, 2) == 0 && cp[2] == '=') {
-		for (cp += 3; *cp && *cp != ':'; wsp++, cp++) switch (*cp) {
-			    case '^':
-				*wsp = *++cp - '@';
-				break;
-
-			    case '\\':
-				switch (*++cp) {
-				    case 'E':
-					*wsp = '\033';
-					break;
-				    case 'n':
-					*wsp = '\n';
-					break;
-				    case 'r':
-					*wsp = '\r';
-					break;
-				    case 't':
-					*wsp = '\t';
-					break;
-				    case 'b':
-					*wsp = '\b';
-					break;
-				    case 'f':
-					*wsp = '\f';
-					break;
-				    case '0':
-				    case '1':
-				    case '2':
-				    case '3':
-					{
-						int i;
-						int t = 0;
-						for (i = 0; i < 3 &&
-						     isdigit(*cp); ++i, ++cp)
-							t = t * 8 + *cp - '0';
-						*wsp = t;
-						cp--;
-						break;
-					}
-				    default:
-					*wsp = *cp;
-				}
-				break;
-
-			    default:	*wsp = *cp;
-  			}
-
-		*wsp++ = '\0';
-
-		{
-			char *ret = *area;
-			*area = wsp;
-			return(ret);
-		}
-	}
-  }				/* end for(;;) */
-}
-
-
-
-/*
- *	tgoto - given the cursor motion string cm, make up the string
- *	for the cursor to go to (destcol, destline), and return the string.
- *	Returns "OOPS" if something's gone wrong, or the string otherwise.
- */
-
-char *tgoto(cm, destcol, destline)
-char *cm;
-int destcol;
-int destline;
-{
-  PRIVATE char ret[24];
-  char *rp = ret;
-  int incr = 0;
-  int argno = 0;
-  int numval;
-
-  for (; *cm; cm++) {
-	if (*cm == '%') {
-		switch (*++cm) {
-		    case 'i':	incr = 1;	  			break;
-
-		    case 'r':	argno = 1;	  			break;
-
-		    case '+':
-			numval = (argno == 0 ? destline : destcol);
-			*rp++ = numval + incr + *++cm;
-			argno = 1 - argno;
-			break;
-
-		    case '2':
-			numval = (argno == 0 ? destline : destcol);
-			numval = (numval + incr) % 100;
-			*rp++ = '0' + (numval / 10);
-			*rp++ = '0' + (numval % 10);
-			argno = 1 - argno;
-			break;
-
-		    case 'd':
-			numval = (argno == 0 ? destline : destcol);
-			numval = (numval + incr) % 1000;
-			if (numval > 99) *rp++ = '0' + (numval / 100);
-			if (numval > 9) *rp++ = '0' + (numval / 10) % 10;
-			*rp++ = '0' + (numval % 10);
-			argno = 1 - argno;
-			break;
-
-		    case '%':	*rp++ = '%';	  			break;
-
-		    default:	return("OOPS");
-  		}
-
-	} else
-		*rp++ = *cm;
-  }
-
-  *rp = '\0';
-  return(ret);
-}
-
-
-
-/*
- *	tputs - put the string cp out onto the terminal, using the function
- *	outc. This should do padding for the terminal, but I can't find a
- *	terminal that needs padding at the moment...
- */
-
-int tputs(cp, affcnt, outc)
-register char *cp;
-int affcnt;
-_PROTOTYPE( void (*outc), (int ch));
-{
-  if (cp == (char *)NULL) return(1);
-  /* Do any padding interpretation - left null for MINIX just now */
-  while (*cp) (*outc) (*cp++);
-  return(1);
-}
Index: trunk/minix/lib/other/ttyname.c
===================================================================
--- trunk/minix/lib/other/ttyname.c	(revision 9)
+++ 	(revision )
@@ -1,53 +1,0 @@
-/* ttyname.c						POSIX 4.7.2
- *	char *ttyname(int fildes);
- *
- *	Determines name of a terminal device.
- */
-
-#include <lib.h>
-#include <sys/stat.h>
-#include <dirent.h>
-#include <fcntl.h>
-#include <stddef.h>
-#include <string.h>
-#include <unistd.h>
-
-PRIVATE char base[] = "/dev";
-PRIVATE char path[sizeof(base) + 1 + NAME_MAX];	/* extra 1 for '/' */
-
-PUBLIC char *ttyname(fildes)
-int fildes;
-{
-  DIR *devices;
-  struct dirent *entry;
-  struct stat tty_stat;
-  struct stat dev_stat;
-
-  /* Simple first test: file descriptor must be a character device */
-  if (fstat(fildes, &tty_stat) < 0 || !S_ISCHR(tty_stat.st_mode))
-	return (char *) NULL;
-
-  /* Open device directory for reading  */
-  if ((devices = opendir(base)) == (DIR *) NULL)
-	return (char *) NULL;
-
-  /* Scan the entries for one that matches perfectly */
-  while ((entry = readdir(devices)) != (struct dirent *) NULL) {
-	if (tty_stat.st_ino != entry->d_ino)
-		continue;
-	strcpy(path, base);
-	strcat(path, "/");
-	strcat(path, entry->d_name);
-	if (stat(path, &dev_stat) < 0 || !S_ISCHR(dev_stat.st_mode))
-		continue;
-	if (tty_stat.st_ino == dev_stat.st_ino &&
-	    tty_stat.st_dev == dev_stat.st_dev &&
-	    tty_stat.st_rdev == dev_stat.st_rdev) {
-		closedir(devices);
-		return path;
-	}
-  }
-
-  closedir(devices);
-  return (char *) NULL;
-}
Index: trunk/minix/lib/other/ttyslot.c
===================================================================
--- trunk/minix/lib/other/ttyslot.c	(revision 9)
+++ 	(revision )
@@ -1,62 +1,0 @@
-/*
-ttyslot.c
-
-Return the index in the utmp file for the current user's terminal. The 
-current user's terminal is the first file descriptor in the range 0..2
-for which ttyname() returns a name. The index is the line number in the
-/etc/ttytab file. 0 will be returned in case of an error.
-
-Created:	Oct 11, 1992 by Philip Homburg
-*/
-
-#define _MINIX_SOURCE
-
-#include <sys/types.h>
-#include <ttyent.h>
-#include <string.h>
-#include <unistd.h>
-
-int ttyslot()
-{
-	int slot;
-
-	slot= fttyslot(0);
-	if (slot == 0) slot= fttyslot(1);
-	if (slot == 0) slot= fttyslot(2);
-	return slot;
-}
-
-int fttyslot(fd)
-int fd;
-{
-	char *tname;
-	int lineno;
-	struct ttyent *ttyp;
-
-	tname= ttyname(fd);
-	if (tname == NULL) return 0;
-
-	/* Assume that tty devices are in /dev */
-	if (strncmp(tname, "/dev/", 5) != 0)
-		return 0;	/* Malformed tty name. */
-	tname += 5;
-
-	/* Scan /etc/ttytab. */
-	lineno= 1;
-	while ((ttyp= getttyent()) != NULL)
-	{
-		if (strcmp(tname, ttyp->ty_name) == 0)
-		{
-			endttyent();
-			return lineno;
-		}
-		lineno++;
-	}
-	/* No match */
-	endttyent();
-	return 0;
-}
-
-/*
- * $PchHeader: /mount/hd2/minix/lib/misc/RCS/ttyslot.c,v 1.3 1994/12/22 13:49:12 philip Exp $
- */
Index: trunk/minix/lib/other/un-namespace.h
===================================================================
--- trunk/minix/lib/other/un-namespace.h	(revision 9)
+++ 	(revision )
@@ -1,153 +1,0 @@
-/*
- * Copyright (c) 2001 Daniel Eischen <deischen@FreeBSD.org>.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * $FreeBSD: src/lib/libc/include/un-namespace.h,v 1.13 2003/05/01 19:03:13 nectar Exp $
- */
-
-#ifndef _UN_NAMESPACE_H_
-#define _UN_NAMESPACE_H_
-
-#undef		accept
-#undef		__acl_aclcheck_fd
-#undef		__acl_delete_fd
-#undef		__acl_get_fd
-#undef		__acl_set_fd
-#undef		bind
-#undef		__cap_get_fd
-#undef		__cap_set_fd
-#undef		close
-#undef		connect
-#undef		dup
-#undef		dup2
-#undef		execve
-#undef		fcntl
-#undef		flock
-#undef		flockfile
-#undef		fpathconf
-#undef		fstat
-#undef		fstatfs
-#undef		fsync
-#undef		funlockfile
-#undef		getdirentries
-#undef		getlogin
-#undef		getpeername
-#undef		getprogname
-#undef		getsockname
-#undef		getsockopt
-#undef		ioctl
-#undef		kevent
-#undef		listen
-#undef		nanosleep
-#undef		open
-#undef		poll
-#undef		pthread_cond_broadcast
-#undef		pthread_cond_destroy
-#undef		pthread_cond_init
-#undef		pthread_cond_signal
-#undef		pthread_cond_timedwait
-#undef		pthread_cond_wait
-#undef		pthread_exit
-#undef		pthread_getspecific
-#undef		pthread_key_create
-#undef		pthread_key_delete
-#undef		pthread_main_np
-#undef		pthread_mutex_destroy
-#undef		pthread_mutex_init
-#undef		pthread_mutex_lock
-#undef		pthread_mutex_trylock
-#undef		pthread_mutex_unlock
-#undef		pthread_mutexattr_init
-#undef		pthread_mutexattr_destroy
-#undef		pthread_mutexattr_settype
-#undef		pthread_once
-#undef		pthread_rwlock_destroy
-#undef		pthread_rwlock_init
-#undef		pthread_rwlock_rdlock
-#undef		pthread_rwlock_wrlock
-#undef		pthread_rwlock_tryrdlock
-#undef		pthread_rwlock_trywrlock
-#undef		pthread_rwlock_unlock
-#undef		pthread_self
-#undef		pthread_setspecific
-#undef		pthread_sigmask
-#undef		read
-#undef		readv
-#undef		recvfrom
-#undef		recvmsg
-#undef		select
-#undef		sendmsg
-#undef		sendto
-#undef		setsockopt
-#undef		sigaction
-#undef		sigprocmask
-#undef		sigsuspend
-#undef		socket
-#undef		socketpair
-#undef		wait4
-#undef		waitpid
-#undef		write
-#undef		writev
-
-#if 0
-#undef		creat
-#undef		fchflags
-#undef		fchmod
-#undef		ftrylockfile
-#undef		msync
-#undef		nfssvc
-#undef		pause
-#undef		pthread_rwlockattr_init
-#undef		pthread_rwlockattr_destroy
-#undef		sched_yield
-#undef		sendfile
-#undef		shutdown
-#undef		sigaltstack
-#undef		sigpending
-#undef		sigreturn
-#undef		sigsetmask
-#undef		sleep
-#undef		system
-#undef		tcdrain
-#undef		wait
-#endif	/* 0 */
-
-#ifdef _SIGNAL_H_
-int     	_sigaction(int, const struct sigaction *, struct sigaction *);
-#endif
-
-#ifdef _SYS_EVENT_H_
-int		_kevent(int, const struct kevent *, int, struct kevent *,
-		    int, const struct timespec *);
-#endif
-
-#ifdef _SYS_FCNTL_H_
-int		_flock(int, int);
-#endif
-
-#undef		err
-#undef		warn
-#undef		nsdispatch
-
-#endif	/* _UN_NAMESPACE_H_ */
Index: trunk/minix/lib/other/v8regerror.c
===================================================================
--- trunk/minix/lib/other/v8regerror.c	(revision 9)
+++ 	(revision )
@@ -1,15 +1,0 @@
-/*	regerror() - Default regexp error report	Author: Kees J. Bot
- *								12 Jun 1999
- *
- * A better version of this routine should be supplied by the user in
- * the program using regexps.
- */
-#include <stdio.h>
-#define const		/* avoid "const poisoning" */
-#include <regexp.h>
-#undef const
-
-void regerror(char *message)
-{
-	fprintf(stderr, "regexp error: %s\n", message);
-}
Index: trunk/minix/lib/other/v8regexp.c
===================================================================
--- trunk/minix/lib/other/v8regexp.c	(revision 9)
+++ 	(revision )
@@ -1,1075 +1,0 @@
-/* regcomp and regexec -- regsub and regerror are elsewhere
- *
- *	Copyright (c) 1986 by University of Toronto.
- *	Written by Henry Spencer.  Not derived from licensed software.
- *
- *	Permission is granted to anyone to use this software for any
- *	purpose on any computer system, and to redistribute it freely,
- *	subject to the following restrictions:
- *
- *	1. The author is not responsible for the consequences of use of
- *		this software, no matter how awful, even if they arise
- *		from defects in it.
- *
- *	2. The origin of this software must not be misrepresented, either
- *		by explicit claim or by omission.
- *
- *	3. Altered versions must be plainly marked as such, and must not
- *		be misrepresented as being the original software.
- *
- * Beware that some of this code is subtly aware of the way operator
- * precedence is structured in regular expressions.  Serious changes in
- * regular-expression syntax might require a total rethink.
- *
- *	The third parameter to regexec was added by Martin C. Atkins.
- *	Andy Tanenbaum also made some changes.
- */
-
-#include <stdlib.h>
-#include <string.h>
-#include <stdio.h>
-#define const		/* avoid "const poisoning" */
-#include <regexp.h>
-#undef const
-
-/* The first byte of the regexp internal "program" is actually this magic
- * number; the start node begins in the second byte.
- */
-#define	MAGIC	0234
-
-/* The "internal use only" fields in regexp.h are present to pass info from
- * compile to execute that permits the execute phase to run lots faster on
- * simple cases.  They are:
- *
- * regstart	char that must begin a match; '\0' if none obvious
- * reganch	is the match anchored (at beginning-of-line only)?
- * regmust	string (pointer into program) that match must include, or NULL
- * regmlen	length of regmust string
- *
- * Regstart and reganch permit very fast decisions on suitable starting points
- * for a match, cutting down the work a lot.  Regmust permits fast rejection
- * of lines that cannot possibly match.  The regmust tests are costly enough
- * that regcomp() supplies a regmust only if the r.e. contains something
- * potentially expensive (at present, the only such thing detected is * or +
- * at the start of the r.e., which can involve a lot of backup).  Regmlen is
- * supplied because the test in regexec() needs it and regcomp() is computing
- * it anyway.
- */
-
-/* Structure for regexp "program".  This is essentially a linear encoding
- * of a nondeterministic finite-state machine (aka syntax charts or
- * "railroad normal form" in parsing technology).  Each node is an opcode
- * plus a "next" pointer, possibly plus an operand.  "Next" pointers of
- * all nodes except BRANCH implement concatenation; a "next" pointer with
- * a BRANCH on both ends of it is connecting two alternatives.  (Here we
- * have one of the subtle syntax dependencies:  an individual BRANCH (as
- * opposed to a collection of them) is never concatenated with anything
- * because of operator precedence.)  The operand of some types of node is
- * a literal string; for others, it is a node leading into a sub-FSM.  In
- * particular, the operand of a BRANCH node is the first node of the branch.
- * (NB this is *not* a tree structure:  the tail of the branch connects
- * to the thing following the set of BRANCHes.)  The opcodes are:
- */
-
-/* Definition	number	opnd?	meaning */
-#define	END	0		/* no	End of program. */
-#define	BOL	1		/* no	Match "" at beginning of line. */
-#define	EOL	2		/* no	Match "" at end of line. */
-#define	ANY	3		/* no	Match any one character. */
-#define	ANYOF	4		/* str	Match any character in this string. */
-#define	ANYBUT	5		/* str	Match any character not in this
-			 * string. */
-#define	BRANCH	6		/* node	Match this alternative, or the
-			 * next... */
-#define	BACK	7		/* no	Match "", "next" ptr points backward. */
-#define	EXACTLY	8		/* str	Match this string. */
-#define	NOTHING	9		/* no	Match empty string. */
-#define	STAR	10		/* node	Match this (simple) thing 0 or more
-			 * times. */
-#define	PLUS	11		/* node	Match this (simple) thing 1 or more
-			 * times. */
-#define	OPEN	20		/* no	Mark this point in input as start of
-			 * #n. */
- /* OPEN+1 is number 1, etc. */
-#define	CLOSE	30		/* no	Analogous to OPEN. */
-
-/* Opcode notes:
- *
- * BRANCH	The set of branches constituting a single choice are hooked
- *		together with their "next" pointers, since precedence prevents
- *		anything being concatenated to any individual branch.  The
- *		"next" pointer of the last BRANCH in a choice points to the
- *		thing following the whole choice.  This is also where the
- *		final "next" pointer of each individual branch points; each
- *		branch starts with the operand node of a BRANCH node.
- *
- * BACK		Normal "next" pointers all implicitly point forward; BACK
- *		exists to make loop structures possible.
- *
- * STAR,PLUS	'?', and complex '*' and '+', are implemented as circular
- *		BRANCH structures using BACK.  Simple cases (one character
- *		per match) are implemented with STAR and PLUS for speed
- *		and to minimize recursive plunges.
- *
- * OPEN,CLOSE	...are numbered at compile time.
- */
-
-/* A node is one char of opcode followed by two chars of "next" pointer.
- * "Next" pointers are stored as two 8-bit pieces, high order first.  The
- * value is a positive offset from the opcode of the node containing it.
- * An operand, if any, simply follows the node.  (Note that much of the
- * code generation knows about this implicit relationship.)
- *
- * Using two bytes for the "next" pointer is vast overkill for most things,
- * but allows patterns to get big without disasters.
- */
-#define	OP(p)	(*(p))
-#define	NEXT(p)	(((*((p)+1)&0377)<<8) + (*((p)+2)&0377))
-#define	OPERAND(p)	((p) + 3)
-
-/* Utility definitions.
- */
-#ifndef CHARBITS
-#define	UCHARAT(p)	((int)*(unsigned char *)(p))
-#else
-#define	UCHARAT(p)	((int)*(p)&CHARBITS)
-#endif
-
-#define	CFAIL(m)	{ regerror(m); return((char *)NULL); }
-#define	RFAIL(m)	{ regerror(m); return((regexp *)NULL); }
-#define	ISMULT(c)	((c) == '*' || (c) == '+' || (c) == '?')
-#define	META	"^$.[()|?+*\\"
-
-/* Flags to be passed up and down.
- */
-#define	HASWIDTH	01	/* Known never to match null string. */
-#define	SIMPLE		02	/* Simple enough to be STAR/PLUS operand. */
-#define	SPSTART		04	/* Starts with * or +. */
-#define	WORST		0	/* Worst case. */
-
-/* Global work variables for regcomp().
- */
-static char *regparse;		/* Input-scan pointer. */
-static int regnpar;		/* () count. */
-static char regdummy;
-static char *regcode;		/* Code-emit pointer; &regdummy = don't. */
-static long regsize;		/* Code size. */
-
-/* Forward declarations for regcomp()'s friends.
- */
-static char *reg(int paren, int *flagp);
-static char *regbranch(int *flagp);
-static char *regpiece(int *flagp);
-static char *regatom(int *flagp);
-static char *regnode(int op);
-static char *regnext(char *p);
-static void regc(int b);
-static void reginsert(int op, char *opnd);
-static void regtail(char *p, char *val);
-static void regoptail(char *p, char *val);
-
-/*
- - regcomp - compile a regular expression into internal code
- *
- * We can't allocate space until we know how big the compiled form will be,
- * but we can't compile it (and thus know how big it is) until we've got a
- * place to put the code.  So we cheat:  we compile it twice, once with code
- * generation turned off and size counting turned on, and once "for real".
- * This also means that we don't allocate space until we are sure that the
- * thing really will compile successfully, and we never have to move the
- * code and thus invalidate pointers into it.  (Note that it has to be in
- * one piece because free() must be able to free it all.)
- *
- * Beware that the optimization-preparation code in here knows about some
- * of the structure of the compiled regexp.
- */
-regexp *regcomp(exp)
-char *exp;
-{
-  register regexp *r;
-  register char *scan;
-  register char *longest;
-  register int len;
-  int flags;
-
-  if (exp == (char *)NULL) RFAIL("NULL argument");
-
-  /* First pass: determine size, legality. */
-  regparse = exp;
-  regnpar = 1;
-  regsize = 0L;
-  regcode = &regdummy;
-  regc(MAGIC);
-  if (reg(0, &flags) == (char *)NULL) return((regexp *)NULL);
-
-  /* Small enough for pointer-storage convention? */
-  if (regsize >= 32767L)	/* Probably could be 65535L. */
-	RFAIL("regexp too big");
-
-  /* Allocate space. */
-  r = (regexp *) malloc(sizeof(regexp) + (unsigned) regsize);
-  if (r == (regexp *)NULL) RFAIL("out of space");
-
-  /* Second pass: emit code. */
-  regparse = exp;
-  regnpar = 1;
-  regcode = r->program;
-  regc(MAGIC);
-  if (reg(0, &flags) == (char *)NULL) return((regexp *)NULL);
-
-  /* Dig out information for optimizations. */
-  r->regstart = '\0';		/* Worst-case defaults. */
-  r->reganch = 0;
-  r->regmust = (char *)NULL;
-  r->regmlen = 0;
-  scan = r->program + 1;	/* First BRANCH. */
-  if (OP(regnext(scan)) == END) {	/* Only one top-level choice. */
-	scan = OPERAND(scan);
-
-	/* Starting-point info. */
-	if (OP(scan) == EXACTLY)
-		r->regstart = *OPERAND(scan);
-	else if (OP(scan) == BOL)
-		r->reganch++;
-
-	/* If there's something expensive in the r.e., find the
-	 * longest literal string that must appear and make it the
-	 * regmust.  Resolve ties in favor of later strings, since
-	 * the regstart check works with the beginning of the r.e.
-	 * and avoiding duplication strengthens checking.  Not a
-	 * strong reason, but sufficient in the absence of others. */
-	if (flags & SPSTART) {
-		longest = (char *)NULL;
-		len = 0;
-		for (; scan != (char *)NULL; scan = regnext(scan))
-			if (OP(scan) == EXACTLY && strlen(OPERAND(scan)) >= len) {
-				longest = OPERAND(scan);
-				len = strlen(OPERAND(scan));
-			}
-		r->regmust = longest;
-		r->regmlen = len;
-	}
-  }
-  return(r);
-}
-
-/*
- - reg - regular expression, i.e. main body or parenthesized thing
- *
- * Caller must absorb opening parenthesis.
- *
- * Combining parenthesis handling with the base level of regular expression
- * is a trifle forced, but the need to tie the tails of the branches to what
- * follows makes it hard to avoid.
- */
-static char *reg(paren, flagp)
-int paren;			/* Parenthesized? */
-int *flagp;
-{
-  register char *ret;
-  register char *br;
-  register char *ender;
-  register int parno;
-  int flags;
-
-  *flagp = HASWIDTH;		/* Tentatively. */
-
-  /* Make an OPEN node, if parenthesized. */
-  if (paren) {
-	if (regnpar >= NSUBEXP) CFAIL("too many ()");
-	parno = regnpar;
-	regnpar++;
-	ret = regnode(OPEN + parno);
-  } else {
-	parno = 0;		/* not actually used, keep compiler quiet */
-	ret = (char *)NULL;
-  }
-
-  /* Pick up the branches, linking them together. */
-  br = regbranch(&flags);
-  if (br == (char *)NULL) return((char *)NULL);
-  if (ret != (char *)NULL)
-	regtail(ret, br);	/* OPEN -> first. */
-  else
-	ret = br;
-  if (!(flags & HASWIDTH)) *flagp &= ~HASWIDTH;
-  *flagp |= flags & SPSTART;
-  while (*regparse == '|') {
-	regparse++;
-	br = regbranch(&flags);
-	if (br == (char *)NULL) return((char *)NULL);
-	regtail(ret, br);	/* BRANCH -> BRANCH. */
-	if (!(flags & HASWIDTH)) *flagp &= ~HASWIDTH;
-	*flagp |= flags & SPSTART;
-  }
-
-  /* Make a closing node, and hook it on the end. */
-  ender = regnode((paren) ? CLOSE + parno : END);
-  regtail(ret, ender);
-
-  /* Hook the tails of the branches to the closing node. */
-  for (br = ret; br != (char *)NULL; br = regnext(br)) regoptail(br, ender);
-
-  /* Check for proper termination. */
-  if (paren && *regparse++ != ')') {
-	CFAIL("unmatched ()");
-  } else if (!paren && *regparse != '\0') {
-	if (*regparse == ')') {
-		CFAIL("unmatched ()");
-	} else
-		CFAIL("junk on end");	/* "Can't happen". */
-	/* NOTREACHED */
-  }
-  return(ret);
-}
-
-/*
- - regbranch - one alternative of an | operator
- *
- * Implements the concatenation operator.
- */
-static char *regbranch(flagp)
-int *flagp;
-{
-  register char *ret;
-  register char *chain;
-  register char *latest;
-  int flags;
-
-  *flagp = WORST;		/* Tentatively. */
-
-  ret = regnode(BRANCH);
-  chain = (char *)NULL;
-  while (*regparse != '\0' && *regparse != '|' && *regparse != ')') {
-	latest = regpiece(&flags);
-	if (latest == (char *)NULL) return((char *)NULL);
-	*flagp |= flags & HASWIDTH;
-	if (chain == (char *)NULL)	/* First piece. */
-		*flagp |= flags & SPSTART;
-	else
-		regtail(chain, latest);
-	chain = latest;
-  }
-  if (chain == (char *)NULL)		/* Loop ran zero times. */
-	regnode(NOTHING);
-
-  return(ret);
-}
-
-/*
- - regpiece - something followed by possible [*+?]
- *
- * Note that the branching code sequences used for ? and the general cases
- * of * and + are somewhat optimized:  they use the same NOTHING node as
- * both the endmarker for their branch list and the body of the last branch.
- * It might seem that this node could be dispensed with entirely, but the
- * endmarker role is not redundant.
- */
-static char *regpiece(flagp)
-int *flagp;
-{
-  register char *ret;
-  register char op;
-  register char *next;
-  int flags;
-
-  ret = regatom(&flags);
-  if (ret == (char *)NULL) return((char *)NULL);
-
-  op = *regparse;
-  if (!ISMULT(op)) {
-	*flagp = flags;
-	return(ret);
-  }
-  if (!(flags & HASWIDTH) && op != '?') CFAIL("*+ operand could be empty");
-  *flagp = (op != '+') ? (WORST | SPSTART) : (WORST | HASWIDTH);
-
-  if (op == '*' && (flags & SIMPLE))
-	reginsert(STAR, ret);
-  else if (op == '*') {
-	/* Emit x* as (x&|), where & means "self". */
-	reginsert(BRANCH, ret);	/* Either x */
-	regoptail(ret, regnode(BACK));	/* and loop */
-	regoptail(ret, ret);	/* back */
-	regtail(ret, regnode(BRANCH));	/* or */
-	regtail(ret, regnode(NOTHING));	/* null. */
-  } else if (op == '+' && (flags & SIMPLE))
-	reginsert(PLUS, ret);
-  else if (op == '+') {
-	/* Emit x+ as x(&|), where & means "self". */
-	next = regnode(BRANCH);	/* Either */
-	regtail(ret, next);
-	regtail(regnode(BACK), ret);	/* loop back */
-	regtail(next, regnode(BRANCH));	/* or */
-	regtail(ret, regnode(NOTHING));	/* null. */
-  } else if (op == '?') {
-	/* Emit x? as (x|) */
-	reginsert(BRANCH, ret);	/* Either x */
-	regtail(ret, regnode(BRANCH));	/* or */
-	next = regnode(NOTHING);/* null. */
-	regtail(ret, next);
-	regoptail(ret, next);
-  }
-  regparse++;
-  if (ISMULT(*regparse)) CFAIL("nested *?+");
-
-  return(ret);
-}
-
-/*
- - regatom - the lowest level
- *
- * Optimization:  gobbles an entire sequence of ordinary characters so that
- * it can turn them into a single node, which is smaller to store and
- * faster to run.  Backslashed characters are exceptions, each becoming a
- * separate node; the code is simpler that way and it's not worth fixing.
- */
-static char *regatom(flagp)
-int *flagp;
-{
-  register char *ret;
-  int flags;
-
-  *flagp = WORST;		/* Tentatively. */
-
-  switch (*regparse++) {
-      case '^':	ret = regnode(BOL);	  	break;
-      case '$':	ret = regnode(EOL);	  	break;
-      case '.':
-	ret = regnode(ANY);
-	*flagp |= HASWIDTH | SIMPLE;
-	break;
-      case '[':{
-		register int class;
-		register int classend;
-
-		if (*regparse == '^') {	/* Complement of range. */
-			ret = regnode(ANYBUT);
-			regparse++;
-		} else
-			ret = regnode(ANYOF);
-		if (*regparse == ']' || *regparse == '-') regc(*regparse++);
-		while (*regparse != '\0' && *regparse != ']') {
-			if (*regparse == '-') {
-				regparse++;
-				if (*regparse == ']' || *regparse == '\0')
-					regc('-');
-				else {
-					class = UCHARAT(regparse - 2) + 1;
-					classend = UCHARAT(regparse);
-					if (class > classend + 1)
-						CFAIL("invalid [] range");
-					for (; class <= classend; class++)
-						regc(class);
-					regparse++;
-				}
-			} else
-				regc(*regparse++);
-		}
-		regc('\0');
-		if (*regparse != ']') CFAIL("unmatched []");
-		regparse++;
-		*flagp |= HASWIDTH | SIMPLE;
-	}
-	break;
-      case '(':
-	ret = reg(1, &flags);
-	if (ret == (char *)NULL) return((char *)NULL);
-	*flagp |= flags & (HASWIDTH | SPSTART);
-	break;
-      case '\0':
-      case '|':
-      case ')':
-	CFAIL("internal urp");	/* Supposed to be caught earlier. */
-	break;
-      case '?':
-      case '+':
-      case '*':	CFAIL("?+* follows nothing");	  	break;
-      case '\\':
-	if (*regparse == '\0') CFAIL("trailing \\");
-	ret = regnode(EXACTLY);
-	regc(*regparse++);
-	regc('\0');
-	*flagp |= HASWIDTH | SIMPLE;
-	break;
-      default:{
-		register int len;
-		register char ender;
-
-		regparse--;
-		len = strcspn(regparse, META);
-		if (len <= 0) CFAIL("internal disaster");
-		ender = *(regparse + len);
-		if (len > 1 && ISMULT(ender))
-			len--;	/* Back off clear of ?+* operand. */
-		*flagp |= HASWIDTH;
-		if (len == 1) *flagp |= SIMPLE;
-		ret = regnode(EXACTLY);
-		while (len > 0) {
-			regc(*regparse++);
-			len--;
-		}
-		regc('\0');
-	}
-	break;
-  }
-
-  return(ret);
-}
-
-/*
- - regnode - emit a node
- */
-static char *regnode(op)
-char op;
-{
-  register char *ret;
-  register char *ptr;
-
-  ret = regcode;
-  if (ret == &regdummy) {
-	regsize += 3;
-	return(ret);
-  }
-  ptr = ret;
-  *ptr++ = op;
-  *ptr++ = '\0';		/* Null "next" pointer. */
-  *ptr++ = '\0';
-  regcode = ptr;
-
-  return(ret);
-}
-
-/*
- - regc - emit (if appropriate) a byte of code
- */
-static void regc(b)
-char b;
-{
-  if (regcode != &regdummy)
-	*regcode++ = b;
-  else
-	regsize++;
-}
-
-/*
- - reginsert - insert an operator in front of already-emitted operand
- *
- * Means relocating the operand.
- */
-static void reginsert(op, opnd)
-char op;
-char *opnd;
-{
-  register char *src;
-  register char *dst;
-  register char *place;
-
-  if (regcode == &regdummy) {
-	regsize += 3;
-	return;
-  }
-  src = regcode;
-  regcode += 3;
-  dst = regcode;
-  while (src > opnd) *--dst = *--src;
-
-  place = opnd;			/* Op node, where operand used to be. */
-  *place++ = op;
-  *place++ = '\0';
-  *place++ = '\0';
-}
-
-/*
- - regtail - set the next-pointer at the end of a node chain
- */
-static void regtail(p, val)
-char *p;
-char *val;
-{
-  register char *scan;
-  register char *temp;
-  register int offset;
-
-  if (p == &regdummy) return;
-
-  /* Find last node. */
-  scan = p;
-  for (;;) {
-	temp = (char *)regnext(scan);
-	if (temp == (char *)NULL) break;
-	scan = temp;
-  }
-
-  if (OP(scan) == BACK)
-	offset = scan - val;
-  else
-	offset = val - scan;
-  *(scan + 1) = (offset >> 8) & 0377;
-  *(scan + 2) = offset & 0377;
-}
-
-/*
- - regoptail - regtail on operand of first argument; nop if operandless
- */
-static void regoptail(p, val)
-char *p;
-char *val;
-{
-  /* "Operandless" and "op != BRANCH" are synonymous in practice. */
-  if (p == (char *)NULL || p == &regdummy || OP(p) != BRANCH) return;
-  regtail(OPERAND(p), val);
-}
-
-/* regexec and friends
- */
-
-/* Global work variables for regexec().
- */
-static char *reginput;		/* String-input pointer. */
-static char *regbol;		/* Beginning of input, for ^ check. */
-static char **regstartp;	/* Pointer to startp array. */
-static char **regendp;		/* Ditto for endp. */
-
-/* Forwards.
- */
-static int regtry(regexp *prog, char *string);
-static int regmatch(char *prog);
-static int regrepeat(char *p);
-
-#ifdef DEBUG
-int regnarrate = 0;
-void regdump();
-static char *regprop(char *op);
-#endif
-
-/*
- - regexec - match a regexp against a string
- */
-int regexec(prog, string, bolflag)
-register regexp *prog;
-register char *string;
-int bolflag;
-{
-  register char *s;
-
-  /* Be paranoid... */
-  if (prog == (regexp *)NULL || string == (char *)NULL) {
-	regerror("NULL parameter");
-	return(0);
-  }
-
-  /* Check validity of program. */
-  if (UCHARAT(prog->program) != MAGIC) {
-	regerror("corrupted program");
-	return(0);
-  }
-
-  /* If there is a "must appear" string, look for it. */
-  if (prog->regmust != (char *)NULL) {
-	s = string;
-	while ((s = strchr(s, prog->regmust[0])) != (char *)NULL) {
-		if (strncmp(s, prog->regmust, prog->regmlen) == 0)
-			break;	/* Found it. */
-		s++;
-	}
-	if (s == (char *)NULL)		/* Not present. */
-		return(0);
-  }
-
-  /* Mark beginning of line for ^ . */
-  if (bolflag)
-	regbol = string;
-  else
-	regbol = (char *)NULL;
-
-  /* Simplest case:  anchored match need be tried only once. */
-  if (prog->reganch) return(regtry(prog, string));
-
-  /* Messy cases:  unanchored match. */
-  s = string;
-  if (prog->regstart != '\0') 	/* We know what char it must start with. */
-	while ((s = strchr(s, prog->regstart)) != (char *)NULL) {
-		if (regtry(prog, s)) return(1);
-		s++;
-	}
-  else
-	/* We don't -- general case. */
-	do {
-		if (regtry(prog, s)) return(1);
-	} while (*s++ != '\0');
-
-  /* Failure. */
-  return(0);
-}
-
-/*
- - regtry - try match at specific point
- */
-static int regtry(prog, string)   /* 0 failure, 1 success */
-regexp *prog;
-char *string;
-{
-  register int i;
-  register char **sp;
-  register char **ep;
-
-  reginput = string;
-  regstartp = prog->startp;
-  regendp = prog->endp;
-
-  sp = prog->startp;
-  ep = prog->endp;
-  for (i = NSUBEXP; i > 0; i--) {
-	*sp++ = (char *)NULL;
-	*ep++ = (char *)NULL;
-  }
-  if (regmatch(prog->program + 1)) {
-	prog->startp[0] = string;
-	prog->endp[0] = reginput;
-	return(1);
-  } else
-	return(0);
-}
-
-/*
- - regmatch - main matching routine
- *
- * Conceptually the strategy is simple:  check to see whether the current
- * node matches, call self recursively to see whether the rest matches,
- * and then act accordingly.  In practice we make some effort to avoid
- * recursion, in particular by going through "ordinary" nodes (that don't
- * need to know whether the rest of the match failed) by a loop instead of
- * by recursion.
- */
-static int regmatch(prog)	/* 0 failure, 1 success */ 
-char *prog;
-{
-  register char *scan;		/* Current node. */
-  char *next;			/* Next node. */
-
-  scan = prog;
-#ifdef DEBUG
-  if (scan != (char *)NULL && regnarrate) fprintf(stderr, "%s(\n", regprop(scan));
-#endif
-  while (scan != (char *)NULL) {
-#ifdef DEBUG
-	if (regnarrate) fprintf(stderr, "%s...\n", regprop(scan));
-#endif
-	next = regnext(scan);
-
-	switch (OP(scan)) {
-	    case BOL:
-		if (reginput != regbol) return(0);
-		break;
-	    case EOL:
-		if (*reginput != '\0') return(0);
-		break;
-	    case ANY:
-		if (*reginput == '\0') return(0);
-		reginput++;
-		break;
-	    case EXACTLY:{
-			register int len;
-			register char *opnd;
-
-			opnd = OPERAND(scan);
-			/* Inline the first character, for speed. */
-			if (*opnd != *reginput) return(0);
-			len = strlen(opnd);
-			if (len > 1 && strncmp(opnd, reginput, len) != 0)
-				return(0);
-			reginput += len;
-		}
-		break;
-	    case ANYOF:
-		if (*reginput == '\0' || strchr(OPERAND(scan), *reginput) == (char *)NULL)
-			return(0);
-		reginput++;
-		break;
-	    case ANYBUT:
-		if (*reginput == '\0' || strchr(OPERAND(scan), *reginput) != (char *)NULL)
-			return(0);
-		reginput++;
-		break;
-	    case NOTHING:
-		break;
-	    case BACK:
-		break;
-	    case OPEN + 1:
-	    case OPEN + 2:
-	    case OPEN + 3:
-	    case OPEN + 4:
-	    case OPEN + 5:
-	    case OPEN + 6:
-	    case OPEN + 7:
-	    case OPEN + 8:
-	    case OPEN + 9:{
-			register int no;
-			register char *save;
-
-			no = OP(scan) - OPEN;
-			save = reginput;
-
-			if (regmatch(next)) {
-				/* Don't set startp if some later
-				 * invocation of the same parentheses
-				 * already has. */
-				if (regstartp[no] == (char *)NULL)
-					regstartp[no] = save;
-				return(1);
-			} else
-				return(0);
-		}
-		break;
-	    case CLOSE + 1:
-	    case CLOSE + 2:
-	    case CLOSE + 3:
-	    case CLOSE + 4:
-	    case CLOSE + 5:
-	    case CLOSE + 6:
-	    case CLOSE + 7:
-	    case CLOSE + 8:
-	    case CLOSE + 9:{
-			register int no;
-			register char *save;
-
-			no = OP(scan) - CLOSE;
-			save = reginput;
-
-			if (regmatch(next)) {
-				/* Don't set endp if some later
-				 * invocation of the same parentheses
-				 * already has. */
-				if (regendp[no] == (char *)NULL) regendp[no] = save;
-				return(1);
-			} else
-				return(0);
-		}
-		break;
-	    case BRANCH:{
-			register char *save;
-
-			if (OP(next) != BRANCH)	/* No choice. */
-				next = OPERAND(scan);	/* Avoid recursion. */
-			else {
-				do {
-					save = reginput;
-					if (regmatch(OPERAND(scan)))
-						return(1);
-					reginput = save;
-					scan = regnext(scan);
-				} while (scan != (char *)NULL && OP(scan) == BRANCH);
-				return(0);
-				/* NOTREACHED */
-			}
-		}
-		break;
-	    case STAR:
-	    case PLUS:{
-			register char nextch;
-			register int no;
-			register char *save;
-			register int min;
-
-			/* Lookahead to avoid useless match attempts
-			 * when we know what character comes next. */
-			nextch = '\0';
-			if (OP(next) == EXACTLY) nextch = *OPERAND(next);
-			min = (OP(scan) == STAR) ? 0 : 1;
-			save = reginput;
-			no = regrepeat(OPERAND(scan));
-			while (no >= min) {
-				/* If it could work, try it. */
-				if (nextch == '\0' || *reginput == nextch)
-					if (regmatch(next)) return(1);
-				/* Couldn't or didn't -- back up. */
-				no--;
-				reginput = save + no;
-			}
-			return(0);
-		}
-		break;
-	    case END:
-		return(1);	/* Success! */
-		break;
-	    default:
-		regerror("memory corruption");
-		return(0);
-		break;
-	}
-
-	scan = next;
-  }
-
-  /* We get here only if there's trouble -- normally "case END" is the
-   * terminating point. */
-  regerror("corrupted pointers");
-  return(0);
-}
-
-/*
- - regrepeat - repeatedly match something simple, report how many
- */
-static int regrepeat(p)
-char *p;
-{
-  register int count = 0;
-  register char *scan;
-  register char *opnd;
-
-  scan = reginput;
-  opnd = OPERAND(p);
-  switch (OP(p)) {
-      case ANY:
-	count = strlen(scan);
-	scan += count;
-	break;
-      case EXACTLY:
-	while (*opnd == *scan) {
-		count++;
-		scan++;
-	}
-	break;
-      case ANYOF:
-	while (*scan != '\0' && strchr(opnd, *scan) != (char *)NULL) {
-		count++;
-		scan++;
-	}
-	break;
-      case ANYBUT:
-	while (*scan != '\0' && strchr(opnd, *scan) == (char *)NULL) {
-		count++;
-		scan++;
-	}
-	break;
-      default:			/* Oh dear.  Called inappropriately. */
-	regerror("internal foulup");
-	count = 0;		/* Best compromise. */
-	break;
-  }
-  reginput = scan;
-
-  return(count);
-}
-
-/*
- - regnext - dig the "next" pointer out of a node
- */
-static char *regnext(p)
-register char *p;
-{
-  register int offset;
-
-  if (p == &regdummy) return((char *)NULL);
-
-  offset = NEXT(p);
-  if (offset == 0) return((char *)NULL);
-
-  if (OP(p) == BACK)
-	return(p - offset);
-  else
-	return(p + offset);
-}
-
-#ifdef DEBUG
-
-static char *regprop();
-
-/*
- - regdump - dump a regexp onto stdout in vaguely comprehensible form
- */
-void regdump(r)
-regexp *r;
-{
-  register char *s;
-  register char op = EXACTLY;	/* Arbitrary non-END op. */
-  register char *next;
-
-  s = r->program + 1;
-  while (op != END) {		/* While that wasn't END last time... */
-	op = OP(s);
-	printf("%2d%s", (int) (s - r->program), regprop(s));	/* Where, what. */
-	next = regnext(s);
-	if (next == (char *)NULL)	/* Next ptr. */
-		printf("(0)");
-	else
-		printf("(%d)", (int) (s - r->program) + (int) (next - s));
-	s += 3;
-	if (op == ANYOF || op == ANYBUT || op == EXACTLY) {
-		/* Literal string, where present. */
-		while (*s != '\0') {
-			putchar(*s);
-			s++;
-		}
-		s++;
-	}
-	putchar('\n');
-  }
-
-  /* Header fields of interest. */
-  if (r->regstart != '\0') printf("start `%c' ", r->regstart);
-  if (r->reganch) printf("anchored ");
-  if (r->regmust != (char *)NULL) printf("must have \"%s\"", r->regmust);
-  printf("\n");
-}
-
-/*
- - regprop - printable representation of opcode
- */
-static char *regprop(op)
-char *op;
-{
-  register char *p;
-  static char buf[50];
-
-  (void) strcpy(buf, ":");
-
-  switch (OP(op)) {
-      case BOL:	p = "BOL";	  	break;
-      case EOL:	p = "EOL";	  	break;
-      case ANY:	p = "ANY";	  	break;
-      case ANYOF:	p = "ANYOF";	  	break;
-      case ANYBUT:	p = "ANYBUT";	  	break;
-      case BRANCH:	p = "BRANCH";	  	break;
-      case EXACTLY:	p = "EXACTLY";	  	break;
-      case NOTHING:	p = "NOTHING";	  	break;
-      case BACK:	p = "BACK";	  	break;
-      case END:	p = "END";	  	break;
-      case OPEN + 1:
-      case OPEN + 2:
-      case OPEN + 3:
-      case OPEN + 4:
-      case OPEN + 5:
-      case OPEN + 6:
-      case OPEN + 7:
-      case OPEN + 8:
-      case OPEN + 9:
-	sprintf(buf + strlen(buf), "OPEN%d", OP(op) - OPEN);
-	p = (char *)NULL;
-	break;
-      case CLOSE + 1:
-      case CLOSE + 2:
-      case CLOSE + 3:
-      case CLOSE + 4:
-      case CLOSE + 5:
-      case CLOSE + 6:
-      case CLOSE + 7:
-      case CLOSE + 8:
-      case CLOSE + 9:
-	sprintf(buf + strlen(buf), "CLOSE%d", OP(op) - CLOSE);
-	p = (char *)NULL;
-	break;
-      case STAR:	p = "STAR";	  	break;
-      case PLUS:	p = "PLUS";	  	break;
-      default:	regerror("corrupted opcode"); p = (char *) NULL; break;
-  }
-  if (p != (char *)NULL) (void) strcat(buf, p);
-  return(buf);
-}
-
-#endif
-
-/*
- * $PchId: regexp.c,v 1.4 1996/02/22 09:03:07 philip Exp $
- */
Index: trunk/minix/lib/other/v8regsub.c
===================================================================
--- trunk/minix/lib/other/v8regsub.c	(revision 9)
+++ 	(revision )
@@ -1,90 +1,0 @@
-/* regsub
- *
- *	Copyright (c) 1986 by University of Toronto.
- *	Written by Henry Spencer.  Not derived from licensed software.
- *
- *	Permission is granted to anyone to use this software for any
- *	purpose on any computer system, and to redistribute it freely,
- *	subject to the following restrictions:
- *
- *	1. The author is not responsible for the consequences of use of
- *		this software, no matter how awful, even if they arise
- *		from defects in it.
- *
- *	2. The origin of this software must not be misrepresented, either
- *		by explicit claim or by omission.
- *
- *	3. Altered versions must be plainly marked as such, and must not
- *		be misrepresented as being the original software.
- */
-
-#include <string.h>
-#include <stdio.h>
-#define const		/* avoid "const poisoning" */
-#include <regexp.h>
-#undef const
-
-/* The first byte of the regexp internal "program" is actually this magic
- * number; the start node begins in the second byte.
- */
-#define	MAGIC	0234
-
-#define CHARBITS 0377
-#ifndef CHARBITS
-#define	UCHARAT(p)	((int)*(unsigned char *)(p))
-#else
-#define	UCHARAT(p)	((int)*(p)&CHARBITS)
-#endif
-
-/*
- - regsub - perform substitutions after a regexp match
- */
-void regsub(prog, source, dest)
-regexp *prog;
-char *source;
-char *dest;
-{
-  register char *src;
-  register char *dst;
-  register char c;
-  register int no;
-  register int len;
-
-  if (prog == (regexp *)NULL || source == (char *)NULL || dest == (char *)NULL) {
-	regerror("NULL parm to regsub");
-	return;
-  }
-  if (UCHARAT(prog->program) != MAGIC) {
-	regerror("damaged regexp fed to regsub");
-	return;
-  }
-  src = source;
-  dst = dest;
-  while ((c = *src++) != '\0') {
-	if (c == '&')
-		no = 0;
-	else if (c == '\\' && '0' <= *src && *src <= '9')
-		no = *src++ - '0';
-	else
-		no = -1;
-
-	if (no < 0) {		/* Ordinary character. */
-		if (c == '\\' && (*src == '\\' || *src == '&')) c = *src++;
-		*dst++ = c;
-	} else
-	if (prog->startp[no] != (char *)NULL && prog->endp[no] != (char *)NULL) {
-		len = (int) (prog->endp[no] - prog->startp[no]);
-		strncpy(dst, prog->startp[no], len);
-		dst += len;
-		if (len != 0 && *(dst - 1) == '\0') {	/* strncpy hit NUL. */
-			regerror("damaged match string");
-			return;
-		}
-	}
-  }
-  *dst++ = '\0';
-}
-
-/*
- * $PchId: regsub.c,v 1.3 1995/11/27 20:18:16 philip Exp $
- */
Index: trunk/minix/lib/other/writev.c
===================================================================
--- trunk/minix/lib/other/writev.c	(revision 9)
+++ 	(revision )
@@ -1,39 +1,0 @@
-#include <errno.h>
-#include <stdio.h>
-#include <sys/uio.h>
-
-ssize_t writev(int fildes, const struct iovec *iov, int iovcnt)
-{
-#if DEBUG
-	fprintf(stderr, "bind: not implemented for fd %d\n", socket);
-#endif
-	errno= ENOSYS;
-	return -1;
-
-#if 0
-	int i, r;
-	char *p;
-	ssize_t l, sum;
-
-	/* We should buffer */
-	sum= 0;
-	for (i= 0; i<iovcnt; i++)
-	{
-		p= iov[i].iov_base;
-		l= iov[i].iov_len;
-		while (l > 0)
-		{
-			r= write(fildes, p, l);
-			if (r <= 0)
-			{
-				assert(sum == 0);
-				return r;
-			}
-			p += r;
-			l -= r;
-			sum += r;
-		}
-	}
-	return sum;
-#endif
-}
Index: trunk/minix/lib/posix/Makedepend-ack
===================================================================
--- trunk/minix/lib/posix/Makedepend-ack	(revision 9)
+++ 	(revision )
@@ -1,100 +1,0 @@
-depend-ack:
-	rm .depend-ack
-	touch .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -E' __exit.c | sed -e 's:^\(.\):../obj-ack//./posix/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -E' _access.c | sed -e 's:^\(.\):../obj-ack//./posix/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -E' _alarm.c | sed -e 's:^\(.\):../obj-ack//./posix/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -E' _cfgetispeed.c | sed -e 's:^\(.\):../obj-ack//./posix/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -E' _cfgetospeed.c | sed -e 's:^\(.\):../obj-ack//./posix/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -E' _cfsetispeed.c | sed -e 's:^\(.\):../obj-ack//./posix/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -E' _cfsetospeed.c | sed -e 's:^\(.\):../obj-ack//./posix/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -E' _chdir.c | sed -e 's:^\(.\):../obj-ack//./posix/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -E' _chmod.c | sed -e 's:^\(.\):../obj-ack//./posix/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -E' _chown.c | sed -e 's:^\(.\):../obj-ack//./posix/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -E' _chroot.c | sed -e 's:^\(.\):../obj-ack//./posix/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -E' _close.c | sed -e 's:^\(.\):../obj-ack//./posix/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -E' _closedir.c | sed -e 's:^\(.\):../obj-ack//./posix/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -E' _creat.c | sed -e 's:^\(.\):../obj-ack//./posix/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -E' _dup.c | sed -e 's:^\(.\):../obj-ack//./posix/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -E' _dup2.c | sed -e 's:^\(.\):../obj-ack//./posix/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -E' _execl.c | sed -e 's:^\(.\):../obj-ack//./posix/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -E' _execle.c | sed -e 's:^\(.\):../obj-ack//./posix/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -E' _execlp.c | sed -e 's:^\(.\):../obj-ack//./posix/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -E' _execv.c | sed -e 's:^\(.\):../obj-ack//./posix/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -E' _execve.c | sed -e 's:^\(.\):../obj-ack//./posix/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -E' _execvp.c | sed -e 's:^\(.\):../obj-ack//./posix/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -E' _fcntl.c | sed -e 's:^\(.\):../obj-ack//./posix/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -E' _fork.c | sed -e 's:^\(.\):../obj-ack//./posix/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -E' _fpathconf.c | sed -e 's:^\(.\):../obj-ack//./posix/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -E' _fstat.c | sed -e 's:^\(.\):../obj-ack//./posix/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -E' _fstatfs.c | sed -e 's:^\(.\):../obj-ack//./posix/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -E' _fsync.c | sed -e 's:^\(.\):../obj-ack//./posix/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -E' _getcwd.c | sed -e 's:^\(.\):../obj-ack//./posix/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -E' _getegid.c | sed -e 's:^\(.\):../obj-ack//./posix/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -E' _geteuid.c | sed -e 's:^\(.\):../obj-ack//./posix/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -E' _getgid.c | sed -e 's:^\(.\):../obj-ack//./posix/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -E' _getgroups.c | sed -e 's:^\(.\):../obj-ack//./posix/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -E' _getpgrp.c | sed -e 's:^\(.\):../obj-ack//./posix/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -E' _getpid.c | sed -e 's:^\(.\):../obj-ack//./posix/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -E' _getppid.c | sed -e 's:^\(.\):../obj-ack//./posix/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -E' _getuid.c | sed -e 's:^\(.\):../obj-ack//./posix/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -E' _ioctl.c | sed -e 's:^\(.\):../obj-ack//./posix/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -E' _isatty.c | sed -e 's:^\(.\):../obj-ack//./posix/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -E' _kill.c | sed -e 's:^\(.\):../obj-ack//./posix/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -E' _link.c | sed -e 's:^\(.\):../obj-ack//./posix/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -E' _lseek.c | sed -e 's:^\(.\):../obj-ack//./posix/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -E' _lstat.c | sed -e 's:^\(.\):../obj-ack//./posix/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -E' _mkdir.c | sed -e 's:^\(.\):../obj-ack//./posix/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -E' _mkfifo.c | sed -e 's:^\(.\):../obj-ack//./posix/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -E' _mknod.c | sed -e 's:^\(.\):../obj-ack//./posix/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -E' _mount.c | sed -e 's:^\(.\):../obj-ack//./posix/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -E' _open.c | sed -e 's:^\(.\):../obj-ack//./posix/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -E' _opendir.c | sed -e 's:^\(.\):../obj-ack//./posix/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -E' _pathconf.c | sed -e 's:^\(.\):../obj-ack//./posix/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -E' _pause.c | sed -e 's:^\(.\):../obj-ack//./posix/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -E' _pipe.c | sed -e 's:^\(.\):../obj-ack//./posix/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -E' _ptrace.c | sed -e 's:^\(.\):../obj-ack//./posix/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -E' _read.c | sed -e 's:^\(.\):../obj-ack//./posix/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -E' _readdir.c | sed -e 's:^\(.\):../obj-ack//./posix/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -E' _readlink.c | sed -e 's:^\(.\):../obj-ack//./posix/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -E' _rename.c | sed -e 's:^\(.\):../obj-ack//./posix/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -E' _rewinddir.c | sed -e 's:^\(.\):../obj-ack//./posix/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -E' _rmdir.c | sed -e 's:^\(.\):../obj-ack//./posix/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -E' _select.c | sed -e 's:^\(.\):../obj-ack//./posix/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -E' _setgid.c | sed -e 's:^\(.\):../obj-ack//./posix/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -E' _setsid.c | sed -e 's:^\(.\):../obj-ack//./posix/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -E' _setuid.c | sed -e 's:^\(.\):../obj-ack//./posix/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -E' _sigaction.c | sed -e 's:^\(.\):../obj-ack//./posix/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -E' _sigpending.c | sed -e 's:^\(.\):../obj-ack//./posix/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -E' _sigprocmask.c | sed -e 's:^\(.\):../obj-ack//./posix/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -E' _sigreturn.c | sed -e 's:^\(.\):../obj-ack//./posix/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -E' _sigset.c | sed -e 's:^\(.\):../obj-ack//./posix/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -E' _sigsetjmp.c | sed -e 's:^\(.\):../obj-ack//./posix/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -E' _sigsuspend.c | sed -e 's:^\(.\):../obj-ack//./posix/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -E' _sleep.c | sed -e 's:^\(.\):../obj-ack//./posix/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -E' _stat.c | sed -e 's:^\(.\):../obj-ack//./posix/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -E' _stime.c | sed -e 's:^\(.\):../obj-ack//./posix/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -E' _symlink.c | sed -e 's:^\(.\):../obj-ack//./posix/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -E' _sync.c | sed -e 's:^\(.\):../obj-ack//./posix/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -E' _tcdrain.c | sed -e 's:^\(.\):../obj-ack//./posix/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -E' _tcflow.c | sed -e 's:^\(.\):../obj-ack//./posix/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -E' _tcflush.c | sed -e 's:^\(.\):../obj-ack//./posix/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -E' _tcgetattr.c | sed -e 's:^\(.\):../obj-ack//./posix/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -E' _tcsendbreak.c | sed -e 's:^\(.\):../obj-ack//./posix/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -E' _tcsetattr.c | sed -e 's:^\(.\):../obj-ack//./posix/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -E' _time.c | sed -e 's:^\(.\):../obj-ack//./posix/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -E' _times.c | sed -e 's:^\(.\):../obj-ack//./posix/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -E' _truncate.c | sed -e 's:^\(.\):../obj-ack//./posix/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -E' _umask.c | sed -e 's:^\(.\):../obj-ack//./posix/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -E' _umount.c | sed -e 's:^\(.\):../obj-ack//./posix/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -E' _uname.c | sed -e 's:^\(.\):../obj-ack//./posix/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -E' _unlink.c | sed -e 's:^\(.\):../obj-ack//./posix/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -E' _utime.c | sed -e 's:^\(.\):../obj-ack//./posix/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -E' _wait.c | sed -e 's:^\(.\):../obj-ack//./posix/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -E' _waitpid.c | sed -e 's:^\(.\):../obj-ack//./posix/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -E' _write.c | sed -e 's:^\(.\):../obj-ack//./posix/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -E' getloadavg.c | sed -e 's:^\(.\):../obj-ack//./posix/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -E' getopt.c | sed -e 's:^\(.\):../obj-ack//./posix/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -E' gettimeofday.c | sed -e 's:^\(.\):../obj-ack//./posix/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -E' priority.c | sed -e 's:^\(.\):../obj-ack//./posix/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -E' usleep.c | sed -e 's:^\(.\):../obj-ack//./posix/\1:' >> .depend-ack
Index: trunk/minix/lib/posix/Makedepend-gnu
===================================================================
--- trunk/minix/lib/posix/Makedepend-gnu	(revision 9)
+++ 	(revision )
@@ -1,100 +1,0 @@
-depend-gnu:
-	rm .depend-gnu
-	touch .depend-gnu
-	mkdep 'gcc -O -D_MINIX -D_POSIX_SOURCE -E' __exit.c | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./posix/\1:' >> .depend-gnu
-	mkdep 'gcc -O -D_MINIX -D_POSIX_SOURCE -E' _access.c | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./posix/\1:' >> .depend-gnu
-	mkdep 'gcc -O -D_MINIX -D_POSIX_SOURCE -E' _alarm.c | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./posix/\1:' >> .depend-gnu
-	mkdep 'gcc -O -D_MINIX -D_POSIX_SOURCE -E' _cfgetispeed.c | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./posix/\1:' >> .depend-gnu
-	mkdep 'gcc -O -D_MINIX -D_POSIX_SOURCE -E' _cfgetospeed.c | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./posix/\1:' >> .depend-gnu
-	mkdep 'gcc -O -D_MINIX -D_POSIX_SOURCE -E' _cfsetispeed.c | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./posix/\1:' >> .depend-gnu
-	mkdep 'gcc -O -D_MINIX -D_POSIX_SOURCE -E' _cfsetospeed.c | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./posix/\1:' >> .depend-gnu
-	mkdep 'gcc -O -D_MINIX -D_POSIX_SOURCE -E' _chdir.c | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./posix/\1:' >> .depend-gnu
-	mkdep 'gcc -O -D_MINIX -D_POSIX_SOURCE -E' _chmod.c | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./posix/\1:' >> .depend-gnu
-	mkdep 'gcc -O -D_MINIX -D_POSIX_SOURCE -E' _chown.c | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./posix/\1:' >> .depend-gnu
-	mkdep 'gcc -O -D_MINIX -D_POSIX_SOURCE -E' _chroot.c | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./posix/\1:' >> .depend-gnu
-	mkdep 'gcc -O -D_MINIX -D_POSIX_SOURCE -E' _close.c | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./posix/\1:' >> .depend-gnu
-	mkdep 'gcc -O -D_MINIX -D_POSIX_SOURCE -E' _closedir.c | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./posix/\1:' >> .depend-gnu
-	mkdep 'gcc -O -D_MINIX -D_POSIX_SOURCE -E' _creat.c | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./posix/\1:' >> .depend-gnu
-	mkdep 'gcc -O -D_MINIX -D_POSIX_SOURCE -E' _dup.c | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./posix/\1:' >> .depend-gnu
-	mkdep 'gcc -O -D_MINIX -D_POSIX_SOURCE -E' _dup2.c | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./posix/\1:' >> .depend-gnu
-	mkdep 'gcc -O -D_MINIX -D_POSIX_SOURCE -E' _execl.c | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./posix/\1:' >> .depend-gnu
-	mkdep 'gcc -O -D_MINIX -D_POSIX_SOURCE -E' _execle.c | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./posix/\1:' >> .depend-gnu
-	mkdep 'gcc -O -D_MINIX -D_POSIX_SOURCE -E' _execlp.c | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./posix/\1:' >> .depend-gnu
-	mkdep 'gcc -O -D_MINIX -D_POSIX_SOURCE -E' _execv.c | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./posix/\1:' >> .depend-gnu
-	mkdep 'gcc -O -D_MINIX -D_POSIX_SOURCE -E' _execve.c | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./posix/\1:' >> .depend-gnu
-	mkdep 'gcc -O -D_MINIX -D_POSIX_SOURCE -E' _execvp.c | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./posix/\1:' >> .depend-gnu
-	mkdep 'gcc -O -D_MINIX -D_POSIX_SOURCE -E' _fcntl.c | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./posix/\1:' >> .depend-gnu
-	mkdep 'gcc -O -D_MINIX -D_POSIX_SOURCE -E' _fork.c | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./posix/\1:' >> .depend-gnu
-	mkdep 'gcc -O -D_MINIX -D_POSIX_SOURCE -E' _fpathconf.c | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./posix/\1:' >> .depend-gnu
-	mkdep 'gcc -O -D_MINIX -D_POSIX_SOURCE -E' _fstat.c | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./posix/\1:' >> .depend-gnu
-	mkdep 'gcc -O -D_MINIX -D_POSIX_SOURCE -E' _fstatfs.c | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./posix/\1:' >> .depend-gnu
-	mkdep 'gcc -O -D_MINIX -D_POSIX_SOURCE -E' _fsync.c | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./posix/\1:' >> .depend-gnu
-	mkdep 'gcc -O -D_MINIX -D_POSIX_SOURCE -E' _getcwd.c | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./posix/\1:' >> .depend-gnu
-	mkdep 'gcc -O -D_MINIX -D_POSIX_SOURCE -E' _getegid.c | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./posix/\1:' >> .depend-gnu
-	mkdep 'gcc -O -D_MINIX -D_POSIX_SOURCE -E' _geteuid.c | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./posix/\1:' >> .depend-gnu
-	mkdep 'gcc -O -D_MINIX -D_POSIX_SOURCE -E' _getgid.c | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./posix/\1:' >> .depend-gnu
-	mkdep 'gcc -O -D_MINIX -D_POSIX_SOURCE -E' _getgroups.c | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./posix/\1:' >> .depend-gnu
-	mkdep 'gcc -O -D_MINIX -D_POSIX_SOURCE -E' _getpgrp.c | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./posix/\1:' >> .depend-gnu
-	mkdep 'gcc -O -D_MINIX -D_POSIX_SOURCE -E' _getpid.c | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./posix/\1:' >> .depend-gnu
-	mkdep 'gcc -O -D_MINIX -D_POSIX_SOURCE -E' _getppid.c | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./posix/\1:' >> .depend-gnu
-	mkdep 'gcc -O -D_MINIX -D_POSIX_SOURCE -E' _getuid.c | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./posix/\1:' >> .depend-gnu
-	mkdep 'gcc -O -D_MINIX -D_POSIX_SOURCE -E' _ioctl.c | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./posix/\1:' >> .depend-gnu
-	mkdep 'gcc -O -D_MINIX -D_POSIX_SOURCE -E' _isatty.c | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./posix/\1:' >> .depend-gnu
-	mkdep 'gcc -O -D_MINIX -D_POSIX_SOURCE -E' _kill.c | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./posix/\1:' >> .depend-gnu
-	mkdep 'gcc -O -D_MINIX -D_POSIX_SOURCE -E' _link.c | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./posix/\1:' >> .depend-gnu
-	mkdep 'gcc -O -D_MINIX -D_POSIX_SOURCE -E' _lseek.c | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./posix/\1:' >> .depend-gnu
-	mkdep 'gcc -O -D_MINIX -D_POSIX_SOURCE -E' _lstat.c | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./posix/\1:' >> .depend-gnu
-	mkdep 'gcc -O -D_MINIX -D_POSIX_SOURCE -E' _mkdir.c | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./posix/\1:' >> .depend-gnu
-	mkdep 'gcc -O -D_MINIX -D_POSIX_SOURCE -E' _mkfifo.c | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./posix/\1:' >> .depend-gnu
-	mkdep 'gcc -O -D_MINIX -D_POSIX_SOURCE -E' _mknod.c | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./posix/\1:' >> .depend-gnu
-	mkdep 'gcc -O -D_MINIX -D_POSIX_SOURCE -E' _mount.c | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./posix/\1:' >> .depend-gnu
-	mkdep 'gcc -O -D_MINIX -D_POSIX_SOURCE -E' _open.c | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./posix/\1:' >> .depend-gnu
-	mkdep 'gcc -O -D_MINIX -D_POSIX_SOURCE -E' _opendir.c | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./posix/\1:' >> .depend-gnu
-	mkdep 'gcc -O -D_MINIX -D_POSIX_SOURCE -E' _pathconf.c | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./posix/\1:' >> .depend-gnu
-	mkdep 'gcc -O -D_MINIX -D_POSIX_SOURCE -E' _pause.c | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./posix/\1:' >> .depend-gnu
-	mkdep 'gcc -O -D_MINIX -D_POSIX_SOURCE -E' _pipe.c | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./posix/\1:' >> .depend-gnu
-	mkdep 'gcc -O -D_MINIX -D_POSIX_SOURCE -E' _ptrace.c | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./posix/\1:' >> .depend-gnu
-	mkdep 'gcc -O -D_MINIX -D_POSIX_SOURCE -E' _read.c | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./posix/\1:' >> .depend-gnu
-	mkdep 'gcc -O -D_MINIX -D_POSIX_SOURCE -E' _readdir.c | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./posix/\1:' >> .depend-gnu
-	mkdep 'gcc -O -D_MINIX -D_POSIX_SOURCE -E' _readlink.c | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./posix/\1:' >> .depend-gnu
-	mkdep 'gcc -O -D_MINIX -D_POSIX_SOURCE -E' _rename.c | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./posix/\1:' >> .depend-gnu
-	mkdep 'gcc -O -D_MINIX -D_POSIX_SOURCE -E' _rewinddir.c | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./posix/\1:' >> .depend-gnu
-	mkdep 'gcc -O -D_MINIX -D_POSIX_SOURCE -E' _rmdir.c | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./posix/\1:' >> .depend-gnu
-	mkdep 'gcc -O -D_MINIX -D_POSIX_SOURCE -E' _select.c | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./posix/\1:' >> .depend-gnu
-	mkdep 'gcc -O -D_MINIX -D_POSIX_SOURCE -E' _setgid.c | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./posix/\1:' >> .depend-gnu
-	mkdep 'gcc -O -D_MINIX -D_POSIX_SOURCE -E' _setsid.c | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./posix/\1:' >> .depend-gnu
-	mkdep 'gcc -O -D_MINIX -D_POSIX_SOURCE -E' _setuid.c | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./posix/\1:' >> .depend-gnu
-	mkdep 'gcc -O -D_MINIX -D_POSIX_SOURCE -E' _sigaction.c | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./posix/\1:' >> .depend-gnu
-	mkdep 'gcc -O -D_MINIX -D_POSIX_SOURCE -E' _sigpending.c | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./posix/\1:' >> .depend-gnu
-	mkdep 'gcc -O -D_MINIX -D_POSIX_SOURCE -E' _sigprocmask.c | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./posix/\1:' >> .depend-gnu
-	mkdep 'gcc -O -D_MINIX -D_POSIX_SOURCE -E' _sigreturn.c | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./posix/\1:' >> .depend-gnu
-	mkdep 'gcc -O -D_MINIX -D_POSIX_SOURCE -E' _sigset.c | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./posix/\1:' >> .depend-gnu
-	mkdep 'gcc -O -D_MINIX -D_POSIX_SOURCE -E' _sigsetjmp.c | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./posix/\1:' >> .depend-gnu
-	mkdep 'gcc -O -D_MINIX -D_POSIX_SOURCE -E' _sigsuspend.c | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./posix/\1:' >> .depend-gnu
-	mkdep 'gcc -O -D_MINIX -D_POSIX_SOURCE -E' _sleep.c | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./posix/\1:' >> .depend-gnu
-	mkdep 'gcc -O -D_MINIX -D_POSIX_SOURCE -E' _stat.c | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./posix/\1:' >> .depend-gnu
-	mkdep 'gcc -O -D_MINIX -D_POSIX_SOURCE -E' _stime.c | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./posix/\1:' >> .depend-gnu
-	mkdep 'gcc -O -D_MINIX -D_POSIX_SOURCE -E' _symlink.c | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./posix/\1:' >> .depend-gnu
-	mkdep 'gcc -O -D_MINIX -D_POSIX_SOURCE -E' _sync.c | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./posix/\1:' >> .depend-gnu
-	mkdep 'gcc -O -D_MINIX -D_POSIX_SOURCE -E' _tcdrain.c | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./posix/\1:' >> .depend-gnu
-	mkdep 'gcc -O -D_MINIX -D_POSIX_SOURCE -E' _tcflow.c | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./posix/\1:' >> .depend-gnu
-	mkdep 'gcc -O -D_MINIX -D_POSIX_SOURCE -E' _tcflush.c | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./posix/\1:' >> .depend-gnu
-	mkdep 'gcc -O -D_MINIX -D_POSIX_SOURCE -E' _tcgetattr.c | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./posix/\1:' >> .depend-gnu
-	mkdep 'gcc -O -D_MINIX -D_POSIX_SOURCE -E' _tcsendbreak.c | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./posix/\1:' >> .depend-gnu
-	mkdep 'gcc -O -D_MINIX -D_POSIX_SOURCE -E' _tcsetattr.c | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./posix/\1:' >> .depend-gnu
-	mkdep 'gcc -O -D_MINIX -D_POSIX_SOURCE -E' _time.c | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./posix/\1:' >> .depend-gnu
-	mkdep 'gcc -O -D_MINIX -D_POSIX_SOURCE -E' _times.c | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./posix/\1:' >> .depend-gnu
-	mkdep 'gcc -O -D_MINIX -D_POSIX_SOURCE -E' _truncate.c | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./posix/\1:' >> .depend-gnu
-	mkdep 'gcc -O -D_MINIX -D_POSIX_SOURCE -E' _umask.c | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./posix/\1:' >> .depend-gnu
-	mkdep 'gcc -O -D_MINIX -D_POSIX_SOURCE -E' _umount.c | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./posix/\1:' >> .depend-gnu
-	mkdep 'gcc -O -D_MINIX -D_POSIX_SOURCE -E' _uname.c | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./posix/\1:' >> .depend-gnu
-	mkdep 'gcc -O -D_MINIX -D_POSIX_SOURCE -E' _unlink.c | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./posix/\1:' >> .depend-gnu
-	mkdep 'gcc -O -D_MINIX -D_POSIX_SOURCE -E' _utime.c | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./posix/\1:' >> .depend-gnu
-	mkdep 'gcc -O -D_MINIX -D_POSIX_SOURCE -E' _wait.c | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./posix/\1:' >> .depend-gnu
-	mkdep 'gcc -O -D_MINIX -D_POSIX_SOURCE -E' _waitpid.c | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./posix/\1:' >> .depend-gnu
-	mkdep 'gcc -O -D_MINIX -D_POSIX_SOURCE -E' _write.c | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./posix/\1:' >> .depend-gnu
-	mkdep 'gcc -O -D_MINIX -D_POSIX_SOURCE -E' getloadavg.c | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./posix/\1:' >> .depend-gnu
-	mkdep 'gcc -O -D_MINIX -D_POSIX_SOURCE -E' getopt.c | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./posix/\1:' >> .depend-gnu
-	mkdep 'gcc -O -D_MINIX -D_POSIX_SOURCE -E' gettimeofday.c | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./posix/\1:' >> .depend-gnu
-	mkdep 'gcc -O -D_MINIX -D_POSIX_SOURCE -E' priority.c | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./posix/\1:' >> .depend-gnu
-	mkdep 'gcc -O -D_MINIX -D_POSIX_SOURCE -E' usleep.c | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./posix/\1:' >> .depend-gnu
Index: trunk/minix/lib/posix/Makefile
===================================================================
--- trunk/minix/lib/posix/Makefile	(revision 9)
+++ 	(revision )
@@ -1,724 +1,0 @@
-#Generated from ./posix/Makefile.in
-all: all-ack
-
-all-ack:
-all-gnu:
-
-makefiles: Makefile
-Makedepend-ack Makedepend-gnu: 
-	sh ../generate.sh ./posix ../obj-ack/ ../obj-gnu
-
-Makefile: Makefile.in Makedepend-ack Makedepend-gnu
-	sh ../generate.sh ./posix ../obj-ack/ ../obj-gnu
-	@echo
-	@echo *Attention*
-	@echo Makefile is regenerated... rerun command to see changes
-	@echo *Attention*
-	@echo
-
-depend: depend-ack
-all-ack: ../obj-ack//libc.a
-
-../obj-ack//libc.a: ../obj-ack//libc.a(__exit.o)
-../obj-ack//libc.a: ../obj-ack//libc.a(_access.o)
-../obj-ack//libc.a: ../obj-ack//libc.a(_alarm.o)
-../obj-ack//libc.a: ../obj-ack//libc.a(_cfgetispeed.o)
-../obj-ack//libc.a: ../obj-ack//libc.a(_cfgetospeed.o)
-../obj-ack//libc.a: ../obj-ack//libc.a(_cfsetispeed.o)
-../obj-ack//libc.a: ../obj-ack//libc.a(_cfsetospeed.o)
-../obj-ack//libc.a: ../obj-ack//libc.a(_chdir.o)
-../obj-ack//libc.a: ../obj-ack//libc.a(_chmod.o)
-../obj-ack//libc.a: ../obj-ack//libc.a(_chown.o)
-../obj-ack//libc.a: ../obj-ack//libc.a(_chroot.o)
-../obj-ack//libc.a: ../obj-ack//libc.a(_close.o)
-../obj-ack//libc.a: ../obj-ack//libc.a(_closedir.o)
-../obj-ack//libc.a: ../obj-ack//libc.a(_creat.o)
-../obj-ack//libc.a: ../obj-ack//libc.a(_dup.o)
-../obj-ack//libc.a: ../obj-ack//libc.a(_dup2.o)
-../obj-ack//libc.a: ../obj-ack//libc.a(_execl.o)
-../obj-ack//libc.a: ../obj-ack//libc.a(_execle.o)
-../obj-ack//libc.a: ../obj-ack//libc.a(_execlp.o)
-../obj-ack//libc.a: ../obj-ack//libc.a(_execv.o)
-../obj-ack//libc.a: ../obj-ack//libc.a(_execve.o)
-../obj-ack//libc.a: ../obj-ack//libc.a(_execvp.o)
-../obj-ack//libc.a: ../obj-ack//libc.a(_fcntl.o)
-../obj-ack//libc.a: ../obj-ack//libc.a(_fork.o)
-../obj-ack//libc.a: ../obj-ack//libc.a(_fpathconf.o)
-../obj-ack//libc.a: ../obj-ack//libc.a(_fstat.o)
-../obj-ack//libc.a: ../obj-ack//libc.a(_fstatfs.o)
-../obj-ack//libc.a: ../obj-ack//libc.a(_fsync.o)
-../obj-ack//libc.a: ../obj-ack//libc.a(_getcwd.o)
-../obj-ack//libc.a: ../obj-ack//libc.a(_getegid.o)
-../obj-ack//libc.a: ../obj-ack//libc.a(_geteuid.o)
-../obj-ack//libc.a: ../obj-ack//libc.a(_getgid.o)
-../obj-ack//libc.a: ../obj-ack//libc.a(_getgroups.o)
-../obj-ack//libc.a: ../obj-ack//libc.a(_getpgrp.o)
-../obj-ack//libc.a: ../obj-ack//libc.a(_getpid.o)
-../obj-ack//libc.a: ../obj-ack//libc.a(_getppid.o)
-../obj-ack//libc.a: ../obj-ack//libc.a(_getuid.o)
-../obj-ack//libc.a: ../obj-ack//libc.a(_ioctl.o)
-../obj-ack//libc.a: ../obj-ack//libc.a(_isatty.o)
-../obj-ack//libc.a: ../obj-ack//libc.a(_kill.o)
-../obj-ack//libc.a: ../obj-ack//libc.a(_link.o)
-../obj-ack//libc.a: ../obj-ack//libc.a(_lseek.o)
-../obj-ack//libc.a: ../obj-ack//libc.a(_lstat.o)
-../obj-ack//libc.a: ../obj-ack//libc.a(_mkdir.o)
-../obj-ack//libc.a: ../obj-ack//libc.a(_mkfifo.o)
-../obj-ack//libc.a: ../obj-ack//libc.a(_mknod.o)
-../obj-ack//libc.a: ../obj-ack//libc.a(_mount.o)
-../obj-ack//libc.a: ../obj-ack//libc.a(_open.o)
-../obj-ack//libc.a: ../obj-ack//libc.a(_opendir.o)
-../obj-ack//libc.a: ../obj-ack//libc.a(_pathconf.o)
-../obj-ack//libc.a: ../obj-ack//libc.a(_pause.o)
-../obj-ack//libc.a: ../obj-ack//libc.a(_pipe.o)
-../obj-ack//libc.a: ../obj-ack//libc.a(_ptrace.o)
-../obj-ack//libc.a: ../obj-ack//libc.a(_read.o)
-../obj-ack//libc.a: ../obj-ack//libc.a(_readdir.o)
-../obj-ack//libc.a: ../obj-ack//libc.a(_readlink.o)
-../obj-ack//libc.a: ../obj-ack//libc.a(_rename.o)
-../obj-ack//libc.a: ../obj-ack//libc.a(_rewinddir.o)
-../obj-ack//libc.a: ../obj-ack//libc.a(_rmdir.o)
-../obj-ack//libc.a: ../obj-ack//libc.a(_select.o)
-../obj-ack//libc.a: ../obj-ack//libc.a(_setgid.o)
-../obj-ack//libc.a: ../obj-ack//libc.a(_setsid.o)
-../obj-ack//libc.a: ../obj-ack//libc.a(_setuid.o)
-../obj-ack//libc.a: ../obj-ack//libc.a(_sigaction.o)
-../obj-ack//libc.a: ../obj-ack//libc.a(_sigpending.o)
-../obj-ack//libc.a: ../obj-ack//libc.a(_sigprocmask.o)
-../obj-ack//libc.a: ../obj-ack//libc.a(_sigreturn.o)
-../obj-ack//libc.a: ../obj-ack//libc.a(_sigset.o)
-../obj-ack//libc.a: ../obj-ack//libc.a(_sigsetjmp.o)
-../obj-ack//libc.a: ../obj-ack//libc.a(_sigsuspend.o)
-../obj-ack//libc.a: ../obj-ack//libc.a(_sleep.o)
-../obj-ack//libc.a: ../obj-ack//libc.a(_stat.o)
-../obj-ack//libc.a: ../obj-ack//libc.a(_stime.o)
-../obj-ack//libc.a: ../obj-ack//libc.a(_symlink.o)
-../obj-ack//libc.a: ../obj-ack//libc.a(_sync.o)
-../obj-ack//libc.a: ../obj-ack//libc.a(_tcdrain.o)
-../obj-ack//libc.a: ../obj-ack//libc.a(_tcflow.o)
-../obj-ack//libc.a: ../obj-ack//libc.a(_tcflush.o)
-../obj-ack//libc.a: ../obj-ack//libc.a(_tcgetattr.o)
-../obj-ack//libc.a: ../obj-ack//libc.a(_tcsendbreak.o)
-../obj-ack//libc.a: ../obj-ack//libc.a(_tcsetattr.o)
-../obj-ack//libc.a: ../obj-ack//libc.a(_time.o)
-../obj-ack//libc.a: ../obj-ack//libc.a(_times.o)
-../obj-ack//libc.a: ../obj-ack//libc.a(_truncate.o)
-../obj-ack//libc.a: ../obj-ack//libc.a(_umask.o)
-../obj-ack//libc.a: ../obj-ack//libc.a(_umount.o)
-../obj-ack//libc.a: ../obj-ack//libc.a(_uname.o)
-../obj-ack//libc.a: ../obj-ack//libc.a(_unlink.o)
-../obj-ack//libc.a: ../obj-ack//libc.a(_utime.o)
-../obj-ack//libc.a: ../obj-ack//libc.a(_wait.o)
-../obj-ack//libc.a: ../obj-ack//libc.a(_waitpid.o)
-../obj-ack//libc.a: ../obj-ack//libc.a(_write.o)
-../obj-ack//libc.a: ../obj-ack//libc.a(getloadavg.o)
-../obj-ack//libc.a: ../obj-ack//libc.a(getopt.o)
-../obj-ack//libc.a: ../obj-ack//libc.a(gettimeofday.o)
-../obj-ack//libc.a: ../obj-ack//libc.a(priority.o)
-../obj-ack//libc.a: ../obj-ack//libc.a(usleep.o)
-
-../obj-ack//libc.a:
-	ar cr ../obj-ack//libc.a ../obj-ack//./posix/*.o
-	rm ../obj-ack//./posix/*.o
-
-../obj-ack//libc.a(__exit.o): __exit.c
-	cc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-ack//./posix/__exit.o __exit.c
-../obj-ack//libc.a(_access.o): _access.c
-	cc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-ack//./posix/_access.o _access.c
-../obj-ack//libc.a(_alarm.o): _alarm.c
-	cc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-ack//./posix/_alarm.o _alarm.c
-../obj-ack//libc.a(_cfgetispeed.o): _cfgetispeed.c
-	cc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-ack//./posix/_cfgetispeed.o _cfgetispeed.c
-../obj-ack//libc.a(_cfgetospeed.o): _cfgetospeed.c
-	cc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-ack//./posix/_cfgetospeed.o _cfgetospeed.c
-../obj-ack//libc.a(_cfsetispeed.o): _cfsetispeed.c
-	cc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-ack//./posix/_cfsetispeed.o _cfsetispeed.c
-../obj-ack//libc.a(_cfsetospeed.o): _cfsetospeed.c
-	cc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-ack//./posix/_cfsetospeed.o _cfsetospeed.c
-../obj-ack//libc.a(_chdir.o): _chdir.c
-	cc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-ack//./posix/_chdir.o _chdir.c
-../obj-ack//libc.a(_chmod.o): _chmod.c
-	cc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-ack//./posix/_chmod.o _chmod.c
-../obj-ack//libc.a(_chown.o): _chown.c
-	cc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-ack//./posix/_chown.o _chown.c
-../obj-ack//libc.a(_chroot.o): _chroot.c
-	cc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-ack//./posix/_chroot.o _chroot.c
-../obj-ack//libc.a(_close.o): _close.c
-	cc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-ack//./posix/_close.o _close.c
-../obj-ack//libc.a(_closedir.o): _closedir.c
-	cc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-ack//./posix/_closedir.o _closedir.c
-../obj-ack//libc.a(_creat.o): _creat.c
-	cc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-ack//./posix/_creat.o _creat.c
-../obj-ack//libc.a(_dup.o): _dup.c
-	cc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-ack//./posix/_dup.o _dup.c
-../obj-ack//libc.a(_dup2.o): _dup2.c
-	cc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-ack//./posix/_dup2.o _dup2.c
-../obj-ack//libc.a(_execl.o): _execl.c
-	cc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-ack//./posix/_execl.o _execl.c
-../obj-ack//libc.a(_execle.o): _execle.c
-	cc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-ack//./posix/_execle.o _execle.c
-../obj-ack//libc.a(_execlp.o): _execlp.c
-	cc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-ack//./posix/_execlp.o _execlp.c
-../obj-ack//libc.a(_execv.o): _execv.c
-	cc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-ack//./posix/_execv.o _execv.c
-../obj-ack//libc.a(_execve.o): _execve.c
-	cc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-ack//./posix/_execve.o _execve.c
-../obj-ack//libc.a(_execvp.o): _execvp.c
-	cc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-ack//./posix/_execvp.o _execvp.c
-../obj-ack//libc.a(_fcntl.o): _fcntl.c
-	cc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-ack//./posix/_fcntl.o _fcntl.c
-../obj-ack//libc.a(_fork.o): _fork.c
-	cc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-ack//./posix/_fork.o _fork.c
-../obj-ack//libc.a(_fpathconf.o): _fpathconf.c
-	cc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-ack//./posix/_fpathconf.o _fpathconf.c
-../obj-ack//libc.a(_fstat.o): _fstat.c
-	cc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-ack//./posix/_fstat.o _fstat.c
-../obj-ack//libc.a(_fstatfs.o): _fstatfs.c
-	cc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-ack//./posix/_fstatfs.o _fstatfs.c
-../obj-ack//libc.a(_fsync.o): _fsync.c
-	cc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-ack//./posix/_fsync.o _fsync.c
-../obj-ack//libc.a(_getcwd.o): _getcwd.c
-	cc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-ack//./posix/_getcwd.o _getcwd.c
-../obj-ack//libc.a(_getegid.o): _getegid.c
-	cc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-ack//./posix/_getegid.o _getegid.c
-../obj-ack//libc.a(_geteuid.o): _geteuid.c
-	cc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-ack//./posix/_geteuid.o _geteuid.c
-../obj-ack//libc.a(_getgid.o): _getgid.c
-	cc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-ack//./posix/_getgid.o _getgid.c
-../obj-ack//libc.a(_getgroups.o): _getgroups.c
-	cc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-ack//./posix/_getgroups.o _getgroups.c
-../obj-ack//libc.a(_getpgrp.o): _getpgrp.c
-	cc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-ack//./posix/_getpgrp.o _getpgrp.c
-../obj-ack//libc.a(_getpid.o): _getpid.c
-	cc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-ack//./posix/_getpid.o _getpid.c
-../obj-ack//libc.a(_getppid.o): _getppid.c
-	cc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-ack//./posix/_getppid.o _getppid.c
-../obj-ack//libc.a(_getuid.o): _getuid.c
-	cc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-ack//./posix/_getuid.o _getuid.c
-../obj-ack//libc.a(_ioctl.o): _ioctl.c
-	cc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-ack//./posix/_ioctl.o _ioctl.c
-../obj-ack//libc.a(_isatty.o): _isatty.c
-	cc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-ack//./posix/_isatty.o _isatty.c
-../obj-ack//libc.a(_kill.o): _kill.c
-	cc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-ack//./posix/_kill.o _kill.c
-../obj-ack//libc.a(_link.o): _link.c
-	cc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-ack//./posix/_link.o _link.c
-../obj-ack//libc.a(_lseek.o): _lseek.c
-	cc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-ack//./posix/_lseek.o _lseek.c
-../obj-ack//libc.a(_lstat.o): _lstat.c
-	cc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-ack//./posix/_lstat.o _lstat.c
-../obj-ack//libc.a(_mkdir.o): _mkdir.c
-	cc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-ack//./posix/_mkdir.o _mkdir.c
-../obj-ack//libc.a(_mkfifo.o): _mkfifo.c
-	cc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-ack//./posix/_mkfifo.o _mkfifo.c
-../obj-ack//libc.a(_mknod.o): _mknod.c
-	cc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-ack//./posix/_mknod.o _mknod.c
-../obj-ack//libc.a(_mount.o): _mount.c
-	cc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-ack//./posix/_mount.o _mount.c
-../obj-ack//libc.a(_open.o): _open.c
-	cc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-ack//./posix/_open.o _open.c
-../obj-ack//libc.a(_opendir.o): _opendir.c
-	cc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-ack//./posix/_opendir.o _opendir.c
-../obj-ack//libc.a(_pathconf.o): _pathconf.c
-	cc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-ack//./posix/_pathconf.o _pathconf.c
-../obj-ack//libc.a(_pause.o): _pause.c
-	cc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-ack//./posix/_pause.o _pause.c
-../obj-ack//libc.a(_pipe.o): _pipe.c
-	cc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-ack//./posix/_pipe.o _pipe.c
-../obj-ack//libc.a(_ptrace.o): _ptrace.c
-	cc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-ack//./posix/_ptrace.o _ptrace.c
-../obj-ack//libc.a(_read.o): _read.c
-	cc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-ack//./posix/_read.o _read.c
-../obj-ack//libc.a(_readdir.o): _readdir.c
-	cc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-ack//./posix/_readdir.o _readdir.c
-../obj-ack//libc.a(_readlink.o): _readlink.c
-	cc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-ack//./posix/_readlink.o _readlink.c
-../obj-ack//libc.a(_rename.o): _rename.c
-	cc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-ack//./posix/_rename.o _rename.c
-../obj-ack//libc.a(_rewinddir.o): _rewinddir.c
-	cc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-ack//./posix/_rewinddir.o _rewinddir.c
-../obj-ack//libc.a(_rmdir.o): _rmdir.c
-	cc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-ack//./posix/_rmdir.o _rmdir.c
-../obj-ack//libc.a(_select.o): _select.c
-	cc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-ack//./posix/_select.o _select.c
-../obj-ack//libc.a(_setgid.o): _setgid.c
-	cc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-ack//./posix/_setgid.o _setgid.c
-../obj-ack//libc.a(_setsid.o): _setsid.c
-	cc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-ack//./posix/_setsid.o _setsid.c
-../obj-ack//libc.a(_setuid.o): _setuid.c
-	cc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-ack//./posix/_setuid.o _setuid.c
-../obj-ack//libc.a(_sigaction.o): _sigaction.c
-	cc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-ack//./posix/_sigaction.o _sigaction.c
-../obj-ack//libc.a(_sigpending.o): _sigpending.c
-	cc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-ack//./posix/_sigpending.o _sigpending.c
-../obj-ack//libc.a(_sigprocmask.o): _sigprocmask.c
-	cc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-ack//./posix/_sigprocmask.o _sigprocmask.c
-../obj-ack//libc.a(_sigreturn.o): _sigreturn.c
-	cc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-ack//./posix/_sigreturn.o _sigreturn.c
-../obj-ack//libc.a(_sigset.o): _sigset.c
-	cc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-ack//./posix/_sigset.o _sigset.c
-../obj-ack//libc.a(_sigsetjmp.o): _sigsetjmp.c
-	cc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-ack//./posix/_sigsetjmp.o _sigsetjmp.c
-../obj-ack//libc.a(_sigsuspend.o): _sigsuspend.c
-	cc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-ack//./posix/_sigsuspend.o _sigsuspend.c
-../obj-ack//libc.a(_sleep.o): _sleep.c
-	cc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-ack//./posix/_sleep.o _sleep.c
-../obj-ack//libc.a(_stat.o): _stat.c
-	cc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-ack//./posix/_stat.o _stat.c
-../obj-ack//libc.a(_stime.o): _stime.c
-	cc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-ack//./posix/_stime.o _stime.c
-../obj-ack//libc.a(_symlink.o): _symlink.c
-	cc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-ack//./posix/_symlink.o _symlink.c
-../obj-ack//libc.a(_sync.o): _sync.c
-	cc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-ack//./posix/_sync.o _sync.c
-../obj-ack//libc.a(_tcdrain.o): _tcdrain.c
-	cc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-ack//./posix/_tcdrain.o _tcdrain.c
-../obj-ack//libc.a(_tcflow.o): _tcflow.c
-	cc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-ack//./posix/_tcflow.o _tcflow.c
-../obj-ack//libc.a(_tcflush.o): _tcflush.c
-	cc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-ack//./posix/_tcflush.o _tcflush.c
-../obj-ack//libc.a(_tcgetattr.o): _tcgetattr.c
-	cc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-ack//./posix/_tcgetattr.o _tcgetattr.c
-../obj-ack//libc.a(_tcsendbreak.o): _tcsendbreak.c
-	cc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-ack//./posix/_tcsendbreak.o _tcsendbreak.c
-../obj-ack//libc.a(_tcsetattr.o): _tcsetattr.c
-	cc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-ack//./posix/_tcsetattr.o _tcsetattr.c
-../obj-ack//libc.a(_time.o): _time.c
-	cc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-ack//./posix/_time.o _time.c
-../obj-ack//libc.a(_times.o): _times.c
-	cc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-ack//./posix/_times.o _times.c
-../obj-ack//libc.a(_truncate.o): _truncate.c
-	cc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-ack//./posix/_truncate.o _truncate.c
-../obj-ack//libc.a(_umask.o): _umask.c
-	cc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-ack//./posix/_umask.o _umask.c
-../obj-ack//libc.a(_umount.o): _umount.c
-	cc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-ack//./posix/_umount.o _umount.c
-../obj-ack//libc.a(_uname.o): _uname.c
-	cc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-ack//./posix/_uname.o _uname.c
-../obj-ack//libc.a(_unlink.o): _unlink.c
-	cc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-ack//./posix/_unlink.o _unlink.c
-../obj-ack//libc.a(_utime.o): _utime.c
-	cc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-ack//./posix/_utime.o _utime.c
-../obj-ack//libc.a(_wait.o): _wait.c
-	cc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-ack//./posix/_wait.o _wait.c
-../obj-ack//libc.a(_waitpid.o): _waitpid.c
-	cc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-ack//./posix/_waitpid.o _waitpid.c
-../obj-ack//libc.a(_write.o): _write.c
-	cc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-ack//./posix/_write.o _write.c
-../obj-ack//libc.a(getloadavg.o): getloadavg.c
-	cc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-ack//./posix/getloadavg.o getloadavg.c
-../obj-ack//libc.a(getopt.o): getopt.c
-	cc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-ack//./posix/getopt.o getopt.c
-../obj-ack//libc.a(gettimeofday.o): gettimeofday.c
-	cc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-ack//./posix/gettimeofday.o gettimeofday.c
-../obj-ack//libc.a(priority.o): priority.c
-	cc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-ack//./posix/priority.o priority.c
-../obj-ack//libc.a(usleep.o): usleep.c
-	cc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-ack//./posix/usleep.o usleep.c
-
-all-gnu: ../obj-gnu/libc.a
-
-../obj-gnu/libc.a: ../obj-gnu/./posix/__exit.o
-../obj-gnu/libc.a: ../obj-gnu/./posix/_access.o
-../obj-gnu/libc.a: ../obj-gnu/./posix/_alarm.o
-../obj-gnu/libc.a: ../obj-gnu/./posix/_cfgetispeed.o
-../obj-gnu/libc.a: ../obj-gnu/./posix/_cfgetospeed.o
-../obj-gnu/libc.a: ../obj-gnu/./posix/_cfsetispeed.o
-../obj-gnu/libc.a: ../obj-gnu/./posix/_cfsetospeed.o
-../obj-gnu/libc.a: ../obj-gnu/./posix/_chdir.o
-../obj-gnu/libc.a: ../obj-gnu/./posix/_chmod.o
-../obj-gnu/libc.a: ../obj-gnu/./posix/_chown.o
-../obj-gnu/libc.a: ../obj-gnu/./posix/_chroot.o
-../obj-gnu/libc.a: ../obj-gnu/./posix/_close.o
-../obj-gnu/libc.a: ../obj-gnu/./posix/_closedir.o
-../obj-gnu/libc.a: ../obj-gnu/./posix/_creat.o
-../obj-gnu/libc.a: ../obj-gnu/./posix/_dup.o
-../obj-gnu/libc.a: ../obj-gnu/./posix/_dup2.o
-../obj-gnu/libc.a: ../obj-gnu/./posix/_execl.o
-../obj-gnu/libc.a: ../obj-gnu/./posix/_execle.o
-../obj-gnu/libc.a: ../obj-gnu/./posix/_execlp.o
-../obj-gnu/libc.a: ../obj-gnu/./posix/_execv.o
-../obj-gnu/libc.a: ../obj-gnu/./posix/_execve.o
-../obj-gnu/libc.a: ../obj-gnu/./posix/_execvp.o
-../obj-gnu/libc.a: ../obj-gnu/./posix/_fcntl.o
-../obj-gnu/libc.a: ../obj-gnu/./posix/_fork.o
-../obj-gnu/libc.a: ../obj-gnu/./posix/_fpathconf.o
-../obj-gnu/libc.a: ../obj-gnu/./posix/_fstat.o
-../obj-gnu/libc.a: ../obj-gnu/./posix/_fstatfs.o
-../obj-gnu/libc.a: ../obj-gnu/./posix/_fsync.o
-../obj-gnu/libc.a: ../obj-gnu/./posix/_getcwd.o
-../obj-gnu/libc.a: ../obj-gnu/./posix/_getegid.o
-../obj-gnu/libc.a: ../obj-gnu/./posix/_geteuid.o
-../obj-gnu/libc.a: ../obj-gnu/./posix/_getgid.o
-../obj-gnu/libc.a: ../obj-gnu/./posix/_getgroups.o
-../obj-gnu/libc.a: ../obj-gnu/./posix/_getpgrp.o
-../obj-gnu/libc.a: ../obj-gnu/./posix/_getpid.o
-../obj-gnu/libc.a: ../obj-gnu/./posix/_getppid.o
-../obj-gnu/libc.a: ../obj-gnu/./posix/_getuid.o
-../obj-gnu/libc.a: ../obj-gnu/./posix/_ioctl.o
-../obj-gnu/libc.a: ../obj-gnu/./posix/_isatty.o
-../obj-gnu/libc.a: ../obj-gnu/./posix/_kill.o
-../obj-gnu/libc.a: ../obj-gnu/./posix/_link.o
-../obj-gnu/libc.a: ../obj-gnu/./posix/_lseek.o
-../obj-gnu/libc.a: ../obj-gnu/./posix/_lstat.o
-../obj-gnu/libc.a: ../obj-gnu/./posix/_mkdir.o
-../obj-gnu/libc.a: ../obj-gnu/./posix/_mkfifo.o
-../obj-gnu/libc.a: ../obj-gnu/./posix/_mknod.o
-../obj-gnu/libc.a: ../obj-gnu/./posix/_mount.o
-../obj-gnu/libc.a: ../obj-gnu/./posix/_open.o
-../obj-gnu/libc.a: ../obj-gnu/./posix/_opendir.o
-../obj-gnu/libc.a: ../obj-gnu/./posix/_pathconf.o
-../obj-gnu/libc.a: ../obj-gnu/./posix/_pause.o
-../obj-gnu/libc.a: ../obj-gnu/./posix/_pipe.o
-../obj-gnu/libc.a: ../obj-gnu/./posix/_ptrace.o
-../obj-gnu/libc.a: ../obj-gnu/./posix/_read.o
-../obj-gnu/libc.a: ../obj-gnu/./posix/_readdir.o
-../obj-gnu/libc.a: ../obj-gnu/./posix/_readlink.o
-../obj-gnu/libc.a: ../obj-gnu/./posix/_rename.o
-../obj-gnu/libc.a: ../obj-gnu/./posix/_rewinddir.o
-../obj-gnu/libc.a: ../obj-gnu/./posix/_rmdir.o
-../obj-gnu/libc.a: ../obj-gnu/./posix/_select.o
-../obj-gnu/libc.a: ../obj-gnu/./posix/_setgid.o
-../obj-gnu/libc.a: ../obj-gnu/./posix/_setsid.o
-../obj-gnu/libc.a: ../obj-gnu/./posix/_setuid.o
-../obj-gnu/libc.a: ../obj-gnu/./posix/_sigaction.o
-../obj-gnu/libc.a: ../obj-gnu/./posix/_sigpending.o
-../obj-gnu/libc.a: ../obj-gnu/./posix/_sigprocmask.o
-../obj-gnu/libc.a: ../obj-gnu/./posix/_sigreturn.o
-../obj-gnu/libc.a: ../obj-gnu/./posix/_sigset.o
-../obj-gnu/libc.a: ../obj-gnu/./posix/_sigsetjmp.o
-../obj-gnu/libc.a: ../obj-gnu/./posix/_sigsuspend.o
-../obj-gnu/libc.a: ../obj-gnu/./posix/_sleep.o
-../obj-gnu/libc.a: ../obj-gnu/./posix/_stat.o
-../obj-gnu/libc.a: ../obj-gnu/./posix/_stime.o
-../obj-gnu/libc.a: ../obj-gnu/./posix/_symlink.o
-../obj-gnu/libc.a: ../obj-gnu/./posix/_sync.o
-../obj-gnu/libc.a: ../obj-gnu/./posix/_tcdrain.o
-../obj-gnu/libc.a: ../obj-gnu/./posix/_tcflow.o
-../obj-gnu/libc.a: ../obj-gnu/./posix/_tcflush.o
-../obj-gnu/libc.a: ../obj-gnu/./posix/_tcgetattr.o
-../obj-gnu/libc.a: ../obj-gnu/./posix/_tcsendbreak.o
-../obj-gnu/libc.a: ../obj-gnu/./posix/_tcsetattr.o
-../obj-gnu/libc.a: ../obj-gnu/./posix/_time.o
-../obj-gnu/libc.a: ../obj-gnu/./posix/_times.o
-../obj-gnu/libc.a: ../obj-gnu/./posix/_truncate.o
-../obj-gnu/libc.a: ../obj-gnu/./posix/_umask.o
-../obj-gnu/libc.a: ../obj-gnu/./posix/_umount.o
-../obj-gnu/libc.a: ../obj-gnu/./posix/_uname.o
-../obj-gnu/libc.a: ../obj-gnu/./posix/_unlink.o
-../obj-gnu/libc.a: ../obj-gnu/./posix/_utime.o
-../obj-gnu/libc.a: ../obj-gnu/./posix/_wait.o
-../obj-gnu/libc.a: ../obj-gnu/./posix/_waitpid.o
-../obj-gnu/libc.a: ../obj-gnu/./posix/_write.o
-../obj-gnu/libc.a: ../obj-gnu/./posix/getloadavg.o
-../obj-gnu/libc.a: ../obj-gnu/./posix/getopt.o
-../obj-gnu/libc.a: ../obj-gnu/./posix/gettimeofday.o
-../obj-gnu/libc.a: ../obj-gnu/./posix/priority.o
-../obj-gnu/libc.a: ../obj-gnu/./posix/usleep.o
-
-../obj-gnu/libc.a:
-	gar cr ../obj-gnu/libc.a $?
-
-../obj-gnu/./posix/__exit.o: __exit.c
-	gcc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-gnu/./posix/__exit.o __exit.c
-
-../obj-gnu/./posix/_access.o: _access.c
-	gcc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-gnu/./posix/_access.o _access.c
-
-../obj-gnu/./posix/_alarm.o: _alarm.c
-	gcc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-gnu/./posix/_alarm.o _alarm.c
-
-../obj-gnu/./posix/_cfgetispeed.o: _cfgetispeed.c
-	gcc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-gnu/./posix/_cfgetispeed.o _cfgetispeed.c
-
-../obj-gnu/./posix/_cfgetospeed.o: _cfgetospeed.c
-	gcc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-gnu/./posix/_cfgetospeed.o _cfgetospeed.c
-
-../obj-gnu/./posix/_cfsetispeed.o: _cfsetispeed.c
-	gcc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-gnu/./posix/_cfsetispeed.o _cfsetispeed.c
-
-../obj-gnu/./posix/_cfsetospeed.o: _cfsetospeed.c
-	gcc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-gnu/./posix/_cfsetospeed.o _cfsetospeed.c
-
-../obj-gnu/./posix/_chdir.o: _chdir.c
-	gcc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-gnu/./posix/_chdir.o _chdir.c
-
-../obj-gnu/./posix/_chmod.o: _chmod.c
-	gcc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-gnu/./posix/_chmod.o _chmod.c
-
-../obj-gnu/./posix/_chown.o: _chown.c
-	gcc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-gnu/./posix/_chown.o _chown.c
-
-../obj-gnu/./posix/_chroot.o: _chroot.c
-	gcc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-gnu/./posix/_chroot.o _chroot.c
-
-../obj-gnu/./posix/_close.o: _close.c
-	gcc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-gnu/./posix/_close.o _close.c
-
-../obj-gnu/./posix/_closedir.o: _closedir.c
-	gcc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-gnu/./posix/_closedir.o _closedir.c
-
-../obj-gnu/./posix/_creat.o: _creat.c
-	gcc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-gnu/./posix/_creat.o _creat.c
-
-../obj-gnu/./posix/_dup.o: _dup.c
-	gcc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-gnu/./posix/_dup.o _dup.c
-
-../obj-gnu/./posix/_dup2.o: _dup2.c
-	gcc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-gnu/./posix/_dup2.o _dup2.c
-
-../obj-gnu/./posix/_execl.o: _execl.c
-	gcc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-gnu/./posix/_execl.o _execl.c
-
-../obj-gnu/./posix/_execle.o: _execle.c
-	gcc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-gnu/./posix/_execle.o _execle.c
-
-../obj-gnu/./posix/_execlp.o: _execlp.c
-	gcc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-gnu/./posix/_execlp.o _execlp.c
-
-../obj-gnu/./posix/_execv.o: _execv.c
-	gcc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-gnu/./posix/_execv.o _execv.c
-
-../obj-gnu/./posix/_execve.o: _execve.c
-	gcc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-gnu/./posix/_execve.o _execve.c
-
-../obj-gnu/./posix/_execvp.o: _execvp.c
-	gcc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-gnu/./posix/_execvp.o _execvp.c
-
-../obj-gnu/./posix/_fcntl.o: _fcntl.c
-	gcc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-gnu/./posix/_fcntl.o _fcntl.c
-
-../obj-gnu/./posix/_fork.o: _fork.c
-	gcc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-gnu/./posix/_fork.o _fork.c
-
-../obj-gnu/./posix/_fpathconf.o: _fpathconf.c
-	gcc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-gnu/./posix/_fpathconf.o _fpathconf.c
-
-../obj-gnu/./posix/_fstat.o: _fstat.c
-	gcc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-gnu/./posix/_fstat.o _fstat.c
-
-../obj-gnu/./posix/_fstatfs.o: _fstatfs.c
-	gcc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-gnu/./posix/_fstatfs.o _fstatfs.c
-
-../obj-gnu/./posix/_fsync.o: _fsync.c
-	gcc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-gnu/./posix/_fsync.o _fsync.c
-
-../obj-gnu/./posix/_getcwd.o: _getcwd.c
-	gcc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-gnu/./posix/_getcwd.o _getcwd.c
-
-../obj-gnu/./posix/_getegid.o: _getegid.c
-	gcc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-gnu/./posix/_getegid.o _getegid.c
-
-../obj-gnu/./posix/_geteuid.o: _geteuid.c
-	gcc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-gnu/./posix/_geteuid.o _geteuid.c
-
-../obj-gnu/./posix/_getgid.o: _getgid.c
-	gcc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-gnu/./posix/_getgid.o _getgid.c
-
-../obj-gnu/./posix/_getgroups.o: _getgroups.c
-	gcc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-gnu/./posix/_getgroups.o _getgroups.c
-
-../obj-gnu/./posix/_getpgrp.o: _getpgrp.c
-	gcc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-gnu/./posix/_getpgrp.o _getpgrp.c
-
-../obj-gnu/./posix/_getpid.o: _getpid.c
-	gcc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-gnu/./posix/_getpid.o _getpid.c
-
-../obj-gnu/./posix/_getppid.o: _getppid.c
-	gcc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-gnu/./posix/_getppid.o _getppid.c
-
-../obj-gnu/./posix/_getuid.o: _getuid.c
-	gcc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-gnu/./posix/_getuid.o _getuid.c
-
-../obj-gnu/./posix/_ioctl.o: _ioctl.c
-	gcc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-gnu/./posix/_ioctl.o _ioctl.c
-
-../obj-gnu/./posix/_isatty.o: _isatty.c
-	gcc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-gnu/./posix/_isatty.o _isatty.c
-
-../obj-gnu/./posix/_kill.o: _kill.c
-	gcc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-gnu/./posix/_kill.o _kill.c
-
-../obj-gnu/./posix/_link.o: _link.c
-	gcc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-gnu/./posix/_link.o _link.c
-
-../obj-gnu/./posix/_lseek.o: _lseek.c
-	gcc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-gnu/./posix/_lseek.o _lseek.c
-
-../obj-gnu/./posix/_lstat.o: _lstat.c
-	gcc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-gnu/./posix/_lstat.o _lstat.c
-
-../obj-gnu/./posix/_mkdir.o: _mkdir.c
-	gcc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-gnu/./posix/_mkdir.o _mkdir.c
-
-../obj-gnu/./posix/_mkfifo.o: _mkfifo.c
-	gcc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-gnu/./posix/_mkfifo.o _mkfifo.c
-
-../obj-gnu/./posix/_mknod.o: _mknod.c
-	gcc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-gnu/./posix/_mknod.o _mknod.c
-
-../obj-gnu/./posix/_mount.o: _mount.c
-	gcc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-gnu/./posix/_mount.o _mount.c
-
-../obj-gnu/./posix/_open.o: _open.c
-	gcc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-gnu/./posix/_open.o _open.c
-
-../obj-gnu/./posix/_opendir.o: _opendir.c
-	gcc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-gnu/./posix/_opendir.o _opendir.c
-
-../obj-gnu/./posix/_pathconf.o: _pathconf.c
-	gcc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-gnu/./posix/_pathconf.o _pathconf.c
-
-../obj-gnu/./posix/_pause.o: _pause.c
-	gcc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-gnu/./posix/_pause.o _pause.c
-
-../obj-gnu/./posix/_pipe.o: _pipe.c
-	gcc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-gnu/./posix/_pipe.o _pipe.c
-
-../obj-gnu/./posix/_ptrace.o: _ptrace.c
-	gcc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-gnu/./posix/_ptrace.o _ptrace.c
-
-../obj-gnu/./posix/_read.o: _read.c
-	gcc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-gnu/./posix/_read.o _read.c
-
-../obj-gnu/./posix/_readdir.o: _readdir.c
-	gcc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-gnu/./posix/_readdir.o _readdir.c
-
-../obj-gnu/./posix/_readlink.o: _readlink.c
-	gcc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-gnu/./posix/_readlink.o _readlink.c
-
-../obj-gnu/./posix/_rename.o: _rename.c
-	gcc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-gnu/./posix/_rename.o _rename.c
-
-../obj-gnu/./posix/_rewinddir.o: _rewinddir.c
-	gcc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-gnu/./posix/_rewinddir.o _rewinddir.c
-
-../obj-gnu/./posix/_rmdir.o: _rmdir.c
-	gcc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-gnu/./posix/_rmdir.o _rmdir.c
-
-../obj-gnu/./posix/_select.o: _select.c
-	gcc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-gnu/./posix/_select.o _select.c
-
-../obj-gnu/./posix/_setgid.o: _setgid.c
-	gcc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-gnu/./posix/_setgid.o _setgid.c
-
-../obj-gnu/./posix/_setsid.o: _setsid.c
-	gcc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-gnu/./posix/_setsid.o _setsid.c
-
-../obj-gnu/./posix/_setuid.o: _setuid.c
-	gcc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-gnu/./posix/_setuid.o _setuid.c
-
-../obj-gnu/./posix/_sigaction.o: _sigaction.c
-	gcc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-gnu/./posix/_sigaction.o _sigaction.c
-
-../obj-gnu/./posix/_sigpending.o: _sigpending.c
-	gcc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-gnu/./posix/_sigpending.o _sigpending.c
-
-../obj-gnu/./posix/_sigprocmask.o: _sigprocmask.c
-	gcc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-gnu/./posix/_sigprocmask.o _sigprocmask.c
-
-../obj-gnu/./posix/_sigreturn.o: _sigreturn.c
-	gcc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-gnu/./posix/_sigreturn.o _sigreturn.c
-
-../obj-gnu/./posix/_sigset.o: _sigset.c
-	gcc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-gnu/./posix/_sigset.o _sigset.c
-
-../obj-gnu/./posix/_sigsetjmp.o: _sigsetjmp.c
-	gcc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-gnu/./posix/_sigsetjmp.o _sigsetjmp.c
-
-../obj-gnu/./posix/_sigsuspend.o: _sigsuspend.c
-	gcc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-gnu/./posix/_sigsuspend.o _sigsuspend.c
-
-../obj-gnu/./posix/_sleep.o: _sleep.c
-	gcc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-gnu/./posix/_sleep.o _sleep.c
-
-../obj-gnu/./posix/_stat.o: _stat.c
-	gcc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-gnu/./posix/_stat.o _stat.c
-
-../obj-gnu/./posix/_stime.o: _stime.c
-	gcc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-gnu/./posix/_stime.o _stime.c
-
-../obj-gnu/./posix/_symlink.o: _symlink.c
-	gcc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-gnu/./posix/_symlink.o _symlink.c
-
-../obj-gnu/./posix/_sync.o: _sync.c
-	gcc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-gnu/./posix/_sync.o _sync.c
-
-../obj-gnu/./posix/_tcdrain.o: _tcdrain.c
-	gcc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-gnu/./posix/_tcdrain.o _tcdrain.c
-
-../obj-gnu/./posix/_tcflow.o: _tcflow.c
-	gcc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-gnu/./posix/_tcflow.o _tcflow.c
-
-../obj-gnu/./posix/_tcflush.o: _tcflush.c
-	gcc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-gnu/./posix/_tcflush.o _tcflush.c
-
-../obj-gnu/./posix/_tcgetattr.o: _tcgetattr.c
-	gcc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-gnu/./posix/_tcgetattr.o _tcgetattr.c
-
-../obj-gnu/./posix/_tcsendbreak.o: _tcsendbreak.c
-	gcc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-gnu/./posix/_tcsendbreak.o _tcsendbreak.c
-
-../obj-gnu/./posix/_tcsetattr.o: _tcsetattr.c
-	gcc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-gnu/./posix/_tcsetattr.o _tcsetattr.c
-
-../obj-gnu/./posix/_time.o: _time.c
-	gcc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-gnu/./posix/_time.o _time.c
-
-../obj-gnu/./posix/_times.o: _times.c
-	gcc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-gnu/./posix/_times.o _times.c
-
-../obj-gnu/./posix/_truncate.o: _truncate.c
-	gcc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-gnu/./posix/_truncate.o _truncate.c
-
-../obj-gnu/./posix/_umask.o: _umask.c
-	gcc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-gnu/./posix/_umask.o _umask.c
-
-../obj-gnu/./posix/_umount.o: _umount.c
-	gcc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-gnu/./posix/_umount.o _umount.c
-
-../obj-gnu/./posix/_uname.o: _uname.c
-	gcc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-gnu/./posix/_uname.o _uname.c
-
-../obj-gnu/./posix/_unlink.o: _unlink.c
-	gcc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-gnu/./posix/_unlink.o _unlink.c
-
-../obj-gnu/./posix/_utime.o: _utime.c
-	gcc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-gnu/./posix/_utime.o _utime.c
-
-../obj-gnu/./posix/_wait.o: _wait.c
-	gcc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-gnu/./posix/_wait.o _wait.c
-
-../obj-gnu/./posix/_waitpid.o: _waitpid.c
-	gcc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-gnu/./posix/_waitpid.o _waitpid.c
-
-../obj-gnu/./posix/_write.o: _write.c
-	gcc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-gnu/./posix/_write.o _write.c
-
-../obj-gnu/./posix/getloadavg.o: getloadavg.c
-	gcc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-gnu/./posix/getloadavg.o getloadavg.c
-
-../obj-gnu/./posix/getopt.o: getopt.c
-	gcc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-gnu/./posix/getopt.o getopt.c
-
-../obj-gnu/./posix/gettimeofday.o: gettimeofday.c
-	gcc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-gnu/./posix/gettimeofday.o gettimeofday.c
-
-../obj-gnu/./posix/priority.o: priority.c
-	gcc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-gnu/./posix/priority.o priority.c
-
-../obj-gnu/./posix/usleep.o: usleep.c
-	gcc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-gnu/./posix/usleep.o usleep.c
-
-
-
-
-clean::
-	rm -f ../obj-ack//./posix/*
-	rm -f ../obj-gnu/./posix/*
-
-include Makedepend-ack
-include .depend-ack
-
-include Makedepend-gnu
-include .depend-gnu
Index: trunk/minix/lib/posix/Makefile.in
===================================================================
--- trunk/minix/lib/posix/Makefile.in	(revision 9)
+++ 	(revision )
@@ -1,109 +1,0 @@
-# Makefile for lib/posix.
-
-CFLAGS="-O -D_MINIX -D_POSIX_SOURCE"
-
-LIBRARIES=libc
-
-libc_FILES=" \
-	__exit.c \
-	_access.c \
-	_alarm.c \
-	_cfgetispeed.c \
-	_cfgetospeed.c \
-	_cfsetispeed.c \
-	_cfsetospeed.c \
-	_chdir.c \
-	_chmod.c \
-	_chown.c \
-	_chroot.c \
-	_close.c \
-	_closedir.c \
-	_creat.c \
-	_dup.c \
-	_dup2.c \
-	_execl.c \
-	_execle.c \
-	_execlp.c \
-	_execv.c \
-	_execve.c \
-	_execvp.c \
-	_fcntl.c \
-	_fork.c \
-	_fpathconf.c \
-	_fstat.c \
-	_fstatfs.c \
-	_fsync.c \
-	_getcwd.c \
-	_getegid.c \
-	_geteuid.c \
-	_getgid.c \
-	_getgroups.c \
-	_getpgrp.c \
-	_getpid.c \
-	_getppid.c \
-	_getuid.c \
-	_ioctl.c \
-	_isatty.c \
-	_kill.c \
-	_link.c \
-	_lseek.c \
-	_lstat.c \
-	_mkdir.c \
-	_mkfifo.c \
-	_mknod.c \
-	_mount.c \
-	_open.c \
-	_opendir.c \
-	_pathconf.c \
-	_pause.c \
-	_pipe.c \
-	_ptrace.c \
-	_read.c \
-	_readdir.c \
-	_readlink.c \
-	_rename.c \
-	_rewinddir.c \
-	_rmdir.c \
-	_select.c \
-	_setgid.c \
-	_setsid.c \
-	_setuid.c \
-	_sigaction.c \
-	_sigpending.c \
-	_sigprocmask.c \
-	_sigreturn.c \
-	_sigset.c \
-	_sigsetjmp.c \
-	_sigsuspend.c \
-	_sleep.c \
-	_stat.c \
-	_stime.c \
-	_symlink.c \
-	_sync.c \
-	_tcdrain.c \
-	_tcflow.c \
-	_tcflush.c \
-	_tcgetattr.c \
-	_tcsendbreak.c \
-	_tcsetattr.c \
-	_time.c \
-	_times.c \
-	_truncate.c \
-	_umask.c \
-	_umount.c \
-	_uname.c \
-	_unlink.c \
-	_utime.c \
-	_wait.c \
-	_waitpid.c \
-	_write.c \
-	getloadavg.c \
-	getopt.c \
-	gettimeofday.c \
-	priority.c \
-	usleep.c"
-
-TYPE=both
-
-#$(call ADDDEPENDENCIES,_uname.o,/usr/include/minix/config.h)
-
Index: trunk/minix/lib/posix/__exit.c
===================================================================
--- trunk/minix/lib/posix/__exit.c	(revision 9)
+++ 	(revision )
@@ -1,23 +1,0 @@
-#define _exit	__exit
-#include <lib.h>
-#include <unistd.h>
-
-PUBLIC void _exit(status)
-int status;
-{
-  void (*suicide)(void);
-  message m;
-
-  m.m1_i1 = status;
-  _syscall(MM, EXIT, &m);
-
-  /* If exiting nicely through PM fails for some reason, try to
-   * commit suicide. E.g., message to PM might fail due to deadlock.
-   */
-  suicide = (void (*)(void)) -1;
-  suicide();
-
-  /* If committing suicide fails for some reason, hang. */
-  for(;;) { }
-}
-
Index: trunk/minix/lib/posix/_access.c
===================================================================
--- trunk/minix/lib/posix/_access.c	(revision 9)
+++ 	(revision )
@@ -1,14 +1,0 @@
-#include <lib.h>
-#define access	_access
-#include <unistd.h>
-
-PUBLIC int access(name, mode)
-_CONST char *name;
-int mode;
-{
-  message m;
-
-  m.m3_i2 = mode;
-  _loadname(name, &m);
-  return(_syscall(FS, ACCESS, &m));
-}
Index: trunk/minix/lib/posix/_alarm.c
===================================================================
--- trunk/minix/lib/posix/_alarm.c	(revision 9)
+++ 	(revision )
@@ -1,12 +1,0 @@
-#include <lib.h>
-#define alarm	_alarm
-#include <unistd.h>
-
-PUBLIC unsigned int alarm(sec)
-unsigned int sec;
-{
-  message m;
-
-  m.m1_i1 = (int) sec;
-  return( (unsigned) _syscall(MM, ALARM, &m));
-}
Index: trunk/minix/lib/posix/_cfgetispeed.c
===================================================================
--- trunk/minix/lib/posix/_cfgetispeed.c	(revision 9)
+++ 	(revision )
@@ -1,12 +1,0 @@
-/*
-posix/_cfgetispeed
-
-Created:	June 11, 1993 by Philip Homburg
-*/
-
-#include <termios.h>
-
-speed_t _cfgetispeed(const struct termios *termios_p)
-{
-  return termios_p->c_ispeed;
-}
Index: trunk/minix/lib/posix/_cfgetospeed.c
===================================================================
--- trunk/minix/lib/posix/_cfgetospeed.c	(revision 9)
+++ 	(revision )
@@ -1,12 +1,0 @@
-/*
-posix/_cfgetospeed
-
-Created:	June 11, 1993 by Philip Homburg
-*/
-
-#include <termios.h>
-
-speed_t _cfgetospeed(const struct termios *termios_p)
-{
-  return termios_p->c_ospeed;
-}
Index: trunk/minix/lib/posix/_cfsetispeed.c
===================================================================
--- trunk/minix/lib/posix/_cfsetispeed.c	(revision 9)
+++ 	(revision )
@@ -1,13 +1,0 @@
-/*
-posix/_cfsetispeed
-
-Created:	June 11, 1993 by Philip Homburg
-*/
-
-#include <termios.h>
-
-int _cfsetispeed(struct termios *termios_p, speed_t speed)
-{
-  termios_p->c_ispeed= speed;
-  return 0;
-}
Index: trunk/minix/lib/posix/_cfsetospeed.c
===================================================================
--- trunk/minix/lib/posix/_cfsetospeed.c	(revision 9)
+++ 	(revision )
@@ -1,13 +1,0 @@
-/*
-posix/_cfsetospeed
-
-Created:	June 11, 1993 by Philip Homburg
-*/
-
-#include <termios.h>
-
-int _cfsetospeed(struct termios *termios_p, speed_t speed)
-{
-  termios_p->c_ospeed= speed;
-  return 0;
-}
Index: trunk/minix/lib/posix/_chdir.c
===================================================================
--- trunk/minix/lib/posix/_chdir.c	(revision 9)
+++ 	(revision )
@@ -1,22 +1,0 @@
-#include <lib.h>
-#define chdir	_chdir
-#define fchdir	_fchdir
-#include <unistd.h>
-
-PUBLIC int chdir(name)
-_CONST char *name;
-{
-  message m;
-
-  _loadname(name, &m);
-  return(_syscall(FS, CHDIR, &m));
-}
-
-PUBLIC int fchdir(fd)
-int fd;
-{
-  message m;
-
-  m.m1_i1 = fd;
-  return(_syscall(FS, FCHDIR, &m));
-}
Index: trunk/minix/lib/posix/_chmod.c
===================================================================
--- trunk/minix/lib/posix/_chmod.c	(revision 9)
+++ 	(revision )
@@ -1,14 +1,0 @@
-#include <lib.h>
-#define chmod	_chmod
-#include <sys/stat.h>
-
-PUBLIC int chmod(name, mode)
-_CONST char *name;
-_mnx_Mode_t mode;
-{
-  message m;
-
-  m.m3_i2 = mode;
-  _loadname(name, &m);
-  return(_syscall(FS, CHMOD, &m));
-}
Index: trunk/minix/lib/posix/_chown.c
===================================================================
--- trunk/minix/lib/posix/_chown.c	(revision 9)
+++ 	(revision )
@@ -1,18 +1,0 @@
-#include <lib.h>
-#define chown	_chown
-#include <string.h>
-#include <unistd.h>
-
-PUBLIC int chown(name, owner, grp)
-_CONST char *name;
-_mnx_Uid_t owner;
-_mnx_Gid_t grp;
-{
-  message m;
-
-  m.m1_i1 = strlen(name) + 1;
-  m.m1_i2 = owner;
-  m.m1_i3 = grp;
-  m.m1_p1 = (char *) name;
-  return(_syscall(FS, CHOWN, &m));
-}
Index: trunk/minix/lib/posix/_chroot.c
===================================================================
--- trunk/minix/lib/posix/_chroot.c	(revision 9)
+++ 	(revision )
@@ -1,12 +1,0 @@
-#include <lib.h>
-#define chroot	_chroot
-#include <unistd.h>
-
-PUBLIC int chroot(name)
-_CONST char *name;
-{
-  message m;
-
-  _loadname(name, &m);
-  return(_syscall(FS, CHROOT, &m));
-}
Index: trunk/minix/lib/posix/_close.c
===================================================================
--- trunk/minix/lib/posix/_close.c	(revision 9)
+++ 	(revision )
@@ -1,12 +1,0 @@
-#include <lib.h>
-#define close	_close
-#include <unistd.h>
-
-PUBLIC int close(fd)
-int fd;
-{
-  message m;
-
-  m.m1_i1 = fd;
-  return(_syscall(FS, CLOSE, &m));
-}
Index: trunk/minix/lib/posix/_closedir.c
===================================================================
--- trunk/minix/lib/posix/_closedir.c	(revision 9)
+++ 	(revision )
@@ -1,24 +1,0 @@
-/*	closedir()					Author: Kees J. Bot
- *								24 Apr 1989
- */
-#define nil 0
-#include <lib.h>
-#define close	_close
-#define closedir _closedir
-#include <sys/types.h>
-#include <dirent.h>
-#include <unistd.h>
-#include <stdlib.h>
-#include <errno.h>
-
-int closedir(DIR *dp)
-/* Finish reading a directory. */
-{
-	int d;
-
-	if (dp == nil) { errno= EBADF; return -1; }
-
-	d= dp->_fd;
-	free((void *) dp);
-	return close(d);
-}
Index: trunk/minix/lib/posix/_creat.c
===================================================================
--- trunk/minix/lib/posix/_creat.c	(revision 9)
+++ 	(revision )
@@ -1,14 +1,0 @@
-#include <lib.h>
-#define creat	_creat
-#include <fcntl.h>
-
-PUBLIC int creat(name, mode)
-_CONST char *name;
-_mnx_Mode_t mode;
-{
-  message m;
-
-  m.m3_i2 = mode;
-  _loadname(name, &m);
-  return(_syscall(FS, CREAT, &m));
-}
Index: trunk/minix/lib/posix/_dup.c
===================================================================
--- trunk/minix/lib/posix/_dup.c	(revision 9)
+++ 	(revision )
@@ -1,11 +1,0 @@
-#include <lib.h>
-#define dup	_dup
-#define fcntl	_fcntl
-#include <fcntl.h>
-#include <unistd.h>
-
-PUBLIC int dup(fd)
-int fd;
-{
-  return(fcntl(fd, F_DUPFD, 0));
-}
Index: trunk/minix/lib/posix/_dup2.c
===================================================================
--- trunk/minix/lib/posix/_dup2.c	(revision 9)
+++ 	(revision )
@@ -1,30 +1,0 @@
-#include <lib.h>
-#define close	_close
-#define dup2	_dup2
-#define fcntl	_fcntl
-#include <fcntl.h>
-#include <unistd.h>
-
-PUBLIC int dup2(fd, fd2)
-int fd, fd2;
-{
-/* The behavior of dup2 is defined by POSIX in 6.2.1.2 as almost, but not
- * quite the same as fcntl.
- */
-
-  if (fd2 < 0 || fd2 > OPEN_MAX) {
-	errno = EBADF;
-	return(-1);
-  }
-
-  /* Check to see if fildes is valid. */
-  if (fcntl(fd, F_GETFL) < 0) {
-	/* 'fd' is not valid. */
-	return(-1);
-  } else {
-	/* 'fd' is valid. */
-	if (fd == fd2) return(fd2);
-	close(fd2);
-	return(fcntl(fd, F_DUPFD, fd2));
-  }
-}
Index: trunk/minix/lib/posix/_execl.c
===================================================================
--- trunk/minix/lib/posix/_execl.c	(revision 9)
+++ 	(revision )
@@ -1,18 +1,0 @@
-/*	execl() - execute				Author: Kees J. Bot
- *								21 Jan 1994
- */
-#define execl _execl
-#define execve _execve
-#include <unistd.h>
-
-extern char * const **_penviron;	/* The default environment. */
-
-int execl(const char *path, const char *arg1, ...)
-/* execl("/bin/sh", "sh", "-c", "example", (char *) 0); */
-{
-	/* Assumption:  The C-implementation for this machine pushes
-	 * function arguments downwards on the stack making a perfect
-	 * argument array.  Luckily this is almost always so.
-	 */
-	return execve(path, (char * const *) &arg1, *_penviron);
-}
Index: trunk/minix/lib/posix/_execle.c
===================================================================
--- trunk/minix/lib/posix/_execle.c	(revision 9)
+++ 	(revision )
@@ -1,25 +1,0 @@
-/*	execle() - execute with a custom environment	Author: Kees J. Bot
- *								21 Jan 1994
- */
-#define nil 0
-#define execle _execle
-#define execve _execve
-#include <unistd.h>
-#include <stdarg.h>
-
-int execle(const char *path, const char *arg1, ...)
-/* execle("/bin/sh", "sh", "-c", "example", (char *) 0, my_env_array); */
-{
-	char * const * envp;
-	va_list ap;
-
-	va_start(ap, arg1);
-
-	/* Find the end of the argument array. */
-	if (arg1 != nil) while (va_arg(ap, const char *) != nil) {}
-
-	envp = va_arg(ap, char * const *);
-	va_end(ap);
-
-	return execve(path, (char * const *) &arg1, envp);
-}
Index: trunk/minix/lib/posix/_execlp.c
===================================================================
--- trunk/minix/lib/posix/_execlp.c	(revision 9)
+++ 	(revision )
@@ -1,12 +1,0 @@
-/*	execlp() - execute with PATH search		Author: Kees J. Bot
- *								22 Jan 1994
- */
-#define execlp _execlp
-#define execvp _execvp
-#include <unistd.h>
-
-int execlp(const char *file, const char *arg1, ...)
-/* execlp("sh", "sh", "-c", "example", (char *) 0); */
-{
-	return execvp(file, (char * const *) &arg1);
-}
Index: trunk/minix/lib/posix/_execv.c
===================================================================
--- trunk/minix/lib/posix/_execv.c	(revision 9)
+++ 	(revision )
@@ -1,13 +1,0 @@
-/*	execv() - execute with prepared arguments	Author: Kees J. Bot
- *								21 Jan 1994
- */
-#define execv _execv
-#define execve _execve
-#include <unistd.h>
-
-extern char * const **_penviron;	/* The default environment. */
-
-int execv(const char *path, char * const *argv)
-{
-	return execve(path, argv, *_penviron);
-}
Index: trunk/minix/lib/posix/_execve.c
===================================================================
--- trunk/minix/lib/posix/_execve.c	(revision 9)
+++ 	(revision )
@@ -1,115 +1,0 @@
-/*	execve() - basic program execution call		Author: Kees J. Bot
- *								21 Jan 1994
- */
-
-#define _MINIX_SOURCE
-
-#define nil 0
-#define execve _execve
-#define sbrk _sbrk
-#include <lib.h>
-#include <unistd.h>
-#include <string.h>
-#include <stddef.h>
-
-int execve(const char *path, char * const *argv, char * const *envp)
-{
-	char * const *ap;
-	char * const *ep;
-	char *frame;
-	char **vp;
-	char *sp;
-	size_t argc;
-	size_t frame_size;
-	size_t string_off;
-	size_t n;
-	int ov;
-	message m;
-
-	/* Assumptions: size_t and char *, it's all the same thing. */
-
-	/* Create a stack image that only needs to be patched up slightly
-	 * by the kernel to be used for the process to be executed.
-	 */
-
-	ov= 0;			/* No overflow yet. */
-	frame_size= 0;		/* Size of the new initial stack. */
-	string_off= 0;		/* Offset to start of the strings. */
-	argc= 0;		/* Argument count. */
-
-	for (ap= argv; *ap != nil; ap++) {
-		n = sizeof(*ap) + strlen(*ap) + 1;
-		frame_size+= n;
-		if (frame_size < n) ov= 1;
-		string_off+= sizeof(*ap);
-		argc++;
-	}
-
-	for (ep= envp; *ep != nil; ep++) {
-		n = sizeof(*ep) + strlen(*ep) + 1;
-		frame_size+= n;
-		if (frame_size < n) ov= 1;
-		string_off+= sizeof(*ap);
-	}
-
-	/* Add an argument count and two terminating nulls. */
-	frame_size+= sizeof(argc) + sizeof(*ap) + sizeof(*ep);
-	string_off+= sizeof(argc) + sizeof(*ap) + sizeof(*ep);
-
-	/* Align. */
-	frame_size= (frame_size + sizeof(char *) - 1) & ~(sizeof(char *) - 1);
-
-	/* The party is off if there is an overflow. */
-	if (ov || frame_size < 3 * sizeof(char *)) {
-		errno= E2BIG;
-		return -1;
-	}
-
-	/* Allocate space for the stack frame. */
-	if ((frame = (char *) sbrk(frame_size)) == (char *) -1) {
-		errno = E2BIG;
-		return -1;
-	}
-
-	/* Set arg count, init pointers to vector and string tables. */
-	* (size_t *) frame = argc;
-	vp = (char **) (frame + sizeof(argc));
-	sp = frame + string_off;
-
-	/* Load the argument vector and strings. */
-	for (ap= argv; *ap != nil; ap++) {
-		*vp++= (char *) (sp - frame);
-		n= strlen(*ap) + 1;
-		memcpy(sp, *ap, n);
-		sp+= n;
-	}
-	*vp++= nil;
-
-	/* Load the environment vector and strings. */
-	for (ep= envp; *ep != nil; ep++) {
-		*vp++= (char *) (sp - frame);
-		n= strlen(*ep) + 1;
-		memcpy(sp, *ep, n);
-		sp+= n;
-	}
-	*vp++= nil;
-
-	/* Padding. */
-	while (sp < frame + frame_size) *sp++= 0;
-
-	/* We can finally make the system call. */
-	m.m1_i1 = strlen(path) + 1;
-	m.m1_i2 = frame_size;
-	m.m1_p1 = (char *) path;
-	m.m1_p2 = frame;
-
-	/* Clear unused fields */
-	m.m1_i3 = 0;
-	m.m1_p3 = NULL;
-
-	(void) _syscall(MM, EXEC, &m);
-
-	/* Failure, return the memory used for the frame and exit. */
-	(void) sbrk(-frame_size);
-	return -1;
-}
Index: trunk/minix/lib/posix/_execvp.c
===================================================================
--- trunk/minix/lib/posix/_execvp.c	(revision 9)
+++ 	(revision )
@@ -1,73 +1,0 @@
-/*	execvp() - execute with PATH search and prepared arguments
- *							Author: Kees J. Bot
- *								21 Jan 1994
- */
-
-#define _MINIX_SOURCE
-
-#define nil 0
-#define execve _execve
-#define execvp _execvp
-#define sbrk _sbrk
-#define stat _stat
-#include <stdlib.h>
-#include <string.h>
-#include <unistd.h>
-#include <errno.h>
-#include <sys/stat.h>
-
-extern char * const **_penviron;	/* The default environment. */
-
-int execvp(const char *file, char * const *argv)
-/* Execute the file with a path search on $PATH, just like the shell.  The
- * search continues on the errors ENOENT (not there), and EACCES (file not
- * executable or leading directories protected.)
- * Unlike other execvp implementations there is no default path, and no shell
- * is started for scripts.  One is supposed to define $PATH, and use #!/bin/sh.
- */
-{
-	struct stat sb;
-	const char *path;		/* $PATH */
-	char *full;			/* Full name to try. */
-	char *f;
-	size_t full_size;
-	int err= ENOENT;		/* Error return on failure. */
-
-	if (strchr(file, '/') != nil || (path= getenv("PATH")) == nil)
-		path= "";
-
-	/* Compute the maximum length the full name may have, and align. */
-	full_size= strlen(path) + 1 + strlen(file) + 1 + sizeof(char *) - 1;
-	full_size&= ~(sizeof(char *) - 1);
-
-	/* Claim space. */
-	if ((full= (char *) sbrk(full_size)) == (char *) -1) {
-		errno= E2BIG;
-		return -1;
-	}
-
-	/* For each directory in the path... */
-	do {
-		f= full;
-		while (*path != 0 && *path != ':') *f++= *path++;
-
-		if (f > full) *f++= '/';
-
-		strcpy(f, file);
-
-		/* Stat first, small speed-up, better for ptrace. */
-		if (stat(full, &sb) == -1) continue;
-
-		(void) execve(full, argv, *_penviron);
-
-		/* Prefer more interesting errno values then "not there". */
-		if (errno != ENOENT) err= errno;
-
-		/* Continue only on some errors. */
-		if (err != ENOENT && err != EACCES) break;
-	} while (*path++ != 0);
-
-	(void) sbrk(-full_size);
-	errno= err;
-	return -1;
-}
Index: trunk/minix/lib/posix/_fcntl.c
===================================================================
--- trunk/minix/lib/posix/_fcntl.c	(revision 9)
+++ 	(revision )
@@ -1,45 +1,0 @@
-#include <lib.h>
-#define fcntl _fcntl
-#include <fcntl.h>
-#include <stdarg.h>
-
-#if _ANSI
-PUBLIC int fcntl(int fd, int cmd, ...)
-#else
-PUBLIC int fcntl(fd, cmd)
-int fd;
-int cmd;
-#endif
-{
-  va_list argp;
-  message m;
-
-  va_start(argp, cmd);
-
-  /* Set up for the sensible case where there is no variable parameter.  This
-   * covers F_GETFD, F_GETFL and invalid commands.
-   */
-  m.m1_i3 = 0;
-  m.m1_p1 = NIL_PTR;
-
-  /* Adjust for the stupid cases. */
-  switch(cmd) {
-     case F_DUPFD:
-     case F_SETFD:
-     case F_SETFL:
-	m.m1_i3 = va_arg(argp, int);
-	break;
-     case F_GETLK:
-     case F_SETLK:
-     case F_SETLKW:
-     case F_FREESP:
-	m.m1_p1 = (char *) va_arg(argp, struct flock *);
-	break;
-  }
-
-  /* Clean up and make the system call. */
-  va_end(argp);
-  m.m1_i1 = fd;
-  m.m1_i2 = cmd;
-  return(_syscall(FS, FCNTL, &m));
-}
Index: trunk/minix/lib/posix/_fork.c
===================================================================
--- trunk/minix/lib/posix/_fork.c	(revision 9)
+++ 	(revision )
@@ -1,10 +1,0 @@
-#include <lib.h>
-#define fork	_fork
-#include <unistd.h>
-
-PUBLIC pid_t fork()
-{
-  message m;
-
-  return(_syscall(MM, FORK, &m));
-}
Index: trunk/minix/lib/posix/_fpathconf.c
===================================================================
--- trunk/minix/lib/posix/_fpathconf.c	(revision 9)
+++ 	(revision )
@@ -1,61 +1,0 @@
-/* POSIX fpathconf (Sec. 5.7.1) 		Author: Andy Tanenbaum */
-
-#include <lib.h>
-#define fstat		_fstat
-#define fpathconf	_fpathconf
-#include <sys/stat.h>
-#include <errno.h>
-#include <limits.h>
-#include <unistd.h>
-#include <termios.h>
-
-PUBLIC long fpathconf(fd, name)
-int fd;				/* file descriptor being interrogated */
-int name;			/* property being inspected */
-{
-/* POSIX allows some of the values in <limits.h> to be increased at
- * run time.  The pathconf and fpathconf functions allow these values
- * to be checked at run time.  MINIX does not use this facility.
- * The run-time limits are those given in <limits.h>.
- */
-
-  struct stat stbuf;
-
-  switch(name) {
-	case _PC_LINK_MAX:
-		/* Fstat the file.  If that fails, return -1. */
-		if (fstat(fd, &stbuf) != 0) return(-1);
-		if (S_ISDIR(stbuf.st_mode))
-			return(1L);	/* no links to directories */
-		else
-			return( (long) LINK_MAX);
-
-	case _PC_MAX_CANON:
-		return( (long) MAX_CANON);
-
-	case _PC_MAX_INPUT:
-		return( (long) MAX_INPUT);
-
-	case _PC_NAME_MAX:
-		return( (long) NAME_MAX);
-
-	case _PC_PATH_MAX:
-		return( (long) PATH_MAX);
-
-	case _PC_PIPE_BUF:
-		return( (long) PIPE_BUF);
-
-	case _PC_CHOWN_RESTRICTED:
-		return( (long) _POSIX_CHOWN_RESTRICTED);
-
-	case _PC_NO_TRUNC:
-		return( (long) _POSIX_NO_TRUNC);
-
-	case _PC_VDISABLE:
-		return( (long) _POSIX_VDISABLE);
-
-	default:
-		errno = EINVAL;
-		return(-1);
-  }
-}
Index: trunk/minix/lib/posix/_fstat.c
===================================================================
--- trunk/minix/lib/posix/_fstat.c	(revision 9)
+++ 	(revision )
@@ -1,14 +1,0 @@
-#include <lib.h>
-#define fstat	_fstat
-#include <sys/stat.h>
-
-PUBLIC int fstat(fd, buffer)
-int fd;
-struct stat *buffer;
-{
-  message m;
-
-  m.m1_i1 = fd;
-  m.m1_p1 = (char *) buffer;
-  return(_syscall(FS, FSTAT, &m));
-}
Index: trunk/minix/lib/posix/_fstatfs.c
===================================================================
--- trunk/minix/lib/posix/_fstatfs.c	(revision 9)
+++ 	(revision )
@@ -1,13 +1,0 @@
-#include <lib.h>
-#define fstatfs	_fstatfs
-#include <sys/stat.h>
-#include <sys/statfs.h>
-
-PUBLIC int fstatfs(int fd, struct statfs *buffer)
-{
-  message m;
-
-  m.m1_i1 = fd;
-  m.m1_p1 = (char *) buffer;
-  return(_syscall(FS, FSTATFS, &m));
-}
Index: trunk/minix/lib/posix/_fsync.c
===================================================================
--- trunk/minix/lib/posix/_fsync.c	(revision 9)
+++ 	(revision )
@@ -1,12 +1,0 @@
-#include <lib.h>
-#define sync	_sync
-#include <unistd.h>
-
-PUBLIC int fsync(int fd)
-{
-  message m;
-
-  m.m1_i1 = fd;
-
-  return(_syscall(FS, FSYNC, &m));
-}
Index: trunk/minix/lib/posix/_getcwd.c
===================================================================
--- trunk/minix/lib/posix/_getcwd.c	(revision 9)
+++ 	(revision )
@@ -1,143 +1,0 @@
-/*	getcwd() - get the name of the current working directory.
- *							Author: Kees J. Bot
- *								30 Apr 1989
- */
-#define nil 0
-#define chdir _chdir
-#define closedir _closedir
-#define getcwd _getcwd
-#define opendir _opendir
-#define readdir _readdir
-#define rewinddir _rewinddir
-#define stat _stat
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <errno.h>
-#include <unistd.h>
-#include <dirent.h>
-#include <limits.h>
-#include <string.h>
-
-static int addpath(const char *path, char **ap, const char *entry)
-/* Add the name of a directory entry at the front of the path being built.
- * Note that the result always starts with a slash.
- */
-{
-	const char *e= entry;
-	char *p= *ap;
-
-	while (*e != 0) e++;
-
-	while (e > entry && p > path) *--p = *--e;
-
-	if (p == path) return -1;
-	*--p = '/';
-	*ap= p;
-	return 0;
-}
-
-static int recover(char *p)
-/* Undo all those chdir("..")'s that have been recorded by addpath.  This
- * has to be done entry by entry, because the whole pathname may be too long.
- */
-{
-	int e= errno, slash;
-	char *p0;
-
-	while (*p != 0) {
-		p0= ++p;
-
-		do p++; while (*p != 0 && *p != '/');
-		slash= *p; *p= 0;
-
-		if (chdir(p0) < 0) return -1;
-		*p= slash;
-	}
-	errno= e;
-	return 0;
-}
-
-char *getcwd(char *path, size_t size)
-{
-	struct stat above, current, tmp;
-	struct dirent *entry;
-	DIR *d;
-	char *p, *up, *dotdot;
-	int cycle;
-
-	if (path == nil || size <= 1) { errno= EINVAL; return nil; }
-
-	p= path + size;
-	*--p = 0;
-
-	if (stat(".", &current) < 0) return nil;
-
-	while (1) {
-		dotdot= "..";
-		if (stat(dotdot, &above) < 0) { recover(p); return nil; }
-
-		if (above.st_dev == current.st_dev
-					&& above.st_ino == current.st_ino)
-			break;	/* Root dir found */
-
-		if ((d= opendir(dotdot)) == nil) { recover(p); return nil; }
-
-		/* Cycle is 0 for a simple inode nr search, or 1 for a search
-		 * for inode *and* device nr.
-		 */
-		cycle= above.st_dev == current.st_dev ? 0 : 1;
-
-		do {
-			char name[3 + NAME_MAX + 1];
-
-			tmp.st_ino= 0;
-			if ((entry= readdir(d)) == nil) {
-				switch (++cycle) {
-				case 1:
-					rewinddir(d);
-					continue;
-				case 2:
-					closedir(d);
-					errno= ENOENT;
-					recover(p);
-					return nil;
-				}
-			}
-			if (strcmp(entry->d_name, ".") == 0) continue;
-			if (strcmp(entry->d_name, "..") == 0) continue;
-
-			switch (cycle) {
-			case 0:
-				/* Simple test on inode nr. */
-				if (entry->d_ino != current.st_ino) continue;
-				/*FALL THROUGH*/
-
-			case 1:
-				/* Current is mounted. */
-				strcpy(name, "../");
-				strcpy(name+3, entry->d_name);
-				if (stat(name, &tmp) < 0) continue;
-				break;
-			}
-		} while (tmp.st_ino != current.st_ino
-					|| tmp.st_dev != current.st_dev);
-
-		up= p;
-		if (addpath(path, &up, entry->d_name) < 0) {
-			closedir(d);
-			errno = ERANGE;
-			recover(p);
-			return nil;
-		}
-		closedir(d);
-
-		if (chdir(dotdot) < 0) { recover(p); return nil; }
-		p= up;
-
-		current= above;
-	}
-	if (recover(p) < 0) return nil;	/* Undo all those chdir("..")'s. */
-	if (*p == 0) *--p = '/';	/* Cwd is "/" if nothing added */
-	if (p > path) strcpy(path, p);	/* Move string to start of path. */
-	return path;
-}
Index: trunk/minix/lib/posix/_getegid.c
===================================================================
--- trunk/minix/lib/posix/_getegid.c	(revision 9)
+++ 	(revision )
@@ -1,16 +1,0 @@
-#include <lib.h>
-#define getegid	_getegid
-#include <unistd.h>
-
-PUBLIC gid_t getegid()
-{
-  message m;
-
-  /* POSIX says that this function is always successful and that no
-   * return value is reserved to indicate an error.  Minix syscalls
-   * are not always successful and Minix returns the unreserved value
-   * (gid_t) -1 when there is an error.
-   */
-  if (_syscall(MM, GETGID, &m) < 0) return ( (gid_t) -1);
-  return( (gid_t) m.m2_i1);
-}
Index: trunk/minix/lib/posix/_geteuid.c
===================================================================
--- trunk/minix/lib/posix/_geteuid.c	(revision 9)
+++ 	(revision )
@@ -1,16 +1,0 @@
-#include <lib.h>
-#define geteuid	_geteuid
-#include <unistd.h>
-
-PUBLIC uid_t geteuid()
-{
-  message m;
-
-  /* POSIX says that this function is always successful and that no
-   * return value is reserved to indicate an error.  Minix syscalls
-   * are not always successful and Minix returns the unreserved value
-   * (uid_t) -1 when there is an error.
-   */
-  if (_syscall(MM, GETUID, &m) < 0) return ( (uid_t) -1);
-  return( (uid_t) m.m2_i1);
-}
Index: trunk/minix/lib/posix/_getgid.c
===================================================================
--- trunk/minix/lib/posix/_getgid.c	(revision 9)
+++ 	(revision )
@@ -1,10 +1,0 @@
-#include <lib.h>
-#define getgid	_getgid
-#include <unistd.h>
-
-PUBLIC gid_t getgid()
-{
-  message m;
-
-  return( (gid_t) _syscall(MM, GETGID, &m));
-}
Index: trunk/minix/lib/posix/_getgroups.c
===================================================================
--- trunk/minix/lib/posix/_getgroups.c	(revision 9)
+++ 	(revision )
@@ -1,18 +1,0 @@
-/* getgroups.c						POSIX 4.2.3
- *	int getgroups(gidsetsize, grouplist);
- *
- *	This call relates to suplementary group ids, which are not
- *	supported in MINIX.
- */
-
-#include <lib.h>
-#define getgroups _getgroups
-#include <unistd.h>
-#include <time.h>
-
-PUBLIC int getgroups(gidsetsize, grouplist)
-int gidsetsize;
-gid_t grouplist[];
-{
-  return(0);
-}
Index: trunk/minix/lib/posix/_getpgrp.c
===================================================================
--- trunk/minix/lib/posix/_getpgrp.c	(revision 9)
+++ 	(revision )
@@ -1,10 +1,0 @@
-#include <lib.h>
-#define getpgrp	_getpgrp
-#include <unistd.h>
-
-PUBLIC pid_t getpgrp()
-{
-  message m;
-
-  return(_syscall(MM, GETPGRP, &m));
-}
Index: trunk/minix/lib/posix/_getpid.c
===================================================================
--- trunk/minix/lib/posix/_getpid.c	(revision 9)
+++ 	(revision )
@@ -1,10 +1,0 @@
-#include <lib.h>
-#define getpid	_getpid
-#include <unistd.h>
-
-PUBLIC pid_t getpid()
-{
-  message m;
-
-  return(_syscall(MM, GETPID, &m));
-}
Index: trunk/minix/lib/posix/_getppid.c
===================================================================
--- trunk/minix/lib/posix/_getppid.c	(revision 9)
+++ 	(revision )
@@ -1,16 +1,0 @@
-#include <lib.h>
-#define getppid	_getppid
-#include <unistd.h>
-
-PUBLIC pid_t getppid()
-{
-  message m;
-
-  /* POSIX says that this function is always successful and that no
-   * return value is reserved to indicate an error.  Minix syscalls
-   * are not always successful and Minix returns the reserved value
-   * (pid_t) -1 when there is an error.
-   */
-  if (_syscall(MM, GETPID, &m) < 0) return ( (pid_t) -1);
-  return( (pid_t) m.m2_i1);
-}
Index: trunk/minix/lib/posix/_getuid.c
===================================================================
--- trunk/minix/lib/posix/_getuid.c	(revision 9)
+++ 	(revision )
@@ -1,10 +1,0 @@
-#include <lib.h>
-#define getuid	_getuid
-#include <unistd.h>
-
-PUBLIC uid_t getuid()
-{
-  message m;
-
-  return( (uid_t) _syscall(MM, GETUID, &m));
-}
Index: trunk/minix/lib/posix/_ioctl.c
===================================================================
--- trunk/minix/lib/posix/_ioctl.c	(revision 9)
+++ 	(revision )
@@ -1,17 +1,0 @@
-#include <lib.h>
-#define ioctl	_ioctl
-#include <minix/com.h>
-#include <sys/ioctl.h>
-
-PUBLIC int ioctl(fd, request, data)
-int fd;
-int request;
-void *data;
-{
-  message m;
-
-  m.TTY_LINE = fd;
-  m.TTY_REQUEST = request;
-  m.ADDRESS = (char *) data;
-  return(_syscall(FS, IOCTL, &m));
-}
Index: trunk/minix/lib/posix/_isatty.c
===================================================================
--- trunk/minix/lib/posix/_isatty.c	(revision 9)
+++ 	(revision )
@@ -1,13 +1,0 @@
-#include <lib.h>
-#define isatty _isatty
-#define tcgetattr _tcgetattr
-#include <termios.h>
-#include <unistd.h>
-
-PUBLIC int isatty(fd)
-int fd;
-{
-  struct termios dummy;
-
-  return(tcgetattr(fd, &dummy) == 0);
-}
Index: trunk/minix/lib/posix/_kill.c
===================================================================
--- trunk/minix/lib/posix/_kill.c	(revision 9)
+++ 	(revision )
@@ -1,14 +1,0 @@
-#include <lib.h>
-#define kill	_kill
-#include <signal.h>
-
-PUBLIC int kill(proc, sig)
-int proc;			/* which process is to be sent the signal */
-int sig;			/* signal number */
-{
-  message m;
-
-  m.m1_i1 = proc;
-  m.m1_i2 = sig;
-  return(_syscall(MM, KILL, &m));
-}
Index: trunk/minix/lib/posix/_link.c
===================================================================
--- trunk/minix/lib/posix/_link.c	(revision 9)
+++ 	(revision )
@@ -1,16 +1,0 @@
-#include <lib.h>
-#define link	_link
-#include <string.h>
-#include <unistd.h>
-
-PUBLIC int link(name, name2)
-_CONST char *name, *name2;
-{
-  message m;
-
-  m.m1_i1 = strlen(name) + 1;
-  m.m1_i2 = strlen(name2) + 1;
-  m.m1_p1 = (char *) name;
-  m.m1_p2 = (char *) name2;
-  return(_syscall(FS, LINK, &m));
-}
Index: trunk/minix/lib/posix/_lseek.c
===================================================================
--- trunk/minix/lib/posix/_lseek.c	(revision 9)
+++ 	(revision )
@@ -1,17 +1,0 @@
-#include <lib.h>
-#define lseek	_lseek
-#include <unistd.h>
-
-PUBLIC off_t lseek(fd, offset, whence)
-int fd;
-off_t offset;
-int whence;
-{
-  message m;
-
-  m.m2_i1 = fd;
-  m.m2_l1 = offset;
-  m.m2_i2 = whence;
-  if (_syscall(FS, LSEEK, &m) < 0) return( (off_t) -1);
-  return( (off_t) m.m2_l1);
-}
Index: trunk/minix/lib/posix/_lstat.c
===================================================================
--- trunk/minix/lib/posix/_lstat.c	(revision 9)
+++ 	(revision )
@@ -1,19 +1,0 @@
-#include <lib.h>
-#define lstat	_lstat
-#include <sys/stat.h>
-#include <string.h>
-
-PUBLIC int lstat(name, buffer)
-_CONST char *name;
-struct stat *buffer;
-{
-  message m;
-  int r;
-
-  m.m1_i1 = strlen(name) + 1;
-  m.m1_p1 = (char *) name;
-  m.m1_p2 = (char *) buffer;
-  if((r = _syscall(FS, LSTAT, &m)) >= 0 || errno != ENOSYS)
-     return r;
-  return _stat(name, buffer);
-}
Index: trunk/minix/lib/posix/_mkdir.c
===================================================================
--- trunk/minix/lib/posix/_mkdir.c	(revision 9)
+++ 	(revision )
@@ -1,16 +1,0 @@
-#include <lib.h>
-#define mkdir	_mkdir
-#include <sys/stat.h>
-#include <string.h>
-
-PUBLIC int mkdir(name, mode)
-_CONST char *name;
-_mnx_Mode_t mode;
-{
-  message m;
-
-  m.m1_i1 = strlen(name) + 1;
-  m.m1_i2 = mode;
-  m.m1_p1 = (char *) name;
-  return(_syscall(FS, MKDIR, &m));
-}
Index: trunk/minix/lib/posix/_mkfifo.c
===================================================================
--- trunk/minix/lib/posix/_mkfifo.c	(revision 9)
+++ 	(revision )
@@ -1,12 +1,0 @@
-#include <lib.h>
-#define mkfifo	_mkfifo
-#define mknod	_mknod
-#include <sys/stat.h>
-#include <unistd.h>
-
-PUBLIC int mkfifo(name, mode)
-_CONST char *name;
-_mnx_Mode_t mode;
-{
-  return mknod(name, mode | S_IFIFO, (Dev_t) 0);
-}
Index: trunk/minix/lib/posix/_mknod.c
===================================================================
--- trunk/minix/lib/posix/_mknod.c	(revision 9)
+++ 	(revision )
@@ -1,20 +1,0 @@
-#include <lib.h>
-#define mknod	_mknod
-#include <string.h>
-#include <stdlib.h>
-#include <unistd.h>
-
-PUBLIC int mknod(name, mode, dev)
-_CONST char *name;
-_mnx_Mode_t mode;
-Dev_t dev;
-{
-  message m;
-
-  m.m1_i1 = strlen(name) + 1;
-  m.m1_i2 = mode;
-  m.m1_i3 = dev;
-  m.m1_p1 = (char *) name;
-  m.m1_p2 = (char *) ((int) 0);		/* obsolete size field */
-  return(_syscall(FS, MKNOD, &m));
-}
Index: trunk/minix/lib/posix/_mount.c
===================================================================
--- trunk/minix/lib/posix/_mount.c	(revision 9)
+++ 	(revision )
@@ -1,18 +1,0 @@
-#include <lib.h>
-#define mount	_mount
-#include <string.h>
-#include <unistd.h>
-
-PUBLIC int mount(special, name, rwflag)
-char *name, *special;
-int rwflag;
-{
-  message m;
-
-  m.m1_i1 = strlen(special) + 1;
-  m.m1_i2 = strlen(name) + 1;
-  m.m1_i3 = rwflag;
-  m.m1_p1 = special;
-  m.m1_p2 = name;
-  return(_syscall(FS, MOUNT, &m));
-}
Index: trunk/minix/lib/posix/_open.c
===================================================================
--- trunk/minix/lib/posix/_open.c	(revision 9)
+++ 	(revision )
@@ -1,30 +1,0 @@
-#include <lib.h>
-#define open	_open
-#include <fcntl.h>
-#include <stdarg.h>
-#include <string.h>
-
-#if _ANSI
-PUBLIC int open(const char *name, int flags, ...)
-#else
-PUBLIC int open(name, flags)
-_CONST char *name;
-int flags;
-#endif
-{
-  va_list argp;
-  message m;
-
-  va_start(argp, flags);
-  if (flags & O_CREAT) {
-	m.m1_i1 = strlen(name) + 1;
-	m.m1_i2 = flags;
-	m.m1_i3 = va_arg(argp, _mnx_Mode_t);
-	m.m1_p1 = (char *) name;
-  } else {
-	_loadname(name, &m);
-	m.m3_i2 = flags;
-  }
-  va_end(argp);
-  return (_syscall(FS, OPEN, &m));
-}
Index: trunk/minix/lib/posix/_opendir.c
===================================================================
--- trunk/minix/lib/posix/_opendir.c	(revision 9)
+++ 	(revision )
@@ -1,53 +1,0 @@
-/*	opendir()					Author: Kees J. Bot
- *								24 Apr 1989
- */
-#define nil 0
-#include <lib.h>
-#define close	_close
-#define fcntl	_fcntl
-#define fstat	_fstat
-#define open	_open
-#define opendir	_opendir
-#define stat	_stat
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <dirent.h>
-#include <unistd.h>
-#include <stdlib.h>
-#include <fcntl.h>
-#include <errno.h>
-
-DIR *opendir(const char *name)
-/* Open a directory for reading. */
-{
-	int d, f;
-	DIR *dp;
-	struct stat st;
-
-	/* Only read directories. */
-	if (stat(name, &st) < 0) return nil;
-	if (!S_ISDIR(st.st_mode)) { errno= ENOTDIR; return nil; }
-
-	if ((d= open(name, O_RDONLY | O_NONBLOCK)) < 0) return nil;
-
-	/* Check the type again, mark close-on-exec, get a buffer. */
-	if (fstat(d, &st) < 0
-		|| (errno= ENOTDIR, !S_ISDIR(st.st_mode))
-		|| (f= fcntl(d, F_GETFD)) < 0
-		|| fcntl(d, F_SETFD, f | FD_CLOEXEC) < 0
-		|| (dp= (DIR *) malloc(sizeof(*dp))) == nil
-	) {
-		int err= errno;
-		(void) close(d);
-		errno= err;
-		return nil;
-	}
-
-	dp->_fd= d;
-	dp->_v7= -1;
-	dp->_count= 0;
-	dp->_pos= 0;
-
-	return dp;
-}
-
Index: trunk/minix/lib/posix/_pathconf.c
===================================================================
--- trunk/minix/lib/posix/_pathconf.c	(revision 9)
+++ 	(revision )
@@ -1,28 +1,0 @@
-/* POSIX pathconf (Sec. 5.7.1) 		Author: Andy Tanenbaum */
-
-#include <lib.h>
-#define close		_close
-#define open		_open
-#define pathconf	_pathconf
-#include <fcntl.h>
-#include <errno.h>
-#include <unistd.h>
-
-PUBLIC long pathconf(path, name)
-_CONST char *path;		/* name of file being interrogated */
-int name;			/* property being inspected */
-{
-/* POSIX allows some of the values in <limits.h> to be increased at
- * run time.  The pathconf and fpathconf functions allow these values
- * to be checked at run time.  MINIX does not use this facility.
- * The run-time limits are those given in <limits.h>.
- */
-
-  int fd;
-  long val;
-
-  if ( (fd = open(path, O_RDONLY)) < 0) return(-1L);
-  val = fpathconf(fd, name);
-  close(fd);
-  return(val);
-}
Index: trunk/minix/lib/posix/_pause.c
===================================================================
--- trunk/minix/lib/posix/_pause.c	(revision 9)
+++ 	(revision )
@@ -1,10 +1,0 @@
-#include <lib.h>
-#define pause	_pause
-#include <unistd.h>
-
-PUBLIC int pause()
-{
-  message m;
-
-  return(_syscall(MM, PAUSE, &m));
-}
Index: trunk/minix/lib/posix/_pipe.c
===================================================================
--- trunk/minix/lib/posix/_pipe.c	(revision 9)
+++ 	(revision )
@@ -1,14 +1,0 @@
-#include <lib.h>
-#define pipe	_pipe
-#include <unistd.h>
-
-PUBLIC int pipe(fild)
-int fild[2];
-{
-  message m;
-
-  if (_syscall(FS, PIPE, &m) < 0) return(-1);
-  fild[0] = m.m1_i1;
-  fild[1] = m.m1_i2;
-  return(0);
-}
Index: trunk/minix/lib/posix/_ptrace.c
===================================================================
--- trunk/minix/lib/posix/_ptrace.c	(revision 9)
+++ 	(revision )
@@ -1,25 +1,0 @@
-#include <lib.h>
-#define ptrace	_ptrace
-#include <unistd.h>
-
-PUBLIC long ptrace(req, pid, addr, data)
-int req;
-pid_t pid;
-long addr;
-long data;
-{
-  message m;
-
-  m.m2_i1 = pid;
-  m.m2_i2 = req;
-  m.m2_l1 = addr;
-  m.m2_l2 = data;
-  if (_syscall(MM, PTRACE, &m) < 0) return(-1);
-
-  /* There was no error, but -1 is a legal return value.  Clear errno if
-   * necessary to distinguish this case.  _syscall has set errno to nonzero
-   * for the error case.
-   */
-  if (m.m2_l2 == -1) errno = 0;
-  return(m.m2_l2);
-}
Index: trunk/minix/lib/posix/_read.c
===================================================================
--- trunk/minix/lib/posix/_read.c	(revision 9)
+++ 	(revision )
@@ -1,16 +1,0 @@
-#include <lib.h>
-#define read	_read
-#include <unistd.h>
-
-PUBLIC ssize_t read(fd, buffer, nbytes)
-int fd;
-void *buffer;
-size_t nbytes;
-{
-  message m;
-
-  m.m1_i1 = fd;
-  m.m1_i2 = nbytes;
-  m.m1_p1 = (char *) buffer;
-  return(_syscall(FS, READ, &m));
-}
Index: trunk/minix/lib/posix/_readdir.c
===================================================================
--- trunk/minix/lib/posix/_readdir.c	(revision 9)
+++ 	(revision )
@@ -1,59 +1,0 @@
-/*	readdir()					Author: Kees J. Bot
- *								24 Apr 1989
- */
-#define nil 0
-#include <lib.h>
-#define read	_read
-#define readdir	_readdir
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <dirent.h>
-#include <unistd.h>
-#include <stdlib.h>
-#include <fcntl.h>
-#include <limits.h>
-#include <errno.h>
-#include <string.h>
-
-#define v7ent(p)	((struct _v7_direct *) (p))
-#define V7_EXTENT	(sizeof(struct _v7_direct) / sizeof(struct _fl_direct) - 1)
-
-struct dirent *readdir(DIR *dp)
-/* Return the next entry in a directory.  Handle V7 and FLEX format dirs. */
-{
-	struct dirent *e;
-
-	if (dp == nil) { errno= EBADF; return nil; }
-
-	do {
-		if (dp->_count <= 0) {
-			/* Read the next directory block. */
-			dp->_count= read(dp->_fd, dp->_buf, sizeof(dp->_buf));
-			if (dp->_count <= 0) return nil;
-
-			dp->_count/= sizeof(dp->_buf[0]);
-			dp->_ptr= dp->_buf;
-
-			/* Extent is zero of the first flex entry. */
-			if (dp->_v7 == (char)-1) dp->_v7= dp->_buf[0].d_extent;
-		}
-
-		if (!dp->_v7) {
-			/* FLEX. */
-			e= (struct dirent *) dp->_ptr;
-		} else {
-			/* V7: transform to FLEX. */
-			e= (struct dirent *) dp->_v7f;
-			e->d_ino= v7ent(dp->_ptr)->d_ino;
-			e->d_extent= V7_EXTENT;
-			memcpy(e->d_name, v7ent(dp->_ptr)->d_name, DIRSIZ);
-			e->d_name[DIRSIZ]= 0;
-		}
-
-		dp->_ptr+= 1 + e->d_extent;
-		dp->_count-= 1 + e->d_extent;
-		dp->_pos+= (1 + e->d_extent) * sizeof(*dp->_ptr);
-
-	} while (e->d_ino == 0);
-	return e;
-}
Index: trunk/minix/lib/posix/_readlink.c
===================================================================
--- trunk/minix/lib/posix/_readlink.c	(revision 9)
+++ 	(revision )
@@ -1,19 +1,0 @@
-#include <lib.h>
-#define readlink _readlink
-#include <unistd.h>
-#include <string.h>
-
-PUBLIC int readlink(name, buffer, bufsiz)
-_CONST char *name;
-char *buffer;
-size_t bufsiz;
-{
-  message m;
-
-  m.m1_i1 = strlen(name) + 1;
-  m.m1_i2 = bufsiz;
-  m.m1_p1 = (char *) name;
-  m.m1_p2 = (char *) buffer;
-
-  return(_syscall(FS, RDLNK, &m));
-}
Index: trunk/minix/lib/posix/_rename.c
===================================================================
--- trunk/minix/lib/posix/_rename.c	(revision 9)
+++ 	(revision )
@@ -1,16 +1,0 @@
-#include <lib.h>
-#define rename	_rename
-#include <string.h>
-#include <stdio.h>
-
-PUBLIC int rename(name, name2)
-_CONST char *name, *name2;
-{
-  message m;
-
-  m.m1_i1 = strlen(name) + 1;
-  m.m1_i2 = strlen(name2) + 1;
-  m.m1_p1 = (char *) name;
-  m.m1_p2 = (char *) name2;
-  return(_syscall(FS, RENAME, &m));
-}
Index: trunk/minix/lib/posix/_rewinddir.c
===================================================================
--- trunk/minix/lib/posix/_rewinddir.c	(revision 9)
+++ 	(revision )
@@ -1,14 +1,0 @@
-/*	rewinddir()					Author: Kees J. Bot
- *								24 Apr 1989
- */
-#define nil 0
-#include <lib.h>
-#define rewinddir _rewinddir
-#define seekdir	_seekdir
-#include <sys/types.h>
-#include <dirent.h>
-
-void rewinddir(DIR *dp)
-{
-	(void) seekdir(dp, 0);
-}
Index: trunk/minix/lib/posix/_rmdir.c
===================================================================
--- trunk/minix/lib/posix/_rmdir.c	(revision 9)
+++ 	(revision )
@@ -1,12 +1,0 @@
-#include <lib.h>
-#define rmdir	_rmdir
-#include <unistd.h>
-
-PUBLIC int rmdir(name)
-_CONST char *name;
-{
-  message m;
-
-  _loadname(name, &m);
-  return(_syscall(FS, RMDIR, &m));
-}
Index: trunk/minix/lib/posix/_select.c
===================================================================
--- trunk/minix/lib/posix/_select.c	(revision 9)
+++ 	(revision )
@@ -1,20 +1,0 @@
-
-#include <lib.h>
-#include <sys/time.h>
-#include <sys/select.h>
-
-PUBLIC int select(int nfds,
-	fd_set *readfds, fd_set *writefds, fd_set *errorfds,
-	struct timeval *timeout)
-{
-  message m;
-
-  m.SEL_NFDS = nfds;
-  m.SEL_READFDS = (char *) readfds;
-  m.SEL_WRITEFDS = (char *) writefds;
-  m.SEL_ERRORFDS = (char *) errorfds;
-  m.SEL_TIMEOUT = (char *) timeout;
-
-  return (_syscall(FS, SELECT, &m));
-}
-
Index: trunk/minix/lib/posix/_setgid.c
===================================================================
--- trunk/minix/lib/posix/_setgid.c	(revision 9)
+++ 	(revision )
@@ -1,22 +1,0 @@
-#include <lib.h>
-#define setgid	_setgid
-#define setegid	_setegid
-#include <unistd.h>
-
-PUBLIC int setgid(grp)
-gid_t grp;
-{
-  message m;
-
-  m.m1_i1 = (int) grp;
-  return(_syscall(MM, SETGID, &m));
-}
-
-PUBLIC int setegid(grp)
-gid_t grp;
-{
-  message m;
-
-  m.m1_i1 = (int) grp;
-  return(_syscall(MM, SETEGID, &m));
-}
Index: trunk/minix/lib/posix/_setsid.c
===================================================================
--- trunk/minix/lib/posix/_setsid.c	(revision 9)
+++ 	(revision )
@@ -1,10 +1,0 @@
-#include <lib.h>
-#define setsid	_setsid
-#include <unistd.h>
-
-PUBLIC pid_t setsid()
-{
-  message m;
-
-  return(_syscall(MM, SETSID, &m));
-}
Index: trunk/minix/lib/posix/_setuid.c
===================================================================
--- trunk/minix/lib/posix/_setuid.c	(revision 9)
+++ 	(revision )
@@ -1,22 +1,0 @@
-#include <lib.h>
-#define setuid	_setuid
-#define seteuid	_seteuid
-#include <unistd.h>
-
-PUBLIC int setuid(usr)
-_mnx_Uid_t usr;
-{
-  message m;
-
-  m.m1_i1 = usr;
-  return(_syscall(MM, SETUID, &m));
-}
-
-PUBLIC int seteuid(usr)
-_mnx_Uid_t usr;
-{
-  message m;
-
-  m.m1_i1 = usr;
-  return(_syscall(MM, SETEUID, &m));
-}
Index: trunk/minix/lib/posix/_sigaction.c
===================================================================
--- trunk/minix/lib/posix/_sigaction.c	(revision 9)
+++ 	(revision )
@@ -1,23 +1,0 @@
-#include <lib.h>
-#define sigaction _sigaction
-#include <sys/sigcontext.h>
-#include <signal.h>
-
-_PROTOTYPE(int __sigreturn, (void));
-
-PUBLIC int sigaction(sig, act, oact)
-int sig;
-_CONST struct sigaction *act;
-struct sigaction *oact;
-{
-  message m;
-
-  m.m1_i2 = sig;
-
-  /* XXX - yet more type puns because message struct is short of types. */
-  m.m1_p1 = (char *) act;
-  m.m1_p2 = (char *) oact;
-  m.m1_p3 = (char *) __sigreturn;
-
-  return(_syscall(MM, SIGACTION, &m));
-}
Index: trunk/minix/lib/posix/_sigpending.c
===================================================================
--- trunk/minix/lib/posix/_sigpending.c	(revision 9)
+++ 	(revision )
@@ -1,13 +1,0 @@
-#include <lib.h>
-#define sigpending _sigpending
-#include <signal.h>
-
-PUBLIC int sigpending(set)
-sigset_t *set;
-{
-  message m;
-
-  if (_syscall(MM, SIGPENDING, &m) < 0) return(-1);
-  *set = (sigset_t) m.m2_l1;
-  return(m.m_type);
-}
Index: trunk/minix/lib/posix/_sigprocmask.c
===================================================================
--- trunk/minix/lib/posix/_sigprocmask.c	(revision 9)
+++ 	(revision )
@@ -1,22 +1,0 @@
-#include <lib.h>
-#define sigprocmask _sigprocmask
-#include <signal.h>
-
-PUBLIC int sigprocmask(how, set, oset)
-int how;
-_CONST sigset_t *set;
-sigset_t *oset;
-{
-  message m;
-
-  if (set == (sigset_t *) NULL) {
-	m.m2_i1 = SIG_INQUIRE;
-	m.m2_l1 = 0;
-  } else {
-	m.m2_i1 = how;
-	m.m2_l1 = (long) *set;
-  }
-  if (_syscall(MM, SIGPROCMASK, &m) < 0) return(-1);
-  if (oset != (sigset_t *) NULL) *oset = (sigset_t) (m.m2_l1);
-  return(m.m_type);
-}
Index: trunk/minix/lib/posix/_sigreturn.c
===================================================================
--- trunk/minix/lib/posix/_sigreturn.c	(revision 9)
+++ 	(revision )
@@ -1,60 +1,0 @@
-#include <lib.h>
-#define sigfillset	_sigfillset
-#define sigjmp		_sigjmp
-#define sigprocmask	_sigprocmask
-#define sigreturn	_sigreturn
-#include <sys/sigcontext.h>
-#include <setjmp.h>
-#include <signal.h>
-
-_PROTOTYPE( int sigjmp, (jmp_buf jb, int retval));
-
-#if (_SETJMP_SAVES_REGS == 0)
-/* 'sigreturn' using a short format jmp_buf (no registers saved). */
-PUBLIC int sigjmp(jb, retval)
-jmp_buf jb;
-int retval;
-{
-  struct sigcontext sc;
-
-  sc.sc_flags = jb[0].__flags;
-  sc.sc_mask = jb[0].__mask;
-
-#if (CHIP == INTEL)
-  sc.sc_pc = (int) jb[0].__pc;
-  sc.sc_sp = (int) jb[0].__sp;
-  sc.sc_fp = (int) jb[0].__lb;
-#endif
-
-#if (CHIP == M68000)
-  sc.sc_pc = (long) jb[0].__pc;
-  sc.sc_sp = (long) jb[0].__sp;
-  sc.sc_fp = (long) jb[0].__lb;
-#endif
-
-  sc.sc_retreg = retval;
-  return sigreturn(&sc);
-}
-#endif
-
-PUBLIC int sigreturn(scp)
-register struct sigcontext *scp;
-{
-  sigset_t set;
-
-  /* The message can't be on the stack, because the stack will vanish out
-   * from under us.  The send part of sendrec will succeed, but when
-   * a message is sent to restart the current process, who knows what will
-   * be in the place formerly occupied by the message?
-   */
-  static message m;
-
-  /* Protect against race conditions by blocking all interrupts. */
-  sigfillset(&set);		/* splhi */
-  sigprocmask(SIG_SETMASK, &set, (sigset_t *) NULL);
-
-  m.m2_l1 = scp->sc_mask;
-  m.m2_i2 = scp->sc_flags;
-  m.m2_p1 = (char *) scp;
-  return(_syscall(MM, SIGRETURN, &m));	/* normally this doesn't return */
-}
Index: trunk/minix/lib/posix/_sigset.c
===================================================================
--- trunk/minix/lib/posix/_sigset.c	(revision 9)
+++ 	(revision )
@@ -1,75 +1,0 @@
-#include <lib.h>
-/* XXX - these have to be hidden because signal() uses them and signal() is
- * ANSI and not POSIX.  It would be surely be better to use macros for the
- * library and system uses, and perhaps macros as well as functions for the
- * POSIX user interface.  The macros would not need underlines.  It may be
- * inconvenient to match the exact semantics of the current functions
- * because the interface is bloated by reporting errors.  For library and
- * system uses, the signal number is mostly already known to be valid
- * before the sigset-changing routines are called.
- */
-#define sigaddset	_sigaddset
-#define sigdelset	_sigdelset
-#define sigemptyset	_sigemptyset
-#define sigfillset	_sigfillset
-#define sigismember	_sigismember
-#include <signal.h>
-
-/* Low bit of signal masks. */
-#define SIGBIT_0	((sigset_t) 1)
-
-/* Mask of valid signals (0 - _NSIG). */
-#define SIGMASK		(((SIGBIT_0 << _NSIG) << 1) - 1)
-
-#define sigisvalid(signo) ((unsigned) (signo) <= _NSIG)
-
-PUBLIC int sigaddset(set, signo)
-sigset_t *set;
-int signo;
-{
-  if (!sigisvalid(signo)) {
-  	errno = EINVAL;
-	return -1;
-  }
-  *set |= SIGBIT_0 << signo;
-  return 0;
-}
-
-PUBLIC int sigdelset(set, signo)
-sigset_t *set;
-int signo;
-{
-  if (!sigisvalid(signo)) {
-  	errno = EINVAL;
-	return -1;
-  }
-  *set &= ~(SIGBIT_0 << signo);
-  return 0;
-}
-
-PUBLIC int sigemptyset(set)
-sigset_t *set;
-{
-  *set = 0;
-  return 0;
-}
-
-PUBLIC int sigfillset(set)
-sigset_t *set;
-{
-  *set = SIGMASK;
-  return 0;
-}
-
-PUBLIC int sigismember(set, signo)
-_CONST sigset_t *set;
-int signo;
-{
-  if (!sigisvalid(signo)) {
-  	errno = EINVAL;
-	return -1;
-  }
-  if (*set & (SIGBIT_0 << signo))
-  	return 1;
-  return 0;
-}
Index: trunk/minix/lib/posix/_sigsetjmp.c
===================================================================
--- trunk/minix/lib/posix/_sigsetjmp.c	(revision 9)
+++ 	(revision )
@@ -1,13 +1,0 @@
-#include <lib.h>
-#include <sys/sigcontext.h>
-#include <setjmp.h>
-
-PUBLIC void siglongjmp(env, val)
-sigjmp_buf env;
-int val;
-{
-  if (env[0].__flags & SC_SIGCONTEXT)
-	longjmp(env, val);
-  else
-	_longjmp(env, val);
-}
Index: trunk/minix/lib/posix/_sigsuspend.c
===================================================================
--- trunk/minix/lib/posix/_sigsuspend.c	(revision 9)
+++ 	(revision )
@@ -1,12 +1,0 @@
-#include <lib.h>
-#define sigsuspend _sigsuspend
-#include <signal.h>
-
-PUBLIC int sigsuspend(set)
-_CONST sigset_t *set;
-{
-  message m;
-
-  m.m2_l1 = (long) *set;
-  return(_syscall(MM, SIGSUSPEND, &m));
-}
Index: trunk/minix/lib/posix/_sleep.c
===================================================================
--- trunk/minix/lib/posix/_sleep.c	(revision 9)
+++ 	(revision )
@@ -1,69 +1,0 @@
-/*	sleep() - Sleep for a number of seconds.	Author: Kees J. Bot
- *								24 Apr 2000
- * (Inspired by the Minix-vmd version of same, except that
- * this implementation doesn't bother to check if all the signal
- * functions succeed.  Under Minix that is no problem.)
- */
-
-#include <lib.h>
-#define sleep _sleep
-#include <signal.h>
-#include <unistd.h>
-#include <time.h>
-
-static void handler(int sig)
-{
-	/* Dummy signal handler. */
-}
-
-unsigned sleep(unsigned sleep_seconds)
-{
-	sigset_t ss_full, ss_orig, ss_alarm;
-	struct sigaction action_alarm, action_orig;
-	unsigned alarm_seconds, nap_seconds;
-
-	if (sleep_seconds == 0) return 0;	/* No rest for the wicked */
-
-	/* Mask all signals. */
-	sigfillset(&ss_full);
-	sigprocmask(SIG_BLOCK, &ss_full, &ss_orig);
-
-	/* Cancel currently running alarm. */
-	alarm_seconds= alarm(0);
-
-	/* How long can we nap without interruptions? */
-	nap_seconds= sleep_seconds;
-	if (alarm_seconds != 0 && alarm_seconds < sleep_seconds) {
-		nap_seconds= alarm_seconds;
-	}
-
-	/* Now sleep. */
-	action_alarm.sa_handler= handler;
-	sigemptyset(&action_alarm.sa_mask);
-	action_alarm.sa_flags= 0;
-	sigaction(SIGALRM, &action_alarm, &action_orig);
-	alarm(nap_seconds);
-
-	/* Wait for a wakeup call, either our alarm, or some other signal. */
-	ss_alarm= ss_orig;
-	sigdelset(&ss_alarm, SIGALRM);
-	sigsuspend(&ss_alarm);
-
-	/* Cancel alarm, set mask and stuff back to normal. */
-	nap_seconds -= alarm(0);
-	sigaction(SIGALRM, &action_orig, NULL);
-	sigprocmask(SIG_SETMASK, &ss_orig, NULL);
-
-	/* Restore alarm counter to the time remaining. */
-	if (alarm_seconds != 0 && alarm_seconds >= nap_seconds) {
-		alarm_seconds -= nap_seconds;
-		if (alarm_seconds == 0) {
-			raise(SIGALRM);		/* Alarm expires now! */
-		} else {
-			alarm(alarm_seconds);	/* Count time remaining. */
-		}
-	}
-
-	/* Return time not slept. */
-	return sleep_seconds - nap_seconds;
-}
Index: trunk/minix/lib/posix/_stat.c
===================================================================
--- trunk/minix/lib/posix/_stat.c	(revision 9)
+++ 	(revision )
@@ -1,16 +1,0 @@
-#include <lib.h>
-#define stat	_stat
-#include <sys/stat.h>
-#include <string.h>
-
-PUBLIC int stat(name, buffer)
-_CONST char *name;
-struct stat *buffer;
-{
-  message m;
-
-  m.m1_i1 = strlen(name) + 1;
-  m.m1_p1 = (char *) name;
-  m.m1_p2 = (char *) buffer;
-  return(_syscall(FS, STAT, &m));
-}
Index: trunk/minix/lib/posix/_stime.c
===================================================================
--- trunk/minix/lib/posix/_stime.c	(revision 9)
+++ 	(revision )
@@ -1,13 +1,0 @@
-#include <lib.h>
-#define stime	_stime
-#include <minix/minlib.h>
-#include <time.h>
-
-PUBLIC int stime(top)
-long *top;
-{
-  message m;
-
-  m.m2_l1 = *top;
-  return(_syscall(MM, STIME, &m));
-}
Index: trunk/minix/lib/posix/_symlink.c
===================================================================
--- trunk/minix/lib/posix/_symlink.c	(revision 9)
+++ 	(revision )
@@ -1,16 +1,0 @@
-#include <lib.h>
-#define symlink	_symlink
-#include <string.h>
-#include <unistd.h>
-
-PUBLIC int symlink(name, name2)
-_CONST char *name, *name2;
-{
-  message m;
-
-  m.m1_i1 = strlen(name) + 1;
-  m.m1_i2 = strlen(name2) + 1;
-  m.m1_p1 = (char *) name;
-  m.m1_p2 = (char *) name2;
-  return(_syscall(FS, SYMLINK, &m));
-}
Index: trunk/minix/lib/posix/_sync.c
===================================================================
--- trunk/minix/lib/posix/_sync.c	(revision 9)
+++ 	(revision )
@@ -1,10 +1,0 @@
-#include <lib.h>
-#define sync	_sync
-#include <unistd.h>
-
-PUBLIC int sync()
-{
-  message m;
-
-  return(_syscall(FS, SYNC, &m));
-}
Index: trunk/minix/lib/posix/_tcdrain.c
===================================================================
--- trunk/minix/lib/posix/_tcdrain.c	(revision 9)
+++ 	(revision )
@@ -1,16 +1,0 @@
-/*
-posix/_tcdrain.c
-
-Created:	July 26, 1994 by Philip Homburg
-*/
-
-#define tcdrain _tcdrain
-#define ioctl _ioctl
-#include <termios.h>
-#include <sys/ioctl.h>
-
-int tcdrain(fd)
-int fd;
-{
-  return(ioctl(fd, TCDRAIN, (void *)0));
-}
Index: trunk/minix/lib/posix/_tcflow.c
===================================================================
--- trunk/minix/lib/posix/_tcflow.c	(revision 9)
+++ 	(revision )
@@ -1,17 +1,0 @@
-/*
-posix/_tcflow.c
-
-Created:	June 8, 1993 by Philip Homburg
-*/
-
-#define tcflow _tcflow
-#define ioctl _ioctl
-#include <termios.h>
-#include <sys/ioctl.h>
-
-int tcflow(fd, action)
-int fd;
-int action;
-{
-  return(ioctl(fd, TCFLOW, &action));
-}
Index: trunk/minix/lib/posix/_tcflush.c
===================================================================
--- trunk/minix/lib/posix/_tcflush.c	(revision 9)
+++ 	(revision )
@@ -1,12 +1,0 @@
-/*	tcflush() - flush buffered characters		Author: Kees J. Bot
- *								13 Jan 1994
- */
-#define tcflush _tcflush
-#define ioctl _ioctl
-#include <termios.h>
-#include <sys/ioctl.h>
-
-int tcflush(int fd, int queue_selector)
-{
-  return(ioctl(fd, TCFLSH, &queue_selector));
-}
Index: trunk/minix/lib/posix/_tcgetattr.c
===================================================================
--- trunk/minix/lib/posix/_tcgetattr.c	(revision 9)
+++ 	(revision )
@@ -1,12 +1,0 @@
-#define tcgetattr _tcgetattr
-#define ioctl _ioctl
-#include <sys/ioctl.h>
-#include <errno.h>
-#include <termios.h>
-
-int tcgetattr(fd, termios_p)
-int fd;
-struct termios *termios_p;
-{
-  return(ioctl(fd, TCGETS, termios_p));
-}
Index: trunk/minix/lib/posix/_tcsendbreak.c
===================================================================
--- trunk/minix/lib/posix/_tcsendbreak.c	(revision 9)
+++ 	(revision )
@@ -1,12 +1,0 @@
-/*	tcsendbreak() - send a break			Author: Kees J. Bot
- *								13 Jan 1994
- */
-#define tcsendbreak _tcsendbreak
-#define ioctl _ioctl
-#include <termios.h>
-#include <sys/ioctl.h>
-
-int tcsendbreak(int fd, int duration)
-{
-  return(ioctl(fd, TCSBRK, &duration));
-}
Index: trunk/minix/lib/posix/_tcsetattr.c
===================================================================
--- trunk/minix/lib/posix/_tcsetattr.c	(revision 9)
+++ 	(revision )
@@ -1,29 +1,0 @@
-/*
-posix/_tcsetattr.c
-
-Created:	June 11, 1993 by Philip Homburg
-*/
-
-#define tcsetattr _tcsetattr
-#define ioctl _ioctl
-#include <errno.h>
-#include <termios.h>
-#include <sys/ioctl.h>
-#include <sys/types.h>
-
-int tcsetattr(fd, opt_actions, termios_p)
-int fd;
-int opt_actions;
-_CONST struct termios *termios_p;
-{
-  int request;
-
-  switch(opt_actions)
-  {
-    case TCSANOW:	request = TCSETS;	break;
-    case TCSADRAIN:	request = TCSETSW;	break;
-    case TCSAFLUSH:	request = TCSETSF;	break;
-    default:		errno = EINVAL;		return(-1);
-  };
-  return(ioctl(fd, request, (void *) termios_p));
-}
Index: trunk/minix/lib/posix/_time.c
===================================================================
--- trunk/minix/lib/posix/_time.c	(revision 9)
+++ 	(revision )
@@ -1,13 +1,0 @@
-#include <lib.h>
-#define time	_time
-#include <time.h>
-
-PUBLIC time_t time(tp)
-time_t *tp;
-{
-  message m;
-
-  if (_syscall(MM, TIME, &m) < 0) return( (time_t) -1);
-  if (tp != (time_t *) 0) *tp = m.m2_l1;
-  return(m.m2_l1);
-}
Index: trunk/minix/lib/posix/_times.c
===================================================================
--- trunk/minix/lib/posix/_times.c	(revision 9)
+++ 	(revision )
@@ -1,18 +1,0 @@
-#include <lib.h>
-#define times	_times
-#include <sys/times.h>
-#include <time.h>
-
-PUBLIC clock_t times(buf)
-struct tms *buf;
-{
-  message m;
-
-  m.m4_l5 = 0;			/* return this if system is pre-1.6 */
-  if (_syscall(MM, TIMES, &m) < 0) return( (clock_t) -1);
-  buf->tms_utime = m.m4_l1;
-  buf->tms_stime = m.m4_l2;
-  buf->tms_cutime = m.m4_l3;
-  buf->tms_cstime = m.m4_l4;
-  return(m.m4_l5);
-}
Index: trunk/minix/lib/posix/_truncate.c
===================================================================
--- trunk/minix/lib/posix/_truncate.c	(revision 9)
+++ 	(revision )
@@ -1,24 +1,0 @@
-#include <lib.h>
-#include <string.h>
-#define truncate	_truncate
-#define ftruncate	_ftruncate
-#include <unistd.h>
-
-PUBLIC int truncate(const char *_path, off_t _length)
-{
-  message m;
-  m.m2_p1 = (char *) _path;
-  m.m2_i1 = strlen(_path)+1;
-  m.m2_l1 = _length;
-
-  return(_syscall(FS, TRUNCATE, &m));
-}
-
-PUBLIC int ftruncate(int _fd, off_t _length)
-{
-  message m;
-  m.m2_l1 = _length;
-  m.m2_i1 = _fd;
-
-  return(_syscall(FS, FTRUNCATE, &m));
-}
Index: trunk/minix/lib/posix/_umask.c
===================================================================
--- trunk/minix/lib/posix/_umask.c	(revision 9)
+++ 	(revision )
@@ -1,12 +1,0 @@
-#include <lib.h>
-#define umask	_umask
-#include <sys/stat.h>
-
-PUBLIC mode_t umask(complmode)
-_mnx_Mode_t complmode;
-{
-  message m;
-
-  m.m1_i1 = complmode;
-  return( (mode_t) _syscall(FS, UMASK, &m));
-}
Index: trunk/minix/lib/posix/_umount.c
===================================================================
--- trunk/minix/lib/posix/_umount.c	(revision 9)
+++ 	(revision )
@@ -1,12 +1,0 @@
-#include <lib.h>
-#define umount	_umount
-#include <unistd.h>
-
-PUBLIC int umount(name)
-_CONST char *name;
-{
-  message m;
-
-  _loadname(name, &m);
-  return(_syscall(FS, UMOUNT, &m));
-}
Index: trunk/minix/lib/posix/_uname.c
===================================================================
--- trunk/minix/lib/posix/_uname.c	(revision 9)
+++ 	(revision )
@@ -1,59 +1,0 @@
-/*	uname() - get system info			Author: Kees J. Bot
- *								7 Nov 1994
- * Returns information about the Minix system.  Alas most
- * of it is gathered at compile time, so machine is wrong, and
- * release and version become wrong if not recompiled.
- * More chip types and Minix versions need to be added.
- */
-#define uname	_uname
-#define open	_open
-#define read	_read
-#define close	_close
-#include <sys/types.h>
-#include <sys/utsname.h>
-#include <unistd.h>
-#include <fcntl.h>
-#include <string.h>
-#include <errno.h>
-#include <minix/config.h>
-#include <minix/com.h>
-#include <minix/minlib.h>
-
-int uname(name) struct utsname *name;
-{
-  int hf, n, err;
-  struct kinfo kinfo;
-  char *nl;
-
-  /* Read the node name from /etc/hostname.file. */
-  if ((hf = open("/etc/hostname.file", O_RDONLY)) < 0) {
-	if (errno != ENOENT) return(-1);
-	strcpy(name->nodename, "noname");
-  } else {
-	n = read(hf, name->nodename, sizeof(name->nodename) - 1);
-	err = errno;
-	close(hf);
-	errno = err;
-	if (n < 0) return(-1);
-	name->nodename[n] = 0;
-	if ((nl = strchr(name->nodename, '\n')) != NULL) {
-		memset(nl, 0, (name->nodename + sizeof(name->nodename)) - nl);
-	}
-  }
- 
-  getsysinfo(PM_PROC_NR, SI_KINFO, &kinfo);
-
-  strcpy(name->sysname, "Minix");
-  strcpy(name->release, kinfo.release);
-  strcpy(name->version, kinfo.version);
-#if (CHIP == INTEL)
-  name->machine[0] = 'i';
-  strcpy(name->machine + 1, itoa(getprocessor()));
-#if _WORD_SIZE == 4
-  strcpy(name->arch, "i386");
-#else
-  strcpy(name->arch, "i86");
-#endif
-#endif
-  return(0);
-}
Index: trunk/minix/lib/posix/_unlink.c
===================================================================
--- trunk/minix/lib/posix/_unlink.c	(revision 9)
+++ 	(revision )
@@ -1,12 +1,0 @@
-#include <lib.h>
-#define unlink	_unlink
-#include <unistd.h>
-
-PUBLIC int unlink(name)
-_CONST char *name;
-{
-  message m;
-
-  _loadname(name, &m);
-  return(_syscall(FS, UNLINK, &m));
-}
Index: trunk/minix/lib/posix/_utime.c
===================================================================
--- trunk/minix/lib/posix/_utime.c	(revision 9)
+++ 	(revision )
@@ -1,24 +1,0 @@
-/* utime(2) for POSIX		Authors: Terrence W. Holm & Edwin L. Froese */
-
-#include <lib.h>
-#define utime	_utime
-#include <string.h>
-#include <utime.h>
-
-PUBLIC int utime(name, timp)
-_CONST char *name;
-_CONST struct utimbuf *timp;
-{
-  message m;
-
-  if (timp == NULL) {
-	m.m2_i1 = 0;		/* name size 0 means NULL `timp' */
-	m.m2_i2 = strlen(name) + 1;	/* actual size here */
-  } else {
-	m.m2_l1 = timp->actime;
-	m.m2_l2 = timp->modtime;
-	m.m2_i1 = strlen(name) + 1;
-  }
-  m.m2_p1 = (char *) name;
-  return(_syscall(FS, UTIME, &m));
-}
Index: trunk/minix/lib/posix/_wait.c
===================================================================
--- trunk/minix/lib/posix/_wait.c	(revision 9)
+++ 	(revision )
@@ -1,13 +1,0 @@
-#include <lib.h>
-#define wait	_wait
-#include <sys/wait.h>
-
-PUBLIC pid_t wait(status)
-int *status;
-{
-  message m;
-
-  if (_syscall(MM, WAIT, &m) < 0) return(-1);
-  if (status != 0) *status = m.m2_i1;
-  return(m.m_type);
-}
Index: trunk/minix/lib/posix/_waitpid.c
===================================================================
--- trunk/minix/lib/posix/_waitpid.c	(revision 9)
+++ 	(revision )
@@ -1,17 +1,0 @@
-#include <lib.h>
-#define waitpid	_waitpid
-#include <sys/wait.h>
-
-PUBLIC pid_t waitpid(pid, status, options)
-pid_t pid;
-int *status;
-int options;
-{
-  message m;
-
-  m.m1_i1 = pid;
-  m.m1_i2 = options;
-  if (_syscall(MM, WAITPID, &m) < 0) return(-1);
-  if (status != 0) *status = m.m2_i1;
-  return m.m_type;
-}
Index: trunk/minix/lib/posix/_write.c
===================================================================
--- trunk/minix/lib/posix/_write.c	(revision 9)
+++ 	(revision )
@@ -1,16 +1,0 @@
-#include <lib.h>
-#define write	_write
-#include <unistd.h>
-
-PUBLIC ssize_t write(fd, buffer, nbytes)
-int fd;
-_CONST void *buffer;
-size_t nbytes;
-{
-  message m;
-
-  m.m1_i1 = fd;
-  m.m1_i2 = nbytes;
-  m.m1_p1 = (char *) buffer;
-  return(_syscall(FS, WRITE, &m));
-}
Index: trunk/minix/lib/posix/getloadavg.c
===================================================================
--- trunk/minix/lib/posix/getloadavg.c	(revision 9)
+++ 	(revision )
@@ -1,56 +1,0 @@
-
-#include <sys/types.h>
-#include <stdlib.h>
-#include <unistd.h>
-#include <lib.h>
-
-/* Retrieve system load average information. */
-int getloadavg(double *loadavg, int nelem)
-{
-  struct loadinfo loadinfo;
-  int h, p, unfilled_ticks;
-#define PERIODS 3
-  int minutes[3] = { 1, 5, 15 };
-  if(nelem < 1) {
-	errno = ENOSPC;
-	return -1;
-  }
-
-  if(getsysinfo(PM_PROC_NR, SI_LOADINFO, &loadinfo) < 0)
-	return -1;
-  if(nelem > PERIODS)
-	nelem = PERIODS;
-
-  /* How many ticks are missing from the newest-filled slot? */
-#define TICKSPERSLOT (_LOAD_UNIT_SECS * HZ)
-  unfilled_ticks = TICKSPERSLOT - (loadinfo.last_clock % TICKSPERSLOT);
-
-  for(p = 0; p < nelem; p++) {
-    int h, offset, slots;
-    double l = 0.0;
-    int latest = loadinfo.proc_last_slot;
-    slots = minutes[p] * 60 / _LOAD_UNIT_SECS;
-
-    /* Add up the total number of process ticks for this number
-     * of minutes (minutes[p]). Start with the newest slot, which
-     * is latest, and count back for the number of slots that 
-     * correspond to the right number of minutes. Take wraparound
-     * into account by calculating the index modulo _LOAD_HISTORY,
-     * which is the number of slots of history kept.
-     */
-    for(h = 0; h < slots; h++) {
-       int slot;
-       slot = (latest - h + _LOAD_HISTORY) % _LOAD_HISTORY;
-       l += (double) loadinfo.proc_load_history[slot];
-    }
-
-    /* The load average over this number of minutes is the number of
-     * process-ticks divided by the number of ticks, not counting the
-     * number of ticks the last slot hasn't been around yet.
-     */
-    loadavg[p] = l / (slots * TICKSPERSLOT - unfilled_ticks);
-  }
-
-  return nelem;
-}
-
Index: trunk/minix/lib/posix/getopt.c
===================================================================
--- trunk/minix/lib/posix/getopt.c	(revision 9)
+++ 	(revision )
@@ -1,105 +1,0 @@
-/*
- * Copyright (c) 1987, 1993, 1994
- *	The Regents of the University of California.  All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- *    must display the following acknowledgement:
- *	This product includes software developed by the University of
- *	California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- *    may be used to endorse or promote products derived from this software
- *    without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#include <string.h>
-#include <stdio.h>
-
-int	opterr = 1,		/* if error message should be printed */
-	optind = 1,		/* index into parent argv vector */
-	optopt,			/* character checked for validity */
-	optreset;		/* reset getopt */
-char	*optarg;		/* argument associated with option */
-
-#define	BADCH	(int)'?'
-#define	BADARG	(int)':'
-#define	EMSG	""
-
-/*
- * getopt --
- *	Parse argc/argv argument vector.
- */
-int
-getopt(int nargc, char * const nargv[], const char *ostr)
-{
-	static char *place = EMSG;		/* option letter processing */
-	char *oli;				/* option letter list index */
-
-	if (optreset || !*place) {		/* update scanning pointer */
-		optreset = 0;
-		if (optind >= nargc || *(place = nargv[optind]) != '-') {
-			place = EMSG;
-			return (-1);
-		}
-		if (place[1] && *++place == '-') {	/* found "--" */
-			++optind;
-			place = EMSG;
-			return (-1);
-		}
-	}					/* option letter okay? */
-	if ((optopt = (int)*place++) == (int)':' ||
-	    !(oli = strchr(ostr, optopt))) {
-		/*
-		 * if the user didn't specify '-' as an option,
-		 * assume it means -1.
-		 */
-		if (optopt == (int)'-')
-			return (-1);
-		if (!*place)
-			++optind;
-		if (opterr && *ostr != ':')
-			(void)printf("illegal option -- %c\n", optopt);
-		return (BADCH);
-	}
-	if (*++oli != ':') {			/* don't need argument */
-		optarg = NULL;
-		if (!*place)
-			++optind;
-	}
-	else {					/* need an argument */
-		if (*place)			/* no white space */
-			optarg = place;
-		else if (nargc <= ++optind) {	/* no arg */
-			place = EMSG;
-			if (*ostr == ':')
-				return (BADARG);
-			if (opterr)
-				(void)printf("option requires an argument -- %c\n", optopt);
-			return (BADCH);
-		}
-	 	else				/* white space */
-			optarg = nargv[optind];
-		place = EMSG;
-		++optind;
-	}
-	return (optopt);			/* dump back option letter */
-}
Index: trunk/minix/lib/posix/gettimeofday.c
===================================================================
--- trunk/minix/lib/posix/gettimeofday.c	(revision 9)
+++ 	(revision )
@@ -1,21 +1,0 @@
-/*
-gettimeofday.c
-*/
-
-#include <sys/time.h>
-#include <lib.h>
-#include <time.h>
-
-int gettimeofday(struct timeval *_RESTRICT tp, void *_RESTRICT tzp)
-{
-  message m;
-
-  if (_syscall(MM, GETTIMEOFDAY, &m) < 0)
-  	return -1;
-
-  tp->tv_sec = m.m2_l1;
-  tp->tv_usec = m.m2_l2;
-
-  return 0;
-}
-
Index: trunk/minix/lib/posix/priority.c
===================================================================
--- trunk/minix/lib/posix/priority.c	(revision 9)
+++ 	(revision )
@@ -1,46 +1,0 @@
-/*
-priority.c
-*/
-
-#include <errno.h>
-#include <sys/types.h>
-#include <sys/resource.h>
-#include <lib.h>
-#include <unistd.h>
-#include <string.h>
-#include <stddef.h>
-
-
-int getpriority(int which, int who)
-{
-	int v;
-	message m;
-
-	m.m1_i1 = which;
-	m.m1_i2 = who;
-
-	/* GETPRIORITY returns negative for error.
-	 * Otherwise, it returns the priority plus the minimum
-	 * priority, to distiginuish from error. We have to
-	 * correct for this. (The user program has to check errno
-	 * to see if something really went wrong.)
-	 */
-
-	if((v = _syscall(MM, GETPRIORITY, &m)) < 0) {
-		return v;
-	}
-
-	return v + PRIO_MIN;
-}
-
-int setpriority(int which, int who, int prio)
-{
-	message m;
-
-	m.m1_i1 = which;
-	m.m1_i2 = who;
-	m.m1_i3 = prio;
-
-	return _syscall(MM, SETPRIORITY, &m);
-}
-
Index: trunk/minix/lib/posix/usleep.c
===================================================================
--- trunk/minix/lib/posix/usleep.c	(revision 9)
+++ 	(revision )
@@ -1,18 +1,0 @@
-/*
-lib/posix/usleep.c
-*/
-
-#include <unistd.h>
-#include <sys/select.h>
-#include <sys/time.h>
-
-int usleep(useconds_t useconds)
-{
-	int r;
-	struct timeval tv;
-
-	tv.tv_sec= useconds/1000000;
-	tv.tv_usec= useconds % 1000000;
-	r= select(0, NULL, NULL, NULL, &tv);
-	return r;
-}
Index: trunk/minix/lib/regex/COPYRIGHT
===================================================================
--- trunk/minix/lib/regex/COPYRIGHT	(revision 9)
+++ 	(revision )
@@ -1,56 +1,0 @@
-Copyright 1992, 1993, 1994 Henry Spencer.  All rights reserved.
-This software is not subject to any license of the American Telephone
-and Telegraph Company or of the Regents of the University of California.
-
-Permission is granted to anyone to use this software for any purpose on
-any computer system, and to alter it and redistribute it, subject
-to the following restrictions:
-
-1. The author is not responsible for the consequences of use of this
-   software, no matter how awful, even if they arise from flaws in it.
-
-2. The origin of this software must not be misrepresented, either by
-   explicit claim or by omission.  Since few users ever read sources,
-   credits must appear in the documentation.
-
-3. Altered versions must be plainly marked as such, and must not be
-   misrepresented as being the original software.  Since few users
-   ever read sources, credits must appear in the documentation.
-
-4. This notice may not be removed or altered.
-
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
-/*-
- * Copyright (c) 1994
- *	The Regents of the University of California.  All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- *    must display the following acknowledgement:
- *	This product includes software developed by the University of
- *	California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- *    may be used to endorse or promote products derived from this software
- *    without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- *	@(#)COPYRIGHT	8.1 (Berkeley) 3/16/94
- */
Index: trunk/minix/lib/regex/Makedepend-ack
===================================================================
--- trunk/minix/lib/regex/Makedepend-ack	(revision 9)
+++ 	(revision )
@@ -1,7 +1,0 @@
-depend-ack:
-	rm .depend-ack
-	touch .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -E' regcomp.c | sed -e 's:^\(.\):../obj-ack//./regex/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -E' regerror.c | sed -e 's:^\(.\):../obj-ack//./regex/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -E' regexec.c | sed -e 's:^\(.\):../obj-ack//./regex/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -E' regfree.c | sed -e 's:^\(.\):../obj-ack//./regex/\1:' >> .depend-ack
Index: trunk/minix/lib/regex/Makedepend-gnu
===================================================================
--- trunk/minix/lib/regex/Makedepend-gnu	(revision 9)
+++ 	(revision )
@@ -1,7 +1,0 @@
-depend-gnu:
-	rm .depend-gnu
-	touch .depend-gnu
-	mkdep 'gcc -O -D_MINIX -D_POSIX_SOURCE -E' regcomp.c | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./regex/\1:' >> .depend-gnu
-	mkdep 'gcc -O -D_MINIX -D_POSIX_SOURCE -E' regerror.c | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./regex/\1:' >> .depend-gnu
-	mkdep 'gcc -O -D_MINIX -D_POSIX_SOURCE -E' regexec.c | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./regex/\1:' >> .depend-gnu
-	mkdep 'gcc -O -D_MINIX -D_POSIX_SOURCE -E' regfree.c | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./regex/\1:' >> .depend-gnu
Index: trunk/minix/lib/regex/Makefile
===================================================================
--- trunk/minix/lib/regex/Makefile	(revision 9)
+++ 	(revision )
@@ -1,73 +1,0 @@
-#Generated from ./regex/Makefile.in
-all: all-ack
-
-all-ack:
-all-gnu:
-
-makefiles: Makefile
-Makedepend-ack Makedepend-gnu: 
-	sh ../generate.sh ./regex ../obj-ack/ ../obj-gnu
-
-Makefile: Makefile.in Makedepend-ack Makedepend-gnu
-	sh ../generate.sh ./regex ../obj-ack/ ../obj-gnu
-	@echo
-	@echo *Attention*
-	@echo Makefile is regenerated... rerun command to see changes
-	@echo *Attention*
-	@echo
-
-depend: depend-ack
-all-ack: ../obj-ack//libc.a
-
-../obj-ack//libc.a: ../obj-ack//libc.a(regcomp.o)
-../obj-ack//libc.a: ../obj-ack//libc.a(regerror.o)
-../obj-ack//libc.a: ../obj-ack//libc.a(regexec.o)
-../obj-ack//libc.a: ../obj-ack//libc.a(regfree.o)
-
-../obj-ack//libc.a:
-	ar cr ../obj-ack//libc.a ../obj-ack//./regex/*.o
-	rm ../obj-ack//./regex/*.o
-
-../obj-ack//libc.a(regcomp.o): regcomp.c
-	cc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-ack//./regex/regcomp.o regcomp.c
-../obj-ack//libc.a(regerror.o): regerror.c
-	cc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-ack//./regex/regerror.o regerror.c
-../obj-ack//libc.a(regexec.o): regexec.c
-	cc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-ack//./regex/regexec.o regexec.c
-../obj-ack//libc.a(regfree.o): regfree.c
-	cc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-ack//./regex/regfree.o regfree.c
-
-all-gnu: ../obj-gnu/libc.a
-
-../obj-gnu/libc.a: ../obj-gnu/./regex/regcomp.o
-../obj-gnu/libc.a: ../obj-gnu/./regex/regerror.o
-../obj-gnu/libc.a: ../obj-gnu/./regex/regexec.o
-../obj-gnu/libc.a: ../obj-gnu/./regex/regfree.o
-
-../obj-gnu/libc.a:
-	gar cr ../obj-gnu/libc.a $?
-
-../obj-gnu/./regex/regcomp.o: regcomp.c
-	gcc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-gnu/./regex/regcomp.o regcomp.c
-
-../obj-gnu/./regex/regerror.o: regerror.c
-	gcc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-gnu/./regex/regerror.o regerror.c
-
-../obj-gnu/./regex/regexec.o: regexec.c
-	gcc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-gnu/./regex/regexec.o regexec.c
-
-../obj-gnu/./regex/regfree.o: regfree.c
-	gcc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-gnu/./regex/regfree.o regfree.c
-
-
-
-
-clean::
-	rm -f ../obj-ack//./regex/*
-	rm -f ../obj-gnu/./regex/*
-
-include Makedepend-ack
-include .depend-ack
-
-include Makedepend-gnu
-include .depend-gnu
Index: trunk/minix/lib/regex/Makefile.in
===================================================================
--- trunk/minix/lib/regex/Makefile.in	(revision 9)
+++ 	(revision )
@@ -1,13 +1,0 @@
-# Makefile for lib/regex.
-
-CFLAGS="-O -D_MINIX -D_POSIX_SOURCE"
-
-LIBRARIES=libc
-
-libc_FILES=" \
-	regcomp.c \
-	regerror.c \
-	regexec.c \
-	regfree.c"
-
-TYPE=both
Index: trunk/minix/lib/regex/WHATSNEW
===================================================================
--- trunk/minix/lib/regex/WHATSNEW	(revision 9)
+++ 	(revision )
@@ -1,94 +1,0 @@
-# @(#)WHATSNEW	8.3 (Berkeley) 3/18/94
-
-New in alpha3.4:  The complex bug alluded to below has been fixed (in a
-slightly kludgey temporary way that may hurt efficiency a bit; this is
-another "get it out the door for 4.4" release).  The tests at the end of
-the tests file have accordingly been uncommented.  The primary sign of
-the bug was that something like a?b matching ab matched b rather than ab.
-(The bug was essentially specific to this exact situation, else it would
-have shown up earlier.)
-
-New in alpha3.3:  The definition of word boundaries has been altered
-slightly, to more closely match the usual programming notion that "_"
-is an alphabetic.  Stuff used for pre-ANSI systems is now in a subdir,
-and the makefile no longer alludes to it in mysterious ways.  The
-makefile has generally been cleaned up some.  Fixes have been made
-(again!) so that the regression test will run without -DREDEBUG, at
-the cost of weaker checking.  A workaround for a bug in some folks'
-<assert.h> has been added.  And some more things have been added to
-tests, including a couple right at the end which are commented out
-because the code currently flunks them (complex bug; fix coming).
-Plus the usual minor cleanup.
-
-New in alpha3.2:  Assorted bits of cleanup and portability improvement
-(the development base is now a BSDI system using GCC instead of an ancient
-Sun system, and the newer compiler exposed some glitches).  Fix for a
-serious bug that affected REs using many [] (including REG_ICASE REs
-because of the way they are implemented), *sometimes*, depending on
-memory-allocation patterns.  The header-file prototypes no longer name
-the parameters, avoiding possible name conflicts.  The possibility that
-some clot has defined CHAR_MIN as (say) `-128' instead of `(-128)' is
-now handled gracefully.  "uchar" is no longer used as an internal type
-name (too many people have the same idea).  Still the same old lousy
-performance, alas.
-
-New in alpha3.1:  Basically nothing, this release is just a bookkeeping
-convenience.  Stay tuned.
-
-New in alpha3.0:  Performance is no better, alas, but some fixes have been
-made and some functionality has been added.  (This is basically the "get
-it out the door in time for 4.4" release.)  One bug fix:  regfree() didn't
-free the main internal structure (how embarrassing).  It is now possible
-to put NULs in either the RE or the target string, using (resp.) a new
-REG_PEND flag and the old REG_STARTEND flag.  The REG_NOSPEC flag to
-regcomp() makes all characters ordinary, so you can match a literal
-string easily (this will become more useful when performance improves!).
-There are now primitives to match beginnings and ends of words, although
-the syntax is disgusting and so is the implementation.  The REG_ATOI
-debugging interface has changed a bit.  And there has been considerable
-internal cleanup of various kinds.
-
-New in alpha2.3:  Split change list out of README, and moved flags notes
-into Makefile.  Macro-ized the name of regex(7) in regex(3), since it has
-to change for 4.4BSD.  Cleanup work in engine.c, and some new regression
-tests to catch tricky cases thereof.
-
-New in alpha2.2:  Out-of-date manpages updated.  Regerror() acquires two
-small extensions -- REG_ITOA and REG_ATOI -- which avoid debugging kludges
-in my own test program and might be useful to others for similar purposes.
-The regression test will now compile (and run) without REDEBUG.  The
-BRE \$ bug is fixed.  Most uses of "uchar" are gone; it's all chars now.
-Char/uchar parameters are now written int/unsigned, to avoid possible
-portability problems with unpromoted parameters.  Some unsigned casts have
-been introduced to minimize portability problems with shifting into sign
-bits.
-
-New in alpha2.1:  Lots of little stuff, cleanup and fixes.  The one big
-thing is that regex.h is now generated, using mkh, rather than being
-supplied in the distribution; due to circularities in dependencies,
-you have to build regex.h explicitly by "make h".  The two known bugs
-have been fixed (and the regression test now checks for them), as has a
-problem with assertions not being suppressed in the absence of REDEBUG.
-No performance work yet.
-
-New in alpha2:  Backslash-anything is an ordinary character, not an
-error (except, of course, for the handful of backslashed metacharacters
-in BREs), which should reduce script breakage.  The regression test
-checks *where* null strings are supposed to match, and has generally
-been tightened up somewhat.  Small bug fixes in parameter passing (not
-harmful, but technically errors) and some other areas.  Debugging
-invoked by defining REDEBUG rather than not defining NDEBUG.
-
-New in alpha+3:  full prototyping for internal routines, using a little
-helper program, mkh, which extracts prototypes given in stylized comments.
-More minor cleanup.  Buglet fix:  it's CHAR_BIT, not CHAR_BITS.  Simple
-pre-screening of input when a literal string is known to be part of the
-RE; this does wonders for performance.
-
-New in alpha+2:  minor bits of cleanup.  Notably, the number "32" for the
-word width isn't hardwired into regexec.c any more, the public header
-file prototypes the functions if __STDC__ is defined, and some small typos
-in the manpages have been fixed.
-
-New in alpha+1:  improvements to the manual pages, and an important
-extension, the REG_STARTEND option to regexec().
Index: trunk/minix/lib/regex/cclass.h
===================================================================
--- trunk/minix/lib/regex/cclass.h	(revision 9)
+++ 	(revision )
@@ -1,70 +1,0 @@
-/*-
- * Copyright (c) 1992, 1993, 1994 Henry Spencer.
- * Copyright (c) 1992, 1993, 1994
- *	The Regents of the University of California.  All rights reserved.
- *
- * This code is derived from software contributed to Berkeley by
- * Henry Spencer.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- *    must display the following acknowledgement:
- *	This product includes software developed by the University of
- *	California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- *    may be used to endorse or promote products derived from this software
- *    without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- *	@(#)cclass.h	8.3 (Berkeley) 3/20/94
- */
-
-/* character-class table */
-static struct cclass {
-	char *name;
-	char *chars;
-	char *multis;
-} cclasses[] = {
-	"alnum",	"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz\
-0123456789",				"",
-	"alpha",	"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz",
-					"",
-	"blank",	" \t",		"",
-	"cntrl",	"\007\b\t\n\v\f\r\1\2\3\4\5\6\16\17\20\21\22\23\24\
-\25\26\27\30\31\32\33\34\35\36\37\177",	"",
-	"digit",	"0123456789",	"",
-	"graph",	"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz\
-0123456789!\"#$%&'()*+,-./:;<=>?@[\\]^_`{|}~",
-					"",
-	"lower",	"abcdefghijklmnopqrstuvwxyz",
-					"",
-	"print",	"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz\
-0123456789!\"#$%&'()*+,-./:;<=>?@[\\]^_`{|}~ ",
-					"",
-	"punct",	"!\"#$%&'()*+,-./:;<=>?@[\\]^_`{|}~",
-					"",
-	"space",	"\t\n\v\f\r ",	"",
-	"upper",	"ABCDEFGHIJKLMNOPQRSTUVWXYZ",
-					"",
-	"xdigit",	"0123456789ABCDEFabcdef",
-					"",
-	NULL,		0,		""
-};
Index: trunk/minix/lib/regex/cname.h
===================================================================
--- trunk/minix/lib/regex/cname.h	(revision 9)
+++ 	(revision )
@@ -1,141 +1,0 @@
-/*-
- * Copyright (c) 1992, 1993, 1994 Henry Spencer.
- * Copyright (c) 1992, 1993, 1994
- *	The Regents of the University of California.  All rights reserved.
- *
- * This code is derived from software contributed to Berkeley by
- * Henry Spencer.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- *    must display the following acknowledgement:
- *	This product includes software developed by the University of
- *	California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- *    may be used to endorse or promote products derived from this software
- *    without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- *	@(#)cname.h	8.3 (Berkeley) 3/20/94
- */
-
-/* character-name table */
-static struct cname {
-	char *name;
-	char code;
-} cnames[] = {
-	"NUL",	'\0',
-	"SOH",	'\001',
-	"STX",	'\002',
-	"ETX",	'\003',
-	"EOT",	'\004',
-	"ENQ",	'\005',
-	"ACK",	'\006',
-	"BEL",	'\007',
-	"alert",	'\007',
-	"BS",		'\010',
-	"backspace",	'\b',
-	"HT",		'\011',
-	"tab",		'\t',
-	"LF",		'\012',
-	"newline",	'\n',
-	"VT",		'\013',
-	"vertical-tab",	'\v',
-	"FF",		'\014',
-	"form-feed",	'\f',
-	"CR",		'\015',
-	"carriage-return",	'\r',
-	"SO",	'\016',
-	"SI",	'\017',
-	"DLE",	'\020',
-	"DC1",	'\021',
-	"DC2",	'\022',
-	"DC3",	'\023',
-	"DC4",	'\024',
-	"NAK",	'\025',
-	"SYN",	'\026',
-	"ETB",	'\027',
-	"CAN",	'\030',
-	"EM",	'\031',
-	"SUB",	'\032',
-	"ESC",	'\033',
-	"IS4",	'\034',
-	"FS",	'\034',
-	"IS3",	'\035',
-	"GS",	'\035',
-	"IS2",	'\036',
-	"RS",	'\036',
-	"IS1",	'\037',
-	"US",	'\037',
-	"space",		' ',
-	"exclamation-mark",	'!',
-	"quotation-mark",	'"',
-	"number-sign",		'#',
-	"dollar-sign",		'$',
-	"percent-sign",		'%',
-	"ampersand",		'&',
-	"apostrophe",		'\'',
-	"left-parenthesis",	'(',
-	"right-parenthesis",	')',
-	"asterisk",	'*',
-	"plus-sign",	'+',
-	"comma",	',',
-	"hyphen",	'-',
-	"hyphen-minus",	'-',
-	"period",	'.',
-	"full-stop",	'.',
-	"slash",	'/',
-	"solidus",	'/',
-	"zero",		'0',
-	"one",		'1',
-	"two",		'2',
-	"three",	'3',
-	"four",		'4',
-	"five",		'5',
-	"six",		'6',
-	"seven",	'7',
-	"eight",	'8',
-	"nine",		'9',
-	"colon",	':',
-	"semicolon",	';',
-	"less-than-sign",	'<',
-	"equals-sign",		'=',
-	"greater-than-sign",	'>',
-	"question-mark",	'?',
-	"commercial-at",	'@',
-	"left-square-bracket",	'[',
-	"backslash",		'\\',
-	"reverse-solidus",	'\\',
-	"right-square-bracket",	']',
-	"circumflex",		'^',
-	"circumflex-accent",	'^',
-	"underscore",		'_',
-	"low-line",		'_',
-	"grave-accent",		'`',
-	"left-brace",		'{',
-	"left-curly-bracket",	'{',
-	"vertical-line",	'|',
-	"right-brace",		'}',
-	"right-curly-bracket",	'}',
-	"tilde",		'~',
-	"DEL",	'\177',
-	NULL,	0,
-};
Index: trunk/minix/lib/regex/engine.c
===================================================================
--- trunk/minix/lib/regex/engine.c	(revision 9)
+++ 	(revision )
@@ -1,1091 +1,0 @@
-/*-
- * Copyright (c) 1992, 1993, 1994 Henry Spencer.
- * Copyright (c) 1992, 1993, 1994
- *	The Regents of the University of California.  All rights reserved.
- *
- * This code is derived from software contributed to Berkeley by
- * Henry Spencer.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- *    must display the following acknowledgement:
- *	This product includes software developed by the University of
- *	California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- *    may be used to endorse or promote products derived from this software
- *    without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- *	@(#)engine.c	8.5 (Berkeley) 3/20/94
- */
-
-/*
- * The matching engine and friends.  This file is #included by regexec.c
- * after suitable #defines of a variety of macros used herein, so that
- * different state representations can be used without duplicating masses
- * of code.
- */
-
-#ifdef SNAMES
-#define	matcher	smatcher
-#define	fast	sfast
-#define	slow	sslow
-#define	dissect	sdissect
-#define	backref	sbackref
-#define	step	sstep
-#define	print	sprint
-#define	at	sat
-#define	match	smat
-#endif
-#ifdef LNAMES
-#define	matcher	lmatcher
-#define	fast	lfast
-#define	slow	lslow
-#define	dissect	ldissect
-#define	backref	lbackref
-#define	step	lstep
-#define	print	lprint
-#define	at	lat
-#define	match	lmat
-#endif
-
-/* another structure passed up and down to avoid zillions of parameters */
-struct match {
-	struct re_guts *g;
-	int eflags;
-	regmatch_t *pmatch;	/* [nsub+1] (0 element unused) */
-	char *offp;		/* offsets work from here */
-	char *beginp;		/* start of string -- virtual NUL precedes */
-	char *endp;		/* end of string -- virtual NUL here */
-	char *coldp;		/* can be no match starting before here */
-	char **lastpos;		/* [nplus+1] */
-	STATEVARS;
-	states st;		/* current states */
-	states fresh;		/* states for a fresh start */
-	states tmp;		/* temporary */
-	states empty;		/* empty set of states */
-};
-
-/* ========= begin header generated by ./mkh ========= */
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/* === engine.c === */
-static int matcher(struct re_guts *g, char *string, size_t nmatch, regmatch_t pmatch[], int eflags);
-static char *dissect(struct match *m, char *start, char *stop, sopno startst, sopno stopst);
-static char *backref(struct match *m, char *start, char *stop, sopno startst, sopno stopst, sopno lev);
-static char *fast(struct match *m, char *start, char *stop, sopno startst, sopno stopst);
-static char *slow(struct match *m, char *start, char *stop, sopno startst, sopno stopst);
-static states step(struct re_guts *g, sopno start, sopno stop, states bef, int ch, states aft);
-#define	BOL	(OUT+1)
-#define	EOL	(BOL+1)
-#define	BOLEOL	(BOL+2)
-#define	NOTHING	(BOL+3)
-#define	BOW	(BOL+4)
-#define	EOW	(BOL+5)
-#define	CODEMAX	(BOL+5)		/* highest code used */
-#define	NONCHAR(c)	((c) > CHAR_MAX)
-#define	NNONCHAR	(CODEMAX-CHAR_MAX)
-#ifdef REDEBUG
-static void print(struct match *m, char *caption, states st, int ch, FILE *d);
-#endif
-#ifdef REDEBUG
-static void at(struct match *m, char *title, char *start, char *stop, sopno startst, sopno stopst);
-#endif
-#ifdef REDEBUG
-static char *pchar(int ch);
-#endif
-
-#ifdef __cplusplus
-}
-#endif
-/* ========= end header generated by ./mkh ========= */
-
-#ifdef REDEBUG
-#define	SP(t, s, c)	print(m, t, s, c, stdout)
-#define	AT(t, p1, p2, s1, s2)	at(m, t, p1, p2, s1, s2)
-#define	NOTE(str)	{ if (m->eflags&REG_TRACE) printf("=%s\n", (str)); }
-#else
-#define	SP(t, s, c)	/* nothing */
-#define	AT(t, p1, p2, s1, s2)	/* nothing */
-#define	NOTE(s)	/* nothing */
-#endif
-
-/*
- - matcher - the actual matching engine
- == static int matcher(register struct re_guts *g, char *string, \
- ==	size_t nmatch, regmatch_t pmatch[], int eflags);
- */
-static int			/* 0 success, REG_NOMATCH failure */
-matcher(g, string, nmatch, pmatch, eflags)
-register struct re_guts *g;
-char *string;
-size_t nmatch;
-regmatch_t pmatch[];
-int eflags;
-{
-	register char *endp;
-	register int i;
-	struct match mv;
-	register struct match *m = &mv;
-	register char *dp;
-	const register sopno gf = g->firststate+1;	/* +1 for OEND */
-	const register sopno gl = g->laststate;
-	char *start;
-	char *stop;
-
-	/* simplify the situation where possible */
-	if (g->cflags&REG_NOSUB)
-		nmatch = 0;
-	if (eflags&REG_STARTEND) {
-		start = string + pmatch[0].rm_so;
-		stop = string + pmatch[0].rm_eo;
-	} else {
-		start = string;
-		stop = start + strlen(start);
-	}
-	if (stop < start)
-		return(REG_INVARG);
-
-	/* prescreening; this does wonders for this rather slow code */
-	if (g->must != NULL) {
-		for (dp = start; dp < stop; dp++)
-			if (*dp == g->must[0] && stop - dp >= g->mlen &&
-				memcmp(dp, g->must, (size_t)g->mlen) == 0)
-				break;
-		if (dp == stop)		/* we didn't find g->must */
-			return(REG_NOMATCH);
-	}
-
-	/* match struct setup */
-	m->g = g;
-	m->eflags = eflags;
-	m->pmatch = NULL;
-	m->lastpos = NULL;
-	m->offp = string;
-	m->beginp = start;
-	m->endp = stop;
-	STATESETUP(m, 4);
-	SETUP(m->st);
-	SETUP(m->fresh);
-	SETUP(m->tmp);
-	SETUP(m->empty);
-	CLEAR(m->empty);
-
-	/* this loop does only one repetition except for backrefs */
-	for (;;) {
-		endp = fast(m, start, stop, gf, gl);
-		if (endp == NULL) {		/* a miss */
-			STATETEARDOWN(m);
-			return(REG_NOMATCH);
-		}
-		if (nmatch == 0 && !g->backrefs)
-			break;		/* no further info needed */
-
-		/* where? */
-		assert(m->coldp != NULL);
-		for (;;) {
-			NOTE("finding start");
-			endp = slow(m, m->coldp, stop, gf, gl);
-			if (endp != NULL)
-				break;
-			assert(m->coldp < m->endp);
-			m->coldp++;
-		}
-		if (nmatch == 1 && !g->backrefs)
-			break;		/* no further info needed */
-
-		/* oh my, he wants the subexpressions... */
-		if (m->pmatch == NULL)
-			m->pmatch = (regmatch_t *)malloc((m->g->nsub + 1) *
-							sizeof(regmatch_t));
-		if (m->pmatch == NULL) {
-			STATETEARDOWN(m);
-			return(REG_ESPACE);
-		}
-		for (i = 1; i <= m->g->nsub; i++)
-			m->pmatch[i].rm_so = m->pmatch[i].rm_eo = -1;
-		if (!g->backrefs && !(m->eflags&REG_BACKR)) {
-			NOTE("dissecting");
-			dp = dissect(m, m->coldp, endp, gf, gl);
-		} else {
-			if (g->nplus > 0 && m->lastpos == NULL)
-				m->lastpos = (char **)malloc((g->nplus+1) *
-							sizeof(char *));
-			if (g->nplus > 0 && m->lastpos == NULL) {
-				free(m->pmatch);
-				STATETEARDOWN(m);
-				return(REG_ESPACE);
-			}
-			NOTE("backref dissect");
-			dp = backref(m, m->coldp, endp, gf, gl, (sopno)0);
-		}
-		if (dp != NULL)
-			break;
-
-		/* uh-oh... we couldn't find a subexpression-level match */
-		assert(g->backrefs);	/* must be back references doing it */
-		assert(g->nplus == 0 || m->lastpos != NULL);
-		for (;;) {
-			if (dp != NULL || endp <= m->coldp)
-				break;		/* defeat */
-			NOTE("backoff");
-			endp = slow(m, m->coldp, endp-1, gf, gl);
-			if (endp == NULL)
-				break;		/* defeat */
-			/* try it on a shorter possibility */
-#ifndef NDEBUG
-			for (i = 1; i <= m->g->nsub; i++) {
-				assert(m->pmatch[i].rm_so == -1);
-				assert(m->pmatch[i].rm_eo == -1);
-			}
-#endif
-			NOTE("backoff dissect");
-			dp = backref(m, m->coldp, endp, gf, gl, (sopno)0);
-		}
-		assert(dp == NULL || dp == endp);
-		if (dp != NULL)		/* found a shorter one */
-			break;
-
-		/* despite initial appearances, there is no match here */
-		NOTE("false alarm");
-		start = m->coldp + 1;	/* recycle starting later */
-		assert(start <= stop);
-	}
-
-	/* fill in the details if requested */
-	if (nmatch > 0) {
-		pmatch[0].rm_so = m->coldp - m->offp;
-		pmatch[0].rm_eo = endp - m->offp;
-	}
-	if (nmatch > 1) {
-		assert(m->pmatch != NULL);
-		for (i = 1; i < nmatch; i++)
-			if (i <= m->g->nsub)
-				pmatch[i] = m->pmatch[i];
-			else {
-				pmatch[i].rm_so = -1;
-				pmatch[i].rm_eo = -1;
-			}
-	}
-
-	if (m->pmatch != NULL)
-		free((char *)m->pmatch);
-	if (m->lastpos != NULL)
-		free((char *)m->lastpos);
-	STATETEARDOWN(m);
-	return(0);
-}
-
-/*
- - dissect - figure out what matched what, no back references
- == static char *dissect(register struct match *m, char *start, \
- ==	char *stop, sopno startst, sopno stopst);
- */
-static char *			/* == stop (success) always */
-dissect(m, start, stop, startst, stopst)
-register struct match *m;
-char *start;
-char *stop;
-sopno startst;
-sopno stopst;
-{
-	register int i;
-	register sopno ss;	/* start sop of current subRE */
-	register sopno es;	/* end sop of current subRE */
-	register char *sp;	/* start of string matched by it */
-	register char *stp;	/* string matched by it cannot pass here */
-	register char *rest;	/* start of rest of string */
-	register char *tail;	/* string unmatched by rest of RE */
-	register sopno ssub;	/* start sop of subsubRE */
-	register sopno esub;	/* end sop of subsubRE */
-	register char *ssp;	/* start of string matched by subsubRE */
-	register char *sep;	/* end of string matched by subsubRE */
-	register char *oldssp;	/* previous ssp */
-	register char *dp;
-
-	AT("diss", start, stop, startst, stopst);
-	sp = start;
-	for (ss = startst; ss < stopst; ss = es) {
-		/* identify end of subRE */
-		es = ss;
-		switch (OP(m->g->strip[es])) {
-		case OPLUS_:
-		case OQUEST_:
-			es += OPND(m->g->strip[es]);
-			break;
-		case OCH_:
-			while (OP(m->g->strip[es]) != O_CH)
-				es += OPND(m->g->strip[es]);
-			break;
-		}
-		es++;
-
-		/* figure out what it matched */
-		switch (OP(m->g->strip[ss])) {
-		case OEND:
-			assert(nope);
-			break;
-		case OCHAR:
-			sp++;
-			break;
-		case OBOL:
-		case OEOL:
-		case OBOW:
-		case OEOW:
-			break;
-		case OANY:
-		case OANYOF:
-			sp++;
-			break;
-		case OBACK_:
-		case O_BACK:
-			assert(nope);
-			break;
-		/* cases where length of match is hard to find */
-		case OQUEST_:
-			stp = stop;
-			for (;;) {
-				/* how long could this one be? */
-				rest = slow(m, sp, stp, ss, es);
-				assert(rest != NULL);	/* it did match */
-				/* could the rest match the rest? */
-				tail = slow(m, rest, stop, es, stopst);
-				if (tail == stop)
-					break;		/* yes! */
-				/* no -- try a shorter match for this one */
-				stp = rest - 1;
-				assert(stp >= sp);	/* it did work */
-			}
-			ssub = ss + 1;
-			esub = es - 1;
-			/* did innards match? */
-			if (slow(m, sp, rest, ssub, esub) != NULL) {
-				dp = dissect(m, sp, rest, ssub, esub);
-				assert(dp == rest);
-			} else		/* no */
-				assert(sp == rest);
-			sp = rest;
-			break;
-		case OPLUS_:
-			stp = stop;
-			for (;;) {
-				/* how long could this one be? */
-				rest = slow(m, sp, stp, ss, es);
-				assert(rest != NULL);	/* it did match */
-				/* could the rest match the rest? */
-				tail = slow(m, rest, stop, es, stopst);
-				if (tail == stop)
-					break;		/* yes! */
-				/* no -- try a shorter match for this one */
-				stp = rest - 1;
-				assert(stp >= sp);	/* it did work */
-			}
-			ssub = ss + 1;
-			esub = es - 1;
-			ssp = sp;
-			oldssp = ssp;
-			for (;;) {	/* find last match of innards */
-				sep = slow(m, ssp, rest, ssub, esub);
-				if (sep == NULL || sep == ssp)
-					break;	/* failed or matched null */
-				oldssp = ssp;	/* on to next try */
-				ssp = sep;
-			}
-			if (sep == NULL) {
-				/* last successful match */
-				sep = ssp;
-				ssp = oldssp;
-			}
-			assert(sep == rest);	/* must exhaust substring */
-			assert(slow(m, ssp, sep, ssub, esub) == rest);
-			dp = dissect(m, ssp, sep, ssub, esub);
-			assert(dp == sep);
-			sp = rest;
-			break;
-		case OCH_:
-			stp = stop;
-			for (;;) {
-				/* how long could this one be? */
-				rest = slow(m, sp, stp, ss, es);
-				assert(rest != NULL);	/* it did match */
-				/* could the rest match the rest? */
-				tail = slow(m, rest, stop, es, stopst);
-				if (tail == stop)
-					break;		/* yes! */
-				/* no -- try a shorter match for this one */
-				stp = rest - 1;
-				assert(stp >= sp);	/* it did work */
-			}
-			ssub = ss + 1;
-			esub = ss + OPND(m->g->strip[ss]) - 1;
-			assert(OP(m->g->strip[esub]) == OOR1);
-			for (;;) {	/* find first matching branch */
-				if (slow(m, sp, rest, ssub, esub) == rest)
-					break;	/* it matched all of it */
-				/* that one missed, try next one */
-				assert(OP(m->g->strip[esub]) == OOR1);
-				esub++;
-				assert(OP(m->g->strip[esub]) == OOR2);
-				ssub = esub + 1;
-				esub += OPND(m->g->strip[esub]);
-				if (OP(m->g->strip[esub]) == OOR2)
-					esub--;
-				else
-					assert(OP(m->g->strip[esub]) == O_CH);
-			}
-			dp = dissect(m, sp, rest, ssub, esub);
-			assert(dp == rest);
-			sp = rest;
-			break;
-		case O_PLUS:
-		case O_QUEST:
-		case OOR1:
-		case OOR2:
-		case O_CH:
-			assert(nope);
-			break;
-		case OLPAREN:
-			i = OPND(m->g->strip[ss]);
-			assert(0 < i && i <= m->g->nsub);
-			m->pmatch[i].rm_so = sp - m->offp;
-			break;
-		case ORPAREN:
-			i = OPND(m->g->strip[ss]);
-			assert(0 < i && i <= m->g->nsub);
-			m->pmatch[i].rm_eo = sp - m->offp;
-			break;
-		default:		/* uh oh */
-			assert(nope);
-			break;
-		}
-	}
-
-	assert(sp == stop);
-	return(sp);
-}
-
-/*
- - backref - figure out what matched what, figuring in back references
- == static char *backref(register struct match *m, char *start, \
- ==	char *stop, sopno startst, sopno stopst, sopno lev);
- */
-static char *			/* == stop (success) or NULL (failure) */
-backref(m, start, stop, startst, stopst, lev)
-register struct match *m;
-char *start;
-char *stop;
-sopno startst;
-sopno stopst;
-sopno lev;			/* PLUS nesting level */
-{
-	register int i;
-	register sopno ss;	/* start sop of current subRE */
-	register char *sp;	/* start of string matched by it */
-	register sopno ssub;	/* start sop of subsubRE */
-	register sopno esub;	/* end sop of subsubRE */
-	register char *ssp;	/* start of string matched by subsubRE */
-	register char *dp;
-	register size_t len;
-	register int hard;
-	register sop s;
-	register regoff_t offsave;
-	register cset *cs;
-
-	AT("back", start, stop, startst, stopst);
-	sp = start;
-
-	/* get as far as we can with easy stuff */
-	hard = 0;
-	for (ss = startst; !hard && ss < stopst; ss++)
-		switch (OP(s = m->g->strip[ss])) {
-		case OCHAR:
-			if (sp == stop || *sp++ != (char)OPND(s))
-				return(NULL);
-			break;
-		case OANY:
-			if (sp == stop)
-				return(NULL);
-			sp++;
-			break;
-		case OANYOF:
-			cs = &m->g->sets[OPND(s)];
-			if (sp == stop || !CHIN(cs, *sp++))
-				return(NULL);
-			break;
-		case OBOL:
-			if ( (sp == m->beginp && !(m->eflags&REG_NOTBOL)) ||
-					(sp < m->endp && *(sp-1) == '\n' &&
-						(m->g->cflags&REG_NEWLINE)) )
-				{ /* yes */ }
-			else
-				return(NULL);
-			break;
-		case OEOL:
-			if ( (sp == m->endp && !(m->eflags&REG_NOTEOL)) ||
-					(sp < m->endp && *sp == '\n' &&
-						(m->g->cflags&REG_NEWLINE)) )
-				{ /* yes */ }
-			else
-				return(NULL);
-			break;
-		case OBOW:
-			if (( (sp == m->beginp && !(m->eflags&REG_NOTBOL)) ||
-					(sp < m->endp && *(sp-1) == '\n' &&
-						(m->g->cflags&REG_NEWLINE)) ||
-					(sp > m->beginp &&
-							!ISWORD(*(sp-1))) ) &&
-					(sp < m->endp && ISWORD(*sp)) )
-				{ /* yes */ }
-			else
-				return(NULL);
-			break;
-		case OEOW:
-			if (( (sp == m->endp && !(m->eflags&REG_NOTEOL)) ||
-					(sp < m->endp && *sp == '\n' &&
-						(m->g->cflags&REG_NEWLINE)) ||
-					(sp < m->endp && !ISWORD(*sp)) ) &&
-					(sp > m->beginp && ISWORD(*(sp-1))) )
-				{ /* yes */ }
-			else
-				return(NULL);
-			break;
-		case O_QUEST:
-			break;
-		case OOR1:	/* matches null but needs to skip */
-			ss++;
-			s = m->g->strip[ss];
-			do {
-				assert(OP(s) == OOR2);
-				ss += OPND(s);
-			} while (OP(s = m->g->strip[ss]) != O_CH);
-			/* note that the ss++ gets us past the O_CH */
-			break;
-		default:	/* have to make a choice */
-			hard = 1;
-			break;
-		}
-	if (!hard) {		/* that was it! */
-		if (sp != stop)
-			return(NULL);
-		return(sp);
-	}
-	ss--;			/* adjust for the for's final increment */
-
-	/* the hard stuff */
-	AT("hard", sp, stop, ss, stopst);
-	s = m->g->strip[ss];
-	switch (OP(s)) {
-	case OBACK_:		/* the vilest depths */
-		i = OPND(s);
-		assert(0 < i && i <= m->g->nsub);
-		if (m->pmatch[i].rm_eo == -1)
-			return(NULL);
-		assert(m->pmatch[i].rm_so != -1);
-		len = m->pmatch[i].rm_eo - m->pmatch[i].rm_so;
-		assert(stop - m->beginp >= len);
-		if (sp > stop - len)
-			return(NULL);	/* not enough left to match */
-		ssp = m->offp + m->pmatch[i].rm_so;
-		if (memcmp(sp, ssp, len) != 0)
-			return(NULL);
-		while (m->g->strip[ss] != SOP(O_BACK, i))
-			ss++;
-		return(backref(m, sp+len, stop, ss+1, stopst, lev));
-		break;
-	case OQUEST_:		/* to null or not */
-		dp = backref(m, sp, stop, ss+1, stopst, lev);
-		if (dp != NULL)
-			return(dp);	/* not */
-		return(backref(m, sp, stop, ss+OPND(s)+1, stopst, lev));
-		break;
-	case OPLUS_:
-		assert(m->lastpos != NULL);
-		assert(lev+1 <= m->g->nplus);
-		m->lastpos[lev+1] = sp;
-		return(backref(m, sp, stop, ss+1, stopst, lev+1));
-		break;
-	case O_PLUS:
-		if (sp == m->lastpos[lev])	/* last pass matched null */
-			return(backref(m, sp, stop, ss+1, stopst, lev-1));
-		/* try another pass */
-		m->lastpos[lev] = sp;
-		dp = backref(m, sp, stop, ss-OPND(s)+1, stopst, lev);
-		if (dp == NULL)
-			return(backref(m, sp, stop, ss+1, stopst, lev-1));
-		else
-			return(dp);
-		break;
-	case OCH_:		/* find the right one, if any */
-		ssub = ss + 1;
-		esub = ss + OPND(s) - 1;
-		assert(OP(m->g->strip[esub]) == OOR1);
-		for (;;) {	/* find first matching branch */
-			dp = backref(m, sp, stop, ssub, esub, lev);
-			if (dp != NULL)
-				return(dp);
-			/* that one missed, try next one */
-			if (OP(m->g->strip[esub]) == O_CH)
-				return(NULL);	/* there is none */
-			esub++;
-			assert(OP(m->g->strip[esub]) == OOR2);
-			ssub = esub + 1;
-			esub += OPND(m->g->strip[esub]);
-			if (OP(m->g->strip[esub]) == OOR2)
-				esub--;
-			else
-				assert(OP(m->g->strip[esub]) == O_CH);
-		}
-		break;
-	case OLPAREN:		/* must undo assignment if rest fails */
-		i = OPND(s);
-		assert(0 < i && i <= m->g->nsub);
-		offsave = m->pmatch[i].rm_so;
-		m->pmatch[i].rm_so = sp - m->offp;
-		dp = backref(m, sp, stop, ss+1, stopst, lev);
-		if (dp != NULL)
-			return(dp);
-		m->pmatch[i].rm_so = offsave;
-		return(NULL);
-		break;
-	case ORPAREN:		/* must undo assignment if rest fails */
-		i = OPND(s);
-		assert(0 < i && i <= m->g->nsub);
-		offsave = m->pmatch[i].rm_eo;
-		m->pmatch[i].rm_eo = sp - m->offp;
-		dp = backref(m, sp, stop, ss+1, stopst, lev);
-		if (dp != NULL)
-			return(dp);
-		m->pmatch[i].rm_eo = offsave;
-		return(NULL);
-		break;
-	default:		/* uh oh */
-		assert(nope);
-		break;
-	}
-
-	/* "can't happen" */
-	assert(nope);
-	/* NOTREACHED */
-}
-
-/*
- - fast - step through the string at top speed
- == static char *fast(register struct match *m, char *start, \
- ==	char *stop, sopno startst, sopno stopst);
- */
-static char *			/* where tentative match ended, or NULL */
-fast(m, start, stop, startst, stopst)
-register struct match *m;
-char *start;
-char *stop;
-sopno startst;
-sopno stopst;
-{
-	register states st = m->st;
-	register states fresh = m->fresh;
-	register states tmp = m->tmp;
-	register char *p = start;
-	register int c = (start == m->beginp) ? OUT : *(start-1);
-	register int lastc;	/* previous c */
-	register int flagch;
-	register int i;
-	register char *coldp;	/* last p after which no match was underway */
-
-	CLEAR(st);
-	SET1(st, startst);
-	st = step(m->g, startst, stopst, st, NOTHING, st);
-	ASSIGN(fresh, st);
-	SP("start", st, *p);
-	coldp = NULL;
-	for (;;) {
-		/* next character */
-		lastc = c;
-		c = (p == m->endp) ? OUT : *p;
-		if (EQ(st, fresh))
-			coldp = p;
-
-		/* is there an EOL and/or BOL between lastc and c? */
-		flagch = '\0';
-		i = 0;
-		if ( (lastc == '\n' && m->g->cflags&REG_NEWLINE) ||
-				(lastc == OUT && !(m->eflags&REG_NOTBOL)) ) {
-			flagch = BOL;
-			i = m->g->nbol;
-		}
-		if ( (c == '\n' && m->g->cflags&REG_NEWLINE) ||
-				(c == OUT && !(m->eflags&REG_NOTEOL)) ) {
-			flagch = (flagch == BOL) ? BOLEOL : EOL;
-			i += m->g->neol;
-		}
-		if (i != 0) {
-			for (; i > 0; i--)
-				st = step(m->g, startst, stopst, st, flagch, st);
-			SP("boleol", st, c);
-		}
-
-		/* how about a word boundary? */
-		if ( (flagch == BOL || (lastc != OUT && !ISWORD(lastc))) &&
-					(c != OUT && ISWORD(c)) ) {
-			flagch = BOW;
-		}
-		if ( (lastc != OUT && ISWORD(lastc)) &&
-				(flagch == EOL || (c != OUT && !ISWORD(c))) ) {
-			flagch = EOW;
-		}
-		if (flagch == BOW || flagch == EOW) {
-			st = step(m->g, startst, stopst, st, flagch, st);
-			SP("boweow", st, c);
-		}
-
-		/* are we done? */
-		if (ISSET(st, stopst) || p == stop)
-			break;		/* NOTE BREAK OUT */
-
-		/* no, we must deal with this character */
-		ASSIGN(tmp, st);
-		ASSIGN(st, fresh);
-		assert(c != OUT);
-		st = step(m->g, startst, stopst, tmp, c, st);
-		SP("aft", st, c);
-		assert(EQ(step(m->g, startst, stopst, st, NOTHING, st), st));
-		p++;
-	}
-
-	assert(coldp != NULL);
-	m->coldp = coldp;
-	if (ISSET(st, stopst))
-		return(p+1);
-	else
-		return(NULL);
-}
-
-/*
- - slow - step through the string more deliberately
- == static char *slow(register struct match *m, char *start, \
- ==	char *stop, sopno startst, sopno stopst);
- */
-static char *			/* where it ended */
-slow(m, start, stop, startst, stopst)
-register struct match *m;
-char *start;
-char *stop;
-sopno startst;
-sopno stopst;
-{
-	register states st = m->st;
-	register states empty = m->empty;
-	register states tmp = m->tmp;
-	register char *p = start;
-	register int c = (start == m->beginp) ? OUT : *(start-1);
-	register int lastc;	/* previous c */
-	register int flagch;
-	register int i;
-	register char *matchp;	/* last p at which a match ended */
-
-	AT("slow", start, stop, startst, stopst);
-	CLEAR(st);
-	SET1(st, startst);
-	SP("sstart", st, *p);
-	st = step(m->g, startst, stopst, st, NOTHING, st);
-	matchp = NULL;
-	for (;;) {
-		/* next character */
-		lastc = c;
-		c = (p == m->endp) ? OUT : *p;
-
-		/* is there an EOL and/or BOL between lastc and c? */
-		flagch = '\0';
-		i = 0;
-		if ( (lastc == '\n' && m->g->cflags&REG_NEWLINE) ||
-				(lastc == OUT && !(m->eflags&REG_NOTBOL)) ) {
-			flagch = BOL;
-			i = m->g->nbol;
-		}
-		if ( (c == '\n' && m->g->cflags&REG_NEWLINE) ||
-				(c == OUT && !(m->eflags&REG_NOTEOL)) ) {
-			flagch = (flagch == BOL) ? BOLEOL : EOL;
-			i += m->g->neol;
-		}
-		if (i != 0) {
-			for (; i > 0; i--)
-				st = step(m->g, startst, stopst, st, flagch, st);
-			SP("sboleol", st, c);
-		}
-
-		/* how about a word boundary? */
-		if ( (flagch == BOL || (lastc != OUT && !ISWORD(lastc))) &&
-					(c != OUT && ISWORD(c)) ) {
-			flagch = BOW;
-		}
-		if ( (lastc != OUT && ISWORD(lastc)) &&
-				(flagch == EOL || (c != OUT && !ISWORD(c))) ) {
-			flagch = EOW;
-		}
-		if (flagch == BOW || flagch == EOW) {
-			st = step(m->g, startst, stopst, st, flagch, st);
-			SP("sboweow", st, c);
-		}
-
-		/* are we done? */
-		if (ISSET(st, stopst))
-			matchp = p;
-		if (EQ(st, empty) || p == stop)
-			break;		/* NOTE BREAK OUT */
-
-		/* no, we must deal with this character */
-		ASSIGN(tmp, st);
-		ASSIGN(st, empty);
-		assert(c != OUT);
-		st = step(m->g, startst, stopst, tmp, c, st);
-		SP("saft", st, c);
-		assert(EQ(step(m->g, startst, stopst, st, NOTHING, st), st));
-		p++;
-	}
-
-	return(matchp);
-}
-
-
-/*
- - step - map set of states reachable before char to set reachable after
- == static states step(register struct re_guts *g, sopno start, sopno stop, \
- ==	register states bef, int ch, register states aft);
- == #define	BOL	(OUT+1)
- == #define	EOL	(BOL+1)
- == #define	BOLEOL	(BOL+2)
- == #define	NOTHING	(BOL+3)
- == #define	BOW	(BOL+4)
- == #define	EOW	(BOL+5)
- == #define	CODEMAX	(BOL+5)		// highest code used
- == #define	NONCHAR(c)	((c) > CHAR_MAX)
- == #define	NNONCHAR	(CODEMAX-CHAR_MAX)
- */
-static states
-step(g, start, stop, bef, ch, aft)
-register struct re_guts *g;
-sopno start;			/* start state within strip */
-sopno stop;			/* state after stop state within strip */
-register states bef;		/* states reachable before */
-int ch;				/* character or NONCHAR code */
-register states aft;		/* states already known reachable after */
-{
-	register cset *cs;
-	register sop s;
-	register sopno pc;
-	register onestate here;		/* note, macros know this name */
-	register sopno look;
-	register int i;
-
-	for (pc = start, INIT(here, pc); pc != stop; pc++, INC(here)) {
-		s = g->strip[pc];
-		switch (OP(s)) {
-		case OEND:
-			assert(pc == stop-1);
-			break;
-		case OCHAR:
-			/* only characters can match */
-			assert(!NONCHAR(ch) || ch != (char)OPND(s));
-			if (ch == (char)OPND(s))
-				FWD(aft, bef, 1);
-			break;
-		case OBOL:
-			if (ch == BOL || ch == BOLEOL)
-				FWD(aft, bef, 1);
-			break;
-		case OEOL:
-			if (ch == EOL || ch == BOLEOL)
-				FWD(aft, bef, 1);
-			break;
-		case OBOW:
-			if (ch == BOW)
-				FWD(aft, bef, 1);
-			break;
-		case OEOW:
-			if (ch == EOW)
-				FWD(aft, bef, 1);
-			break;
-		case OANY:
-			if (!NONCHAR(ch))
-				FWD(aft, bef, 1);
-			break;
-		case OANYOF:
-			cs = &g->sets[OPND(s)];
-			if (!NONCHAR(ch) && CHIN(cs, ch))
-				FWD(aft, bef, 1);
-			break;
-		case OBACK_:		/* ignored here */
-		case O_BACK:
-			FWD(aft, aft, 1);
-			break;
-		case OPLUS_:		/* forward, this is just an empty */
-			FWD(aft, aft, 1);
-			break;
-		case O_PLUS:		/* both forward and back */
-			FWD(aft, aft, 1);
-			i = ISSETBACK(aft, OPND(s));
-			BACK(aft, aft, OPND(s));
-			if (!i && ISSETBACK(aft, OPND(s))) {
-				/* oho, must reconsider loop body */
-				pc -= OPND(s) + 1;
-				INIT(here, pc);
-			}
-			break;
-		case OQUEST_:		/* two branches, both forward */
-			FWD(aft, aft, 1);
-			FWD(aft, aft, OPND(s));
-			break;
-		case O_QUEST:		/* just an empty */
-			FWD(aft, aft, 1);
-			break;
-		case OLPAREN:		/* not significant here */
-		case ORPAREN:
-			FWD(aft, aft, 1);
-			break;
-		case OCH_:		/* mark the first two branches */
-			FWD(aft, aft, 1);
-			assert(OP(g->strip[pc+OPND(s)]) == OOR2);
-			FWD(aft, aft, OPND(s));
-			break;
-		case OOR1:		/* done a branch, find the O_CH */
-			if (ISSTATEIN(aft, here)) {
-				for (look = 1;
-						OP(s = g->strip[pc+look]) != O_CH;
-						look += OPND(s))
-					assert(OP(s) == OOR2);
-				FWD(aft, aft, look);
-			}
-			break;
-		case OOR2:		/* propagate OCH_'s marking */
-			FWD(aft, aft, 1);
-			if (OP(g->strip[pc+OPND(s)]) != O_CH) {
-				assert(OP(g->strip[pc+OPND(s)]) == OOR2);
-				FWD(aft, aft, OPND(s));
-			}
-			break;
-		case O_CH:		/* just empty */
-			FWD(aft, aft, 1);
-			break;
-		default:		/* ooooops... */
-			assert(nope);
-			break;
-		}
-	}
-
-	return(aft);
-}
-
-#ifdef REDEBUG
-/*
- - print - print a set of states
- == #ifdef REDEBUG
- == static void print(struct match *m, char *caption, states st, \
- ==	int ch, FILE *d);
- == #endif
- */
-static void
-print(m, caption, st, ch, d)
-struct match *m;
-char *caption;
-states st;
-int ch;
-FILE *d;
-{
-	register struct re_guts *g = m->g;
-	register int i;
-	register int first = 1;
-
-	if (!(m->eflags&REG_TRACE))
-		return;
-
-	fprintf(d, "%s", caption);
-	if (ch != '\0')
-		fprintf(d, " %s", pchar(ch));
-	for (i = 0; i < g->nstates; i++)
-		if (ISSET(st, i)) {
-			fprintf(d, "%s%d", (first) ? "\t" : ", ", i);
-			first = 0;
-		}
-	fprintf(d, "\n");
-}
-
-/* 
- - at - print current situation
- == #ifdef REDEBUG
- == static void at(struct match *m, char *title, char *start, char *stop, \
- ==						sopno startst, sopno stopst);
- == #endif
- */
-static void
-at(m, title, start, stop, startst, stopst)
-struct match *m;
-char *title;
-char *start;
-char *stop;
-sopno startst;
-sopno stopst;
-{
-	if (!(m->eflags&REG_TRACE))
-		return;
-
-	printf("%s %s-", title, pchar(*start));
-	printf("%s ", pchar(*stop));
-	printf("%ld-%ld\n", (long)startst, (long)stopst);
-}
-
-#ifndef PCHARDONE
-#define	PCHARDONE	/* never again */
-/*
- - pchar - make a character printable
- == #ifdef REDEBUG
- == static char *pchar(int ch);
- == #endif
- *
- * Is this identical to regchar() over in debug.c?  Well, yes.  But a
- * duplicate here avoids having a debugging-capable regexec.o tied to
- * a matching debug.o, and this is convenient.  It all disappears in
- * the non-debug compilation anyway, so it doesn't matter much.
- */
-static char *			/* -> representation */
-pchar(ch)
-int ch;
-{
-	static char pbuf[10];
-
-	if (isprint(ch) || ch == ' ')
-		sprintf(pbuf, "%c", ch);
-	else
-		sprintf(pbuf, "\\%o", ch);
-	return(pbuf);
-}
-#endif
-#endif
-
-#undef	matcher
-#undef	fast
-#undef	slow
-#undef	dissect
-#undef	backref
-#undef	step
-#undef	print
-#undef	at
-#undef	match
Index: trunk/minix/lib/regex/re_format.7
===================================================================
--- trunk/minix/lib/regex/re_format.7	(revision 9)
+++ 	(revision )
@@ -1,269 +1,0 @@
-.\" Copyright (c) 1992, 1993, 1994 Henry Spencer.
-.\" Copyright (c) 1992, 1993, 1994
-.\"	The Regents of the University of California.  All rights reserved.
-.\"
-.\" This code is derived from software contributed to Berkeley by
-.\" Henry Spencer.
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\"    notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\"    notice, this list of conditions and the following disclaimer in the
-.\"    documentation and/or other materials provided with the distribution.
-.\" 3. All advertising materials mentioning features or use of this software
-.\"    must display the following acknowledgement:
-.\"	This product includes software developed by the University of
-.\"	California, Berkeley and its contributors.
-.\" 4. Neither the name of the University nor the names of its contributors
-.\"    may be used to endorse or promote products derived from this software
-.\"    without specific prior written permission.
-.\"
-.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
-.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-.\" ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
-.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-.\" SUCH DAMAGE.
-.\"
-.\"	@(#)re_format.7	8.3 (Berkeley) 3/20/94
-.\"
-.TH RE_FORMAT 7 "March 20, 1994"
-.SH NAME
-re_format \- POSIX 1003.2 regular expressions
-.SH DESCRIPTION
-Regular expressions (``RE''s),
-as defined in POSIX 1003.2, come in two forms:
-modern REs (roughly those of
-.BR egrep ;
-1003.2 calls these ``extended'' REs)
-and obsolete REs (roughly those of
-.BR ed ;
-1003.2 ``basic'' REs).
-Obsolete REs mostly exist for backward compatibility in some old programs;
-they will be discussed at the end.
-1003.2 leaves some aspects of RE syntax and semantics open;
-`\(dg' marks decisions on these aspects that
-may not be fully portable to other 1003.2 implementations.
-.PP
-A (modern) RE is one\(dg or more non-empty\(dg \fIbranches\fR,
-separated by `|'.
-It matches anything that matches one of the branches.
-.PP
-A branch is one\(dg or more \fIpieces\fR, concatenated.
-It matches a match for the first, followed by a match for the second, etc.
-.PP
-A piece is an \fIatom\fR possibly followed
-by a single\(dg `*', `+', `?', or \fIbound\fR.
-An atom followed by `*' matches a sequence of 0 or more matches of the atom.
-An atom followed by `+' matches a sequence of 1 or more matches of the atom.
-An atom followed by `?' matches a sequence of 0 or 1 matches of the atom.
-.PP
-A \fIbound\fR is `{' followed by an unsigned decimal integer,
-possibly followed by `,'
-possibly followed by another unsigned decimal integer,
-always followed by `}'.
-The integers must lie between 0 and RE_DUP_MAX (255\(dg) inclusive,
-and if there are two of them, the first may not exceed the second.
-An atom followed by a bound containing one integer \fIi\fR
-and no comma matches
-a sequence of exactly \fIi\fR matches of the atom.
-An atom followed by a bound
-containing one integer \fIi\fR and a comma matches
-a sequence of \fIi\fR or more matches of the atom.
-An atom followed by a bound
-containing two integers \fIi\fR and \fIj\fR matches
-a sequence of \fIi\fR through \fIj\fR (inclusive) matches of the atom.
-.PP
-An atom is a regular expression enclosed in `()' (matching a match for the
-regular expression),
-an empty set of `()' (matching the null string)\(dg,
-a \fIbracket expression\fR (see below), `.'
-(matching any single character), `^' (matching the null string at the
-beginning of a line), `$' (matching the null string at the
-end of a line), a `\e' followed by one of the characters
-`^.[$()|*+?{\e'
-(matching that character taken as an ordinary character),
-a `\e' followed by any other character\(dg
-(matching that character taken as an ordinary character,
-as if the `\e' had not been present\(dg),
-or a single character with no other significance (matching that character).
-A `{' followed by a character other than a digit is an ordinary
-character, not the beginning of a bound\(dg.
-It is illegal to end an RE with `\e'.
-.PP
-A \fIbracket expression\fR is a list of characters enclosed in `[]'.
-It normally matches any single character from the list (but see below).
-If the list begins with `^',
-it matches any single character
-(but see below) \fInot\fR from the rest of the list.
-If two characters in the list are separated by `\-', this is shorthand
-for the full \fIrange\fR of characters between those two (inclusive) in the
-collating sequence,
-e.g. `[0-9]' in ASCII matches any decimal digit.
-It is illegal\(dg for two ranges to share an
-endpoint, e.g. `a-c-e'.
-Ranges are very collating-sequence-dependent,
-and portable programs should avoid relying on them.
-.PP
-To include a literal `]' in the list, make it the first character
-(following a possible `^').
-To include a literal `\-', make it the first or last character,
-or the second endpoint of a range.
-To use a literal `\-' as the first endpoint of a range,
-enclose it in `[.' and `.]' to make it a collating element (see below).
-With the exception of these and some combinations using `[' (see next
-paragraphs), all other special characters, including `\e', lose their
-special significance within a bracket expression.
-.PP
-Within a bracket expression, a collating element (a character,
-a multi-character sequence that collates as if it were a single character,
-or a collating-sequence name for either)
-enclosed in `[.' and `.]' stands for the
-sequence of characters of that collating element.
-The sequence is a single element of the bracket expression's list.
-A bracket expression containing a multi-character collating element 
-can thus match more than one character,
-e.g. if the collating sequence includes a `ch' collating element,
-then the RE `[[.ch.]]*c' matches the first five characters
-of `chchcc'.
-.PP
-Within a bracket expression, a collating element enclosed in `[=' and
-`=]' is an equivalence class, standing for the sequences of characters
-of all collating elements equivalent to that one, including itself.
-(If there are no other equivalent collating elements,
-the treatment is as if the enclosing delimiters were `[.' and `.]'.)
-For example, if o and \o'o^' are the members of an equivalence class,
-then `[[=o=]]', `[[=\o'o^'=]]', and `[o\o'o^']' are all synonymous.
-An equivalence class may not\(dg be an endpoint
-of a range.
-.PP
-Within a bracket expression, the name of a \fIcharacter class\fR enclosed
-in `[:' and `:]' stands for the list of all characters belonging to that
-class.
-Standard character class names are:
-.PP
-.RS
-.nf
-.ta 3c 6c 9c
-alnum	digit	punct
-alpha	graph	space
-blank	lower	upper
-cntrl	print	xdigit
-.fi
-.RE
-.PP
-These stand for the character classes defined in
-.BR ctype (3).
-A locale may provide others.
-A character class may not be used as an endpoint of a range.
-.PP
-There are two special cases\(dg of bracket expressions:
-the bracket expressions `[[:<:]]' and `[[:>:]]' match the null string at
-the beginning and end of a word respectively.
-A word is defined as a sequence of
-word characters
-which is neither preceded nor followed by
-word characters.
-A word character is an
-.B alnum
-character (as defined by
-.BR ctype (3))
-or an underscore.
-This is an extension,
-compatible with but not specified by POSIX 1003.2,
-and should be used with
-caution in software intended to be portable to other systems.
-.PP
-In the event that an RE could match more than one substring of a given
-string,
-the RE matches the one starting earliest in the string.
-If the RE could match more than one substring starting at that point,
-it matches the longest.
-Subexpressions also match the longest possible substrings, subject to
-the constraint that the whole match be as long as possible,
-with subexpressions starting earlier in the RE taking priority over
-ones starting later.
-Note that higher-level subexpressions thus take priority over
-their lower-level component subexpressions.
-.PP
-Match lengths are measured in characters, not collating elements.
-A null string is considered longer than no match at all.
-For example,
-`bb*' matches the three middle characters of `abbbc',
-`(wee|week)(knights|nights)' matches all ten characters of `weeknights',
-when `(.*).*' is matched against `abc' the parenthesized subexpression
-matches all three characters, and
-when `(a*)*' is matched against `bc' both the whole RE and the parenthesized
-subexpression match the null string.
-.PP
-If case-independent matching is specified,
-the effect is much as if all case distinctions had vanished from the
-alphabet.
-When an alphabetic that exists in multiple cases appears as an
-ordinary character outside a bracket expression, it is effectively
-transformed into a bracket expression containing both cases,
-e.g. `x' becomes `[xX]'.
-When it appears inside a bracket expression, all case counterparts
-of it are added to the bracket expression, so that (e.g.) `[x]'
-becomes `[xX]' and `[^x]' becomes `[^xX]'.
-.PP
-No particular limit is imposed on the length of REs\(dg.
-Programs intended to be portable should not employ REs longer
-than 256 bytes,
-as an implementation can refuse to accept such REs and remain
-POSIX-compliant.
-.PP
-Obsolete (``basic'') regular expressions differ in several respects.
-`|', `+', and `?' are ordinary characters and there is no equivalent
-for their functionality.
-The delimiters for bounds are `\e{' and `\e}',
-with `{' and `}' by themselves ordinary characters.
-The parentheses for nested subexpressions are `\e(' and `\e)',
-with `(' and `)' by themselves ordinary characters.
-`^' is an ordinary character except at the beginning of the
-RE or\(dg the beginning of a parenthesized subexpression,
-`$' is an ordinary character except at the end of the
-RE or\(dg the end of a parenthesized subexpression,
-and `*' is an ordinary character if it appears at the beginning of the
-RE or the beginning of a parenthesized subexpression
-(after a possible leading `^').
-Finally, there is one new type of atom, a \fIback reference\fR:
-`\e' followed by a non-zero decimal digit \fId\fR
-matches the same sequence of characters
-matched by the \fId\fRth parenthesized subexpression
-(numbering subexpressions by the positions of their opening parentheses,
-left to right),
-so that (e.g.) `\e([bc]\e)\e1' matches `bb' or `cc' but not `bc'.
-.SH SEE ALSO
-regex(3)
-.PP
-POSIX 1003.2, section 2.8 (Regular Expression Notation).
-.SH BUGS
-Having two kinds of REs is a botch.
-.PP
-The current 1003.2 spec says that `)' is an ordinary character in
-the absence of an unmatched `(';
-this was an unintentional result of a wording error,
-and change is likely.
-Avoid relying on it.
-.PP
-Back references are a dreadful botch,
-posing major problems for efficient implementations.
-They are also somewhat vaguely defined
-(does
-`a\e(\e(b\e)*\e2\e)*d' match `abbbd'?).
-Avoid using them.
-.PP
-1003.2's specification of case-independent matching is vague.
-The ``one case implies all cases'' definition given above
-is current consensus among implementors as to the right interpretation.
-.PP
-The syntax for word boundaries is incredibly ugly.
Index: trunk/minix/lib/regex/regcomp.c
===================================================================
--- trunk/minix/lib/regex/regcomp.c	(revision 9)
+++ 	(revision )
@@ -1,1706 +1,0 @@
-/*-
- * Copyright (c) 1992, 1993, 1994 Henry Spencer.
- * Copyright (c) 1992, 1993, 1994
- *	The Regents of the University of California.  All rights reserved.
- *
- * This code is derived from software contributed to Berkeley by
- * Henry Spencer.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- *    must display the following acknowledgement:
- *	This product includes software developed by the University of
- *	California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- *    may be used to endorse or promote products derived from this software
- *    without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- *	@(#)regcomp.c	8.5 (Berkeley) 3/20/94
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)regcomp.c	8.5 (Berkeley) 3/20/94";
-#endif /* LIBC_SCCS and not lint */
-
-#include <sys/types.h>
-#include <stdio.h>
-#include <string.h>
-#ifdef __minix_vmd
-#include <bsd/asciictype.h>
-#else
-#include <ctype.h>
-#endif
-#include <limits.h>
-#include <stdlib.h>
-#include <regex.h>
-
-#include "utils.h"
-#include "regex2.h"
-
-#include "cclass.h"
-#include "cname.h"
-
-/*
- * parse structure, passed up and down to avoid global variables and
- * other clumsinesses
- */
-struct parse {
-	char *next;		/* next character in RE */
-	char *end;		/* end of string (-> NUL normally) */
-	int error;		/* has an error been seen? */
-	sop *strip;		/* malloced strip */
-	sopno ssize;		/* malloced strip size (allocated) */
-	sopno slen;		/* malloced strip length (used) */
-	int ncsalloc;		/* number of csets allocated */
-	struct re_guts *g;
-#	define	NPAREN	10	/* we need to remember () 1-9 for back refs */
-	sopno pbegin[NPAREN];	/* -> ( ([0] unused) */
-	sopno pend[NPAREN];	/* -> ) ([0] unused) */
-};
-
-/* ========= begin header generated by ./mkh ========= */
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/* === regcomp.c === */
-static void p_ere(struct parse *p, int stop);
-static void p_ere_exp(struct parse *p);
-static void p_str(struct parse *p);
-static void p_bre(struct parse *p, int end1, int end2);
-static int p_simp_re(struct parse *p, int starordinary);
-static int p_count(struct parse *p);
-static void p_bracket(struct parse *p);
-static void p_b_term(struct parse *p, cset *cs);
-static void p_b_cclass(struct parse *p, cset *cs);
-static void p_b_eclass(struct parse *p, cset *cs);
-static char p_b_symbol(struct parse *p);
-static char p_b_coll_elem(struct parse *p, int endc);
-static char othercase(int ch);
-static void bothcases(struct parse *p, int ch);
-static void ordinary(struct parse *p, int ch);
-static void nonnewline(struct parse *p);
-static void repeat(struct parse *p, sopno start, int from, int to);
-static int seterr(struct parse *p, int e);
-static cset *allocset(struct parse *p);
-static void freeset(struct parse *p, cset *cs);
-static int freezeset(struct parse *p, cset *cs);
-static int firstch(struct parse *p, cset *cs);
-static int nch(struct parse *p, cset *cs);
-static void mcadd(struct parse *p, cset *cs, char *cp);
-static void mcsub(cset *cs, char *cp);
-static int mcin(cset *cs, char *cp);
-static char *mcfind(cset *cs, char *cp);
-static void mcinvert(struct parse *p, cset *cs);
-static void mccase(struct parse *p, cset *cs);
-static int isinsets(struct re_guts *g, int c);
-static int samesets(struct re_guts *g, int c1, int c2);
-static void categorize(struct parse *p, struct re_guts *g);
-static sopno dupl(struct parse *p, sopno start, sopno finish);
-static void doemit(struct parse *p, sop op, size_t opnd);
-static void doinsert(struct parse *p, sop op, size_t opnd, sopno pos);
-static void dofwd(struct parse *p, sopno pos, sop value);
-static void enlarge(struct parse *p, sopno size);
-static void stripsnug(struct parse *p, struct re_guts *g);
-static void findmust(struct parse *p, struct re_guts *g);
-static sopno pluscount(struct parse *p, struct re_guts *g);
-
-#ifdef __cplusplus
-}
-#endif
-/* ========= end header generated by ./mkh ========= */
-
-static char nuls[10];		/* place to point scanner in event of error */
-
-/*
- * macros for use with parse structure
- * BEWARE:  these know that the parse structure is named `p' !!!
- */
-#define	PEEK()	(*p->next)
-#define	PEEK2()	(*(p->next+1))
-#define	MORE()	(p->next < p->end)
-#define	MORE2()	(p->next+1 < p->end)
-#define	SEE(c)	(MORE() && PEEK() == (c))
-#define	SEETWO(a, b)	(MORE() && MORE2() && PEEK() == (a) && PEEK2() == (b))
-#define	EAT(c)	((SEE(c)) ? (NEXT(), 1) : 0)
-#define	EATTWO(a, b)	((SEETWO(a, b)) ? (NEXT2(), 1) : 0)
-#define	NEXT()	(p->next++)
-#define	NEXT2()	(p->next += 2)
-#define	NEXTn(n)	(p->next += (n))
-#define	GETNEXT()	(*p->next++)
-#define	SETERROR(e)	seterr(p, (e))
-#define	REQUIRE(co, e)	((co) || SETERROR(e))
-#define	MUSTSEE(c, e)	(REQUIRE(MORE() && PEEK() == (c), e))
-#define	MUSTEAT(c, e)	(REQUIRE(MORE() && GETNEXT() == (c), e))
-#define	MUSTNOTSEE(c, e)	(REQUIRE(!MORE() || PEEK() != (c), e))
-#define	EMIT(op, sopnd)	doemit(p, (sop)(op), (size_t)(sopnd))
-#define	INSERT(op, pos)	doinsert(p, (sop)(op), HERE()-(pos)+1, pos)
-#define	AHEAD(pos)		dofwd(p, pos, HERE()-(pos))
-#define	ASTERN(sop, pos)	EMIT(sop, HERE()-pos)
-#define	HERE()		(p->slen)
-#define	THERE()		(p->slen - 1)
-#define	THERETHERE()	(p->slen - 2)
-#define	DROP(n)	(p->slen -= (n))
-
-#ifndef NDEBUG
-static int never = 0;		/* for use in asserts; shuts lint up */
-#else
-#define	never	0		/* some <assert.h>s have bugs too */
-#endif
-
-/*
- - regcomp - interface for parser and compilation
- = extern int regcomp(regex_t *, const char *, int);
- = #define	REG_BASIC	0000
- = #define	REG_EXTENDED	0001
- = #define	REG_ICASE	0002
- = #define	REG_NOSUB	0004
- = #define	REG_NEWLINE	0010
- = #define	REG_NOSPEC	0020
- = #define	REG_PEND	0040
- = #define	REG_DUMP	0200
- */
-int				/* 0 success, otherwise REG_something */
-regcomp(preg, pattern, cflags)
-regex_t *preg;
-const char *pattern;
-int cflags;
-{
-	struct parse pa;
-	register struct re_guts *g;
-	register struct parse *p = &pa;
-	register int i;
-	register size_t len;
-#ifdef REDEBUG
-#	define	GOODFLAGS(f)	(f)
-#else
-#	define	GOODFLAGS(f)	((f)&~REG_DUMP)
-#endif
-
-	cflags = GOODFLAGS(cflags);
-	if ((cflags&REG_EXTENDED) && (cflags&REG_NOSPEC))
-		return(REG_INVARG);
-
-	if (cflags&REG_PEND) {
-		if (preg->re_endp < pattern)
-			return(REG_INVARG);
-		len = preg->re_endp - pattern;
-	} else
-		len = strlen((char *)pattern);
-
-	/* do the mallocs early so failure handling is easy */
-	g = (struct re_guts *)malloc(sizeof(struct re_guts) +
-							(NC-1)*sizeof(cat_t));
-	if (g == NULL)
-		return(REG_ESPACE);
-	p->ssize = len/(size_t)2*(size_t)3 + (size_t)1;	/* ugh */
-	p->strip = (sop *)malloc(p->ssize * sizeof(sop));
-	p->slen = 0;
-	if (p->strip == NULL) {
-		free((char *)g);
-		return(REG_ESPACE);
-	}
-
-	/* set things up */
-	p->g = g;
-	p->next = (char *)pattern;	/* convenience; we do not modify it */
-	p->end = p->next + len;
-	p->error = 0;
-	p->ncsalloc = 0;
-	for (i = 0; i < NPAREN; i++) {
-		p->pbegin[i] = 0;
-		p->pend[i] = 0;
-	}
-	g->csetsize = NC;
-	g->sets = NULL;
-	g->setbits = NULL;
-	g->ncsets = 0;
-	g->cflags = cflags;
-	g->iflags = 0;
-	g->nbol = 0;
-	g->neol = 0;
-	g->must = NULL;
-	g->mlen = 0;
-	g->nsub = 0;
-	g->ncategories = 1;	/* category 0 is "everything else" */
-	g->categories = &g->catspace[-(CHAR_MIN)];
-	(void) memset((char *)g->catspace, 0, NC*sizeof(cat_t));
-	g->backrefs = 0;
-
-	/* do it */
-	EMIT(OEND, 0);
-	g->firststate = THERE();
-	if (cflags&REG_EXTENDED)
-		p_ere(p, OUT);
-	else if (cflags&REG_NOSPEC)
-		p_str(p);
-	else
-		p_bre(p, OUT, OUT);
-	EMIT(OEND, 0);
-	g->laststate = THERE();
-
-	/* tidy up loose ends and fill things in */
-	categorize(p, g);
-	stripsnug(p, g);
-	findmust(p, g);
-	g->nplus = pluscount(p, g);
-	g->magic = MAGIC2;
-	preg->re_nsub = g->nsub;
-	preg->re_g = g;
-	preg->re_magic = MAGIC1;
-#ifndef REDEBUG
-	/* not debugging, so can't rely on the assert() in regexec() */
-	if (g->iflags&BAD)
-		SETERROR(REG_ASSERT);
-#endif
-
-	/* win or lose, we're done */
-	if (p->error != 0)	/* lose */
-		regfree(preg);
-	return(p->error);
-}
-
-/*
- - p_ere - ERE parser top level, concatenation and alternation
- == static void p_ere(register struct parse *p, int stop);
- */
-static void
-p_ere(p, stop)
-register struct parse *p;
-int stop;			/* character this ERE should end at */
-{
-	register char c;
-	register sopno prevback;
-	register sopno prevfwd;
-	register sopno conc;
-	register int first = 1;		/* is this the first alternative? */
-
-	for (;;) {
-		/* do a bunch of concatenated expressions */
-		conc = HERE();
-		while (MORE() && (c = PEEK()) != '|' && c != stop)
-			p_ere_exp(p);
-		REQUIRE(HERE() != conc, REG_EMPTY);	/* require nonempty */
-
-		if (!EAT('|'))
-			break;		/* NOTE BREAK OUT */
-
-		if (first) {
-			INSERT(OCH_, conc);	/* offset is wrong */
-			prevfwd = conc;
-			prevback = conc;
-			first = 0;
-		}
-		ASTERN(OOR1, prevback);
-		prevback = THERE();
-		AHEAD(prevfwd);			/* fix previous offset */
-		prevfwd = HERE();
-		EMIT(OOR2, 0);			/* offset is very wrong */
-	}
-
-	if (!first) {		/* tail-end fixups */
-		AHEAD(prevfwd);
-		ASTERN(O_CH, prevback);
-	}
-
-	assert(!MORE() || SEE(stop));
-}
-
-/*
- - p_ere_exp - parse one subERE, an atom possibly followed by a repetition op
- == static void p_ere_exp(register struct parse *p);
- */
-static void
-p_ere_exp(p)
-register struct parse *p;
-{
-	register char c;
-	register sopno pos;
-	register int count;
-	register int count2;
-	register sopno subno;
-	int wascaret = 0;
-
-	assert(MORE());		/* caller should have ensured this */
-	c = GETNEXT();
-
-	pos = HERE();
-	switch (c) {
-	case '(':
-		REQUIRE(MORE(), REG_EPAREN);
-		p->g->nsub++;
-		subno = p->g->nsub;
-		if (subno < NPAREN)
-			p->pbegin[subno] = HERE();
-		EMIT(OLPAREN, subno);
-		if (!SEE(')'))
-			p_ere(p, ')');
-		if (subno < NPAREN) {
-			p->pend[subno] = HERE();
-			assert(p->pend[subno] != 0);
-		}
-		EMIT(ORPAREN, subno);
-		MUSTEAT(')', REG_EPAREN);
-		break;
-#ifndef POSIX_MISTAKE
-	case ')':		/* happens only if no current unmatched ( */
-		/*
-		 * You may ask, why the ifndef?  Because I didn't notice
-		 * this until slightly too late for 1003.2, and none of the
-		 * other 1003.2 regular-expression reviewers noticed it at
-		 * all.  So an unmatched ) is legal POSIX, at least until
-		 * we can get it fixed.
-		 */
-		SETERROR(REG_EPAREN);
-		break;
-#endif
-	case '^':
-		EMIT(OBOL, 0);
-		p->g->iflags |= USEBOL;
-		p->g->nbol++;
-		wascaret = 1;
-		break;
-	case '$':
-		EMIT(OEOL, 0);
-		p->g->iflags |= USEEOL;
-		p->g->neol++;
-		break;
-	case '|':
-		SETERROR(REG_EMPTY);
-		break;
-	case '*':
-	case '+':
-	case '?':
-		SETERROR(REG_BADRPT);
-		break;
-	case '.':
-		if (p->g->cflags&REG_NEWLINE)
-			nonnewline(p);
-		else
-			EMIT(OANY, 0);
-		break;
-	case '[':
-		p_bracket(p);
-		break;
-	case '\\':
-		REQUIRE(MORE(), REG_EESCAPE);
-		c = GETNEXT();
-		ordinary(p, c);
-		break;
-	case '{':		/* okay as ordinary except if digit follows */
-		REQUIRE(!MORE() || !isdigit(PEEK()), REG_BADRPT);
-		/* FALLTHROUGH */
-	default:
-		ordinary(p, c);
-		break;
-	}
-
-	if (!MORE())
-		return;
-	c = PEEK();
-	/* we call { a repetition if followed by a digit */
-	if (!( c == '*' || c == '+' || c == '?' ||
-				(c == '{' && MORE2() && isdigit(PEEK2())) ))
-		return;		/* no repetition, we're done */
-	NEXT();
-
-	REQUIRE(!wascaret, REG_BADRPT);
-	switch (c) {
-	case '*':	/* implemented as +? */
-		/* this case does not require the (y|) trick, noKLUDGE */
-		INSERT(OPLUS_, pos);
-		ASTERN(O_PLUS, pos);
-		INSERT(OQUEST_, pos);
-		ASTERN(O_QUEST, pos);
-		break;
-	case '+':
-		INSERT(OPLUS_, pos);
-		ASTERN(O_PLUS, pos);
-		break;
-	case '?':
-		/* KLUDGE: emit y? as (y|) until subtle bug gets fixed */
-		INSERT(OCH_, pos);		/* offset slightly wrong */
-		ASTERN(OOR1, pos);		/* this one's right */
-		AHEAD(pos);			/* fix the OCH_ */
-		EMIT(OOR2, 0);			/* offset very wrong... */
-		AHEAD(THERE());			/* ...so fix it */
-		ASTERN(O_CH, THERETHERE());
-		break;
-	case '{':
-		count = p_count(p);
-		if (EAT(',')) {
-			if (isdigit(PEEK())) {
-				count2 = p_count(p);
-				REQUIRE(count <= count2, REG_BADBR);
-			} else		/* single number with comma */
-				count2 = INFINITY;
-		} else		/* just a single number */
-			count2 = count;
-		repeat(p, pos, count, count2);
-		if (!EAT('}')) {	/* error heuristics */
-			while (MORE() && PEEK() != '}')
-				NEXT();
-			REQUIRE(MORE(), REG_EBRACE);
-			SETERROR(REG_BADBR);
-		}
-		break;
-	}
-
-	if (!MORE())
-		return;
-	c = PEEK();
-	if (!( c == '*' || c == '+' || c == '?' ||
-				(c == '{' && MORE2() && isdigit(PEEK2())) ) )
-		return;
-	SETERROR(REG_BADRPT);
-}
-
-/*
- - p_str - string (no metacharacters) "parser"
- == static void p_str(register struct parse *p);
- */
-static void
-p_str(p)
-register struct parse *p;
-{
-	REQUIRE(MORE(), REG_EMPTY);
-	while (MORE())
-		ordinary(p, GETNEXT());
-}
-
-/*
- - p_bre - BRE parser top level, anchoring and concatenation
- == static void p_bre(register struct parse *p, register int end1, \
- ==	register int end2);
- * Giving end1 as OUT essentially eliminates the end1/end2 check.
- *
- * This implementation is a bit of a kludge, in that a trailing $ is first
- * taken as an ordinary character and then revised to be an anchor.  The
- * only undesirable side effect is that '$' gets included as a character
- * category in such cases.  This is fairly harmless; not worth fixing.
- * The amount of lookahead needed to avoid this kludge is excessive.
- */
-static void
-p_bre(p, end1, end2)
-register struct parse *p;
-register int end1;		/* first terminating character */
-register int end2;		/* second terminating character */
-{
-	register sopno start = HERE();
-	register int first = 1;			/* first subexpression? */
-	register int wasdollar = 0;
-
-	if (EAT('^')) {
-		EMIT(OBOL, 0);
-		p->g->iflags |= USEBOL;
-		p->g->nbol++;
-	}
-	while (MORE() && !SEETWO(end1, end2)) {
-		wasdollar = p_simp_re(p, first);
-		first = 0;
-	}
-	if (wasdollar) {	/* oops, that was a trailing anchor */
-		DROP(1);
-		EMIT(OEOL, 0);
-		p->g->iflags |= USEEOL;
-		p->g->neol++;
-	}
-
-	REQUIRE(HERE() != start, REG_EMPTY);	/* require nonempty */
-}
-
-/*
- - p_simp_re - parse a simple RE, an atom possibly followed by a repetition
- == static int p_simp_re(register struct parse *p, int starordinary);
- */
-static int			/* was the simple RE an unbackslashed $? */
-p_simp_re(p, starordinary)
-register struct parse *p;
-int starordinary;		/* is a leading * an ordinary character? */
-{
-	register int c;
-	register int count;
-	register int count2;
-	register sopno pos;
-	register int i;
-	register sopno subno;
-#	define	BACKSL	(1<<CHAR_BIT)
-
-	pos = HERE();		/* repetion op, if any, covers from here */
-
-	assert(MORE());		/* caller should have ensured this */
-	c = GETNEXT();
-	if (c == '\\') {
-		REQUIRE(MORE(), REG_EESCAPE);
-		c = BACKSL | (unsigned char)GETNEXT();
-	}
-	switch (c) {
-	case '.':
-		if (p->g->cflags&REG_NEWLINE)
-			nonnewline(p);
-		else
-			EMIT(OANY, 0);
-		break;
-	case '[':
-		p_bracket(p);
-		break;
-	case BACKSL|'{':
-		SETERROR(REG_BADRPT);
-		break;
-	case BACKSL|'(':
-		p->g->nsub++;
-		subno = p->g->nsub;
-		if (subno < NPAREN)
-			p->pbegin[subno] = HERE();
-		EMIT(OLPAREN, subno);
-		/* the MORE here is an error heuristic */
-		if (MORE() && !SEETWO('\\', ')'))
-			p_bre(p, '\\', ')');
-		if (subno < NPAREN) {
-			p->pend[subno] = HERE();
-			assert(p->pend[subno] != 0);
-		}
-		EMIT(ORPAREN, subno);
-		REQUIRE(EATTWO('\\', ')'), REG_EPAREN);
-		break;
-	case BACKSL|')':	/* should not get here -- must be user */
-	case BACKSL|'}':
-		SETERROR(REG_EPAREN);
-		break;
-	case BACKSL|'1':
-	case BACKSL|'2':
-	case BACKSL|'3':
-	case BACKSL|'4':
-	case BACKSL|'5':
-	case BACKSL|'6':
-	case BACKSL|'7':
-	case BACKSL|'8':
-	case BACKSL|'9':
-		i = (c&~BACKSL) - '0';
-		assert(i < NPAREN);
-		if (p->pend[i] != 0) {
-			assert(i <= p->g->nsub);
-			EMIT(OBACK_, i);
-			assert(p->pbegin[i] != 0);
-			assert(OP(p->strip[p->pbegin[i]]) == OLPAREN);
-			assert(OP(p->strip[p->pend[i]]) == ORPAREN);
-			(void) dupl(p, p->pbegin[i]+1, p->pend[i]);
-			EMIT(O_BACK, i);
-		} else
-			SETERROR(REG_ESUBREG);
-		p->g->backrefs = 1;
-		break;
-	case '*':
-		REQUIRE(starordinary, REG_BADRPT);
-		/* FALLTHROUGH */
-	default:
-		ordinary(p, c &~ BACKSL);
-		break;
-	}
-
-	if (EAT('*')) {		/* implemented as +? */
-		/* this case does not require the (y|) trick, noKLUDGE */
-		INSERT(OPLUS_, pos);
-		ASTERN(O_PLUS, pos);
-		INSERT(OQUEST_, pos);
-		ASTERN(O_QUEST, pos);
-	} else if (EATTWO('\\', '{')) {
-		count = p_count(p);
-		if (EAT(',')) {
-			if (MORE() && isdigit(PEEK())) {
-				count2 = p_count(p);
-				REQUIRE(count <= count2, REG_BADBR);
-			} else		/* single number with comma */
-				count2 = INFINITY;
-		} else		/* just a single number */
-			count2 = count;
-		repeat(p, pos, count, count2);
-		if (!EATTWO('\\', '}')) {	/* error heuristics */
-			while (MORE() && !SEETWO('\\', '}'))
-				NEXT();
-			REQUIRE(MORE(), REG_EBRACE);
-			SETERROR(REG_BADBR);
-		}
-	} else if (c == (unsigned char)'$')	/* $ (but not \$) ends it */
-		return(1);
-
-	return(0);
-}
-
-/*
- - p_count - parse a repetition count
- == static int p_count(register struct parse *p);
- */
-static int			/* the value */
-p_count(p)
-register struct parse *p;
-{
-	register int count = 0;
-	register int ndigits = 0;
-
-	while (MORE() && isdigit(PEEK()) && count <= DUPMAX) {
-		count = count*10 + (GETNEXT() - '0');
-		ndigits++;
-	}
-
-	REQUIRE(ndigits > 0 && count <= DUPMAX, REG_BADBR);
-	return(count);
-}
-
-/*
- - p_bracket - parse a bracketed character list
- == static void p_bracket(register struct parse *p);
- *
- * Note a significant property of this code:  if the allocset() did SETERROR,
- * no set operations are done.
- */
-static void
-p_bracket(p)
-register struct parse *p;
-{
-	register char c;
-	register cset *cs = allocset(p);
-	register int invert = 0;
-
-	/* Dept of Truly Sickening Special-Case Kludges */
-	if (p->next + 5 < p->end && strncmp(p->next, "[:<:]]", 6) == 0) {
-		EMIT(OBOW, 0);
-		NEXTn(6);
-		return;
-	}
-	if (p->next + 5 < p->end && strncmp(p->next, "[:>:]]", 6) == 0) {
-		EMIT(OEOW, 0);
-		NEXTn(6);
-		return;
-	}
-
-	if (EAT('^'))
-		invert++;	/* make note to invert set at end */
-	if (EAT(']'))
-		CHadd(cs, ']');
-	else if (EAT('-'))
-		CHadd(cs, '-');
-	while (MORE() && PEEK() != ']' && !SEETWO('-', ']'))
-		p_b_term(p, cs);
-	if (EAT('-'))
-		CHadd(cs, '-');
-	MUSTEAT(']', REG_EBRACK);
-
-	if (p->error != 0)	/* don't mess things up further */
-		return;
-
-	if (p->g->cflags&REG_ICASE) {
-		register int i;
-		register int ci;
-
-		for (i = p->g->csetsize - 1; i >= 0; i--)
-			if (CHIN(cs, i) && isalpha(i)) {
-				ci = othercase(i);
-				if (ci != i)
-					CHadd(cs, ci);
-			}
-		if (cs->multis != NULL)
-			mccase(p, cs);
-	}
-	if (invert) {
-		register int i;
-
-		for (i = p->g->csetsize - 1; i >= 0; i--)
-			if (CHIN(cs, i))
-				CHsub(cs, i);
-			else
-				CHadd(cs, i);
-		if (p->g->cflags&REG_NEWLINE)
-			CHsub(cs, '\n');
-		if (cs->multis != NULL)
-			mcinvert(p, cs);
-	}
-
-	assert(cs->multis == NULL);		/* xxx */
-
-	if (nch(p, cs) == 1) {		/* optimize singleton sets */
-		ordinary(p, firstch(p, cs));
-		freeset(p, cs);
-	} else
-		EMIT(OANYOF, freezeset(p, cs));
-}
-
-/*
- - p_b_term - parse one term of a bracketed character list
- == static void p_b_term(register struct parse *p, register cset *cs);
- */
-static void
-p_b_term(p, cs)
-register struct parse *p;
-register cset *cs;
-{
-	register char c;
-	register char start, finish;
-	register int i;
-
-	/* classify what we've got */
-	switch ((MORE()) ? PEEK() : '\0') {
-	case '[':
-		c = (MORE2()) ? PEEK2() : '\0';
-		break;
-	case '-':
-		SETERROR(REG_ERANGE);
-		return;			/* NOTE RETURN */
-		break;
-	default:
-		c = '\0';
-		break;
-	}
-
-	switch (c) {
-	case ':':		/* character class */
-		NEXT2();
-		REQUIRE(MORE(), REG_EBRACK);
-		c = PEEK();
-		REQUIRE(c != '-' && c != ']', REG_ECTYPE);
-		p_b_cclass(p, cs);
-		REQUIRE(MORE(), REG_EBRACK);
-		REQUIRE(EATTWO(':', ']'), REG_ECTYPE);
-		break;
-	case '=':		/* equivalence class */
-		NEXT2();
-		REQUIRE(MORE(), REG_EBRACK);
-		c = PEEK();
-		REQUIRE(c != '-' && c != ']', REG_ECOLLATE);
-		p_b_eclass(p, cs);
-		REQUIRE(MORE(), REG_EBRACK);
-		REQUIRE(EATTWO('=', ']'), REG_ECOLLATE);
-		break;
-	default:		/* symbol, ordinary character, or range */
-/* xxx revision needed for multichar stuff */
-		start = p_b_symbol(p);
-		if (SEE('-') && MORE2() && PEEK2() != ']') {
-			/* range */
-			NEXT();
-			if (EAT('-'))
-				finish = '-';
-			else
-				finish = p_b_symbol(p);
-		} else
-			finish = start;
-/* xxx what about signed chars here... */
-		REQUIRE(start <= finish, REG_ERANGE);
-		for (i = start; i <= finish; i++)
-			CHadd(cs, i);
-		break;
-	}
-}
-
-/*
- - p_b_cclass - parse a character-class name and deal with it
- == static void p_b_cclass(register struct parse *p, register cset *cs);
- */
-static void
-p_b_cclass(p, cs)
-register struct parse *p;
-register cset *cs;
-{
-	register char *sp = p->next;
-	register struct cclass *cp;
-	register size_t len;
-	register char *u;
-	register char c;
-
-	while (MORE() && isalpha(PEEK()))
-		NEXT();
-	len = p->next - sp;
-	for (cp = cclasses; cp->name != NULL; cp++)
-		if (strncmp(cp->name, sp, len) == 0 && cp->name[len] == '\0')
-			break;
-	if (cp->name == NULL) {
-		/* oops, didn't find it */
-		SETERROR(REG_ECTYPE);
-		return;
-	}
-
-	u = cp->chars;
-	while ((c = *u++) != '\0')
-		CHadd(cs, c);
-	for (u = cp->multis; *u != '\0'; u += strlen(u) + 1)
-		MCadd(p, cs, u);
-}
-
-/*
- - p_b_eclass - parse an equivalence-class name and deal with it
- == static void p_b_eclass(register struct parse *p, register cset *cs);
- *
- * This implementation is incomplete. xxx
- */
-static void
-p_b_eclass(p, cs)
-register struct parse *p;
-register cset *cs;
-{
-	register char c;
-
-	c = p_b_coll_elem(p, '=');
-	CHadd(cs, c);
-}
-
-/*
- - p_b_symbol - parse a character or [..]ed multicharacter collating symbol
- == static char p_b_symbol(register struct parse *p);
- */
-static char			/* value of symbol */
-p_b_symbol(p)
-register struct parse *p;
-{
-	register char value;
-
-	REQUIRE(MORE(), REG_EBRACK);
-	if (!EATTWO('[', '.'))
-		return(GETNEXT());
-
-	/* collating symbol */
-	value = p_b_coll_elem(p, '.');
-	REQUIRE(EATTWO('.', ']'), REG_ECOLLATE);
-	return(value);
-}
-
-/*
- - p_b_coll_elem - parse a collating-element name and look it up
- == static char p_b_coll_elem(register struct parse *p, int endc);
- */
-static char			/* value of collating element */
-p_b_coll_elem(p, endc)
-register struct parse *p;
-int endc;			/* name ended by endc,']' */
-{
-	register char *sp = p->next;
-	register struct cname *cp;
-	register int len;
-	register char c;
-
-	while (MORE() && !SEETWO(endc, ']'))
-		NEXT();
-	if (!MORE()) {
-		SETERROR(REG_EBRACK);
-		return(0);
-	}
-	len = p->next - sp;
-	for (cp = cnames; cp->name != NULL; cp++)
-		if (strncmp(cp->name, sp, len) == 0 && cp->name[len] == '\0')
-			return(cp->code);	/* known name */
-	if (len == 1)
-		return(*sp);	/* single character */
-	SETERROR(REG_ECOLLATE);			/* neither */
-	return(0);
-}
-
-/*
- - othercase - return the case counterpart of an alphabetic
- == static char othercase(int ch);
- */
-static char			/* if no counterpart, return ch */
-othercase(ch)
-int ch;
-{
-	assert(isalpha(ch));
-	if (isupper(ch))
-		return(tolower(ch));
-	else if (islower(ch))
-		return(toupper(ch));
-	else			/* peculiar, but could happen */
-		return(ch);
-}
-
-/*
- - bothcases - emit a dualcase version of a two-case character
- == static void bothcases(register struct parse *p, int ch);
- *
- * Boy, is this implementation ever a kludge...
- */
-static void
-bothcases(p, ch)
-register struct parse *p;
-int ch;
-{
-	register char *oldnext = p->next;
-	register char *oldend = p->end;
-	char bracket[3];
-
-	assert(othercase(ch) != ch);	/* p_bracket() would recurse */
-	p->next = bracket;
-	p->end = bracket+2;
-	bracket[0] = ch;
-	bracket[1] = ']';
-	bracket[2] = '\0';
-	p_bracket(p);
-	assert(p->next == bracket+2);
-	p->next = oldnext;
-	p->end = oldend;
-}
-
-/*
- - ordinary - emit an ordinary character
- == static void ordinary(register struct parse *p, register int ch);
- */
-static void
-ordinary(p, ch)
-register struct parse *p;
-register int ch;
-{
-	register cat_t *cap = p->g->categories;
-
-	if ((p->g->cflags&REG_ICASE) && isalpha(ch) && othercase(ch) != ch)
-		bothcases(p, ch);
-	else {
-		EMIT(OCHAR, (unsigned char)ch);
-		if (cap[ch] == 0)
-			cap[ch] = p->g->ncategories++;
-	}
-}
-
-/*
- - nonnewline - emit REG_NEWLINE version of OANY
- == static void nonnewline(register struct parse *p);
- *
- * Boy, is this implementation ever a kludge...
- */
-static void
-nonnewline(p)
-register struct parse *p;
-{
-	register char *oldnext = p->next;
-	register char *oldend = p->end;
-	char bracket[4];
-
-	p->next = bracket;
-	p->end = bracket+3;
-	bracket[0] = '^';
-	bracket[1] = '\n';
-	bracket[2] = ']';
-	bracket[3] = '\0';
-	p_bracket(p);
-	assert(p->next == bracket+3);
-	p->next = oldnext;
-	p->end = oldend;
-}
-
-/*
- - repeat - generate code for a bounded repetition, recursively if needed
- == static void repeat(register struct parse *p, sopno start, int from, int to);
- */
-static void
-repeat(p, start, from, to)
-register struct parse *p;
-sopno start;			/* operand from here to end of strip */
-int from;			/* repeated from this number */
-int to;				/* to this number of times (maybe INFINITY) */
-{
-	register sopno finish = HERE();
-#	define	N	2
-#	define	INF	3
-#	define	REP(f, t)	((f)*8 + (t))
-#	define	MAP(n)	(((n) <= 1) ? (n) : ((n) == INFINITY) ? INF : N)
-	register sopno copy;
-
-	if (p->error != 0)	/* head off possible runaway recursion */
-		return;
-
-	assert(from <= to);
-
-	switch (REP(MAP(from), MAP(to))) {
-	case REP(0, 0):			/* must be user doing this */
-		DROP(finish-start);	/* drop the operand */
-		break;
-	case REP(0, 1):			/* as x{1,1}? */
-	case REP(0, N):			/* as x{1,n}? */
-	case REP(0, INF):		/* as x{1,}? */
-		/* KLUDGE: emit y? as (y|) until subtle bug gets fixed */
-		INSERT(OCH_, start);		/* offset is wrong... */
-		repeat(p, start+1, 1, to);
-		ASTERN(OOR1, start);
-		AHEAD(start);			/* ... fix it */
-		EMIT(OOR2, 0);
-		AHEAD(THERE());
-		ASTERN(O_CH, THERETHERE());
-		break;
-	case REP(1, 1):			/* trivial case */
-		/* done */
-		break;
-	case REP(1, N):			/* as x?x{1,n-1} */
-		/* KLUDGE: emit y? as (y|) until subtle bug gets fixed */
-		INSERT(OCH_, start);
-		ASTERN(OOR1, start);
-		AHEAD(start);
-		EMIT(OOR2, 0);			/* offset very wrong... */
-		AHEAD(THERE());			/* ...so fix it */
-		ASTERN(O_CH, THERETHERE());
-		copy = dupl(p, start+1, finish+1);
-		assert(copy == finish+4);
-		repeat(p, copy, 1, to-1);
-		break;
-	case REP(1, INF):		/* as x+ */
-		INSERT(OPLUS_, start);
-		ASTERN(O_PLUS, start);
-		break;
-	case REP(N, N):			/* as xx{m-1,n-1} */
-		copy = dupl(p, start, finish);
-		repeat(p, copy, from-1, to-1);
-		break;
-	case REP(N, INF):		/* as xx{n-1,INF} */
-		copy = dupl(p, start, finish);
-		repeat(p, copy, from-1, to);
-		break;
-	default:			/* "can't happen" */
-		SETERROR(REG_ASSERT);	/* just in case */
-		break;
-	}
-}
-
-/*
- - seterr - set an error condition
- == static int seterr(register struct parse *p, int e);
- */
-static int			/* useless but makes type checking happy */
-seterr(p, e)
-register struct parse *p;
-int e;
-{
-	if (p->error == 0)	/* keep earliest error condition */
-		p->error = e;
-	p->next = nuls;		/* try to bring things to a halt */
-	p->end = nuls;
-	return(0);		/* make the return value well-defined */
-}
-
-/*
- - allocset - allocate a set of characters for []
- == static cset *allocset(register struct parse *p);
- */
-static cset *
-allocset(p)
-register struct parse *p;
-{
-	register int no = p->g->ncsets++;
-	register size_t nc;
-	register size_t nbytes;
-	register cset *cs;
-	register size_t css = (size_t)p->g->csetsize;
-	register int i;
-
-	if (no >= p->ncsalloc) {	/* need another column of space */
-		p->ncsalloc += CHAR_BIT;
-		nc = p->ncsalloc;
-		assert(nc % CHAR_BIT == 0);
-		nbytes = nc / CHAR_BIT * css;
-		if (p->g->sets == NULL)
-			p->g->sets = (cset *)malloc(nc * sizeof(cset));
-		else
-			p->g->sets = (cset *)realloc((char *)p->g->sets,
-							nc * sizeof(cset));
-		if (p->g->setbits == NULL)
-			p->g->setbits = (uch *)malloc(nbytes);
-		else {
-			p->g->setbits = (uch *)realloc((char *)p->g->setbits,
-								nbytes);
-			/* xxx this isn't right if setbits is now NULL */
-			for (i = 0; i < no; i++)
-				p->g->sets[i].ptr = p->g->setbits + css*(i/CHAR_BIT);
-		}
-		if (p->g->sets != NULL && p->g->setbits != NULL)
-			(void) memset((char *)p->g->setbits + (nbytes - css),
-								0, css);
-		else {
-			no = 0;
-			SETERROR(REG_ESPACE);
-			/* caller's responsibility not to do set ops */
-		}
-	}
-
-	assert(p->g->sets != NULL);	/* xxx */
-	cs = &p->g->sets[no];
-	cs->ptr = p->g->setbits + css*((no)/CHAR_BIT);
-	cs->mask = 1 << ((no) % CHAR_BIT);
-	cs->hash = 0;
-	cs->smultis = 0;
-	cs->multis = NULL;
-
-	return(cs);
-}
-
-/*
- - freeset - free a now-unused set
- == static void freeset(register struct parse *p, register cset *cs);
- */
-static void
-freeset(p, cs)
-register struct parse *p;
-register cset *cs;
-{
-	register int i;
-	register cset *top = &p->g->sets[p->g->ncsets];
-	register size_t css = (size_t)p->g->csetsize;
-
-	for (i = 0; i < css; i++)
-		CHsub(cs, i);
-	if (cs == top-1)	/* recover only the easy case */
-		p->g->ncsets--;
-}
-
-/*
- - freezeset - final processing on a set of characters
- == static int freezeset(register struct parse *p, register cset *cs);
- *
- * The main task here is merging identical sets.  This is usually a waste
- * of time (although the hash code minimizes the overhead), but can win
- * big if REG_ICASE is being used.  REG_ICASE, by the way, is why the hash
- * is done using addition rather than xor -- all ASCII [aA] sets xor to
- * the same value!
- */
-static int			/* set number */
-freezeset(p, cs)
-register struct parse *p;
-register cset *cs;
-{
-	register uch h = cs->hash;
-	register int i;
-	register cset *top = &p->g->sets[p->g->ncsets];
-	register cset *cs2;
-	register size_t css = (size_t)p->g->csetsize;
-
-	/* look for an earlier one which is the same */
-	for (cs2 = &p->g->sets[0]; cs2 < top; cs2++)
-		if (cs2->hash == h && cs2 != cs) {
-			/* maybe */
-			for (i = 0; i < css; i++)
-				if (!!CHIN(cs2, i) != !!CHIN(cs, i))
-					break;		/* no */
-			if (i == css)
-				break;			/* yes */
-		}
-
-	if (cs2 < top) {	/* found one */
-		freeset(p, cs);
-		cs = cs2;
-	}
-
-	return((int)(cs - p->g->sets));
-}
-
-/*
- - firstch - return first character in a set (which must have at least one)
- == static int firstch(register struct parse *p, register cset *cs);
- */
-static int			/* character; there is no "none" value */
-firstch(p, cs)
-register struct parse *p;
-register cset *cs;
-{
-	register int i;
-	register size_t css = (size_t)p->g->csetsize;
-
-	for (i = 0; i < css; i++)
-		if (CHIN(cs, i))
-			return((char)i);
-	assert(never);
-	return(0);		/* arbitrary */
-}
-
-/*
- - nch - number of characters in a set
- == static int nch(register struct parse *p, register cset *cs);
- */
-static int
-nch(p, cs)
-register struct parse *p;
-register cset *cs;
-{
-	register int i;
-	register size_t css = (size_t)p->g->csetsize;
-	register int n = 0;
-
-	for (i = 0; i < css; i++)
-		if (CHIN(cs, i))
-			n++;
-	return(n);
-}
-
-/*
- - mcadd - add a collating element to a cset
- == static void mcadd(register struct parse *p, register cset *cs, \
- ==	register char *cp);
- */
-static void
-mcadd(p, cs, cp)
-register struct parse *p;
-register cset *cs;
-register char *cp;
-{
-	register size_t oldend = cs->smultis;
-
-	cs->smultis += strlen(cp) + 1;
-	if (cs->multis == NULL)
-		cs->multis = malloc(cs->smultis);
-	else
-		cs->multis = realloc(cs->multis, cs->smultis);
-	if (cs->multis == NULL) {
-		SETERROR(REG_ESPACE);
-		return;
-	}
-
-	(void) strcpy(cs->multis + oldend - 1, cp);
-	cs->multis[cs->smultis - 1] = '\0';
-}
-
-/*
- - mcsub - subtract a collating element from a cset
- == static void mcsub(register cset *cs, register char *cp);
- */
-static void
-mcsub(cs, cp)
-register cset *cs;
-register char *cp;
-{
-	register char *fp = mcfind(cs, cp);
-	register size_t len = strlen(fp);
-
-	assert(fp != NULL);
-	(void) memmove(fp, fp + len + 1,
-				cs->smultis - (fp + len + 1 - cs->multis));
-	cs->smultis -= len;
-
-	if (cs->smultis == 0) {
-		free(cs->multis);
-		cs->multis = NULL;
-		return;
-	}
-
-	cs->multis = realloc(cs->multis, cs->smultis);
-	assert(cs->multis != NULL);
-}
-
-/*
- - mcin - is a collating element in a cset?
- == static int mcin(register cset *cs, register char *cp);
- */
-static int
-mcin(cs, cp)
-register cset *cs;
-register char *cp;
-{
-	return(mcfind(cs, cp) != NULL);
-}
-
-/*
- - mcfind - find a collating element in a cset
- == static char *mcfind(register cset *cs, register char *cp);
- */
-static char *
-mcfind(cs, cp)
-register cset *cs;
-register char *cp;
-{
-	register char *p;
-
-	if (cs->multis == NULL)
-		return(NULL);
-	for (p = cs->multis; *p != '\0'; p += strlen(p) + 1)
-		if (strcmp(cp, p) == 0)
-			return(p);
-	return(NULL);
-}
-
-/*
- - mcinvert - invert the list of collating elements in a cset
- == static void mcinvert(register struct parse *p, register cset *cs);
- *
- * This would have to know the set of possibilities.  Implementation
- * is deferred.
- */
-static void
-mcinvert(p, cs)
-register struct parse *p;
-register cset *cs;
-{
-	assert(cs->multis == NULL);	/* xxx */
-}
-
-/*
- - mccase - add case counterparts of the list of collating elements in a cset
- == static void mccase(register struct parse *p, register cset *cs);
- *
- * This would have to know the set of possibilities.  Implementation
- * is deferred.
- */
-static void
-mccase(p, cs)
-register struct parse *p;
-register cset *cs;
-{
-	assert(cs->multis == NULL);	/* xxx */
-}
-
-/*
- - isinsets - is this character in any sets?
- == static int isinsets(register struct re_guts *g, int c);
- */
-static int			/* predicate */
-isinsets(g, c)
-register struct re_guts *g;
-int c;
-{
-	register uch *col;
-	register int i;
-	register int ncols = (g->ncsets+(CHAR_BIT-1)) / CHAR_BIT;
-	register unsigned uc = (unsigned char)c;
-
-	for (i = 0, col = g->setbits; i < ncols; i++, col += g->csetsize)
-		if (col[uc] != 0)
-			return(1);
-	return(0);
-}
-
-/*
- - samesets - are these two characters in exactly the same sets?
- == static int samesets(register struct re_guts *g, int c1, int c2);
- */
-static int			/* predicate */
-samesets(g, c1, c2)
-register struct re_guts *g;
-int c1;
-int c2;
-{
-	register uch *col;
-	register int i;
-	register int ncols = (g->ncsets+(CHAR_BIT-1)) / CHAR_BIT;
-	register unsigned uc1 = (unsigned char)c1;
-	register unsigned uc2 = (unsigned char)c2;
-
-	for (i = 0, col = g->setbits; i < ncols; i++, col += g->csetsize)
-		if (col[uc1] != col[uc2])
-			return(0);
-	return(1);
-}
-
-/*
- - categorize - sort out character categories
- == static void categorize(struct parse *p, register struct re_guts *g);
- */
-static void
-categorize(p, g)
-struct parse *p;
-register struct re_guts *g;
-{
-	register cat_t *cats = g->categories;
-	register int c;
-	register int c2;
-	register cat_t cat;
-
-	/* avoid making error situations worse */
-	if (p->error != 0)
-		return;
-
-	for (c = CHAR_MIN; c <= CHAR_MAX; c++)
-		if (cats[c] == 0 && isinsets(g, c)) {
-			cat = g->ncategories++;
-			cats[c] = cat;
-			for (c2 = c+1; c2 <= CHAR_MAX; c2++)
-				if (cats[c2] == 0 && samesets(g, c, c2))
-					cats[c2] = cat;
-		}
-}
-
-/*
- - dupl - emit a duplicate of a bunch of sops
- == static sopno dupl(register struct parse *p, sopno start, sopno finish);
- */
-static sopno			/* start of duplicate */
-dupl(p, start, finish)
-register struct parse *p;
-sopno start;			/* from here */
-sopno finish;			/* to this less one */
-{
-	register sopno ret = HERE();
-	register sopno len = finish - start;
-
-	assert(finish >= start);
-	if (len == 0)
-		return(ret);
-	enlarge(p, p->ssize + len);	/* this many unexpected additions */
-	assert(p->ssize >= p->slen + len);
-	(void) memcpy((char *)(p->strip + p->slen),
-		(char *)(p->strip + start), (size_t)len*sizeof(sop));
-	p->slen += len;
-	return(ret);
-}
-
-/*
- - doemit - emit a strip operator
- == static void doemit(register struct parse *p, sop op, size_t opnd);
- *
- * It might seem better to implement this as a macro with a function as
- * hard-case backup, but it's just too big and messy unless there are
- * some changes to the data structures.  Maybe later.
- */
-static void
-doemit(p, op, opnd)
-register struct parse *p;
-sop op;
-size_t opnd;
-{
-	/* avoid making error situations worse */
-	if (p->error != 0)
-		return;
-
-	/* deal with oversize operands ("can't happen", more or less) */
-	assert(opnd < 1<<OPSHIFT);
-
-	/* deal with undersized strip */
-	if (p->slen >= p->ssize)
-		enlarge(p, (p->ssize+1) / 2 * 3);	/* +50% */
-	assert(p->slen < p->ssize);
-
-	/* finally, it's all reduced to the easy case */
-	p->strip[p->slen++] = SOP(op, opnd);
-}
-
-/*
- - doinsert - insert a sop into the strip
- == static void doinsert(register struct parse *p, sop op, size_t opnd, sopno pos);
- */
-static void
-doinsert(p, op, opnd, pos)
-register struct parse *p;
-sop op;
-size_t opnd;
-sopno pos;
-{
-	register sopno sn;
-	register sop s;
-	register int i;
-
-	/* avoid making error situations worse */
-	if (p->error != 0)
-		return;
-
-	sn = HERE();
-	EMIT(op, opnd);		/* do checks, ensure space */
-	assert(HERE() == sn+1);
-	s = p->strip[sn];
-
-	/* adjust paren pointers */
-	assert(pos > 0);
-	for (i = 1; i < NPAREN; i++) {
-		if (p->pbegin[i] >= pos) {
-			p->pbegin[i]++;
-		}
-		if (p->pend[i] >= pos) {
-			p->pend[i]++;
-		}
-	}
-
-	memmove((char *)&p->strip[pos+1], (char *)&p->strip[pos],
-						(HERE()-pos-1)*sizeof(sop));
-	p->strip[pos] = s;
-}
-
-/*
- - dofwd - complete a forward reference
- == static void dofwd(register struct parse *p, sopno pos, sop value);
- */
-static void
-dofwd(p, pos, value)
-register struct parse *p;
-register sopno pos;
-sop value;
-{
-	/* avoid making error situations worse */
-	if (p->error != 0)
-		return;
-
-	assert(value < 1<<OPSHIFT);
-	p->strip[pos] = OP(p->strip[pos]) | value;
-}
-
-/*
- - enlarge - enlarge the strip
- == static void enlarge(register struct parse *p, sopno size);
- */
-static void
-enlarge(p, size)
-register struct parse *p;
-register sopno size;
-{
-	register sop *sp;
-
-	if (p->ssize >= size)
-		return;
-
-	sp = (sop *)realloc(p->strip, size*sizeof(sop));
-	if (sp == NULL) {
-		SETERROR(REG_ESPACE);
-		return;
-	}
-	p->strip = sp;
-	p->ssize = size;
-}
-
-/*
- - stripsnug - compact the strip
- == static void stripsnug(register struct parse *p, register struct re_guts *g);
- */
-static void
-stripsnug(p, g)
-register struct parse *p;
-register struct re_guts *g;
-{
-	g->nstates = p->slen;
-	g->strip = (sop *)realloc((char *)p->strip, p->slen * sizeof(sop));
-	if (g->strip == NULL) {
-		SETERROR(REG_ESPACE);
-		g->strip = p->strip;
-	}
-}
-
-/*
- - findmust - fill in must and mlen with longest mandatory literal string
- == static void findmust(register struct parse *p, register struct re_guts *g);
- *
- * This algorithm could do fancy things like analyzing the operands of |
- * for common subsequences.  Someday.  This code is simple and finds most
- * of the interesting cases.
- *
- * Note that must and mlen got initialized during setup.
- */
-static void
-findmust(p, g)
-struct parse *p;
-register struct re_guts *g;
-{
-	register sop *scan;
-	sop *start;
-	register sop *newstart;
-	register sopno newlen;
-	register sop s;
-	register char *cp;
-	register sopno i;
-
-	/* avoid making error situations worse */
-	if (p->error != 0)
-		return;
-
-	/* find the longest OCHAR sequence in strip */
-	newlen = 0;
-	scan = g->strip + 1;
-	do {
-		s = *scan++;
-		switch (OP(s)) {
-		case OCHAR:		/* sequence member */
-			if (newlen == 0)		/* new sequence */
-				newstart = scan - 1;
-			newlen++;
-			break;
-		case OPLUS_:		/* things that don't break one */
-		case OLPAREN:
-		case ORPAREN:
-			break;
-		case OQUEST_:		/* things that must be skipped */
-		case OCH_:
-			scan--;
-			do {
-				scan += OPND(s);
-				s = *scan;
-				/* assert() interferes w debug printouts */
-				if (OP(s) != O_QUEST && OP(s) != O_CH &&
-							OP(s) != OOR2) {
-					g->iflags |= BAD;
-					return;
-				}
-			} while (OP(s) != O_QUEST && OP(s) != O_CH);
-			/* fallthrough */
-		default:		/* things that break a sequence */
-			if (newlen > g->mlen) {		/* ends one */
-				start = newstart;
-				g->mlen = newlen;
-			}
-			newlen = 0;
-			break;
-		}
-	} while (OP(s) != OEND);
-
-	if (g->mlen == 0)		/* there isn't one */
-		return;
-
-	/* turn it into a character string */
-	g->must = malloc((size_t)g->mlen + 1);
-	if (g->must == NULL) {		/* argh; just forget it */
-		g->mlen = 0;
-		return;
-	}
-	cp = g->must;
-	scan = start;
-	for (i = g->mlen; i > 0; i--) {
-		while (OP(s = *scan++) != OCHAR)
-			continue;
-		assert(cp < g->must + g->mlen);
-		*cp++ = (char)OPND(s);
-	}
-	assert(cp == g->must + g->mlen);
-	*cp++ = '\0';		/* just on general principles */
-}
-
-/*
- - pluscount - count + nesting
- == static sopno pluscount(register struct parse *p, register struct re_guts *g);
- */
-static sopno			/* nesting depth */
-pluscount(p, g)
-struct parse *p;
-register struct re_guts *g;
-{
-	register sop *scan;
-	register sop s;
-	register sopno plusnest = 0;
-	register sopno maxnest = 0;
-
-	if (p->error != 0)
-		return(0);	/* there may not be an OEND */
-
-	scan = g->strip + 1;
-	do {
-		s = *scan++;
-		switch (OP(s)) {
-		case OPLUS_:
-			plusnest++;
-			break;
-		case O_PLUS:
-			if (plusnest > maxnest)
-				maxnest = plusnest;
-			plusnest--;
-			break;
-		}
-	} while (OP(s) != OEND);
-	if (plusnest != 0)
-		g->iflags |= BAD;
-	return(maxnest);
-}
-
-/*
- * $PchId: regcomp.c,v 1.2 1996/03/12 19:10:15 philip Exp $
- */
Index: trunk/minix/lib/regex/regerror.c
===================================================================
--- trunk/minix/lib/regex/regerror.c	(revision 9)
+++ 	(revision )
@@ -1,188 +1,0 @@
-/*-
- * Copyright (c) 1992, 1993, 1994 Henry Spencer.
- * Copyright (c) 1992, 1993, 1994
- *	The Regents of the University of California.  All rights reserved.
- *
- * This code is derived from software contributed to Berkeley by
- * Henry Spencer.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- *    must display the following acknowledgement:
- *	This product includes software developed by the University of
- *	California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- *    may be used to endorse or promote products derived from this software
- *    without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- *	@(#)regerror.c	8.4 (Berkeley) 3/20/94
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)regerror.c	8.4 (Berkeley) 3/20/94";
-#endif /* LIBC_SCCS and not lint */
-
-#include <sys/types.h>
-#include <stdio.h>
-#include <string.h>
-#ifdef __minix_vmd
-#include <bsd/asciictype.h>
-#else
-#include <ctype.h>
-#endif
-#include <limits.h>
-#include <stdlib.h>
-#include <regex.h>
-
-#include "utils.h"
-
-/* ========= begin header generated by ./mkh ========= */
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/* === regerror.c === */
-static char *regatoi(const regex_t *preg, char *localbuf);
-
-#ifdef __cplusplus
-}
-#endif
-/* ========= end header generated by ./mkh ========= */
-/*
- = #define	REG_NOMATCH	 1
- = #define	REG_BADPAT	 2
- = #define	REG_ECOLLATE	 3
- = #define	REG_ECTYPE	 4
- = #define	REG_EESCAPE	 5
- = #define	REG_ESUBREG	 6
- = #define	REG_EBRACK	 7
- = #define	REG_EPAREN	 8
- = #define	REG_EBRACE	 9
- = #define	REG_BADBR	10
- = #define	REG_ERANGE	11
- = #define	REG_ESPACE	12
- = #define	REG_BADRPT	13
- = #define	REG_EMPTY	14
- = #define	REG_ASSERT	15
- = #define	REG_INVARG	16
- = #define	REG_ATOI	255	// convert name to number (!)
- = #define	REG_ITOA	0400	// convert number to name (!)
- */
-static struct rerr {
-	int code;
-	char *name;
-	char *explain;
-} rerrs[] = {
-	REG_NOMATCH,	"REG_NOMATCH",	"regexec() failed to match",
-	REG_BADPAT,	"REG_BADPAT",	"invalid regular expression",
-	REG_ECOLLATE,	"REG_ECOLLATE",	"invalid collating element",
-	REG_ECTYPE,	"REG_ECTYPE",	"invalid character class",
-	REG_EESCAPE,	"REG_EESCAPE",	"trailing backslash (\\)",
-	REG_ESUBREG,	"REG_ESUBREG",	"invalid backreference number",
-	REG_EBRACK,	"REG_EBRACK",	"brackets ([ ]) not balanced",
-	REG_EPAREN,	"REG_EPAREN",	"parentheses not balanced",
-	REG_EBRACE,	"REG_EBRACE",	"braces not balanced",
-	REG_BADBR,	"REG_BADBR",	"invalid repetition count(s)",
-	REG_ERANGE,	"REG_ERANGE",	"invalid character range",
-	REG_ESPACE,	"REG_ESPACE",	"out of memory",
-	REG_BADRPT,	"REG_BADRPT",	"repetition-operator operand invalid",
-	REG_EMPTY,	"REG_EMPTY",	"empty (sub)expression",
-	REG_ASSERT,	"REG_ASSERT",	"\"can't happen\" -- you found a bug",
-	REG_INVARG,	"REG_INVARG",	"invalid argument to regex routine",
-	0,		"",		"*** unknown regexp error code ***",
-};
-
-/*
- - regerror - the interface to error numbers
- = extern size_t regerror(int, const regex_t *, char *, size_t);
- */
-/* ARGSUSED */
-size_t
-regerror(errcode, preg, errbuf, errbuf_size)
-int errcode;
-const regex_t *preg;
-char *errbuf;
-size_t errbuf_size;
-{
-	register struct rerr *r;
-	register size_t len;
-	register int target = errcode &~ REG_ITOA;
-	register char *s;
-	char convbuf[50];
-
-	if (errcode == REG_ATOI)
-		s = regatoi(preg, convbuf);
-	else {
-		for (r = rerrs; r->code != 0; r++)
-			if (r->code == target)
-				break;
-	
-		if (errcode&REG_ITOA) {
-			if (r->code != 0)
-				(void) strcpy(convbuf, r->name);
-			else
-				sprintf(convbuf, "REG_0x%x", target);
-			assert(strlen(convbuf) < sizeof(convbuf));
-			s = convbuf;
-		} else
-			s = r->explain;
-	}
-
-	len = strlen(s) + 1;
-	if (errbuf_size > 0) {
-		if (errbuf_size > len)
-			(void) strcpy(errbuf, s);
-		else {
-			(void) strncpy(errbuf, s, errbuf_size-1);
-			errbuf[errbuf_size-1] = '\0';
-		}
-	}
-
-	return(len);
-}
-
-/*
- - regatoi - internal routine to implement REG_ATOI
- == static char *regatoi(const regex_t *preg, char *localbuf);
- */
-static char *
-regatoi(preg, localbuf)
-const regex_t *preg;
-char *localbuf;
-{
-	register struct rerr *r;
-	register size_t siz;
-	register char *p;
-
-	for (r = rerrs; r->code != 0; r++)
-		if (strcmp(r->name, preg->re_endp) == 0)
-			break;
-	if (r->code == 0)
-		return("0");
-
-	sprintf(localbuf, "%d", r->code);
-	return(localbuf);
-}
-
-/*
- * $PchId: regerror.c,v 1.2 1996/03/12 19:10:15 philip Exp $
- */
Index: trunk/minix/lib/regex/regex.3
===================================================================
--- trunk/minix/lib/regex/regex.3	(revision 9)
+++ 	(revision )
@@ -1,541 +1,0 @@
-.\" Copyright (c) 1992, 1993, 1994 Henry Spencer.
-.\" Copyright (c) 1992, 1993, 1994
-.\"	The Regents of the University of California.  All rights reserved.
-.\"
-.\" This code is derived from software contributed to Berkeley by
-.\" Henry Spencer.
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\"    notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\"    notice, this list of conditions and the following disclaimer in the
-.\"    documentation and/or other materials provided with the distribution.
-.\" 3. All advertising materials mentioning features or use of this software
-.\"    must display the following acknowledgement:
-.\"	This product includes software developed by the University of
-.\"	California, Berkeley and its contributors.
-.\" 4. Neither the name of the University nor the names of its contributors
-.\"    may be used to endorse or promote products derived from this software
-.\"    without specific prior written permission.
-.\"
-.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
-.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-.\" ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
-.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-.\" SUCH DAMAGE.
-.\"
-.\"	@(#)regex.3	8.4 (Berkeley) 3/20/94
-.\"
-.TH REGEX 3 "March 20, 1994"
-.de ZR
-.\" one other place knows this name:  the SEE ALSO section
-.BR re_format (7) \\$1
-..
-.SH NAME
-regex, regcomp, regexec, regerror, regfree \- regular-expression library
-.SH SYNOPSIS
-.ft B
-.\".na
-#include <sys/types.h>
-.br
-#include <regex.h>
-.sp
-.in +.5i
-.ti -.5i
-int regcomp(regex_t *\fIpreg\fP, const char *\fIpattern\fP, int \fIcflags\fP);
-.ti -.5i
-int regexec(const regex_t *\fIpreg\fP, const char *\fIstring\fP,
-size_t \fInmatch\fP, regmatch_t \fIpmatch\fP[], int \fIeflags\fP);
-.ti -.5i
-size_t regerror(int \fIerrcode\fP, const regex_t *\fIpreg\fP,
-char *\fIerrbuf\fP, size_t \fIerrbuf_size\fP);
-.ti -.5i
-void regfree(regex_t *\fIpreg\fP);
-.in -.5i
-.ft R
-.SH DESCRIPTION
-These routines implement POSIX 1003.2 regular expressions (``RE''s);
-see
-.ZR .
-.B Regcomp
-compiles an RE written as a string into an internal form,
-.B regexec
-matches that internal form against a string and reports results,
-.B regerror
-transforms error codes from either into human-readable messages,
-and
-.B regfree
-frees any dynamically-allocated storage used by the internal form
-of an RE.
-.PP
-The header
-.I <regex.h>
-declares two structure types,
-.B regex_t
-and
-.BR regmatch_t ,
-the former for compiled internal forms and the latter for match reporting.
-It also declares the four functions,
-a type
-.BR regoff_t ,
-and a number of constants with names starting with ``REG_''.
-.PP
-.B Regcomp
-compiles the regular expression contained in the
-.I pattern
-string,
-subject to the flags in
-.IR cflags ,
-and places the results in the
-.B regex_t
-structure pointed to by
-.IR preg .
-.I Cflags
-is the bitwise OR of zero or more of the following flags:
-.IP REG_EXTENDED \w'REG_EXTENDED'u+2n
-Compile modern (``extended'') REs,
-rather than the obsolete (``basic'') REs that
-are the default.
-.IP REG_BASIC
-This is a synonym for 0,
-provided as a counterpart to REG_EXTENDED to improve readability.
-.IP REG_NOSPEC
-Compile with recognition of all special characters turned off.
-All characters are thus considered ordinary,
-so the ``RE'' is a literal string.
-This is an extension,
-compatible with but not specified by POSIX 1003.2,
-and should be used with
-caution in software intended to be portable to other systems.
-REG_EXTENDED and REG_NOSPEC may not be used
-in the same call to
-.IR regcomp .
-.IP REG_ICASE
-Compile for matching that ignores upper/lower case distinctions.
-See
-.ZR .
-.IP REG_NOSUB
-Compile for matching that need only report success or failure,
-not what was matched.
-.IP REG_NEWLINE
-Compile for newline-sensitive matching.
-By default, newline is a completely ordinary character with no special
-meaning in either REs or strings.
-With this flag,
-`[^' bracket expressions and `.' never match newline,
-a `^' anchor matches the null string after any newline in the string
-in addition to its normal function,
-and the `$' anchor matches the null string before any newline in the
-string in addition to its normal function.
-.IP REG_PEND
-The regular expression ends,
-not at the first NUL,
-but just before the character pointed to by the
-.B re_endp
-member of the structure pointed to by
-.IR preg .
-The
-.B re_endp
-member is of type
-.BR "const\ char\ *" .
-This flag permits inclusion of NULs in the RE;
-they are considered ordinary characters.
-This is an extension,
-compatible with but not specified by POSIX 1003.2,
-and should be used with
-caution in software intended to be portable to other systems.
-.PP
-When successful,
-.B regcomp
-returns 0 and fills in the structure pointed to by
-.IR preg .
-One member of that structure
-(other than
-.BR re_endp )
-is publicized:
-.BR re_nsub ,
-of type
-.BR size_t ,
-contains the number of parenthesized subexpressions within the RE
-(except that the value of this member is undefined if the
-REG_NOSUB flag was used).
-If
-.B regcomp
-fails, it returns a non-zero error code;
-see DIAGNOSTICS.
-.PP
-.B Regexec
-matches the compiled RE pointed to by
-.I preg
-against the
-.IR string ,
-subject to the flags in
-.IR eflags ,
-and reports results using
-.IR nmatch ,
-.IR pmatch ,
-and the returned value.
-The RE must have been compiled by a previous invocation of
-.BR regcomp .
-The compiled form is not altered during execution of
-.BR regexec ,
-so a single compiled RE can be used simultaneously by multiple threads.
-.PP
-By default,
-the NUL-terminated string pointed to by
-.I string
-is considered to be the text of an entire line, minus any terminating
-newline.
-The
-.I eflags
-argument is the bitwise OR of zero or more of the following flags:
-.IP REG_NOTBOL \w'REG_STARTEND'u+2n
-The first character of
-the string
-is not the beginning of a line, so the `^' anchor should not match before it.
-This does not affect the behavior of newlines under REG_NEWLINE.
-.IP REG_NOTEOL
-The NUL terminating
-the string
-does not end a line, so the `$' anchor should not match before it.
-This does not affect the behavior of newlines under REG_NEWLINE.
-.IP REG_STARTEND
-The string is considered to start at
-\fIstring\fR\ + \fIpmatch\fR[0].\fBrm_so\fR
-and to have a terminating NUL located at
-\fIstring\fR\ + \fIpmatch\fR[0].\fBrm_eo\fR
-(there need not actually be a NUL at that location),
-regardless of the value of
-.IR nmatch .
-See below for the definition of
-.IR pmatch
-and
-.IR nmatch .
-This is an extension,
-compatible with but not specified by POSIX 1003.2,
-and should be used with
-caution in software intended to be portable to other systems.
-Note that a non-zero \fBrm_so\fR does not imply REG_NOTBOL;
-REG_STARTEND affects only the location of the string,
-not how it is matched.
-.PP
-See
-.ZR
-for a discussion of what is matched in situations where an RE or a
-portion thereof could match any of several substrings of
-.IR string .
-.PP
-Normally,
-.B regexec
-returns 0 for success and the non-zero code REG_NOMATCH for failure.
-Other non-zero error codes may be returned in exceptional situations;
-see DIAGNOSTICS.
-.PP
-If REG_NOSUB was specified in the compilation of the RE,
-or if
-.I nmatch
-is 0,
-.B regexec
-ignores the
-.I pmatch
-argument (but see below for the case where REG_STARTEND is specified).
-Otherwise,
-.I pmatch
-points to an array of
-.I nmatch
-structures of type
-.BR regmatch_t .
-Such a structure has at least the members
-.B rm_so
-and
-.BR rm_eo ,
-both of type
-.B regoff_t
-(a signed arithmetic type at least as large as an
-.B off_t
-and a
-.BR ssize_t ),
-containing respectively the offset of the first character of a substring
-and the offset of the first character after the end of the substring.
-Offsets are measured from the beginning of the
-.I string
-argument given to
-.BR regexec .
-An empty substring is denoted by equal offsets,
-both indicating the character following the empty substring.
-.PP
-The 0th member of the
-.I pmatch
-array is filled in to indicate what substring of
-.I string
-was matched by the entire RE.
-Remaining members report what substring was matched by parenthesized
-subexpressions within the RE;
-member
-.I i
-reports subexpression
-.IR i ,
-with subexpressions counted (starting at 1) by the order of their opening
-parentheses in the RE, left to right.
-Unused entries in the array\(emcorresponding either to subexpressions that
-did not participate in the match at all, or to subexpressions that do not
-exist in the RE (that is, \fIi\fR\ > \fIpreg\fR\->\fBre_nsub\fR)\(emhave both
-.B rm_so
-and
-.B rm_eo
-set to \-1.
-If a subexpression participated in the match several times,
-the reported substring is the last one it matched.
-(Note, as an example in particular, that when the RE `(b*)+' matches `bbb',
-the parenthesized subexpression matches each of the three `b's and then
-an infinite number of empty strings following the last `b',
-so the reported substring is one of the empties.)
-.PP
-If REG_STARTEND is specified,
-.I pmatch
-must point to at least one
-.B regmatch_t
-(even if
-.I nmatch
-is 0 or REG_NOSUB was specified),
-to hold the input offsets for REG_STARTEND.
-Use for output is still entirely controlled by
-.IR nmatch ;
-if
-.I nmatch
-is 0 or REG_NOSUB was specified,
-the value of
-.IR pmatch [0]
-will not be changed by a successful
-.BR regexec .
-.PP
-.B Regerror
-maps a non-zero
-.I errcode
-from either
-.B regcomp
-or
-.B regexec
-to a human-readable, printable message.
-If
-.I preg
-is non-NULL,
-the error code should have arisen from use of
-the
-.B regex_t
-pointed to by
-.IR preg ,
-and if the error code came from
-.BR regcomp ,
-it should have been the result from the most recent
-.B regcomp
-using that
-.BR regex_t .
-.RI ( Regerror
-may be able to supply a more detailed message using information
-from the
-.BR regex_t .)
-.B Regerror
-places the NUL-terminated message into the buffer pointed to by
-.IR errbuf ,
-limiting the length (including the NUL) to at most
-.I errbuf_size
-bytes.
-If the whole message won't fit,
-as much of it as will fit before the terminating NUL is supplied.
-In any case,
-the returned value is the size of buffer needed to hold the whole
-message (including terminating NUL).
-If
-.I errbuf_size
-is 0,
-.I errbuf
-is ignored but the return value is still correct.
-.PP
-If the
-.I errcode
-given to
-.B regerror
-is first ORed with REG_ITOA,
-the ``message'' that results is the printable name of the error code,
-e.g. ``REG_NOMATCH'',
-rather than an explanation thereof.
-If
-.I errcode
-is REG_ATOI,
-then
-.I preg
-shall be non-NULL and the
-.B re_endp
-member of the structure it points to
-must point to the printable name of an error code;
-in this case, the result in
-.I errbuf
-is the decimal digits of
-the numeric value of the error code
-(0 if the name is not recognized).
-REG_ITOA and REG_ATOI are intended primarily as debugging facilities;
-they are extensions,
-compatible with but not specified by POSIX 1003.2,
-and should be used with
-caution in software intended to be portable to other systems.
-Be warned also that they are considered experimental and changes are possible.
-.PP
-.B Regfree
-frees any dynamically-allocated storage associated with the compiled RE
-pointed to by
-.IR preg .
-The remaining
-.B regex_t
-is no longer a valid compiled RE
-and the effect of supplying it to
-.B regexec
-or
-.B regerror
-is undefined.
-.PP
-None of these functions references global variables except for tables
-of constants;
-all are safe for use from multiple threads if the arguments are safe.
-.SH IMPLEMENTATION CHOICES
-There are a number of decisions that 1003.2 leaves up to the implementor,
-either by explicitly saying ``undefined'' or by virtue of them being
-forbidden by the RE grammar.
-This implementation treats them as follows.
-.PP
-See
-.ZR
-for a discussion of the definition of case-independent matching.
-.PP
-There is no particular limit on the length of REs,
-except insofar as memory is limited.
-Memory usage is approximately linear in RE size, and largely insensitive
-to RE complexity, except for bounded repetitions.
-See BUGS for one short RE using them
-that will run almost any system out of memory.
-.PP
-A backslashed character other than one specifically given a magic meaning
-by 1003.2 (such magic meanings occur only in obsolete [``basic''] REs)
-is taken as an ordinary character.
-.PP
-Any unmatched [ is a REG_EBRACK error.
-.PP
-Equivalence classes cannot begin or end bracket-expression ranges.
-The endpoint of one range cannot begin another.
-.PP
-RE_DUP_MAX, the limit on repetition counts in bounded repetitions, is 255.
-.PP
-A repetition operator (?, *, +, or bounds) cannot follow another
-repetition operator.
-A repetition operator cannot begin an expression or subexpression
-or follow `^' or `|'.
-.PP
-`|' cannot appear first or last in a (sub)expression or after another `|',
-i.e. an operand of `|' cannot be an empty subexpression.
-An empty parenthesized subexpression, `()', is legal and matches an
-empty (sub)string.
-An empty string is not a legal RE.
-.PP
-A `{' followed by a digit is considered the beginning of bounds for a
-bounded repetition, which must then follow the syntax for bounds.
-A `{' \fInot\fR followed by a digit is considered an ordinary character.
-.PP
-`^' and `$' beginning and ending subexpressions in obsolete (``basic'')
-REs are anchors, not ordinary characters.
-.SH SEE ALSO
-.BR grep (1),
-.BR re_format (7).
-.PP
-POSIX 1003.2, sections 2.8 (Regular Expression Notation)
-and
-B.5 (C Binding for Regular Expression Matching).
-.SH DIAGNOSTICS
-Non-zero error codes from
-.B regcomp
-and
-.B regexec
-include the following:
-.PP
-.nf
-.ta \w'REG_ECOLLATE'u+3n
-REG_NOMATCH	regexec() failed to match
-REG_BADPAT	invalid regular expression
-REG_ECOLLATE	invalid collating element
-REG_ECTYPE	invalid character class
-REG_EESCAPE	\e applied to unescapable character
-REG_ESUBREG	invalid backreference number
-REG_EBRACK	brackets [ ] not balanced
-REG_EPAREN	parentheses ( ) not balanced
-REG_EBRACE	braces { } not balanced
-REG_BADBR	invalid repetition count(s) in { }
-REG_ERANGE	invalid character range in [ ]
-REG_ESPACE	ran out of memory
-REG_BADRPT	?, *, or + operand invalid
-REG_EMPTY	empty (sub)expression
-REG_ASSERT	``can't happen''\(emyou found a bug
-REG_INVARG	invalid argument, e.g. negative-length string
-.fi
-.SH HISTORY
-Originally written by Henry Spencer.
-Altered for inclusion in the 4.4BSD distribution.
-.SH BUGS
-This is an alpha release with known defects.
-Please report problems.
-.PP
-There is one known functionality bug.
-The implementation of internationalization is incomplete:
-the locale is always assumed to be the default one of 1003.2,
-and only the collating elements etc. of that locale are available.
-.PP
-The back-reference code is subtle and doubts linger about its correctness
-in complex cases.
-.PP
-.B Regexec
-performance is poor.
-This will improve with later releases.
-.I Nmatch
-exceeding 0 is expensive;
-.I nmatch
-exceeding 1 is worse.
-.B Regexec
-is largely insensitive to RE complexity \fIexcept\fR that back
-references are massively expensive.
-RE length does matter; in particular, there is a strong speed bonus
-for keeping RE length under about 30 characters,
-with most special characters counting roughly double.
-.PP
-.B Regcomp
-implements bounded repetitions by macro expansion,
-which is costly in time and space if counts are large
-or bounded repetitions are nested.
-An RE like, say,
-`((((a{1,100}){1,100}){1,100}){1,100}){1,100}'
-will (eventually) run almost any existing machine out of swap space.
-.PP
-There are suspected problems with response to obscure error conditions.
-Notably,
-certain kinds of internal overflow,
-produced only by truly enormous REs or by multiply nested bounded repetitions,
-are probably not handled well.
-.PP
-Due to a mistake in 1003.2, things like `a)b' are legal REs because `)' is
-a special character only in the presence of a previous unmatched `('.
-This can't be fixed until the spec is fixed.
-.PP
-The standard's definition of back references is vague.
-For example, does
-`a\e(\e(b\e)*\e2\e)*d' match `abbbd'?
-Until the standard is clarified,
-behavior in such cases should not be relied on.
-.PP
-The implementation of word-boundary matching is a bit of a kludge,
-and bugs may lurk in combinations of word-boundary matching and anchoring.
Index: trunk/minix/lib/regex/regex2.h
===================================================================
--- trunk/minix/lib/regex/regex2.h	(revision 9)
+++ 	(revision )
@@ -1,173 +1,0 @@
-/*-
- * Copyright (c) 1992, 1993, 1994 Henry Spencer.
- * Copyright (c) 1992, 1993, 1994
- *	The Regents of the University of California.  All rights reserved.
- *
- * This code is derived from software contributed to Berkeley by
- * Henry Spencer.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- *    must display the following acknowledgement:
- *	This product includes software developed by the University of
- *	California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- *    may be used to endorse or promote products derived from this software
- *    without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- *	@(#)regex2.h	8.4 (Berkeley) 3/20/94
- */
-
-/*
- * First, the stuff that ends up in the outside-world include file
- = typedef off_t regoff_t;
- = typedef struct {
- = 	int re_magic;
- = 	size_t re_nsub;		// number of parenthesized subexpressions
- = 	const char *re_endp;	// end pointer for REG_PEND
- = 	struct re_guts *re_g;	// none of your business :-)
- = } regex_t;
- = typedef struct {
- = 	regoff_t rm_so;		// start of match
- = 	regoff_t rm_eo;		// end of match
- = } regmatch_t;
- */
-/*
- * internals of regex_t
- */
-#define	MAGIC1	((('r'^0200)<<8) | 'e')
-
-/*
- * The internal representation is a *strip*, a sequence of
- * operators ending with an endmarker.  (Some terminology etc. is a
- * historical relic of earlier versions which used multiple strips.)
- * Certain oddities in the representation are there to permit running
- * the machinery backwards; in particular, any deviation from sequential
- * flow must be marked at both its source and its destination.  Some
- * fine points:
- *
- * - OPLUS_ and O_PLUS are *inside* the loop they create.
- * - OQUEST_ and O_QUEST are *outside* the bypass they create.
- * - OCH_ and O_CH are *outside* the multi-way branch they create, while
- *   OOR1 and OOR2 are respectively the end and the beginning of one of
- *   the branches.  Note that there is an implicit OOR2 following OCH_
- *   and an implicit OOR1 preceding O_CH.
- *
- * In state representations, an operator's bit is on to signify a state
- * immediately *preceding* "execution" of that operator.
- */
-typedef unsigned long sop;	/* strip operator */
-typedef long sopno;
-#define	OPRMASK	0xf8000000
-#define	OPDMASK	0x07ffffff
-#define	OPSHIFT	((unsigned)27)
-#define	OP(n)	((n)&OPRMASK)
-#define	OPND(n)	((n)&OPDMASK)
-#define	SOP(op, opnd)	((op)|(opnd))
-/* operators			   meaning	operand			*/
-/*						(back, fwd are offsets)	*/
-#define	OEND	(1<<OPSHIFT)	/* endmarker	-			*/
-#define	OCHAR	(2<<OPSHIFT)	/* character	unsigned char		*/
-#define	OBOL	(3<<OPSHIFT)	/* left anchor	-			*/
-#define	OEOL	(4<<OPSHIFT)	/* right anchor	-			*/
-#define	OANY	(5<<OPSHIFT)	/* .		-			*/
-#define	OANYOF	(6<<OPSHIFT)	/* [...]	set number		*/
-#define	OBACK_	(7<<OPSHIFT)	/* begin \d	paren number		*/
-#define	O_BACK	(8<<OPSHIFT)	/* end \d	paren number		*/
-#define	OPLUS_	(9<<OPSHIFT)	/* + prefix	fwd to suffix		*/
-#define	O_PLUS	(10<<OPSHIFT)	/* + suffix	back to prefix		*/
-#define	OQUEST_	(11<<OPSHIFT)	/* ? prefix	fwd to suffix		*/
-#define	O_QUEST	(12<<OPSHIFT)	/* ? suffix	back to prefix		*/
-#define	OLPAREN	(13<<OPSHIFT)	/* (		fwd to )		*/
-#define	ORPAREN	(14<<OPSHIFT)	/* )		back to (		*/
-#define	OCH_	(15<<OPSHIFT)	/* begin choice	fwd to OOR2		*/
-#define	OOR1	(16<<OPSHIFT)	/* | pt. 1	back to OOR1 or OCH_	*/
-#define	OOR2	(17<<OPSHIFT)	/* | pt. 2	fwd to OOR2 or O_CH	*/
-#define	O_CH	(18<<OPSHIFT)	/* end choice	back to OOR1		*/
-#define	OBOW	(19<<OPSHIFT)	/* begin word	-			*/
-#define	OEOW	(20<<OPSHIFT)	/* end word	-			*/
-
-/*
- * Structure for [] character-set representation.  Character sets are
- * done as bit vectors, grouped 8 to a byte vector for compactness.
- * The individual set therefore has both a pointer to the byte vector
- * and a mask to pick out the relevant bit of each byte.  A hash code
- * simplifies testing whether two sets could be identical.
- *
- * This will get trickier for multicharacter collating elements.  As
- * preliminary hooks for dealing with such things, we also carry along
- * a string of multi-character elements, and decide the size of the
- * vectors at run time.
- */
-typedef struct {
-	uch *ptr;		/* -> uch [csetsize] */
-	uch mask;		/* bit within array */
-	uch hash;		/* hash code */
-	size_t smultis;
-	char *multis;		/* -> char[smulti]  ab\0cd\0ef\0\0 */
-} cset;
-/* note that CHadd and CHsub are unsafe, and CHIN doesn't yield 0/1 */
-#define	CHadd(cs, c)	((cs)->ptr[(uch)(c)] |= (cs)->mask, (cs)->hash += (c))
-#define	CHsub(cs, c)	((cs)->ptr[(uch)(c)] &= ~(cs)->mask, (cs)->hash -= (c))
-#define	CHIN(cs, c)	((cs)->ptr[(uch)(c)] & (cs)->mask)
-#define	MCadd(p, cs, cp)	mcadd(p, cs, cp)	/* regcomp() internal fns */
-#define	MCsub(p, cs, cp)	mcsub(p, cs, cp)
-#define	MCin(p, cs, cp)	mcin(p, cs, cp)
-
-/* stuff for character categories */
-typedef unsigned char cat_t;
-
-/*
- * main compiled-expression structure
- */
-struct re_guts {
-	int magic;
-#		define	MAGIC2	((('R'^0200)<<8)|'E')
-	sop *strip;		/* malloced area for strip */
-	int csetsize;		/* number of bits in a cset vector */
-	int ncsets;		/* number of csets in use */
-	cset *sets;		/* -> cset [ncsets] */
-	uch *setbits;		/* -> uch[csetsize][ncsets/CHAR_BIT] */
-	int cflags;		/* copy of regcomp() cflags argument */
-	sopno nstates;		/* = number of sops */
-	sopno firststate;	/* the initial OEND (normally 0) */
-	sopno laststate;	/* the final OEND */
-	int iflags;		/* internal flags */
-#		define	USEBOL	01	/* used ^ */
-#		define	USEEOL	02	/* used $ */
-#		define	BAD	04	/* something wrong */
-	int nbol;		/* number of ^ used */
-	int neol;		/* number of $ used */
-	int ncategories;	/* how many character categories */
-	cat_t *categories;	/* ->catspace[-CHAR_MIN] */
-	char *must;		/* match must contain this string */
-	int mlen;		/* length of must */
-	size_t nsub;		/* copy of re_nsub */
-	int backrefs;		/* does it use back references? */
-	sopno nplus;		/* how deep does it nest +s? */
-	/* catspace must be last */
-	cat_t catspace[1];	/* actually [NC] */
-};
-
-/* misc utilities */
-#define	OUT	(CHAR_MAX+1)	/* a non-character value */
-#define	ISWORD(c)	(isalnum(c) || (c) == '_')
Index: trunk/minix/lib/regex/regexec.c
===================================================================
--- trunk/minix/lib/regex/regexec.c	(revision 9)
+++ 	(revision )
@@ -1,189 +1,0 @@
-/*-
- * Copyright (c) 1992, 1993, 1994 Henry Spencer.
- * Copyright (c) 1992, 1993, 1994
- *	The Regents of the University of California.  All rights reserved.
- *
- * This code is derived from software contributed to Berkeley by
- * Henry Spencer.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- *    must display the following acknowledgement:
- *	This product includes software developed by the University of
- *	California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- *    may be used to endorse or promote products derived from this software
- *    without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- *	@(#)regexec.c	8.3 (Berkeley) 3/20/94
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)regexec.c	8.3 (Berkeley) 3/20/94";
-#endif /* LIBC_SCCS and not lint */
-
-/*
- * the outer shell of regexec()
- *
- * This file includes engine.c *twice*, after muchos fiddling with the
- * macros that code uses.  This lets the same code operate on two different
- * representations for state sets.
- */
-#include <sys/types.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <limits.h>
-#ifdef __minix_vmd
-#include <bsd/asciictype.h>
-#else
-#include <ctype.h>
-#endif
-#include <regex.h>
-
-#include "utils.h"
-#include "regex2.h"
-
-static int nope = 0;		/* for use in asserts; shuts lint up */
-
-/* macros for manipulating states, small version */
-#define	states	long
-#define	states1	states		/* for later use in regexec() decision */
-#define	CLEAR(v)	((v) = 0)
-#define	SET0(v, n)	((v) &= ~(1 << (n)))
-#define	SET1(v, n)	((v) |= 1 << (n))
-#define	ISSET(v, n)	((v) & (1 << (n)))
-#define	ASSIGN(d, s)	((d) = (s))
-#define	EQ(a, b)	((a) == (b))
-#define	STATEVARS	int dummy	/* dummy version */
-#define	STATESETUP(m, n)	/* nothing */
-#define	STATETEARDOWN(m)	/* nothing */
-#define	SETUP(v)	((v) = 0)
-#define	onestate	int
-#define	INIT(o, n)	((o) = (unsigned)1 << (n))
-#define	INC(o)	((o) <<= 1)
-#define	ISSTATEIN(v, o)	((v) & (o))
-/* some abbreviations; note that some of these know variable names! */
-/* do "if I'm here, I can also be there" etc without branches */
-#define	FWD(dst, src, n)	((dst) |= ((unsigned)(src)&(here)) << (n))
-#define	BACK(dst, src, n)	((dst) |= ((unsigned)(src)&(here)) >> (n))
-#define	ISSETBACK(v, n)	((v) & ((unsigned)here >> (n)))
-/* function names */
-#define SNAMES			/* engine.c looks after details */
-
-#include "engine.c"
-
-/* now undo things */
-#undef	states
-#undef	CLEAR
-#undef	SET0
-#undef	SET1
-#undef	ISSET
-#undef	ASSIGN
-#undef	EQ
-#undef	STATEVARS
-#undef	STATESETUP
-#undef	STATETEARDOWN
-#undef	SETUP
-#undef	onestate
-#undef	INIT
-#undef	INC
-#undef	ISSTATEIN
-#undef	FWD
-#undef	BACK
-#undef	ISSETBACK
-#undef	SNAMES
-
-/* macros for manipulating states, large version */
-#define	states	char *
-#define	CLEAR(v)	memset(v, 0, m->g->nstates)
-#define	SET0(v, n)	((v)[n] = 0)
-#define	SET1(v, n)	((v)[n] = 1)
-#define	ISSET(v, n)	((v)[n])
-#define	ASSIGN(d, s)	memcpy(d, s, m->g->nstates)
-#define	EQ(a, b)	(memcmp(a, b, m->g->nstates) == 0)
-#define	STATEVARS	int vn; char *space
-#define	STATESETUP(m, nv)	{ (m)->space = malloc((nv)*(m)->g->nstates); \
-				if ((m)->space == NULL) return(REG_ESPACE); \
-				(m)->vn = 0; }
-#define	STATETEARDOWN(m)	{ free((m)->space); }
-#define	SETUP(v)	((v) = &m->space[m->vn++ * m->g->nstates])
-#define	onestate	int
-#define	INIT(o, n)	((o) = (n))
-#define	INC(o)	((o)++)
-#define	ISSTATEIN(v, o)	((v)[o])
-/* some abbreviations; note that some of these know variable names! */
-/* do "if I'm here, I can also be there" etc without branches */
-#define	FWD(dst, src, n)	((dst)[here+(n)] |= (src)[here])
-#define	BACK(dst, src, n)	((dst)[here-(n)] |= (src)[here])
-#define	ISSETBACK(v, n)	((v)[here - (n)])
-/* function names */
-#define	LNAMES			/* flag */
-
-#include "engine.c"
-
-/*
- - regexec - interface for matching
- = extern int regexec(const regex_t *, const char *, size_t, \
- =					regmatch_t [], int);
- = #define	REG_NOTBOL	00001
- = #define	REG_NOTEOL	00002
- = #define	REG_STARTEND	00004
- = #define	REG_TRACE	00400	// tracing of execution
- = #define	REG_LARGE	01000	// force large representation
- = #define	REG_BACKR	02000	// force use of backref code
- *
- * We put this here so we can exploit knowledge of the state representation
- * when choosing which matcher to call.  Also, by this point the matchers
- * have been prototyped.
- */
-int				/* 0 success, REG_NOMATCH failure */
-regexec(preg, string, nmatch, pmatch, eflags)
-const regex_t *preg;
-const char *string;
-size_t nmatch;
-regmatch_t pmatch[];
-int eflags;
-{
-	register struct re_guts *g = preg->re_g;
-#ifdef REDEBUG
-#	define	GOODFLAGS(f)	(f)
-#else
-#	define	GOODFLAGS(f)	((f)&(REG_NOTBOL|REG_NOTEOL|REG_STARTEND))
-#endif
-
-	if (preg->re_magic != MAGIC1 || g->magic != MAGIC2)
-		return(REG_BADPAT);
-	assert(!(g->iflags&BAD));
-	if (g->iflags&BAD)		/* backstop for no-debug case */
-		return(REG_BADPAT);
-	eflags = GOODFLAGS(eflags);
-
-	if (g->nstates <= CHAR_BIT*sizeof(states1) && !(eflags&REG_LARGE))
-		return(smatcher(g, (char *)string, nmatch, pmatch, eflags));
-	else
-		return(lmatcher(g, (char *)string, nmatch, pmatch, eflags));
-}
-
-/*
- * $PchId: regexec.c,v 1.2 1996/03/12 19:10:15 philip Exp $
- */
Index: trunk/minix/lib/regex/regfree.c
===================================================================
--- trunk/minix/lib/regex/regfree.c	(revision 9)
+++ 	(revision )
@@ -1,84 +1,0 @@
-/*-
- * Copyright (c) 1992, 1993, 1994 Henry Spencer.
- * Copyright (c) 1992, 1993, 1994
- *	The Regents of the University of California.  All rights reserved.
- *
- * This code is derived from software contributed to Berkeley by
- * Henry Spencer.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- *    must display the following acknowledgement:
- *	This product includes software developed by the University of
- *	California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- *    may be used to endorse or promote products derived from this software
- *    without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- *	@(#)regfree.c	8.3 (Berkeley) 3/20/94
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)regfree.c	8.3 (Berkeley) 3/20/94";
-#endif /* LIBC_SCCS and not lint */
-
-#include <sys/types.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <regex.h>
-
-#include "utils.h"
-#include "regex2.h"
-
-/*
- - regfree - free everything
- = extern void regfree(regex_t *);
- */
-void
-regfree(preg)
-regex_t *preg;
-{
-	register struct re_guts *g;
-
-	if (preg->re_magic != MAGIC1)	/* oops */
-		return;			/* nice to complain, but hard */
-
-	g = preg->re_g;
-	if (g == NULL || g->magic != MAGIC2)	/* oops again */
-		return;
-	preg->re_magic = 0;		/* mark it invalid */
-	g->magic = 0;			/* mark it invalid */
-
-	if (g->strip != NULL)
-		free((char *)g->strip);
-	if (g->sets != NULL)
-		free((char *)g->sets);
-	if (g->setbits != NULL)
-		free((char *)g->setbits);
-	if (g->must != NULL)
-		free(g->must);
-	free((char *)g);
-}
-
-/*
- * $PchId: regfree.c,v 1.2 1996/03/12 19:10:15 philip Exp $
- */
Index: trunk/minix/lib/regex/utils.h
===================================================================
--- trunk/minix/lib/regex/utils.h	(revision 9)
+++ 	(revision )
@@ -1,61 +1,0 @@
-/*-
- * Copyright (c) 1992, 1993, 1994 Henry Spencer.
- * Copyright (c) 1992, 1993, 1994
- *	The Regents of the University of California.  All rights reserved.
- *
- * This code is derived from software contributed to Berkeley by
- * Henry Spencer.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- *    must display the following acknowledgement:
- *	This product includes software developed by the University of
- *	California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- *    may be used to endorse or promote products derived from this software
- *    without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- *	@(#)utils.h	8.3 (Berkeley) 3/20/94
- */
-
-/* utility definitions */
-#ifdef _POSIX2_RE_DUP_MAX
-#define	DUPMAX		_POSIX2_RE_DUP_MAX	/* xxx is this right? */
-#else
-#define	DUPMAX		255
-#endif
-#define	INFINITY	(DUPMAX + 1)
-#define	NC		(CHAR_MAX - CHAR_MIN + 1)
-typedef unsigned char uch;
-
-/* switch off assertions (if not already off) if no REDEBUG */
-#ifndef REDEBUG
-#ifndef NDEBUG
-#define	NDEBUG	/* no assertions please */
-#endif
-#endif
-#include <assert.h>
-
-/* for old systems with bcopy() but no memmove() */
-#ifdef USEBCOPY
-#define	memmove(d, s, c)	bcopy(s, d, c)
-#endif
Index: trunk/minix/lib/stdio/Makedepend-ack
===================================================================
--- trunk/minix/lib/stdio/Makedepend-ack	(revision 9)
+++ 	(revision )
@@ -1,54 +1,0 @@
-depend-ack:
-	rm .depend-ack
-	touch .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -E' clearerr.c | sed -e 's:^\(.\):../obj-ack//./stdio/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -E' data.c | sed -e 's:^\(.\):../obj-ack//./stdio/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -E' doprnt.c | sed -e 's:^\(.\):../obj-ack//./stdio/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -E' doscan.c | sed -e 's:^\(.\):../obj-ack//./stdio/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -E' ecvt.c | sed -e 's:^\(.\):../obj-ack//./stdio/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -E' fclose.c | sed -e 's:^\(.\):../obj-ack//./stdio/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -E' feof.c | sed -e 's:^\(.\):../obj-ack//./stdio/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -E' ferror.c | sed -e 's:^\(.\):../obj-ack//./stdio/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -E' fflush.c | sed -e 's:^\(.\):../obj-ack//./stdio/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -E' fgetc.c | sed -e 's:^\(.\):../obj-ack//./stdio/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -E' fgetpos.c | sed -e 's:^\(.\):../obj-ack//./stdio/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -E' fgets.c | sed -e 's:^\(.\):../obj-ack//./stdio/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -E' fileno.c | sed -e 's:^\(.\):../obj-ack//./stdio/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -E' fillbuf.c | sed -e 's:^\(.\):../obj-ack//./stdio/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -E' flushbuf.c | sed -e 's:^\(.\):../obj-ack//./stdio/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -E' fopen.c | sed -e 's:^\(.\):../obj-ack//./stdio/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -E' fprintf.c | sed -e 's:^\(.\):../obj-ack//./stdio/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -E' fputc.c | sed -e 's:^\(.\):../obj-ack//./stdio/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -E' fputs.c | sed -e 's:^\(.\):../obj-ack//./stdio/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -E' fread.c | sed -e 's:^\(.\):../obj-ack//./stdio/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -E' freopen.c | sed -e 's:^\(.\):../obj-ack//./stdio/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -E' fscanf.c | sed -e 's:^\(.\):../obj-ack//./stdio/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -E' fseek.c | sed -e 's:^\(.\):../obj-ack//./stdio/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -E' fsetpos.c | sed -e 's:^\(.\):../obj-ack//./stdio/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -E' ftell.c | sed -e 's:^\(.\):../obj-ack//./stdio/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -E' fwrite.c | sed -e 's:^\(.\):../obj-ack//./stdio/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -E' getc.c | sed -e 's:^\(.\):../obj-ack//./stdio/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -E' getchar.c | sed -e 's:^\(.\):../obj-ack//./stdio/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -E' gets.c | sed -e 's:^\(.\):../obj-ack//./stdio/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -E' icompute.c | sed -e 's:^\(.\):../obj-ack//./stdio/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -E' mktemp.c | sed -e 's:^\(.\):../obj-ack//./stdio/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -E' perror.c | sed -e 's:^\(.\):../obj-ack//./stdio/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -E' printf.c | sed -e 's:^\(.\):../obj-ack//./stdio/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -E' putc.c | sed -e 's:^\(.\):../obj-ack//./stdio/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -E' putchar.c | sed -e 's:^\(.\):../obj-ack//./stdio/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -E' puts.c | sed -e 's:^\(.\):../obj-ack//./stdio/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -E' remove.c | sed -e 's:^\(.\):../obj-ack//./stdio/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -E' rewind.c | sed -e 's:^\(.\):../obj-ack//./stdio/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -E' scanf.c | sed -e 's:^\(.\):../obj-ack//./stdio/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -E' setbuf.c | sed -e 's:^\(.\):../obj-ack//./stdio/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -E' setvbuf.c | sed -e 's:^\(.\):../obj-ack//./stdio/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -E' sprintf.c | sed -e 's:^\(.\):../obj-ack//./stdio/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -E' sscanf.c | sed -e 's:^\(.\):../obj-ack//./stdio/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -E' tmpfile.c | sed -e 's:^\(.\):../obj-ack//./stdio/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -E' tmpnam.c | sed -e 's:^\(.\):../obj-ack//./stdio/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -E' ungetc.c | sed -e 's:^\(.\):../obj-ack//./stdio/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -E' vfprintf.c | sed -e 's:^\(.\):../obj-ack//./stdio/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -E' vprintf.c | sed -e 's:^\(.\):../obj-ack//./stdio/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -E' vscanf.c | sed -e 's:^\(.\):../obj-ack//./stdio/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -E' vsprintf.c | sed -e 's:^\(.\):../obj-ack//./stdio/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -E' vsscanf.c | sed -e 's:^\(.\):../obj-ack//./stdio/\1:' >> .depend-ack
Index: trunk/minix/lib/stdio/Makedepend-gnu
===================================================================
--- trunk/minix/lib/stdio/Makedepend-gnu	(revision 9)
+++ 	(revision )
@@ -1,54 +1,0 @@
-depend-gnu:
-	rm .depend-gnu
-	touch .depend-gnu
-	mkdep 'gcc -O -D_MINIX -D_POSIX_SOURCE -E' clearerr.c | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./stdio/\1:' >> .depend-gnu
-	mkdep 'gcc -O -D_MINIX -D_POSIX_SOURCE -E' data.c | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./stdio/\1:' >> .depend-gnu
-	mkdep 'gcc -O -D_MINIX -D_POSIX_SOURCE -E' doprnt.c | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./stdio/\1:' >> .depend-gnu
-	mkdep 'gcc -O -D_MINIX -D_POSIX_SOURCE -E' doscan.c | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./stdio/\1:' >> .depend-gnu
-	mkdep 'gcc -O -D_MINIX -D_POSIX_SOURCE -E' ecvt.c | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./stdio/\1:' >> .depend-gnu
-	mkdep 'gcc -O -D_MINIX -D_POSIX_SOURCE -E' fclose.c | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./stdio/\1:' >> .depend-gnu
-	mkdep 'gcc -O -D_MINIX -D_POSIX_SOURCE -E' feof.c | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./stdio/\1:' >> .depend-gnu
-	mkdep 'gcc -O -D_MINIX -D_POSIX_SOURCE -E' ferror.c | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./stdio/\1:' >> .depend-gnu
-	mkdep 'gcc -O -D_MINIX -D_POSIX_SOURCE -E' fflush.c | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./stdio/\1:' >> .depend-gnu
-	mkdep 'gcc -O -D_MINIX -D_POSIX_SOURCE -E' fgetc.c | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./stdio/\1:' >> .depend-gnu
-	mkdep 'gcc -O -D_MINIX -D_POSIX_SOURCE -E' fgetpos.c | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./stdio/\1:' >> .depend-gnu
-	mkdep 'gcc -O -D_MINIX -D_POSIX_SOURCE -E' fgets.c | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./stdio/\1:' >> .depend-gnu
-	mkdep 'gcc -O -D_MINIX -D_POSIX_SOURCE -E' fileno.c | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./stdio/\1:' >> .depend-gnu
-	mkdep 'gcc -O -D_MINIX -D_POSIX_SOURCE -E' fillbuf.c | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./stdio/\1:' >> .depend-gnu
-	mkdep 'gcc -O -D_MINIX -D_POSIX_SOURCE -E' flushbuf.c | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./stdio/\1:' >> .depend-gnu
-	mkdep 'gcc -O -D_MINIX -D_POSIX_SOURCE -E' fopen.c | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./stdio/\1:' >> .depend-gnu
-	mkdep 'gcc -O -D_MINIX -D_POSIX_SOURCE -E' fprintf.c | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./stdio/\1:' >> .depend-gnu
-	mkdep 'gcc -O -D_MINIX -D_POSIX_SOURCE -E' fputc.c | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./stdio/\1:' >> .depend-gnu
-	mkdep 'gcc -O -D_MINIX -D_POSIX_SOURCE -E' fputs.c | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./stdio/\1:' >> .depend-gnu
-	mkdep 'gcc -O -D_MINIX -D_POSIX_SOURCE -E' fread.c | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./stdio/\1:' >> .depend-gnu
-	mkdep 'gcc -O -D_MINIX -D_POSIX_SOURCE -E' freopen.c | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./stdio/\1:' >> .depend-gnu
-	mkdep 'gcc -O -D_MINIX -D_POSIX_SOURCE -E' fscanf.c | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./stdio/\1:' >> .depend-gnu
-	mkdep 'gcc -O -D_MINIX -D_POSIX_SOURCE -E' fseek.c | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./stdio/\1:' >> .depend-gnu
-	mkdep 'gcc -O -D_MINIX -D_POSIX_SOURCE -E' fsetpos.c | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./stdio/\1:' >> .depend-gnu
-	mkdep 'gcc -O -D_MINIX -D_POSIX_SOURCE -E' ftell.c | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./stdio/\1:' >> .depend-gnu
-	mkdep 'gcc -O -D_MINIX -D_POSIX_SOURCE -E' fwrite.c | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./stdio/\1:' >> .depend-gnu
-	mkdep 'gcc -O -D_MINIX -D_POSIX_SOURCE -E' getc.c | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./stdio/\1:' >> .depend-gnu
-	mkdep 'gcc -O -D_MINIX -D_POSIX_SOURCE -E' getchar.c | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./stdio/\1:' >> .depend-gnu
-	mkdep 'gcc -O -D_MINIX -D_POSIX_SOURCE -E' gets.c | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./stdio/\1:' >> .depend-gnu
-	mkdep 'gcc -O -D_MINIX -D_POSIX_SOURCE -E' icompute.c | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./stdio/\1:' >> .depend-gnu
-	mkdep 'gcc -O -D_MINIX -D_POSIX_SOURCE -E' mktemp.c | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./stdio/\1:' >> .depend-gnu
-	mkdep 'gcc -O -D_MINIX -D_POSIX_SOURCE -E' perror.c | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./stdio/\1:' >> .depend-gnu
-	mkdep 'gcc -O -D_MINIX -D_POSIX_SOURCE -E' printf.c | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./stdio/\1:' >> .depend-gnu
-	mkdep 'gcc -O -D_MINIX -D_POSIX_SOURCE -E' putc.c | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./stdio/\1:' >> .depend-gnu
-	mkdep 'gcc -O -D_MINIX -D_POSIX_SOURCE -E' putchar.c | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./stdio/\1:' >> .depend-gnu
-	mkdep 'gcc -O -D_MINIX -D_POSIX_SOURCE -E' puts.c | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./stdio/\1:' >> .depend-gnu
-	mkdep 'gcc -O -D_MINIX -D_POSIX_SOURCE -E' remove.c | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./stdio/\1:' >> .depend-gnu
-	mkdep 'gcc -O -D_MINIX -D_POSIX_SOURCE -E' rewind.c | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./stdio/\1:' >> .depend-gnu
-	mkdep 'gcc -O -D_MINIX -D_POSIX_SOURCE -E' scanf.c | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./stdio/\1:' >> .depend-gnu
-	mkdep 'gcc -O -D_MINIX -D_POSIX_SOURCE -E' setbuf.c | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./stdio/\1:' >> .depend-gnu
-	mkdep 'gcc -O -D_MINIX -D_POSIX_SOURCE -E' setvbuf.c | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./stdio/\1:' >> .depend-gnu
-	mkdep 'gcc -O -D_MINIX -D_POSIX_SOURCE -E' sprintf.c | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./stdio/\1:' >> .depend-gnu
-	mkdep 'gcc -O -D_MINIX -D_POSIX_SOURCE -E' sscanf.c | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./stdio/\1:' >> .depend-gnu
-	mkdep 'gcc -O -D_MINIX -D_POSIX_SOURCE -E' tmpfile.c | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./stdio/\1:' >> .depend-gnu
-	mkdep 'gcc -O -D_MINIX -D_POSIX_SOURCE -E' tmpnam.c | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./stdio/\1:' >> .depend-gnu
-	mkdep 'gcc -O -D_MINIX -D_POSIX_SOURCE -E' ungetc.c | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./stdio/\1:' >> .depend-gnu
-	mkdep 'gcc -O -D_MINIX -D_POSIX_SOURCE -E' vfprintf.c | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./stdio/\1:' >> .depend-gnu
-	mkdep 'gcc -O -D_MINIX -D_POSIX_SOURCE -E' vprintf.c | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./stdio/\1:' >> .depend-gnu
-	mkdep 'gcc -O -D_MINIX -D_POSIX_SOURCE -E' vscanf.c | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./stdio/\1:' >> .depend-gnu
-	mkdep 'gcc -O -D_MINIX -D_POSIX_SOURCE -E' vsprintf.c | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./stdio/\1:' >> .depend-gnu
-	mkdep 'gcc -O -D_MINIX -D_POSIX_SOURCE -E' vsscanf.c | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./stdio/\1:' >> .depend-gnu
Index: trunk/minix/lib/stdio/Makefile
===================================================================
--- trunk/minix/lib/stdio/Makefile	(revision 9)
+++ 	(revision )
@@ -1,402 +1,0 @@
-#Generated from ./stdio/Makefile.in
-all: all-ack
-
-all-ack:
-all-gnu:
-
-makefiles: Makefile
-Makedepend-ack Makedepend-gnu: 
-	sh ../generate.sh ./stdio ../obj-ack/ ../obj-gnu
-
-Makefile: Makefile.in Makedepend-ack Makedepend-gnu
-	sh ../generate.sh ./stdio ../obj-ack/ ../obj-gnu
-	@echo
-	@echo *Attention*
-	@echo Makefile is regenerated... rerun command to see changes
-	@echo *Attention*
-	@echo
-
-depend: depend-ack
-all-ack: ../obj-ack//libc.a
-
-../obj-ack//libc.a: ../obj-ack//libc.a(clearerr.o)
-../obj-ack//libc.a: ../obj-ack//libc.a(data.o)
-../obj-ack//libc.a: ../obj-ack//libc.a(doprnt.o)
-../obj-ack//libc.a: ../obj-ack//libc.a(doscan.o)
-../obj-ack//libc.a: ../obj-ack//libc.a(ecvt.o)
-../obj-ack//libc.a: ../obj-ack//libc.a(fclose.o)
-../obj-ack//libc.a: ../obj-ack//libc.a(feof.o)
-../obj-ack//libc.a: ../obj-ack//libc.a(ferror.o)
-../obj-ack//libc.a: ../obj-ack//libc.a(fflush.o)
-../obj-ack//libc.a: ../obj-ack//libc.a(fgetc.o)
-../obj-ack//libc.a: ../obj-ack//libc.a(fgetpos.o)
-../obj-ack//libc.a: ../obj-ack//libc.a(fgets.o)
-../obj-ack//libc.a: ../obj-ack//libc.a(fileno.o)
-../obj-ack//libc.a: ../obj-ack//libc.a(fillbuf.o)
-../obj-ack//libc.a: ../obj-ack//libc.a(flushbuf.o)
-../obj-ack//libc.a: ../obj-ack//libc.a(fopen.o)
-../obj-ack//libc.a: ../obj-ack//libc.a(fprintf.o)
-../obj-ack//libc.a: ../obj-ack//libc.a(fputc.o)
-../obj-ack//libc.a: ../obj-ack//libc.a(fputs.o)
-../obj-ack//libc.a: ../obj-ack//libc.a(fread.o)
-../obj-ack//libc.a: ../obj-ack//libc.a(freopen.o)
-../obj-ack//libc.a: ../obj-ack//libc.a(fscanf.o)
-../obj-ack//libc.a: ../obj-ack//libc.a(fseek.o)
-../obj-ack//libc.a: ../obj-ack//libc.a(fsetpos.o)
-../obj-ack//libc.a: ../obj-ack//libc.a(ftell.o)
-../obj-ack//libc.a: ../obj-ack//libc.a(fwrite.o)
-../obj-ack//libc.a: ../obj-ack//libc.a(getc.o)
-../obj-ack//libc.a: ../obj-ack//libc.a(getchar.o)
-../obj-ack//libc.a: ../obj-ack//libc.a(gets.o)
-../obj-ack//libc.a: ../obj-ack//libc.a(icompute.o)
-../obj-ack//libc.a: ../obj-ack//libc.a(mktemp.o)
-../obj-ack//libc.a: ../obj-ack//libc.a(perror.o)
-../obj-ack//libc.a: ../obj-ack//libc.a(printf.o)
-../obj-ack//libc.a: ../obj-ack//libc.a(putc.o)
-../obj-ack//libc.a: ../obj-ack//libc.a(putchar.o)
-../obj-ack//libc.a: ../obj-ack//libc.a(puts.o)
-../obj-ack//libc.a: ../obj-ack//libc.a(remove.o)
-../obj-ack//libc.a: ../obj-ack//libc.a(rewind.o)
-../obj-ack//libc.a: ../obj-ack//libc.a(scanf.o)
-../obj-ack//libc.a: ../obj-ack//libc.a(setbuf.o)
-../obj-ack//libc.a: ../obj-ack//libc.a(setvbuf.o)
-../obj-ack//libc.a: ../obj-ack//libc.a(sprintf.o)
-../obj-ack//libc.a: ../obj-ack//libc.a(sscanf.o)
-../obj-ack//libc.a: ../obj-ack//libc.a(tmpfile.o)
-../obj-ack//libc.a: ../obj-ack//libc.a(tmpnam.o)
-../obj-ack//libc.a: ../obj-ack//libc.a(ungetc.o)
-../obj-ack//libc.a: ../obj-ack//libc.a(vfprintf.o)
-../obj-ack//libc.a: ../obj-ack//libc.a(vprintf.o)
-../obj-ack//libc.a: ../obj-ack//libc.a(vscanf.o)
-../obj-ack//libc.a: ../obj-ack//libc.a(vsprintf.o)
-../obj-ack//libc.a: ../obj-ack//libc.a(vsscanf.o)
-
-../obj-ack//libc.a:
-	ar cr ../obj-ack//libc.a ../obj-ack//./stdio/*.o
-	rm ../obj-ack//./stdio/*.o
-
-../obj-ack//libc.a(clearerr.o): clearerr.c
-	cc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-ack//./stdio/clearerr.o clearerr.c
-../obj-ack//libc.a(data.o): data.c
-	cc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-ack//./stdio/data.o data.c
-../obj-ack//libc.a(doprnt.o): doprnt.c
-	cc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-ack//./stdio/doprnt.o doprnt.c
-../obj-ack//libc.a(doscan.o): doscan.c
-	cc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-ack//./stdio/doscan.o doscan.c
-../obj-ack//libc.a(ecvt.o): ecvt.c
-	cc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-ack//./stdio/ecvt.o ecvt.c
-../obj-ack//libc.a(fclose.o): fclose.c
-	cc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-ack//./stdio/fclose.o fclose.c
-../obj-ack//libc.a(feof.o): feof.c
-	cc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-ack//./stdio/feof.o feof.c
-../obj-ack//libc.a(ferror.o): ferror.c
-	cc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-ack//./stdio/ferror.o ferror.c
-../obj-ack//libc.a(fflush.o): fflush.c
-	cc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-ack//./stdio/fflush.o fflush.c
-../obj-ack//libc.a(fgetc.o): fgetc.c
-	cc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-ack//./stdio/fgetc.o fgetc.c
-../obj-ack//libc.a(fgetpos.o): fgetpos.c
-	cc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-ack//./stdio/fgetpos.o fgetpos.c
-../obj-ack//libc.a(fgets.o): fgets.c
-	cc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-ack//./stdio/fgets.o fgets.c
-../obj-ack//libc.a(fileno.o): fileno.c
-	cc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-ack//./stdio/fileno.o fileno.c
-../obj-ack//libc.a(fillbuf.o): fillbuf.c
-	cc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-ack//./stdio/fillbuf.o fillbuf.c
-../obj-ack//libc.a(flushbuf.o): flushbuf.c
-	cc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-ack//./stdio/flushbuf.o flushbuf.c
-../obj-ack//libc.a(fopen.o): fopen.c
-	cc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-ack//./stdio/fopen.o fopen.c
-../obj-ack//libc.a(fprintf.o): fprintf.c
-	cc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-ack//./stdio/fprintf.o fprintf.c
-../obj-ack//libc.a(fputc.o): fputc.c
-	cc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-ack//./stdio/fputc.o fputc.c
-../obj-ack//libc.a(fputs.o): fputs.c
-	cc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-ack//./stdio/fputs.o fputs.c
-../obj-ack//libc.a(fread.o): fread.c
-	cc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-ack//./stdio/fread.o fread.c
-../obj-ack//libc.a(freopen.o): freopen.c
-	cc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-ack//./stdio/freopen.o freopen.c
-../obj-ack//libc.a(fscanf.o): fscanf.c
-	cc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-ack//./stdio/fscanf.o fscanf.c
-../obj-ack//libc.a(fseek.o): fseek.c
-	cc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-ack//./stdio/fseek.o fseek.c
-../obj-ack//libc.a(fsetpos.o): fsetpos.c
-	cc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-ack//./stdio/fsetpos.o fsetpos.c
-../obj-ack//libc.a(ftell.o): ftell.c
-	cc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-ack//./stdio/ftell.o ftell.c
-../obj-ack//libc.a(fwrite.o): fwrite.c
-	cc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-ack//./stdio/fwrite.o fwrite.c
-../obj-ack//libc.a(getc.o): getc.c
-	cc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-ack//./stdio/getc.o getc.c
-../obj-ack//libc.a(getchar.o): getchar.c
-	cc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-ack//./stdio/getchar.o getchar.c
-../obj-ack//libc.a(gets.o): gets.c
-	cc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-ack//./stdio/gets.o gets.c
-../obj-ack//libc.a(icompute.o): icompute.c
-	cc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-ack//./stdio/icompute.o icompute.c
-../obj-ack//libc.a(mktemp.o): mktemp.c
-	cc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-ack//./stdio/mktemp.o mktemp.c
-../obj-ack//libc.a(perror.o): perror.c
-	cc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-ack//./stdio/perror.o perror.c
-../obj-ack//libc.a(printf.o): printf.c
-	cc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-ack//./stdio/printf.o printf.c
-../obj-ack//libc.a(putc.o): putc.c
-	cc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-ack//./stdio/putc.o putc.c
-../obj-ack//libc.a(putchar.o): putchar.c
-	cc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-ack//./stdio/putchar.o putchar.c
-../obj-ack//libc.a(puts.o): puts.c
-	cc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-ack//./stdio/puts.o puts.c
-../obj-ack//libc.a(remove.o): remove.c
-	cc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-ack//./stdio/remove.o remove.c
-../obj-ack//libc.a(rewind.o): rewind.c
-	cc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-ack//./stdio/rewind.o rewind.c
-../obj-ack//libc.a(scanf.o): scanf.c
-	cc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-ack//./stdio/scanf.o scanf.c
-../obj-ack//libc.a(setbuf.o): setbuf.c
-	cc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-ack//./stdio/setbuf.o setbuf.c
-../obj-ack//libc.a(setvbuf.o): setvbuf.c
-	cc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-ack//./stdio/setvbuf.o setvbuf.c
-../obj-ack//libc.a(sprintf.o): sprintf.c
-	cc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-ack//./stdio/sprintf.o sprintf.c
-../obj-ack//libc.a(sscanf.o): sscanf.c
-	cc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-ack//./stdio/sscanf.o sscanf.c
-../obj-ack//libc.a(tmpfile.o): tmpfile.c
-	cc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-ack//./stdio/tmpfile.o tmpfile.c
-../obj-ack//libc.a(tmpnam.o): tmpnam.c
-	cc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-ack//./stdio/tmpnam.o tmpnam.c
-../obj-ack//libc.a(ungetc.o): ungetc.c
-	cc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-ack//./stdio/ungetc.o ungetc.c
-../obj-ack//libc.a(vfprintf.o): vfprintf.c
-	cc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-ack//./stdio/vfprintf.o vfprintf.c
-../obj-ack//libc.a(vprintf.o): vprintf.c
-	cc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-ack//./stdio/vprintf.o vprintf.c
-../obj-ack//libc.a(vscanf.o): vscanf.c
-	cc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-ack//./stdio/vscanf.o vscanf.c
-../obj-ack//libc.a(vsprintf.o): vsprintf.c
-	cc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-ack//./stdio/vsprintf.o vsprintf.c
-../obj-ack//libc.a(vsscanf.o): vsscanf.c
-	cc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-ack//./stdio/vsscanf.o vsscanf.c
-
-all-gnu: ../obj-gnu/libc.a
-
-../obj-gnu/libc.a: ../obj-gnu/./stdio/clearerr.o
-../obj-gnu/libc.a: ../obj-gnu/./stdio/data.o
-../obj-gnu/libc.a: ../obj-gnu/./stdio/doprnt.o
-../obj-gnu/libc.a: ../obj-gnu/./stdio/doscan.o
-../obj-gnu/libc.a: ../obj-gnu/./stdio/ecvt.o
-../obj-gnu/libc.a: ../obj-gnu/./stdio/fclose.o
-../obj-gnu/libc.a: ../obj-gnu/./stdio/feof.o
-../obj-gnu/libc.a: ../obj-gnu/./stdio/ferror.o
-../obj-gnu/libc.a: ../obj-gnu/./stdio/fflush.o
-../obj-gnu/libc.a: ../obj-gnu/./stdio/fgetc.o
-../obj-gnu/libc.a: ../obj-gnu/./stdio/fgetpos.o
-../obj-gnu/libc.a: ../obj-gnu/./stdio/fgets.o
-../obj-gnu/libc.a: ../obj-gnu/./stdio/fileno.o
-../obj-gnu/libc.a: ../obj-gnu/./stdio/fillbuf.o
-../obj-gnu/libc.a: ../obj-gnu/./stdio/flushbuf.o
-../obj-gnu/libc.a: ../obj-gnu/./stdio/fopen.o
-../obj-gnu/libc.a: ../obj-gnu/./stdio/fprintf.o
-../obj-gnu/libc.a: ../obj-gnu/./stdio/fputc.o
-../obj-gnu/libc.a: ../obj-gnu/./stdio/fputs.o
-../obj-gnu/libc.a: ../obj-gnu/./stdio/fread.o
-../obj-gnu/libc.a: ../obj-gnu/./stdio/freopen.o
-../obj-gnu/libc.a: ../obj-gnu/./stdio/fscanf.o
-../obj-gnu/libc.a: ../obj-gnu/./stdio/fseek.o
-../obj-gnu/libc.a: ../obj-gnu/./stdio/fsetpos.o
-../obj-gnu/libc.a: ../obj-gnu/./stdio/ftell.o
-../obj-gnu/libc.a: ../obj-gnu/./stdio/fwrite.o
-../obj-gnu/libc.a: ../obj-gnu/./stdio/getc.o
-../obj-gnu/libc.a: ../obj-gnu/./stdio/getchar.o
-../obj-gnu/libc.a: ../obj-gnu/./stdio/gets.o
-../obj-gnu/libc.a: ../obj-gnu/./stdio/icompute.o
-../obj-gnu/libc.a: ../obj-gnu/./stdio/mktemp.o
-../obj-gnu/libc.a: ../obj-gnu/./stdio/perror.o
-../obj-gnu/libc.a: ../obj-gnu/./stdio/printf.o
-../obj-gnu/libc.a: ../obj-gnu/./stdio/putc.o
-../obj-gnu/libc.a: ../obj-gnu/./stdio/putchar.o
-../obj-gnu/libc.a: ../obj-gnu/./stdio/puts.o
-../obj-gnu/libc.a: ../obj-gnu/./stdio/remove.o
-../obj-gnu/libc.a: ../obj-gnu/./stdio/rewind.o
-../obj-gnu/libc.a: ../obj-gnu/./stdio/scanf.o
-../obj-gnu/libc.a: ../obj-gnu/./stdio/setbuf.o
-../obj-gnu/libc.a: ../obj-gnu/./stdio/setvbuf.o
-../obj-gnu/libc.a: ../obj-gnu/./stdio/sprintf.o
-../obj-gnu/libc.a: ../obj-gnu/./stdio/sscanf.o
-../obj-gnu/libc.a: ../obj-gnu/./stdio/tmpfile.o
-../obj-gnu/libc.a: ../obj-gnu/./stdio/tmpnam.o
-../obj-gnu/libc.a: ../obj-gnu/./stdio/ungetc.o
-../obj-gnu/libc.a: ../obj-gnu/./stdio/vfprintf.o
-../obj-gnu/libc.a: ../obj-gnu/./stdio/vprintf.o
-../obj-gnu/libc.a: ../obj-gnu/./stdio/vscanf.o
-../obj-gnu/libc.a: ../obj-gnu/./stdio/vsprintf.o
-../obj-gnu/libc.a: ../obj-gnu/./stdio/vsscanf.o
-
-../obj-gnu/libc.a:
-	gar cr ../obj-gnu/libc.a $?
-
-../obj-gnu/./stdio/clearerr.o: clearerr.c
-	gcc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-gnu/./stdio/clearerr.o clearerr.c
-
-../obj-gnu/./stdio/data.o: data.c
-	gcc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-gnu/./stdio/data.o data.c
-
-../obj-gnu/./stdio/doprnt.o: doprnt.c
-	gcc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-gnu/./stdio/doprnt.o doprnt.c
-
-../obj-gnu/./stdio/doscan.o: doscan.c
-	gcc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-gnu/./stdio/doscan.o doscan.c
-
-../obj-gnu/./stdio/ecvt.o: ecvt.c
-	gcc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-gnu/./stdio/ecvt.o ecvt.c
-
-../obj-gnu/./stdio/fclose.o: fclose.c
-	gcc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-gnu/./stdio/fclose.o fclose.c
-
-../obj-gnu/./stdio/feof.o: feof.c
-	gcc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-gnu/./stdio/feof.o feof.c
-
-../obj-gnu/./stdio/ferror.o: ferror.c
-	gcc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-gnu/./stdio/ferror.o ferror.c
-
-../obj-gnu/./stdio/fflush.o: fflush.c
-	gcc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-gnu/./stdio/fflush.o fflush.c
-
-../obj-gnu/./stdio/fgetc.o: fgetc.c
-	gcc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-gnu/./stdio/fgetc.o fgetc.c
-
-../obj-gnu/./stdio/fgetpos.o: fgetpos.c
-	gcc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-gnu/./stdio/fgetpos.o fgetpos.c
-
-../obj-gnu/./stdio/fgets.o: fgets.c
-	gcc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-gnu/./stdio/fgets.o fgets.c
-
-../obj-gnu/./stdio/fileno.o: fileno.c
-	gcc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-gnu/./stdio/fileno.o fileno.c
-
-../obj-gnu/./stdio/fillbuf.o: fillbuf.c
-	gcc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-gnu/./stdio/fillbuf.o fillbuf.c
-
-../obj-gnu/./stdio/flushbuf.o: flushbuf.c
-	gcc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-gnu/./stdio/flushbuf.o flushbuf.c
-
-../obj-gnu/./stdio/fopen.o: fopen.c
-	gcc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-gnu/./stdio/fopen.o fopen.c
-
-../obj-gnu/./stdio/fprintf.o: fprintf.c
-	gcc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-gnu/./stdio/fprintf.o fprintf.c
-
-../obj-gnu/./stdio/fputc.o: fputc.c
-	gcc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-gnu/./stdio/fputc.o fputc.c
-
-../obj-gnu/./stdio/fputs.o: fputs.c
-	gcc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-gnu/./stdio/fputs.o fputs.c
-
-../obj-gnu/./stdio/fread.o: fread.c
-	gcc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-gnu/./stdio/fread.o fread.c
-
-../obj-gnu/./stdio/freopen.o: freopen.c
-	gcc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-gnu/./stdio/freopen.o freopen.c
-
-../obj-gnu/./stdio/fscanf.o: fscanf.c
-	gcc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-gnu/./stdio/fscanf.o fscanf.c
-
-../obj-gnu/./stdio/fseek.o: fseek.c
-	gcc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-gnu/./stdio/fseek.o fseek.c
-
-../obj-gnu/./stdio/fsetpos.o: fsetpos.c
-	gcc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-gnu/./stdio/fsetpos.o fsetpos.c
-
-../obj-gnu/./stdio/ftell.o: ftell.c
-	gcc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-gnu/./stdio/ftell.o ftell.c
-
-../obj-gnu/./stdio/fwrite.o: fwrite.c
-	gcc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-gnu/./stdio/fwrite.o fwrite.c
-
-../obj-gnu/./stdio/getc.o: getc.c
-	gcc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-gnu/./stdio/getc.o getc.c
-
-../obj-gnu/./stdio/getchar.o: getchar.c
-	gcc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-gnu/./stdio/getchar.o getchar.c
-
-../obj-gnu/./stdio/gets.o: gets.c
-	gcc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-gnu/./stdio/gets.o gets.c
-
-../obj-gnu/./stdio/icompute.o: icompute.c
-	gcc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-gnu/./stdio/icompute.o icompute.c
-
-../obj-gnu/./stdio/mktemp.o: mktemp.c
-	gcc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-gnu/./stdio/mktemp.o mktemp.c
-
-../obj-gnu/./stdio/perror.o: perror.c
-	gcc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-gnu/./stdio/perror.o perror.c
-
-../obj-gnu/./stdio/printf.o: printf.c
-	gcc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-gnu/./stdio/printf.o printf.c
-
-../obj-gnu/./stdio/putc.o: putc.c
-	gcc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-gnu/./stdio/putc.o putc.c
-
-../obj-gnu/./stdio/putchar.o: putchar.c
-	gcc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-gnu/./stdio/putchar.o putchar.c
-
-../obj-gnu/./stdio/puts.o: puts.c
-	gcc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-gnu/./stdio/puts.o puts.c
-
-../obj-gnu/./stdio/remove.o: remove.c
-	gcc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-gnu/./stdio/remove.o remove.c
-
-../obj-gnu/./stdio/rewind.o: rewind.c
-	gcc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-gnu/./stdio/rewind.o rewind.c
-
-../obj-gnu/./stdio/scanf.o: scanf.c
-	gcc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-gnu/./stdio/scanf.o scanf.c
-
-../obj-gnu/./stdio/setbuf.o: setbuf.c
-	gcc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-gnu/./stdio/setbuf.o setbuf.c
-
-../obj-gnu/./stdio/setvbuf.o: setvbuf.c
-	gcc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-gnu/./stdio/setvbuf.o setvbuf.c
-
-../obj-gnu/./stdio/sprintf.o: sprintf.c
-	gcc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-gnu/./stdio/sprintf.o sprintf.c
-
-../obj-gnu/./stdio/sscanf.o: sscanf.c
-	gcc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-gnu/./stdio/sscanf.o sscanf.c
-
-../obj-gnu/./stdio/tmpfile.o: tmpfile.c
-	gcc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-gnu/./stdio/tmpfile.o tmpfile.c
-
-../obj-gnu/./stdio/tmpnam.o: tmpnam.c
-	gcc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-gnu/./stdio/tmpnam.o tmpnam.c
-
-../obj-gnu/./stdio/ungetc.o: ungetc.c
-	gcc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-gnu/./stdio/ungetc.o ungetc.c
-
-../obj-gnu/./stdio/vfprintf.o: vfprintf.c
-	gcc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-gnu/./stdio/vfprintf.o vfprintf.c
-
-../obj-gnu/./stdio/vprintf.o: vprintf.c
-	gcc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-gnu/./stdio/vprintf.o vprintf.c
-
-../obj-gnu/./stdio/vscanf.o: vscanf.c
-	gcc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-gnu/./stdio/vscanf.o vscanf.c
-
-../obj-gnu/./stdio/vsprintf.o: vsprintf.c
-	gcc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-gnu/./stdio/vsprintf.o vsprintf.c
-
-../obj-gnu/./stdio/vsscanf.o: vsscanf.c
-	gcc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-gnu/./stdio/vsscanf.o vsscanf.c
-
-
-
-
-clean::
-	rm -f ../obj-ack//./stdio/*
-	rm -f ../obj-gnu/./stdio/*
-
-include Makedepend-ack
-include .depend-ack
-
-include Makedepend-gnu
-include .depend-gnu
Index: trunk/minix/lib/stdio/Makefile.in
===================================================================
--- trunk/minix/lib/stdio/Makefile.in	(revision 9)
+++ 	(revision )
@@ -1,60 +1,0 @@
-# Makefile for lib/stdio.
-
-CFLAGS="-O -D_MINIX -D_POSIX_SOURCE"
-
-LIBRARIES=libc
-
-libc_FILES=" \
-	clearerr.c \
-	data.c \
-	doprnt.c \
-	doscan.c \
-	ecvt.c \
-	fclose.c \
-	feof.c \
-	ferror.c \
-	fflush.c \
-	fgetc.c \
-	fgetpos.c \
-	fgets.c \
-	fileno.c \
-	fillbuf.c \
-	flushbuf.c \
-	fopen.c \
-	fprintf.c \
-	fputc.c \
-	fputs.c \
-	fread.c \
-	freopen.c \
-	fscanf.c \
-	fseek.c \
-	fsetpos.c \
-	ftell.c \
-	fwrite.c \
-	getc.c \
-	getchar.c \
-	gets.c \
-	icompute.c \
-	mktemp.c \
-	perror.c \
-	printf.c \
-	putc.c \
-	putchar.c \
-	puts.c \
-	remove.c \
-	rewind.c \
-	scanf.c \
-	setbuf.c \
-	setvbuf.c \
-	sprintf.c \
-	sscanf.c \
-	tmpfile.c \
-	tmpnam.c \
-	ungetc.c \
-	vfprintf.c \
-	vprintf.c \
-	vscanf.c \
-	vsprintf.c \
-	vsscanf.c"
-
-TYPE=both
Index: trunk/minix/lib/stdio/clearerr.c
===================================================================
--- trunk/minix/lib/stdio/clearerr.c	(revision 9)
+++ 	(revision )
@@ -1,12 +1,0 @@
-/*
- * clearerr.c - clear error and end-of-file indicators of a stream
- */
-/* $Header: /cvsup/minix/src/lib/stdio/clearerr.c,v 1.1.1.1 2005/04/21 14:56:34 beng Exp $ */
-
-#include	<stdio.h>
-
-void
-(clearerr)(FILE *stream)
-{
-	clearerr(stream);
-}
Index: trunk/minix/lib/stdio/data.c
===================================================================
--- trunk/minix/lib/stdio/data.c	(revision 9)
+++ 	(revision )
@@ -1,28 +1,0 @@
-/*
- * data.c - this is the initialization for the standard streams
- */
-/* $Header: /cvsup/minix/src/lib/stdio/data.c,v 1.1.1.1 2005/04/21 14:56:34 beng Exp $ */
-
-#include	<stdio.h>
-
-struct __iobuf __stdin = {
-	0, 0, _IOREAD, 0,
-	(unsigned char *)NULL, (unsigned char *)NULL, 
-};
-
-struct __iobuf __stdout = {
-	0, 1, _IOWRITE, 0,
-	(unsigned char *)NULL, (unsigned char *)NULL, 
-};
-
-struct __iobuf __stderr = {
-	0, 2, _IOWRITE | _IOLBF, 0,
-	(unsigned char *)NULL, (unsigned char *)NULL, 
-};
-
-FILE *__iotab[FOPEN_MAX] = {
-	&__stdin,
-	&__stdout,
-	&__stderr,
-	0
-};
Index: trunk/minix/lib/stdio/doprnt.c
===================================================================
--- trunk/minix/lib/stdio/doprnt.c	(revision 9)
+++ 	(revision )
@@ -1,310 +1,0 @@
-/*
- * doprnt.c - print formatted output
- */
-/* $Header: /cvsup/minix/src/lib/stdio/doprnt.c,v 1.1.1.1 2005/04/21 14:56:34 beng Exp $ */
-
-#include	<ctype.h>
-#include	<stdio.h>
-#include	<stdarg.h>
-#include	<string.h>
-#include	"loc_incl.h"
-
-/* gnum() is used to get the width and precision fields of a format. */
-static const char *
-gnum(register const char *f, int *ip, va_list *app)
-{
-	register int	i, c;
-
-	if (*f == '*') {
-		*ip = va_arg((*app), int);
-		f++;
-	} else {
-		i = 0;
-		while ((c = *f - '0') >= 0 && c <= 9) {
-			i = i*10 + c;
-			f++;
-		}
-		*ip = i;
-	}
-	return f;
-}
-
-#if	_EM_WSIZE == _EM_PSIZE
-#define set_pointer(flags)				/* nothing */
-#elif	_EM_LSIZE == _EM_PSIZE
-#define set_pointer(flags)	(flags |= FL_LONG)
-#else
-#error garbage pointer size
-#define set_pointer(flags)		/* compilation might continue */
-#endif
-
-/* print an ordinal number */
-static char *
-o_print(va_list *ap, int flags, char *s, char c, int precision, int is_signed)
-{
-	long signed_val;
-	unsigned long unsigned_val;
-	char *old_s = s;
-	int base;
-
-	switch (flags & (FL_SHORT | FL_LONG)) {
-	case FL_SHORT:
-		if (is_signed) {
-			signed_val = (short) va_arg(*ap, int);
-		} else {
-			unsigned_val = (unsigned short) va_arg(*ap, unsigned);
-		}
-		break;
-	case FL_LONG:
-		if (is_signed) {
-			signed_val = va_arg(*ap, long);
-		} else {
-			unsigned_val = va_arg(*ap, unsigned long);
-		}
-		break;
-	default:
-		if (is_signed) {
-			signed_val = va_arg(*ap, int);
-		} else {
-			unsigned_val = va_arg(*ap, unsigned int);
-		}
-		break;
-	}
-
-	if (is_signed) {
-		if (signed_val < 0) {
-			*s++ = '-';
-			signed_val = -signed_val;
-		} else if (flags & FL_SIGN) *s++ = '+';
-		else if (flags & FL_SPACE) *s++ = ' ';
-		unsigned_val = signed_val;
-	}
-	if ((flags & FL_ALT) && (c == 'o')) *s++ = '0';
-	if (!unsigned_val) {
-		 if (!precision)
-			return s;
-	} else if (((flags & FL_ALT) && (c == 'x' || c == 'X'))
-		    || c == 'p') {
-		*s++ = '0';
-		*s++ = (c == 'X' ? 'X' : 'x');
-	}
-
-	switch (c) {
-	case 'b':	base = 2;	break;
-	case 'o':	base = 8;	break;
-	case 'd':
-	case 'i':
-	case 'u':	base = 10;	break;
-	case 'x':
-	case 'X':
-	case 'p':	base = 16;	break;
-	}
-
-	s = _i_compute(unsigned_val, base, s, precision);
-
-	if (c == 'X')
-		while (old_s != s) {
-			*old_s = toupper(*old_s);
-			old_s++;
-		}
-
-	return s;
-}
-
-int
-_doprnt(register const char *fmt, va_list ap, FILE *stream)
-{
-	register char	*s;
-	register int	j;
-	int		i, c, width, precision, zfill, flags, between_fill;
-	int		nrchars=0;
-	const char	*oldfmt;
-	char		*s1, buf[1025];
-
-	while (c = *fmt++) {
-		if (c != '%') {
-#ifdef	CPM
-			if (c == '\n') {
-				if (putc('\r', stream) == EOF)
-					return nrchars ? -nrchars : -1;
-				nrchars++;
-			}
-#endif
-			if (putc(c, stream) == EOF)
-				return nrchars ? -nrchars : -1;
-			nrchars++;
-			continue;
-		}
-		flags = 0;
-		do {
-			switch(*fmt) {
-			case '-':	flags |= FL_LJUST;	break;
-			case '+':	flags |= FL_SIGN;	break;
-			case ' ':	flags |= FL_SPACE;	break;
-			case '#':	flags |= FL_ALT;	break;
-			case '0':	flags |= FL_ZEROFILL;	break;
-			default:	flags |= FL_NOMORE;	continue;
-			}
-			fmt++;
-		} while(!(flags & FL_NOMORE));
-
-		oldfmt = fmt;
-		fmt = gnum(fmt, &width, &ap);
-		if (fmt != oldfmt) flags |= FL_WIDTHSPEC;
-
-		if (*fmt == '.') {
-			fmt++; oldfmt = fmt;
-			fmt = gnum(fmt, &precision, &ap);
-			if (precision >= 0) flags |= FL_PRECSPEC;
-		}
-
-		if ((flags & FL_WIDTHSPEC) && width < 0) {
-			width = -width;
-			flags |= FL_LJUST;
-		}
-		if (!(flags & FL_WIDTHSPEC)) width = 0;
-
-		if (flags & FL_SIGN) flags &= ~FL_SPACE;
-
-		if (flags & FL_LJUST) flags &= ~FL_ZEROFILL;
-
-
-		s = s1 = buf;
-
-		switch (*fmt) {
-		case 'h':	flags |= FL_SHORT; fmt++; break;
-		case 'l':	flags |= FL_LONG; fmt++; break;
-		case 'L':	flags |= FL_LONGDOUBLE; fmt++; break;
-		}
-
-		switch (c = *fmt++) {
-		default:
-#ifdef	CPM
-			if (c == '\n') {
-				if (putc('\r', stream) == EOF)
-					return nrchars ? -nrchars : -1;
-				nrchars++;
-			}
-#endif
-			if (putc(c, stream) == EOF)
-				return nrchars ? -nrchars : -1;
-			nrchars++;
-			continue;
-		case 'n':
-			if (flags & FL_SHORT)
-				*va_arg(ap, short *) = (short) nrchars;
-			else if (flags & FL_LONG)
-				*va_arg(ap, long *) = (long) nrchars;
-			else
-				*va_arg(ap, int *) = (int) nrchars;
-			continue;
-		case 's':
-			s1 = va_arg(ap, char *);
-			if (s1 == NULL)
-				s1 = "(null)";
-			s = s1;
-			while (precision || !(flags & FL_PRECSPEC)) {
-				if (*s == '\0')
-					break;
-				s++;
-				precision--;
-			}
-			break;
-		case 'p':
-			set_pointer(flags);
-			/* fallthrough */
-		case 'b':
-		case 'o':
-		case 'u':
-		case 'x':
-		case 'X':
-			if (!(flags & FL_PRECSPEC)) precision = 1;
-			else if (c != 'p') flags &= ~FL_ZEROFILL;
-			s = o_print(&ap, flags, s, c, precision, 0);
-			break;
-		case 'd':
-		case 'i':
-			flags |= FL_SIGNEDCONV;
-			if (!(flags & FL_PRECSPEC)) precision = 1;
-			else flags &= ~FL_ZEROFILL;
-			s = o_print(&ap, flags, s, c, precision, 1);
-			break;
-		case 'c':
-			*s++ = va_arg(ap, int);
-			break;
-#ifndef NOFLOAT
-		case 'G':
-		case 'g':
-			if ((flags & FL_PRECSPEC) && (precision == 0))
-				precision = 1;
-		case 'f':
-		case 'E':
-		case 'e':
-			if (!(flags & FL_PRECSPEC)) 
-				precision = 6;
-
-			if (precision >= sizeof(buf))
-				precision = sizeof(buf) - 1;
-
-			flags |= FL_SIGNEDCONV;
-			s = _f_print(&ap, flags, s, c, precision);
-			break;
-#endif	/* NOFLOAT */
-		case 'r':
-			ap = va_arg(ap, va_list);
-			fmt = va_arg(ap, char *);
-			continue;
-		}
-		zfill = ' ';
-		if (flags & FL_ZEROFILL) zfill = '0';
-		j = s - s1;
-
-		/* between_fill is true under the following conditions:
-		 * 1- the fill character is '0'
-		 * and
-		 * 2a- the number is of the form 0x... or 0X...
-		 * or
-		 * 2b- the number contains a sign or space
-		 */
-		between_fill = 0;
-		if ((flags & FL_ZEROFILL)
-		    && (((c == 'x' || c == 'X') && (flags & FL_ALT))
-			|| (c == 'p')
-			|| ((flags & FL_SIGNEDCONV)
-			    && ( *s1 == '+' || *s1 == '-' || *s1 == ' '))))
-			between_fill++;
-
-		if ((i = width - j) > 0)
-			if (!(flags & FL_LJUST)) {	/* right justify */
-				nrchars += i;
-				if (between_fill) {
-				    if (flags & FL_SIGNEDCONV) {
-					j--; nrchars++;
-					if (putc(*s1++, stream) == EOF)
-						return nrchars ? -nrchars : -1;
-				    } else {
-					j -= 2; nrchars += 2;
-					if ((putc(*s1++, stream) == EOF)
-					    || (putc(*s1++, stream) == EOF))
-						return nrchars ? -nrchars : -1;
-				    }
-				}
-				do {
-					if (putc(zfill, stream) == EOF)
-						return nrchars ? -nrchars : -1;
-				} while (--i);
-			}
-
-		nrchars += j;
-		while (--j >= 0) {
-			if (putc(*s1++, stream) == EOF)
-				return nrchars ? -nrchars : -1;
-		}
-
-		if (i > 0) nrchars += i;
-		while (--i >= 0)
-			if (putc(zfill, stream) == EOF)
-				return nrchars ? -nrchars : -1;
-	}
-	return nrchars;
-}
Index: trunk/minix/lib/stdio/doscan.c
===================================================================
--- trunk/minix/lib/stdio/doscan.c	(revision 9)
+++ 	(revision )
@@ -1,449 +1,0 @@
-/*
- * doscan.c - scan formatted input
- */
-/* $Header: /cvsup/minix/src/lib/stdio/doscan.c,v 1.1.1.1 2005/04/21 14:56:35 beng Exp $ */
-
-#include	<stdio.h>
-#include	<stdlib.h>
-#include	<ctype.h>
-#include	<stdarg.h>
-#include	"loc_incl.h"
-
-#if	_EM_WSIZE == _EM_PSIZE
-#define set_pointer(flags)				/* nothing */
-#elif	_EM_LSIZE == _EM_PSIZE
-#define set_pointer(flags)	(flags |= FL_LONG)
-#else
-#error garbage pointer size
-#define set_pointer(flags)		/* compilation might continue */
-#endif
-
-#define	NUMLEN	512
-#define	NR_CHARS	256
-
-static char	Xtable[NR_CHARS];
-static char	inp_buf[NUMLEN];
-
-/* Collect a number of characters which constitite an ordinal number.
- * When the type is 'i', the base can be 8, 10, or 16, depending on the
- * first 1 or 2 characters. This means that the base must be adjusted
- * according to the format of the number. At the end of the function, base
- * is then set to 0, so strtol() will get the right argument.
- */
-static char *
-o_collect(register int c, register FILE *stream, char type,
-			unsigned int width, int *basep)
-{
-	register char *bufp = inp_buf;
-	register int base;
-
-	switch (type) {
-	case 'i':	/* i means octal, decimal or hexadecimal */
-	case 'p':
-	case 'x':
-	case 'X':	base = 16;	break;
-	case 'd':
-	case 'u':	base = 10;	break;
-	case 'o':	base = 8;	break;
-	case 'b':	base = 2;	break;
-	}
-
-	if (c == '-' || c == '+') {
-		*bufp++ = c;
-		if (--width)
-		    c = getc(stream);
-	}
-
-	if (width && c == '0' && base == 16) {
-		*bufp++ = c;
-		if (--width)
-			c = getc(stream);
-		if (c != 'x' && c != 'X') {
-			if (type == 'i') base = 8;
-		}
-		else if (width) {
-			*bufp++ = c;
-			if (--width)
-				c = getc(stream);
-		}
-	}
-	else if (type == 'i') base = 10;
-
-	while (width) {
-		if (((base == 10) && isdigit(c))
-		    || ((base == 16) && isxdigit(c))
-		    || ((base == 8) && isdigit(c) && (c < '8'))
-		    || ((base == 2) && isdigit(c) && (c < '2'))) {
-			*bufp++ = c;
-			if (--width)
-				c = getc(stream);
-		}
-		else break;
-	}
-
-	if (width && c != EOF) ungetc(c, stream);
-	if (type == 'i') base = 0;
-	*basep = base;
-	*bufp = '\0';
-	return bufp - 1;
-}
-
-#ifndef	NOFLOAT
-/* The function f_collect() reads a string that has the format of a
- * floating-point number. The function returns as soon as a format-error
- * is encountered, leaving the offending character in the input. This means
- * that 1.el leaves the 'l' in the input queue. Since all detection of
- * format errors is done here, _doscan() doesn't call strtod() when it's
- * not necessary, although the use of the width field can cause incomplete
- * numbers to be passed to strtod(). (e.g. 1.3e+)
- */
-static char *
-f_collect(register int c, register FILE *stream, register unsigned int width)
-{
-	register char *bufp = inp_buf;
-	int digit_seen = 0;
-
-	if (c == '-' || c == '+') {
-		*bufp++ = c;
-		if (--width)
-			c = getc(stream);
-	}
-
-	while (width && isdigit(c)) {
-		digit_seen++;
-		*bufp++ = c;
-		if (--width)
-			c = getc(stream);
-	}
-	if (width && c == '.') {
-		*bufp++ = c;
-		if(--width)
-			c = getc(stream);
-		while (width && isdigit(c)) {
-			digit_seen++;
-			*bufp++ = c;
-			if (--width)
-				c = getc(stream);
-		}
-	}
-
-	if (!digit_seen) {
-		if (width && c != EOF) ungetc(c, stream);
-		return inp_buf - 1;
-	}
-	else digit_seen = 0;
-
-	if (width && (c == 'e' || c == 'E')) {
-		*bufp++ = c;
-		if (--width)
-			c = getc(stream);
-		if (width && (c == '+' || c == '-')) {
-			*bufp++ = c;
-			if (--width)
-				c = getc(stream);
-		}
-		while (width && isdigit(c)) {
-			digit_seen++;
-			*bufp++ = c;
-			if (--width)
-				c = getc(stream);
-		}
-		if (!digit_seen) {
-			if (width && c != EOF) ungetc(c,stream);
-			return inp_buf - 1;
-		}
-	}
-
-	if (width && c != EOF) ungetc(c, stream);
-	*bufp = '\0';
-	return bufp - 1;
-}
-#endif	/* NOFLOAT */
-
-
-/*
- * the routine that does the scanning 
- */
-
-int
-_doscan(register FILE *stream, const char *format, va_list ap)
-{
-	int		done = 0;	/* number of items done */
-	int		nrchars = 0;	/* number of characters read */
-	int		conv = 0;	/* # of conversions */
-	int		base;		/* conversion base */
-	unsigned long	val;		/* an integer value */
-	register char	*str;		/* temporary pointer */
-	char		*tmp_string;	/* ditto */
-	unsigned	width = 0;	/* width of field */
-	int		flags;		/* some flags */
-	int		reverse;	/* reverse the checking in [...] */
-	int		kind;
-	register int	ic = EOF;	/* the input character */
-#ifndef	NOFLOAT
-	long double	ld_val;
-#endif
-
-	if (!*format) return 0;
-
-	while (1) {
-		if (isspace(*format)) {
-			while (isspace(*format))
-				format++;	/* skip whitespace */
-			ic = getc(stream);
-			nrchars++;
-			while (isspace (ic)) {
-				ic = getc(stream);
-				nrchars++;
-			}
-			if (ic != EOF) ungetc(ic,stream);
-			nrchars--;
-		}
-		if (!*format) break;	/* end of format */
-
-		if (*format != '%') {
-			ic = getc(stream);
-			nrchars++;
-			if (ic != *format++) break;	/* error */
-			continue;
-		}
-		format++;
-		if (*format == '%') {
-			ic = getc(stream);
-			nrchars++;
-			if (ic == '%') {
-				format++;
-				continue;
-			}
-			else break;
-		}
-		flags = 0;
-		if (*format == '*') {
-			format++;
-			flags |= FL_NOASSIGN;
-		}
-		if (isdigit (*format)) {
-			flags |= FL_WIDTHSPEC;
-			for (width = 0; isdigit (*format);)
-				width = width * 10 + *format++ - '0';
-		}
-
-		switch (*format) {
-		case 'h': flags |= FL_SHORT; format++; break;
-		case 'l': flags |= FL_LONG; format++; break;
-		case 'L': flags |= FL_LONGDOUBLE; format++; break;
-		}
-		kind = *format;
-		if ((kind != 'c') && (kind != '[') && (kind != 'n')) {
-			do {
-				ic = getc(stream);
-				nrchars++;
-			} while (isspace(ic));
-			if (ic == EOF) break;		/* outer while */
-		} else if (kind != 'n') {		/* %c or %[ */
-			ic = getc(stream);
-			if (ic == EOF) break;		/* outer while */
-			nrchars++;
-		}
-		switch (kind) {
-		default:
-			/* not recognized, like %q */
-			return conv || (ic != EOF) ? done : EOF;
-			break;
-		case 'n':
-			if (!(flags & FL_NOASSIGN)) {	/* silly, though */
-				if (flags & FL_SHORT)
-					*va_arg(ap, short *) = (short) nrchars;
-				else if (flags & FL_LONG)
-					*va_arg(ap, long *) = (long) nrchars;
-				else
-					*va_arg(ap, int *) = (int) nrchars;
-			}
-			break;
-		case 'p':		/* pointer */
-			set_pointer(flags);
-			/* fallthrough */
-		case 'b':		/* binary */
-		case 'd':		/* decimal */
-		case 'i':		/* general integer */
-		case 'o':		/* octal */
-		case 'u':		/* unsigned */
-		case 'x':		/* hexadecimal */
-		case 'X':		/* ditto */
-			if (!(flags & FL_WIDTHSPEC) || width > NUMLEN)
-				width = NUMLEN;
-			if (!width) return done;
-
-			str = o_collect(ic, stream, kind, width, &base);
-			if (str < inp_buf
-			    || (str == inp_buf
-				    && (*str == '-'
-					|| *str == '+'))) return done;
-
-			/*
-			 * Although the length of the number is str-inp_buf+1
-			 * we don't add the 1 since we counted it already
-			 */
-			nrchars += str - inp_buf;
-
-			if (!(flags & FL_NOASSIGN)) {
-				if (kind == 'd' || kind == 'i')
-				    val = strtol(inp_buf, &tmp_string, base);
-				else
-				    val = strtoul(inp_buf, &tmp_string, base);
-				if (flags & FL_LONG)
-					*va_arg(ap, unsigned long *) = (unsigned long) val;
-				else if (flags & FL_SHORT)
-					*va_arg(ap, unsigned short *) = (unsigned short) val;
-				else
-					*va_arg(ap, unsigned *) = (unsigned) val;
-			}
-			break;
-		case 'c':
-			if (!(flags & FL_WIDTHSPEC))
-				width = 1;
-			if (!(flags & FL_NOASSIGN))
-				str = va_arg(ap, char *);
-			if (!width) return done;
-
-			while (width && ic != EOF) {
-				if (!(flags & FL_NOASSIGN))
-					*str++ = (char) ic;
-				if (--width) {
-					ic = getc(stream);
-					nrchars++;
-				}
-			}
-
-			if (width) {
-				if (ic != EOF) ungetc(ic,stream);
-				nrchars--;
-			}
-			break;
-		case 's':
-			if (!(flags & FL_WIDTHSPEC))
-				width = 0xffff;
-			if (!(flags & FL_NOASSIGN))
-				str = va_arg(ap, char *);
-			if (!width) return done;
-
-			while (width && ic != EOF && !isspace(ic)) {
-				if (!(flags & FL_NOASSIGN))
-					*str++ = (char) ic;
-				if (--width) {
-					ic = getc(stream);
-					nrchars++;
-				}
-			}
-			/* terminate the string */
-			if (!(flags & FL_NOASSIGN))
-				*str = '\0';	
-			if (width) {
-				if (ic != EOF) ungetc(ic,stream);
-				nrchars--;
-			}
-			break;
-		case '[':
-			if (!(flags & FL_WIDTHSPEC))
-				width = 0xffff;
-			if (!width) return done;
-
-			if ( *++format == '^' ) {
-				reverse = 1;
-				format++;
-			} else
-				reverse = 0;
-
-			for (str = Xtable; str < &Xtable[NR_CHARS]
-							; str++)
-				*str = 0;
-
-			if (*format == ']') Xtable[*format++] = 1;
-
-			while (*format && *format != ']') {
-				Xtable[*format++] = 1;
-				if (*format == '-') {
-					format++;
-					if (*format
-					    && *format != ']'
-					    && *(format) >= *(format -2)) {
-						int c;
-
-						for( c = *(format -2) + 1
-						    ; c <= *format ; c++)
-							Xtable[c] = 1;
-						format++;
-					}
-					else Xtable['-'] = 1;
-				}
-			}
-			if (!*format) return done;
-			
-			if (!(Xtable[ic] ^ reverse)) {
-			/* MAT 8/9/96 no match must return character */
-				ungetc(ic, stream);
-				return done;
-			}
-
-			if (!(flags & FL_NOASSIGN))
-				str = va_arg(ap, char *);
-
-			do {
-				if (!(flags & FL_NOASSIGN))
-					*str++ = (char) ic;
-				if (--width) {
-					ic = getc(stream);
-					nrchars++;
-				}
-			} while (width && ic != EOF && (Xtable[ic] ^ reverse));
-
-			if (width) {
-				if (ic != EOF) ungetc(ic, stream);
-				nrchars--;
-			}
-			if (!(flags & FL_NOASSIGN)) {	/* terminate string */
-				*str = '\0';	
-			}
-			break;
-#ifndef	NOFLOAT
-		case 'e':
-		case 'E':
-		case 'f':
-		case 'g':
-		case 'G':
-			if (!(flags & FL_WIDTHSPEC) || width > NUMLEN)
-				width = NUMLEN;
-
-			if (!width) return done;
-			str = f_collect(ic, stream, width);
-
-			if (str < inp_buf
-			    || (str == inp_buf
-				&& (*str == '-'
-				    || *str == '+'))) return done;
-
-			/*
-			 * Although the length of the number is str-inp_buf+1
-			 * we don't add the 1 since we counted it already
-			 */
-			nrchars += str - inp_buf;
-
-			if (!(flags & FL_NOASSIGN)) {
-				ld_val = strtod(inp_buf, &tmp_string);
-				if (flags & FL_LONGDOUBLE)
-					*va_arg(ap, long double *) = (long double) ld_val;
-				else
-				    if (flags & FL_LONG)
-					*va_arg(ap, double *) = (double) ld_val;
-				else
-					*va_arg(ap, float *) = (float) ld_val;
-			}
-			break;
-#endif
-		}		/* end switch */
-		conv++;
-		if (!(flags & FL_NOASSIGN) && kind != 'n') done++;
-		format++;
-	}
-	return conv || (ic != EOF) ? done : EOF;
-}
Index: trunk/minix/lib/stdio/ecvt.c
===================================================================
--- trunk/minix/lib/stdio/ecvt.c	(revision 9)
+++ 	(revision )
@@ -1,31 +1,0 @@
-/* $Header: /cvsup/minix/src/lib/stdio/ecvt.c,v 1.1.1.1 2005/04/21 14:56:35 beng Exp $ */
-
-#ifndef NOFLOAT
-
-#include	"../ansi/ext_fmt.h"
-void _dbl_ext_cvt(double value, struct EXTEND *e);
-char *_ext_str_cvt(struct EXTEND *e, int ndigit, int *decpt, int * sign, int ecvtflag);
-
-static char *
-cvt(long double value, int ndigit, int *decpt, int *sign, int ecvtflag)
-{
-	struct EXTEND e;
-
-	_dbl_ext_cvt(value, &e);
-	return _ext_str_cvt(&e, ndigit, decpt, sign, ecvtflag);
-}
-
-char *
-_ecvt(long double value, int ndigit, int *decpt, int *sign)
-{
-
-	return cvt(value, ndigit, decpt, sign, 1);
-}
-
-char *
-_fcvt(long double value, int ndigit, int *decpt, int *sign)
-{
-	return cvt(value, ndigit, decpt, sign, 0);
-}
-
-#endif	/* NOFLOAT */
Index: trunk/minix/lib/stdio/fclose.c
===================================================================
--- trunk/minix/lib/stdio/fclose.c	(revision 9)
+++ 	(revision )
@@ -1,31 +1,0 @@
-/*
- * fclose.c - flush a stream and close the file
- */
-/* $Header: /cvsup/minix/src/lib/stdio/fclose.c,v 1.1.1.1 2005/04/21 14:56:35 beng Exp $ */
-
-#include	<stdio.h>
-#include	<stdlib.h>
-#include	"loc_incl.h"
-
-int _close(int d);
-
-int
-fclose(FILE *fp)
-{
-	register int i, retval = 0;
-
-	for (i=0; i<FOPEN_MAX; i++)
-		if (fp == __iotab[i]) {
-			__iotab[i] = 0;
-			break;
-		}
-	if (i >= FOPEN_MAX)
-		return EOF;
-	if (fflush(fp)) retval = EOF;
-	if (_close(fileno(fp))) retval = EOF;
-	if ( io_testflag(fp,_IOMYBUF) && fp->_buf )
-		free((void *)fp->_buf);
-	if (fp != stdin && fp != stdout && fp != stderr)
-		free((void *)fp);
-	return retval;
-}
Index: trunk/minix/lib/stdio/feof.c
===================================================================
--- trunk/minix/lib/stdio/feof.c	(revision 9)
+++ 	(revision )
@@ -1,12 +1,0 @@
-/*
- * feof.c - test if eof on a stream occurred
- */
-/* $Header: /cvsup/minix/src/lib/stdio/feof.c,v 1.1.1.1 2005/04/21 14:56:35 beng Exp $ */
-
-#include	<stdio.h>
-
-int
-(feof)(FILE *stream)
-{
-	return feof(stream);
-}
Index: trunk/minix/lib/stdio/ferror.c
===================================================================
--- trunk/minix/lib/stdio/ferror.c	(revision 9)
+++ 	(revision )
@@ -1,12 +1,0 @@
-/*
- * ferror .c - test if an error on a stream occurred
- */
-/* $Header: /cvsup/minix/src/lib/stdio/ferror.c,v 1.1.1.1 2005/04/21 14:56:35 beng Exp $ */
-
-#include	<stdio.h>
-
-int
-(ferror)(FILE *stream)
-{
-	return ferror(stream);
-}
Index: trunk/minix/lib/stdio/fflush.c
===================================================================
--- trunk/minix/lib/stdio/fflush.c	(revision 9)
+++ 	(revision )
@@ -1,86 +1,0 @@
-/*
- * fflush.c - flush stream(s)
- */
-/* $Header: /cvsup/minix/src/lib/stdio/fflush.c,v 1.3 2006/02/02 16:59:07 beng Exp $ */
-
-#include	<sys/types.h>
-#include	<stdio.h>
-#include	<errno.h>
-#include	"loc_incl.h"
-
-ssize_t _write(int d, const char *buf, size_t nbytes);
-off_t _lseek(int fildes, off_t offset, int whence);
-
-int
-fflush(FILE *stream)
-{
-	int count, c1, i, retval = 0;
-
-	if (!stream) {
-	    for(i= 0; i < FOPEN_MAX; i++)
-		if (__iotab[i] && fflush(__iotab[i]))
-			retval = EOF;
-	    return retval;
-	}
-
-	if (!stream->_buf
-	    || (!io_testflag(stream, _IOREADING)
-		&& !io_testflag(stream, _IOWRITING)))
-		return 0;
-	if (io_testflag(stream, _IOREADING)) {
-		/* (void) fseek(stream, 0L, SEEK_CUR); */
-		int adjust = 0;
-		if (io_testflag(stream, _IOFIFO)) {
-			/* Can't seek in a pipe. */
-			return 0;
-		}
-		if (stream->_buf && !io_testflag(stream,_IONBF))
-			adjust = -stream->_count;
-		stream->_count = 0;
-		if (_lseek(fileno(stream), (off_t) adjust, SEEK_CUR) == -1 &&
-		  errno != ESPIPE) {
-			stream->_flags |= _IOERR;
-			return EOF;
-		}
-		errno = 0;
-		if (io_testflag(stream, _IOWRITE))
-			stream->_flags &= ~(_IOREADING | _IOWRITING);
-		stream->_ptr = stream->_buf;
-		return 0;
-	} else if (io_testflag(stream, _IONBF)) return 0;
-
-	if (io_testflag(stream, _IOREAD))		/* "a" or "+" mode */
-		stream->_flags &= ~_IOWRITING;
-
-	count = stream->_ptr - stream->_buf;
-	stream->_ptr = stream->_buf;
-
-	if ( count <= 0 )
-		return 0;
-
-	if (io_testflag(stream, _IOAPPEND)) {
-		if (_lseek(fileno(stream), 0L, SEEK_END) == -1) {
-			stream->_flags |= _IOERR;
-			return EOF;
-		}
-	}
-	c1 = _write(stream->_fd, (char *)stream->_buf, count);
-
-	stream->_count = 0;
-
-	if ( count == c1 )
-		return 0;
-
-	stream->_flags |= _IOERR;
-	return EOF; 
-}
-
-void
-__cleanup(void)
-{
-	register int i;
-
-	for(i= 0; i < FOPEN_MAX; i++)
-		if (__iotab[i] && io_testflag(__iotab[i], _IOWRITING))
-			(void) fflush(__iotab[i]);
-}
Index: trunk/minix/lib/stdio/fgetc.c
===================================================================
--- trunk/minix/lib/stdio/fgetc.c	(revision 9)
+++ 	(revision )
@@ -1,12 +1,0 @@
-/*
- * fgetc - get an unsigned character and return it as an int
- */
-/* $Header: /cvsup/minix/src/lib/stdio/fgetc.c,v 1.1.1.1 2005/04/21 14:56:35 beng Exp $ */
-
-#include	<stdio.h>
-
-int
-fgetc(FILE *stream)
-{
-	return getc(stream);
-}
Index: trunk/minix/lib/stdio/fgetpos.c
===================================================================
--- trunk/minix/lib/stdio/fgetpos.c	(revision 9)
+++ 	(revision )
@@ -1,14 +1,0 @@
-/*
- * fgetpos.c - get the position in the file
- */
-/* $Header: /cvsup/minix/src/lib/stdio/fgetpos.c,v 1.1.1.1 2005/04/21 14:56:35 beng Exp $ */
-
-#include	<stdio.h>
-
-int
-fgetpos(FILE *stream, fpos_t *pos)
-{
-	*pos = ftell(stream);
-	if (*pos == -1) return -1;
-	return 0;
-}
Index: trunk/minix/lib/stdio/fgets.c
===================================================================
--- trunk/minix/lib/stdio/fgets.c	(revision 9)
+++ 	(revision )
@@ -1,27 +1,0 @@
-/*
- * fgets.c - get a string from a file
- */
-/* $Header: /cvsup/minix/src/lib/stdio/fgets.c,v 1.1.1.1 2005/04/21 14:56:35 beng Exp $ */
-
-#include	<stdio.h>
-
-char *
-fgets(char *s, register int n, register FILE *stream)
-{
-	register int ch;
-	register char *ptr;
-
-	ptr = s;
-	while (--n > 0 && (ch = getc(stream)) != EOF) {
-		*ptr++ = ch;
-		if ( ch == '\n')
-			break;
-	}
-	if (ch == EOF) {
-		if (feof(stream)) {
-			if (ptr == s) return NULL;
-		} else return NULL;
-	}
-	*ptr = '\0';
-	return s;
-}
Index: trunk/minix/lib/stdio/fileno.c
===================================================================
--- trunk/minix/lib/stdio/fileno.c	(revision 9)
+++ 	(revision )
@@ -1,12 +1,0 @@
-/*
- * fileno .c - map a stream to a file descriptor
- */
-/* $Header: /cvsup/minix/src/lib/stdio/fileno.c,v 1.1.1.1 2005/04/21 14:56:35 beng Exp $ */
-
-#include	<stdio.h>
-
-int
-(fileno)(FILE *stream)
-{
-	return stream->_fd;
-}
Index: trunk/minix/lib/stdio/fillbuf.c
===================================================================
--- trunk/minix/lib/stdio/fillbuf.c	(revision 9)
+++ 	(revision )
@@ -1,69 +1,0 @@
-/*
- * fillbuf.c - fill a buffer
- */
-/* $Header: /cvsup/minix/src/lib/stdio/fillbuf.c,v 1.1.1.1 2005/04/21 14:56:35 beng Exp $ */
-
-#if	defined(_POSIX_SOURCE)
-#include	<sys/types.h>
-#endif
-#include	<stdio.h>
-#include	<stdlib.h>
-#include	"loc_incl.h"
-
-ssize_t _read(ssize_t d, char *buf, size_t nbytes);
-
-int
-__fillbuf(register FILE *stream)
-{
-	static unsigned char ch[FOPEN_MAX];
-	register int i;
-
-	stream->_count = 0;
-	if (fileno(stream) < 0) return EOF;
-	if (io_testflag(stream, (_IOEOF | _IOERR ))) return EOF; 
-	if (!io_testflag(stream, _IOREAD))
-	     { stream->_flags |= _IOERR; return EOF; }
-	if (io_testflag(stream, _IOWRITING))
-	     { stream->_flags |= _IOERR; return EOF; }
-
-	if (!io_testflag(stream, _IOREADING))
-		stream->_flags |= _IOREADING;
-	
-	if (!io_testflag(stream, _IONBF) && !stream->_buf) {
-		stream->_buf = (unsigned char *) malloc(BUFSIZ);
-		if (!stream->_buf) {
-			stream->_flags |= _IONBF;
-		}
-		else {
-			stream->_flags |= _IOMYBUF;
-			stream->_bufsiz = BUFSIZ;
-		}
-	}
-
-	/* flush line-buffered output when filling an input buffer */
-	for (i = 0; i < FOPEN_MAX; i++) {
-		if (__iotab[i] && io_testflag(__iotab[i], _IOLBF))
-			if (io_testflag(__iotab[i], _IOWRITING))
-				(void) fflush(__iotab[i]);
-	}
-
-	if (!stream->_buf) {
-		stream->_buf = &ch[fileno(stream)];
-		stream->_bufsiz = 1;
-	}
-	stream->_ptr = stream->_buf;
-	stream->_count = _read(stream->_fd, (char *)stream->_buf, stream->_bufsiz);
-
-	if (stream->_count <= 0){
-		if (stream->_count == 0) {
-			stream->_flags |= _IOEOF;
-		}
-		else 
-			stream->_flags |= _IOERR;
-
-		return EOF;
-	}
-	stream->_count--;
-
-	return *stream->_ptr++;
-}
Index: trunk/minix/lib/stdio/flushbuf.c
===================================================================
--- trunk/minix/lib/stdio/flushbuf.c	(revision 9)
+++ 	(revision )
@@ -1,127 +1,0 @@
-/*
- * flushbuf.c - flush a buffer
- */
-/* $Id: flushbuf.c,v 1.1.1.1 2005/04/21 14:56:35 beng Exp $ */
-
-#include	<stdio.h>
-#include	<stdlib.h>
-#include	"loc_incl.h"
-
-#include	<sys/types.h>
-
-off_t _lseek(int fildes, off_t offset, int whence);
-ssize_t _write(int d, const char *buf, int nbytes);
-int _isatty(int d);
-extern void (*_clean)(void);
-
-static int
-do_write(int d, char *buf, int nbytes)
-{
-	int c;
-
-	/* POSIX actually allows write() to return a positive value less
-	   than nbytes, so loop ...
-	*/
-	while ((c = _write(d, buf, nbytes)) > 0 && c < nbytes) {
-		nbytes -= c;
-		buf += c;
-	}
-	return c > 0;
-}
-
-int
-__flushbuf(int c, FILE * stream)
-{
-	_clean = __cleanup;
-	if (fileno(stream) < 0) return (unsigned char) c;
-	if (!io_testflag(stream, _IOWRITE)) return EOF;
-	if (io_testflag(stream, _IOREADING) && !feof(stream)) return EOF;
-
-	stream->_flags &= ~_IOREADING;
-	stream->_flags |= _IOWRITING;
-	if (!io_testflag(stream, _IONBF)) {
-		if (!stream->_buf) {
-			if (stream == stdout && _isatty(fileno(stdout))) {
-				if (!(stream->_buf =
-					    (unsigned char *) malloc(BUFSIZ))) {
-					stream->_flags |= _IONBF;
-				} else {
-					stream->_flags |= _IOLBF|_IOMYBUF;
-					stream->_bufsiz = BUFSIZ;
-					stream->_count = -1;
-				}
-			} else {
-				if (!(stream->_buf =
-					    (unsigned char *) malloc(BUFSIZ))) {
-					stream->_flags |= _IONBF;
-				} else {
-					stream->_flags |= _IOMYBUF;
-					stream->_bufsiz = BUFSIZ;
-					if (!io_testflag(stream, _IOLBF))
-						stream->_count = BUFSIZ - 1;
-					else	stream->_count = -1;
-				}
-			}
-			stream->_ptr = stream->_buf;
-		}
-	}
-
-	if (io_testflag(stream, _IONBF)) {
-		char c1 = c;
-
-		stream->_count = 0;
-		if (io_testflag(stream, _IOAPPEND)) {
-			if (_lseek(fileno(stream), 0L, SEEK_END) == -1) {
-				stream->_flags |= _IOERR;
-				return EOF;
-			}
-		}
-		if (_write(fileno(stream), &c1, 1) != 1) {
-			stream->_flags |= _IOERR;
-			return EOF;
-		}
-		return (unsigned char) c;
-	} else if (io_testflag(stream, _IOLBF)) {
-		*stream->_ptr++ = c;
-		/* stream->_count has been updated in putc macro. */
-		if (c == '\n' || stream->_count == -stream->_bufsiz) {
-			int count = -stream->_count;
-
-			stream->_ptr  = stream->_buf;
-			stream->_count = 0;
-
-			if (io_testflag(stream, _IOAPPEND)) {
-				if (_lseek(fileno(stream), 0L, SEEK_END) == -1) {
-					stream->_flags |= _IOERR;
-					return EOF;
-				}
-			}
-			if (! do_write(fileno(stream), (char *)stream->_buf,
-					count)) {
-				stream->_flags |= _IOERR;
-				return EOF;
-			}
-		}
-	} else {
-		int count = stream->_ptr - stream->_buf;
-
-		stream->_count = stream->_bufsiz - 1;
-		stream->_ptr = stream->_buf + 1;
-
-		if (count > 0) {
-			if (io_testflag(stream, _IOAPPEND)) {
-				if (_lseek(fileno(stream), 0L, SEEK_END) == -1) {
-					stream->_flags |= _IOERR;
-					return EOF;
-				}
-			}
-			if (! do_write(fileno(stream), (char *)stream->_buf, count)) {
-				*(stream->_buf) = c;
-				stream->_flags |= _IOERR;
-				return EOF;
-			}
-		}
-		*(stream->_buf) = c;
-	}
-	return (unsigned char) c;
-}
Index: trunk/minix/lib/stdio/fopen.c
===================================================================
--- trunk/minix/lib/stdio/fopen.c	(revision 9)
+++ 	(revision )
@@ -1,129 +1,0 @@
-/*
- * fopen.c - open a stream
- */
-/* $Header: /cvsup/minix/src/lib/stdio/fopen.c,v 1.4 2006/02/02 16:59:07 beng Exp $ */
-
-#if	defined(_POSIX_SOURCE)
-#include	<sys/types.h>
-#endif
-#include	<stdio.h>
-#include	<stdlib.h>
-#include	"loc_incl.h"
-#include	<sys/stat.h>
-
-#define	PMODE		0666
-
-/* The next 3 defines are true in all UNIX systems known to me.
- */
-#define	O_RDONLY	0
-#define	O_WRONLY	1
-#define	O_RDWR		2
-
-/* Since the O_CREAT flag is not available on all systems, we can't get it
- * from the standard library. Furthermore, even if we know that <fcntl.h>
- * contains such a flag, it's not sure whether it can be used, since we
- * might be cross-compiling for another system, which may use an entirely
- * different value for O_CREAT (or not support such a mode). The safest
- * thing is to just use the Version 7 semantics for open, and use creat()
- * whenever necessary.
- *
- * Another problem is O_APPEND, for which the same holds. When "a"
- * open-mode is used, an lseek() to the end is done before every write()
- * system-call.
- *
- * The O_CREAT, O_TRUNC and O_APPEND given here, are only for convenience.
- * They are not passed to open(), so the values don't have to match a value
- * from the real world. It is enough when they are unique.
- */
-#define	O_CREAT		0x010
-#define	O_TRUNC		0x020
-#define	O_APPEND	0x040
-
-int _open(const char *path, int flags);
-int _creat(const char *path, _mnx_Mode_t mode);
-int _close(int d);
-
-FILE *
-fopen(const char *name, const char *mode)
-{
-	register int i;
-	int rwmode = 0, rwflags = 0;
-	FILE *stream;
-	struct stat st;
-	int fd, flags = 0;
-
-	for (i = 0; __iotab[i] != 0 ; i++) 
-		if ( i >= FOPEN_MAX-1 )
-			return (FILE *)NULL;
-
-	switch(*mode++) {
-	case 'r':
-		flags |= _IOREAD | _IOREADING;	
-		rwmode = O_RDONLY;
-		break;
-	case 'w':
-		flags |= _IOWRITE | _IOWRITING;
-		rwmode = O_WRONLY;
-		rwflags = O_CREAT | O_TRUNC;
-		break;
-	case 'a': 
-		flags |= _IOWRITE | _IOWRITING | _IOAPPEND;
-		rwmode = O_WRONLY;
-		rwflags |= O_APPEND | O_CREAT;
-		break;         
-	default:
-		return (FILE *)NULL;
-	}
-
-	while (*mode) {
-		switch(*mode++) {
-		case 'b':
-			continue;
-		case '+':
-			rwmode = O_RDWR;
-			flags |= _IOREAD | _IOWRITE;
-			continue;
-		/* The sequence may be followed by additional characters */
-		default:
-			break;
-		}
-		break;
-	}
-
-	/* Perform a creat() when the file should be truncated or when
-	 * the file is opened for writing and the open() failed.
-	 */
-	if ((rwflags & O_TRUNC)
-	    || (((fd = _open(name, rwmode)) < 0)
-		    && (rwflags & O_CREAT))) {
-		if (((fd = _creat(name, PMODE)) > 0) && flags  | _IOREAD) {
-			(void) _close(fd);
-			fd = _open(name, rwmode);
-		}
-			
-	}
-
-	if (fd < 0) return (FILE *)NULL;
-
-	if ( fstat( fd, &st ) < 0 ) {
-		_close(fd);
-		return (FILE *)NULL;
-	}
-	
-	if ( S_ISFIFO(st.st_mode) ) flags |= _IOFIFO;
-	
-	if (( stream = (FILE *) malloc(sizeof(FILE))) == NULL ) {
-		_close(fd);
-		return (FILE *)NULL;
-	}
-
-	if ((flags & (_IOREAD | _IOWRITE))  == (_IOREAD | _IOWRITE))
-		flags &= ~(_IOREADING | _IOWRITING);
-
-	stream->_count = 0;
-	stream->_fd = fd;
-	stream->_flags = flags;
-	stream->_buf = NULL;
-	__iotab[i] = stream;
-	return stream;
-}
Index: trunk/minix/lib/stdio/fprintf.c
===================================================================
--- trunk/minix/lib/stdio/fprintf.c	(revision 9)
+++ 	(revision )
@@ -1,23 +1,0 @@
-/*
- * fprintf - write output on a stream
- */
-/* $Header: /cvsup/minix/src/lib/stdio/fprintf.c,v 1.1.1.1 2005/04/21 14:56:35 beng Exp $ */
-
-#include	<stdio.h>
-#include	<stdarg.h>
-#include	"loc_incl.h"
-
-int
-fprintf(FILE *stream, const char *format, ...)
-{
-	va_list ap;
-	int retval;
-	
-	va_start(ap, format);
-
-	retval = _doprnt (format, ap, stream);
-
-	va_end(ap);
-
-	return retval;
-}
Index: trunk/minix/lib/stdio/fputc.c
===================================================================
--- trunk/minix/lib/stdio/fputc.c	(revision 9)
+++ 	(revision )
@@ -1,12 +1,0 @@
-/*
- * fputc.c - print an unsigned character
- */
-/* $Header: /cvsup/minix/src/lib/stdio/fputc.c,v 1.1.1.1 2005/04/21 14:56:35 beng Exp $ */
-
-#include	<stdio.h>
-
-int
-fputc(int c, FILE *stream)
-{
-	return putc(c, stream);
-}
Index: trunk/minix/lib/stdio/fputs.c
===================================================================
--- trunk/minix/lib/stdio/fputs.c	(revision 9)
+++ 	(revision )
@@ -1,18 +1,0 @@
-/*
- * fputs - print a string
- */
-/* $Header: /cvsup/minix/src/lib/stdio/fputs.c,v 1.1.1.1 2005/04/21 14:56:35 beng Exp $ */
-
-#include	<stdio.h>
-
-int
-fputs(register const char *s, register FILE *stream)
-{
-	register int i = 0;
-
-	while (*s) 
-		if (putc(*s++, stream) == EOF) return EOF;
-		else i++;
-
-	return i;
-}
Index: trunk/minix/lib/stdio/fread.c
===================================================================
--- trunk/minix/lib/stdio/fread.c	(revision 9)
+++ 	(revision )
@@ -1,29 +1,0 @@
-/*
- * fread.c - read a number of members into an array
- */
-/* $Header: /cvsup/minix/src/lib/stdio/fread.c,v 1.1.1.1 2005/04/21 14:56:35 beng Exp $ */
-
-#include	<stdio.h>
-
-size_t
-fread(void *ptr, size_t size, size_t nmemb, register FILE *stream)
-{
-	register char *cp = ptr;
-	register int c;
-	size_t ndone = 0;
-	register size_t s;
-
-	if (size)
-		while ( ndone < nmemb ) {
-			s = size;
-			do {
-				if ((c = getc(stream)) != EOF)
-					*cp++ = c;
-				else
-					return ndone;
-			} while (--s);
-			ndone++;
-		}
-
-	return ndone;
-}
Index: trunk/minix/lib/stdio/freopen.c
===================================================================
--- trunk/minix/lib/stdio/freopen.c	(revision 9)
+++ 	(revision )
@@ -1,110 +1,0 @@
-/*
- * freopen.c - open a file and associate a stream with it
- */
-/* $Header: /cvsup/minix/src/lib/stdio/freopen.c,v 1.4 2006/02/02 16:59:07 beng Exp $ */
-
-#if	defined(_POSIX_SOURCE)
-#include	<sys/types.h>
-#endif
-#include	<stdio.h>
-#include	<stdlib.h>
-#include	"loc_incl.h"
-#include	<sys/stat.h>
-
-#define	PMODE		0666
-
-/* Do not "optimize" this file to use the open with O_CREAT if the file
- * does not exist. The reason is given in fopen.c.
- */
-#define	O_RDONLY	0
-#define	O_WRONLY	1
-#define	O_RDWR		2
-
-#define	O_CREAT		0x010
-#define	O_TRUNC		0x020
-#define	O_APPEND	0x040
-
-int _open(const char *path, int flags);
-int _creat(const char *path, _mnx_Mode_t mode);
-int _close(int d);
-
-FILE *
-freopen(const char *name, const char *mode, FILE *stream)
-{
-	register int i;
-	struct stat st;
-	int rwmode = 0, rwflags = 0;
-	int fd, flags = stream->_flags & (_IONBF | _IOFBF | _IOLBF | _IOMYBUF);
-
-	(void) fflush(stream);				/* ignore errors */
-	(void) _close(fileno(stream));
-
-	switch(*mode++) {
-	case 'r':
-		flags |= _IOREAD;	
-		rwmode = O_RDONLY;
-		break;
-	case 'w':
-		flags |= _IOWRITE;
-		rwmode = O_WRONLY;
-		rwflags = O_CREAT | O_TRUNC;
-		break;
-	case 'a': 
-		flags |= _IOWRITE | _IOAPPEND;
-		rwmode = O_WRONLY;
-		rwflags |= O_APPEND | O_CREAT;
-		break;         
-	default:
-		goto loser;
-	}
-
-	while (*mode) {
-		switch(*mode++) {
-		case 'b':
-			continue;
-		case '+':
-			rwmode = O_RDWR;
-			flags |= _IOREAD | _IOWRITE;
-			continue;
-		/* The sequence may be followed by aditional characters */
-		default:
-			break;
-		}
-		break;
-	}
-
-	if ((rwflags & O_TRUNC)
-	    || (((fd = _open(name, rwmode)) < 0)
-		    && (rwflags & O_CREAT))) {
-		if (((fd = _creat(name, PMODE)) < 0) && flags | _IOREAD) {
-			(void) _close(fd);
-			fd = _open(name, rwmode);
-		}
-	}
-
-	if (fd < 0) {
-		goto loser;
-	}
-
-	if ( fstat( fd, &st ) == 0 ) {
-		if ( S_ISFIFO(st.st_mode) ) flags |= _IOFIFO;
-	} else {
-		goto loser;
-	}
-	
-	stream->_count = 0;
-	stream->_fd = fd;
-	stream->_flags = flags;
-	return stream;
-
-loser:
-	for( i = 0; i < FOPEN_MAX; i++) {
-		if (stream == __iotab[i]) {
-			__iotab[i] = 0;
-			break;
-		}
-	}
-	if (stream != stdin && stream != stdout && stream != stderr)
-		free((void *)stream);
-	return (FILE *)NULL;	
-}
Index: trunk/minix/lib/stdio/fscanf.c
===================================================================
--- trunk/minix/lib/stdio/fscanf.c	(revision 9)
+++ 	(revision )
@@ -1,23 +1,0 @@
-/*
- * fscanf.c - read formatted input from stream
- */
-/* $Header: /cvsup/minix/src/lib/stdio/fscanf.c,v 1.1.1.1 2005/04/21 14:56:35 beng Exp $ */
-
-#include	<stdio.h>
-#include	<stdarg.h>
-#include	"loc_incl.h"
-
-int
-fscanf(FILE *stream, const char *format, ...)
-{
-	va_list ap;
-	int retval;
-
-	va_start(ap, format);
-
-	retval = _doscan(stream, format, ap);
-
-	va_end(ap);
-
-	return retval;
-}
Index: trunk/minix/lib/stdio/fseek.c
===================================================================
--- trunk/minix/lib/stdio/fseek.c	(revision 9)
+++ 	(revision )
@@ -1,44 +1,0 @@
-/*
- * fseek.c - perform an fseek
- */
-/* $Header: /cvsup/minix/src/lib/stdio/fseek.c,v 1.1.1.1 2005/04/21 14:56:35 beng Exp $ */
-
-#include	<stdio.h>
-
-#if	(SEEK_CUR != 1) || (SEEK_END != 2) || (SEEK_SET != 0)
-#error SEEK_* values are wrong
-#endif
-
-#include	"loc_incl.h"
-
-#include	<sys/types.h>
-
-off_t _lseek(int fildes, off_t offset, int whence);
-
-int
-fseek(FILE *stream, long int offset, int whence)
-{
-	int adjust = 0;
-	long pos;
-
-	stream->_flags &= ~(_IOEOF | _IOERR);
-	/* Clear both the end of file and error flags */
-
-	if (io_testflag(stream, _IOREADING)) {
-		if (whence == SEEK_CUR
-		    && stream->_buf
-		    && !io_testflag(stream,_IONBF))
-			adjust = stream->_count;
-		stream->_count = 0;
-	} else if (io_testflag(stream,_IOWRITING)) {
-		fflush(stream);
-	} else	/* neither reading nor writing. The buffer must be empty */
-		/* EMPTY */ ;
-
-	pos = _lseek(fileno(stream), offset - adjust, whence);
-	if (io_testflag(stream, _IOREAD) && io_testflag(stream, _IOWRITE))
-		stream->_flags &= ~(_IOREADING | _IOWRITING);
-
-	stream->_ptr = stream->_buf;
-	return ((pos == -1) ? -1 : 0);
-}
Index: trunk/minix/lib/stdio/fsetpos.c
===================================================================
--- trunk/minix/lib/stdio/fsetpos.c	(revision 9)
+++ 	(revision )
@@ -1,12 +1,0 @@
-/*
- * fsetpos.c - set the position in the file
- */
-/* $Header: /cvsup/minix/src/lib/stdio/fsetpos.c,v 1.1.1.1 2005/04/21 14:56:35 beng Exp $ */
-
-#include	<stdio.h>
-
-int
-fsetpos(FILE *stream, fpos_t *pos)
-{
-	return fseek(stream, *pos, SEEK_SET);
-}
Index: trunk/minix/lib/stdio/ftell.c
===================================================================
--- trunk/minix/lib/stdio/ftell.c	(revision 9)
+++ 	(revision )
@@ -1,38 +1,0 @@
-/*
- * ftell.c - obtain the value of the file-position indicator of a stream
- */
-/* $Header: /cvsup/minix/src/lib/stdio/ftell.c,v 1.1.1.1 2005/04/21 14:56:35 beng Exp $ */
-
-#include	<stdio.h>
-
-#if	(SEEK_CUR != 1) || (SEEK_SET != 0) || (SEEK_END != 2)
-#error SEEK_* values are wrong
-#endif
-
-#include	"loc_incl.h"
-
-#include	<sys/types.h>
-
-off_t _lseek(int fildes, off_t offset, int whence);
-
-long ftell(FILE *stream)
-{
-	long result;
-	int adjust = 0;
-
-	if (io_testflag(stream,_IOREADING))
-		adjust = -stream->_count;
-	else if (io_testflag(stream,_IOWRITING)
-		    && stream->_buf
-		    && !io_testflag(stream,_IONBF))
-		adjust = stream->_ptr - stream->_buf;
-	else adjust = 0;
-
-	result = _lseek(fileno(stream), (off_t)0, SEEK_CUR);
-
-	if ( result == -1 )
-		return result;
-
-	result += (long) adjust;
-	return result;
-}
Index: trunk/minix/lib/stdio/fwrite.c
===================================================================
--- trunk/minix/lib/stdio/fwrite.c	(revision 9)
+++ 	(revision )
@@ -1,29 +1,0 @@
-/*
- * fwrite.c - write a number of array elements on a file
- */
-/* $Header: /cvsup/minix/src/lib/stdio/fwrite.c,v 1.1.1.1 2005/04/21 14:56:35 beng Exp $ */
-
-#include	<stdio.h>
-
-size_t
-fwrite(const void *ptr, size_t size, size_t nmemb,
-	    register FILE *stream)
-{
-	register const unsigned char *cp = ptr;
-	register size_t s;
-	size_t ndone = 0;
-
-	if (size)
-		while ( ndone < nmemb ) {
-			s = size;
-			do {
-				if (putc((int)*cp, stream)
-					== EOF)
-					return ndone;
-				cp++;
-			} 
-			while (--s);
-			ndone++;
-		}
-	return ndone;
-}
Index: trunk/minix/lib/stdio/getc.c
===================================================================
--- trunk/minix/lib/stdio/getc.c	(revision 9)
+++ 	(revision )
@@ -1,12 +1,0 @@
-/*
- * getc.c - read an unsigned character
- */
-/* $Header: /cvsup/minix/src/lib/stdio/getc.c,v 1.1.1.1 2005/04/21 14:56:35 beng Exp $ */
-
-#include	<stdio.h>
-
-int
-(getc)(FILE *stream)
-{
-	return getc(stream);
-}
Index: trunk/minix/lib/stdio/getchar.c
===================================================================
--- trunk/minix/lib/stdio/getchar.c	(revision 9)
+++ 	(revision )
@@ -1,12 +1,0 @@
-/*
- * getchar.c - read a character from the standard input stream
- */
-/* $Header: /cvsup/minix/src/lib/stdio/getchar.c,v 1.1.1.1 2005/04/21 14:56:35 beng Exp $ */
-
-#include	<stdio.h>
-
-int
-(getchar)(void)
-{
-	return getchar();
-}
Index: trunk/minix/lib/stdio/gets.c
===================================================================
--- trunk/minix/lib/stdio/gets.c	(revision 9)
+++ 	(revision )
@@ -1,27 +1,0 @@
-/*
- * gets.c - read a line from a stream
- */
-/* $Header: /cvsup/minix/src/lib/stdio/gets.c,v 1.1.1.1 2005/04/21 14:56:35 beng Exp $ */
-
-#include	<stdio.h>
-
-char *
-gets(char *s)
-{
-	register FILE *stream = stdin;
-	register int ch;
-	register char *ptr;
-
-	ptr = s;
-	while ((ch = getc(stream)) != EOF && ch != '\n')
-		*ptr++ = ch;
-
-	if (ch == EOF) {
-		if (feof(stream)) {
-			if (ptr == s) return NULL;
-		} else return NULL;
-	}
-
-	*ptr = '\0';
-	return s;
-}
Index: trunk/minix/lib/stdio/icompute.c
===================================================================
--- trunk/minix/lib/stdio/icompute.c	(revision 9)
+++ 	(revision )
@@ -1,21 +1,0 @@
-/*
- * icompute.c - compute an integer
- */
-/* $Header: /cvsup/minix/src/lib/stdio/icompute.c,v 1.1.1.1 2005/04/21 14:56:35 beng Exp $ */
-
-#include	"loc_incl.h"
-
-/* This routine is used in doprnt.c as well as in tmpfile.c and tmpnam.c. */
-
-char *
-_i_compute(unsigned long val, int base, char *s, int nrdigits)
-{
-	int c;
-
-	c= val % base ;
-	val /= base ;
-	if (val || nrdigits > 1)
-		s = _i_compute(val, base, s, nrdigits - 1);
-	*s++ = (c>9 ? c-10+'a' : c+'0');
-	return s;
-}
Index: trunk/minix/lib/stdio/loc_incl.h
===================================================================
--- trunk/minix/lib/stdio/loc_incl.h	(revision 9)
+++ 	(revision )
@@ -1,40 +1,0 @@
-/*
- * loc_incl.h - local include file for stdio library
- */
-/* $Header: /cvsup/minix/src/lib/stdio/loc_incl.h,v 1.1.1.1 2005/04/21 14:56:36 beng Exp $ */
-
-#include	<stdio.h>
-
-#define	io_testflag(p,x)	((p)->_flags & (x))
-
-#include	<stdarg.h>
-
-#ifdef _ANSI
-int _doprnt(const char *format, va_list ap, FILE *stream);
-int _doscan(FILE * stream, const char *format, va_list ap);
-char *_i_compute(unsigned long val, int base, char *s, int nrdigits);
-char *_f_print(va_list *ap, int flags, char *s, char c, int precision);
-void __cleanup(void);
-
-FILE *popen(const char *command, const char *type);
-FILE *fdopen(int fd, const char *mode);
-
-#ifndef	NOFLOAT
-char *_ecvt(long double value, int ndigit, int *decpt, int *sign);
-char *_fcvt(long double value, int ndigit, int *decpt, int *sign);
-#endif	/* NOFLOAT */
-#endif
-
-#define	FL_LJUST	0x0001		/* left-justify field */
-#define	FL_SIGN		0x0002		/* sign in signed conversions */
-#define	FL_SPACE	0x0004		/* space in signed conversions */
-#define	FL_ALT		0x0008		/* alternate form */
-#define	FL_ZEROFILL	0x0010		/* fill with zero's */
-#define	FL_SHORT	0x0020		/* optional h */
-#define	FL_LONG		0x0040		/* optional l */
-#define	FL_LONGDOUBLE	0x0080		/* optional L */
-#define	FL_WIDTHSPEC	0x0100		/* field width is specified */
-#define	FL_PRECSPEC	0x0200		/* precision is specified */
-#define FL_SIGNEDCONV	0x0400		/* may contain a sign */
-#define	FL_NOASSIGN	0x0800		/* do not assign (in scanf) */
-#define	FL_NOMORE	0x1000		/* all flags collected */
Index: trunk/minix/lib/stdio/mktemp.c
===================================================================
--- trunk/minix/lib/stdio/mktemp.c	(revision 9)
+++ 	(revision )
@@ -1,132 +1,0 @@
-/*
- * Copyright (c) 1987, 1993
- *	The Regents of the University of California.  All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- *    must display the following acknowledgement:
- *	This product includes software developed by the University of
- *	California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- *    may be used to endorse or promote products derived from this software
- *    without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)mktemp.c	8.1 (Berkeley) 6/4/93";
-#endif /* LIBC_SCCS and not lint */
-
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <fcntl.h>
-#include <errno.h>
-#include <stdio.h>
-#include <ctype.h>
-#include <unistd.h>
-#include <stdlib.h>
-
-static int _gettemp(char*,int*);
-
-mkstemp(path)
-	char *path;
-{
-	int fd;
-
-	return (_gettemp(path, &fd) ? fd : -1);
-}
-
-char *
-mktemp(path)
-	char *path;
-{
-	return(_gettemp(path, (int *)NULL) ? path : (char *)NULL);
-}
-
-static
-_gettemp(path, doopen)
-	char *path;
-	register int *doopen;
-{
-	extern int errno;
-	register char *start, *trv;
-	struct stat sbuf;
-	u_int pid;
-
-	pid = getpid();
-	for (trv = path; *trv; ++trv);		/* extra X's get set to 0's */
-	while (*--trv == 'X') {
-		*trv = (pid % 10) + '0';
-		pid /= 10;
-	}
-
-	/*
-	 * check the target directory; if you have six X's and it
-	 * doesn't exist this runs for a *very* long time.
-	 */
-	for (start = trv + 1;; --trv) {
-		if (trv <= path)
-			break;
-		if (*trv == '/') {
-			*trv = '\0';
-			if (stat(path, &sbuf))
-				return(0);
-			if (!S_ISDIR(sbuf.st_mode)) {
-				errno = ENOTDIR;
-				return(0);
-			}
-			*trv = '/';
-			break;
-		}
-	}
-
-	for (;;) {
-		if (doopen) {
-			if ((*doopen =
-			    open(path, O_CREAT|O_EXCL|O_RDWR, 0600)) >= 0)
-				return(1);
-			if (errno != EEXIST)
-				return(0);
-		}
-		else if (stat(path, &sbuf))
-			return(errno == ENOENT ? 1 : 0);
-
-		/* tricky little algorithm for backward compatibility */
-		for (trv = start;;) {
-			if (!*trv)
-				return(0);
-			if (*trv == 'z')
-				*trv++ = 'a';
-			else {
-				if (isdigit(*trv))
-					*trv = 'a';
-				else
-					++*trv;
-				break;
-			}
-		}
-	}
-	/*NOTREACHED*/
-}
-
-/*
- * $PchId: mktemp.c,v 1.3 1995/11/20 19:10:39 philip Exp $
- */
Index: trunk/minix/lib/stdio/perror.c
===================================================================
--- trunk/minix/lib/stdio/perror.c	(revision 9)
+++ 	(revision )
@@ -1,33 +1,0 @@
-/*
- * perror.c - print an error message on the standard error output
- */
-/* $Header: /cvsup/minix/src/lib/stdio/perror.c,v 1.1.1.1 2005/04/21 14:56:36 beng Exp $ */
-
-#if	defined(_POSIX_SOURCE)
-#include	<sys/types.h>
-#endif
-#include	<stdio.h>
-#include	<errno.h>
-#include	<stdio.h>
-#include	<string.h>
-#include	"loc_incl.h"
-
-ssize_t _write(int d, const char *buf, size_t nbytes);
-
-void
-perror(const char *s)
-{
-	char *p;
-	int fd;
-
-	p = strerror(errno);
-	fd = fileno(stderr);
-	fflush(stdout);
-	fflush(stderr);
-	if (s && *s) {
-		_write(fd, s, strlen(s));
-		_write(fd, ": ", 2);
-	}
-	_write(fd, p, strlen(p));
-	_write(fd, "\n", 1);
-}
Index: trunk/minix/lib/stdio/printf.c
===================================================================
--- trunk/minix/lib/stdio/printf.c	(revision 9)
+++ 	(revision )
@@ -1,23 +1,0 @@
-/*
- * printf - write on the standard output stream
- */
-/* $Header: /cvsup/minix/src/lib/stdio/printf.c,v 1.1.1.1 2005/04/21 14:56:36 beng Exp $ */
-
-#include	<stdio.h>
-#include	<stdarg.h>
-#include	"loc_incl.h"
-
-int
-printf(const char *format, ...)
-{
-	va_list ap;
-	int retval;
-
-	va_start(ap, format);
-
-	retval = _doprnt(format, ap, stdout);
-
-	va_end(ap);
-
-	return retval;
-}
Index: trunk/minix/lib/stdio/putc.c
===================================================================
--- trunk/minix/lib/stdio/putc.c	(revision 9)
+++ 	(revision )
@@ -1,12 +1,0 @@
-/*
- * putc.c - print (or buffer) one character
- */
-/* $Header: /cvsup/minix/src/lib/stdio/putc.c,v 1.1.1.1 2005/04/21 14:56:36 beng Exp $ */
-
-#include	<stdio.h>
-
-int
-(putc)(int c, FILE *stream)
-{
-	return putc(c, stream);
-}
Index: trunk/minix/lib/stdio/putchar.c
===================================================================
--- trunk/minix/lib/stdio/putchar.c	(revision 9)
+++ 	(revision )
@@ -1,12 +1,0 @@
-/*
- * putchar.c - print (or buffer) a character on the standard output stream
- */
-/* $Header: /cvsup/minix/src/lib/stdio/putchar.c,v 1.1.1.1 2005/04/21 14:56:36 beng Exp $ */
-
-#include	<stdio.h>
-
-int
-(putchar)(int c)
-{
-	return putchar(c);
-}
Index: trunk/minix/lib/stdio/puts.c
===================================================================
--- trunk/minix/lib/stdio/puts.c	(revision 9)
+++ 	(revision )
@@ -1,20 +1,0 @@
-/*
- * puts.c - print a string onto the standard output stream
- */
-/* $Header: /cvsup/minix/src/lib/stdio/puts.c,v 1.1.1.1 2005/04/21 14:56:36 beng Exp $ */
-
-#include	<stdio.h>
-
-int
-puts(register const char *s)
-{
-	register FILE *file = stdout;
-	register int i = 0;
-
-	while (*s) {
-		if (putc(*s++, file) == EOF) return EOF;
-		else i++;
-	}
-	if (putc('\n', file) == EOF) return EOF;
-	return i + 1;
-}
Index: trunk/minix/lib/stdio/remove.c
===================================================================
--- trunk/minix/lib/stdio/remove.c	(revision 9)
+++ 	(revision )
@@ -1,13 +1,0 @@
-/*
- * remove.c - remove a file
- */
-/* $Header: /cvsup/minix/src/lib/stdio/remove.c,v 1.1.1.1 2005/04/21 14:56:36 beng Exp $ */
-
-#include	<stdio.h>
-
-int _unlink(const char *path);
-
-int
-remove(const char *filename) {
-	return _unlink(filename);
-}
Index: trunk/minix/lib/stdio/rewind.c
===================================================================
--- trunk/minix/lib/stdio/rewind.c	(revision 9)
+++ 	(revision )
@@ -1,14 +1,0 @@
-/*
- * rewind.c - set the file position indicator of a stream to the start
- */
-/* $Header: /cvsup/minix/src/lib/stdio/rewind.c,v 1.1.1.1 2005/04/21 14:56:36 beng Exp $ */
-
-#include	<stdio.h>
-#include	"loc_incl.h"
-
-void
-rewind(FILE *stream)
-{
-	(void) fseek(stream, 0L, SEEK_SET);
-	clearerr(stream);
-}
Index: trunk/minix/lib/stdio/scanf.c
===================================================================
--- trunk/minix/lib/stdio/scanf.c	(revision 9)
+++ 	(revision )
@@ -1,25 +1,0 @@
-/*
- * scanf.c - read formatted input from the standard input stream
- */
-/* $Header: /cvsup/minix/src/lib/stdio/scanf.c,v 1.1.1.1 2005/04/21 14:56:36 beng Exp $ */
-
-#include	<stdio.h>
-#include	<stdarg.h>
-#include	"loc_incl.h"
-
-int
-scanf(const char *format, ...)
-{
-	va_list ap;
-	int retval;
-
-	va_start(ap, format);
-
-	retval = _doscan(stdin, format, ap);
-
-	va_end(ap);
-
-	return retval;
-}
-
-
Index: trunk/minix/lib/stdio/setbuf.c
===================================================================
--- trunk/minix/lib/stdio/setbuf.c	(revision 9)
+++ 	(revision )
@@ -1,13 +1,0 @@
-/*
- * setbuf.c - control buffering of a stream
- */
-/* $Header: /cvsup/minix/src/lib/stdio/setbuf.c,v 1.1.1.1 2005/04/21 14:56:36 beng Exp $ */
-
-#include	<stdio.h>
-#include	"loc_incl.h"
-
-void
-setbuf(register FILE *stream, char *buf)
-{
-	(void) setvbuf(stream, buf, (buf ? _IOFBF : _IONBF), (size_t) BUFSIZ);
-}
Index: trunk/minix/lib/stdio/setvbuf.c
===================================================================
--- trunk/minix/lib/stdio/setvbuf.c	(revision 9)
+++ 	(revision )
@@ -1,48 +1,0 @@
-/*
- * setbuf.c - control buffering of a stream
- */
-/* $Id: setvbuf.c,v 1.1.1.1 2005/04/21 14:56:36 beng Exp $ */
-
-#include	<stdio.h>
-#include	<stdlib.h>
-#include	"loc_incl.h"
-
-extern void (*_clean)(void);
-
-int
-setvbuf(register FILE *stream, char *buf, int mode, size_t size)
-{
-	int retval = 0;
-
-	_clean = __cleanup;
-	if (mode != _IOFBF && mode != _IOLBF && mode != _IONBF)
-		return EOF;
-
-	if (stream->_buf && io_testflag(stream,_IOMYBUF) )
-		free((void *)stream->_buf);
-
-	stream->_flags &= ~(_IOMYBUF | _IONBF | _IOLBF);
-
-	if (buf && size <= 0) retval = EOF;
-	if (!buf && (mode != _IONBF)) {
-		if (size <= 0 || (buf = (char *) malloc(size)) == NULL) {
-			retval = EOF;
-		} else {
-			stream->_flags |= _IOMYBUF;
-		}
-	}
-
-	stream->_buf = (unsigned char *) buf;
-
-	stream->_count = 0;
-	stream->_flags |= mode;
-	stream->_ptr = stream->_buf;
-
-	if (!buf) {
-		stream->_bufsiz = 1;
-	} else {
-		stream->_bufsiz = size;
-	}
-
-	return retval;
-}
Index: trunk/minix/lib/stdio/sprintf.c
===================================================================
--- trunk/minix/lib/stdio/sprintf.c	(revision 9)
+++ 	(revision )
@@ -1,39 +1,0 @@
-/*
- * sprintf - print formatted output on an array
- */
-/* $Header: /cvsup/minix/src/lib/stdio/sprintf.c,v 1.1.1.1 2005/04/21 14:56:36 beng Exp $ */
-
-#include	<stdio.h>
-#include	<stdarg.h>
-#include	<limits.h>
-#include	"loc_incl.h"
-
-int
-sprintf(char *s, const char *format, ...)
-{
-	va_list ap;
-	int retval;
-
-	va_start(ap, format);
-
-	retval = vsnprintf(s, INT_MAX, format, ap);
-
-	va_end(ap);
-
-	return retval;
-}
-
-int
-snprintf(char *s, size_t n, const char *format, ...)
-{
-	va_list ap;
-	int retval;
-
-	va_start(ap, format);
-
-	retval = vsnprintf(s, n, format, ap);
-
-	va_end(ap);
-
-	return retval;
-}
Index: trunk/minix/lib/stdio/sscanf.c
===================================================================
--- trunk/minix/lib/stdio/sscanf.c	(revision 9)
+++ 	(revision )
@@ -1,30 +1,0 @@
-/*
- * sscanf - read formatted output from a string
- */
-/* $Header: /cvsup/minix/src/lib/stdio/sscanf.c,v 1.1.1.1 2005/04/21 14:56:36 beng Exp $ */
-
-#include	<stdio.h>
-#include	<stdarg.h>
-#include	<string.h>
-#include	"loc_incl.h"
-
-int sscanf(const char *s, const char *format, ...)
-{
-	va_list ap;
-	int retval;
-	FILE tmp_stream;
-
-	va_start(ap, format);
-
-	tmp_stream._fd     = -1;
-	tmp_stream._flags  = _IOREAD + _IONBF + _IOREADING;
-	tmp_stream._buf    = (unsigned char *) s;
-	tmp_stream._ptr    = (unsigned char *) s;
-	tmp_stream._count  = strlen(s);
-
-	retval = _doscan(&tmp_stream, format, ap);
-
-	va_end(ap);
-
-	return retval;
-}
Index: trunk/minix/lib/stdio/tmpfile.c
===================================================================
--- trunk/minix/lib/stdio/tmpfile.c	(revision 9)
+++ 	(revision )
@@ -1,31 +1,0 @@
-/*
- * tmpfile.c - create and open a temporary file
- */
-/* $Header: /cvsup/minix/src/lib/stdio/tmpfile.c,v 1.1.1.1 2005/04/21 14:56:36 beng Exp $ */
-
-#if	defined(_POSIX_SOURCE)
-#include	<sys/types.h>
-#endif
-#include	<stdio.h>
-#include	<string.h>
-#include	"loc_incl.h"
-
-pid_t _getpid(void);
-
-FILE *
-tmpfile(void) {
-	static char name_buffer[L_tmpnam] = "/tmp/tmp." ;
-	static char *name = NULL;
-	FILE *file;
-
-	if (!name) {
-		name = name_buffer + strlen(name_buffer);
-		name = _i_compute(_getpid(), 10, name, 5);
-		*name = '\0';
-	}
-
-	file = fopen(name_buffer,"wb+");
-	if (!file) return (FILE *)NULL;
-	(void) remove(name_buffer);
-	return file;
-}
Index: trunk/minix/lib/stdio/tmpnam.c
===================================================================
--- trunk/minix/lib/stdio/tmpnam.c	(revision 9)
+++ 	(revision )
@@ -1,31 +1,0 @@
-/*
- * tmpnam.c - create a unique filename
- */
-/* $Header: /cvsup/minix/src/lib/stdio/tmpnam.c,v 1.1.1.1 2005/04/21 14:56:36 beng Exp $ */
-
-#if	defined(_POSIX_SOURCE)
-#include	<sys/types.h>
-#endif
-#include	<stdio.h>
-#include	<string.h>
-#include	"loc_incl.h"
-
-pid_t _getpid(void);
-
-char *
-tmpnam(char *s) {
-	static char name_buffer[L_tmpnam] = "/tmp/tmp.";
-	static unsigned long count = 0;
-	static char *name = NULL;
-
-	if (!name) { 
-		name = name_buffer + strlen(name_buffer);
-		name = _i_compute((unsigned long)_getpid(), 10, name, 5);
-		*name++ = '.';
-		*name = '\0';
-	}
-	if (++count > TMP_MAX) count = 1;	/* wrap-around */
-	*_i_compute(count, 10, name, 3) = '\0';
-	if (s) return strcpy(s, name_buffer);
-	else return name_buffer;
-}
Index: trunk/minix/lib/stdio/ungetc.c
===================================================================
--- trunk/minix/lib/stdio/ungetc.c	(revision 9)
+++ 	(revision )
@@ -1,26 +1,0 @@
-/*
- * ungetc.c - push a character back onto an input stream
- */
-/* $Header: /cvsup/minix/src/lib/stdio/ungetc.c,v 1.1.1.1 2005/04/21 14:56:36 beng Exp $ */
-
-#include	<stdio.h>
-#include	"loc_incl.h"
-
-int
-ungetc(int ch, FILE *stream)
-{
-	unsigned char *p;
-
-	if (ch == EOF  || !io_testflag(stream,_IOREADING))
-		return EOF;
-	if (stream->_ptr == stream->_buf) {
-		if (stream->_count != 0) return EOF;
-		stream->_ptr++;
-	}
-	stream->_count++;
-	p = --(stream->_ptr);		/* ??? Bloody vax assembler !!! */
-	/* ungetc() in sscanf() shouldn't write in rom */
-	if (*p != (unsigned char) ch)
-		*p = (unsigned char) ch;
-	return ch;
-}
Index: trunk/minix/lib/stdio/vfprintf.c
===================================================================
--- trunk/minix/lib/stdio/vfprintf.c	(revision 9)
+++ 	(revision )
@@ -1,14 +1,0 @@
-/*
- * vfprintf - formatted output without ellipsis
- */
-/* $Header: /cvsup/minix/src/lib/stdio/vfprintf.c,v 1.1.1.1 2005/04/21 14:56:36 beng Exp $ */
-
-#include	<stdio.h>
-#include	<stdarg.h>
-#include	"loc_incl.h"
-
-int
-vfprintf(FILE *stream, const char *format, va_list arg)
-{
-	return _doprnt (format, arg, stream);
-}
Index: trunk/minix/lib/stdio/vprintf.c
===================================================================
--- trunk/minix/lib/stdio/vprintf.c	(revision 9)
+++ 	(revision )
@@ -1,14 +1,0 @@
-/*
- * vprintf - formatted output without ellipsis to the standard output stream
- */
-/* $Header: /cvsup/minix/src/lib/stdio/vprintf.c,v 1.1.1.1 2005/04/21 14:56:36 beng Exp $ */
-
-#include	<stdio.h>
-#include	<stdarg.h>
-#include	"loc_incl.h"
-
-int
-vprintf(const char *format, va_list arg)
-{
-	return _doprnt(format, arg, stdout);
-}
Index: trunk/minix/lib/stdio/vscanf.c
===================================================================
--- trunk/minix/lib/stdio/vscanf.c	(revision 9)
+++ 	(revision )
@@ -1,13 +1,0 @@
-/*
- * vscanf.c - read formatted input from the standard input stream
- */
-
-#include	<stdio.h>
-#include	<stdarg.h>
-#include	"loc_incl.h"
-
-int
-vscanf(const char *format, va_list ap)
-{
-	return _doscan(stdin, format, ap);
-}
Index: trunk/minix/lib/stdio/vsprintf.c
===================================================================
--- trunk/minix/lib/stdio/vsprintf.c	(revision 9)
+++ 	(revision )
@@ -1,34 +1,0 @@
-/*
- * vsprintf - print formatted output without ellipsis on an array
- */
-/* $Header: /cvsup/minix/src/lib/stdio/vsprintf.c,v 1.1.1.1 2005/04/21 14:56:36 beng Exp $ */
-
-#include	<stdio.h>
-#include	<stdarg.h>
-#include	<limits.h>
-#include	"loc_incl.h"
-
-int
-vsnprintf(char *s, size_t n, const char *format, va_list arg)
-{
-	int retval;
-	FILE tmp_stream;
-
-	tmp_stream._fd     = -1;
-	tmp_stream._flags  = _IOWRITE + _IONBF + _IOWRITING;
-	tmp_stream._buf    = (unsigned char *) s;
-	tmp_stream._ptr    = (unsigned char *) s;
-	tmp_stream._count  = n-1;
-
-	retval = _doprnt(format, arg, &tmp_stream);
-	tmp_stream._count  = 1;
-	putc('\0',&tmp_stream);
-
-	return retval;
-}
-
-int
-vsprintf(char *s, const char *format, va_list arg)
-{
-	return vsnprintf(s, INT_MAX, format, arg);
-}
Index: trunk/minix/lib/stdio/vsscanf.c
===================================================================
--- trunk/minix/lib/stdio/vsscanf.c	(revision 9)
+++ 	(revision )
@@ -1,21 +1,0 @@
-/*
- * vsscanf - read formatted output from a string
- */
-
-#include	<stdio.h>
-#include	<stdarg.h>
-#include	<string.h>
-#include	"loc_incl.h"
-
-int vsscanf(const char *s, const char *format, va_list ap)
-{
-	FILE tmp_stream;
-
-	tmp_stream._fd     = -1;
-	tmp_stream._flags  = _IOREAD + _IONBF + _IOREADING;
-	tmp_stream._buf    = (unsigned char *) s;
-	tmp_stream._ptr    = (unsigned char *) s;
-	tmp_stream._count  = strlen(s);
-
-	return _doscan(&tmp_stream, format, ap);
-}
Index: trunk/minix/lib/syscall/Makedepend-ack
===================================================================
--- trunk/minix/lib/syscall/Makedepend-ack	(revision 9)
+++ 	(revision )
@@ -1,111 +1,0 @@
-depend-ack:
-	rm .depend-ack
-	touch .depend-ack
-	mkdep 'cc  -E' _exit.s | sed -e 's:^\(.\):../obj-ack//./syscall/\1:' >> .depend-ack
-	mkdep 'cc  -E' _pm_findproc.s | sed -e 's:^\(.\):../obj-ack//./syscall/\1:' >> .depend-ack
-	mkdep 'cc  -E' access.s | sed -e 's:^\(.\):../obj-ack//./syscall/\1:' >> .depend-ack
-	mkdep 'cc  -E' alarm.s | sed -e 's:^\(.\):../obj-ack//./syscall/\1:' >> .depend-ack
-	mkdep 'cc  -E' allocmem.s | sed -e 's:^\(.\):../obj-ack//./syscall/\1:' >> .depend-ack
-	mkdep 'cc  -E' brk.s | sed -e 's:^\(.\):../obj-ack//./syscall/\1:' >> .depend-ack
-	mkdep 'cc  -E' cfgetispeed.s | sed -e 's:^\(.\):../obj-ack//./syscall/\1:' >> .depend-ack
-	mkdep 'cc  -E' cfgetospeed.s | sed -e 's:^\(.\):../obj-ack//./syscall/\1:' >> .depend-ack
-	mkdep 'cc  -E' cfsetispeed.s | sed -e 's:^\(.\):../obj-ack//./syscall/\1:' >> .depend-ack
-	mkdep 'cc  -E' cfsetospeed.s | sed -e 's:^\(.\):../obj-ack//./syscall/\1:' >> .depend-ack
-	mkdep 'cc  -E' chdir.s | sed -e 's:^\(.\):../obj-ack//./syscall/\1:' >> .depend-ack
-	mkdep 'cc  -E' chmod.s | sed -e 's:^\(.\):../obj-ack//./syscall/\1:' >> .depend-ack
-	mkdep 'cc  -E' chown.s | sed -e 's:^\(.\):../obj-ack//./syscall/\1:' >> .depend-ack
-	mkdep 'cc  -E' chroot.s | sed -e 's:^\(.\):../obj-ack//./syscall/\1:' >> .depend-ack
-	mkdep 'cc  -E' close.s | sed -e 's:^\(.\):../obj-ack//./syscall/\1:' >> .depend-ack
-	mkdep 'cc  -E' closedir.s | sed -e 's:^\(.\):../obj-ack//./syscall/\1:' >> .depend-ack
-	mkdep 'cc  -E' creat.s | sed -e 's:^\(.\):../obj-ack//./syscall/\1:' >> .depend-ack
-	mkdep 'cc  -E' devctl.s | sed -e 's:^\(.\):../obj-ack//./syscall/\1:' >> .depend-ack
-	mkdep 'cc  -E' dup.s | sed -e 's:^\(.\):../obj-ack//./syscall/\1:' >> .depend-ack
-	mkdep 'cc  -E' dup2.s | sed -e 's:^\(.\):../obj-ack//./syscall/\1:' >> .depend-ack
-	mkdep 'cc  -E' execl.s | sed -e 's:^\(.\):../obj-ack//./syscall/\1:' >> .depend-ack
-	mkdep 'cc  -E' execle.s | sed -e 's:^\(.\):../obj-ack//./syscall/\1:' >> .depend-ack
-	mkdep 'cc  -E' execlp.s | sed -e 's:^\(.\):../obj-ack//./syscall/\1:' >> .depend-ack
-	mkdep 'cc  -E' execv.s | sed -e 's:^\(.\):../obj-ack//./syscall/\1:' >> .depend-ack
-	mkdep 'cc  -E' execve.s | sed -e 's:^\(.\):../obj-ack//./syscall/\1:' >> .depend-ack
-	mkdep 'cc  -E' execvp.s | sed -e 's:^\(.\):../obj-ack//./syscall/\1:' >> .depend-ack
-	mkdep 'cc  -E' fcntl.s | sed -e 's:^\(.\):../obj-ack//./syscall/\1:' >> .depend-ack
-	mkdep 'cc  -E' fork.s | sed -e 's:^\(.\):../obj-ack//./syscall/\1:' >> .depend-ack
-	mkdep 'cc  -E' fpathconf.s | sed -e 's:^\(.\):../obj-ack//./syscall/\1:' >> .depend-ack
-	mkdep 'cc  -E' freemem.s | sed -e 's:^\(.\):../obj-ack//./syscall/\1:' >> .depend-ack
-	mkdep 'cc  -E' fstat.s | sed -e 's:^\(.\):../obj-ack//./syscall/\1:' >> .depend-ack
-	mkdep 'cc  -E' fstatfs.s | sed -e 's:^\(.\):../obj-ack//./syscall/\1:' >> .depend-ack
-	mkdep 'cc  -E' getcwd.s | sed -e 's:^\(.\):../obj-ack//./syscall/\1:' >> .depend-ack
-	mkdep 'cc  -E' getegid.s | sed -e 's:^\(.\):../obj-ack//./syscall/\1:' >> .depend-ack
-	mkdep 'cc  -E' geteuid.s | sed -e 's:^\(.\):../obj-ack//./syscall/\1:' >> .depend-ack
-	mkdep 'cc  -E' getgid.s | sed -e 's:^\(.\):../obj-ack//./syscall/\1:' >> .depend-ack
-	mkdep 'cc  -E' getgroups.s | sed -e 's:^\(.\):../obj-ack//./syscall/\1:' >> .depend-ack
-	mkdep 'cc  -E' getnpid.s | sed -e 's:^\(.\):../obj-ack//./syscall/\1:' >> .depend-ack
-	mkdep 'cc  -E' getnprocnr.s | sed -e 's:^\(.\):../obj-ack//./syscall/\1:' >> .depend-ack
-	mkdep 'cc  -E' getpgrp.s | sed -e 's:^\(.\):../obj-ack//./syscall/\1:' >> .depend-ack
-	mkdep 'cc  -E' getpid.s | sed -e 's:^\(.\):../obj-ack//./syscall/\1:' >> .depend-ack
-	mkdep 'cc  -E' getppid.s | sed -e 's:^\(.\):../obj-ack//./syscall/\1:' >> .depend-ack
-	mkdep 'cc  -E' getpprocnr.s | sed -e 's:^\(.\):../obj-ack//./syscall/\1:' >> .depend-ack
-	mkdep 'cc  -E' getprocnr.s | sed -e 's:^\(.\):../obj-ack//./syscall/\1:' >> .depend-ack
-	mkdep 'cc  -E' getsigset.s | sed -e 's:^\(.\):../obj-ack//./syscall/\1:' >> .depend-ack
-	mkdep 'cc  -E' getsysinfo.s | sed -e 's:^\(.\):../obj-ack//./syscall/\1:' >> .depend-ack
-	mkdep 'cc  -E' getuid.s | sed -e 's:^\(.\):../obj-ack//./syscall/\1:' >> .depend-ack
-	mkdep 'cc  -E' ioctl.s | sed -e 's:^\(.\):../obj-ack//./syscall/\1:' >> .depend-ack
-	mkdep 'cc  -E' isatty.s | sed -e 's:^\(.\):../obj-ack//./syscall/\1:' >> .depend-ack
-	mkdep 'cc  -E' kill.s | sed -e 's:^\(.\):../obj-ack//./syscall/\1:' >> .depend-ack
-	mkdep 'cc  -E' link.s | sed -e 's:^\(.\):../obj-ack//./syscall/\1:' >> .depend-ack
-	mkdep 'cc  -E' lseek.s | sed -e 's:^\(.\):../obj-ack//./syscall/\1:' >> .depend-ack
-	mkdep 'cc  -E' lstat.s | sed -e 's:^\(.\):../obj-ack//./syscall/\1:' >> .depend-ack
-	mkdep 'cc  -E' mkdir.s | sed -e 's:^\(.\):../obj-ack//./syscall/\1:' >> .depend-ack
-	mkdep 'cc  -E' mkfifo.s | sed -e 's:^\(.\):../obj-ack//./syscall/\1:' >> .depend-ack
-	mkdep 'cc  -E' mknod.s | sed -e 's:^\(.\):../obj-ack//./syscall/\1:' >> .depend-ack
-	mkdep 'cc  -E' mount.s | sed -e 's:^\(.\):../obj-ack//./syscall/\1:' >> .depend-ack
-	mkdep 'cc  -E' open.s | sed -e 's:^\(.\):../obj-ack//./syscall/\1:' >> .depend-ack
-	mkdep 'cc  -E' opendir.s | sed -e 's:^\(.\):../obj-ack//./syscall/\1:' >> .depend-ack
-	mkdep 'cc  -E' pathconf.s | sed -e 's:^\(.\):../obj-ack//./syscall/\1:' >> .depend-ack
-	mkdep 'cc  -E' pause.s | sed -e 's:^\(.\):../obj-ack//./syscall/\1:' >> .depend-ack
-	mkdep 'cc  -E' pipe.s | sed -e 's:^\(.\):../obj-ack//./syscall/\1:' >> .depend-ack
-	mkdep 'cc  -E' ptrace.s | sed -e 's:^\(.\):../obj-ack//./syscall/\1:' >> .depend-ack
-	mkdep 'cc  -E' read.s | sed -e 's:^\(.\):../obj-ack//./syscall/\1:' >> .depend-ack
-	mkdep 'cc  -E' readdir.s | sed -e 's:^\(.\):../obj-ack//./syscall/\1:' >> .depend-ack
-	mkdep 'cc  -E' readlink.s | sed -e 's:^\(.\):../obj-ack//./syscall/\1:' >> .depend-ack
-	mkdep 'cc  -E' reboot.s | sed -e 's:^\(.\):../obj-ack//./syscall/\1:' >> .depend-ack
-	mkdep 'cc  -E' rename.s | sed -e 's:^\(.\):../obj-ack//./syscall/\1:' >> .depend-ack
-	mkdep 'cc  -E' rewinddir.s | sed -e 's:^\(.\):../obj-ack//./syscall/\1:' >> .depend-ack
-	mkdep 'cc  -E' rmdir.s | sed -e 's:^\(.\):../obj-ack//./syscall/\1:' >> .depend-ack
-	mkdep 'cc  -E' sbrk.s | sed -e 's:^\(.\):../obj-ack//./syscall/\1:' >> .depend-ack
-	mkdep 'cc  -E' seekdir.s | sed -e 's:^\(.\):../obj-ack//./syscall/\1:' >> .depend-ack
-	mkdep 'cc  -E' setgid.s | sed -e 's:^\(.\):../obj-ack//./syscall/\1:' >> .depend-ack
-	mkdep 'cc  -E' setsid.s | sed -e 's:^\(.\):../obj-ack//./syscall/\1:' >> .depend-ack
-	mkdep 'cc  -E' setuid.s | sed -e 's:^\(.\):../obj-ack//./syscall/\1:' >> .depend-ack
-	mkdep 'cc  -E' sigaction.s | sed -e 's:^\(.\):../obj-ack//./syscall/\1:' >> .depend-ack
-	mkdep 'cc  -E' sigaddset.s | sed -e 's:^\(.\):../obj-ack//./syscall/\1:' >> .depend-ack
-	mkdep 'cc  -E' sigdelset.s | sed -e 's:^\(.\):../obj-ack//./syscall/\1:' >> .depend-ack
-	mkdep 'cc  -E' sigemptyset.s | sed -e 's:^\(.\):../obj-ack//./syscall/\1:' >> .depend-ack
-	mkdep 'cc  -E' sigfillset.s | sed -e 's:^\(.\):../obj-ack//./syscall/\1:' >> .depend-ack
-	mkdep 'cc  -E' sigismember.s | sed -e 's:^\(.\):../obj-ack//./syscall/\1:' >> .depend-ack
-	mkdep 'cc  -E' sigpending.s | sed -e 's:^\(.\):../obj-ack//./syscall/\1:' >> .depend-ack
-	mkdep 'cc  -E' sigprocmask.s | sed -e 's:^\(.\):../obj-ack//./syscall/\1:' >> .depend-ack
-	mkdep 'cc  -E' sigreturn.s | sed -e 's:^\(.\):../obj-ack//./syscall/\1:' >> .depend-ack
-	mkdep 'cc  -E' sigsuspend.s | sed -e 's:^\(.\):../obj-ack//./syscall/\1:' >> .depend-ack
-	mkdep 'cc  -E' sleep.s | sed -e 's:^\(.\):../obj-ack//./syscall/\1:' >> .depend-ack
-	mkdep 'cc  -E' stat.s | sed -e 's:^\(.\):../obj-ack//./syscall/\1:' >> .depend-ack
-	mkdep 'cc  -E' stime.s | sed -e 's:^\(.\):../obj-ack//./syscall/\1:' >> .depend-ack
-	mkdep 'cc  -E' svrctl.s | sed -e 's:^\(.\):../obj-ack//./syscall/\1:' >> .depend-ack
-	mkdep 'cc  -E' symlink.s | sed -e 's:^\(.\):../obj-ack//./syscall/\1:' >> .depend-ack
-	mkdep 'cc  -E' sync.s | sed -e 's:^\(.\):../obj-ack//./syscall/\1:' >> .depend-ack
-	mkdep 'cc  -E' tcdrain.s | sed -e 's:^\(.\):../obj-ack//./syscall/\1:' >> .depend-ack
-	mkdep 'cc  -E' tcflow.s | sed -e 's:^\(.\):../obj-ack//./syscall/\1:' >> .depend-ack
-	mkdep 'cc  -E' tcflush.s | sed -e 's:^\(.\):../obj-ack//./syscall/\1:' >> .depend-ack
-	mkdep 'cc  -E' tcgetattr.s | sed -e 's:^\(.\):../obj-ack//./syscall/\1:' >> .depend-ack
-	mkdep 'cc  -E' tcsendbreak.s | sed -e 's:^\(.\):../obj-ack//./syscall/\1:' >> .depend-ack
-	mkdep 'cc  -E' tcsetattr.s | sed -e 's:^\(.\):../obj-ack//./syscall/\1:' >> .depend-ack
-	mkdep 'cc  -E' time.s | sed -e 's:^\(.\):../obj-ack//./syscall/\1:' >> .depend-ack
-	mkdep 'cc  -E' times.s | sed -e 's:^\(.\):../obj-ack//./syscall/\1:' >> .depend-ack
-	mkdep 'cc  -E' truncate.s | sed -e 's:^\(.\):../obj-ack//./syscall/\1:' >> .depend-ack
-	mkdep 'cc  -E' umask.s | sed -e 's:^\(.\):../obj-ack//./syscall/\1:' >> .depend-ack
-	mkdep 'cc  -E' umount.s | sed -e 's:^\(.\):../obj-ack//./syscall/\1:' >> .depend-ack
-	mkdep 'cc  -E' uname.s | sed -e 's:^\(.\):../obj-ack//./syscall/\1:' >> .depend-ack
-	mkdep 'cc  -E' unlink.s | sed -e 's:^\(.\):../obj-ack//./syscall/\1:' >> .depend-ack
-	mkdep 'cc  -E' utime.s | sed -e 's:^\(.\):../obj-ack//./syscall/\1:' >> .depend-ack
-	mkdep 'cc  -E' wait.s | sed -e 's:^\(.\):../obj-ack//./syscall/\1:' >> .depend-ack
-	mkdep 'cc  -E' waitpid.s | sed -e 's:^\(.\):../obj-ack//./syscall/\1:' >> .depend-ack
-	mkdep 'cc  -E' write.s | sed -e 's:^\(.\):../obj-ack//./syscall/\1:' >> .depend-ack
Index: trunk/minix/lib/syscall/Makedepend-gnu
===================================================================
--- trunk/minix/lib/syscall/Makedepend-gnu	(revision 9)
+++ 	(revision )
@@ -1,111 +1,0 @@
-depend-gnu:
-	rm .depend-gnu
-	touch .depend-gnu
-	mkdep 'gcc  -E -x assembler-with-cpp -I.' _exit.s | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./syscall/\1:' >> .depend-gnu
-	mkdep 'gcc  -E -x assembler-with-cpp -I.' _pm_findproc.s | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./syscall/\1:' >> .depend-gnu
-	mkdep 'gcc  -E -x assembler-with-cpp -I.' access.s | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./syscall/\1:' >> .depend-gnu
-	mkdep 'gcc  -E -x assembler-with-cpp -I.' alarm.s | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./syscall/\1:' >> .depend-gnu
-	mkdep 'gcc  -E -x assembler-with-cpp -I.' allocmem.s | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./syscall/\1:' >> .depend-gnu
-	mkdep 'gcc  -E -x assembler-with-cpp -I.' brk.s | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./syscall/\1:' >> .depend-gnu
-	mkdep 'gcc  -E -x assembler-with-cpp -I.' cfgetispeed.s | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./syscall/\1:' >> .depend-gnu
-	mkdep 'gcc  -E -x assembler-with-cpp -I.' cfgetospeed.s | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./syscall/\1:' >> .depend-gnu
-	mkdep 'gcc  -E -x assembler-with-cpp -I.' cfsetispeed.s | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./syscall/\1:' >> .depend-gnu
-	mkdep 'gcc  -E -x assembler-with-cpp -I.' cfsetospeed.s | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./syscall/\1:' >> .depend-gnu
-	mkdep 'gcc  -E -x assembler-with-cpp -I.' chdir.s | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./syscall/\1:' >> .depend-gnu
-	mkdep 'gcc  -E -x assembler-with-cpp -I.' chmod.s | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./syscall/\1:' >> .depend-gnu
-	mkdep 'gcc  -E -x assembler-with-cpp -I.' chown.s | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./syscall/\1:' >> .depend-gnu
-	mkdep 'gcc  -E -x assembler-with-cpp -I.' chroot.s | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./syscall/\1:' >> .depend-gnu
-	mkdep 'gcc  -E -x assembler-with-cpp -I.' close.s | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./syscall/\1:' >> .depend-gnu
-	mkdep 'gcc  -E -x assembler-with-cpp -I.' closedir.s | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./syscall/\1:' >> .depend-gnu
-	mkdep 'gcc  -E -x assembler-with-cpp -I.' creat.s | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./syscall/\1:' >> .depend-gnu
-	mkdep 'gcc  -E -x assembler-with-cpp -I.' devctl.s | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./syscall/\1:' >> .depend-gnu
-	mkdep 'gcc  -E -x assembler-with-cpp -I.' dup.s | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./syscall/\1:' >> .depend-gnu
-	mkdep 'gcc  -E -x assembler-with-cpp -I.' dup2.s | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./syscall/\1:' >> .depend-gnu
-	mkdep 'gcc  -E -x assembler-with-cpp -I.' execl.s | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./syscall/\1:' >> .depend-gnu
-	mkdep 'gcc  -E -x assembler-with-cpp -I.' execle.s | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./syscall/\1:' >> .depend-gnu
-	mkdep 'gcc  -E -x assembler-with-cpp -I.' execlp.s | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./syscall/\1:' >> .depend-gnu
-	mkdep 'gcc  -E -x assembler-with-cpp -I.' execv.s | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./syscall/\1:' >> .depend-gnu
-	mkdep 'gcc  -E -x assembler-with-cpp -I.' execve.s | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./syscall/\1:' >> .depend-gnu
-	mkdep 'gcc  -E -x assembler-with-cpp -I.' execvp.s | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./syscall/\1:' >> .depend-gnu
-	mkdep 'gcc  -E -x assembler-with-cpp -I.' fcntl.s | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./syscall/\1:' >> .depend-gnu
-	mkdep 'gcc  -E -x assembler-with-cpp -I.' fork.s | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./syscall/\1:' >> .depend-gnu
-	mkdep 'gcc  -E -x assembler-with-cpp -I.' fpathconf.s | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./syscall/\1:' >> .depend-gnu
-	mkdep 'gcc  -E -x assembler-with-cpp -I.' freemem.s | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./syscall/\1:' >> .depend-gnu
-	mkdep 'gcc  -E -x assembler-with-cpp -I.' fstat.s | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./syscall/\1:' >> .depend-gnu
-	mkdep 'gcc  -E -x assembler-with-cpp -I.' fstatfs.s | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./syscall/\1:' >> .depend-gnu
-	mkdep 'gcc  -E -x assembler-with-cpp -I.' getcwd.s | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./syscall/\1:' >> .depend-gnu
-	mkdep 'gcc  -E -x assembler-with-cpp -I.' getegid.s | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./syscall/\1:' >> .depend-gnu
-	mkdep 'gcc  -E -x assembler-with-cpp -I.' geteuid.s | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./syscall/\1:' >> .depend-gnu
-	mkdep 'gcc  -E -x assembler-with-cpp -I.' getgid.s | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./syscall/\1:' >> .depend-gnu
-	mkdep 'gcc  -E -x assembler-with-cpp -I.' getgroups.s | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./syscall/\1:' >> .depend-gnu
-	mkdep 'gcc  -E -x assembler-with-cpp -I.' getnpid.s | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./syscall/\1:' >> .depend-gnu
-	mkdep 'gcc  -E -x assembler-with-cpp -I.' getnprocnr.s | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./syscall/\1:' >> .depend-gnu
-	mkdep 'gcc  -E -x assembler-with-cpp -I.' getpgrp.s | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./syscall/\1:' >> .depend-gnu
-	mkdep 'gcc  -E -x assembler-with-cpp -I.' getpid.s | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./syscall/\1:' >> .depend-gnu
-	mkdep 'gcc  -E -x assembler-with-cpp -I.' getppid.s | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./syscall/\1:' >> .depend-gnu
-	mkdep 'gcc  -E -x assembler-with-cpp -I.' getpprocnr.s | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./syscall/\1:' >> .depend-gnu
-	mkdep 'gcc  -E -x assembler-with-cpp -I.' getprocnr.s | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./syscall/\1:' >> .depend-gnu
-	mkdep 'gcc  -E -x assembler-with-cpp -I.' getsigset.s | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./syscall/\1:' >> .depend-gnu
-	mkdep 'gcc  -E -x assembler-with-cpp -I.' getsysinfo.s | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./syscall/\1:' >> .depend-gnu
-	mkdep 'gcc  -E -x assembler-with-cpp -I.' getuid.s | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./syscall/\1:' >> .depend-gnu
-	mkdep 'gcc  -E -x assembler-with-cpp -I.' ioctl.s | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./syscall/\1:' >> .depend-gnu
-	mkdep 'gcc  -E -x assembler-with-cpp -I.' isatty.s | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./syscall/\1:' >> .depend-gnu
-	mkdep 'gcc  -E -x assembler-with-cpp -I.' kill.s | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./syscall/\1:' >> .depend-gnu
-	mkdep 'gcc  -E -x assembler-with-cpp -I.' link.s | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./syscall/\1:' >> .depend-gnu
-	mkdep 'gcc  -E -x assembler-with-cpp -I.' lseek.s | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./syscall/\1:' >> .depend-gnu
-	mkdep 'gcc  -E -x assembler-with-cpp -I.' lstat.s | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./syscall/\1:' >> .depend-gnu
-	mkdep 'gcc  -E -x assembler-with-cpp -I.' mkdir.s | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./syscall/\1:' >> .depend-gnu
-	mkdep 'gcc  -E -x assembler-with-cpp -I.' mkfifo.s | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./syscall/\1:' >> .depend-gnu
-	mkdep 'gcc  -E -x assembler-with-cpp -I.' mknod.s | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./syscall/\1:' >> .depend-gnu
-	mkdep 'gcc  -E -x assembler-with-cpp -I.' mount.s | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./syscall/\1:' >> .depend-gnu
-	mkdep 'gcc  -E -x assembler-with-cpp -I.' open.s | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./syscall/\1:' >> .depend-gnu
-	mkdep 'gcc  -E -x assembler-with-cpp -I.' opendir.s | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./syscall/\1:' >> .depend-gnu
-	mkdep 'gcc  -E -x assembler-with-cpp -I.' pathconf.s | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./syscall/\1:' >> .depend-gnu
-	mkdep 'gcc  -E -x assembler-with-cpp -I.' pause.s | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./syscall/\1:' >> .depend-gnu
-	mkdep 'gcc  -E -x assembler-with-cpp -I.' pipe.s | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./syscall/\1:' >> .depend-gnu
-	mkdep 'gcc  -E -x assembler-with-cpp -I.' ptrace.s | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./syscall/\1:' >> .depend-gnu
-	mkdep 'gcc  -E -x assembler-with-cpp -I.' read.s | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./syscall/\1:' >> .depend-gnu
-	mkdep 'gcc  -E -x assembler-with-cpp -I.' readdir.s | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./syscall/\1:' >> .depend-gnu
-	mkdep 'gcc  -E -x assembler-with-cpp -I.' readlink.s | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./syscall/\1:' >> .depend-gnu
-	mkdep 'gcc  -E -x assembler-with-cpp -I.' reboot.s | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./syscall/\1:' >> .depend-gnu
-	mkdep 'gcc  -E -x assembler-with-cpp -I.' rename.s | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./syscall/\1:' >> .depend-gnu
-	mkdep 'gcc  -E -x assembler-with-cpp -I.' rewinddir.s | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./syscall/\1:' >> .depend-gnu
-	mkdep 'gcc  -E -x assembler-with-cpp -I.' rmdir.s | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./syscall/\1:' >> .depend-gnu
-	mkdep 'gcc  -E -x assembler-with-cpp -I.' sbrk.s | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./syscall/\1:' >> .depend-gnu
-	mkdep 'gcc  -E -x assembler-with-cpp -I.' seekdir.s | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./syscall/\1:' >> .depend-gnu
-	mkdep 'gcc  -E -x assembler-with-cpp -I.' setgid.s | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./syscall/\1:' >> .depend-gnu
-	mkdep 'gcc  -E -x assembler-with-cpp -I.' setsid.s | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./syscall/\1:' >> .depend-gnu
-	mkdep 'gcc  -E -x assembler-with-cpp -I.' setuid.s | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./syscall/\1:' >> .depend-gnu
-	mkdep 'gcc  -E -x assembler-with-cpp -I.' sigaction.s | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./syscall/\1:' >> .depend-gnu
-	mkdep 'gcc  -E -x assembler-with-cpp -I.' sigaddset.s | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./syscall/\1:' >> .depend-gnu
-	mkdep 'gcc  -E -x assembler-with-cpp -I.' sigdelset.s | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./syscall/\1:' >> .depend-gnu
-	mkdep 'gcc  -E -x assembler-with-cpp -I.' sigemptyset.s | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./syscall/\1:' >> .depend-gnu
-	mkdep 'gcc  -E -x assembler-with-cpp -I.' sigfillset.s | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./syscall/\1:' >> .depend-gnu
-	mkdep 'gcc  -E -x assembler-with-cpp -I.' sigismember.s | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./syscall/\1:' >> .depend-gnu
-	mkdep 'gcc  -E -x assembler-with-cpp -I.' sigpending.s | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./syscall/\1:' >> .depend-gnu
-	mkdep 'gcc  -E -x assembler-with-cpp -I.' sigprocmask.s | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./syscall/\1:' >> .depend-gnu
-	mkdep 'gcc  -E -x assembler-with-cpp -I.' sigreturn.s | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./syscall/\1:' >> .depend-gnu
-	mkdep 'gcc  -E -x assembler-with-cpp -I.' sigsuspend.s | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./syscall/\1:' >> .depend-gnu
-	mkdep 'gcc  -E -x assembler-with-cpp -I.' sleep.s | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./syscall/\1:' >> .depend-gnu
-	mkdep 'gcc  -E -x assembler-with-cpp -I.' stat.s | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./syscall/\1:' >> .depend-gnu
-	mkdep 'gcc  -E -x assembler-with-cpp -I.' stime.s | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./syscall/\1:' >> .depend-gnu
-	mkdep 'gcc  -E -x assembler-with-cpp -I.' svrctl.s | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./syscall/\1:' >> .depend-gnu
-	mkdep 'gcc  -E -x assembler-with-cpp -I.' symlink.s | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./syscall/\1:' >> .depend-gnu
-	mkdep 'gcc  -E -x assembler-with-cpp -I.' sync.s | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./syscall/\1:' >> .depend-gnu
-	mkdep 'gcc  -E -x assembler-with-cpp -I.' tcdrain.s | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./syscall/\1:' >> .depend-gnu
-	mkdep 'gcc  -E -x assembler-with-cpp -I.' tcflow.s | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./syscall/\1:' >> .depend-gnu
-	mkdep 'gcc  -E -x assembler-with-cpp -I.' tcflush.s | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./syscall/\1:' >> .depend-gnu
-	mkdep 'gcc  -E -x assembler-with-cpp -I.' tcgetattr.s | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./syscall/\1:' >> .depend-gnu
-	mkdep 'gcc  -E -x assembler-with-cpp -I.' tcsendbreak.s | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./syscall/\1:' >> .depend-gnu
-	mkdep 'gcc  -E -x assembler-with-cpp -I.' tcsetattr.s | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./syscall/\1:' >> .depend-gnu
-	mkdep 'gcc  -E -x assembler-with-cpp -I.' time.s | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./syscall/\1:' >> .depend-gnu
-	mkdep 'gcc  -E -x assembler-with-cpp -I.' times.s | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./syscall/\1:' >> .depend-gnu
-	mkdep 'gcc  -E -x assembler-with-cpp -I.' truncate.s | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./syscall/\1:' >> .depend-gnu
-	mkdep 'gcc  -E -x assembler-with-cpp -I.' umask.s | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./syscall/\1:' >> .depend-gnu
-	mkdep 'gcc  -E -x assembler-with-cpp -I.' umount.s | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./syscall/\1:' >> .depend-gnu
-	mkdep 'gcc  -E -x assembler-with-cpp -I.' uname.s | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./syscall/\1:' >> .depend-gnu
-	mkdep 'gcc  -E -x assembler-with-cpp -I.' unlink.s | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./syscall/\1:' >> .depend-gnu
-	mkdep 'gcc  -E -x assembler-with-cpp -I.' utime.s | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./syscall/\1:' >> .depend-gnu
-	mkdep 'gcc  -E -x assembler-with-cpp -I.' wait.s | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./syscall/\1:' >> .depend-gnu
-	mkdep 'gcc  -E -x assembler-with-cpp -I.' waitpid.s | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./syscall/\1:' >> .depend-gnu
-	mkdep 'gcc  -E -x assembler-with-cpp -I.' write.s | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./syscall/\1:' >> .depend-gnu
Index: trunk/minix/lib/syscall/Makefile
===================================================================
--- trunk/minix/lib/syscall/Makefile	(revision 9)
+++ 	(revision )
@@ -1,909 +1,0 @@
-#Generated from ./syscall/Makefile.in
-all: all-ack
-
-all-ack:
-all-gnu:
-
-makefiles: Makefile
-Makedepend-ack Makedepend-gnu: 
-	sh ../generate.sh ./syscall ../obj-ack/ ../obj-gnu
-
-Makefile: Makefile.in Makedepend-ack Makedepend-gnu
-	sh ../generate.sh ./syscall ../obj-ack/ ../obj-gnu
-	@echo
-	@echo *Attention*
-	@echo Makefile is regenerated... rerun command to see changes
-	@echo *Attention*
-	@echo
-
-depend: depend-ack
-all-ack: ../obj-ack//libc.a
-
-../obj-ack//libc.a: ../obj-ack//libc.a(_exit.o)
-../obj-ack//libc.a: ../obj-ack//libc.a(_pm_findproc.o)
-../obj-ack//libc.a: ../obj-ack//libc.a(access.o)
-../obj-ack//libc.a: ../obj-ack//libc.a(alarm.o)
-../obj-ack//libc.a: ../obj-ack//libc.a(allocmem.o)
-../obj-ack//libc.a: ../obj-ack//libc.a(brk.o)
-../obj-ack//libc.a: ../obj-ack//libc.a(cfgetispeed.o)
-../obj-ack//libc.a: ../obj-ack//libc.a(cfgetospeed.o)
-../obj-ack//libc.a: ../obj-ack//libc.a(cfsetispeed.o)
-../obj-ack//libc.a: ../obj-ack//libc.a(cfsetospeed.o)
-../obj-ack//libc.a: ../obj-ack//libc.a(chdir.o)
-../obj-ack//libc.a: ../obj-ack//libc.a(chmod.o)
-../obj-ack//libc.a: ../obj-ack//libc.a(chown.o)
-../obj-ack//libc.a: ../obj-ack//libc.a(chroot.o)
-../obj-ack//libc.a: ../obj-ack//libc.a(close.o)
-../obj-ack//libc.a: ../obj-ack//libc.a(closedir.o)
-../obj-ack//libc.a: ../obj-ack//libc.a(creat.o)
-../obj-ack//libc.a: ../obj-ack//libc.a(devctl.o)
-../obj-ack//libc.a: ../obj-ack//libc.a(dup.o)
-../obj-ack//libc.a: ../obj-ack//libc.a(dup2.o)
-../obj-ack//libc.a: ../obj-ack//libc.a(execl.o)
-../obj-ack//libc.a: ../obj-ack//libc.a(execle.o)
-../obj-ack//libc.a: ../obj-ack//libc.a(execlp.o)
-../obj-ack//libc.a: ../obj-ack//libc.a(execv.o)
-../obj-ack//libc.a: ../obj-ack//libc.a(execve.o)
-../obj-ack//libc.a: ../obj-ack//libc.a(execvp.o)
-../obj-ack//libc.a: ../obj-ack//libc.a(fcntl.o)
-../obj-ack//libc.a: ../obj-ack//libc.a(fork.o)
-../obj-ack//libc.a: ../obj-ack//libc.a(fpathconf.o)
-../obj-ack//libc.a: ../obj-ack//libc.a(freemem.o)
-../obj-ack//libc.a: ../obj-ack//libc.a(fstat.o)
-../obj-ack//libc.a: ../obj-ack//libc.a(fstatfs.o)
-../obj-ack//libc.a: ../obj-ack//libc.a(getcwd.o)
-../obj-ack//libc.a: ../obj-ack//libc.a(getegid.o)
-../obj-ack//libc.a: ../obj-ack//libc.a(geteuid.o)
-../obj-ack//libc.a: ../obj-ack//libc.a(getgid.o)
-../obj-ack//libc.a: ../obj-ack//libc.a(getgroups.o)
-../obj-ack//libc.a: ../obj-ack//libc.a(getnpid.o)
-../obj-ack//libc.a: ../obj-ack//libc.a(getnprocnr.o)
-../obj-ack//libc.a: ../obj-ack//libc.a(getpgrp.o)
-../obj-ack//libc.a: ../obj-ack//libc.a(getpid.o)
-../obj-ack//libc.a: ../obj-ack//libc.a(getppid.o)
-../obj-ack//libc.a: ../obj-ack//libc.a(getpprocnr.o)
-../obj-ack//libc.a: ../obj-ack//libc.a(getprocnr.o)
-../obj-ack//libc.a: ../obj-ack//libc.a(getsigset.o)
-../obj-ack//libc.a: ../obj-ack//libc.a(getsysinfo.o)
-../obj-ack//libc.a: ../obj-ack//libc.a(getuid.o)
-../obj-ack//libc.a: ../obj-ack//libc.a(ioctl.o)
-../obj-ack//libc.a: ../obj-ack//libc.a(isatty.o)
-../obj-ack//libc.a: ../obj-ack//libc.a(kill.o)
-../obj-ack//libc.a: ../obj-ack//libc.a(link.o)
-../obj-ack//libc.a: ../obj-ack//libc.a(lseek.o)
-../obj-ack//libc.a: ../obj-ack//libc.a(lstat.o)
-../obj-ack//libc.a: ../obj-ack//libc.a(mkdir.o)
-../obj-ack//libc.a: ../obj-ack//libc.a(mkfifo.o)
-../obj-ack//libc.a: ../obj-ack//libc.a(mknod.o)
-../obj-ack//libc.a: ../obj-ack//libc.a(mount.o)
-../obj-ack//libc.a: ../obj-ack//libc.a(open.o)
-../obj-ack//libc.a: ../obj-ack//libc.a(opendir.o)
-../obj-ack//libc.a: ../obj-ack//libc.a(pathconf.o)
-../obj-ack//libc.a: ../obj-ack//libc.a(pause.o)
-../obj-ack//libc.a: ../obj-ack//libc.a(pipe.o)
-../obj-ack//libc.a: ../obj-ack//libc.a(ptrace.o)
-../obj-ack//libc.a: ../obj-ack//libc.a(read.o)
-../obj-ack//libc.a: ../obj-ack//libc.a(readdir.o)
-../obj-ack//libc.a: ../obj-ack//libc.a(readlink.o)
-../obj-ack//libc.a: ../obj-ack//libc.a(reboot.o)
-../obj-ack//libc.a: ../obj-ack//libc.a(rename.o)
-../obj-ack//libc.a: ../obj-ack//libc.a(rewinddir.o)
-../obj-ack//libc.a: ../obj-ack//libc.a(rmdir.o)
-../obj-ack//libc.a: ../obj-ack//libc.a(sbrk.o)
-../obj-ack//libc.a: ../obj-ack//libc.a(seekdir.o)
-../obj-ack//libc.a: ../obj-ack//libc.a(setgid.o)
-../obj-ack//libc.a: ../obj-ack//libc.a(setsid.o)
-../obj-ack//libc.a: ../obj-ack//libc.a(setuid.o)
-../obj-ack//libc.a: ../obj-ack//libc.a(sigaction.o)
-../obj-ack//libc.a: ../obj-ack//libc.a(sigaddset.o)
-../obj-ack//libc.a: ../obj-ack//libc.a(sigdelset.o)
-../obj-ack//libc.a: ../obj-ack//libc.a(sigemptyset.o)
-../obj-ack//libc.a: ../obj-ack//libc.a(sigfillset.o)
-../obj-ack//libc.a: ../obj-ack//libc.a(sigismember.o)
-../obj-ack//libc.a: ../obj-ack//libc.a(sigpending.o)
-../obj-ack//libc.a: ../obj-ack//libc.a(sigprocmask.o)
-../obj-ack//libc.a: ../obj-ack//libc.a(sigreturn.o)
-../obj-ack//libc.a: ../obj-ack//libc.a(sigsuspend.o)
-../obj-ack//libc.a: ../obj-ack//libc.a(sleep.o)
-../obj-ack//libc.a: ../obj-ack//libc.a(stat.o)
-../obj-ack//libc.a: ../obj-ack//libc.a(stime.o)
-../obj-ack//libc.a: ../obj-ack//libc.a(svrctl.o)
-../obj-ack//libc.a: ../obj-ack//libc.a(symlink.o)
-../obj-ack//libc.a: ../obj-ack//libc.a(sync.o)
-../obj-ack//libc.a: ../obj-ack//libc.a(tcdrain.o)
-../obj-ack//libc.a: ../obj-ack//libc.a(tcflow.o)
-../obj-ack//libc.a: ../obj-ack//libc.a(tcflush.o)
-../obj-ack//libc.a: ../obj-ack//libc.a(tcgetattr.o)
-../obj-ack//libc.a: ../obj-ack//libc.a(tcsendbreak.o)
-../obj-ack//libc.a: ../obj-ack//libc.a(tcsetattr.o)
-../obj-ack//libc.a: ../obj-ack//libc.a(time.o)
-../obj-ack//libc.a: ../obj-ack//libc.a(times.o)
-../obj-ack//libc.a: ../obj-ack//libc.a(truncate.o)
-../obj-ack//libc.a: ../obj-ack//libc.a(umask.o)
-../obj-ack//libc.a: ../obj-ack//libc.a(umount.o)
-../obj-ack//libc.a: ../obj-ack//libc.a(uname.o)
-../obj-ack//libc.a: ../obj-ack//libc.a(unlink.o)
-../obj-ack//libc.a: ../obj-ack//libc.a(utime.o)
-../obj-ack//libc.a: ../obj-ack//libc.a(wait.o)
-../obj-ack//libc.a: ../obj-ack//libc.a(waitpid.o)
-../obj-ack//libc.a: ../obj-ack//libc.a(write.o)
-
-../obj-ack//libc.a:
-	ar cr ../obj-ack//libc.a ../obj-ack//./syscall/*.o
-	rm ../obj-ack//./syscall/*.o
-
-../obj-ack//libc.a(_exit.o): _exit.s
-	cc  -c -o ../obj-ack//./syscall/_exit.o _exit.s
-../obj-ack//libc.a(_pm_findproc.o): _pm_findproc.s
-	cc  -c -o ../obj-ack//./syscall/_pm_findproc.o _pm_findproc.s
-../obj-ack//libc.a(access.o): access.s
-	cc  -c -o ../obj-ack//./syscall/access.o access.s
-../obj-ack//libc.a(alarm.o): alarm.s
-	cc  -c -o ../obj-ack//./syscall/alarm.o alarm.s
-../obj-ack//libc.a(allocmem.o): allocmem.s
-	cc  -c -o ../obj-ack//./syscall/allocmem.o allocmem.s
-../obj-ack//libc.a(brk.o): brk.s
-	cc  -c -o ../obj-ack//./syscall/brk.o brk.s
-../obj-ack//libc.a(cfgetispeed.o): cfgetispeed.s
-	cc  -c -o ../obj-ack//./syscall/cfgetispeed.o cfgetispeed.s
-../obj-ack//libc.a(cfgetospeed.o): cfgetospeed.s
-	cc  -c -o ../obj-ack//./syscall/cfgetospeed.o cfgetospeed.s
-../obj-ack//libc.a(cfsetispeed.o): cfsetispeed.s
-	cc  -c -o ../obj-ack//./syscall/cfsetispeed.o cfsetispeed.s
-../obj-ack//libc.a(cfsetospeed.o): cfsetospeed.s
-	cc  -c -o ../obj-ack//./syscall/cfsetospeed.o cfsetospeed.s
-../obj-ack//libc.a(chdir.o): chdir.s
-	cc  -c -o ../obj-ack//./syscall/chdir.o chdir.s
-../obj-ack//libc.a(chmod.o): chmod.s
-	cc  -c -o ../obj-ack//./syscall/chmod.o chmod.s
-../obj-ack//libc.a(chown.o): chown.s
-	cc  -c -o ../obj-ack//./syscall/chown.o chown.s
-../obj-ack//libc.a(chroot.o): chroot.s
-	cc  -c -o ../obj-ack//./syscall/chroot.o chroot.s
-../obj-ack//libc.a(close.o): close.s
-	cc  -c -o ../obj-ack//./syscall/close.o close.s
-../obj-ack//libc.a(closedir.o): closedir.s
-	cc  -c -o ../obj-ack//./syscall/closedir.o closedir.s
-../obj-ack//libc.a(creat.o): creat.s
-	cc  -c -o ../obj-ack//./syscall/creat.o creat.s
-../obj-ack//libc.a(devctl.o): devctl.s
-	cc  -c -o ../obj-ack//./syscall/devctl.o devctl.s
-../obj-ack//libc.a(dup.o): dup.s
-	cc  -c -o ../obj-ack//./syscall/dup.o dup.s
-../obj-ack//libc.a(dup2.o): dup2.s
-	cc  -c -o ../obj-ack//./syscall/dup2.o dup2.s
-../obj-ack//libc.a(execl.o): execl.s
-	cc  -c -o ../obj-ack//./syscall/execl.o execl.s
-../obj-ack//libc.a(execle.o): execle.s
-	cc  -c -o ../obj-ack//./syscall/execle.o execle.s
-../obj-ack//libc.a(execlp.o): execlp.s
-	cc  -c -o ../obj-ack//./syscall/execlp.o execlp.s
-../obj-ack//libc.a(execv.o): execv.s
-	cc  -c -o ../obj-ack//./syscall/execv.o execv.s
-../obj-ack//libc.a(execve.o): execve.s
-	cc  -c -o ../obj-ack//./syscall/execve.o execve.s
-../obj-ack//libc.a(execvp.o): execvp.s
-	cc  -c -o ../obj-ack//./syscall/execvp.o execvp.s
-../obj-ack//libc.a(fcntl.o): fcntl.s
-	cc  -c -o ../obj-ack//./syscall/fcntl.o fcntl.s
-../obj-ack//libc.a(fork.o): fork.s
-	cc  -c -o ../obj-ack//./syscall/fork.o fork.s
-../obj-ack//libc.a(fpathconf.o): fpathconf.s
-	cc  -c -o ../obj-ack//./syscall/fpathconf.o fpathconf.s
-../obj-ack//libc.a(freemem.o): freemem.s
-	cc  -c -o ../obj-ack//./syscall/freemem.o freemem.s
-../obj-ack//libc.a(fstat.o): fstat.s
-	cc  -c -o ../obj-ack//./syscall/fstat.o fstat.s
-../obj-ack//libc.a(fstatfs.o): fstatfs.s
-	cc  -c -o ../obj-ack//./syscall/fstatfs.o fstatfs.s
-../obj-ack//libc.a(getcwd.o): getcwd.s
-	cc  -c -o ../obj-ack//./syscall/getcwd.o getcwd.s
-../obj-ack//libc.a(getegid.o): getegid.s
-	cc  -c -o ../obj-ack//./syscall/getegid.o getegid.s
-../obj-ack//libc.a(geteuid.o): geteuid.s
-	cc  -c -o ../obj-ack//./syscall/geteuid.o geteuid.s
-../obj-ack//libc.a(getgid.o): getgid.s
-	cc  -c -o ../obj-ack//./syscall/getgid.o getgid.s
-../obj-ack//libc.a(getgroups.o): getgroups.s
-	cc  -c -o ../obj-ack//./syscall/getgroups.o getgroups.s
-../obj-ack//libc.a(getnpid.o): getnpid.s
-	cc  -c -o ../obj-ack//./syscall/getnpid.o getnpid.s
-../obj-ack//libc.a(getnprocnr.o): getnprocnr.s
-	cc  -c -o ../obj-ack//./syscall/getnprocnr.o getnprocnr.s
-../obj-ack//libc.a(getpgrp.o): getpgrp.s
-	cc  -c -o ../obj-ack//./syscall/getpgrp.o getpgrp.s
-../obj-ack//libc.a(getpid.o): getpid.s
-	cc  -c -o ../obj-ack//./syscall/getpid.o getpid.s
-../obj-ack//libc.a(getppid.o): getppid.s
-	cc  -c -o ../obj-ack//./syscall/getppid.o getppid.s
-../obj-ack//libc.a(getpprocnr.o): getpprocnr.s
-	cc  -c -o ../obj-ack//./syscall/getpprocnr.o getpprocnr.s
-../obj-ack//libc.a(getprocnr.o): getprocnr.s
-	cc  -c -o ../obj-ack//./syscall/getprocnr.o getprocnr.s
-../obj-ack//libc.a(getsigset.o): getsigset.s
-	cc  -c -o ../obj-ack//./syscall/getsigset.o getsigset.s
-../obj-ack//libc.a(getsysinfo.o): getsysinfo.s
-	cc  -c -o ../obj-ack//./syscall/getsysinfo.o getsysinfo.s
-../obj-ack//libc.a(getuid.o): getuid.s
-	cc  -c -o ../obj-ack//./syscall/getuid.o getuid.s
-../obj-ack//libc.a(ioctl.o): ioctl.s
-	cc  -c -o ../obj-ack//./syscall/ioctl.o ioctl.s
-../obj-ack//libc.a(isatty.o): isatty.s
-	cc  -c -o ../obj-ack//./syscall/isatty.o isatty.s
-../obj-ack//libc.a(kill.o): kill.s
-	cc  -c -o ../obj-ack//./syscall/kill.o kill.s
-../obj-ack//libc.a(link.o): link.s
-	cc  -c -o ../obj-ack//./syscall/link.o link.s
-../obj-ack//libc.a(lseek.o): lseek.s
-	cc  -c -o ../obj-ack//./syscall/lseek.o lseek.s
-../obj-ack//libc.a(lstat.o): lstat.s
-	cc  -c -o ../obj-ack//./syscall/lstat.o lstat.s
-../obj-ack//libc.a(mkdir.o): mkdir.s
-	cc  -c -o ../obj-ack//./syscall/mkdir.o mkdir.s
-../obj-ack//libc.a(mkfifo.o): mkfifo.s
-	cc  -c -o ../obj-ack//./syscall/mkfifo.o mkfifo.s
-../obj-ack//libc.a(mknod.o): mknod.s
-	cc  -c -o ../obj-ack//./syscall/mknod.o mknod.s
-../obj-ack//libc.a(mount.o): mount.s
-	cc  -c -o ../obj-ack//./syscall/mount.o mount.s
-../obj-ack//libc.a(open.o): open.s
-	cc  -c -o ../obj-ack//./syscall/open.o open.s
-../obj-ack//libc.a(opendir.o): opendir.s
-	cc  -c -o ../obj-ack//./syscall/opendir.o opendir.s
-../obj-ack//libc.a(pathconf.o): pathconf.s
-	cc  -c -o ../obj-ack//./syscall/pathconf.o pathconf.s
-../obj-ack//libc.a(pause.o): pause.s
-	cc  -c -o ../obj-ack//./syscall/pause.o pause.s
-../obj-ack//libc.a(pipe.o): pipe.s
-	cc  -c -o ../obj-ack//./syscall/pipe.o pipe.s
-../obj-ack//libc.a(ptrace.o): ptrace.s
-	cc  -c -o ../obj-ack//./syscall/ptrace.o ptrace.s
-../obj-ack//libc.a(read.o): read.s
-	cc  -c -o ../obj-ack//./syscall/read.o read.s
-../obj-ack//libc.a(readdir.o): readdir.s
-	cc  -c -o ../obj-ack//./syscall/readdir.o readdir.s
-../obj-ack//libc.a(readlink.o): readlink.s
-	cc  -c -o ../obj-ack//./syscall/readlink.o readlink.s
-../obj-ack//libc.a(reboot.o): reboot.s
-	cc  -c -o ../obj-ack//./syscall/reboot.o reboot.s
-../obj-ack//libc.a(rename.o): rename.s
-	cc  -c -o ../obj-ack//./syscall/rename.o rename.s
-../obj-ack//libc.a(rewinddir.o): rewinddir.s
-	cc  -c -o ../obj-ack//./syscall/rewinddir.o rewinddir.s
-../obj-ack//libc.a(rmdir.o): rmdir.s
-	cc  -c -o ../obj-ack//./syscall/rmdir.o rmdir.s
-../obj-ack//libc.a(sbrk.o): sbrk.s
-	cc  -c -o ../obj-ack//./syscall/sbrk.o sbrk.s
-../obj-ack//libc.a(seekdir.o): seekdir.s
-	cc  -c -o ../obj-ack//./syscall/seekdir.o seekdir.s
-../obj-ack//libc.a(setgid.o): setgid.s
-	cc  -c -o ../obj-ack//./syscall/setgid.o setgid.s
-../obj-ack//libc.a(setsid.o): setsid.s
-	cc  -c -o ../obj-ack//./syscall/setsid.o setsid.s
-../obj-ack//libc.a(setuid.o): setuid.s
-	cc  -c -o ../obj-ack//./syscall/setuid.o setuid.s
-../obj-ack//libc.a(sigaction.o): sigaction.s
-	cc  -c -o ../obj-ack//./syscall/sigaction.o sigaction.s
-../obj-ack//libc.a(sigaddset.o): sigaddset.s
-	cc  -c -o ../obj-ack//./syscall/sigaddset.o sigaddset.s
-../obj-ack//libc.a(sigdelset.o): sigdelset.s
-	cc  -c -o ../obj-ack//./syscall/sigdelset.o sigdelset.s
-../obj-ack//libc.a(sigemptyset.o): sigemptyset.s
-	cc  -c -o ../obj-ack//./syscall/sigemptyset.o sigemptyset.s
-../obj-ack//libc.a(sigfillset.o): sigfillset.s
-	cc  -c -o ../obj-ack//./syscall/sigfillset.o sigfillset.s
-../obj-ack//libc.a(sigismember.o): sigismember.s
-	cc  -c -o ../obj-ack//./syscall/sigismember.o sigismember.s
-../obj-ack//libc.a(sigpending.o): sigpending.s
-	cc  -c -o ../obj-ack//./syscall/sigpending.o sigpending.s
-../obj-ack//libc.a(sigprocmask.o): sigprocmask.s
-	cc  -c -o ../obj-ack//./syscall/sigprocmask.o sigprocmask.s
-../obj-ack//libc.a(sigreturn.o): sigreturn.s
-	cc  -c -o ../obj-ack//./syscall/sigreturn.o sigreturn.s
-../obj-ack//libc.a(sigsuspend.o): sigsuspend.s
-	cc  -c -o ../obj-ack//./syscall/sigsuspend.o sigsuspend.s
-../obj-ack//libc.a(sleep.o): sleep.s
-	cc  -c -o ../obj-ack//./syscall/sleep.o sleep.s
-../obj-ack//libc.a(stat.o): stat.s
-	cc  -c -o ../obj-ack//./syscall/stat.o stat.s
-../obj-ack//libc.a(stime.o): stime.s
-	cc  -c -o ../obj-ack//./syscall/stime.o stime.s
-../obj-ack//libc.a(svrctl.o): svrctl.s
-	cc  -c -o ../obj-ack//./syscall/svrctl.o svrctl.s
-../obj-ack//libc.a(symlink.o): symlink.s
-	cc  -c -o ../obj-ack//./syscall/symlink.o symlink.s
-../obj-ack//libc.a(sync.o): sync.s
-	cc  -c -o ../obj-ack//./syscall/sync.o sync.s
-../obj-ack//libc.a(tcdrain.o): tcdrain.s
-	cc  -c -o ../obj-ack//./syscall/tcdrain.o tcdrain.s
-../obj-ack//libc.a(tcflow.o): tcflow.s
-	cc  -c -o ../obj-ack//./syscall/tcflow.o tcflow.s
-../obj-ack//libc.a(tcflush.o): tcflush.s
-	cc  -c -o ../obj-ack//./syscall/tcflush.o tcflush.s
-../obj-ack//libc.a(tcgetattr.o): tcgetattr.s
-	cc  -c -o ../obj-ack//./syscall/tcgetattr.o tcgetattr.s
-../obj-ack//libc.a(tcsendbreak.o): tcsendbreak.s
-	cc  -c -o ../obj-ack//./syscall/tcsendbreak.o tcsendbreak.s
-../obj-ack//libc.a(tcsetattr.o): tcsetattr.s
-	cc  -c -o ../obj-ack//./syscall/tcsetattr.o tcsetattr.s
-../obj-ack//libc.a(time.o): time.s
-	cc  -c -o ../obj-ack//./syscall/time.o time.s
-../obj-ack//libc.a(times.o): times.s
-	cc  -c -o ../obj-ack//./syscall/times.o times.s
-../obj-ack//libc.a(truncate.o): truncate.s
-	cc  -c -o ../obj-ack//./syscall/truncate.o truncate.s
-../obj-ack//libc.a(umask.o): umask.s
-	cc  -c -o ../obj-ack//./syscall/umask.o umask.s
-../obj-ack//libc.a(umount.o): umount.s
-	cc  -c -o ../obj-ack//./syscall/umount.o umount.s
-../obj-ack//libc.a(uname.o): uname.s
-	cc  -c -o ../obj-ack//./syscall/uname.o uname.s
-../obj-ack//libc.a(unlink.o): unlink.s
-	cc  -c -o ../obj-ack//./syscall/unlink.o unlink.s
-../obj-ack//libc.a(utime.o): utime.s
-	cc  -c -o ../obj-ack//./syscall/utime.o utime.s
-../obj-ack//libc.a(wait.o): wait.s
-	cc  -c -o ../obj-ack//./syscall/wait.o wait.s
-../obj-ack//libc.a(waitpid.o): waitpid.s
-	cc  -c -o ../obj-ack//./syscall/waitpid.o waitpid.s
-../obj-ack//libc.a(write.o): write.s
-	cc  -c -o ../obj-ack//./syscall/write.o write.s
-
-all-gnu: ../obj-gnu/libc.a
-
-../obj-gnu/libc.a: ../obj-gnu/./syscall/_exit.o
-../obj-gnu/libc.a: ../obj-gnu/./syscall/_pm_findproc.o
-../obj-gnu/libc.a: ../obj-gnu/./syscall/access.o
-../obj-gnu/libc.a: ../obj-gnu/./syscall/alarm.o
-../obj-gnu/libc.a: ../obj-gnu/./syscall/allocmem.o
-../obj-gnu/libc.a: ../obj-gnu/./syscall/brk.o
-../obj-gnu/libc.a: ../obj-gnu/./syscall/cfgetispeed.o
-../obj-gnu/libc.a: ../obj-gnu/./syscall/cfgetospeed.o
-../obj-gnu/libc.a: ../obj-gnu/./syscall/cfsetispeed.o
-../obj-gnu/libc.a: ../obj-gnu/./syscall/cfsetospeed.o
-../obj-gnu/libc.a: ../obj-gnu/./syscall/chdir.o
-../obj-gnu/libc.a: ../obj-gnu/./syscall/chmod.o
-../obj-gnu/libc.a: ../obj-gnu/./syscall/chown.o
-../obj-gnu/libc.a: ../obj-gnu/./syscall/chroot.o
-../obj-gnu/libc.a: ../obj-gnu/./syscall/close.o
-../obj-gnu/libc.a: ../obj-gnu/./syscall/closedir.o
-../obj-gnu/libc.a: ../obj-gnu/./syscall/creat.o
-../obj-gnu/libc.a: ../obj-gnu/./syscall/devctl.o
-../obj-gnu/libc.a: ../obj-gnu/./syscall/dup.o
-../obj-gnu/libc.a: ../obj-gnu/./syscall/dup2.o
-../obj-gnu/libc.a: ../obj-gnu/./syscall/execl.o
-../obj-gnu/libc.a: ../obj-gnu/./syscall/execle.o
-../obj-gnu/libc.a: ../obj-gnu/./syscall/execlp.o
-../obj-gnu/libc.a: ../obj-gnu/./syscall/execv.o
-../obj-gnu/libc.a: ../obj-gnu/./syscall/execve.o
-../obj-gnu/libc.a: ../obj-gnu/./syscall/execvp.o
-../obj-gnu/libc.a: ../obj-gnu/./syscall/fcntl.o
-../obj-gnu/libc.a: ../obj-gnu/./syscall/fork.o
-../obj-gnu/libc.a: ../obj-gnu/./syscall/fpathconf.o
-../obj-gnu/libc.a: ../obj-gnu/./syscall/freemem.o
-../obj-gnu/libc.a: ../obj-gnu/./syscall/fstat.o
-../obj-gnu/libc.a: ../obj-gnu/./syscall/fstatfs.o
-../obj-gnu/libc.a: ../obj-gnu/./syscall/getcwd.o
-../obj-gnu/libc.a: ../obj-gnu/./syscall/getegid.o
-../obj-gnu/libc.a: ../obj-gnu/./syscall/geteuid.o
-../obj-gnu/libc.a: ../obj-gnu/./syscall/getgid.o
-../obj-gnu/libc.a: ../obj-gnu/./syscall/getgroups.o
-../obj-gnu/libc.a: ../obj-gnu/./syscall/getnpid.o
-../obj-gnu/libc.a: ../obj-gnu/./syscall/getnprocnr.o
-../obj-gnu/libc.a: ../obj-gnu/./syscall/getpgrp.o
-../obj-gnu/libc.a: ../obj-gnu/./syscall/getpid.o
-../obj-gnu/libc.a: ../obj-gnu/./syscall/getppid.o
-../obj-gnu/libc.a: ../obj-gnu/./syscall/getpprocnr.o
-../obj-gnu/libc.a: ../obj-gnu/./syscall/getprocnr.o
-../obj-gnu/libc.a: ../obj-gnu/./syscall/getsigset.o
-../obj-gnu/libc.a: ../obj-gnu/./syscall/getsysinfo.o
-../obj-gnu/libc.a: ../obj-gnu/./syscall/getuid.o
-../obj-gnu/libc.a: ../obj-gnu/./syscall/ioctl.o
-../obj-gnu/libc.a: ../obj-gnu/./syscall/isatty.o
-../obj-gnu/libc.a: ../obj-gnu/./syscall/kill.o
-../obj-gnu/libc.a: ../obj-gnu/./syscall/link.o
-../obj-gnu/libc.a: ../obj-gnu/./syscall/lseek.o
-../obj-gnu/libc.a: ../obj-gnu/./syscall/lstat.o
-../obj-gnu/libc.a: ../obj-gnu/./syscall/mkdir.o
-../obj-gnu/libc.a: ../obj-gnu/./syscall/mkfifo.o
-../obj-gnu/libc.a: ../obj-gnu/./syscall/mknod.o
-../obj-gnu/libc.a: ../obj-gnu/./syscall/mount.o
-../obj-gnu/libc.a: ../obj-gnu/./syscall/open.o
-../obj-gnu/libc.a: ../obj-gnu/./syscall/opendir.o
-../obj-gnu/libc.a: ../obj-gnu/./syscall/pathconf.o
-../obj-gnu/libc.a: ../obj-gnu/./syscall/pause.o
-../obj-gnu/libc.a: ../obj-gnu/./syscall/pipe.o
-../obj-gnu/libc.a: ../obj-gnu/./syscall/ptrace.o
-../obj-gnu/libc.a: ../obj-gnu/./syscall/read.o
-../obj-gnu/libc.a: ../obj-gnu/./syscall/readdir.o
-../obj-gnu/libc.a: ../obj-gnu/./syscall/readlink.o
-../obj-gnu/libc.a: ../obj-gnu/./syscall/reboot.o
-../obj-gnu/libc.a: ../obj-gnu/./syscall/rename.o
-../obj-gnu/libc.a: ../obj-gnu/./syscall/rewinddir.o
-../obj-gnu/libc.a: ../obj-gnu/./syscall/rmdir.o
-../obj-gnu/libc.a: ../obj-gnu/./syscall/sbrk.o
-../obj-gnu/libc.a: ../obj-gnu/./syscall/seekdir.o
-../obj-gnu/libc.a: ../obj-gnu/./syscall/setgid.o
-../obj-gnu/libc.a: ../obj-gnu/./syscall/setsid.o
-../obj-gnu/libc.a: ../obj-gnu/./syscall/setuid.o
-../obj-gnu/libc.a: ../obj-gnu/./syscall/sigaction.o
-../obj-gnu/libc.a: ../obj-gnu/./syscall/sigaddset.o
-../obj-gnu/libc.a: ../obj-gnu/./syscall/sigdelset.o
-../obj-gnu/libc.a: ../obj-gnu/./syscall/sigemptyset.o
-../obj-gnu/libc.a: ../obj-gnu/./syscall/sigfillset.o
-../obj-gnu/libc.a: ../obj-gnu/./syscall/sigismember.o
-../obj-gnu/libc.a: ../obj-gnu/./syscall/sigpending.o
-../obj-gnu/libc.a: ../obj-gnu/./syscall/sigprocmask.o
-../obj-gnu/libc.a: ../obj-gnu/./syscall/sigreturn.o
-../obj-gnu/libc.a: ../obj-gnu/./syscall/sigsuspend.o
-../obj-gnu/libc.a: ../obj-gnu/./syscall/sleep.o
-../obj-gnu/libc.a: ../obj-gnu/./syscall/stat.o
-../obj-gnu/libc.a: ../obj-gnu/./syscall/stime.o
-../obj-gnu/libc.a: ../obj-gnu/./syscall/svrctl.o
-../obj-gnu/libc.a: ../obj-gnu/./syscall/symlink.o
-../obj-gnu/libc.a: ../obj-gnu/./syscall/sync.o
-../obj-gnu/libc.a: ../obj-gnu/./syscall/tcdrain.o
-../obj-gnu/libc.a: ../obj-gnu/./syscall/tcflow.o
-../obj-gnu/libc.a: ../obj-gnu/./syscall/tcflush.o
-../obj-gnu/libc.a: ../obj-gnu/./syscall/tcgetattr.o
-../obj-gnu/libc.a: ../obj-gnu/./syscall/tcsendbreak.o
-../obj-gnu/libc.a: ../obj-gnu/./syscall/tcsetattr.o
-../obj-gnu/libc.a: ../obj-gnu/./syscall/time.o
-../obj-gnu/libc.a: ../obj-gnu/./syscall/times.o
-../obj-gnu/libc.a: ../obj-gnu/./syscall/truncate.o
-../obj-gnu/libc.a: ../obj-gnu/./syscall/umask.o
-../obj-gnu/libc.a: ../obj-gnu/./syscall/umount.o
-../obj-gnu/libc.a: ../obj-gnu/./syscall/uname.o
-../obj-gnu/libc.a: ../obj-gnu/./syscall/unlink.o
-../obj-gnu/libc.a: ../obj-gnu/./syscall/utime.o
-../obj-gnu/libc.a: ../obj-gnu/./syscall/wait.o
-../obj-gnu/libc.a: ../obj-gnu/./syscall/waitpid.o
-../obj-gnu/libc.a: ../obj-gnu/./syscall/write.o
-
-../obj-gnu/libc.a:
-	gar cr ../obj-gnu/libc.a $?
-
-../obj-gnu/./syscall/_exit.o: _exit.s
-	gcc  -E -x assembler-with-cpp -I. _exit.s | asmconv -mi386 ack gnu > ../obj-gnu/./syscall/_exit.s.gnu || true
-	gas -o ../obj-gnu/./syscall/_exit.o ../obj-gnu/./syscall/_exit.s.gnu
-
-../obj-gnu/./syscall/_pm_findproc.o: _pm_findproc.s
-	gcc  -E -x assembler-with-cpp -I. _pm_findproc.s | asmconv -mi386 ack gnu > ../obj-gnu/./syscall/_pm_findproc.s.gnu || true
-	gas -o ../obj-gnu/./syscall/_pm_findproc.o ../obj-gnu/./syscall/_pm_findproc.s.gnu
-
-../obj-gnu/./syscall/access.o: access.s
-	gcc  -E -x assembler-with-cpp -I. access.s | asmconv -mi386 ack gnu > ../obj-gnu/./syscall/access.s.gnu || true
-	gas -o ../obj-gnu/./syscall/access.o ../obj-gnu/./syscall/access.s.gnu
-
-../obj-gnu/./syscall/alarm.o: alarm.s
-	gcc  -E -x assembler-with-cpp -I. alarm.s | asmconv -mi386 ack gnu > ../obj-gnu/./syscall/alarm.s.gnu || true
-	gas -o ../obj-gnu/./syscall/alarm.o ../obj-gnu/./syscall/alarm.s.gnu
-
-../obj-gnu/./syscall/allocmem.o: allocmem.s
-	gcc  -E -x assembler-with-cpp -I. allocmem.s | asmconv -mi386 ack gnu > ../obj-gnu/./syscall/allocmem.s.gnu || true
-	gas -o ../obj-gnu/./syscall/allocmem.o ../obj-gnu/./syscall/allocmem.s.gnu
-
-../obj-gnu/./syscall/brk.o: brk.s
-	gcc  -E -x assembler-with-cpp -I. brk.s | asmconv -mi386 ack gnu > ../obj-gnu/./syscall/brk.s.gnu || true
-	gas -o ../obj-gnu/./syscall/brk.o ../obj-gnu/./syscall/brk.s.gnu
-
-../obj-gnu/./syscall/cfgetispeed.o: cfgetispeed.s
-	gcc  -E -x assembler-with-cpp -I. cfgetispeed.s | asmconv -mi386 ack gnu > ../obj-gnu/./syscall/cfgetispeed.s.gnu || true
-	gas -o ../obj-gnu/./syscall/cfgetispeed.o ../obj-gnu/./syscall/cfgetispeed.s.gnu
-
-../obj-gnu/./syscall/cfgetospeed.o: cfgetospeed.s
-	gcc  -E -x assembler-with-cpp -I. cfgetospeed.s | asmconv -mi386 ack gnu > ../obj-gnu/./syscall/cfgetospeed.s.gnu || true
-	gas -o ../obj-gnu/./syscall/cfgetospeed.o ../obj-gnu/./syscall/cfgetospeed.s.gnu
-
-../obj-gnu/./syscall/cfsetispeed.o: cfsetispeed.s
-	gcc  -E -x assembler-with-cpp -I. cfsetispeed.s | asmconv -mi386 ack gnu > ../obj-gnu/./syscall/cfsetispeed.s.gnu || true
-	gas -o ../obj-gnu/./syscall/cfsetispeed.o ../obj-gnu/./syscall/cfsetispeed.s.gnu
-
-../obj-gnu/./syscall/cfsetospeed.o: cfsetospeed.s
-	gcc  -E -x assembler-with-cpp -I. cfsetospeed.s | asmconv -mi386 ack gnu > ../obj-gnu/./syscall/cfsetospeed.s.gnu || true
-	gas -o ../obj-gnu/./syscall/cfsetospeed.o ../obj-gnu/./syscall/cfsetospeed.s.gnu
-
-../obj-gnu/./syscall/chdir.o: chdir.s
-	gcc  -E -x assembler-with-cpp -I. chdir.s | asmconv -mi386 ack gnu > ../obj-gnu/./syscall/chdir.s.gnu || true
-	gas -o ../obj-gnu/./syscall/chdir.o ../obj-gnu/./syscall/chdir.s.gnu
-
-../obj-gnu/./syscall/chmod.o: chmod.s
-	gcc  -E -x assembler-with-cpp -I. chmod.s | asmconv -mi386 ack gnu > ../obj-gnu/./syscall/chmod.s.gnu || true
-	gas -o ../obj-gnu/./syscall/chmod.o ../obj-gnu/./syscall/chmod.s.gnu
-
-../obj-gnu/./syscall/chown.o: chown.s
-	gcc  -E -x assembler-with-cpp -I. chown.s | asmconv -mi386 ack gnu > ../obj-gnu/./syscall/chown.s.gnu || true
-	gas -o ../obj-gnu/./syscall/chown.o ../obj-gnu/./syscall/chown.s.gnu
-
-../obj-gnu/./syscall/chroot.o: chroot.s
-	gcc  -E -x assembler-with-cpp -I. chroot.s | asmconv -mi386 ack gnu > ../obj-gnu/./syscall/chroot.s.gnu || true
-	gas -o ../obj-gnu/./syscall/chroot.o ../obj-gnu/./syscall/chroot.s.gnu
-
-../obj-gnu/./syscall/close.o: close.s
-	gcc  -E -x assembler-with-cpp -I. close.s | asmconv -mi386 ack gnu > ../obj-gnu/./syscall/close.s.gnu || true
-	gas -o ../obj-gnu/./syscall/close.o ../obj-gnu/./syscall/close.s.gnu
-
-../obj-gnu/./syscall/closedir.o: closedir.s
-	gcc  -E -x assembler-with-cpp -I. closedir.s | asmconv -mi386 ack gnu > ../obj-gnu/./syscall/closedir.s.gnu || true
-	gas -o ../obj-gnu/./syscall/closedir.o ../obj-gnu/./syscall/closedir.s.gnu
-
-../obj-gnu/./syscall/creat.o: creat.s
-	gcc  -E -x assembler-with-cpp -I. creat.s | asmconv -mi386 ack gnu > ../obj-gnu/./syscall/creat.s.gnu || true
-	gas -o ../obj-gnu/./syscall/creat.o ../obj-gnu/./syscall/creat.s.gnu
-
-../obj-gnu/./syscall/devctl.o: devctl.s
-	gcc  -E -x assembler-with-cpp -I. devctl.s | asmconv -mi386 ack gnu > ../obj-gnu/./syscall/devctl.s.gnu || true
-	gas -o ../obj-gnu/./syscall/devctl.o ../obj-gnu/./syscall/devctl.s.gnu
-
-../obj-gnu/./syscall/dup.o: dup.s
-	gcc  -E -x assembler-with-cpp -I. dup.s | asmconv -mi386 ack gnu > ../obj-gnu/./syscall/dup.s.gnu || true
-	gas -o ../obj-gnu/./syscall/dup.o ../obj-gnu/./syscall/dup.s.gnu
-
-../obj-gnu/./syscall/dup2.o: dup2.s
-	gcc  -E -x assembler-with-cpp -I. dup2.s | asmconv -mi386 ack gnu > ../obj-gnu/./syscall/dup2.s.gnu || true
-	gas -o ../obj-gnu/./syscall/dup2.o ../obj-gnu/./syscall/dup2.s.gnu
-
-../obj-gnu/./syscall/execl.o: execl.s
-	gcc  -E -x assembler-with-cpp -I. execl.s | asmconv -mi386 ack gnu > ../obj-gnu/./syscall/execl.s.gnu || true
-	gas -o ../obj-gnu/./syscall/execl.o ../obj-gnu/./syscall/execl.s.gnu
-
-../obj-gnu/./syscall/execle.o: execle.s
-	gcc  -E -x assembler-with-cpp -I. execle.s | asmconv -mi386 ack gnu > ../obj-gnu/./syscall/execle.s.gnu || true
-	gas -o ../obj-gnu/./syscall/execle.o ../obj-gnu/./syscall/execle.s.gnu
-
-../obj-gnu/./syscall/execlp.o: execlp.s
-	gcc  -E -x assembler-with-cpp -I. execlp.s | asmconv -mi386 ack gnu > ../obj-gnu/./syscall/execlp.s.gnu || true
-	gas -o ../obj-gnu/./syscall/execlp.o ../obj-gnu/./syscall/execlp.s.gnu
-
-../obj-gnu/./syscall/execv.o: execv.s
-	gcc  -E -x assembler-with-cpp -I. execv.s | asmconv -mi386 ack gnu > ../obj-gnu/./syscall/execv.s.gnu || true
-	gas -o ../obj-gnu/./syscall/execv.o ../obj-gnu/./syscall/execv.s.gnu
-
-../obj-gnu/./syscall/execve.o: execve.s
-	gcc  -E -x assembler-with-cpp -I. execve.s | asmconv -mi386 ack gnu > ../obj-gnu/./syscall/execve.s.gnu || true
-	gas -o ../obj-gnu/./syscall/execve.o ../obj-gnu/./syscall/execve.s.gnu
-
-../obj-gnu/./syscall/execvp.o: execvp.s
-	gcc  -E -x assembler-with-cpp -I. execvp.s | asmconv -mi386 ack gnu > ../obj-gnu/./syscall/execvp.s.gnu || true
-	gas -o ../obj-gnu/./syscall/execvp.o ../obj-gnu/./syscall/execvp.s.gnu
-
-../obj-gnu/./syscall/fcntl.o: fcntl.s
-	gcc  -E -x assembler-with-cpp -I. fcntl.s | asmconv -mi386 ack gnu > ../obj-gnu/./syscall/fcntl.s.gnu || true
-	gas -o ../obj-gnu/./syscall/fcntl.o ../obj-gnu/./syscall/fcntl.s.gnu
-
-../obj-gnu/./syscall/fork.o: fork.s
-	gcc  -E -x assembler-with-cpp -I. fork.s | asmconv -mi386 ack gnu > ../obj-gnu/./syscall/fork.s.gnu || true
-	gas -o ../obj-gnu/./syscall/fork.o ../obj-gnu/./syscall/fork.s.gnu
-
-../obj-gnu/./syscall/fpathconf.o: fpathconf.s
-	gcc  -E -x assembler-with-cpp -I. fpathconf.s | asmconv -mi386 ack gnu > ../obj-gnu/./syscall/fpathconf.s.gnu || true
-	gas -o ../obj-gnu/./syscall/fpathconf.o ../obj-gnu/./syscall/fpathconf.s.gnu
-
-../obj-gnu/./syscall/freemem.o: freemem.s
-	gcc  -E -x assembler-with-cpp -I. freemem.s | asmconv -mi386 ack gnu > ../obj-gnu/./syscall/freemem.s.gnu || true
-	gas -o ../obj-gnu/./syscall/freemem.o ../obj-gnu/./syscall/freemem.s.gnu
-
-../obj-gnu/./syscall/fstat.o: fstat.s
-	gcc  -E -x assembler-with-cpp -I. fstat.s | asmconv -mi386 ack gnu > ../obj-gnu/./syscall/fstat.s.gnu || true
-	gas -o ../obj-gnu/./syscall/fstat.o ../obj-gnu/./syscall/fstat.s.gnu
-
-../obj-gnu/./syscall/fstatfs.o: fstatfs.s
-	gcc  -E -x assembler-with-cpp -I. fstatfs.s | asmconv -mi386 ack gnu > ../obj-gnu/./syscall/fstatfs.s.gnu || true
-	gas -o ../obj-gnu/./syscall/fstatfs.o ../obj-gnu/./syscall/fstatfs.s.gnu
-
-../obj-gnu/./syscall/getcwd.o: getcwd.s
-	gcc  -E -x assembler-with-cpp -I. getcwd.s | asmconv -mi386 ack gnu > ../obj-gnu/./syscall/getcwd.s.gnu || true
-	gas -o ../obj-gnu/./syscall/getcwd.o ../obj-gnu/./syscall/getcwd.s.gnu
-
-../obj-gnu/./syscall/getegid.o: getegid.s
-	gcc  -E -x assembler-with-cpp -I. getegid.s | asmconv -mi386 ack gnu > ../obj-gnu/./syscall/getegid.s.gnu || true
-	gas -o ../obj-gnu/./syscall/getegid.o ../obj-gnu/./syscall/getegid.s.gnu
-
-../obj-gnu/./syscall/geteuid.o: geteuid.s
-	gcc  -E -x assembler-with-cpp -I. geteuid.s | asmconv -mi386 ack gnu > ../obj-gnu/./syscall/geteuid.s.gnu || true
-	gas -o ../obj-gnu/./syscall/geteuid.o ../obj-gnu/./syscall/geteuid.s.gnu
-
-../obj-gnu/./syscall/getgid.o: getgid.s
-	gcc  -E -x assembler-with-cpp -I. getgid.s | asmconv -mi386 ack gnu > ../obj-gnu/./syscall/getgid.s.gnu || true
-	gas -o ../obj-gnu/./syscall/getgid.o ../obj-gnu/./syscall/getgid.s.gnu
-
-../obj-gnu/./syscall/getgroups.o: getgroups.s
-	gcc  -E -x assembler-with-cpp -I. getgroups.s | asmconv -mi386 ack gnu > ../obj-gnu/./syscall/getgroups.s.gnu || true
-	gas -o ../obj-gnu/./syscall/getgroups.o ../obj-gnu/./syscall/getgroups.s.gnu
-
-../obj-gnu/./syscall/getnpid.o: getnpid.s
-	gcc  -E -x assembler-with-cpp -I. getnpid.s | asmconv -mi386 ack gnu > ../obj-gnu/./syscall/getnpid.s.gnu || true
-	gas -o ../obj-gnu/./syscall/getnpid.o ../obj-gnu/./syscall/getnpid.s.gnu
-
-../obj-gnu/./syscall/getnprocnr.o: getnprocnr.s
-	gcc  -E -x assembler-with-cpp -I. getnprocnr.s | asmconv -mi386 ack gnu > ../obj-gnu/./syscall/getnprocnr.s.gnu || true
-	gas -o ../obj-gnu/./syscall/getnprocnr.o ../obj-gnu/./syscall/getnprocnr.s.gnu
-
-../obj-gnu/./syscall/getpgrp.o: getpgrp.s
-	gcc  -E -x assembler-with-cpp -I. getpgrp.s | asmconv -mi386 ack gnu > ../obj-gnu/./syscall/getpgrp.s.gnu || true
-	gas -o ../obj-gnu/./syscall/getpgrp.o ../obj-gnu/./syscall/getpgrp.s.gnu
-
-../obj-gnu/./syscall/getpid.o: getpid.s
-	gcc  -E -x assembler-with-cpp -I. getpid.s | asmconv -mi386 ack gnu > ../obj-gnu/./syscall/getpid.s.gnu || true
-	gas -o ../obj-gnu/./syscall/getpid.o ../obj-gnu/./syscall/getpid.s.gnu
-
-../obj-gnu/./syscall/getppid.o: getppid.s
-	gcc  -E -x assembler-with-cpp -I. getppid.s | asmconv -mi386 ack gnu > ../obj-gnu/./syscall/getppid.s.gnu || true
-	gas -o ../obj-gnu/./syscall/getppid.o ../obj-gnu/./syscall/getppid.s.gnu
-
-../obj-gnu/./syscall/getpprocnr.o: getpprocnr.s
-	gcc  -E -x assembler-with-cpp -I. getpprocnr.s | asmconv -mi386 ack gnu > ../obj-gnu/./syscall/getpprocnr.s.gnu || true
-	gas -o ../obj-gnu/./syscall/getpprocnr.o ../obj-gnu/./syscall/getpprocnr.s.gnu
-
-../obj-gnu/./syscall/getprocnr.o: getprocnr.s
-	gcc  -E -x assembler-with-cpp -I. getprocnr.s | asmconv -mi386 ack gnu > ../obj-gnu/./syscall/getprocnr.s.gnu || true
-	gas -o ../obj-gnu/./syscall/getprocnr.o ../obj-gnu/./syscall/getprocnr.s.gnu
-
-../obj-gnu/./syscall/getsigset.o: getsigset.s
-	gcc  -E -x assembler-with-cpp -I. getsigset.s | asmconv -mi386 ack gnu > ../obj-gnu/./syscall/getsigset.s.gnu || true
-	gas -o ../obj-gnu/./syscall/getsigset.o ../obj-gnu/./syscall/getsigset.s.gnu
-
-../obj-gnu/./syscall/getsysinfo.o: getsysinfo.s
-	gcc  -E -x assembler-with-cpp -I. getsysinfo.s | asmconv -mi386 ack gnu > ../obj-gnu/./syscall/getsysinfo.s.gnu || true
-	gas -o ../obj-gnu/./syscall/getsysinfo.o ../obj-gnu/./syscall/getsysinfo.s.gnu
-
-../obj-gnu/./syscall/getuid.o: getuid.s
-	gcc  -E -x assembler-with-cpp -I. getuid.s | asmconv -mi386 ack gnu > ../obj-gnu/./syscall/getuid.s.gnu || true
-	gas -o ../obj-gnu/./syscall/getuid.o ../obj-gnu/./syscall/getuid.s.gnu
-
-../obj-gnu/./syscall/ioctl.o: ioctl.s
-	gcc  -E -x assembler-with-cpp -I. ioctl.s | asmconv -mi386 ack gnu > ../obj-gnu/./syscall/ioctl.s.gnu || true
-	gas -o ../obj-gnu/./syscall/ioctl.o ../obj-gnu/./syscall/ioctl.s.gnu
-
-../obj-gnu/./syscall/isatty.o: isatty.s
-	gcc  -E -x assembler-with-cpp -I. isatty.s | asmconv -mi386 ack gnu > ../obj-gnu/./syscall/isatty.s.gnu || true
-	gas -o ../obj-gnu/./syscall/isatty.o ../obj-gnu/./syscall/isatty.s.gnu
-
-../obj-gnu/./syscall/kill.o: kill.s
-	gcc  -E -x assembler-with-cpp -I. kill.s | asmconv -mi386 ack gnu > ../obj-gnu/./syscall/kill.s.gnu || true
-	gas -o ../obj-gnu/./syscall/kill.o ../obj-gnu/./syscall/kill.s.gnu
-
-../obj-gnu/./syscall/link.o: link.s
-	gcc  -E -x assembler-with-cpp -I. link.s | asmconv -mi386 ack gnu > ../obj-gnu/./syscall/link.s.gnu || true
-	gas -o ../obj-gnu/./syscall/link.o ../obj-gnu/./syscall/link.s.gnu
-
-../obj-gnu/./syscall/lseek.o: lseek.s
-	gcc  -E -x assembler-with-cpp -I. lseek.s | asmconv -mi386 ack gnu > ../obj-gnu/./syscall/lseek.s.gnu || true
-	gas -o ../obj-gnu/./syscall/lseek.o ../obj-gnu/./syscall/lseek.s.gnu
-
-../obj-gnu/./syscall/lstat.o: lstat.s
-	gcc  -E -x assembler-with-cpp -I. lstat.s | asmconv -mi386 ack gnu > ../obj-gnu/./syscall/lstat.s.gnu || true
-	gas -o ../obj-gnu/./syscall/lstat.o ../obj-gnu/./syscall/lstat.s.gnu
-
-../obj-gnu/./syscall/mkdir.o: mkdir.s
-	gcc  -E -x assembler-with-cpp -I. mkdir.s | asmconv -mi386 ack gnu > ../obj-gnu/./syscall/mkdir.s.gnu || true
-	gas -o ../obj-gnu/./syscall/mkdir.o ../obj-gnu/./syscall/mkdir.s.gnu
-
-../obj-gnu/./syscall/mkfifo.o: mkfifo.s
-	gcc  -E -x assembler-with-cpp -I. mkfifo.s | asmconv -mi386 ack gnu > ../obj-gnu/./syscall/mkfifo.s.gnu || true
-	gas -o ../obj-gnu/./syscall/mkfifo.o ../obj-gnu/./syscall/mkfifo.s.gnu
-
-../obj-gnu/./syscall/mknod.o: mknod.s
-	gcc  -E -x assembler-with-cpp -I. mknod.s | asmconv -mi386 ack gnu > ../obj-gnu/./syscall/mknod.s.gnu || true
-	gas -o ../obj-gnu/./syscall/mknod.o ../obj-gnu/./syscall/mknod.s.gnu
-
-../obj-gnu/./syscall/mount.o: mount.s
-	gcc  -E -x assembler-with-cpp -I. mount.s | asmconv -mi386 ack gnu > ../obj-gnu/./syscall/mount.s.gnu || true
-	gas -o ../obj-gnu/./syscall/mount.o ../obj-gnu/./syscall/mount.s.gnu
-
-../obj-gnu/./syscall/open.o: open.s
-	gcc  -E -x assembler-with-cpp -I. open.s | asmconv -mi386 ack gnu > ../obj-gnu/./syscall/open.s.gnu || true
-	gas -o ../obj-gnu/./syscall/open.o ../obj-gnu/./syscall/open.s.gnu
-
-../obj-gnu/./syscall/opendir.o: opendir.s
-	gcc  -E -x assembler-with-cpp -I. opendir.s | asmconv -mi386 ack gnu > ../obj-gnu/./syscall/opendir.s.gnu || true
-	gas -o ../obj-gnu/./syscall/opendir.o ../obj-gnu/./syscall/opendir.s.gnu
-
-../obj-gnu/./syscall/pathconf.o: pathconf.s
-	gcc  -E -x assembler-with-cpp -I. pathconf.s | asmconv -mi386 ack gnu > ../obj-gnu/./syscall/pathconf.s.gnu || true
-	gas -o ../obj-gnu/./syscall/pathconf.o ../obj-gnu/./syscall/pathconf.s.gnu
-
-../obj-gnu/./syscall/pause.o: pause.s
-	gcc  -E -x assembler-with-cpp -I. pause.s | asmconv -mi386 ack gnu > ../obj-gnu/./syscall/pause.s.gnu || true
-	gas -o ../obj-gnu/./syscall/pause.o ../obj-gnu/./syscall/pause.s.gnu
-
-../obj-gnu/./syscall/pipe.o: pipe.s
-	gcc  -E -x assembler-with-cpp -I. pipe.s | asmconv -mi386 ack gnu > ../obj-gnu/./syscall/pipe.s.gnu || true
-	gas -o ../obj-gnu/./syscall/pipe.o ../obj-gnu/./syscall/pipe.s.gnu
-
-../obj-gnu/./syscall/ptrace.o: ptrace.s
-	gcc  -E -x assembler-with-cpp -I. ptrace.s | asmconv -mi386 ack gnu > ../obj-gnu/./syscall/ptrace.s.gnu || true
-	gas -o ../obj-gnu/./syscall/ptrace.o ../obj-gnu/./syscall/ptrace.s.gnu
-
-../obj-gnu/./syscall/read.o: read.s
-	gcc  -E -x assembler-with-cpp -I. read.s | asmconv -mi386 ack gnu > ../obj-gnu/./syscall/read.s.gnu || true
-	gas -o ../obj-gnu/./syscall/read.o ../obj-gnu/./syscall/read.s.gnu
-
-../obj-gnu/./syscall/readdir.o: readdir.s
-	gcc  -E -x assembler-with-cpp -I. readdir.s | asmconv -mi386 ack gnu > ../obj-gnu/./syscall/readdir.s.gnu || true
-	gas -o ../obj-gnu/./syscall/readdir.o ../obj-gnu/./syscall/readdir.s.gnu
-
-../obj-gnu/./syscall/readlink.o: readlink.s
-	gcc  -E -x assembler-with-cpp -I. readlink.s | asmconv -mi386 ack gnu > ../obj-gnu/./syscall/readlink.s.gnu || true
-	gas -o ../obj-gnu/./syscall/readlink.o ../obj-gnu/./syscall/readlink.s.gnu
-
-../obj-gnu/./syscall/reboot.o: reboot.s
-	gcc  -E -x assembler-with-cpp -I. reboot.s | asmconv -mi386 ack gnu > ../obj-gnu/./syscall/reboot.s.gnu || true
-	gas -o ../obj-gnu/./syscall/reboot.o ../obj-gnu/./syscall/reboot.s.gnu
-
-../obj-gnu/./syscall/rename.o: rename.s
-	gcc  -E -x assembler-with-cpp -I. rename.s | asmconv -mi386 ack gnu > ../obj-gnu/./syscall/rename.s.gnu || true
-	gas -o ../obj-gnu/./syscall/rename.o ../obj-gnu/./syscall/rename.s.gnu
-
-../obj-gnu/./syscall/rewinddir.o: rewinddir.s
-	gcc  -E -x assembler-with-cpp -I. rewinddir.s | asmconv -mi386 ack gnu > ../obj-gnu/./syscall/rewinddir.s.gnu || true
-	gas -o ../obj-gnu/./syscall/rewinddir.o ../obj-gnu/./syscall/rewinddir.s.gnu
-
-../obj-gnu/./syscall/rmdir.o: rmdir.s
-	gcc  -E -x assembler-with-cpp -I. rmdir.s | asmconv -mi386 ack gnu > ../obj-gnu/./syscall/rmdir.s.gnu || true
-	gas -o ../obj-gnu/./syscall/rmdir.o ../obj-gnu/./syscall/rmdir.s.gnu
-
-../obj-gnu/./syscall/sbrk.o: sbrk.s
-	gcc  -E -x assembler-with-cpp -I. sbrk.s | asmconv -mi386 ack gnu > ../obj-gnu/./syscall/sbrk.s.gnu || true
-	gas -o ../obj-gnu/./syscall/sbrk.o ../obj-gnu/./syscall/sbrk.s.gnu
-
-../obj-gnu/./syscall/seekdir.o: seekdir.s
-	gcc  -E -x assembler-with-cpp -I. seekdir.s | asmconv -mi386 ack gnu > ../obj-gnu/./syscall/seekdir.s.gnu || true
-	gas -o ../obj-gnu/./syscall/seekdir.o ../obj-gnu/./syscall/seekdir.s.gnu
-
-../obj-gnu/./syscall/setgid.o: setgid.s
-	gcc  -E -x assembler-with-cpp -I. setgid.s | asmconv -mi386 ack gnu > ../obj-gnu/./syscall/setgid.s.gnu || true
-	gas -o ../obj-gnu/./syscall/setgid.o ../obj-gnu/./syscall/setgid.s.gnu
-
-../obj-gnu/./syscall/setsid.o: setsid.s
-	gcc  -E -x assembler-with-cpp -I. setsid.s | asmconv -mi386 ack gnu > ../obj-gnu/./syscall/setsid.s.gnu || true
-	gas -o ../obj-gnu/./syscall/setsid.o ../obj-gnu/./syscall/setsid.s.gnu
-
-../obj-gnu/./syscall/setuid.o: setuid.s
-	gcc  -E -x assembler-with-cpp -I. setuid.s | asmconv -mi386 ack gnu > ../obj-gnu/./syscall/setuid.s.gnu || true
-	gas -o ../obj-gnu/./syscall/setuid.o ../obj-gnu/./syscall/setuid.s.gnu
-
-../obj-gnu/./syscall/sigaction.o: sigaction.s
-	gcc  -E -x assembler-with-cpp -I. sigaction.s | asmconv -mi386 ack gnu > ../obj-gnu/./syscall/sigaction.s.gnu || true
-	gas -o ../obj-gnu/./syscall/sigaction.o ../obj-gnu/./syscall/sigaction.s.gnu
-
-../obj-gnu/./syscall/sigaddset.o: sigaddset.s
-	gcc  -E -x assembler-with-cpp -I. sigaddset.s | asmconv -mi386 ack gnu > ../obj-gnu/./syscall/sigaddset.s.gnu || true
-	gas -o ../obj-gnu/./syscall/sigaddset.o ../obj-gnu/./syscall/sigaddset.s.gnu
-
-../obj-gnu/./syscall/sigdelset.o: sigdelset.s
-	gcc  -E -x assembler-with-cpp -I. sigdelset.s | asmconv -mi386 ack gnu > ../obj-gnu/./syscall/sigdelset.s.gnu || true
-	gas -o ../obj-gnu/./syscall/sigdelset.o ../obj-gnu/./syscall/sigdelset.s.gnu
-
-../obj-gnu/./syscall/sigemptyset.o: sigemptyset.s
-	gcc  -E -x assembler-with-cpp -I. sigemptyset.s | asmconv -mi386 ack gnu > ../obj-gnu/./syscall/sigemptyset.s.gnu || true
-	gas -o ../obj-gnu/./syscall/sigemptyset.o ../obj-gnu/./syscall/sigemptyset.s.gnu
-
-../obj-gnu/./syscall/sigfillset.o: sigfillset.s
-	gcc  -E -x assembler-with-cpp -I. sigfillset.s | asmconv -mi386 ack gnu > ../obj-gnu/./syscall/sigfillset.s.gnu || true
-	gas -o ../obj-gnu/./syscall/sigfillset.o ../obj-gnu/./syscall/sigfillset.s.gnu
-
-../obj-gnu/./syscall/sigismember.o: sigismember.s
-	gcc  -E -x assembler-with-cpp -I. sigismember.s | asmconv -mi386 ack gnu > ../obj-gnu/./syscall/sigismember.s.gnu || true
-	gas -o ../obj-gnu/./syscall/sigismember.o ../obj-gnu/./syscall/sigismember.s.gnu
-
-../obj-gnu/./syscall/sigpending.o: sigpending.s
-	gcc  -E -x assembler-with-cpp -I. sigpending.s | asmconv -mi386 ack gnu > ../obj-gnu/./syscall/sigpending.s.gnu || true
-	gas -o ../obj-gnu/./syscall/sigpending.o ../obj-gnu/./syscall/sigpending.s.gnu
-
-../obj-gnu/./syscall/sigprocmask.o: sigprocmask.s
-	gcc  -E -x assembler-with-cpp -I. sigprocmask.s | asmconv -mi386 ack gnu > ../obj-gnu/./syscall/sigprocmask.s.gnu || true
-	gas -o ../obj-gnu/./syscall/sigprocmask.o ../obj-gnu/./syscall/sigprocmask.s.gnu
-
-../obj-gnu/./syscall/sigreturn.o: sigreturn.s
-	gcc  -E -x assembler-with-cpp -I. sigreturn.s | asmconv -mi386 ack gnu > ../obj-gnu/./syscall/sigreturn.s.gnu || true
-	gas -o ../obj-gnu/./syscall/sigreturn.o ../obj-gnu/./syscall/sigreturn.s.gnu
-
-../obj-gnu/./syscall/sigsuspend.o: sigsuspend.s
-	gcc  -E -x assembler-with-cpp -I. sigsuspend.s | asmconv -mi386 ack gnu > ../obj-gnu/./syscall/sigsuspend.s.gnu || true
-	gas -o ../obj-gnu/./syscall/sigsuspend.o ../obj-gnu/./syscall/sigsuspend.s.gnu
-
-../obj-gnu/./syscall/sleep.o: sleep.s
-	gcc  -E -x assembler-with-cpp -I. sleep.s | asmconv -mi386 ack gnu > ../obj-gnu/./syscall/sleep.s.gnu || true
-	gas -o ../obj-gnu/./syscall/sleep.o ../obj-gnu/./syscall/sleep.s.gnu
-
-../obj-gnu/./syscall/stat.o: stat.s
-	gcc  -E -x assembler-with-cpp -I. stat.s | asmconv -mi386 ack gnu > ../obj-gnu/./syscall/stat.s.gnu || true
-	gas -o ../obj-gnu/./syscall/stat.o ../obj-gnu/./syscall/stat.s.gnu
-
-../obj-gnu/./syscall/stime.o: stime.s
-	gcc  -E -x assembler-with-cpp -I. stime.s | asmconv -mi386 ack gnu > ../obj-gnu/./syscall/stime.s.gnu || true
-	gas -o ../obj-gnu/./syscall/stime.o ../obj-gnu/./syscall/stime.s.gnu
-
-../obj-gnu/./syscall/svrctl.o: svrctl.s
-	gcc  -E -x assembler-with-cpp -I. svrctl.s | asmconv -mi386 ack gnu > ../obj-gnu/./syscall/svrctl.s.gnu || true
-	gas -o ../obj-gnu/./syscall/svrctl.o ../obj-gnu/./syscall/svrctl.s.gnu
-
-../obj-gnu/./syscall/symlink.o: symlink.s
-	gcc  -E -x assembler-with-cpp -I. symlink.s | asmconv -mi386 ack gnu > ../obj-gnu/./syscall/symlink.s.gnu || true
-	gas -o ../obj-gnu/./syscall/symlink.o ../obj-gnu/./syscall/symlink.s.gnu
-
-../obj-gnu/./syscall/sync.o: sync.s
-	gcc  -E -x assembler-with-cpp -I. sync.s | asmconv -mi386 ack gnu > ../obj-gnu/./syscall/sync.s.gnu || true
-	gas -o ../obj-gnu/./syscall/sync.o ../obj-gnu/./syscall/sync.s.gnu
-
-../obj-gnu/./syscall/tcdrain.o: tcdrain.s
-	gcc  -E -x assembler-with-cpp -I. tcdrain.s | asmconv -mi386 ack gnu > ../obj-gnu/./syscall/tcdrain.s.gnu || true
-	gas -o ../obj-gnu/./syscall/tcdrain.o ../obj-gnu/./syscall/tcdrain.s.gnu
-
-../obj-gnu/./syscall/tcflow.o: tcflow.s
-	gcc  -E -x assembler-with-cpp -I. tcflow.s | asmconv -mi386 ack gnu > ../obj-gnu/./syscall/tcflow.s.gnu || true
-	gas -o ../obj-gnu/./syscall/tcflow.o ../obj-gnu/./syscall/tcflow.s.gnu
-
-../obj-gnu/./syscall/tcflush.o: tcflush.s
-	gcc  -E -x assembler-with-cpp -I. tcflush.s | asmconv -mi386 ack gnu > ../obj-gnu/./syscall/tcflush.s.gnu || true
-	gas -o ../obj-gnu/./syscall/tcflush.o ../obj-gnu/./syscall/tcflush.s.gnu
-
-../obj-gnu/./syscall/tcgetattr.o: tcgetattr.s
-	gcc  -E -x assembler-with-cpp -I. tcgetattr.s | asmconv -mi386 ack gnu > ../obj-gnu/./syscall/tcgetattr.s.gnu || true
-	gas -o ../obj-gnu/./syscall/tcgetattr.o ../obj-gnu/./syscall/tcgetattr.s.gnu
-
-../obj-gnu/./syscall/tcsendbreak.o: tcsendbreak.s
-	gcc  -E -x assembler-with-cpp -I. tcsendbreak.s | asmconv -mi386 ack gnu > ../obj-gnu/./syscall/tcsendbreak.s.gnu || true
-	gas -o ../obj-gnu/./syscall/tcsendbreak.o ../obj-gnu/./syscall/tcsendbreak.s.gnu
-
-../obj-gnu/./syscall/tcsetattr.o: tcsetattr.s
-	gcc  -E -x assembler-with-cpp -I. tcsetattr.s | asmconv -mi386 ack gnu > ../obj-gnu/./syscall/tcsetattr.s.gnu || true
-	gas -o ../obj-gnu/./syscall/tcsetattr.o ../obj-gnu/./syscall/tcsetattr.s.gnu
-
-../obj-gnu/./syscall/time.o: time.s
-	gcc  -E -x assembler-with-cpp -I. time.s | asmconv -mi386 ack gnu > ../obj-gnu/./syscall/time.s.gnu || true
-	gas -o ../obj-gnu/./syscall/time.o ../obj-gnu/./syscall/time.s.gnu
-
-../obj-gnu/./syscall/times.o: times.s
-	gcc  -E -x assembler-with-cpp -I. times.s | asmconv -mi386 ack gnu > ../obj-gnu/./syscall/times.s.gnu || true
-	gas -o ../obj-gnu/./syscall/times.o ../obj-gnu/./syscall/times.s.gnu
-
-../obj-gnu/./syscall/truncate.o: truncate.s
-	gcc  -E -x assembler-with-cpp -I. truncate.s | asmconv -mi386 ack gnu > ../obj-gnu/./syscall/truncate.s.gnu || true
-	gas -o ../obj-gnu/./syscall/truncate.o ../obj-gnu/./syscall/truncate.s.gnu
-
-../obj-gnu/./syscall/umask.o: umask.s
-	gcc  -E -x assembler-with-cpp -I. umask.s | asmconv -mi386 ack gnu > ../obj-gnu/./syscall/umask.s.gnu || true
-	gas -o ../obj-gnu/./syscall/umask.o ../obj-gnu/./syscall/umask.s.gnu
-
-../obj-gnu/./syscall/umount.o: umount.s
-	gcc  -E -x assembler-with-cpp -I. umount.s | asmconv -mi386 ack gnu > ../obj-gnu/./syscall/umount.s.gnu || true
-	gas -o ../obj-gnu/./syscall/umount.o ../obj-gnu/./syscall/umount.s.gnu
-
-../obj-gnu/./syscall/uname.o: uname.s
-	gcc  -E -x assembler-with-cpp -I. uname.s | asmconv -mi386 ack gnu > ../obj-gnu/./syscall/uname.s.gnu || true
-	gas -o ../obj-gnu/./syscall/uname.o ../obj-gnu/./syscall/uname.s.gnu
-
-../obj-gnu/./syscall/unlink.o: unlink.s
-	gcc  -E -x assembler-with-cpp -I. unlink.s | asmconv -mi386 ack gnu > ../obj-gnu/./syscall/unlink.s.gnu || true
-	gas -o ../obj-gnu/./syscall/unlink.o ../obj-gnu/./syscall/unlink.s.gnu
-
-../obj-gnu/./syscall/utime.o: utime.s
-	gcc  -E -x assembler-with-cpp -I. utime.s | asmconv -mi386 ack gnu > ../obj-gnu/./syscall/utime.s.gnu || true
-	gas -o ../obj-gnu/./syscall/utime.o ../obj-gnu/./syscall/utime.s.gnu
-
-../obj-gnu/./syscall/wait.o: wait.s
-	gcc  -E -x assembler-with-cpp -I. wait.s | asmconv -mi386 ack gnu > ../obj-gnu/./syscall/wait.s.gnu || true
-	gas -o ../obj-gnu/./syscall/wait.o ../obj-gnu/./syscall/wait.s.gnu
-
-../obj-gnu/./syscall/waitpid.o: waitpid.s
-	gcc  -E -x assembler-with-cpp -I. waitpid.s | asmconv -mi386 ack gnu > ../obj-gnu/./syscall/waitpid.s.gnu || true
-	gas -o ../obj-gnu/./syscall/waitpid.o ../obj-gnu/./syscall/waitpid.s.gnu
-
-../obj-gnu/./syscall/write.o: write.s
-	gcc  -E -x assembler-with-cpp -I. write.s | asmconv -mi386 ack gnu > ../obj-gnu/./syscall/write.s.gnu || true
-	gas -o ../obj-gnu/./syscall/write.o ../obj-gnu/./syscall/write.s.gnu
-
-
-
-
-clean::
-	rm -f ../obj-ack//./syscall/*
-	rm -f ../obj-gnu/./syscall/*
-
-include Makedepend-ack
-include .depend-ack
-
-include Makedepend-gnu
-include .depend-gnu
Index: trunk/minix/lib/syscall/Makefile.in
===================================================================
--- trunk/minix/lib/syscall/Makefile.in	(revision 9)
+++ 	(revision )
@@ -1,115 +1,0 @@
-# Makefile for lib/syscall.
-
-LIBRARIES=libc
-
-libc_FILES=" \
-	_exit.s \
-	_pm_findproc.s \
-	access.s \
-	alarm.s \
-	allocmem.s \
-	brk.s \
-	cfgetispeed.s \
-	cfgetospeed.s \
-	cfsetispeed.s \
-	cfsetospeed.s \
-	chdir.s \
-	chmod.s \
-	chown.s \
-	chroot.s \
-	close.s \
-	closedir.s \
-	creat.s \
-	devctl.s \
-	dup.s \
-	dup2.s \
-	execl.s \
-	execle.s \
-	execlp.s \
-	execv.s \
-	execve.s \
-	execvp.s \
-	fcntl.s \
-	fork.s \
-	fpathconf.s \
-	freemem.s \
-	fstat.s \
-	fstatfs.s \
-	getcwd.s \
-	getegid.s \
-	geteuid.s \
-	getgid.s \
-	getgroups.s \
-	getnpid.s \
-	getnprocnr.s \
-	getpgrp.s \
-	getpid.s \
-	getppid.s \
-	getpprocnr.s \
-	getprocnr.s \
-	getsigset.s \
-	getsysinfo.s \
-	getuid.s \
-	ioctl.s \
-	isatty.s \
-	kill.s \
-	link.s \
-	lseek.s \
-	lstat.s \
-	mkdir.s \
-	mkfifo.s \
-	mknod.s \
-	mount.s \
-	open.s \
-	opendir.s \
-	pathconf.s \
-	pause.s \
-	pipe.s \
-	ptrace.s \
-	read.s \
-	readdir.s \
-	readlink.s \
-	reboot.s \
-	rename.s \
-	rewinddir.s \
-	rmdir.s \
-	sbrk.s \
-	seekdir.s \
-	setgid.s \
-	setsid.s \
-	setuid.s \
-	sigaction.s \
-	sigaddset.s \
-	sigdelset.s \
-	sigemptyset.s \
-	sigfillset.s \
-	sigismember.s \
-	sigpending.s \
-	sigprocmask.s \
-	sigreturn.s \
-	sigsuspend.s \
-	sleep.s \
-	stat.s \
-	stime.s \
-	svrctl.s \
-	symlink.s \
-	sync.s \
-	tcdrain.s \
-	tcflow.s \
-	tcflush.s \
-	tcgetattr.s \
-	tcsendbreak.s \
-	tcsetattr.s \
-	time.s \
-	times.s \
-	truncate.s \
-	umask.s \
-	umount.s \
-	uname.s \
-	unlink.s \
-	utime.s \
-	wait.s \
-	waitpid.s \
-	write.s"
-
-TYPE=both
Index: trunk/minix/lib/syscall/_exit.s
===================================================================
--- trunk/minix/lib/syscall/_exit.s	(revision 9)
+++ 	(revision )
@@ -1,7 +1,0 @@
-.sect .text
-.extern	___exit
-.define	__exit
-.align 2
-
-__exit:
-	jmp	___exit
Index: trunk/minix/lib/syscall/_pm_findproc.s
===================================================================
--- trunk/minix/lib/syscall/_pm_findproc.s	(revision 9)
+++ 	(revision )
@@ -1,7 +1,0 @@
-.sect .text
-.extern	___pm_findproc
-.define	__pm_findproc
-.align 2
-
-__pm_findproc:
-	jmp	___pm_findproc
Index: trunk/minix/lib/syscall/access.s
===================================================================
--- trunk/minix/lib/syscall/access.s	(revision 9)
+++ 	(revision )
@@ -1,7 +1,0 @@
-.sect .text
-.extern	__access
-.define	_access
-.align 2
-
-_access:
-	jmp	__access
Index: trunk/minix/lib/syscall/alarm.s
===================================================================
--- trunk/minix/lib/syscall/alarm.s	(revision 9)
+++ 	(revision )
@@ -1,7 +1,0 @@
-.sect .text
-.extern	__alarm
-.define	_alarm
-.align 2
-
-_alarm:
-	jmp	__alarm
Index: trunk/minix/lib/syscall/allocmem.s
===================================================================
--- trunk/minix/lib/syscall/allocmem.s	(revision 9)
+++ 	(revision )
@@ -1,7 +1,0 @@
-.sect .text
-.extern	__allocmem
-.define	_allocmem
-.align 2
-
-_allocmem:
-	jmp	__allocmem
Index: trunk/minix/lib/syscall/brk.s
===================================================================
--- trunk/minix/lib/syscall/brk.s	(revision 9)
+++ 	(revision )
@@ -1,7 +1,0 @@
-.sect .text
-.extern	__brk
-.define	_brk
-.align 2
-
-_brk:
-	jmp	__brk
Index: trunk/minix/lib/syscall/cfgetispeed.s
===================================================================
--- trunk/minix/lib/syscall/cfgetispeed.s	(revision 9)
+++ 	(revision )
@@ -1,7 +1,0 @@
-.sect .text
-.extern	__cfgetispeed
-.define	_cfgetispeed
-.align 2
-
-_cfgetispeed:
-	jmp	__cfgetispeed
Index: trunk/minix/lib/syscall/cfgetospeed.s
===================================================================
--- trunk/minix/lib/syscall/cfgetospeed.s	(revision 9)
+++ 	(revision )
@@ -1,7 +1,0 @@
-.sect .text
-.extern	__cfgetospeed
-.define	_cfgetospeed
-.align 2
-
-_cfgetospeed:
-	jmp	__cfgetospeed
Index: trunk/minix/lib/syscall/cfsetispeed.s
===================================================================
--- trunk/minix/lib/syscall/cfsetispeed.s	(revision 9)
+++ 	(revision )
@@ -1,7 +1,0 @@
-.sect .text
-.extern	__cfsetispeed
-.define	_cfsetispeed
-.align 2
-
-_cfsetispeed:
-	jmp	__cfsetispeed
Index: trunk/minix/lib/syscall/cfsetospeed.s
===================================================================
--- trunk/minix/lib/syscall/cfsetospeed.s	(revision 9)
+++ 	(revision )
@@ -1,7 +1,0 @@
-.sect .text
-.extern	__cfsetospeed
-.define	_cfsetospeed
-.align 2
-
-_cfsetospeed:
-	jmp	__cfsetospeed
Index: trunk/minix/lib/syscall/chdir.s
===================================================================
--- trunk/minix/lib/syscall/chdir.s	(revision 9)
+++ 	(revision )
@@ -1,11 +1,0 @@
-.sect .text
-.extern	__chdir
-.define	_chdir
-.extern	__fchdir
-.define	_fchdir
-.align 2
-
-_chdir:
-	jmp	__chdir
-_fchdir:
-	jmp	__fchdir
Index: trunk/minix/lib/syscall/chmod.s
===================================================================
--- trunk/minix/lib/syscall/chmod.s	(revision 9)
+++ 	(revision )
@@ -1,7 +1,0 @@
-.sect .text
-.extern	__chmod
-.define	_chmod
-.align 2
-
-_chmod:
-	jmp	__chmod
Index: trunk/minix/lib/syscall/chown.s
===================================================================
--- trunk/minix/lib/syscall/chown.s	(revision 9)
+++ 	(revision )
@@ -1,7 +1,0 @@
-.sect .text
-.extern	__chown
-.define	_chown
-.align 2
-
-_chown:
-	jmp	__chown
Index: trunk/minix/lib/syscall/chroot.s
===================================================================
--- trunk/minix/lib/syscall/chroot.s	(revision 9)
+++ 	(revision )
@@ -1,7 +1,0 @@
-.sect .text
-.extern	__chroot
-.define	_chroot
-.align 2
-
-_chroot:
-	jmp	__chroot
Index: trunk/minix/lib/syscall/close.s
===================================================================
--- trunk/minix/lib/syscall/close.s	(revision 9)
+++ 	(revision )
@@ -1,7 +1,0 @@
-.sect .text
-.extern	__close
-.define	_close
-.align 2
-
-_close:
-	jmp	__close
Index: trunk/minix/lib/syscall/closedir.s
===================================================================
--- trunk/minix/lib/syscall/closedir.s	(revision 9)
+++ 	(revision )
@@ -1,7 +1,0 @@
-.sect .text
-.extern	__closedir
-.define	_closedir
-.align 2
-
-_closedir:
-	jmp	__closedir
Index: trunk/minix/lib/syscall/creat.s
===================================================================
--- trunk/minix/lib/syscall/creat.s	(revision 9)
+++ 	(revision )
@@ -1,7 +1,0 @@
-.sect .text
-.extern	__creat
-.define	_creat
-.align 2
-
-_creat:
-	jmp	__creat
Index: trunk/minix/lib/syscall/devctl.s
===================================================================
--- trunk/minix/lib/syscall/devctl.s	(revision 9)
+++ 	(revision )
@@ -1,7 +1,0 @@
-.sect .text
-.extern	__devctl
-.define	_devctl
-.align 2
-
-_devctl:
-	jmp	__devctl
Index: trunk/minix/lib/syscall/dup.s
===================================================================
--- trunk/minix/lib/syscall/dup.s	(revision 9)
+++ 	(revision )
@@ -1,7 +1,0 @@
-.sect .text
-.extern	__dup
-.define	_dup
-.align 2
-
-_dup:
-	jmp	__dup
Index: trunk/minix/lib/syscall/dup2.s
===================================================================
--- trunk/minix/lib/syscall/dup2.s	(revision 9)
+++ 	(revision )
@@ -1,7 +1,0 @@
-.sect .text
-.extern	__dup2
-.define	_dup2
-.align 2
-
-_dup2:
-	jmp	__dup2
Index: trunk/minix/lib/syscall/execl.s
===================================================================
--- trunk/minix/lib/syscall/execl.s	(revision 9)
+++ 	(revision )
@@ -1,7 +1,0 @@
-.sect .text
-.extern	__execl
-.define	_execl
-.align 2
-
-_execl:
-	jmp	__execl
Index: trunk/minix/lib/syscall/execle.s
===================================================================
--- trunk/minix/lib/syscall/execle.s	(revision 9)
+++ 	(revision )
@@ -1,7 +1,0 @@
-.sect .text
-.extern	__execle
-.define	_execle
-.align 2
-
-_execle:
-	jmp	__execle
Index: trunk/minix/lib/syscall/execlp.s
===================================================================
--- trunk/minix/lib/syscall/execlp.s	(revision 9)
+++ 	(revision )
@@ -1,7 +1,0 @@
-.sect .text
-.extern	__execlp
-.define	_execlp
-.align 2
-
-_execlp:
-	jmp	__execlp
Index: trunk/minix/lib/syscall/execv.s
===================================================================
--- trunk/minix/lib/syscall/execv.s	(revision 9)
+++ 	(revision )
@@ -1,7 +1,0 @@
-.sect .text
-.extern	__execv
-.define	_execv
-.align 2
-
-_execv:
-	jmp	__execv
Index: trunk/minix/lib/syscall/execve.s
===================================================================
--- trunk/minix/lib/syscall/execve.s	(revision 9)
+++ 	(revision )
@@ -1,7 +1,0 @@
-.sect .text
-.extern	__execve
-.define	_execve
-.align 2
-
-_execve:
-	jmp	__execve
Index: trunk/minix/lib/syscall/execvp.s
===================================================================
--- trunk/minix/lib/syscall/execvp.s	(revision 9)
+++ 	(revision )
@@ -1,7 +1,0 @@
-.sect .text
-.extern	__execvp
-.define	_execvp
-.align 2
-
-_execvp:
-	jmp	__execvp
Index: trunk/minix/lib/syscall/fcntl.s
===================================================================
--- trunk/minix/lib/syscall/fcntl.s	(revision 9)
+++ 	(revision )
@@ -1,7 +1,0 @@
-.sect .text
-.extern	__fcntl
-.define	_fcntl
-.align 2
-
-_fcntl:
-	jmp	__fcntl
Index: trunk/minix/lib/syscall/fork.s
===================================================================
--- trunk/minix/lib/syscall/fork.s	(revision 9)
+++ 	(revision )
@@ -1,7 +1,0 @@
-.sect .text
-.extern	__fork
-.define	_fork
-.align 2
-
-_fork:
-	jmp	__fork
Index: trunk/minix/lib/syscall/fpathconf.s
===================================================================
--- trunk/minix/lib/syscall/fpathconf.s	(revision 9)
+++ 	(revision )
@@ -1,7 +1,0 @@
-.sect .text
-.extern	__fpathconf
-.define	_fpathconf
-.align 2
-
-_fpathconf:
-	jmp	__fpathconf
Index: trunk/minix/lib/syscall/freemem.s
===================================================================
--- trunk/minix/lib/syscall/freemem.s	(revision 9)
+++ 	(revision )
@@ -1,7 +1,0 @@
-.sect .text
-.extern	__freemem
-.define	_freemem
-.align 2
-
-_freemem:
-	jmp	__freemem
Index: trunk/minix/lib/syscall/fstat.s
===================================================================
--- trunk/minix/lib/syscall/fstat.s	(revision 9)
+++ 	(revision )
@@ -1,7 +1,0 @@
-.sect .text
-.extern	__fstat
-.define	_fstat
-.align 2
-
-_fstat:
-	jmp	__fstat
Index: trunk/minix/lib/syscall/fstatfs.s
===================================================================
--- trunk/minix/lib/syscall/fstatfs.s	(revision 9)
+++ 	(revision )
@@ -1,7 +1,0 @@
-.sect .text
-.extern	__fstatfs
-.define	_fstatfs
-.align 2
-
-_fstatfs:
-	jmp	__fstatfs
Index: trunk/minix/lib/syscall/getcwd.s
===================================================================
--- trunk/minix/lib/syscall/getcwd.s	(revision 9)
+++ 	(revision )
@@ -1,7 +1,0 @@
-.sect .text
-.extern	__getcwd
-.define	_getcwd
-.align 2
-
-_getcwd:
-	jmp	__getcwd
Index: trunk/minix/lib/syscall/getegid.s
===================================================================
--- trunk/minix/lib/syscall/getegid.s	(revision 9)
+++ 	(revision )
@@ -1,7 +1,0 @@
-.sect .text
-.extern	__getegid
-.define	_getegid
-.align 2
-
-_getegid:
-	jmp	__getegid
Index: trunk/minix/lib/syscall/geteuid.s
===================================================================
--- trunk/minix/lib/syscall/geteuid.s	(revision 9)
+++ 	(revision )
@@ -1,7 +1,0 @@
-.sect .text
-.extern	__geteuid
-.define	_geteuid
-.align 2
-
-_geteuid:
-	jmp	__geteuid
Index: trunk/minix/lib/syscall/getgid.s
===================================================================
--- trunk/minix/lib/syscall/getgid.s	(revision 9)
+++ 	(revision )
@@ -1,7 +1,0 @@
-.sect .text
-.extern	__getgid
-.define	_getgid
-.align 2
-
-_getgid:
-	jmp	__getgid
Index: trunk/minix/lib/syscall/getgroups.s
===================================================================
--- trunk/minix/lib/syscall/getgroups.s	(revision 9)
+++ 	(revision )
@@ -1,7 +1,0 @@
-.sect .text
-.extern	__getgroups
-.define	_getgroups
-.align 2
-
-_getgroups:
-	jmp	__getgroups
Index: trunk/minix/lib/syscall/getnpid.s
===================================================================
--- trunk/minix/lib/syscall/getnpid.s	(revision 9)
+++ 	(revision )
@@ -1,7 +1,0 @@
-.sect .text
-.extern	__getnpid
-.define	_getnpid
-.align 2
-
-_getnpid:
-	jmp	__getnpid
Index: trunk/minix/lib/syscall/getnprocnr.s
===================================================================
--- trunk/minix/lib/syscall/getnprocnr.s	(revision 9)
+++ 	(revision )
@@ -1,7 +1,0 @@
-.sect .text
-.extern	__getnprocnr
-.define	_getnprocnr
-.align 2
-
-_getnprocnr:
-	jmp	__getnprocnr
Index: trunk/minix/lib/syscall/getpgrp.s
===================================================================
--- trunk/minix/lib/syscall/getpgrp.s	(revision 9)
+++ 	(revision )
@@ -1,7 +1,0 @@
-.sect .text
-.extern	__getpgrp
-.define	_getpgrp
-.align 2
-
-_getpgrp:
-	jmp	__getpgrp
Index: trunk/minix/lib/syscall/getpid.s
===================================================================
--- trunk/minix/lib/syscall/getpid.s	(revision 9)
+++ 	(revision )
@@ -1,7 +1,0 @@
-.sect .text
-.extern	__getpid
-.define	_getpid
-.align 2
-
-_getpid:
-	jmp	__getpid
Index: trunk/minix/lib/syscall/getppid.s
===================================================================
--- trunk/minix/lib/syscall/getppid.s	(revision 9)
+++ 	(revision )
@@ -1,7 +1,0 @@
-.sect .text
-.extern	__getppid
-.define	_getppid
-.align 2
-
-_getppid:
-	jmp	__getppid
Index: trunk/minix/lib/syscall/getpprocnr.s
===================================================================
--- trunk/minix/lib/syscall/getpprocnr.s	(revision 9)
+++ 	(revision )
@@ -1,7 +1,0 @@
-.sect .text
-.extern	__getpprocnr
-.define	_getpprocnr
-.align 2
-
-_getpprocnr:
-	jmp	__getpprocnr
Index: trunk/minix/lib/syscall/getprocnr.s
===================================================================
--- trunk/minix/lib/syscall/getprocnr.s	(revision 9)
+++ 	(revision )
@@ -1,7 +1,0 @@
-.sect .text
-.extern	__getprocnr
-.define	_getprocnr
-.align 2
-
-_getprocnr:
-	jmp	__getprocnr
Index: trunk/minix/lib/syscall/getsigset.s
===================================================================
--- trunk/minix/lib/syscall/getsigset.s	(revision 9)
+++ 	(revision )
@@ -1,7 +1,0 @@
-.sect .text
-.extern	__getsigset
-.define	_getsigset
-.align 2
-
-_getsigset:
-	jmp	__getsigset
Index: trunk/minix/lib/syscall/getsysinfo.s
===================================================================
--- trunk/minix/lib/syscall/getsysinfo.s	(revision 9)
+++ 	(revision )
@@ -1,7 +1,0 @@
-.sect .text
-.extern	__getsysinfo
-.define	_getsysinfo
-.align 2
-
-_getsysinfo:
-	jmp	__getsysinfo
Index: trunk/minix/lib/syscall/getuid.s
===================================================================
--- trunk/minix/lib/syscall/getuid.s	(revision 9)
+++ 	(revision )
@@ -1,7 +1,0 @@
-.sect .text
-.extern	__getuid
-.define	_getuid
-.align 2
-
-_getuid:
-	jmp	__getuid
Index: trunk/minix/lib/syscall/ioctl.s
===================================================================
--- trunk/minix/lib/syscall/ioctl.s	(revision 9)
+++ 	(revision )
@@ -1,7 +1,0 @@
-.sect .text
-.extern	__ioctl
-.define	_ioctl
-.align 2
-
-_ioctl:
-	jmp	__ioctl
Index: trunk/minix/lib/syscall/isatty.s
===================================================================
--- trunk/minix/lib/syscall/isatty.s	(revision 9)
+++ 	(revision )
@@ -1,7 +1,0 @@
-.sect .text
-.extern	__isatty
-.define	_isatty
-.align 2
-
-_isatty:
-	jmp	__isatty
Index: trunk/minix/lib/syscall/kill.s
===================================================================
--- trunk/minix/lib/syscall/kill.s	(revision 9)
+++ 	(revision )
@@ -1,7 +1,0 @@
-.sect .text
-.extern	__kill
-.define	_kill
-.align 2
-
-_kill:
-	jmp	__kill
Index: trunk/minix/lib/syscall/link.s
===================================================================
--- trunk/minix/lib/syscall/link.s	(revision 9)
+++ 	(revision )
@@ -1,7 +1,0 @@
-.sect .text
-.extern	__link
-.define	_link
-.align 2
-
-_link:
-	jmp	__link
Index: trunk/minix/lib/syscall/lseek.s
===================================================================
--- trunk/minix/lib/syscall/lseek.s	(revision 9)
+++ 	(revision )
@@ -1,7 +1,0 @@
-.sect .text
-.extern	__lseek
-.define	_lseek
-.align 2
-
-_lseek:
-	jmp	__lseek
Index: trunk/minix/lib/syscall/lstat.s
===================================================================
--- trunk/minix/lib/syscall/lstat.s	(revision 9)
+++ 	(revision )
@@ -1,7 +1,0 @@
-.sect .text
-.extern	__lstat
-.define	_lstat
-.align 2
-
-_lstat:
-	jmp	__lstat
Index: trunk/minix/lib/syscall/mkdir.s
===================================================================
--- trunk/minix/lib/syscall/mkdir.s	(revision 9)
+++ 	(revision )
@@ -1,7 +1,0 @@
-.sect .text
-.extern	__mkdir
-.define	_mkdir
-.align 2
-
-_mkdir:
-	jmp	__mkdir
Index: trunk/minix/lib/syscall/mkfifo.s
===================================================================
--- trunk/minix/lib/syscall/mkfifo.s	(revision 9)
+++ 	(revision )
@@ -1,7 +1,0 @@
-.sect .text
-.extern	__mkfifo
-.define	_mkfifo
-.align 2
-
-_mkfifo:
-	jmp	__mkfifo
Index: trunk/minix/lib/syscall/mknod.s
===================================================================
--- trunk/minix/lib/syscall/mknod.s	(revision 9)
+++ 	(revision )
@@ -1,7 +1,0 @@
-.sect .text
-.extern	__mknod
-.define	_mknod
-.align 2
-
-_mknod:
-	jmp	__mknod
Index: trunk/minix/lib/syscall/mount.s
===================================================================
--- trunk/minix/lib/syscall/mount.s	(revision 9)
+++ 	(revision )
@@ -1,7 +1,0 @@
-.sect .text
-.extern	__mount
-.define	_mount
-.align 2
-
-_mount:
-	jmp	__mount
Index: trunk/minix/lib/syscall/open.s
===================================================================
--- trunk/minix/lib/syscall/open.s	(revision 9)
+++ 	(revision )
@@ -1,7 +1,0 @@
-.sect .text
-.extern	__open
-.define	_open
-.align 2
-
-_open:
-	jmp	__open
Index: trunk/minix/lib/syscall/opendir.s
===================================================================
--- trunk/minix/lib/syscall/opendir.s	(revision 9)
+++ 	(revision )
@@ -1,7 +1,0 @@
-.sect .text
-.extern	__opendir
-.define	_opendir
-.align 2
-
-_opendir:
-	jmp	__opendir
Index: trunk/minix/lib/syscall/pathconf.s
===================================================================
--- trunk/minix/lib/syscall/pathconf.s	(revision 9)
+++ 	(revision )
@@ -1,7 +1,0 @@
-.sect .text
-.extern	__pathconf
-.define	_pathconf
-.align 2
-
-_pathconf:
-	jmp	__pathconf
Index: trunk/minix/lib/syscall/pause.s
===================================================================
--- trunk/minix/lib/syscall/pause.s	(revision 9)
+++ 	(revision )
@@ -1,7 +1,0 @@
-.sect .text
-.extern	__pause
-.define	_pause
-.align 2
-
-_pause:
-	jmp	__pause
Index: trunk/minix/lib/syscall/pipe.s
===================================================================
--- trunk/minix/lib/syscall/pipe.s	(revision 9)
+++ 	(revision )
@@ -1,7 +1,0 @@
-.sect .text
-.extern	__pipe
-.define	_pipe
-.align 2
-
-_pipe:
-	jmp	__pipe
Index: trunk/minix/lib/syscall/ptrace.s
===================================================================
--- trunk/minix/lib/syscall/ptrace.s	(revision 9)
+++ 	(revision )
@@ -1,7 +1,0 @@
-.sect .text
-.extern	__ptrace
-.define	_ptrace
-.align 2
-
-_ptrace:
-	jmp	__ptrace
Index: trunk/minix/lib/syscall/read.s
===================================================================
--- trunk/minix/lib/syscall/read.s	(revision 9)
+++ 	(revision )
@@ -1,7 +1,0 @@
-.sect .text
-.extern	__read
-.define	_read
-.align 2
-
-_read:
-	jmp	__read
Index: trunk/minix/lib/syscall/readdir.s
===================================================================
--- trunk/minix/lib/syscall/readdir.s	(revision 9)
+++ 	(revision )
@@ -1,7 +1,0 @@
-.sect .text
-.extern	__readdir
-.define	_readdir
-.align 2
-
-_readdir:
-	jmp	__readdir
Index: trunk/minix/lib/syscall/readlink.s
===================================================================
--- trunk/minix/lib/syscall/readlink.s	(revision 9)
+++ 	(revision )
@@ -1,7 +1,0 @@
-.sect .text
-.extern	__readlink
-.define	_readlink
-.align 2
-
-_readlink:
-	jmp	__readlink
Index: trunk/minix/lib/syscall/reboot.s
===================================================================
--- trunk/minix/lib/syscall/reboot.s	(revision 9)
+++ 	(revision )
@@ -1,7 +1,0 @@
-.sect .text
-.extern	__reboot
-.define	_reboot
-.align 2
-
-_reboot:
-	jmp	__reboot
Index: trunk/minix/lib/syscall/rename.s
===================================================================
--- trunk/minix/lib/syscall/rename.s	(revision 9)
+++ 	(revision )
@@ -1,7 +1,0 @@
-.sect .text
-.extern	__rename
-.define	_rename
-.align 2
-
-_rename:
-	jmp	__rename
Index: trunk/minix/lib/syscall/rewinddir.s
===================================================================
--- trunk/minix/lib/syscall/rewinddir.s	(revision 9)
+++ 	(revision )
@@ -1,7 +1,0 @@
-.sect .text
-.extern	__rewinddir
-.define	_rewinddir
-.align 2
-
-_rewinddir:
-	jmp	__rewinddir
Index: trunk/minix/lib/syscall/rmdir.s
===================================================================
--- trunk/minix/lib/syscall/rmdir.s	(revision 9)
+++ 	(revision )
@@ -1,7 +1,0 @@
-.sect .text
-.extern	__rmdir
-.define	_rmdir
-.align 2
-
-_rmdir:
-	jmp	__rmdir
Index: trunk/minix/lib/syscall/sbrk.s
===================================================================
--- trunk/minix/lib/syscall/sbrk.s	(revision 9)
+++ 	(revision )
@@ -1,7 +1,0 @@
-.sect .text
-.extern	__sbrk
-.define	_sbrk
-.align 2
-
-_sbrk:
-	jmp	__sbrk
Index: trunk/minix/lib/syscall/seekdir.s
===================================================================
--- trunk/minix/lib/syscall/seekdir.s	(revision 9)
+++ 	(revision )
@@ -1,7 +1,0 @@
-.sect .text
-.extern	__seekdir
-.define	_seekdir
-.align 2
-
-_seekdir:
-	jmp	__seekdir
Index: trunk/minix/lib/syscall/setgid.s
===================================================================
--- trunk/minix/lib/syscall/setgid.s	(revision 9)
+++ 	(revision )
@@ -1,11 +1,0 @@
-.sect .text
-.extern	__setgid
-.define	_setgid
-.define	_setegid
-.align 2
-
-_setgid:
-	jmp	__setgid
-
-_setegid:
-	jmp	__setegid
Index: trunk/minix/lib/syscall/setsid.s
===================================================================
--- trunk/minix/lib/syscall/setsid.s	(revision 9)
+++ 	(revision )
@@ -1,7 +1,0 @@
-.sect .text
-.extern	__setsid
-.define	_setsid
-.align 2
-
-_setsid:
-	jmp	__setsid
Index: trunk/minix/lib/syscall/setuid.s
===================================================================
--- trunk/minix/lib/syscall/setuid.s	(revision 9)
+++ 	(revision )
@@ -1,11 +1,0 @@
-.sect .text
-.extern	__setuid
-.define	_setuid
-.define	_seteuid
-.align 2
-
-_setuid:
-	jmp	__setuid
-
-_seteuid:
-	jmp	__seteuid
Index: trunk/minix/lib/syscall/sigaction.s
===================================================================
--- trunk/minix/lib/syscall/sigaction.s	(revision 9)
+++ 	(revision )
@@ -1,7 +1,0 @@
-.sect .text
-.extern	__sigaction
-.define	_sigaction
-.align 2
-
-_sigaction:
-	jmp	__sigaction
Index: trunk/minix/lib/syscall/sigaddset.s
===================================================================
--- trunk/minix/lib/syscall/sigaddset.s	(revision 9)
+++ 	(revision )
@@ -1,7 +1,0 @@
-.sect .text
-.extern	__sigaddset
-.define	_sigaddset
-.align 2
-
-_sigaddset:
-	jmp	__sigaddset
Index: trunk/minix/lib/syscall/sigdelset.s
===================================================================
--- trunk/minix/lib/syscall/sigdelset.s	(revision 9)
+++ 	(revision )
@@ -1,7 +1,0 @@
-.sect .text
-.extern	__sigdelset
-.define	_sigdelset
-.align 2
-
-_sigdelset:
-	jmp	__sigdelset
Index: trunk/minix/lib/syscall/sigemptyset.s
===================================================================
--- trunk/minix/lib/syscall/sigemptyset.s	(revision 9)
+++ 	(revision )
@@ -1,7 +1,0 @@
-.sect .text
-.extern	__sigemptyset
-.define	_sigemptyset
-.align 2
-
-_sigemptyset:
-	jmp	__sigemptyset
Index: trunk/minix/lib/syscall/sigfillset.s
===================================================================
--- trunk/minix/lib/syscall/sigfillset.s	(revision 9)
+++ 	(revision )
@@ -1,7 +1,0 @@
-.sect .text
-.extern	__sigfillset
-.define	_sigfillset
-.align 2
-
-_sigfillset:
-	jmp	__sigfillset
Index: trunk/minix/lib/syscall/sigismember.s
===================================================================
--- trunk/minix/lib/syscall/sigismember.s	(revision 9)
+++ 	(revision )
@@ -1,7 +1,0 @@
-.sect .text
-.extern	__sigismember
-.define	_sigismember
-.align 2
-
-_sigismember:
-	jmp	__sigismember
Index: trunk/minix/lib/syscall/sigpending.s
===================================================================
--- trunk/minix/lib/syscall/sigpending.s	(revision 9)
+++ 	(revision )
@@ -1,7 +1,0 @@
-.sect .text
-.extern	__sigpending
-.define	_sigpending
-.align 2
-
-_sigpending:
-	jmp	__sigpending
Index: trunk/minix/lib/syscall/sigprocmask.s
===================================================================
--- trunk/minix/lib/syscall/sigprocmask.s	(revision 9)
+++ 	(revision )
@@ -1,7 +1,0 @@
-.sect .text
-.extern	__sigprocmask
-.define	_sigprocmask
-.align 2
-
-_sigprocmask:
-	jmp	__sigprocmask
Index: trunk/minix/lib/syscall/sigreturn.s
===================================================================
--- trunk/minix/lib/syscall/sigreturn.s	(revision 9)
+++ 	(revision )
@@ -1,7 +1,0 @@
-.sect .text
-.extern	__sigreturn
-.define	_sigreturn
-.align 2
-
-_sigreturn:
-	jmp	__sigreturn
Index: trunk/minix/lib/syscall/sigsuspend.s
===================================================================
--- trunk/minix/lib/syscall/sigsuspend.s	(revision 9)
+++ 	(revision )
@@ -1,7 +1,0 @@
-.sect .text
-.extern	__sigsuspend
-.define	_sigsuspend
-.align 2
-
-_sigsuspend:
-	jmp	__sigsuspend
Index: trunk/minix/lib/syscall/sleep.s
===================================================================
--- trunk/minix/lib/syscall/sleep.s	(revision 9)
+++ 	(revision )
@@ -1,7 +1,0 @@
-.sect .text
-.extern	__sleep
-.define	_sleep
-.align 2
-
-_sleep:
-	jmp	__sleep
Index: trunk/minix/lib/syscall/stat.s
===================================================================
--- trunk/minix/lib/syscall/stat.s	(revision 9)
+++ 	(revision )
@@ -1,7 +1,0 @@
-.sect .text
-.extern	__stat
-.define	_stat
-.align 2
-
-_stat:
-	jmp	__stat
Index: trunk/minix/lib/syscall/stime.s
===================================================================
--- trunk/minix/lib/syscall/stime.s	(revision 9)
+++ 	(revision )
@@ -1,7 +1,0 @@
-.sect .text
-.extern	__stime
-.define	_stime
-.align 2
-
-_stime:
-	jmp	__stime
Index: trunk/minix/lib/syscall/svrctl.s
===================================================================
--- trunk/minix/lib/syscall/svrctl.s	(revision 9)
+++ 	(revision )
@@ -1,7 +1,0 @@
-.sect .text
-.extern	__svrctl
-.define	_svrctl
-.align 2
-
-_svrctl:
-	jmp	__svrctl
Index: trunk/minix/lib/syscall/symlink.s
===================================================================
--- trunk/minix/lib/syscall/symlink.s	(revision 9)
+++ 	(revision )
@@ -1,7 +1,0 @@
-.sect .text
-.extern	__symlink
-.define	_symlink
-.align 2
-
-_symlink:
-	jmp	__symlink
Index: trunk/minix/lib/syscall/sync.s
===================================================================
--- trunk/minix/lib/syscall/sync.s	(revision 9)
+++ 	(revision )
@@ -1,7 +1,0 @@
-.sect .text
-.extern	__sync
-.define	_sync
-.align 2
-
-_sync:
-	jmp	__sync
Index: trunk/minix/lib/syscall/tcdrain.s
===================================================================
--- trunk/minix/lib/syscall/tcdrain.s	(revision 9)
+++ 	(revision )
@@ -1,7 +1,0 @@
-.sect .text
-.extern	__tcdrain
-.define	_tcdrain
-.align 2
-
-_tcdrain:
-	jmp	__tcdrain
Index: trunk/minix/lib/syscall/tcflow.s
===================================================================
--- trunk/minix/lib/syscall/tcflow.s	(revision 9)
+++ 	(revision )
@@ -1,7 +1,0 @@
-.sect .text
-.extern	__tcflow
-.define	_tcflow
-.align 2
-
-_tcflow:
-	jmp	__tcflow
Index: trunk/minix/lib/syscall/tcflush.s
===================================================================
--- trunk/minix/lib/syscall/tcflush.s	(revision 9)
+++ 	(revision )
@@ -1,7 +1,0 @@
-.sect .text
-.extern	__tcflush
-.define	_tcflush
-.align 2
-
-_tcflush:
-	jmp	__tcflush
Index: trunk/minix/lib/syscall/tcgetattr.s
===================================================================
--- trunk/minix/lib/syscall/tcgetattr.s	(revision 9)
+++ 	(revision )
@@ -1,7 +1,0 @@
-.sect .text
-.extern	__tcgetattr
-.define	_tcgetattr
-.align 2
-
-_tcgetattr:
-	jmp	__tcgetattr
Index: trunk/minix/lib/syscall/tcsendbreak.s
===================================================================
--- trunk/minix/lib/syscall/tcsendbreak.s	(revision 9)
+++ 	(revision )
@@ -1,7 +1,0 @@
-.sect .text
-.extern	__tcsendbreak
-.define	_tcsendbreak
-.align 2
-
-_tcsendbreak:
-	jmp	__tcsendbreak
Index: trunk/minix/lib/syscall/tcsetattr.s
===================================================================
--- trunk/minix/lib/syscall/tcsetattr.s	(revision 9)
+++ 	(revision )
@@ -1,7 +1,0 @@
-.sect .text
-.extern	__tcsetattr
-.define	_tcsetattr
-.align 2
-
-_tcsetattr:
-	jmp	__tcsetattr
Index: trunk/minix/lib/syscall/time.s
===================================================================
--- trunk/minix/lib/syscall/time.s	(revision 9)
+++ 	(revision )
@@ -1,7 +1,0 @@
-.sect .text
-.extern	__time
-.define	_time
-.align 2
-
-_time:
-	jmp	__time
Index: trunk/minix/lib/syscall/times.s
===================================================================
--- trunk/minix/lib/syscall/times.s	(revision 9)
+++ 	(revision )
@@ -1,7 +1,0 @@
-.sect .text
-.extern	__times
-.define	_times
-.align 2
-
-_times:
-	jmp	__times
Index: trunk/minix/lib/syscall/truncate.s
===================================================================
--- trunk/minix/lib/syscall/truncate.s	(revision 9)
+++ 	(revision )
@@ -1,13 +1,0 @@
-.sect .text
-.extern	__truncate
-.extern	__ftruncate
-.define	_truncate
-.define	_ftruncate
-.align 2
-
-_truncate:
-	jmp	__truncate
-
-.align 2
-_ftruncate:
-	jmp	__ftruncate
Index: trunk/minix/lib/syscall/umask.s
===================================================================
--- trunk/minix/lib/syscall/umask.s	(revision 9)
+++ 	(revision )
@@ -1,7 +1,0 @@
-.sect .text
-.extern	__umask
-.define	_umask
-.align 2
-
-_umask:
-	jmp	__umask
Index: trunk/minix/lib/syscall/umount.s
===================================================================
--- trunk/minix/lib/syscall/umount.s	(revision 9)
+++ 	(revision )
@@ -1,7 +1,0 @@
-.sect .text
-.extern	__umount
-.define	_umount
-.align 2
-
-_umount:
-	jmp	__umount
Index: trunk/minix/lib/syscall/uname.s
===================================================================
--- trunk/minix/lib/syscall/uname.s	(revision 9)
+++ 	(revision )
@@ -1,7 +1,0 @@
-.sect .text
-.extern	__uname
-.define	_uname
-.align 2
-
-_uname:
-	jmp	__uname
Index: trunk/minix/lib/syscall/unlink.s
===================================================================
--- trunk/minix/lib/syscall/unlink.s	(revision 9)
+++ 	(revision )
@@ -1,7 +1,0 @@
-.sect .text
-.extern	__unlink
-.define	_unlink
-.align 2
-
-_unlink:
-	jmp	__unlink
Index: trunk/minix/lib/syscall/utime.s
===================================================================
--- trunk/minix/lib/syscall/utime.s	(revision 9)
+++ 	(revision )
@@ -1,7 +1,0 @@
-.sect .text
-.extern	__utime
-.define	_utime
-.align 2
-
-_utime:
-	jmp	__utime
Index: trunk/minix/lib/syscall/wait.s
===================================================================
--- trunk/minix/lib/syscall/wait.s	(revision 9)
+++ 	(revision )
@@ -1,7 +1,0 @@
-.sect .text
-.extern	__wait
-.define	_wait
-.align 2
-
-_wait:
-	jmp	__wait
Index: trunk/minix/lib/syscall/waitpid.s
===================================================================
--- trunk/minix/lib/syscall/waitpid.s	(revision 9)
+++ 	(revision )
@@ -1,7 +1,0 @@
-.sect .text
-.extern	__waitpid
-.define	_waitpid
-.align 2
-
-_waitpid:
-	jmp	__waitpid
Index: trunk/minix/lib/syscall/write.s
===================================================================
--- trunk/minix/lib/syscall/write.s	(revision 9)
+++ 	(revision )
@@ -1,7 +1,0 @@
-.sect .text
-.extern	__write
-.define	_write
-.align 2
-
-_write:
-	jmp	__write
Index: trunk/minix/lib/syslib/Makedepend-ack
===================================================================
--- trunk/minix/lib/syslib/Makedepend-ack	(revision 9)
+++ 	(revision )
@@ -1,57 +1,0 @@
-depend-ack:
-	rm .depend-ack
-	touch .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -E' assert.c | sed -e 's:^\(.\):../obj-ack//./syslib/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -E' panic.c | sed -e 's:^\(.\):../obj-ack//./syslib/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -E' pci_attr_r16.c | sed -e 's:^\(.\):../obj-ack//./syslib/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -E' pci_attr_r32.c | sed -e 's:^\(.\):../obj-ack//./syslib/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -E' pci_attr_r8.c | sed -e 's:^\(.\):../obj-ack//./syslib/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -E' pci_attr_w16.c | sed -e 's:^\(.\):../obj-ack//./syslib/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -E' pci_attr_w32.c | sed -e 's:^\(.\):../obj-ack//./syslib/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -E' pci_attr_w8.c | sed -e 's:^\(.\):../obj-ack//./syslib/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -E' pci_dev_name.c | sed -e 's:^\(.\):../obj-ack//./syslib/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -E' pci_find_dev.c | sed -e 's:^\(.\):../obj-ack//./syslib/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -E' pci_first_dev.c | sed -e 's:^\(.\):../obj-ack//./syslib/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -E' pci_ids.c | sed -e 's:^\(.\):../obj-ack//./syslib/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -E' pci_init.c | sed -e 's:^\(.\):../obj-ack//./syslib/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -E' pci_init1.c | sed -e 's:^\(.\):../obj-ack//./syslib/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -E' pci_next_dev.c | sed -e 's:^\(.\):../obj-ack//./syslib/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -E' pci_rescan_bus.c | sed -e 's:^\(.\):../obj-ack//./syslib/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -E' pci_reserve.c | sed -e 's:^\(.\):../obj-ack//./syslib/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -E' pci_slot_name.c | sed -e 's:^\(.\):../obj-ack//./syslib/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -E' sys_abort.c | sed -e 's:^\(.\):../obj-ack//./syslib/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -E' sys_endsig.c | sed -e 's:^\(.\):../obj-ack//./syslib/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -E' sys_eniop.c | sed -e 's:^\(.\):../obj-ack//./syslib/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -E' sys_exec.c | sed -e 's:^\(.\):../obj-ack//./syslib/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -E' sys_exit.c | sed -e 's:^\(.\):../obj-ack//./syslib/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -E' sys_fork.c | sed -e 's:^\(.\):../obj-ack//./syslib/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -E' sys_getinfo.c | sed -e 's:^\(.\):../obj-ack//./syslib/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -E' sys_getsig.c | sed -e 's:^\(.\):../obj-ack//./syslib/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -E' sys_in.c | sed -e 's:^\(.\):../obj-ack//./syslib/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -E' sys_int86.c | sed -e 's:^\(.\):../obj-ack//./syslib/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -E' sys_irqctl.c | sed -e 's:^\(.\):../obj-ack//./syslib/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -E' sys_kill.c | sed -e 's:^\(.\):../obj-ack//./syslib/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -E' sys_memset.c | sed -e 's:^\(.\):../obj-ack//./syslib/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -E' sys_newmap.c | sed -e 's:^\(.\):../obj-ack//./syslib/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -E' sys_nice.c | sed -e 's:^\(.\):../obj-ack//./syslib/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -E' sys_out.c | sed -e 's:^\(.\):../obj-ack//./syslib/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -E' sys_physcopy.c | sed -e 's:^\(.\):../obj-ack//./syslib/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -E' sys_sdevio.c | sed -e 's:^\(.\):../obj-ack//./syslib/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -E' sys_segctl.c | sed -e 's:^\(.\):../obj-ack//./syslib/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -E' sys_setalarm.c | sed -e 's:^\(.\):../obj-ack//./syslib/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -E' sys_sigreturn.c | sed -e 's:^\(.\):../obj-ack//./syslib/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -E' sys_sigsend.c | sed -e 's:^\(.\):../obj-ack//./syslib/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -E' sys_privctl.c | sed -e 's:^\(.\):../obj-ack//./syslib/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -E' sys_times.c | sed -e 's:^\(.\):../obj-ack//./syslib/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -E' sys_trace.c | sed -e 's:^\(.\):../obj-ack//./syslib/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -E' sys_umap.c | sed -e 's:^\(.\):../obj-ack//./syslib/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -E' sys_vinb.c | sed -e 's:^\(.\):../obj-ack//./syslib/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -E' sys_vinl.c | sed -e 's:^\(.\):../obj-ack//./syslib/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -E' sys_vinw.c | sed -e 's:^\(.\):../obj-ack//./syslib/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -E' sys_vircopy.c | sed -e 's:^\(.\):../obj-ack//./syslib/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -E' sys_vm_map.c | sed -e 's:^\(.\):../obj-ack//./syslib/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -E' sys_vm_setbuf.c | sed -e 's:^\(.\):../obj-ack//./syslib/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -E' sys_voutb.c | sed -e 's:^\(.\):../obj-ack//./syslib/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -E' sys_voutl.c | sed -e 's:^\(.\):../obj-ack//./syslib/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -E' sys_voutw.c | sed -e 's:^\(.\):../obj-ack//./syslib/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -E' taskcall.c | sed -e 's:^\(.\):../obj-ack//./syslib/\1:' >> .depend-ack
Index: trunk/minix/lib/syslib/Makedepend-gnu
===================================================================
--- trunk/minix/lib/syslib/Makedepend-gnu	(revision 9)
+++ 	(revision )
@@ -1,57 +1,0 @@
-depend-gnu:
-	rm .depend-gnu
-	touch .depend-gnu
-	mkdep 'gcc -O -D_MINIX -D_POSIX_SOURCE -E' assert.c | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./syslib/\1:' >> .depend-gnu
-	mkdep 'gcc -O -D_MINIX -D_POSIX_SOURCE -E' panic.c | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./syslib/\1:' >> .depend-gnu
-	mkdep 'gcc -O -D_MINIX -D_POSIX_SOURCE -E' pci_attr_r16.c | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./syslib/\1:' >> .depend-gnu
-	mkdep 'gcc -O -D_MINIX -D_POSIX_SOURCE -E' pci_attr_r32.c | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./syslib/\1:' >> .depend-gnu
-	mkdep 'gcc -O -D_MINIX -D_POSIX_SOURCE -E' pci_attr_r8.c | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./syslib/\1:' >> .depend-gnu
-	mkdep 'gcc -O -D_MINIX -D_POSIX_SOURCE -E' pci_attr_w16.c | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./syslib/\1:' >> .depend-gnu
-	mkdep 'gcc -O -D_MINIX -D_POSIX_SOURCE -E' pci_attr_w32.c | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./syslib/\1:' >> .depend-gnu
-	mkdep 'gcc -O -D_MINIX -D_POSIX_SOURCE -E' pci_attr_w8.c | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./syslib/\1:' >> .depend-gnu
-	mkdep 'gcc -O -D_MINIX -D_POSIX_SOURCE -E' pci_dev_name.c | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./syslib/\1:' >> .depend-gnu
-	mkdep 'gcc -O -D_MINIX -D_POSIX_SOURCE -E' pci_find_dev.c | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./syslib/\1:' >> .depend-gnu
-	mkdep 'gcc -O -D_MINIX -D_POSIX_SOURCE -E' pci_first_dev.c | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./syslib/\1:' >> .depend-gnu
-	mkdep 'gcc -O -D_MINIX -D_POSIX_SOURCE -E' pci_ids.c | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./syslib/\1:' >> .depend-gnu
-	mkdep 'gcc -O -D_MINIX -D_POSIX_SOURCE -E' pci_init.c | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./syslib/\1:' >> .depend-gnu
-	mkdep 'gcc -O -D_MINIX -D_POSIX_SOURCE -E' pci_init1.c | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./syslib/\1:' >> .depend-gnu
-	mkdep 'gcc -O -D_MINIX -D_POSIX_SOURCE -E' pci_next_dev.c | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./syslib/\1:' >> .depend-gnu
-	mkdep 'gcc -O -D_MINIX -D_POSIX_SOURCE -E' pci_rescan_bus.c | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./syslib/\1:' >> .depend-gnu
-	mkdep 'gcc -O -D_MINIX -D_POSIX_SOURCE -E' pci_reserve.c | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./syslib/\1:' >> .depend-gnu
-	mkdep 'gcc -O -D_MINIX -D_POSIX_SOURCE -E' pci_slot_name.c | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./syslib/\1:' >> .depend-gnu
-	mkdep 'gcc -O -D_MINIX -D_POSIX_SOURCE -E' sys_abort.c | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./syslib/\1:' >> .depend-gnu
-	mkdep 'gcc -O -D_MINIX -D_POSIX_SOURCE -E' sys_endsig.c | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./syslib/\1:' >> .depend-gnu
-	mkdep 'gcc -O -D_MINIX -D_POSIX_SOURCE -E' sys_eniop.c | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./syslib/\1:' >> .depend-gnu
-	mkdep 'gcc -O -D_MINIX -D_POSIX_SOURCE -E' sys_exec.c | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./syslib/\1:' >> .depend-gnu
-	mkdep 'gcc -O -D_MINIX -D_POSIX_SOURCE -E' sys_exit.c | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./syslib/\1:' >> .depend-gnu
-	mkdep 'gcc -O -D_MINIX -D_POSIX_SOURCE -E' sys_fork.c | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./syslib/\1:' >> .depend-gnu
-	mkdep 'gcc -O -D_MINIX -D_POSIX_SOURCE -E' sys_getinfo.c | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./syslib/\1:' >> .depend-gnu
-	mkdep 'gcc -O -D_MINIX -D_POSIX_SOURCE -E' sys_getsig.c | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./syslib/\1:' >> .depend-gnu
-	mkdep 'gcc -O -D_MINIX -D_POSIX_SOURCE -E' sys_in.c | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./syslib/\1:' >> .depend-gnu
-	mkdep 'gcc -O -D_MINIX -D_POSIX_SOURCE -E' sys_int86.c | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./syslib/\1:' >> .depend-gnu
-	mkdep 'gcc -O -D_MINIX -D_POSIX_SOURCE -E' sys_irqctl.c | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./syslib/\1:' >> .depend-gnu
-	mkdep 'gcc -O -D_MINIX -D_POSIX_SOURCE -E' sys_kill.c | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./syslib/\1:' >> .depend-gnu
-	mkdep 'gcc -O -D_MINIX -D_POSIX_SOURCE -E' sys_memset.c | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./syslib/\1:' >> .depend-gnu
-	mkdep 'gcc -O -D_MINIX -D_POSIX_SOURCE -E' sys_newmap.c | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./syslib/\1:' >> .depend-gnu
-	mkdep 'gcc -O -D_MINIX -D_POSIX_SOURCE -E' sys_nice.c | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./syslib/\1:' >> .depend-gnu
-	mkdep 'gcc -O -D_MINIX -D_POSIX_SOURCE -E' sys_out.c | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./syslib/\1:' >> .depend-gnu
-	mkdep 'gcc -O -D_MINIX -D_POSIX_SOURCE -E' sys_physcopy.c | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./syslib/\1:' >> .depend-gnu
-	mkdep 'gcc -O -D_MINIX -D_POSIX_SOURCE -E' sys_sdevio.c | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./syslib/\1:' >> .depend-gnu
-	mkdep 'gcc -O -D_MINIX -D_POSIX_SOURCE -E' sys_segctl.c | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./syslib/\1:' >> .depend-gnu
-	mkdep 'gcc -O -D_MINIX -D_POSIX_SOURCE -E' sys_setalarm.c | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./syslib/\1:' >> .depend-gnu
-	mkdep 'gcc -O -D_MINIX -D_POSIX_SOURCE -E' sys_sigreturn.c | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./syslib/\1:' >> .depend-gnu
-	mkdep 'gcc -O -D_MINIX -D_POSIX_SOURCE -E' sys_sigsend.c | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./syslib/\1:' >> .depend-gnu
-	mkdep 'gcc -O -D_MINIX -D_POSIX_SOURCE -E' sys_privctl.c | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./syslib/\1:' >> .depend-gnu
-	mkdep 'gcc -O -D_MINIX -D_POSIX_SOURCE -E' sys_times.c | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./syslib/\1:' >> .depend-gnu
-	mkdep 'gcc -O -D_MINIX -D_POSIX_SOURCE -E' sys_trace.c | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./syslib/\1:' >> .depend-gnu
-	mkdep 'gcc -O -D_MINIX -D_POSIX_SOURCE -E' sys_umap.c | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./syslib/\1:' >> .depend-gnu
-	mkdep 'gcc -O -D_MINIX -D_POSIX_SOURCE -E' sys_vinb.c | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./syslib/\1:' >> .depend-gnu
-	mkdep 'gcc -O -D_MINIX -D_POSIX_SOURCE -E' sys_vinl.c | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./syslib/\1:' >> .depend-gnu
-	mkdep 'gcc -O -D_MINIX -D_POSIX_SOURCE -E' sys_vinw.c | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./syslib/\1:' >> .depend-gnu
-	mkdep 'gcc -O -D_MINIX -D_POSIX_SOURCE -E' sys_vircopy.c | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./syslib/\1:' >> .depend-gnu
-	mkdep 'gcc -O -D_MINIX -D_POSIX_SOURCE -E' sys_vm_map.c | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./syslib/\1:' >> .depend-gnu
-	mkdep 'gcc -O -D_MINIX -D_POSIX_SOURCE -E' sys_vm_setbuf.c | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./syslib/\1:' >> .depend-gnu
-	mkdep 'gcc -O -D_MINIX -D_POSIX_SOURCE -E' sys_voutb.c | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./syslib/\1:' >> .depend-gnu
-	mkdep 'gcc -O -D_MINIX -D_POSIX_SOURCE -E' sys_voutl.c | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./syslib/\1:' >> .depend-gnu
-	mkdep 'gcc -O -D_MINIX -D_POSIX_SOURCE -E' sys_voutw.c | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./syslib/\1:' >> .depend-gnu
-	mkdep 'gcc -O -D_MINIX -D_POSIX_SOURCE -E' taskcall.c | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./syslib/\1:' >> .depend-gnu
Index: trunk/minix/lib/syslib/Makefile
===================================================================
--- trunk/minix/lib/syslib/Makefile	(revision 9)
+++ 	(revision )
@@ -1,423 +1,0 @@
-#Generated from ./syslib/Makefile.in
-all: all-ack
-
-all-ack:
-all-gnu:
-
-makefiles: Makefile
-Makedepend-ack Makedepend-gnu: 
-	sh ../generate.sh ./syslib ../obj-ack/ ../obj-gnu
-
-Makefile: Makefile.in Makedepend-ack Makedepend-gnu
-	sh ../generate.sh ./syslib ../obj-ack/ ../obj-gnu
-	@echo
-	@echo *Attention*
-	@echo Makefile is regenerated... rerun command to see changes
-	@echo *Attention*
-	@echo
-
-depend: depend-ack
-all-ack: ../obj-ack//libsys.a
-
-../obj-ack//libsys.a: ../obj-ack//libsys.a(assert.o)
-../obj-ack//libsys.a: ../obj-ack//libsys.a(panic.o)
-../obj-ack//libsys.a: ../obj-ack//libsys.a(pci_attr_r16.o)
-../obj-ack//libsys.a: ../obj-ack//libsys.a(pci_attr_r32.o)
-../obj-ack//libsys.a: ../obj-ack//libsys.a(pci_attr_r8.o)
-../obj-ack//libsys.a: ../obj-ack//libsys.a(pci_attr_w16.o)
-../obj-ack//libsys.a: ../obj-ack//libsys.a(pci_attr_w32.o)
-../obj-ack//libsys.a: ../obj-ack//libsys.a(pci_attr_w8.o)
-../obj-ack//libsys.a: ../obj-ack//libsys.a(pci_dev_name.o)
-../obj-ack//libsys.a: ../obj-ack//libsys.a(pci_find_dev.o)
-../obj-ack//libsys.a: ../obj-ack//libsys.a(pci_first_dev.o)
-../obj-ack//libsys.a: ../obj-ack//libsys.a(pci_ids.o)
-../obj-ack//libsys.a: ../obj-ack//libsys.a(pci_init.o)
-../obj-ack//libsys.a: ../obj-ack//libsys.a(pci_init1.o)
-../obj-ack//libsys.a: ../obj-ack//libsys.a(pci_next_dev.o)
-../obj-ack//libsys.a: ../obj-ack//libsys.a(pci_rescan_bus.o)
-../obj-ack//libsys.a: ../obj-ack//libsys.a(pci_reserve.o)
-../obj-ack//libsys.a: ../obj-ack//libsys.a(pci_slot_name.o)
-../obj-ack//libsys.a: ../obj-ack//libsys.a(sys_abort.o)
-../obj-ack//libsys.a: ../obj-ack//libsys.a(sys_endsig.o)
-../obj-ack//libsys.a: ../obj-ack//libsys.a(sys_eniop.o)
-../obj-ack//libsys.a: ../obj-ack//libsys.a(sys_exec.o)
-../obj-ack//libsys.a: ../obj-ack//libsys.a(sys_exit.o)
-../obj-ack//libsys.a: ../obj-ack//libsys.a(sys_fork.o)
-../obj-ack//libsys.a: ../obj-ack//libsys.a(sys_getinfo.o)
-../obj-ack//libsys.a: ../obj-ack//libsys.a(sys_getsig.o)
-../obj-ack//libsys.a: ../obj-ack//libsys.a(sys_in.o)
-../obj-ack//libsys.a: ../obj-ack//libsys.a(sys_int86.o)
-../obj-ack//libsys.a: ../obj-ack//libsys.a(sys_irqctl.o)
-../obj-ack//libsys.a: ../obj-ack//libsys.a(sys_kill.o)
-../obj-ack//libsys.a: ../obj-ack//libsys.a(sys_memset.o)
-../obj-ack//libsys.a: ../obj-ack//libsys.a(sys_newmap.o)
-../obj-ack//libsys.a: ../obj-ack//libsys.a(sys_nice.o)
-../obj-ack//libsys.a: ../obj-ack//libsys.a(sys_out.o)
-../obj-ack//libsys.a: ../obj-ack//libsys.a(sys_physcopy.o)
-../obj-ack//libsys.a: ../obj-ack//libsys.a(sys_sdevio.o)
-../obj-ack//libsys.a: ../obj-ack//libsys.a(sys_segctl.o)
-../obj-ack//libsys.a: ../obj-ack//libsys.a(sys_setalarm.o)
-../obj-ack//libsys.a: ../obj-ack//libsys.a(sys_sigreturn.o)
-../obj-ack//libsys.a: ../obj-ack//libsys.a(sys_sigsend.o)
-../obj-ack//libsys.a: ../obj-ack//libsys.a(sys_privctl.o)
-../obj-ack//libsys.a: ../obj-ack//libsys.a(sys_times.o)
-../obj-ack//libsys.a: ../obj-ack//libsys.a(sys_trace.o)
-../obj-ack//libsys.a: ../obj-ack//libsys.a(sys_umap.o)
-../obj-ack//libsys.a: ../obj-ack//libsys.a(sys_vinb.o)
-../obj-ack//libsys.a: ../obj-ack//libsys.a(sys_vinl.o)
-../obj-ack//libsys.a: ../obj-ack//libsys.a(sys_vinw.o)
-../obj-ack//libsys.a: ../obj-ack//libsys.a(sys_vircopy.o)
-../obj-ack//libsys.a: ../obj-ack//libsys.a(sys_vm_map.o)
-../obj-ack//libsys.a: ../obj-ack//libsys.a(sys_vm_setbuf.o)
-../obj-ack//libsys.a: ../obj-ack//libsys.a(sys_voutb.o)
-../obj-ack//libsys.a: ../obj-ack//libsys.a(sys_voutl.o)
-../obj-ack//libsys.a: ../obj-ack//libsys.a(sys_voutw.o)
-../obj-ack//libsys.a: ../obj-ack//libsys.a(taskcall.o)
-
-../obj-ack//libsys.a:
-	ar cr ../obj-ack//libsys.a ../obj-ack//./syslib/*.o
-	rm ../obj-ack//./syslib/*.o
-
-../obj-ack//libsys.a(assert.o): assert.c
-	cc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-ack//./syslib/assert.o assert.c
-../obj-ack//libsys.a(panic.o): panic.c
-	cc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-ack//./syslib/panic.o panic.c
-../obj-ack//libsys.a(pci_attr_r16.o): pci_attr_r16.c
-	cc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-ack//./syslib/pci_attr_r16.o pci_attr_r16.c
-../obj-ack//libsys.a(pci_attr_r32.o): pci_attr_r32.c
-	cc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-ack//./syslib/pci_attr_r32.o pci_attr_r32.c
-../obj-ack//libsys.a(pci_attr_r8.o): pci_attr_r8.c
-	cc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-ack//./syslib/pci_attr_r8.o pci_attr_r8.c
-../obj-ack//libsys.a(pci_attr_w16.o): pci_attr_w16.c
-	cc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-ack//./syslib/pci_attr_w16.o pci_attr_w16.c
-../obj-ack//libsys.a(pci_attr_w32.o): pci_attr_w32.c
-	cc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-ack//./syslib/pci_attr_w32.o pci_attr_w32.c
-../obj-ack//libsys.a(pci_attr_w8.o): pci_attr_w8.c
-	cc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-ack//./syslib/pci_attr_w8.o pci_attr_w8.c
-../obj-ack//libsys.a(pci_dev_name.o): pci_dev_name.c
-	cc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-ack//./syslib/pci_dev_name.o pci_dev_name.c
-../obj-ack//libsys.a(pci_find_dev.o): pci_find_dev.c
-	cc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-ack//./syslib/pci_find_dev.o pci_find_dev.c
-../obj-ack//libsys.a(pci_first_dev.o): pci_first_dev.c
-	cc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-ack//./syslib/pci_first_dev.o pci_first_dev.c
-../obj-ack//libsys.a(pci_ids.o): pci_ids.c
-	cc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-ack//./syslib/pci_ids.o pci_ids.c
-../obj-ack//libsys.a(pci_init.o): pci_init.c
-	cc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-ack//./syslib/pci_init.o pci_init.c
-../obj-ack//libsys.a(pci_init1.o): pci_init1.c
-	cc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-ack//./syslib/pci_init1.o pci_init1.c
-../obj-ack//libsys.a(pci_next_dev.o): pci_next_dev.c
-	cc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-ack//./syslib/pci_next_dev.o pci_next_dev.c
-../obj-ack//libsys.a(pci_rescan_bus.o): pci_rescan_bus.c
-	cc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-ack//./syslib/pci_rescan_bus.o pci_rescan_bus.c
-../obj-ack//libsys.a(pci_reserve.o): pci_reserve.c
-	cc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-ack//./syslib/pci_reserve.o pci_reserve.c
-../obj-ack//libsys.a(pci_slot_name.o): pci_slot_name.c
-	cc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-ack//./syslib/pci_slot_name.o pci_slot_name.c
-../obj-ack//libsys.a(sys_abort.o): sys_abort.c
-	cc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-ack//./syslib/sys_abort.o sys_abort.c
-../obj-ack//libsys.a(sys_endsig.o): sys_endsig.c
-	cc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-ack//./syslib/sys_endsig.o sys_endsig.c
-../obj-ack//libsys.a(sys_eniop.o): sys_eniop.c
-	cc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-ack//./syslib/sys_eniop.o sys_eniop.c
-../obj-ack//libsys.a(sys_exec.o): sys_exec.c
-	cc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-ack//./syslib/sys_exec.o sys_exec.c
-../obj-ack//libsys.a(sys_exit.o): sys_exit.c
-	cc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-ack//./syslib/sys_exit.o sys_exit.c
-../obj-ack//libsys.a(sys_fork.o): sys_fork.c
-	cc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-ack//./syslib/sys_fork.o sys_fork.c
-../obj-ack//libsys.a(sys_getinfo.o): sys_getinfo.c
-	cc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-ack//./syslib/sys_getinfo.o sys_getinfo.c
-../obj-ack//libsys.a(sys_getsig.o): sys_getsig.c
-	cc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-ack//./syslib/sys_getsig.o sys_getsig.c
-../obj-ack//libsys.a(sys_in.o): sys_in.c
-	cc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-ack//./syslib/sys_in.o sys_in.c
-../obj-ack//libsys.a(sys_int86.o): sys_int86.c
-	cc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-ack//./syslib/sys_int86.o sys_int86.c
-../obj-ack//libsys.a(sys_irqctl.o): sys_irqctl.c
-	cc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-ack//./syslib/sys_irqctl.o sys_irqctl.c
-../obj-ack//libsys.a(sys_kill.o): sys_kill.c
-	cc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-ack//./syslib/sys_kill.o sys_kill.c
-../obj-ack//libsys.a(sys_memset.o): sys_memset.c
-	cc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-ack//./syslib/sys_memset.o sys_memset.c
-../obj-ack//libsys.a(sys_newmap.o): sys_newmap.c
-	cc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-ack//./syslib/sys_newmap.o sys_newmap.c
-../obj-ack//libsys.a(sys_nice.o): sys_nice.c
-	cc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-ack//./syslib/sys_nice.o sys_nice.c
-../obj-ack//libsys.a(sys_out.o): sys_out.c
-	cc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-ack//./syslib/sys_out.o sys_out.c
-../obj-ack//libsys.a(sys_physcopy.o): sys_physcopy.c
-	cc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-ack//./syslib/sys_physcopy.o sys_physcopy.c
-../obj-ack//libsys.a(sys_sdevio.o): sys_sdevio.c
-	cc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-ack//./syslib/sys_sdevio.o sys_sdevio.c
-../obj-ack//libsys.a(sys_segctl.o): sys_segctl.c
-	cc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-ack//./syslib/sys_segctl.o sys_segctl.c
-../obj-ack//libsys.a(sys_setalarm.o): sys_setalarm.c
-	cc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-ack//./syslib/sys_setalarm.o sys_setalarm.c
-../obj-ack//libsys.a(sys_sigreturn.o): sys_sigreturn.c
-	cc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-ack//./syslib/sys_sigreturn.o sys_sigreturn.c
-../obj-ack//libsys.a(sys_sigsend.o): sys_sigsend.c
-	cc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-ack//./syslib/sys_sigsend.o sys_sigsend.c
-../obj-ack//libsys.a(sys_privctl.o): sys_privctl.c
-	cc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-ack//./syslib/sys_privctl.o sys_privctl.c
-../obj-ack//libsys.a(sys_times.o): sys_times.c
-	cc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-ack//./syslib/sys_times.o sys_times.c
-../obj-ack//libsys.a(sys_trace.o): sys_trace.c
-	cc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-ack//./syslib/sys_trace.o sys_trace.c
-../obj-ack//libsys.a(sys_umap.o): sys_umap.c
-	cc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-ack//./syslib/sys_umap.o sys_umap.c
-../obj-ack//libsys.a(sys_vinb.o): sys_vinb.c
-	cc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-ack//./syslib/sys_vinb.o sys_vinb.c
-../obj-ack//libsys.a(sys_vinl.o): sys_vinl.c
-	cc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-ack//./syslib/sys_vinl.o sys_vinl.c
-../obj-ack//libsys.a(sys_vinw.o): sys_vinw.c
-	cc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-ack//./syslib/sys_vinw.o sys_vinw.c
-../obj-ack//libsys.a(sys_vircopy.o): sys_vircopy.c
-	cc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-ack//./syslib/sys_vircopy.o sys_vircopy.c
-../obj-ack//libsys.a(sys_vm_map.o): sys_vm_map.c
-	cc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-ack//./syslib/sys_vm_map.o sys_vm_map.c
-../obj-ack//libsys.a(sys_vm_setbuf.o): sys_vm_setbuf.c
-	cc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-ack//./syslib/sys_vm_setbuf.o sys_vm_setbuf.c
-../obj-ack//libsys.a(sys_voutb.o): sys_voutb.c
-	cc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-ack//./syslib/sys_voutb.o sys_voutb.c
-../obj-ack//libsys.a(sys_voutl.o): sys_voutl.c
-	cc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-ack//./syslib/sys_voutl.o sys_voutl.c
-../obj-ack//libsys.a(sys_voutw.o): sys_voutw.c
-	cc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-ack//./syslib/sys_voutw.o sys_voutw.c
-../obj-ack//libsys.a(taskcall.o): taskcall.c
-	cc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-ack//./syslib/taskcall.o taskcall.c
-
-all-gnu: ../obj-gnu/libsys.a
-
-../obj-gnu/libsys.a: ../obj-gnu/./syslib/assert.o
-../obj-gnu/libsys.a: ../obj-gnu/./syslib/panic.o
-../obj-gnu/libsys.a: ../obj-gnu/./syslib/pci_attr_r16.o
-../obj-gnu/libsys.a: ../obj-gnu/./syslib/pci_attr_r32.o
-../obj-gnu/libsys.a: ../obj-gnu/./syslib/pci_attr_r8.o
-../obj-gnu/libsys.a: ../obj-gnu/./syslib/pci_attr_w16.o
-../obj-gnu/libsys.a: ../obj-gnu/./syslib/pci_attr_w32.o
-../obj-gnu/libsys.a: ../obj-gnu/./syslib/pci_attr_w8.o
-../obj-gnu/libsys.a: ../obj-gnu/./syslib/pci_dev_name.o
-../obj-gnu/libsys.a: ../obj-gnu/./syslib/pci_find_dev.o
-../obj-gnu/libsys.a: ../obj-gnu/./syslib/pci_first_dev.o
-../obj-gnu/libsys.a: ../obj-gnu/./syslib/pci_ids.o
-../obj-gnu/libsys.a: ../obj-gnu/./syslib/pci_init.o
-../obj-gnu/libsys.a: ../obj-gnu/./syslib/pci_init1.o
-../obj-gnu/libsys.a: ../obj-gnu/./syslib/pci_next_dev.o
-../obj-gnu/libsys.a: ../obj-gnu/./syslib/pci_rescan_bus.o
-../obj-gnu/libsys.a: ../obj-gnu/./syslib/pci_reserve.o
-../obj-gnu/libsys.a: ../obj-gnu/./syslib/pci_slot_name.o
-../obj-gnu/libsys.a: ../obj-gnu/./syslib/sys_abort.o
-../obj-gnu/libsys.a: ../obj-gnu/./syslib/sys_endsig.o
-../obj-gnu/libsys.a: ../obj-gnu/./syslib/sys_eniop.o
-../obj-gnu/libsys.a: ../obj-gnu/./syslib/sys_exec.o
-../obj-gnu/libsys.a: ../obj-gnu/./syslib/sys_exit.o
-../obj-gnu/libsys.a: ../obj-gnu/./syslib/sys_fork.o
-../obj-gnu/libsys.a: ../obj-gnu/./syslib/sys_getinfo.o
-../obj-gnu/libsys.a: ../obj-gnu/./syslib/sys_getsig.o
-../obj-gnu/libsys.a: ../obj-gnu/./syslib/sys_in.o
-../obj-gnu/libsys.a: ../obj-gnu/./syslib/sys_int86.o
-../obj-gnu/libsys.a: ../obj-gnu/./syslib/sys_irqctl.o
-../obj-gnu/libsys.a: ../obj-gnu/./syslib/sys_kill.o
-../obj-gnu/libsys.a: ../obj-gnu/./syslib/sys_memset.o
-../obj-gnu/libsys.a: ../obj-gnu/./syslib/sys_newmap.o
-../obj-gnu/libsys.a: ../obj-gnu/./syslib/sys_nice.o
-../obj-gnu/libsys.a: ../obj-gnu/./syslib/sys_out.o
-../obj-gnu/libsys.a: ../obj-gnu/./syslib/sys_physcopy.o
-../obj-gnu/libsys.a: ../obj-gnu/./syslib/sys_sdevio.o
-../obj-gnu/libsys.a: ../obj-gnu/./syslib/sys_segctl.o
-../obj-gnu/libsys.a: ../obj-gnu/./syslib/sys_setalarm.o
-../obj-gnu/libsys.a: ../obj-gnu/./syslib/sys_sigreturn.o
-../obj-gnu/libsys.a: ../obj-gnu/./syslib/sys_sigsend.o
-../obj-gnu/libsys.a: ../obj-gnu/./syslib/sys_privctl.o
-../obj-gnu/libsys.a: ../obj-gnu/./syslib/sys_times.o
-../obj-gnu/libsys.a: ../obj-gnu/./syslib/sys_trace.o
-../obj-gnu/libsys.a: ../obj-gnu/./syslib/sys_umap.o
-../obj-gnu/libsys.a: ../obj-gnu/./syslib/sys_vinb.o
-../obj-gnu/libsys.a: ../obj-gnu/./syslib/sys_vinl.o
-../obj-gnu/libsys.a: ../obj-gnu/./syslib/sys_vinw.o
-../obj-gnu/libsys.a: ../obj-gnu/./syslib/sys_vircopy.o
-../obj-gnu/libsys.a: ../obj-gnu/./syslib/sys_vm_map.o
-../obj-gnu/libsys.a: ../obj-gnu/./syslib/sys_vm_setbuf.o
-../obj-gnu/libsys.a: ../obj-gnu/./syslib/sys_voutb.o
-../obj-gnu/libsys.a: ../obj-gnu/./syslib/sys_voutl.o
-../obj-gnu/libsys.a: ../obj-gnu/./syslib/sys_voutw.o
-../obj-gnu/libsys.a: ../obj-gnu/./syslib/taskcall.o
-
-../obj-gnu/libsys.a:
-	gar cr ../obj-gnu/libsys.a $?
-
-../obj-gnu/./syslib/assert.o: assert.c
-	gcc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-gnu/./syslib/assert.o assert.c
-
-../obj-gnu/./syslib/panic.o: panic.c
-	gcc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-gnu/./syslib/panic.o panic.c
-
-../obj-gnu/./syslib/pci_attr_r16.o: pci_attr_r16.c
-	gcc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-gnu/./syslib/pci_attr_r16.o pci_attr_r16.c
-
-../obj-gnu/./syslib/pci_attr_r32.o: pci_attr_r32.c
-	gcc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-gnu/./syslib/pci_attr_r32.o pci_attr_r32.c
-
-../obj-gnu/./syslib/pci_attr_r8.o: pci_attr_r8.c
-	gcc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-gnu/./syslib/pci_attr_r8.o pci_attr_r8.c
-
-../obj-gnu/./syslib/pci_attr_w16.o: pci_attr_w16.c
-	gcc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-gnu/./syslib/pci_attr_w16.o pci_attr_w16.c
-
-../obj-gnu/./syslib/pci_attr_w32.o: pci_attr_w32.c
-	gcc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-gnu/./syslib/pci_attr_w32.o pci_attr_w32.c
-
-../obj-gnu/./syslib/pci_attr_w8.o: pci_attr_w8.c
-	gcc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-gnu/./syslib/pci_attr_w8.o pci_attr_w8.c
-
-../obj-gnu/./syslib/pci_dev_name.o: pci_dev_name.c
-	gcc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-gnu/./syslib/pci_dev_name.o pci_dev_name.c
-
-../obj-gnu/./syslib/pci_find_dev.o: pci_find_dev.c
-	gcc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-gnu/./syslib/pci_find_dev.o pci_find_dev.c
-
-../obj-gnu/./syslib/pci_first_dev.o: pci_first_dev.c
-	gcc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-gnu/./syslib/pci_first_dev.o pci_first_dev.c
-
-../obj-gnu/./syslib/pci_ids.o: pci_ids.c
-	gcc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-gnu/./syslib/pci_ids.o pci_ids.c
-
-../obj-gnu/./syslib/pci_init.o: pci_init.c
-	gcc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-gnu/./syslib/pci_init.o pci_init.c
-
-../obj-gnu/./syslib/pci_init1.o: pci_init1.c
-	gcc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-gnu/./syslib/pci_init1.o pci_init1.c
-
-../obj-gnu/./syslib/pci_next_dev.o: pci_next_dev.c
-	gcc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-gnu/./syslib/pci_next_dev.o pci_next_dev.c
-
-../obj-gnu/./syslib/pci_rescan_bus.o: pci_rescan_bus.c
-	gcc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-gnu/./syslib/pci_rescan_bus.o pci_rescan_bus.c
-
-../obj-gnu/./syslib/pci_reserve.o: pci_reserve.c
-	gcc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-gnu/./syslib/pci_reserve.o pci_reserve.c
-
-../obj-gnu/./syslib/pci_slot_name.o: pci_slot_name.c
-	gcc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-gnu/./syslib/pci_slot_name.o pci_slot_name.c
-
-../obj-gnu/./syslib/sys_abort.o: sys_abort.c
-	gcc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-gnu/./syslib/sys_abort.o sys_abort.c
-
-../obj-gnu/./syslib/sys_endsig.o: sys_endsig.c
-	gcc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-gnu/./syslib/sys_endsig.o sys_endsig.c
-
-../obj-gnu/./syslib/sys_eniop.o: sys_eniop.c
-	gcc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-gnu/./syslib/sys_eniop.o sys_eniop.c
-
-../obj-gnu/./syslib/sys_exec.o: sys_exec.c
-	gcc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-gnu/./syslib/sys_exec.o sys_exec.c
-
-../obj-gnu/./syslib/sys_exit.o: sys_exit.c
-	gcc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-gnu/./syslib/sys_exit.o sys_exit.c
-
-../obj-gnu/./syslib/sys_fork.o: sys_fork.c
-	gcc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-gnu/./syslib/sys_fork.o sys_fork.c
-
-../obj-gnu/./syslib/sys_getinfo.o: sys_getinfo.c
-	gcc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-gnu/./syslib/sys_getinfo.o sys_getinfo.c
-
-../obj-gnu/./syslib/sys_getsig.o: sys_getsig.c
-	gcc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-gnu/./syslib/sys_getsig.o sys_getsig.c
-
-../obj-gnu/./syslib/sys_in.o: sys_in.c
-	gcc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-gnu/./syslib/sys_in.o sys_in.c
-
-../obj-gnu/./syslib/sys_int86.o: sys_int86.c
-	gcc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-gnu/./syslib/sys_int86.o sys_int86.c
-
-../obj-gnu/./syslib/sys_irqctl.o: sys_irqctl.c
-	gcc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-gnu/./syslib/sys_irqctl.o sys_irqctl.c
-
-../obj-gnu/./syslib/sys_kill.o: sys_kill.c
-	gcc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-gnu/./syslib/sys_kill.o sys_kill.c
-
-../obj-gnu/./syslib/sys_memset.o: sys_memset.c
-	gcc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-gnu/./syslib/sys_memset.o sys_memset.c
-
-../obj-gnu/./syslib/sys_newmap.o: sys_newmap.c
-	gcc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-gnu/./syslib/sys_newmap.o sys_newmap.c
-
-../obj-gnu/./syslib/sys_nice.o: sys_nice.c
-	gcc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-gnu/./syslib/sys_nice.o sys_nice.c
-
-../obj-gnu/./syslib/sys_out.o: sys_out.c
-	gcc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-gnu/./syslib/sys_out.o sys_out.c
-
-../obj-gnu/./syslib/sys_physcopy.o: sys_physcopy.c
-	gcc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-gnu/./syslib/sys_physcopy.o sys_physcopy.c
-
-../obj-gnu/./syslib/sys_sdevio.o: sys_sdevio.c
-	gcc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-gnu/./syslib/sys_sdevio.o sys_sdevio.c
-
-../obj-gnu/./syslib/sys_segctl.o: sys_segctl.c
-	gcc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-gnu/./syslib/sys_segctl.o sys_segctl.c
-
-../obj-gnu/./syslib/sys_setalarm.o: sys_setalarm.c
-	gcc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-gnu/./syslib/sys_setalarm.o sys_setalarm.c
-
-../obj-gnu/./syslib/sys_sigreturn.o: sys_sigreturn.c
-	gcc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-gnu/./syslib/sys_sigreturn.o sys_sigreturn.c
-
-../obj-gnu/./syslib/sys_sigsend.o: sys_sigsend.c
-	gcc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-gnu/./syslib/sys_sigsend.o sys_sigsend.c
-
-../obj-gnu/./syslib/sys_privctl.o: sys_privctl.c
-	gcc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-gnu/./syslib/sys_privctl.o sys_privctl.c
-
-../obj-gnu/./syslib/sys_times.o: sys_times.c
-	gcc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-gnu/./syslib/sys_times.o sys_times.c
-
-../obj-gnu/./syslib/sys_trace.o: sys_trace.c
-	gcc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-gnu/./syslib/sys_trace.o sys_trace.c
-
-../obj-gnu/./syslib/sys_umap.o: sys_umap.c
-	gcc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-gnu/./syslib/sys_umap.o sys_umap.c
-
-../obj-gnu/./syslib/sys_vinb.o: sys_vinb.c
-	gcc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-gnu/./syslib/sys_vinb.o sys_vinb.c
-
-../obj-gnu/./syslib/sys_vinl.o: sys_vinl.c
-	gcc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-gnu/./syslib/sys_vinl.o sys_vinl.c
-
-../obj-gnu/./syslib/sys_vinw.o: sys_vinw.c
-	gcc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-gnu/./syslib/sys_vinw.o sys_vinw.c
-
-../obj-gnu/./syslib/sys_vircopy.o: sys_vircopy.c
-	gcc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-gnu/./syslib/sys_vircopy.o sys_vircopy.c
-
-../obj-gnu/./syslib/sys_vm_map.o: sys_vm_map.c
-	gcc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-gnu/./syslib/sys_vm_map.o sys_vm_map.c
-
-../obj-gnu/./syslib/sys_vm_setbuf.o: sys_vm_setbuf.c
-	gcc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-gnu/./syslib/sys_vm_setbuf.o sys_vm_setbuf.c
-
-../obj-gnu/./syslib/sys_voutb.o: sys_voutb.c
-	gcc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-gnu/./syslib/sys_voutb.o sys_voutb.c
-
-../obj-gnu/./syslib/sys_voutl.o: sys_voutl.c
-	gcc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-gnu/./syslib/sys_voutl.o sys_voutl.c
-
-../obj-gnu/./syslib/sys_voutw.o: sys_voutw.c
-	gcc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-gnu/./syslib/sys_voutw.o sys_voutw.c
-
-../obj-gnu/./syslib/taskcall.o: taskcall.c
-	gcc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-gnu/./syslib/taskcall.o taskcall.c
-
-
-
-
-clean::
-	rm -f ../obj-ack//./syslib/*
-	rm -f ../obj-gnu/./syslib/*
-
-include Makedepend-ack
-include .depend-ack
-
-include Makedepend-gnu
-include .depend-gnu
Index: trunk/minix/lib/syslib/Makefile.in
===================================================================
--- trunk/minix/lib/syslib/Makefile.in	(revision 9)
+++ 	(revision )
@@ -1,63 +1,0 @@
-# Makefile for lib/syslib.
-
-CFLAGS="-O -D_MINIX -D_POSIX_SOURCE"
-
-LIBRARIES=libsys
-
-libsys_FILES=" \
-	assert.c \
-	panic.c \
-	pci_attr_r16.c \
-	pci_attr_r32.c \
-	pci_attr_r8.c \
-	pci_attr_w16.c \
-	pci_attr_w32.c \
-	pci_attr_w8.c \
-	pci_dev_name.c \
-	pci_find_dev.c \
-	pci_first_dev.c \
-	pci_ids.c \
-	pci_init.c \
-	pci_init1.c \
-	pci_next_dev.c \
-	pci_rescan_bus.c \
-	pci_reserve.c \
-	pci_slot_name.c \
-	sys_abort.c \
-	sys_endsig.c \
-	sys_eniop.c \
-	sys_exec.c \
-	sys_exit.c \
-	sys_fork.c \
-	sys_getinfo.c \
-	sys_getsig.c \
-	sys_in.c \
-	sys_int86.c \
-	sys_irqctl.c \
-	sys_kill.c \
-	sys_memset.c \
-	sys_newmap.c \
-	sys_nice.c \
-	sys_out.c \
-	sys_physcopy.c \
-	sys_sdevio.c \
-	sys_segctl.c \
-	sys_setalarm.c \
-	sys_sigreturn.c \
-	sys_sigsend.c \
-	sys_privctl.c \
-	sys_times.c \
-	sys_trace.c \
-	sys_umap.c \
-	sys_vinb.c \
-	sys_vinl.c \
-	sys_vinw.c \
-	sys_vircopy.c \
-	sys_vm_map.c \
-	sys_vm_setbuf.c \
-	sys_voutb.c \
-	sys_voutl.c \
-	sys_voutw.c \
-	taskcall.c"
-
-TYPE=both
Index: trunk/minix/lib/syslib/assert.c
===================================================================
--- trunk/minix/lib/syslib/assert.c	(revision 9)
+++ 	(revision )
@@ -1,14 +1,0 @@
-/*
- * assert.c - diagnostics
- */
-
-#include	<assert.h>
-#include	<stdio.h>
-#include	<minix/config.h>
-#include	<minix/const.h>
-#include	<minix/sysutil.h>
-
-void __bad_assertion(const char *mess) {
-	printf("%s", mess);
-	panic(NULL, NULL, NO_NUM);
-}
Index: trunk/minix/lib/syslib/panic.c
===================================================================
--- trunk/minix/lib/syslib/panic.c	(revision 9)
+++ 	(revision )
@@ -1,45 +1,0 @@
-#include <stdlib.h>
-#include <signal.h>
-#include <minix/sysutil.h>
-
-#include "syslib.h"
-
-int panicing= 0;
-
-/*===========================================================================*
- *				panic					     *
- *===========================================================================*/
-PUBLIC void panic(who, mess, num)
-char *who;			/* server identification */
-char *mess;			/* message format string */
-int num;			/* number to go with format string */
-{
-/* Something awful has happened. Panics are caused when an internal
- * inconsistency is detected, e.g., a programming error or illegal 
- * value of a defined constant.
- */
-  message m;
-  void (*suicide)(void);
-
-  panicing= 1;
-  if (NULL != who && NULL != mess) {
-      if (num != NO_NUM) {
-          printf("Panic in %s: %s: %d\n", who, mess, num); 
-      } else {
-          printf("Panic in %s: %s\n", who, mess); 
-      }
-  }
-
-  /* Try to signal ourself */
-  sys_kill(SELF, SIGKILL);
-
-  /* If exiting nicely through PM fails for some reason, try to
-   * commit suicide. E.g., message to PM might fail due to deadlock.
-   */
-  suicide = (void (*)(void)) -1;
-  suicide();
-
-  /* If committing suicide fails for some reason, hang. */
-  for(;;) { }
-}
-
Index: trunk/minix/lib/syslib/pci.h
===================================================================
--- trunk/minix/lib/syslib/pci.h	(revision 9)
+++ 	(revision )
@@ -1,1 +1,0 @@
-extern int pci_procnr;
Index: trunk/minix/lib/syslib/pci_attr_r16.c
===================================================================
--- trunk/minix/lib/syslib/pci_attr_r16.c	(revision 9)
+++ 	(revision )
@@ -1,32 +1,0 @@
-/*
-pci_attr_r16.c
-*/
-
-#include "pci.h"
-#include "syslib.h"
-#include <minix/sysutil.h>
-
-/*===========================================================================*
- *				pci_attr_r16				     *
- *===========================================================================*/
-PUBLIC u16_t pci_attr_r16(devind, port)
-int devind;
-int port;
-{
-	int r;
-	message m;
-
-	m.m_type= BUSC_PCI_ATTR_R16;
-	m.m2_i1= devind;
-	m.m2_i2= port;
-
-	r= sendrec(pci_procnr, &m);
-	if (r != 0)
-		panic("pci", "pci_attr_r16: can't talk to PCI", r);
-
-	if (m.m_type != 0)
-		panic("pci", "pci_attr_r16: got bad reply from PCI", m.m_type);
-
-	return m.m2_l1;
-}
-
Index: trunk/minix/lib/syslib/pci_attr_r32.c
===================================================================
--- trunk/minix/lib/syslib/pci_attr_r32.c	(revision 9)
+++ 	(revision )
@@ -1,32 +1,0 @@
-/*
-pci_attr_r32.c
-*/
-
-#include "pci.h"
-#include "syslib.h"
-#include <minix/sysutil.h>
-
-/*===========================================================================*
- *				pci_attr_r32				     *
- *===========================================================================*/
-PUBLIC u32_t pci_attr_r32(devind, port)
-int devind;
-int port;
-{
-	int r;
-	message m;
-
-	m.m_type= BUSC_PCI_ATTR_R32;
-	m.m2_i1= devind;
-	m.m2_i2= port;
-
-	r= sendrec(pci_procnr, &m);
-	if (r != 0)
-		panic("pci", "pci_attr_r32: can't talk to PCI", r);
-
-	if (m.m_type != 0)
-		panic("pci", "pci_attr_r32: got bad reply from PCI", m.m_type);
-
-	return m.m2_l1;
-}
-
Index: trunk/minix/lib/syslib/pci_attr_r8.c
===================================================================
--- trunk/minix/lib/syslib/pci_attr_r8.c	(revision 9)
+++ 	(revision )
@@ -1,32 +1,0 @@
-/*
-pci_attr_r8.c
-*/
-
-#include "pci.h"
-#include "syslib.h"
-#include <minix/sysutil.h>
-
-/*===========================================================================*
- *				pci_attr_r8				     *
- *===========================================================================*/
-PUBLIC u8_t pci_attr_r8(devind, port)
-int devind;
-int port;
-{
-	int r;
-	message m;
-
-	m.m_type= BUSC_PCI_ATTR_R8;
-	m.m2_i1= devind;
-	m.m2_i2= port;
-
-	r= sendrec(pci_procnr, &m);
-	if (r != 0)
-		panic("pci", "pci_attr_r8: can't talk to PCI", r);
-
-	if (m.m_type != 0)
-		panic("pci", "pci_attr_r8: got bad reply from PCI", m.m_type);
-
-	return m.m2_l1;
-}
-
Index: trunk/minix/lib/syslib/pci_attr_w16.c
===================================================================
--- trunk/minix/lib/syslib/pci_attr_w16.c	(revision 9)
+++ 	(revision )
@@ -1,32 +1,0 @@
-/*
-pci_attr_w16.c
-*/
-
-#include "pci.h"
-#include "syslib.h"
-#include <minix/sysutil.h>
-
-/*===========================================================================*
- *				pci_attr_w16				     *
- *===========================================================================*/
-PUBLIC void pci_attr_w16(devind, port, value)
-int devind;
-int port;
-u16_t value;
-{
-	int r;
-	message m;
-
-	m.m_type= BUSC_PCI_ATTR_W16;
-	m.m2_i1= devind;
-	m.m2_i2= port;
-	m.m2_l1= value;
-
-	r= sendrec(pci_procnr, &m);
-	if (r != 0)
-		panic("pci", "pci_attr_w16: can't talk to PCI", r);
-
-	if (m.m_type != 0)
-		panic("pci", "pci_attr_w16: got bad reply from PCI", m.m_type);
-}
-
Index: trunk/minix/lib/syslib/pci_attr_w32.c
===================================================================
--- trunk/minix/lib/syslib/pci_attr_w32.c	(revision 9)
+++ 	(revision )
@@ -1,32 +1,0 @@
-/*
-pci_attr_w32.c
-*/
-
-#include "pci.h"
-#include "syslib.h"
-#include <minix/sysutil.h>
-
-/*===========================================================================*
- *				pci_attr_w32				     *
- *===========================================================================*/
-PUBLIC void pci_attr_w32(devind, port, value)
-int devind;
-int port;
-u32_t value;
-{
-	int r;
-	message m;
-
-	m.m_type= BUSC_PCI_ATTR_W32;
-	m.m2_i1= devind;
-	m.m2_i2= port;
-	m.m2_l1= value;
-
-	r= sendrec(pci_procnr, &m);
-	if (r != 0)
-		panic("pci", "pci_attr_w32: can't talk to PCI", r);
-
-	if (m.m_type != 0)
-		panic("pci", "pci_attr_w32: got bad reply from PCI", m.m_type);
-}
-
Index: trunk/minix/lib/syslib/pci_attr_w8.c
===================================================================
--- trunk/minix/lib/syslib/pci_attr_w8.c	(revision 9)
+++ 	(revision )
@@ -1,32 +1,0 @@
-/*
-pci_attr_w8.c
-*/
-
-#include "pci.h"
-#include "syslib.h"
-#include <minix/sysutil.h>
-
-/*===========================================================================*
- *				pci_attr_w8				     *
- *===========================================================================*/
-PUBLIC void pci_attr_w8(devind, port, value)
-int devind;
-int port;
-u8_t value;
-{
-	int r;
-	message m;
-
-	m.m_type= BUSC_PCI_ATTR_W8;
-	m.m2_i1= devind;
-	m.m2_i2= port;
-	m.m2_l1= value;
-
-	r= sendrec(pci_procnr, &m);
-	if (r != 0)
-		panic("pci", "pci_attr_w8: can't talk to PCI", r);
-
-	if (m.m_type != 0)
-		panic("pci", "pci_attr_w8: got bad reply from PCI", m.m_type);
-}
-
Index: trunk/minix/lib/syslib/pci_dev_name.c
===================================================================
--- trunk/minix/lib/syslib/pci_dev_name.c	(revision 9)
+++ 	(revision )
@@ -1,48 +1,0 @@
-/*
-pci_dev_name.c
-*/
-
-#include "pci.h"
-#include "syslib.h"
-#include <minix/sysutil.h>
-
-/*===========================================================================*
- *				pci_dev_name				     *
- *===========================================================================*/
-PUBLIC char *pci_dev_name(vid, did)
-u16_t vid;
-u16_t did;
-{
-	static char name[80];	/* We need a better interface for this */
-
-	int r;
-	message m;
-
-	m.m_type= BUSC_PCI_DEV_NAME;
-	m.m1_i1= vid;
-	m.m1_i2= did;
-	m.m1_i3= sizeof(name);
-	m.m1_p1= name;
-
-	r= sendrec(pci_procnr, &m);
-	if (r != 0)
-		panic("pci", "pci_dev_name: can't talk to PCI", r);
-
-	if (m.m_type == ENOENT)
-	{
-		printf("pci_dev_name: got no name\n");
-		return NULL;	/* No name for this device */
-	}
-	if (m.m_type != 0)
-		panic("pci", "pci_dev_name: got bad reply from PCI", m.m_type);
-
-	name[sizeof(name)-1]= '\0';	/* Make sure that the string is NUL
-					 * terminated.
-					 */
-
-#if DEBUG
-	printf("pci_dev_name: got name %s\n", name);
-#endif
-	return name;
-}
-
Index: trunk/minix/lib/syslib/pci_find_dev.c
===================================================================
--- trunk/minix/lib/syslib/pci_find_dev.c	(revision 9)
+++ 	(revision )
@@ -1,43 +1,0 @@
-/*
-pci_find_dev.c
-*/
-
-#include "pci.h"
-#include "syslib.h"
-#include <minix/sysutil.h>
-
-/*===========================================================================*
- *				pci_find_dev				     *
- *===========================================================================*/
-PUBLIC int pci_find_dev(bus, dev, func, devindp)
-u8_t bus;
-u8_t dev;
-u8_t func;
-int *devindp;
-{
-	int r;
-	message m;
-
-	m.m_type= BUSC_PCI_FIND_DEV;
-	m.m1_i1= bus;
-	m.m1_i2= dev;
-	m.m1_i3= func;
-
-	r= sendrec(pci_procnr, &m);
-	if (r != 0)
-		panic("pci", "pci_find_dev: can't talk to PCI", r);
-
-	if (m.m_type == 1)
-	{
-		*devindp= m.m1_i1;
-		printf("pci_find_dev: got device %d for %d.%d.%d\n",
-			*devindp, bus, dev, func);
-		return 1;
-	}
-	if (m.m_type != 0)
-		panic("pci", "pci_find_dev: got bad reply from PCI", m.m_type);
-
-	printf("pci_find_dev: got nothing\n");
-	return 0;
-}
-
Index: trunk/minix/lib/syslib/pci_first_dev.c
===================================================================
--- trunk/minix/lib/syslib/pci_first_dev.c	(revision 9)
+++ 	(revision )
@@ -1,42 +1,0 @@
-/*
-pci_first_dev.c
-*/
-
-#include "pci.h"
-#include "syslib.h"
-#include <minix/sysutil.h>
-
-/*===========================================================================*
- *				pci_first_dev				     *
- *===========================================================================*/
-PUBLIC int pci_first_dev(devindp, vidp, didp)
-int *devindp;
-u16_t *vidp;
-u16_t *didp;
-{
-	int r;
-	message m;
-
-	m.m_type= BUSC_PCI_FIRST_DEV;
-	r= sendrec(pci_procnr, &m);
-	if (r != 0)
-		panic("pci", "pci_first_dev: can't talk to PCI", r);
-	if (m.m_type == 1)
-	{
-		*devindp= m.m1_i1;
-		*vidp= m.m1_i2;
-		*didp= m.m1_i3;
-#if DEBUG
-		printf("pci_first_dev: got device %d, %04x/%04x\n", 
-			*devindp, *vidp, *didp);
-#endif
-		return 1;
-	}
-	if (m.m_type != 0)
-		panic("pci", "pci_first_dev: got bad reply from PCI", m.m_type);
-
-#if DEBUG
-	printf("pci_first_dev: got nothing\n");
-#endif
-	return 0;
-}
Index: trunk/minix/lib/syslib/pci_ids.c
===================================================================
--- trunk/minix/lib/syslib/pci_ids.c	(revision 9)
+++ 	(revision )
@@ -1,33 +1,0 @@
-/*
-pci_ids.c
-*/
-
-#include "pci.h"
-#include "syslib.h"
-#include <minix/sysutil.h>
-
-/*===========================================================================*
- *				pci_ids					     *
- *===========================================================================*/
-PUBLIC void pci_ids(devind, vidp, didp)
-int devind;
-u16_t *vidp;
-u16_t *didp;
-{
-	int r;
-	message m;
-
-	m.m_type= BUSC_PCI_IDS;
-	m.m1_i1= devind;
-
-	r= sendrec(pci_procnr, &m);
-	if (r != 0)
-		panic("pci", "pci_ids: can't talk to PCI", r);
-
-	if (m.m_type != 0)
-		panic("pci", "pci_ids: got bad reply from PCI", m.m_type);
-	*vidp= m.m1_i1;
-	*didp= m.m1_i2;
-	printf("pci_ids: %04x/%04x\n", *vidp, *didp);
-}
-
Index: trunk/minix/lib/syslib/pci_init.c
===================================================================
--- trunk/minix/lib/syslib/pci_init.c	(revision 9)
+++ 	(revision )
@@ -1,15 +1,0 @@
-/*
-pci_init.c
-*/
-
-#include "syslib.h"
-#include <minix/sysutil.h>
-
-/*===========================================================================*
- *				pci_init				     *
- *===========================================================================*/
-PUBLIC void pci_init()
-{
-	pci_init1("");
-}
-
Index: trunk/minix/lib/syslib/pci_init1.c
===================================================================
--- trunk/minix/lib/syslib/pci_init1.c	(revision 9)
+++ 	(revision )
@@ -1,43 +1,0 @@
-/*
-pci_init1.c
-*/
-
-#include "pci.h"
-#include "syslib.h"
-#include <string.h>
-#include <unistd.h>
-#include <minix/sysutil.h>
-
-int pci_procnr= ANY;
-
-/*===========================================================================*
- *				pci_init1				     *
- *===========================================================================*/
-PUBLIC void pci_init1(name)
-char *name;
-{
-	int r;
-	size_t len;
-	message m;
-
-	r= _pm_findproc("pci", &pci_procnr);
-	if (r != 0)
-		panic("pci", "pci_init1: _pm_findproc failed for 'pci'", r);
-
-	m.m_type= BUSC_PCI_INIT;
-	len= strlen(name);
-	if (len+1 <= sizeof(m.m3_ca1))
-		strcpy(m.m3_ca1, name);
-	else
-	{
-		len= sizeof(m.m3_ca1)-1;
-		memcpy(m.m3_ca1, name, len);
-		m.m3_ca1[len]= '\0';
-	}
-	r= sendrec(pci_procnr, &m);
-	if (r != 0)
-		panic("pci", "pci_init1: can't talk to PCI", r);
-	if (m.m_type != 0)
-		panic("pci", "pci_init1: got bad reply from PCI", m.m_type);
-}
-
Index: trunk/minix/lib/syslib/pci_next_dev.c
===================================================================
--- trunk/minix/lib/syslib/pci_next_dev.c	(revision 9)
+++ 	(revision )
@@ -1,43 +1,0 @@
-/*
-pci_next_dev.c
-*/
-
-#include "pci.h"
-#include "syslib.h"
-#include <minix/sysutil.h>
-
-/*===========================================================================*
- *				pci_next_dev				     *
- *===========================================================================*/
-PUBLIC int pci_next_dev(devindp, vidp, didp)
-int *devindp;
-u16_t *vidp;
-u16_t *didp;
-{
-	int r;
-	message m;
-
-	m.m_type= BUSC_PCI_NEXT_DEV;
-	m.m1_i1= *devindp;
-
-	r= sendrec(pci_procnr, &m);
-	if (r != 0)
-		panic("pci", "pci_next_dev: can't talk to PCI", r);
-
-	if (m.m_type == 1)
-	{
-		*devindp= m.m1_i1;
-		*vidp= m.m1_i2;
-		*didp= m.m1_i3;
-#if 0
-		printf("pci_next_dev: got device %d, %04x/%04x\n", 
-			*devindp, *vidp, *didp);
-#endif
-		return 1;
-	}
-	if (m.m_type != 0)
-		panic("pci", "pci_next_dev: got bad reply from PCI", m.m_type);
-
-	return 0;
-}
-
Index: trunk/minix/lib/syslib/pci_rescan_bus.c
===================================================================
--- trunk/minix/lib/syslib/pci_rescan_bus.c	(revision 9)
+++ 	(revision )
@@ -1,31 +1,0 @@
-/*
-pci_rescan_bus.c
-*/
-
-#include "pci.h"
-#include "syslib.h"
-#include <minix/sysutil.h>
-
-/*===========================================================================*
- *				pci_rescan_bus				     *
- *===========================================================================*/
-PUBLIC void pci_rescan_bus(busnr)
-u8_t busnr;
-{
-	int r;
-	message m;
-
-	m.m_type= BUSC_PCI_RESCAN;
-	m.m1_i1= busnr;
-
-	r= sendrec(pci_procnr, &m);
-	if (r != 0)
-		panic("pci", "pci_rescan_bus: can't talk to PCI", r);
-
-	if (m.m_type != 0)
-	{
-		panic("pci", "pci_rescan_bus: got bad reply from PCI",
-			m.m_type);
-	}
-}
-
Index: trunk/minix/lib/syslib/pci_reserve.c
===================================================================
--- trunk/minix/lib/syslib/pci_reserve.c	(revision 9)
+++ 	(revision )
@@ -1,28 +1,0 @@
-/*
-pci_reserve.c
-*/
-
-#include "pci.h"
-#include "syslib.h"
-#include <minix/sysutil.h>
-
-/*===========================================================================*
- *				pci_reserve				     *
- *===========================================================================*/
-PUBLIC void pci_reserve(devind)
-int devind;
-{
-	int r;
-	message m;
-
-	m.m_type= BUSC_PCI_RESERVE;
-	m.m1_i1= devind;
-
-	r= sendrec(pci_procnr, &m);
-	if (r != 0)
-		panic("pci", "pci_reserve: can't talk to PCI", r);
-
-	if (m.m_type != 0)
-		panic("pci", "pci_reserve: got bad reply from PCI", m.m_type);
-}
-
Index: trunk/minix/lib/syslib/pci_slot_name.c
===================================================================
--- trunk/minix/lib/syslib/pci_slot_name.c	(revision 9)
+++ 	(revision )
@@ -1,39 +1,0 @@
-/*
-pci_slot_name.c
-*/
-
-#include "pci.h"
-#include "syslib.h"
-#include <minix/sysutil.h>
-
-/*===========================================================================*
- *				pci_slot_name				     *
- *===========================================================================*/
-PUBLIC char *pci_slot_name(devind)
-int devind;
-{
-	static char name[80];	/* We need a better interface for this */
-
-	int r;
-	message m;
-
-	m.m_type= BUSC_PCI_SLOT_NAME;
-	m.m1_i1= devind;
-	m.m1_i2= sizeof(name);
-	m.m1_p1= name;
-
-	r= sendrec(pci_procnr, &m);
-	if (r != 0)
-		panic("pci", "pci_slot_name: can't talk to PCI", r);
-
-	if (m.m_type != 0)
-		panic("pci", "pci_slot_name: got bad reply from PCI", m.m_type);
-
-	name[sizeof(name)-1]= '\0';	/* Make sure that the string is NUL
-					 * terminated.
-					 */
-
-	printf("pci_slot_name: got name %s\n", name);
-	return name;
-}
-
Index: trunk/minix/lib/syslib/sys_abort.c
===================================================================
--- trunk/minix/lib/syslib/sys_abort.c	(revision 9)
+++ 	(revision )
@@ -1,21 +1,0 @@
-#include "syslib.h"
-#include <stdarg.h>
-#include <unistd.h>
-
-PUBLIC int sys_abort(int how, ...)
-{
-/* Something awful has happened.  Abandon ship. */
-
-  message m;
-  va_list ap;
-
-  va_start(ap, how);
-  if ((m.ABRT_HOW = how) == RBT_MONITOR) {
-	m.ABRT_MON_ENDPT = va_arg(ap, int);
-	m.ABRT_MON_ADDR = va_arg(ap, char *);
-	m.ABRT_MON_LEN = va_arg(ap, size_t);
-  }
-  va_end(ap);
-
-  return(_taskcall(SYSTASK, SYS_ABORT, &m));
-}
Index: trunk/minix/lib/syslib/sys_endsig.c
===================================================================
--- trunk/minix/lib/syslib/sys_endsig.c	(revision 9)
+++ 	(revision )
@@ -1,16 +1,0 @@
-#include "syslib.h"
-
-/*===========================================================================*
- *                                sys_endksig				     *
- *===========================================================================*/
-PUBLIC int sys_endksig(proc_nr)
-int proc_nr;				/* process number */
-{
-    message m;
-    int result;
-
-    m.SIG_ENDPT = proc_nr;
-    result = _taskcall(SYSTASK, SYS_ENDKSIG, &m);
-    return(result);
-}
-
Index: trunk/minix/lib/syslib/sys_eniop.c
===================================================================
--- trunk/minix/lib/syslib/sys_eniop.c	(revision 9)
+++ 	(revision )
@@ -1,14 +1,0 @@
-#include "syslib.h"
-
-/*===========================================================================*
- *                               sys_enable_iop				     *    
- *===========================================================================*/
-PUBLIC int sys_enable_iop(proc_nr_e)
-int proc_nr_e;			/* number of process to allow I/O */
-{
-    message m_iop;
-    m_iop.IO_ENDPT = proc_nr_e;
-    return _taskcall(SYSTASK, SYS_IOPENABLE, &m_iop);
-}
-
-
Index: trunk/minix/lib/syslib/sys_exec.c
===================================================================
--- trunk/minix/lib/syslib/sys_exec.c	(revision 9)
+++ 	(revision )
@@ -1,18 +1,0 @@
-#include "syslib.h"
-
-PUBLIC int sys_exec(proc, ptr, prog_name, initpc)
-int proc;			/* process that did exec */
-char *ptr;			/* new stack pointer */
-char *prog_name;		/* name of the new program */
-vir_bytes initpc;
-{
-/* A process has exec'd.  Tell the kernel. */
-
-  message m;
-
-  m.PR_ENDPT = proc;
-  m.PR_STACK_PTR = ptr;
-  m.PR_NAME_PTR = prog_name;
-  m.PR_IP_PTR = (char *)initpc;
-  return(_taskcall(SYSTASK, SYS_EXEC, &m));
-}
Index: trunk/minix/lib/syslib/sys_exit.c
===================================================================
--- trunk/minix/lib/syslib/sys_exit.c	(revision 9)
+++ 	(revision )
@@ -1,17 +1,0 @@
-#include "syslib.h"
-
-/*===========================================================================*
- *                                sys_exit			     	     *
- *===========================================================================*/
-PUBLIC int sys_exit(proc)
-int proc;			/* which process has exited */
-{
-/* A process has exited. PM tells the kernel. In addition this call can be
- * used by system processes to directly exit without passing through the
- * PM. This should be used with care to prevent inconsistent PM tables. 
- */
-  message m;
-
-  m.PR_ENDPT = proc;
-  return(_taskcall(SYSTASK, SYS_EXIT, &m));
-}
Index: trunk/minix/lib/syslib/sys_fork.c
===================================================================
--- trunk/minix/lib/syslib/sys_fork.c	(revision 9)
+++ 	(revision )
@@ -1,18 +1,0 @@
-#include "syslib.h"
-
-PUBLIC int sys_fork(parent, child, child_endpoint)
-int parent;			/* process doing the fork */
-int child;			/* which proc has been created by the fork */
-int *child_endpoint;
-{
-/* A process has forked.  Tell the kernel. */
-
-  message m;
-  int r;
-
-  m.PR_ENDPT = parent;
-  m.PR_SLOT = child;
-  r = _taskcall(SYSTASK, SYS_FORK, &m);
-  *child_endpoint = m.PR_ENDPT;
-  return r;
-}
Index: trunk/minix/lib/syslib/sys_getinfo.c
===================================================================
--- trunk/minix/lib/syslib/sys_getinfo.c	(revision 9)
+++ 	(revision )
@@ -1,25 +1,0 @@
-#include "syslib.h"
-
-/*===========================================================================*
- *                                sys_getinfo				     *
- *===========================================================================*/
-PUBLIC int sys_getinfo(request, ptr, len, ptr2, len2)
-int request; 				/* system info requested */
-void *ptr;				/* pointer where to store it */
-int len;				/* max length of value to get */
-void *ptr2;				/* second pointer */
-int len2;				/* length or process nr */ 
-{
-    message m;
-
-    m.I_REQUEST = request;
-    m.I_ENDPT = SELF;			/* always store values at caller */
-    m.I_VAL_PTR = ptr;
-    m.I_VAL_LEN = len;
-    m.I_VAL_PTR2 = ptr2;
-    m.I_VAL_LEN2_E = len2;
-
-    return(_taskcall(SYSTASK, SYS_GETINFO, &m));
-}
-
-
Index: trunk/minix/lib/syslib/sys_getsig.c
===================================================================
--- trunk/minix/lib/syslib/sys_getsig.c	(revision 9)
+++ 	(revision )
@@ -1,18 +1,0 @@
-#include "syslib.h"
-
-/*===========================================================================*
- *                                sys_getksig				     *
- *===========================================================================*/
-PUBLIC int sys_getksig(k_proc_nr, k_sig_map)
-int *k_proc_nr;				/* return process number here */
-sigset_t *k_sig_map;			/* return signal map here */
-{
-    message m;
-    int result;
-
-    result = _taskcall(SYSTASK, SYS_GETKSIG, &m);
-    *k_proc_nr = m.SIG_ENDPT;
-    *k_sig_map = (sigset_t) m.SIG_MAP;
-    return(result);
-}
-
Index: trunk/minix/lib/syslib/sys_in.c
===================================================================
--- trunk/minix/lib/syslib/sys_in.c	(revision 9)
+++ 	(revision )
@@ -1,22 +1,0 @@
-#include "syslib.h"
-
-/*===========================================================================*
- *                                sys_in				     *
- *===========================================================================*/
-PUBLIC int sys_in(port, value, type)
-int port; 				/* port address to read from */
-unsigned long *value;			/* pointer where to store value */
-int type;				/* byte, word, long */
-{
-    message m_io;
-    int result;
-
-    m_io.DIO_TYPE = type;
-    m_io.DIO_REQUEST = DIO_INPUT;
-    m_io.DIO_PORT = port;
-
-    result = _taskcall(SYSTASK, SYS_DEVIO, &m_io);
-    *value = m_io.DIO_VALUE;
-    return(result);
-}
-
Index: trunk/minix/lib/syslib/sys_int86.c
===================================================================
--- trunk/minix/lib/syslib/sys_int86.c	(revision 9)
+++ 	(revision )
@@ -1,17 +1,0 @@
-#include "syslib.h"
-
-/*===========================================================================*
- *                                sys_int86				     *
- *===========================================================================*/
-PUBLIC int sys_int86(reg86p)
-struct reg86u *reg86p;
-{
-    message m;
-    int result;
-
-    m.m1_p1= (char *)reg86p;
-
-    result = _taskcall(SYSTASK, SYS_INT86, &m);
-    return(result);
-}
-
Index: trunk/minix/lib/syslib/sys_irqctl.c
===================================================================
--- trunk/minix/lib/syslib/sys_irqctl.c	(revision 9)
+++ 	(revision )
@@ -1,26 +1,0 @@
-#include "syslib.h"
-
-/*===========================================================================*
- *                               sys_irqctl				     *
- *===========================================================================*/
-PUBLIC int sys_irqctl(req, irq_vec, policy, hook_id)
-int req;				/* IRQ control request */
-int irq_vec;				/* IRQ vector to control */
-int policy;				/* bit mask for policy flags */
-int *hook_id;				/* ID of IRQ hook at kernel */
-{
-    message m_irq;
-    int s;
-    
-    m_irq.m_type = SYS_IRQCTL;
-    m_irq.IRQ_REQUEST = req;
-    m_irq.IRQ_VECTOR = irq_vec;
-    m_irq.IRQ_POLICY = policy;
-    m_irq.IRQ_HOOK_ID = *hook_id;
-    
-    s = _taskcall(SYSTASK, SYS_IRQCTL, &m_irq);
-    if (req == IRQ_SETPOLICY) *hook_id = m_irq.IRQ_HOOK_ID;
-    return(s);
-}
-
-
Index: trunk/minix/lib/syslib/sys_kill.c
===================================================================
--- trunk/minix/lib/syslib/sys_kill.c	(revision 9)
+++ 	(revision )
@@ -1,14 +1,0 @@
-#include "syslib.h"
-
-PUBLIC int sys_kill(proc, signr)
-int proc;			/* which proc has exited */
-int signr;			/* signal number: 1 - 16 */
-{
-/* A proc has to be signaled via MM.  Tell the kernel. */
-  message m;
-
-  m.SIG_ENDPT = proc;
-  m.SIG_NUMBER = signr;
-  return(_taskcall(SYSTASK, SYS_KILL, &m));
-}
-
Index: trunk/minix/lib/syslib/sys_memset.c
===================================================================
--- trunk/minix/lib/syslib/sys_memset.c	(revision 9)
+++ 	(revision )
@@ -1,16 +1,0 @@
-#include "syslib.h"
-
-PUBLIC int sys_memset(unsigned long pattern, phys_bytes base, phys_bytes bytes)
-{
-/* Zero a block of data.  */
-  message mess;
-
-  if (bytes == 0L) return(OK);
-
-  mess.MEM_PTR = (char *) base;
-  mess.MEM_COUNT   = bytes;
-  mess.MEM_PATTERN = pattern;
-
-  return(_taskcall(SYSTASK, SYS_MEMSET, &mess));
-}
-
Index: trunk/minix/lib/syslib/sys_newmap.c
===================================================================
--- trunk/minix/lib/syslib/sys_newmap.c	(revision 9)
+++ 	(revision )
@@ -1,14 +1,0 @@
-#include "syslib.h"
-
-PUBLIC int sys_newmap(proc, ptr)
-int proc;			/* process whose map is to be changed */
-struct mem_map *ptr;		/* pointer to new map */
-{
-/* A process has been assigned a new memory map.  Tell the kernel. */
-
-  message m;
-
-  m.PR_ENDPT = proc;
-  m.PR_MEM_PTR = (char *) ptr;
-  return(_taskcall(SYSTASK, SYS_NEWMAP, &m));
-}
Index: trunk/minix/lib/syslib/sys_nice.c
===================================================================
--- trunk/minix/lib/syslib/sys_nice.c	(revision 9)
+++ 	(revision )
@@ -1,13 +1,0 @@
-#include "syslib.h"
-
-/*===========================================================================*
- *                                sys_nice			     	     *
- *===========================================================================*/
-PUBLIC int sys_nice(int proc, int prio)
-{
-  message m;
-
-  m.m1_i1 = proc;
-  m.m1_i2 = prio;
-  return(_taskcall(SYSTASK, SYS_NICE, &m));
-}
Index: trunk/minix/lib/syslib/sys_out.c
===================================================================
--- trunk/minix/lib/syslib/sys_out.c	(revision 9)
+++ 	(revision )
@@ -1,20 +1,0 @@
-#include "syslib.h"
-
-/*===========================================================================*
- *                                sys_out				     *
- *===========================================================================*/
-PUBLIC int sys_out(port, value, type)
-int port; 				/* port address to write to */
-unsigned long value;			/* value to write */
-int type;				/* byte, word, long */
-{
-    message m_io;
-
-    m_io.DIO_TYPE = type;
-    m_io.DIO_REQUEST = DIO_OUTPUT;
-    m_io.DIO_PORT = port;
-    m_io.DIO_VALUE = value;
-
-    return _taskcall(SYSTASK, SYS_DEVIO, &m_io);
-}
-
Index: trunk/minix/lib/syslib/sys_physcopy.c
===================================================================
--- trunk/minix/lib/syslib/sys_physcopy.c	(revision 9)
+++ 	(revision )
@@ -1,30 +1,0 @@
-#include "syslib.h"
-
-PUBLIC int sys_physcopy(src_proc, src_seg, src_vir, 
-	dst_proc, dst_seg, dst_vir, bytes)
-int src_proc;			/* source process */
-int src_seg;			/* source memory segment */
-vir_bytes src_vir;		/* source virtual address */
-int dst_proc;			/* destination process */
-int dst_seg;			/* destination memory segment */
-vir_bytes dst_vir;		/* destination virtual address */
-phys_bytes bytes;		/* how many bytes */
-{
-/* Transfer a block of data.  The source and destination can each either be a
- * process number or SELF (to indicate own process number). Virtual addresses 
- * are offsets within LOCAL_SEG (text, stack, data), REMOTE_SEG, or BIOS_SEG. 
- * Physicall addressing is also possible with PHYS_SEG.
- */
-
-  message copy_mess;
-
-  if (bytes == 0L) return(OK);
-  copy_mess.CP_SRC_ENDPT = src_proc;
-  copy_mess.CP_SRC_SPACE = src_seg;
-  copy_mess.CP_SRC_ADDR = (long) src_vir;
-  copy_mess.CP_DST_ENDPT = dst_proc;
-  copy_mess.CP_DST_SPACE = dst_seg;
-  copy_mess.CP_DST_ADDR = (long) dst_vir;
-  copy_mess.CP_NR_BYTES = (long) bytes;
-  return(_taskcall(SYSTASK, SYS_PHYSCOPY, &copy_mess));
-}
Index: trunk/minix/lib/syslib/sys_privctl.c
===================================================================
--- trunk/minix/lib/syslib/sys_privctl.c	(revision 9)
+++ 	(revision )
@@ -1,13 +1,0 @@
-#include "syslib.h"
-
-int sys_privctl(int proc, int request, int i, void *p)
-{
-  message m;
-
-  m.CTL_ENDPT = proc;
-  m.CTL_REQUEST = request;
-  m.CTL_MM_PRIV = i;
-  m.CTL_ARG_PTR = p;
-
-  return _taskcall(SYSTASK, SYS_PRIVCTL, &m);
-}
Index: trunk/minix/lib/syslib/sys_sdevio.c
===================================================================
--- trunk/minix/lib/syslib/sys_sdevio.c	(revision 9)
+++ 	(revision )
@@ -1,26 +1,0 @@
-#include "syslib.h"
-
-/*===========================================================================*
- *                                sys_sdevio				     *
- *===========================================================================*/
-PUBLIC int sys_sdevio(req, port, type, proc_nr, buffer, count)
-int req;				/* request: DIO_INPUT/ DIO_OUTPUT */
-long port; 				/* port address to read from */
-int type;				/* byte, word, long */
-int proc_nr;				/* process where buffer is */
-void *buffer;				/* pointer to buffer */
-int count;				/* number of elements */
-{
-    message m_io;
-    int result;
-
-    m_io.DIO_REQUEST = req;
-    m_io.DIO_TYPE = type;
-    m_io.DIO_PORT = port;
-    m_io.DIO_VEC_ENDPT = proc_nr;
-    m_io.DIO_VEC_ADDR = buffer;
-    m_io.DIO_VEC_SIZE = count;
-
-    return(_taskcall(SYSTASK, SYS_SDEVIO, &m_io));
-}
-
Index: trunk/minix/lib/syslib/sys_segctl.c
===================================================================
--- trunk/minix/lib/syslib/sys_segctl.c	(revision 9)
+++ 	(revision )
@@ -1,24 +1,0 @@
-#include "syslib.h"
-
-/*===========================================================================*
- *                               sys_segctl				     *    
- *===========================================================================*/
-PUBLIC int sys_segctl(index, seg, off, phys, size)
-int *index;				/* return index of remote segment */
-u16_t *seg;				/* return segment selector here */
-vir_bytes *off;				/* return offset in segment here */
-phys_bytes phys;			/* physical address to convert */
-vir_bytes size;				/* size of segment */
-{
-    message m;
-    int s;
-    m.SEG_PHYS = phys;
-    m.SEG_SIZE = size;
-    s = _taskcall(SYSTASK, SYS_SEGCTL, &m);
-    *index = (int) m.SEG_INDEX;
-    *seg = (u16_t) m.SEG_SELECT;
-    *off = (vir_bytes) m.SEG_OFFSET;
-    return s;
-}
-
-
Index: trunk/minix/lib/syslib/sys_setalarm.c
===================================================================
--- trunk/minix/lib/syslib/sys_setalarm.c	(revision 9)
+++ 	(revision )
@@ -1,18 +1,0 @@
-#include "syslib.h"
-
-/*===========================================================================*
- *                               sys_setalarm		     	     	     *
- *===========================================================================*/
-PUBLIC int sys_setalarm(exp_time, abs_time)
-clock_t exp_time;	/* expiration time for the alarm */
-int abs_time;		/* use absolute or relative expiration time */
-{
-/* Ask the SYSTEM schedule a synchronous alarm for the caller. The process
- * number can be SELF if the caller doesn't know its process number.
- */
-    message m;
-    m.ALRM_EXP_TIME = exp_time;		/* the expiration time */
-    m.ALRM_ABS_TIME = abs_time;		/* time is absolute? */
-    return _taskcall(SYSTASK, SYS_SETALARM, &m);
-}
-
Index: trunk/minix/lib/syslib/sys_sigreturn.c
===================================================================
--- trunk/minix/lib/syslib/sys_sigreturn.c	(revision 9)
+++ 	(revision )
@@ -1,18 +1,0 @@
-#include "syslib.h"
-
-/*===========================================================================*
- *                                sys_sigreturn				     *
- *===========================================================================*/
-PUBLIC int sys_sigreturn(proc_nr, sig_ctxt)
-int proc_nr;				/* for which process */
-struct sigmsg *sig_ctxt;		/* POSIX style handling */
-{
-    message m;
-    int result;
-
-    m.SIG_ENDPT = proc_nr;
-    m.SIG_CTXT_PTR = (char *) sig_ctxt;
-    result = _taskcall(SYSTASK, SYS_SIGRETURN, &m);
-    return(result);
-}
-
Index: trunk/minix/lib/syslib/sys_sigsend.c
===================================================================
--- trunk/minix/lib/syslib/sys_sigsend.c	(revision 9)
+++ 	(revision )
@@ -1,18 +1,0 @@
-#include "syslib.h"
-
-/*===========================================================================*
- *                                sys_sigsend				     *
- *===========================================================================*/
-PUBLIC int sys_sigsend(proc_nr, sig_ctxt)
-int proc_nr;				/* for which process */
-struct sigmsg *sig_ctxt;		/* POSIX style handling */
-{
-    message m;
-    int result;
-
-    m.SIG_ENDPT = proc_nr;
-    m.SIG_CTXT_PTR = (char *) sig_ctxt;
-    result = _taskcall(SYSTASK, SYS_SIGSEND, &m);
-    return(result);
-}
-
Index: trunk/minix/lib/syslib/sys_svrctl.c
===================================================================
--- trunk/minix/lib/syslib/sys_svrctl.c	(revision 9)
+++ 	(revision )
@@ -1,13 +1,0 @@
-#include "syslib.h"
-
-int sys_svrctl(int proc, int request, int priv, vir_bytes argp)
-{
-  message m;
-
-  m.CTL_ENDPT = proc;
-  m.CTL_REQUEST = request;
-  m.CTL_MM_PRIV = priv;
-  m.CTL_ARG_PTR = (char *) argp;
-
-  return _taskcall(SYSTASK, SYS_PRIVCTL, &m);
-}
Index: trunk/minix/lib/syslib/sys_times.c
===================================================================
--- trunk/minix/lib/syslib/sys_times.c	(revision 9)
+++ 	(revision )
@@ -1,19 +1,0 @@
-#include "syslib.h"
-
-PUBLIC int sys_times(proc, ptr)
-int proc;			/* proc whose times are needed */
-clock_t ptr[5];			/* pointer to time buffer */
-{
-/* Fetch the accounting info for a proc. */
-  message m;
-  int r;
-
-  m.T_ENDPT = proc;
-  r = _taskcall(SYSTASK, SYS_TIMES, &m);
-  ptr[0] = m.T_USER_TIME;
-  ptr[1] = m.T_SYSTEM_TIME;
-  ptr[2] = m.T_CHILD_UTIME;
-  ptr[3] = m.T_CHILD_STIME;
-  ptr[4] = m.T_BOOT_TICKS;
-  return(r);
-}
Index: trunk/minix/lib/syslib/sys_trace.c
===================================================================
--- trunk/minix/lib/syslib/sys_trace.c	(revision 9)
+++ 	(revision )
@@ -1,17 +1,0 @@
-#include "syslib.h"
-
-PUBLIC int sys_trace(req, proc_nr, addr, data_p)
-int req, proc_nr;
-long addr, *data_p;
-{
-  message m;
-  int r;
-
-  m.CTL_ENDPT = proc_nr;
-  m.CTL_REQUEST = req;
-  m.CTL_ADDRESS = addr;
-  if (data_p) m.CTL_DATA = *data_p;
-  r = _taskcall(SYSTASK, SYS_TRACE, &m);
-  if (data_p) *data_p = m.CTL_DATA;
-  return(r);
-}
Index: trunk/minix/lib/syslib/sys_umap.c
===================================================================
--- trunk/minix/lib/syslib/sys_umap.c	(revision 9)
+++ 	(revision )
@@ -1,25 +1,0 @@
-#include "syslib.h"
-
-/*===========================================================================*
- *                                sys_umap				     *
- *===========================================================================*/
-PUBLIC int sys_umap(proc_nr, seg, vir_addr, bytes, phys_addr)
-int proc_nr; 				/* process number to do umap for */
-int seg;				/* T, D, or S segment */
-vir_bytes vir_addr;			/* address in bytes with segment*/
-vir_bytes bytes;			/* number of bytes to be copied */
-phys_bytes *phys_addr;			/* placeholder for result */
-{
-    message m;
-    int result;
-
-    m.CP_SRC_ENDPT = proc_nr;
-    m.CP_SRC_SPACE = seg;
-    m.CP_SRC_ADDR = vir_addr;
-    m.CP_NR_BYTES = bytes;
-
-    result = _taskcall(SYSTASK, SYS_UMAP, &m);
-    *phys_addr = m.CP_DST_ADDR;
-    return(result);
-}
-
Index: trunk/minix/lib/syslib/sys_vinb.c
===================================================================
--- trunk/minix/lib/syslib/sys_vinb.c	(revision 9)
+++ 	(revision )
@@ -1,18 +1,0 @@
-#include "syslib.h"
-
-/*===========================================================================*
- *                                sys_vinb				     *
- *===========================================================================*/
-PUBLIC int sys_vinb(pvb_pairs, nr_ports)
-pvb_pair_t *pvb_pairs;			/* (port,byte-value)-pairs */
-int nr_ports;				/* nr of pairs to be processed */
-{
-    message m_io;
-
-    m_io.DIO_TYPE = DIO_BYTE;
-    m_io.DIO_REQUEST = DIO_INPUT;
-    m_io.DIO_VEC_ADDR = (char *) pvb_pairs;
-    m_io.DIO_VEC_SIZE = nr_ports;
-    return _taskcall(SYSTASK, SYS_VDEVIO, &m_io);
-}
-
Index: trunk/minix/lib/syslib/sys_vinl.c
===================================================================
--- trunk/minix/lib/syslib/sys_vinl.c	(revision 9)
+++ 	(revision )
@@ -1,18 +1,0 @@
-#include "syslib.h"
-
-/*===========================================================================*
- *                                sys_vinl				     *
- *===========================================================================*/
-PUBLIC int sys_vinl(pvl_pairs, nr_ports)
-pvl_pair_t *pvl_pairs;			/* (port,long-value)-pairs */
-int nr_ports;				/* nr of pairs to be processed */
-{
-    message m_io;
-
-    m_io.DIO_TYPE = DIO_LONG;
-    m_io.DIO_REQUEST = DIO_INPUT;
-    m_io.DIO_VEC_ADDR = (char *) pvl_pairs;
-    m_io.DIO_VEC_SIZE = nr_ports;
-    return _taskcall(SYSTASK, SYS_VDEVIO, &m_io);
-}
-
Index: trunk/minix/lib/syslib/sys_vinw.c
===================================================================
--- trunk/minix/lib/syslib/sys_vinw.c	(revision 9)
+++ 	(revision )
@@ -1,19 +1,0 @@
-#include "syslib.h"
-
-
-/*===========================================================================*
- *                                sys_vinw				     *
- *===========================================================================*/
-PUBLIC int sys_vinw(pvw_pairs, nr_ports)
-pvw_pair_t *pvw_pairs;			/* (port,word-value)-pairs */
-int nr_ports;				/* nr of pairs to be processed */
-{
-    message m_io;
-
-    m_io.DIO_TYPE = DIO_WORD;
-    m_io.DIO_REQUEST = DIO_INPUT;
-    m_io.DIO_VEC_ADDR = (char *) pvw_pairs;
-    m_io.DIO_VEC_SIZE = nr_ports;
-    return _taskcall(SYSTASK, SYS_VDEVIO, &m_io);
-}
-
Index: trunk/minix/lib/syslib/sys_vircopy.c
===================================================================
--- trunk/minix/lib/syslib/sys_vircopy.c	(revision 9)
+++ 	(revision )
@@ -1,29 +1,0 @@
-#include "syslib.h"
-
-PUBLIC int sys_vircopy(src_proc, src_seg, src_vir, 
-	dst_proc, dst_seg, dst_vir, bytes)
-int src_proc;			/* source process */
-int src_seg;			/* source memory segment */
-vir_bytes src_vir;		/* source virtual address */
-int dst_proc;			/* destination process */
-int dst_seg;			/* destination memory segment */
-vir_bytes dst_vir;		/* destination virtual address */
-phys_bytes bytes;		/* how many bytes */
-{
-/* Transfer a block of data.  The source and destination can each either be a
- * process number or SELF (to indicate own process number). Virtual addresses 
- * are offsets within LOCAL_SEG (text, stack, data), REMOTE_SEG, or BIOS_SEG. 
- */
-
-  message copy_mess;
-
-  if (bytes == 0L) return(OK);
-  copy_mess.CP_SRC_ENDPT = src_proc;
-  copy_mess.CP_SRC_SPACE = src_seg;
-  copy_mess.CP_SRC_ADDR = (long) src_vir;
-  copy_mess.CP_DST_ENDPT = dst_proc;
-  copy_mess.CP_DST_SPACE = dst_seg;
-  copy_mess.CP_DST_ADDR = (long) dst_vir;
-  copy_mess.CP_NR_BYTES = (long) bytes;
-  return(_taskcall(SYSTASK, SYS_VIRCOPY, &copy_mess));
-}
Index: trunk/minix/lib/syslib/sys_vm_map.c
===================================================================
--- trunk/minix/lib/syslib/sys_vm_map.c	(revision 9)
+++ 	(revision )
@@ -1,25 +1,0 @@
-#include "syslib.h"
-
-/*===========================================================================*
- *                                sys_vm_map				     *
- *===========================================================================*/
-PUBLIC int sys_vm_map(proc_nr, do_map, base, size, offset)
-int proc_nr;
-int do_map;
-phys_bytes base;
-phys_bytes size;
-phys_bytes offset;
-{
-    message m;
-    int result;
-
-    m.m4_l1= proc_nr;
-    m.m4_l2= do_map;
-    m.m4_l3= base;
-    m.m4_l4= size;
-    m.m4_l5= offset;
-
-    result = _taskcall(SYSTASK, SYS_VM_MAP, &m);
-    return(result);
-}
-
Index: trunk/minix/lib/syslib/sys_vm_setbuf.c
===================================================================
--- trunk/minix/lib/syslib/sys_vm_setbuf.c	(revision 9)
+++ 	(revision )
@@ -1,21 +1,0 @@
-#include "syslib.h"
-
-/*===========================================================================*
- *                                sys_vm_setbuf				     *
- *===========================================================================*/
-PUBLIC int sys_vm_setbuf(base, size, high)
-phys_bytes base;
-phys_bytes size;
-phys_bytes high;
-{
-    message m;
-    int result;
-
-    m.m4_l1= base;
-    m.m4_l2= size;
-    m.m4_l3= high;
-
-    result = _taskcall(SYSTASK, SYS_VM_SETBUF, &m);
-    return(result);
-}
-
Index: trunk/minix/lib/syslib/sys_voutb.c
===================================================================
--- trunk/minix/lib/syslib/sys_voutb.c	(revision 9)
+++ 	(revision )
@@ -1,18 +1,0 @@
-#include "syslib.h"
-
-/*===========================================================================*
- *                                sys_voutb				     *
- *===========================================================================*/
-PUBLIC int sys_voutb(pvb_pairs, nr_ports)
-pvb_pair_t *pvb_pairs;			/* (port,byte-value)-pairs */
-int nr_ports;				/* nr of pairs to be processed */
-{
-    message m_io;
-    m_io.DIO_TYPE = DIO_BYTE;
-    m_io.DIO_REQUEST = DIO_OUTPUT;
-    m_io.DIO_VEC_ADDR = (char *) pvb_pairs;
-    m_io.DIO_VEC_SIZE = nr_ports;
-    return _taskcall(SYSTASK, SYS_VDEVIO, &m_io);
-}
-
-
Index: trunk/minix/lib/syslib/sys_voutl.c
===================================================================
--- trunk/minix/lib/syslib/sys_voutl.c	(revision 9)
+++ 	(revision )
@@ -1,18 +1,0 @@
-#include "syslib.h"
-
-/*===========================================================================*
- *                                sys_voutl				     *
- *===========================================================================*/
-PUBLIC int sys_voutl(pvl_pairs, nr_ports)
-pvl_pair_t *pvl_pairs;			/* (port,long-value)-pairs */
-int nr_ports;				/* nr of pairs to be processed */
-{
-    message m_io;
-
-    m_io.DIO_TYPE = DIO_LONG;
-    m_io.DIO_REQUEST = DIO_OUTPUT;
-    m_io.DIO_VEC_ADDR = (char *) pvl_pairs;
-    m_io.DIO_VEC_SIZE = nr_ports;
-    return _taskcall(SYSTASK, SYS_VDEVIO, &m_io);
-}
-
Index: trunk/minix/lib/syslib/sys_voutw.c
===================================================================
--- trunk/minix/lib/syslib/sys_voutw.c	(revision 9)
+++ 	(revision )
@@ -1,19 +1,0 @@
-#include "syslib.h"
-
-
-/*===========================================================================*
- *                                sys_voutw				     *
- *===========================================================================*/
-PUBLIC int sys_voutw(pvw_pairs, nr_ports)
-pvw_pair_t *pvw_pairs;			/* (port,word-value)-pairs */
-int nr_ports;				/* nr of pairs to be processed */
-{
-    message m_io;
-
-    m_io.DIO_TYPE = DIO_WORD;
-    m_io.DIO_REQUEST = DIO_OUTPUT;
-    m_io.DIO_VEC_ADDR = (char *) pvw_pairs;
-    m_io.DIO_VEC_SIZE = nr_ports;
-    return _taskcall(SYSTASK, SYS_VDEVIO, &m_io);
-}
-
Index: trunk/minix/lib/syslib/syslib.h
===================================================================
--- trunk/minix/lib/syslib/syslib.h	(revision 9)
+++ 	(revision )
@@ -1,7 +1,0 @@
-/*	syslib.h - System library common definitions.	*/
-
-#define _SYSTEM
-
-#include <lib.h>
-#include <minix/com.h>
-#include <minix/syslib.h>
Index: trunk/minix/lib/syslib/taskcall.c
===================================================================
--- trunk/minix/lib/syslib/taskcall.c	(revision 9)
+++ 	(revision )
@@ -1,20 +1,0 @@
-/* _taskcall() is the same as _syscall() except it returns negative error
- * codes directly and not in errno.  This is a better interface for MM and
- * FS.
- */
-
-#include <lib.h>
-#include <minix/syslib.h>
-
-PUBLIC int _taskcall(who, syscallnr, msgptr)
-int who;
-int syscallnr;
-register message *msgptr;
-{
-  int status;
-
-  msgptr->m_type = syscallnr;
-  status = _sendrec(who, msgptr);
-  if (status != 0) return(status);
-  return(msgptr->m_type);
-}
Index: trunk/minix/lib/sysutil/Makedepend-ack
===================================================================
--- trunk/minix/lib/sysutil/Makedepend-ack	(revision 9)
+++ 	(revision )
@@ -1,15 +1,0 @@
-depend-ack:
-	rm .depend-ack
-	touch .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -E' kmalloc.c | sed -e 's:^\(.\):../obj-ack//./sysutil/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -E' kprintf.c | sed -e 's:^\(.\):../obj-ack//./sysutil/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -E' kputc.c | sed -e 's:^\(.\):../obj-ack//./sysutil/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -E' tickdelay.c | sed -e 's:^\(.\):../obj-ack//./sysutil/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -E' getuptime.c | sed -e 's:^\(.\):../obj-ack//./sysutil/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -E' env_get_prm.c | sed -e 's:^\(.\):../obj-ack//./sysutil/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -E' env_parse.c | sed -e 's:^\(.\):../obj-ack//./sysutil/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -E' env_panic.c | sed -e 's:^\(.\):../obj-ack//./sysutil/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -E' env_prefix.c | sed -e 's:^\(.\):../obj-ack//./sysutil/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -E' fkey_ctl.c | sed -e 's:^\(.\):../obj-ack//./sysutil/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -E' report.c | sed -e 's:^\(.\):../obj-ack//./sysutil/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -E' taskcall.c | sed -e 's:^\(.\):../obj-ack//./sysutil/\1:' >> .depend-ack
Index: trunk/minix/lib/sysutil/Makedepend-gnu
===================================================================
--- trunk/minix/lib/sysutil/Makedepend-gnu	(revision 9)
+++ 	(revision )
@@ -1,15 +1,0 @@
-depend-gnu:
-	rm .depend-gnu
-	touch .depend-gnu
-	mkdep 'gcc -O -D_MINIX -D_POSIX_SOURCE -E' kmalloc.c | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./sysutil/\1:' >> .depend-gnu
-	mkdep 'gcc -O -D_MINIX -D_POSIX_SOURCE -E' kprintf.c | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./sysutil/\1:' >> .depend-gnu
-	mkdep 'gcc -O -D_MINIX -D_POSIX_SOURCE -E' kputc.c | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./sysutil/\1:' >> .depend-gnu
-	mkdep 'gcc -O -D_MINIX -D_POSIX_SOURCE -E' tickdelay.c | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./sysutil/\1:' >> .depend-gnu
-	mkdep 'gcc -O -D_MINIX -D_POSIX_SOURCE -E' getuptime.c | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./sysutil/\1:' >> .depend-gnu
-	mkdep 'gcc -O -D_MINIX -D_POSIX_SOURCE -E' env_get_prm.c | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./sysutil/\1:' >> .depend-gnu
-	mkdep 'gcc -O -D_MINIX -D_POSIX_SOURCE -E' env_parse.c | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./sysutil/\1:' >> .depend-gnu
-	mkdep 'gcc -O -D_MINIX -D_POSIX_SOURCE -E' env_panic.c | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./sysutil/\1:' >> .depend-gnu
-	mkdep 'gcc -O -D_MINIX -D_POSIX_SOURCE -E' env_prefix.c | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./sysutil/\1:' >> .depend-gnu
-	mkdep 'gcc -O -D_MINIX -D_POSIX_SOURCE -E' fkey_ctl.c | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./sysutil/\1:' >> .depend-gnu
-	mkdep 'gcc -O -D_MINIX -D_POSIX_SOURCE -E' report.c | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./sysutil/\1:' >> .depend-gnu
-	mkdep 'gcc -O -D_MINIX -D_POSIX_SOURCE -E' taskcall.c | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./sysutil/\1:' >> .depend-gnu
Index: trunk/minix/lib/sysutil/Makefile
===================================================================
--- trunk/minix/lib/sysutil/Makefile	(revision 9)
+++ 	(revision )
@@ -1,129 +1,0 @@
-#Generated from ./sysutil/Makefile.in
-all: all-ack
-
-all-ack:
-all-gnu:
-
-makefiles: Makefile
-Makedepend-ack Makedepend-gnu: 
-	sh ../generate.sh ./sysutil ../obj-ack/ ../obj-gnu
-
-Makefile: Makefile.in Makedepend-ack Makedepend-gnu
-	sh ../generate.sh ./sysutil ../obj-ack/ ../obj-gnu
-	@echo
-	@echo *Attention*
-	@echo Makefile is regenerated... rerun command to see changes
-	@echo *Attention*
-	@echo
-
-depend: depend-ack
-all-ack: ../obj-ack//libsysutil.a
-
-../obj-ack//libsysutil.a: ../obj-ack//libsysutil.a(kmalloc.o)
-../obj-ack//libsysutil.a: ../obj-ack//libsysutil.a(kprintf.o)
-../obj-ack//libsysutil.a: ../obj-ack//libsysutil.a(kputc.o)
-../obj-ack//libsysutil.a: ../obj-ack//libsysutil.a(tickdelay.o)
-../obj-ack//libsysutil.a: ../obj-ack//libsysutil.a(getuptime.o)
-../obj-ack//libsysutil.a: ../obj-ack//libsysutil.a(env_get_prm.o)
-../obj-ack//libsysutil.a: ../obj-ack//libsysutil.a(env_parse.o)
-../obj-ack//libsysutil.a: ../obj-ack//libsysutil.a(env_panic.o)
-../obj-ack//libsysutil.a: ../obj-ack//libsysutil.a(env_prefix.o)
-../obj-ack//libsysutil.a: ../obj-ack//libsysutil.a(fkey_ctl.o)
-../obj-ack//libsysutil.a: ../obj-ack//libsysutil.a(report.o)
-../obj-ack//libsysutil.a: ../obj-ack//libsysutil.a(taskcall.o)
-
-../obj-ack//libsysutil.a:
-	ar cr ../obj-ack//libsysutil.a ../obj-ack//./sysutil/*.o
-	rm ../obj-ack//./sysutil/*.o
-
-../obj-ack//libsysutil.a(kmalloc.o): kmalloc.c
-	cc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-ack//./sysutil/kmalloc.o kmalloc.c
-../obj-ack//libsysutil.a(kprintf.o): kprintf.c
-	cc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-ack//./sysutil/kprintf.o kprintf.c
-../obj-ack//libsysutil.a(kputc.o): kputc.c
-	cc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-ack//./sysutil/kputc.o kputc.c
-../obj-ack//libsysutil.a(tickdelay.o): tickdelay.c
-	cc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-ack//./sysutil/tickdelay.o tickdelay.c
-../obj-ack//libsysutil.a(getuptime.o): getuptime.c
-	cc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-ack//./sysutil/getuptime.o getuptime.c
-../obj-ack//libsysutil.a(env_get_prm.o): env_get_prm.c
-	cc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-ack//./sysutil/env_get_prm.o env_get_prm.c
-../obj-ack//libsysutil.a(env_parse.o): env_parse.c
-	cc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-ack//./sysutil/env_parse.o env_parse.c
-../obj-ack//libsysutil.a(env_panic.o): env_panic.c
-	cc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-ack//./sysutil/env_panic.o env_panic.c
-../obj-ack//libsysutil.a(env_prefix.o): env_prefix.c
-	cc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-ack//./sysutil/env_prefix.o env_prefix.c
-../obj-ack//libsysutil.a(fkey_ctl.o): fkey_ctl.c
-	cc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-ack//./sysutil/fkey_ctl.o fkey_ctl.c
-../obj-ack//libsysutil.a(report.o): report.c
-	cc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-ack//./sysutil/report.o report.c
-../obj-ack//libsysutil.a(taskcall.o): taskcall.c
-	cc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-ack//./sysutil/taskcall.o taskcall.c
-
-all-gnu: ../obj-gnu/libsysutil.a
-
-../obj-gnu/libsysutil.a: ../obj-gnu/./sysutil/kmalloc.o
-../obj-gnu/libsysutil.a: ../obj-gnu/./sysutil/kprintf.o
-../obj-gnu/libsysutil.a: ../obj-gnu/./sysutil/kputc.o
-../obj-gnu/libsysutil.a: ../obj-gnu/./sysutil/tickdelay.o
-../obj-gnu/libsysutil.a: ../obj-gnu/./sysutil/getuptime.o
-../obj-gnu/libsysutil.a: ../obj-gnu/./sysutil/env_get_prm.o
-../obj-gnu/libsysutil.a: ../obj-gnu/./sysutil/env_parse.o
-../obj-gnu/libsysutil.a: ../obj-gnu/./sysutil/env_panic.o
-../obj-gnu/libsysutil.a: ../obj-gnu/./sysutil/env_prefix.o
-../obj-gnu/libsysutil.a: ../obj-gnu/./sysutil/fkey_ctl.o
-../obj-gnu/libsysutil.a: ../obj-gnu/./sysutil/report.o
-../obj-gnu/libsysutil.a: ../obj-gnu/./sysutil/taskcall.o
-
-../obj-gnu/libsysutil.a:
-	gar cr ../obj-gnu/libsysutil.a $?
-
-../obj-gnu/./sysutil/kmalloc.o: kmalloc.c
-	gcc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-gnu/./sysutil/kmalloc.o kmalloc.c
-
-../obj-gnu/./sysutil/kprintf.o: kprintf.c
-	gcc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-gnu/./sysutil/kprintf.o kprintf.c
-
-../obj-gnu/./sysutil/kputc.o: kputc.c
-	gcc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-gnu/./sysutil/kputc.o kputc.c
-
-../obj-gnu/./sysutil/tickdelay.o: tickdelay.c
-	gcc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-gnu/./sysutil/tickdelay.o tickdelay.c
-
-../obj-gnu/./sysutil/getuptime.o: getuptime.c
-	gcc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-gnu/./sysutil/getuptime.o getuptime.c
-
-../obj-gnu/./sysutil/env_get_prm.o: env_get_prm.c
-	gcc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-gnu/./sysutil/env_get_prm.o env_get_prm.c
-
-../obj-gnu/./sysutil/env_parse.o: env_parse.c
-	gcc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-gnu/./sysutil/env_parse.o env_parse.c
-
-../obj-gnu/./sysutil/env_panic.o: env_panic.c
-	gcc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-gnu/./sysutil/env_panic.o env_panic.c
-
-../obj-gnu/./sysutil/env_prefix.o: env_prefix.c
-	gcc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-gnu/./sysutil/env_prefix.o env_prefix.c
-
-../obj-gnu/./sysutil/fkey_ctl.o: fkey_ctl.c
-	gcc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-gnu/./sysutil/fkey_ctl.o fkey_ctl.c
-
-../obj-gnu/./sysutil/report.o: report.c
-	gcc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-gnu/./sysutil/report.o report.c
-
-../obj-gnu/./sysutil/taskcall.o: taskcall.c
-	gcc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-gnu/./sysutil/taskcall.o taskcall.c
-
-
-
-
-clean::
-	rm -f ../obj-ack//./sysutil/*
-	rm -f ../obj-gnu/./sysutil/*
-
-include Makedepend-ack
-include .depend-ack
-
-include Makedepend-gnu
-include .depend-gnu
Index: trunk/minix/lib/sysutil/Makefile.in
===================================================================
--- trunk/minix/lib/sysutil/Makefile.in	(revision 9)
+++ 	(revision )
@@ -1,21 +1,0 @@
-# Makefile for lib/utils.
-
-CFLAGS="-O -D_MINIX -D_POSIX_SOURCE"
-
-LIBRARIES=libsysutil
-
-libsysutil_FILES=" \
-	kmalloc.c \
-	kprintf.c \
-	kputc.c \
-	tickdelay.c \
-	getuptime.c \
-	env_get_prm.c \
-	env_parse.c \
-	env_panic.c \
-	env_prefix.c \
-	fkey_ctl.c \
-	report.c \
-	taskcall.c"
-
-TYPE=both
Index: trunk/minix/lib/sysutil/env_get_prm.c
===================================================================
--- trunk/minix/lib/sysutil/env_get_prm.c	(revision 9)
+++ 	(revision )
@@ -1,97 +1,0 @@
-#include "sysutil.h"
-#include <minix/config.h>
-#include <string.h>
-
-PRIVATE int argc = 0;
-PRIVATE char **argv = NULL;
-
-FORWARD _PROTOTYPE( char *find_key, (const char *params, const char *key));
-
-/*===========================================================================*
- *				env_setargs				     *
- *===========================================================================*/
-PUBLIC void env_setargs(arg_c, arg_v)
-int arg_c;
-char *arg_v[];
-{
-	argc= arg_c;
-	argv= arg_v;
-}
-
-/*===========================================================================*
- *				env_get_param				     *
- *===========================================================================*/
-PUBLIC int env_get_param(key, value, max_len)
-char *key;				/* which key to look up */
-char *value;				/* where to store value */
-int max_len;				/* maximum length of value */
-{
-  message m;
-  static char mon_params[128*sizeof(char *)];	/* copy parameters here */
-  char *key_value;
-  int i, s, keylen;
-
-  if (key == NULL)
-  	return EINVAL;
-
-  keylen= strlen(key);
-  for (i= 1; i<argc; i++)
-  {
-  	if (strncmp(argv[i], key, keylen) != 0)
-  		continue;
-	if (strlen(argv[i]) <= keylen)
-		continue;
-	if (argv[i][keylen] != '=')
-		continue;
-	key_value= argv[i]+keylen+1;
-	if (strlen(key_value)+1 > EP_BUF_SIZE)
-	      return(E2BIG);
-	strcpy(value, key_value);
-	return OK;
-  }
-
-  /* Get copy of boot monitor parameters. */
-  m.m_type = SYS_GETINFO;
-  m.I_REQUEST = GET_MONPARAMS;
-  m.I_ENDPT = SELF;
-  m.I_VAL_LEN = sizeof(mon_params);
-  m.I_VAL_PTR = mon_params;
-  if ((s=_taskcall(SYSTASK, SYS_GETINFO, &m)) != OK) {
-	printf("SYS_GETINFO: %d (size %u)\n", s, sizeof(mon_params));
-	return(s);
-  }
-
-  /* We got a copy, now search requested key. */
-  if ((key_value = find_key(mon_params, key)) == NULL)
-	return(ESRCH);
-
-  /* Value found, make the actual copy (as far as possible). */
-  strncpy(value, key_value, max_len);
-
-  /* See if it fits in the client's buffer. */
-  if ((strlen(key_value)+1) > max_len) return(E2BIG);
-  return(OK);
-}
-
-
-/*==========================================================================*
- *				find_key					    *
- *==========================================================================*/
-PRIVATE char *find_key(params,name)
-const char *params;
-const char *name;
-{
-  register const char *namep;
-  register char *envp;
-
-  for (envp = (char *) params; *envp != 0;) {
-	for (namep = name; *namep != 0 && *namep == *envp; namep++, envp++)
-		;
-	if (*namep == '\0' && *envp == '=') 
-		return(envp + 1);
-	while (*envp++ != 0)
-		;
-  }
-  return(NULL);
-}
-
Index: trunk/minix/lib/sysutil/env_panic.c
===================================================================
--- trunk/minix/lib/sysutil/env_panic.c	(revision 9)
+++ 	(revision )
@@ -1,19 +1,0 @@
-#include "sysutil.h"
-#include <string.h>
-
-/*=========================================================================*
- *				env_panic				   *
- *=========================================================================*/
-PUBLIC void env_panic(key)
-char *key;		/* environment variable whose value is bogus */
-{
-  static char value[EP_BUF_SIZE] = "<unknown>";
-  int s;
-  if ((s=env_get_param(key, value, sizeof(value))) == 0) {
-  	if (s != ESRCH)		/* only error allowed */
-  	printf("WARNING: get_mon_param() failed in env_panic(): %d\n", s);
-  }
-  printf("Bad environment setting: '%s = %s'\n", key, value);
-  panic("","", NO_NUM);
-}
-
Index: trunk/minix/lib/sysutil/env_parse.c
===================================================================
--- trunk/minix/lib/sysutil/env_parse.c	(revision 9)
+++ 	(revision )
@@ -1,90 +1,0 @@
-#include "sysutil.h"
-#include <stdlib.h>
-#include <string.h>
-
-
-/*=========================================================================*
- *				env_parse				   *
- *=========================================================================*/
-PUBLIC int env_parse(env, fmt, field, param, min, max)
-char *env;		/* environment variable to inspect */
-char *fmt;		/* template to parse it with */
-int field;		/* field number of value to return */
-long *param;		/* address of parameter to get */
-long min, max;		/* minimum and maximum values for the parameter */
-{
-/* Parse an environment variable setting, something like "DPETH0=300:3".
- * Panic if the parsing fails.  Return EP_UNSET if the environment variable
- * is not set, EP_OFF if it is set to "off", EP_ON if set to "on" or a
- * field is left blank, or EP_SET if a field is given (return value through
- * *param).  Punctuation may be used in the environment and format string,
- * fields in the environment string may be empty, and punctuation may be
- * missing to skip fields.  The format string contains characters 'd', 'o',
- * 'x' and 'c' to indicate that 10, 8, 16, or 0 is used as the last argument
- * to strtol().  A '*' means that a field should be skipped.  If the format
- * string contains something like "\4" then the string is repeated 4 characters
- * to the left.
- */
-  char *val, *end;
-  char value[EP_BUF_SIZE];
-  char PUNCT[] = ":,;.";
-  long newpar;
-  int s, i, radix, r, keylen;
-
-  if ((s=env_get_param(env, value, sizeof(value))) != 0) { 
-      if (s == ESRCH) return(EP_UNSET);		/* only error allowed */ 
-      printf("WARNING: get_mon_param() failed in env_parse(): %d\n",s);
-      return(EP_EGETKENV);
-  }
-  val = value;
-  if (strcmp(val, "off") == 0) return(EP_OFF);
-  if (strcmp(val, "on") == 0) return(EP_ON);
-
-  i = 0;
-  r = EP_ON;
-  for (;;) {
-	while (*val == ' ') val++;	/* skip spaces */
-	if (*val == 0) return(r);	/* the proper exit point */
-	if (*fmt == 0) break;		/* too many values */
-
-	if (strchr(PUNCT, *val) != NULL) {
-		/* Time to go to the next field. */
-		if (strchr(PUNCT, *fmt) != NULL) i++;
-		if (*fmt++ == *val) val++;
-		if (*fmt < 32) fmt -= *fmt;	/* step back? */
-	} else {
-		/* Environment contains a value, get it. */
-		switch (*fmt) {
-		case '*':	radix =   -1;	break;
-		case 'd':	radix =   10;	break;
-		case 'o':	radix =  010;	break;
-		case 'x':	radix = 0x10;	break;
-		case 'c':	radix =    0;	break;
-		default:	goto badenv;
-		}
-		
-		if (radix < 0) {
-			/* Skip. */
-			while (strchr(PUNCT, *val) == NULL) val++;
-			continue;
-		} else {
-			/* A number. */
-			newpar = strtol(val, &end, radix);
-
-			if (end == val) break;	/* not a number */
-			val = end;
-		}
-
-		if (i == field) {
-			/* The field requested. */
-			if (newpar < min || newpar > max) break;
-			*param = newpar;
-			r = EP_SET;
-		}
-	}
-  }
-badenv:
-  env_panic(env);
-}
-
-
Index: trunk/minix/lib/sysutil/env_prefix.c
===================================================================
--- trunk/minix/lib/sysutil/env_prefix.c	(revision 9)
+++ 	(revision )
@@ -1,30 +1,0 @@
-#include "sysutil.h"
-#include <stdlib.h>
-#include <string.h>
-
-/*=========================================================================*
- *				env_prefix				   *
- *=========================================================================*/
-PUBLIC int env_prefix(env, prefix)
-char *env;		/* environment variable to inspect */
-char *prefix;		/* prefix to test for */
-{
-/* An environment setting may be prefixed by a word, usually "pci".  
- * Return TRUE if a given prefix is used.
- */
-  char value[EP_BUF_SIZE];
-  char punct[] = ":,;.";
-  int i, s, keylen;
-  char *val;
-  size_t n;
-
-  if ((s = env_get_param(env, value, sizeof(value))) != 0) {
-  	if (s != ESRCH)		/* only error allowed */
-  	printf("WARNING: get_mon_param() failed in env_prefix(): %d\n", s);	
-  }
-  n = strlen(prefix);
-  return(value != NULL
-	&& strncmp(value, prefix, n) == 0
-	&& strchr(punct, value[n]) != NULL);
-}
-
Index: trunk/minix/lib/sysutil/fkey_ctl.c
===================================================================
--- trunk/minix/lib/sysutil/fkey_ctl.c	(revision 9)
+++ 	(revision )
@@ -1,27 +1,0 @@
-#include "sysutil.h" 
-
-/*===========================================================================*
- *				fkey_ctl				     *
- *===========================================================================*/
-PUBLIC int fkey_ctl(request, fkeys, sfkeys)
-int request;				/* request to perform */
-int *fkeys;				/* bit masks for F1-F12 keys */
-int *sfkeys;				/* bit masks for Shift F1-F12 keys */
-{
-/* Send a message to the TTY server to request notifications for function 
- * key presses or to disable notifications. Enabling succeeds unless the key
- * is already bound to another process. Disabling only succeeds if the key is
- * bound to the current process.   
- */ 
-    message m;
-    int s;
-    m.FKEY_REQUEST = request;
-    m.FKEY_FKEYS = (fkeys) ? *fkeys : 0;
-    m.FKEY_SFKEYS = (sfkeys) ? *sfkeys : 0;
-    s = _taskcall(TTY_PROC_NR, FKEY_CONTROL, &m);
-    if (fkeys) *fkeys = m.FKEY_FKEYS;
-    if (sfkeys) *sfkeys = m.FKEY_SFKEYS;
-    return(s);
-}
-
-
Index: trunk/minix/lib/sysutil/getuptime.c
===================================================================
--- trunk/minix/lib/sysutil/getuptime.c	(revision 9)
+++ 	(revision )
@@ -1,22 +1,0 @@
-#include "sysutil.h"
-
-/*===========================================================================*
- *                               getuptime			    	     *
- *===========================================================================*/
-PUBLIC int getuptime(ticks)
-clock_t *ticks;				/* uptime in ticks */
-{
-    message m;
-    int s;
-
-    m.m_type = SYS_TIMES;		/* request time information */
-    m.T_ENDPT = NONE;			/* ignore process times */
-    s = _taskcall(SYSTASK, SYS_TIMES, &m);
-    *ticks = m.T_BOOT_TICKS;
-    return(s);
-}
-
-
-
-
-
Index: trunk/minix/lib/sysutil/kmalloc.c
===================================================================
--- trunk/minix/lib/sysutil/kmalloc.c	(revision 9)
+++ 	(revision )
@@ -1,177 +1,0 @@
-/*	malloc(), realloc(), free() - simple memory allocation routines
- *
- * This is a very small and simple minded malloc	Author: Kees J. Bot
- * implementation.  Ideal for things like a			29 Jan 1994
- * bootstrap program, or for debugging.  Six times
- * slower than any good malloc.
- */
-#define nil 0
-
-#define sbrk _sbrk
-#include <stddef.h>
-#include <stdlib.h>
-#include <unistd.h>
-#include <string.h>
-#include <limits.h>
-#if !DEBUG
-#define NDEBUG	1
-#define debug(expr)	((void) 0)
-#else
-#define debug(expr)	expr
-#endif
-#include <assert.h>
-
-typedef struct cell {
-	size_t		size;		/* Size of a malloc()'ed object. */
-#if DEBUG
-	unsigned	magic;		/* To recognize a cell. */
-#endif
-	struct cell	*next;		/* Next cell on the free list. */
-#if DEBUG
-	unsigned	sacred;		/* Don't touch while unallocated. */
-#endif
-} cell_t;
-
-#if UINT_MAX <= 0xFFFF
-#define MAGIC	0x537B
-#else
-#define MAGIC	0x537BC0D8
-#endif
-
-/* Size of the header of an object. */
-#define HDR_SIZE	offsetof(cell_t, next)
-
-/* An offset from a cell pointer to a next cell. */
-#define offset(cp, size)	((cell_t *) ((char *) (cp) + (size)))
-
-/* Address of the object in a cell and back. */
-#define cell2obj(cp)		((void *) ((char *) (cp) + HDR_SIZE))
-#define obj2cell(op)		((cell_t *) ((char *) (op) - HDR_SIZE))
-
-/* The free list. */
-static cell_t *freelist;
-
-void *malloc(size_t size)
-/* Allocate an object of at least the given size. */
-{
-	cell_t **pcp, *cp;
-
-	size += HDR_SIZE;
-	if (size < sizeof(cell_t)) size= sizeof(cell_t);
-
-	/* Align to a word.  Use a real malloc if you need better alignment. */
-	size= (size + sizeof(int) - 1) & ~(sizeof(int) - 1);
-
-	/* Space for a magic number at the end of the chunk. */
-	debug(size += sizeof(unsigned));
-
-	for (;;) {
-		/* Do a first fit search. */
-		pcp= &freelist;
-		while ((cp= *pcp) != nil) {
-			cell_t *next= cp->next;
-
-			assert(cp->magic == MAGIC);
-			assert(cp->sacred == MAGIC);
-
-			if (offset(cp, cp->size) == next) {
-				/* Join adjacent free cells. */
-				assert(next->magic == MAGIC);
-				assert(next->sacred == MAGIC);
-
-				cp->size+= next->size;
-				cp->next= next->next;
-
-				continue;		/* Try again. */
-			}
-			if (size <= cp->size) break;	/* Big enough. */
-
-			/* Next cell. */
-			pcp= &cp->next;
-		}
-
-		if (cp != nil) break;	/* Found a big enough chunk. */
-
-		/* Allocate a new chunk at the break. */
-		if ((cp= (cell_t *) sbrk(size)) == (cell_t *) -1) {
-			return nil;
-		}
-
-		cp->size= size;
-		cp->next= nil;
-		debug(cp->magic= MAGIC);
-		debug(cp->sacred= MAGIC);
-		*pcp= cp;
-	}
-
-	/* We've got a cell that is big enough.  Can we break it up? */
-	if (cp->size >= size + sizeof(cell_t)) {
-		cell_t *next= offset(cp, size);
-
-		next->size= cp->size - size;
-		next->next= cp->next;
-		debug(next->magic= MAGIC);
-		debug(next->sacred= MAGIC);
-		cp->size= size;
-		cp->next= next;
-	}
-
-	/* Unchain the cell we've found and return an address in it. */
-	*pcp= cp->next;
-	debug(memset(cell2obj(cp), 0xAA, cp->size - HDR_SIZE));
-	debug(((unsigned *) offset(cp, cp->size))[-1]= MAGIC);
-
-	return cell2obj(cp);
-}
-
-void free(void *op)
-/* Deallocate an object. */
-{
-	cell_t **prev, *next, *cp;
-
-	if (op == nil) return;		/* Aaargh. */
-
-	cp= obj2cell(op);
-	assert(cp->magic == MAGIC);
-	assert(((unsigned *) offset(cp, cp->size))[-1] == MAGIC);
-	debug(cp->sacred= MAGIC);
-
-	/* Find the spot where the object belongs. */
-	prev= &freelist;
-	while ((next= *prev) != nil && next < cp) {
-		assert(next->magic == MAGIC);
-		assert(next->sacred == MAGIC);
-		prev= &next->next;
-	}
-
-	/* Put the new free cell in the list. */
-	*prev= cp;
-	cp->next= next;
-
-#if DEBUG
-	/* Check the rest of the list. */
-	while (next != nil) {
-		assert(next->magic == MAGIC);
-		assert(next->sacred == MAGIC);
-		next= next->next;
-	}
-#endif
-}
-
-void *realloc(void *op, size_t size)
-/* Change the size of an object.  Don't bother being smart, just copy it. */
-{
-	size_t oldsize;
-	void *new;
-
-	oldsize= op == nil ? 0 : obj2cell(op)->size - HDR_SIZE;
-
-	new= malloc(size);
-	memcpy(new, op, oldsize > size ? size : oldsize);
-	free(op);
-	return new;
-}
-
-/*
- * $PchId: malloc.c,v 1.4 1996/02/22 09:15:56 philip Exp $
- */
Index: trunk/minix/lib/sysutil/kprintf.c
===================================================================
--- trunk/minix/lib/sysutil/kprintf.c	(revision 9)
+++ 	(revision )
@@ -1,191 +1,0 @@
-/*	printf() - system services printf()		Author: Kees J. Bot
- *								15 Jan 1994
- */
-#define nil 0
-#include <stdarg.h>
-#include <stddef.h>
-#include <limits.h>
-
-#define isdigit(c)	((unsigned) ((c) - '0') <  (unsigned) 10)
-
-#if !__STDC__
-/* Classic C stuff, ignore. */
-void kputc();
-int printf(fmt) char *fmt;
-#else
-
-/* Printf() uses kputc() to print characters. */
-void kputc(int c);
-
-#define count_kputc(c) do { charcount++; kputc(c); } while(0)
-
-int printf(const char *fmt, ...)
-#endif
-{
-	int c, charcount = 0;
-	enum { LEFT, RIGHT } adjust;
-	enum { LONG, INT } intsize;
-	int fill;
-	int width, max, len, base;
-	static char X2C_tab[]= "0123456789ABCDEF";
-	static char x2c_tab[]= "0123456789abcdef";
-	char *x2c;
-	char *p;
-	long i;
-	unsigned long u;
-	char temp[8 * sizeof(long) / 3 + 2];
-
-	va_list argp;
-
-	va_start(argp, fmt);
-
-	while ((c= *fmt++) != 0) {
-		if (c != '%') {
-			/* Ordinary character. */
-			count_kputc(c);
-			continue;
-		}
-
-		/* Format specifier of the form:
-		 *	%[adjust][fill][width][.max]keys
-		 */
-		c= *fmt++;
-
-		adjust= RIGHT;
-		if (c == '-') {
-			adjust= LEFT;
-			c= *fmt++;
-		}
-
-		fill= ' ';
-		if (c == '0') {
-			fill= '0';
-			c= *fmt++;
-		}
-
-		width= 0;
-		if (c == '*') {
-			/* Width is specified as an argument, e.g. %*d. */
-			width= va_arg(argp, int);
-			c= *fmt++;
-		} else
-		if (isdigit(c)) {
-			/* A number tells the width, e.g. %10d. */
-			do {
-				width= width * 10 + (c - '0');
-			} while (isdigit(c= *fmt++));
-		}
-
-		max= INT_MAX;
-		if (c == '.') {
-			/* Max field length coming up. */
-			if ((c= *fmt++) == '*') {
-				max= va_arg(argp, int);
-				c= *fmt++;
-			} else
-			if (isdigit(c)) {
-				max= 0;
-				do {
-					max= max * 10 + (c - '0');
-				} while (isdigit(c= *fmt++));
-			}
-		}
-
-		/* Set a few flags to the default. */
-		x2c= x2c_tab;
-		i= 0;
-		base= 10;
-		intsize= INT;
-		if (c == 'l' || c == 'L') {
-			/* "Long" key, e.g. %ld. */
-			intsize= LONG;
-			c= *fmt++;
-		}
-		if (c == 0) break;
-
-		switch (c) {
-			/* Decimal. */
-		case 'd':
-			i= intsize == LONG ? va_arg(argp, long)
-						: va_arg(argp, int);
-			u= i < 0 ? -i : i;
-			goto int2ascii;
-
-			/* Octal. */
-		case 'o':
-			base= 010;
-			goto getint;
-
-			/* Pointer, interpret as %X or %lX. */
-		case 'p':
-			if (sizeof(char *) > sizeof(int)) intsize= LONG;
-
-			/* Hexadecimal.  %X prints upper case A-F, not %lx. */
-		case 'X':
-			x2c= X2C_tab;
-		case 'x':
-			base= 0x10;
-			goto getint;
-
-			/* Unsigned decimal. */
-		case 'u':
-		getint:
-			u= intsize == LONG ? va_arg(argp, unsigned long)
-						: va_arg(argp, unsigned int);
-		int2ascii:
-			p= temp + sizeof(temp)-1;
-			*p= 0;
-			do {
-				*--p= x2c[(ptrdiff_t) (u % base)];
-			} while ((u /= base) > 0);
-			goto string_length;
-
-			/* A character. */
-		case 'c':
-			p= temp;
-			*p= va_arg(argp, int);
-			len= 1;
-			goto string_print;
-
-			/* Simply a percent. */
-		case '%':
-			p= temp;
-			*p= '%';
-			len= 1;
-			goto string_print;
-
-			/* A string.  The other cases will join in here. */
-		case 's':
-			p= va_arg(argp, char *);
-
-		string_length:
-			for (len= 0; p[len] != 0 && len < max; len++) {}
-
-		string_print:
-			width -= len;
-			if (i < 0) width--;
-			if (fill == '0' && i < 0) count_kputc('-');
-			if (adjust == RIGHT) {
-				while (width > 0) { count_kputc(fill); width--; }
-			}
-			if (fill == ' ' && i < 0) count_kputc('-');
-			while (len > 0) { count_kputc((unsigned char) *p++); len--; }
-			while (width > 0) { count_kputc(fill); width--; }
-			break;
-
-			/* Unrecognized format key, echo it back. */
-		default:
-			count_kputc('%');
-			count_kputc(c);
-		}
-	}
-
-	/* Mark the end with a null (should be something else, like -1). */
-	kputc(0);
-	va_end(argp);
-	return charcount;
-}
-
-/*
- * $PchId: kprintf.c,v 1.5 1996/04/11 06:59:05 philip Exp $
- */
Index: trunk/minix/lib/sysutil/kputc.c
===================================================================
--- trunk/minix/lib/sysutil/kputc.c	(revision 9)
+++ 	(revision )
@@ -1,47 +1,0 @@
-/* A server must occasionally print some message.  It uses a simple version of 
- * printf() found in the system lib that calls kputc() to output characters.
- * Printing is done with a call to the kernel, and not by going through FS.
- *
- * This routine can only be used by servers and device drivers.  The kernel
- * must define its own kputc(). Note that the log driver also defines its own 
- * kputc() to directly call the TTY instead of going through this library.
- */
-
-#include "sysutil.h"
-
-/*===========================================================================*
- *				kputc					     *
- *===========================================================================*/
-void kputc(c)
-int c;
-{
-/* Accumulate another character.  If 0 or buffer full, print it. */
-  static int buf_count;		/* # characters in the buffer */
-  static char print_buf[80];	/* output is buffered here */
-  message m;
-
-  if ((c == 0 && buf_count > 0) || buf_count == sizeof(print_buf)) {
-	int procs[] = OUTPUT_PROCS_ARRAY;
-	int p;
-
-	for(p = 0; procs[p] != NONE; p++) {
-		/* Send the buffer to this output driver. */
-		m.DIAG_BUF_COUNT = buf_count;
-		m.DIAG_PRINT_BUF = print_buf;
-		m.DIAG_ENDPT = SELF;
-		m.m_type = DIAGNOSTICS;
-		(void) _sendrec(procs[p], &m);
-	}
-	buf_count = 0;
-
-	/* If the output fails, e.g., due to an ELOCKED, do not retry output
-         * at the FS as if this were a normal user-land printf(). This may 
-         * result in even worse problems. 
-         */
-  }
-  if (c != 0) { 
-        
-        /* Append a single character to the output buffer. */
-  	print_buf[buf_count++] = c;
-  }
-}
Index: trunk/minix/lib/sysutil/report.c
===================================================================
--- trunk/minix/lib/sysutil/report.c	(revision 9)
+++ 	(revision )
@@ -1,20 +1,0 @@
-#include "sysutil.h" 
-
-/*===========================================================================*
- *				    report					     *
- *===========================================================================*/
-PUBLIC void report(who, mess, num)
-char *who;				/* server identification */
-char *mess;				/* message format to print */
-int num;				/* number to go with the message */
-{
-/* Display a message for a server. */ 
-
-  if (num != NO_NUM) {
-      printf("%s: %s %d\n", who, mess, num);
-  } else {
-      printf("%s: %s\n", who, mess);
-  }
-}
-
-
Index: trunk/minix/lib/sysutil/sysutil.h
===================================================================
--- trunk/minix/lib/sysutil/sysutil.h	(revision 9)
+++ 	(revision )
@@ -1,8 +1,0 @@
-/*	sysutil.h - System library utilities.	*/
-
-#define _SYSTEM
-
-#include <lib.h>		/* common to all libraries */
-#include <minix/com.h>		/* need task numbers + message types */
-#include <minix/syslib.h>	/* need sendrec, _taskcall, etc */
-#include <minix/sysutil.h>	/* prototypes in this library */
Index: trunk/minix/lib/sysutil/taskcall.c
===================================================================
--- trunk/minix/lib/sysutil/taskcall.c	(revision 9)
+++ 	(revision )
@@ -1,20 +1,0 @@
-/* _taskcall() is the same as _syscall() except it returns negative error
- * codes directly and not in errno.  This is a better interface for MM and
- * FS.
- */
-
-#include <lib.h>
-#include <minix/syslib.h>
-
-PUBLIC int _taskcall(who, syscallnr, msgptr)
-int who;
-int syscallnr;
-register message *msgptr;
-{
-  int status;
-
-  msgptr->m_type = syscallnr;
-  status = _sendrec(who, msgptr);
-  if (status != 0) return(status);
-  return(msgptr->m_type);
-}
Index: trunk/minix/lib/sysutil/tickdelay.c
===================================================================
--- trunk/minix/lib/sysutil/tickdelay.c	(revision 9)
+++ 	(revision )
@@ -1,44 +1,0 @@
-#include "sysutil.h"
-#include <timers.h>
-
-/*===========================================================================*
- *                               tickdelay			    	     *
- *===========================================================================*/
-PUBLIC int tickdelay(ticks)
-long ticks;				/* number of ticks to wait */
-{
-/* This function uses the synchronous alarm to delay for a while. This works
- * even if a previous synchronous alarm was scheduled, because the remaining
- * tick of the previous alarm are returned so that it can be rescheduled.
- * Note however that a long tick_delay (longer than the remaining time of the
- * previous) alarm will also delay the previous alarm.
- */
-    message m, m_alarm;
-    clock_t time_left;
-    int s;
-
-    if (ticks <= 0) return;		/* check for robustness */
-
-    m.ALRM_ENDPT = SELF;		/* SELF means this process nr */
-    m.ALRM_EXP_TIME = ticks;		/* request message after ticks */
-    m.ALRM_ABS_TIME = 0;		/* ticks are relative to now */
-    s = _taskcall(SYSTASK, SYS_SETALARM, &m);
-    if (s != OK) return(s);
-
-    receive(CLOCK,&m_alarm);		/* await synchronous alarm */
-
-    /* Check if we must reschedule the current alarm. */
-    if (m.ALRM_TIME_LEFT > 0 && m.ALRM_TIME_LEFT != TMR_NEVER) {
-    	m.ALRM_EXP_TIME = m.ALRM_TIME_LEFT - ticks;
-    	if (m.ALRM_EXP_TIME <= 0) 
-    		m.ALRM_EXP_TIME = 1;
-    	s = _taskcall(SYSTASK, SYS_SETALARM, &m);
-    }
-
-    return(s);
-}
-
-
-
-
-
Index: trunk/minix/lib/timers/Makedepend-ack
===================================================================
--- trunk/minix/lib/timers/Makedepend-ack	(revision 9)
+++ 	(revision )
@@ -1,6 +1,0 @@
-depend-ack:
-	rm .depend-ack
-	touch .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -E' tmrs_set.c | sed -e 's:^\(.\):../obj-ack//./timers/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -E' tmrs_clr.c | sed -e 's:^\(.\):../obj-ack//./timers/\1:' >> .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -E' tmrs_exp.c | sed -e 's:^\(.\):../obj-ack//./timers/\1:' >> .depend-ack
Index: trunk/minix/lib/timers/Makedepend-gnu
===================================================================
--- trunk/minix/lib/timers/Makedepend-gnu	(revision 9)
+++ 	(revision )
@@ -1,6 +1,0 @@
-depend-gnu:
-	rm .depend-gnu
-	touch .depend-gnu
-	mkdep 'gcc -O -D_MINIX -D_POSIX_SOURCE -E' tmrs_set.c | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./timers/\1:' >> .depend-gnu
-	mkdep 'gcc -O -D_MINIX -D_POSIX_SOURCE -E' tmrs_clr.c | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./timers/\1:' >> .depend-gnu
-	mkdep 'gcc -O -D_MINIX -D_POSIX_SOURCE -E' tmrs_exp.c | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./timers/\1:' >> .depend-gnu
Index: trunk/minix/lib/timers/Makefile
===================================================================
--- trunk/minix/lib/timers/Makefile	(revision 9)
+++ 	(revision )
@@ -1,66 +1,0 @@
-#Generated from ./timers/Makefile.in
-all: all-ack
-
-all-ack:
-all-gnu:
-
-makefiles: Makefile
-Makedepend-ack Makedepend-gnu: 
-	sh ../generate.sh ./timers ../obj-ack/ ../obj-gnu
-
-Makefile: Makefile.in Makedepend-ack Makedepend-gnu
-	sh ../generate.sh ./timers ../obj-ack/ ../obj-gnu
-	@echo
-	@echo *Attention*
-	@echo Makefile is regenerated... rerun command to see changes
-	@echo *Attention*
-	@echo
-
-depend: depend-ack
-all-ack: ../obj-ack//libtimers.a
-
-../obj-ack//libtimers.a: ../obj-ack//libtimers.a(tmrs_set.o)
-../obj-ack//libtimers.a: ../obj-ack//libtimers.a(tmrs_clr.o)
-../obj-ack//libtimers.a: ../obj-ack//libtimers.a(tmrs_exp.o)
-
-../obj-ack//libtimers.a:
-	ar cr ../obj-ack//libtimers.a ../obj-ack//./timers/*.o
-	rm ../obj-ack//./timers/*.o
-
-../obj-ack//libtimers.a(tmrs_set.o): tmrs_set.c
-	cc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-ack//./timers/tmrs_set.o tmrs_set.c
-../obj-ack//libtimers.a(tmrs_clr.o): tmrs_clr.c
-	cc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-ack//./timers/tmrs_clr.o tmrs_clr.c
-../obj-ack//libtimers.a(tmrs_exp.o): tmrs_exp.c
-	cc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-ack//./timers/tmrs_exp.o tmrs_exp.c
-
-all-gnu: ../obj-gnu/libtimers.a
-
-../obj-gnu/libtimers.a: ../obj-gnu/./timers/tmrs_set.o
-../obj-gnu/libtimers.a: ../obj-gnu/./timers/tmrs_clr.o
-../obj-gnu/libtimers.a: ../obj-gnu/./timers/tmrs_exp.o
-
-../obj-gnu/libtimers.a:
-	gar cr ../obj-gnu/libtimers.a $?
-
-../obj-gnu/./timers/tmrs_set.o: tmrs_set.c
-	gcc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-gnu/./timers/tmrs_set.o tmrs_set.c
-
-../obj-gnu/./timers/tmrs_clr.o: tmrs_clr.c
-	gcc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-gnu/./timers/tmrs_clr.o tmrs_clr.c
-
-../obj-gnu/./timers/tmrs_exp.o: tmrs_exp.c
-	gcc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-gnu/./timers/tmrs_exp.o tmrs_exp.c
-
-
-
-
-clean::
-	rm -f ../obj-ack//./timers/*
-	rm -f ../obj-gnu/./timers/*
-
-include Makedepend-ack
-include .depend-ack
-
-include Makedepend-gnu
-include .depend-gnu
Index: trunk/minix/lib/timers/Makefile.in
===================================================================
--- trunk/minix/lib/timers/Makefile.in	(revision 9)
+++ 	(revision )
@@ -1,12 +1,0 @@
-# Makefile for lib/tmrslib.
-
-CFLAGS="-O -D_MINIX -D_POSIX_SOURCE"
-
-LIBRARIES=libtimers
-
-libtimers_FILES=" \
-	tmrs_set.c \
-	tmrs_clr.c \
-	tmrs_exp.c"
-
-TYPE=both
Index: trunk/minix/lib/timers/timers.h
===================================================================
--- trunk/minix/lib/timers/timers.h	(revision 9)
+++ 	(revision )
@@ -1,7 +1,0 @@
-/* This library provides generic watchdog timer management functionality.
- * See the comments in <timers.h> for details.
- */
-
-#include <timers.h>		/* definitions and function prototypes */
-#define NULL 	(void *) 0	/* null-pointer definition */
-
Index: trunk/minix/lib/timers/tmrs_clr.c
===================================================================
--- trunk/minix/lib/timers/tmrs_clr.c	(revision 9)
+++ 	(revision )
@@ -1,40 +1,0 @@
-#include "timers.h"
-
-/*===========================================================================*
- *				tmrs_clrtimer				     *
- *===========================================================================*/
-clock_t tmrs_clrtimer(tmrs, tp, next_time)
-timer_t **tmrs;				/* pointer to timers queue */
-timer_t *tp;				/* timer to be removed */
-clock_t *next_time;
-{
-/* Deactivate a timer and remove it from the timers queue. 
- */
-  timer_t **atp;
-  struct proc *p;
-  clock_t prev_time;
-
-  if(*tmrs)
-  	prev_time = (*tmrs)->tmr_exp_time;
-  else
-  	prev_time = 0;
-
-  tp->tmr_exp_time = TMR_NEVER;
-
-  for (atp = tmrs; *atp != NULL; atp = &(*atp)->tmr_next) {
-	if (*atp == tp) {
-		*atp = tp->tmr_next;
-		break;
-	}
-  }
-
-  if(next_time) {
-  	if(*tmrs)
-  		*next_time = (*tmrs)->tmr_exp_time;
-  	else	
-  		*next_time = 0;
-  }
-
-  return prev_time;
-}
-
Index: trunk/minix/lib/timers/tmrs_exp.c
===================================================================
--- trunk/minix/lib/timers/tmrs_exp.c	(revision 9)
+++ 	(revision )
@@ -1,31 +1,0 @@
-#include "timers.h"
-
-/*===========================================================================*
- *				tmrs_exptimers				     *
- *===========================================================================*/
-void tmrs_exptimers(tmrs, now, new_head)
-timer_t **tmrs;				/* pointer to timers queue */
-clock_t now;				/* current time */
-clock_t *new_head;
-{
-/* Use the current time to check the timers queue list for expired timers. 
- * Run the watchdog functions for all expired timers and deactivate them.
- * The caller is responsible for scheduling a new alarm if needed.
- */
-  timer_t *tp;
-
-  while ((tp = *tmrs) != NULL && tp->tmr_exp_time <= now) {
-	*tmrs = tp->tmr_next;
-	tp->tmr_exp_time = TMR_NEVER;
-	(*tp->tmr_func)(tp);
-  }
-
-  if(new_head) {
-  	if(*tmrs)
-  		*new_head = (*tmrs)->tmr_exp_time;
-  	else
-  		*new_head = 0;
-  }
-}
-
-
Index: trunk/minix/lib/timers/tmrs_set.c
===================================================================
--- trunk/minix/lib/timers/tmrs_set.c	(revision 9)
+++ 	(revision )
@@ -1,39 +1,0 @@
-#include "timers.h"
-
-/*===========================================================================*
- *				tmrs_settimer				     *
- *===========================================================================*/
-clock_t tmrs_settimer(tmrs, tp, exp_time, watchdog, new_head)
-timer_t **tmrs;				/* pointer to timers queue */
-timer_t *tp;				/* the timer to be added */
-clock_t exp_time;			/* its expiration time */
-tmr_func_t watchdog;			/* watchdog function to be run */
-clock_t *new_head;			/* new earliest timer, if non NULL */
-{
-/* Activate a timer to run function 'fp' at time 'exp_time'. If the timer is
- * already in use it is first removed from the timers queue. Then, it is put
- * in the list of active timers with the first to expire in front.
- * The caller responsible for scheduling a new alarm for the timer if needed. 
- */
-  timer_t **atp;
-  clock_t old_head = 0;
-
-  if(*tmrs)
-  	old_head = (*tmrs)->tmr_exp_time;
-
-  /* Set the timer's variables. */
-  (void) tmrs_clrtimer(tmrs, tp, NULL);
-  tp->tmr_exp_time = exp_time;
-  tp->tmr_func = watchdog;
-
-  /* Add the timer to the active timers. The next timer due is in front. */
-  for (atp = tmrs; *atp != NULL; atp = &(*atp)->tmr_next) {
-	if (exp_time < (*atp)->tmr_exp_time) break;
-  }
-  tp->tmr_next = *atp;
-  *atp = tp;
-  if(new_head)
-  	(*new_head) = (*tmrs)->tmr_exp_time;
-  return old_head;
-}
-
Index: trunk/minix/lib/util/Makedepend-ack
===================================================================
--- trunk/minix/lib/util/Makedepend-ack	(revision 9)
+++ 	(revision )
@@ -1,4 +1,0 @@
-depend-ack:
-	rm .depend-ack
-	touch .depend-ack
-	mkdep 'cc -O -D_MINIX -D_POSIX_SOURCE -E' openpty.c | sed -e 's:^\(.\):../obj-ack//./util/\1:' >> .depend-ack
Index: trunk/minix/lib/util/Makedepend-gnu
===================================================================
--- trunk/minix/lib/util/Makedepend-gnu	(revision 9)
+++ 	(revision )
@@ -1,4 +1,0 @@
-depend-gnu:
-	rm .depend-gnu
-	touch .depend-gnu
-	mkdep 'gcc -O -D_MINIX -D_POSIX_SOURCE -E' openpty.c | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./util/\1:' >> .depend-gnu
Index: trunk/minix/lib/util/Makefile
===================================================================
--- trunk/minix/lib/util/Makefile	(revision 9)
+++ 	(revision )
@@ -1,52 +1,0 @@
-#Generated from ./util/Makefile.in
-all: all-ack
-
-all-ack:
-all-gnu:
-
-makefiles: Makefile
-Makedepend-ack Makedepend-gnu: 
-	sh ../generate.sh ./util ../obj-ack/ ../obj-gnu
-
-Makefile: Makefile.in Makedepend-ack Makedepend-gnu
-	sh ../generate.sh ./util ../obj-ack/ ../obj-gnu
-	@echo
-	@echo *Attention*
-	@echo Makefile is regenerated... rerun command to see changes
-	@echo *Attention*
-	@echo
-
-depend: depend-ack
-all-ack: ../obj-ack//libutil.a
-
-../obj-ack//libutil.a: ../obj-ack//libutil.a(openpty.o)
-
-../obj-ack//libutil.a:
-	ar cr ../obj-ack//libutil.a ../obj-ack//./util/*.o
-	rm ../obj-ack//./util/*.o
-
-../obj-ack//libutil.a(openpty.o): openpty.c
-	cc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-ack//./util/openpty.o openpty.c
-
-all-gnu: ../obj-gnu/libutil.a
-
-../obj-gnu/libutil.a: ../obj-gnu/./util/openpty.o
-
-../obj-gnu/libutil.a:
-	gar cr ../obj-gnu/libutil.a $?
-
-../obj-gnu/./util/openpty.o: openpty.c
-	gcc -O -D_MINIX -D_POSIX_SOURCE -c -o ../obj-gnu/./util/openpty.o openpty.c
-
-
-
-
-clean::
-	rm -f ../obj-ack//./util/*
-	rm -f ../obj-gnu/./util/*
-
-include Makedepend-ack
-include .depend-ack
-
-include Makedepend-gnu
-include .depend-gnu
Index: trunk/minix/lib/util/Makefile.in
===================================================================
--- trunk/minix/lib/util/Makefile.in	(revision 9)
+++ 	(revision )
@@ -1,9 +1,0 @@
-# Makefile for lib/util.
-
-CFLAGS="-O -D_MINIX -D_POSIX_SOURCE"
-
-LIBRARIES=libutil
-
-libutil_FILES=openpty.c
-
-TYPE=both
Index: trunk/minix/lib/util/openpty.c
===================================================================
--- trunk/minix/lib/util/openpty.c	(revision 9)
+++ 	(revision )
@@ -1,82 +1,0 @@
-/*
- * openpty() tries to open a pty; applications won't have to
- * duplicate this code all the time (or change it if the system
- * pty interface changes).
- *
- * First version by Ben Gras <beng@few.vu.nl>,
- * Initially heavily based on telnetd/pty.c
- * by Fred N. van Kempen, <waltje@uwalt.nl.mugnet.org>.
- *
- */
-#include <libutil.h>
-#include <termios.h>
-#include <fcntl.h>
-#include <grp.h>
-#include <string.h>
-#include <stdlib.h>
-#include <errno.h>
-#include <stdio.h>
-#include <unistd.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <sys/ioc_tty.h>
-
-#define DEV_DIR		"/dev"
-
-/*
- * Allocate a PTY, by trying to open one repeatedly.
- */
-int openpty(int *amaster, int *aslave, char *name,
-	struct termios *termp, struct winsize *winp)
-{
-  char buff[128], temp[128];
-  register int i, j;
-  int pty_fd = -1, gr;
-  static char tty_name[128];
-  struct group *ttygroup;
-  gid_t tty_gid = 0;
-
-  if(!amaster || !aslave) {
-  	errno = EINVAL;
-  	return -1;
-  }
-
-  for(i = 'p'; i < 'w'; i++) {
-	j = 0;
-	do {
-		sprintf(buff, "%s/pty%c%c",
-			DEV_DIR, i, (j < 10) ? j + '0' : j + 'a' - 10);
-
-		if((*amaster = open(buff, O_RDWR)) >= 0) {
-		  sprintf(tty_name, "%s/tty%c%c", DEV_DIR,
-			i, (j < 10) ? j + '0' : j + 'a' - 10);
-		  if((*aslave = open(tty_name, O_RDWR)) >= 0)
-		  	break;
-		}
-		close(*amaster);
-
-		j++;
-		if (j == 16) break;
-	} while(1);
-
-	/* Did we find one? */
-	if (j < 16) break;
-  }
-  if (*amaster < 0) { errno = ENOENT; return(-1); }
-
-  setgrent();
-  ttygroup = getgrnam("tty");
-  endgrent();
-  if(ttygroup) tty_gid = ttygroup->gr_gid;
-
-  if(name) strcpy(name, tty_name);
-
-  /* Ignore errors on these. */
-  chown(tty_name, getuid(), tty_gid);
-  chmod(tty_name, 0620);	/* -rw--w---- */
-  if(termp) tcsetattr(*aslave, TCSAFLUSH, termp);
-  if(winp) ioctl(*aslave, TIOCSWINSZ, winp);
-
-  return(0);
-}
-
Index: trunk/minix/lib/zlib-1.2.3/ChangeLog
===================================================================
--- trunk/minix/lib/zlib-1.2.3/ChangeLog	(revision 9)
+++ 	(revision )
@@ -1,855 +1,0 @@
-
-                ChangeLog file for zlib
-
-Changes in 1.2.3 (18 July 2005)
-- Apply security vulnerability fixes to contrib/infback9 as well
-- Clean up some text files (carriage returns, trailing space)
-- Update testzlib, vstudio, masmx64, and masmx86 in contrib [Vollant]
-
-Changes in 1.2.2.4 (11 July 2005)
-- Add inflatePrime() function for starting inflation at bit boundary
-- Avoid some Visual C warnings in deflate.c
-- Avoid more silly Visual C warnings in inflate.c and inftrees.c for 64-bit
-  compile
-- Fix some spelling errors in comments [Betts]
-- Correct inflateInit2() error return documentation in zlib.h
-- Added zran.c example of compressed data random access to examples
-  directory, shows use of inflatePrime()
-- Fix cast for assignments to strm->state in inflate.c and infback.c
-- Fix zlibCompileFlags() in zutil.c to use 1L for long shifts [Oberhumer]
-- Move declarations of gf2 functions to right place in crc32.c [Oberhumer]
-- Add cast in trees.c t avoid a warning [Oberhumer]
-- Avoid some warnings in fitblk.c, gun.c, gzjoin.c in examples [Oberhumer]
-- Update make_vms.com [Zinser]
-- Initialize state->write in inflateReset() since copied in inflate_fast()
-- Be more strict on incomplete code sets in inflate_table() and increase
-  ENOUGH and MAXD -- this repairs a possible security vulnerability for
-  invalid inflate input.  Thanks to Tavis Ormandy and Markus Oberhumer for
-  discovering the vulnerability and providing test cases.
-- Add ia64 support to configure for HP-UX [Smith]
-- Add error return to gzread() for format or i/o error [Levin]
-- Use malloc.h for OS/2 [Necasek]
-
-Changes in 1.2.2.3 (27 May 2005)
-- Replace 1U constants in inflate.c and inftrees.c for 64-bit compile
-- Typecast fread() return values in gzio.c [Vollant]
-- Remove trailing space in minigzip.c outmode (VC++ can't deal with it)
-- Fix crc check bug in gzread() after gzungetc() [Heiner]
-- Add the deflateTune() function to adjust internal compression parameters
-- Add a fast gzip decompressor, gun.c, to examples (use of inflateBack)
-- Remove an incorrect assertion in examples/zpipe.c
-- Add C++ wrapper in infback9.h [Donais]
-- Fix bug in inflateCopy() when decoding fixed codes
-- Note in zlib.h how much deflateSetDictionary() actually uses
-- Remove USE_DICT_HEAD in deflate.c (would mess up inflate if used)
-- Add _WIN32_WCE to define WIN32 in zconf.in.h [Spencer]
-- Don't include stderr.h or errno.h for _WIN32_WCE in zutil.h [Spencer]
-- Add gzdirect() function to indicate transparent reads
-- Update contrib/minizip [Vollant]
-- Fix compilation of deflate.c when both ASMV and FASTEST [Oberhumer]
-- Add casts in crc32.c to avoid warnings [Oberhumer]
-- Add contrib/masmx64 [Vollant]
-- Update contrib/asm586, asm686, masmx86, testzlib, vstudio [Vollant]
-
-Changes in 1.2.2.2 (30 December 2004)
-- Replace structure assignments in deflate.c and inflate.c with zmemcpy to
-  avoid implicit memcpy calls (portability for no-library compilation)
-- Increase sprintf() buffer size in gzdopen() to allow for large numbers
-- Add INFLATE_STRICT to check distances against zlib header
-- Improve WinCE errno handling and comments [Chang]
-- Remove comment about no gzip header processing in FAQ
-- Add Z_FIXED strategy option to deflateInit2() to force fixed trees
-- Add updated make_vms.com [Coghlan], update README
-- Create a new "examples" directory, move gzappend.c there, add zpipe.c,
-  fitblk.c, gzlog.[ch], gzjoin.c, and zlib_how.html.
-- Add FAQ entry and comments in deflate.c on uninitialized memory access
-- Add Solaris 9 make options in configure [Gilbert]
-- Allow strerror() usage in gzio.c for STDC
-- Fix DecompressBuf in contrib/delphi/ZLib.pas [ManChesTer]
-- Update contrib/masmx86/inffas32.asm and gvmat32.asm [Vollant]
-- Use z_off_t for adler32_combine() and crc32_combine() lengths
-- Make adler32() much faster for small len
-- Use OS_CODE in deflate() default gzip header
-
-Changes in 1.2.2.1 (31 October 2004)
-- Allow inflateSetDictionary() call for raw inflate
-- Fix inflate header crc check bug for file names and comments
-- Add deflateSetHeader() and gz_header structure for custom gzip headers
-- Add inflateGetheader() to retrieve gzip headers
-- Add crc32_combine() and adler32_combine() functions
-- Add alloc_func, free_func, in_func, out_func to Z_PREFIX list
-- Use zstreamp consistently in zlib.h (inflate_back functions)
-- Remove GUNZIP condition from definition of inflate_mode in inflate.h
-  and in contrib/inflate86/inffast.S [Truta, Anderson]
-- Add support for AMD64 in contrib/inflate86/inffas86.c [Anderson]
-- Update projects/README.projects and projects/visualc6 [Truta]
-- Update win32/DLL_FAQ.txt [Truta]
-- Avoid warning under NO_GZCOMPRESS in gzio.c; fix typo [Truta]
-- Deprecate Z_ASCII; use Z_TEXT instead [Truta]
-- Use a new algorithm for setting strm->data_type in trees.c [Truta]
-- Do not define an exit() prototype in zutil.c unless DEBUG defined
-- Remove prototype of exit() from zutil.c, example.c, minigzip.c [Truta]
-- Add comment in zlib.h for Z_NO_FLUSH parameter to deflate()
-- Fix Darwin build version identification [Peterson]
-
-Changes in 1.2.2 (3 October 2004)
-- Update zlib.h comments on gzip in-memory processing
-- Set adler to 1 in inflateReset() to support Java test suite [Walles]
-- Add contrib/dotzlib [Ravn]
-- Update win32/DLL_FAQ.txt [Truta]
-- Update contrib/minizip [Vollant]
-- Move contrib/visual-basic.txt to old/ [Truta]
-- Fix assembler builds in projects/visualc6/ [Truta]
-
-Changes in 1.2.1.2 (9 September 2004)
-- Update INDEX file
-- Fix trees.c to update strm->data_type (no one ever noticed!)
-- Fix bug in error case in inflate.c, infback.c, and infback9.c [Brown]
-- Add "volatile" to crc table flag declaration (for DYNAMIC_CRC_TABLE)
-- Add limited multitasking protection to DYNAMIC_CRC_TABLE
-- Add NO_vsnprintf for VMS in zutil.h [Mozilla]
-- Don't declare strerror() under VMS [Mozilla]
-- Add comment to DYNAMIC_CRC_TABLE to use get_crc_table() to initialize
-- Update contrib/ada [Anisimkov]
-- Update contrib/minizip [Vollant]
-- Fix configure to not hardcode directories for Darwin [Peterson]
-- Fix gzio.c to not return error on empty files [Brown]
-- Fix indentation; update version in contrib/delphi/ZLib.pas and
-  contrib/pascal/zlibpas.pas [Truta]
-- Update mkasm.bat in contrib/masmx86 [Truta]
-- Update contrib/untgz [Truta]
-- Add projects/README.projects [Truta]
-- Add project for MS Visual C++ 6.0 in projects/visualc6 [Cadieux, Truta]
-- Update win32/DLL_FAQ.txt [Truta]
-- Update list of Z_PREFIX symbols in zconf.h [Randers-Pehrson, Truta]
-- Remove an unnecessary assignment to curr in inftrees.c [Truta]
-- Add OS/2 to exe builds in configure [Poltorak]
-- Remove err dummy parameter in zlib.h [Kientzle]
-
-Changes in 1.2.1.1 (9 January 2004)
-- Update email address in README
-- Several FAQ updates
-- Fix a big fat bug in inftrees.c that prevented decoding valid
-  dynamic blocks with only literals and no distance codes --
-  Thanks to "Hot Emu" for the bug report and sample file
-- Add a note to puff.c on no distance codes case.
-
-Changes in 1.2.1 (17 November 2003)
-- Remove a tab in contrib/gzappend/gzappend.c
-- Update some interfaces in contrib for new zlib functions
-- Update zlib version number in some contrib entries
-- Add Windows CE definition for ptrdiff_t in zutil.h [Mai, Truta]
-- Support shared libraries on Hurd and KFreeBSD [Brown]
-- Fix error in NO_DIVIDE option of adler32.c
-
-Changes in 1.2.0.8 (4 November 2003)
-- Update version in contrib/delphi/ZLib.pas and contrib/pascal/zlibpas.pas
-- Add experimental NO_DIVIDE #define in adler32.c
-    - Possibly faster on some processors (let me know if it is)
-- Correct Z_BLOCK to not return on first inflate call if no wrap
-- Fix strm->data_type on inflate() return to correctly indicate EOB
-- Add deflatePrime() function for appending in the middle of a byte
-- Add contrib/gzappend for an example of appending to a stream
-- Update win32/DLL_FAQ.txt [Truta]
-- Delete Turbo C comment in README [Truta]
-- Improve some indentation in zconf.h [Truta]
-- Fix infinite loop on bad input in configure script [Church]
-- Fix gzeof() for concatenated gzip files [Johnson]
-- Add example to contrib/visual-basic.txt [Michael B.]
-- Add -p to mkdir's in Makefile.in [vda]
-- Fix configure to properly detect presence or lack of printf functions
-- Add AS400 support [Monnerat]
-- Add a little Cygwin support [Wilson]
-
-Changes in 1.2.0.7 (21 September 2003)
-- Correct some debug formats in contrib/infback9
-- Cast a type in a debug statement in trees.c
-- Change search and replace delimiter in configure from % to # [Beebe]
-- Update contrib/untgz to 0.2 with various fixes [Truta]
-- Add build support for Amiga [Nikl]
-- Remove some directories in old that have been updated to 1.2
-- Add dylib building for Mac OS X in configure and Makefile.in
-- Remove old distribution stuff from Makefile
-- Update README to point to DLL_FAQ.txt, and add comment on Mac OS X
-- Update links in README
-
-Changes in 1.2.0.6 (13 September 2003)
-- Minor FAQ updates
-- Update contrib/minizip to 1.00 [Vollant]
-- Remove test of gz functions in example.c when GZ_COMPRESS defined [Truta]
-- Update POSTINC comment for 68060 [Nikl]
-- Add contrib/infback9 with deflate64 decoding (unsupported)
-- For MVS define NO_vsnprintf and undefine FAR [van Burik]
-- Add pragma for fdopen on MVS [van Burik]
-
-Changes in 1.2.0.5 (8 September 2003)
-- Add OF to inflateBackEnd() declaration in zlib.h
-- Remember start when using gzdopen in the middle of a file
-- Use internal off_t counters in gz* functions to properly handle seeks
-- Perform more rigorous check for distance-too-far in inffast.c
-- Add Z_BLOCK flush option to return from inflate at block boundary
-- Set strm->data_type on return from inflate
-    - Indicate bits unused, if at block boundary, and if in last block
-- Replace size_t with ptrdiff_t in crc32.c, and check for correct size
-- Add condition so old NO_DEFLATE define still works for compatibility
-- FAQ update regarding the Windows DLL [Truta]
-- INDEX update: add qnx entry, remove aix entry [Truta]
-- Install zlib.3 into mandir [Wilson]
-- Move contrib/zlib_dll_FAQ.txt to win32/DLL_FAQ.txt; update [Truta]
-- Adapt the zlib interface to the new DLL convention guidelines [Truta]
-- Introduce ZLIB_WINAPI macro to allow the export of functions using
-  the WINAPI calling convention, for Visual Basic [Vollant, Truta]
-- Update msdos and win32 scripts and makefiles [Truta]
-- Export symbols by name, not by ordinal, in win32/zlib.def [Truta]
-- Add contrib/ada [Anisimkov]
-- Move asm files from contrib/vstudio/vc70_32 to contrib/asm386 [Truta]
-- Rename contrib/asm386 to contrib/masmx86 [Truta, Vollant]
-- Add contrib/masm686 [Truta]
-- Fix offsets in contrib/inflate86 and contrib/masmx86/inffas32.asm
-  [Truta, Vollant]
-- Update contrib/delphi; rename to contrib/pascal; add example [Truta]
-- Remove contrib/delphi2; add a new contrib/delphi [Truta]
-- Avoid inclusion of the nonstandard <memory.h> in contrib/iostream,
-  and fix some method prototypes [Truta]
-- Fix the ZCR_SEED2 constant to avoid warnings in contrib/minizip
-  [Truta]
-- Avoid the use of backslash (\) in contrib/minizip [Vollant]
-- Fix file time handling in contrib/untgz; update makefiles [Truta]
-- Update contrib/vstudio/vc70_32 to comply with the new DLL guidelines
-  [Vollant]
-- Remove contrib/vstudio/vc15_16 [Vollant]
-- Rename contrib/vstudio/vc70_32 to contrib/vstudio/vc7 [Truta]
-- Update README.contrib [Truta]
-- Invert the assignment order of match_head and s->prev[...] in
-  INSERT_STRING [Truta]
-- Compare TOO_FAR with 32767 instead of 32768, to avoid 16-bit warnings
-  [Truta]
-- Compare function pointers with 0, not with NULL or Z_NULL [Truta]
-- Fix prototype of syncsearch in inflate.c [Truta]
-- Introduce ASMINF macro to be enabled when using an ASM implementation
-  of inflate_fast [Truta]
-- Change NO_DEFLATE to NO_GZCOMPRESS [Truta]
-- Modify test_gzio in example.c to take a single file name as a
-  parameter [Truta]
-- Exit the example.c program if gzopen fails [Truta]
-- Add type casts around strlen in example.c [Truta]
-- Remove casting to sizeof in minigzip.c; give a proper type
-  to the variable compared with SUFFIX_LEN [Truta]
-- Update definitions of STDC and STDC99 in zconf.h [Truta]
-- Synchronize zconf.h with the new Windows DLL interface [Truta]
-- Use SYS16BIT instead of __32BIT__ to distinguish between
-  16- and 32-bit platforms [Truta]
-- Use far memory allocators in small 16-bit memory models for
-  Turbo C [Truta]
-- Add info about the use of ASMV, ASMINF and ZLIB_WINAPI in
-  zlibCompileFlags [Truta]
-- Cygwin has vsnprintf [Wilson]
-- In Windows16, OS_CODE is 0, as in MSDOS [Truta]
-- In Cygwin, OS_CODE is 3 (Unix), not 11 (Windows32) [Wilson]
-
-Changes in 1.2.0.4 (10 August 2003)
-- Minor FAQ updates
-- Be more strict when checking inflateInit2's windowBits parameter
-- Change NO_GUNZIP compile option to NO_GZIP to cover deflate as well
-- Add gzip wrapper option to deflateInit2 using windowBits
-- Add updated QNX rule in configure and qnx directory [Bonnefoy]
-- Make inflate distance-too-far checks more rigorous
-- Clean up FAR usage in inflate
-- Add casting to sizeof() in gzio.c and minigzip.c
-
-Changes in 1.2.0.3 (19 July 2003)
-- Fix silly error in gzungetc() implementation [Vollant]
-- Update contrib/minizip and contrib/vstudio [Vollant]
-- Fix printf format in example.c
-- Correct cdecl support in zconf.in.h [Anisimkov]
-- Minor FAQ updates
-
-Changes in 1.2.0.2 (13 July 2003)
-- Add ZLIB_VERNUM in zlib.h for numerical preprocessor comparisons
-- Attempt to avoid warnings in crc32.c for pointer-int conversion
-- Add AIX to configure, remove aix directory [Bakker]
-- Add some casts to minigzip.c
-- Improve checking after insecure sprintf() or vsprintf() calls
-- Remove #elif's from crc32.c
-- Change leave label to inf_leave in inflate.c and infback.c to avoid
-  library conflicts
-- Remove inflate gzip decoding by default--only enable gzip decoding by
-  special request for stricter backward compatibility
-- Add zlibCompileFlags() function to return compilation information
-- More typecasting in deflate.c to avoid warnings
-- Remove leading underscore from _Capital #defines [Truta]
-- Fix configure to link shared library when testing
-- Add some Windows CE target adjustments [Mai]
-- Remove #define ZLIB_DLL in zconf.h [Vollant]
-- Add zlib.3 [Rodgers]
-- Update RFC URL in deflate.c and algorithm.txt [Mai]
-- Add zlib_dll_FAQ.txt to contrib [Truta]
-- Add UL to some constants [Truta]
-- Update minizip and vstudio [Vollant]
-- Remove vestigial NEED_DUMMY_RETURN from zconf.in.h
-- Expand use of NO_DUMMY_DECL to avoid all dummy structures
-- Added iostream3 to contrib [Schwardt]
-- Replace rewind() with fseek() for WinCE [Truta]
-- Improve setting of zlib format compression level flags
-    - Report 0 for huffman and rle strategies and for level == 0 or 1
-    - Report 2 only for level == 6
-- Only deal with 64K limit when necessary at compile time [Truta]
-- Allow TOO_FAR check to be turned off at compile time [Truta]
-- Add gzclearerr() function [Souza]
-- Add gzungetc() function
-
-Changes in 1.2.0.1 (17 March 2003)
-- Add Z_RLE strategy for run-length encoding [Truta]
-    - When Z_RLE requested, restrict matches to distance one
-    - Update zlib.h, minigzip.c, gzopen(), gzdopen() for Z_RLE
-- Correct FASTEST compilation to allow level == 0
-- Clean up what gets compiled for FASTEST
-- Incorporate changes to zconf.in.h [Vollant]
-    - Refine detection of Turbo C need for dummy returns
-    - Refine ZLIB_DLL compilation
-    - Include additional header file on VMS for off_t typedef
-- Try to use _vsnprintf where it supplants vsprintf [Vollant]
-- Add some casts in inffast.c
-- Enchance comments in zlib.h on what happens if gzprintf() tries to
-  write more than 4095 bytes before compression
-- Remove unused state from inflateBackEnd()
-- Remove exit(0) from minigzip.c, example.c
-- Get rid of all those darn tabs
-- Add "check" target to Makefile.in that does the same thing as "test"
-- Add "mostlyclean" and "maintainer-clean" targets to Makefile.in
-- Update contrib/inflate86 [Anderson]
-- Update contrib/testzlib, contrib/vstudio, contrib/minizip [Vollant]
-- Add msdos and win32 directories with makefiles [Truta]
-- More additions and improvements to the FAQ
-
-Changes in 1.2.0 (9 March 2003)
-- New and improved inflate code
-    - About 20% faster
-    - Does not allocate 32K window unless and until needed
-    - Automatically detects and decompresses gzip streams
-    - Raw inflate no longer needs an extra dummy byte at end
-    - Added inflateBack functions using a callback interface--even faster
-      than inflate, useful for file utilities (gzip, zip)
-    - Added inflateCopy() function to record state for random access on
-      externally generated deflate streams (e.g. in gzip files)
-    - More readable code (I hope)
-- New and improved crc32()
-    - About 50% faster, thanks to suggestions from Rodney Brown
-- Add deflateBound() and compressBound() functions
-- Fix memory leak in deflateInit2()
-- Permit setting dictionary for raw deflate (for parallel deflate)
-- Fix const declaration for gzwrite()
-- Check for some malloc() failures in gzio.c
-- Fix bug in gzopen() on single-byte file 0x1f
-- Fix bug in gzread() on concatenated file with 0x1f at end of buffer
-  and next buffer doesn't start with 0x8b
-- Fix uncompress() to return Z_DATA_ERROR on truncated input
-- Free memory at end of example.c
-- Remove MAX #define in trees.c (conflicted with some libraries)
-- Fix static const's in deflate.c, gzio.c, and zutil.[ch]
-- Declare malloc() and free() in gzio.c if STDC not defined
-- Use malloc() instead of calloc() in zutil.c if int big enough
-- Define STDC for AIX
-- Add aix/ with approach for compiling shared library on AIX
-- Add HP-UX support for shared libraries in configure
-- Add OpenUNIX support for shared libraries in configure
-- Use $cc instead of gcc to build shared library
-- Make prefix directory if needed when installing
-- Correct Macintosh avoidance of typedef Byte in zconf.h
-- Correct Turbo C memory allocation when under Linux
-- Use libz.a instead of -lz in Makefile (assure use of compiled library)
-- Update configure to check for snprintf or vsnprintf functions and their
-  return value, warn during make if using an insecure function
-- Fix configure problem with compile-time knowledge of HAVE_UNISTD_H that
-  is lost when library is used--resolution is to build new zconf.h
-- Documentation improvements (in zlib.h):
-    - Document raw deflate and inflate
-    - Update RFCs URL
-    - Point out that zlib and gzip formats are different
-    - Note that Z_BUF_ERROR is not fatal
-    - Document string limit for gzprintf() and possible buffer overflow
-    - Note requirement on avail_out when flushing
-    - Note permitted values of flush parameter of inflate()
-- Add some FAQs (and even answers) to the FAQ
-- Add contrib/inflate86/ for x86 faster inflate
-- Add contrib/blast/ for PKWare Data Compression Library decompression
-- Add contrib/puff/ simple inflate for deflate format description
-
-Changes in 1.1.4 (11 March 2002)
-- ZFREE was repeated on same allocation on some error conditions.
-  This creates a security problem described in
-  http://www.zlib.org/advisory-2002-03-11.txt
-- Returned incorrect error (Z_MEM_ERROR) on some invalid data
-- Avoid accesses before window for invalid distances with inflate window
-  less than 32K.
-- force windowBits > 8 to avoid a bug in the encoder for a window size
-  of 256 bytes. (A complete fix will be available in 1.1.5).
-
-Changes in 1.1.3 (9 July 1998)
-- fix "an inflate input buffer bug that shows up on rare but persistent
-  occasions" (Mark)
-- fix gzread and gztell for concatenated .gz files (Didier Le Botlan)
-- fix gzseek(..., SEEK_SET) in write mode
-- fix crc check after a gzeek (Frank Faubert)
-- fix miniunzip when the last entry in a zip file is itself a zip file
-  (J Lillge)
-- add contrib/asm586 and contrib/asm686 (Brian Raiter)
-  See http://www.muppetlabs.com/~breadbox/software/assembly.html
-- add support for Delphi 3 in contrib/delphi (Bob Dellaca)
-- add support for C++Builder 3 and Delphi 3 in contrib/delphi2 (Davide Moretti)
-- do not exit prematurely in untgz if 0 at start of block (Magnus Holmgren)
-- use macro EXTERN instead of extern to support DLL for BeOS (Sander Stoks)
-- added a FAQ file
-
-- Support gzdopen on Mac with Metrowerks (Jason Linhart)
-- Do not redefine Byte on Mac (Brad Pettit & Jason Linhart)
-- define SEEK_END too if SEEK_SET is not defined (Albert Chin-A-Young)
-- avoid some warnings with Borland C (Tom Tanner)
-- fix a problem in contrib/minizip/zip.c for 16-bit MSDOS (Gilles Vollant)
-- emulate utime() for WIN32 in contrib/untgz  (Gilles Vollant)
-- allow several arguments to configure (Tim Mooney, Frodo Looijaard)
-- use libdir and includedir in Makefile.in (Tim Mooney)
-- support shared libraries on OSF1 V4 (Tim Mooney)
-- remove so_locations in "make clean"  (Tim Mooney)
-- fix maketree.c compilation error (Glenn, Mark)
-- Python interface to zlib now in Python 1.5 (Jeremy Hylton)
-- new Makefile.riscos (Rich Walker)
-- initialize static descriptors in trees.c for embedded targets (Nick Smith)
-- use "foo-gz" in example.c for RISCOS and VMS (Nick Smith)
-- add the OS/2 files in Makefile.in too (Andrew Zabolotny)
-- fix fdopen and halloc macros for Microsoft C 6.0 (Tom Lane)
-- fix maketree.c to allow clean compilation of inffixed.h (Mark)
-- fix parameter check in deflateCopy (Gunther Nikl)
-- cleanup trees.c, use compressed_len only in debug mode (Christian Spieler)
-- Many portability patches by Christian Spieler:
-  . zutil.c, zutil.h: added "const" for zmem*
-  . Make_vms.com: fixed some typos
-  . Make_vms.com: msdos/Makefile.*: removed zutil.h from some dependency lists
-  . msdos/Makefile.msc: remove "default rtl link library" info from obj files
-  . msdos/Makefile.*: use model-dependent name for the built zlib library
-  . msdos/Makefile.emx, nt/Makefile.emx, nt/Makefile.gcc:
-     new makefiles, for emx (DOS/OS2), emx&rsxnt and mingw32 (Windows 9x / NT)
-- use define instead of typedef for Bytef also for MSC small/medium (Tom Lane)
-- replace __far with _far for better portability (Christian Spieler, Tom Lane)
-- fix test for errno.h in configure (Tim Newsham)
-
-Changes in 1.1.2 (19 March 98)
-- added contrib/minzip, mini zip and unzip based on zlib (Gilles Vollant)
-  See http://www.winimage.com/zLibDll/unzip.html
-- preinitialize the inflate tables for fixed codes, to make the code
-  completely thread safe (Mark)
-- some simplifications and slight speed-up to the inflate code (Mark)
-- fix gzeof on non-compressed files (Allan Schrum)
-- add -std1 option in configure for OSF1 to fix gzprintf (Martin Mokrejs)
-- use default value of 4K for Z_BUFSIZE for 16-bit MSDOS (Tim Wegner + Glenn)
-- added os2/Makefile.def and os2/zlib.def (Andrew Zabolotny)
-- add shared lib support for UNIX_SV4.2MP (MATSUURA Takanori)
-- do not wrap extern "C" around system includes (Tom Lane)
-- mention zlib binding for TCL in README (Andreas Kupries)
-- added amiga/Makefile.pup for Amiga powerUP SAS/C PPC (Andreas Kleinert)
-- allow "make install prefix=..." even after configure (Glenn Randers-Pehrson)
-- allow "configure --prefix $HOME" (Tim Mooney)
-- remove warnings in example.c and gzio.c (Glenn Randers-Pehrson)
-- move Makefile.sas to amiga/Makefile.sas
-
-Changes in 1.1.1 (27 Feb 98)
-- fix macros _tr_tally_* in deflate.h for debug mode  (Glenn Randers-Pehrson)
-- remove block truncation heuristic which had very marginal effect for zlib
-  (smaller lit_bufsize than in gzip 1.2.4) and degraded a little the
-  compression ratio on some files. This also allows inlining _tr_tally for
-  matches in deflate_slow.
-- added msdos/Makefile.w32 for WIN32 Microsoft Visual C++ (Bob Frazier)
-
-Changes in 1.1.0 (24 Feb 98)
-- do not return STREAM_END prematurely in inflate (John Bowler)
-- revert to the zlib 1.0.8 inflate to avoid the gcc 2.8.0 bug (Jeremy Buhler)
-- compile with -DFASTEST to get compression code optimized for speed only
-- in minigzip, try mmap'ing the input file first (Miguel Albrecht)
-- increase size of I/O buffers in minigzip.c and gzio.c (not a big gain
-  on Sun but significant on HP)
-
-- add a pointer to experimental unzip library in README (Gilles Vollant)
-- initialize variable gcc in configure (Chris Herborth)
-
-Changes in 1.0.9 (17 Feb 1998)
-- added gzputs and gzgets functions
-- do not clear eof flag in gzseek (Mark Diekhans)
-- fix gzseek for files in transparent mode (Mark Diekhans)
-- do not assume that vsprintf returns the number of bytes written (Jens Krinke)
-- replace EXPORT with ZEXPORT to avoid conflict with other programs
-- added compress2 in zconf.h, zlib.def, zlib.dnt
-- new asm code from Gilles Vollant in contrib/asm386
-- simplify the inflate code (Mark):
- . Replace ZALLOC's in huft_build() with single ZALLOC in inflate_blocks_new()
- . ZALLOC the length list in inflate_trees_fixed() instead of using stack
- . ZALLOC the value area for huft_build() instead of using stack
- . Simplify Z_FINISH check in inflate()
-
-- Avoid gcc 2.8.0 comparison bug a little differently than zlib 1.0.8
-- in inftrees.c, avoid cc -O bug on HP (Farshid Elahi)
-- in zconf.h move the ZLIB_DLL stuff earlier to avoid problems with
-  the declaration of FAR (Gilles VOllant)
-- install libz.so* with mode 755 (executable) instead of 644 (Marc Lehmann)
-- read_buf buf parameter of type Bytef* instead of charf*
-- zmemcpy parameters are of type Bytef*, not charf* (Joseph Strout)
-- do not redeclare unlink in minigzip.c for WIN32 (John Bowler)
-- fix check for presence of directories in "make install" (Ian Willis)
-
-Changes in 1.0.8 (27 Jan 1998)
-- fixed offsets in contrib/asm386/gvmat32.asm (Gilles Vollant)
-- fix gzgetc and gzputc for big endian systems (Markus Oberhumer)
-- added compress2() to allow setting the compression level
-- include sys/types.h to get off_t on some systems (Marc Lehmann & QingLong)
-- use constant arrays for the static trees in trees.c instead of computing
-  them at run time (thanks to Ken Raeburn for this suggestion). To create
-  trees.h, compile with GEN_TREES_H and run "make test".
-- check return code of example in "make test" and display result
-- pass minigzip command line options to file_compress
-- simplifying code of inflateSync to avoid gcc 2.8 bug
-
-- support CC="gcc -Wall" in configure -s (QingLong)
-- avoid a flush caused by ftell in gzopen for write mode (Ken Raeburn)
-- fix test for shared library support to avoid compiler warnings
-- zlib.lib -> zlib.dll in msdos/zlib.rc (Gilles Vollant)
-- check for TARGET_OS_MAC in addition to MACOS (Brad Pettit)
-- do not use fdopen for Metrowerks on Mac (Brad Pettit))
-- add checks for gzputc and gzputc in example.c
-- avoid warnings in gzio.c and deflate.c (Andreas Kleinert)
-- use const for the CRC table (Ken Raeburn)
-- fixed "make uninstall" for shared libraries
-- use Tracev instead of Trace in infblock.c
-- in example.c use correct compressed length for test_sync
-- suppress +vnocompatwarnings in configure for HPUX (not always supported)
-
-Changes in 1.0.7 (20 Jan 1998)
-- fix gzseek which was broken in write mode
-- return error for gzseek to negative absolute position
-- fix configure for Linux (Chun-Chung Chen)
-- increase stack space for MSC (Tim Wegner)
-- get_crc_table and inflateSyncPoint are EXPORTed (Gilles Vollant)
-- define EXPORTVA for gzprintf (Gilles Vollant)
-- added man page zlib.3 (Rick Rodgers)
-- for contrib/untgz, fix makedir() and improve Makefile
-
-- check gzseek in write mode in example.c
-- allocate extra buffer for seeks only if gzseek is actually called
-- avoid signed/unsigned comparisons (Tim Wegner, Gilles Vollant)
-- add inflateSyncPoint in zconf.h
-- fix list of exported functions in nt/zlib.dnt and mdsos/zlib.def
-
-Changes in 1.0.6 (19 Jan 1998)
-- add functions gzprintf, gzputc, gzgetc, gztell, gzeof, gzseek, gzrewind and
-  gzsetparams (thanks to Roland Giersig and Kevin Ruland for some of this code)
-- Fix a deflate bug occurring only with compression level 0 (thanks to
-  Andy Buckler for finding this one).
-- In minigzip, pass transparently also the first byte for .Z files.
-- return Z_BUF_ERROR instead of Z_OK if output buffer full in uncompress()
-- check Z_FINISH in inflate (thanks to Marc Schluper)
-- Implement deflateCopy (thanks to Adam Costello)
-- make static libraries by default in configure, add --shared option.
-- move MSDOS or Windows specific files to directory msdos
-- suppress the notion of partial flush to simplify the interface
-  (but the symbol Z_PARTIAL_FLUSH is kept for compatibility with 1.0.4)
-- suppress history buffer provided by application to simplify the interface
-  (this feature was not implemented anyway in 1.0.4)
-- next_in and avail_in must be initialized before calling inflateInit or
-  inflateInit2
-- add EXPORT in all exported functions (for Windows DLL)
-- added Makefile.nt (thanks to Stephen Williams)
-- added the unsupported "contrib" directory:
-   contrib/asm386/ by Gilles Vollant <info@winimage.com>
-        386 asm code replacing longest_match().
-   contrib/iostream/ by Kevin Ruland <kevin@rodin.wustl.edu>
-        A C++ I/O streams interface to the zlib gz* functions
-   contrib/iostream2/  by Tyge Løvset <Tyge.Lovset@cmr.no>
-        Another C++ I/O streams interface
-   contrib/untgz/  by "Pedro A. Aranda Guti\irrez" <paag@tid.es>
-        A very simple tar.gz file extractor using zlib
-   contrib/visual-basic.txt by Carlos Rios <c_rios@sonda.cl>
-        How to use compress(), uncompress() and the gz* functions from VB.
-- pass params -f (filtered data), -h (huffman only), -1 to -9 (compression
-  level) in minigzip (thanks to Tom Lane)
-
-- use const for rommable constants in deflate
-- added test for gzseek and gztell in example.c
-- add undocumented function inflateSyncPoint() (hack for Paul Mackerras)
-- add undocumented function zError to convert error code to string
-  (for Tim Smithers)
-- Allow compilation of gzio with -DNO_DEFLATE to avoid the compression code.
-- Use default memcpy for Symantec MSDOS compiler.
-- Add EXPORT keyword for check_func (needed for Windows DLL)
-- add current directory to LD_LIBRARY_PATH for "make test"
-- create also a link for libz.so.1
-- added support for FUJITSU UXP/DS (thanks to Toshiaki Nomura)
-- use $(SHAREDLIB) instead of libz.so in Makefile.in (for HPUX)
-- added -soname for Linux in configure (Chun-Chung Chen,
-- assign numbers to the exported functions in zlib.def (for Windows DLL)
-- add advice in zlib.h for best usage of deflateSetDictionary
-- work around compiler bug on Atari (cast Z_NULL in call of s->checkfn)
-- allow compilation with ANSI keywords only enabled for TurboC in large model
-- avoid "versionString"[0] (Borland bug)
-- add NEED_DUMMY_RETURN for Borland
-- use variable z_verbose for tracing in debug mode (L. Peter Deutsch).
-- allow compilation with CC
-- defined STDC for OS/2 (David Charlap)
-- limit external names to 8 chars for MVS (Thomas Lund)
-- in minigzip.c, use static buffers only for 16-bit systems
-- fix suffix check for "minigzip -d foo.gz"
-- do not return an error for the 2nd of two consecutive gzflush() (Felix Lee)
-- use _fdopen instead of fdopen for MSC >= 6.0 (Thomas Fanslau)
-- added makelcc.bat for lcc-win32 (Tom St Denis)
-- in Makefile.dj2, use copy and del instead of install and rm (Frank Donahoe)
-- Avoid expanded $Id: ChangeLog,v 1.1 2005/09/23 22:39:00 beng Exp $. Use "rcs -kb" or "cvs admin -kb" to avoid Id expansion.
-- check for unistd.h in configure (for off_t)
-- remove useless check parameter in inflate_blocks_free
-- avoid useless assignment of s->check to itself in inflate_blocks_new
-- do not flush twice in gzclose (thanks to Ken Raeburn)
-- rename FOPEN as F_OPEN to avoid clash with /usr/include/sys/file.h
-- use NO_ERRNO_H instead of enumeration of operating systems with errno.h
-- work around buggy fclose on pipes for HP/UX
-- support zlib DLL with BORLAND C++ 5.0 (thanks to Glenn Randers-Pehrson)
-- fix configure if CC is already equal to gcc
-
-Changes in 1.0.5 (3 Jan 98)
-- Fix inflate to terminate gracefully when fed corrupted or invalid data
-- Use const for rommable constants in inflate
-- Eliminate memory leaks on error conditions in inflate
-- Removed some vestigial code in inflate
-- Update web address in README
-
-Changes in 1.0.4 (24 Jul 96)
-- In very rare conditions, deflate(s, Z_FINISH) could fail to produce an EOF
-  bit, so the decompressor could decompress all the correct data but went
-  on to attempt decompressing extra garbage data. This affected minigzip too.
-- zlibVersion and gzerror return const char* (needed for DLL)
-- port to RISCOS (no fdopen, no multiple dots, no unlink, no fileno)
-- use z_error only for DEBUG (avoid problem with DLLs)
-
-Changes in 1.0.3 (2 Jul 96)
-- use z_streamp instead of z_stream *, which is now a far pointer in MSDOS
-  small and medium models; this makes the library incompatible with previous
-  versions for these models. (No effect in large model or on other systems.)
-- return OK instead of BUF_ERROR if previous deflate call returned with
-  avail_out as zero but there is nothing to do
-- added memcmp for non STDC compilers
-- define NO_DUMMY_DECL for more Mac compilers (.h files merged incorrectly)
-- define __32BIT__ if __386__ or i386 is defined (pb. with Watcom and SCO)
-- better check for 16-bit mode MSC (avoids problem with Symantec)
-
-Changes in 1.0.2 (23 May 96)
-- added Windows DLL support
-- added a function zlibVersion (for the DLL support)
-- fixed declarations using Bytef in infutil.c (pb with MSDOS medium model)
-- Bytef is define's instead of typedef'd only for Borland C
-- avoid reading uninitialized memory in example.c
-- mention in README that the zlib format is now RFC1950
-- updated Makefile.dj2
-- added algorithm.doc
-
-Changes in 1.0.1 (20 May 96) [1.0 skipped to avoid confusion]
-- fix array overlay in deflate.c which sometimes caused bad compressed data
-- fix inflate bug with empty stored block
-- fix MSDOS medium model which was broken in 0.99
-- fix deflateParams() which could generated bad compressed data.
-- Bytef is define'd instead of typedef'ed (work around Borland bug)
-- added an INDEX file
-- new makefiles for DJGPP (Makefile.dj2), 32-bit Borland (Makefile.b32),
-  Watcom (Makefile.wat), Amiga SAS/C (Makefile.sas)
-- speed up adler32 for modern machines without auto-increment
-- added -ansi for IRIX in configure
-- static_init_done in trees.c is an int
-- define unlink as delete for VMS
-- fix configure for QNX
-- add configure branch for SCO and HPUX
-- avoid many warnings (unused variables, dead assignments, etc...)
-- no fdopen for BeOS
-- fix the Watcom fix for 32 bit mode (define FAR as empty)
-- removed redefinition of Byte for MKWERKS
-- work around an MWKERKS bug (incorrect merge of all .h files)
-
-Changes in 0.99 (27 Jan 96)
-- allow preset dictionary shared between compressor and decompressor
-- allow compression level 0 (no compression)
-- add deflateParams in zlib.h: allow dynamic change of compression level
-  and compression strategy.
-- test large buffers and deflateParams in example.c
-- add optional "configure" to build zlib as a shared library
-- suppress Makefile.qnx, use configure instead
-- fixed deflate for 64-bit systems (detected on Cray)
-- fixed inflate_blocks for 64-bit systems (detected on Alpha)
-- declare Z_DEFLATED in zlib.h (possible parameter for deflateInit2)
-- always return Z_BUF_ERROR when deflate() has nothing to do
-- deflateInit and inflateInit are now macros to allow version checking
-- prefix all global functions and types with z_ with -DZ_PREFIX
-- make falloc completely reentrant (inftrees.c)
-- fixed very unlikely race condition in ct_static_init
-- free in reverse order of allocation to help memory manager
-- use zlib-1.0/* instead of zlib/* inside the tar.gz
-- make zlib warning-free with "gcc -O3 -Wall -Wwrite-strings -Wpointer-arith
-  -Wconversion -Wstrict-prototypes -Wmissing-prototypes"
-- allow gzread on concatenated .gz files
-- deflateEnd now returns Z_DATA_ERROR if it was premature
-- deflate is finally (?) fully deterministic (no matches beyond end of input)
-- Document Z_SYNC_FLUSH
-- add uninstall in Makefile
-- Check for __cpluplus in zlib.h
-- Better test in ct_align for partial flush
-- avoid harmless warnings for Borland C++
-- initialize hash_head in deflate.c
-- avoid warning on fdopen (gzio.c) for HP cc -Aa
-- include stdlib.h for STDC compilers
-- include errno.h for Cray
-- ignore error if ranlib doesn't exist
-- call ranlib twice for NeXTSTEP
-- use exec_prefix instead of prefix for libz.a
-- renamed ct_* as _tr_* to avoid conflict with applications
-- clear z->msg in inflateInit2 before any error return
-- initialize opaque in example.c, gzio.c, deflate.c and inflate.c
-- fixed typo in zconf.h (_GNUC__ => __GNUC__)
-- check for WIN32 in zconf.h and zutil.c (avoid farmalloc in 32-bit mode)
-- fix typo in Make_vms.com (f$trnlnm -> f$getsyi)
-- in fcalloc, normalize pointer if size > 65520 bytes
-- don't use special fcalloc for 32 bit Borland C++
-- use STDC instead of __GO32__ to avoid redeclaring exit, calloc, etc...
-- use Z_BINARY instead of BINARY
-- document that gzclose after gzdopen will close the file
-- allow "a" as mode in gzopen.
-- fix error checking in gzread
-- allow skipping .gz extra-field on pipes
-- added reference to Perl interface in README
-- put the crc table in FAR data (I dislike more and more the medium model :)
-- added get_crc_table
-- added a dimension to all arrays (Borland C can't count).
-- workaround Borland C bug in declaration of inflate_codes_new & inflate_fast
-- guard against multiple inclusion of *.h (for precompiled header on Mac)
-- Watcom C pretends to be Microsoft C small model even in 32 bit mode.
-- don't use unsized arrays to avoid silly warnings by Visual C++:
-     warning C4746: 'inflate_mask' : unsized array treated as  '__far'
-     (what's wrong with far data in far model?).
-- define enum out of inflate_blocks_state to allow compilation with C++
-
-Changes in 0.95 (16 Aug 95)
-- fix MSDOS small and medium model (now easier to adapt to any compiler)
-- inlined send_bits
-- fix the final (:-) bug for deflate with flush (output was correct but
-  not completely flushed in rare occasions).
-- default window size is same for compression and decompression
-  (it's now sufficient to set MAX_WBITS in zconf.h).
-- voidp -> voidpf and voidnp -> voidp (for consistency with other
-  typedefs and because voidnp was not near in large model).
-
-Changes in 0.94 (13 Aug 95)
-- support MSDOS medium model
-- fix deflate with flush (could sometimes generate bad output)
-- fix deflateReset (zlib header was incorrectly suppressed)
-- added support for VMS
-- allow a compression level in gzopen()
-- gzflush now calls fflush
-- For deflate with flush, flush even if no more input is provided.
-- rename libgz.a as libz.a
-- avoid complex expression in infcodes.c triggering Turbo C bug
-- work around a problem with gcc on Alpha (in INSERT_STRING)
-- don't use inline functions (problem with some gcc versions)
-- allow renaming of Byte, uInt, etc... with #define.
-- avoid warning about (unused) pointer before start of array in deflate.c
-- avoid various warnings in gzio.c, example.c, infblock.c, adler32.c, zutil.c
-- avoid reserved word 'new' in trees.c
-
-Changes in 0.93 (25 June 95)
-- temporarily disable inline functions
-- make deflate deterministic
-- give enough lookahead for PARTIAL_FLUSH
-- Set binary mode for stdin/stdout in minigzip.c for OS/2
-- don't even use signed char in inflate (not portable enough)
-- fix inflate memory leak for segmented architectures
-
-Changes in 0.92 (3 May 95)
-- don't assume that char is signed (problem on SGI)
-- Clear bit buffer when starting a stored block
-- no memcpy on Pyramid
-- suppressed inftest.c
-- optimized fill_window, put longest_match inline for gcc
-- optimized inflate on stored blocks.
-- untabify all sources to simplify patches
-
-Changes in 0.91 (2 May 95)
-- Default MEM_LEVEL is 8 (not 9 for Unix) as documented in zlib.h
-- Document the memory requirements in zconf.h
-- added "make install"
-- fix sync search logic in inflateSync
-- deflate(Z_FULL_FLUSH) now works even if output buffer too short
-- after inflateSync, don't scare people with just "lo world"
-- added support for DJGPP
-
-Changes in 0.9 (1 May 95)
-- don't assume that zalloc clears the allocated memory (the TurboC bug
-  was Mark's bug after all :)
-- let again gzread copy uncompressed data unchanged (was working in 0.71)
-- deflate(Z_FULL_FLUSH), inflateReset and inflateSync are now fully implemented
-- added a test of inflateSync in example.c
-- moved MAX_WBITS to zconf.h because users might want to change that.
-- document explicitly that zalloc(64K) on MSDOS must return a normalized
-  pointer (zero offset)
-- added Makefiles for Microsoft C, Turbo C, Borland C++
-- faster crc32()
-
-Changes in 0.8 (29 April 95)
-- added fast inflate (inffast.c)
-- deflate(Z_FINISH) now returns Z_STREAM_END when done. Warning: this
-  is incompatible with previous versions of zlib which returned Z_OK.
-- work around a TurboC compiler bug (bad code for b << 0, see infutil.h)
-  (actually that was not a compiler bug, see 0.81 above)
-- gzread no longer reads one extra byte in certain cases
-- In gzio destroy(), don't reference a freed structure
-- avoid many warnings for MSDOS
-- avoid the ERROR symbol which is used by MS Windows
-
-Changes in 0.71 (14 April 95)
-- Fixed more MSDOS compilation problems :( There is still a bug with
-  TurboC large model.
-
-Changes in 0.7 (14 April 95)
-- Added full inflate support.
-- Simplified the crc32() interface. The pre- and post-conditioning
-  (one's complement) is now done inside crc32(). WARNING: this is
-  incompatible with previous versions; see zlib.h for the new usage.
-
-Changes in 0.61 (12 April 95)
-- workaround for a bug in TurboC. example and minigzip now work on MSDOS.
-
-Changes in 0.6 (11 April 95)
-- added minigzip.c
-- added gzdopen to reopen a file descriptor as gzFile
-- added transparent reading of non-gziped files in gzread.
-- fixed bug in gzread (don't read crc as data)
-- fixed bug in destroy (gzio.c) (don't return Z_STREAM_END for gzclose).
-- don't allocate big arrays in the stack (for MSDOS)
-- fix some MSDOS compilation problems
-
-Changes in 0.5:
-- do real compression in deflate.c. Z_PARTIAL_FLUSH is supported but
-  not yet Z_FULL_FLUSH.
-- support decompression but only in a single step (forced Z_FINISH)
-- added opaque object for zalloc and zfree.
-- added deflateReset and inflateReset
-- added a variable zlib_version for consistency checking.
-- renamed the 'filter' parameter of deflateInit2 as 'strategy'.
-  Added Z_FILTERED and Z_HUFFMAN_ONLY constants.
-
-Changes in 0.4:
-- avoid "zip" everywhere, use zlib instead of ziplib.
-- suppress Z_BLOCK_FLUSH, interpret Z_PARTIAL_FLUSH as block flush
-  if compression method == 8.
-- added adler32 and crc32
-- renamed deflateOptions as deflateInit2, call one or the other but not both
-- added the method parameter for deflateInit2.
-- added inflateInit2
-- simplied considerably deflateInit and inflateInit by not supporting
-  user-provided history buffer. This is supported only in deflateInit2
-  and inflateInit2.
-
-Changes in 0.3:
-- prefix all macro names with Z_
-- use Z_FINISH instead of deflateEnd to finish compression.
-- added Z_HUFFMAN_ONLY
-- added gzerror()
Index: trunk/minix/lib/zlib-1.2.3/FAQ
===================================================================
--- trunk/minix/lib/zlib-1.2.3/FAQ	(revision 9)
+++ 	(revision )
@@ -1,339 +1,0 @@
-
-                Frequently Asked Questions about zlib
-
-
-If your question is not there, please check the zlib home page
-http://www.zlib.org which may have more recent information.
-The lastest zlib FAQ is at http://www.gzip.org/zlib/zlib_faq.html
-
-
- 1. Is zlib Y2K-compliant?
-
-    Yes. zlib doesn't handle dates.
-
- 2. Where can I get a Windows DLL version?
-
-    The zlib sources can be compiled without change to produce a DLL.
-    See the file win32/DLL_FAQ.txt in the zlib distribution.
-    Pointers to the precompiled DLL are found in the zlib web site at
-    http://www.zlib.org.
-
- 3. Where can I get a Visual Basic interface to zlib?
-
-    See
-        * http://www.dogma.net/markn/articles/zlibtool/zlibtool.htm
-        * contrib/visual-basic.txt in the zlib distribution
-        * win32/DLL_FAQ.txt in the zlib distribution
-
- 4. compress() returns Z_BUF_ERROR.
-
-    Make sure that before the call of compress, the length of the compressed
-    buffer is equal to the total size of the compressed buffer and not
-    zero. For Visual Basic, check that this parameter is passed by reference
-    ("as any"), not by value ("as long").
-
- 5. deflate() or inflate() returns Z_BUF_ERROR.
-
-    Before making the call, make sure that avail_in and avail_out are not
-    zero. When setting the parameter flush equal to Z_FINISH, also make sure
-    that avail_out is big enough to allow processing all pending input.
-    Note that a Z_BUF_ERROR is not fatal--another call to deflate() or
-    inflate() can be made with more input or output space. A Z_BUF_ERROR
-    may in fact be unavoidable depending on how the functions are used, since
-    it is not possible to tell whether or not there is more output pending
-    when strm.avail_out returns with zero.
-
- 6. Where's the zlib documentation (man pages, etc.)?
-
-    It's in zlib.h for the moment, and Francis S. Lin has converted it to a
-    web page zlib.html. Volunteers to transform this to Unix-style man pages,
-    please contact us (zlib@gzip.org). Examples of zlib usage are in the files
-    example.c and minigzip.c.
-
- 7. Why don't you use GNU autoconf or libtool or ...?
-
-    Because we would like to keep zlib as a very small and simple
-    package. zlib is rather portable and doesn't need much configuration.
-
- 8. I found a bug in zlib.
-
-    Most of the time, such problems are due to an incorrect usage of
-    zlib. Please try to reproduce the problem with a small program and send
-    the corresponding source to us at zlib@gzip.org . Do not send
-    multi-megabyte data files without prior agreement.
-
- 9. Why do I get "undefined reference to gzputc"?
-
-    If "make test" produces something like
-
-       example.o(.text+0x154): undefined reference to `gzputc'
-
-    check that you don't have old files libz.* in /usr/lib, /usr/local/lib or
-    /usr/X11R6/lib. Remove any old versions, then do "make install".
-
-10. I need a Delphi interface to zlib.
-
-    See the contrib/delphi directory in the zlib distribution.
-
-11. Can zlib handle .zip archives?
-
-    Not by itself, no.  See the directory contrib/minizip in the zlib
-    distribution.
-
-12. Can zlib handle .Z files?
-
-    No, sorry. You have to spawn an uncompress or gunzip subprocess, or adapt
-    the code of uncompress on your own.
-
-13. How can I make a Unix shared library?
-
-    make clean
-    ./configure -s
-    make
-
-14. How do I install a shared zlib library on Unix?
-
-    After the above, then:
-
-    make install
-
-    However, many flavors of Unix come with a shared zlib already installed.
-    Before going to the trouble of compiling a shared version of zlib and
-    trying to install it, you may want to check if it's already there! If you
-    can #include <zlib.h>, it's there. The -lz option will probably link to it.
-
-15. I have a question about OttoPDF.
-
-    We are not the authors of OttoPDF. The real author is on the OttoPDF web
-    site: Joel Hainley, jhainley@myndkryme.com.
-
-16. Can zlib decode Flate data in an Adobe PDF file?
-
-    Yes. See http://www.fastio.com/ (ClibPDF), or http://www.pdflib.com/ .
-    To modify PDF forms, see http://sourceforge.net/projects/acroformtool/ .
-
-17. Why am I getting this "register_frame_info not found" error on Solaris?
-
-    After installing zlib 1.1.4 on Solaris 2.6, running applications using zlib
-    generates an error such as:
-
-        ld.so.1: rpm: fatal: relocation error: file /usr/local/lib/libz.so:
-        symbol __register_frame_info: referenced symbol not found
-
-    The symbol __register_frame_info is not part of zlib, it is generated by
-    the C compiler (cc or gcc). You must recompile applications using zlib
-    which have this problem. This problem is specific to Solaris. See
-    http://www.sunfreeware.com for Solaris versions of zlib and applications
-    using zlib.
-
-18. Why does gzip give an error on a file I make with compress/deflate?
-
-    The compress and deflate functions produce data in the zlib format, which
-    is different and incompatible with the gzip format. The gz* functions in
-    zlib on the other hand use the gzip format. Both the zlib and gzip
-    formats use the same compressed data format internally, but have different
-    headers and trailers around the compressed data.
-
-19. Ok, so why are there two different formats?
-
-    The gzip format was designed to retain the directory information about
-    a single file, such as the name and last modification date. The zlib
-    format on the other hand was designed for in-memory and communication
-    channel applications, and has a much more compact header and trailer and
-    uses a faster integrity check than gzip.
-
-20. Well that's nice, but how do I make a gzip file in memory?
-
-    You can request that deflate write the gzip format instead of the zlib
-    format using deflateInit2(). You can also request that inflate decode
-    the gzip format using inflateInit2(). Read zlib.h for more details.
-
-21. Is zlib thread-safe?
-
-    Yes. However any library routines that zlib uses and any application-
-    provided memory allocation routines must also be thread-safe. zlib's gz*
-    functions use stdio library routines, and most of zlib's functions use the
-    library memory allocation routines by default. zlib's Init functions allow
-    for the application to provide custom memory allocation routines.
-
-    Of course, you should only operate on any given zlib or gzip stream from a
-    single thread at a time.
-
-22. Can I use zlib in my commercial application?
-
-    Yes. Please read the license in zlib.h.
-
-23. Is zlib under the GNU license?
-
-    No. Please read the license in zlib.h.
-
-24. The license says that altered source versions must be "plainly marked". So
-    what exactly do I need to do to meet that requirement?
-
-    You need to change the ZLIB_VERSION and ZLIB_VERNUM #defines in zlib.h. In
-    particular, the final version number needs to be changed to "f", and an
-    identification string should be appended to ZLIB_VERSION. Version numbers
-    x.x.x.f are reserved for modifications to zlib by others than the zlib
-    maintainers. For example, if the version of the base zlib you are altering
-    is "1.2.3.4", then in zlib.h you should change ZLIB_VERNUM to 0x123f, and
-    ZLIB_VERSION to something like "1.2.3.f-zachary-mods-v3". You can also
-    update the version strings in deflate.c and inftrees.c.
-
-    For altered source distributions, you should also note the origin and
-    nature of the changes in zlib.h, as well as in ChangeLog and README, along
-    with the dates of the alterations. The origin should include at least your
-    name (or your company's name), and an email address to contact for help or
-    issues with the library.
-
-    Note that distributing a compiled zlib library along with zlib.h and
-    zconf.h is also a source distribution, and so you should change
-    ZLIB_VERSION and ZLIB_VERNUM and note the origin and nature of the changes
-    in zlib.h as you would for a full source distribution.
-
-25. Will zlib work on a big-endian or little-endian architecture, and can I
-    exchange compressed data between them?
-
-    Yes and yes.
-
-26. Will zlib work on a 64-bit machine?
-
-    It should. It has been tested on 64-bit machines, and has no dependence
-    on any data types being limited to 32-bits in length. If you have any
-    difficulties, please provide a complete problem report to zlib@gzip.org
-
-27. Will zlib decompress data from the PKWare Data Compression Library?
-
-    No. The PKWare DCL uses a completely different compressed data format
-    than does PKZIP and zlib. However, you can look in zlib's contrib/blast
-    directory for a possible solution to your problem.
-
-28. Can I access data randomly in a compressed stream?
-
-    No, not without some preparation. If when compressing you periodically
-    use Z_FULL_FLUSH, carefully write all the pending data at those points,
-    and keep an index of those locations, then you can start decompression
-    at those points. You have to be careful to not use Z_FULL_FLUSH too
-    often, since it can significantly degrade compression.
-
-29. Does zlib work on MVS, OS/390, CICS, etc.?
-
-    We don't know for sure. We have heard occasional reports of success on
-    these systems. If you do use it on one of these, please provide us with
-    a report, instructions, and patches that we can reference when we get
-    these questions. Thanks.
-
-30. Is there some simpler, easier to read version of inflate I can look at
-    to understand the deflate format?
-
-    First off, you should read RFC 1951. Second, yes. Look in zlib's
-    contrib/puff directory.
-
-31. Does zlib infringe on any patents?
-
-    As far as we know, no. In fact, that was originally the whole point behind
-    zlib. Look here for some more information:
-
-    http://www.gzip.org/#faq11
-
-32. Can zlib work with greater than 4 GB of data?
-
-    Yes. inflate() and deflate() will process any amount of data correctly.
-    Each call of inflate() or deflate() is limited to input and output chunks
-    of the maximum value that can be stored in the compiler's "unsigned int"
-    type, but there is no limit to the number of chunks. Note however that the
-    strm.total_in and strm_total_out counters may be limited to 4 GB. These
-    counters are provided as a convenience and are not used internally by
-    inflate() or deflate(). The application can easily set up its own counters
-    updated after each call of inflate() or deflate() to count beyond 4 GB.
-    compress() and uncompress() may be limited to 4 GB, since they operate in a
-    single call. gzseek() and gztell() may be limited to 4 GB depending on how
-    zlib is compiled. See the zlibCompileFlags() function in zlib.h.
-
-    The word "may" appears several times above since there is a 4 GB limit
-    only if the compiler's "long" type is 32 bits. If the compiler's "long"
-    type is 64 bits, then the limit is 16 exabytes.
-
-33. Does zlib have any security vulnerabilities?
-
-    The only one that we are aware of is potentially in gzprintf(). If zlib
-    is compiled to use sprintf() or vsprintf(), then there is no protection
-    against a buffer overflow of a 4K string space, other than the caller of
-    gzprintf() assuring that the output will not exceed 4K. On the other
-    hand, if zlib is compiled to use snprintf() or vsnprintf(), which should
-    normally be the case, then there is no vulnerability. The ./configure
-    script will display warnings if an insecure variation of sprintf() will
-    be used by gzprintf(). Also the zlibCompileFlags() function will return
-    information on what variant of sprintf() is used by gzprintf().
-
-    If you don't have snprintf() or vsnprintf() and would like one, you can
-    find a portable implementation here:
-
-        http://www.ijs.si/software/snprintf/
-
-    Note that you should be using the most recent version of zlib. Versions
-    1.1.3 and before were subject to a double-free vulnerability.
-
-34. Is there a Java version of zlib?
-
-    Probably what you want is to use zlib in Java. zlib is already included
-    as part of the Java SDK in the java.util.zip package. If you really want
-    a version of zlib written in the Java language, look on the zlib home
-    page for links: http://www.zlib.org/
-
-35. I get this or that compiler or source-code scanner warning when I crank it
-    up to maximally-pedantic. Can't you guys write proper code?
-
-    Many years ago, we gave up attempting to avoid warnings on every compiler
-    in the universe. It just got to be a waste of time, and some compilers
-    were downright silly. So now, we simply make sure that the code always
-    works.
-
-36. Valgrind (or some similar memory access checker) says that deflate is
-    performing a conditional jump that depends on an uninitialized value.
-    Isn't that a bug?
-
-    No.  That is intentional for performance reasons, and the output of
-    deflate is not affected.  This only started showing up recently since
-    zlib 1.2.x uses malloc() by default for allocations, whereas earlier
-    versions used calloc(), which zeros out the allocated memory.
-
-37. Will zlib read the (insert any ancient or arcane format here) compressed
-    data format?
-
-    Probably not. Look in the comp.compression FAQ for pointers to various
-    formats and associated software.
-
-38. How can I encrypt/decrypt zip files with zlib?
-
-    zlib doesn't support encryption. The original PKZIP encryption is very weak
-    and can be broken with freely available programs. To get strong encryption,
-    use GnuPG, http://www.gnupg.org/ , which already includes zlib compression.
-    For PKZIP compatible "encryption", look at http://www.info-zip.org/
-
-39. What's the difference between the "gzip" and "deflate" HTTP 1.1 encodings?
-
-    "gzip" is the gzip format, and "deflate" is the zlib format. They should
-    probably have called the second one "zlib" instead to avoid confusion
-    with the raw deflate compressed data format. While the HTTP 1.1 RFC 2616
-    correctly points to the zlib specification in RFC 1950 for the "deflate"
-    transfer encoding, there have been reports of servers and browsers that
-    incorrectly produce or expect raw deflate data per the deflate
-    specficiation in RFC 1951, most notably Microsoft. So even though the
-    "deflate" transfer encoding using the zlib format would be the more
-    efficient approach (and in fact exactly what the zlib format was designed
-    for), using the "gzip" transfer encoding is probably more reliable due to
-    an unfortunate choice of name on the part of the HTTP 1.1 authors.
-
-    Bottom line: use the gzip format for HTTP 1.1 encoding.
-
-40. Does zlib support the new "Deflate64" format introduced by PKWare?
-
-    No. PKWare has apparently decided to keep that format proprietary, since
-    they have not documented it as they have previous compression formats.
-    In any case, the compression improvements are so modest compared to other
-    more modern approaches, that it's not worth the effort to implement.
-
-41. Can you please sign these lengthy legal documents and fax them back to us
-    so that we can use your software in our product?
-
-    No. Go away. Shoo.
Index: trunk/minix/lib/zlib-1.2.3/INDEX
===================================================================
--- trunk/minix/lib/zlib-1.2.3/INDEX	(revision 9)
+++ 	(revision )
@@ -1,51 +1,0 @@
-ChangeLog       history of changes
-FAQ             Frequently Asked Questions about zlib
-INDEX           this file
-Makefile        makefile for Unix (generated by configure)
-Makefile.in     makefile for Unix (template for configure)
-README          guess what
-algorithm.txt   description of the (de)compression algorithm
-configure       configure script for Unix
-zconf.in.h      template for zconf.h (used by configure)
-
-amiga/          makefiles for Amiga SAS C
-as400/          makefiles for IBM AS/400
-msdos/          makefiles for MSDOS
-old/            makefiles for various architectures and zlib documentation
-                files that have not yet been updated for zlib 1.2.x
-projects/       projects for various Integrated Development Environments
-qnx/            makefiles for QNX
-win32/          makefiles for Windows
-
-                zlib public header files (must be kept):
-zconf.h
-zlib.h
-
-                private source files used to build the zlib library:
-adler32.c
-compress.c
-crc32.c
-crc32.h
-deflate.c
-deflate.h
-gzio.c
-infback.c
-inffast.c
-inffast.h
-inffixed.h
-inflate.c
-inflate.h
-inftrees.c
-inftrees.h
-trees.c
-trees.h
-uncompr.c
-zutil.c
-zutil.h
-
-                source files for sample programs:
-example.c
-minigzip.c
-
-                unsupported contribution by third parties
-See contrib/README.contrib
Index: trunk/minix/lib/zlib-1.2.3/Makedepend-ack
===================================================================
--- trunk/minix/lib/zlib-1.2.3/Makedepend-ack	(revision 9)
+++ 	(revision )
@@ -1,15 +1,0 @@
-depend-ack:
-	rm .depend-ack
-	touch .depend-ack
-	mkdep 'cc -O -E' adler32.c | sed -e 's:^\(.\):../obj-ack//./zlib-1.2.3/\1:' >> .depend-ack
-	mkdep 'cc -O -E' compress.c | sed -e 's:^\(.\):../obj-ack//./zlib-1.2.3/\1:' >> .depend-ack
-	mkdep 'cc -O -E' crc32.c | sed -e 's:^\(.\):../obj-ack//./zlib-1.2.3/\1:' >> .depend-ack
-	mkdep 'cc -O -E' gzio.c | sed -e 's:^\(.\):../obj-ack//./zlib-1.2.3/\1:' >> .depend-ack
-	mkdep 'cc -O -E' uncompr.c | sed -e 's:^\(.\):../obj-ack//./zlib-1.2.3/\1:' >> .depend-ack
-	mkdep 'cc -O -E' deflate.c | sed -e 's:^\(.\):../obj-ack//./zlib-1.2.3/\1:' >> .depend-ack
-	mkdep 'cc -O -E' trees.c | sed -e 's:^\(.\):../obj-ack//./zlib-1.2.3/\1:' >> .depend-ack
-	mkdep 'cc -O -E' zutil.c | sed -e 's:^\(.\):../obj-ack//./zlib-1.2.3/\1:' >> .depend-ack
-	mkdep 'cc -O -E' inflate.c | sed -e 's:^\(.\):../obj-ack//./zlib-1.2.3/\1:' >> .depend-ack
-	mkdep 'cc -O -E' infback.c | sed -e 's:^\(.\):../obj-ack//./zlib-1.2.3/\1:' >> .depend-ack
-	mkdep 'cc -O -E' inftrees.c | sed -e 's:^\(.\):../obj-ack//./zlib-1.2.3/\1:' >> .depend-ack
-	mkdep 'cc -O -E' inffast.c | sed -e 's:^\(.\):../obj-ack//./zlib-1.2.3/\1:' >> .depend-ack
Index: trunk/minix/lib/zlib-1.2.3/Makedepend-gnu
===================================================================
--- trunk/minix/lib/zlib-1.2.3/Makedepend-gnu	(revision 9)
+++ 	(revision )
@@ -1,15 +1,0 @@
-depend-gnu:
-	rm .depend-gnu
-	touch .depend-gnu
-	mkdep 'gcc -O -E' adler32.c | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./zlib-1.2.3/\1:' >> .depend-gnu
-	mkdep 'gcc -O -E' compress.c | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./zlib-1.2.3/\1:' >> .depend-gnu
-	mkdep 'gcc -O -E' crc32.c | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./zlib-1.2.3/\1:' >> .depend-gnu
-	mkdep 'gcc -O -E' gzio.c | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./zlib-1.2.3/\1:' >> .depend-gnu
-	mkdep 'gcc -O -E' uncompr.c | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./zlib-1.2.3/\1:' >> .depend-gnu
-	mkdep 'gcc -O -E' deflate.c | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./zlib-1.2.3/\1:' >> .depend-gnu
-	mkdep 'gcc -O -E' trees.c | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./zlib-1.2.3/\1:' >> .depend-gnu
-	mkdep 'gcc -O -E' zutil.c | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./zlib-1.2.3/\1:' >> .depend-gnu
-	mkdep 'gcc -O -E' inflate.c | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./zlib-1.2.3/\1:' >> .depend-gnu
-	mkdep 'gcc -O -E' infback.c | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./zlib-1.2.3/\1:' >> .depend-gnu
-	mkdep 'gcc -O -E' inftrees.c | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./zlib-1.2.3/\1:' >> .depend-gnu
-	mkdep 'gcc -O -E' inffast.c | sed -e '/<built-in>/d' -e '/<command line>/d' -e 's:^\(.\):../obj-gnu/./zlib-1.2.3/\1:' >> .depend-gnu
Index: trunk/minix/lib/zlib-1.2.3/Makefile
===================================================================
--- trunk/minix/lib/zlib-1.2.3/Makefile	(revision 9)
+++ 	(revision )
@@ -1,129 +1,0 @@
-#Generated from ./zlib-1.2.3/Makefile.in
-all: all-ack
-
-all-ack:
-all-gnu:
-
-makefiles: Makefile
-Makedepend-ack Makedepend-gnu: 
-	sh ../generate.sh ./zlib-1.2.3 ../obj-ack/ ../obj-gnu
-
-Makefile: Makefile.in Makedepend-ack Makedepend-gnu
-	sh ../generate.sh ./zlib-1.2.3 ../obj-ack/ ../obj-gnu
-	@echo
-	@echo *Attention*
-	@echo Makefile is regenerated... rerun command to see changes
-	@echo *Attention*
-	@echo
-
-depend: depend-ack
-all-ack: ../obj-ack//libz.a
-
-../obj-ack//libz.a: ../obj-ack//libz.a(adler32.o)
-../obj-ack//libz.a: ../obj-ack//libz.a(compress.o)
-../obj-ack//libz.a: ../obj-ack//libz.a(crc32.o)
-../obj-ack//libz.a: ../obj-ack//libz.a(gzio.o)
-../obj-ack//libz.a: ../obj-ack//libz.a(uncompr.o)
-../obj-ack//libz.a: ../obj-ack//libz.a(deflate.o)
-../obj-ack//libz.a: ../obj-ack//libz.a(trees.o)
-../obj-ack//libz.a: ../obj-ack//libz.a(zutil.o)
-../obj-ack//libz.a: ../obj-ack//libz.a(inflate.o)
-../obj-ack//libz.a: ../obj-ack//libz.a(infback.o)
-../obj-ack//libz.a: ../obj-ack//libz.a(inftrees.o)
-../obj-ack//libz.a: ../obj-ack//libz.a(inffast.o)
-
-../obj-ack//libz.a:
-	ar cr ../obj-ack//libz.a ../obj-ack//./zlib-1.2.3/*.o
-	rm ../obj-ack//./zlib-1.2.3/*.o
-
-../obj-ack//libz.a(adler32.o): adler32.c
-	cc -O -c -o ../obj-ack//./zlib-1.2.3/adler32.o adler32.c
-../obj-ack//libz.a(compress.o): compress.c
-	cc -O -c -o ../obj-ack//./zlib-1.2.3/compress.o compress.c
-../obj-ack//libz.a(crc32.o): crc32.c
-	cc -O -c -o ../obj-ack//./zlib-1.2.3/crc32.o crc32.c
-../obj-ack//libz.a(gzio.o): gzio.c
-	cc -O -c -o ../obj-ack//./zlib-1.2.3/gzio.o gzio.c
-../obj-ack//libz.a(uncompr.o): uncompr.c
-	cc -O -c -o ../obj-ack//./zlib-1.2.3/uncompr.o uncompr.c
-../obj-ack//libz.a(deflate.o): deflate.c
-	cc -O -c -o ../obj-ack//./zlib-1.2.3/deflate.o deflate.c
-../obj-ack//libz.a(trees.o): trees.c
-	cc -O -c -o ../obj-ack//./zlib-1.2.3/trees.o trees.c
-../obj-ack//libz.a(zutil.o): zutil.c
-	cc -O -c -o ../obj-ack//./zlib-1.2.3/zutil.o zutil.c
-../obj-ack//libz.a(inflate.o): inflate.c
-	cc -O -c -o ../obj-ack//./zlib-1.2.3/inflate.o inflate.c
-../obj-ack//libz.a(infback.o): infback.c
-	cc -O -c -o ../obj-ack//./zlib-1.2.3/infback.o infback.c
-../obj-ack//libz.a(inftrees.o): inftrees.c
-	cc -O -c -o ../obj-ack//./zlib-1.2.3/inftrees.o inftrees.c
-../obj-ack//libz.a(inffast.o): inffast.c
-	cc -O -c -o ../obj-ack//./zlib-1.2.3/inffast.o inffast.c
-
-all-gnu: ../obj-gnu/libz.a
-
-../obj-gnu/libz.a: ../obj-gnu/./zlib-1.2.3/adler32.o
-../obj-gnu/libz.a: ../obj-gnu/./zlib-1.2.3/compress.o
-../obj-gnu/libz.a: ../obj-gnu/./zlib-1.2.3/crc32.o
-../obj-gnu/libz.a: ../obj-gnu/./zlib-1.2.3/gzio.o
-../obj-gnu/libz.a: ../obj-gnu/./zlib-1.2.3/uncompr.o
-../obj-gnu/libz.a: ../obj-gnu/./zlib-1.2.3/deflate.o
-../obj-gnu/libz.a: ../obj-gnu/./zlib-1.2.3/trees.o
-../obj-gnu/libz.a: ../obj-gnu/./zlib-1.2.3/zutil.o
-../obj-gnu/libz.a: ../obj-gnu/./zlib-1.2.3/inflate.o
-../obj-gnu/libz.a: ../obj-gnu/./zlib-1.2.3/infback.o
-../obj-gnu/libz.a: ../obj-gnu/./zlib-1.2.3/inftrees.o
-../obj-gnu/libz.a: ../obj-gnu/./zlib-1.2.3/inffast.o
-
-../obj-gnu/libz.a:
-	gar cr ../obj-gnu/libz.a $?
-
-../obj-gnu/./zlib-1.2.3/adler32.o: adler32.c
-	gcc -O -c -o ../obj-gnu/./zlib-1.2.3/adler32.o adler32.c
-
-../obj-gnu/./zlib-1.2.3/compress.o: compress.c
-	gcc -O -c -o ../obj-gnu/./zlib-1.2.3/compress.o compress.c
-
-../obj-gnu/./zlib-1.2.3/crc32.o: crc32.c
-	gcc -O -c -o ../obj-gnu/./zlib-1.2.3/crc32.o crc32.c
-
-../obj-gnu/./zlib-1.2.3/gzio.o: gzio.c
-	gcc -O -c -o ../obj-gnu/./zlib-1.2.3/gzio.o gzio.c
-
-../obj-gnu/./zlib-1.2.3/uncompr.o: uncompr.c
-	gcc -O -c -o ../obj-gnu/./zlib-1.2.3/uncompr.o uncompr.c
-
-../obj-gnu/./zlib-1.2.3/deflate.o: deflate.c
-	gcc -O -c -o ../obj-gnu/./zlib-1.2.3/deflate.o deflate.c
-
-../obj-gnu/./zlib-1.2.3/trees.o: trees.c
-	gcc -O -c -o ../obj-gnu/./zlib-1.2.3/trees.o trees.c
-
-../obj-gnu/./zlib-1.2.3/zutil.o: zutil.c
-	gcc -O -c -o ../obj-gnu/./zlib-1.2.3/zutil.o zutil.c
-
-../obj-gnu/./zlib-1.2.3/inflate.o: inflate.c
-	gcc -O -c -o ../obj-gnu/./zlib-1.2.3/inflate.o inflate.c
-
-../obj-gnu/./zlib-1.2.3/infback.o: infback.c
-	gcc -O -c -o ../obj-gnu/./zlib-1.2.3/infback.o infback.c
-
-../obj-gnu/./zlib-1.2.3/inftrees.o: inftrees.c
-	gcc -O -c -o ../obj-gnu/./zlib-1.2.3/inftrees.o inftrees.c
-
-../obj-gnu/./zlib-1.2.3/inffast.o: inffast.c
-	gcc -O -c -o ../obj-gnu/./zlib-1.2.3/inffast.o inffast.c
-
-
-
-
-clean::
-	rm -f ../obj-ack//./zlib-1.2.3/*
-	rm -f ../obj-gnu/./zlib-1.2.3/*
-
-include Makedepend-ack
-include .depend-ack
-
-include Makedepend-gnu
-include .depend-gnu
Index: trunk/minix/lib/zlib-1.2.3/Makefile.in
===================================================================
--- trunk/minix/lib/zlib-1.2.3/Makefile.in	(revision 9)
+++ 	(revision )
@@ -1,12 +1,0 @@
-# Makefile for zlib
-
-CC=cc
-
-CFLAGS=-O
-
-LIBRARIES=libz
-
-libz_FILES="adler32.c compress.c crc32.c gzio.c uncompr.c deflate.c trees.c \
-       zutil.c inflate.c infback.c inftrees.c inffast.c"
-
-TYPE=both
Index: trunk/minix/lib/zlib-1.2.3/README
===================================================================
--- trunk/minix/lib/zlib-1.2.3/README	(revision 9)
+++ 	(revision )
@@ -1,125 +1,0 @@
-ZLIB DATA COMPRESSION LIBRARY
-
-zlib 1.2.3 is a general purpose data compression library.  All the code is
-thread safe.  The data format used by the zlib library is described by RFCs
-(Request for Comments) 1950 to 1952 in the files
-http://www.ietf.org/rfc/rfc1950.txt (zlib format), rfc1951.txt (deflate format)
-and rfc1952.txt (gzip format). These documents are also available in other
-formats from ftp://ftp.uu.net/graphics/png/documents/zlib/zdoc-index.html
-
-All functions of the compression library are documented in the file zlib.h
-(volunteer to write man pages welcome, contact zlib@gzip.org). A usage example
-of the library is given in the file example.c which also tests that the library
-is working correctly. Another example is given in the file minigzip.c. The
-compression library itself is composed of all source files except example.c and
-minigzip.c.
-
-To compile all files and run the test program, follow the instructions given at
-the top of Makefile. In short "make test; make install" should work for most
-machines. For Unix: "./configure; make test; make install". For MSDOS, use one
-of the special makefiles such as Makefile.msc. For VMS, use make_vms.com.
-
-Questions about zlib should be sent to <zlib@gzip.org>, or to Gilles Vollant
-<info@winimage.com> for the Windows DLL version. The zlib home page is
-http://www.zlib.org or http://www.gzip.org/zlib/ Before reporting a problem,
-please check this site to verify that you have the latest version of zlib;
-otherwise get the latest version and check whether the problem still exists or
-not.
-
-PLEASE read the zlib FAQ http://www.gzip.org/zlib/zlib_faq.html before asking
-for help.
-
-Mark Nelson <markn@ieee.org> wrote an article about zlib for the Jan. 1997
-issue of  Dr. Dobb's Journal; a copy of the article is available in
-http://dogma.net/markn/articles/zlibtool/zlibtool.htm
-
-The changes made in version 1.2.3 are documented in the file ChangeLog.
-
-Unsupported third party contributions are provided in directory "contrib".
-
-A Java implementation of zlib is available in the Java Development Kit
-http://java.sun.com/j2se/1.4.2/docs/api/java/util/zip/package-summary.html
-See the zlib home page http://www.zlib.org for details.
-
-A Perl interface to zlib written by Paul Marquess <pmqs@cpan.org> is in the
-CPAN (Comprehensive Perl Archive Network) sites
-http://www.cpan.org/modules/by-module/Compress/
-
-A Python interface to zlib written by A.M. Kuchling <amk@amk.ca> is
-available in Python 1.5 and later versions, see
-http://www.python.org/doc/lib/module-zlib.html
-
-A zlib binding for TCL written by Andreas Kupries <a.kupries@westend.com> is
-availlable at http://www.oche.de/~akupries/soft/trf/trf_zip.html
-
-An experimental package to read and write files in .zip format, written on top
-of zlib by Gilles Vollant <info@winimage.com>, is available in the
-contrib/minizip directory of zlib.
-
-
-Notes for some targets:
-
-- For Windows DLL versions, please see win32/DLL_FAQ.txt
-
-- For 64-bit Irix, deflate.c must be compiled without any optimization. With
-  -O, one libpng test fails. The test works in 32 bit mode (with the -n32
-  compiler flag). The compiler bug has been reported to SGI.
-
-- zlib doesn't work with gcc 2.6.3 on a DEC 3000/300LX under OSF/1 2.1 it works
-  when compiled with cc.
-
-- On Digital Unix 4.0D (formely OSF/1) on AlphaServer, the cc option -std1 is
-  necessary to get gzprintf working correctly. This is done by configure.
-
-- zlib doesn't work on HP-UX 9.05 with some versions of /bin/cc. It works with
-  other compilers. Use "make test" to check your compiler.
-
-- gzdopen is not supported on RISCOS, BEOS and by some Mac compilers.
-
-- For PalmOs, see http://palmzlib.sourceforge.net/
-
-- When building a shared, i.e. dynamic library on Mac OS X, the library must be
-  installed before testing (do "make install" before "make test"), since the
-  library location is specified in the library.
-
-
-Acknowledgments:
-
-  The deflate format used by zlib was defined by Phil Katz. The deflate
-  and zlib specifications were written by L. Peter Deutsch. Thanks to all the
-  people who reported problems and suggested various improvements in zlib;
-  they are too numerous to cite here.
-
-Copyright notice:
-
- (C) 1995-2004 Jean-loup Gailly and Mark Adler
-
-  This software is provided 'as-is', without any express or implied
-  warranty.  In no event will the authors be held liable for any damages
-  arising from the use of this software.
-
-  Permission is granted to anyone to use this software for any purpose,
-  including commercial applications, and to alter it and redistribute it
-  freely, subject to the following restrictions:
-
-  1. The origin of this software must not be misrepresented; you must not
-     claim that you wrote the original software. If you use this software
-     in a product, an acknowledgment in the product documentation would be
-     appreciated but is not required.
-  2. Altered source versions must be plainly marked as such, and must not be
-     misrepresented as being the original software.
-  3. This notice may not be removed or altered from any source distribution.
-
-  Jean-loup Gailly        Mark Adler
-  jloup@gzip.org          madler@alumni.caltech.edu
-
-If you use the zlib library in a product, we would appreciate *not*
-receiving lengthy legal documents to sign. The sources are provided
-for free but without warranty of any kind.  The library has been
-entirely written by Jean-loup Gailly and Mark Adler; it does not
-include third-party code.
-
-If you redistribute modified sources, we would appreciate that you include
-in the file ChangeLog history information documenting your changes. Please
-read the FAQ for more information on the distribution of modified source
-versions.
Index: trunk/minix/lib/zlib-1.2.3/adler32.c
===================================================================
--- trunk/minix/lib/zlib-1.2.3/adler32.c	(revision 9)
+++ 	(revision )
@@ -1,149 +1,0 @@
-/* adler32.c -- compute the Adler-32 checksum of a data stream
- * Copyright (C) 1995-2004 Mark Adler
- * For conditions of distribution and use, see copyright notice in zlib.h
- */
-
-/* @(#) $Id: adler32.c,v 1.1 2005/09/23 22:39:00 beng Exp $ */
-
-#define ZLIB_INTERNAL
-#include "zlib.h"
-
-#define BASE 65521UL    /* largest prime smaller than 65536 */
-#define NMAX 5552
-/* NMAX is the largest n such that 255n(n+1)/2 + (n+1)(BASE-1) <= 2^32-1 */
-
-#define DO1(buf,i)  {adler += (buf)[i]; sum2 += adler;}
-#define DO2(buf,i)  DO1(buf,i); DO1(buf,i+1);
-#define DO4(buf,i)  DO2(buf,i); DO2(buf,i+2);
-#define DO8(buf,i)  DO4(buf,i); DO4(buf,i+4);
-#define DO16(buf)   DO8(buf,0); DO8(buf,8);
-
-/* use NO_DIVIDE if your processor does not do division in hardware */
-#ifdef NO_DIVIDE
-#  define MOD(a) \
-    do { \
-        if (a >= (BASE << 16)) a -= (BASE << 16); \
-        if (a >= (BASE << 15)) a -= (BASE << 15); \
-        if (a >= (BASE << 14)) a -= (BASE << 14); \
-        if (a >= (BASE << 13)) a -= (BASE << 13); \
-        if (a >= (BASE << 12)) a -= (BASE << 12); \
-        if (a >= (BASE << 11)) a -= (BASE << 11); \
-        if (a >= (BASE << 10)) a -= (BASE << 10); \
-        if (a >= (BASE << 9)) a -= (BASE << 9); \
-        if (a >= (BASE << 8)) a -= (BASE << 8); \
-        if (a >= (BASE << 7)) a -= (BASE << 7); \
-        if (a >= (BASE << 6)) a -= (BASE << 6); \
-        if (a >= (BASE << 5)) a -= (BASE << 5); \
-        if (a >= (BASE << 4)) a -= (BASE << 4); \
-        if (a >= (BASE << 3)) a -= (BASE << 3); \
-        if (a >= (BASE << 2)) a -= (BASE << 2); \
-        if (a >= (BASE << 1)) a -= (BASE << 1); \
-        if (a >= BASE) a -= BASE; \
-    } while (0)
-#  define MOD4(a) \
-    do { \
-        if (a >= (BASE << 4)) a -= (BASE << 4); \
-        if (a >= (BASE << 3)) a -= (BASE << 3); \
-        if (a >= (BASE << 2)) a -= (BASE << 2); \
-        if (a >= (BASE << 1)) a -= (BASE << 1); \
-        if (a >= BASE) a -= BASE; \
-    } while (0)
-#else
-#  define MOD(a) a %= BASE
-#  define MOD4(a) a %= BASE
-#endif
-
-/* ========================================================================= */
-uLong ZEXPORT adler32(adler, buf, len)
-    uLong adler;
-    const Bytef *buf;
-    uInt len;
-{
-    unsigned long sum2;
-    unsigned n;
-
-    /* split Adler-32 into component sums */
-    sum2 = (adler >> 16) & 0xffff;
-    adler &= 0xffff;
-
-    /* in case user likes doing a byte at a time, keep it fast */
-    if (len == 1) {
-        adler += buf[0];
-        if (adler >= BASE)
-            adler -= BASE;
-        sum2 += adler;
-        if (sum2 >= BASE)
-            sum2 -= BASE;
-        return adler | (sum2 << 16);
-    }
-
-    /* initial Adler-32 value (deferred check for len == 1 speed) */
-    if (buf == Z_NULL)
-        return 1L;
-
-    /* in case short lengths are provided, keep it somewhat fast */
-    if (len < 16) {
-        while (len--) {
-            adler += *buf++;
-            sum2 += adler;
-        }
-        if (adler >= BASE)
-            adler -= BASE;
-        MOD4(sum2);             /* only added so many BASE's */
-        return adler | (sum2 << 16);
-    }
-
-    /* do length NMAX blocks -- requires just one modulo operation */
-    while (len >= NMAX) {
-        len -= NMAX;
-        n = NMAX / 16;          /* NMAX is divisible by 16 */
-        do {
-            DO16(buf);          /* 16 sums unrolled */
-            buf += 16;
-        } while (--n);
-        MOD(adler);
-        MOD(sum2);
-    }
-
-    /* do remaining bytes (less than NMAX, still just one modulo) */
-    if (len) {                  /* avoid modulos if none remaining */
-        while (len >= 16) {
-            len -= 16;
-            DO16(buf);
-            buf += 16;
-        }
-        while (len--) {
-            adler += *buf++;
-            sum2 += adler;
-        }
-        MOD(adler);
-        MOD(sum2);
-    }
-
-    /* return recombined sums */
-    return adler | (sum2 << 16);
-}
-
-/* ========================================================================= */
-uLong ZEXPORT adler32_combine(adler1, adler2, len2)
-    uLong adler1;
-    uLong adler2;
-    z_off_t len2;
-{
-    unsigned long sum1;
-    unsigned long sum2;
-    unsigned rem;
-
-    /* the derivation of this formula is left as an exercise for the reader */
-    rem = (unsigned)(len2 % BASE);
-    sum1 = adler1 & 0xffff;
-    sum2 = rem * sum1;
-    MOD(sum2);
-    sum1 += (adler2 & 0xffff) + BASE - 1;
-    sum2 += ((adler1 >> 16) & 0xffff) + ((adler2 >> 16) & 0xffff) + BASE - rem;
-    if (sum1 > BASE) sum1 -= BASE;
-    if (sum1 > BASE) sum1 -= BASE;
-    if (sum2 > (BASE << 1)) sum2 -= (BASE << 1);
-    if (sum2 > BASE) sum2 -= BASE;
-    return sum1 | (sum2 << 16);
-}
Index: trunk/minix/lib/zlib-1.2.3/algorithm.txt
===================================================================
--- trunk/minix/lib/zlib-1.2.3/algorithm.txt	(revision 9)
+++ 	(revision )
@@ -1,209 +1,0 @@
-1. Compression algorithm (deflate)
-
-The deflation algorithm used by gzip (also zip and zlib) is a variation of
-LZ77 (Lempel-Ziv 1977, see reference below). It finds duplicated strings in
-the input data.  The second occurrence of a string is replaced by a
-pointer to the previous string, in the form of a pair (distance,
-length).  Distances are limited to 32K bytes, and lengths are limited
-to 258 bytes. When a string does not occur anywhere in the previous
-32K bytes, it is emitted as a sequence of literal bytes.  (In this
-description, `string' must be taken as an arbitrary sequence of bytes,
-and is not restricted to printable characters.)
-
-Literals or match lengths are compressed with one Huffman tree, and
-match distances are compressed with another tree. The trees are stored
-in a compact form at the start of each block. The blocks can have any
-size (except that the compressed data for one block must fit in
-available memory). A block is terminated when deflate() determines that
-it would be useful to start another block with fresh trees. (This is
-somewhat similar to the behavior of LZW-based _compress_.)
-
-Duplicated strings are found using a hash table. All input strings of
-length 3 are inserted in the hash table. A hash index is computed for
-the next 3 bytes. If the hash chain for this index is not empty, all
-strings in the chain are compared with the current input string, and
-the longest match is selected.
-
-The hash chains are searched starting with the most recent strings, to
-favor small distances and thus take advantage of the Huffman encoding.
-The hash chains are singly linked. There are no deletions from the
-hash chains, the algorithm simply discards matches that are too old.
-
-To avoid a worst-case situation, very long hash chains are arbitrarily
-truncated at a certain length, determined by a runtime option (level
-parameter of deflateInit). So deflate() does not always find the longest
-possible match but generally finds a match which is long enough.
-
-deflate() also defers the selection of matches with a lazy evaluation
-mechanism. After a match of length N has been found, deflate() searches for
-a longer match at the next input byte. If a longer match is found, the
-previous match is truncated to a length of one (thus producing a single
-literal byte) and the process of lazy evaluation begins again. Otherwise,
-the original match is kept, and the next match search is attempted only N
-steps later.
-
-The lazy match evaluation is also subject to a runtime parameter. If
-the current match is long enough, deflate() reduces the search for a longer
-match, thus speeding up the whole process. If compression ratio is more
-important than speed, deflate() attempts a complete second search even if
-the first match is already long enough.
-
-The lazy match evaluation is not performed for the fastest compression
-modes (level parameter 1 to 3). For these fast modes, new strings
-are inserted in the hash table only when no match was found, or
-when the match is not too long. This degrades the compression ratio
-but saves time since there are both fewer insertions and fewer searches.
-
-
-2. Decompression algorithm (inflate)
-
-2.1 Introduction
-
-The key question is how to represent a Huffman code (or any prefix code) so
-that you can decode fast.  The most important characteristic is that shorter
-codes are much more common than longer codes, so pay attention to decoding the
-short codes fast, and let the long codes take longer to decode.
-
-inflate() sets up a first level table that covers some number of bits of
-input less than the length of longest code.  It gets that many bits from the
-stream, and looks it up in the table.  The table will tell if the next
-code is that many bits or less and how many, and if it is, it will tell
-the value, else it will point to the next level table for which inflate()
-grabs more bits and tries to decode a longer code.
-
-How many bits to make the first lookup is a tradeoff between the time it
-takes to decode and the time it takes to build the table.  If building the
-table took no time (and if you had infinite memory), then there would only
-be a first level table to cover all the way to the longest code.  However,
-building the table ends up taking a lot longer for more bits since short
-codes are replicated many times in such a table.  What inflate() does is
-simply to make the number of bits in the first table a variable, and  then
-to set that variable for the maximum speed.
-
-For inflate, which has 286 possible codes for the literal/length tree, the size
-of the first table is nine bits.  Also the distance trees have 30 possible
-values, and the size of the first table is six bits.  Note that for each of
-those cases, the table ended up one bit longer than the ``average'' code
-length, i.e. the code length of an approximately flat code which would be a
-little more than eight bits for 286 symbols and a little less than five bits
-for 30 symbols.
-
-
-2.2 More details on the inflate table lookup
-
-Ok, you want to know what this cleverly obfuscated inflate tree actually
-looks like.  You are correct that it's not a Huffman tree.  It is simply a
-lookup table for the first, let's say, nine bits of a Huffman symbol.  The
-symbol could be as short as one bit or as long as 15 bits.  If a particular
-symbol is shorter than nine bits, then that symbol's translation is duplicated
-in all those entries that start with that symbol's bits.  For example, if the
-symbol is four bits, then it's duplicated 32 times in a nine-bit table.  If a
-symbol is nine bits long, it appears in the table once.
-
-If the symbol is longer than nine bits, then that entry in the table points
-to another similar table for the remaining bits.  Again, there are duplicated
-entries as needed.  The idea is that most of the time the symbol will be short
-and there will only be one table look up.  (That's whole idea behind data
-compression in the first place.)  For the less frequent long symbols, there
-will be two lookups.  If you had a compression method with really long
-symbols, you could have as many levels of lookups as is efficient.  For
-inflate, two is enough.
-
-So a table entry either points to another table (in which case nine bits in
-the above example are gobbled), or it contains the translation for the symbol
-and the number of bits to gobble.  Then you start again with the next
-ungobbled bit.
-
-You may wonder: why not just have one lookup table for how ever many bits the
-longest symbol is?  The reason is that if you do that, you end up spending
-more time filling in duplicate symbol entries than you do actually decoding.
-At least for deflate's output that generates new trees every several 10's of
-kbytes.  You can imagine that filling in a 2^15 entry table for a 15-bit code
-would take too long if you're only decoding several thousand symbols.  At the
-other extreme, you could make a new table for every bit in the code.  In fact,
-that's essentially a Huffman tree.  But then you spend two much time
-traversing the tree while decoding, even for short symbols.
-
-So the number of bits for the first lookup table is a trade of the time to
-fill out the table vs. the time spent looking at the second level and above of
-the table.
-
-Here is an example, scaled down:
-
-The code being decoded, with 10 symbols, from 1 to 6 bits long:
-
-A: 0
-B: 10
-C: 1100
-D: 11010
-E: 11011
-F: 11100
-G: 11101
-H: 11110
-I: 111110
-J: 111111
-
-Let's make the first table three bits long (eight entries):
-
-000: A,1
-001: A,1
-010: A,1
-011: A,1
-100: B,2
-101: B,2
-110: -> table X (gobble 3 bits)
-111: -> table Y (gobble 3 bits)
-
-Each entry is what the bits decode as and how many bits that is, i.e. how
-many bits to gobble.  Or the entry points to another table, with the number of
-bits to gobble implicit in the size of the table.
-
-Table X is two bits long since the longest code starting with 110 is five bits
-long:
-
-00: C,1
-01: C,1
-10: D,2
-11: E,2
-
-Table Y is three bits long since the longest code starting with 111 is six
-bits long:
-
-000: F,2
-001: F,2
-010: G,2
-011: G,2
-100: H,2
-101: H,2
-110: I,3
-111: J,3
-
-So what we have here are three tables with a total of 20 entries that had to
-be constructed.  That's compared to 64 entries for a single table.  Or
-compared to 16 entries for a Huffman tree (six two entry tables and one four
-entry table).  Assuming that the code ideally represents the probability of
-the symbols, it takes on the average 1.25 lookups per symbol.  That's compared
-to one lookup for the single table, or 1.66 lookups per symbol for the
-Huffman tree.
-
-There, I think that gives you a picture of what's going on.  For inflate, the
-meaning of a particular symbol is often more than just a letter.  It can be a
-byte (a "literal"), or it can be either a length or a distance which
-indicates a base value and a number of bits to fetch after the code that is
-added to the base value.  Or it might be the special end-of-block code.  The
-data structures created in inftrees.c try to encode all that information
-compactly in the tables.
-
-
-Jean-loup Gailly        Mark Adler
-jloup@gzip.org          madler@alumni.caltech.edu
-
-
-References:
-
-[LZ77] Ziv J., Lempel A., ``A Universal Algorithm for Sequential Data
-Compression,'' IEEE Transactions on Information Theory, Vol. 23, No. 3,
-pp. 337-343.
-
-``DEFLATE Compressed Data Format Specification'' available in
-http://www.ietf.org/rfc/rfc1951.txt
Index: trunk/minix/lib/zlib-1.2.3/amiga/Makefile.pup
===================================================================
--- trunk/minix/lib/zlib-1.2.3/amiga/Makefile.pup	(revision 9)
+++ 	(revision )
@@ -1,66 +1,0 @@
-# Amiga powerUP (TM) Makefile
-# makefile for libpng and SAS C V6.58/7.00 PPC compiler
-# Copyright (C) 1998 by Andreas R. Kleinert
-
-LIBNAME	= libzip.a
-
-CC	= scppc
-CFLAGS	= NOSTKCHK NOSINT OPTIMIZE OPTGO OPTPEEP OPTINLOCAL OPTINL \
-	  OPTLOOP OPTRDEP=8 OPTDEP=8 OPTCOMP=8 NOVER
-AR	= ppc-amigaos-ar cr
-RANLIB	= ppc-amigaos-ranlib
-LD	= ppc-amigaos-ld -r
-LDFLAGS	= -o
-LDLIBS	= LIB:scppc.a LIB:end.o
-RM	= delete quiet
-
-OBJS = adler32.o compress.o crc32.o gzio.o uncompr.o deflate.o trees.o \
-       zutil.o inflate.o infback.o inftrees.o inffast.o
-
-TEST_OBJS = example.o minigzip.o
-
-all: example minigzip
-
-check: test
-test: all
-	example
-	echo hello world | minigzip | minigzip -d
-
-$(LIBNAME): $(OBJS)
-	$(AR) $@ $(OBJS)
-	-$(RANLIB) $@
-
-example: example.o $(LIBNAME)
-	$(LD) $(LDFLAGS) $@ LIB:c_ppc.o $@.o $(LIBNAME) $(LDLIBS)
-
-minigzip: minigzip.o $(LIBNAME)
-	$(LD) $(LDFLAGS) $@ LIB:c_ppc.o $@.o $(LIBNAME) $(LDLIBS)
-
-mostlyclean: clean
-clean:
-	$(RM) *.o example minigzip $(LIBNAME) foo.gz
-
-zip:
-	zip -ul9 zlib README ChangeLog Makefile Make????.??? Makefile.?? \
-	  descrip.mms *.[ch]
-
-tgz:
-	cd ..; tar cfz zlib/zlib.tgz zlib/README zlib/ChangeLog zlib/Makefile \
-	  zlib/Make????.??? zlib/Makefile.?? zlib/descrip.mms zlib/*.[ch]
-
-# DO NOT DELETE THIS LINE -- make depend depends on it.
-
-adler32.o: zlib.h zconf.h
-compress.o: zlib.h zconf.h
-crc32.o: crc32.h zlib.h zconf.h
-deflate.o: deflate.h zutil.h zlib.h zconf.h
-example.o: zlib.h zconf.h
-gzio.o: zutil.h zlib.h zconf.h
-inffast.o: zutil.h zlib.h zconf.h inftrees.h inflate.h inffast.h
-inflate.o: zutil.h zlib.h zconf.h inftrees.h inflate.h inffast.h
-infback.o: zutil.h zlib.h zconf.h inftrees.h inflate.h inffast.h
-inftrees.o: zutil.h zlib.h zconf.h inftrees.h
-minigzip.o: zlib.h zconf.h
-trees.o: deflate.h zutil.h zlib.h zconf.h trees.h
-uncompr.o: zlib.h zconf.h
-zutil.o: zutil.h zlib.h zconf.h
Index: trunk/minix/lib/zlib-1.2.3/amiga/Makefile.sas
===================================================================
--- trunk/minix/lib/zlib-1.2.3/amiga/Makefile.sas	(revision 9)
+++ 	(revision )
@@ -1,65 +1,0 @@
-# SMakefile for zlib
-# Modified from the standard UNIX Makefile Copyright Jean-loup Gailly
-# Osma Ahvenlampi <Osma.Ahvenlampi@hut.fi>
-# Amiga, SAS/C 6.56 & Smake
-
-CC=sc
-CFLAGS=OPT
-#CFLAGS=OPT CPU=68030
-#CFLAGS=DEBUG=LINE
-LDFLAGS=LIB z.lib
-
-SCOPTIONS=OPTSCHED OPTINLINE OPTALIAS OPTTIME OPTINLOCAL STRMERGE \
-       NOICONS PARMS=BOTH NOSTACKCHECK UTILLIB NOVERSION ERRORREXX \
-       DEF=POSTINC
-
-OBJS = adler32.o compress.o crc32.o gzio.o uncompr.o deflate.o trees.o \
-       zutil.o inflate.o infback.o inftrees.o inffast.o
-
-TEST_OBJS = example.o minigzip.o
-
-all: SCOPTIONS example minigzip
-
-check: test
-test: all
-	example
-	echo hello world | minigzip | minigzip -d
-
-install: z.lib
-	copy clone zlib.h zconf.h INCLUDE:
-	copy clone z.lib LIB:
-
-z.lib: $(OBJS)
-	oml z.lib r $(OBJS)
-
-example: example.o z.lib
-	$(CC) $(CFLAGS) LINK TO $@ example.o $(LDFLAGS)
-
-minigzip: minigzip.o z.lib
-	$(CC) $(CFLAGS) LINK TO $@ minigzip.o $(LDFLAGS)
-
-mostlyclean: clean
-clean:
-	-delete force quiet example minigzip *.o z.lib foo.gz *.lnk SCOPTIONS
-
-SCOPTIONS: Makefile.sas
-	copy to $@ <from <
-$(SCOPTIONS)
-<
-
-# DO NOT DELETE THIS LINE -- make depend depends on it.
-
-adler32.o: zlib.h zconf.h
-compress.o: zlib.h zconf.h
-crc32.o: crc32.h zlib.h zconf.h
-deflate.o: deflate.h zutil.h zlib.h zconf.h
-example.o: zlib.h zconf.h
-gzio.o: zutil.h zlib.h zconf.h
-inffast.o: zutil.h zlib.h zconf.h inftrees.h inflate.h inffast.h
-inflate.o: zutil.h zlib.h zconf.h inftrees.h inflate.h inffast.h
-infback.o: zutil.h zlib.h zconf.h inftrees.h inflate.h inffast.h
-inftrees.o: zutil.h zlib.h zconf.h inftrees.h
-minigzip.o: zlib.h zconf.h
-trees.o: deflate.h zutil.h zlib.h zconf.h trees.h
-uncompr.o: zlib.h zconf.h
-zutil.o: zutil.h zlib.h zconf.h
Index: trunk/minix/lib/zlib-1.2.3/as400/bndsrc
===================================================================
--- trunk/minix/lib/zlib-1.2.3/as400/bndsrc	(revision 9)
+++ 	(revision )
@@ -1,132 +1,0 @@
-STRPGMEXP PGMLVL(*CURRENT) SIGNATURE('ZLIB')
-
-/*@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@*/
-/*   Version 1.1.3 entry points.                                    */
-/*@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@*/
-
-/********************************************************************/
-/*   *MODULE      ADLER32      ZLIB         01/02/01  00:15:09      */
-/********************************************************************/
-
-  EXPORT SYMBOL("adler32")
-
-/********************************************************************/
-/*   *MODULE      COMPRESS     ZLIB         01/02/01  00:15:09      */
-/********************************************************************/
-
-  EXPORT SYMBOL("compress")
-  EXPORT SYMBOL("compress2")
-
-/********************************************************************/
-/*   *MODULE      CRC32        ZLIB         01/02/01  00:15:09      */
-/********************************************************************/
-
-  EXPORT SYMBOL("crc32")
-  EXPORT SYMBOL("get_crc_table")
-
-/********************************************************************/
-/*   *MODULE      DEFLATE      ZLIB         01/02/01  00:15:09      */
-/********************************************************************/
-
-  EXPORT SYMBOL("deflate")
-  EXPORT SYMBOL("deflateEnd")
-  EXPORT SYMBOL("deflateSetDictionary")
-  EXPORT SYMBOL("deflateCopy")
-  EXPORT SYMBOL("deflateReset")
-  EXPORT SYMBOL("deflateParams")
-  EXPORT SYMBOL("deflatePrime")
-  EXPORT SYMBOL("deflateInit_")
-  EXPORT SYMBOL("deflateInit2_")
-
-/********************************************************************/
-/*   *MODULE      GZIO         ZLIB         01/02/01  00:15:09      */
-/********************************************************************/
-
-  EXPORT SYMBOL("gzopen")
-  EXPORT SYMBOL("gzdopen")
-  EXPORT SYMBOL("gzsetparams")
-  EXPORT SYMBOL("gzread")
-  EXPORT SYMBOL("gzwrite")
-  EXPORT SYMBOL("gzprintf")
-  EXPORT SYMBOL("gzputs")
-  EXPORT SYMBOL("gzgets")
-  EXPORT SYMBOL("gzputc")
-  EXPORT SYMBOL("gzgetc")
-  EXPORT SYMBOL("gzflush")
-  EXPORT SYMBOL("gzseek")
-  EXPORT SYMBOL("gzrewind")
-  EXPORT SYMBOL("gztell")
-  EXPORT SYMBOL("gzeof")
-  EXPORT SYMBOL("gzclose")
-  EXPORT SYMBOL("gzerror")
-
-/********************************************************************/
-/*   *MODULE      INFLATE      ZLIB         01/02/01  00:15:09      */
-/********************************************************************/
-
-  EXPORT SYMBOL("inflate")
-  EXPORT SYMBOL("inflateEnd")
-  EXPORT SYMBOL("inflateSetDictionary")
-  EXPORT SYMBOL("inflateSync")
-  EXPORT SYMBOL("inflateReset")
-  EXPORT SYMBOL("inflateInit_")
-  EXPORT SYMBOL("inflateInit2_")
-  EXPORT SYMBOL("inflateSyncPoint")
-
-/********************************************************************/
-/*   *MODULE      UNCOMPR      ZLIB         01/02/01  00:15:09      */
-/********************************************************************/
-
-  EXPORT SYMBOL("uncompress")
-
-/********************************************************************/
-/*   *MODULE      ZUTIL        ZLIB         01/02/01  00:15:09      */
-/********************************************************************/
-
-  EXPORT SYMBOL("zlibVersion")
-  EXPORT SYMBOL("zError")
-
-/*@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@*/
-/*   Version 1.2.1 additional entry points.                         */
-/*@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@*/
-
-/********************************************************************/
-/*   *MODULE      COMPRESS     ZLIB         01/02/01  00:15:09      */
-/********************************************************************/
-
-  EXPORT SYMBOL("compressBound")
-
-/********************************************************************/
-/*   *MODULE      DEFLATE      ZLIB         01/02/01  00:15:09      */
-/********************************************************************/
-
-  EXPORT SYMBOL("deflateBound")
-
-/********************************************************************/
-/*   *MODULE      GZIO         ZLIB         01/02/01  00:15:09      */
-/********************************************************************/
-
-  EXPORT SYMBOL("gzungetc")
-  EXPORT SYMBOL("gzclearerr")
-
-/********************************************************************/
-/*   *MODULE      INFBACK      ZLIB         01/02/01  00:15:09      */
-/********************************************************************/
-
-  EXPORT SYMBOL("inflateBack")
-  EXPORT SYMBOL("inflateBackEnd")
-  EXPORT SYMBOL("inflateBackInit_")
-
-/********************************************************************/
-/*   *MODULE      INFLATE      ZLIB         01/02/01  00:15:09      */
-/********************************************************************/
-
-  EXPORT SYMBOL("inflateCopy")
-
-/********************************************************************/
-/*   *MODULE      ZUTIL        ZLIB         01/02/01  00:15:09      */
-/********************************************************************/
-
-  EXPORT SYMBOL("zlibCompileFlags")
-
-ENDPGMEXP
Index: trunk/minix/lib/zlib-1.2.3/as400/compile.clp
===================================================================
--- trunk/minix/lib/zlib-1.2.3/as400/compile.clp	(revision 9)
+++ 	(revision )
@@ -1,123 +1,0 @@
-/******************************************************************************/
-/*                                                                            */
-/*  ZLIB                                                                      */
-/*                                                                            */
-/*    Compile sources into modules and link them into a service program.      */
-/*                                                                            */
-/******************************************************************************/
-
-             PGM
-
-/*      Configuration adjustable parameters.                                  */
-
-             DCL        VAR(&SRCLIB) TYPE(*CHAR) LEN(10) +
-                          VALUE('ZLIB')                         /* Source library. */
-             DCL        VAR(&SRCFILE) TYPE(*CHAR) LEN(10) +
-                          VALUE('SOURCES')                      /* Source member file. */
-             DCL        VAR(&CTLFILE) TYPE(*CHAR) LEN(10) +
-                          VALUE('TOOLS')                        /* Control member file. */
-
-             DCL        VAR(&MODLIB) TYPE(*CHAR) LEN(10) +
-                          VALUE('ZLIB')                         /* Module library. */
-
-             DCL        VAR(&SRVLIB) TYPE(*CHAR) LEN(10) +
-                          VALUE('LGPL')                         /* Service program library. */
-
-             DCL        VAR(&CFLAGS) TYPE(*CHAR) +
-                          VALUE('OPTIMIZE(40)')                 /* Compile options. */
-
-
-/*      Working storage.                                                      */
-
-             DCL        VAR(&CMDLEN) TYPE(*DEC) LEN(15 5) VALUE(300)    /* Command length. */
-             DCL        VAR(&CMD) TYPE(*CHAR) LEN(512)
-
-
-/*      Compile sources into modules.                                         */
-
-             CHGVAR     VAR(&CMD) VALUE('CRTCMOD MODULE(' *TCAT &MODLIB *TCAT  +
-                        '/ADLER32)               SRCFILE(' *TCAT               +
-                        &SRCLIB *TCAT '/' *TCAT &SRCFILE *TCAT                 +
-                        ') SYSIFCOPT(*IFSIO)' *BCAT &CFLAGS)
-             CALL       PGM(QCMDEXC) PARM(&CMD &CMDLEN)
-
-             CHGVAR     VAR(&CMD) VALUE('CRTCMOD MODULE(' *TCAT &MODLIB *TCAT  +
-                        '/COMPRESS)              SRCFILE(' *TCAT               +
-                        &SRCLIB *TCAT '/' *TCAT &SRCFILE *TCAT                 +
-                        ') SYSIFCOPT(*IFSIO)' *BCAT &CFLAGS)
-             CALL       PGM(QCMDEXC) PARM(&CMD &CMDLEN)
-
-             CHGVAR     VAR(&CMD) VALUE('CRTCMOD MODULE(' *TCAT &MODLIB *TCAT  +
-                        '/CRC32)                 SRCFILE(' *TCAT               +
-                        &SRCLIB *TCAT '/' *TCAT &SRCFILE *TCAT                 +
-                        ') SYSIFCOPT(*IFSIO)' *BCAT &CFLAGS)
-             CALL       PGM(QCMDEXC) PARM(&CMD &CMDLEN)
-
-             CHGVAR     VAR(&CMD) VALUE('CRTCMOD MODULE(' *TCAT &MODLIB *TCAT  +
-                        '/DEFLATE)               SRCFILE(' *TCAT               +
-                        &SRCLIB *TCAT '/' *TCAT &SRCFILE *TCAT                 +
-                        ') SYSIFCOPT(*IFSIO)' *BCAT &CFLAGS)
-             CALL       PGM(QCMDEXC) PARM(&CMD &CMDLEN)
-
-             CHGVAR     VAR(&CMD) VALUE('CRTCMOD MODULE(' *TCAT &MODLIB *TCAT  +
-                        '/GZIO)                  SRCFILE(' *TCAT               +
-                        &SRCLIB *TCAT '/' *TCAT &SRCFILE *TCAT                 +
-                        ') SYSIFCOPT(*IFSIO)' *BCAT &CFLAGS)
-             CALL       PGM(QCMDEXC) PARM(&CMD &CMDLEN)
-
-             CHGVAR     VAR(&CMD) VALUE('CRTCMOD MODULE(' *TCAT &MODLIB *TCAT  +
-                        '/INFBACK)               SRCFILE(' *TCAT               +
-                        &SRCLIB *TCAT '/' *TCAT &SRCFILE *TCAT                 +
-                        ') SYSIFCOPT(*IFSIO)' *BCAT &CFLAGS)
-             CALL       PGM(QCMDEXC) PARM(&CMD &CMDLEN)
-
-             CHGVAR     VAR(&CMD) VALUE('CRTCMOD MODULE(' *TCAT &MODLIB *TCAT  +
-                        '/INFFAST)               SRCFILE(' *TCAT               +
-                        &SRCLIB *TCAT '/' *TCAT &SRCFILE *TCAT                 +
-                        ') SYSIFCOPT(*IFSIO)' *BCAT &CFLAGS)
-             CALL       PGM(QCMDEXC) PARM(&CMD &CMDLEN)
-
-             CHGVAR     VAR(&CMD) VALUE('CRTCMOD MODULE(' *TCAT &MODLIB *TCAT  +
-                        '/INFLATE)               SRCFILE(' *TCAT               +
-                        &SRCLIB *TCAT '/' *TCAT &SRCFILE *TCAT                 +
-                        ') SYSIFCOPT(*IFSIO)' *BCAT &CFLAGS)
-             CALL       PGM(QCMDEXC) PARM(&CMD &CMDLEN)
-
-             CHGVAR     VAR(&CMD) VALUE('CRTCMOD MODULE(' *TCAT &MODLIB *TCAT  +
-                        '/INFTREES)              SRCFILE(' *TCAT               +
-                        &SRCLIB *TCAT '/' *TCAT &SRCFILE *TCAT                 +
-                        ') SYSIFCOPT(*IFSIO)' *BCAT &CFLAGS)
-             CALL       PGM(QCMDEXC) PARM(&CMD &CMDLEN)
-
-             CHGVAR     VAR(&CMD) VALUE('CRTCMOD MODULE(' *TCAT &MODLIB *TCAT  +
-                        '/TREES)                 SRCFILE(' *TCAT               +
-                        &SRCLIB *TCAT '/' *TCAT &SRCFILE *TCAT                 +
-                        ') SYSIFCOPT(*IFSIO)' *BCAT &CFLAGS)
-             CALL       PGM(QCMDEXC) PARM(&CMD &CMDLEN)
-
-             CHGVAR     VAR(&CMD) VALUE('CRTCMOD MODULE(' *TCAT &MODLIB *TCAT  +
-                        '/UNCOMPR)               SRCFILE(' *TCAT               +
-                        &SRCLIB *TCAT '/' *TCAT &SRCFILE *TCAT                 +
-                        ') SYSIFCOPT(*IFSIO)' *BCAT &CFLAGS)
-             CALL       PGM(QCMDEXC) PARM(&CMD &CMDLEN)
-
-             CHGVAR     VAR(&CMD) VALUE('CRTCMOD MODULE(' *TCAT &MODLIB *TCAT  +
-                        '/ZUTIL)                 SRCFILE(' *TCAT               +
-                        &SRCLIB *TCAT '/' *TCAT &SRCFILE *TCAT                 +
-                        ') SYSIFCOPT(*IFSIO)' *BCAT &CFLAGS)
-             CALL       PGM(QCMDEXC) PARM(&CMD &CMDLEN)
-
-
-/*      Link modules into a service program.                                  */
-
-             CRTSRVPGM  SRVPGM(&SRVLIB/ZLIB) +
-                          MODULE(&MODLIB/ADLER32     &MODLIB/COMPRESS    +
-                                 &MODLIB/CRC32       &MODLIB/DEFLATE     +
-                                 &MODLIB/GZIO        &MODLIB/INFBACK     +
-                                 &MODLIB/INFFAST     &MODLIB/INFLATE     +
-                                 &MODLIB/INFTREES    &MODLIB/TREES       +
-                                 &MODLIB/UNCOMPR     &MODLIB/ZUTIL)      +
-                          SRCFILE(&SRCLIB/&CTLFILE) SRCMBR(BNDSRC) +
-                          TEXT('ZLIB 1.2.3') TGTRLS(V4R4M0)
-
-             ENDPGM
Index: trunk/minix/lib/zlib-1.2.3/as400/readme.txt
===================================================================
--- trunk/minix/lib/zlib-1.2.3/as400/readme.txt	(revision 9)
+++ 	(revision )
@@ -1,111 +1,0 @@
-        ZLIB version 1.2.3 for AS400 installation instructions
-
-I) From an AS400 *SAVF file:
-
-1)      Unpacking archive to an AS400 save file
-
-On the AS400:
-
-_       Create the ZLIB AS400 library:
-
-        CRTLIB LIB(ZLIB) TYPE(PROD) TEXT('ZLIB compression API library')
-
-_       Create a work save file, for example:
-
-                CRTSAVF FILE(ZLIB/ZLIBSAVF)
-
-On a PC connected to the target AS400:
-
-_       Unpack the save file image to a PC file "ZLIBSAVF"
-_       Upload this file into the save file on the AS400, for example
-                using ftp in BINARY mode.
-
-
-2)      Populating the ZLIB AS400 source library
-
-On the AS400:
-
-_       Extract the saved objects into the ZLIB AS400 library using:
-
-RSTOBJ OBJ(*ALL) SAVLIB(ZLIB) DEV(*SAVF) SAVF(ZLIB/ZLIBSAVF) RSTLIB(ZLIB)
-
-
-3)      Customize installation:
-
-_       Edit CL member ZLIB/TOOLS(COMPILE) and change parameters if needed,
-                according to the comments.
-
-_       Compile this member with:
-
-        CRTCLPGM PGM(ZLIB/COMPILE) SRCFILE(ZLIB/TOOLS) SRCMBR(COMPILE)
-
-
-4)      Compile and generate the service program:
-
-_       This can now be done by executing:
-
-        CALL PGM(ZLIB/COMPILE)
-
-
-
-II) From the original source distribution:
-
-1)      On the AS400, create the source library:
-
-        CRTLIB LIB(ZLIB) TYPE(PROD) TEXT('ZLIB compression API library')
-
-2)      Create the source files:
-
-        CRTSRCPF FILE(ZLIB/SOURCES) RCDLEN(112) TEXT('ZLIB library modules')
-        CRTSRCPF FILE(ZLIB/H)       RCDLEN(112) TEXT('ZLIB library includes')
-        CRTSRCPF FILE(ZLIB/TOOLS)   RCDLEN(112) TEXT('ZLIB library control utilities')
-
-3)      From the machine hosting the distribution files, upload them (with
-                FTP in text mode, for example) according to the following table:
-
-    Original    AS400   AS400    AS400 AS400
-    file        file    member   type  description
-                SOURCES                Original ZLIB C subprogram sources
-    adler32.c           ADLER32  C     ZLIB - Compute the Adler-32 checksum of a dta strm
-    compress.c          COMPRESS C     ZLIB - Compress a memory buffer
-    crc32.c             CRC32    C     ZLIB - Compute the CRC-32 of a data stream
-    deflate.c           DEFLATE  C     ZLIB - Compress data using the deflation algorithm
-    gzio.c              GZIO     C     ZLIB - IO on .gz files
-    infback.c           INFBACK  C     ZLIB - Inflate using a callback interface
-    inffast.c           INFFAST  C     ZLIB - Fast proc. literals & length/distance pairs
-    inflate.c           INFLATE  C     ZLIB - Interface to inflate modules
-    inftrees.c          INFTREES C     ZLIB - Generate Huffman trees for efficient decode
-    trees.c             TREES    C     ZLIB - Output deflated data using Huffman coding
-    uncompr.c           UNCOMPR  C     ZLIB - Decompress a memory buffer
-    zutil.c             ZUTIL    C     ZLIB - Target dependent utility functions
-                H                      Original ZLIB C and ILE/RPG include files
-    crc32.h             CRC32    C     ZLIB - CRC32 tables
-    deflate.h           DEFLATE  C     ZLIB - Internal compression state
-    inffast.h           INFFAST  C     ZLIB - Header to use inffast.c
-    inffixed.h          INFFIXED C     ZLIB - Table for decoding fixed codes
-    inflate.h           INFLATE  C     ZLIB - Internal inflate state definitions
-    inftrees.h          INFTREES C     ZLIB - Header to use inftrees.c
-    trees.h             TREES    C     ZLIB - Created automatically with -DGEN_TREES_H
-    zconf.h             ZCONF    C     ZLIB - Compression library configuration
-    zlib.h              ZLIB     C     ZLIB - Compression library C user interface
-    as400/zlib.inc      ZLIB.INC RPGLE ZLIB - Compression library ILE RPG user interface
-    zutil.h             ZUTIL    C     ZLIB - Internal interface and configuration
-                TOOLS                  Building source software & AS/400 README
-    as400/bndsrc        BNDSRC         Entry point exportation list
-    as400/compile.clp   COMPILE  CLP   Compile sources & generate service program
-    as400/readme.txt    README   TXT   Installation instructions
-
-4)      Continue as in I)3).
-
-
-
-
-Notes:  For AS400 ILE RPG programmers, a /copy member defining the ZLIB
-                API prototypes for ILE RPG can be found in ZLIB/H(ZLIB.INC).
-                Please read comments in this member for more information.
-
-        Remember that most foreign textual data are ASCII coded: this
-                implementation does not handle conversion from/to ASCII, so
-                text data code conversions must be done explicitely.
-
-        Always open zipped files in binary mode.
Index: trunk/minix/lib/zlib-1.2.3/as400/zlib.inc
===================================================================
--- trunk/minix/lib/zlib-1.2.3/as400/zlib.inc	(revision 9)
+++ 	(revision )
@@ -1,331 +1,0 @@
-      *  ZLIB.INC - Interface to the general purpose compression library
-      *
-      *  ILE RPG400 version by Patrick Monnerat, DATASPHERE.
-      *  Version 1.2.3
-      *
-      *
-      *  WARNING:
-      *     Procedures inflateInit(), inflateInit2(), deflateInit(),
-      *         deflateInit2() and inflateBackInit() need to be called with
-      *         two additional arguments:
-      *         the package version string and the stream control structure.
-      *         size. This is needed because RPG lacks some macro feature.
-      *         Call these procedures as:
-      *             inflateInit(...: ZLIB_VERSION: %size(z_stream))
-      *
-      /if not defined(ZLIB_H_)
-      /define ZLIB_H_
-      *
-      **************************************************************************
-      *                               Constants
-      **************************************************************************
-      *
-      *  Versioning information.
-      *
-     D ZLIB_VERSION    C                   '1.2.3'
-     D ZLIB_VERNUM     C                   X'1230'
-      *
-      *  Other equates.
-      *
-     D Z_NO_FLUSH      C                   0
-     D Z_SYNC_FLUSH    C                   2
-     D Z_FULL_FLUSH    C                   3
-     D Z_FINISH        C                   4
-     D Z_BLOCK         C                   5
-      *
-     D Z_OK            C                   0
-     D Z_STREAM_END    C                   1
-     D Z_NEED_DICT     C                   2
-     D Z_ERRNO         C                   -1
-     D Z_STREAM_ERROR  C                   -2
-     D Z_DATA_ERROR    C                   -3
-     D Z_MEM_ERROR     C                   -4
-     D Z_BUF_ERROR     C                   -5
-     DZ_VERSION_ERROR  C                   -6
-      *
-     D Z_NO_COMPRESSION...
-     D                 C                   0
-     D Z_BEST_SPEED    C                   1
-     D Z_BEST_COMPRESSION...
-     D                 C                   9
-     D Z_DEFAULT_COMPRESSION...
-     D                 C                   -1
-      *
-     D Z_FILTERED      C                   1
-     D Z_HUFFMAN_ONLY  C                   2
-     D Z_RLE           C                   3
-     D Z_DEFAULT_STRATEGY...
-     D                 C                   0
-      *
-     D Z_BINARY        C                   0
-     D Z_ASCII         C                   1
-     D Z_UNKNOWN       C                   2
-      *
-     D Z_DEFLATED      C                   8
-      *
-     D Z_NULL          C                   0
-      *
-      **************************************************************************
-      *                                 Types
-      **************************************************************************
-      *
-     D z_streamp       S               *                                        Stream struct ptr
-     D gzFile          S               *                                        File pointer
-     D z_off_t         S             10i 0                                      Stream offsets
-      *
-      **************************************************************************
-      *                               Structures
-      **************************************************************************
-      *
-      *  The GZIP encode/decode stream support structure.
-      *
-     D z_stream        DS                  align based(z_streamp)
-     D  zs_next_in                     *                                        Next input byte
-     D  zs_avail_in                  10U 0                                      Byte cnt at next_in
-     D  zs_total_in                  10U 0                                      Total bytes read
-     D  zs_next_out                    *                                        Output buffer ptr
-     D  zs_avail_out                 10U 0                                      Room left @ next_out
-     D  zs_total_out                 10U 0                                      Total bytes written
-     D  zs_msg                         *                                        Last errmsg or null
-     D  zs_state                       *                                        Internal state
-     D  zs_zalloc                      *   procptr                              Int. state allocator
-     D  zs_free                        *   procptr                              Int. state dealloc.
-     D  zs_opaque                      *                                        Private alloc. data
-     D  zs_data_type                 10i 0                                      ASC/BIN best guess
-     D  zs_adler                     10u 0                                      Uncompr. adler32 val
-     D                               10U 0                                      Reserved
-     D                               10U 0                                      Ptr. alignment
-      *
-      **************************************************************************
-      *                     Utility function prototypes
-      **************************************************************************
-      *
-     D compress        PR            10I 0 extproc('compress')
-     D  dest                      32767    options(*varsize)                    Destination buffer
-     D  destLen                      10U 0                                      Destination length
-     D  source                    32767    const options(*varsize)              Source buffer
-     D  sourceLen                    10u 0 value                                Source length
-      *
-     D compress2       PR            10I 0 extproc('compress2')
-     D  dest                      32767    options(*varsize)                    Destination buffer
-     D  destLen                      10U 0                                      Destination length
-     D  source                    32767    const options(*varsize)              Source buffer
-     D  sourceLen                    10U 0 value                                Source length
-     D  level                        10I 0 value                                Compression level
-      *
-     D compressBound   PR            10U 0 extproc('compressBound')
-     D  sourceLen                    10U 0 value
-      *
-     D uncompress      PR            10I 0 extproc('uncompress')
-     D  dest                      32767    options(*varsize)                    Destination buffer
-     D  destLen                      10U 0                                      Destination length
-     D  source                    32767    const options(*varsize)              Source buffer
-     D  sourceLen                    10U 0 value                                Source length
-      *
-     D gzopen          PR                  extproc('gzopen')
-     D                                     like(gzFile)
-     D  path                           *   value options(*string)               File pathname
-     D  mode                           *   value options(*string)               Open mode
-      *
-     D gzdopen         PR                  extproc('gzdopen')
-     D                                     like(gzFile)
-     D  fd                           10i 0 value                                File descriptor
-     D  mode                           *   value options(*string)               Open mode
-      *
-     D gzsetparams     PR            10I 0 extproc('gzsetparams')
-     D  file                               value like(gzFile)                   File pointer
-     D  level                        10I 0 value
-     D  strategy                     10i 0 value
-      *
-     D gzread          PR            10I 0 extproc('gzread')
-     D  file                               value like(gzFile)                   File pointer
-     D  buf                       32767    options(*varsize)                    Buffer
-     D  len                          10u 0 value                                Buffer length
-      *
-     D gzwrite         PR            10I 0 extproc('gzwrite')
-     D  file                               value like(gzFile)                   File pointer
-     D  buf                       32767    const options(*varsize)              Buffer
-     D  len                          10u 0 value                                Buffer length
-      *
-     D gzputs          PR            10I 0 extproc('gzputs')
-     D  file                               value like(gzFile)                   File pointer
-     D  s                              *   value options(*string)               String to output
-      *
-     D gzgets          PR              *   extproc('gzgets')
-     D  file                               value like(gzFile)                   File pointer
-     D  buf                       32767    options(*varsize)                    Read buffer
-     D  len                          10i 0 value                                Buffer length
-      *
-     D gzflush         PR            10i 0 extproc('gzflush')
-     D  file                               value like(gzFile)                   File pointer
-     D  flush                        10I 0 value                                Type of flush
-      *
-     D gzseek          PR                  extproc('gzseek')
-     D                                     like(z_off_t)
-     D  file                               value like(gzFile)                   File pointer
-     D  offset                             value like(z_off_t)                  Offset
-     D  whence                       10i 0 value                                Origin
-      *
-     D gzrewind        PR            10i 0 extproc('gzrewind')
-     D  file                               value like(gzFile)                   File pointer
-      *
-     D gztell          PR                  extproc('gztell')
-     D                                     like(z_off_t)
-     D  file                               value like(gzFile)                   File pointer
-      *
-     D gzeof           PR            10i 0 extproc('gzeof')
-     D  file                               value like(gzFile)                   File pointer
-      *
-     D gzclose         PR            10i 0 extproc('gzclose')
-     D  file                               value like(gzFile)                   File pointer
-      *
-     D gzerror         PR              *   extproc('gzerror')                   Error string
-     D  file                               value like(gzFile)                   File pointer
-     D  errnum                       10I 0                                      Error code
-      *
-     D gzclearerr      PR                  extproc('gzclearerr')
-     D  file                               value like(gzFile)                   File pointer
-      *
-      **************************************************************************
-      *                        Basic function prototypes
-      **************************************************************************
-      *
-     D zlibVersion     PR              *   extproc('zlibVersion')               Version string
-      *
-     D deflateInit     PR            10I 0 extproc('deflateInit_')              Init. compression
-     D  strm                               like(z_stream)                       Compression stream
-     D  level                        10I 0 value                                Compression level
-     D  version                        *   value options(*string)               Version string
-     D  stream_size                  10i 0 value                                Stream struct. size
-      *
-     D deflate         PR            10I 0 extproc('deflate')                   Compress data
-     D  strm                               like(z_stream)                       Compression stream
-     D  flush                        10I 0 value                                Flush type required
-      *
-     D deflateEnd      PR            10I 0 extproc('deflateEnd')                Termin. compression
-     D  strm                               like(z_stream)                       Compression stream
-      *
-     D inflateInit     PR            10I 0 extproc('inflateInit_')              Init. expansion
-     D  strm                               like(z_stream)                       Expansion stream
-     D  version                        *   value options(*string)               Version string
-     D  stream_size                  10i 0 value                                Stream struct. size
-      *
-     D inflate         PR            10I 0 extproc('inflate')                   Expand data
-     D  strm                               like(z_stream)                       Expansion stream
-     D  flush                        10I 0 value                                Flush type required
-      *
-     D inflateEnd      PR            10I 0 extproc('inflateEnd')                Termin. expansion
-     D  strm                               like(z_stream)                       Expansion stream
-      *
-      **************************************************************************
-      *                        Advanced function prototypes
-      **************************************************************************
-      *
-     D deflateInit2    PR            10I 0 extproc('deflateInit2_')             Init. compression
-     D  strm                               like(z_stream)                       Compression stream
-     D  level                        10I 0 value                                Compression level
-     D  method                       10I 0 value                                Compression method
-     D  windowBits                   10I 0 value                                log2(window size)
-     D  memLevel                     10I 0 value                                Mem/cmpress tradeoff
-     D  strategy                     10I 0 value                                Compression stategy
-     D  version                        *   value options(*string)               Version string
-     D  stream_size                  10i 0 value                                Stream struct. size
-      *
-     D deflateSetDictionary...
-     D                 PR            10I 0 extproc('deflateSetDictionary')      Init. dictionary
-     D  strm                               like(z_stream)                       Compression stream
-     D  dictionary                32767    const options(*varsize)              Dictionary bytes
-     D  dictLength                   10U 0 value                                Dictionary length
-      *
-     D deflateCopy     PR            10I 0 extproc('deflateCopy')               Compress strm 2 strm
-     D  dest                               like(z_stream)                       Destination stream
-     D  source                             like(z_stream)                       Source stream
-      *
-     D deflateReset    PR            10I 0 extproc('deflateReset')              End and init. stream
-     D  strm                               like(z_stream)                       Compression stream
-      *
-     D deflateParams   PR            10I 0 extproc('deflateParams')             Change level & strat
-     D  strm                               like(z_stream)                       Compression stream
-     D  level                        10I 0 value                                Compression level
-     D  strategy                     10I 0 value                                Compression stategy
-      *
-     D deflateBound    PR            10U 0 extproc('deflateBound')              Change level & strat
-     D  strm                               like(z_stream)                       Compression stream
-     D  sourcelen                    10U 0 value                                Compression level
-      *
-     D deflatePrime    PR            10I 0 extproc('deflatePrime')              Change level & strat
-     D  strm                               like(z_stream)                       Compression stream
-     D  bits                         10I 0 value                                Number of bits to insert
-     D  value                        10I 0 value                                Bits to insert
-      *
-     D inflateInit2    PR            10I 0 extproc('inflateInit2_')             Init. expansion
-     D  strm                               like(z_stream)                       Expansion stream
-     D  windowBits                   10I 0 value                                log2(window size)
-     D  version                        *   value options(*string)               Version string
-     D  stream_size                  10i 0 value                                Stream struct. size
-      *
-     D inflateSetDictionary...
-     D                 PR            10I 0 extproc('inflateSetDictionary')      Init. dictionary
-     D  strm                               like(z_stream)                       Expansion stream
-     D  dictionary                32767    const options(*varsize)              Dictionary bytes
-     D  dictLength                   10U 0 value                                Dictionary length
-      *
-     D inflateSync     PR            10I 0 extproc('inflateSync')               Sync. expansion
-     D  strm                               like(z_stream)                       Expansion stream
-      *
-     D inflateCopy     PR            10I 0 extproc('inflateCopy')
-     D  dest                               like(z_stream)                       Destination stream
-     D  source                             like(z_stream)                       Source stream
-      *
-     D inflateReset    PR            10I 0 extproc('inflateReset')              End and init. stream
-     D  strm                               like(z_stream)                       Expansion stream
-      *
-     D inflateBackInit...
-     D                 PR            10I 0 extproc('inflateBackInit_')
-     D  strm                               like(z_stream)                       Expansion stream
-     D  windowBits                   10I 0 value                                Log2(buffer size)
-     D  window                    32767    options(*varsize)                    Buffer
-     D  version                        *   value options(*string)               Version string
-     D  stream_size                  10i 0 value                                Stream struct. size
-      *
-     D inflateBack     PR            10I 0 extproc('inflateBack')
-     D  strm                               like(z_stream)                       Expansion stream
-     D  in                             *   value procptr                        Input function
-     D  in_desc                        *   value                                Input descriptor
-     D  out                            *   value procptr                        Output function
-     D  out_desc                       *   value                                Output descriptor
-      *
-     D inflateBackEnd  PR            10I 0 extproc('inflateBackEnd')
-     D  strm                               like(z_stream)                       Expansion stream
-      *
-     D zlibCompileFlags...
-     D                 PR            10U 0 extproc('zlibCompileFlags')
-      *
-      **************************************************************************
-      *                        Checksum function prototypes
-      **************************************************************************
-      *
-     D adler32         PR            10U 0 extproc('adler32')                   New checksum
-     D  adler                        10U 0 value                                Old checksum
-     D  buf                       32767    const options(*varsize)              Bytes to accumulate
-     D  len                          10U 0 value                                Buffer length
-      *
-     D crc32           PR            10U 0 extproc('crc32')                     New checksum
-     D  crc                          10U 0 value                                Old checksum
-     D  buf                       32767    const options(*varsize)              Bytes to accumulate
-     D  len                          10U 0 value                                Buffer length
-      *
-      **************************************************************************
-      *                     Miscellaneous function prototypes
-      **************************************************************************
-      *
-     D zError          PR              *   extproc('zError')                    Error string
-     D  err                          10I 0 value                                Error code
-      *
-     D inflateSyncPoint...
-     D                 PR            10I 0 extproc('inflateSyncPoint')
-     D  strm                               like(z_stream)                       Expansion stream
-      *
-     D get_crc_table   PR              *   extproc('get_crc_table')             Ptr to ulongs
-      *
-      /endif
Index: trunk/minix/lib/zlib-1.2.3/compress.c
===================================================================
--- trunk/minix/lib/zlib-1.2.3/compress.c	(revision 9)
+++ 	(revision )
@@ -1,79 +1,0 @@
-/* compress.c -- compress a memory buffer
- * Copyright (C) 1995-2003 Jean-loup Gailly.
- * For conditions of distribution and use, see copyright notice in zlib.h
- */
-
-/* @(#) $Id: compress.c,v 1.1 2005/09/23 22:39:00 beng Exp $ */
-
-#define ZLIB_INTERNAL
-#include "zlib.h"
-
-/* ===========================================================================
-     Compresses the source buffer into the destination buffer. The level
-   parameter has the same meaning as in deflateInit.  sourceLen is the byte
-   length of the source buffer. Upon entry, destLen is the total size of the
-   destination buffer, which must be at least 0.1% larger than sourceLen plus
-   12 bytes. Upon exit, destLen is the actual size of the compressed buffer.
-
-     compress2 returns Z_OK if success, Z_MEM_ERROR if there was not enough
-   memory, Z_BUF_ERROR if there was not enough room in the output buffer,
-   Z_STREAM_ERROR if the level parameter is invalid.
-*/
-int ZEXPORT compress2 (dest, destLen, source, sourceLen, level)
-    Bytef *dest;
-    uLongf *destLen;
-    const Bytef *source;
-    uLong sourceLen;
-    int level;
-{
-    z_stream stream;
-    int err;
-
-    stream.next_in = (Bytef*)source;
-    stream.avail_in = (uInt)sourceLen;
-#ifdef MAXSEG_64K
-    /* Check for source > 64K on 16-bit machine: */
-    if ((uLong)stream.avail_in != sourceLen) return Z_BUF_ERROR;
-#endif
-    stream.next_out = dest;
-    stream.avail_out = (uInt)*destLen;
-    if ((uLong)stream.avail_out != *destLen) return Z_BUF_ERROR;
-
-    stream.zalloc = (alloc_func)0;
-    stream.zfree = (free_func)0;
-    stream.opaque = (voidpf)0;
-
-    err = deflateInit(&stream, level);
-    if (err != Z_OK) return err;
-
-    err = deflate(&stream, Z_FINISH);
-    if (err != Z_STREAM_END) {
-        deflateEnd(&stream);
-        return err == Z_OK ? Z_BUF_ERROR : err;
-    }
-    *destLen = stream.total_out;
-
-    err = deflateEnd(&stream);
-    return err;
-}
-
-/* ===========================================================================
- */
-int ZEXPORT compress (dest, destLen, source, sourceLen)
-    Bytef *dest;
-    uLongf *destLen;
-    const Bytef *source;
-    uLong sourceLen;
-{
-    return compress2(dest, destLen, source, sourceLen, Z_DEFAULT_COMPRESSION);
-}
-
-/* ===========================================================================
-     If the default memLevel or windowBits for deflateInit() is changed, then
-   this function needs to be updated.
- */
-uLong ZEXPORT compressBound (sourceLen)
-    uLong sourceLen;
-{
-    return sourceLen + (sourceLen >> 12) + (sourceLen >> 14) + 11;
-}
Index: trunk/minix/lib/zlib-1.2.3/configure
===================================================================
--- trunk/minix/lib/zlib-1.2.3/configure	(revision 9)
+++ 	(revision )
@@ -1,459 +1,0 @@
-#!/bin/sh
-# configure script for zlib. This script is needed only if
-# you wish to build a shared library and your system supports them,
-# of if you need special compiler, flags or install directory.
-# Otherwise, you can just use directly "make test; make install"
-#
-# To create a shared library, use "configure --shared"; by default a static
-# library is created. If the primitive shared library support provided here
-# does not work, use ftp://prep.ai.mit.edu/pub/gnu/libtool-*.tar.gz
-#
-# To impose specific compiler or flags or install directory, use for example:
-#    prefix=$HOME CC=cc CFLAGS="-O4" ./configure
-# or for csh/tcsh users:
-#    (setenv prefix $HOME; setenv CC cc; setenv CFLAGS "-O4"; ./configure)
-# LDSHARED is the command to be used to create a shared library
-
-# Incorrect settings of CC or CFLAGS may prevent creating a shared library.
-# If you have problems, try without defining CC and CFLAGS before reporting
-# an error.
-
-LIBS=libz.a
-LDFLAGS="-L. ${LIBS}"
-VER=`sed -n -e '/VERSION "/s/.*"\(.*\)".*/\1/p' < zlib.h`
-VER2=`sed -n -e '/VERSION "/s/.*"\([0-9]*\\.[0-9]*\)\\..*/\1/p' < zlib.h`
-VER1=`sed -n -e '/VERSION "/s/.*"\([0-9]*\)\\..*/\1/p' < zlib.h`
-AR=${AR-"ar rc"}
-RANLIB=${RANLIB-"ranlib"}
-prefix=${prefix-/usr/local}
-exec_prefix=${exec_prefix-'${prefix}'}
-libdir=${libdir-'${exec_prefix}/lib'}
-includedir=${includedir-'${prefix}/include'}
-mandir=${mandir-'${prefix}/share/man'}
-shared_ext='.so'
-shared=0
-gcc=0
-old_cc="$CC"
-old_cflags="$CFLAGS"
-
-while test $# -ge 1
-do
-case "$1" in
-    -h* | --h*)
-      echo 'usage:'
-      echo '  configure [--shared] [--prefix=PREFIX]  [--exec_prefix=EXPREFIX]'
-      echo '     [--libdir=LIBDIR] [--includedir=INCLUDEDIR]'
-        exit 0;;
-    -p*=* | --p*=*) prefix=`echo $1 | sed 's/[-a-z_]*=//'`; shift;;
-    -e*=* | --e*=*) exec_prefix=`echo $1 | sed 's/[-a-z_]*=//'`; shift;;
-    -l*=* | --libdir=*) libdir=`echo $1 | sed 's/[-a-z_]*=//'`; shift;;
-    -i*=* | --includedir=*) includedir=`echo $1 | sed 's/[-a-z_]*=//'`;shift;;
-    -p* | --p*) prefix="$2"; shift; shift;;
-    -e* | --e*) exec_prefix="$2"; shift; shift;;
-    -l* | --l*) libdir="$2"; shift; shift;;
-    -i* | --i*) includedir="$2"; shift; shift;;
-    -s* | --s*) shared=1; shift;;
-    *) echo "unknown option: $1"; echo "$0 --help for help"; exit 1;;
-    esac
-done
-
-test=ztest$$
-cat > $test.c <<EOF
-extern int getchar();
-int hello() {return getchar();}
-EOF
-
-test -z "$CC" && echo Checking for gcc...
-cc=${CC-gcc}
-cflags=${CFLAGS-"-O3"}
-# to force the asm version use: CFLAGS="-O3 -DASMV" ./configure
-case "$cc" in
-  *gcc*) gcc=1;;
-esac
-
-if test "$gcc" -eq 1 && ($cc -c $cflags $test.c) 2>/dev/null; then
-  CC="$cc"
-  SFLAGS=${CFLAGS-"-fPIC -O3"}
-  CFLAGS="$cflags"
-  case `(uname -s || echo unknown) 2>/dev/null` in
-  Linux | linux | GNU | GNU/*) LDSHARED=${LDSHARED-"$cc -shared -Wl,-soname,libz.so.1"};;
-  CYGWIN* | Cygwin* | cygwin* | OS/2* )
-             EXE='.exe';;
-  QNX*)  # This is for QNX6. I suppose that the QNX rule below is for QNX2,QNX4
-         # (alain.bonnefoy@icbt.com)
-                 LDSHARED=${LDSHARED-"$cc -shared -Wl,-hlibz.so.1"};;
-  HP-UX*)
-         LDSHARED=${LDSHARED-"$cc -shared $SFLAGS"}
-         case `(uname -m || echo unknown) 2>/dev/null` in
-         ia64)
-                 shared_ext='.so'
-                 SHAREDLIB='libz.so';;
-         *)
-                 shared_ext='.sl'
-                 SHAREDLIB='libz.sl';;
-         esac;;
-  Darwin*)   shared_ext='.dylib'
-             SHAREDLIB=libz$shared_ext
-             SHAREDLIBV=libz.$VER$shared_ext
-             SHAREDLIBM=libz.$VER1$shared_ext
-             LDSHARED=${LDSHARED-"$cc -dynamiclib -install_name $libdir/$SHAREDLIBM -compatibility_version $VER1 -current_version $VER"};;
-  *)             LDSHARED=${LDSHARED-"$cc -shared"};;
-  esac
-else
-  # find system name and corresponding cc options
-  CC=${CC-cc}
-  case `(uname -sr || echo unknown) 2>/dev/null` in
-  HP-UX*)    SFLAGS=${CFLAGS-"-O +z"}
-             CFLAGS=${CFLAGS-"-O"}
-#            LDSHARED=${LDSHARED-"ld -b +vnocompatwarnings"}
-             LDSHARED=${LDSHARED-"ld -b"}
-         case `(uname -m || echo unknown) 2>/dev/null` in
-         ia64)
-             shared_ext='.so'
-             SHAREDLIB='libz.so';;
-         *)
-             shared_ext='.sl'
-             SHAREDLIB='libz.sl';;
-         esac;;
-  IRIX*)     SFLAGS=${CFLAGS-"-ansi -O2 -rpath ."}
-             CFLAGS=${CFLAGS-"-ansi -O2"}
-             LDSHARED=${LDSHARED-"cc -shared"};;
-  OSF1\ V4*) SFLAGS=${CFLAGS-"-O -std1"}
-             CFLAGS=${CFLAGS-"-O -std1"}
-             LDSHARED=${LDSHARED-"cc -shared  -Wl,-soname,libz.so -Wl,-msym -Wl,-rpath,$(libdir) -Wl,-set_version,${VER}:1.0"};;
-  OSF1*)     SFLAGS=${CFLAGS-"-O -std1"}
-             CFLAGS=${CFLAGS-"-O -std1"}
-             LDSHARED=${LDSHARED-"cc -shared"};;
-  QNX*)      SFLAGS=${CFLAGS-"-4 -O"}
-             CFLAGS=${CFLAGS-"-4 -O"}
-             LDSHARED=${LDSHARED-"cc"}
-             RANLIB=${RANLIB-"true"}
-             AR="cc -A";;
-  SCO_SV\ 3.2*) SFLAGS=${CFLAGS-"-O3 -dy -KPIC "}
-             CFLAGS=${CFLAGS-"-O3"}
-             LDSHARED=${LDSHARED-"cc -dy -KPIC -G"};;
-  SunOS\ 5*) SFLAGS=${CFLAGS-"-fast -xcg89 -KPIC -R."}
-             CFLAGS=${CFLAGS-"-fast -xcg89"}
-             LDSHARED=${LDSHARED-"cc -G"};;
-  SunOS\ 4*) SFLAGS=${CFLAGS-"-O2 -PIC"}
-             CFLAGS=${CFLAGS-"-O2"}
-             LDSHARED=${LDSHARED-"ld"};;
-  SunStudio\ 9*) SFLAGS=${CFLAGS-"-DUSE_MMAP -fast -xcode=pic32 -xtarget=ultra3 -xarch=v9b"}
-             CFLAGS=${CFLAGS-"-DUSE_MMAP -fast -xtarget=ultra3 -xarch=v9b"}
-             LDSHARED=${LDSHARED-"cc -xarch=v9b"};;
-  UNIX_System_V\ 4.2.0)
-             SFLAGS=${CFLAGS-"-KPIC -O"}
-             CFLAGS=${CFLAGS-"-O"}
-             LDSHARED=${LDSHARED-"cc -G"};;
-  UNIX_SV\ 4.2MP)
-             SFLAGS=${CFLAGS-"-Kconform_pic -O"}
-             CFLAGS=${CFLAGS-"-O"}
-             LDSHARED=${LDSHARED-"cc -G"};;
-  OpenUNIX\ 5)
-             SFLAGS=${CFLAGS-"-KPIC -O"}
-             CFLAGS=${CFLAGS-"-O"}
-             LDSHARED=${LDSHARED-"cc -G"};;
-  AIX*)  # Courtesy of dbakker@arrayasolutions.com
-             SFLAGS=${CFLAGS-"-O -qmaxmem=8192"}
-             CFLAGS=${CFLAGS-"-O -qmaxmem=8192"}
-             LDSHARED=${LDSHARED-"xlc -G"};;
-  # send working options for other systems to support@gzip.org
-  *)         SFLAGS=${CFLAGS-"-O"}
-             CFLAGS=${CFLAGS-"-O"}
-             LDSHARED=${LDSHARED-"cc -shared"};;
-  esac
-fi
-
-SHAREDLIB=${SHAREDLIB-"libz$shared_ext"}
-SHAREDLIBV=${SHAREDLIBV-"libz$shared_ext.$VER"}
-SHAREDLIBM=${SHAREDLIBM-"libz$shared_ext.$VER1"}
-
-if test $shared -eq 1; then
-  echo Checking for shared library support...
-  # we must test in two steps (cc then ld), required at least on SunOS 4.x
-  if test "`($CC -c $SFLAGS $test.c) 2>&1`" = "" &&
-     test "`($LDSHARED -o $test$shared_ext $test.o) 2>&1`" = ""; then
-    CFLAGS="$SFLAGS"
-    LIBS="$SHAREDLIBV"
-    echo Building shared library $SHAREDLIBV with $CC.
-  elif test -z "$old_cc" -a -z "$old_cflags"; then
-    echo No shared library support.
-    shared=0;
-  else
-    echo 'No shared library support; try without defining CC and CFLAGS'
-    shared=0;
-  fi
-fi
-if test $shared -eq 0; then
-  LDSHARED="$CC"
-  echo Building static library $LIBS version $VER with $CC.
-else
-  LDFLAGS="-L. ${SHAREDLIBV}"
-fi
-
-cat > $test.c <<EOF
-#include <unistd.h>
-int main() { return 0; }
-EOF
-if test "`($CC -c $CFLAGS $test.c) 2>&1`" = ""; then
-  sed < zconf.in.h "/HAVE_UNISTD_H/s%0%1%" > zconf.h
-  echo "Checking for unistd.h... Yes."
-else
-  cp -p zconf.in.h zconf.h
-  echo "Checking for unistd.h... No."
-fi
-
-cat > $test.c <<EOF
-#include <stdio.h>
-#include <stdarg.h>
-#include "zconf.h"
-
-int main()
-{
-#ifndef STDC
-  choke me
-#endif
-
-  return 0;
-}
-EOF
-
-if test "`($CC -c $CFLAGS $test.c) 2>&1`" = ""; then
-  echo "Checking whether to use vs[n]printf() or s[n]printf()... using vs[n]printf()"
-
-  cat > $test.c <<EOF
-#include <stdio.h>
-#include <stdarg.h>
-
-int mytest(char *fmt, ...)
-{
-  char buf[20];
-  va_list ap;
-
-  va_start(ap, fmt);
-  vsnprintf(buf, sizeof(buf), fmt, ap);
-  va_end(ap);
-  return 0;
-}
-
-int main()
-{
-  return (mytest("Hello%d\n", 1));
-}
-EOF
-
-  if test "`($CC $CFLAGS -o $test $test.c) 2>&1`" = ""; then
-    echo "Checking for vsnprintf() in stdio.h... Yes."
-
-    cat >$test.c <<EOF
-#include <stdio.h>
-#include <stdarg.h>
-
-int mytest(char *fmt, ...)
-{
-  int n;
-  char buf[20];
-  va_list ap;
-
-  va_start(ap, fmt);
-  n = vsnprintf(buf, sizeof(buf), fmt, ap);
-  va_end(ap);
-  return n;
-}
-
-int main()
-{
-  return (mytest("Hello%d\n", 1));
-}
-EOF
-
-    if test "`($CC -c $CFLAGS $test.c) 2>&1`" = ""; then
-      echo "Checking for return value of vsnprintf()... Yes."
-    else
-      CFLAGS="$CFLAGS -DHAS_vsnprintf_void"
-      echo "Checking for return value of vsnprintf()... No."
-      echo "  WARNING: apparently vsnprintf() does not return a value. zlib"
-      echo "  can build but will be open to possible string-format security"
-      echo "  vulnerabilities."
-    fi
-  else
-    CFLAGS="$CFLAGS -DNO_vsnprintf"
-    echo "Checking for vsnprintf() in stdio.h... No."
-    echo "  WARNING: vsnprintf() not found, falling back to vsprintf(). zlib"
-    echo "  can build but will be open to possible buffer-overflow security"
-    echo "  vulnerabilities."
-
-    cat >$test.c <<EOF
-#include <stdio.h>
-#include <stdarg.h>
-
-int mytest(char *fmt, ...)
-{
-  int n;
-  char buf[20];
-  va_list ap;
-
-  va_start(ap, fmt);
-  n = vsprintf(buf, fmt, ap);
-  va_end(ap);
-  return n;
-}
-
-int main()
-{
-  return (mytest("Hello%d\n", 1));
-}
-EOF
-
-    if test "`($CC -c $CFLAGS $test.c) 2>&1`" = ""; then
-      echo "Checking for return value of vsprintf()... Yes."
-    else
-      CFLAGS="$CFLAGS -DHAS_vsprintf_void"
-      echo "Checking for return value of vsprintf()... No."
-      echo "  WARNING: apparently vsprintf() does not return a value. zlib"
-      echo "  can build but will be open to possible string-format security"
-      echo "  vulnerabilities."
-    fi
-  fi
-else
-  echo "Checking whether to use vs[n]printf() or s[n]printf()... using s[n]printf()"
-
-  cat >$test.c <<EOF
-#include <stdio.h>
-
-int mytest()
-{
-  char buf[20];
-
-  snprintf(buf, sizeof(buf), "%s", "foo");
-  return 0;
-}
-
-int main()
-{
-  return (mytest());
-}
-EOF
-
-  if test "`($CC $CFLAGS -o $test $test.c) 2>&1`" = ""; then
-    echo "Checking for snprintf() in stdio.h... Yes."
-
-    cat >$test.c <<EOF
-#include <stdio.h>
-
-int mytest()
-{
-  char buf[20];
-
-  return snprintf(buf, sizeof(buf), "%s", "foo");
-}
-
-int main()
-{
-  return (mytest());
-}
-EOF
-
-    if test "`($CC -c $CFLAGS $test.c) 2>&1`" = ""; then
-      echo "Checking for return value of snprintf()... Yes."
-    else
-      CFLAGS="$CFLAGS -DHAS_snprintf_void"
-      echo "Checking for return value of snprintf()... No."
-      echo "  WARNING: apparently snprintf() does not return a value. zlib"
-      echo "  can build but will be open to possible string-format security"
-      echo "  vulnerabilities."
-    fi
-  else
-    CFLAGS="$CFLAGS -DNO_snprintf"
-    echo "Checking for snprintf() in stdio.h... No."
-    echo "  WARNING: snprintf() not found, falling back to sprintf(). zlib"
-    echo "  can build but will be open to possible buffer-overflow security"
-    echo "  vulnerabilities."
-
-    cat >$test.c <<EOF
-#include <stdio.h>
-
-int mytest()
-{
-  char buf[20];
-
-  return sprintf(buf, "%s", "foo");
-}
-
-int main()
-{
-  return (mytest());
-}
-EOF
-
-    if test "`($CC -c $CFLAGS $test.c) 2>&1`" = ""; then
-      echo "Checking for return value of sprintf()... Yes."
-    else
-      CFLAGS="$CFLAGS -DHAS_sprintf_void"
-      echo "Checking for return value of sprintf()... No."
-      echo "  WARNING: apparently sprintf() does not return a value. zlib"
-      echo "  can build but will be open to possible string-format security"
-      echo "  vulnerabilities."
-    fi
-  fi
-fi
-
-cat >$test.c <<EOF
-#include <errno.h>
-int main() { return 0; }
-EOF
-if test "`($CC -c $CFLAGS $test.c) 2>&1`" = ""; then
-  echo "Checking for errno.h... Yes."
-else
-  echo "Checking for errno.h... No."
-  CFLAGS="$CFLAGS -DNO_ERRNO_H"
-fi
-
-cat > $test.c <<EOF
-#include <sys/types.h>
-#include <sys/mman.h>
-#include <sys/stat.h>
-caddr_t hello() {
-  return mmap((caddr_t)0, (off_t)0, PROT_READ, MAP_SHARED, 0, (off_t)0);
-}
-EOF
-if test "`($CC -c $CFLAGS $test.c) 2>&1`" = ""; then
-  CFLAGS="$CFLAGS -DUSE_MMAP"
-  echo Checking for mmap support... Yes.
-else
-  echo Checking for mmap support... No.
-fi
-
-CPP=${CPP-"$CC -E"}
-case $CFLAGS in
-  *ASMV*)
-    if test "`nm $test.o | grep _hello`" = ""; then
-      CPP="$CPP -DNO_UNDERLINE"
-      echo Checking for underline in external names... No.
-    else
-      echo Checking for underline in external names... Yes.
-    fi;;
-esac
-
-rm -f $test.[co] $test $test$shared_ext
-
-# udpate Makefile
-sed < Makefile.in "
-/^CC *=/s#=.*#=$CC#
-/^CFLAGS *=/s#=.*#=$CFLAGS#
-/^CPP *=/s#=.*#=$CPP#
-/^LDSHARED *=/s#=.*#=$LDSHARED#
-/^LIBS *=/s#=.*#=$LIBS#
-/^SHAREDLIB *=/s#=.*#=$SHAREDLIB#
-/^SHAREDLIBV *=/s#=.*#=$SHAREDLIBV#
-/^SHAREDLIBM *=/s#=.*#=$SHAREDLIBM#
-/^AR *=/s#=.*#=$AR#
-/^RANLIB *=/s#=.*#=$RANLIB#
-/^EXE *=/s#=.*#=$EXE#
-/^prefix *=/s#=.*#=$prefix#
-/^exec_prefix *=/s#=.*#=$exec_prefix#
-/^libdir *=/s#=.*#=$libdir#
-/^includedir *=/s#=.*#=$includedir#
-/^mandir *=/s#=.*#=$mandir#
-/^LDFLAGS *=/s#=.*#=$LDFLAGS#
-" > Makefile
Index: trunk/minix/lib/zlib-1.2.3/contrib/README.contrib
===================================================================
--- trunk/minix/lib/zlib-1.2.3/contrib/README.contrib	(revision 9)
+++ 	(revision )
@@ -1,71 +1,0 @@
-All files under this contrib directory are UNSUPPORTED. There were
-provided by users of zlib and were not tested by the authors of zlib.
-Use at your own risk. Please contact the authors of the contributions
-for help about these, not the zlib authors. Thanks.
-
-
-ada/        by Dmitriy Anisimkov <anisimkov@yahoo.com>
-        Support for Ada
-        See http://zlib-ada.sourceforge.net/
-
-asm586/
-asm686/     by Brian Raiter <breadbox@muppetlabs.com>
-        asm code for Pentium and PPro/PII, using the AT&T (GNU as) syntax
-        See http://www.muppetlabs.com/~breadbox/software/assembly.html
-
-blast/      by Mark Adler <madler@alumni.caltech.edu>
-        Decompressor for output of PKWare Data Compression Library (DCL)
-
-delphi/     by Cosmin Truta <cosmint@cs.ubbcluj.ro>
-        Support for Delphi and C++ Builder
-
-dotzlib/    by Henrik Ravn <henrik@ravn.com>
-        Support for Microsoft .Net and Visual C++ .Net
-
-infback9/   by Mark Adler <madler@alumni.caltech.edu>
-        Unsupported diffs to infback to decode the deflate64 format
-
-inflate86/  by Chris Anderson <christop@charm.net>
-        Tuned x86 gcc asm code to replace inflate_fast()
-
-iostream/   by Kevin Ruland <kevin@rodin.wustl.edu>
-        A C++ I/O streams interface to the zlib gz* functions
-
-iostream2/  by Tyge Løvset <Tyge.Lovset@cmr.no>
-        Another C++ I/O streams interface
-
-iostream3/  by Ludwig Schwardt <schwardt@sun.ac.za>
-            and Kevin Ruland <kevin@rodin.wustl.edu>
-        Yet another C++ I/O streams interface
-
-masm686/    by Dan Higdon <hdan@kinesoft.com>
-            and Chuck Walbourn <chuckw@kinesoft.com>
-        asm code for Pentium Pro/PII, using the MASM syntax
-
-masmx64/    by Gilles Vollant <info@winimage.com>
-	x86 64-bit (AMD64 and Intel EM64t) code for x64 assembler to
-	replace longest_match() and inflate_fast()
-
-masmx86/    by Gilles Vollant <info@winimage.com>
-        x86 asm code to replace longest_match() and inflate_fast(),
-        for Visual C++ and MASM
-
-minizip/    by Gilles Vollant <info@winimage.com>
-        Mini zip and unzip based on zlib
-        See http://www.winimage.com/zLibDll/unzip.html
-
-pascal/     by Bob Dellaca <bobdl@xtra.co.nz> et al.
-        Support for Pascal
-
-puff/       by Mark Adler <madler@alumni.caltech.edu>
-        Small, low memory usage inflate.  Also serves to provide an
-        unambiguous description of the deflate format.
-
-testzlib/   by Gilles Vollant <info@winimage.com>
-        Example of the use of zlib
-
-untgz/      by Pedro A. Aranda Gutierrez <paag@tid.es>
-        A very simple tar.gz file extractor using zlib
-
-vstudio/    by Gilles Vollant <info@winimage.com>
-        Building a minizip-enhanced zlib with Microsoft Visual Studio
Index: trunk/minix/lib/zlib-1.2.3/contrib/ada/buffer_demo.adb
===================================================================
--- trunk/minix/lib/zlib-1.2.3/contrib/ada/buffer_demo.adb	(revision 9)
+++ 	(revision )
@@ -1,106 +1,0 @@
-----------------------------------------------------------------
---  ZLib for Ada thick binding.                               --
---                                                            --
---  Copyright (C) 2002-2004 Dmitriy Anisimkov                 --
---                                                            --
---  Open source license information is in the zlib.ads file.  --
-----------------------------------------------------------------
---
---  $Id: buffer_demo.adb,v 1.1 2005/09/23 22:39:01 beng Exp $
-
---  This demo program provided by Dr Steve Sangwine <sjs@essex.ac.uk>
---
---  Demonstration of a problem with Zlib-Ada (already fixed) when a buffer
---  of exactly the correct size is used for decompressed data, and the last
---  few bytes passed in to Zlib are checksum bytes.
-
---  This program compresses a string of text, and then decompresses the
---  compressed text into a buffer of the same size as the original text.
-
-with Ada.Streams; use Ada.Streams;
-with Ada.Text_IO;
-
-with ZLib; use ZLib;
-
-procedure Buffer_Demo is
-   EOL  : Character renames ASCII.LF;
-   Text : constant String
-     := "Four score and seven years ago our fathers brought forth," & EOL &
-        "upon this continent, a new nation, conceived in liberty," & EOL &
-        "and dedicated to the proposition that `all men are created equal'.";
-
-   Source : Stream_Element_Array (1 .. Text'Length);
-   for Source'Address use Text'Address;
-
-begin
-   Ada.Text_IO.Put (Text);
-   Ada.Text_IO.New_Line;
-   Ada.Text_IO.Put_Line
-     ("Uncompressed size : " & Positive'Image (Text'Length) & " bytes");
-
-   declare
-      Compressed_Data : Stream_Element_Array (1 .. Text'Length);
-      L               : Stream_Element_Offset;
-   begin
-      Compress : declare
-         Compressor : Filter_Type;
-         I : Stream_Element_Offset;
-      begin
-         Deflate_Init (Compressor);
-
-         --  Compress the whole of T at once.
-
-         Translate (Compressor, Source, I, Compressed_Data, L, Finish);
-         pragma Assert (I = Source'Last);
-
-         Close (Compressor);
-
-         Ada.Text_IO.Put_Line
-           ("Compressed size :   "
-            & Stream_Element_Offset'Image (L) & " bytes");
-      end Compress;
-
-      --  Now we decompress the data, passing short blocks of data to Zlib
-      --  (because this demonstrates the problem - the last block passed will
-      --  contain checksum information and there will be no output, only a
-      --  check inside Zlib that the checksum is correct).
-
-      Decompress : declare
-         Decompressor : Filter_Type;
-
-         Uncompressed_Data : Stream_Element_Array (1 .. Text'Length);
-
-         Block_Size : constant := 4;
-         --  This makes sure that the last block contains
-         --  only Adler checksum data.
-
-         P : Stream_Element_Offset := Compressed_Data'First - 1;
-         O : Stream_Element_Offset;
-      begin
-         Inflate_Init (Decompressor);
-
-         loop
-            Translate
-              (Decompressor,
-               Compressed_Data
-                 (P + 1 .. Stream_Element_Offset'Min (P + Block_Size, L)),
-               P,
-               Uncompressed_Data
-                 (Total_Out (Decompressor) + 1 .. Uncompressed_Data'Last),
-               O,
-               No_Flush);
-
-               Ada.Text_IO.Put_Line
-                 ("Total in : " & Count'Image (Total_In (Decompressor)) &
-                  ", out : " & Count'Image (Total_Out (Decompressor)));
-
-               exit when P = L;
-         end loop;
-
-         Ada.Text_IO.New_Line;
-         Ada.Text_IO.Put_Line
-           ("Decompressed text matches original text : "
-             & Boolean'Image (Uncompressed_Data = Source));
-      end Decompress;
-   end;
-end Buffer_Demo;
Index: trunk/minix/lib/zlib-1.2.3/contrib/ada/mtest.adb
===================================================================
--- trunk/minix/lib/zlib-1.2.3/contrib/ada/mtest.adb	(revision 9)
+++ 	(revision )
@@ -1,156 +1,0 @@
-----------------------------------------------------------------
---  ZLib for Ada thick binding.                               --
---                                                            --
---  Copyright (C) 2002-2003 Dmitriy Anisimkov                 --
---                                                            --
---  Open source license information is in the zlib.ads file.  --
-----------------------------------------------------------------
---  Continuous test for ZLib multithreading. If the test would fail
---  we should provide thread safe allocation routines for the Z_Stream.
---
---  $Id: mtest.adb,v 1.1 2005/09/23 22:39:01 beng Exp $
-
-with ZLib;
-with Ada.Streams;
-with Ada.Numerics.Discrete_Random;
-with Ada.Text_IO;
-with Ada.Exceptions;
-with Ada.Task_Identification;
-
-procedure MTest is
-   use Ada.Streams;
-   use ZLib;
-
-   Stop : Boolean := False;
-
-   pragma Atomic (Stop);
-
-   subtype Visible_Symbols is Stream_Element range 16#20# .. 16#7E#;
-
-   package Random_Elements is
-      new Ada.Numerics.Discrete_Random (Visible_Symbols);
-
-   task type Test_Task;
-
-   task body Test_Task is
-      Buffer : Stream_Element_Array (1 .. 100_000);
-      Gen : Random_Elements.Generator;
-
-      Buffer_First  : Stream_Element_Offset;
-      Compare_First : Stream_Element_Offset;
-
-      Deflate : Filter_Type;
-      Inflate : Filter_Type;
-
-      procedure Further (Item : in Stream_Element_Array);
-
-      procedure Read_Buffer
-        (Item : out Ada.Streams.Stream_Element_Array;
-         Last : out Ada.Streams.Stream_Element_Offset);
-
-      -------------
-      -- Further --
-      -------------
-
-      procedure Further (Item : in Stream_Element_Array) is
-
-         procedure Compare (Item : in Stream_Element_Array);
-
-         -------------
-         -- Compare --
-         -------------
-
-         procedure Compare (Item : in Stream_Element_Array) is
-            Next_First : Stream_Element_Offset := Compare_First + Item'Length;
-         begin
-            if Buffer (Compare_First .. Next_First - 1) /= Item then
-               raise Program_Error;
-            end if;
-
-            Compare_First := Next_First;
-         end Compare;
-
-         procedure Compare_Write is new ZLib.Write (Write => Compare);
-      begin
-         Compare_Write (Inflate, Item, No_Flush);
-      end Further;
-
-      -----------------
-      -- Read_Buffer --
-      -----------------
-
-      procedure Read_Buffer
-        (Item : out Ada.Streams.Stream_Element_Array;
-         Last : out Ada.Streams.Stream_Element_Offset)
-      is
-         Buff_Diff   : Stream_Element_Offset := Buffer'Last - Buffer_First;
-         Next_First : Stream_Element_Offset;
-      begin
-         if Item'Length <= Buff_Diff then
-            Last := Item'Last;
-
-            Next_First := Buffer_First + Item'Length;
-
-            Item := Buffer (Buffer_First .. Next_First - 1);
-
-            Buffer_First := Next_First;
-         else
-            Last := Item'First + Buff_Diff;
-            Item (Item'First .. Last) := Buffer (Buffer_First .. Buffer'Last);
-            Buffer_First := Buffer'Last + 1;
-         end if;
-      end Read_Buffer;
-
-      procedure Translate is new Generic_Translate
-                                   (Data_In  => Read_Buffer,
-                                    Data_Out => Further);
-
-   begin
-      Random_Elements.Reset (Gen);
-
-      Buffer := (others => 20);
-
-      Main : loop
-         for J in Buffer'Range loop
-            Buffer (J) := Random_Elements.Random (Gen);
-
-            Deflate_Init (Deflate);
-            Inflate_Init (Inflate);
-
-            Buffer_First  := Buffer'First;
-            Compare_First := Buffer'First;
-
-            Translate (Deflate);
-
-            if Compare_First /= Buffer'Last + 1 then
-               raise Program_Error;
-            end if;
-
-            Ada.Text_IO.Put_Line
-              (Ada.Task_Identification.Image
-                 (Ada.Task_Identification.Current_Task)
-               & Stream_Element_Offset'Image (J)
-               & ZLib.Count'Image (Total_Out (Deflate)));
-
-            Close (Deflate);
-            Close (Inflate);
-
-            exit Main when Stop;
-         end loop;
-      end loop Main;
-   exception
-      when E : others =>
-         Ada.Text_IO.Put_Line (Ada.Exceptions.Exception_Information (E));
-         Stop := True;
-   end Test_Task;
-
-   Test : array (1 .. 4) of Test_Task;
-
-   pragma Unreferenced (Test);
-
-   Dummy : Character;
-
-begin
-   Ada.Text_IO.Get_Immediate (Dummy);
-   Stop := True;
-end MTest;
Index: trunk/minix/lib/zlib-1.2.3/contrib/ada/read.adb
===================================================================
--- trunk/minix/lib/zlib-1.2.3/contrib/ada/read.adb	(revision 9)
+++ 	(revision )
@@ -1,156 +1,0 @@
-----------------------------------------------------------------
---  ZLib for Ada thick binding.                               --
---                                                            --
---  Copyright (C) 2002-2003 Dmitriy Anisimkov                 --
---                                                            --
---  Open source license information is in the zlib.ads file.  --
-----------------------------------------------------------------
-
---  $Id: read.adb,v 1.1 2005/09/23 22:39:01 beng Exp $
-
---  Test/demo program for the generic read interface.
-
-with Ada.Numerics.Discrete_Random;
-with Ada.Streams;
-with Ada.Text_IO;
-
-with ZLib;
-
-procedure Read is
-
-   use Ada.Streams;
-
-   ------------------------------------
-   --  Test configuration parameters --
-   ------------------------------------
-
-   File_Size   : Stream_Element_Offset := 100_000;
-
-   Continuous  : constant Boolean          := False;
-   --  If this constant is True, the test would be repeated again and again,
-   --  with increment File_Size for every iteration.
-
-   Header      : constant ZLib.Header_Type := ZLib.Default;
-   --  Do not use Header other than Default in ZLib versions 1.1.4 and older.
-
-   Init_Random : constant := 8;
-   --  We are using the same random sequence, in case of we catch bug,
-   --  so we would be able to reproduce it.
-
-   -- End --
-
-   Pack_Size : Stream_Element_Offset;
-   Offset    : Stream_Element_Offset;
-
-   Filter     : ZLib.Filter_Type;
-
-   subtype Visible_Symbols
-      is Stream_Element range 16#20# .. 16#7E#;
-
-   package Random_Elements is new
-      Ada.Numerics.Discrete_Random (Visible_Symbols);
-
-   Gen : Random_Elements.Generator;
-   Period  : constant Stream_Element_Offset := 200;
-   --  Period constant variable for random generator not to be very random.
-   --  Bigger period, harder random.
-
-   Read_Buffer : Stream_Element_Array (1 .. 2048);
-   Read_First  : Stream_Element_Offset;
-   Read_Last   : Stream_Element_Offset;
-
-   procedure Reset;
-
-   procedure Read
-     (Item : out Stream_Element_Array;
-      Last : out Stream_Element_Offset);
-   --  this procedure is for generic instantiation of
-   --  ZLib.Read
-   --  reading data from the File_In.
-
-   procedure Read is new ZLib.Read
-                           (Read,
-                            Read_Buffer,
-                            Rest_First => Read_First,
-                            Rest_Last  => Read_Last);
-
-   ----------
-   -- Read --
-   ----------
-
-   procedure Read
-     (Item : out Stream_Element_Array;
-      Last : out Stream_Element_Offset) is
-   begin
-      Last := Stream_Element_Offset'Min
-               (Item'Last,
-                Item'First + File_Size - Offset);
-
-      for J in Item'First .. Last loop
-         if J < Item'First + Period then
-            Item (J) := Random_Elements.Random (Gen);
-         else
-            Item (J) := Item (J - Period);
-         end if;
-
-         Offset   := Offset + 1;
-      end loop;
-   end Read;
-
-   -----------
-   -- Reset --
-   -----------
-
-   procedure Reset is
-   begin
-      Random_Elements.Reset (Gen, Init_Random);
-      Pack_Size := 0;
-      Offset := 1;
-      Read_First := Read_Buffer'Last + 1;
-      Read_Last  := Read_Buffer'Last;
-   end Reset;
-
-begin
-   Ada.Text_IO.Put_Line ("ZLib " & ZLib.Version);
-
-   loop
-      for Level in ZLib.Compression_Level'Range loop
-
-         Ada.Text_IO.Put ("Level ="
-            & ZLib.Compression_Level'Image (Level));
-
-         --  Deflate using generic instantiation.
-
-         ZLib.Deflate_Init
-               (Filter,
-                Level,
-                Header => Header);
-
-         Reset;
-
-         Ada.Text_IO.Put
-           (Stream_Element_Offset'Image (File_Size) & " ->");
-
-         loop
-            declare
-               Buffer : Stream_Element_Array (1 .. 1024);
-               Last   : Stream_Element_Offset;
-            begin
-               Read (Filter, Buffer, Last);
-
-               Pack_Size := Pack_Size + Last - Buffer'First + 1;
-
-               exit when Last < Buffer'Last;
-            end;
-         end loop;
-
-         Ada.Text_IO.Put_Line (Stream_Element_Offset'Image (Pack_Size));
-
-         ZLib.Close (Filter);
-      end loop;
-
-      exit when not Continuous;
-
-      File_Size := File_Size + 1;
-   end loop;
-end Read;
Index: trunk/minix/lib/zlib-1.2.3/contrib/ada/readme.txt
===================================================================
--- trunk/minix/lib/zlib-1.2.3/contrib/ada/readme.txt	(revision 9)
+++ 	(revision )
@@ -1,65 +1,0 @@
-                        ZLib for Ada thick binding (ZLib.Ada)
-                        Release 1.3
-
-ZLib.Ada is a thick binding interface to the popular ZLib data
-compression library, available at http://www.gzip.org/zlib/.
-It provides Ada-style access to the ZLib C library.
-
-
-        Here are the main changes since ZLib.Ada 1.2:
-
-- Attension: ZLib.Read generic routine have a initialization requirement
-  for Read_Last parameter now. It is a bit incompartible with previous version,
-  but extends functionality, we could use new parameters Allow_Read_Some and
-  Flush now.
-
-- Added Is_Open routines to ZLib and ZLib.Streams packages.
-
-- Add pragma Assert to check Stream_Element is 8 bit.
-
-- Fix extraction to buffer with exact known decompressed size. Error reported by
-  Steve Sangwine.
-
-- Fix definition of ULong (changed to unsigned_long), fix regression on 64 bits
-  computers. Patch provided by Pascal Obry.
-
-- Add Status_Error exception definition.
-
-- Add pragma Assertion that Ada.Streams.Stream_Element size is 8 bit.
-
-
-        How to build ZLib.Ada under GNAT
-
-You should have the ZLib library already build on your computer, before
-building ZLib.Ada. Make the directory of ZLib.Ada sources current and
-issue the command:
-
-  gnatmake test -largs -L<directory where libz.a is> -lz
-
-Or use the GNAT project file build for GNAT 3.15 or later:
-
-  gnatmake -Pzlib.gpr -L<directory where libz.a is>
-
-
-        How to build ZLib.Ada under Aonix ObjectAda for Win32 7.2.2
-
-1. Make a project with all *.ads and *.adb files from the distribution.
-2. Build the libz.a library from the ZLib C sources.
-3. Rename libz.a to z.lib.
-4. Add the library z.lib to the project.
-5. Add the libc.lib library from the ObjectAda distribution to the project.
-6. Build the executable using test.adb as a main procedure.
-
-
-        How to use ZLib.Ada
-
-The source files test.adb and read.adb are small demo programs that show
-the main functionality of ZLib.Ada.
-
-The routines from the package specifications are commented.
-
-
-Homepage: http://zlib-ada.sourceforge.net/
-Author: Dmitriy Anisimkov <anisimkov@yahoo.com>
-
-Contributors: Pascal Obry <pascal@obry.org>, Steve Sangwine <sjs@essex.ac.uk>
Index: trunk/minix/lib/zlib-1.2.3/contrib/ada/test.adb
===================================================================
--- trunk/minix/lib/zlib-1.2.3/contrib/ada/test.adb	(revision 9)
+++ 	(revision )
@@ -1,463 +1,0 @@
-----------------------------------------------------------------
---  ZLib for Ada thick binding.                               --
---                                                            --
---  Copyright (C) 2002-2003 Dmitriy Anisimkov                 --
---                                                            --
---  Open source license information is in the zlib.ads file.  --
-----------------------------------------------------------------
-
---  $Id: test.adb,v 1.1 2005/09/23 22:39:01 beng Exp $
-
---  The program has a few aims.
---  1. Test ZLib.Ada95 thick binding functionality.
---  2. Show the example of use main functionality of the ZLib.Ada95 binding.
---  3. Build this program automatically compile all ZLib.Ada95 packages under
---     GNAT Ada95 compiler.
-
-with ZLib.Streams;
-with Ada.Streams.Stream_IO;
-with Ada.Numerics.Discrete_Random;
-
-with Ada.Text_IO;
-
-with Ada.Calendar;
-
-procedure Test is
-
-   use Ada.Streams;
-   use Stream_IO;
-
-   ------------------------------------
-   --  Test configuration parameters --
-   ------------------------------------
-
-   File_Size   : Count   := 100_000;
-   Continuous  : constant Boolean := False;
-
-   Header      : constant ZLib.Header_Type := ZLib.Default;
-                                              --  ZLib.None;
-                                              --  ZLib.Auto;
-                                              --  ZLib.GZip;
-   --  Do not use Header other then Default in ZLib versions 1.1.4
-   --  and older.
-
-   Strategy    : constant ZLib.Strategy_Type := ZLib.Default_Strategy;
-   Init_Random : constant := 10;
-
-   -- End --
-
-   In_File_Name  : constant String := "testzlib.in";
-   --  Name of the input file
-
-   Z_File_Name   : constant String := "testzlib.zlb";
-   --  Name of the compressed file.
-
-   Out_File_Name : constant String := "testzlib.out";
-   --  Name of the decompressed file.
-
-   File_In   : File_Type;
-   File_Out  : File_Type;
-   File_Back : File_Type;
-   File_Z    : ZLib.Streams.Stream_Type;
-
-   Filter : ZLib.Filter_Type;
-
-   Time_Stamp : Ada.Calendar.Time;
-
-   procedure Generate_File;
-   --  Generate file of spetsified size with some random data.
-   --  The random data is repeatable, for the good compression.
-
-   procedure Compare_Streams
-     (Left, Right : in out Root_Stream_Type'Class);
-   --  The procedure compearing data in 2 streams.
-   --  It is for compare data before and after compression/decompression.
-
-   procedure Compare_Files (Left, Right : String);
-   --  Compare files. Based on the Compare_Streams.
-
-   procedure Copy_Streams
-     (Source, Target : in out Root_Stream_Type'Class;
-      Buffer_Size    : in     Stream_Element_Offset := 1024);
-   --  Copying data from one stream to another. It is for test stream
-   --  interface of the library.
-
-   procedure Data_In
-     (Item : out Stream_Element_Array;
-      Last : out Stream_Element_Offset);
-   --  this procedure is for generic instantiation of
-   --  ZLib.Generic_Translate.
-   --  reading data from the File_In.
-
-   procedure Data_Out (Item : in Stream_Element_Array);
-   --  this procedure is for generic instantiation of
-   --  ZLib.Generic_Translate.
-   --  writing data to the File_Out.
-
-   procedure Stamp;
-   --  Store the timestamp to the local variable.
-
-   procedure Print_Statistic (Msg : String; Data_Size : ZLib.Count);
-   --  Print the time statistic with the message.
-
-   procedure Translate is new ZLib.Generic_Translate
-                                (Data_In  => Data_In,
-                                 Data_Out => Data_Out);
-   --  This procedure is moving data from File_In to File_Out
-   --  with compression or decompression, depend on initialization of
-   --  Filter parameter.
-
-   -------------------
-   -- Compare_Files --
-   -------------------
-
-   procedure Compare_Files (Left, Right : String) is
-      Left_File, Right_File : File_Type;
-   begin
-      Open (Left_File, In_File, Left);
-      Open (Right_File, In_File, Right);
-      Compare_Streams (Stream (Left_File).all, Stream (Right_File).all);
-      Close (Left_File);
-      Close (Right_File);
-   end Compare_Files;
-
-   ---------------------
-   -- Compare_Streams --
-   ---------------------
-
-   procedure Compare_Streams
-     (Left, Right : in out Ada.Streams.Root_Stream_Type'Class)
-   is
-      Left_Buffer, Right_Buffer : Stream_Element_Array (0 .. 16#FFF#);
-      Left_Last, Right_Last : Stream_Element_Offset;
-   begin
-      loop
-         Read (Left, Left_Buffer, Left_Last);
-         Read (Right, Right_Buffer, Right_Last);
-
-         if Left_Last /= Right_Last then
-            Ada.Text_IO.Put_Line ("Compare error :"
-              & Stream_Element_Offset'Image (Left_Last)
-              & " /= "
-              & Stream_Element_Offset'Image (Right_Last));
-
-            raise Constraint_Error;
-
-         elsif Left_Buffer (0 .. Left_Last)
-               /= Right_Buffer (0 .. Right_Last)
-         then
-            Ada.Text_IO.Put_Line ("ERROR: IN and OUT files is not equal.");
-            raise Constraint_Error;
-
-         end if;
-
-         exit when Left_Last < Left_Buffer'Last;
-      end loop;
-   end Compare_Streams;
-
-   ------------------
-   -- Copy_Streams --
-   ------------------
-
-   procedure Copy_Streams
-     (Source, Target : in out Ada.Streams.Root_Stream_Type'Class;
-      Buffer_Size    : in     Stream_Element_Offset := 1024)
-   is
-      Buffer : Stream_Element_Array (1 .. Buffer_Size);
-      Last   : Stream_Element_Offset;
-   begin
-      loop
-         Read  (Source, Buffer, Last);
-         Write (Target, Buffer (1 .. Last));
-
-         exit when Last < Buffer'Last;
-      end loop;
-   end Copy_Streams;
-
-   -------------
-   -- Data_In --
-   -------------
-
-   procedure Data_In
-     (Item : out Stream_Element_Array;
-      Last : out Stream_Element_Offset) is
-   begin
-      Read (File_In, Item, Last);
-   end Data_In;
-
-   --------------
-   -- Data_Out --
-   --------------
-
-   procedure Data_Out (Item : in Stream_Element_Array) is
-   begin
-      Write (File_Out, Item);
-   end Data_Out;
-
-   -------------------
-   -- Generate_File --
-   -------------------
-
-   procedure Generate_File is
-      subtype Visible_Symbols is Stream_Element range 16#20# .. 16#7E#;
-
-      package Random_Elements is
-         new Ada.Numerics.Discrete_Random (Visible_Symbols);
-
-      Gen    : Random_Elements.Generator;
-      Buffer : Stream_Element_Array := (1 .. 77 => 16#20#) & 10;
-
-      Buffer_Count : constant Count := File_Size / Buffer'Length;
-      --  Number of same buffers in the packet.
-
-      Density : constant Count := 30; --  from 0 to Buffer'Length - 2;
-
-      procedure Fill_Buffer (J, D : in Count);
-      --  Change the part of the buffer.
-
-      -----------------
-      -- Fill_Buffer --
-      -----------------
-
-      procedure Fill_Buffer (J, D : in Count) is
-      begin
-         for K in 0 .. D loop
-            Buffer
-              (Stream_Element_Offset ((J + K) mod (Buffer'Length - 1) + 1))
-             := Random_Elements.Random (Gen);
-
-         end loop;
-      end Fill_Buffer;
-
-   begin
-      Random_Elements.Reset (Gen, Init_Random);
-
-      Create (File_In, Out_File, In_File_Name);
-
-      Fill_Buffer (1, Buffer'Length - 2);
-
-      for J in 1 .. Buffer_Count loop
-         Write (File_In, Buffer);
-
-         Fill_Buffer (J, Density);
-      end loop;
-
-      --  fill remain size.
-
-      Write
-        (File_In,
-         Buffer
-           (1 .. Stream_Element_Offset
-                   (File_Size - Buffer'Length * Buffer_Count)));
-
-      Flush (File_In);
-      Close (File_In);
-   end Generate_File;
-
-   ---------------------
-   -- Print_Statistic --
-   ---------------------
-
-   procedure Print_Statistic (Msg : String; Data_Size : ZLib.Count) is
-      use Ada.Calendar;
-      use Ada.Text_IO;
-
-      package Count_IO is new Integer_IO (ZLib.Count);
-
-      Curr_Dur : Duration := Clock - Time_Stamp;
-   begin
-      Put (Msg);
-
-      Set_Col (20);
-      Ada.Text_IO.Put ("size =");
-
-      Count_IO.Put
-        (Data_Size,
-         Width => Stream_IO.Count'Image (File_Size)'Length);
-
-      Put_Line (" duration =" & Duration'Image (Curr_Dur));
-   end Print_Statistic;
-
-   -----------
-   -- Stamp --
-   -----------
-
-   procedure Stamp is
-   begin
-      Time_Stamp := Ada.Calendar.Clock;
-   end Stamp;
-
-begin
-   Ada.Text_IO.Put_Line ("ZLib " & ZLib.Version);
-
-   loop
-      Generate_File;
-
-      for Level in ZLib.Compression_Level'Range loop
-
-         Ada.Text_IO.Put_Line ("Level ="
-            & ZLib.Compression_Level'Image (Level));
-
-         --  Test generic interface.
-         Open   (File_In, In_File, In_File_Name);
-         Create (File_Out, Out_File, Z_File_Name);
-
-         Stamp;
-
-         --  Deflate using generic instantiation.
-
-         ZLib.Deflate_Init
-               (Filter   => Filter,
-                Level    => Level,
-                Strategy => Strategy,
-                Header   => Header);
-
-         Translate (Filter);
-         Print_Statistic ("Generic compress", ZLib.Total_Out (Filter));
-         ZLib.Close (Filter);
-
-         Close (File_In);
-         Close (File_Out);
-
-         Open   (File_In, In_File, Z_File_Name);
-         Create (File_Out, Out_File, Out_File_Name);
-
-         Stamp;
-
-         --  Inflate using generic instantiation.
-
-         ZLib.Inflate_Init (Filter, Header => Header);
-
-         Translate (Filter);
-         Print_Statistic ("Generic decompress", ZLib.Total_Out (Filter));
-
-         ZLib.Close (Filter);
-
-         Close (File_In);
-         Close (File_Out);
-
-         Compare_Files (In_File_Name, Out_File_Name);
-
-         --  Test stream interface.
-
-         --  Compress to the back stream.
-
-         Open   (File_In, In_File, In_File_Name);
-         Create (File_Back, Out_File, Z_File_Name);
-
-         Stamp;
-
-         ZLib.Streams.Create
-           (Stream          => File_Z,
-            Mode            => ZLib.Streams.Out_Stream,
-            Back            => ZLib.Streams.Stream_Access
-                                 (Stream (File_Back)),
-            Back_Compressed => True,
-            Level           => Level,
-            Strategy        => Strategy,
-            Header          => Header);
-
-         Copy_Streams
-           (Source => Stream (File_In).all,
-            Target => File_Z);
-
-         --  Flushing internal buffers to the back stream.
-
-         ZLib.Streams.Flush (File_Z, ZLib.Finish);
-
-         Print_Statistic ("Write compress",
-                          ZLib.Streams.Write_Total_Out (File_Z));
-
-         ZLib.Streams.Close (File_Z);
-
-         Close (File_In);
-         Close (File_Back);
-
-         --  Compare reading from original file and from
-         --  decompression stream.
-
-         Open (File_In,   In_File, In_File_Name);
-         Open (File_Back, In_File, Z_File_Name);
-
-         ZLib.Streams.Create
-           (Stream          => File_Z,
-            Mode            => ZLib.Streams.In_Stream,
-            Back            => ZLib.Streams.Stream_Access
-                                 (Stream (File_Back)),
-            Back_Compressed => True,
-            Header          => Header);
-
-         Stamp;
-         Compare_Streams (Stream (File_In).all, File_Z);
-
-         Print_Statistic ("Read decompress",
-                          ZLib.Streams.Read_Total_Out (File_Z));
-
-         ZLib.Streams.Close (File_Z);
-         Close (File_In);
-         Close (File_Back);
-
-         --  Compress by reading from compression stream.
-
-         Open (File_Back, In_File, In_File_Name);
-         Create (File_Out, Out_File, Z_File_Name);
-
-         ZLib.Streams.Create
-           (Stream          => File_Z,
-            Mode            => ZLib.Streams.In_Stream,
-            Back            => ZLib.Streams.Stream_Access
-                                 (Stream (File_Back)),
-            Back_Compressed => False,
-            Level           => Level,
-            Strategy        => Strategy,
-            Header          => Header);
-
-         Stamp;
-         Copy_Streams
-           (Source => File_Z,
-            Target => Stream (File_Out).all);
-
-         Print_Statistic ("Read compress",
-                          ZLib.Streams.Read_Total_Out (File_Z));
-
-         ZLib.Streams.Close (File_Z);
-
-         Close (File_Out);
-         Close (File_Back);
-
-         --  Decompress to decompression stream.
-
-         Open   (File_In,   In_File, Z_File_Name);
-         Create (File_Back, Out_File, Out_File_Name);
-
-         ZLib.Streams.Create
-           (Stream          => File_Z,
-            Mode            => ZLib.Streams.Out_Stream,
-            Back            => ZLib.Streams.Stream_Access
-                                 (Stream (File_Back)),
-            Back_Compressed => False,
-            Header          => Header);
-
-         Stamp;
-
-         Copy_Streams
-           (Source => Stream (File_In).all,
-            Target => File_Z);
-
-         Print_Statistic ("Write decompress",
-                          ZLib.Streams.Write_Total_Out (File_Z));
-
-         ZLib.Streams.Close (File_Z);
-         Close (File_In);
-         Close (File_Back);
-
-         Compare_Files (In_File_Name, Out_File_Name);
-      end loop;
-
-      Ada.Text_IO.Put_Line (Count'Image (File_Size) & " Ok.");
-
-      exit when not Continuous;
-
-      File_Size := File_Size + 1;
-   end loop;
-end Test;
Index: trunk/minix/lib/zlib-1.2.3/contrib/ada/zlib-streams.adb
===================================================================
--- trunk/minix/lib/zlib-1.2.3/contrib/ada/zlib-streams.adb	(revision 9)
+++ 	(revision )
@@ -1,225 +1,0 @@
-----------------------------------------------------------------
---  ZLib for Ada thick binding.                               --
---                                                            --
---  Copyright (C) 2002-2003 Dmitriy Anisimkov                 --
---                                                            --
---  Open source license information is in the zlib.ads file.  --
-----------------------------------------------------------------
-
---  $Id: zlib-streams.adb,v 1.1 2005/09/23 22:39:01 beng Exp $
-
-with Ada.Unchecked_Deallocation;
-
-package body ZLib.Streams is
-
-   -----------
-   -- Close --
-   -----------
-
-   procedure Close (Stream : in out Stream_Type) is
-      procedure Free is new Ada.Unchecked_Deallocation
-         (Stream_Element_Array, Buffer_Access);
-   begin
-      if Stream.Mode = Out_Stream or Stream.Mode = Duplex then
-         --  We should flush the data written by the writer.
-
-         Flush (Stream, Finish);
-
-         Close (Stream.Writer);
-      end if;
-
-      if Stream.Mode = In_Stream or Stream.Mode = Duplex then
-         Close (Stream.Reader);
-         Free (Stream.Buffer);
-      end if;
-   end Close;
-
-   ------------
-   -- Create --
-   ------------
-
-   procedure Create
-     (Stream            :    out Stream_Type;
-      Mode              : in     Stream_Mode;
-      Back              : in     Stream_Access;
-      Back_Compressed   : in     Boolean;
-      Level             : in     Compression_Level := Default_Compression;
-      Strategy          : in     Strategy_Type     := Default_Strategy;
-      Header            : in     Header_Type       := Default;
-      Read_Buffer_Size  : in     Ada.Streams.Stream_Element_Offset
-                                    := Default_Buffer_Size;
-      Write_Buffer_Size : in     Ada.Streams.Stream_Element_Offset
-                                    := Default_Buffer_Size)
-   is
-
-      subtype Buffer_Subtype is Stream_Element_Array (1 .. Read_Buffer_Size);
-
-      procedure Init_Filter
-         (Filter   : in out Filter_Type;
-          Compress : in     Boolean);
-
-      -----------------
-      -- Init_Filter --
-      -----------------
-
-      procedure Init_Filter
-         (Filter   : in out Filter_Type;
-          Compress : in     Boolean) is
-      begin
-         if Compress then
-            Deflate_Init
-              (Filter, Level, Strategy, Header => Header);
-         else
-            Inflate_Init (Filter, Header => Header);
-         end if;
-      end Init_Filter;
-
-   begin
-      Stream.Back := Back;
-      Stream.Mode := Mode;
-
-      if Mode = Out_Stream or Mode = Duplex then
-         Init_Filter (Stream.Writer, Back_Compressed);
-         Stream.Buffer_Size := Write_Buffer_Size;
-      else
-         Stream.Buffer_Size := 0;
-      end if;
-
-      if Mode = In_Stream or Mode = Duplex then
-         Init_Filter (Stream.Reader, not Back_Compressed);
-
-         Stream.Buffer     := new Buffer_Subtype;
-         Stream.Rest_First := Stream.Buffer'Last + 1;
-         Stream.Rest_Last  := Stream.Buffer'Last;
-      end if;
-   end Create;
-
-   -----------
-   -- Flush --
-   -----------
-
-   procedure Flush
-     (Stream : in out Stream_Type;
-      Mode   : in     Flush_Mode := Sync_Flush)
-   is
-      Buffer : Stream_Element_Array (1 .. Stream.Buffer_Size);
-      Last   : Stream_Element_Offset;
-   begin
-      loop
-         Flush (Stream.Writer, Buffer, Last, Mode);
-
-         Ada.Streams.Write (Stream.Back.all, Buffer (1 .. Last));
-
-         exit when Last < Buffer'Last;
-      end loop;
-   end Flush;
-
-   -------------
-   -- Is_Open --
-   -------------
-
-   function Is_Open (Stream : Stream_Type) return Boolean is
-   begin
-      return Is_Open (Stream.Reader) or else Is_Open (Stream.Writer);
-   end Is_Open;
-
-   ----------
-   -- Read --
-   ----------
-
-   procedure Read
-     (Stream : in out Stream_Type;
-      Item   :    out Stream_Element_Array;
-      Last   :    out Stream_Element_Offset)
-   is
-
-      procedure Read
-        (Item : out Stream_Element_Array;
-         Last : out Stream_Element_Offset);
-
-      ----------
-      -- Read --
-      ----------
-
-      procedure Read
-        (Item : out Stream_Element_Array;
-         Last : out Stream_Element_Offset) is
-      begin
-         Ada.Streams.Read (Stream.Back.all, Item, Last);
-      end Read;
-
-      procedure Read is new ZLib.Read
-         (Read       => Read,
-          Buffer     => Stream.Buffer.all,
-          Rest_First => Stream.Rest_First,
-          Rest_Last  => Stream.Rest_Last);
-
-   begin
-      Read (Stream.Reader, Item, Last);
-   end Read;
-
-   -------------------
-   -- Read_Total_In --
-   -------------------
-
-   function Read_Total_In (Stream : in Stream_Type) return Count is
-   begin
-      return Total_In (Stream.Reader);
-   end Read_Total_In;
-
-   --------------------
-   -- Read_Total_Out --
-   --------------------
-
-   function Read_Total_Out (Stream : in Stream_Type) return Count is
-   begin
-      return Total_Out (Stream.Reader);
-   end Read_Total_Out;
-
-   -----------
-   -- Write --
-   -----------
-
-   procedure Write
-     (Stream : in out Stream_Type;
-      Item   : in     Stream_Element_Array)
-   is
-
-      procedure Write (Item : in Stream_Element_Array);
-
-      -----------
-      -- Write --
-      -----------
-
-      procedure Write (Item : in Stream_Element_Array) is
-      begin
-         Ada.Streams.Write (Stream.Back.all, Item);
-      end Write;
-
-      procedure Write is new ZLib.Write
-         (Write       => Write,
-          Buffer_Size => Stream.Buffer_Size);
-
-   begin
-      Write (Stream.Writer, Item, No_Flush);
-   end Write;
-
-   --------------------
-   -- Write_Total_In --
-   --------------------
-
-   function Write_Total_In (Stream : in Stream_Type) return Count is
-   begin
-      return Total_In (Stream.Writer);
-   end Write_Total_In;
-
-   ---------------------
-   -- Write_Total_Out --
-   ---------------------
-
-   function Write_Total_Out (Stream : in Stream_Type) return Count is
-   begin
-      return Total_Out (Stream.Writer);
-   end Write_Total_Out;
-
-end ZLib.Streams;
Index: trunk/minix/lib/zlib-1.2.3/contrib/ada/zlib-streams.ads
===================================================================
--- trunk/minix/lib/zlib-1.2.3/contrib/ada/zlib-streams.ads	(revision 9)
+++ 	(revision )
@@ -1,114 +1,0 @@
-----------------------------------------------------------------
---  ZLib for Ada thick binding.                               --
---                                                            --
---  Copyright (C) 2002-2003 Dmitriy Anisimkov                 --
---                                                            --
---  Open source license information is in the zlib.ads file.  --
-----------------------------------------------------------------
-
---  $Id: zlib-streams.ads,v 1.1 2005/09/23 22:39:01 beng Exp $
-
-package ZLib.Streams is
-
-   type Stream_Mode is (In_Stream, Out_Stream, Duplex);
-
-   type Stream_Access is access all Ada.Streams.Root_Stream_Type'Class;
-
-   type Stream_Type is
-      new Ada.Streams.Root_Stream_Type with private;
-
-   procedure Read
-     (Stream : in out Stream_Type;
-      Item   :    out Ada.Streams.Stream_Element_Array;
-      Last   :    out Ada.Streams.Stream_Element_Offset);
-
-   procedure Write
-     (Stream : in out Stream_Type;
-      Item   : in     Ada.Streams.Stream_Element_Array);
-
-   procedure Flush
-     (Stream : in out Stream_Type;
-      Mode   : in     Flush_Mode := Sync_Flush);
-   --  Flush the written data to the back stream,
-   --  all data placed to the compressor is flushing to the Back stream.
-   --  Should not be used untill necessary, becouse it is decreasing
-   --  compression.
-
-   function Read_Total_In (Stream : in Stream_Type) return Count;
-   pragma Inline (Read_Total_In);
-   --  Return total number of bytes read from back stream so far.
-
-   function Read_Total_Out (Stream : in Stream_Type) return Count;
-   pragma Inline (Read_Total_Out);
-   --  Return total number of bytes read so far.
-
-   function Write_Total_In (Stream : in Stream_Type) return Count;
-   pragma Inline (Write_Total_In);
-   --  Return total number of bytes written so far.
-
-   function Write_Total_Out (Stream : in Stream_Type) return Count;
-   pragma Inline (Write_Total_Out);
-   --  Return total number of bytes written to the back stream.
-
-   procedure Create
-     (Stream            :    out Stream_Type;
-      Mode              : in     Stream_Mode;
-      Back              : in     Stream_Access;
-      Back_Compressed   : in     Boolean;
-      Level             : in     Compression_Level := Default_Compression;
-      Strategy          : in     Strategy_Type     := Default_Strategy;
-      Header            : in     Header_Type       := Default;
-      Read_Buffer_Size  : in     Ada.Streams.Stream_Element_Offset
-                                    := Default_Buffer_Size;
-      Write_Buffer_Size : in     Ada.Streams.Stream_Element_Offset
-                                    := Default_Buffer_Size);
-   --  Create the Comression/Decompression stream.
-   --  If mode is In_Stream then Write operation is disabled.
-   --  If mode is Out_Stream then Read operation is disabled.
-
-   --  If Back_Compressed is true then
-   --  Data written to the Stream is compressing to the Back stream
-   --  and data read from the Stream is decompressed data from the Back stream.
-
-   --  If Back_Compressed is false then
-   --  Data written to the Stream is decompressing to the Back stream
-   --  and data read from the Stream is compressed data from the Back stream.
-
-   --  !!! When the Need_Header is False ZLib-Ada is using undocumented
-   --  ZLib 1.1.4 functionality to do not create/wait for ZLib headers.
-
-   function Is_Open (Stream : Stream_Type) return Boolean;
-
-   procedure Close (Stream : in out Stream_Type);
-
-private
-
-   use Ada.Streams;
-
-   type Buffer_Access is access all Stream_Element_Array;
-
-   type Stream_Type
-     is new Root_Stream_Type with
-   record
-      Mode       : Stream_Mode;
-
-      Buffer     : Buffer_Access;
-      Rest_First : Stream_Element_Offset;
-      Rest_Last  : Stream_Element_Offset;
-      --  Buffer for Read operation.
-      --  We need to have this buffer in the record
-      --  becouse not all read data from back stream
-      --  could be processed during the read operation.
-
-      Buffer_Size : Stream_Element_Offset;
-      --  Buffer size for write operation.
-      --  We do not need to have this buffer
-      --  in the record becouse all data could be
-      --  processed in the write operation.
-
-      Back       : Stream_Access;
-      Reader     : Filter_Type;
-      Writer     : Filter_Type;
-   end record;
-
-end ZLib.Streams;
Index: trunk/minix/lib/zlib-1.2.3/contrib/ada/zlib-thin.adb
===================================================================
--- trunk/minix/lib/zlib-1.2.3/contrib/ada/zlib-thin.adb	(revision 9)
+++ 	(revision )
@@ -1,141 +1,0 @@
-----------------------------------------------------------------
---  ZLib for Ada thick binding.                               --
---                                                            --
---  Copyright (C) 2002-2003 Dmitriy Anisimkov                 --
---                                                            --
---  Open source license information is in the zlib.ads file.  --
-----------------------------------------------------------------
-
---  $Id: zlib-thin.adb,v 1.1 2005/09/23 22:39:01 beng Exp $
-
-package body ZLib.Thin is
-
-   ZLIB_VERSION  : constant Chars_Ptr := zlibVersion;
-
-   Z_Stream_Size : constant Int := Z_Stream'Size / System.Storage_Unit;
-
-   --------------
-   -- Avail_In --
-   --------------
-
-   function Avail_In (Strm : in Z_Stream) return UInt is
-   begin
-      return Strm.Avail_In;
-   end Avail_In;
-
-   ---------------
-   -- Avail_Out --
-   ---------------
-
-   function Avail_Out (Strm : in Z_Stream) return UInt is
-   begin
-      return Strm.Avail_Out;
-   end Avail_Out;
-
-   ------------------
-   -- Deflate_Init --
-   ------------------
-
-   function Deflate_Init
-     (strm       : Z_Streamp;
-      level      : Int;
-      method     : Int;
-      windowBits : Int;
-      memLevel   : Int;
-      strategy   : Int)
-      return       Int is
-   begin
-      return deflateInit2
-               (strm,
-                level,
-                method,
-                windowBits,
-                memLevel,
-                strategy,
-                ZLIB_VERSION,
-                Z_Stream_Size);
-   end Deflate_Init;
-
-   ------------------
-   -- Inflate_Init --
-   ------------------
-
-   function Inflate_Init (strm : Z_Streamp; windowBits : Int) return Int is
-   begin
-      return inflateInit2 (strm, windowBits, ZLIB_VERSION, Z_Stream_Size);
-   end Inflate_Init;
-
-   ------------------------
-   -- Last_Error_Message --
-   ------------------------
-
-   function Last_Error_Message (Strm : in Z_Stream) return String is
-      use Interfaces.C.Strings;
-   begin
-      if Strm.msg = Null_Ptr then
-         return "";
-      else
-         return Value (Strm.msg);
-      end if;
-   end Last_Error_Message;
-
-   ------------
-   -- Set_In --
-   ------------
-
-   procedure Set_In
-     (Strm   : in out Z_Stream;
-      Buffer : in     Voidp;
-      Size   : in     UInt) is
-   begin
-      Strm.Next_In  := Buffer;
-      Strm.Avail_In := Size;
-   end Set_In;
-
-   ------------------
-   -- Set_Mem_Func --
-   ------------------
-
-   procedure Set_Mem_Func
-     (Strm   : in out Z_Stream;
-      Opaque : in     Voidp;
-      Alloc  : in     alloc_func;
-      Free   : in     free_func) is
-   begin
-      Strm.opaque := Opaque;
-      Strm.zalloc := Alloc;
-      Strm.zfree  := Free;
-   end Set_Mem_Func;
-
-   -------------
-   -- Set_Out --
-   -------------
-
-   procedure Set_Out
-     (Strm   : in out Z_Stream;
-      Buffer : in     Voidp;
-      Size   : in     UInt) is
-   begin
-      Strm.Next_Out  := Buffer;
-      Strm.Avail_Out := Size;
-   end Set_Out;
-
-   --------------
-   -- Total_In --
-   --------------
-
-   function Total_In (Strm : in Z_Stream) return ULong is
-   begin
-      return Strm.Total_In;
-   end Total_In;
-
-   ---------------
-   -- Total_Out --
-   ---------------
-
-   function Total_Out (Strm : in Z_Stream) return ULong is
-   begin
-      return Strm.Total_Out;
-   end Total_Out;
-
-end ZLib.Thin;
Index: trunk/minix/lib/zlib-1.2.3/contrib/ada/zlib-thin.ads
===================================================================
--- trunk/minix/lib/zlib-1.2.3/contrib/ada/zlib-thin.ads	(revision 9)
+++ 	(revision )
@@ -1,450 +1,0 @@
-----------------------------------------------------------------
---  ZLib for Ada thick binding.                               --
---                                                            --
---  Copyright (C) 2002-2003 Dmitriy Anisimkov                 --
---                                                            --
---  Open source license information is in the zlib.ads file.  --
-----------------------------------------------------------------
-
---  $Id: zlib-thin.ads,v 1.1 2005/09/23 22:39:01 beng Exp $
-
-with Interfaces.C.Strings;
-
-with System;
-
-private package ZLib.Thin is
-
-   --  From zconf.h
-
-   MAX_MEM_LEVEL : constant := 9;         --  zconf.h:105
-                                          --  zconf.h:105
-   MAX_WBITS : constant := 15;      --  zconf.h:115
-                                    --  32K LZ77 window
-                                    --  zconf.h:115
-   SEEK_SET : constant := 8#0000#;  --  zconf.h:244
-                                    --  Seek from beginning of file.
-                                    --  zconf.h:244
-   SEEK_CUR : constant := 1;        --  zconf.h:245
-                                    --  Seek from current position.
-                                    --  zconf.h:245
-   SEEK_END : constant := 2;        --  zconf.h:246
-                                    --  Set file pointer to EOF plus "offset"
-                                    --  zconf.h:246
-
-   type Byte is new Interfaces.C.unsigned_char; --  8 bits
-                                                --  zconf.h:214
-   type UInt is new Interfaces.C.unsigned;      --  16 bits or more
-                                                --  zconf.h:216
-   type Int is new Interfaces.C.int;
-
-   type ULong is new Interfaces.C.unsigned_long;     --  32 bits or more
-                                                     --  zconf.h:217
-   subtype Chars_Ptr is Interfaces.C.Strings.chars_ptr;
-
-   type ULong_Access is access ULong;
-   type Int_Access is access Int;
-
-   subtype Voidp is System.Address;            --  zconf.h:232
-
-   subtype Byte_Access is Voidp;
-
-   Nul : constant Voidp := System.Null_Address;
-   --  end from zconf
-
-   Z_NO_FLUSH : constant := 8#0000#;   --  zlib.h:125
-                                       --  zlib.h:125
-   Z_PARTIAL_FLUSH : constant := 1;       --  zlib.h:126
-                                          --  will be removed, use
-                                          --  Z_SYNC_FLUSH instead
-                                          --  zlib.h:126
-   Z_SYNC_FLUSH : constant := 2;       --  zlib.h:127
-                                       --  zlib.h:127
-   Z_FULL_FLUSH : constant := 3;       --  zlib.h:128
-                                       --  zlib.h:128
-   Z_FINISH : constant := 4;        --  zlib.h:129
-                                    --  zlib.h:129
-   Z_OK : constant := 8#0000#;   --  zlib.h:132
-                                 --  zlib.h:132
-   Z_STREAM_END : constant := 1;       --  zlib.h:133
-                                       --  zlib.h:133
-   Z_NEED_DICT : constant := 2;        --  zlib.h:134
-                                       --  zlib.h:134
-   Z_ERRNO : constant := -1;        --  zlib.h:135
-                                    --  zlib.h:135
-   Z_STREAM_ERROR : constant := -2;       --  zlib.h:136
-                                          --  zlib.h:136
-   Z_DATA_ERROR : constant := -3;      --  zlib.h:137
-                                       --  zlib.h:137
-   Z_MEM_ERROR : constant := -4;       --  zlib.h:138
-                                       --  zlib.h:138
-   Z_BUF_ERROR : constant := -5;       --  zlib.h:139
-                                       --  zlib.h:139
-   Z_VERSION_ERROR : constant := -6;      --  zlib.h:140
-                                          --  zlib.h:140
-   Z_NO_COMPRESSION : constant := 8#0000#;   --  zlib.h:145
-                                             --  zlib.h:145
-   Z_BEST_SPEED : constant := 1;       --  zlib.h:146
-                                       --  zlib.h:146
-   Z_BEST_COMPRESSION : constant := 9;       --  zlib.h:147
-                                             --  zlib.h:147
-   Z_DEFAULT_COMPRESSION : constant := -1;      --  zlib.h:148
-                                                --  zlib.h:148
-   Z_FILTERED : constant := 1;      --  zlib.h:151
-                                    --  zlib.h:151
-   Z_HUFFMAN_ONLY : constant := 2;        --  zlib.h:152
-                                          --  zlib.h:152
-   Z_DEFAULT_STRATEGY : constant := 8#0000#; --  zlib.h:153
-                                             --  zlib.h:153
-   Z_BINARY : constant := 8#0000#;  --  zlib.h:156
-                                    --  zlib.h:156
-   Z_ASCII : constant := 1;      --  zlib.h:157
-                                 --  zlib.h:157
-   Z_UNKNOWN : constant := 2;       --  zlib.h:158
-                                    --  zlib.h:158
-   Z_DEFLATED : constant := 8;      --  zlib.h:161
-                                    --  zlib.h:161
-   Z_NULL : constant := 8#0000#; --  zlib.h:164
-                                 --  for initializing zalloc, zfree, opaque
-                                 --  zlib.h:164
-   type gzFile is new Voidp;                  --  zlib.h:646
-
-   type Z_Stream is private;
-
-   type Z_Streamp is access all Z_Stream;     --  zlib.h:89
-
-   type alloc_func is access function
-     (Opaque : Voidp;
-      Items  : UInt;
-      Size   : UInt)
-      return Voidp; --  zlib.h:63
-
-   type free_func is access procedure (opaque : Voidp; address : Voidp);
-
-   function zlibVersion return Chars_Ptr;
-
-   function Deflate (strm : Z_Streamp; flush : Int) return Int;
-
-   function DeflateEnd (strm : Z_Streamp) return Int;
-
-   function Inflate (strm : Z_Streamp; flush : Int) return Int;
-
-   function InflateEnd (strm : Z_Streamp) return Int;
-
-   function deflateSetDictionary
-     (strm       : Z_Streamp;
-      dictionary : Byte_Access;
-      dictLength : UInt)
-      return       Int;
-
-   function deflateCopy (dest : Z_Streamp; source : Z_Streamp) return Int;
-   --  zlib.h:478
-
-   function deflateReset (strm : Z_Streamp) return Int; -- zlib.h:495
-
-   function deflateParams
-     (strm     : Z_Streamp;
-      level    : Int;
-      strategy : Int)
-      return     Int;       -- zlib.h:506
-
-   function inflateSetDictionary
-     (strm       : Z_Streamp;
-      dictionary : Byte_Access;
-      dictLength : UInt)
-      return       Int; --  zlib.h:548
-
-   function inflateSync (strm : Z_Streamp) return Int;  --  zlib.h:565
-
-   function inflateReset (strm : Z_Streamp) return Int; --  zlib.h:580
-
-   function compress
-     (dest      : Byte_Access;
-      destLen   : ULong_Access;
-      source    : Byte_Access;
-      sourceLen : ULong)
-      return      Int;           -- zlib.h:601
-
-   function compress2
-     (dest      : Byte_Access;
-      destLen   : ULong_Access;
-      source    : Byte_Access;
-      sourceLen : ULong;
-      level     : Int)
-      return      Int;          -- zlib.h:615
-
-   function uncompress
-     (dest      : Byte_Access;
-      destLen   : ULong_Access;
-      source    : Byte_Access;
-      sourceLen : ULong)
-      return      Int;
-
-   function gzopen (path : Chars_Ptr; mode : Chars_Ptr) return gzFile;
-
-   function gzdopen (fd : Int; mode : Chars_Ptr) return gzFile;
-
-   function gzsetparams
-     (file     : gzFile;
-      level    : Int;
-      strategy : Int)
-      return     Int;
-
-   function gzread
-     (file : gzFile;
-      buf  : Voidp;
-      len  : UInt)
-      return Int;
-
-   function gzwrite
-     (file : in gzFile;
-      buf  : in Voidp;
-      len  : in UInt)
-      return Int;
-
-   function gzprintf (file : in gzFile; format : in Chars_Ptr) return Int;
-
-   function gzputs (file : in gzFile; s : in Chars_Ptr) return Int;
-
-   function gzgets
-     (file : gzFile;
-      buf  : Chars_Ptr;
-      len  : Int)
-      return Chars_Ptr;
-
-   function gzputc (file : gzFile; char : Int) return Int;
-
-   function gzgetc (file : gzFile) return Int;
-
-   function gzflush (file : gzFile; flush : Int) return Int;
-
-   function gzseek
-     (file   : gzFile;
-      offset : Int;
-      whence : Int)
-      return   Int;
-
-   function gzrewind (file : gzFile) return Int;
-
-   function gztell (file : gzFile) return Int;
-
-   function gzeof (file : gzFile) return Int;
-
-   function gzclose (file : gzFile) return Int;
-
-   function gzerror (file : gzFile; errnum : Int_Access) return Chars_Ptr;
-
-   function adler32
-     (adler : ULong;
-      buf   : Byte_Access;
-      len   : UInt)
-      return  ULong;
-
-   function crc32
-     (crc  : ULong;
-      buf  : Byte_Access;
-      len  : UInt)
-      return ULong;
-
-   function deflateInit
-     (strm        : Z_Streamp;
-      level       : Int;
-      version     : Chars_Ptr;
-      stream_size : Int)
-      return        Int;
-
-   function deflateInit2
-     (strm        : Z_Streamp;
-      level       : Int;
-      method      : Int;
-      windowBits  : Int;
-      memLevel    : Int;
-      strategy    : Int;
-      version     : Chars_Ptr;
-      stream_size : Int)
-      return        Int;
-
-   function Deflate_Init
-     (strm       : Z_Streamp;
-      level      : Int;
-      method     : Int;
-      windowBits : Int;
-      memLevel   : Int;
-      strategy   : Int)
-      return       Int;
-   pragma Inline (Deflate_Init);
-
-   function inflateInit
-     (strm        : Z_Streamp;
-      version     : Chars_Ptr;
-      stream_size : Int)
-      return        Int;
-
-   function inflateInit2
-     (strm        : in Z_Streamp;
-      windowBits  : in Int;
-      version     : in Chars_Ptr;
-      stream_size : in Int)
-      return      Int;
-
-   function inflateBackInit
-     (strm        : in Z_Streamp;
-      windowBits  : in Int;
-      window      : in Byte_Access;
-      version     : in Chars_Ptr;
-      stream_size : in Int)
-      return      Int;
-   --  Size of window have to be 2**windowBits.
-
-   function Inflate_Init (strm : Z_Streamp; windowBits : Int) return Int;
-   pragma Inline (Inflate_Init);
-
-   function zError (err : Int) return Chars_Ptr;
-
-   function inflateSyncPoint (z : Z_Streamp) return Int;
-
-   function get_crc_table return ULong_Access;
-
-   --  Interface to the available fields of the z_stream structure.
-   --  The application must update next_in and avail_in when avail_in has
-   --  dropped to zero. It must update next_out and avail_out when avail_out
-   --  has dropped to zero. The application must initialize zalloc, zfree and
-   --  opaque before calling the init function.
-
-   procedure Set_In
-     (Strm   : in out Z_Stream;
-      Buffer : in Voidp;
-      Size   : in UInt);
-   pragma Inline (Set_In);
-
-   procedure Set_Out
-     (Strm   : in out Z_Stream;
-      Buffer : in Voidp;
-      Size   : in UInt);
-   pragma Inline (Set_Out);
-
-   procedure Set_Mem_Func
-     (Strm   : in out Z_Stream;
-      Opaque : in Voidp;
-      Alloc  : in alloc_func;
-      Free   : in free_func);
-   pragma Inline (Set_Mem_Func);
-
-   function Last_Error_Message (Strm : in Z_Stream) return String;
-   pragma Inline (Last_Error_Message);
-
-   function Avail_Out (Strm : in Z_Stream) return UInt;
-   pragma Inline (Avail_Out);
-
-   function Avail_In (Strm : in Z_Stream) return UInt;
-   pragma Inline (Avail_In);
-
-   function Total_In (Strm : in Z_Stream) return ULong;
-   pragma Inline (Total_In);
-
-   function Total_Out (Strm : in Z_Stream) return ULong;
-   pragma Inline (Total_Out);
-
-   function inflateCopy
-     (dest   : in Z_Streamp;
-      Source : in Z_Streamp)
-      return Int;
-
-   function compressBound (Source_Len : in ULong) return ULong;
-
-   function deflateBound
-     (Strm       : in Z_Streamp;
-      Source_Len : in ULong)
-      return     ULong;
-
-   function gzungetc (C : in Int; File : in  gzFile) return Int;
-
-   function zlibCompileFlags return ULong;
-
-private
-
-   type Z_Stream is record            -- zlib.h:68
-      Next_In   : Voidp      := Nul;  -- next input byte
-      Avail_In  : UInt       := 0;    -- number of bytes available at next_in
-      Total_In  : ULong      := 0;    -- total nb of input bytes read so far
-      Next_Out  : Voidp      := Nul;  -- next output byte should be put there
-      Avail_Out : UInt       := 0;    -- remaining free space at next_out
-      Total_Out : ULong      := 0;    -- total nb of bytes output so far
-      msg       : Chars_Ptr;          -- last error message, NULL if no error
-      state     : Voidp;              -- not visible by applications
-      zalloc    : alloc_func := null; -- used to allocate the internal state
-      zfree     : free_func  := null; -- used to free the internal state
-      opaque    : Voidp;              -- private data object passed to
-                                      --  zalloc and zfree
-      data_type : Int;                -- best guess about the data type:
-                                      --  ascii or binary
-      adler     : ULong;              -- adler32 value of the uncompressed
-                                      --  data
-      reserved  : ULong;              -- reserved for future use
-   end record;
-
-   pragma Convention (C, Z_Stream);
-
-   pragma Import (C, zlibVersion, "zlibVersion");
-   pragma Import (C, Deflate, "deflate");
-   pragma Import (C, DeflateEnd, "deflateEnd");
-   pragma Import (C, Inflate, "inflate");
-   pragma Import (C, InflateEnd, "inflateEnd");
-   pragma Import (C, deflateSetDictionary, "deflateSetDictionary");
-   pragma Import (C, deflateCopy, "deflateCopy");
-   pragma Import (C, deflateReset, "deflateReset");
-   pragma Import (C, deflateParams, "deflateParams");
-   pragma Import (C, inflateSetDictionary, "inflateSetDictionary");
-   pragma Import (C, inflateSync, "inflateSync");
-   pragma Import (C, inflateReset, "inflateReset");
-   pragma Import (C, compress, "compress");
-   pragma Import (C, compress2, "compress2");
-   pragma Import (C, uncompress, "uncompress");
-   pragma Import (C, gzopen, "gzopen");
-   pragma Import (C, gzdopen, "gzdopen");
-   pragma Import (C, gzsetparams, "gzsetparams");
-   pragma Import (C, gzread, "gzread");
-   pragma Import (C, gzwrite, "gzwrite");
-   pragma Import (C, gzprintf, "gzprintf");
-   pragma Import (C, gzputs, "gzputs");
-   pragma Import (C, gzgets, "gzgets");
-   pragma Import (C, gzputc, "gzputc");
-   pragma Import (C, gzgetc, "gzgetc");
-   pragma Import (C, gzflush, "gzflush");
-   pragma Import (C, gzseek, "gzseek");
-   pragma Import (C, gzrewind, "gzrewind");
-   pragma Import (C, gztell, "gztell");
-   pragma Import (C, gzeof, "gzeof");
-   pragma Import (C, gzclose, "gzclose");
-   pragma Import (C, gzerror, "gzerror");
-   pragma Import (C, adler32, "adler32");
-   pragma Import (C, crc32, "crc32");
-   pragma Import (C, deflateInit, "deflateInit_");
-   pragma Import (C, inflateInit, "inflateInit_");
-   pragma Import (C, deflateInit2, "deflateInit2_");
-   pragma Import (C, inflateInit2, "inflateInit2_");
-   pragma Import (C, zError, "zError");
-   pragma Import (C, inflateSyncPoint, "inflateSyncPoint");
-   pragma Import (C, get_crc_table, "get_crc_table");
-
-   --  since zlib 1.2.0:
-
-   pragma Import (C, inflateCopy, "inflateCopy");
-   pragma Import (C, compressBound, "compressBound");
-   pragma Import (C, deflateBound, "deflateBound");
-   pragma Import (C, gzungetc, "gzungetc");
-   pragma Import (C, zlibCompileFlags, "zlibCompileFlags");
-
-   pragma Import (C, inflateBackInit, "inflateBackInit_");
-
-   --  I stopped binding the inflateBack routines, becouse realize that
-   --  it does not support zlib and gzip headers for now, and have no
-   --  symmetric deflateBack routines.
-   --  ZLib-Ada is symmetric regarding deflate/inflate data transformation
-   --  and has a similar generic callback interface for the
-   --  deflate/inflate transformation based on the regular Deflate/Inflate
-   --  routines.
-
-   --  pragma Import (C, inflateBack, "inflateBack");
-   --  pragma Import (C, inflateBackEnd, "inflateBackEnd");
-
-end ZLib.Thin;
Index: trunk/minix/lib/zlib-1.2.3/contrib/ada/zlib.adb
===================================================================
--- trunk/minix/lib/zlib-1.2.3/contrib/ada/zlib.adb	(revision 9)
+++ 	(revision )
@@ -1,701 +1,0 @@
-----------------------------------------------------------------
---  ZLib for Ada thick binding.                               --
---                                                            --
---  Copyright (C) 2002-2004 Dmitriy Anisimkov                 --
---                                                            --
---  Open source license information is in the zlib.ads file.  --
-----------------------------------------------------------------
-
---  $Id: zlib.adb,v 1.1 2005/09/23 22:39:01 beng Exp $
-
-with Ada.Exceptions;
-with Ada.Unchecked_Conversion;
-with Ada.Unchecked_Deallocation;
-
-with Interfaces.C.Strings;
-
-with ZLib.Thin;
-
-package body ZLib is
-
-   use type Thin.Int;
-
-   type Z_Stream is new Thin.Z_Stream;
-
-   type Return_Code_Enum is
-      (OK,
-       STREAM_END,
-       NEED_DICT,
-       ERRNO,
-       STREAM_ERROR,
-       DATA_ERROR,
-       MEM_ERROR,
-       BUF_ERROR,
-       VERSION_ERROR);
-
-   type Flate_Step_Function is access
-     function (Strm : in Thin.Z_Streamp; Flush : in Thin.Int) return Thin.Int;
-   pragma Convention (C, Flate_Step_Function);
-
-   type Flate_End_Function is access
-      function (Ctrm : in Thin.Z_Streamp) return Thin.Int;
-   pragma Convention (C, Flate_End_Function);
-
-   type Flate_Type is record
-      Step : Flate_Step_Function;
-      Done : Flate_End_Function;
-   end record;
-
-   subtype Footer_Array is Stream_Element_Array (1 .. 8);
-
-   Simple_GZip_Header : constant Stream_Element_Array (1 .. 10)
-     := (16#1f#, 16#8b#,                 --  Magic header
-         16#08#,                         --  Z_DEFLATED
-         16#00#,                         --  Flags
-         16#00#, 16#00#, 16#00#, 16#00#, --  Time
-         16#00#,                         --  XFlags
-         16#03#                          --  OS code
-        );
-   --  The simplest gzip header is not for informational, but just for
-   --  gzip format compatibility.
-   --  Note that some code below is using assumption
-   --  Simple_GZip_Header'Last > Footer_Array'Last, so do not make
-   --  Simple_GZip_Header'Last <= Footer_Array'Last.
-
-   Return_Code : constant array (Thin.Int range <>) of Return_Code_Enum
-     := (0 => OK,
-         1 => STREAM_END,
-         2 => NEED_DICT,
-        -1 => ERRNO,
-        -2 => STREAM_ERROR,
-        -3 => DATA_ERROR,
-        -4 => MEM_ERROR,
-        -5 => BUF_ERROR,
-        -6 => VERSION_ERROR);
-
-   Flate : constant array (Boolean) of Flate_Type
-     := (True  => (Step => Thin.Deflate'Access,
-                   Done => Thin.DeflateEnd'Access),
-         False => (Step => Thin.Inflate'Access,
-                   Done => Thin.InflateEnd'Access));
-
-   Flush_Finish : constant array (Boolean) of Flush_Mode
-     := (True => Finish, False => No_Flush);
-
-   procedure Raise_Error (Stream : in Z_Stream);
-   pragma Inline (Raise_Error);
-
-   procedure Raise_Error (Message : in String);
-   pragma Inline (Raise_Error);
-
-   procedure Check_Error (Stream : in Z_Stream; Code : in Thin.Int);
-
-   procedure Free is new Ada.Unchecked_Deallocation
-      (Z_Stream, Z_Stream_Access);
-
-   function To_Thin_Access is new Ada.Unchecked_Conversion
-     (Z_Stream_Access, Thin.Z_Streamp);
-
-   procedure Translate_GZip
-     (Filter    : in out Filter_Type;
-      In_Data   : in     Ada.Streams.Stream_Element_Array;
-      In_Last   :    out Ada.Streams.Stream_Element_Offset;
-      Out_Data  :    out Ada.Streams.Stream_Element_Array;
-      Out_Last  :    out Ada.Streams.Stream_Element_Offset;
-      Flush     : in     Flush_Mode);
-   --  Separate translate routine for make gzip header.
-
-   procedure Translate_Auto
-     (Filter    : in out Filter_Type;
-      In_Data   : in     Ada.Streams.Stream_Element_Array;
-      In_Last   :    out Ada.Streams.Stream_Element_Offset;
-      Out_Data  :    out Ada.Streams.Stream_Element_Array;
-      Out_Last  :    out Ada.Streams.Stream_Element_Offset;
-      Flush     : in     Flush_Mode);
-   --  translate routine without additional headers.
-
-   -----------------
-   -- Check_Error --
-   -----------------
-
-   procedure Check_Error (Stream : in Z_Stream; Code : in Thin.Int) is
-      use type Thin.Int;
-   begin
-      if Code /= Thin.Z_OK then
-         Raise_Error
-            (Return_Code_Enum'Image (Return_Code (Code))
-              & ": " & Last_Error_Message (Stream));
-      end if;
-   end Check_Error;
-
-   -----------
-   -- Close --
-   -----------
-
-   procedure Close
-     (Filter       : in out Filter_Type;
-      Ignore_Error : in     Boolean := False)
-   is
-      Code : Thin.Int;
-   begin
-      if not Ignore_Error and then not Is_Open (Filter) then
-         raise Status_Error;
-      end if;
-
-      Code := Flate (Filter.Compression).Done (To_Thin_Access (Filter.Strm));
-
-      if Ignore_Error or else Code = Thin.Z_OK then
-         Free (Filter.Strm);
-      else
-         declare
-            Error_Message : constant String
-              := Last_Error_Message (Filter.Strm.all);
-         begin
-            Free (Filter.Strm);
-            Ada.Exceptions.Raise_Exception
-               (ZLib_Error'Identity,
-                Return_Code_Enum'Image (Return_Code (Code))
-                  & ": " & Error_Message);
-         end;
-      end if;
-   end Close;
-
-   -----------
-   -- CRC32 --
-   -----------
-
-   function CRC32
-     (CRC  : in Unsigned_32;
-      Data : in Ada.Streams.Stream_Element_Array)
-      return Unsigned_32
-   is
-      use Thin;
-   begin
-      return Unsigned_32 (crc32 (ULong (CRC),
-                                 Data'Address,
-                                 Data'Length));
-   end CRC32;
-
-   procedure CRC32
-     (CRC  : in out Unsigned_32;
-      Data : in     Ada.Streams.Stream_Element_Array) is
-   begin
-      CRC := CRC32 (CRC, Data);
-   end CRC32;
-
-   ------------------
-   -- Deflate_Init --
-   ------------------
-
-   procedure Deflate_Init
-     (Filter       : in out Filter_Type;
-      Level        : in     Compression_Level  := Default_Compression;
-      Strategy     : in     Strategy_Type      := Default_Strategy;
-      Method       : in     Compression_Method := Deflated;
-      Window_Bits  : in     Window_Bits_Type   := Default_Window_Bits;
-      Memory_Level : in     Memory_Level_Type  := Default_Memory_Level;
-      Header       : in     Header_Type        := Default)
-   is
-      use type Thin.Int;
-      Win_Bits : Thin.Int := Thin.Int (Window_Bits);
-   begin
-      if Is_Open (Filter) then
-         raise Status_Error;
-      end if;
-
-      --  We allow ZLib to make header only in case of default header type.
-      --  Otherwise we would either do header by ourselfs, or do not do
-      --  header at all.
-
-      if Header = None or else Header = GZip then
-         Win_Bits := -Win_Bits;
-      end if;
-
-      --  For the GZip CRC calculation and make headers.
-
-      if Header = GZip then
-         Filter.CRC    := 0;
-         Filter.Offset := Simple_GZip_Header'First;
-      else
-         Filter.Offset := Simple_GZip_Header'Last + 1;
-      end if;
-
-      Filter.Strm        := new Z_Stream;
-      Filter.Compression := True;
-      Filter.Stream_End  := False;
-      Filter.Header      := Header;
-
-      if Thin.Deflate_Init
-           (To_Thin_Access (Filter.Strm),
-            Level      => Thin.Int (Level),
-            method     => Thin.Int (Method),
-            windowBits => Win_Bits,
-            memLevel   => Thin.Int (Memory_Level),
-            strategy   => Thin.Int (Strategy)) /= Thin.Z_OK
-      then
-         Raise_Error (Filter.Strm.all);
-      end if;
-   end Deflate_Init;
-
-   -----------
-   -- Flush --
-   -----------
-
-   procedure Flush
-     (Filter    : in out Filter_Type;
-      Out_Data  :    out Ada.Streams.Stream_Element_Array;
-      Out_Last  :    out Ada.Streams.Stream_Element_Offset;
-      Flush     : in     Flush_Mode)
-   is
-      No_Data : Stream_Element_Array := (1 .. 0 => 0);
-      Last    : Stream_Element_Offset;
-   begin
-      Translate (Filter, No_Data, Last, Out_Data, Out_Last, Flush);
-   end Flush;
-
-   -----------------------
-   -- Generic_Translate --
-   -----------------------
-
-   procedure Generic_Translate
-     (Filter          : in out ZLib.Filter_Type;
-      In_Buffer_Size  : in     Integer := Default_Buffer_Size;
-      Out_Buffer_Size : in     Integer := Default_Buffer_Size)
-   is
-      In_Buffer  : Stream_Element_Array
-                     (1 .. Stream_Element_Offset (In_Buffer_Size));
-      Out_Buffer : Stream_Element_Array
-                     (1 .. Stream_Element_Offset (Out_Buffer_Size));
-      Last       : Stream_Element_Offset;
-      In_Last    : Stream_Element_Offset;
-      In_First   : Stream_Element_Offset;
-      Out_Last   : Stream_Element_Offset;
-   begin
-      Main : loop
-         Data_In (In_Buffer, Last);
-
-         In_First := In_Buffer'First;
-
-         loop
-            Translate
-              (Filter   => Filter,
-               In_Data  => In_Buffer (In_First .. Last),
-               In_Last  => In_Last,
-               Out_Data => Out_Buffer,
-               Out_Last => Out_Last,
-               Flush    => Flush_Finish (Last < In_Buffer'First));
-
-            if Out_Buffer'First <= Out_Last then
-               Data_Out (Out_Buffer (Out_Buffer'First .. Out_Last));
-            end if;
-
-            exit Main when Stream_End (Filter);
-
-            --  The end of in buffer.
-
-            exit when In_Last = Last;
-
-            In_First := In_Last + 1;
-         end loop;
-      end loop Main;
-
-   end Generic_Translate;
-
-   ------------------
-   -- Inflate_Init --
-   ------------------
-
-   procedure Inflate_Init
-     (Filter      : in out Filter_Type;
-      Window_Bits : in     Window_Bits_Type := Default_Window_Bits;
-      Header      : in     Header_Type      := Default)
-   is
-      use type Thin.Int;
-      Win_Bits : Thin.Int := Thin.Int (Window_Bits);
-
-      procedure Check_Version;
-      --  Check the latest header types compatibility.
-
-      procedure Check_Version is
-      begin
-         if Version <= "1.1.4" then
-            Raise_Error
-              ("Inflate header type " & Header_Type'Image (Header)
-               & " incompatible with ZLib version " & Version);
-         end if;
-      end Check_Version;
-
-   begin
-      if Is_Open (Filter) then
-         raise Status_Error;
-      end if;
-
-      case Header is
-         when None =>
-            Check_Version;
-
-            --  Inflate data without headers determined
-            --  by negative Win_Bits.
-
-            Win_Bits := -Win_Bits;
-         when GZip =>
-            Check_Version;
-
-            --  Inflate gzip data defined by flag 16.
-
-            Win_Bits := Win_Bits + 16;
-         when Auto =>
-            Check_Version;
-
-            --  Inflate with automatic detection
-            --  of gzip or native header defined by flag 32.
-
-            Win_Bits := Win_Bits + 32;
-         when Default => null;
-      end case;
-
-      Filter.Strm        := new Z_Stream;
-      Filter.Compression := False;
-      Filter.Stream_End  := False;
-      Filter.Header      := Header;
-
-      if Thin.Inflate_Init
-         (To_Thin_Access (Filter.Strm), Win_Bits) /= Thin.Z_OK
-      then
-         Raise_Error (Filter.Strm.all);
-      end if;
-   end Inflate_Init;
-
-   -------------
-   -- Is_Open --
-   -------------
-
-   function Is_Open (Filter : in Filter_Type) return Boolean is
-   begin
-      return Filter.Strm /= null;
-   end Is_Open;
-
-   -----------------
-   -- Raise_Error --
-   -----------------
-
-   procedure Raise_Error (Message : in String) is
-   begin
-      Ada.Exceptions.Raise_Exception (ZLib_Error'Identity, Message);
-   end Raise_Error;
-
-   procedure Raise_Error (Stream : in Z_Stream) is
-   begin
-      Raise_Error (Last_Error_Message (Stream));
-   end Raise_Error;
-
-   ----------
-   -- Read --
-   ----------
-
-   procedure Read
-     (Filter : in out Filter_Type;
-      Item   :    out Ada.Streams.Stream_Element_Array;
-      Last   :    out Ada.Streams.Stream_Element_Offset;
-      Flush  : in     Flush_Mode := No_Flush)
-   is
-      In_Last    : Stream_Element_Offset;
-      Item_First : Ada.Streams.Stream_Element_Offset := Item'First;
-      V_Flush    : Flush_Mode := Flush;
-
-   begin
-      pragma Assert (Rest_First in Buffer'First .. Buffer'Last + 1);
-      pragma Assert (Rest_Last in Buffer'First - 1 .. Buffer'Last);
-
-      loop
-         if Rest_Last = Buffer'First - 1 then
-            V_Flush := Finish;
-
-         elsif Rest_First > Rest_Last then
-            Read (Buffer, Rest_Last);
-            Rest_First := Buffer'First;
-
-            if Rest_Last < Buffer'First then
-               V_Flush := Finish;
-            end if;
-         end if;
-
-         Translate
-           (Filter   => Filter,
-            In_Data  => Buffer (Rest_First .. Rest_Last),
-            In_Last  => In_Last,
-            Out_Data => Item (Item_First .. Item'Last),
-            Out_Last => Last,
-            Flush    => V_Flush);
-
-         Rest_First := In_Last + 1;
-
-         exit when Stream_End (Filter)
-           or else Last = Item'Last
-           or else (Last >= Item'First and then Allow_Read_Some);
-
-         Item_First := Last + 1;
-      end loop;
-   end Read;
-
-   ----------------
-   -- Stream_End --
-   ----------------
-
-   function Stream_End (Filter : in Filter_Type) return Boolean is
-   begin
-      if Filter.Header = GZip and Filter.Compression then
-         return Filter.Stream_End
-            and then Filter.Offset = Footer_Array'Last + 1;
-      else
-         return Filter.Stream_End;
-      end if;
-   end Stream_End;
-
-   --------------
-   -- Total_In --
-   --------------
-
-   function Total_In (Filter : in Filter_Type) return Count is
-   begin
-      return Count (Thin.Total_In (To_Thin_Access (Filter.Strm).all));
-   end Total_In;
-
-   ---------------
-   -- Total_Out --
-   ---------------
-
-   function Total_Out (Filter : in Filter_Type) return Count is
-   begin
-      return Count (Thin.Total_Out (To_Thin_Access (Filter.Strm).all));
-   end Total_Out;
-
-   ---------------
-   -- Translate --
-   ---------------
-
-   procedure Translate
-     (Filter    : in out Filter_Type;
-      In_Data   : in     Ada.Streams.Stream_Element_Array;
-      In_Last   :    out Ada.Streams.Stream_Element_Offset;
-      Out_Data  :    out Ada.Streams.Stream_Element_Array;
-      Out_Last  :    out Ada.Streams.Stream_Element_Offset;
-      Flush     : in     Flush_Mode) is
-   begin
-      if Filter.Header = GZip and then Filter.Compression then
-         Translate_GZip
-           (Filter   => Filter,
-            In_Data  => In_Data,
-            In_Last  => In_Last,
-            Out_Data => Out_Data,
-            Out_Last => Out_Last,
-            Flush    => Flush);
-      else
-         Translate_Auto
-           (Filter   => Filter,
-            In_Data  => In_Data,
-            In_Last  => In_Last,
-            Out_Data => Out_Data,
-            Out_Last => Out_Last,
-            Flush    => Flush);
-      end if;
-   end Translate;
-
-   --------------------
-   -- Translate_Auto --
-   --------------------
-
-   procedure Translate_Auto
-     (Filter    : in out Filter_Type;
-      In_Data   : in     Ada.Streams.Stream_Element_Array;
-      In_Last   :    out Ada.Streams.Stream_Element_Offset;
-      Out_Data  :    out Ada.Streams.Stream_Element_Array;
-      Out_Last  :    out Ada.Streams.Stream_Element_Offset;
-      Flush     : in     Flush_Mode)
-   is
-      use type Thin.Int;
-      Code : Thin.Int;
-
-   begin
-      if not Is_Open (Filter) then
-         raise Status_Error;
-      end if;
-
-      if Out_Data'Length = 0 and then In_Data'Length = 0 then
-         raise Constraint_Error;
-      end if;
-
-      Set_Out (Filter.Strm.all, Out_Data'Address, Out_Data'Length);
-      Set_In  (Filter.Strm.all, In_Data'Address, In_Data'Length);
-
-      Code := Flate (Filter.Compression).Step
-        (To_Thin_Access (Filter.Strm),
-         Thin.Int (Flush));
-
-      if Code = Thin.Z_STREAM_END then
-         Filter.Stream_End := True;
-      else
-         Check_Error (Filter.Strm.all, Code);
-      end if;
-
-      In_Last  := In_Data'Last
-         - Stream_Element_Offset (Avail_In (Filter.Strm.all));
-      Out_Last := Out_Data'Last
-         - Stream_Element_Offset (Avail_Out (Filter.Strm.all));
-   end Translate_Auto;
-
-   --------------------
-   -- Translate_GZip --
-   --------------------
-
-   procedure Translate_GZip
-     (Filter    : in out Filter_Type;
-      In_Data   : in     Ada.Streams.Stream_Element_Array;
-      In_Last   :    out Ada.Streams.Stream_Element_Offset;
-      Out_Data  :    out Ada.Streams.Stream_Element_Array;
-      Out_Last  :    out Ada.Streams.Stream_Element_Offset;
-      Flush     : in     Flush_Mode)
-   is
-      Out_First : Stream_Element_Offset;
-
-      procedure Add_Data (Data : in Stream_Element_Array);
-      --  Add data to stream from the Filter.Offset till necessary,
-      --  used for add gzip headr/footer.
-
-      procedure Put_32
-        (Item : in out Stream_Element_Array;
-         Data : in     Unsigned_32);
-      pragma Inline (Put_32);
-
-      --------------
-      -- Add_Data --
-      --------------
-
-      procedure Add_Data (Data : in Stream_Element_Array) is
-         Data_First : Stream_Element_Offset renames Filter.Offset;
-         Data_Last  : Stream_Element_Offset;
-         Data_Len   : Stream_Element_Offset; --  -1
-         Out_Len    : Stream_Element_Offset; --  -1
-      begin
-         Out_First := Out_Last + 1;
-
-         if Data_First > Data'Last then
-            return;
-         end if;
-
-         Data_Len  := Data'Last     - Data_First;
-         Out_Len   := Out_Data'Last - Out_First;
-
-         if Data_Len <= Out_Len then
-            Out_Last  := Out_First  + Data_Len;
-            Data_Last := Data'Last;
-         else
-            Out_Last  := Out_Data'Last;
-            Data_Last := Data_First + Out_Len;
-         end if;
-
-         Out_Data (Out_First .. Out_Last) := Data (Data_First .. Data_Last);
-
-         Data_First := Data_Last + 1;
-         Out_First  := Out_Last + 1;
-      end Add_Data;
-
-      ------------
-      -- Put_32 --
-      ------------
-
-      procedure Put_32
-        (Item : in out Stream_Element_Array;
-         Data : in     Unsigned_32)
-      is
-         D : Unsigned_32 := Data;
-      begin
-         for J in Item'First .. Item'First + 3 loop
-            Item (J) := Stream_Element (D and 16#FF#);
-            D := Shift_Right (D, 8);
-         end loop;
-      end Put_32;
-
-   begin
-      Out_Last := Out_Data'First - 1;
-
-      if not Filter.Stream_End then
-         Add_Data (Simple_GZip_Header);
-
-         Translate_Auto
-           (Filter   => Filter,
-            In_Data  => In_Data,
-            In_Last  => In_Last,
-            Out_Data => Out_Data (Out_First .. Out_Data'Last),
-            Out_Last => Out_Last,
-            Flush    => Flush);
-
-         CRC32 (Filter.CRC, In_Data (In_Data'First .. In_Last));
-      end if;
-
-      if Filter.Stream_End and then Out_Last <= Out_Data'Last then
-         --  This detection method would work only when
-         --  Simple_GZip_Header'Last > Footer_Array'Last
-
-         if Filter.Offset = Simple_GZip_Header'Last + 1 then
-            Filter.Offset := Footer_Array'First;
-         end if;
-
-         declare
-            Footer : Footer_Array;
-         begin
-            Put_32 (Footer, Filter.CRC);
-            Put_32 (Footer (Footer'First + 4 .. Footer'Last),
-                    Unsigned_32 (Total_In (Filter)));
-            Add_Data (Footer);
-         end;
-      end if;
-   end Translate_GZip;
-
-   -------------
-   -- Version --
-   -------------
-
-   function Version return String is
-   begin
-      return Interfaces.C.Strings.Value (Thin.zlibVersion);
-   end Version;
-
-   -----------
-   -- Write --
-   -----------
-
-   procedure Write
-     (Filter : in out Filter_Type;
-      Item   : in     Ada.Streams.Stream_Element_Array;
-      Flush  : in     Flush_Mode := No_Flush)
-   is
-      Buffer   : Stream_Element_Array (1 .. Buffer_Size);
-      In_Last  : Stream_Element_Offset;
-      Out_Last : Stream_Element_Offset;
-      In_First : Stream_Element_Offset := Item'First;
-   begin
-      if Item'Length = 0 and Flush = No_Flush then
-         return;
-      end if;
-
-      loop
-         Translate
-           (Filter   => Filter,
-            In_Data  => Item (In_First .. Item'Last),
-            In_Last  => In_Last,
-            Out_Data => Buffer,
-            Out_Last => Out_Last,
-            Flush    => Flush);
-
-         if Out_Last >= Buffer'First then
-            Write (Buffer (1 .. Out_Last));
-         end if;
-
-         exit when In_Last = Item'Last or Stream_End (Filter);
-
-         In_First := In_Last + 1;
-      end loop;
-   end Write;
-
-end ZLib;
Index: trunk/minix/lib/zlib-1.2.3/contrib/ada/zlib.ads
===================================================================
--- trunk/minix/lib/zlib-1.2.3/contrib/ada/zlib.ads	(revision 9)
+++ 	(revision )
@@ -1,328 +1,0 @@
-------------------------------------------------------------------------------
---                      ZLib for Ada thick binding.                         --
---                                                                          --
---              Copyright (C) 2002-2004 Dmitriy Anisimkov                   --
---                                                                          --
---  This library is free software; you can redistribute it and/or modify    --
---  it under the terms of the GNU General Public License as published by    --
---  the Free Software Foundation; either version 2 of the License, or (at   --
---  your option) any later version.                                         --
---                                                                          --
---  This library is distributed in the hope that it will be useful, but     --
---  WITHOUT ANY WARRANTY; without even the implied warranty of              --
---  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU       --
---  General Public License for more details.                                --
---                                                                          --
---  You should have received a copy of the GNU General Public License       --
---  along with this library; if not, write to the Free Software Foundation, --
---  Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.          --
---                                                                          --
---  As a special exception, if other files instantiate generics from this   --
---  unit, or you link this unit with other files to produce an executable,  --
---  this  unit  does not  by itself cause  the resulting executable to be   --
---  covered by the GNU General Public License. This exception does not      --
---  however invalidate any other reasons why the executable file  might be  --
---  covered by the  GNU Public License.                                     --
-------------------------------------------------------------------------------
-
---  $Id: zlib.ads,v 1.1 2005/09/23 22:39:01 beng Exp $
-
-with Ada.Streams;
-
-with Interfaces;
-
-package ZLib is
-
-   ZLib_Error   : exception;
-   Status_Error : exception;
-
-   type Compression_Level is new Integer range -1 .. 9;
-
-   type Flush_Mode is private;
-
-   type Compression_Method is private;
-
-   type Window_Bits_Type is new Integer range 8 .. 15;
-
-   type Memory_Level_Type is new Integer range 1 .. 9;
-
-   type Unsigned_32 is new Interfaces.Unsigned_32;
-
-   type Strategy_Type is private;
-
-   type Header_Type is (None, Auto, Default, GZip);
-   --  Header type usage have a some limitation for inflate.
-   --  See comment for Inflate_Init.
-
-   subtype Count is Ada.Streams.Stream_Element_Count;
-
-   Default_Memory_Level : constant Memory_Level_Type := 8;
-   Default_Window_Bits  : constant Window_Bits_Type  := 15;
-
-   ----------------------------------
-   -- Compression method constants --
-   ----------------------------------
-
-   Deflated : constant Compression_Method;
-   --  Only one method allowed in this ZLib version
-
-   ---------------------------------
-   -- Compression level constants --
-   ---------------------------------
-
-   No_Compression      : constant Compression_Level := 0;
-   Best_Speed          : constant Compression_Level := 1;
-   Best_Compression    : constant Compression_Level := 9;
-   Default_Compression : constant Compression_Level := -1;
-
-   --------------------------
-   -- Flush mode constants --
-   --------------------------
-
-   No_Flush      : constant Flush_Mode;
-   --  Regular way for compression, no flush
-
-   Partial_Flush : constant Flush_Mode;
-   --  Will be removed, use Z_SYNC_FLUSH instead
-
-   Sync_Flush    : constant Flush_Mode;
-   --  All pending output is flushed to the output buffer and the output
-   --  is aligned on a byte boundary, so that the decompressor can get all
-   --  input data available so far. (In particular avail_in is zero after the
-   --  call if enough output space has been provided  before the call.)
-   --  Flushing may degrade compression for some compression algorithms and so
-   --  it should be used only when necessary.
-
-   Block_Flush   : constant Flush_Mode;
-   --  Z_BLOCK requests that inflate() stop
-   --  if and when it get to the next deflate block boundary. When decoding the
-   --  zlib or gzip format, this will cause inflate() to return immediately
-   --  after the header and before the first block. When doing a raw inflate,
-   --  inflate() will go ahead and process the first block, and will return
-   --  when it gets to the end of that block, or when it runs out of data.
-
-   Full_Flush    : constant Flush_Mode;
-   --  All output is flushed as with SYNC_FLUSH, and the compression state
-   --  is reset so that decompression can restart from this point if previous
-   --  compressed data has been damaged or if random access is desired. Using
-   --  Full_Flush too often can seriously degrade the compression.
-
-   Finish        : constant Flush_Mode;
-   --  Just for tell the compressor that input data is complete.
-
-   ------------------------------------
-   -- Compression strategy constants --
-   ------------------------------------
-
-   --  RLE stategy could be used only in version 1.2.0 and later.
-
-   Filtered         : constant Strategy_Type;
-   Huffman_Only     : constant Strategy_Type;
-   RLE              : constant Strategy_Type;
-   Default_Strategy : constant Strategy_Type;
-
-   Default_Buffer_Size : constant := 4096;
-
-   type Filter_Type is tagged limited private;
-   --  The filter is for compression and for decompression.
-   --  The usage of the type is depend of its initialization.
-
-   function Version return String;
-   pragma Inline (Version);
-   --  Return string representation of the ZLib version.
-
-   procedure Deflate_Init
-     (Filter       : in out Filter_Type;
-      Level        : in     Compression_Level  := Default_Compression;
-      Strategy     : in     Strategy_Type      := Default_Strategy;
-      Method       : in     Compression_Method := Deflated;
-      Window_Bits  : in     Window_Bits_Type   := Default_Window_Bits;
-      Memory_Level : in     Memory_Level_Type  := Default_Memory_Level;
-      Header       : in     Header_Type        := Default);
-   --  Compressor initialization.
-   --  When Header parameter is Auto or Default, then default zlib header
-   --  would be provided for compressed data.
-   --  When Header is GZip, then gzip header would be set instead of
-   --  default header.
-   --  When Header is None, no header would be set for compressed data.
-
-   procedure Inflate_Init
-     (Filter      : in out Filter_Type;
-      Window_Bits : in     Window_Bits_Type := Default_Window_Bits;
-      Header      : in     Header_Type      := Default);
-   --  Decompressor initialization.
-   --  Default header type mean that ZLib default header is expecting in the
-   --  input compressed stream.
-   --  Header type None mean that no header is expecting in the input stream.
-   --  GZip header type mean that GZip header is expecting in the
-   --  input compressed stream.
-   --  Auto header type mean that header type (GZip or Native) would be
-   --  detected automatically in the input stream.
-   --  Note that header types parameter values None, GZip and Auto are
-   --  supported for inflate routine only in ZLib versions 1.2.0.2 and later.
-   --  Deflate_Init is supporting all header types.
-
-   function Is_Open (Filter : in Filter_Type) return Boolean;
-   pragma Inline (Is_Open);
-   --  Is the filter opened for compression or decompression.
-
-   procedure Close
-     (Filter       : in out Filter_Type;
-      Ignore_Error : in     Boolean := False);
-   --  Closing the compression or decompressor.
-   --  If stream is closing before the complete and Ignore_Error is False,
-   --  The exception would be raised.
-
-   generic
-      with procedure Data_In
-        (Item : out Ada.Streams.Stream_Element_Array;
-         Last : out Ada.Streams.Stream_Element_Offset);
-      with procedure Data_Out
-        (Item : in Ada.Streams.Stream_Element_Array);
-   procedure Generic_Translate
-     (Filter          : in out Filter_Type;
-      In_Buffer_Size  : in     Integer := Default_Buffer_Size;
-      Out_Buffer_Size : in     Integer := Default_Buffer_Size);
-   --  Compress/decompress data fetch from Data_In routine and pass the result
-   --  to the Data_Out routine. User should provide Data_In and Data_Out
-   --  for compression/decompression data flow.
-   --  Compression or decompression depend on Filter initialization.
-
-   function Total_In (Filter : in Filter_Type) return Count;
-   pragma Inline (Total_In);
-   --  Returns total number of input bytes read so far
-
-   function Total_Out (Filter : in Filter_Type) return Count;
-   pragma Inline (Total_Out);
-   --  Returns total number of bytes output so far
-
-   function CRC32
-     (CRC    : in Unsigned_32;
-      Data   : in Ada.Streams.Stream_Element_Array)
-      return Unsigned_32;
-   pragma Inline (CRC32);
-   --  Compute CRC32, it could be necessary for make gzip format
-
-   procedure CRC32
-     (CRC  : in out Unsigned_32;
-      Data : in     Ada.Streams.Stream_Element_Array);
-   pragma Inline (CRC32);
-   --  Compute CRC32, it could be necessary for make gzip format
-
-   -------------------------------------------------
-   --  Below is more complex low level routines.  --
-   -------------------------------------------------
-
-   procedure Translate
-     (Filter    : in out Filter_Type;
-      In_Data   : in     Ada.Streams.Stream_Element_Array;
-      In_Last   :    out Ada.Streams.Stream_Element_Offset;
-      Out_Data  :    out Ada.Streams.Stream_Element_Array;
-      Out_Last  :    out Ada.Streams.Stream_Element_Offset;
-      Flush     : in     Flush_Mode);
-   --  Compress/decompress the In_Data buffer and place the result into
-   --  Out_Data. In_Last is the index of last element from In_Data accepted by
-   --  the Filter. Out_Last is the last element of the received data from
-   --  Filter. To tell the filter that incoming data are complete put the
-   --  Flush parameter to Finish.
-
-   function Stream_End (Filter : in Filter_Type) return Boolean;
-   pragma Inline (Stream_End);
-   --  Return the true when the stream is complete.
-
-   procedure Flush
-     (Filter    : in out Filter_Type;
-      Out_Data  :    out Ada.Streams.Stream_Element_Array;
-      Out_Last  :    out Ada.Streams.Stream_Element_Offset;
-      Flush     : in     Flush_Mode);
-   pragma Inline (Flush);
-   --  Flushing the data from the compressor.
-
-   generic
-      with procedure Write
-        (Item : in Ada.Streams.Stream_Element_Array);
-      --  User should provide this routine for accept
-      --  compressed/decompressed data.
-
-      Buffer_Size : in Ada.Streams.Stream_Element_Offset
-         := Default_Buffer_Size;
-      --  Buffer size for Write user routine.
-
-   procedure Write
-     (Filter  : in out Filter_Type;
-      Item    : in     Ada.Streams.Stream_Element_Array;
-      Flush   : in     Flush_Mode := No_Flush);
-   --  Compress/Decompress data from Item to the generic parameter procedure
-   --  Write. Output buffer size could be set in Buffer_Size generic parameter.
-
-   generic
-      with procedure Read
-        (Item : out Ada.Streams.Stream_Element_Array;
-         Last : out Ada.Streams.Stream_Element_Offset);
-      --  User should provide data for compression/decompression
-      --  thru this routine.
-
-      Buffer : in out Ada.Streams.Stream_Element_Array;
-      --  Buffer for keep remaining data from the previous
-      --  back read.
-
-      Rest_First, Rest_Last : in out Ada.Streams.Stream_Element_Offset;
-      --  Rest_First have to be initialized to Buffer'Last + 1
-      --  Rest_Last have to be initialized to Buffer'Last
-      --  before usage.
-
-      Allow_Read_Some : in Boolean := False;
-      --  Is it allowed to return Last < Item'Last before end of data.
-
-   procedure Read
-     (Filter : in out Filter_Type;
-      Item   :    out Ada.Streams.Stream_Element_Array;
-      Last   :    out Ada.Streams.Stream_Element_Offset;
-      Flush  : in     Flush_Mode := No_Flush);
-   --  Compress/Decompress data from generic parameter procedure Read to the
-   --  Item. User should provide Buffer and initialized Rest_First, Rest_Last
-   --  indicators. If Allow_Read_Some is True, Read routines could return
-   --  Last < Item'Last only at end of stream.
-
-private
-
-   use Ada.Streams;
-
-   pragma Assert (Ada.Streams.Stream_Element'Size    =    8);
-   pragma Assert (Ada.Streams.Stream_Element'Modulus = 2**8);
-
-   type Flush_Mode is new Integer range 0 .. 5;
-
-   type Compression_Method is new Integer range 8 .. 8;
-
-   type Strategy_Type is new Integer range 0 .. 3;
-
-   No_Flush      : constant Flush_Mode := 0;
-   Partial_Flush : constant Flush_Mode := 1;
-   Sync_Flush    : constant Flush_Mode := 2;
-   Full_Flush    : constant Flush_Mode := 3;
-   Finish        : constant Flush_Mode := 4;
-   Block_Flush   : constant Flush_Mode := 5;
-
-   Filtered         : constant Strategy_Type := 1;
-   Huffman_Only     : constant Strategy_Type := 2;
-   RLE              : constant Strategy_Type := 3;
-   Default_Strategy : constant Strategy_Type := 0;
-
-   Deflated : constant Compression_Method := 8;
-
-   type Z_Stream;
-
-   type Z_Stream_Access is access all Z_Stream;
-
-   type Filter_Type is tagged limited record
-      Strm        : Z_Stream_Access;
-      Compression : Boolean;
-      Stream_End  : Boolean;
-      Header      : Header_Type;
-      CRC         : Unsigned_32;
-      Offset      : Stream_Element_Offset;
-      --  Offset for gzip header/footer output.
-   end record;
-
-end ZLib;
Index: trunk/minix/lib/zlib-1.2.3/contrib/ada/zlib.gpr
===================================================================
--- trunk/minix/lib/zlib-1.2.3/contrib/ada/zlib.gpr	(revision 9)
+++ 	(revision )
@@ -1,20 +1,0 @@
-project Zlib is
-
-   for Languages use ("Ada");
-   for Source_Dirs use (".");
-   for Object_Dir use ".";
-   for Main use ("test.adb", "mtest.adb", "read.adb", "buffer_demo");
-
-   package Compiler is
-      for Default_Switches ("ada") use ("-gnatwcfilopru", "-gnatVcdfimorst", "-gnatyabcefhiklmnoprst");
-   end Compiler;
-
-   package Linker is
-      for Default_Switches ("ada") use ("-lz");
-   end Linker;
-
-   package Builder is
-      for Default_Switches ("ada") use ("-s", "-gnatQ");
-   end Builder;
-
-end Zlib;
Index: trunk/minix/lib/zlib-1.2.3/contrib/asm586/README.586
===================================================================
--- trunk/minix/lib/zlib-1.2.3/contrib/asm586/README.586	(revision 9)
+++ 	(revision )
@@ -1,43 +1,0 @@
-This is a patched version of zlib modified to use
-Pentium-optimized assembly code in the deflation algorithm. The files
-changed/added by this patch are:
-
-README.586
-match.S
-
-The effectiveness of these modifications is a bit marginal, as the the
-program's bottleneck seems to be mostly L1-cache contention, for which
-there is no real way to work around without rewriting the basic
-algorithm. The speedup on average is around 5-10% (which is generally
-less than the amount of variance between subsequent executions).
-However, when used at level 9 compression, the cache contention can
-drop enough for the assembly version to achieve 10-20% speedup (and
-sometimes more, depending on the amount of overall redundancy in the
-files). Even here, though, cache contention can still be the limiting
-factor, depending on the nature of the program using the zlib library.
-This may also mean that better improvements will be seen on a Pentium
-with MMX, which suffers much less from L1-cache contention, but I have
-not yet verified this.
-
-Note that this code has been tailored for the Pentium in particular,
-and will not perform well on the Pentium Pro (due to the use of a
-partial register in the inner loop).
-
-If you are using an assembler other than GNU as, you will have to
-translate match.S to use your assembler's syntax. (Have fun.)
-
-Brian Raiter
-breadbox@muppetlabs.com
-April, 1998
-
-
-Added for zlib 1.1.3:
-
-The patches come from
-http://www.muppetlabs.com/~breadbox/software/assembly.html
-
-To compile zlib with this asm file, copy match.S to the zlib directory
-then do:
-
-CFLAGS="-O3 -DASMV" ./configure
-make OBJA=match.o
Index: trunk/minix/lib/zlib-1.2.3/contrib/asm586/match.S
===================================================================
--- trunk/minix/lib/zlib-1.2.3/contrib/asm586/match.S	(revision 9)
+++ 	(revision )
@@ -1,364 +1,0 @@
-/* match.s -- Pentium-optimized version of longest_match()
- * Written for zlib 1.1.2
- * Copyright (C) 1998 Brian Raiter <breadbox@muppetlabs.com>
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License.
- */
-
-#ifndef NO_UNDERLINE
-#define	match_init	_match_init
-#define	longest_match	_longest_match
-#endif
-
-#define	MAX_MATCH	(258)
-#define	MIN_MATCH	(3)
-#define	MIN_LOOKAHEAD	(MAX_MATCH + MIN_MATCH + 1)
-#define	MAX_MATCH_8	((MAX_MATCH + 7) & ~7)
-
-/* stack frame offsets */
-
-#define	wmask			0	/* local copy of s->wmask	*/
-#define	window			4	/* local copy of s->window	*/
-#define	windowbestlen		8	/* s->window + bestlen		*/
-#define	chainlenscanend		12	/* high word: current chain len	*/
-					/* low word: last bytes sought	*/
-#define	scanstart		16	/* first two bytes of string	*/
-#define	scanalign		20	/* dword-misalignment of string	*/
-#define	nicematch		24	/* a good enough match size	*/
-#define	bestlen			28	/* size of best match so far	*/
-#define	scan			32	/* ptr to string wanting match	*/
-
-#define	LocalVarsSize		(36)
-/*	saved ebx		36 */
-/*	saved edi		40 */
-/*	saved esi		44 */
-/*	saved ebp		48 */
-/*	return address		52 */
-#define	deflatestate		56	/* the function arguments	*/
-#define	curmatch		60
-
-/* Offsets for fields in the deflate_state structure. These numbers
- * are calculated from the definition of deflate_state, with the
- * assumption that the compiler will dword-align the fields. (Thus,
- * changing the definition of deflate_state could easily cause this
- * program to crash horribly, without so much as a warning at
- * compile time. Sigh.)
- */
-
-/* All the +zlib1222add offsets are due to the addition of fields
- *  in zlib in the deflate_state structure since the asm code was first written
- * (if you compile with zlib 1.0.4 or older, use "zlib1222add equ (-4)").
- * (if you compile with zlib between 1.0.5 and 1.2.2.1, use "zlib1222add equ 0").
- * if you compile with zlib 1.2.2.2 or later , use "zlib1222add equ 8").
- */
-
-#define zlib1222add		(8)
-
-#define	dsWSize			(36+zlib1222add)
-#define	dsWMask			(44+zlib1222add)
-#define	dsWindow		(48+zlib1222add)
-#define	dsPrev			(56+zlib1222add)
-#define	dsMatchLen		(88+zlib1222add)
-#define	dsPrevMatch		(92+zlib1222add)
-#define	dsStrStart		(100+zlib1222add)
-#define	dsMatchStart		(104+zlib1222add)
-#define	dsLookahead		(108+zlib1222add)
-#define	dsPrevLen		(112+zlib1222add)
-#define	dsMaxChainLen		(116+zlib1222add)
-#define	dsGoodMatch		(132+zlib1222add)
-#define	dsNiceMatch		(136+zlib1222add)
-
-
-.file "match.S"
-
-.globl	match_init, longest_match
-
-.text
-
-/* uInt longest_match(deflate_state *deflatestate, IPos curmatch) */
-
-longest_match:
-
-/* Save registers that the compiler may be using, and adjust %esp to	*/
-/* make room for our stack frame.					*/
-
-		pushl	%ebp
-		pushl	%edi
-		pushl	%esi
-		pushl	%ebx
-		subl	$LocalVarsSize, %esp
-
-/* Retrieve the function arguments. %ecx will hold cur_match		*/
-/* throughout the entire function. %edx will hold the pointer to the	*/
-/* deflate_state structure during the function's setup (before		*/
-/* entering the main loop).						*/
-
-		movl	deflatestate(%esp), %edx
-		movl	curmatch(%esp), %ecx
-
-/* if ((uInt)nice_match > s->lookahead) nice_match = s->lookahead;	*/
-
-		movl	dsNiceMatch(%edx), %eax
-		movl	dsLookahead(%edx), %ebx
-		cmpl	%eax, %ebx
-		jl	LookaheadLess
-		movl	%eax, %ebx
-LookaheadLess:	movl	%ebx, nicematch(%esp)
-
-/* register Bytef *scan = s->window + s->strstart;			*/
-
-		movl	dsWindow(%edx), %esi
-		movl	%esi, window(%esp)
-		movl	dsStrStart(%edx), %ebp
-		lea	(%esi,%ebp), %edi
-		movl	%edi, scan(%esp)
-
-/* Determine how many bytes the scan ptr is off from being		*/
-/* dword-aligned.							*/
-
-		movl	%edi, %eax
-		negl	%eax
-		andl	$3, %eax
-		movl	%eax, scanalign(%esp)
-
-/* IPos limit = s->strstart > (IPos)MAX_DIST(s) ?			*/
-/*     s->strstart - (IPos)MAX_DIST(s) : NIL;				*/
-
-		movl	dsWSize(%edx), %eax
-		subl	$MIN_LOOKAHEAD, %eax
-		subl	%eax, %ebp
-		jg	LimitPositive
-		xorl	%ebp, %ebp
-LimitPositive:
-
-/* unsigned chain_length = s->max_chain_length;				*/
-/* if (s->prev_length >= s->good_match) {				*/
-/*     chain_length >>= 2;						*/
-/* }									*/
-
-		movl	dsPrevLen(%edx), %eax
-		movl	dsGoodMatch(%edx), %ebx
-		cmpl	%ebx, %eax
-		movl	dsMaxChainLen(%edx), %ebx
-		jl	LastMatchGood
-		shrl	$2, %ebx
-LastMatchGood:
-
-/* chainlen is decremented once beforehand so that the function can	*/
-/* use the sign flag instead of the zero flag for the exit test.	*/
-/* It is then shifted into the high word, to make room for the scanend	*/
-/* scanend value, which it will always accompany.			*/
-
-		decl	%ebx
-		shll	$16, %ebx
-
-/* int best_len = s->prev_length;					*/
-
-		movl	dsPrevLen(%edx), %eax
-		movl	%eax, bestlen(%esp)
-
-/* Store the sum of s->window + best_len in %esi locally, and in %esi.	*/
-
-		addl	%eax, %esi
-		movl	%esi, windowbestlen(%esp)
-
-/* register ush scan_start = *(ushf*)scan;				*/
-/* register ush scan_end   = *(ushf*)(scan+best_len-1);			*/
-
-		movw	(%edi), %bx
-		movw	%bx, scanstart(%esp)
-		movw	-1(%edi,%eax), %bx
-		movl	%ebx, chainlenscanend(%esp)
-
-/* Posf *prev = s->prev;						*/
-/* uInt wmask = s->w_mask;						*/
-
-		movl	dsPrev(%edx), %edi
-		movl	dsWMask(%edx), %edx
-		mov	%edx, wmask(%esp)
-
-/* Jump into the main loop.						*/
-
-		jmp	LoopEntry
-
-.balign 16
-
-/* do {
- *     match = s->window + cur_match;
- *     if (*(ushf*)(match+best_len-1) != scan_end ||
- *         *(ushf*)match != scan_start) continue;
- *     [...]
- * } while ((cur_match = prev[cur_match & wmask]) > limit
- *          && --chain_length != 0);
- *
- * Here is the inner loop of the function. The function will spend the
- * majority of its time in this loop, and majority of that time will
- * be spent in the first ten instructions.
- *
- * Within this loop:
- * %ebx = chainlenscanend - i.e., ((chainlen << 16) | scanend)
- * %ecx = curmatch
- * %edx = curmatch & wmask
- * %esi = windowbestlen - i.e., (window + bestlen)
- * %edi = prev
- * %ebp = limit
- *
- * Two optimization notes on the choice of instructions:
- *
- * The first instruction uses a 16-bit address, which costs an extra,
- * unpairable cycle. This is cheaper than doing a 32-bit access and
- * zeroing the high word, due to the 3-cycle misalignment penalty which
- * would occur half the time. This also turns out to be cheaper than
- * doing two separate 8-bit accesses, as the memory is so rarely in the
- * L1 cache.
- *
- * The window buffer, however, apparently spends a lot of time in the
- * cache, and so it is faster to retrieve the word at the end of the
- * match string with two 8-bit loads. The instructions that test the
- * word at the beginning of the match string, however, are executed
- * much less frequently, and there it was cheaper to use 16-bit
- * instructions, which avoided the necessity of saving off and
- * subsequently reloading one of the other registers.
- */
-LookupLoop:
-							/* 1 U & V  */
-		movw	(%edi,%edx,2), %cx		/* 2 U pipe */
-		movl	wmask(%esp), %edx		/* 2 V pipe */
-		cmpl	%ebp, %ecx			/* 3 U pipe */
-		jbe	LeaveNow			/* 3 V pipe */
-		subl	$0x00010000, %ebx		/* 4 U pipe */
-		js	LeaveNow			/* 4 V pipe */
-LoopEntry:	movb	-1(%esi,%ecx), %al		/* 5 U pipe */
-		andl	%ecx, %edx			/* 5 V pipe */
-		cmpb	%bl, %al			/* 6 U pipe */
-		jnz	LookupLoop			/* 6 V pipe */
-		movb	(%esi,%ecx), %ah
-		cmpb	%bh, %ah
-		jnz	LookupLoop
-		movl	window(%esp), %eax
-		movw	(%eax,%ecx), %ax
-		cmpw	scanstart(%esp), %ax
-		jnz	LookupLoop
-
-/* Store the current value of chainlen.					*/
-
-		movl	%ebx, chainlenscanend(%esp)
-
-/* Point %edi to the string under scrutiny, and %esi to the string we	*/
-/* are hoping to match it up with. In actuality, %esi and %edi are	*/
-/* both pointed (MAX_MATCH_8 - scanalign) bytes ahead, and %edx is	*/
-/* initialized to -(MAX_MATCH_8 - scanalign).				*/
-
-		movl	window(%esp), %esi
-		movl	scan(%esp), %edi
-		addl	%ecx, %esi
-		movl	scanalign(%esp), %eax
-		movl	$(-MAX_MATCH_8), %edx
-		lea	MAX_MATCH_8(%edi,%eax), %edi
-		lea	MAX_MATCH_8(%esi,%eax), %esi
-
-/* Test the strings for equality, 8 bytes at a time. At the end,
- * adjust %edx so that it is offset to the exact byte that mismatched.
- *
- * We already know at this point that the first three bytes of the
- * strings match each other, and they can be safely passed over before
- * starting the compare loop. So what this code does is skip over 0-3
- * bytes, as much as necessary in order to dword-align the %edi
- * pointer. (%esi will still be misaligned three times out of four.)
- *
- * It should be confessed that this loop usually does not represent
- * much of the total running time. Replacing it with a more
- * straightforward "rep cmpsb" would not drastically degrade
- * performance.
- */
-LoopCmps:
-		movl	(%esi,%edx), %eax
-		movl	(%edi,%edx), %ebx
-		xorl	%ebx, %eax
-		jnz	LeaveLoopCmps
-		movl	4(%esi,%edx), %eax
-		movl	4(%edi,%edx), %ebx
-		xorl	%ebx, %eax
-		jnz	LeaveLoopCmps4
-		addl	$8, %edx
-		jnz	LoopCmps
-		jmp	LenMaximum
-LeaveLoopCmps4:	addl	$4, %edx
-LeaveLoopCmps:	testl	$0x0000FFFF, %eax
-		jnz	LenLower
-		addl	$2, %edx
-		shrl	$16, %eax
-LenLower:	subb	$1, %al
-		adcl	$0, %edx
-
-/* Calculate the length of the match. If it is longer than MAX_MATCH,	*/
-/* then automatically accept it as the best possible match and leave.	*/
-
-		lea	(%edi,%edx), %eax
-		movl	scan(%esp), %edi
-		subl	%edi, %eax
-		cmpl	$MAX_MATCH, %eax
-		jge	LenMaximum
-
-/* If the length of the match is not longer than the best match we	*/
-/* have so far, then forget it and return to the lookup loop.		*/
-
-		movl	deflatestate(%esp), %edx
-		movl	bestlen(%esp), %ebx
-		cmpl	%ebx, %eax
-		jg	LongerMatch
-		movl	chainlenscanend(%esp), %ebx
-		movl	windowbestlen(%esp), %esi
-		movl	dsPrev(%edx), %edi
-		movl	wmask(%esp), %edx
-		andl	%ecx, %edx
-		jmp	LookupLoop
-
-/*         s->match_start = cur_match;					*/
-/*         best_len = len;						*/
-/*         if (len >= nice_match) break;				*/
-/*         scan_end = *(ushf*)(scan+best_len-1);			*/
-
-LongerMatch:	movl	nicematch(%esp), %ebx
-		movl	%eax, bestlen(%esp)
-		movl	%ecx, dsMatchStart(%edx)
-		cmpl	%ebx, %eax
-		jge	LeaveNow
-		movl	window(%esp), %esi
-		addl	%eax, %esi
-		movl	%esi, windowbestlen(%esp)
-		movl	chainlenscanend(%esp), %ebx
-		movw	-1(%edi,%eax), %bx
-		movl	dsPrev(%edx), %edi
-		movl	%ebx, chainlenscanend(%esp)
-		movl	wmask(%esp), %edx
-		andl	%ecx, %edx
-		jmp	LookupLoop
-
-/* Accept the current string, with the maximum possible length.		*/
-
-LenMaximum:	movl	deflatestate(%esp), %edx
-		movl	$MAX_MATCH, bestlen(%esp)
-		movl	%ecx, dsMatchStart(%edx)
-
-/* if ((uInt)best_len <= s->lookahead) return (uInt)best_len;		*/
-/* return s->lookahead;							*/
-
-LeaveNow:
-		movl	deflatestate(%esp), %edx
-		movl	bestlen(%esp), %ebx
-		movl	dsLookahead(%edx), %eax
-		cmpl	%eax, %ebx
-		jg	LookaheadRet
-		movl	%ebx, %eax
-LookaheadRet:
-
-/* Restore the stack and return from whence we came.			*/
-
-		addl	$LocalVarsSize, %esp
-		popl	%ebx
-		popl	%esi
-		popl	%edi
-		popl	%ebp
-match_init:	ret
Index: trunk/minix/lib/zlib-1.2.3/contrib/asm686/README.686
===================================================================
--- trunk/minix/lib/zlib-1.2.3/contrib/asm686/README.686	(revision 9)
+++ 	(revision )
@@ -1,34 +1,0 @@
-This is a patched version of zlib, modified to use
-Pentium-Pro-optimized assembly code in the deflation algorithm. The
-files changed/added by this patch are:
-
-README.686
-match.S
-
-The speedup that this patch provides varies, depending on whether the
-compiler used to build the original version of zlib falls afoul of the
-PPro's speed traps. My own tests show a speedup of around 10-20% at
-the default compression level, and 20-30% using -9, against a version
-compiled using gcc 2.7.2.3. Your mileage may vary.
-
-Note that this code has been tailored for the PPro/PII in particular,
-and will not perform particuarly well on a Pentium.
-
-If you are using an assembler other than GNU as, you will have to
-translate match.S to use your assembler's syntax. (Have fun.)
-
-Brian Raiter
-breadbox@muppetlabs.com
-April, 1998
-
-
-Added for zlib 1.1.3:
-
-The patches come from
-http://www.muppetlabs.com/~breadbox/software/assembly.html
-
-To compile zlib with this asm file, copy match.S to the zlib directory
-then do:
-
-CFLAGS="-O3 -DASMV" ./configure
-make OBJA=match.o
Index: trunk/minix/lib/zlib-1.2.3/contrib/asm686/match.S
===================================================================
--- trunk/minix/lib/zlib-1.2.3/contrib/asm686/match.S	(revision 9)
+++ 	(revision )
@@ -1,329 +1,0 @@
-/* match.s -- Pentium-Pro-optimized version of longest_match()
- * Written for zlib 1.1.2
- * Copyright (C) 1998 Brian Raiter <breadbox@muppetlabs.com>
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License.
- */
-
-#ifndef NO_UNDERLINE
-#define	match_init	_match_init
-#define	longest_match	_longest_match
-#endif
-
-#define	MAX_MATCH	(258)
-#define	MIN_MATCH	(3)
-#define	MIN_LOOKAHEAD	(MAX_MATCH + MIN_MATCH + 1)
-#define	MAX_MATCH_8	((MAX_MATCH + 7) & ~7)
-
-/* stack frame offsets */
-
-#define	chainlenwmask		0	/* high word: current chain len	*/
-					/* low word: s->wmask		*/
-#define	window			4	/* local copy of s->window	*/
-#define	windowbestlen		8	/* s->window + bestlen		*/
-#define	scanstart		16	/* first two bytes of string	*/
-#define	scanend			12	/* last two bytes of string	*/
-#define	scanalign		20	/* dword-misalignment of string	*/
-#define	nicematch		24	/* a good enough match size	*/
-#define	bestlen			28	/* size of best match so far	*/
-#define	scan			32	/* ptr to string wanting match	*/
-
-#define	LocalVarsSize		(36)
-/*	saved ebx		36 */
-/*	saved edi		40 */
-/*	saved esi		44 */
-/*	saved ebp		48 */
-/*	return address		52 */
-#define	deflatestate		56	/* the function arguments	*/
-#define	curmatch		60
-
-/* All the +zlib1222add offsets are due to the addition of fields
- *  in zlib in the deflate_state structure since the asm code was first written
- * (if you compile with zlib 1.0.4 or older, use "zlib1222add equ (-4)").
- * (if you compile with zlib between 1.0.5 and 1.2.2.1, use "zlib1222add equ 0").
- * if you compile with zlib 1.2.2.2 or later , use "zlib1222add equ 8").
- */
-
-#define zlib1222add		(8)
-
-#define	dsWSize			(36+zlib1222add)
-#define	dsWMask			(44+zlib1222add)
-#define	dsWindow		(48+zlib1222add)
-#define	dsPrev			(56+zlib1222add)
-#define	dsMatchLen		(88+zlib1222add)
-#define	dsPrevMatch		(92+zlib1222add)
-#define	dsStrStart		(100+zlib1222add)
-#define	dsMatchStart		(104+zlib1222add)
-#define	dsLookahead		(108+zlib1222add)
-#define	dsPrevLen		(112+zlib1222add)
-#define	dsMaxChainLen		(116+zlib1222add)
-#define	dsGoodMatch		(132+zlib1222add)
-#define	dsNiceMatch		(136+zlib1222add)
-
-
-.file "match.S"
-
-.globl	match_init, longest_match
-
-.text
-
-/* uInt longest_match(deflate_state *deflatestate, IPos curmatch) */
-
-longest_match:
-
-/* Save registers that the compiler may be using, and adjust %esp to	*/
-/* make room for our stack frame.					*/
-
-		pushl	%ebp
-		pushl	%edi
-		pushl	%esi
-		pushl	%ebx
-		subl	$LocalVarsSize, %esp
-
-/* Retrieve the function arguments. %ecx will hold cur_match		*/
-/* throughout the entire function. %edx will hold the pointer to the	*/
-/* deflate_state structure during the function's setup (before		*/
-/* entering the main loop).						*/
-
-		movl	deflatestate(%esp), %edx
-		movl	curmatch(%esp), %ecx
-
-/* uInt wmask = s->w_mask;						*/
-/* unsigned chain_length = s->max_chain_length;				*/
-/* if (s->prev_length >= s->good_match) {				*/
-/*     chain_length >>= 2;						*/
-/* }									*/
-
-		movl	dsPrevLen(%edx), %eax
-		movl	dsGoodMatch(%edx), %ebx
-		cmpl	%ebx, %eax
-		movl	dsWMask(%edx), %eax
-		movl	dsMaxChainLen(%edx), %ebx
-		jl	LastMatchGood
-		shrl	$2, %ebx
-LastMatchGood:
-
-/* chainlen is decremented once beforehand so that the function can	*/
-/* use the sign flag instead of the zero flag for the exit test.	*/
-/* It is then shifted into the high word, to make room for the wmask	*/
-/* value, which it will always accompany.				*/
-
-		decl	%ebx
-		shll	$16, %ebx
-		orl	%eax, %ebx
-		movl	%ebx, chainlenwmask(%esp)
-
-/* if ((uInt)nice_match > s->lookahead) nice_match = s->lookahead;	*/
-
-		movl	dsNiceMatch(%edx), %eax
-		movl	dsLookahead(%edx), %ebx
-		cmpl	%eax, %ebx
-		jl	LookaheadLess
-		movl	%eax, %ebx
-LookaheadLess:	movl	%ebx, nicematch(%esp)
-
-/* register Bytef *scan = s->window + s->strstart;			*/
-
-		movl	dsWindow(%edx), %esi
-		movl	%esi, window(%esp)
-		movl	dsStrStart(%edx), %ebp
-		lea	(%esi,%ebp), %edi
-		movl	%edi, scan(%esp)
-
-/* Determine how many bytes the scan ptr is off from being		*/
-/* dword-aligned.							*/
-
-		movl	%edi, %eax
-		negl	%eax
-		andl	$3, %eax
-		movl	%eax, scanalign(%esp)
-
-/* IPos limit = s->strstart > (IPos)MAX_DIST(s) ?			*/
-/*     s->strstart - (IPos)MAX_DIST(s) : NIL;				*/
-
-		movl	dsWSize(%edx), %eax
-		subl	$MIN_LOOKAHEAD, %eax
-		subl	%eax, %ebp
-		jg	LimitPositive
-		xorl	%ebp, %ebp
-LimitPositive:
-
-/* int best_len = s->prev_length;					*/
-
-		movl	dsPrevLen(%edx), %eax
-		movl	%eax, bestlen(%esp)
-
-/* Store the sum of s->window + best_len in %esi locally, and in %esi.	*/
-
-		addl	%eax, %esi
-		movl	%esi, windowbestlen(%esp)
-
-/* register ush scan_start = *(ushf*)scan;				*/
-/* register ush scan_end   = *(ushf*)(scan+best_len-1);			*/
-/* Posf *prev = s->prev;						*/
-
-		movzwl	(%edi), %ebx
-		movl	%ebx, scanstart(%esp)
-		movzwl	-1(%edi,%eax), %ebx
-		movl	%ebx, scanend(%esp)
-		movl	dsPrev(%edx), %edi
-
-/* Jump into the main loop.						*/
-
-		movl	chainlenwmask(%esp), %edx
-		jmp	LoopEntry
-
-.balign 16
-
-/* do {
- *     match = s->window + cur_match;
- *     if (*(ushf*)(match+best_len-1) != scan_end ||
- *         *(ushf*)match != scan_start) continue;
- *     [...]
- * } while ((cur_match = prev[cur_match & wmask]) > limit
- *          && --chain_length != 0);
- *
- * Here is the inner loop of the function. The function will spend the
- * majority of its time in this loop, and majority of that time will
- * be spent in the first ten instructions.
- *
- * Within this loop:
- * %ebx = scanend
- * %ecx = curmatch
- * %edx = chainlenwmask - i.e., ((chainlen << 16) | wmask)
- * %esi = windowbestlen - i.e., (window + bestlen)
- * %edi = prev
- * %ebp = limit
- */
-LookupLoop:
-		andl	%edx, %ecx
-		movzwl	(%edi,%ecx,2), %ecx
-		cmpl	%ebp, %ecx
-		jbe	LeaveNow
-		subl	$0x00010000, %edx
-		js	LeaveNow
-LoopEntry:	movzwl	-1(%esi,%ecx), %eax
-		cmpl	%ebx, %eax
-		jnz	LookupLoop
-		movl	window(%esp), %eax
-		movzwl	(%eax,%ecx), %eax
-		cmpl	scanstart(%esp), %eax
-		jnz	LookupLoop
-
-/* Store the current value of chainlen.					*/
-
-		movl	%edx, chainlenwmask(%esp)
-
-/* Point %edi to the string under scrutiny, and %esi to the string we	*/
-/* are hoping to match it up with. In actuality, %esi and %edi are	*/
-/* both pointed (MAX_MATCH_8 - scanalign) bytes ahead, and %edx is	*/
-/* initialized to -(MAX_MATCH_8 - scanalign).				*/
-
-		movl	window(%esp), %esi
-		movl	scan(%esp), %edi
-		addl	%ecx, %esi
-		movl	scanalign(%esp), %eax
-		movl	$(-MAX_MATCH_8), %edx
-		lea	MAX_MATCH_8(%edi,%eax), %edi
-		lea	MAX_MATCH_8(%esi,%eax), %esi
-
-/* Test the strings for equality, 8 bytes at a time. At the end,
- * adjust %edx so that it is offset to the exact byte that mismatched.
- *
- * We already know at this point that the first three bytes of the
- * strings match each other, and they can be safely passed over before
- * starting the compare loop. So what this code does is skip over 0-3
- * bytes, as much as necessary in order to dword-align the %edi
- * pointer. (%esi will still be misaligned three times out of four.)
- *
- * It should be confessed that this loop usually does not represent
- * much of the total running time. Replacing it with a more
- * straightforward "rep cmpsb" would not drastically degrade
- * performance.
- */
-LoopCmps:
-		movl	(%esi,%edx), %eax
-		xorl	(%edi,%edx), %eax
-		jnz	LeaveLoopCmps
-		movl	4(%esi,%edx), %eax
-		xorl	4(%edi,%edx), %eax
-		jnz	LeaveLoopCmps4
-		addl	$8, %edx
-		jnz	LoopCmps
-		jmp	LenMaximum
-LeaveLoopCmps4:	addl	$4, %edx
-LeaveLoopCmps:	testl	$0x0000FFFF, %eax
-		jnz	LenLower
-		addl	$2, %edx
-		shrl	$16, %eax
-LenLower:	subb	$1, %al
-		adcl	$0, %edx
-
-/* Calculate the length of the match. If it is longer than MAX_MATCH,	*/
-/* then automatically accept it as the best possible match and leave.	*/
-
-		lea	(%edi,%edx), %eax
-		movl	scan(%esp), %edi
-		subl	%edi, %eax
-		cmpl	$MAX_MATCH, %eax
-		jge	LenMaximum
-
-/* If the length of the match is not longer than the best match we	*/
-/* have so far, then forget it and return to the lookup loop.		*/
-
-		movl	deflatestate(%esp), %edx
-		movl	bestlen(%esp), %ebx
-		cmpl	%ebx, %eax
-		jg	LongerMatch
-		movl	windowbestlen(%esp), %esi
-		movl	dsPrev(%edx), %edi
-		movl	scanend(%esp), %ebx
-		movl	chainlenwmask(%esp), %edx
-		jmp	LookupLoop
-
-/*         s->match_start = cur_match;					*/
-/*         best_len = len;						*/
-/*         if (len >= nice_match) break;				*/
-/*         scan_end = *(ushf*)(scan+best_len-1);			*/
-
-LongerMatch:	movl	nicematch(%esp), %ebx
-		movl	%eax, bestlen(%esp)
-		movl	%ecx, dsMatchStart(%edx)
-		cmpl	%ebx, %eax
-		jge	LeaveNow
-		movl	window(%esp), %esi
-		addl	%eax, %esi
-		movl	%esi, windowbestlen(%esp)
-		movzwl	-1(%edi,%eax), %ebx
-		movl	dsPrev(%edx), %edi
-		movl	%ebx, scanend(%esp)
-		movl	chainlenwmask(%esp), %edx
-		jmp	LookupLoop
-
-/* Accept the current string, with the maximum possible length.		*/
-
-LenMaximum:	movl	deflatestate(%esp), %edx
-		movl	$MAX_MATCH, bestlen(%esp)
-		movl	%ecx, dsMatchStart(%edx)
-
-/* if ((uInt)best_len <= s->lookahead) return (uInt)best_len;		*/
-/* return s->lookahead;							*/
-
-LeaveNow:
-		movl	deflatestate(%esp), %edx
-		movl	bestlen(%esp), %ebx
-		movl	dsLookahead(%edx), %eax
-		cmpl	%eax, %ebx
-		jg	LookaheadRet
-		movl	%ebx, %eax
-LookaheadRet:
-
-/* Restore the stack and return from whence we came.			*/
-
-		addl	$LocalVarsSize, %esp
-		popl	%ebx
-		popl	%esi
-		popl	%edi
-		popl	%ebp
-match_init:	ret
Index: trunk/minix/lib/zlib-1.2.3/contrib/blast/Makefile
===================================================================
--- trunk/minix/lib/zlib-1.2.3/contrib/blast/Makefile	(revision 9)
+++ 	(revision )
@@ -1,8 +1,0 @@
-blast: blast.c blast.h
-	cc -DTEST -o blast blast.c
-
-test: blast
-	blast < test.pk | cmp - test.txt
-
-clean:
-	rm -f blast blast.o
Index: trunk/minix/lib/zlib-1.2.3/contrib/blast/README
===================================================================
--- trunk/minix/lib/zlib-1.2.3/contrib/blast/README	(revision 9)
+++ 	(revision )
@@ -1,4 +1,0 @@
-Read blast.h for purpose and usage.
-
-Mark Adler
-madler@alumni.caltech.edu
Index: trunk/minix/lib/zlib-1.2.3/contrib/blast/blast.c
===================================================================
--- trunk/minix/lib/zlib-1.2.3/contrib/blast/blast.c	(revision 9)
+++ 	(revision )
@@ -1,444 +1,0 @@
-/* blast.c
- * Copyright (C) 2003 Mark Adler
- * For conditions of distribution and use, see copyright notice in blast.h
- * version 1.1, 16 Feb 2003
- *
- * blast.c decompresses data compressed by the PKWare Compression Library.
- * This function provides functionality similar to the explode() function of
- * the PKWare library, hence the name "blast".
- *
- * This decompressor is based on the excellent format description provided by
- * Ben Rudiak-Gould in comp.compression on August 13, 2001.  Interestingly, the
- * example Ben provided in the post is incorrect.  The distance 110001 should
- * instead be 111000.  When corrected, the example byte stream becomes:
- *
- *    00 04 82 24 25 8f 80 7f
- *
- * which decompresses to "AIAIAIAIAIAIA" (without the quotes).
- */
-
-/*
- * Change history:
- *
- * 1.0  12 Feb 2003     - First version
- * 1.1  16 Feb 2003     - Fixed distance check for > 4 GB uncompressed data
- */
-
-#include <setjmp.h>             /* for setjmp(), longjmp(), and jmp_buf */
-#include "blast.h"              /* prototype for blast() */
-
-#define local static            /* for local function definitions */
-#define MAXBITS 13              /* maximum code length */
-#define MAXWIN 4096             /* maximum window size */
-
-/* input and output state */
-struct state {
-    /* input state */
-    blast_in infun;             /* input function provided by user */
-    void *inhow;                /* opaque information passed to infun() */
-    unsigned char *in;          /* next input location */
-    unsigned left;              /* available input at in */
-    int bitbuf;                 /* bit buffer */
-    int bitcnt;                 /* number of bits in bit buffer */
-
-    /* input limit error return state for bits() and decode() */
-    jmp_buf env;
-
-    /* output state */
-    blast_out outfun;           /* output function provided by user */
-    void *outhow;               /* opaque information passed to outfun() */
-    unsigned next;              /* index of next write location in out[] */
-    int first;                  /* true to check distances (for first 4K) */
-    unsigned char out[MAXWIN];  /* output buffer and sliding window */
-};
-
-/*
- * Return need bits from the input stream.  This always leaves less than
- * eight bits in the buffer.  bits() works properly for need == 0.
- *
- * Format notes:
- *
- * - Bits are stored in bytes from the least significant bit to the most
- *   significant bit.  Therefore bits are dropped from the bottom of the bit
- *   buffer, using shift right, and new bytes are appended to the top of the
- *   bit buffer, using shift left.
- */
-local int bits(struct state *s, int need)
-{
-    int val;            /* bit accumulator */
-
-    /* load at least need bits into val */
-    val = s->bitbuf;
-    while (s->bitcnt < need) {
-        if (s->left == 0) {
-            s->left = s->infun(s->inhow, &(s->in));
-            if (s->left == 0) longjmp(s->env, 1);       /* out of input */
-        }
-        val |= (int)(*(s->in)++) << s->bitcnt;          /* load eight bits */
-        s->left--;
-        s->bitcnt += 8;
-    }
-
-    /* drop need bits and update buffer, always zero to seven bits left */
-    s->bitbuf = val >> need;
-    s->bitcnt -= need;
-
-    /* return need bits, zeroing the bits above that */
-    return val & ((1 << need) - 1);
-}
-
-/*
- * Huffman code decoding tables.  count[1..MAXBITS] is the number of symbols of
- * each length, which for a canonical code are stepped through in order.
- * symbol[] are the symbol values in canonical order, where the number of
- * entries is the sum of the counts in count[].  The decoding process can be
- * seen in the function decode() below.
- */
-struct huffman {
-    short *count;       /* number of symbols of each length */
-    short *symbol;      /* canonically ordered symbols */
-};
-
-/*
- * Decode a code from the stream s using huffman table h.  Return the symbol or
- * a negative value if there is an error.  If all of the lengths are zero, i.e.
- * an empty code, or if the code is incomplete and an invalid code is received,
- * then -9 is returned after reading MAXBITS bits.
- *
- * Format notes:
- *
- * - The codes as stored in the compressed data are bit-reversed relative to
- *   a simple integer ordering of codes of the same lengths.  Hence below the
- *   bits are pulled from the compressed data one at a time and used to
- *   build the code value reversed from what is in the stream in order to
- *   permit simple integer comparisons for decoding.
- *
- * - The first code for the shortest length is all ones.  Subsequent codes of
- *   the same length are simply integer decrements of the previous code.  When
- *   moving up a length, a one bit is appended to the code.  For a complete
- *   code, the last code of the longest length will be all zeros.  To support
- *   this ordering, the bits pulled during decoding are inverted to apply the
- *   more "natural" ordering starting with all zeros and incrementing.
- */
-local int decode(struct state *s, struct huffman *h)
-{
-    int len;            /* current number of bits in code */
-    int code;           /* len bits being decoded */
-    int first;          /* first code of length len */
-    int count;          /* number of codes of length len */
-    int index;          /* index of first code of length len in symbol table */
-    int bitbuf;         /* bits from stream */
-    int left;           /* bits left in next or left to process */
-    short *next;        /* next number of codes */
-
-    bitbuf = s->bitbuf;
-    left = s->bitcnt;
-    code = first = index = 0;
-    len = 1;
-    next = h->count + 1;
-    while (1) {
-        while (left--) {
-            code |= (bitbuf & 1) ^ 1;   /* invert code */
-            bitbuf >>= 1;
-            count = *next++;
-            if (code < first + count) { /* if length len, return symbol */
-                s->bitbuf = bitbuf;
-                s->bitcnt = (s->bitcnt - len) & 7;
-                return h->symbol[index + (code - first)];
-            }
-            index += count;             /* else update for next length */
-            first += count;
-            first <<= 1;
-            code <<= 1;
-            len++;
-        }
-        left = (MAXBITS+1) - len;
-        if (left == 0) break;
-        if (s->left == 0) {
-            s->left = s->infun(s->inhow, &(s->in));
-            if (s->left == 0) longjmp(s->env, 1);       /* out of input */
-        }
-        bitbuf = *(s->in)++;
-        s->left--;
-        if (left > 8) left = 8;
-    }
-    return -9;                          /* ran out of codes */
-}
-
-/*
- * Given a list of repeated code lengths rep[0..n-1], where each byte is a
- * count (high four bits + 1) and a code length (low four bits), generate the
- * list of code lengths.  This compaction reduces the size of the object code.
- * Then given the list of code lengths length[0..n-1] representing a canonical
- * Huffman code for n symbols, construct the tables required to decode those
- * codes.  Those tables are the number of codes of each length, and the symbols
- * sorted by length, retaining their original order within each length.  The
- * return value is zero for a complete code set, negative for an over-
- * subscribed code set, and positive for an incomplete code set.  The tables
- * can be used if the return value is zero or positive, but they cannot be used
- * if the return value is negative.  If the return value is zero, it is not
- * possible for decode() using that table to return an error--any stream of
- * enough bits will resolve to a symbol.  If the return value is positive, then
- * it is possible for decode() using that table to return an error for received
- * codes past the end of the incomplete lengths.
- */
-local int construct(struct huffman *h, const unsigned char *rep, int n)
-{
-    int symbol;         /* current symbol when stepping through length[] */
-    int len;            /* current length when stepping through h->count[] */
-    int left;           /* number of possible codes left of current length */
-    short offs[MAXBITS+1];      /* offsets in symbol table for each length */
-    short length[256];  /* code lengths */
-
-    /* convert compact repeat counts into symbol bit length list */
-    symbol = 0;
-    do {
-        len = *rep++;
-        left = (len >> 4) + 1;
-        len &= 15;
-        do {
-            length[symbol++] = len;
-        } while (--left);
-    } while (--n);
-    n = symbol;
-
-    /* count number of codes of each length */
-    for (len = 0; len <= MAXBITS; len++)
-        h->count[len] = 0;
-    for (symbol = 0; symbol < n; symbol++)
-        (h->count[length[symbol]])++;   /* assumes lengths are within bounds */
-    if (h->count[0] == n)               /* no codes! */
-        return 0;                       /* complete, but decode() will fail */
-
-    /* check for an over-subscribed or incomplete set of lengths */
-    left = 1;                           /* one possible code of zero length */
-    for (len = 1; len <= MAXBITS; len++) {
-        left <<= 1;                     /* one more bit, double codes left */
-        left -= h->count[len];          /* deduct count from possible codes */
-        if (left < 0) return left;      /* over-subscribed--return negative */
-    }                                   /* left > 0 means incomplete */
-
-    /* generate offsets into symbol table for each length for sorting */
-    offs[1] = 0;
-    for (len = 1; len < MAXBITS; len++)
-        offs[len + 1] = offs[len] + h->count[len];
-
-    /*
-     * put symbols in table sorted by length, by symbol order within each
-     * length
-     */
-    for (symbol = 0; symbol < n; symbol++)
-        if (length[symbol] != 0)
-            h->symbol[offs[length[symbol]]++] = symbol;
-
-    /* return zero for complete set, positive for incomplete set */
-    return left;
-}
-
-/*
- * Decode PKWare Compression Library stream.
- *
- * Format notes:
- *
- * - First byte is 0 if literals are uncoded or 1 if they are coded.  Second
- *   byte is 4, 5, or 6 for the number of extra bits in the distance code.
- *   This is the base-2 logarithm of the dictionary size minus six.
- *
- * - Compressed data is a combination of literals and length/distance pairs
- *   terminated by an end code.  Literals are either Huffman coded or
- *   uncoded bytes.  A length/distance pair is a coded length followed by a
- *   coded distance to represent a string that occurs earlier in the
- *   uncompressed data that occurs again at the current location.
- *
- * - A bit preceding a literal or length/distance pair indicates which comes
- *   next, 0 for literals, 1 for length/distance.
- *
- * - If literals are uncoded, then the next eight bits are the literal, in the
- *   normal bit order in th stream, i.e. no bit-reversal is needed. Similarly,
- *   no bit reversal is needed for either the length extra bits or the distance
- *   extra bits.
- *
- * - Literal bytes are simply written to the output.  A length/distance pair is
- *   an instruction to copy previously uncompressed bytes to the output.  The
- *   copy is from distance bytes back in the output stream, copying for length
- *   bytes.
- *
- * - Distances pointing before the beginning of the output data are not
- *   permitted.
- *
- * - Overlapped copies, where the length is greater than the distance, are
- *   allowed and common.  For example, a distance of one and a length of 518
- *   simply copies the last byte 518 times.  A distance of four and a length of
- *   twelve copies the last four bytes three times.  A simple forward copy
- *   ignoring whether the length is greater than the distance or not implements
- *   this correctly.
- */
-local int decomp(struct state *s)
-{
-    int lit;            /* true if literals are coded */
-    int dict;           /* log2(dictionary size) - 6 */
-    int symbol;         /* decoded symbol, extra bits for distance */
-    int len;            /* length for copy */
-    int dist;           /* distance for copy */
-    int copy;           /* copy counter */
-    unsigned char *from, *to;   /* copy pointers */
-    static int virgin = 1;                              /* build tables once */
-    static short litcnt[MAXBITS+1], litsym[256];        /* litcode memory */
-    static short lencnt[MAXBITS+1], lensym[16];         /* lencode memory */
-    static short distcnt[MAXBITS+1], distsym[64];       /* distcode memory */
-    static struct huffman litcode = {litcnt, litsym};   /* length code */
-    static struct huffman lencode = {lencnt, lensym};   /* length code */
-    static struct huffman distcode = {distcnt, distsym};/* distance code */
-        /* bit lengths of literal codes */
-    static const unsigned char litlen[] = {
-        11, 124, 8, 7, 28, 7, 188, 13, 76, 4, 10, 8, 12, 10, 12, 10, 8, 23, 8,
-        9, 7, 6, 7, 8, 7, 6, 55, 8, 23, 24, 12, 11, 7, 9, 11, 12, 6, 7, 22, 5,
-        7, 24, 6, 11, 9, 6, 7, 22, 7, 11, 38, 7, 9, 8, 25, 11, 8, 11, 9, 12,
-        8, 12, 5, 38, 5, 38, 5, 11, 7, 5, 6, 21, 6, 10, 53, 8, 7, 24, 10, 27,
-        44, 253, 253, 253, 252, 252, 252, 13, 12, 45, 12, 45, 12, 61, 12, 45,
-        44, 173};
-        /* bit lengths of length codes 0..15 */
-    static const unsigned char lenlen[] = {2, 35, 36, 53, 38, 23};
-        /* bit lengths of distance codes 0..63 */
-    static const unsigned char distlen[] = {2, 20, 53, 230, 247, 151, 248};
-    static const short base[16] = {     /* base for length codes */
-        3, 2, 4, 5, 6, 7, 8, 9, 10, 12, 16, 24, 40, 72, 136, 264};
-    static const char extra[16] = {     /* extra bits for length codes */
-        0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 3, 4, 5, 6, 7, 8};
-
-    /* set up decoding tables (once--might not be thread-safe) */
-    if (virgin) {
-        construct(&litcode, litlen, sizeof(litlen));
-        construct(&lencode, lenlen, sizeof(lenlen));
-        construct(&distcode, distlen, sizeof(distlen));
-        virgin = 0;
-    }
-
-    /* read header */
-    lit = bits(s, 8);
-    if (lit > 1) return -1;
-    dict = bits(s, 8);
-    if (dict < 4 || dict > 6) return -2;
-
-    /* decode literals and length/distance pairs */
-    do {
-        if (bits(s, 1)) {
-            /* get length */
-            symbol = decode(s, &lencode);
-            len = base[symbol] + bits(s, extra[symbol]);
-            if (len == 519) break;              /* end code */
-
-            /* get distance */
-            symbol = len == 2 ? 2 : dict;
-            dist = decode(s, &distcode) << symbol;
-            dist += bits(s, symbol);
-            dist++;
-            if (s->first && dist > s->next)
-                return -3;              /* distance too far back */
-
-            /* copy length bytes from distance bytes back */
-            do {
-                to = s->out + s->next;
-                from = to - dist;
-                copy = MAXWIN;
-                if (s->next < dist) {
-                    from += copy;
-                    copy = dist;
-                }
-                copy -= s->next;
-                if (copy > len) copy = len;
-                len -= copy;
-                s->next += copy;
-                do {
-                    *to++ = *from++;
-                } while (--copy);
-                if (s->next == MAXWIN) {
-                    if (s->outfun(s->outhow, s->out, s->next)) return 1;
-                    s->next = 0;
-                    s->first = 0;
-                }
-            } while (len != 0);
-        }
-        else {
-            /* get literal and write it */
-            symbol = lit ? decode(s, &litcode) : bits(s, 8);
-            s->out[s->next++] = symbol;
-            if (s->next == MAXWIN) {
-                if (s->outfun(s->outhow, s->out, s->next)) return 1;
-                s->next = 0;
-                s->first = 0;
-            }
-        }
-    } while (1);
-    return 0;
-}
-
-/* See comments in blast.h */
-int blast(blast_in infun, void *inhow, blast_out outfun, void *outhow)
-{
-    struct state s;             /* input/output state */
-    int err;                    /* return value */
-
-    /* initialize input state */
-    s.infun = infun;
-    s.inhow = inhow;
-    s.left = 0;
-    s.bitbuf = 0;
-    s.bitcnt = 0;
-
-    /* initialize output state */
-    s.outfun = outfun;
-    s.outhow = outhow;
-    s.next = 0;
-    s.first = 1;
-
-    /* return if bits() or decode() tries to read past available input */
-    if (setjmp(s.env) != 0)             /* if came back here via longjmp(), */
-        err = 2;                        /*  then skip decomp(), return error */
-    else
-        err = decomp(&s);               /* decompress */
-
-    /* write any leftover output and update the error code if needed */
-    if (err != 1 && s.next && s.outfun(s.outhow, s.out, s.next) && err == 0)
-        err = 1;
-    return err;
-}
-
-#ifdef TEST
-/* Example of how to use blast() */
-#include <stdio.h>
-#include <stdlib.h>
-
-#define CHUNK 16384
-
-local unsigned inf(void *how, unsigned char **buf)
-{
-    static unsigned char hold[CHUNK];
-
-    *buf = hold;
-    return fread(hold, 1, CHUNK, (FILE *)how);
-}
-
-local int outf(void *how, unsigned char *buf, unsigned len)
-{
-    return fwrite(buf, 1, len, (FILE *)how) != len;
-}
-
-/* Decompress a PKWare Compression Library stream from stdin to stdout */
-int main(void)
-{
-    int ret, n;
-
-    /* decompress to stdout */
-    ret = blast(inf, stdin, outf, stdout);
-    if (ret != 0) fprintf(stderr, "blast error: %d\n", ret);
-
-    /* see if there are any leftover bytes */
-    n = 0;
-    while (getchar() != EOF) n++;
-    if (n) fprintf(stderr, "blast warning: %d unused bytes of input\n", n);
-
-    /* return blast() error code */
-    return ret;
-}
-#endif
Index: trunk/minix/lib/zlib-1.2.3/contrib/blast/blast.h
===================================================================
--- trunk/minix/lib/zlib-1.2.3/contrib/blast/blast.h	(revision 9)
+++ 	(revision )
@@ -1,71 +1,0 @@
-/* blast.h -- interface for blast.c
-  Copyright (C) 2003 Mark Adler
-  version 1.1, 16 Feb 2003
-
-  This software is provided 'as-is', without any express or implied
-  warranty.  In no event will the author be held liable for any damages
-  arising from the use of this software.
-
-  Permission is granted to anyone to use this software for any purpose,
-  including commercial applications, and to alter it and redistribute it
-  freely, subject to the following restrictions:
-
-  1. The origin of this software must not be misrepresented; you must not
-     claim that you wrote the original software. If you use this software
-     in a product, an acknowledgment in the product documentation would be
-     appreciated but is not required.
-  2. Altered source versions must be plainly marked as such, and must not be
-     misrepresented as being the original software.
-  3. This notice may not be removed or altered from any source distribution.
-
-  Mark Adler    madler@alumni.caltech.edu
- */
-
-
-/*
- * blast() decompresses the PKWare Data Compression Library (DCL) compressed
- * format.  It provides the same functionality as the explode() function in
- * that library.  (Note: PKWare overused the "implode" verb, and the format
- * used by their library implode() function is completely different and
- * incompatible with the implode compression method supported by PKZIP.)
- */
-
-
-typedef unsigned (*blast_in)(void *how, unsigned char **buf);
-typedef int (*blast_out)(void *how, unsigned char *buf, unsigned len);
-/* Definitions for input/output functions passed to blast().  See below for
- * what the provided functions need to do.
- */
-
-
-int blast(blast_in infun, void *inhow, blast_out outfun, void *outhow);
-/* Decompress input to output using the provided infun() and outfun() calls.
- * On success, the return value of blast() is zero.  If there is an error in
- * the source data, i.e. it is not in the proper format, then a negative value
- * is returned.  If there is not enough input available or there is not enough
- * output space, then a positive error is returned.
- *
- * The input function is invoked: len = infun(how, &buf), where buf is set by
- * infun() to point to the input buffer, and infun() returns the number of
- * available bytes there.  If infun() returns zero, then blast() returns with
- * an input error.  (blast() only asks for input if it needs it.)  inhow is for
- * use by the application to pass an input descriptor to infun(), if desired.
- *
- * The output function is invoked: err = outfun(how, buf, len), where the bytes
- * to be written are buf[0..len-1].  If err is not zero, then blast() returns
- * with an output error.  outfun() is always called with len <= 4096.  outhow
- * is for use by the application to pass an output descriptor to outfun(), if
- * desired.
- *
- * The return codes are:
- *
- *   2:  ran out of input before completing decompression
- *   1:  output error before completing decompression
- *   0:  successful decompression
- *  -1:  literal flag not zero or one
- *  -2:  dictionary size not in 4..6
- *  -3:  distance is too far back
- *
- * At the bottom of blast.c is an example program that uses blast() that can be
- * compiled to produce a command-line decompression filter by defining TEST.
- */
Index: trunk/minix/lib/zlib-1.2.3/contrib/blast/test.txt
===================================================================
--- trunk/minix/lib/zlib-1.2.3/contrib/blast/test.txt	(revision 9)
+++ 	(revision )
@@ -1,1 +1,0 @@
-AIAIAIAIAIAIA
Index: trunk/minix/lib/zlib-1.2.3/contrib/delphi/ZLib.pas
===================================================================
--- trunk/minix/lib/zlib-1.2.3/contrib/delphi/ZLib.pas	(revision 9)
+++ 	(revision )
@@ -1,557 +1,0 @@
-{*******************************************************}
-{                                                       }
-{       Borland Delphi Supplemental Components          }
-{       ZLIB Data Compression Interface Unit            }
-{                                                       }
-{       Copyright (c) 1997,99 Borland Corporation       }
-{                                                       }
-{*******************************************************}
-
-{ Updated for zlib 1.2.x by Cosmin Truta <cosmint@cs.ubbcluj.ro> }
-
-unit ZLib;
-
-interface
-
-uses SysUtils, Classes;
-
-type
-  TAlloc = function (AppData: Pointer; Items, Size: Integer): Pointer; cdecl;
-  TFree = procedure (AppData, Block: Pointer); cdecl;
-
-  // Internal structure.  Ignore.
-  TZStreamRec = packed record
-    next_in: PChar;       // next input byte
-    avail_in: Integer;    // number of bytes available at next_in
-    total_in: Longint;    // total nb of input bytes read so far
-
-    next_out: PChar;      // next output byte should be put here
-    avail_out: Integer;   // remaining free space at next_out
-    total_out: Longint;   // total nb of bytes output so far
-
-    msg: PChar;           // last error message, NULL if no error
-    internal: Pointer;    // not visible by applications
-
-    zalloc: TAlloc;       // used to allocate the internal state
-    zfree: TFree;         // used to free the internal state
-    AppData: Pointer;     // private data object passed to zalloc and zfree
-
-    data_type: Integer;   // best guess about the data type: ascii or binary
-    adler: Longint;       // adler32 value of the uncompressed data
-    reserved: Longint;    // reserved for future use
-  end;
-
-  // Abstract ancestor class
-  TCustomZlibStream = class(TStream)
-  private
-    FStrm: TStream;
-    FStrmPos: Integer;
-    FOnProgress: TNotifyEvent;
-    FZRec: TZStreamRec;
-    FBuffer: array [Word] of Char;
-  protected
-    procedure Progress(Sender: TObject); dynamic;
-    property OnProgress: TNotifyEvent read FOnProgress write FOnProgress;
-    constructor Create(Strm: TStream);
-  end;
-
-{ TCompressionStream compresses data on the fly as data is written to it, and
-  stores the compressed data to another stream.
-
-  TCompressionStream is write-only and strictly sequential. Reading from the
-  stream will raise an exception. Using Seek to move the stream pointer
-  will raise an exception.
-
-  Output data is cached internally, written to the output stream only when
-  the internal output buffer is full.  All pending output data is flushed
-  when the stream is destroyed.
-
-  The Position property returns the number of uncompressed bytes of
-  data that have been written to the stream so far.
-
-  CompressionRate returns the on-the-fly percentage by which the original
-  data has been compressed:  (1 - (CompressedBytes / UncompressedBytes)) * 100
-  If raw data size = 100 and compressed data size = 25, the CompressionRate
-  is 75%
-
-  The OnProgress event is called each time the output buffer is filled and
-  written to the output stream.  This is useful for updating a progress
-  indicator when you are writing a large chunk of data to the compression
-  stream in a single call.}
-
-
-  TCompressionLevel = (clNone, clFastest, clDefault, clMax);
-
-  TCompressionStream = class(TCustomZlibStream)
-  private
-    function GetCompressionRate: Single;
-  public
-    constructor Create(CompressionLevel: TCompressionLevel; Dest: TStream);
-    destructor Destroy; override;
-    function Read(var Buffer; Count: Longint): Longint; override;
-    function Write(const Buffer; Count: Longint): Longint; override;
-    function Seek(Offset: Longint; Origin: Word): Longint; override;
-    property CompressionRate: Single read GetCompressionRate;
-    property OnProgress;
-  end;
-
-{ TDecompressionStream decompresses data on the fly as data is read from it.
-
-  Compressed data comes from a separate source stream.  TDecompressionStream
-  is read-only and unidirectional; you can seek forward in the stream, but not
-  backwards.  The special case of setting the stream position to zero is
-  allowed.  Seeking forward decompresses data until the requested position in
-  the uncompressed data has been reached.  Seeking backwards, seeking relative
-  to the end of the stream, requesting the size of the stream, and writing to
-  the stream will raise an exception.
-
-  The Position property returns the number of bytes of uncompressed data that
-  have been read from the stream so far.
-
-  The OnProgress event is called each time the internal input buffer of
-  compressed data is exhausted and the next block is read from the input stream.
-  This is useful for updating a progress indicator when you are reading a
-  large chunk of data from the decompression stream in a single call.}
-
-  TDecompressionStream = class(TCustomZlibStream)
-  public
-    constructor Create(Source: TStream);
-    destructor Destroy; override;
-    function Read(var Buffer; Count: Longint): Longint; override;
-    function Write(const Buffer; Count: Longint): Longint; override;
-    function Seek(Offset: Longint; Origin: Word): Longint; override;
-    property OnProgress;
-  end;
-
-
-
-{ CompressBuf compresses data, buffer to buffer, in one call.
-   In: InBuf = ptr to compressed data
-       InBytes = number of bytes in InBuf
-  Out: OutBuf = ptr to newly allocated buffer containing decompressed data
-       OutBytes = number of bytes in OutBuf   }
-procedure CompressBuf(const InBuf: Pointer; InBytes: Integer;
-                      out OutBuf: Pointer; out OutBytes: Integer);
-
-
-{ DecompressBuf decompresses data, buffer to buffer, in one call.
-   In: InBuf = ptr to compressed data
-       InBytes = number of bytes in InBuf
-       OutEstimate = zero, or est. size of the decompressed data
-  Out: OutBuf = ptr to newly allocated buffer containing decompressed data
-       OutBytes = number of bytes in OutBuf   }
-procedure DecompressBuf(const InBuf: Pointer; InBytes: Integer;
- OutEstimate: Integer; out OutBuf: Pointer; out OutBytes: Integer);
-
-{ DecompressToUserBuf decompresses data, buffer to buffer, in one call.
-   In: InBuf = ptr to compressed data
-       InBytes = number of bytes in InBuf
-  Out: OutBuf = ptr to user-allocated buffer to contain decompressed data
-       BufSize = number of bytes in OutBuf   }
-procedure DecompressToUserBuf(const InBuf: Pointer; InBytes: Integer;
-  const OutBuf: Pointer; BufSize: Integer);
-
-const
-  zlib_version = '1.2.3';
-
-type
-  EZlibError = class(Exception);
-  ECompressionError = class(EZlibError);
-  EDecompressionError = class(EZlibError);
-
-implementation
-
-uses ZLibConst;
-
-const
-  Z_NO_FLUSH      = 0;
-  Z_PARTIAL_FLUSH = 1;
-  Z_SYNC_FLUSH    = 2;
-  Z_FULL_FLUSH    = 3;
-  Z_FINISH        = 4;
-
-  Z_OK            = 0;
-  Z_STREAM_END    = 1;
-  Z_NEED_DICT     = 2;
-  Z_ERRNO         = (-1);
-  Z_STREAM_ERROR  = (-2);
-  Z_DATA_ERROR    = (-3);
-  Z_MEM_ERROR     = (-4);
-  Z_BUF_ERROR     = (-5);
-  Z_VERSION_ERROR = (-6);
-
-  Z_NO_COMPRESSION       =   0;
-  Z_BEST_SPEED           =   1;
-  Z_BEST_COMPRESSION     =   9;
-  Z_DEFAULT_COMPRESSION  = (-1);
-
-  Z_FILTERED            = 1;
-  Z_HUFFMAN_ONLY        = 2;
-  Z_RLE                 = 3;
-  Z_DEFAULT_STRATEGY    = 0;
-
-  Z_BINARY   = 0;
-  Z_ASCII    = 1;
-  Z_UNKNOWN  = 2;
-
-  Z_DEFLATED = 8;
-
-
-{$L adler32.obj}
-{$L compress.obj}
-{$L crc32.obj}
-{$L deflate.obj}
-{$L infback.obj}
-{$L inffast.obj}
-{$L inflate.obj}
-{$L inftrees.obj}
-{$L trees.obj}
-{$L uncompr.obj}
-{$L zutil.obj}
-
-procedure adler32; external;
-procedure compressBound; external;
-procedure crc32; external;
-procedure deflateInit2_; external;
-procedure deflateParams; external;
-
-function _malloc(Size: Integer): Pointer; cdecl;
-begin
-  Result := AllocMem(Size);
-end;
-
-procedure _free(Block: Pointer); cdecl;
-begin
-  FreeMem(Block);
-end;
-
-procedure _memset(P: Pointer; B: Byte; count: Integer); cdecl;
-begin
-  FillChar(P^, count, B);
-end;
-
-procedure _memcpy(dest, source: Pointer; count: Integer); cdecl;
-begin
-  Move(source^, dest^, count);
-end;
-
-
-
-// deflate compresses data
-function deflateInit_(var strm: TZStreamRec; level: Integer; version: PChar;
-  recsize: Integer): Integer; external;
-function deflate(var strm: TZStreamRec; flush: Integer): Integer; external;
-function deflateEnd(var strm: TZStreamRec): Integer; external;
-
-// inflate decompresses data
-function inflateInit_(var strm: TZStreamRec; version: PChar;
-  recsize: Integer): Integer; external;
-function inflate(var strm: TZStreamRec; flush: Integer): Integer; external;
-function inflateEnd(var strm: TZStreamRec): Integer; external;
-function inflateReset(var strm: TZStreamRec): Integer; external;
-
-
-function zlibAllocMem(AppData: Pointer; Items, Size: Integer): Pointer; cdecl;
-begin
-//  GetMem(Result, Items*Size);
-  Result := AllocMem(Items * Size);
-end;
-
-procedure zlibFreeMem(AppData, Block: Pointer); cdecl;
-begin
-  FreeMem(Block);
-end;
-
-{function zlibCheck(code: Integer): Integer;
-begin
-  Result := code;
-  if code < 0 then
-    raise EZlibError.Create('error');    //!!
-end;}
-
-function CCheck(code: Integer): Integer;
-begin
-  Result := code;
-  if code < 0 then
-    raise ECompressionError.Create('error'); //!!
-end;
-
-function DCheck(code: Integer): Integer;
-begin
-  Result := code;
-  if code < 0 then
-    raise EDecompressionError.Create('error');  //!!
-end;
-
-procedure CompressBuf(const InBuf: Pointer; InBytes: Integer;
-                      out OutBuf: Pointer; out OutBytes: Integer);
-var
-  strm: TZStreamRec;
-  P: Pointer;
-begin
-  FillChar(strm, sizeof(strm), 0);
-  strm.zalloc := zlibAllocMem;
-  strm.zfree := zlibFreeMem;
-  OutBytes := ((InBytes + (InBytes div 10) + 12) + 255) and not 255;
-  GetMem(OutBuf, OutBytes);
-  try
-    strm.next_in := InBuf;
-    strm.avail_in := InBytes;
-    strm.next_out := OutBuf;
-    strm.avail_out := OutBytes;
-    CCheck(deflateInit_(strm, Z_BEST_COMPRESSION, zlib_version, sizeof(strm)));
-    try
-      while CCheck(deflate(strm, Z_FINISH)) <> Z_STREAM_END do
-      begin
-        P := OutBuf;
-        Inc(OutBytes, 256);
-        ReallocMem(OutBuf, OutBytes);
-        strm.next_out := PChar(Integer(OutBuf) + (Integer(strm.next_out) - Integer(P)));
-        strm.avail_out := 256;
-      end;
-    finally
-      CCheck(deflateEnd(strm));
-    end;
-    ReallocMem(OutBuf, strm.total_out);
-    OutBytes := strm.total_out;
-  except
-    FreeMem(OutBuf);
-    raise
-  end;
-end;
-
-
-procedure DecompressBuf(const InBuf: Pointer; InBytes: Integer;
-  OutEstimate: Integer; out OutBuf: Pointer; out OutBytes: Integer);
-var
-  strm: TZStreamRec;
-  P: Pointer;
-  BufInc: Integer;
-begin
-  FillChar(strm, sizeof(strm), 0);
-  strm.zalloc := zlibAllocMem;
-  strm.zfree := zlibFreeMem;
-  BufInc := (InBytes + 255) and not 255;
-  if OutEstimate = 0 then
-    OutBytes := BufInc
-  else
-    OutBytes := OutEstimate;
-  GetMem(OutBuf, OutBytes);
-  try
-    strm.next_in := InBuf;
-    strm.avail_in := InBytes;
-    strm.next_out := OutBuf;
-    strm.avail_out := OutBytes;
-    DCheck(inflateInit_(strm, zlib_version, sizeof(strm)));
-    try
-      while DCheck(inflate(strm, Z_NO_FLUSH)) <> Z_STREAM_END do
-      begin
-        P := OutBuf;
-        Inc(OutBytes, BufInc);
-        ReallocMem(OutBuf, OutBytes);
-        strm.next_out := PChar(Integer(OutBuf) + (Integer(strm.next_out) - Integer(P)));
-        strm.avail_out := BufInc;
-      end;
-    finally
-      DCheck(inflateEnd(strm));
-    end;
-    ReallocMem(OutBuf, strm.total_out);
-    OutBytes := strm.total_out;
-  except
-    FreeMem(OutBuf);
-    raise
-  end;
-end;
-
-procedure DecompressToUserBuf(const InBuf: Pointer; InBytes: Integer;
-  const OutBuf: Pointer; BufSize: Integer);
-var
-  strm: TZStreamRec;
-begin
-  FillChar(strm, sizeof(strm), 0);
-  strm.zalloc := zlibAllocMem;
-  strm.zfree := zlibFreeMem;
-  strm.next_in := InBuf;
-  strm.avail_in := InBytes;
-  strm.next_out := OutBuf;
-  strm.avail_out := BufSize;
-  DCheck(inflateInit_(strm, zlib_version, sizeof(strm)));
-  try
-    if DCheck(inflate(strm, Z_FINISH)) <> Z_STREAM_END then
-      raise EZlibError.CreateRes(@sTargetBufferTooSmall);
-  finally
-    DCheck(inflateEnd(strm));
-  end;
-end;
-
-// TCustomZlibStream
-
-constructor TCustomZLibStream.Create(Strm: TStream);
-begin
-  inherited Create;
-  FStrm := Strm;
-  FStrmPos := Strm.Position;
-  FZRec.zalloc := zlibAllocMem;
-  FZRec.zfree := zlibFreeMem;
-end;
-
-procedure TCustomZLibStream.Progress(Sender: TObject);
-begin
-  if Assigned(FOnProgress) then FOnProgress(Sender);
-end;
-
-
-// TCompressionStream
-
-constructor TCompressionStream.Create(CompressionLevel: TCompressionLevel;
-  Dest: TStream);
-const
-  Levels: array [TCompressionLevel] of ShortInt =
-    (Z_NO_COMPRESSION, Z_BEST_SPEED, Z_DEFAULT_COMPRESSION, Z_BEST_COMPRESSION);
-begin
-  inherited Create(Dest);
-  FZRec.next_out := FBuffer;
-  FZRec.avail_out := sizeof(FBuffer);
-  CCheck(deflateInit_(FZRec, Levels[CompressionLevel], zlib_version, sizeof(FZRec)));
-end;
-
-destructor TCompressionStream.Destroy;
-begin
-  FZRec.next_in := nil;
-  FZRec.avail_in := 0;
-  try
-    if FStrm.Position <> FStrmPos then FStrm.Position := FStrmPos;
-    while (CCheck(deflate(FZRec, Z_FINISH)) <> Z_STREAM_END)
-      and (FZRec.avail_out = 0) do
-    begin
-      FStrm.WriteBuffer(FBuffer, sizeof(FBuffer));
-      FZRec.next_out := FBuffer;
-      FZRec.avail_out := sizeof(FBuffer);
-    end;
-    if FZRec.avail_out < sizeof(FBuffer) then
-      FStrm.WriteBuffer(FBuffer, sizeof(FBuffer) - FZRec.avail_out);
-  finally
-    deflateEnd(FZRec);
-  end;
-  inherited Destroy;
-end;
-
-function TCompressionStream.Read(var Buffer; Count: Longint): Longint;
-begin
-  raise ECompressionError.CreateRes(@sInvalidStreamOp);
-end;
-
-function TCompressionStream.Write(const Buffer; Count: Longint): Longint;
-begin
-  FZRec.next_in := @Buffer;
-  FZRec.avail_in := Count;
-  if FStrm.Position <> FStrmPos then FStrm.Position := FStrmPos;
-  while (FZRec.avail_in > 0) do
-  begin
-    CCheck(deflate(FZRec, 0));
-    if FZRec.avail_out = 0 then
-    begin
-      FStrm.WriteBuffer(FBuffer, sizeof(FBuffer));
-      FZRec.next_out := FBuffer;
-      FZRec.avail_out := sizeof(FBuffer);
-      FStrmPos := FStrm.Position;
-      Progress(Self);
-    end;
-  end;
-  Result := Count;
-end;
-
-function TCompressionStream.Seek(Offset: Longint; Origin: Word): Longint;
-begin
-  if (Offset = 0) and (Origin = soFromCurrent) then
-    Result := FZRec.total_in
-  else
-    raise ECompressionError.CreateRes(@sInvalidStreamOp);
-end;
-
-function TCompressionStream.GetCompressionRate: Single;
-begin
-  if FZRec.total_in = 0 then
-    Result := 0
-  else
-    Result := (1.0 - (FZRec.total_out / FZRec.total_in)) * 100.0;
-end;
-
-
-// TDecompressionStream
-
-constructor TDecompressionStream.Create(Source: TStream);
-begin
-  inherited Create(Source);
-  FZRec.next_in := FBuffer;
-  FZRec.avail_in := 0;
-  DCheck(inflateInit_(FZRec, zlib_version, sizeof(FZRec)));
-end;
-
-destructor TDecompressionStream.Destroy;
-begin
-  FStrm.Seek(-FZRec.avail_in, 1);
-  inflateEnd(FZRec);
-  inherited Destroy;
-end;
-
-function TDecompressionStream.Read(var Buffer; Count: Longint): Longint;
-begin
-  FZRec.next_out := @Buffer;
-  FZRec.avail_out := Count;
-  if FStrm.Position <> FStrmPos then FStrm.Position := FStrmPos;
-  while (FZRec.avail_out > 0) do
-  begin
-    if FZRec.avail_in = 0 then
-    begin
-      FZRec.avail_in := FStrm.Read(FBuffer, sizeof(FBuffer));
-      if FZRec.avail_in = 0 then
-      begin
-        Result := Count - FZRec.avail_out;
-        Exit;
-      end;
-      FZRec.next_in := FBuffer;
-      FStrmPos := FStrm.Position;
-      Progress(Self);
-    end;
-    CCheck(inflate(FZRec, 0));
-  end;
-  Result := Count;
-end;
-
-function TDecompressionStream.Write(const Buffer; Count: Longint): Longint;
-begin
-  raise EDecompressionError.CreateRes(@sInvalidStreamOp);
-end;
-
-function TDecompressionStream.Seek(Offset: Longint; Origin: Word): Longint;
-var
-  I: Integer;
-  Buf: array [0..4095] of Char;
-begin
-  if (Offset = 0) and (Origin = soFromBeginning) then
-  begin
-    DCheck(inflateReset(FZRec));
-    FZRec.next_in := FBuffer;
-    FZRec.avail_in := 0;
-    FStrm.Position := 0;
-    FStrmPos := 0;
-  end
-  else if ( (Offset >= 0) and (Origin = soFromCurrent)) or
-          ( ((Offset - FZRec.total_out) > 0) and (Origin = soFromBeginning)) then
-  begin
-    if Origin = soFromBeginning then Dec(Offset, FZRec.total_out);
-    if Offset > 0 then
-    begin
-      for I := 1 to Offset div sizeof(Buf) do
-        ReadBuffer(Buf, sizeof(Buf));
-      ReadBuffer(Buf, Offset mod sizeof(Buf));
-    end;
-  end
-  else
-    raise EDecompressionError.CreateRes(@sInvalidStreamOp);
-  Result := FZRec.total_out;
-end;
-
-
-end.
Index: trunk/minix/lib/zlib-1.2.3/contrib/delphi/ZLibConst.pas
===================================================================
--- trunk/minix/lib/zlib-1.2.3/contrib/delphi/ZLibConst.pas	(revision 9)
+++ 	(revision )
@@ -1,11 +1,0 @@
-unit ZLibConst;
-
-interface
-
-resourcestring
-  sTargetBufferTooSmall = 'ZLib error: target buffer may be too small';
-  sInvalidStreamOp = 'Invalid stream operation';
-
-implementation
-
-end.
Index: trunk/minix/lib/zlib-1.2.3/contrib/delphi/readme.txt
===================================================================
--- trunk/minix/lib/zlib-1.2.3/contrib/delphi/readme.txt	(revision 9)
+++ 	(revision )
@@ -1,76 +1,0 @@
-
-Overview
-========
-
-This directory contains an update to the ZLib interface unit,
-distributed by Borland as a Delphi supplemental component.
-
-The original ZLib unit is Copyright (c) 1997,99 Borland Corp.,
-and is based on zlib version 1.0.4.  There are a series of bugs
-and security problems associated with that old zlib version, and
-we recommend the users to update their ZLib unit.
-
-
-Summary of modifications
-========================
-
-- Improved makefile, adapted to zlib version 1.2.1.
-
-- Some field types from TZStreamRec are changed from Integer to
-  Longint, for consistency with the zlib.h header, and for 64-bit
-  readiness.
-
-- The zlib_version constant is updated.
-
-- The new Z_RLE strategy has its corresponding symbolic constant.
-
-- The allocation and deallocation functions and function types
-  (TAlloc, TFree, zlibAllocMem and zlibFreeMem) are now cdecl,
-  and _malloc and _free are added as C RTL stubs.  As a result,
-  the original C sources of zlib can be compiled out of the box,
-  and linked to the ZLib unit.
-
-
-Suggestions for improvements
-============================
-
-Currently, the ZLib unit provides only a limited wrapper around
-the zlib library, and much of the original zlib functionality is
-missing.  Handling compressed file formats like ZIP/GZIP or PNG
-cannot be implemented without having this functionality.
-Applications that handle these formats are either using their own,
-duplicated code, or not using the ZLib unit at all.
-
-Here are a few suggestions:
-
-- Checksum class wrappers around adler32() and crc32(), similar
-  to the Java classes that implement the java.util.zip.Checksum
-  interface.
-
-- The ability to read and write raw deflate streams, without the
-  zlib stream header and trailer.  Raw deflate streams are used
-  in the ZIP file format.
-
-- The ability to read and write gzip streams, used in the GZIP
-  file format, and normally produced by the gzip program.
-
-- The ability to select a different compression strategy, useful
-  to PNG and MNG image compression, and to multimedia compression
-  in general.  Besides the compression level
-
-    TCompressionLevel = (clNone, clFastest, clDefault, clMax);
-
-  which, in fact, could have used the 'z' prefix and avoided
-  TColor-like symbols
-
-    TCompressionLevel = (zcNone, zcFastest, zcDefault, zcMax);
-
-  there could be a compression strategy
-
-    TCompressionStrategy = (zsDefault, zsFiltered, zsHuffmanOnly, zsRle);
-
-- ZIP and GZIP stream handling via TStreams.
-
-
---
-Cosmin Truta <cosmint@cs.ubbcluj.ro>
Index: trunk/minix/lib/zlib-1.2.3/contrib/delphi/zlibd32.mak
===================================================================
--- trunk/minix/lib/zlib-1.2.3/contrib/delphi/zlibd32.mak	(revision 9)
+++ 	(revision )
@@ -1,93 +1,0 @@
-# Makefile for zlib
-# For use with Delphi and C++ Builder under Win32
-# Updated for zlib 1.2.x by Cosmin Truta
-
-# ------------ Borland C++ ------------
-
-# This project uses the Delphi (fastcall/register) calling convention:
-LOC = -DZEXPORT=__fastcall -DZEXPORTVA=__cdecl
-
-CC = bcc32
-LD = bcc32
-AR = tlib
-# do not use "-pr" in CFLAGS
-CFLAGS = -a -d -k- -O2 $(LOC)
-LDFLAGS =
-
-
-# variables
-ZLIB_LIB = zlib.lib
-
-OBJ1 = adler32.obj compress.obj crc32.obj deflate.obj gzio.obj infback.obj
-OBJ2 = inffast.obj inflate.obj inftrees.obj trees.obj uncompr.obj zutil.obj
-OBJP1 = +adler32.obj+compress.obj+crc32.obj+deflate.obj+gzio.obj+infback.obj
-OBJP2 = +inffast.obj+inflate.obj+inftrees.obj+trees.obj+uncompr.obj+zutil.obj
-
-
-# targets
-all: $(ZLIB_LIB) example.exe minigzip.exe
-
-.c.obj:
-	$(CC) -c $(CFLAGS) $*.c
-
-adler32.obj: adler32.c zlib.h zconf.h
-
-compress.obj: compress.c zlib.h zconf.h
-
-crc32.obj: crc32.c zlib.h zconf.h crc32.h
-
-deflate.obj: deflate.c deflate.h zutil.h zlib.h zconf.h
-
-gzio.obj: gzio.c zutil.h zlib.h zconf.h
-
-infback.obj: infback.c zutil.h zlib.h zconf.h inftrees.h inflate.h \
- inffast.h inffixed.h
-
-inffast.obj: inffast.c zutil.h zlib.h zconf.h inftrees.h inflate.h \
- inffast.h
-
-inflate.obj: inflate.c zutil.h zlib.h zconf.h inftrees.h inflate.h \
- inffast.h inffixed.h
-
-inftrees.obj: inftrees.c zutil.h zlib.h zconf.h inftrees.h
-
-trees.obj: trees.c zutil.h zlib.h zconf.h deflate.h trees.h
-
-uncompr.obj: uncompr.c zlib.h zconf.h
-
-zutil.obj: zutil.c zutil.h zlib.h zconf.h
-
-example.obj: example.c zlib.h zconf.h
-
-minigzip.obj: minigzip.c zlib.h zconf.h
-
-
-# For the sake of the old Borland make,
-# the command line is cut to fit in the MS-DOS 128 byte limit:
-$(ZLIB_LIB): $(OBJ1) $(OBJ2)
-	-del $(ZLIB_LIB)
-	$(AR) $(ZLIB_LIB) $(OBJP1)
-	$(AR) $(ZLIB_LIB) $(OBJP2)
-
-
-# testing
-test: example.exe minigzip.exe
-	example
-	echo hello world | minigzip | minigzip -d
-
-example.exe: example.obj $(ZLIB_LIB)
-	$(LD) $(LDFLAGS) example.obj $(ZLIB_LIB)
-
-minigzip.exe: minigzip.obj $(ZLIB_LIB)
-	$(LD) $(LDFLAGS) minigzip.obj $(ZLIB_LIB)
-
-
-# cleanup
-clean:
-	-del *.obj
-	-del *.exe
-	-del *.lib
-	-del *.tds
-	-del zlib.bak
-	-del foo.gz
-
Index: trunk/minix/lib/zlib-1.2.3/contrib/dotzlib/DotZLib.build
===================================================================
--- trunk/minix/lib/zlib-1.2.3/contrib/dotzlib/DotZLib.build	(revision 9)
+++ 	(revision )
@@ -1,33 +1,0 @@
-﻿<?xml version="1.0" encoding="utf-8" ?>
-<project name="DotZLib" default="build" basedir="./DotZLib">
-	<description>A .Net wrapper library around ZLib1.dll</description>
-
-	<property name="nunit.location" value="c:/program files/NUnit V2.1/bin" />
-	<property name="build.root" value="bin" />
-	
-	<property name="debug" value="true" />
-	<property name="nunit" value="true" />
-
-	<property name="build.folder" value="${build.root}/debug/" if="${debug}" />
-	<property name="build.folder" value="${build.root}/release/" unless="${debug}" />
-
-	<target name="clean" description="Remove all generated files">
-		<delete dir="${build.root}" failonerror="false" />
-	</target>
-
-	<target name="build" description="compiles the source code">
-		
-		<mkdir dir="${build.folder}" />
-		<csc target="library" output="${build.folder}DotZLib.dll" debug="${debug}">
-			<references basedir="${nunit.location}">
-				<includes if="${nunit}" name="nunit.framework.dll" />
-			</references>
-			<sources>
-				<includes name="*.cs" />
-				<excludes name="UnitTests.cs" unless="${nunit}" />
-			</sources>
-			<arg value="/d:nunit" if="${nunit}" />
-		</csc>
-	</target>
-
-</project>
Index: trunk/minix/lib/zlib-1.2.3/contrib/dotzlib/DotZLib.sln
===================================================================
--- trunk/minix/lib/zlib-1.2.3/contrib/dotzlib/DotZLib.sln	(revision 9)
+++ 	(revision )
@@ -1,21 +1,0 @@
-Microsoft Visual Studio Solution File, Format Version 8.00
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DotZLib", "DotZLib\DotZLib.csproj", "{BB1EE0B1-1808-46CB-B786-949D91117FC5}"
-	ProjectSection(ProjectDependencies) = postProject
-	EndProjectSection
-EndProject
-Global
-	GlobalSection(SolutionConfiguration) = preSolution
-		Debug = Debug
-		Release = Release
-	EndGlobalSection
-	GlobalSection(ProjectConfiguration) = postSolution
-		{BB1EE0B1-1808-46CB-B786-949D91117FC5}.Debug.ActiveCfg = Debug|.NET
-		{BB1EE0B1-1808-46CB-B786-949D91117FC5}.Debug.Build.0 = Debug|.NET
-		{BB1EE0B1-1808-46CB-B786-949D91117FC5}.Release.ActiveCfg = Release|.NET
-		{BB1EE0B1-1808-46CB-B786-949D91117FC5}.Release.Build.0 = Release|.NET
-	EndGlobalSection
-	GlobalSection(ExtensibilityGlobals) = postSolution
-	EndGlobalSection
-	GlobalSection(ExtensibilityAddIns) = postSolution
-	EndGlobalSection
-EndGlobal
Index: trunk/minix/lib/zlib-1.2.3/contrib/dotzlib/DotZLib/AssemblyInfo.cs
===================================================================
--- trunk/minix/lib/zlib-1.2.3/contrib/dotzlib/DotZLib/AssemblyInfo.cs	(revision 9)
+++ 	(revision )
@@ -1,58 +1,0 @@
-using System.Reflection;
-using System.Runtime.CompilerServices;
-
-//
-// General Information about an assembly is controlled through the following 
-// set of attributes. Change these attribute values to modify the information
-// associated with an assembly.
-//
-[assembly: AssemblyTitle("DotZLib")]
-[assembly: AssemblyDescription(".Net bindings for ZLib compression dll 1.2.x")]
-[assembly: AssemblyConfiguration("")]
-[assembly: AssemblyCompany("Henrik Ravn")]
-[assembly: AssemblyProduct("")]
-[assembly: AssemblyCopyright("(c) 2004 by Henrik Ravn")]
-[assembly: AssemblyTrademark("")]
-[assembly: AssemblyCulture("")]		
-
-//
-// Version information for an assembly consists of the following four values:
-//
-//      Major Version
-//      Minor Version 
-//      Build Number
-//      Revision
-//
-// You can specify all the values or you can default the Revision and Build Numbers 
-// by using the '*' as shown below:
-
-[assembly: AssemblyVersion("1.0.*")]
-
-//
-// In order to sign your assembly you must specify a key to use. Refer to the 
-// Microsoft .NET Framework documentation for more information on assembly signing.
-//
-// Use the attributes below to control which key is used for signing. 
-//
-// Notes: 
-//   (*) If no key is specified, the assembly is not signed.
-//   (*) KeyName refers to a key that has been installed in the Crypto Service
-//       Provider (CSP) on your machine. KeyFile refers to a file which contains
-//       a key.
-//   (*) If the KeyFile and the KeyName values are both specified, the 
-//       following processing occurs:
-//       (1) If the KeyName can be found in the CSP, that key is used.
-//       (2) If the KeyName does not exist and the KeyFile does exist, the key 
-//           in the KeyFile is installed into the CSP and used.
-//   (*) In order to create a KeyFile, you can use the sn.exe (Strong Name) utility.
-//       When specifying the KeyFile, the location of the KeyFile should be
-//       relative to the project output directory which is
-//       %Project Directory%\obj\<configuration>. For example, if your KeyFile is
-//       located in the project directory, you would specify the AssemblyKeyFile 
-//       attribute as [assembly: AssemblyKeyFile("..\\..\\mykey.snk")]
-//   (*) Delay Signing is an advanced option - see the Microsoft .NET Framework
-//       documentation for more information on this.
-//
-[assembly: AssemblyDelaySign(false)]
-[assembly: AssemblyKeyFile("")]
-[assembly: AssemblyKeyName("")]
Index: trunk/minix/lib/zlib-1.2.3/contrib/dotzlib/DotZLib/ChecksumImpl.cs
===================================================================
--- trunk/minix/lib/zlib-1.2.3/contrib/dotzlib/DotZLib/ChecksumImpl.cs	(revision 9)
+++ 	(revision )
@@ -1,202 +1,0 @@
-//
-// © Copyright Henrik Ravn 2004
-//
-// Use, modification and distribution are subject to the Boost Software License, Version 1.0. 
-// (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
-//
-
-using System;
-using System.Runtime.InteropServices;
-using System.Text;
-
-
-namespace DotZLib
-{
-    #region ChecksumGeneratorBase
-    /// <summary>
-    /// Implements the common functionality needed for all <see cref="ChecksumGenerator"/>s
-    /// </summary>
-    /// <example></example>
-    public abstract class ChecksumGeneratorBase : ChecksumGenerator
-    {
-        /// <summary>
-        /// The value of the current checksum
-        /// </summary>
-        protected uint _current;
-
-        /// <summary>
-        /// Initializes a new instance of the checksum generator base - the current checksum is 
-        /// set to zero
-        /// </summary>
-        public ChecksumGeneratorBase()
-        {
-            _current = 0;
-        }
-
-        /// <summary>
-        /// Initializes a new instance of the checksum generator basewith a specified value
-        /// </summary>
-        /// <param name="initialValue">The value to set the current checksum to</param>
-        public ChecksumGeneratorBase(uint initialValue)
-        {
-            _current = initialValue;
-        }
-
-        /// <summary>
-        /// Resets the current checksum to zero
-        /// </summary>
-        public void Reset() { _current = 0; }
-
-        /// <summary>
-        /// Gets the current checksum value
-        /// </summary>
-        public uint Value { get { return _current; } }
-
-        /// <summary>
-        /// Updates the current checksum with part of an array of bytes
-        /// </summary>
-        /// <param name="data">The data to update the checksum with</param>
-        /// <param name="offset">Where in <c>data</c> to start updating</param>
-        /// <param name="count">The number of bytes from <c>data</c> to use</param>
-        /// <exception cref="ArgumentException">The sum of offset and count is larger than the length of <c>data</c></exception>
-        /// <exception cref="NullReferenceException"><c>data</c> is a null reference</exception>
-        /// <exception cref="ArgumentOutOfRangeException">Offset or count is negative.</exception>
-        /// <remarks>All the other <c>Update</c> methods are implmeneted in terms of this one. 
-        /// This is therefore the only method a derived class has to implement</remarks>
-        public abstract void Update(byte[] data, int offset, int count);
-
-        /// <summary>
-        /// Updates the current checksum with an array of bytes.
-        /// </summary>
-        /// <param name="data">The data to update the checksum with</param>
-        public void Update(byte[] data)
-        {
-            Update(data, 0, data.Length);
-        }
-
-        /// <summary>
-        /// Updates the current checksum with the data from a string
-        /// </summary>
-        /// <param name="data">The string to update the checksum with</param>
-        /// <remarks>The characters in the string are converted by the UTF-8 encoding</remarks>
-        public void Update(string data)
-        {
-			Update(Encoding.UTF8.GetBytes(data));
-        }
-
-        /// <summary>
-        /// Updates the current checksum with the data from a string, using a specific encoding
-        /// </summary>
-        /// <param name="data">The string to update the checksum with</param>
-        /// <param name="encoding">The encoding to use</param>
-        public void Update(string data, Encoding encoding)
-        {
-            Update(encoding.GetBytes(data));
-        }
-
-    }
-    #endregion
-
-    #region CRC32
-    /// <summary>
-    /// Implements a CRC32 checksum generator
-    /// </summary>
-    public sealed class CRC32Checksum : ChecksumGeneratorBase    
-    {
-        #region DLL imports
-
-        [DllImport("ZLIB1.dll", CallingConvention=CallingConvention.Cdecl)]
-        private static extern uint crc32(uint crc, int data, uint length);
-
-        #endregion
-
-        /// <summary>
-        /// Initializes a new instance of the CRC32 checksum generator
-        /// </summary>
-        public CRC32Checksum() : base() {}
-
-        /// <summary>
-        /// Initializes a new instance of the CRC32 checksum generator with a specified value
-        /// </summary>
-        /// <param name="initialValue">The value to set the current checksum to</param>
-        public CRC32Checksum(uint initialValue) : base(initialValue) {}
-
-        /// <summary>
-        /// Updates the current checksum with part of an array of bytes
-        /// </summary>
-        /// <param name="data">The data to update the checksum with</param>
-        /// <param name="offset">Where in <c>data</c> to start updating</param>
-        /// <param name="count">The number of bytes from <c>data</c> to use</param>
-        /// <exception cref="ArgumentException">The sum of offset and count is larger than the length of <c>data</c></exception>
-        /// <exception cref="NullReferenceException"><c>data</c> is a null reference</exception>
-        /// <exception cref="ArgumentOutOfRangeException">Offset or count is negative.</exception>
-        public override void Update(byte[] data, int offset, int count)
-        {
-            if (offset < 0 || count < 0) throw new ArgumentOutOfRangeException();
-            if ((offset+count) > data.Length) throw new ArgumentException();
-            GCHandle hData = GCHandle.Alloc(data, GCHandleType.Pinned);
-            try
-            {
-                _current = crc32(_current, hData.AddrOfPinnedObject().ToInt32()+offset, (uint)count);
-            }
-            finally
-            {
-                hData.Free();
-            }
-        }
-
-    }
-    #endregion
-
-    #region Adler
-    /// <summary>
-    /// Implements a checksum generator that computes the Adler checksum on data
-    /// </summary>
-    public sealed class AdlerChecksum : ChecksumGeneratorBase    
-    {
-        #region DLL imports
-
-        [DllImport("ZLIB1.dll", CallingConvention=CallingConvention.Cdecl)]
-        private static extern uint adler32(uint adler, int data, uint length);
-
-        #endregion
-
-        /// <summary>
-        /// Initializes a new instance of the Adler checksum generator
-        /// </summary>
-        public AdlerChecksum() : base() {}
-
-        /// <summary>
-        /// Initializes a new instance of the Adler checksum generator with a specified value
-        /// </summary>
-        /// <param name="initialValue">The value to set the current checksum to</param>
-        public AdlerChecksum(uint initialValue) : base(initialValue) {}
-
-        /// <summary>
-        /// Updates the current checksum with part of an array of bytes
-        /// </summary>
-        /// <param name="data">The data to update the checksum with</param>
-        /// <param name="offset">Where in <c>data</c> to start updating</param>
-        /// <param name="count">The number of bytes from <c>data</c> to use</param>
-        /// <exception cref="ArgumentException">The sum of offset and count is larger than the length of <c>data</c></exception>
-        /// <exception cref="NullReferenceException"><c>data</c> is a null reference</exception>
-        /// <exception cref="ArgumentOutOfRangeException">Offset or count is negative.</exception>
-        public override void Update(byte[] data, int offset, int count)
-        {
-            if (offset < 0 || count < 0) throw new ArgumentOutOfRangeException();
-            if ((offset+count) > data.Length) throw new ArgumentException();
-            GCHandle hData = GCHandle.Alloc(data, GCHandleType.Pinned);
-            try
-            {
-                _current = adler32(_current, hData.AddrOfPinnedObject().ToInt32()+offset, (uint)count);
-            }
-            finally
-            {
-                hData.Free();
-            }
-        }
-
-    }
-    #endregion
-
-}
Index: trunk/minix/lib/zlib-1.2.3/contrib/dotzlib/DotZLib/CircularBuffer.cs
===================================================================
--- trunk/minix/lib/zlib-1.2.3/contrib/dotzlib/DotZLib/CircularBuffer.cs	(revision 9)
+++ 	(revision )
@@ -1,83 +1,0 @@
-//
-// © Copyright Henrik Ravn 2004
-//
-// Use, modification and distribution are subject to the Boost Software License, Version 1.0. 
-// (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
-//
-
-using System;
-using System.Diagnostics;
-
-namespace DotZLib
-{
-
-	/// <summary>
-	/// This class implements a circular buffer
-	/// </summary>
-	internal class CircularBuffer
-	{
-        #region Private data
-        private int _capacity;
-        private int _head;
-        private int _tail;
-        private int _size;
-        private byte[] _buffer;
-        #endregion
-
-        public CircularBuffer(int capacity)
-        {    
-            Debug.Assert( capacity > 0 );
-            _buffer = new byte[capacity];
-            _capacity = capacity;
-            _head = 0;
-            _tail = 0;
-            _size = 0;
-        }
-
-        public int Size { get { return _size; } }
-
-        public int Put(byte[] source, int offset, int count)
-        {
-            Debug.Assert( count > 0 );
-            int trueCount = Math.Min(count, _capacity - Size);
-            for (int i = 0; i < trueCount; ++i)
-                _buffer[(_tail+i) % _capacity] = source[offset+i];
-            _tail += trueCount;
-            _tail %= _capacity;
-            _size += trueCount;
-            return trueCount;
-        }
-
-        public bool Put(byte b)
-        {
-            if (Size == _capacity) // no room
-                return false;
-            _buffer[_tail++] = b;
-            _tail %= _capacity;
-            ++_size;
-            return true;
-        }
-
-        public int Get(byte[] destination, int offset, int count)
-        {
-            int trueCount = Math.Min(count,Size);
-            for (int i = 0; i < trueCount; ++i)
-                destination[offset + i] = _buffer[(_head+i) % _capacity];
-            _head += trueCount;
-            _head %= _capacity;
-            _size -= trueCount;
-            return trueCount;
-        }
-
-        public int Get()
-        {
-            if (Size == 0)
-                return -1;
-
-            int result = (int)_buffer[_head++ % _capacity];
-            --_size;
-            return result;
-        }
-
-    }
-}
Index: trunk/minix/lib/zlib-1.2.3/contrib/dotzlib/DotZLib/CodecBase.cs
===================================================================
--- trunk/minix/lib/zlib-1.2.3/contrib/dotzlib/DotZLib/CodecBase.cs	(revision 9)
+++ 	(revision )
@@ -1,198 +1,0 @@
-//
-// © Copyright Henrik Ravn 2004
-//
-// Use, modification and distribution are subject to the Boost Software License, Version 1.0. 
-// (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
-//
-
-using System;
-using System.Runtime.InteropServices;
-
-namespace DotZLib
-{
-	/// <summary>
-	/// Implements the common functionality needed for all <see cref="Codec"/>s
-	/// </summary>
-	public abstract class CodecBase : Codec, IDisposable
-	{
-
-        #region Data members
-
-        /// <summary>
-        /// Instance of the internal zlib buffer structure that is 
-        /// passed to all functions in the zlib dll
-        /// </summary>
-        internal ZStream _ztream = new ZStream();
-
-        /// <summary>
-        /// True if the object instance has been disposed, false otherwise
-        /// </summary>
-        protected bool _isDisposed = false;
-
-        /// <summary>
-        /// The size of the internal buffers
-        /// </summary>
-        protected const int kBufferSize = 16384;
-
-        private byte[] _outBuffer = new byte[kBufferSize];
-        private byte[] _inBuffer = new byte[kBufferSize];
-
-        private GCHandle _hInput;
-        private GCHandle _hOutput;
-
-        private uint _checksum = 0;
-
-        #endregion
-
-        /// <summary>
-        /// Initializes a new instance of the <c>CodeBase</c> class. 
-        /// </summary>
-		public CodecBase()
-		{
-            try
-            {
-                _hInput = GCHandle.Alloc(_inBuffer, GCHandleType.Pinned);
-                _hOutput = GCHandle.Alloc(_outBuffer, GCHandleType.Pinned);
-            }
-            catch (Exception)
-            {
-                CleanUp(false);
-                throw;
-            }
-        }
-
-
-        #region Codec Members
-
-        /// <summary>
-        /// Occurs when more processed data are available.
-        /// </summary>
-        public event DataAvailableHandler DataAvailable;
-
-        /// <summary>
-        /// Fires the <see cref="DataAvailable"/> event
-        /// </summary>
-        protected void OnDataAvailable()
-        {
-            if (_ztream.total_out > 0)
-            {
-                if (DataAvailable != null)
-                    DataAvailable( _outBuffer, 0, (int)_ztream.total_out); 
-                resetOutput();
-            }
-        }
-
-        /// <summary>
-        /// Adds more data to the codec to be processed.
-        /// </summary>
-        /// <param name="data">Byte array containing the data to be added to the codec</param>
-        /// <remarks>Adding data may, or may not, raise the <c>DataAvailable</c> event</remarks>
-        public void Add(byte[] data)
-        {
-            Add(data,0,data.Length);
-        }
-
-        /// <summary>
-        /// Adds more data to the codec to be processed.
-        /// </summary>
-        /// <param name="data">Byte array containing the data to be added to the codec</param>
-        /// <param name="offset">The index of the first byte to add from <c>data</c></param>
-        /// <param name="count">The number of bytes to add</param>
-        /// <remarks>Adding data may, or may not, raise the <c>DataAvailable</c> event</remarks>
-        /// <remarks>This must be implemented by a derived class</remarks>
-        public abstract void Add(byte[] data, int offset, int count);
-
-        /// <summary>
-        /// Finishes up any pending data that needs to be processed and handled.
-        /// </summary>
-        /// <remarks>This must be implemented by a derived class</remarks>
-        public abstract void Finish();
-
-        /// <summary>
-        /// Gets the checksum of the data that has been added so far
-        /// </summary>
-        public uint Checksum { get { return _checksum; } }
-
-        #endregion
-
-        #region Destructor & IDisposable stuff
-
-        /// <summary>
-        /// Destroys this instance
-        /// </summary>
-        ~CodecBase()
-        {
-            CleanUp(false);
-        }
-
-        /// <summary>
-        /// Releases any unmanaged resources and calls the <see cref="CleanUp()"/> method of the derived class
-        /// </summary>
-        public void Dispose()
-        {
-            CleanUp(true);
-        }
-
-        /// <summary>
-        /// Performs any codec specific cleanup
-        /// </summary>
-        /// <remarks>This must be implemented by a derived class</remarks>
-        protected abstract void CleanUp();
-
-        // performs the release of the handles and calls the dereived CleanUp()
-        private void CleanUp(bool isDisposing)
-        {
-            if (!_isDisposed)
-            {
-                CleanUp();
-                if (_hInput.IsAllocated)
-                    _hInput.Free();
-                if (_hOutput.IsAllocated)
-                    _hOutput.Free();
-
-                _isDisposed = true;
-            }
-        }
-
-
-        #endregion
-
-        #region Helper methods
-
-        /// <summary>
-        /// Copies a number of bytes to the internal codec buffer - ready for proccesing
-        /// </summary>
-        /// <param name="data">The byte array that contains the data to copy</param>
-        /// <param name="startIndex">The index of the first byte to copy</param>
-        /// <param name="count">The number of bytes to copy from <c>data</c></param>
-        protected void copyInput(byte[] data, int startIndex, int count)
-        {
-            Array.Copy(data, startIndex, _inBuffer,0, count);
-            _ztream.next_in = _hInput.AddrOfPinnedObject();
-            _ztream.total_in = 0;
-            _ztream.avail_in = (uint)count;
-
-        }
-
-        /// <summary>
-        /// Resets the internal output buffers to a known state - ready for processing
-        /// </summary>
-        protected void resetOutput()
-        {
-            _ztream.total_out = 0;
-            _ztream.avail_out = kBufferSize;
-            _ztream.next_out = _hOutput.AddrOfPinnedObject();
-        }
-
-        /// <summary>
-        /// Updates the running checksum property
-        /// </summary>
-        /// <param name="newSum">The new checksum value</param>
-        protected void setChecksum(uint newSum)
-        {
-            _checksum = newSum;
-        }
-        #endregion
-
-    }
-}
Index: trunk/minix/lib/zlib-1.2.3/contrib/dotzlib/DotZLib/Deflater.cs
===================================================================
--- trunk/minix/lib/zlib-1.2.3/contrib/dotzlib/DotZLib/Deflater.cs	(revision 9)
+++ 	(revision )
@@ -1,106 +1,0 @@
-//
-// © Copyright Henrik Ravn 2004
-//
-// Use, modification and distribution are subject to the Boost Software License, Version 1.0. 
-// (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
-//
-
-using System;
-using System.Diagnostics;
-using System.Runtime.InteropServices;
-
-namespace DotZLib
-{
-
-    /// <summary>
-    /// Implements a data compressor, using the deflate algorithm in the ZLib dll
-    /// </summary>
-	public sealed class Deflater : CodecBase
-	{
-        #region Dll imports
-        [DllImport("ZLIB1.dll", CallingConvention=CallingConvention.Cdecl, CharSet=CharSet.Ansi)]
-        private static extern int deflateInit_(ref ZStream sz, int level, string vs, int size);
-
-        [DllImport("ZLIB1.dll", CallingConvention=CallingConvention.Cdecl)]
-        private static extern int deflate(ref ZStream sz, int flush);
-
-        [DllImport("ZLIB1.dll", CallingConvention=CallingConvention.Cdecl)]
-        private static extern int deflateReset(ref ZStream sz);
-
-        [DllImport("ZLIB1.dll", CallingConvention=CallingConvention.Cdecl)]
-        private static extern int deflateEnd(ref ZStream sz);
-        #endregion
-
-        /// <summary>
-        /// Constructs an new instance of the <c>Deflater</c>
-        /// </summary>
-        /// <param name="level">The compression level to use for this <c>Deflater</c></param>
-		public Deflater(CompressLevel level) : base()
-		{
-            int retval = deflateInit_(ref _ztream, (int)level, Info.Version, Marshal.SizeOf(_ztream));
-            if (retval != 0)
-                throw new ZLibException(retval, "Could not initialize deflater");
-
-            resetOutput();
-		}
-
-        /// <summary>
-        /// Adds more data to the codec to be processed.
-        /// </summary>
-        /// <param name="data">Byte array containing the data to be added to the codec</param>
-        /// <param name="offset">The index of the first byte to add from <c>data</c></param>
-        /// <param name="count">The number of bytes to add</param>
-        /// <remarks>Adding data may, or may not, raise the <c>DataAvailable</c> event</remarks>
-        public override void Add(byte[] data, int offset, int count)
-        {
-            if (data == null) throw new ArgumentNullException();
-            if (offset < 0 || count < 0) throw new ArgumentOutOfRangeException();
-            if ((offset+count) > data.Length) throw new ArgumentException();
-            
-            int total = count;
-            int inputIndex = offset;
-            int err = 0;
-
-            while (err >= 0 && inputIndex < total)
-            {
-                copyInput(data, inputIndex, Math.Min(total - inputIndex, kBufferSize));
-                while (err >= 0 && _ztream.avail_in > 0)
-                {
-                    err = deflate(ref _ztream, (int)FlushTypes.None);
-                    if (err == 0)
-                        while (_ztream.avail_out == 0)
-                        {
-                            OnDataAvailable();
-                            err = deflate(ref _ztream, (int)FlushTypes.None);
-                        }
-                    inputIndex += (int)_ztream.total_in;
-                }
-            }
-            setChecksum( _ztream.adler );
-        }
-
-
-        /// <summary>
-        /// Finishes up any pending data that needs to be processed and handled.
-        /// </summary>
-        public override void Finish()
-        {
-            int err;
-            do 
-            {
-                err = deflate(ref _ztream, (int)FlushTypes.Finish);
-                OnDataAvailable();
-            }
-            while (err == 0);
-            setChecksum( _ztream.adler );
-            deflateReset(ref _ztream);
-            resetOutput();
-        }
-
-        /// <summary>
-        /// Closes the internal zlib deflate stream
-        /// </summary>
-        protected override void CleanUp() { deflateEnd(ref _ztream); }
-
-    }
-}
Index: trunk/minix/lib/zlib-1.2.3/contrib/dotzlib/DotZLib/DotZLib.cs
===================================================================
--- trunk/minix/lib/zlib-1.2.3/contrib/dotzlib/DotZLib/DotZLib.cs	(revision 9)
+++ 	(revision )
@@ -1,288 +1,0 @@
-//
-// © Copyright Henrik Ravn 2004
-//
-// Use, modification and distribution are subject to the Boost Software License, Version 1.0. 
-// (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
-//
-
-using System;
-using System.IO;
-using System.Runtime.InteropServices;
-using System.Text;
-
-
-namespace DotZLib
-{
-
-    #region Internal types
-
-    /// <summary>
-    /// Defines constants for the various flush types used with zlib
-    /// </summary>
-    internal enum FlushTypes 
-    {
-        None,  Partial,  Sync,  Full,  Finish,  Block
-    }
-
-    #region ZStream structure
-    // internal mapping of the zlib zstream structure for marshalling
-    [StructLayoutAttribute(LayoutKind.Sequential, Pack=4, Size=0, CharSet=CharSet.Ansi)]
-    internal struct ZStream
-    {
-        public IntPtr next_in;
-        public uint avail_in;
-        public uint total_in;
-
-        public IntPtr next_out;
-        public uint avail_out;
-        public uint total_out;
-
-        [MarshalAs(UnmanagedType.LPStr)]
-        string msg; 
-        uint state;
-
-        uint zalloc;
-        uint zfree;
-        uint opaque;
-
-        int data_type;
-        public uint adler;
-        uint reserved;
-    }
-
-    #endregion
-    
-    #endregion
-
-    #region Public enums
-    /// <summary>
-    /// Defines constants for the available compression levels in zlib
-    /// </summary>
-    public enum CompressLevel : int
-    {
-        /// <summary>
-        /// The default compression level with a reasonable compromise between compression and speed
-        /// </summary>
-        Default = -1,   
-        /// <summary>
-        /// No compression at all. The data are passed straight through.
-        /// </summary>
-        None = 0,
-        /// <summary>
-        /// The maximum compression rate available.
-        /// </summary>
-        Best = 9,   
-        /// <summary>
-        /// The fastest available compression level.
-        /// </summary>
-        Fastest = 1
-    }
-    #endregion
-
-    #region Exception classes
-    /// <summary>
-    /// The exception that is thrown when an error occurs on the zlib dll
-    /// </summary>
-    public class ZLibException : ApplicationException
-    {
-        /// <summary>
-        /// Initializes a new instance of the <see cref="ZLibException"/> class with a specified 
-        /// error message and error code
-        /// </summary>
-        /// <param name="errorCode">The zlib error code that caused the exception</param>
-        /// <param name="msg">A message that (hopefully) describes the error</param>
-        public ZLibException(int errorCode, string msg) : base(String.Format("ZLib error {0} {1}", errorCode, msg))
-        {
-        }
-
-        /// <summary>
-        /// Initializes a new instance of the <see cref="ZLibException"/> class with a specified 
-        /// error code
-        /// </summary>
-        /// <param name="errorCode">The zlib error code that caused the exception</param>
-        public ZLibException(int errorCode) : base(String.Format("ZLib error {0}", errorCode))
-        {
-        }
-    }
-    #endregion
-
-    #region Interfaces
-
-    /// <summary>
-    /// Declares methods and properties that enables a running checksum to be calculated 
-    /// </summary>
-    public interface ChecksumGenerator
-    {
-        /// <summary>
-        /// Gets the current value of the checksum
-        /// </summary>
-        uint Value { get; }
-
-        /// <summary>
-        /// Clears the current checksum to 0
-        /// </summary>
-        void Reset();
-
-        /// <summary>
-        /// Updates the current checksum with an array of bytes
-        /// </summary>
-        /// <param name="data">The data to update the checksum with</param>
-        void Update(byte[] data);
-
-        /// <summary>
-        /// Updates the current checksum with part of an array of bytes
-        /// </summary>
-        /// <param name="data">The data to update the checksum with</param>
-        /// <param name="offset">Where in <c>data</c> to start updating</param>
-        /// <param name="count">The number of bytes from <c>data</c> to use</param>
-        /// <exception cref="ArgumentException">The sum of offset and count is larger than the length of <c>data</c></exception>
-        /// <exception cref="ArgumentNullException"><c>data</c> is a null reference</exception>
-        /// <exception cref="ArgumentOutOfRangeException">Offset or count is negative.</exception>
-        void Update(byte[] data, int offset, int count);
-
-        /// <summary>
-        /// Updates the current checksum with the data from a string
-        /// </summary>
-        /// <param name="data">The string to update the checksum with</param>
-        /// <remarks>The characters in the string are converted by the UTF-8 encoding</remarks>
-        void Update(string data);
-
-        /// <summary>
-        /// Updates the current checksum with the data from a string, using a specific encoding
-        /// </summary>
-        /// <param name="data">The string to update the checksum with</param>
-        /// <param name="encoding">The encoding to use</param>
-        void Update(string data, Encoding encoding);
-    }
-
-
-    /// <summary>
-    /// Represents the method that will be called from a codec when new data
-    /// are available.
-    /// </summary>
-    /// <paramref name="data">The byte array containing the processed data</paramref>
-    /// <paramref name="startIndex">The index of the first processed byte in <c>data</c></paramref>
-    /// <paramref name="count">The number of processed bytes available</paramref>
-    /// <remarks>On return from this method, the data may be overwritten, so grab it while you can. 
-    /// You cannot assume that startIndex will be zero.
-    /// </remarks>
-    public delegate void DataAvailableHandler(byte[] data, int startIndex, int count);
-
-    /// <summary>
-    /// Declares methods and events for implementing compressors/decompressors
-    /// </summary>
-    public interface Codec
-    {
-        /// <summary>
-        /// Occurs when more processed data are available.
-        /// </summary>
-        event DataAvailableHandler DataAvailable;
-
-        /// <summary>
-        /// Adds more data to the codec to be processed.
-        /// </summary>
-        /// <param name="data">Byte array containing the data to be added to the codec</param>
-        /// <remarks>Adding data may, or may not, raise the <c>DataAvailable</c> event</remarks>
-        void Add(byte[] data);
-
-        /// <summary>
-        /// Adds more data to the codec to be processed.
-        /// </summary>
-        /// <param name="data">Byte array containing the data to be added to the codec</param>
-        /// <param name="offset">The index of the first byte to add from <c>data</c></param>
-        /// <param name="count">The number of bytes to add</param>
-        /// <remarks>Adding data may, or may not, raise the <c>DataAvailable</c> event</remarks>
-        void Add(byte[] data, int offset, int count);
-
-        /// <summary>
-        /// Finishes up any pending data that needs to be processed and handled.
-        /// </summary>
-        void Finish();
-
-        /// <summary>
-        /// Gets the checksum of the data that has been added so far
-        /// </summary>
-        uint Checksum { get; }
-
-
-    }
-
-    #endregion
-
-    #region Classes
-    /// <summary>
-    /// Encapsulates general information about the ZLib library
-    /// </summary>
-    public class Info
-    {
-        #region DLL imports
-        [DllImport("ZLIB1.dll", CallingConvention=CallingConvention.Cdecl)]
-        private static extern uint zlibCompileFlags();
-
-        [DllImport("ZLIB1.dll", CallingConvention=CallingConvention.Cdecl)]
-        private static extern string zlibVersion();
-        #endregion
-
-        #region Private stuff
-        private uint _flags;
-
-        // helper function that unpacks a bitsize mask
-        private static int bitSize(uint bits)
-        {
-            switch (bits)
-            {
-                case 0: return 16;
-                case 1: return 32;
-                case 2: return 64;
-            }
-            return -1;
-        }
-        #endregion
-
-        /// <summary>
-        /// Constructs an instance of the <c>Info</c> class.
-        /// </summary>
-        public Info()
-        {
-            _flags = zlibCompileFlags();
-        }
-
-        /// <summary>
-        /// True if the library is compiled with debug info
-        /// </summary>
-        public bool HasDebugInfo { get { return 0 != (_flags & 0x100); } }
-
-        /// <summary>
-        /// True if the library is compiled with assembly optimizations
-        /// </summary>
-        public bool UsesAssemblyCode { get { return 0 != (_flags & 0x200); } }
-
-        /// <summary>
-        /// Gets the size of the unsigned int that was compiled into Zlib
-        /// </summary>
-        public int SizeOfUInt { get { return bitSize(_flags & 3); } }
-
-        /// <summary>
-        /// Gets the size of the unsigned long that was compiled into Zlib
-        /// </summary>
-        public int SizeOfULong { get { return bitSize((_flags >> 2) & 3); } }
-
-        /// <summary>
-        /// Gets the size of the pointers that were compiled into Zlib
-        /// </summary>
-        public int SizeOfPointer { get { return bitSize((_flags >> 4) & 3); } }
-
-        /// <summary>
-        /// Gets the size of the z_off_t type that was compiled into Zlib
-        /// </summary>
-        public int SizeOfOffset { get { return bitSize((_flags >> 6) & 3); } }
-
-        /// <summary>
-        /// Gets the version of ZLib as a string, e.g. "1.2.1"
-        /// </summary>
-        public static string Version { get { return zlibVersion(); } }
-    }
-
-    #endregion
-
-}
Index: trunk/minix/lib/zlib-1.2.3/contrib/dotzlib/DotZLib/DotZLib.csproj
===================================================================
--- trunk/minix/lib/zlib-1.2.3/contrib/dotzlib/DotZLib/DotZLib.csproj	(revision 9)
+++ 	(revision )
@@ -1,141 +1,0 @@
-<VisualStudioProject>
-    <CSHARP
-        ProjectType = "Local"
-        ProductVersion = "7.10.3077"
-        SchemaVersion = "2.0"
-        ProjectGuid = "{BB1EE0B1-1808-46CB-B786-949D91117FC5}"
-    >
-        <Build>
-            <Settings
-                ApplicationIcon = ""
-                AssemblyKeyContainerName = ""
-                AssemblyName = "DotZLib"
-                AssemblyOriginatorKeyFile = ""
-                DefaultClientScript = "JScript"
-                DefaultHTMLPageLayout = "Grid"
-                DefaultTargetSchema = "IE50"
-                DelaySign = "false"
-                OutputType = "Library"
-                PreBuildEvent = ""
-                PostBuildEvent = ""
-                RootNamespace = "DotZLib"
-                RunPostBuildEvent = "OnBuildSuccess"
-                StartupObject = ""
-            >
-                <Config
-                    Name = "Debug"
-                    AllowUnsafeBlocks = "false"
-                    BaseAddress = "285212672"
-                    CheckForOverflowUnderflow = "false"
-                    ConfigurationOverrideFile = ""
-                    DefineConstants = "DEBUG;TRACE"
-                    DocumentationFile = "docs\DotZLib.xml"
-                    DebugSymbols = "true"
-                    FileAlignment = "4096"
-                    IncrementalBuild = "false"
-                    NoStdLib = "false"
-                    NoWarn = "1591"
-                    Optimize = "false"
-                    OutputPath = "bin\Debug\"
-                    RegisterForComInterop = "false"
-                    RemoveIntegerChecks = "false"
-                    TreatWarningsAsErrors = "false"
-                    WarningLevel = "4"
-                />
-                <Config
-                    Name = "Release"
-                    AllowUnsafeBlocks = "false"
-                    BaseAddress = "285212672"
-                    CheckForOverflowUnderflow = "false"
-                    ConfigurationOverrideFile = ""
-                    DefineConstants = "TRACE"
-                    DocumentationFile = "docs\DotZLib.xml"
-                    DebugSymbols = "false"
-                    FileAlignment = "4096"
-                    IncrementalBuild = "false"
-                    NoStdLib = "false"
-                    NoWarn = ""
-                    Optimize = "true"
-                    OutputPath = "bin\Release\"
-                    RegisterForComInterop = "false"
-                    RemoveIntegerChecks = "false"
-                    TreatWarningsAsErrors = "false"
-                    WarningLevel = "4"
-                />
-            </Settings>
-            <References>
-                <Reference
-                    Name = "System"
-                    AssemblyName = "System"
-                    HintPath = "C:\WINNT\Microsoft.NET\Framework\v1.1.4322\System.dll"
-                />
-                <Reference
-                    Name = "System.Data"
-                    AssemblyName = "System.Data"
-                    HintPath = "C:\WINNT\Microsoft.NET\Framework\v1.1.4322\System.Data.dll"
-                />
-                <Reference
-                    Name = "System.XML"
-                    AssemblyName = "System.Xml"
-                    HintPath = "C:\WINNT\Microsoft.NET\Framework\v1.1.4322\System.XML.dll"
-                />
-                <Reference
-                    Name = "nunit.framework"
-                    AssemblyName = "nunit.framework"
-                    HintPath = "E:\apps\NUnit V2.1\\bin\nunit.framework.dll"
-                    AssemblyFolderKey = "hklm\dn\nunit.framework"
-                />
-            </References>
-        </Build>
-        <Files>
-            <Include>
-                <File
-                    RelPath = "AssemblyInfo.cs"
-                    SubType = "Code"
-                    BuildAction = "Compile"
-                />
-                <File
-                    RelPath = "ChecksumImpl.cs"
-                    SubType = "Code"
-                    BuildAction = "Compile"
-                />
-                <File
-                    RelPath = "CircularBuffer.cs"
-                    SubType = "Code"
-                    BuildAction = "Compile"
-                />
-                <File
-                    RelPath = "CodecBase.cs"
-                    SubType = "Code"
-                    BuildAction = "Compile"
-                />
-                <File
-                    RelPath = "Deflater.cs"
-                    SubType = "Code"
-                    BuildAction = "Compile"
-                />
-                <File
-                    RelPath = "DotZLib.cs"
-                    SubType = "Code"
-                    BuildAction = "Compile"
-                />
-                <File
-                    RelPath = "GZipStream.cs"
-                    SubType = "Code"
-                    BuildAction = "Compile"
-                />
-                <File
-                    RelPath = "Inflater.cs"
-                    SubType = "Code"
-                    BuildAction = "Compile"
-                />
-                <File
-                    RelPath = "UnitTests.cs"
-                    SubType = "Code"
-                    BuildAction = "Compile"
-                />
-            </Include>
-        </Files>
-    </CSHARP>
-</VisualStudioProject>
-
Index: trunk/minix/lib/zlib-1.2.3/contrib/dotzlib/DotZLib/GZipStream.cs
===================================================================
--- trunk/minix/lib/zlib-1.2.3/contrib/dotzlib/DotZLib/GZipStream.cs	(revision 9)
+++ 	(revision )
@@ -1,301 +1,0 @@
-//
-// © Copyright Henrik Ravn 2004
-//
-// Use, modification and distribution are subject to the Boost Software License, Version 1.0. 
-// (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
-//
-
-using System;
-using System.IO;
-using System.Runtime.InteropServices;
-
-namespace DotZLib
-{
-	/// <summary>
-	/// Implements a compressed <see cref="Stream"/>, in GZip (.gz) format.
-	/// </summary>
-	public class GZipStream : Stream, IDisposable
-	{
-        #region Dll Imports
-        [DllImport("ZLIB1.dll", CallingConvention=CallingConvention.Cdecl, CharSet=CharSet.Ansi)]
-        private static extern IntPtr gzopen(string name, string mode);
-
-        [DllImport("ZLIB1.dll", CallingConvention=CallingConvention.Cdecl)]
-        private static extern int gzclose(IntPtr gzFile);
-
-        [DllImport("ZLIB1.dll", CallingConvention=CallingConvention.Cdecl)]
-        private static extern int gzwrite(IntPtr gzFile, int data, int length);
-
-        [DllImport("ZLIB1.dll", CallingConvention=CallingConvention.Cdecl)]
-        private static extern int gzread(IntPtr gzFile, int data, int length);
-
-        [DllImport("ZLIB1.dll", CallingConvention=CallingConvention.Cdecl)]
-        private static extern int gzgetc(IntPtr gzFile);
-
-        [DllImport("ZLIB1.dll", CallingConvention=CallingConvention.Cdecl)]
-        private static extern int gzputc(IntPtr gzFile, int c);
-
-        #endregion
-
-        #region Private data
-        private IntPtr _gzFile;
-        private bool _isDisposed = false;
-        private bool _isWriting;
-        #endregion
-
-        #region Constructors
-        /// <summary>
-        /// Creates a new file as a writeable GZipStream
-        /// </summary>
-        /// <param name="fileName">The name of the compressed file to create</param>
-        /// <param name="level">The compression level to use when adding data</param>
-        /// <exception cref="ZLibException">If an error occurred in the internal zlib function</exception>
-		public GZipStream(string fileName, CompressLevel level)
-		{
-            _isWriting = true;
-            _gzFile = gzopen(fileName, String.Format("wb{0}", (int)level));
-            if (_gzFile == IntPtr.Zero)
-                throw new ZLibException(-1, "Could not open " + fileName);
-		}
-
-        /// <summary>
-        /// Opens an existing file as a readable GZipStream
-        /// </summary>
-        /// <param name="fileName">The name of the file to open</param>
-        /// <exception cref="ZLibException">If an error occurred in the internal zlib function</exception>
-        public GZipStream(string fileName)
-        {
-            _isWriting = false;
-            _gzFile = gzopen(fileName, "rb");
-            if (_gzFile == IntPtr.Zero)
-                throw new ZLibException(-1, "Could not open " + fileName);
-
-        }
-        #endregion
-
-        #region Access properties
-        /// <summary>
-        /// Returns true of this stream can be read from, false otherwise
-        /// </summary>
-        public override bool CanRead
-        {
-            get
-            {
-                return !_isWriting;
-            }
-        }
-    
-
-        /// <summary>
-        /// Returns false.
-        /// </summary>
-        public override bool CanSeek
-        {
-            get
-            {
-                return false;
-            }
-        }
-    
-        /// <summary>
-        /// Returns true if this tsream is writeable, false otherwise
-        /// </summary>
-        public override bool CanWrite
-        {
-            get
-            {
-                return _isWriting;
-            }
-        }
-        #endregion
-    
-        #region Destructor & IDispose stuff
-
-        /// <summary>
-        /// Destroys this instance
-        /// </summary>
-        ~GZipStream()
-        {
-            cleanUp(false);
-        }
-
-        /// <summary>
-        /// Closes the external file handle
-        /// </summary>
-        public void Dispose()
-        {
-            cleanUp(true);
-        }
-
-        // Does the actual closing of the file handle.
-        private void cleanUp(bool isDisposing)
-        {
-            if (!_isDisposed)
-            {
-                gzclose(_gzFile);
-                _isDisposed = true;
-            }
-        }
-        #endregion
-    
-        #region Basic reading and writing
-        /// <summary>
-        /// Attempts to read a number of bytes from the stream.
-        /// </summary>
-        /// <param name="buffer">The destination data buffer</param>
-        /// <param name="offset">The index of the first destination byte in <c>buffer</c></param>
-        /// <param name="count">The number of bytes requested</param>
-        /// <returns>The number of bytes read</returns>
-        /// <exception cref="ArgumentNullException">If <c>buffer</c> is null</exception>
-        /// <exception cref="ArgumentOutOfRangeException">If <c>count</c> or <c>offset</c> are negative</exception>
-        /// <exception cref="ArgumentException">If <c>offset</c>  + <c>count</c> is &gt; buffer.Length</exception>
-        /// <exception cref="NotSupportedException">If this stream is not readable.</exception>
-        /// <exception cref="ObjectDisposedException">If this stream has been disposed.</exception>
-        public override int Read(byte[] buffer, int offset, int count)
-        {
-            if (!CanRead) throw new NotSupportedException();
-            if (buffer == null) throw new ArgumentNullException();
-            if (offset < 0 || count < 0) throw new ArgumentOutOfRangeException();
-            if ((offset+count) > buffer.Length) throw new ArgumentException();
-            if (_isDisposed) throw new ObjectDisposedException("GZipStream");
-
-            GCHandle h = GCHandle.Alloc(buffer, GCHandleType.Pinned);
-            int result;
-            try
-            {
-                result = gzread(_gzFile, h.AddrOfPinnedObject().ToInt32() + offset, count);
-                if (result < 0)
-                    throw new IOException();
-            }
-            finally
-            {
-                h.Free();
-            }
-            return result;
-        }
-
-        /// <summary>
-        /// Attempts to read a single byte from the stream.
-        /// </summary>
-        /// <returns>The byte that was read, or -1 in case of error or End-Of-File</returns>
-        public override int ReadByte()
-        {
-            if (!CanRead) throw new NotSupportedException();
-            if (_isDisposed) throw new ObjectDisposedException("GZipStream");
-            return gzgetc(_gzFile);
-        }
-
-        /// <summary>
-        /// Writes a number of bytes to the stream
-        /// </summary>
-        /// <param name="buffer"></param>
-        /// <param name="offset"></param>
-        /// <param name="count"></param>
-        /// <exception cref="ArgumentNullException">If <c>buffer</c> is null</exception>
-        /// <exception cref="ArgumentOutOfRangeException">If <c>count</c> or <c>offset</c> are negative</exception>
-        /// <exception cref="ArgumentException">If <c>offset</c>  + <c>count</c> is &gt; buffer.Length</exception>
-        /// <exception cref="NotSupportedException">If this stream is not writeable.</exception>
-        /// <exception cref="ObjectDisposedException">If this stream has been disposed.</exception>
-        public override void Write(byte[] buffer, int offset, int count)
-        {
-            if (!CanWrite) throw new NotSupportedException();
-            if (buffer == null) throw new ArgumentNullException();
-            if (offset < 0 || count < 0) throw new ArgumentOutOfRangeException();
-            if ((offset+count) > buffer.Length) throw new ArgumentException();
-            if (_isDisposed) throw new ObjectDisposedException("GZipStream");
-
-            GCHandle h = GCHandle.Alloc(buffer, GCHandleType.Pinned);
-            try
-            {
-                int result = gzwrite(_gzFile, h.AddrOfPinnedObject().ToInt32() + offset, count);
-                if (result < 0)
-                    throw new IOException();
-            }
-            finally
-            {
-                h.Free();
-            }
-        }
-
-        /// <summary>
-        /// Writes a single byte to the stream
-        /// </summary>
-        /// <param name="value">The byte to add to the stream.</param>
-        /// <exception cref="NotSupportedException">If this stream is not writeable.</exception>
-        /// <exception cref="ObjectDisposedException">If this stream has been disposed.</exception>
-        public override void WriteByte(byte value)
-        {
-            if (!CanWrite) throw new NotSupportedException();
-            if (_isDisposed) throw new ObjectDisposedException("GZipStream");
-
-            int result = gzputc(_gzFile, (int)value);
-            if (result < 0)
-                throw new IOException();
-        }
-        #endregion
-
-        #region Position & length stuff
-        /// <summary>
-        /// Not supported.
-        /// </summary>
-        /// <param name="value"></param>
-        /// <exception cref="NotSupportedException">Always thrown</exception>
-        public override void SetLength(long value)
-        {
-            throw new NotSupportedException();
-        }
-    
-        /// <summary>
-        ///  Not suppported.
-        /// </summary>
-        /// <param name="offset"></param>
-        /// <param name="origin"></param>
-        /// <returns></returns>
-        /// <exception cref="NotSupportedException">Always thrown</exception>
-        public override long Seek(long offset, SeekOrigin origin)
-        {
-            throw new NotSupportedException();
-        }
-    
-        /// <summary>
-        /// Flushes the <c>GZipStream</c>.
-        /// </summary>
-        /// <remarks>In this implementation, this method does nothing. This is because excessive
-        /// flushing may degrade the achievable compression rates.</remarks>
-        public override void Flush()
-        {
-            // left empty on purpose
-        }
-    
-        /// <summary>
-        /// Gets/sets the current position in the <c>GZipStream</c>. Not suppported.
-        /// </summary>
-        /// <remarks>In this implementation this property is not supported</remarks>
-        /// <exception cref="NotSupportedException">Always thrown</exception>
-        public override long Position
-        {
-            get
-            {
-                throw new NotSupportedException();
-            }
-            set
-            {
-                throw new NotSupportedException();
-            }
-        }
-    
-        /// <summary>
-        /// Gets the size of the stream. Not suppported.
-        /// </summary>
-        /// <remarks>In this implementation this property is not supported</remarks>
-        /// <exception cref="NotSupportedException">Always thrown</exception>
-        public override long Length
-        {
-            get
-            {
-                throw new NotSupportedException();
-            }
-        }
-        #endregion
-    }
-}
Index: trunk/minix/lib/zlib-1.2.3/contrib/dotzlib/DotZLib/Inflater.cs
===================================================================
--- trunk/minix/lib/zlib-1.2.3/contrib/dotzlib/DotZLib/Inflater.cs	(revision 9)
+++ 	(revision )
@@ -1,105 +1,0 @@
-//
-// © Copyright Henrik Ravn 2004
-//
-// Use, modification and distribution are subject to the Boost Software License, Version 1.0. 
-// (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
-//
-
-using System;
-using System.Diagnostics;
-using System.Runtime.InteropServices;
-
-namespace DotZLib
-{
-    
-    /// <summary>
-    /// Implements a data decompressor, using the inflate algorithm in the ZLib dll
-    /// </summary>
-    public class Inflater : CodecBase
-	{
-        #region Dll imports
-        [DllImport("ZLIB1.dll", CallingConvention=CallingConvention.Cdecl, CharSet=CharSet.Ansi)]
-        private static extern int inflateInit_(ref ZStream sz, string vs, int size);
-
-        [DllImport("ZLIB1.dll", CallingConvention=CallingConvention.Cdecl)]
-        private static extern int inflate(ref ZStream sz, int flush);
-
-        [DllImport("ZLIB1.dll", CallingConvention=CallingConvention.Cdecl)]
-        private static extern int inflateReset(ref ZStream sz);
-
-        [DllImport("ZLIB1.dll", CallingConvention=CallingConvention.Cdecl)]
-        private static extern int inflateEnd(ref ZStream sz);
-        #endregion
-
-        /// <summary>
-        /// Constructs an new instance of the <c>Inflater</c>
-        /// </summary>
-        public Inflater() : base()
-		{
-            int retval = inflateInit_(ref _ztream, Info.Version, Marshal.SizeOf(_ztream));
-            if (retval != 0)
-                throw new ZLibException(retval, "Could not initialize inflater");
-
-            resetOutput();
-        }
-
-
-        /// <summary>
-        /// Adds more data to the codec to be processed.
-        /// </summary>
-        /// <param name="data">Byte array containing the data to be added to the codec</param>
-        /// <param name="offset">The index of the first byte to add from <c>data</c></param>
-        /// <param name="count">The number of bytes to add</param>
-        /// <remarks>Adding data may, or may not, raise the <c>DataAvailable</c> event</remarks>
-        public override void Add(byte[] data, int offset, int count)
-        {
-            if (data == null) throw new ArgumentNullException();
-            if (offset < 0 || count < 0) throw new ArgumentOutOfRangeException();
-            if ((offset+count) > data.Length) throw new ArgumentException();
-
-            int total = count;
-            int inputIndex = offset;
-            int err = 0;
-
-            while (err >= 0 && inputIndex < total)
-            {
-                copyInput(data, inputIndex, Math.Min(total - inputIndex, kBufferSize));
-                err = inflate(ref _ztream, (int)FlushTypes.None);
-                if (err == 0)
-                    while (_ztream.avail_out == 0)
-                    {
-                        OnDataAvailable();
-                        err = inflate(ref _ztream, (int)FlushTypes.None);
-                    }
-
-                inputIndex += (int)_ztream.total_in;
-            }
-            setChecksum( _ztream.adler );
-        }
-
-
-        /// <summary>
-        /// Finishes up any pending data that needs to be processed and handled.
-        /// </summary>
-        public override void Finish()
-        {
-            int err;
-            do 
-            {
-                err = inflate(ref _ztream, (int)FlushTypes.Finish);
-                OnDataAvailable();
-            }
-            while (err == 0);
-            setChecksum( _ztream.adler );
-            inflateReset(ref _ztream);
-            resetOutput();
-        }
-
-        /// <summary>
-        /// Closes the internal zlib inflate stream
-        /// </summary>
-        protected override void CleanUp() { inflateEnd(ref _ztream); }
-
-
-	}
-}
Index: trunk/minix/lib/zlib-1.2.3/contrib/dotzlib/DotZLib/UnitTests.cs
===================================================================
--- trunk/minix/lib/zlib-1.2.3/contrib/dotzlib/DotZLib/UnitTests.cs	(revision 9)
+++ 	(revision )
@@ -1,274 +1,0 @@
-//
-// © Copyright Henrik Ravn 2004
-//
-// Use, modification and distribution are subject to the Boost Software License, Version 1.0. 
-// (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
-//
-
-using System;
-using System.Collections;
-using System.IO;
-
-// uncomment the define below to include unit tests
-//#define nunit
-#if nunit
-using NUnit.Framework;
-
-// Unit tests for the DotZLib class library
-// ----------------------------------------
-//
-// Use this with NUnit 2 from http://www.nunit.org
-//
-
-namespace DotZLibTests
-{
-    using DotZLib;
-
-    // helper methods
-    internal class Utils
-    {
-        public static bool byteArrEqual( byte[] lhs, byte[] rhs )
-        {
-            if (lhs.Length != rhs.Length)
-                return false;
-            for (int i = lhs.Length-1; i >= 0; --i)
-                if (lhs[i] != rhs[i])
-                    return false;
-            return true;
-        }
-
-    }
-
-
-    [TestFixture]
-    public class CircBufferTests
-    {
-        #region Circular buffer tests
-        [Test]
-        public void SinglePutGet()
-        {
-            CircularBuffer buf = new CircularBuffer(10);
-            Assert.AreEqual( 0, buf.Size );
-            Assert.AreEqual( -1, buf.Get() );
-
-            Assert.IsTrue(buf.Put( 1 ));
-            Assert.AreEqual( 1, buf.Size );
-            Assert.AreEqual( 1, buf.Get() );
-            Assert.AreEqual( 0, buf.Size );
-            Assert.AreEqual( -1, buf.Get() );
-        }
-
-        [Test]
-        public void BlockPutGet()
-        {
-            CircularBuffer buf = new CircularBuffer(10);
-            byte[] arr = {1,2,3,4,5,6,7,8,9,10};
-            Assert.AreEqual( 10, buf.Put(arr,0,10) );
-            Assert.AreEqual( 10, buf.Size );
-            Assert.IsFalse( buf.Put(11) );
-            Assert.AreEqual( 1, buf.Get() );
-            Assert.IsTrue( buf.Put(11) );
-
-            byte[] arr2 = (byte[])arr.Clone();
-            Assert.AreEqual( 9, buf.Get(arr2,1,9) );
-            Assert.IsTrue( Utils.byteArrEqual(arr,arr2) );
-        }
-
-        #endregion
-    }
-
-    [TestFixture]
-    public class ChecksumTests
-    {
-        #region CRC32 Tests
-        [Test]
-        public void CRC32_Null()
-        {
-            CRC32Checksum crc32 = new CRC32Checksum();
-            Assert.AreEqual( 0, crc32.Value );
-
-            crc32 = new CRC32Checksum(1);
-            Assert.AreEqual( 1, crc32.Value );
-
-            crc32 = new CRC32Checksum(556);
-            Assert.AreEqual( 556, crc32.Value );
-        }
-
-        [Test]
-        public void CRC32_Data()
-        {
-            CRC32Checksum crc32 = new CRC32Checksum();
-            byte[] data = { 1,2,3,4,5,6,7 };
-            crc32.Update(data);
-            Assert.AreEqual( 0x70e46888, crc32.Value  );
-
-            crc32 = new CRC32Checksum();
-            crc32.Update("penguin");
-            Assert.AreEqual( 0x0e5c1a120, crc32.Value );
-
-            crc32 = new CRC32Checksum(1);
-            crc32.Update("penguin");
-            Assert.AreEqual(0x43b6aa94, crc32.Value);
-
-        }
-        #endregion
-
-        #region Adler tests
-
-        [Test]
-        public void Adler_Null()
-        {
-            AdlerChecksum adler = new AdlerChecksum();
-            Assert.AreEqual(0, adler.Value);
-
-            adler = new AdlerChecksum(1);
-            Assert.AreEqual( 1, adler.Value );
-
-            adler = new AdlerChecksum(556);
-            Assert.AreEqual( 556, adler.Value );
-        }
-
-        [Test]
-        public void Adler_Data()
-        {
-            AdlerChecksum adler = new AdlerChecksum(1);
-            byte[] data = { 1,2,3,4,5,6,7 };
-            adler.Update(data);
-            Assert.AreEqual( 0x5b001d, adler.Value  );
-
-            adler = new AdlerChecksum();
-            adler.Update("penguin");
-            Assert.AreEqual(0x0bcf02f6, adler.Value );
-
-            adler = new AdlerChecksum(1);
-            adler.Update("penguin");
-            Assert.AreEqual(0x0bd602f7, adler.Value);
-
-        }
-        #endregion
-    }
-
-    [TestFixture]
-    public class InfoTests
-    {
-        #region Info tests
-        [Test]
-        public void Info_Version()
-        {
-            Info info = new Info();
-            Assert.AreEqual("1.2.3", Info.Version);
-            Assert.AreEqual(32, info.SizeOfUInt);
-            Assert.AreEqual(32, info.SizeOfULong);
-            Assert.AreEqual(32, info.SizeOfPointer);
-            Assert.AreEqual(32, info.SizeOfOffset);
-        }
-        #endregion
-    }
-
-    [TestFixture]
-    public class DeflateInflateTests
-    {
-        #region Deflate tests
-        [Test]
-        public void Deflate_Init()
-        {
-            using (Deflater def = new Deflater(CompressLevel.Default))
-            {
-            }
-        }
-
-        private ArrayList compressedData = new ArrayList();
-        private uint adler1;
-
-        private ArrayList uncompressedData = new ArrayList();
-        private uint adler2;
-
-        public void CDataAvail(byte[] data, int startIndex, int count)
-        {
-            for (int i = 0; i < count; ++i)
-                compressedData.Add(data[i+startIndex]);
-        }
-
-        [Test]
-        public void Deflate_Compress()
-        {
-            compressedData.Clear();
-
-            byte[] testData = new byte[35000];
-            for (int i = 0; i < testData.Length; ++i)
-                testData[i] = 5;
-
-            using (Deflater def = new Deflater((CompressLevel)5))
-            {
-                def.DataAvailable += new DataAvailableHandler(CDataAvail);
-                def.Add(testData);
-                def.Finish();
-                adler1 = def.Checksum;
-            }
-        }
-        #endregion
-
-        #region Inflate tests
-        [Test]
-        public void Inflate_Init()
-        {
-            using (Inflater inf = new Inflater())
-            {
-            }
-        }
-
-        private void DDataAvail(byte[] data, int startIndex, int count)
-        {
-            for (int i = 0; i < count; ++i)
-                uncompressedData.Add(data[i+startIndex]);
-        }
-
-        [Test]
-        public void Inflate_Expand()
-        { 
-            uncompressedData.Clear();
-
-            using (Inflater inf = new Inflater())
-            {
-                inf.DataAvailable += new DataAvailableHandler(DDataAvail);
-                inf.Add((byte[])compressedData.ToArray(typeof(byte)));
-                inf.Finish();
-                adler2 = inf.Checksum;
-            }
-            Assert.AreEqual( adler1, adler2 );
-        }
-        #endregion
-    }
-
-    [TestFixture]
-    public class GZipStreamTests
-    {
-        #region GZipStream test
-        [Test]
-        public void GZipStream_WriteRead()
-        {
-            using (GZipStream gzOut = new GZipStream("gzstream.gz", CompressLevel.Best))
-            {
-                BinaryWriter writer = new BinaryWriter(gzOut);
-                writer.Write("hi there");
-                writer.Write(Math.PI);
-                writer.Write(42);
-            }
-
-            using (GZipStream gzIn = new GZipStream("gzstream.gz"))
-            {
-                BinaryReader reader = new BinaryReader(gzIn);
-                string s = reader.ReadString();
-                Assert.AreEqual("hi there",s);
-                double d = reader.ReadDouble();
-                Assert.AreEqual(Math.PI, d);
-                int i = reader.ReadInt32();
-                Assert.AreEqual(42,i);
-            }
-
-        }
-        #endregion
-	}
-}
-
-#endif
Index: trunk/minix/lib/zlib-1.2.3/contrib/dotzlib/LICENSE_1_0.txt
===================================================================
--- trunk/minix/lib/zlib-1.2.3/contrib/dotzlib/LICENSE_1_0.txt	(revision 9)
+++ 	(revision )
@@ -1,23 +1,0 @@
-Boost Software License - Version 1.0 - August 17th, 2003
-
-Permission is hereby granted, free of charge, to any person or organization
-obtaining a copy of the software and accompanying documentation covered by
-this license (the "Software") to use, reproduce, display, distribute,
-execute, and transmit the Software, and to prepare derivative works of the
-Software, and to permit third-parties to whom the Software is furnished to
-do so, all subject to the following:
-
-The copyright notices in the Software and this entire statement, including
-the above license grant, this restriction and the following disclaimer,
-must be included in all copies of the Software, in whole or in part, and
-all derivative works of the Software, unless such copies or derivative
-works are solely in the form of machine-executable object code generated by
-a source language processor.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT
-SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE
-FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE,
-ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
-DEALINGS IN THE SOFTWARE.
Index: trunk/minix/lib/zlib-1.2.3/contrib/dotzlib/readme.txt
===================================================================
--- trunk/minix/lib/zlib-1.2.3/contrib/dotzlib/readme.txt	(revision 9)
+++ 	(revision )
@@ -1,58 +1,0 @@
-This directory contains a .Net wrapper class library for the ZLib1.dll
-
-The wrapper includes support for inflating/deflating memory buffers, 
-.Net streaming wrappers for the gz streams part of zlib, and wrappers
-for the checksum parts of zlib. See DotZLib/UnitTests.cs for examples.
-
-Directory structure:
---------------------
-
-LICENSE_1_0.txt       - License file.
-readme.txt            - This file.
-DotZLib.chm           - Class library documentation
-DotZLib.build         - NAnt build file
-DotZLib.sln           - Microsoft Visual Studio 2003 solution file
-
-DotZLib\*.cs          - Source files for the class library
-
-Unit tests:
------------
-The file DotZLib/UnitTests.cs contains unit tests for use with NUnit 2.1 or higher.
-To include unit tests in the build, define nunit before building.
-
-
-Build instructions:
--------------------
-
-1. Using Visual Studio.Net 2003:
-   Open DotZLib.sln in VS.Net and build from there. Output file (DotZLib.dll)
-   will be found ./DotZLib/bin/release or ./DotZLib/bin/debug, depending on 
-   you are building the release or debug version of the library. Check 
-   DotZLib/UnitTests.cs for instructions on how to include unit tests in the
-   build.
-   
-2. Using NAnt:
-   Open a command prompt with access to the build environment and run nant
-   in the same directory as the DotZLib.build file.
-   You can define 2 properties on the nant command-line to control the build:
-   debug={true|false} to toggle between release/debug builds (default=true).
-   nunit={true|false} to include or esclude unit tests (default=true).
-   Also the target clean will remove binaries.
-   Output file (DotZLib.dll) will be found in either ./DotZLib/bin/release 
-   or ./DotZLib/bin/debug, depending on whether you are building the release 
-   or debug version of the library.
-
-   Examples: 
-     nant -D:debug=false -D:nunit=false
-       will build a release mode version of the library without unit tests.
-     nant
-       will build a debug version of the library with unit tests 
-     nant clean
-       will remove all previously built files.
-
-
----------------------------------
-Copyright (c) Henrik Ravn 2004
-
-Use, modification and distribution are subject to the Boost Software License, Version 1.0. 
-(See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
Index: trunk/minix/lib/zlib-1.2.3/contrib/infback9/README
===================================================================
--- trunk/minix/lib/zlib-1.2.3/contrib/infback9/README	(revision 9)
+++ 	(revision )
@@ -1,1 +1,0 @@
-See infback9.h for what this is and how to use it.
Index: trunk/minix/lib/zlib-1.2.3/contrib/infback9/infback9.c
===================================================================
--- trunk/minix/lib/zlib-1.2.3/contrib/infback9/infback9.c	(revision 9)
+++ 	(revision )
@@ -1,608 +1,0 @@
-/* infback9.c -- inflate deflate64 data using a call-back interface
- * Copyright (C) 1995-2003 Mark Adler
- * For conditions of distribution and use, see copyright notice in zlib.h
- */
-
-#include "zutil.h"
-#include "infback9.h"
-#include "inftree9.h"
-#include "inflate9.h"
-
-#define WSIZE 65536UL
-
-/*
-   strm provides memory allocation functions in zalloc and zfree, or
-   Z_NULL to use the library memory allocation functions.
-
-   window is a user-supplied window and output buffer that is 64K bytes.
- */
-int ZEXPORT inflateBack9Init_(strm, window, version, stream_size)
-z_stream FAR *strm;
-unsigned char FAR *window;
-const char *version;
-int stream_size;
-{
-    struct inflate_state FAR *state;
-
-    if (version == Z_NULL || version[0] != ZLIB_VERSION[0] ||
-        stream_size != (int)(sizeof(z_stream)))
-        return Z_VERSION_ERROR;
-    if (strm == Z_NULL || window == Z_NULL)
-        return Z_STREAM_ERROR;
-    strm->msg = Z_NULL;                 /* in case we return an error */
-    if (strm->zalloc == (alloc_func)0) {
-        strm->zalloc = zcalloc;
-        strm->opaque = (voidpf)0;
-    }
-    if (strm->zfree == (free_func)0) strm->zfree = zcfree;
-    state = (struct inflate_state FAR *)ZALLOC(strm, 1,
-                                               sizeof(struct inflate_state));
-    if (state == Z_NULL) return Z_MEM_ERROR;
-    Tracev((stderr, "inflate: allocated\n"));
-    strm->state = (voidpf)state;
-    state->window = window;
-    return Z_OK;
-}
-
-/*
-   Build and output length and distance decoding tables for fixed code
-   decoding.
- */
-#ifdef MAKEFIXED
-#include <stdio.h>
-
-void makefixed9(void)
-{
-    unsigned sym, bits, low, size;
-    code *next, *lenfix, *distfix;
-    struct inflate_state state;
-    code fixed[544];
-
-    /* literal/length table */
-    sym = 0;
-    while (sym < 144) state.lens[sym++] = 8;
-    while (sym < 256) state.lens[sym++] = 9;
-    while (sym < 280) state.lens[sym++] = 7;
-    while (sym < 288) state.lens[sym++] = 8;
-    next = fixed;
-    lenfix = next;
-    bits = 9;
-    inflate_table9(LENS, state.lens, 288, &(next), &(bits), state.work);
-
-    /* distance table */
-    sym = 0;
-    while (sym < 32) state.lens[sym++] = 5;
-    distfix = next;
-    bits = 5;
-    inflate_table9(DISTS, state.lens, 32, &(next), &(bits), state.work);
-
-    /* write tables */
-    puts("    /* inffix9.h -- table for decoding deflate64 fixed codes");
-    puts("     * Generated automatically by makefixed9().");
-    puts("     */");
-    puts("");
-    puts("    /* WARNING: this file should *not* be used by applications.");
-    puts("       It is part of the implementation of this library and is");
-    puts("       subject to change. Applications should only use zlib.h.");
-    puts("     */");
-    puts("");
-    size = 1U << 9;
-    printf("    static const code lenfix[%u] = {", size);
-    low = 0;
-    for (;;) {
-        if ((low % 6) == 0) printf("\n        ");
-        printf("{%u,%u,%d}", lenfix[low].op, lenfix[low].bits,
-               lenfix[low].val);
-        if (++low == size) break;
-        putchar(',');
-    }
-    puts("\n    };");
-    size = 1U << 5;
-    printf("\n    static const code distfix[%u] = {", size);
-    low = 0;
-    for (;;) {
-        if ((low % 5) == 0) printf("\n        ");
-        printf("{%u,%u,%d}", distfix[low].op, distfix[low].bits,
-               distfix[low].val);
-        if (++low == size) break;
-        putchar(',');
-    }
-    puts("\n    };");
-}
-#endif /* MAKEFIXED */
-
-/* Macros for inflateBack(): */
-
-/* Clear the input bit accumulator */
-#define INITBITS() \
-    do { \
-        hold = 0; \
-        bits = 0; \
-    } while (0)
-
-/* Assure that some input is available.  If input is requested, but denied,
-   then return a Z_BUF_ERROR from inflateBack(). */
-#define PULL() \
-    do { \
-        if (have == 0) { \
-            have = in(in_desc, &next); \
-            if (have == 0) { \
-                next = Z_NULL; \
-                ret = Z_BUF_ERROR; \
-                goto inf_leave; \
-            } \
-        } \
-    } while (0)
-
-/* Get a byte of input into the bit accumulator, or return from inflateBack()
-   with an error if there is no input available. */
-#define PULLBYTE() \
-    do { \
-        PULL(); \
-        have--; \
-        hold += (unsigned long)(*next++) << bits; \
-        bits += 8; \
-    } while (0)
-
-/* Assure that there are at least n bits in the bit accumulator.  If there is
-   not enough available input to do that, then return from inflateBack() with
-   an error. */
-#define NEEDBITS(n) \
-    do { \
-        while (bits < (unsigned)(n)) \
-            PULLBYTE(); \
-    } while (0)
-
-/* Return the low n bits of the bit accumulator (n <= 16) */
-#define BITS(n) \
-    ((unsigned)hold & ((1U << (n)) - 1))
-
-/* Remove n bits from the bit accumulator */
-#define DROPBITS(n) \
-    do { \
-        hold >>= (n); \
-        bits -= (unsigned)(n); \
-    } while (0)
-
-/* Remove zero to seven bits as needed to go to a byte boundary */
-#define BYTEBITS() \
-    do { \
-        hold >>= bits & 7; \
-        bits -= bits & 7; \
-    } while (0)
-
-/* Assure that some output space is available, by writing out the window
-   if it's full.  If the write fails, return from inflateBack() with a
-   Z_BUF_ERROR. */
-#define ROOM() \
-    do { \
-        if (left == 0) { \
-            put = window; \
-            left = WSIZE; \
-            wrap = 1; \
-            if (out(out_desc, put, (unsigned)left)) { \
-                ret = Z_BUF_ERROR; \
-                goto inf_leave; \
-            } \
-        } \
-    } while (0)
-
-/*
-   strm provides the memory allocation functions and window buffer on input,
-   and provides information on the unused input on return.  For Z_DATA_ERROR
-   returns, strm will also provide an error message.
-
-   in() and out() are the call-back input and output functions.  When
-   inflateBack() needs more input, it calls in().  When inflateBack() has
-   filled the window with output, or when it completes with data in the
-   window, it calls out() to write out the data.  The application must not
-   change the provided input until in() is called again or inflateBack()
-   returns.  The application must not change the window/output buffer until
-   inflateBack() returns.
-
-   in() and out() are called with a descriptor parameter provided in the
-   inflateBack() call.  This parameter can be a structure that provides the
-   information required to do the read or write, as well as accumulated
-   information on the input and output such as totals and check values.
-
-   in() should return zero on failure.  out() should return non-zero on
-   failure.  If either in() or out() fails, than inflateBack() returns a
-   Z_BUF_ERROR.  strm->next_in can be checked for Z_NULL to see whether it
-   was in() or out() that caused in the error.  Otherwise,  inflateBack()
-   returns Z_STREAM_END on success, Z_DATA_ERROR for an deflate format
-   error, or Z_MEM_ERROR if it could not allocate memory for the state.
-   inflateBack() can also return Z_STREAM_ERROR if the input parameters
-   are not correct, i.e. strm is Z_NULL or the state was not initialized.
- */
-int ZEXPORT inflateBack9(strm, in, in_desc, out, out_desc)
-z_stream FAR *strm;
-in_func in;
-void FAR *in_desc;
-out_func out;
-void FAR *out_desc;
-{
-    struct inflate_state FAR *state;
-    unsigned char FAR *next;    /* next input */
-    unsigned char FAR *put;     /* next output */
-    unsigned have;              /* available input */
-    unsigned long left;         /* available output */
-    inflate_mode mode;          /* current inflate mode */
-    int lastblock;              /* true if processing last block */
-    int wrap;                   /* true if the window has wrapped */
-    unsigned long write;        /* window write index */
-    unsigned char FAR *window;  /* allocated sliding window, if needed */
-    unsigned long hold;         /* bit buffer */
-    unsigned bits;              /* bits in bit buffer */
-    unsigned extra;             /* extra bits needed */
-    unsigned long length;       /* literal or length of data to copy */
-    unsigned long offset;       /* distance back to copy string from */
-    unsigned long copy;         /* number of stored or match bytes to copy */
-    unsigned char FAR *from;    /* where to copy match bytes from */
-    code const FAR *lencode;    /* starting table for length/literal codes */
-    code const FAR *distcode;   /* starting table for distance codes */
-    unsigned lenbits;           /* index bits for lencode */
-    unsigned distbits;          /* index bits for distcode */
-    code this;                  /* current decoding table entry */
-    code last;                  /* parent table entry */
-    unsigned len;               /* length to copy for repeats, bits to drop */
-    int ret;                    /* return code */
-    static const unsigned short order[19] = /* permutation of code lengths */
-        {16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15};
-#include "inffix9.h"
-
-    /* Check that the strm exists and that the state was initialized */
-    if (strm == Z_NULL || strm->state == Z_NULL)
-        return Z_STREAM_ERROR;
-    state = (struct inflate_state FAR *)strm->state;
-
-    /* Reset the state */
-    strm->msg = Z_NULL;
-    mode = TYPE;
-    lastblock = 0;
-    write = 0;
-    wrap = 0;
-    window = state->window;
-    next = strm->next_in;
-    have = next != Z_NULL ? strm->avail_in : 0;
-    hold = 0;
-    bits = 0;
-    put = window;
-    left = WSIZE;
-    lencode = Z_NULL;
-    distcode = Z_NULL;
-
-    /* Inflate until end of block marked as last */
-    for (;;)
-        switch (mode) {
-        case TYPE:
-            /* determine and dispatch block type */
-            if (lastblock) {
-                BYTEBITS();
-                mode = DONE;
-                break;
-            }
-            NEEDBITS(3);
-            lastblock = BITS(1);
-            DROPBITS(1);
-            switch (BITS(2)) {
-            case 0:                             /* stored block */
-                Tracev((stderr, "inflate:     stored block%s\n",
-                        lastblock ? " (last)" : ""));
-                mode = STORED;
-                break;
-            case 1:                             /* fixed block */
-                lencode = lenfix;
-                lenbits = 9;
-                distcode = distfix;
-                distbits = 5;
-                Tracev((stderr, "inflate:     fixed codes block%s\n",
-                        lastblock ? " (last)" : ""));
-                mode = LEN;                     /* decode codes */
-                break;
-            case 2:                             /* dynamic block */
-                Tracev((stderr, "inflate:     dynamic codes block%s\n",
-                        lastblock ? " (last)" : ""));
-                mode = TABLE;
-                break;
-            case 3:
-                strm->msg = (char *)"invalid block type";
-                mode = BAD;
-            }
-            DROPBITS(2);
-            break;
-
-        case STORED:
-            /* get and verify stored block length */
-            BYTEBITS();                         /* go to byte boundary */
-            NEEDBITS(32);
-            if ((hold & 0xffff) != ((hold >> 16) ^ 0xffff)) {
-                strm->msg = (char *)"invalid stored block lengths";
-                mode = BAD;
-                break;
-            }
-            length = (unsigned)hold & 0xffff;
-            Tracev((stderr, "inflate:       stored length %lu\n",
-                    length));
-            INITBITS();
-
-            /* copy stored block from input to output */
-            while (length != 0) {
-                copy = length;
-                PULL();
-                ROOM();
-                if (copy > have) copy = have;
-                if (copy > left) copy = left;
-                zmemcpy(put, next, copy);
-                have -= copy;
-                next += copy;
-                left -= copy;
-                put += copy;
-                length -= copy;
-            }
-            Tracev((stderr, "inflate:       stored end\n"));
-            mode = TYPE;
-            break;
-
-        case TABLE:
-            /* get dynamic table entries descriptor */
-            NEEDBITS(14);
-            state->nlen = BITS(5) + 257;
-            DROPBITS(5);
-            state->ndist = BITS(5) + 1;
-            DROPBITS(5);
-            state->ncode = BITS(4) + 4;
-            DROPBITS(4);
-            if (state->nlen > 286) {
-                strm->msg = (char *)"too many length symbols";
-                mode = BAD;
-                break;
-            }
-            Tracev((stderr, "inflate:       table sizes ok\n"));
-
-            /* get code length code lengths (not a typo) */
-            state->have = 0;
-            while (state->have < state->ncode) {
-                NEEDBITS(3);
-                state->lens[order[state->have++]] = (unsigned short)BITS(3);
-                DROPBITS(3);
-            }
-            while (state->have < 19)
-                state->lens[order[state->have++]] = 0;
-            state->next = state->codes;
-            lencode = (code const FAR *)(state->next);
-            lenbits = 7;
-            ret = inflate_table9(CODES, state->lens, 19, &(state->next),
-                                &(lenbits), state->work);
-            if (ret) {
-                strm->msg = (char *)"invalid code lengths set";
-                mode = BAD;
-                break;
-            }
-            Tracev((stderr, "inflate:       code lengths ok\n"));
-
-            /* get length and distance code code lengths */
-            state->have = 0;
-            while (state->have < state->nlen + state->ndist) {
-                for (;;) {
-                    this = lencode[BITS(lenbits)];
-                    if ((unsigned)(this.bits) <= bits) break;
-                    PULLBYTE();
-                }
-                if (this.val < 16) {
-                    NEEDBITS(this.bits);
-                    DROPBITS(this.bits);
-                    state->lens[state->have++] = this.val;
-                }
-                else {
-                    if (this.val == 16) {
-                        NEEDBITS(this.bits + 2);
-                        DROPBITS(this.bits);
-                        if (state->have == 0) {
-                            strm->msg = (char *)"invalid bit length repeat";
-                            mode = BAD;
-                            break;
-                        }
-                        len = (unsigned)(state->lens[state->have - 1]);
-                        copy = 3 + BITS(2);
-                        DROPBITS(2);
-                    }
-                    else if (this.val == 17) {
-                        NEEDBITS(this.bits + 3);
-                        DROPBITS(this.bits);
-                        len = 0;
-                        copy = 3 + BITS(3);
-                        DROPBITS(3);
-                    }
-                    else {
-                        NEEDBITS(this.bits + 7);
-                        DROPBITS(this.bits);
-                        len = 0;
-                        copy = 11 + BITS(7);
-                        DROPBITS(7);
-                    }
-                    if (state->have + copy > state->nlen + state->ndist) {
-                        strm->msg = (char *)"invalid bit length repeat";
-                        mode = BAD;
-                        break;
-                    }
-                    while (copy--)
-                        state->lens[state->have++] = (unsigned short)len;
-                }
-            }
-
-            /* handle error breaks in while */
-            if (mode == BAD) break;
-
-            /* build code tables */
-            state->next = state->codes;
-            lencode = (code const FAR *)(state->next);
-            lenbits = 9;
-            ret = inflate_table9(LENS, state->lens, state->nlen,
-                            &(state->next), &(lenbits), state->work);
-            if (ret) {
-                strm->msg = (char *)"invalid literal/lengths set";
-                mode = BAD;
-                break;
-            }
-            distcode = (code const FAR *)(state->next);
-            distbits = 6;
-            ret = inflate_table9(DISTS, state->lens + state->nlen,
-                            state->ndist, &(state->next), &(distbits),
-                            state->work);
-            if (ret) {
-                strm->msg = (char *)"invalid distances set";
-                mode = BAD;
-                break;
-            }
-            Tracev((stderr, "inflate:       codes ok\n"));
-            mode = LEN;
-
-        case LEN:
-            /* get a literal, length, or end-of-block code */
-            for (;;) {
-                this = lencode[BITS(lenbits)];
-                if ((unsigned)(this.bits) <= bits) break;
-                PULLBYTE();
-            }
-            if (this.op && (this.op & 0xf0) == 0) {
-                last = this;
-                for (;;) {
-                    this = lencode[last.val +
-                            (BITS(last.bits + last.op) >> last.bits)];
-                    if ((unsigned)(last.bits + this.bits) <= bits) break;
-                    PULLBYTE();
-                }
-                DROPBITS(last.bits);
-            }
-            DROPBITS(this.bits);
-            length = (unsigned)this.val;
-
-            /* process literal */
-            if (this.op == 0) {
-                Tracevv((stderr, this.val >= 0x20 && this.val < 0x7f ?
-                        "inflate:         literal '%c'\n" :
-                        "inflate:         literal 0x%02x\n", this.val));
-                ROOM();
-                *put++ = (unsigned char)(length);
-                left--;
-                mode = LEN;
-                break;
-            }
-
-            /* process end of block */
-            if (this.op & 32) {
-                Tracevv((stderr, "inflate:         end of block\n"));
-                mode = TYPE;
-                break;
-            }
-
-            /* invalid code */
-            if (this.op & 64) {
-                strm->msg = (char *)"invalid literal/length code";
-                mode = BAD;
-                break;
-            }
-
-            /* length code -- get extra bits, if any */
-            extra = (unsigned)(this.op) & 31;
-            if (extra != 0) {
-                NEEDBITS(extra);
-                length += BITS(extra);
-                DROPBITS(extra);
-            }
-            Tracevv((stderr, "inflate:         length %lu\n", length));
-
-            /* get distance code */
-            for (;;) {
-                this = distcode[BITS(distbits)];
-                if ((unsigned)(this.bits) <= bits) break;
-                PULLBYTE();
-            }
-            if ((this.op & 0xf0) == 0) {
-                last = this;
-                for (;;) {
-                    this = distcode[last.val +
-                            (BITS(last.bits + last.op) >> last.bits)];
-                    if ((unsigned)(last.bits + this.bits) <= bits) break;
-                    PULLBYTE();
-                }
-                DROPBITS(last.bits);
-            }
-            DROPBITS(this.bits);
-            if (this.op & 64) {
-                strm->msg = (char *)"invalid distance code";
-                mode = BAD;
-                break;
-            }
-            offset = (unsigned)this.val;
-
-            /* get distance extra bits, if any */
-            extra = (unsigned)(this.op) & 15;
-            if (extra != 0) {
-                NEEDBITS(extra);
-                offset += BITS(extra);
-                DROPBITS(extra);
-            }
-            if (offset > WSIZE - (wrap ? 0: left)) {
-                strm->msg = (char *)"invalid distance too far back";
-                mode = BAD;
-                break;
-            }
-            Tracevv((stderr, "inflate:         distance %lu\n", offset));
-
-            /* copy match from window to output */
-            do {
-                ROOM();
-                copy = WSIZE - offset;
-                if (copy < left) {
-                    from = put + copy;
-                    copy = left - copy;
-                }
-                else {
-                    from = put - offset;
-                    copy = left;
-                }
-                if (copy > length) copy = length;
-                length -= copy;
-                left -= copy;
-                do {
-                    *put++ = *from++;
-                } while (--copy);
-            } while (length != 0);
-            break;
-
-        case DONE:
-            /* inflate stream terminated properly -- write leftover output */
-            ret = Z_STREAM_END;
-            if (left < WSIZE) {
-                if (out(out_desc, window, (unsigned)(WSIZE - left)))
-                    ret = Z_BUF_ERROR;
-            }
-            goto inf_leave;
-
-        case BAD:
-            ret = Z_DATA_ERROR;
-            goto inf_leave;
-
-        default:                /* can't happen, but makes compilers happy */
-            ret = Z_STREAM_ERROR;
-            goto inf_leave;
-        }
-
-    /* Return unused input */
-  inf_leave:
-    strm->next_in = next;
-    strm->avail_in = have;
-    return ret;
-}
-
-int ZEXPORT inflateBack9End(strm)
-z_stream FAR *strm;
-{
-    if (strm == Z_NULL || strm->state == Z_NULL || strm->zfree == (free_func)0)
-        return Z_STREAM_ERROR;
-    ZFREE(strm, strm->state);
-    strm->state = Z_NULL;
-    Tracev((stderr, "inflate: end\n"));
-    return Z_OK;
-}
Index: trunk/minix/lib/zlib-1.2.3/contrib/infback9/infback9.h
===================================================================
--- trunk/minix/lib/zlib-1.2.3/contrib/infback9/infback9.h	(revision 9)
+++ 	(revision )
@@ -1,37 +1,0 @@
-/* infback9.h -- header for using inflateBack9 functions
- * Copyright (C) 2003 Mark Adler
- * For conditions of distribution and use, see copyright notice in zlib.h
- */
-
-/*
- * This header file and associated patches provide a decoder for PKWare's
- * undocumented deflate64 compression method (method 9).  Use with infback9.c,
- * inftree9.h, inftree9.c, and inffix9.h.  These patches are not supported.
- * This should be compiled with zlib, since it uses zutil.h and zutil.o.
- * This code has not yet been tested on 16-bit architectures.  See the
- * comments in zlib.h for inflateBack() usage.  These functions are used
- * identically, except that there is no windowBits parameter, and a 64K
- * window must be provided.  Also if int's are 16 bits, then a zero for
- * the third parameter of the "out" function actually means 65536UL.
- * zlib.h must be included before this header file.
- */
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-ZEXTERN int ZEXPORT inflateBack9 OF((z_stream FAR *strm,
-                                    in_func in, void FAR *in_desc,
-                                    out_func out, void FAR *out_desc));
-ZEXTERN int ZEXPORT inflateBack9End OF((z_stream FAR *strm));
-ZEXTERN int ZEXPORT inflateBack9Init_ OF((z_stream FAR *strm,
-                                         unsigned char FAR *window,
-                                         const char *version,
-                                         int stream_size));
-#define inflateBack9Init(strm, window) \
-        inflateBack9Init_((strm), (window), \
-        ZLIB_VERSION, sizeof(z_stream))
-
-#ifdef __cplusplus
-}
-#endif
Index: trunk/minix/lib/zlib-1.2.3/contrib/infback9/inffix9.h
===================================================================
--- trunk/minix/lib/zlib-1.2.3/contrib/infback9/inffix9.h	(revision 9)
+++ 	(revision )
@@ -1,107 +1,0 @@
-    /* inffix9.h -- table for decoding deflate64 fixed codes
-     * Generated automatically by makefixed9().
-     */
-
-    /* WARNING: this file should *not* be used by applications.
-       It is part of the implementation of this library and is
-       subject to change. Applications should only use zlib.h.
-     */
-
-    static const code lenfix[512] = {
-        {96,7,0},{0,8,80},{0,8,16},{132,8,115},{130,7,31},{0,8,112},
-        {0,8,48},{0,9,192},{128,7,10},{0,8,96},{0,8,32},{0,9,160},
-        {0,8,0},{0,8,128},{0,8,64},{0,9,224},{128,7,6},{0,8,88},
-        {0,8,24},{0,9,144},{131,7,59},{0,8,120},{0,8,56},{0,9,208},
-        {129,7,17},{0,8,104},{0,8,40},{0,9,176},{0,8,8},{0,8,136},
-        {0,8,72},{0,9,240},{128,7,4},{0,8,84},{0,8,20},{133,8,227},
-        {131,7,43},{0,8,116},{0,8,52},{0,9,200},{129,7,13},{0,8,100},
-        {0,8,36},{0,9,168},{0,8,4},{0,8,132},{0,8,68},{0,9,232},
-        {128,7,8},{0,8,92},{0,8,28},{0,9,152},{132,7,83},{0,8,124},
-        {0,8,60},{0,9,216},{130,7,23},{0,8,108},{0,8,44},{0,9,184},
-        {0,8,12},{0,8,140},{0,8,76},{0,9,248},{128,7,3},{0,8,82},
-        {0,8,18},{133,8,163},{131,7,35},{0,8,114},{0,8,50},{0,9,196},
-        {129,7,11},{0,8,98},{0,8,34},{0,9,164},{0,8,2},{0,8,130},
-        {0,8,66},{0,9,228},{128,7,7},{0,8,90},{0,8,26},{0,9,148},
-        {132,7,67},{0,8,122},{0,8,58},{0,9,212},{130,7,19},{0,8,106},
-        {0,8,42},{0,9,180},{0,8,10},{0,8,138},{0,8,74},{0,9,244},
-        {128,7,5},{0,8,86},{0,8,22},{65,8,0},{131,7,51},{0,8,118},
-        {0,8,54},{0,9,204},{129,7,15},{0,8,102},{0,8,38},{0,9,172},
-        {0,8,6},{0,8,134},{0,8,70},{0,9,236},{128,7,9},{0,8,94},
-        {0,8,30},{0,9,156},{132,7,99},{0,8,126},{0,8,62},{0,9,220},
-        {130,7,27},{0,8,110},{0,8,46},{0,9,188},{0,8,14},{0,8,142},
-        {0,8,78},{0,9,252},{96,7,0},{0,8,81},{0,8,17},{133,8,131},
-        {130,7,31},{0,8,113},{0,8,49},{0,9,194},{128,7,10},{0,8,97},
-        {0,8,33},{0,9,162},{0,8,1},{0,8,129},{0,8,65},{0,9,226},
-        {128,7,6},{0,8,89},{0,8,25},{0,9,146},{131,7,59},{0,8,121},
-        {0,8,57},{0,9,210},{129,7,17},{0,8,105},{0,8,41},{0,9,178},
-        {0,8,9},{0,8,137},{0,8,73},{0,9,242},{128,7,4},{0,8,85},
-        {0,8,21},{144,8,3},{131,7,43},{0,8,117},{0,8,53},{0,9,202},
-        {129,7,13},{0,8,101},{0,8,37},{0,9,170},{0,8,5},{0,8,133},
-        {0,8,69},{0,9,234},{128,7,8},{0,8,93},{0,8,29},{0,9,154},
-        {132,7,83},{0,8,125},{0,8,61},{0,9,218},{130,7,23},{0,8,109},
-        {0,8,45},{0,9,186},{0,8,13},{0,8,141},{0,8,77},{0,9,250},
-        {128,7,3},{0,8,83},{0,8,19},{133,8,195},{131,7,35},{0,8,115},
-        {0,8,51},{0,9,198},{129,7,11},{0,8,99},{0,8,35},{0,9,166},
-        {0,8,3},{0,8,131},{0,8,67},{0,9,230},{128,7,7},{0,8,91},
-        {0,8,27},{0,9,150},{132,7,67},{0,8,123},{0,8,59},{0,9,214},
-        {130,7,19},{0,8,107},{0,8,43},{0,9,182},{0,8,11},{0,8,139},
-        {0,8,75},{0,9,246},{128,7,5},{0,8,87},{0,8,23},{77,8,0},
-        {131,7,51},{0,8,119},{0,8,55},{0,9,206},{129,7,15},{0,8,103},
-        {0,8,39},{0,9,174},{0,8,7},{0,8,135},{0,8,71},{0,9,238},
-        {128,7,9},{0,8,95},{0,8,31},{0,9,158},{132,7,99},{0,8,127},
-        {0,8,63},{0,9,222},{130,7,27},{0,8,111},{0,8,47},{0,9,190},
-        {0,8,15},{0,8,143},{0,8,79},{0,9,254},{96,7,0},{0,8,80},
-        {0,8,16},{132,8,115},{130,7,31},{0,8,112},{0,8,48},{0,9,193},
-        {128,7,10},{0,8,96},{0,8,32},{0,9,161},{0,8,0},{0,8,128},
-        {0,8,64},{0,9,225},{128,7,6},{0,8,88},{0,8,24},{0,9,145},
-        {131,7,59},{0,8,120},{0,8,56},{0,9,209},{129,7,17},{0,8,104},
-        {0,8,40},{0,9,177},{0,8,8},{0,8,136},{0,8,72},{0,9,241},
-        {128,7,4},{0,8,84},{0,8,20},{133,8,227},{131,7,43},{0,8,116},
-        {0,8,52},{0,9,201},{129,7,13},{0,8,100},{0,8,36},{0,9,169},
-        {0,8,4},{0,8,132},{0,8,68},{0,9,233},{128,7,8},{0,8,92},
-        {0,8,28},{0,9,153},{132,7,83},{0,8,124},{0,8,60},{0,9,217},
-        {130,7,23},{0,8,108},{0,8,44},{0,9,185},{0,8,12},{0,8,140},
-        {0,8,76},{0,9,249},{128,7,3},{0,8,82},{0,8,18},{133,8,163},
-        {131,7,35},{0,8,114},{0,8,50},{0,9,197},{129,7,11},{0,8,98},
-        {0,8,34},{0,9,165},{0,8,2},{0,8,130},{0,8,66},{0,9,229},
-        {128,7,7},{0,8,90},{0,8,26},{0,9,149},{132,7,67},{0,8,122},
-        {0,8,58},{0,9,213},{130,7,19},{0,8,106},{0,8,42},{0,9,181},
-        {0,8,10},{0,8,138},{0,8,74},{0,9,245},{128,7,5},{0,8,86},
-        {0,8,22},{65,8,0},{131,7,51},{0,8,118},{0,8,54},{0,9,205},
-        {129,7,15},{0,8,102},{0,8,38},{0,9,173},{0,8,6},{0,8,134},
-        {0,8,70},{0,9,237},{128,7,9},{0,8,94},{0,8,30},{0,9,157},
-        {132,7,99},{0,8,126},{0,8,62},{0,9,221},{130,7,27},{0,8,110},
-        {0,8,46},{0,9,189},{0,8,14},{0,8,142},{0,8,78},{0,9,253},
-        {96,7,0},{0,8,81},{0,8,17},{133,8,131},{130,7,31},{0,8,113},
-        {0,8,49},{0,9,195},{128,7,10},{0,8,97},{0,8,33},{0,9,163},
-        {0,8,1},{0,8,129},{0,8,65},{0,9,227},{128,7,6},{0,8,89},
-        {0,8,25},{0,9,147},{131,7,59},{0,8,121},{0,8,57},{0,9,211},
-        {129,7,17},{0,8,105},{0,8,41},{0,9,179},{0,8,9},{0,8,137},
-        {0,8,73},{0,9,243},{128,7,4},{0,8,85},{0,8,21},{144,8,3},
-        {131,7,43},{0,8,117},{0,8,53},{0,9,203},{129,7,13},{0,8,101},
-        {0,8,37},{0,9,171},{0,8,5},{0,8,133},{0,8,69},{0,9,235},
-        {128,7,8},{0,8,93},{0,8,29},{0,9,155},{132,7,83},{0,8,125},
-        {0,8,61},{0,9,219},{130,7,23},{0,8,109},{0,8,45},{0,9,187},
-        {0,8,13},{0,8,141},{0,8,77},{0,9,251},{128,7,3},{0,8,83},
-        {0,8,19},{133,8,195},{131,7,35},{0,8,115},{0,8,51},{0,9,199},
-        {129,7,11},{0,8,99},{0,8,35},{0,9,167},{0,8,3},{0,8,131},
-        {0,8,67},{0,9,231},{128,7,7},{0,8,91},{0,8,27},{0,9,151},
-        {132,7,67},{0,8,123},{0,8,59},{0,9,215},{130,7,19},{0,8,107},
-        {0,8,43},{0,9,183},{0,8,11},{0,8,139},{0,8,75},{0,9,247},
-        {128,7,5},{0,8,87},{0,8,23},{77,8,0},{131,7,51},{0,8,119},
-        {0,8,55},{0,9,207},{129,7,15},{0,8,103},{0,8,39},{0,9,175},
-        {0,8,7},{0,8,135},{0,8,71},{0,9,239},{128,7,9},{0,8,95},
-        {0,8,31},{0,9,159},{132,7,99},{0,8,127},{0,8,63},{0,9,223},
-        {130,7,27},{0,8,111},{0,8,47},{0,9,191},{0,8,15},{0,8,143},
-        {0,8,79},{0,9,255}
-    };
-
-    static const code distfix[32] = {
-        {128,5,1},{135,5,257},{131,5,17},{139,5,4097},{129,5,5},
-        {137,5,1025},{133,5,65},{141,5,16385},{128,5,3},{136,5,513},
-        {132,5,33},{140,5,8193},{130,5,9},{138,5,2049},{134,5,129},
-        {142,5,32769},{128,5,2},{135,5,385},{131,5,25},{139,5,6145},
-        {129,5,7},{137,5,1537},{133,5,97},{141,5,24577},{128,5,4},
-        {136,5,769},{132,5,49},{140,5,12289},{130,5,13},{138,5,3073},
-        {134,5,193},{142,5,49153}
-    };
Index: trunk/minix/lib/zlib-1.2.3/contrib/infback9/inflate9.h
===================================================================
--- trunk/minix/lib/zlib-1.2.3/contrib/infback9/inflate9.h	(revision 9)
+++ 	(revision )
@@ -1,47 +1,0 @@
-/* inflate9.h -- internal inflate state definition
- * Copyright (C) 1995-2003 Mark Adler
- * For conditions of distribution and use, see copyright notice in zlib.h
- */
-
-/* WARNING: this file should *not* be used by applications. It is
-   part of the implementation of the compression library and is
-   subject to change. Applications should only use zlib.h.
- */
-
-/* Possible inflate modes between inflate() calls */
-typedef enum {
-        TYPE,       /* i: waiting for type bits, including last-flag bit */
-        STORED,     /* i: waiting for stored size (length and complement) */
-        TABLE,      /* i: waiting for dynamic block table lengths */
-            LEN,        /* i: waiting for length/lit code */
-    DONE,       /* finished check, done -- remain here until reset */
-    BAD         /* got a data error -- remain here until reset */
-} inflate_mode;
-
-/*
-    State transitions between above modes -
-
-    (most modes can go to the BAD mode -- not shown for clarity)
-
-    Read deflate blocks:
-            TYPE -> STORED or TABLE or LEN or DONE
-            STORED -> TYPE
-            TABLE -> LENLENS -> CODELENS -> LEN
-    Read deflate codes:
-                LEN -> LEN or TYPE
- */
-
-/* state maintained between inflate() calls.  Approximately 7K bytes. */
-struct inflate_state {
-        /* sliding window */
-    unsigned char FAR *window;  /* allocated sliding window, if needed */
-        /* dynamic table building */
-    unsigned ncode;             /* number of code length code lengths */
-    unsigned nlen;              /* number of length code lengths */
-    unsigned ndist;             /* number of distance code lengths */
-    unsigned have;              /* number of code lengths in lens[] */
-    code FAR *next;             /* next available space in codes[] */
-    unsigned short lens[320];   /* temporary storage for code lengths */
-    unsigned short work[288];   /* work area for code table building */
-    code codes[ENOUGH];         /* space for code tables */
-};
Index: trunk/minix/lib/zlib-1.2.3/contrib/infback9/inftree9.c
===================================================================
--- trunk/minix/lib/zlib-1.2.3/contrib/infback9/inftree9.c	(revision 9)
+++ 	(revision )
@@ -1,323 +1,0 @@
-/* inftree9.c -- generate Huffman trees for efficient decoding
- * Copyright (C) 1995-2005 Mark Adler
- * For conditions of distribution and use, see copyright notice in zlib.h
- */
-
-#include "zutil.h"
-#include "inftree9.h"
-
-#define MAXBITS 15
-
-const char inflate9_copyright[] =
-   " inflate9 1.2.3 Copyright 1995-2005 Mark Adler ";
-/*
-  If you use the zlib library in a product, an acknowledgment is welcome
-  in the documentation of your product. If for some reason you cannot
-  include such an acknowledgment, I would appreciate that you keep this
-  copyright string in the executable of your product.
- */
-
-/*
-   Build a set of tables to decode the provided canonical Huffman code.
-   The code lengths are lens[0..codes-1].  The result starts at *table,
-   whose indices are 0..2^bits-1.  work is a writable array of at least
-   lens shorts, which is used as a work area.  type is the type of code
-   to be generated, CODES, LENS, or DISTS.  On return, zero is success,
-   -1 is an invalid code, and +1 means that ENOUGH isn't enough.  table
-   on return points to the next available entry's address.  bits is the
-   requested root table index bits, and on return it is the actual root
-   table index bits.  It will differ if the request is greater than the
-   longest code or if it is less than the shortest code.
- */
-int inflate_table9(type, lens, codes, table, bits, work)
-codetype type;
-unsigned short FAR *lens;
-unsigned codes;
-code FAR * FAR *table;
-unsigned FAR *bits;
-unsigned short FAR *work;
-{
-    unsigned len;               /* a code's length in bits */
-    unsigned sym;               /* index of code symbols */
-    unsigned min, max;          /* minimum and maximum code lengths */
-    unsigned root;              /* number of index bits for root table */
-    unsigned curr;              /* number of index bits for current table */
-    unsigned drop;              /* code bits to drop for sub-table */
-    int left;                   /* number of prefix codes available */
-    unsigned used;              /* code entries in table used */
-    unsigned huff;              /* Huffman code */
-    unsigned incr;              /* for incrementing code, index */
-    unsigned fill;              /* index for replicating entries */
-    unsigned low;               /* low bits for current root entry */
-    unsigned mask;              /* mask for low root bits */
-    code this;                  /* table entry for duplication */
-    code FAR *next;             /* next available space in table */
-    const unsigned short FAR *base;     /* base value table to use */
-    const unsigned short FAR *extra;    /* extra bits table to use */
-    int end;                    /* use base and extra for symbol > end */
-    unsigned short count[MAXBITS+1];    /* number of codes of each length */
-    unsigned short offs[MAXBITS+1];     /* offsets in table for each length */
-    static const unsigned short lbase[31] = { /* Length codes 257..285 base */
-        3, 4, 5, 6, 7, 8, 9, 10, 11, 13, 15, 17,
-        19, 23, 27, 31, 35, 43, 51, 59, 67, 83, 99, 115,
-        131, 163, 195, 227, 3, 0, 0};
-    static const unsigned short lext[31] = { /* Length codes 257..285 extra */
-        128, 128, 128, 128, 128, 128, 128, 128, 129, 129, 129, 129,
-        130, 130, 130, 130, 131, 131, 131, 131, 132, 132, 132, 132,
-        133, 133, 133, 133, 144, 201, 196};
-    static const unsigned short dbase[32] = { /* Distance codes 0..31 base */
-        1, 2, 3, 4, 5, 7, 9, 13, 17, 25, 33, 49,
-        65, 97, 129, 193, 257, 385, 513, 769, 1025, 1537, 2049, 3073,
-        4097, 6145, 8193, 12289, 16385, 24577, 32769, 49153};
-    static const unsigned short dext[32] = { /* Distance codes 0..31 extra */
-        128, 128, 128, 128, 129, 129, 130, 130, 131, 131, 132, 132,
-        133, 133, 134, 134, 135, 135, 136, 136, 137, 137, 138, 138,
-        139, 139, 140, 140, 141, 141, 142, 142};
-
-    /*
-       Process a set of code lengths to create a canonical Huffman code.  The
-       code lengths are lens[0..codes-1].  Each length corresponds to the
-       symbols 0..codes-1.  The Huffman code is generated by first sorting the
-       symbols by length from short to long, and retaining the symbol order
-       for codes with equal lengths.  Then the code starts with all zero bits
-       for the first code of the shortest length, and the codes are integer
-       increments for the same length, and zeros are appended as the length
-       increases.  For the deflate format, these bits are stored backwards
-       from their more natural integer increment ordering, and so when the
-       decoding tables are built in the large loop below, the integer codes
-       are incremented backwards.
-
-       This routine assumes, but does not check, that all of the entries in
-       lens[] are in the range 0..MAXBITS.  The caller must assure this.
-       1..MAXBITS is interpreted as that code length.  zero means that that
-       symbol does not occur in this code.
-
-       The codes are sorted by computing a count of codes for each length,
-       creating from that a table of starting indices for each length in the
-       sorted table, and then entering the symbols in order in the sorted
-       table.  The sorted table is work[], with that space being provided by
-       the caller.
-
-       The length counts are used for other purposes as well, i.e. finding
-       the minimum and maximum length codes, determining if there are any
-       codes at all, checking for a valid set of lengths, and looking ahead
-       at length counts to determine sub-table sizes when building the
-       decoding tables.
-     */
-
-    /* accumulate lengths for codes (assumes lens[] all in 0..MAXBITS) */
-    for (len = 0; len <= MAXBITS; len++)
-        count[len] = 0;
-    for (sym = 0; sym < codes; sym++)
-        count[lens[sym]]++;
-
-    /* bound code lengths, force root to be within code lengths */
-    root = *bits;
-    for (max = MAXBITS; max >= 1; max--)
-        if (count[max] != 0) break;
-    if (root > max) root = max;
-    if (max == 0) return -1;            /* no codes! */
-    for (min = 1; min <= MAXBITS; min++)
-        if (count[min] != 0) break;
-    if (root < min) root = min;
-
-    /* check for an over-subscribed or incomplete set of lengths */
-    left = 1;
-    for (len = 1; len <= MAXBITS; len++) {
-        left <<= 1;
-        left -= count[len];
-        if (left < 0) return -1;        /* over-subscribed */
-    }
-    if (left > 0 && (type == CODES || max != 1))
-        return -1;                      /* incomplete set */
-
-    /* generate offsets into symbol table for each length for sorting */
-    offs[1] = 0;
-    for (len = 1; len < MAXBITS; len++)
-        offs[len + 1] = offs[len] + count[len];
-
-    /* sort symbols by length, by symbol order within each length */
-    for (sym = 0; sym < codes; sym++)
-        if (lens[sym] != 0) work[offs[lens[sym]]++] = (unsigned short)sym;
-
-    /*
-       Create and fill in decoding tables.  In this loop, the table being
-       filled is at next and has curr index bits.  The code being used is huff
-       with length len.  That code is converted to an index by dropping drop
-       bits off of the bottom.  For codes where len is less than drop + curr,
-       those top drop + curr - len bits are incremented through all values to
-       fill the table with replicated entries.
-
-       root is the number of index bits for the root table.  When len exceeds
-       root, sub-tables are created pointed to by the root entry with an index
-       of the low root bits of huff.  This is saved in low to check for when a
-       new sub-table should be started.  drop is zero when the root table is
-       being filled, and drop is root when sub-tables are being filled.
-
-       When a new sub-table is needed, it is necessary to look ahead in the
-       code lengths to determine what size sub-table is needed.  The length
-       counts are used for this, and so count[] is decremented as codes are
-       entered in the tables.
-
-       used keeps track of how many table entries have been allocated from the
-       provided *table space.  It is checked when a LENS table is being made
-       against the space in *table, ENOUGH, minus the maximum space needed by
-       the worst case distance code, MAXD.  This should never happen, but the
-       sufficiency of ENOUGH has not been proven exhaustively, hence the check.
-       This assumes that when type == LENS, bits == 9.
-
-       sym increments through all symbols, and the loop terminates when
-       all codes of length max, i.e. all codes, have been processed.  This
-       routine permits incomplete codes, so another loop after this one fills
-       in the rest of the decoding tables with invalid code markers.
-     */
-
-    /* set up for code type */
-    switch (type) {
-    case CODES:
-        base = extra = work;    /* dummy value--not used */
-        end = 19;
-        break;
-    case LENS:
-        base = lbase;
-        base -= 257;
-        extra = lext;
-        extra -= 257;
-        end = 256;
-        break;
-    default:            /* DISTS */
-        base = dbase;
-        extra = dext;
-        end = -1;
-    }
-
-    /* initialize state for loop */
-    huff = 0;                   /* starting code */
-    sym = 0;                    /* starting code symbol */
-    len = min;                  /* starting code length */
-    next = *table;              /* current table to fill in */
-    curr = root;                /* current table index bits */
-    drop = 0;                   /* current bits to drop from code for index */
-    low = (unsigned)(-1);       /* trigger new sub-table when len > root */
-    used = 1U << root;          /* use root table entries */
-    mask = used - 1;            /* mask for comparing low */
-
-    /* check available table space */
-    if (type == LENS && used >= ENOUGH - MAXD)
-        return 1;
-
-    /* process all codes and make table entries */
-    for (;;) {
-        /* create table entry */
-        this.bits = (unsigned char)(len - drop);
-        if ((int)(work[sym]) < end) {
-            this.op = (unsigned char)0;
-            this.val = work[sym];
-        }
-        else if ((int)(work[sym]) > end) {
-            this.op = (unsigned char)(extra[work[sym]]);
-            this.val = base[work[sym]];
-        }
-        else {
-            this.op = (unsigned char)(32 + 64);         /* end of block */
-            this.val = 0;
-        }
-
-        /* replicate for those indices with low len bits equal to huff */
-        incr = 1U << (len - drop);
-        fill = 1U << curr;
-        do {
-            fill -= incr;
-            next[(huff >> drop) + fill] = this;
-        } while (fill != 0);
-
-        /* backwards increment the len-bit code huff */
-        incr = 1U << (len - 1);
-        while (huff & incr)
-            incr >>= 1;
-        if (incr != 0) {
-            huff &= incr - 1;
-            huff += incr;
-        }
-        else
-            huff = 0;
-
-        /* go to next symbol, update count, len */
-        sym++;
-        if (--(count[len]) == 0) {
-            if (len == max) break;
-            len = lens[work[sym]];
-        }
-
-        /* create new sub-table if needed */
-        if (len > root && (huff & mask) != low) {
-            /* if first time, transition to sub-tables */
-            if (drop == 0)
-                drop = root;
-
-            /* increment past last table */
-            next += 1U << curr;
-
-            /* determine length of next table */
-            curr = len - drop;
-            left = (int)(1 << curr);
-            while (curr + drop < max) {
-                left -= count[curr + drop];
-                if (left <= 0) break;
-                curr++;
-                left <<= 1;
-            }
-
-            /* check for enough space */
-            used += 1U << curr;
-            if (type == LENS && used >= ENOUGH - MAXD)
-                return 1;
-
-            /* point entry in root table to sub-table */
-            low = huff & mask;
-            (*table)[low].op = (unsigned char)curr;
-            (*table)[low].bits = (unsigned char)root;
-            (*table)[low].val = (unsigned short)(next - *table);
-        }
-    }
-
-    /*
-       Fill in rest of table for incomplete codes.  This loop is similar to the
-       loop above in incrementing huff for table indices.  It is assumed that
-       len is equal to curr + drop, so there is no loop needed to increment
-       through high index bits.  When the current sub-table is filled, the loop
-       drops back to the root table to fill in any remaining entries there.
-     */
-    this.op = (unsigned char)64;                /* invalid code marker */
-    this.bits = (unsigned char)(len - drop);
-    this.val = (unsigned short)0;
-    while (huff != 0) {
-        /* when done with sub-table, drop back to root table */
-        if (drop != 0 && (huff & mask) != low) {
-            drop = 0;
-            len = root;
-            next = *table;
-            curr = root;
-            this.bits = (unsigned char)len;
-        }
-
-        /* put invalid code marker in table */
-        next[huff >> drop] = this;
-
-        /* backwards increment the len-bit code huff */
-        incr = 1U << (len - 1);
-        while (huff & incr)
-            incr >>= 1;
-        if (incr != 0) {
-            huff &= incr - 1;
-            huff += incr;
-        }
-        else
-            huff = 0;
-    }
-
-    /* set return parameters */
-    *table += used;
-    *bits = root;
-    return 0;
-}
Index: trunk/minix/lib/zlib-1.2.3/contrib/infback9/inftree9.h
===================================================================
--- trunk/minix/lib/zlib-1.2.3/contrib/infback9/inftree9.h	(revision 9)
+++ 	(revision )
@@ -1,55 +1,0 @@
-/* inftree9.h -- header to use inftree9.c
- * Copyright (C) 1995-2003 Mark Adler
- * For conditions of distribution and use, see copyright notice in zlib.h
- */
-
-/* WARNING: this file should *not* be used by applications. It is
-   part of the implementation of the compression library and is
-   subject to change. Applications should only use zlib.h.
- */
-
-/* Structure for decoding tables.  Each entry provides either the
-   information needed to do the operation requested by the code that
-   indexed that table entry, or it provides a pointer to another
-   table that indexes more bits of the code.  op indicates whether
-   the entry is a pointer to another table, a literal, a length or
-   distance, an end-of-block, or an invalid code.  For a table
-   pointer, the low four bits of op is the number of index bits of
-   that table.  For a length or distance, the low four bits of op
-   is the number of extra bits to get after the code.  bits is
-   the number of bits in this code or part of the code to drop off
-   of the bit buffer.  val is the actual byte to output in the case
-   of a literal, the base length or distance, or the offset from
-   the current table to the next table.  Each entry is four bytes. */
-typedef struct {
-    unsigned char op;           /* operation, extra bits, table bits */
-    unsigned char bits;         /* bits in this part of the code */
-    unsigned short val;         /* offset in table or code value */
-} code;
-
-/* op values as set by inflate_table():
-    00000000 - literal
-    0000tttt - table link, tttt != 0 is the number of table index bits
-    100eeeee - length or distance, eeee is the number of extra bits
-    01100000 - end of block
-    01000000 - invalid code
- */
-
-/* Maximum size of dynamic tree.  The maximum found in a long but non-
-   exhaustive search was 1444 code structures (852 for length/literals
-   and 592 for distances, the latter actually the result of an
-   exhaustive search).  The true maximum is not known, but the value
-   below is more than safe. */
-#define ENOUGH 2048
-#define MAXD 592
-
-/* Type of code to build for inftable() */
-typedef enum {
-    CODES,
-    LENS,
-    DISTS
-} codetype;
-
-extern int inflate_table9 OF((codetype type, unsigned short FAR *lens,
-                             unsigned codes, code FAR * FAR *table,
-                             unsigned FAR *bits, unsigned short FAR *work));
Index: trunk/minix/lib/zlib-1.2.3/contrib/inflate86/inffas86.c
===================================================================
--- trunk/minix/lib/zlib-1.2.3/contrib/inflate86/inffas86.c	(revision 9)
+++ 	(revision )
@@ -1,1157 +1,0 @@
-/* inffas86.c is a hand tuned assembler version of
- *
- * inffast.c -- fast decoding
- * Copyright (C) 1995-2003 Mark Adler
- * For conditions of distribution and use, see copyright notice in zlib.h
- *
- * Copyright (C) 2003 Chris Anderson <christop@charm.net>
- * Please use the copyright conditions above.
- *
- * Dec-29-2003 -- I added AMD64 inflate asm support.  This version is also
- * slightly quicker on x86 systems because, instead of using rep movsb to copy
- * data, it uses rep movsw, which moves data in 2-byte chunks instead of single
- * bytes.  I've tested the AMD64 code on a Fedora Core 1 + the x86_64 updates
- * from http://fedora.linux.duke.edu/fc1_x86_64
- * which is running on an Athlon 64 3000+ / Gigabyte GA-K8VT800M system with
- * 1GB ram.  The 64-bit version is about 4% faster than the 32-bit version,
- * when decompressing mozilla-source-1.3.tar.gz.
- *
- * Mar-13-2003 -- Most of this is derived from inffast.S which is derived from
- * the gcc -S output of zlib-1.2.0/inffast.c.  Zlib-1.2.0 is in beta release at
- * the moment.  I have successfully compiled and tested this code with gcc2.96,
- * gcc3.2, icc5.0, msvc6.0.  It is very close to the speed of inffast.S
- * compiled with gcc -DNO_MMX, but inffast.S is still faster on the P3 with MMX
- * enabled.  I will attempt to merge the MMX code into this version.  Newer
- * versions of this and inffast.S can be found at
- * http://www.eetbeetee.com/zlib/ and http://www.charm.net/~christop/zlib/
- */
-
-#include "zutil.h"
-#include "inftrees.h"
-#include "inflate.h"
-#include "inffast.h"
-
-/* Mark Adler's comments from inffast.c: */
-
-/*
-   Decode literal, length, and distance codes and write out the resulting
-   literal and match bytes until either not enough input or output is
-   available, an end-of-block is encountered, or a data error is encountered.
-   When large enough input and output buffers are supplied to inflate(), for
-   example, a 16K input buffer and a 64K output buffer, more than 95% of the
-   inflate execution time is spent in this routine.
-
-   Entry assumptions:
-
-        state->mode == LEN
-        strm->avail_in >= 6
-        strm->avail_out >= 258
-        start >= strm->avail_out
-        state->bits < 8
-
-   On return, state->mode is one of:
-
-        LEN -- ran out of enough output space or enough available input
-        TYPE -- reached end of block code, inflate() to interpret next block
-        BAD -- error in block data
-
-   Notes:
-
-    - The maximum input bits used by a length/distance pair is 15 bits for the
-      length code, 5 bits for the length extra, 15 bits for the distance code,
-      and 13 bits for the distance extra.  This totals 48 bits, or six bytes.
-      Therefore if strm->avail_in >= 6, then there is enough input to avoid
-      checking for available input while decoding.
-
-    - The maximum bytes that a single length/distance pair can output is 258
-      bytes, which is the maximum length that can be coded.  inflate_fast()
-      requires strm->avail_out >= 258 for each loop to avoid checking for
-      output space.
- */
-void inflate_fast(strm, start)
-z_streamp strm;
-unsigned start;         /* inflate()'s starting value for strm->avail_out */
-{
-    struct inflate_state FAR *state;
-    struct inffast_ar {
-/* 64   32                               x86  x86_64 */
-/* ar offset                              register */
-/*  0    0 */ void *esp;                /* esp save */
-/*  8    4 */ void *ebp;                /* ebp save */
-/* 16    8 */ unsigned char FAR *in;    /* esi rsi  local strm->next_in */
-/* 24   12 */ unsigned char FAR *last;  /*     r9   while in < last */
-/* 32   16 */ unsigned char FAR *out;   /* edi rdi  local strm->next_out */
-/* 40   20 */ unsigned char FAR *beg;   /*          inflate()'s init next_out */
-/* 48   24 */ unsigned char FAR *end;   /*     r10  while out < end */
-/* 56   28 */ unsigned char FAR *window;/*          size of window, wsize!=0 */
-/* 64   32 */ code const FAR *lcode;    /* ebp rbp  local strm->lencode */
-/* 72   36 */ code const FAR *dcode;    /*     r11  local strm->distcode */
-/* 80   40 */ unsigned long hold;       /* edx rdx  local strm->hold */
-/* 88   44 */ unsigned bits;            /* ebx rbx  local strm->bits */
-/* 92   48 */ unsigned wsize;           /*          window size */
-/* 96   52 */ unsigned write;           /*          window write index */
-/*100   56 */ unsigned lmask;           /*     r12  mask for lcode */
-/*104   60 */ unsigned dmask;           /*     r13  mask for dcode */
-/*108   64 */ unsigned len;             /*     r14  match length */
-/*112   68 */ unsigned dist;            /*     r15  match distance */
-/*116   72 */ unsigned status;          /*          set when state chng*/
-    } ar;
-
-#if defined( __GNUC__ ) && defined( __amd64__ ) && ! defined( __i386 )
-#define PAD_AVAIL_IN 6
-#define PAD_AVAIL_OUT 258
-#else
-#define PAD_AVAIL_IN 5
-#define PAD_AVAIL_OUT 257
-#endif
-
-    /* copy state to local variables */
-    state = (struct inflate_state FAR *)strm->state;
-    ar.in = strm->next_in;
-    ar.last = ar.in + (strm->avail_in - PAD_AVAIL_IN);
-    ar.out = strm->next_out;
-    ar.beg = ar.out - (start - strm->avail_out);
-    ar.end = ar.out + (strm->avail_out - PAD_AVAIL_OUT);
-    ar.wsize = state->wsize;
-    ar.write = state->write;
-    ar.window = state->window;
-    ar.hold = state->hold;
-    ar.bits = state->bits;
-    ar.lcode = state->lencode;
-    ar.dcode = state->distcode;
-    ar.lmask = (1U << state->lenbits) - 1;
-    ar.dmask = (1U << state->distbits) - 1;
-
-    /* decode literals and length/distances until end-of-block or not enough
-       input data or output space */
-
-    /* align in on 1/2 hold size boundary */
-    while (((unsigned long)(void *)ar.in & (sizeof(ar.hold) / 2 - 1)) != 0) {
-        ar.hold += (unsigned long)*ar.in++ << ar.bits;
-        ar.bits += 8;
-    }
-
-#if defined( __GNUC__ ) && defined( __amd64__ ) && ! defined( __i386 )
-    __asm__ __volatile__ (
-"        leaq    %0, %%rax\n"
-"        movq    %%rbp, 8(%%rax)\n"       /* save regs rbp and rsp */
-"        movq    %%rsp, (%%rax)\n"
-"        movq    %%rax, %%rsp\n"          /* make rsp point to &ar */
-"        movq    16(%%rsp), %%rsi\n"      /* rsi  = in */
-"        movq    32(%%rsp), %%rdi\n"      /* rdi  = out */
-"        movq    24(%%rsp), %%r9\n"       /* r9   = last */
-"        movq    48(%%rsp), %%r10\n"      /* r10  = end */
-"        movq    64(%%rsp), %%rbp\n"      /* rbp  = lcode */
-"        movq    72(%%rsp), %%r11\n"      /* r11  = dcode */
-"        movq    80(%%rsp), %%rdx\n"      /* rdx  = hold */
-"        movl    88(%%rsp), %%ebx\n"      /* ebx  = bits */
-"        movl    100(%%rsp), %%r12d\n"    /* r12d = lmask */
-"        movl    104(%%rsp), %%r13d\n"    /* r13d = dmask */
-                                          /* r14d = len */
-                                          /* r15d = dist */
-"        cld\n"
-"        cmpq    %%rdi, %%r10\n"
-"        je      .L_one_time\n"           /* if only one decode left */
-"        cmpq    %%rsi, %%r9\n"
-"        je      .L_one_time\n"
-"        jmp     .L_do_loop\n"
-
-".L_one_time:\n"
-"        movq    %%r12, %%r8\n"           /* r8 = lmask */
-"        cmpb    $32, %%bl\n"
-"        ja      .L_get_length_code_one_time\n"
-
-"        lodsl\n"                         /* eax = *(uint *)in++ */
-"        movb    %%bl, %%cl\n"            /* cl = bits, needs it for shifting */
-"        addb    $32, %%bl\n"             /* bits += 32 */
-"        shlq    %%cl, %%rax\n"
-"        orq     %%rax, %%rdx\n"          /* hold |= *((uint *)in)++ << bits */
-"        jmp     .L_get_length_code_one_time\n"
-
-".align 32,0x90\n"
-".L_while_test:\n"
-"        cmpq    %%rdi, %%r10\n"
-"        jbe     .L_break_loop\n"
-"        cmpq    %%rsi, %%r9\n"
-"        jbe     .L_break_loop\n"
-
-".L_do_loop:\n"
-"        movq    %%r12, %%r8\n"           /* r8 = lmask */
-"        cmpb    $32, %%bl\n"
-"        ja      .L_get_length_code\n"    /* if (32 < bits) */
-
-"        lodsl\n"                         /* eax = *(uint *)in++ */
-"        movb    %%bl, %%cl\n"            /* cl = bits, needs it for shifting */
-"        addb    $32, %%bl\n"             /* bits += 32 */
-"        shlq    %%cl, %%rax\n"
-"        orq     %%rax, %%rdx\n"          /* hold |= *((uint *)in)++ << bits */
-
-".L_get_length_code:\n"
-"        andq    %%rdx, %%r8\n"            /* r8 &= hold */
-"        movl    (%%rbp,%%r8,4), %%eax\n"  /* eax = lcode[hold & lmask] */
-
-"        movb    %%ah, %%cl\n"            /* cl = this.bits */
-"        subb    %%ah, %%bl\n"            /* bits -= this.bits */
-"        shrq    %%cl, %%rdx\n"           /* hold >>= this.bits */
-
-"        testb   %%al, %%al\n"
-"        jnz     .L_test_for_length_base\n" /* if (op != 0) 45.7% */
-
-"        movq    %%r12, %%r8\n"            /* r8 = lmask */
-"        shrl    $16, %%eax\n"            /* output this.val char */
-"        stosb\n"
-
-".L_get_length_code_one_time:\n"
-"        andq    %%rdx, %%r8\n"            /* r8 &= hold */
-"        movl    (%%rbp,%%r8,4), %%eax\n" /* eax = lcode[hold & lmask] */
-
-".L_dolen:\n"
-"        movb    %%ah, %%cl\n"            /* cl = this.bits */
-"        subb    %%ah, %%bl\n"            /* bits -= this.bits */
-"        shrq    %%cl, %%rdx\n"           /* hold >>= this.bits */
-
-"        testb   %%al, %%al\n"
-"        jnz     .L_test_for_length_base\n" /* if (op != 0) 45.7% */
-
-"        shrl    $16, %%eax\n"            /* output this.val char */
-"        stosb\n"
-"        jmp     .L_while_test\n"
-
-".align 32,0x90\n"
-".L_test_for_length_base:\n"
-"        movl    %%eax, %%r14d\n"         /* len = this */
-"        shrl    $16, %%r14d\n"           /* len = this.val */
-"        movb    %%al, %%cl\n"
-
-"        testb   $16, %%al\n"
-"        jz      .L_test_for_second_level_length\n" /* if ((op & 16) == 0) 8% */
-"        andb    $15, %%cl\n"             /* op &= 15 */
-"        jz      .L_decode_distance\n"    /* if (!op) */
-
-".L_add_bits_to_len:\n"
-"        subb    %%cl, %%bl\n"
-"        xorl    %%eax, %%eax\n"
-"        incl    %%eax\n"
-"        shll    %%cl, %%eax\n"
-"        decl    %%eax\n"
-"        andl    %%edx, %%eax\n"          /* eax &= hold */
-"        shrq    %%cl, %%rdx\n"
-"        addl    %%eax, %%r14d\n"         /* len += hold & mask[op] */
-
-".L_decode_distance:\n"
-"        movq    %%r13, %%r8\n"           /* r8 = dmask */
-"        cmpb    $32, %%bl\n"
-"        ja      .L_get_distance_code\n"  /* if (32 < bits) */
-
-"        lodsl\n"                         /* eax = *(uint *)in++ */
-"        movb    %%bl, %%cl\n"            /* cl = bits, needs it for shifting */
-"        addb    $32, %%bl\n"             /* bits += 32 */
-"        shlq    %%cl, %%rax\n"
-"        orq     %%rax, %%rdx\n"          /* hold |= *((uint *)in)++ << bits */
-
-".L_get_distance_code:\n"
-"        andq    %%rdx, %%r8\n"           /* r8 &= hold */
-"        movl    (%%r11,%%r8,4), %%eax\n" /* eax = dcode[hold & dmask] */
-
-".L_dodist:\n"
-"        movl    %%eax, %%r15d\n"         /* dist = this */
-"        shrl    $16, %%r15d\n"           /* dist = this.val */
-"        movb    %%ah, %%cl\n"
-"        subb    %%ah, %%bl\n"            /* bits -= this.bits */
-"        shrq    %%cl, %%rdx\n"           /* hold >>= this.bits */
-"        movb    %%al, %%cl\n"            /* cl = this.op */
-
-"        testb   $16, %%al\n"             /* if ((op & 16) == 0) */
-"        jz      .L_test_for_second_level_dist\n"
-"        andb    $15, %%cl\n"             /* op &= 15 */
-"        jz      .L_check_dist_one\n"
-
-".L_add_bits_to_dist:\n"
-"        subb    %%cl, %%bl\n"
-"        xorl    %%eax, %%eax\n"
-"        incl    %%eax\n"
-"        shll    %%cl, %%eax\n"
-"        decl    %%eax\n"                 /* (1 << op) - 1 */
-"        andl    %%edx, %%eax\n"          /* eax &= hold */
-"        shrq    %%cl, %%rdx\n"
-"        addl    %%eax, %%r15d\n"         /* dist += hold & ((1 << op) - 1) */
-
-".L_check_window:\n"
-"        movq    %%rsi, %%r8\n"           /* save in so from can use it's reg */
-"        movq    %%rdi, %%rax\n"
-"        subq    40(%%rsp), %%rax\n"      /* nbytes = out - beg */
-
-"        cmpl    %%r15d, %%eax\n"
-"        jb      .L_clip_window\n"        /* if (dist > nbytes) 4.2% */
-
-"        movl    %%r14d, %%ecx\n"         /* ecx = len */
-"        movq    %%rdi, %%rsi\n"
-"        subq    %%r15, %%rsi\n"          /* from = out - dist */
-
-"        sarl    %%ecx\n"
-"        jnc     .L_copy_two\n"           /* if len % 2 == 0 */
-
-"        rep     movsw\n"
-"        movb    (%%rsi), %%al\n"
-"        movb    %%al, (%%rdi)\n"
-"        incq    %%rdi\n"
-
-"        movq    %%r8, %%rsi\n"           /* move in back to %rsi, toss from */
-"        jmp     .L_while_test\n"
-
-".L_copy_two:\n"
-"        rep     movsw\n"
-"        movq    %%r8, %%rsi\n"           /* move in back to %rsi, toss from */
-"        jmp     .L_while_test\n"
-
-".align 32,0x90\n"
-".L_check_dist_one:\n"
-"        cmpl    $1, %%r15d\n"            /* if dist 1, is a memset */
-"        jne     .L_check_window\n"
-"        cmpq    %%rdi, 40(%%rsp)\n"      /* if out == beg, outside window */
-"        je      .L_check_window\n"
-
-"        movl    %%r14d, %%ecx\n"         /* ecx = len */
-"        movb    -1(%%rdi), %%al\n"
-"        movb    %%al, %%ah\n"
-
-"        sarl    %%ecx\n"
-"        jnc     .L_set_two\n"
-"        movb    %%al, (%%rdi)\n"
-"        incq    %%rdi\n"
-
-".L_set_two:\n"
-"        rep     stosw\n"
-"        jmp     .L_while_test\n"
-
-".align 32,0x90\n"
-".L_test_for_second_level_length:\n"
-"        testb   $64, %%al\n"
-"        jnz     .L_test_for_end_of_block\n" /* if ((op & 64) != 0) */
-
-"        xorl    %%eax, %%eax\n"
-"        incl    %%eax\n"
-"        shll    %%cl, %%eax\n"
-"        decl    %%eax\n"
-"        andl    %%edx, %%eax\n"         /* eax &= hold */
-"        addl    %%r14d, %%eax\n"        /* eax += len */
-"        movl    (%%rbp,%%rax,4), %%eax\n" /* eax = lcode[val+(hold&mask[op])]*/
-"        jmp     .L_dolen\n"
-
-".align 32,0x90\n"
-".L_test_for_second_level_dist:\n"
-"        testb   $64, %%al\n"
-"        jnz     .L_invalid_distance_code\n" /* if ((op & 64) != 0) */
-
-"        xorl    %%eax, %%eax\n"
-"        incl    %%eax\n"
-"        shll    %%cl, %%eax\n"
-"        decl    %%eax\n"
-"        andl    %%edx, %%eax\n"         /* eax &= hold */
-"        addl    %%r15d, %%eax\n"        /* eax += dist */
-"        movl    (%%r11,%%rax,4), %%eax\n" /* eax = dcode[val+(hold&mask[op])]*/
-"        jmp     .L_dodist\n"
-
-".align 32,0x90\n"
-".L_clip_window:\n"
-"        movl    %%eax, %%ecx\n"         /* ecx = nbytes */
-"        movl    92(%%rsp), %%eax\n"     /* eax = wsize, prepare for dist cmp */
-"        negl    %%ecx\n"                /* nbytes = -nbytes */
-
-"        cmpl    %%r15d, %%eax\n"
-"        jb      .L_invalid_distance_too_far\n" /* if (dist > wsize) */
-
-"        addl    %%r15d, %%ecx\n"         /* nbytes = dist - nbytes */
-"        cmpl    $0, 96(%%rsp)\n"
-"        jne     .L_wrap_around_window\n" /* if (write != 0) */
-
-"        movq    56(%%rsp), %%rsi\n"     /* from  = window */
-"        subl    %%ecx, %%eax\n"         /* eax  -= nbytes */
-"        addq    %%rax, %%rsi\n"         /* from += wsize - nbytes */
-
-"        movl    %%r14d, %%eax\n"        /* eax = len */
-"        cmpl    %%ecx, %%r14d\n"
-"        jbe     .L_do_copy\n"           /* if (nbytes >= len) */
-
-"        subl    %%ecx, %%eax\n"         /* eax -= nbytes */
-"        rep     movsb\n"
-"        movq    %%rdi, %%rsi\n"
-"        subq    %%r15, %%rsi\n"         /* from = &out[ -dist ] */
-"        jmp     .L_do_copy\n"
-
-".align 32,0x90\n"
-".L_wrap_around_window:\n"
-"        movl    96(%%rsp), %%eax\n"     /* eax = write */
-"        cmpl    %%eax, %%ecx\n"
-"        jbe     .L_contiguous_in_window\n" /* if (write >= nbytes) */
-
-"        movl    92(%%rsp), %%esi\n"     /* from  = wsize */
-"        addq    56(%%rsp), %%rsi\n"     /* from += window */
-"        addq    %%rax, %%rsi\n"         /* from += write */
-"        subq    %%rcx, %%rsi\n"         /* from -= nbytes */
-"        subl    %%eax, %%ecx\n"         /* nbytes -= write */
-
-"        movl    %%r14d, %%eax\n"        /* eax = len */
-"        cmpl    %%ecx, %%eax\n"
-"        jbe     .L_do_copy\n"           /* if (nbytes >= len) */
-
-"        subl    %%ecx, %%eax\n"         /* len -= nbytes */
-"        rep     movsb\n"
-"        movq    56(%%rsp), %%rsi\n"     /* from = window */
-"        movl    96(%%rsp), %%ecx\n"     /* nbytes = write */
-"        cmpl    %%ecx, %%eax\n"
-"        jbe     .L_do_copy\n"           /* if (nbytes >= len) */
-
-"        subl    %%ecx, %%eax\n"         /* len -= nbytes */
-"        rep     movsb\n"
-"        movq    %%rdi, %%rsi\n"
-"        subq    %%r15, %%rsi\n"         /* from = out - dist */
-"        jmp     .L_do_copy\n"
-
-".align 32,0x90\n"
-".L_contiguous_in_window:\n"
-"        movq    56(%%rsp), %%rsi\n"     /* rsi = window */
-"        addq    %%rax, %%rsi\n"
-"        subq    %%rcx, %%rsi\n"         /* from += write - nbytes */
-
-"        movl    %%r14d, %%eax\n"        /* eax = len */
-"        cmpl    %%ecx, %%eax\n"
-"        jbe     .L_do_copy\n"           /* if (nbytes >= len) */
-
-"        subl    %%ecx, %%eax\n"         /* len -= nbytes */
-"        rep     movsb\n"
-"        movq    %%rdi, %%rsi\n"
-"        subq    %%r15, %%rsi\n"         /* from = out - dist */
-"        jmp     .L_do_copy\n"           /* if (nbytes >= len) */
-
-".align 32,0x90\n"
-".L_do_copy:\n"
-"        movl    %%eax, %%ecx\n"         /* ecx = len */
-"        rep     movsb\n"
-
-"        movq    %%r8, %%rsi\n"          /* move in back to %esi, toss from */
-"        jmp     .L_while_test\n"
-
-".L_test_for_end_of_block:\n"
-"        testb   $32, %%al\n"
-"        jz      .L_invalid_literal_length_code\n"
-"        movl    $1, 116(%%rsp)\n"
-"        jmp     .L_break_loop_with_status\n"
-
-".L_invalid_literal_length_code:\n"
-"        movl    $2, 116(%%rsp)\n"
-"        jmp     .L_break_loop_with_status\n"
-
-".L_invalid_distance_code:\n"
-"        movl    $3, 116(%%rsp)\n"
-"        jmp     .L_break_loop_with_status\n"
-
-".L_invalid_distance_too_far:\n"
-"        movl    $4, 116(%%rsp)\n"
-"        jmp     .L_break_loop_with_status\n"
-
-".L_break_loop:\n"
-"        movl    $0, 116(%%rsp)\n"
-
-".L_break_loop_with_status:\n"
-/* put in, out, bits, and hold back into ar and pop esp */
-"        movq    %%rsi, 16(%%rsp)\n"     /* in */
-"        movq    %%rdi, 32(%%rsp)\n"     /* out */
-"        movl    %%ebx, 88(%%rsp)\n"     /* bits */
-"        movq    %%rdx, 80(%%rsp)\n"     /* hold */
-"        movq    (%%rsp), %%rax\n"       /* restore rbp and rsp */
-"        movq    8(%%rsp), %%rbp\n"
-"        movq    %%rax, %%rsp\n"
-          :
-          : "m" (ar)
-          : "memory", "%rax", "%rbx", "%rcx", "%rdx", "%rsi", "%rdi",
-            "%r8", "%r9", "%r10", "%r11", "%r12", "%r13", "%r14", "%r15"
-    );
-#elif ( defined( __GNUC__ ) || defined( __ICC ) ) && defined( __i386 )
-    __asm__ __volatile__ (
-"        leal    %0, %%eax\n"
-"        movl    %%esp, (%%eax)\n"        /* save esp, ebp */
-"        movl    %%ebp, 4(%%eax)\n"
-"        movl    %%eax, %%esp\n"
-"        movl    8(%%esp), %%esi\n"       /* esi = in */
-"        movl    16(%%esp), %%edi\n"      /* edi = out */
-"        movl    40(%%esp), %%edx\n"      /* edx = hold */
-"        movl    44(%%esp), %%ebx\n"      /* ebx = bits */
-"        movl    32(%%esp), %%ebp\n"      /* ebp = lcode */
-
-"        cld\n"
-"        jmp     .L_do_loop\n"
-
-".align 32,0x90\n"
-".L_while_test:\n"
-"        cmpl    %%edi, 24(%%esp)\n"      /* out < end */
-"        jbe     .L_break_loop\n"
-"        cmpl    %%esi, 12(%%esp)\n"      /* in < last */
-"        jbe     .L_break_loop\n"
-
-".L_do_loop:\n"
-"        cmpb    $15, %%bl\n"
-"        ja      .L_get_length_code\n"    /* if (15 < bits) */
-
-"        xorl    %%eax, %%eax\n"
-"        lodsw\n"                         /* al = *(ushort *)in++ */
-"        movb    %%bl, %%cl\n"            /* cl = bits, needs it for shifting */
-"        addb    $16, %%bl\n"             /* bits += 16 */
-"        shll    %%cl, %%eax\n"
-"        orl     %%eax, %%edx\n"        /* hold |= *((ushort *)in)++ << bits */
-
-".L_get_length_code:\n"
-"        movl    56(%%esp), %%eax\n"      /* eax = lmask */
-"        andl    %%edx, %%eax\n"          /* eax &= hold */
-"        movl    (%%ebp,%%eax,4), %%eax\n" /* eax = lcode[hold & lmask] */
-
-".L_dolen:\n"
-"        movb    %%ah, %%cl\n"            /* cl = this.bits */
-"        subb    %%ah, %%bl\n"            /* bits -= this.bits */
-"        shrl    %%cl, %%edx\n"           /* hold >>= this.bits */
-
-"        testb   %%al, %%al\n"
-"        jnz     .L_test_for_length_base\n" /* if (op != 0) 45.7% */
-
-"        shrl    $16, %%eax\n"            /* output this.val char */
-"        stosb\n"
-"        jmp     .L_while_test\n"
-
-".align 32,0x90\n"
-".L_test_for_length_base:\n"
-"        movl    %%eax, %%ecx\n"          /* len = this */
-"        shrl    $16, %%ecx\n"            /* len = this.val */
-"        movl    %%ecx, 64(%%esp)\n"      /* save len */
-"        movb    %%al, %%cl\n"
-
-"        testb   $16, %%al\n"
-"        jz      .L_test_for_second_level_length\n" /* if ((op & 16) == 0) 8% */
-"        andb    $15, %%cl\n"             /* op &= 15 */
-"        jz      .L_decode_distance\n"    /* if (!op) */
-"        cmpb    %%cl, %%bl\n"
-"        jae     .L_add_bits_to_len\n"    /* if (op <= bits) */
-
-"        movb    %%cl, %%ch\n"            /* stash op in ch, freeing cl */
-"        xorl    %%eax, %%eax\n"
-"        lodsw\n"                         /* al = *(ushort *)in++ */
-"        movb    %%bl, %%cl\n"            /* cl = bits, needs it for shifting */
-"        addb    $16, %%bl\n"             /* bits += 16 */
-"        shll    %%cl, %%eax\n"
-"        orl     %%eax, %%edx\n"         /* hold |= *((ushort *)in)++ << bits */
-"        movb    %%ch, %%cl\n"            /* move op back to ecx */
-
-".L_add_bits_to_len:\n"
-"        subb    %%cl, %%bl\n"
-"        xorl    %%eax, %%eax\n"
-"        incl    %%eax\n"
-"        shll    %%cl, %%eax\n"
-"        decl    %%eax\n"
-"        andl    %%edx, %%eax\n"          /* eax &= hold */
-"        shrl    %%cl, %%edx\n"
-"        addl    %%eax, 64(%%esp)\n"      /* len += hold & mask[op] */
-
-".L_decode_distance:\n"
-"        cmpb    $15, %%bl\n"
-"        ja      .L_get_distance_code\n"  /* if (15 < bits) */
-
-"        xorl    %%eax, %%eax\n"
-"        lodsw\n"                         /* al = *(ushort *)in++ */
-"        movb    %%bl, %%cl\n"            /* cl = bits, needs it for shifting */
-"        addb    $16, %%bl\n"             /* bits += 16 */
-"        shll    %%cl, %%eax\n"
-"        orl     %%eax, %%edx\n"         /* hold |= *((ushort *)in)++ << bits */
-
-".L_get_distance_code:\n"
-"        movl    60(%%esp), %%eax\n"      /* eax = dmask */
-"        movl    36(%%esp), %%ecx\n"      /* ecx = dcode */
-"        andl    %%edx, %%eax\n"          /* eax &= hold */
-"        movl    (%%ecx,%%eax,4), %%eax\n"/* eax = dcode[hold & dmask] */
-
-".L_dodist:\n"
-"        movl    %%eax, %%ebp\n"          /* dist = this */
-"        shrl    $16, %%ebp\n"            /* dist = this.val */
-"        movb    %%ah, %%cl\n"
-"        subb    %%ah, %%bl\n"            /* bits -= this.bits */
-"        shrl    %%cl, %%edx\n"           /* hold >>= this.bits */
-"        movb    %%al, %%cl\n"            /* cl = this.op */
-
-"        testb   $16, %%al\n"             /* if ((op & 16) == 0) */
-"        jz      .L_test_for_second_level_dist\n"
-"        andb    $15, %%cl\n"             /* op &= 15 */
-"        jz      .L_check_dist_one\n"
-"        cmpb    %%cl, %%bl\n"
-"        jae     .L_add_bits_to_dist\n"   /* if (op <= bits) 97.6% */
-
-"        movb    %%cl, %%ch\n"            /* stash op in ch, freeing cl */
-"        xorl    %%eax, %%eax\n"
-"        lodsw\n"                         /* al = *(ushort *)in++ */
-"        movb    %%bl, %%cl\n"            /* cl = bits, needs it for shifting */
-"        addb    $16, %%bl\n"             /* bits += 16 */
-"        shll    %%cl, %%eax\n"
-"        orl     %%eax, %%edx\n"        /* hold |= *((ushort *)in)++ << bits */
-"        movb    %%ch, %%cl\n"            /* move op back to ecx */
-
-".L_add_bits_to_dist:\n"
-"        subb    %%cl, %%bl\n"
-"        xorl    %%eax, %%eax\n"
-"        incl    %%eax\n"
-"        shll    %%cl, %%eax\n"
-"        decl    %%eax\n"                 /* (1 << op) - 1 */
-"        andl    %%edx, %%eax\n"          /* eax &= hold */
-"        shrl    %%cl, %%edx\n"
-"        addl    %%eax, %%ebp\n"          /* dist += hold & ((1 << op) - 1) */
-
-".L_check_window:\n"
-"        movl    %%esi, 8(%%esp)\n"       /* save in so from can use it's reg */
-"        movl    %%edi, %%eax\n"
-"        subl    20(%%esp), %%eax\n"      /* nbytes = out - beg */
-
-"        cmpl    %%ebp, %%eax\n"
-"        jb      .L_clip_window\n"        /* if (dist > nbytes) 4.2% */
-
-"        movl    64(%%esp), %%ecx\n"      /* ecx = len */
-"        movl    %%edi, %%esi\n"
-"        subl    %%ebp, %%esi\n"          /* from = out - dist */
-
-"        sarl    %%ecx\n"
-"        jnc     .L_copy_two\n"           /* if len % 2 == 0 */
-
-"        rep     movsw\n"
-"        movb    (%%esi), %%al\n"
-"        movb    %%al, (%%edi)\n"
-"        incl    %%edi\n"
-
-"        movl    8(%%esp), %%esi\n"       /* move in back to %esi, toss from */
-"        movl    32(%%esp), %%ebp\n"      /* ebp = lcode */
-"        jmp     .L_while_test\n"
-
-".L_copy_two:\n"
-"        rep     movsw\n"
-"        movl    8(%%esp), %%esi\n"       /* move in back to %esi, toss from */
-"        movl    32(%%esp), %%ebp\n"      /* ebp = lcode */
-"        jmp     .L_while_test\n"
-
-".align 32,0x90\n"
-".L_check_dist_one:\n"
-"        cmpl    $1, %%ebp\n"            /* if dist 1, is a memset */
-"        jne     .L_check_window\n"
-"        cmpl    %%edi, 20(%%esp)\n"
-"        je      .L_check_window\n"      /* out == beg, if outside window */
-
-"        movl    64(%%esp), %%ecx\n"      /* ecx = len */
-"        movb    -1(%%edi), %%al\n"
-"        movb    %%al, %%ah\n"
-
-"        sarl    %%ecx\n"
-"        jnc     .L_set_two\n"
-"        movb    %%al, (%%edi)\n"
-"        incl    %%edi\n"
-
-".L_set_two:\n"
-"        rep     stosw\n"
-"        movl    32(%%esp), %%ebp\n"      /* ebp = lcode */
-"        jmp     .L_while_test\n"
-
-".align 32,0x90\n"
-".L_test_for_second_level_length:\n"
-"        testb   $64, %%al\n"
-"        jnz     .L_test_for_end_of_block\n" /* if ((op & 64) != 0) */
-
-"        xorl    %%eax, %%eax\n"
-"        incl    %%eax\n"
-"        shll    %%cl, %%eax\n"
-"        decl    %%eax\n"
-"        andl    %%edx, %%eax\n"         /* eax &= hold */
-"        addl    64(%%esp), %%eax\n"     /* eax += len */
-"        movl    (%%ebp,%%eax,4), %%eax\n" /* eax = lcode[val+(hold&mask[op])]*/
-"        jmp     .L_dolen\n"
-
-".align 32,0x90\n"
-".L_test_for_second_level_dist:\n"
-"        testb   $64, %%al\n"
-"        jnz     .L_invalid_distance_code\n" /* if ((op & 64) != 0) */
-
-"        xorl    %%eax, %%eax\n"
-"        incl    %%eax\n"
-"        shll    %%cl, %%eax\n"
-"        decl    %%eax\n"
-"        andl    %%edx, %%eax\n"         /* eax &= hold */
-"        addl    %%ebp, %%eax\n"         /* eax += dist */
-"        movl    36(%%esp), %%ecx\n"     /* ecx = dcode */
-"        movl    (%%ecx,%%eax,4), %%eax\n" /* eax = dcode[val+(hold&mask[op])]*/
-"        jmp     .L_dodist\n"
-
-".align 32,0x90\n"
-".L_clip_window:\n"
-"        movl    %%eax, %%ecx\n"
-"        movl    48(%%esp), %%eax\n"     /* eax = wsize */
-"        negl    %%ecx\n"                /* nbytes = -nbytes */
-"        movl    28(%%esp), %%esi\n"     /* from = window */
-
-"        cmpl    %%ebp, %%eax\n"
-"        jb      .L_invalid_distance_too_far\n" /* if (dist > wsize) */
-
-"        addl    %%ebp, %%ecx\n"         /* nbytes = dist - nbytes */
-"        cmpl    $0, 52(%%esp)\n"
-"        jne     .L_wrap_around_window\n" /* if (write != 0) */
-
-"        subl    %%ecx, %%eax\n"
-"        addl    %%eax, %%esi\n"         /* from += wsize - nbytes */
-
-"        movl    64(%%esp), %%eax\n"     /* eax = len */
-"        cmpl    %%ecx, %%eax\n"
-"        jbe     .L_do_copy\n"           /* if (nbytes >= len) */
-
-"        subl    %%ecx, %%eax\n"         /* len -= nbytes */
-"        rep     movsb\n"
-"        movl    %%edi, %%esi\n"
-"        subl    %%ebp, %%esi\n"         /* from = out - dist */
-"        jmp     .L_do_copy\n"
-
-".align 32,0x90\n"
-".L_wrap_around_window:\n"
-"        movl    52(%%esp), %%eax\n"     /* eax = write */
-"        cmpl    %%eax, %%ecx\n"
-"        jbe     .L_contiguous_in_window\n" /* if (write >= nbytes) */
-
-"        addl    48(%%esp), %%esi\n"     /* from += wsize */
-"        addl    %%eax, %%esi\n"         /* from += write */
-"        subl    %%ecx, %%esi\n"         /* from -= nbytes */
-"        subl    %%eax, %%ecx\n"         /* nbytes -= write */
-
-"        movl    64(%%esp), %%eax\n"     /* eax = len */
-"        cmpl    %%ecx, %%eax\n"
-"        jbe     .L_do_copy\n"           /* if (nbytes >= len) */
-
-"        subl    %%ecx, %%eax\n"         /* len -= nbytes */
-"        rep     movsb\n"
-"        movl    28(%%esp), %%esi\n"     /* from = window */
-"        movl    52(%%esp), %%ecx\n"     /* nbytes = write */
-"        cmpl    %%ecx, %%eax\n"
-"        jbe     .L_do_copy\n"           /* if (nbytes >= len) */
-
-"        subl    %%ecx, %%eax\n"         /* len -= nbytes */
-"        rep     movsb\n"
-"        movl    %%edi, %%esi\n"
-"        subl    %%ebp, %%esi\n"         /* from = out - dist */
-"        jmp     .L_do_copy\n"
-
-".align 32,0x90\n"
-".L_contiguous_in_window:\n"
-"        addl    %%eax, %%esi\n"
-"        subl    %%ecx, %%esi\n"         /* from += write - nbytes */
-
-"        movl    64(%%esp), %%eax\n"     /* eax = len */
-"        cmpl    %%ecx, %%eax\n"
-"        jbe     .L_do_copy\n"           /* if (nbytes >= len) */
-
-"        subl    %%ecx, %%eax\n"         /* len -= nbytes */
-"        rep     movsb\n"
-"        movl    %%edi, %%esi\n"
-"        subl    %%ebp, %%esi\n"         /* from = out - dist */
-"        jmp     .L_do_copy\n"           /* if (nbytes >= len) */
-
-".align 32,0x90\n"
-".L_do_copy:\n"
-"        movl    %%eax, %%ecx\n"
-"        rep     movsb\n"
-
-"        movl    8(%%esp), %%esi\n"      /* move in back to %esi, toss from */
-"        movl    32(%%esp), %%ebp\n"     /* ebp = lcode */
-"        jmp     .L_while_test\n"
-
-".L_test_for_end_of_block:\n"
-"        testb   $32, %%al\n"
-"        jz      .L_invalid_literal_length_code\n"
-"        movl    $1, 72(%%esp)\n"
-"        jmp     .L_break_loop_with_status\n"
-
-".L_invalid_literal_length_code:\n"
-"        movl    $2, 72(%%esp)\n"
-"        jmp     .L_break_loop_with_status\n"
-
-".L_invalid_distance_code:\n"
-"        movl    $3, 72(%%esp)\n"
-"        jmp     .L_break_loop_with_status\n"
-
-".L_invalid_distance_too_far:\n"
-"        movl    8(%%esp), %%esi\n"
-"        movl    $4, 72(%%esp)\n"
-"        jmp     .L_break_loop_with_status\n"
-
-".L_break_loop:\n"
-"        movl    $0, 72(%%esp)\n"
-
-".L_break_loop_with_status:\n"
-/* put in, out, bits, and hold back into ar and pop esp */
-"        movl    %%esi, 8(%%esp)\n"      /* save in */
-"        movl    %%edi, 16(%%esp)\n"     /* save out */
-"        movl    %%ebx, 44(%%esp)\n"     /* save bits */
-"        movl    %%edx, 40(%%esp)\n"     /* save hold */
-"        movl    4(%%esp), %%ebp\n"      /* restore esp, ebp */
-"        movl    (%%esp), %%esp\n"
-          :
-          : "m" (ar)
-          : "memory", "%eax", "%ebx", "%ecx", "%edx", "%esi", "%edi"
-    );
-#elif defined( _MSC_VER ) && ! defined( _M_AMD64 )
-    __asm {
-	lea	eax, ar
-	mov	[eax], esp         /* save esp, ebp */
-	mov	[eax+4], ebp
-	mov	esp, eax
-	mov	esi, [esp+8]       /* esi = in */
-	mov	edi, [esp+16]      /* edi = out */
-	mov	edx, [esp+40]      /* edx = hold */
-	mov	ebx, [esp+44]      /* ebx = bits */
-	mov	ebp, [esp+32]      /* ebp = lcode */
-
-	cld
-	jmp	L_do_loop
-
-ALIGN 4
-L_while_test:
-	cmp	[esp+24], edi
-	jbe	L_break_loop
-	cmp	[esp+12], esi
-	jbe	L_break_loop
-
-L_do_loop:
-	cmp	bl, 15
-	ja	L_get_length_code    /* if (15 < bits) */
-
-	xor	eax, eax
-	lodsw                         /* al = *(ushort *)in++ */
-	mov	cl, bl            /* cl = bits, needs it for shifting */
-	add	bl, 16             /* bits += 16 */
-	shl	eax, cl
-	or	edx, eax        /* hold |= *((ushort *)in)++ << bits */
-
-L_get_length_code:
-	mov	eax, [esp+56]      /* eax = lmask */
-	and	eax, edx          /* eax &= hold */
-	mov	eax, [ebp+eax*4] /* eax = lcode[hold & lmask] */
-
-L_dolen:
-	mov	cl, ah            /* cl = this.bits */
-	sub	bl, ah            /* bits -= this.bits */
-	shr	edx, cl           /* hold >>= this.bits */
-
-	test	al, al
-	jnz	L_test_for_length_base /* if (op != 0) 45.7% */
-
-	shr	eax, 16            /* output this.val char */
-	stosb
-	jmp	L_while_test
-
-ALIGN 4
-L_test_for_length_base:
-	mov	ecx, eax          /* len = this */
-	shr	ecx, 16            /* len = this.val */
-	mov	[esp+64], ecx      /* save len */
-	mov	cl, al
-
-	test	al, 16
-	jz	L_test_for_second_level_length /* if ((op & 16) == 0) 8% */
-	and	cl, 15             /* op &= 15 */
-	jz	L_decode_distance    /* if (!op) */
-	cmp	bl, cl
-	jae	L_add_bits_to_len    /* if (op <= bits) */
-
-	mov	ch, cl            /* stash op in ch, freeing cl */
-	xor	eax, eax
-	lodsw                         /* al = *(ushort *)in++ */
-	mov	cl, bl            /* cl = bits, needs it for shifting */
-	add	bl, 16             /* bits += 16 */
-	shl	eax, cl
-	or	edx, eax         /* hold |= *((ushort *)in)++ << bits */
-	mov	cl, ch            /* move op back to ecx */
-
-L_add_bits_to_len:
-	sub	bl, cl
-	xor	eax, eax
-	inc	eax
-	shl	eax, cl
-	dec	eax
-	and	eax, edx          /* eax &= hold */
-	shr	edx, cl
-	add	[esp+64], eax      /* len += hold & mask[op] */
-
-L_decode_distance:
-	cmp	bl, 15
-	ja	L_get_distance_code  /* if (15 < bits) */
-
-	xor	eax, eax
-	lodsw                         /* al = *(ushort *)in++ */
-	mov	cl, bl            /* cl = bits, needs it for shifting */
-	add	bl, 16             /* bits += 16 */
-	shl	eax, cl
-	or	edx, eax         /* hold |= *((ushort *)in)++ << bits */
-
-L_get_distance_code:
-	mov	eax, [esp+60]      /* eax = dmask */
-	mov	ecx, [esp+36]      /* ecx = dcode */
-	and	eax, edx          /* eax &= hold */
-	mov	eax, [ecx+eax*4]/* eax = dcode[hold & dmask] */
-
-L_dodist:
-	mov	ebp, eax          /* dist = this */
-	shr	ebp, 16            /* dist = this.val */
-	mov	cl, ah
-	sub	bl, ah            /* bits -= this.bits */
-	shr	edx, cl           /* hold >>= this.bits */
-	mov	cl, al            /* cl = this.op */
-
-	test	al, 16             /* if ((op & 16) == 0) */
-	jz	L_test_for_second_level_dist
-	and	cl, 15             /* op &= 15 */
-	jz	L_check_dist_one
-	cmp	bl, cl
-	jae	L_add_bits_to_dist   /* if (op <= bits) 97.6% */
-
-	mov	ch, cl            /* stash op in ch, freeing cl */
-	xor	eax, eax
-	lodsw                         /* al = *(ushort *)in++ */
-	mov	cl, bl            /* cl = bits, needs it for shifting */
-	add	bl, 16             /* bits += 16 */
-	shl	eax, cl
-	or	edx, eax        /* hold |= *((ushort *)in)++ << bits */
-	mov	cl, ch            /* move op back to ecx */
-
-L_add_bits_to_dist:
-	sub	bl, cl
-	xor	eax, eax
-	inc	eax
-	shl	eax, cl
-	dec	eax                 /* (1 << op) - 1 */
-	and	eax, edx          /* eax &= hold */
-	shr	edx, cl
-	add	ebp, eax          /* dist += hold & ((1 << op) - 1) */
-
-L_check_window:
-	mov	[esp+8], esi       /* save in so from can use it's reg */
-	mov	eax, edi
-	sub	eax, [esp+20]      /* nbytes = out - beg */
-
-	cmp	eax, ebp
-	jb	L_clip_window        /* if (dist > nbytes) 4.2% */
-
-	mov	ecx, [esp+64]      /* ecx = len */
-	mov	esi, edi
-	sub	esi, ebp          /* from = out - dist */
-
-	sar	ecx, 1
-	jnc	L_copy_two
-
-	rep     movsw
-	mov	al, [esi]
-	mov	[edi], al
-	inc	edi
-
-	mov	esi, [esp+8]      /* move in back to %esi, toss from */
-	mov	ebp, [esp+32]     /* ebp = lcode */
-	jmp	L_while_test
-
-L_copy_two:
-	rep     movsw
-	mov	esi, [esp+8]      /* move in back to %esi, toss from */
-	mov	ebp, [esp+32]     /* ebp = lcode */
-	jmp	L_while_test
-
-ALIGN 4
-L_check_dist_one:
-	cmp	ebp, 1            /* if dist 1, is a memset */
-	jne	L_check_window
-	cmp	[esp+20], edi
-	je	L_check_window    /* out == beg, if outside window */
-
-	mov	ecx, [esp+64]     /* ecx = len */
-	mov	al, [edi-1]
-	mov	ah, al
-
-	sar	ecx, 1
-	jnc	L_set_two
-	mov	[edi], al         /* memset out with from[-1] */
-	inc	edi
-
-L_set_two:
-	rep     stosw
-	mov	ebp, [esp+32]     /* ebp = lcode */
-	jmp	L_while_test
-
-ALIGN 4
-L_test_for_second_level_length:
-	test	al, 64
-	jnz	L_test_for_end_of_block /* if ((op & 64) != 0) */
-
-	xor	eax, eax
-	inc	eax
-	shl	eax, cl
-	dec	eax
-	and	eax, edx         /* eax &= hold */
-	add	eax, [esp+64]     /* eax += len */
-	mov	eax, [ebp+eax*4] /* eax = lcode[val+(hold&mask[op])]*/
-	jmp	L_dolen
-
-ALIGN 4
-L_test_for_second_level_dist:
-	test	al, 64
-	jnz	L_invalid_distance_code /* if ((op & 64) != 0) */
-
-	xor	eax, eax
-	inc	eax
-	shl	eax, cl
-	dec	eax
-	and	eax, edx         /* eax &= hold */
-	add	eax, ebp         /* eax += dist */
-	mov	ecx, [esp+36]     /* ecx = dcode */
-	mov	eax, [ecx+eax*4] /* eax = dcode[val+(hold&mask[op])]*/
-	jmp	L_dodist
-
-ALIGN 4
-L_clip_window:
-	mov	ecx, eax
-	mov	eax, [esp+48]     /* eax = wsize */
-	neg	ecx                /* nbytes = -nbytes */
-	mov	esi, [esp+28]     /* from = window */
-
-	cmp	eax, ebp
-	jb	L_invalid_distance_too_far /* if (dist > wsize) */
-
-	add	ecx, ebp         /* nbytes = dist - nbytes */
-	cmp	dword ptr [esp+52], 0
-	jne	L_wrap_around_window /* if (write != 0) */
-
-	sub	eax, ecx
-	add	esi, eax         /* from += wsize - nbytes */
-
-	mov	eax, [esp+64]    /* eax = len */
-	cmp	eax, ecx
-	jbe	L_do_copy          /* if (nbytes >= len) */
-
-	sub	eax, ecx         /* len -= nbytes */
-	rep     movsb
-	mov	esi, edi
-	sub	esi, ebp         /* from = out - dist */
-	jmp	L_do_copy
-
-ALIGN 4
-L_wrap_around_window:
-	mov	eax, [esp+52]    /* eax = write */
-	cmp	ecx, eax
-	jbe	L_contiguous_in_window /* if (write >= nbytes) */
-
-	add	esi, [esp+48]    /* from += wsize */
-	add	esi, eax         /* from += write */
-	sub	esi, ecx         /* from -= nbytes */
-	sub	ecx, eax         /* nbytes -= write */
-
-	mov	eax, [esp+64]    /* eax = len */
-	cmp	eax, ecx
-	jbe	L_do_copy          /* if (nbytes >= len) */
-
-	sub	eax, ecx         /* len -= nbytes */
-	rep     movsb
-	mov	esi, [esp+28]     /* from = window */
-	mov	ecx, [esp+52]     /* nbytes = write */
-	cmp	eax, ecx
-	jbe	L_do_copy          /* if (nbytes >= len) */
-
-	sub	eax, ecx         /* len -= nbytes */
-	rep     movsb
-	mov	esi, edi
-	sub	esi, ebp         /* from = out - dist */
-	jmp	L_do_copy
-
-ALIGN 4
-L_contiguous_in_window:
-	add	esi, eax
-	sub	esi, ecx         /* from += write - nbytes */
-
-	mov	eax, [esp+64]    /* eax = len */
-	cmp	eax, ecx
-	jbe	L_do_copy          /* if (nbytes >= len) */
-
-	sub	eax, ecx         /* len -= nbytes */
-	rep     movsb
-	mov	esi, edi
-	sub	esi, ebp         /* from = out - dist */
-	jmp	L_do_copy
-
-ALIGN 4
-L_do_copy:
-	mov	ecx, eax
-	rep     movsb
-
-	mov	esi, [esp+8]      /* move in back to %esi, toss from */
-	mov	ebp, [esp+32]     /* ebp = lcode */
-	jmp	L_while_test
-
-L_test_for_end_of_block:
-	test	al, 32
-	jz	L_invalid_literal_length_code
-	mov	dword ptr [esp+72], 1
-	jmp	L_break_loop_with_status
-
-L_invalid_literal_length_code:
-	mov	dword ptr [esp+72], 2
-	jmp	L_break_loop_with_status
-
-L_invalid_distance_code:
-	mov	dword ptr [esp+72], 3
-	jmp	L_break_loop_with_status
-
-L_invalid_distance_too_far:
-	mov	esi, [esp+4]
-	mov	dword ptr [esp+72], 4
-	jmp	L_break_loop_with_status
-
-L_break_loop:
-	mov	dword ptr [esp+72], 0
-
-L_break_loop_with_status:
-/* put in, out, bits, and hold back into ar and pop esp */
-	mov	[esp+8], esi     /* save in */
-	mov	[esp+16], edi    /* save out */
-	mov	[esp+44], ebx    /* save bits */
-	mov	[esp+40], edx    /* save hold */
-	mov	ebp, [esp+4]     /* restore esp, ebp */
-	mov	esp, [esp]
-    }
-#else
-#error "x86 architecture not defined"
-#endif
-
-    if (ar.status > 1) {
-        if (ar.status == 2)
-            strm->msg = "invalid literal/length code";
-        else if (ar.status == 3)
-            strm->msg = "invalid distance code";
-        else
-            strm->msg = "invalid distance too far back";
-        state->mode = BAD;
-    }
-    else if ( ar.status == 1 ) {
-        state->mode = TYPE;
-    }
-
-    /* return unused bytes (on entry, bits < 8, so in won't go too far back) */
-    ar.len = ar.bits >> 3;
-    ar.in -= ar.len;
-    ar.bits -= ar.len << 3;
-    ar.hold &= (1U << ar.bits) - 1;
-
-    /* update state and return */
-    strm->next_in = ar.in;
-    strm->next_out = ar.out;
-    strm->avail_in = (unsigned)(ar.in < ar.last ?
-                                PAD_AVAIL_IN + (ar.last - ar.in) :
-                                PAD_AVAIL_IN - (ar.in - ar.last));
-    strm->avail_out = (unsigned)(ar.out < ar.end ?
-                                 PAD_AVAIL_OUT + (ar.end - ar.out) :
-                                 PAD_AVAIL_OUT - (ar.out - ar.end));
-    state->hold = ar.hold;
-    state->bits = ar.bits;
-    return;
-}
-
Index: trunk/minix/lib/zlib-1.2.3/contrib/inflate86/inffast.S
===================================================================
--- trunk/minix/lib/zlib-1.2.3/contrib/inflate86/inffast.S	(revision 9)
+++ 	(revision )
@@ -1,1368 +1,0 @@
-/*
- * inffast.S is a hand tuned assembler version of:
- *
- * inffast.c -- fast decoding
- * Copyright (C) 1995-2003 Mark Adler
- * For conditions of distribution and use, see copyright notice in zlib.h
- *
- * Copyright (C) 2003 Chris Anderson <christop@charm.net>
- * Please use the copyright conditions above.
- *
- * This version (Jan-23-2003) of inflate_fast was coded and tested under
- * GNU/Linux on a pentium 3, using the gcc-3.2 compiler distribution.  On that
- * machine, I found that gzip style archives decompressed about 20% faster than
- * the gcc-3.2 -O3 -fomit-frame-pointer compiled version.  Your results will
- * depend on how large of a buffer is used for z_stream.next_in & next_out
- * (8K-32K worked best for my 256K cpu cache) and how much overhead there is in
- * stream processing I/O and crc32/addler32.  In my case, this routine used
- * 70% of the cpu time and crc32 used 20%.
- *
- * I am confident that this version will work in the general case, but I have
- * not tested a wide variety of datasets or a wide variety of platforms.
- *
- * Jan-24-2003 -- Added -DUSE_MMX define for slightly faster inflating.
- * It should be a runtime flag instead of compile time flag...
- *
- * Jan-26-2003 -- Added runtime check for MMX support with cpuid instruction.
- * With -DUSE_MMX, only MMX code is compiled.  With -DNO_MMX, only non-MMX code
- * is compiled.  Without either option, runtime detection is enabled.  Runtime
- * detection should work on all modern cpus and the recomended algorithm (flip
- * ID bit on eflags and then use the cpuid instruction) is used in many
- * multimedia applications.  Tested under win2k with gcc-2.95 and gas-2.12
- * distributed with cygwin3.  Compiling with gcc-2.95 -c inffast.S -o
- * inffast.obj generates a COFF object which can then be linked with MSVC++
- * compiled code.  Tested under FreeBSD 4.7 with gcc-2.95.
- *
- * Jan-28-2003 -- Tested Athlon XP... MMX mode is slower than no MMX (and
- * slower than compiler generated code).  Adjusted cpuid check to use the MMX
- * code only for Pentiums < P4 until I have more data on the P4.  Speed
- * improvment is only about 15% on the Athlon when compared with code generated
- * with MSVC++.  Not sure yet, but I think the P4 will also be slower using the
- * MMX mode because many of it's x86 ALU instructions execute in .5 cycles and
- * have less latency than MMX ops.  Added code to buffer the last 11 bytes of
- * the input stream since the MMX code grabs bits in chunks of 32, which
- * differs from the inffast.c algorithm.  I don't think there would have been
- * read overruns where a page boundary was crossed (a segfault), but there
- * could have been overruns when next_in ends on unaligned memory (unintialized
- * memory read).
- *
- * Mar-13-2003 -- P4 MMX is slightly slower than P4 NO_MMX.  I created a C
- * version of the non-MMX code so that it doesn't depend on zstrm and zstate
- * structure offsets which are hard coded in this file.  This was last tested
- * with zlib-1.2.0 which is currently in beta testing, newer versions of this
- * and inffas86.c can be found at http://www.eetbeetee.com/zlib/ and
- * http://www.charm.net/~christop/zlib/
- */
-
-
-/*
- * if you have underscore linking problems (_inflate_fast undefined), try
- * using -DGAS_COFF
- */
-#if ! defined( GAS_COFF ) && ! defined( GAS_ELF )
-
-#if defined( WIN32 ) || defined( __CYGWIN__ )
-#define GAS_COFF /* windows object format */
-#else
-#define GAS_ELF
-#endif
-
-#endif /* ! GAS_COFF && ! GAS_ELF */
-
-
-#if defined( GAS_COFF )
-
-/* coff externals have underscores */
-#define inflate_fast _inflate_fast
-#define inflate_fast_use_mmx _inflate_fast_use_mmx
-
-#endif /* GAS_COFF */
-
-
-.file "inffast.S"
-
-.globl inflate_fast
-
-.text
-.align 4,0
-.L_invalid_literal_length_code_msg:
-.string "invalid literal/length code"
-
-.align 4,0
-.L_invalid_distance_code_msg:
-.string "invalid distance code"
-
-.align 4,0
-.L_invalid_distance_too_far_msg:
-.string "invalid distance too far back"
-
-#if ! defined( NO_MMX )
-.align 4,0
-.L_mask: /* mask[N] = ( 1 << N ) - 1 */
-.long 0
-.long 1
-.long 3
-.long 7
-.long 15
-.long 31
-.long 63
-.long 127
-.long 255
-.long 511
-.long 1023
-.long 2047
-.long 4095
-.long 8191
-.long 16383
-.long 32767
-.long 65535
-.long 131071
-.long 262143
-.long 524287
-.long 1048575
-.long 2097151
-.long 4194303
-.long 8388607
-.long 16777215
-.long 33554431
-.long 67108863
-.long 134217727
-.long 268435455
-.long 536870911
-.long 1073741823
-.long 2147483647
-.long 4294967295
-#endif /* NO_MMX */
-
-.text
-
-/*
- * struct z_stream offsets, in zlib.h
- */
-#define next_in_strm   0   /* strm->next_in */
-#define avail_in_strm  4   /* strm->avail_in */
-#define next_out_strm  12  /* strm->next_out */
-#define avail_out_strm 16  /* strm->avail_out */
-#define msg_strm       24  /* strm->msg */
-#define state_strm     28  /* strm->state */
-
-/*
- * struct inflate_state offsets, in inflate.h
- */
-#define mode_state     0   /* state->mode */
-#define wsize_state    32  /* state->wsize */
-#define write_state    40  /* state->write */
-#define window_state   44  /* state->window */
-#define hold_state     48  /* state->hold */
-#define bits_state     52  /* state->bits */
-#define lencode_state  68  /* state->lencode */
-#define distcode_state 72  /* state->distcode */
-#define lenbits_state  76  /* state->lenbits */
-#define distbits_state 80  /* state->distbits */
-
-/*
- * inflate_fast's activation record
- */
-#define local_var_size 64 /* how much local space for vars */
-#define strm_sp        88 /* first arg: z_stream * (local_var_size + 24) */
-#define start_sp       92 /* second arg: unsigned int (local_var_size + 28) */
-
-/*
- * offsets for local vars on stack
- */
-#define out            60  /* unsigned char* */
-#define window         56  /* unsigned char* */
-#define wsize          52  /* unsigned int */
-#define write          48  /* unsigned int */
-#define in             44  /* unsigned char* */
-#define beg            40  /* unsigned char* */
-#define buf            28  /* char[ 12 ] */
-#define len            24  /* unsigned int */
-#define last           20  /* unsigned char* */
-#define end            16  /* unsigned char* */
-#define dcode          12  /* code* */
-#define lcode           8  /* code* */
-#define dmask           4  /* unsigned int */
-#define lmask           0  /* unsigned int */
-
-/*
- * typedef enum inflate_mode consts, in inflate.h
- */
-#define INFLATE_MODE_TYPE 11  /* state->mode flags enum-ed in inflate.h */
-#define INFLATE_MODE_BAD  26
-
-
-#if ! defined( USE_MMX ) && ! defined( NO_MMX )
-
-#define RUN_TIME_MMX
-
-#define CHECK_MMX    1
-#define DO_USE_MMX   2
-#define DONT_USE_MMX 3
-
-.globl inflate_fast_use_mmx
-
-.data
-
-.align 4,0
-inflate_fast_use_mmx: /* integer flag for run time control 1=check,2=mmx,3=no */
-.long CHECK_MMX
-
-#if defined( GAS_ELF )
-/* elf info */
-.type   inflate_fast_use_mmx,@object
-.size   inflate_fast_use_mmx,4
-#endif
-
-#endif /* RUN_TIME_MMX */
-
-#if defined( GAS_COFF )
-/* coff info: scl 2 = extern, type 32 = function */
-.def inflate_fast; .scl 2; .type 32; .endef
-#endif
-
-.text
-
-.align 32,0x90
-inflate_fast:
-        pushl   %edi
-        pushl   %esi
-        pushl   %ebp
-        pushl   %ebx
-        pushf   /* save eflags (strm_sp, state_sp assumes this is 32 bits) */
-        subl    $local_var_size, %esp
-        cld
-
-#define strm_r  %esi
-#define state_r %edi
-
-        movl    strm_sp(%esp), strm_r
-        movl    state_strm(strm_r), state_r
-
-        /* in = strm->next_in;
-         * out = strm->next_out;
-         * last = in + strm->avail_in - 11;
-         * beg = out - (start - strm->avail_out);
-         * end = out + (strm->avail_out - 257);
-         */
-        movl    avail_in_strm(strm_r), %edx
-        movl    next_in_strm(strm_r), %eax
-
-        addl    %eax, %edx      /* avail_in += next_in */
-        subl    $11, %edx       /* avail_in -= 11 */
-
-        movl    %eax, in(%esp)
-        movl    %edx, last(%esp)
-
-        movl    start_sp(%esp), %ebp
-        movl    avail_out_strm(strm_r), %ecx
-        movl    next_out_strm(strm_r), %ebx
-
-        subl    %ecx, %ebp      /* start -= avail_out */
-        negl    %ebp            /* start = -start */
-        addl    %ebx, %ebp      /* start += next_out */
-
-        subl    $257, %ecx      /* avail_out -= 257 */
-        addl    %ebx, %ecx      /* avail_out += out */
-
-        movl    %ebx, out(%esp)
-        movl    %ebp, beg(%esp)
-        movl    %ecx, end(%esp)
-
-        /* wsize = state->wsize;
-         * write = state->write;
-         * window = state->window;
-         * hold = state->hold;
-         * bits = state->bits;
-         * lcode = state->lencode;
-         * dcode = state->distcode;
-         * lmask = ( 1 << state->lenbits ) - 1;
-         * dmask = ( 1 << state->distbits ) - 1;
-         */
-
-        movl    lencode_state(state_r), %eax
-        movl    distcode_state(state_r), %ecx
-
-        movl    %eax, lcode(%esp)
-        movl    %ecx, dcode(%esp)
-
-        movl    $1, %eax
-        movl    lenbits_state(state_r), %ecx
-        shll    %cl, %eax
-        decl    %eax
-        movl    %eax, lmask(%esp)
-
-        movl    $1, %eax
-        movl    distbits_state(state_r), %ecx
-        shll    %cl, %eax
-        decl    %eax
-        movl    %eax, dmask(%esp)
-
-        movl    wsize_state(state_r), %eax
-        movl    write_state(state_r), %ecx
-        movl    window_state(state_r), %edx
-
-        movl    %eax, wsize(%esp)
-        movl    %ecx, write(%esp)
-        movl    %edx, window(%esp)
-
-        movl    hold_state(state_r), %ebp
-        movl    bits_state(state_r), %ebx
-
-#undef strm_r
-#undef state_r
-
-#define in_r       %esi
-#define from_r     %esi
-#define out_r      %edi
-
-        movl    in(%esp), in_r
-        movl    last(%esp), %ecx
-        cmpl    in_r, %ecx
-        ja      .L_align_long           /* if in < last */
-
-        addl    $11, %ecx               /* ecx = &in[ avail_in ] */
-        subl    in_r, %ecx              /* ecx = avail_in */
-        movl    $12, %eax
-        subl    %ecx, %eax              /* eax = 12 - avail_in */
-        leal    buf(%esp), %edi
-        rep     movsb                   /* memcpy( buf, in, avail_in ) */
-        movl    %eax, %ecx
-        xorl    %eax, %eax
-        rep     stosb         /* memset( &buf[ avail_in ], 0, 12 - avail_in ) */
-        leal    buf(%esp), in_r         /* in = buf */
-        movl    in_r, last(%esp)        /* last = in, do just one iteration */
-        jmp     .L_is_aligned
-
-        /* align in_r on long boundary */
-.L_align_long:
-        testl   $3, in_r
-        jz      .L_is_aligned
-        xorl    %eax, %eax
-        movb    (in_r), %al
-        incl    in_r
-        movl    %ebx, %ecx
-        addl    $8, %ebx
-        shll    %cl, %eax
-        orl     %eax, %ebp
-        jmp     .L_align_long
-
-.L_is_aligned:
-        movl    out(%esp), out_r
-
-#if defined( NO_MMX )
-        jmp     .L_do_loop
-#endif
-
-#if defined( USE_MMX )
-        jmp     .L_init_mmx
-#endif
-
-/*** Runtime MMX check ***/
-
-#if defined( RUN_TIME_MMX )
-.L_check_mmx:
-        cmpl    $DO_USE_MMX, inflate_fast_use_mmx
-        je      .L_init_mmx
-        ja      .L_do_loop /* > 2 */
-
-        pushl   %eax
-        pushl   %ebx
-        pushl   %ecx
-        pushl   %edx
-        pushf
-        movl    (%esp), %eax      /* copy eflags to eax */
-        xorl    $0x200000, (%esp) /* try toggling ID bit of eflags (bit 21)
-                                   * to see if cpu supports cpuid...
-                                   * ID bit method not supported by NexGen but
-                                   * bios may load a cpuid instruction and
-                                   * cpuid may be disabled on Cyrix 5-6x86 */
-        popf
-        pushf
-        popl    %edx              /* copy new eflags to edx */
-        xorl    %eax, %edx        /* test if ID bit is flipped */
-        jz      .L_dont_use_mmx   /* not flipped if zero */
-        xorl    %eax, %eax
-        cpuid
-        cmpl    $0x756e6547, %ebx /* check for GenuineIntel in ebx,ecx,edx */
-        jne     .L_dont_use_mmx
-        cmpl    $0x6c65746e, %ecx
-        jne     .L_dont_use_mmx
-        cmpl    $0x49656e69, %edx
-        jne     .L_dont_use_mmx
-        movl    $1, %eax
-        cpuid                     /* get cpu features */
-        shrl    $8, %eax
-        andl    $15, %eax
-        cmpl    $6, %eax          /* check for Pentium family, is 0xf for P4 */
-        jne     .L_dont_use_mmx
-        testl   $0x800000, %edx   /* test if MMX feature is set (bit 23) */
-        jnz     .L_use_mmx
-        jmp     .L_dont_use_mmx
-.L_use_mmx:
-        movl    $DO_USE_MMX, inflate_fast_use_mmx
-        jmp     .L_check_mmx_pop
-.L_dont_use_mmx:
-        movl    $DONT_USE_MMX, inflate_fast_use_mmx
-.L_check_mmx_pop:
-        popl    %edx
-        popl    %ecx
-        popl    %ebx
-        popl    %eax
-        jmp     .L_check_mmx
-#endif
-
-
-/*** Non-MMX code ***/
-
-#if defined ( NO_MMX ) || defined( RUN_TIME_MMX )
-
-#define hold_r     %ebp
-#define bits_r     %bl
-#define bitslong_r %ebx
-
-.align 32,0x90
-.L_while_test:
-        /* while (in < last && out < end)
-         */
-        cmpl    out_r, end(%esp)
-        jbe     .L_break_loop           /* if (out >= end) */
-
-        cmpl    in_r, last(%esp)
-        jbe     .L_break_loop
-
-.L_do_loop:
-        /* regs: %esi = in, %ebp = hold, %bl = bits, %edi = out
-         *
-         * do {
-         *   if (bits < 15) {
-         *     hold |= *((unsigned short *)in)++ << bits;
-         *     bits += 16
-         *   }
-         *   this = lcode[hold & lmask]
-         */
-        cmpb    $15, bits_r
-        ja      .L_get_length_code      /* if (15 < bits) */
-
-        xorl    %eax, %eax
-        lodsw                           /* al = *(ushort *)in++ */
-        movb    bits_r, %cl             /* cl = bits, needs it for shifting */
-        addb    $16, bits_r             /* bits += 16 */
-        shll    %cl, %eax
-        orl     %eax, hold_r            /* hold |= *((ushort *)in)++ << bits */
-
-.L_get_length_code:
-        movl    lmask(%esp), %edx       /* edx = lmask */
-        movl    lcode(%esp), %ecx       /* ecx = lcode */
-        andl    hold_r, %edx            /* edx &= hold */
-        movl    (%ecx,%edx,4), %eax     /* eax = lcode[hold & lmask] */
-
-.L_dolen:
-        /* regs: %esi = in, %ebp = hold, %bl = bits, %edi = out
-         *
-         * dolen:
-         *    bits -= this.bits;
-         *    hold >>= this.bits
-         */
-        movb    %ah, %cl                /* cl = this.bits */
-        subb    %ah, bits_r             /* bits -= this.bits */
-        shrl    %cl, hold_r             /* hold >>= this.bits */
-
-        /* check if op is a literal
-         * if (op == 0) {
-         *    PUP(out) = this.val;
-         *  }
-         */
-        testb   %al, %al
-        jnz     .L_test_for_length_base /* if (op != 0) 45.7% */
-
-        shrl    $16, %eax               /* output this.val char */
-        stosb
-        jmp     .L_while_test
-
-.L_test_for_length_base:
-        /* regs: %esi = in, %ebp = hold, %bl = bits, %edi = out, %edx = len
-         *
-         * else if (op & 16) {
-         *   len = this.val
-         *   op &= 15
-         *   if (op) {
-         *     if (op > bits) {
-         *       hold |= *((unsigned short *)in)++ << bits;
-         *       bits += 16
-         *     }
-         *     len += hold & mask[op];
-         *     bits -= op;
-         *     hold >>= op;
-         *   }
-         */
-#define len_r %edx
-        movl    %eax, len_r             /* len = this */
-        shrl    $16, len_r              /* len = this.val */
-        movb    %al, %cl
-
-        testb   $16, %al
-        jz      .L_test_for_second_level_length /* if ((op & 16) == 0) 8% */
-        andb    $15, %cl                /* op &= 15 */
-        jz      .L_save_len             /* if (!op) */
-        cmpb    %cl, bits_r
-        jae     .L_add_bits_to_len      /* if (op <= bits) */
-
-        movb    %cl, %ch                /* stash op in ch, freeing cl */
-        xorl    %eax, %eax
-        lodsw                           /* al = *(ushort *)in++ */
-        movb    bits_r, %cl             /* cl = bits, needs it for shifting */
-        addb    $16, bits_r             /* bits += 16 */
-        shll    %cl, %eax
-        orl     %eax, hold_r            /* hold |= *((ushort *)in)++ << bits */
-        movb    %ch, %cl                /* move op back to ecx */
-
-.L_add_bits_to_len:
-        movl    $1, %eax
-        shll    %cl, %eax
-        decl    %eax
-        subb    %cl, bits_r
-        andl    hold_r, %eax            /* eax &= hold */
-        shrl    %cl, hold_r
-        addl    %eax, len_r             /* len += hold & mask[op] */
-
-.L_save_len:
-        movl    len_r, len(%esp)        /* save len */
-#undef  len_r
-
-.L_decode_distance:
-        /* regs: %esi = in, %ebp = hold, %bl = bits, %edi = out, %edx = dist
-         *
-         *   if (bits < 15) {
-         *     hold |= *((unsigned short *)in)++ << bits;
-         *     bits += 16
-         *   }
-         *   this = dcode[hold & dmask];
-         * dodist:
-         *   bits -= this.bits;
-         *   hold >>= this.bits;
-         *   op = this.op;
-         */
-
-        cmpb    $15, bits_r
-        ja      .L_get_distance_code    /* if (15 < bits) */
-
-        xorl    %eax, %eax
-        lodsw                           /* al = *(ushort *)in++ */
-        movb    bits_r, %cl             /* cl = bits, needs it for shifting */
-        addb    $16, bits_r             /* bits += 16 */
-        shll    %cl, %eax
-        orl     %eax, hold_r            /* hold |= *((ushort *)in)++ << bits */
-
-.L_get_distance_code:
-        movl    dmask(%esp), %edx       /* edx = dmask */
-        movl    dcode(%esp), %ecx       /* ecx = dcode */
-        andl    hold_r, %edx            /* edx &= hold */
-        movl    (%ecx,%edx,4), %eax     /* eax = dcode[hold & dmask] */
-
-#define dist_r %edx
-.L_dodist:
-        movl    %eax, dist_r            /* dist = this */
-        shrl    $16, dist_r             /* dist = this.val */
-        movb    %ah, %cl
-        subb    %ah, bits_r             /* bits -= this.bits */
-        shrl    %cl, hold_r             /* hold >>= this.bits */
-
-        /* if (op & 16) {
-         *   dist = this.val
-         *   op &= 15
-         *   if (op > bits) {
-         *     hold |= *((unsigned short *)in)++ << bits;
-         *     bits += 16
-         *   }
-         *   dist += hold & mask[op];
-         *   bits -= op;
-         *   hold >>= op;
-         */
-        movb    %al, %cl                /* cl = this.op */
-
-        testb   $16, %al                /* if ((op & 16) == 0) */
-        jz      .L_test_for_second_level_dist
-        andb    $15, %cl                /* op &= 15 */
-        jz      .L_check_dist_one
-        cmpb    %cl, bits_r
-        jae     .L_add_bits_to_dist     /* if (op <= bits) 97.6% */
-
-        movb    %cl, %ch                /* stash op in ch, freeing cl */
-        xorl    %eax, %eax
-        lodsw                           /* al = *(ushort *)in++ */
-        movb    bits_r, %cl             /* cl = bits, needs it for shifting */
-        addb    $16, bits_r             /* bits += 16 */
-        shll    %cl, %eax
-        orl     %eax, hold_r            /* hold |= *((ushort *)in)++ << bits */
-        movb    %ch, %cl                /* move op back to ecx */
-
-.L_add_bits_to_dist:
-        movl    $1, %eax
-        shll    %cl, %eax
-        decl    %eax                    /* (1 << op) - 1 */
-        subb    %cl, bits_r
-        andl    hold_r, %eax            /* eax &= hold */
-        shrl    %cl, hold_r
-        addl    %eax, dist_r            /* dist += hold & ((1 << op) - 1) */
-        jmp     .L_check_window
-
-.L_check_window:
-        /* regs: %esi = from, %ebp = hold, %bl = bits, %edi = out, %edx = dist
-         *       %ecx = nbytes
-         *
-         * nbytes = out - beg;
-         * if (dist <= nbytes) {
-         *   from = out - dist;
-         *   do {
-         *     PUP(out) = PUP(from);
-         *   } while (--len > 0) {
-         * }
-         */
-
-        movl    in_r, in(%esp)          /* save in so from can use it's reg */
-        movl    out_r, %eax
-        subl    beg(%esp), %eax         /* nbytes = out - beg */
-
-        cmpl    dist_r, %eax
-        jb      .L_clip_window          /* if (dist > nbytes) 4.2% */
-
-        movl    len(%esp), %ecx
-        movl    out_r, from_r
-        subl    dist_r, from_r          /* from = out - dist */
-
-        subl    $3, %ecx
-        movb    (from_r), %al
-        movb    %al, (out_r)
-        movb    1(from_r), %al
-        movb    2(from_r), %dl
-        addl    $3, from_r
-        movb    %al, 1(out_r)
-        movb    %dl, 2(out_r)
-        addl    $3, out_r
-        rep     movsb
-
-        movl    in(%esp), in_r          /* move in back to %esi, toss from */
-        jmp     .L_while_test
-
-.align 16,0x90
-.L_check_dist_one:
-        cmpl    $1, dist_r
-        jne     .L_check_window
-        cmpl    out_r, beg(%esp)
-        je      .L_check_window
-
-        decl    out_r
-        movl    len(%esp), %ecx
-        movb    (out_r), %al
-        subl    $3, %ecx
-
-        movb    %al, 1(out_r)
-        movb    %al, 2(out_r)
-        movb    %al, 3(out_r)
-        addl    $4, out_r
-        rep     stosb
-
-        jmp     .L_while_test
-
-.align 16,0x90
-.L_test_for_second_level_length:
-        /* else if ((op & 64) == 0) {
-         *   this = lcode[this.val + (hold & mask[op])];
-         * }
-         */
-        testb   $64, %al
-        jnz     .L_test_for_end_of_block  /* if ((op & 64) != 0) */
-
-        movl    $1, %eax
-        shll    %cl, %eax
-        decl    %eax
-        andl    hold_r, %eax            /* eax &= hold */
-        addl    %edx, %eax              /* eax += this.val */
-        movl    lcode(%esp), %edx       /* edx = lcode */
-        movl    (%edx,%eax,4), %eax     /* eax = lcode[val + (hold&mask[op])] */
-        jmp     .L_dolen
-
-.align 16,0x90
-.L_test_for_second_level_dist:
-        /* else if ((op & 64) == 0) {
-         *   this = dcode[this.val + (hold & mask[op])];
-         * }
-         */
-        testb   $64, %al
-        jnz     .L_invalid_distance_code  /* if ((op & 64) != 0) */
-
-        movl    $1, %eax
-        shll    %cl, %eax
-        decl    %eax
-        andl    hold_r, %eax            /* eax &= hold */
-        addl    %edx, %eax              /* eax += this.val */
-        movl    dcode(%esp), %edx       /* edx = dcode */
-        movl    (%edx,%eax,4), %eax     /* eax = dcode[val + (hold&mask[op])] */
-        jmp     .L_dodist
-
-.align 16,0x90
-.L_clip_window:
-        /* regs: %esi = from, %ebp = hold, %bl = bits, %edi = out, %edx = dist
-         *       %ecx = nbytes
-         *
-         * else {
-         *   if (dist > wsize) {
-         *     invalid distance
-         *   }
-         *   from = window;
-         *   nbytes = dist - nbytes;
-         *   if (write == 0) {
-         *     from += wsize - nbytes;
-         */
-#define nbytes_r %ecx
-        movl    %eax, nbytes_r
-        movl    wsize(%esp), %eax       /* prepare for dist compare */
-        negl    nbytes_r                /* nbytes = -nbytes */
-        movl    window(%esp), from_r    /* from = window */
-
-        cmpl    dist_r, %eax
-        jb      .L_invalid_distance_too_far /* if (dist > wsize) */
-
-        addl    dist_r, nbytes_r        /* nbytes = dist - nbytes */
-        cmpl    $0, write(%esp)
-        jne     .L_wrap_around_window   /* if (write != 0) */
-
-        subl    nbytes_r, %eax
-        addl    %eax, from_r            /* from += wsize - nbytes */
-
-        /* regs: %esi = from, %ebp = hold, %bl = bits, %edi = out, %edx = dist
-         *       %ecx = nbytes, %eax = len
-         *
-         *     if (nbytes < len) {
-         *       len -= nbytes;
-         *       do {
-         *         PUP(out) = PUP(from);
-         *       } while (--nbytes);
-         *       from = out - dist;
-         *     }
-         *   }
-         */
-#define len_r %eax
-        movl    len(%esp), len_r
-        cmpl    nbytes_r, len_r
-        jbe     .L_do_copy1             /* if (nbytes >= len) */
-
-        subl    nbytes_r, len_r         /* len -= nbytes */
-        rep     movsb
-        movl    out_r, from_r
-        subl    dist_r, from_r          /* from = out - dist */
-        jmp     .L_do_copy1
-
-        cmpl    nbytes_r, len_r
-        jbe     .L_do_copy1             /* if (nbytes >= len) */
-
-        subl    nbytes_r, len_r         /* len -= nbytes */
-        rep     movsb
-        movl    out_r, from_r
-        subl    dist_r, from_r          /* from = out - dist */
-        jmp     .L_do_copy1
-
-.L_wrap_around_window:
-        /* regs: %esi = from, %ebp = hold, %bl = bits, %edi = out, %edx = dist
-         *       %ecx = nbytes, %eax = write, %eax = len
-         *
-         *   else if (write < nbytes) {
-         *     from += wsize + write - nbytes;
-         *     nbytes -= write;
-         *     if (nbytes < len) {
-         *       len -= nbytes;
-         *       do {
-         *         PUP(out) = PUP(from);
-         *       } while (--nbytes);
-         *       from = window;
-         *       nbytes = write;
-         *       if (nbytes < len) {
-         *         len -= nbytes;
-         *         do {
-         *           PUP(out) = PUP(from);
-         *         } while(--nbytes);
-         *         from = out - dist;
-         *       }
-         *     }
-         *   }
-         */
-#define write_r %eax
-        movl    write(%esp), write_r
-        cmpl    write_r, nbytes_r
-        jbe     .L_contiguous_in_window /* if (write >= nbytes) */
-
-        addl    wsize(%esp), from_r
-        addl    write_r, from_r
-        subl    nbytes_r, from_r        /* from += wsize + write - nbytes */
-        subl    write_r, nbytes_r       /* nbytes -= write */
-#undef write_r
-
-        movl    len(%esp), len_r
-        cmpl    nbytes_r, len_r
-        jbe     .L_do_copy1             /* if (nbytes >= len) */
-
-        subl    nbytes_r, len_r         /* len -= nbytes */
-        rep     movsb
-        movl    window(%esp), from_r    /* from = window */
-        movl    write(%esp), nbytes_r   /* nbytes = write */
-        cmpl    nbytes_r, len_r
-        jbe     .L_do_copy1             /* if (nbytes >= len) */
-
-        subl    nbytes_r, len_r         /* len -= nbytes */
-        rep     movsb
-        movl    out_r, from_r
-        subl    dist_r, from_r          /* from = out - dist */
-        jmp     .L_do_copy1
-
-.L_contiguous_in_window:
-        /* regs: %esi = from, %ebp = hold, %bl = bits, %edi = out, %edx = dist
-         *       %ecx = nbytes, %eax = write, %eax = len
-         *
-         *   else {
-         *     from += write - nbytes;
-         *     if (nbytes < len) {
-         *       len -= nbytes;
-         *       do {
-         *         PUP(out) = PUP(from);
-         *       } while (--nbytes);
-         *       from = out - dist;
-         *     }
-         *   }
-         */
-#define write_r %eax
-        addl    write_r, from_r
-        subl    nbytes_r, from_r        /* from += write - nbytes */
-#undef write_r
-
-        movl    len(%esp), len_r
-        cmpl    nbytes_r, len_r
-        jbe     .L_do_copy1             /* if (nbytes >= len) */
-
-        subl    nbytes_r, len_r         /* len -= nbytes */
-        rep     movsb
-        movl    out_r, from_r
-        subl    dist_r, from_r          /* from = out - dist */
-
-.L_do_copy1:
-        /* regs: %esi = from, %esi = in, %ebp = hold, %bl = bits, %edi = out
-         *       %eax = len
-         *
-         *     while (len > 0) {
-         *       PUP(out) = PUP(from);
-         *       len--;
-         *     }
-         *   }
-         * } while (in < last && out < end);
-         */
-#undef nbytes_r
-#define in_r %esi
-        movl    len_r, %ecx
-        rep     movsb
-
-        movl    in(%esp), in_r          /* move in back to %esi, toss from */
-        jmp     .L_while_test
-
-#undef len_r
-#undef dist_r
-
-#endif /* NO_MMX || RUN_TIME_MMX */
-
-
-/*** MMX code ***/
-
-#if defined( USE_MMX ) || defined( RUN_TIME_MMX )
-
-.align 32,0x90
-.L_init_mmx:
-        emms
-
-#undef  bits_r
-#undef  bitslong_r
-#define bitslong_r %ebp
-#define hold_mm    %mm0
-        movd    %ebp, hold_mm
-        movl    %ebx, bitslong_r
-
-#define used_mm   %mm1
-#define dmask2_mm %mm2
-#define lmask2_mm %mm3
-#define lmask_mm  %mm4
-#define dmask_mm  %mm5
-#define tmp_mm    %mm6
-
-        movd    lmask(%esp), lmask_mm
-        movq    lmask_mm, lmask2_mm
-        movd    dmask(%esp), dmask_mm
-        movq    dmask_mm, dmask2_mm
-        pxor    used_mm, used_mm
-        movl    lcode(%esp), %ebx       /* ebx = lcode */
-        jmp     .L_do_loop_mmx
-
-.align 32,0x90
-.L_while_test_mmx:
-        /* while (in < last && out < end)
-         */
-        cmpl    out_r, end(%esp)
-        jbe     .L_break_loop           /* if (out >= end) */
-
-        cmpl    in_r, last(%esp)
-        jbe     .L_break_loop
-
-.L_do_loop_mmx:
-        psrlq   used_mm, hold_mm        /* hold_mm >>= last bit length */
-
-        cmpl    $32, bitslong_r
-        ja      .L_get_length_code_mmx  /* if (32 < bits) */
-
-        movd    bitslong_r, tmp_mm
-        movd    (in_r), %mm7
-        addl    $4, in_r
-        psllq   tmp_mm, %mm7
-        addl    $32, bitslong_r
-        por     %mm7, hold_mm           /* hold_mm |= *((uint *)in)++ << bits */
-
-.L_get_length_code_mmx:
-        pand    hold_mm, lmask_mm
-        movd    lmask_mm, %eax
-        movq    lmask2_mm, lmask_mm
-        movl    (%ebx,%eax,4), %eax     /* eax = lcode[hold & lmask] */
-
-.L_dolen_mmx:
-        movzbl  %ah, %ecx               /* ecx = this.bits */
-        movd    %ecx, used_mm
-        subl    %ecx, bitslong_r        /* bits -= this.bits */
-
-        testb   %al, %al
-        jnz     .L_test_for_length_base_mmx /* if (op != 0) 45.7% */
-
-        shrl    $16, %eax               /* output this.val char */
-        stosb
-        jmp     .L_while_test_mmx
-
-.L_test_for_length_base_mmx:
-#define len_r  %edx
-        movl    %eax, len_r             /* len = this */
-        shrl    $16, len_r              /* len = this.val */
-
-        testb   $16, %al
-        jz      .L_test_for_second_level_length_mmx /* if ((op & 16) == 0) 8% */
-        andl    $15, %eax               /* op &= 15 */
-        jz      .L_decode_distance_mmx  /* if (!op) */
-
-        psrlq   used_mm, hold_mm        /* hold_mm >>= last bit length */
-        movd    %eax, used_mm
-        movd    hold_mm, %ecx
-        subl    %eax, bitslong_r
-        andl    .L_mask(,%eax,4), %ecx
-        addl    %ecx, len_r             /* len += hold & mask[op] */
-
-.L_decode_distance_mmx:
-        psrlq   used_mm, hold_mm        /* hold_mm >>= last bit length */
-
-        cmpl    $32, bitslong_r
-        ja      .L_get_dist_code_mmx    /* if (32 < bits) */
-
-        movd    bitslong_r, tmp_mm
-        movd    (in_r), %mm7
-        addl    $4, in_r
-        psllq   tmp_mm, %mm7
-        addl    $32, bitslong_r
-        por     %mm7, hold_mm           /* hold_mm |= *((uint *)in)++ << bits */
-
-.L_get_dist_code_mmx:
-        movl    dcode(%esp), %ebx       /* ebx = dcode */
-        pand    hold_mm, dmask_mm
-        movd    dmask_mm, %eax
-        movq    dmask2_mm, dmask_mm
-        movl    (%ebx,%eax,4), %eax     /* eax = dcode[hold & lmask] */
-
-.L_dodist_mmx:
-#define dist_r %ebx
-        movzbl  %ah, %ecx               /* ecx = this.bits */
-        movl    %eax, dist_r
-        shrl    $16, dist_r             /* dist  = this.val */
-        subl    %ecx, bitslong_r        /* bits -= this.bits */
-        movd    %ecx, used_mm
-
-        testb   $16, %al                /* if ((op & 16) == 0) */
-        jz      .L_test_for_second_level_dist_mmx
-        andl    $15, %eax               /* op &= 15 */
-        jz      .L_check_dist_one_mmx
-
-.L_add_bits_to_dist_mmx:
-        psrlq   used_mm, hold_mm        /* hold_mm >>= last bit length */
-        movd    %eax, used_mm           /* save bit length of current op */
-        movd    hold_mm, %ecx           /* get the next bits on input stream */
-        subl    %eax, bitslong_r        /* bits -= op bits */
-        andl    .L_mask(,%eax,4), %ecx  /* ecx   = hold & mask[op] */
-        addl    %ecx, dist_r            /* dist += hold & mask[op] */
-
-.L_check_window_mmx:
-        movl    in_r, in(%esp)          /* save in so from can use it's reg */
-        movl    out_r, %eax
-        subl    beg(%esp), %eax         /* nbytes = out - beg */
-
-        cmpl    dist_r, %eax
-        jb      .L_clip_window_mmx      /* if (dist > nbytes) 4.2% */
-
-        movl    len_r, %ecx
-        movl    out_r, from_r
-        subl    dist_r, from_r          /* from = out - dist */
-
-        subl    $3, %ecx
-        movb    (from_r), %al
-        movb    %al, (out_r)
-        movb    1(from_r), %al
-        movb    2(from_r), %dl
-        addl    $3, from_r
-        movb    %al, 1(out_r)
-        movb    %dl, 2(out_r)
-        addl    $3, out_r
-        rep     movsb
-
-        movl    in(%esp), in_r          /* move in back to %esi, toss from */
-        movl    lcode(%esp), %ebx       /* move lcode back to %ebx, toss dist */
-        jmp     .L_while_test_mmx
-
-.align 16,0x90
-.L_check_dist_one_mmx:
-        cmpl    $1, dist_r
-        jne     .L_check_window_mmx
-        cmpl    out_r, beg(%esp)
-        je      .L_check_window_mmx
-
-        decl    out_r
-        movl    len_r, %ecx
-        movb    (out_r), %al
-        subl    $3, %ecx
-
-        movb    %al, 1(out_r)
-        movb    %al, 2(out_r)
-        movb    %al, 3(out_r)
-        addl    $4, out_r
-        rep     stosb
-
-        movl    lcode(%esp), %ebx       /* move lcode back to %ebx, toss dist */
-        jmp     .L_while_test_mmx
-
-.align 16,0x90
-.L_test_for_second_level_length_mmx:
-        testb   $64, %al
-        jnz     .L_test_for_end_of_block  /* if ((op & 64) != 0) */
-
-        andl    $15, %eax
-        psrlq   used_mm, hold_mm        /* hold_mm >>= last bit length */
-        movd    hold_mm, %ecx
-        andl    .L_mask(,%eax,4), %ecx
-        addl    len_r, %ecx
-        movl    (%ebx,%ecx,4), %eax     /* eax = lcode[hold & lmask] */
-        jmp     .L_dolen_mmx
-
-.align 16,0x90
-.L_test_for_second_level_dist_mmx:
-        testb   $64, %al
-        jnz     .L_invalid_distance_code  /* if ((op & 64) != 0) */
-
-        andl    $15, %eax
-        psrlq   used_mm, hold_mm        /* hold_mm >>= last bit length */
-        movd    hold_mm, %ecx
-        andl    .L_mask(,%eax,4), %ecx
-        movl    dcode(%esp), %eax       /* ecx = dcode */
-        addl    dist_r, %ecx
-        movl    (%eax,%ecx,4), %eax     /* eax = lcode[hold & lmask] */
-        jmp     .L_dodist_mmx
-
-.align 16,0x90
-.L_clip_window_mmx:
-#define nbytes_r %ecx
-        movl    %eax, nbytes_r
-        movl    wsize(%esp), %eax       /* prepare for dist compare */
-        negl    nbytes_r                /* nbytes = -nbytes */
-        movl    window(%esp), from_r    /* from = window */
-
-        cmpl    dist_r, %eax
-        jb      .L_invalid_distance_too_far /* if (dist > wsize) */
-
-        addl    dist_r, nbytes_r        /* nbytes = dist - nbytes */
-        cmpl    $0, write(%esp)
-        jne     .L_wrap_around_window_mmx /* if (write != 0) */
-
-        subl    nbytes_r, %eax
-        addl    %eax, from_r            /* from += wsize - nbytes */
-
-        cmpl    nbytes_r, len_r
-        jbe     .L_do_copy1_mmx         /* if (nbytes >= len) */
-
-        subl    nbytes_r, len_r         /* len -= nbytes */
-        rep     movsb
-        movl    out_r, from_r
-        subl    dist_r, from_r          /* from = out - dist */
-        jmp     .L_do_copy1_mmx
-
-        cmpl    nbytes_r, len_r
-        jbe     .L_do_copy1_mmx         /* if (nbytes >= len) */
-
-        subl    nbytes_r, len_r         /* len -= nbytes */
-        rep     movsb
-        movl    out_r, from_r
-        subl    dist_r, from_r          /* from = out - dist */
-        jmp     .L_do_copy1_mmx
-
-.L_wrap_around_window_mmx:
-#define write_r %eax
-        movl    write(%esp), write_r
-        cmpl    write_r, nbytes_r
-        jbe     .L_contiguous_in_window_mmx /* if (write >= nbytes) */
-
-        addl    wsize(%esp), from_r
-        addl    write_r, from_r
-        subl    nbytes_r, from_r        /* from += wsize + write - nbytes */
-        subl    write_r, nbytes_r       /* nbytes -= write */
-#undef write_r
-
-        cmpl    nbytes_r, len_r
-        jbe     .L_do_copy1_mmx         /* if (nbytes >= len) */
-
-        subl    nbytes_r, len_r         /* len -= nbytes */
-        rep     movsb
-        movl    window(%esp), from_r    /* from = window */
-        movl    write(%esp), nbytes_r   /* nbytes = write */
-        cmpl    nbytes_r, len_r
-        jbe     .L_do_copy1_mmx         /* if (nbytes >= len) */
-
-        subl    nbytes_r, len_r         /* len -= nbytes */
-        rep     movsb
-        movl    out_r, from_r
-        subl    dist_r, from_r          /* from = out - dist */
-        jmp     .L_do_copy1_mmx
-
-.L_contiguous_in_window_mmx:
-#define write_r %eax
-        addl    write_r, from_r
-        subl    nbytes_r, from_r        /* from += write - nbytes */
-#undef write_r
-
-        cmpl    nbytes_r, len_r
-        jbe     .L_do_copy1_mmx         /* if (nbytes >= len) */
-
-        subl    nbytes_r, len_r         /* len -= nbytes */
-        rep     movsb
-        movl    out_r, from_r
-        subl    dist_r, from_r          /* from = out - dist */
-
-.L_do_copy1_mmx:
-#undef nbytes_r
-#define in_r %esi
-        movl    len_r, %ecx
-        rep     movsb
-
-        movl    in(%esp), in_r          /* move in back to %esi, toss from */
-        movl    lcode(%esp), %ebx       /* move lcode back to %ebx, toss dist */
-        jmp     .L_while_test_mmx
-
-#undef hold_r
-#undef bitslong_r
-
-#endif /* USE_MMX || RUN_TIME_MMX */
-
-
-/*** USE_MMX, NO_MMX, and RUNTIME_MMX from here on ***/
-
-.L_invalid_distance_code:
-        /* else {
-         *   strm->msg = "invalid distance code";
-         *   state->mode = BAD;
-         * }
-         */
-        movl    $.L_invalid_distance_code_msg, %ecx
-        movl    $INFLATE_MODE_BAD, %edx
-        jmp     .L_update_stream_state
-
-.L_test_for_end_of_block:
-        /* else if (op & 32) {
-         *   state->mode = TYPE;
-         *   break;
-         * }
-         */
-        testb   $32, %al
-        jz      .L_invalid_literal_length_code  /* if ((op & 32) == 0) */
-
-        movl    $0, %ecx
-        movl    $INFLATE_MODE_TYPE, %edx
-        jmp     .L_update_stream_state
-
-.L_invalid_literal_length_code:
-        /* else {
-         *   strm->msg = "invalid literal/length code";
-         *   state->mode = BAD;
-         * }
-         */
-        movl    $.L_invalid_literal_length_code_msg, %ecx
-        movl    $INFLATE_MODE_BAD, %edx
-        jmp     .L_update_stream_state
-
-.L_invalid_distance_too_far:
-        /* strm->msg = "invalid distance too far back";
-         * state->mode = BAD;
-         */
-        movl    in(%esp), in_r          /* from_r has in's reg, put in back */
-        movl    $.L_invalid_distance_too_far_msg, %ecx
-        movl    $INFLATE_MODE_BAD, %edx
-        jmp     .L_update_stream_state
-
-.L_update_stream_state:
-        /* set strm->msg = %ecx, strm->state->mode = %edx */
-        movl    strm_sp(%esp), %eax
-        testl   %ecx, %ecx              /* if (msg != NULL) */
-        jz      .L_skip_msg
-        movl    %ecx, msg_strm(%eax)    /* strm->msg = msg */
-.L_skip_msg:
-        movl    state_strm(%eax), %eax  /* state = strm->state */
-        movl    %edx, mode_state(%eax)  /* state->mode = edx (BAD | TYPE) */
-        jmp     .L_break_loop
-
-.align 32,0x90
-.L_break_loop:
-
-/*
- * Regs:
- *
- * bits = %ebp when mmx, and in %ebx when non-mmx
- * hold = %hold_mm when mmx, and in %ebp when non-mmx
- * in   = %esi
- * out  = %edi
- */
-
-#if defined( USE_MMX ) || defined( RUN_TIME_MMX )
-
-#if defined( RUN_TIME_MMX )
-
-        cmpl    $DO_USE_MMX, inflate_fast_use_mmx
-        jne     .L_update_next_in
-
-#endif /* RUN_TIME_MMX */
-
-        movl    %ebp, %ebx
-
-.L_update_next_in:
-
-#endif
-
-#define strm_r  %eax
-#define state_r %edx
-
-        /* len = bits >> 3;
-         * in -= len;
-         * bits -= len << 3;
-         * hold &= (1U << bits) - 1;
-         * state->hold = hold;
-         * state->bits = bits;
-         * strm->next_in = in;
-         * strm->next_out = out;
-         */
-        movl    strm_sp(%esp), strm_r
-        movl    %ebx, %ecx
-        movl    state_strm(strm_r), state_r
-        shrl    $3, %ecx
-        subl    %ecx, in_r
-        shll    $3, %ecx
-        subl    %ecx, %ebx
-        movl    out_r, next_out_strm(strm_r)
-        movl    %ebx, bits_state(state_r)
-        movl    %ebx, %ecx
-
-        leal    buf(%esp), %ebx
-        cmpl    %ebx, last(%esp)
-        jne     .L_buf_not_used         /* if buf != last */
-
-        subl    %ebx, in_r              /* in -= buf */
-        movl    next_in_strm(strm_r), %ebx
-        movl    %ebx, last(%esp)        /* last = strm->next_in */
-        addl    %ebx, in_r              /* in += strm->next_in */
-        movl    avail_in_strm(strm_r), %ebx
-        subl    $11, %ebx
-        addl    %ebx, last(%esp)    /* last = &strm->next_in[ avail_in - 11 ] */
-
-.L_buf_not_used:
-        movl    in_r, next_in_strm(strm_r)
-
-        movl    $1, %ebx
-        shll    %cl, %ebx
-        decl    %ebx
-
-#if defined( USE_MMX ) || defined( RUN_TIME_MMX )
-
-#if defined( RUN_TIME_MMX )
-
-        cmpl    $DO_USE_MMX, inflate_fast_use_mmx
-        jne     .L_update_hold
-
-#endif /* RUN_TIME_MMX */
-
-        psrlq   used_mm, hold_mm        /* hold_mm >>= last bit length */
-        movd    hold_mm, %ebp
-
-        emms
-
-.L_update_hold:
-
-#endif /* USE_MMX || RUN_TIME_MMX */
-
-        andl    %ebx, %ebp
-        movl    %ebp, hold_state(state_r)
-
-#define last_r %ebx
-
-        /* strm->avail_in = in < last ? 11 + (last - in) : 11 - (in - last) */
-        movl    last(%esp), last_r
-        cmpl    in_r, last_r
-        jbe     .L_last_is_smaller     /* if (in >= last) */
-
-        subl    in_r, last_r           /* last -= in */
-        addl    $11, last_r            /* last += 11 */
-        movl    last_r, avail_in_strm(strm_r)
-        jmp     .L_fixup_out
-.L_last_is_smaller:
-        subl    last_r, in_r           /* in -= last */
-        negl    in_r                   /* in = -in */
-        addl    $11, in_r              /* in += 11 */
-        movl    in_r, avail_in_strm(strm_r)
-
-#undef last_r
-#define end_r %ebx
-
-.L_fixup_out:
-        /* strm->avail_out = out < end ? 257 + (end - out) : 257 - (out - end)*/
-        movl    end(%esp), end_r
-        cmpl    out_r, end_r
-        jbe     .L_end_is_smaller      /* if (out >= end) */
-
-        subl    out_r, end_r           /* end -= out */
-        addl    $257, end_r            /* end += 257 */
-        movl    end_r, avail_out_strm(strm_r)
-        jmp     .L_done
-.L_end_is_smaller:
-        subl    end_r, out_r           /* out -= end */
-        negl    out_r                  /* out = -out */
-        addl    $257, out_r            /* out += 257 */
-        movl    out_r, avail_out_strm(strm_r)
-
-#undef end_r
-#undef strm_r
-#undef state_r
-
-.L_done:
-        addl    $local_var_size, %esp
-        popf
-        popl    %ebx
-        popl    %ebp
-        popl    %esi
-        popl    %edi
-        ret
-
-#if defined( GAS_ELF )
-/* elf info */
-.type inflate_fast,@function
-.size inflate_fast,.-inflate_fast
-#endif
Index: trunk/minix/lib/zlib-1.2.3/contrib/iostream/test.cpp
===================================================================
--- trunk/minix/lib/zlib-1.2.3/contrib/iostream/test.cpp	(revision 9)
+++ 	(revision )
@@ -1,24 +1,0 @@
-
-#include "zfstream.h"
-
-int main() {
-
-  // Construct a stream object with this filebuffer.  Anything sent
-  // to this stream will go to standard out.
-  gzofstream os( 1, ios::out );
-
-  // This text is getting compressed and sent to stdout.
-  // To prove this, run 'test | zcat'.
-  os << "Hello, Mommy" << endl;
-
-  os << setcompressionlevel( Z_NO_COMPRESSION );
-  os << "hello, hello, hi, ho!" << endl;
-
-  setcompressionlevel( os, Z_DEFAULT_COMPRESSION )
-    << "I'm compressing again" << endl;
-
-  os.close();
-
-  return 0;
-
-}
Index: trunk/minix/lib/zlib-1.2.3/contrib/iostream/zfstream.cpp
===================================================================
--- trunk/minix/lib/zlib-1.2.3/contrib/iostream/zfstream.cpp	(revision 9)
+++ 	(revision )
@@ -1,329 +1,0 @@
-
-#include "zfstream.h"
-
-gzfilebuf::gzfilebuf() :
-  file(NULL),
-  mode(0),
-  own_file_descriptor(0)
-{ }
-
-gzfilebuf::~gzfilebuf() {
-
-  sync();
-  if ( own_file_descriptor )
-    close();
-
-}
-
-gzfilebuf *gzfilebuf::open( const char *name,
-                            int io_mode ) {
-
-  if ( is_open() )
-    return NULL;
-
-  char char_mode[10];
-  char *p = char_mode;
-
-  if ( io_mode & ios::in ) {
-    mode = ios::in;
-    *p++ = 'r';
-  } else if ( io_mode & ios::app ) {
-    mode = ios::app;
-    *p++ = 'a';
-  } else {
-    mode = ios::out;
-    *p++ = 'w';
-  }
-
-  if ( io_mode & ios::binary ) {
-    mode |= ios::binary;
-    *p++ = 'b';
-  }
-
-  // Hard code the compression level
-  if ( io_mode & (ios::out|ios::app )) {
-    *p++ = '9';
-  }
-
-  // Put the end-of-string indicator
-  *p = '\0';
-
-  if ( (file = gzopen(name, char_mode)) == NULL )
-    return NULL;
-
-  own_file_descriptor = 1;
-
-  return this;
-
-}
-
-gzfilebuf *gzfilebuf::attach( int file_descriptor,
-                              int io_mode ) {
-
-  if ( is_open() )
-    return NULL;
-
-  char char_mode[10];
-  char *p = char_mode;
-
-  if ( io_mode & ios::in ) {
-    mode = ios::in;
-    *p++ = 'r';
-  } else if ( io_mode & ios::app ) {
-    mode = ios::app;
-    *p++ = 'a';
-  } else {
-    mode = ios::out;
-    *p++ = 'w';
-  }
-
-  if ( io_mode & ios::binary ) {
-    mode |= ios::binary;
-    *p++ = 'b';
-  }
-
-  // Hard code the compression level
-  if ( io_mode & (ios::out|ios::app )) {
-    *p++ = '9';
-  }
-
-  // Put the end-of-string indicator
-  *p = '\0';
-
-  if ( (file = gzdopen(file_descriptor, char_mode)) == NULL )
-    return NULL;
-
-  own_file_descriptor = 0;
-
-  return this;
-
-}
-
-gzfilebuf *gzfilebuf::close() {
-
-  if ( is_open() ) {
-
-    sync();
-    gzclose( file );
-    file = NULL;
-
-  }
-
-  return this;
-
-}
-
-int gzfilebuf::setcompressionlevel( int comp_level ) {
-
-  return gzsetparams(file, comp_level, -2);
-
-}
-
-int gzfilebuf::setcompressionstrategy( int comp_strategy ) {
-
-  return gzsetparams(file, -2, comp_strategy);
-
-}
-
-
-streampos gzfilebuf::seekoff( streamoff off, ios::seek_dir dir, int which ) {
-
-  return streampos(EOF);
-
-}
-
-int gzfilebuf::underflow() {
-
-  // If the file hasn't been opened for reading, error.
-  if ( !is_open() || !(mode & ios::in) )
-    return EOF;
-
-  // if a buffer doesn't exists, allocate one.
-  if ( !base() ) {
-
-    if ( (allocate()) == EOF )
-      return EOF;
-    setp(0,0);
-
-  } else {
-
-    if ( in_avail() )
-      return (unsigned char) *gptr();
-
-    if ( out_waiting() ) {
-      if ( flushbuf() == EOF )
-        return EOF;
-    }
-
-  }
-
-  // Attempt to fill the buffer.
-
-  int result = fillbuf();
-  if ( result == EOF ) {
-    // disable get area
-    setg(0,0,0);
-    return EOF;
-  }
-
-  return (unsigned char) *gptr();
-
-}
-
-int gzfilebuf::overflow( int c ) {
-
-  if ( !is_open() || !(mode & ios::out) )
-    return EOF;
-
-  if ( !base() ) {
-    if ( allocate() == EOF )
-      return EOF;
-    setg(0,0,0);
-  } else {
-    if (in_avail()) {
-        return EOF;
-    }
-    if (out_waiting()) {
-      if (flushbuf() == EOF)
-        return EOF;
-    }
-  }
-
-  int bl = blen();
-  setp( base(), base() + bl);
-
-  if ( c != EOF ) {
-
-    *pptr() = c;
-    pbump(1);
-
-  }
-
-  return 0;
-
-}
-
-int gzfilebuf::sync() {
-
-  if ( !is_open() )
-    return EOF;
-
-  if ( out_waiting() )
-    return flushbuf();
-
-  return 0;
-
-}
-
-int gzfilebuf::flushbuf() {
-
-  int n;
-  char *q;
-
-  q = pbase();
-  n = pptr() - q;
-
-  if ( gzwrite( file, q, n) < n )
-    return EOF;
-
-  setp(0,0);
-
-  return 0;
-
-}
-
-int gzfilebuf::fillbuf() {
-
-  int required;
-  char *p;
-
-  p = base();
-
-  required = blen();
-
-  int t = gzread( file, p, required );
-
-  if ( t <= 0) return EOF;
-
-  setg( base(), base(), base()+t);
-
-  return t;
-
-}
-
-gzfilestream_common::gzfilestream_common() :
-  ios( gzfilestream_common::rdbuf() )
-{ }
-
-gzfilestream_common::~gzfilestream_common()
-{ }
-
-void gzfilestream_common::attach( int fd, int io_mode ) {
-
-  if ( !buffer.attach( fd, io_mode) )
-    clear( ios::failbit | ios::badbit );
-  else
-    clear();
-
-}
-
-void gzfilestream_common::open( const char *name, int io_mode ) {
-
-  if ( !buffer.open( name, io_mode ) )
-    clear( ios::failbit | ios::badbit );
-  else
-    clear();
-
-}
-
-void gzfilestream_common::close() {
-
-  if ( !buffer.close() )
-    clear( ios::failbit | ios::badbit );
-
-}
-
-gzfilebuf *gzfilestream_common::rdbuf()
-{
-  return &buffer;
-}
-
-gzifstream::gzifstream() :
-  ios( gzfilestream_common::rdbuf() )
-{
-  clear( ios::badbit );
-}
-
-gzifstream::gzifstream( const char *name, int io_mode ) :
-  ios( gzfilestream_common::rdbuf() )
-{
-  gzfilestream_common::open( name, io_mode );
-}
-
-gzifstream::gzifstream( int fd, int io_mode ) :
-  ios( gzfilestream_common::rdbuf() )
-{
-  gzfilestream_common::attach( fd, io_mode );
-}
-
-gzifstream::~gzifstream() { }
-
-gzofstream::gzofstream() :
-  ios( gzfilestream_common::rdbuf() )
-{
-  clear( ios::badbit );
-}
-
-gzofstream::gzofstream( const char *name, int io_mode ) :
-  ios( gzfilestream_common::rdbuf() )
-{
-  gzfilestream_common::open( name, io_mode );
-}
-
-gzofstream::gzofstream( int fd, int io_mode ) :
-  ios( gzfilestream_common::rdbuf() )
-{
-  gzfilestream_common::attach( fd, io_mode );
-}
-
-gzofstream::~gzofstream() { }
Index: trunk/minix/lib/zlib-1.2.3/contrib/iostream/zfstream.h
===================================================================
--- trunk/minix/lib/zlib-1.2.3/contrib/iostream/zfstream.h	(revision 9)
+++ 	(revision )
@@ -1,128 +1,0 @@
-
-#ifndef zfstream_h
-#define zfstream_h
-
-#include <fstream.h>
-#include "zlib.h"
-
-class gzfilebuf : public streambuf {
-
-public:
-
-  gzfilebuf( );
-  virtual ~gzfilebuf();
-
-  gzfilebuf *open( const char *name, int io_mode );
-  gzfilebuf *attach( int file_descriptor, int io_mode );
-  gzfilebuf *close();
-
-  int setcompressionlevel( int comp_level );
-  int setcompressionstrategy( int comp_strategy );
-
-  inline int is_open() const { return (file !=NULL); }
-
-  virtual streampos seekoff( streamoff, ios::seek_dir, int );
-
-  virtual int sync();
-
-protected:
-
-  virtual int underflow();
-  virtual int overflow( int = EOF );
-
-private:
-
-  gzFile file;
-  short mode;
-  short own_file_descriptor;
-
-  int flushbuf();
-  int fillbuf();
-
-};
-
-class gzfilestream_common : virtual public ios {
-
-  friend class gzifstream;
-  friend class gzofstream;
-  friend gzofstream &setcompressionlevel( gzofstream &, int );
-  friend gzofstream &setcompressionstrategy( gzofstream &, int );
-
-public:
-  virtual ~gzfilestream_common();
-
-  void attach( int fd, int io_mode );
-  void open( const char *name, int io_mode );
-  void close();
-
-protected:
-  gzfilestream_common();
-
-private:
-  gzfilebuf *rdbuf();
-
-  gzfilebuf buffer;
-
-};
-
-class gzifstream : public gzfilestream_common, public istream {
-
-public:
-
-  gzifstream();
-  gzifstream( const char *name, int io_mode = ios::in );
-  gzifstream( int fd, int io_mode = ios::in );
-
-  virtual ~gzifstream();
-
-};
-
-class gzofstream : public gzfilestream_common, public ostream {
-
-public:
-
-  gzofstream();
-  gzofstream( const char *name, int io_mode = ios::out );
-  gzofstream( int fd, int io_mode = ios::out );
-
-  virtual ~gzofstream();
-
-};
-
-template<class T> class gzomanip {
-  friend gzofstream &operator<<(gzofstream &, const gzomanip<T> &);
-public:
-  gzomanip(gzofstream &(*f)(gzofstream &, T), T v) : func(f), val(v) { }
-private:
-  gzofstream &(*func)(gzofstream &, T);
-  T val;
-};
-
-template<class T> gzofstream &operator<<(gzofstream &s, const gzomanip<T> &m)
-{
-  return (*m.func)(s, m.val);
-}
-
-inline gzofstream &setcompressionlevel( gzofstream &s, int l )
-{
-  (s.rdbuf())->setcompressionlevel(l);
-  return s;
-}
-
-inline gzofstream &setcompressionstrategy( gzofstream &s, int l )
-{
-  (s.rdbuf())->setcompressionstrategy(l);
-  return s;
-}
-
-inline gzomanip<int> setcompressionlevel(int l)
-{
-  return gzomanip<int>(&setcompressionlevel,l);
-}
-
-inline gzomanip<int> setcompressionstrategy(int l)
-{
-  return gzomanip<int>(&setcompressionstrategy,l);
-}
-
-#endif
Index: trunk/minix/lib/zlib-1.2.3/contrib/iostream2/zstream.h
===================================================================
--- trunk/minix/lib/zlib-1.2.3/contrib/iostream2/zstream.h	(revision 9)
+++ 	(revision )
@@ -1,307 +1,0 @@
-/*
- *
- * Copyright (c) 1997
- * Christian Michelsen Research AS
- * Advanced Computing
- * Fantoftvegen 38, 5036 BERGEN, Norway
- * http://www.cmr.no
- *
- * Permission to use, copy, modify, distribute and sell this software
- * and its documentation for any purpose is hereby granted without fee,
- * provided that the above copyright notice appear in all copies and
- * that both that copyright notice and this permission notice appear
- * in supporting documentation.  Christian Michelsen Research AS makes no
- * representations about the suitability of this software for any
- * purpose.  It is provided "as is" without express or implied warranty.
- *
- */
-
-#ifndef ZSTREAM__H
-#define ZSTREAM__H
-
-/*
- * zstream.h - C++ interface to the 'zlib' general purpose compression library
- * $Id: zstream.h,v 1.1 2005/09/23 22:39:03 beng Exp $
- */
-
-#include <strstream.h>
-#include <string.h>
-#include <stdio.h>
-#include "zlib.h"
-
-#if defined(_WIN32)
-#   include <fcntl.h>
-#   include <io.h>
-#   define SET_BINARY_MODE(file) setmode(fileno(file), O_BINARY)
-#else
-#   define SET_BINARY_MODE(file)
-#endif
-
-class zstringlen {
-public:
-    zstringlen(class izstream&);
-    zstringlen(class ozstream&, const char*);
-    size_t value() const { return val.word; }
-private:
-    struct Val { unsigned char byte; size_t word; } val;
-};
-
-//  ----------------------------- izstream -----------------------------
-
-class izstream
-{
-    public:
-        izstream() : m_fp(0) {}
-        izstream(FILE* fp) : m_fp(0) { open(fp); }
-        izstream(const char* name) : m_fp(0) { open(name); }
-        ~izstream() { close(); }
-
-        /* Opens a gzip (.gz) file for reading.
-         * open() can be used to read a file which is not in gzip format;
-         * in this case read() will directly read from the file without
-         * decompression. errno can be checked to distinguish two error
-         * cases (if errno is zero, the zlib error is Z_MEM_ERROR).
-         */
-        void open(const char* name) {
-            if (m_fp) close();
-            m_fp = ::gzopen(name, "rb");
-        }
-
-        void open(FILE* fp) {
-            SET_BINARY_MODE(fp);
-            if (m_fp) close();
-            m_fp = ::gzdopen(fileno(fp), "rb");
-        }
-
-        /* Flushes all pending input if necessary, closes the compressed file
-         * and deallocates all the (de)compression state. The return value is
-         * the zlib error number (see function error() below).
-         */
-        int close() {
-            int r = ::gzclose(m_fp);
-            m_fp = 0; return r;
-        }
-
-        /* Binary read the given number of bytes from the compressed file.
-         */
-        int read(void* buf, size_t len) {
-            return ::gzread(m_fp, buf, len);
-        }
-
-        /* Returns the error message for the last error which occurred on the
-         * given compressed file. errnum is set to zlib error number. If an
-         * error occurred in the file system and not in the compression library,
-         * errnum is set to Z_ERRNO and the application may consult errno
-         * to get the exact error code.
-         */
-        const char* error(int* errnum) {
-            return ::gzerror(m_fp, errnum);
-        }
-
-        gzFile fp() { return m_fp; }
-
-    private:
-        gzFile m_fp;
-};
-
-/*
- * Binary read the given (array of) object(s) from the compressed file.
- * If the input file was not in gzip format, read() copies the objects number
- * of bytes into the buffer.
- * returns the number of uncompressed bytes actually read
- * (0 for end of file, -1 for error).
- */
-template <class T, class Items>
-inline int read(izstream& zs, T* x, Items items) {
-    return ::gzread(zs.fp(), x, items*sizeof(T));
-}
-
-/*
- * Binary input with the '>' operator.
- */
-template <class T>
-inline izstream& operator>(izstream& zs, T& x) {
-    ::gzread(zs.fp(), &x, sizeof(T));
-    return zs;
-}
-
-
-inline zstringlen::zstringlen(izstream& zs) {
-    zs > val.byte;
-    if (val.byte == 255) zs > val.word;
-    else val.word = val.byte;
-}
-
-/*
- * Read length of string + the string with the '>' operator.
- */
-inline izstream& operator>(izstream& zs, char* x) {
-    zstringlen len(zs);
-    ::gzread(zs.fp(), x, len.value());
-    x[len.value()] = '\0';
-    return zs;
-}
-
-inline char* read_string(izstream& zs) {
-    zstringlen len(zs);
-    char* x = new char[len.value()+1];
-    ::gzread(zs.fp(), x, len.value());
-    x[len.value()] = '\0';
-    return x;
-}
-
-// ----------------------------- ozstream -----------------------------
-
-class ozstream
-{
-    public:
-        ozstream() : m_fp(0), m_os(0) {
-        }
-        ozstream(FILE* fp, int level = Z_DEFAULT_COMPRESSION)
-            : m_fp(0), m_os(0) {
-            open(fp, level);
-        }
-        ozstream(const char* name, int level = Z_DEFAULT_COMPRESSION)
-            : m_fp(0), m_os(0) {
-            open(name, level);
-        }
-        ~ozstream() {
-            close();
-        }
-
-        /* Opens a gzip (.gz) file for writing.
-         * The compression level parameter should be in 0..9
-         * errno can be checked to distinguish two error cases
-         * (if errno is zero, the zlib error is Z_MEM_ERROR).
-         */
-        void open(const char* name, int level = Z_DEFAULT_COMPRESSION) {
-            char mode[4] = "wb\0";
-            if (level != Z_DEFAULT_COMPRESSION) mode[2] = '0'+level;
-            if (m_fp) close();
-            m_fp = ::gzopen(name, mode);
-        }
-
-        /* open from a FILE pointer.
-         */
-        void open(FILE* fp, int level = Z_DEFAULT_COMPRESSION) {
-            SET_BINARY_MODE(fp);
-            char mode[4] = "wb\0";
-            if (level != Z_DEFAULT_COMPRESSION) mode[2] = '0'+level;
-            if (m_fp) close();
-            m_fp = ::gzdopen(fileno(fp), mode);
-        }
-
-        /* Flushes all pending output if necessary, closes the compressed file
-         * and deallocates all the (de)compression state. The return value is
-         * the zlib error number (see function error() below).
-         */
-        int close() {
-            if (m_os) {
-                ::gzwrite(m_fp, m_os->str(), m_os->pcount());
-                delete[] m_os->str(); delete m_os; m_os = 0;
-            }
-            int r = ::gzclose(m_fp); m_fp = 0; return r;
-        }
-
-        /* Binary write the given number of bytes into the compressed file.
-         */
-        int write(const void* buf, size_t len) {
-            return ::gzwrite(m_fp, (voidp) buf, len);
-        }
-
-        /* Flushes all pending output into the compressed file. The parameter
-         * _flush is as in the deflate() function. The return value is the zlib
-         * error number (see function gzerror below). flush() returns Z_OK if
-         * the flush_ parameter is Z_FINISH and all output could be flushed.
-         * flush() should be called only when strictly necessary because it can
-         * degrade compression.
-         */
-        int flush(int _flush) {
-            os_flush();
-            return ::gzflush(m_fp, _flush);
-        }
-
-        /* Returns the error message for the last error which occurred on the
-         * given compressed file. errnum is set to zlib error number. If an
-         * error occurred in the file system and not in the compression library,
-         * errnum is set to Z_ERRNO and the application may consult errno
-         * to get the exact error code.
-         */
-        const char* error(int* errnum) {
-            return ::gzerror(m_fp, errnum);
-        }
-
-        gzFile fp() { return m_fp; }
-
-        ostream& os() {
-            if (m_os == 0) m_os = new ostrstream;
-            return *m_os;
-        }
-
-        void os_flush() {
-            if (m_os && m_os->pcount()>0) {
-                ostrstream* oss = new ostrstream;
-                oss->fill(m_os->fill());
-                oss->flags(m_os->flags());
-                oss->precision(m_os->precision());
-                oss->width(m_os->width());
-                ::gzwrite(m_fp, m_os->str(), m_os->pcount());
-                delete[] m_os->str(); delete m_os; m_os = oss;
-            }
-        }
-
-    private:
-        gzFile m_fp;
-        ostrstream* m_os;
-};
-
-/*
- * Binary write the given (array of) object(s) into the compressed file.
- * returns the number of uncompressed bytes actually written
- * (0 in case of error).
- */
-template <class T, class Items>
-inline int write(ozstream& zs, const T* x, Items items) {
-    return ::gzwrite(zs.fp(), (voidp) x, items*sizeof(T));
-}
-
-/*
- * Binary output with the '<' operator.
- */
-template <class T>
-inline ozstream& operator<(ozstream& zs, const T& x) {
-    ::gzwrite(zs.fp(), (voidp) &x, sizeof(T));
-    return zs;
-}
-
-inline zstringlen::zstringlen(ozstream& zs, const char* x) {
-    val.byte = 255;  val.word = ::strlen(x);
-    if (val.word < 255) zs < (val.byte = val.word);
-    else zs < val;
-}
-
-/*
- * Write length of string + the string with the '<' operator.
- */
-inline ozstream& operator<(ozstream& zs, const char* x) {
-    zstringlen len(zs, x);
-    ::gzwrite(zs.fp(), (voidp) x, len.value());
-    return zs;
-}
-
-#ifdef _MSC_VER
-inline ozstream& operator<(ozstream& zs, char* const& x) {
-    return zs < (const char*) x;
-}
-#endif
-
-/*
- * Ascii write with the << operator;
- */
-template <class T>
-inline ostream& operator<<(ozstream& zs, const T& x) {
-    zs.os_flush();
-    return zs.os() << x;
-}
-
-#endif
Index: trunk/minix/lib/zlib-1.2.3/contrib/iostream2/zstream_test.cpp
===================================================================
--- trunk/minix/lib/zlib-1.2.3/contrib/iostream2/zstream_test.cpp	(revision 9)
+++ 	(revision )
@@ -1,25 +1,0 @@
-#include "zstream.h"
-#include <math.h>
-#include <stdlib.h>
-#include <iomanip.h>
-
-void main() {
-    char h[256] = "Hello";
-    char* g = "Goodbye";
-    ozstream out("temp.gz");
-    out < "This works well" < h < g;
-    out.close();
-
-    izstream in("temp.gz"); // read it back
-    char *x = read_string(in), *y = new char[256], z[256];
-    in > y > z;
-    in.close();
-    cout << x << endl << y << endl << z << endl;
-
-    out.open("temp.gz"); // try ascii output; zcat temp.gz to see the results
-    out << setw(50) << setfill('#') << setprecision(20) << x << endl << y << endl << z << endl;
-    out << z << endl << y << endl << x << endl;
-    out << 1.1234567890123456789 << endl;
-
-    delete[] x; delete[] y;
-}
Index: trunk/minix/lib/zlib-1.2.3/contrib/iostream3/README
===================================================================
--- trunk/minix/lib/zlib-1.2.3/contrib/iostream3/README	(revision 9)
+++ 	(revision )
@@ -1,35 +1,0 @@
-These classes provide a C++ stream interface to the zlib library. It allows you
-to do things like:
-
-  gzofstream outf("blah.gz");
-  outf << "These go into the gzip file " << 123 << endl;
-
-It does this by deriving a specialized stream buffer for gzipped files, which is
-the way Stroustrup would have done it. :->
-
-The gzifstream and gzofstream classes were originally written by Kevin Ruland
-and made available in the zlib contrib/iostream directory. The older version still
-compiles under gcc 2.xx, but not under gcc 3.xx, which sparked the development of
-this version.
-
-The new classes are as standard-compliant as possible, closely following the
-approach of the standard library's fstream classes. It compiles under gcc versions
-3.2 and 3.3, but not under gcc 2.xx. This is mainly due to changes in the standard
-library naming scheme. The new version of gzifstream/gzofstream/gzfilebuf differs
-from the previous one in the following respects:
-- added showmanyc
-- added setbuf, with support for unbuffered output via setbuf(0,0)
-- a few bug fixes of stream behavior
-- gzipped output file opened with default compression level instead of maximum level
-- setcompressionlevel()/strategy() members replaced by single setcompression()
-
-The code is provided "as is", with the permission to use, copy, modify, distribute
-and sell it for any purpose without fee.
-
-Ludwig Schwardt
-<schwardt@sun.ac.za>
-
-DSP Lab
-Electrical & Electronic Engineering Department
-University of Stellenbosch
-South Africa
Index: trunk/minix/lib/zlib-1.2.3/contrib/iostream3/TODO
===================================================================
--- trunk/minix/lib/zlib-1.2.3/contrib/iostream3/TODO	(revision 9)
+++ 	(revision )
@@ -1,17 +1,0 @@
-Possible upgrades to gzfilebuf:
-
-- The ability to do putback (e.g. putbackfail)
-
-- The ability to seek (zlib supports this, but could be slow/tricky)
-
-- Simultaneous read/write access (does it make sense?)
-
-- Support for ios_base::ate open mode
-
-- Locale support?
-
-- Check public interface to see which calls give problems
-  (due to dependence on library internals)
-
-- Override operator<<(ostream&, gzfilebuf*) to allow direct copying
-  of stream buffer to stream ( i.e. os << is.rdbuf(); )
Index: trunk/minix/lib/zlib-1.2.3/contrib/iostream3/test.cc
===================================================================
--- trunk/minix/lib/zlib-1.2.3/contrib/iostream3/test.cc	(revision 9)
+++ 	(revision )
@@ -1,50 +1,0 @@
-/*
- * Test program for gzifstream and gzofstream
- *
- * by Ludwig Schwardt <schwardt@sun.ac.za>
- * original version by Kevin Ruland <kevin@rodin.wustl.edu>
- */
-
-#include "zfstream.h"
-#include <iostream>      // for cout
-
-int main() {
-
-  gzofstream outf;
-  gzifstream inf;
-  char buf[80];
-
-  outf.open("test1.txt.gz");
-  outf << "The quick brown fox sidestepped the lazy canine\n"
-       << 1.3 << "\nPlan " << 9 << std::endl;
-  outf.close();
-  std::cout << "Wrote the following message to 'test1.txt.gz' (check with zcat or zless):\n"
-            << "The quick brown fox sidestepped the lazy canine\n"
-            << 1.3 << "\nPlan " << 9 << std::endl;
-
-  std::cout << "\nReading 'test1.txt.gz' (buffered) produces:\n";
-  inf.open("test1.txt.gz");
-  while (inf.getline(buf,80,'\n')) {
-    std::cout << buf << "\t(" << inf.rdbuf()->in_avail() << " chars left in buffer)\n";
-  }
-  inf.close();
-
-  outf.rdbuf()->pubsetbuf(0,0);
-  outf.open("test2.txt.gz");
-  outf << setcompression(Z_NO_COMPRESSION)
-       << "The quick brown fox sidestepped the lazy canine\n"
-       << 1.3 << "\nPlan " << 9 << std::endl;
-  outf.close();
-  std::cout << "\nWrote the same message to 'test2.txt.gz' in uncompressed form";
-
-  std::cout << "\nReading 'test2.txt.gz' (unbuffered) produces:\n";
-  inf.rdbuf()->pubsetbuf(0,0);
-  inf.open("test2.txt.gz");
-  while (inf.getline(buf,80,'\n')) {
-    std::cout << buf << "\t(" << inf.rdbuf()->in_avail() << " chars left in buffer)\n";
-  }
-  inf.close();
-
-  return 0;
-
-}
Index: trunk/minix/lib/zlib-1.2.3/contrib/iostream3/zfstream.cc
===================================================================
--- trunk/minix/lib/zlib-1.2.3/contrib/iostream3/zfstream.cc	(revision 9)
+++ 	(revision )
@@ -1,479 +1,0 @@
-/*
- * A C++ I/O streams interface to the zlib gz* functions
- *
- * by Ludwig Schwardt <schwardt@sun.ac.za>
- * original version by Kevin Ruland <kevin@rodin.wustl.edu>
- *
- * This version is standard-compliant and compatible with gcc 3.x.
- */
-
-#include "zfstream.h"
-#include <cstring>          // for strcpy, strcat, strlen (mode strings)
-#include <cstdio>           // for BUFSIZ
-
-// Internal buffer sizes (default and "unbuffered" versions)
-#define BIGBUFSIZE BUFSIZ
-#define SMALLBUFSIZE 1
-
-/*****************************************************************************/
-
-// Default constructor
-gzfilebuf::gzfilebuf()
-: file(NULL), io_mode(std::ios_base::openmode(0)), own_fd(false),
-  buffer(NULL), buffer_size(BIGBUFSIZE), own_buffer(true)
-{
-  // No buffers to start with
-  this->disable_buffer();
-}
-
-// Destructor
-gzfilebuf::~gzfilebuf()
-{
-  // Sync output buffer and close only if responsible for file
-  // (i.e. attached streams should be left open at this stage)
-  this->sync();
-  if (own_fd)
-    this->close();
-  // Make sure internal buffer is deallocated
-  this->disable_buffer();
-}
-
-// Set compression level and strategy
-int
-gzfilebuf::setcompression(int comp_level,
-                          int comp_strategy)
-{
-  return gzsetparams(file, comp_level, comp_strategy);
-}
-
-// Open gzipped file
-gzfilebuf*
-gzfilebuf::open(const char *name,
-                std::ios_base::openmode mode)
-{
-  // Fail if file already open
-  if (this->is_open())
-    return NULL;
-  // Don't support simultaneous read/write access (yet)
-  if ((mode & std::ios_base::in) && (mode & std::ios_base::out))
-    return NULL;
-
-  // Build mode string for gzopen and check it [27.8.1.3.2]
-  char char_mode[6] = "\0\0\0\0\0";
-  if (!this->open_mode(mode, char_mode))
-    return NULL;
-
-  // Attempt to open file
-  if ((file = gzopen(name, char_mode)) == NULL)
-    return NULL;
-
-  // On success, allocate internal buffer and set flags
-  this->enable_buffer();
-  io_mode = mode;
-  own_fd = true;
-  return this;
-}
-
-// Attach to gzipped file
-gzfilebuf*
-gzfilebuf::attach(int fd,
-                  std::ios_base::openmode mode)
-{
-  // Fail if file already open
-  if (this->is_open())
-    return NULL;
-  // Don't support simultaneous read/write access (yet)
-  if ((mode & std::ios_base::in) && (mode & std::ios_base::out))
-    return NULL;
-
-  // Build mode string for gzdopen and check it [27.8.1.3.2]
-  char char_mode[6] = "\0\0\0\0\0";
-  if (!this->open_mode(mode, char_mode))
-    return NULL;
-
-  // Attempt to attach to file
-  if ((file = gzdopen(fd, char_mode)) == NULL)
-    return NULL;
-
-  // On success, allocate internal buffer and set flags
-  this->enable_buffer();
-  io_mode = mode;
-  own_fd = false;
-  return this;
-}
-
-// Close gzipped file
-gzfilebuf*
-gzfilebuf::close()
-{
-  // Fail immediately if no file is open
-  if (!this->is_open())
-    return NULL;
-  // Assume success
-  gzfilebuf* retval = this;
-  // Attempt to sync and close gzipped file
-  if (this->sync() == -1)
-    retval = NULL;
-  if (gzclose(file) < 0)
-    retval = NULL;
-  // File is now gone anyway (postcondition [27.8.1.3.8])
-  file = NULL;
-  own_fd = false;
-  // Destroy internal buffer if it exists
-  this->disable_buffer();
-  return retval;
-}
-
-/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
-
-// Convert int open mode to mode string
-bool
-gzfilebuf::open_mode(std::ios_base::openmode mode,
-                     char* c_mode) const
-{
-  bool testb = mode & std::ios_base::binary;
-  bool testi = mode & std::ios_base::in;
-  bool testo = mode & std::ios_base::out;
-  bool testt = mode & std::ios_base::trunc;
-  bool testa = mode & std::ios_base::app;
-
-  // Check for valid flag combinations - see [27.8.1.3.2] (Table 92)
-  // Original zfstream hardcoded the compression level to maximum here...
-  // Double the time for less than 1% size improvement seems
-  // excessive though - keeping it at the default level
-  // To change back, just append "9" to the next three mode strings
-  if (!testi && testo && !testt && !testa)
-    strcpy(c_mode, "w");
-  if (!testi && testo && !testt && testa)
-    strcpy(c_mode, "a");
-  if (!testi && testo && testt && !testa)
-    strcpy(c_mode, "w");
-  if (testi && !testo && !testt && !testa)
-    strcpy(c_mode, "r");
-  // No read/write mode yet
-//  if (testi && testo && !testt && !testa)
-//    strcpy(c_mode, "r+");
-//  if (testi && testo && testt && !testa)
-//    strcpy(c_mode, "w+");
-
-  // Mode string should be empty for invalid combination of flags
-  if (strlen(c_mode) == 0)
-    return false;
-  if (testb)
-    strcat(c_mode, "b");
-  return true;
-}
-
-// Determine number of characters in internal get buffer
-std::streamsize
-gzfilebuf::showmanyc()
-{
-  // Calls to underflow will fail if file not opened for reading
-  if (!this->is_open() || !(io_mode & std::ios_base::in))
-    return -1;
-  // Make sure get area is in use
-  if (this->gptr() && (this->gptr() < this->egptr()))
-    return std::streamsize(this->egptr() - this->gptr());
-  else
-    return 0;
-}
-
-// Fill get area from gzipped file
-gzfilebuf::int_type
-gzfilebuf::underflow()
-{
-  // If something is left in the get area by chance, return it
-  // (this shouldn't normally happen, as underflow is only supposed
-  // to be called when gptr >= egptr, but it serves as error check)
-  if (this->gptr() && (this->gptr() < this->egptr()))
-    return traits_type::to_int_type(*(this->gptr()));
-
-  // If the file hasn't been opened for reading, produce error
-  if (!this->is_open() || !(io_mode & std::ios_base::in))
-    return traits_type::eof();
-
-  // Attempt to fill internal buffer from gzipped file
-  // (buffer must be guaranteed to exist...)
-  int bytes_read = gzread(file, buffer, buffer_size);
-  // Indicates error or EOF
-  if (bytes_read <= 0)
-  {
-    // Reset get area
-    this->setg(buffer, buffer, buffer);
-    return traits_type::eof();
-  }
-  // Make all bytes read from file available as get area
-  this->setg(buffer, buffer, buffer + bytes_read);
-
-  // Return next character in get area
-  return traits_type::to_int_type(*(this->gptr()));
-}
-
-// Write put area to gzipped file
-gzfilebuf::int_type
-gzfilebuf::overflow(int_type c)
-{
-  // Determine whether put area is in use
-  if (this->pbase())
-  {
-    // Double-check pointer range
-    if (this->pptr() > this->epptr() || this->pptr() < this->pbase())
-      return traits_type::eof();
-    // Add extra character to buffer if not EOF
-    if (!traits_type::eq_int_type(c, traits_type::eof()))
-    {
-      *(this->pptr()) = traits_type::to_char_type(c);
-      this->pbump(1);
-    }
-    // Number of characters to write to file
-    int bytes_to_write = this->pptr() - this->pbase();
-    // Overflow doesn't fail if nothing is to be written
-    if (bytes_to_write > 0)
-    {
-      // If the file hasn't been opened for writing, produce error
-      if (!this->is_open() || !(io_mode & std::ios_base::out))
-        return traits_type::eof();
-      // If gzipped file won't accept all bytes written to it, fail
-      if (gzwrite(file, this->pbase(), bytes_to_write) != bytes_to_write)
-        return traits_type::eof();
-      // Reset next pointer to point to pbase on success
-      this->pbump(-bytes_to_write);
-    }
-  }
-  // Write extra character to file if not EOF
-  else if (!traits_type::eq_int_type(c, traits_type::eof()))
-  {
-    // If the file hasn't been opened for writing, produce error
-    if (!this->is_open() || !(io_mode & std::ios_base::out))
-      return traits_type::eof();
-    // Impromptu char buffer (allows "unbuffered" output)
-    char_type last_char = traits_type::to_char_type(c);
-    // If gzipped file won't accept this character, fail
-    if (gzwrite(file, &last_char, 1) != 1)
-      return traits_type::eof();
-  }
-
-  // If you got here, you have succeeded (even if c was EOF)
-  // The return value should therefore be non-EOF
-  if (traits_type::eq_int_type(c, traits_type::eof()))
-    return traits_type::not_eof(c);
-  else
-    return c;
-}
-
-// Assign new buffer
-std::streambuf*
-gzfilebuf::setbuf(char_type* p,
-                  std::streamsize n)
-{
-  // First make sure stuff is sync'ed, for safety
-  if (this->sync() == -1)
-    return NULL;
-  // If buffering is turned off on purpose via setbuf(0,0), still allocate one...
-  // "Unbuffered" only really refers to put [27.8.1.4.10], while get needs at
-  // least a buffer of size 1 (very inefficient though, therefore make it bigger?)
-  // This follows from [27.5.2.4.3]/12 (gptr needs to point at something, it seems)
-  if (!p || !n)
-  {
-    // Replace existing buffer (if any) with small internal buffer
-    this->disable_buffer();
-    buffer = NULL;
-    buffer_size = 0;
-    own_buffer = true;
-    this->enable_buffer();
-  }
-  else
-  {
-    // Replace existing buffer (if any) with external buffer
-    this->disable_buffer();
-    buffer = p;
-    buffer_size = n;
-    own_buffer = false;
-    this->enable_buffer();
-  }
-  return this;
-}
-
-// Write put area to gzipped file (i.e. ensures that put area is empty)
-int
-gzfilebuf::sync()
-{
-  return traits_type::eq_int_type(this->overflow(), traits_type::eof()) ? -1 : 0;
-}
-
-/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
-
-// Allocate internal buffer
-void
-gzfilebuf::enable_buffer()
-{
-  // If internal buffer required, allocate one
-  if (own_buffer && !buffer)
-  {
-    // Check for buffered vs. "unbuffered"
-    if (buffer_size > 0)
-    {
-      // Allocate internal buffer
-      buffer = new char_type[buffer_size];
-      // Get area starts empty and will be expanded by underflow as need arises
-      this->setg(buffer, buffer, buffer);
-      // Setup entire internal buffer as put area.
-      // The one-past-end pointer actually points to the last element of the buffer,
-      // so that overflow(c) can safely add the extra character c to the sequence.
-      // These pointers remain in place for the duration of the buffer
-      this->setp(buffer, buffer + buffer_size - 1);
-    }
-    else
-    {
-      // Even in "unbuffered" case, (small?) get buffer is still required
-      buffer_size = SMALLBUFSIZE;
-      buffer = new char_type[buffer_size];
-      this->setg(buffer, buffer, buffer);
-      // "Unbuffered" means no put buffer
-      this->setp(0, 0);
-    }
-  }
-  else
-  {
-    // If buffer already allocated, reset buffer pointers just to make sure no
-    // stale chars are lying around
-    this->setg(buffer, buffer, buffer);
-    this->setp(buffer, buffer + buffer_size - 1);
-  }
-}
-
-// Destroy internal buffer
-void
-gzfilebuf::disable_buffer()
-{
-  // If internal buffer exists, deallocate it
-  if (own_buffer && buffer)
-  {
-    // Preserve unbuffered status by zeroing size
-    if (!this->pbase())
-      buffer_size = 0;
-    delete[] buffer;
-    buffer = NULL;
-    this->setg(0, 0, 0);
-    this->setp(0, 0);
-  }
-  else
-  {
-    // Reset buffer pointers to initial state if external buffer exists
-    this->setg(buffer, buffer, buffer);
-    if (buffer)
-      this->setp(buffer, buffer + buffer_size - 1);
-    else
-      this->setp(0, 0);
-  }
-}
-
-/*****************************************************************************/
-
-// Default constructor initializes stream buffer
-gzifstream::gzifstream()
-: std::istream(NULL), sb()
-{ this->init(&sb); }
-
-// Initialize stream buffer and open file
-gzifstream::gzifstream(const char* name,
-                       std::ios_base::openmode mode)
-: std::istream(NULL), sb()
-{
-  this->init(&sb);
-  this->open(name, mode);
-}
-
-// Initialize stream buffer and attach to file
-gzifstream::gzifstream(int fd,
-                       std::ios_base::openmode mode)
-: std::istream(NULL), sb()
-{
-  this->init(&sb);
-  this->attach(fd, mode);
-}
-
-// Open file and go into fail() state if unsuccessful
-void
-gzifstream::open(const char* name,
-                 std::ios_base::openmode mode)
-{
-  if (!sb.open(name, mode | std::ios_base::in))
-    this->setstate(std::ios_base::failbit);
-  else
-    this->clear();
-}
-
-// Attach to file and go into fail() state if unsuccessful
-void
-gzifstream::attach(int fd,
-                   std::ios_base::openmode mode)
-{
-  if (!sb.attach(fd, mode | std::ios_base::in))
-    this->setstate(std::ios_base::failbit);
-  else
-    this->clear();
-}
-
-// Close file
-void
-gzifstream::close()
-{
-  if (!sb.close())
-    this->setstate(std::ios_base::failbit);
-}
-
-/*****************************************************************************/
-
-// Default constructor initializes stream buffer
-gzofstream::gzofstream()
-: std::ostream(NULL), sb()
-{ this->init(&sb); }
-
-// Initialize stream buffer and open file
-gzofstream::gzofstream(const char* name,
-                       std::ios_base::openmode mode)
-: std::ostream(NULL), sb()
-{
-  this->init(&sb);
-  this->open(name, mode);
-}
-
-// Initialize stream buffer and attach to file
-gzofstream::gzofstream(int fd,
-                       std::ios_base::openmode mode)
-: std::ostream(NULL), sb()
-{
-  this->init(&sb);
-  this->attach(fd, mode);
-}
-
-// Open file and go into fail() state if unsuccessful
-void
-gzofstream::open(const char* name,
-                 std::ios_base::openmode mode)
-{
-  if (!sb.open(name, mode | std::ios_base::out))
-    this->setstate(std::ios_base::failbit);
-  else
-    this->clear();
-}
-
-// Attach to file and go into fail() state if unsuccessful
-void
-gzofstream::attach(int fd,
-                   std::ios_base::openmode mode)
-{
-  if (!sb.attach(fd, mode | std::ios_base::out))
-    this->setstate(std::ios_base::failbit);
-  else
-    this->clear();
-}
-
-// Close file
-void
-gzofstream::close()
-{
-  if (!sb.close())
-    this->setstate(std::ios_base::failbit);
-}
Index: trunk/minix/lib/zlib-1.2.3/contrib/iostream3/zfstream.h
===================================================================
--- trunk/minix/lib/zlib-1.2.3/contrib/iostream3/zfstream.h	(revision 9)
+++ 	(revision )
@@ -1,466 +1,0 @@
-/*
- * A C++ I/O streams interface to the zlib gz* functions
- *
- * by Ludwig Schwardt <schwardt@sun.ac.za>
- * original version by Kevin Ruland <kevin@rodin.wustl.edu>
- *
- * This version is standard-compliant and compatible with gcc 3.x.
- */
-
-#ifndef ZFSTREAM_H
-#define ZFSTREAM_H
-
-#include <istream>  // not iostream, since we don't need cin/cout
-#include <ostream>
-#include "zlib.h"
-
-/*****************************************************************************/
-
-/**
- *  @brief  Gzipped file stream buffer class.
- *
- *  This class implements basic_filebuf for gzipped files. It doesn't yet support
- *  seeking (allowed by zlib but slow/limited), putback and read/write access
- *  (tricky). Otherwise, it attempts to be a drop-in replacement for the standard
- *  file streambuf.
-*/
-class gzfilebuf : public std::streambuf
-{
-public:
-  //  Default constructor.
-  gzfilebuf();
-
-  //  Destructor.
-  virtual
-  ~gzfilebuf();
-
-  /**
-   *  @brief  Set compression level and strategy on the fly.
-   *  @param  comp_level  Compression level (see zlib.h for allowed values)
-   *  @param  comp_strategy  Compression strategy (see zlib.h for allowed values)
-   *  @return  Z_OK on success, Z_STREAM_ERROR otherwise.
-   *
-   *  Unfortunately, these parameters cannot be modified separately, as the
-   *  previous zfstream version assumed. Since the strategy is seldom changed,
-   *  it can default and setcompression(level) then becomes like the old
-   *  setcompressionlevel(level).
-  */
-  int
-  setcompression(int comp_level,
-                 int comp_strategy = Z_DEFAULT_STRATEGY);
-
-  /**
-   *  @brief  Check if file is open.
-   *  @return  True if file is open.
-  */
-  bool
-  is_open() const { return (file != NULL); }
-
-  /**
-   *  @brief  Open gzipped file.
-   *  @param  name  File name.
-   *  @param  mode  Open mode flags.
-   *  @return  @c this on success, NULL on failure.
-  */
-  gzfilebuf*
-  open(const char* name,
-       std::ios_base::openmode mode);
-
-  /**
-   *  @brief  Attach to already open gzipped file.
-   *  @param  fd  File descriptor.
-   *  @param  mode  Open mode flags.
-   *  @return  @c this on success, NULL on failure.
-  */
-  gzfilebuf*
-  attach(int fd,
-         std::ios_base::openmode mode);
-
-  /**
-   *  @brief  Close gzipped file.
-   *  @return  @c this on success, NULL on failure.
-  */
-  gzfilebuf*
-  close();
-
-protected:
-  /**
-   *  @brief  Convert ios open mode int to mode string used by zlib.
-   *  @return  True if valid mode flag combination.
-  */
-  bool
-  open_mode(std::ios_base::openmode mode,
-            char* c_mode) const;
-
-  /**
-   *  @brief  Number of characters available in stream buffer.
-   *  @return  Number of characters.
-   *
-   *  This indicates number of characters in get area of stream buffer.
-   *  These characters can be read without accessing the gzipped file.
-  */
-  virtual std::streamsize
-  showmanyc();
-
-  /**
-   *  @brief  Fill get area from gzipped file.
-   *  @return  First character in get area on success, EOF on error.
-   *
-   *  This actually reads characters from gzipped file to stream
-   *  buffer. Always buffered.
-  */
-  virtual int_type
-  underflow();
-
-  /**
-   *  @brief  Write put area to gzipped file.
-   *  @param  c  Extra character to add to buffer contents.
-   *  @return  Non-EOF on success, EOF on error.
-   *
-   *  This actually writes characters in stream buffer to
-   *  gzipped file. With unbuffered output this is done one
-   *  character at a time.
-  */
-  virtual int_type
-  overflow(int_type c = traits_type::eof());
-
-  /**
-   *  @brief  Installs external stream buffer.
-   *  @param  p  Pointer to char buffer.
-   *  @param  n  Size of external buffer.
-   *  @return  @c this on success, NULL on failure.
-   *
-   *  Call setbuf(0,0) to enable unbuffered output.
-  */
-  virtual std::streambuf*
-  setbuf(char_type* p,
-         std::streamsize n);
-
-  /**
-   *  @brief  Flush stream buffer to file.
-   *  @return  0 on success, -1 on error.
-   *
-   *  This calls underflow(EOF) to do the job.
-  */
-  virtual int
-  sync();
-
-//
-// Some future enhancements
-//
-//  virtual int_type uflow();
-//  virtual int_type pbackfail(int_type c = traits_type::eof());
-//  virtual pos_type
-//  seekoff(off_type off,
-//          std::ios_base::seekdir way,
-//          std::ios_base::openmode mode = std::ios_base::in|std::ios_base::out);
-//  virtual pos_type
-//  seekpos(pos_type sp,
-//          std::ios_base::openmode mode = std::ios_base::in|std::ios_base::out);
-
-private:
-  /**
-   *  @brief  Allocate internal buffer.
-   *
-   *  This function is safe to call multiple times. It will ensure
-   *  that a proper internal buffer exists if it is required. If the
-   *  buffer already exists or is external, the buffer pointers will be
-   *  reset to their original state.
-  */
-  void
-  enable_buffer();
-
-  /**
-   *  @brief  Destroy internal buffer.
-   *
-   *  This function is safe to call multiple times. It will ensure
-   *  that the internal buffer is deallocated if it exists. In any
-   *  case, it will also reset the buffer pointers.
-  */
-  void
-  disable_buffer();
-
-  /**
-   *  Underlying file pointer.
-  */
-  gzFile file;
-
-  /**
-   *  Mode in which file was opened.
-  */
-  std::ios_base::openmode io_mode;
-
-  /**
-   *  @brief  True if this object owns file descriptor.
-   *
-   *  This makes the class responsible for closing the file
-   *  upon destruction.
-  */
-  bool own_fd;
-
-  /**
-   *  @brief  Stream buffer.
-   *
-   *  For simplicity this remains allocated on the free store for the
-   *  entire life span of the gzfilebuf object, unless replaced by setbuf.
-  */
-  char_type* buffer;
-
-  /**
-   *  @brief  Stream buffer size.
-   *
-   *  Defaults to system default buffer size (typically 8192 bytes).
-   *  Modified by setbuf.
-  */
-  std::streamsize buffer_size;
-
-  /**
-   *  @brief  True if this object owns stream buffer.
-   *
-   *  This makes the class responsible for deleting the buffer
-   *  upon destruction.
-  */
-  bool own_buffer;
-};
-
-/*****************************************************************************/
-
-/**
- *  @brief  Gzipped file input stream class.
- *
- *  This class implements ifstream for gzipped files. Seeking and putback
- *  is not supported yet.
-*/
-class gzifstream : public std::istream
-{
-public:
-  //  Default constructor
-  gzifstream();
-
-  /**
-   *  @brief  Construct stream on gzipped file to be opened.
-   *  @param  name  File name.
-   *  @param  mode  Open mode flags (forced to contain ios::in).
-  */
-  explicit
-  gzifstream(const char* name,
-             std::ios_base::openmode mode = std::ios_base::in);
-
-  /**
-   *  @brief  Construct stream on already open gzipped file.
-   *  @param  fd    File descriptor.
-   *  @param  mode  Open mode flags (forced to contain ios::in).
-  */
-  explicit
-  gzifstream(int fd,
-             std::ios_base::openmode mode = std::ios_base::in);
-
-  /**
-   *  Obtain underlying stream buffer.
-  */
-  gzfilebuf*
-  rdbuf() const
-  { return const_cast<gzfilebuf*>(&sb); }
-
-  /**
-   *  @brief  Check if file is open.
-   *  @return  True if file is open.
-  */
-  bool
-  is_open() { return sb.is_open(); }
-
-  /**
-   *  @brief  Open gzipped file.
-   *  @param  name  File name.
-   *  @param  mode  Open mode flags (forced to contain ios::in).
-   *
-   *  Stream will be in state good() if file opens successfully;
-   *  otherwise in state fail(). This differs from the behavior of
-   *  ifstream, which never sets the state to good() and therefore
-   *  won't allow you to reuse the stream for a second file unless
-   *  you manually clear() the state. The choice is a matter of
-   *  convenience.
-  */
-  void
-  open(const char* name,
-       std::ios_base::openmode mode = std::ios_base::in);
-
-  /**
-   *  @brief  Attach to already open gzipped file.
-   *  @param  fd  File descriptor.
-   *  @param  mode  Open mode flags (forced to contain ios::in).
-   *
-   *  Stream will be in state good() if attach succeeded; otherwise
-   *  in state fail().
-  */
-  void
-  attach(int fd,
-         std::ios_base::openmode mode = std::ios_base::in);
-
-  /**
-   *  @brief  Close gzipped file.
-   *
-   *  Stream will be in state fail() if close failed.
-  */
-  void
-  close();
-
-private:
-  /**
-   *  Underlying stream buffer.
-  */
-  gzfilebuf sb;
-};
-
-/*****************************************************************************/
-
-/**
- *  @brief  Gzipped file output stream class.
- *
- *  This class implements ofstream for gzipped files. Seeking and putback
- *  is not supported yet.
-*/
-class gzofstream : public std::ostream
-{
-public:
-  //  Default constructor
-  gzofstream();
-
-  /**
-   *  @brief  Construct stream on gzipped file to be opened.
-   *  @param  name  File name.
-   *  @param  mode  Open mode flags (forced to contain ios::out).
-  */
-  explicit
-  gzofstream(const char* name,
-             std::ios_base::openmode mode = std::ios_base::out);
-
-  /**
-   *  @brief  Construct stream on already open gzipped file.
-   *  @param  fd    File descriptor.
-   *  @param  mode  Open mode flags (forced to contain ios::out).
-  */
-  explicit
-  gzofstream(int fd,
-             std::ios_base::openmode mode = std::ios_base::out);
-
-  /**
-   *  Obtain underlying stream buffer.
-  */
-  gzfilebuf*
-  rdbuf() const
-  { return const_cast<gzfilebuf*>(&sb); }
-
-  /**
-   *  @brief  Check if file is open.
-   *  @return  True if file is open.
-  */
-  bool
-  is_open() { return sb.is_open(); }
-
-  /**
-   *  @brief  Open gzipped file.
-   *  @param  name  File name.
-   *  @param  mode  Open mode flags (forced to contain ios::out).
-   *
-   *  Stream will be in state good() if file opens successfully;
-   *  otherwise in state fail(). This differs from the behavior of
-   *  ofstream, which never sets the state to good() and therefore
-   *  won't allow you to reuse the stream for a second file unless
-   *  you manually clear() the state. The choice is a matter of
-   *  convenience.
-  */
-  void
-  open(const char* name,
-       std::ios_base::openmode mode = std::ios_base::out);
-
-  /**
-   *  @brief  Attach to already open gzipped file.
-   *  @param  fd  File descriptor.
-   *  @param  mode  Open mode flags (forced to contain ios::out).
-   *
-   *  Stream will be in state good() if attach succeeded; otherwise
-   *  in state fail().
-  */
-  void
-  attach(int fd,
-         std::ios_base::openmode mode = std::ios_base::out);
-
-  /**
-   *  @brief  Close gzipped file.
-   *
-   *  Stream will be in state fail() if close failed.
-  */
-  void
-  close();
-
-private:
-  /**
-   *  Underlying stream buffer.
-  */
-  gzfilebuf sb;
-};
-
-/*****************************************************************************/
-
-/**
- *  @brief  Gzipped file output stream manipulator class.
- *
- *  This class defines a two-argument manipulator for gzofstream. It is used
- *  as base for the setcompression(int,int) manipulator.
-*/
-template<typename T1, typename T2>
-  class gzomanip2
-  {
-  public:
-    // Allows insertor to peek at internals
-    template <typename Ta, typename Tb>
-      friend gzofstream&
-      operator<<(gzofstream&,
-                 const gzomanip2<Ta,Tb>&);
-
-    // Constructor
-    gzomanip2(gzofstream& (*f)(gzofstream&, T1, T2),
-              T1 v1,
-              T2 v2);
-  private:
-    // Underlying manipulator function
-    gzofstream&
-    (*func)(gzofstream&, T1, T2);
-
-    // Arguments for manipulator function
-    T1 val1;
-    T2 val2;
-  };
-
-/*****************************************************************************/
-
-// Manipulator function thunks through to stream buffer
-inline gzofstream&
-setcompression(gzofstream &gzs, int l, int s = Z_DEFAULT_STRATEGY)
-{
-  (gzs.rdbuf())->setcompression(l, s);
-  return gzs;
-}
-
-// Manipulator constructor stores arguments
-template<typename T1, typename T2>
-  inline
-  gzomanip2<T1,T2>::gzomanip2(gzofstream &(*f)(gzofstream &, T1, T2),
-                              T1 v1,
-                              T2 v2)
-  : func(f), val1(v1), val2(v2)
-  { }
-
-// Insertor applies underlying manipulator function to stream
-template<typename T1, typename T2>
-  inline gzofstream&
-  operator<<(gzofstream& s, const gzomanip2<T1,T2>& m)
-  { return (*m.func)(s, m.val1, m.val2); }
-
-// Insert this onto stream to simplify setting of compression level
-inline gzomanip2<int,int>
-setcompression(int l, int s = Z_DEFAULT_STRATEGY)
-{ return gzomanip2<int,int>(&setcompression, l, s); }
-
-#endif // ZFSTREAM_H
Index: trunk/minix/lib/zlib-1.2.3/contrib/masm686/match.asm
===================================================================
--- trunk/minix/lib/zlib-1.2.3/contrib/masm686/match.asm	(revision 9)
+++ 	(revision )
@@ -1,413 +1,0 @@
-
-; match.asm -- Pentium-Pro optimized version of longest_match()
-;
-; Updated for zlib 1.1.3 and converted to MASM 6.1x
-; Copyright (C) 2000 Dan Higdon <hdan@kinesoft.com>
-;                    and Chuck Walbourn <chuckw@kinesoft.com>
-; Corrections by Cosmin Truta <cosmint@cs.ubbcluj.ro>
-;
-; This is free software; you can redistribute it and/or modify it
-; under the terms of the GNU General Public License.
-
-; Based on match.S
-; Written for zlib 1.1.2
-; Copyright (C) 1998 Brian Raiter <breadbox@muppetlabs.com>
-;
-; Modified by Gilles Vollant (2005) for add gzhead and gzindex
-
-	.686P
-	.MODEL	FLAT
-
-;===========================================================================
-; EQUATES
-;===========================================================================
-
-MAX_MATCH	EQU 258
-MIN_MATCH	EQU 3
-MIN_LOOKAHEAD	EQU (MAX_MATCH + MIN_MATCH + 1)
-MAX_MATCH_8	EQU ((MAX_MATCH + 7) AND (NOT 7))
-
-;===========================================================================
-; STRUCTURES
-;===========================================================================
-
-; This STRUCT assumes a 4-byte alignment
-
-DEFLATE_STATE	STRUCT
-ds_strm			dd ?
-ds_status		dd ?
-ds_pending_buf		dd ?
-ds_pending_buf_size	dd ?
-ds_pending_out		dd ?
-ds_pending		dd ?
-ds_wrap			dd ?
-; gzhead and gzindex are added in zlib 1.2.2.2 (see deflate.h)
-ds_gzhead               dd ?
-ds_gzindex              dd ?
-ds_data_type		db ?
-ds_method		db ?
-			db ?	; padding
-			db ?	; padding
-ds_last_flush		dd ?
-ds_w_size		dd ?	; used
-ds_w_bits		dd ?
-ds_w_mask		dd ?	; used
-ds_window		dd ?	; used
-ds_window_size		dd ?
-ds_prev			dd ?	; used
-ds_head			dd ?
-ds_ins_h		dd ?
-ds_hash_size		dd ?
-ds_hash_bits		dd ?
-ds_hash_mask		dd ?
-ds_hash_shift		dd ?
-ds_block_start		dd ?
-ds_match_length		dd ?	; used
-ds_prev_match		dd ?	; used
-ds_match_available	dd ?
-ds_strstart		dd ?	; used
-ds_match_start		dd ?	; used
-ds_lookahead		dd ?	; used
-ds_prev_length		dd ?	; used
-ds_max_chain_length	dd ?	; used
-ds_max_laxy_match	dd ?
-ds_level		dd ?
-ds_strategy		dd ?
-ds_good_match		dd ?	; used
-ds_nice_match		dd ?	; used
-
-; Don't need anymore of the struct for match
-DEFLATE_STATE	ENDS
-
-;===========================================================================
-; CODE
-;===========================================================================
-_TEXT	SEGMENT
-
-;---------------------------------------------------------------------------
-; match_init
-;---------------------------------------------------------------------------
-	ALIGN	4
-PUBLIC	_match_init
-_match_init	PROC
-	; no initialization needed
-	ret
-_match_init	ENDP
-
-;---------------------------------------------------------------------------
-; uInt longest_match(deflate_state *deflatestate, IPos curmatch)
-;---------------------------------------------------------------------------
-	ALIGN	4
-
-PUBLIC	_longest_match
-_longest_match	PROC
-
-; Since this code uses EBP for a scratch register, the stack frame must
-; be manually constructed and referenced relative to the ESP register.
-
-; Stack image
-; Variables
-chainlenwmask	=  0	; high word: current chain len
-			; low word: s->wmask
-window		=  4	; local copy of s->window
-windowbestlen	=  8	; s->window + bestlen
-scanend		= 12	; last two bytes of string
-scanstart	= 16	; first two bytes of string
-scanalign	= 20	; dword-misalignment of string
-nicematch	= 24	; a good enough match size
-bestlen		= 28	; size of best match so far
-scan		= 32	; ptr to string wanting match
-varsize		= 36	; number of bytes (also offset to last saved register)
-
-; Saved Registers (actually pushed into place)
-ebx_save	= 36
-edi_save	= 40
-esi_save	= 44
-ebp_save	= 48
-
-; Parameters
-retaddr		= 52
-deflatestate	= 56
-curmatch	= 60
-
-; Save registers that the compiler may be using
-	push	ebp
-	push	edi
-	push	esi
-	push	ebx
-
-; Allocate local variable space
-	sub	esp,varsize
-
-; Retrieve the function arguments. ecx will hold cur_match
-; throughout the entire function. edx will hold the pointer to the
-; deflate_state structure during the function's setup (before
-; entering the main loop).
-
-	mov	edx, [esp+deflatestate]
-ASSUME	edx:PTR DEFLATE_STATE
-
-	mov	ecx, [esp+curmatch]
-
-; uInt wmask = s->w_mask;
-; unsigned chain_length = s->max_chain_length;
-; if (s->prev_length >= s->good_match) {
-;     chain_length >>= 2;
-; }
-
-	mov	eax, [edx].ds_prev_length
-	mov	ebx, [edx].ds_good_match
-	cmp	eax, ebx
-	mov	eax, [edx].ds_w_mask
-	mov	ebx, [edx].ds_max_chain_length
-	jl	SHORT LastMatchGood
-	shr	ebx, 2
-LastMatchGood:
-
-; chainlen is decremented once beforehand so that the function can
-; use the sign flag instead of the zero flag for the exit test.
-; It is then shifted into the high word, to make room for the wmask
-; value, which it will always accompany.
-
-	dec	ebx
-	shl	ebx, 16
-	or	ebx, eax
-	mov	[esp+chainlenwmask], ebx
-
-; if ((uInt)nice_match > s->lookahead) nice_match = s->lookahead;
-
-	mov	eax, [edx].ds_nice_match
-	mov	ebx, [edx].ds_lookahead
-	cmp	ebx, eax
-	jl	SHORT LookaheadLess
-	mov	ebx, eax
-LookaheadLess:
-	mov	[esp+nicematch], ebx
-
-;/* register Bytef *scan = s->window + s->strstart;                     */
-
-	mov	esi, [edx].ds_window
-	mov	[esp+window], esi
-	mov	ebp, [edx].ds_strstart
-	lea	edi, [esi+ebp]
-	mov	[esp+scan],edi
-
-;/* Determine how many bytes the scan ptr is off from being             */
-;/* dword-aligned.                                                      */
-
-	mov	eax, edi
-	neg	eax
-	and	eax, 3
-	mov	[esp+scanalign], eax
-
-;/* IPos limit = s->strstart > (IPos)MAX_DIST(s) ?                      */
-;/*     s->strstart - (IPos)MAX_DIST(s) : NIL;                          */
-
-	mov	eax, [edx].ds_w_size
-	sub	eax, MIN_LOOKAHEAD
-	sub	ebp, eax
-	jg	SHORT LimitPositive
-	xor	ebp, ebp
-LimitPositive:
-
-;/* int best_len = s->prev_length;                                      */
-
-	mov	eax, [edx].ds_prev_length
-	mov	[esp+bestlen], eax
-
-;/* Store the sum of s->window + best_len in %esi locally, and in %esi. */
-
-	add	esi, eax
-	mov	[esp+windowbestlen], esi
-
-;/* register ush scan_start = *(ushf*)scan;                             */
-;/* register ush scan_end   = *(ushf*)(scan+best_len-1);                */
-;/* Posf *prev = s->prev;                                               */
-
-	movzx	ebx, WORD PTR[edi]
-	mov	[esp+scanstart], ebx
-	movzx	ebx, WORD PTR[eax+edi-1]
-	mov	[esp+scanend], ebx
-	mov	edi, [edx].ds_prev
-
-;/* Jump into the main loop.                                            */
-
-	mov	edx, [esp+chainlenwmask]
-	jmp	SHORT LoopEntry
-
-;/* do {
-; *     match = s->window + cur_match;
-; *     if (*(ushf*)(match+best_len-1) != scan_end ||
-; *         *(ushf*)match != scan_start) continue;
-; *     [...]
-; * } while ((cur_match = prev[cur_match & wmask]) > limit
-; *          && --chain_length != 0);
-; *
-; * Here is the inner loop of the function. The function will spend the
-; * majority of its time in this loop, and majority of that time will
-; * be spent in the first ten instructions.
-; *
-; * Within this loop:
-; * %ebx = scanend
-; * %ecx = curmatch
-; * %edx = chainlenwmask - i.e., ((chainlen << 16) | wmask)
-; * %esi = windowbestlen - i.e., (window + bestlen)
-; * %edi = prev
-; * %ebp = limit
-; */
-
-	ALIGN	4
-LookupLoop:
-	and	ecx, edx
-	movzx	ecx, WORD PTR[edi+ecx*2]
-	cmp	ecx, ebp
-	jbe	LeaveNow
-	sub	edx, 000010000H
-	js	LeaveNow
-
-LoopEntry:
-	movzx	eax, WORD PTR[esi+ecx-1]
-	cmp	eax, ebx
-	jnz	SHORT LookupLoop
-
-	mov	eax, [esp+window]
-	movzx	eax, WORD PTR[eax+ecx]
-	cmp	eax, [esp+scanstart]
-	jnz	SHORT LookupLoop
-
-;/* Store the current value of chainlen.                                */
-
-	mov	[esp+chainlenwmask], edx
-
-;/* Point %edi to the string under scrutiny, and %esi to the string we  */
-;/* are hoping to match it up with. In actuality, %esi and %edi are     */
-;/* both pointed (MAX_MATCH_8 - scanalign) bytes ahead, and %edx is     */
-;/* initialized to -(MAX_MATCH_8 - scanalign).                          */
-
-	mov	esi, [esp+window]
-	mov	edi, [esp+scan]
-	add	esi, ecx
-	mov	eax, [esp+scanalign]
-	mov	edx, -MAX_MATCH_8
-	lea	edi, [edi+eax+MAX_MATCH_8]
-	lea	esi, [esi+eax+MAX_MATCH_8]
-
-;/* Test the strings for equality, 8 bytes at a time. At the end,
-; * adjust %edx so that it is offset to the exact byte that mismatched.
-; *
-; * We already know at this point that the first three bytes of the
-; * strings match each other, and they can be safely passed over before
-; * starting the compare loop. So what this code does is skip over 0-3
-; * bytes, as much as necessary in order to dword-align the %edi
-; * pointer. (%esi will still be misaligned three times out of four.)
-; *
-; * It should be confessed that this loop usually does not represent
-; * much of the total running time. Replacing it with a more
-; * straightforward "rep cmpsb" would not drastically degrade
-; * performance.
-; */
-
-LoopCmps:
-	mov	eax, DWORD PTR[esi+edx]
-	xor	eax, DWORD PTR[edi+edx]
-	jnz	SHORT LeaveLoopCmps
-
-	mov	eax, DWORD PTR[esi+edx+4]
-	xor	eax, DWORD PTR[edi+edx+4]
-	jnz	SHORT LeaveLoopCmps4
-
-	add	edx, 8
-	jnz	SHORT LoopCmps
-	jmp	LenMaximum
-	ALIGN	4
-
-LeaveLoopCmps4:
-	add	edx, 4
-
-LeaveLoopCmps:
-	test	eax, 00000FFFFH
-	jnz	SHORT LenLower
-
-	add	edx, 2
-	shr	eax, 16
-
-LenLower:
-	sub	al, 1
-	adc	edx, 0
-
-;/* Calculate the length of the match. If it is longer than MAX_MATCH,  */
-;/* then automatically accept it as the best possible match and leave.  */
-
-	lea	eax, [edi+edx]
-	mov	edi, [esp+scan]
-	sub	eax, edi
-	cmp	eax, MAX_MATCH
-	jge	SHORT LenMaximum
-
-;/* If the length of the match is not longer than the best match we     */
-;/* have so far, then forget it and return to the lookup loop.          */
-
-	mov	edx, [esp+deflatestate]
-	mov	ebx, [esp+bestlen]
-	cmp	eax, ebx
-	jg	SHORT LongerMatch
-	mov	esi, [esp+windowbestlen]
-	mov	edi, [edx].ds_prev
-	mov	ebx, [esp+scanend]
-	mov	edx, [esp+chainlenwmask]
-	jmp	LookupLoop
-	ALIGN	4
-
-;/*         s->match_start = cur_match;                                 */
-;/*         best_len = len;                                             */
-;/*         if (len >= nice_match) break;                               */
-;/*         scan_end = *(ushf*)(scan+best_len-1);                       */
-
-LongerMatch:
-	mov	ebx, [esp+nicematch]
-	mov	[esp+bestlen], eax
-	mov	[edx].ds_match_start, ecx
-	cmp	eax, ebx
-	jge	SHORT LeaveNow
-	mov	esi, [esp+window]
-	add	esi, eax
-	mov	[esp+windowbestlen], esi
-	movzx	ebx, WORD PTR[edi+eax-1]
-	mov	edi, [edx].ds_prev
-	mov	[esp+scanend], ebx
-	mov	edx, [esp+chainlenwmask]
-	jmp	LookupLoop
-	ALIGN	4
-
-;/* Accept the current string, with the maximum possible length.        */
-
-LenMaximum:
-	mov	edx, [esp+deflatestate]
-	mov	DWORD PTR[esp+bestlen], MAX_MATCH
-	mov	[edx].ds_match_start, ecx
-
-;/* if ((uInt)best_len <= s->lookahead) return (uInt)best_len;          */
-;/* return s->lookahead;                                                */
-
-LeaveNow:
-	mov	edx, [esp+deflatestate]
-	mov	ebx, [esp+bestlen]
-	mov	eax, [edx].ds_lookahead
-	cmp	ebx, eax
-	jg	SHORT LookaheadRet
-	mov	eax, ebx
-LookaheadRet:
-
-; Restore the stack and return from whence we came.
-
-	add	esp, varsize
-	pop	ebx
-	pop	esi
-	pop	edi
-	pop	ebp
-	ret
-
-_longest_match	ENDP
-
-_TEXT	ENDS
-END
Index: trunk/minix/lib/zlib-1.2.3/contrib/masmx64/bld_ml64.bat
===================================================================
--- trunk/minix/lib/zlib-1.2.3/contrib/masmx64/bld_ml64.bat	(revision 9)
+++ 	(revision )
@@ -1,2 +1,0 @@
-ml64.exe /Flinffasx64 /c /Zi inffasx64.asm
-ml64.exe /Flgvmat64   /c /Zi gvmat64.asm
Index: trunk/minix/lib/zlib-1.2.3/contrib/masmx64/gvmat64.asm
===================================================================
--- trunk/minix/lib/zlib-1.2.3/contrib/masmx64/gvmat64.asm	(revision 9)
+++ 	(revision )
@@ -1,513 +1,0 @@
-;uInt longest_match_x64(
-;    deflate_state *s,
-;    IPos cur_match);                             /* current match */
-
-; gvmat64.asm -- Asm portion of the optimized longest_match for 32 bits x86
-; Copyright (C) 1995-2005 Jean-loup Gailly, Brian Raiter and Gilles Vollant.
-;
-; File written by Gilles Vollant, by converting to assembly the longest_match
-;  from Jean-loup Gailly in deflate.c of zLib and infoZip zip.
-;
-;  and by taking inspiration on asm686 with masm, optimised assembly code
-;        from Brian Raiter, written 1998
-;
-;         http://www.zlib.net
-;         http://www.winimage.com/zLibDll
-;         http://www.muppetlabs.com/~breadbox/software/assembly.html
-;
-; to compile this file for infozip Zip, I use option:
-;   ml64.exe /Flgvmat64 /c /Zi /DINFOZIP gvmat64.asm
-;
-; to compile this file for zLib, I use option:
-;   ml64.exe /Flgvmat64 /c /Zi gvmat64.asm
-; Be carrefull to adapt zlib1222add below to your version of zLib
-;   (if you use a version of zLib before 1.0.4 or after 1.2.2.2, change
-;    value of zlib1222add later)
-;
-; This file compile with Microsoft Macro Assembler (x64) for AMD64
-;
-;   ml64.exe is given with Visual Studio 2005 and Windows 2003 server DDK
-;
-;   (you can get Windows 2003 server DDK with ml64 and cl for AMD64 from
-;      http://www.microsoft.com/whdc/devtools/ddk/default.mspx for low price)
-;
-
-
-;uInt longest_match(s, cur_match)
-;    deflate_state *s;
-;    IPos cur_match;                             /* current match */
-.code
-longest_match PROC
-
-
-;LocalVarsSize   equ 88
- LocalVarsSize   equ 72
-
-; register used : rax,rbx,rcx,rdx,rsi,rdi,r8,r9,r10,r11,r12
-; free register :  r14,r15
-; register can be saved : rsp
-
- chainlenwmask   equ  rsp + 8 - LocalVarsSize    ; high word: current chain len
-                                                 ; low word: s->wmask
-;window          equ  rsp + xx - LocalVarsSize   ; local copy of s->window ; stored in r10
-;windowbestlen   equ  rsp + xx - LocalVarsSize   ; s->window + bestlen , use r10+r11
-;scanstart       equ  rsp + xx - LocalVarsSize   ; first two bytes of string ; stored in r12w
-;scanend         equ  rsp + xx - LocalVarsSize   ; last two bytes of string use ebx
-;scanalign       equ  rsp + xx - LocalVarsSize   ; dword-misalignment of string r13
-;bestlen         equ  rsp + xx - LocalVarsSize   ; size of best match so far -> r11d
-;scan            equ  rsp + xx - LocalVarsSize   ; ptr to string wanting match -> r9
-IFDEF INFOZIP
-ELSE
- nicematch       equ  (rsp + 16 - LocalVarsSize) ; a good enough match size
-ENDIF
-
-save_rdi        equ  rsp + 24 - LocalVarsSize
-save_rsi        equ  rsp + 32 - LocalVarsSize
-save_rbx        equ  rsp + 40 - LocalVarsSize
-save_rbp        equ  rsp + 48 - LocalVarsSize
-save_r12        equ  rsp + 56 - LocalVarsSize
-save_r13        equ  rsp + 64 - LocalVarsSize
-;save_r14        equ  rsp + 72 - LocalVarsSize
-;save_r15        equ  rsp + 80 - LocalVarsSize
-
-
-
-;  all the +4 offsets are due to the addition of pending_buf_size (in zlib
-;  in the deflate_state structure since the asm code was first written
-;  (if you compile with zlib 1.0.4 or older, remove the +4).
-;  Note : these value are good with a 8 bytes boundary pack structure
-
-
-    MAX_MATCH           equ     258
-    MIN_MATCH           equ     3
-    MIN_LOOKAHEAD       equ     (MAX_MATCH+MIN_MATCH+1)
-
-
-;;; Offsets for fields in the deflate_state structure. These numbers
-;;; are calculated from the definition of deflate_state, with the
-;;; assumption that the compiler will dword-align the fields. (Thus,
-;;; changing the definition of deflate_state could easily cause this
-;;; program to crash horribly, without so much as a warning at
-;;; compile time. Sigh.)
-
-;  all the +zlib1222add offsets are due to the addition of fields
-;  in zlib in the deflate_state structure since the asm code was first written
-;  (if you compile with zlib 1.0.4 or older, use "zlib1222add equ (-4)").
-;  (if you compile with zlib between 1.0.5 and 1.2.2.1, use "zlib1222add equ 0").
-;  if you compile with zlib 1.2.2.2 or later , use "zlib1222add equ 8").
-
-
-IFDEF INFOZIP
-
-_DATA   SEGMENT
-COMM    window_size:DWORD
-; WMask ; 7fff
-COMM    window:BYTE:010040H
-COMM    prev:WORD:08000H
-; MatchLen : unused
-; PrevMatch : unused
-COMM    strstart:DWORD
-COMM    match_start:DWORD
-; Lookahead : ignore
-COMM    prev_length:DWORD ; PrevLen
-COMM    max_chain_length:DWORD
-COMM    good_match:DWORD
-COMM    nice_match:DWORD
-prev_ad equ OFFSET prev
-window_ad equ OFFSET window
-nicematch equ nice_match
-_DATA ENDS
-WMask equ 07fffh
-
-ELSE
-
-  IFNDEF zlib1222add
-    zlib1222add equ 8
-  ENDIF
-dsWSize         equ 56+zlib1222add+(zlib1222add/2)
-dsWMask         equ 64+zlib1222add+(zlib1222add/2)
-dsWindow        equ 72+zlib1222add
-dsPrev          equ 88+zlib1222add
-dsMatchLen      equ 128+zlib1222add
-dsPrevMatch     equ 132+zlib1222add
-dsStrStart      equ 140+zlib1222add
-dsMatchStart    equ 144+zlib1222add
-dsLookahead     equ 148+zlib1222add
-dsPrevLen       equ 152+zlib1222add
-dsMaxChainLen   equ 156+zlib1222add
-dsGoodMatch     equ 172+zlib1222add
-dsNiceMatch     equ 176+zlib1222add
-
-window_size     equ [ rcx + dsWSize]
-WMask           equ [ rcx + dsWMask]
-window_ad       equ [ rcx + dsWindow]
-prev_ad         equ [ rcx + dsPrev]
-strstart        equ [ rcx + dsStrStart]
-match_start     equ [ rcx + dsMatchStart]
-Lookahead       equ [ rcx + dsLookahead] ; 0ffffffffh on infozip
-prev_length     equ [ rcx + dsPrevLen]
-max_chain_length equ [ rcx + dsMaxChainLen]
-good_match      equ [ rcx + dsGoodMatch]
-nice_match      equ [ rcx + dsNiceMatch]
-ENDIF
-
-; parameter 1 in r8(deflate state s), param 2 in rdx (cur match)
-
-; see http://weblogs.asp.net/oldnewthing/archive/2004/01/14/58579.aspx and
-; http://msdn.microsoft.com/library/en-us/kmarch/hh/kmarch/64bitAMD_8e951dd2-ee77-4728-8702-55ce4b5dd24a.xml.asp
-;
-; All registers must be preserved across the call, except for
-;   rax, rcx, rdx, r8, r9, r10, and r11, which are scratch.
-
-
-
-;;; Save registers that the compiler may be using, and adjust esp to
-;;; make room for our stack frame.
-
-
-;;; Retrieve the function arguments. r8d will hold cur_match
-;;; throughout the entire function. edx will hold the pointer to the
-;;; deflate_state structure during the function's setup (before
-;;; entering the main loop.
-
-; parameter 1 in rcx (deflate_state* s), param 2 in edx -> r8 (cur match)
-
-; this clear high 32 bits of r8, which can be garbage in both r8 and rdx
-
-        mov [save_rdi],rdi
-        mov [save_rsi],rsi
-        mov [save_rbx],rbx
-        mov [save_rbp],rbp
-IFDEF INFOZIP
-        mov r8d,ecx
-ELSE
-        mov r8d,edx
-ENDIF
-        mov [save_r12],r12
-        mov [save_r13],r13
-;        mov [save_r14],r14
-;        mov [save_r15],r15
-
-
-;;; uInt wmask = s->w_mask;
-;;; unsigned chain_length = s->max_chain_length;
-;;; if (s->prev_length >= s->good_match) {
-;;;     chain_length >>= 2;
-;;; }
-
-        mov edi, prev_length
-        mov esi, good_match
-        mov eax, WMask
-        mov ebx, max_chain_length
-        cmp edi, esi
-        jl  LastMatchGood
-        shr ebx, 2
-LastMatchGood:
-
-;;; chainlen is decremented once beforehand so that the function can
-;;; use the sign flag instead of the zero flag for the exit test.
-;;; It is then shifted into the high word, to make room for the wmask
-;;; value, which it will always accompany.
-
-        dec ebx
-        shl ebx, 16
-        or  ebx, eax
-
-;;; on zlib only
-;;; if ((uInt)nice_match > s->lookahead) nice_match = s->lookahead;
-
-IFDEF INFOZIP
-        mov [chainlenwmask], ebx
-; on infozip nice_match = [nice_match]
-ELSE
-        mov eax, nice_match
-        mov [chainlenwmask], ebx
-        mov r10d, Lookahead
-        cmp r10d, eax
-        cmovnl r10d, eax
-        mov [nicematch],r10d
-ENDIF
-
-;;; register Bytef *scan = s->window + s->strstart;
-        mov r10, window_ad
-        mov ebp, strstart
-        lea r13, [r10 + rbp]
-
-;;; Determine how many bytes the scan ptr is off from being
-;;; dword-aligned.
-
-         mov r9,r13
-         neg r13
-         and r13,3
-
-;;; IPos limit = s->strstart > (IPos)MAX_DIST(s) ?
-;;;     s->strstart - (IPos)MAX_DIST(s) : NIL;
-IFDEF INFOZIP
-        mov eax,07efah ; MAX_DIST = (WSIZE-MIN_LOOKAHEAD) (0x8000-(3+8+1))
-ELSE
-        mov eax, window_size
-        sub eax, MIN_LOOKAHEAD
-ENDIF
-        xor edi,edi
-        sub ebp, eax
-
-        mov r11d, prev_length
-
-        cmovng ebp,edi
-
-;;; int best_len = s->prev_length;
-
-
-;;; Store the sum of s->window + best_len in esi locally, and in esi.
-
-       lea  rsi,[r10+r11]
-
-;;; register ush scan_start = *(ushf*)scan;
-;;; register ush scan_end   = *(ushf*)(scan+best_len-1);
-;;; Posf *prev = s->prev;
-
-        movzx r12d,word ptr [r9]
-        movzx ebx, word ptr [r9 + r11 - 1]
-
-        mov rdi, prev_ad
-
-;;; Jump into the main loop.
-
-        mov edx, [chainlenwmask]
-
-        cmp bx,word ptr [rsi + r8 - 1]
-        jz  LookupLoopIsZero
-
-LookupLoop1:
-        and r8d, edx
-
-        movzx   r8d, word ptr [rdi + r8*2]
-        cmp r8d, ebp
-        jbe LeaveNow
-        sub edx, 00010000h
-        js  LeaveNow
-
-LoopEntry1:
-        cmp bx,word ptr [rsi + r8 - 1]
-        jz  LookupLoopIsZero
-
-LookupLoop2:
-        and r8d, edx
-
-        movzx   r8d, word ptr [rdi + r8*2]
-        cmp r8d, ebp
-        jbe LeaveNow
-        sub edx, 00010000h
-        js  LeaveNow
-
-LoopEntry2:
-        cmp bx,word ptr [rsi + r8 - 1]
-        jz  LookupLoopIsZero
-
-LookupLoop4:
-        and r8d, edx
-
-        movzx   r8d, word ptr [rdi + r8*2]
-        cmp r8d, ebp
-        jbe LeaveNow
-        sub edx, 00010000h
-        js  LeaveNow
-
-LoopEntry4:
-
-        cmp bx,word ptr [rsi + r8 - 1]
-        jnz LookupLoop1
-        jmp LookupLoopIsZero
-
-
-;;; do {
-;;;     match = s->window + cur_match;
-;;;     if (*(ushf*)(match+best_len-1) != scan_end ||
-;;;         *(ushf*)match != scan_start) continue;
-;;;     [...]
-;;; } while ((cur_match = prev[cur_match & wmask]) > limit
-;;;          && --chain_length != 0);
-;;;
-;;; Here is the inner loop of the function. The function will spend the
-;;; majority of its time in this loop, and majority of that time will
-;;; be spent in the first ten instructions.
-;;;
-;;; Within this loop:
-;;; ebx = scanend
-;;; r8d = curmatch
-;;; edx = chainlenwmask - i.e., ((chainlen << 16) | wmask)
-;;; esi = windowbestlen - i.e., (window + bestlen)
-;;; edi = prev
-;;; ebp = limit
-
-LookupLoop:
-        and r8d, edx
-
-        movzx   r8d, word ptr [rdi + r8*2]
-        cmp r8d, ebp
-        jbe LeaveNow
-        sub edx, 00010000h
-        js  LeaveNow
-
-LoopEntry:
-
-        cmp bx,word ptr [rsi + r8 - 1]
-        jnz LookupLoop1
-LookupLoopIsZero:
-        cmp     r12w, word ptr [r10 + r8]
-        jnz LookupLoop1
-
-
-;;; Store the current value of chainlen.
-        mov [chainlenwmask], edx
-
-;;; Point edi to the string under scrutiny, and esi to the string we
-;;; are hoping to match it up with. In actuality, esi and edi are
-;;; both pointed (MAX_MATCH_8 - scanalign) bytes ahead, and edx is
-;;; initialized to -(MAX_MATCH_8 - scanalign).
-
-        lea rsi,[r8+r10]
-        mov rdx, 0fffffffffffffef8h; -(MAX_MATCH_8)
-        lea rsi, [rsi + r13 + 0108h] ;MAX_MATCH_8]
-        lea rdi, [r9 + r13 + 0108h] ;MAX_MATCH_8]
-
-        prefetcht1 [rsi+rdx]
-        prefetcht1 [rdi+rdx]
-
-
-;;; Test the strings for equality, 8 bytes at a time. At the end,
-;;; adjust rdx so that it is offset to the exact byte that mismatched.
-;;;
-;;; We already know at this point that the first three bytes of the
-;;; strings match each other, and they can be safely passed over before
-;;; starting the compare loop. So what this code does is skip over 0-3
-;;; bytes, as much as necessary in order to dword-align the edi
-;;; pointer. (rsi will still be misaligned three times out of four.)
-;;;
-;;; It should be confessed that this loop usually does not represent
-;;; much of the total running time. Replacing it with a more
-;;; straightforward "rep cmpsb" would not drastically degrade
-;;; performance.
-
-
-LoopCmps:
-        mov rax, [rsi + rdx]
-        xor rax, [rdi + rdx]
-        jnz LeaveLoopCmps
-
-        mov rax, [rsi + rdx + 8]
-        xor rax, [rdi + rdx + 8]
-        jnz LeaveLoopCmps8
-
-
-        mov rax, [rsi + rdx + 8+8]
-        xor rax, [rdi + rdx + 8+8]
-        jnz LeaveLoopCmps16
-
-        add rdx,8+8+8
-
-        jmp short LoopCmps
-LeaveLoopCmps16: add rdx,8
-LeaveLoopCmps8: add rdx,8
-LeaveLoopCmps:
-
-        test    eax, 0000FFFFh
-        jnz LenLower
-
-        test eax,0ffffffffh
-
-        jnz LenLower32
-
-        add rdx,4
-        shr rax,32
-        or ax,ax
-        jnz LenLower
-
-LenLower32:
-        shr eax,16
-        add rdx,2
-LenLower:   sub al, 1
-        adc rdx, 0
-;;; Calculate the length of the match. If it is longer than MAX_MATCH,
-;;; then automatically accept it as the best possible match and leave.
-
-        lea rax, [rdi + rdx]
-        sub rax, r9
-        cmp eax, MAX_MATCH
-        jge LenMaximum
-
-;;; If the length of the match is not longer than the best match we
-;;; have so far, then forget it and return to the lookup loop.
-;///////////////////////////////////
-
-        cmp eax, r11d
-        jg  LongerMatch
-
-        lea rsi,[r10+r11]
-
-        mov rdi, prev_ad
-        mov edx, [chainlenwmask]
-        jmp LookupLoop
-
-;;;         s->match_start = cur_match;
-;;;         best_len = len;
-;;;         if (len >= nice_match) break;
-;;;         scan_end = *(ushf*)(scan+best_len-1);
-
-LongerMatch:
-        mov r11d, eax
-        mov match_start, r8d
-        cmp eax, [nicematch]
-        jge LeaveNow
-
-        lea rsi,[r10+rax]
-
-        movzx   ebx, word ptr [r9 + rax - 1]
-        mov rdi, prev_ad
-        mov edx, [chainlenwmask]
-        jmp LookupLoop
-
-;;; Accept the current string, with the maximum possible length.
-
-LenMaximum:
-        mov r11d,MAX_MATCH
-        mov match_start, r8d
-
-;;; if ((uInt)best_len <= s->lookahead) return (uInt)best_len;
-;;; return s->lookahead;
-
-LeaveNow:
-IFDEF INFOZIP
-        mov eax,r11d
-ELSE
-        mov eax, Lookahead
-        cmp r11d, eax
-        cmovng eax, r11d
-ENDIF
-
-;;; Restore the stack and return from whence we came.
-
-
-        mov rsi,[save_rsi]
-        mov rdi,[save_rdi]
-        mov rbx,[save_rbx]
-        mov rbp,[save_rbp]
-        mov r12,[save_r12]
-        mov r13,[save_r13]
-;        mov r14,[save_r14]
-;        mov r15,[save_r15]
-
-
-        ret 0
-; please don't remove this string !
-; Your can freely use gvmat64 in any free or commercial app
-; but it is far better don't remove the string in the binary!
-    db     0dh,0ah,"asm686 with masm, optimised assembly code from Brian Raiter, written 1998, converted to amd 64 by Gilles Vollant 2005",0dh,0ah,0
-longest_match   ENDP
-
-match_init PROC
-  ret 0
-match_init ENDP
-
-
-END
Index: trunk/minix/lib/zlib-1.2.3/contrib/masmx64/inffas8664.c
===================================================================
--- trunk/minix/lib/zlib-1.2.3/contrib/masmx64/inffas8664.c	(revision 9)
+++ 	(revision )
@@ -1,186 +1,0 @@
-/* inffas8664.c is a hand tuned assembler version of inffast.c - fast decoding
- * version for AMD64 on Windows using Microsoft C compiler
- *
- * Copyright (C) 1995-2003 Mark Adler
- * For conditions of distribution and use, see copyright notice in zlib.h
- *
- * Copyright (C) 2003 Chris Anderson <christop@charm.net>
- * Please use the copyright conditions above.
- *
- * 2005 - Adaptation to Microsoft C Compiler for AMD64 by Gilles Vollant
- *
- * inffas8664.c call function inffas8664fnc in inffasx64.asm
- *  inffasx64.asm is automatically convert from AMD64 portion of inffas86.c
- *
- * Dec-29-2003 -- I added AMD64 inflate asm support.  This version is also
- * slightly quicker on x86 systems because, instead of using rep movsb to copy
- * data, it uses rep movsw, which moves data in 2-byte chunks instead of single
- * bytes.  I've tested the AMD64 code on a Fedora Core 1 + the x86_64 updates
- * from http://fedora.linux.duke.edu/fc1_x86_64
- * which is running on an Athlon 64 3000+ / Gigabyte GA-K8VT800M system with
- * 1GB ram.  The 64-bit version is about 4% faster than the 32-bit version,
- * when decompressing mozilla-source-1.3.tar.gz.
- *
- * Mar-13-2003 -- Most of this is derived from inffast.S which is derived from
- * the gcc -S output of zlib-1.2.0/inffast.c.  Zlib-1.2.0 is in beta release at
- * the moment.  I have successfully compiled and tested this code with gcc2.96,
- * gcc3.2, icc5.0, msvc6.0.  It is very close to the speed of inffast.S
- * compiled with gcc -DNO_MMX, but inffast.S is still faster on the P3 with MMX
- * enabled.  I will attempt to merge the MMX code into this version.  Newer
- * versions of this and inffast.S can be found at
- * http://www.eetbeetee.com/zlib/ and http://www.charm.net/~christop/zlib/
- *
- */
-
-#include <stdio.h>
-#include "zutil.h"
-#include "inftrees.h"
-#include "inflate.h"
-#include "inffast.h"
-
-/* Mark Adler's comments from inffast.c: */
-
-/*
-   Decode literal, length, and distance codes and write out the resulting
-   literal and match bytes until either not enough input or output is
-   available, an end-of-block is encountered, or a data error is encountered.
-   When large enough input and output buffers are supplied to inflate(), for
-   example, a 16K input buffer and a 64K output buffer, more than 95% of the
-   inflate execution time is spent in this routine.
-
-   Entry assumptions:
-
-        state->mode == LEN
-        strm->avail_in >= 6
-        strm->avail_out >= 258
-        start >= strm->avail_out
-        state->bits < 8
-
-   On return, state->mode is one of:
-
-        LEN -- ran out of enough output space or enough available input
-        TYPE -- reached end of block code, inflate() to interpret next block
-        BAD -- error in block data
-
-   Notes:
-
-    - The maximum input bits used by a length/distance pair is 15 bits for the
-      length code, 5 bits for the length extra, 15 bits for the distance code,
-      and 13 bits for the distance extra.  This totals 48 bits, or six bytes.
-      Therefore if strm->avail_in >= 6, then there is enough input to avoid
-      checking for available input while decoding.
-
-    - The maximum bytes that a single length/distance pair can output is 258
-      bytes, which is the maximum length that can be coded.  inflate_fast()
-      requires strm->avail_out >= 258 for each loop to avoid checking for
-      output space.
- */
-
-
-
-    typedef struct inffast_ar {
-/* 64   32                               x86  x86_64 */
-/* ar offset                              register */
-/*  0    0 */ void *esp;                /* esp save */
-/*  8    4 */ void *ebp;                /* ebp save */
-/* 16    8 */ unsigned char FAR *in;    /* esi rsi  local strm->next_in */
-/* 24   12 */ unsigned char FAR *last;  /*     r9   while in < last */
-/* 32   16 */ unsigned char FAR *out;   /* edi rdi  local strm->next_out */
-/* 40   20 */ unsigned char FAR *beg;   /*          inflate()'s init next_out */
-/* 48   24 */ unsigned char FAR *end;   /*     r10  while out < end */
-/* 56   28 */ unsigned char FAR *window;/*          size of window, wsize!=0 */
-/* 64   32 */ code const FAR *lcode;    /* ebp rbp  local strm->lencode */
-/* 72   36 */ code const FAR *dcode;    /*     r11  local strm->distcode */
-/* 80   40 */ size_t /*unsigned long */hold;       /* edx rdx  local strm->hold */
-/* 88   44 */ unsigned bits;            /* ebx rbx  local strm->bits */
-/* 92   48 */ unsigned wsize;           /*          window size */
-/* 96   52 */ unsigned write;           /*          window write index */
-/*100   56 */ unsigned lmask;           /*     r12  mask for lcode */
-/*104   60 */ unsigned dmask;           /*     r13  mask for dcode */
-/*108   64 */ unsigned len;             /*     r14  match length */
-/*112   68 */ unsigned dist;            /*     r15  match distance */
-/*116   72 */ unsigned status;          /*          set when state chng*/
-    } type_ar;
-#ifdef ASMINF
-
-void inflate_fast(strm, start)
-z_streamp strm;
-unsigned start;         /* inflate()'s starting value for strm->avail_out */
-{
-    struct inflate_state FAR *state;
-    type_ar ar;
-    void inffas8664fnc(struct inffast_ar * par);
-
-    
-
-#if (defined( __GNUC__ ) && defined( __amd64__ ) && ! defined( __i386 )) || (defined(_MSC_VER) && defined(_M_AMD64))
-#define PAD_AVAIL_IN 6
-#define PAD_AVAIL_OUT 258    
-#else
-#define PAD_AVAIL_IN 5
-#define PAD_AVAIL_OUT 257
-#endif
-
-    /* copy state to local variables */
-    state = (struct inflate_state FAR *)strm->state;
-
-    ar.in = strm->next_in;
-    ar.last = ar.in + (strm->avail_in - PAD_AVAIL_IN);
-    ar.out = strm->next_out;
-    ar.beg = ar.out - (start - strm->avail_out);
-    ar.end = ar.out + (strm->avail_out - PAD_AVAIL_OUT);
-    ar.wsize = state->wsize;
-    ar.write = state->write;
-    ar.window = state->window;
-    ar.hold = state->hold;
-    ar.bits = state->bits;
-    ar.lcode = state->lencode;
-    ar.dcode = state->distcode;
-    ar.lmask = (1U << state->lenbits) - 1;
-    ar.dmask = (1U << state->distbits) - 1;
-
-    /* decode literals and length/distances until end-of-block or not enough
-       input data or output space */
-
-    /* align in on 1/2 hold size boundary */
-    while (((size_t)(void *)ar.in & (sizeof(ar.hold) / 2 - 1)) != 0) {
-        ar.hold += (unsigned long)*ar.in++ << ar.bits;
-        ar.bits += 8;
-    }
-
-    inffas8664fnc(&ar);
-
-    if (ar.status > 1) {
-        if (ar.status == 2)
-            strm->msg = "invalid literal/length code";
-        else if (ar.status == 3)
-            strm->msg = "invalid distance code";
-        else
-            strm->msg = "invalid distance too far back";
-        state->mode = BAD;
-    }
-    else if ( ar.status == 1 ) {
-        state->mode = TYPE;
-    }
-
-    /* return unused bytes (on entry, bits < 8, so in won't go too far back) */
-    ar.len = ar.bits >> 3;
-    ar.in -= ar.len;
-    ar.bits -= ar.len << 3;
-    ar.hold &= (1U << ar.bits) - 1;
-
-    /* update state and return */
-    strm->next_in = ar.in;
-    strm->next_out = ar.out;
-    strm->avail_in = (unsigned)(ar.in < ar.last ?
-                                PAD_AVAIL_IN + (ar.last - ar.in) :
-                                PAD_AVAIL_IN - (ar.in - ar.last));
-    strm->avail_out = (unsigned)(ar.out < ar.end ?
-                                 PAD_AVAIL_OUT + (ar.end - ar.out) :
-                                 PAD_AVAIL_OUT - (ar.out - ar.end));
-    state->hold = (unsigned long)ar.hold;
-    state->bits = ar.bits;
-    return;
-}
-
-#endif
Index: trunk/minix/lib/zlib-1.2.3/contrib/masmx64/inffasx64.asm
===================================================================
--- trunk/minix/lib/zlib-1.2.3/contrib/masmx64/inffasx64.asm	(revision 9)
+++ 	(revision )
@@ -1,392 +1,0 @@
-; inffasx64.asm is a hand tuned assembler version of inffast.c - fast decoding
-; version for AMD64 on Windows using Microsoft C compiler
-;
-; inffasx64.asm is automatically convert from AMD64 portion of inffas86.c
-; inffasx64.asm is called by inffas8664.c, which contain more info.
-
-
-; to compile this file, I use option
-;   ml64.exe /Flinffasx64 /c /Zi inffasx64.asm
-;   with Microsoft Macro Assembler (x64) for AMD64
-;
-;   ml64.exe is given with Visual Studio 2005, Windows 2003 server DDK
-;
-;   (you can get Windows 2003 server DDK with ml64 and cl.exe for AMD64 from 
-;      http://www.microsoft.com/whdc/devtools/ddk/default.mspx for low price)
-;
-
-.code
-inffas8664fnc PROC
-
-; see http://weblogs.asp.net/oldnewthing/archive/2004/01/14/58579.aspx and
-; http://msdn.microsoft.com/library/en-us/kmarch/hh/kmarch/64bitAMD_8e951dd2-ee77-4728-8702-55ce4b5dd24a.xml.asp
-;
-; All registers must be preserved across the call, except for
-;   rax, rcx, rdx, r8, r-9, r10, and r11, which are scratch.
-
-
-	mov [rsp-8],rsi
-	mov [rsp-16],rdi
-	mov [rsp-24],r12
-	mov [rsp-32],r13
-	mov [rsp-40],r14
-	mov [rsp-48],r15
-	mov [rsp-56],rbx
-
-	mov rax,rcx
-
-	mov	[rax+8], rbp       ; /* save regs rbp and rsp */
-	mov	[rax], rsp
-
-	mov	rsp, rax          ; /* make rsp point to &ar */
-
-	mov	rsi, [rsp+16]      ; /* rsi  = in */
-	mov	rdi, [rsp+32]      ; /* rdi  = out */
-	mov	r9, [rsp+24]       ; /* r9   = last */
-	mov	r10, [rsp+48]      ; /* r10  = end */
-	mov	rbp, [rsp+64]      ; /* rbp  = lcode */
-	mov	r11, [rsp+72]      ; /* r11  = dcode */
-	mov	rdx, [rsp+80]      ; /* rdx  = hold */
-	mov	ebx, [rsp+88]      ; /* ebx  = bits */
-	mov	r12d, [rsp+100]    ; /* r12d = lmask */
-	mov	r13d, [rsp+104]    ; /* r13d = dmask */
-                                          ; /* r14d = len */
-                                          ; /* r15d = dist */
-
-
-	cld
-	cmp	r10, rdi
-	je	L_one_time           ; /* if only one decode left */
-	cmp	r9, rsi
-
-    jne L_do_loop
-
-
-L_one_time:
-	mov	r8, r12           ; /* r8 = lmask */
-	cmp	bl, 32
-	ja	L_get_length_code_one_time
-
-	lodsd                         ; /* eax = *(uint *)in++ */
-	mov	cl, bl            ; /* cl = bits, needs it for shifting */
-	add	bl, 32             ; /* bits += 32 */
-	shl	rax, cl
-	or	rdx, rax          ; /* hold |= *((uint *)in)++ << bits */
-	jmp	L_get_length_code_one_time
-
-ALIGN 4
-L_while_test:
-	cmp	r10, rdi
-	jbe	L_break_loop
-	cmp	r9, rsi
-	jbe	L_break_loop
-
-L_do_loop:
-	mov	r8, r12           ; /* r8 = lmask */
-	cmp	bl, 32
-	ja	L_get_length_code    ; /* if (32 < bits) */
-
-	lodsd                         ; /* eax = *(uint *)in++ */
-	mov	cl, bl            ; /* cl = bits, needs it for shifting */
-	add	bl, 32             ; /* bits += 32 */
-	shl	rax, cl
-	or	rdx, rax          ; /* hold |= *((uint *)in)++ << bits */
-
-L_get_length_code:
-	and	r8, rdx            ; /* r8 &= hold */
-	mov	eax, [rbp+r8*4]  ; /* eax = lcode[hold & lmask] */
-
-	mov	cl, ah            ; /* cl = this.bits */
-	sub	bl, ah            ; /* bits -= this.bits */
-	shr	rdx, cl           ; /* hold >>= this.bits */
-
-	test	al, al
-	jnz	L_test_for_length_base ; /* if (op != 0) 45.7% */
-
-	mov	r8, r12            ; /* r8 = lmask */
-	shr	eax, 16            ; /* output this.val char */
-	stosb
-
-L_get_length_code_one_time:
-	and	r8, rdx            ; /* r8 &= hold */
-	mov	eax, [rbp+r8*4] ; /* eax = lcode[hold & lmask] */
-
-L_dolen:
-	mov	cl, ah            ; /* cl = this.bits */
-	sub	bl, ah            ; /* bits -= this.bits */
-	shr	rdx, cl           ; /* hold >>= this.bits */
-
-	test	al, al
-	jnz	L_test_for_length_base ; /* if (op != 0) 45.7% */
-
-	shr	eax, 16            ; /* output this.val char */
-	stosb
-	jmp	L_while_test
-
-ALIGN 4
-L_test_for_length_base:
-	mov	r14d, eax         ; /* len = this */
-	shr	r14d, 16           ; /* len = this.val */
-	mov	cl, al
-
-	test	al, 16
-	jz	L_test_for_second_level_length ; /* if ((op & 16) == 0) 8% */
-	and	cl, 15             ; /* op &= 15 */
-	jz	L_decode_distance    ; /* if (!op) */
-
-L_add_bits_to_len:
-	sub	bl, cl
-	xor	eax, eax
-	inc	eax
-	shl	eax, cl
-	dec	eax
-	and	eax, edx          ; /* eax &= hold */
-	shr	rdx, cl
-	add	r14d, eax         ; /* len += hold & mask[op] */
-
-L_decode_distance:
-	mov	r8, r13           ; /* r8 = dmask */
-	cmp	bl, 32
-	ja	L_get_distance_code  ; /* if (32 < bits) */
-
-	lodsd                         ; /* eax = *(uint *)in++ */
-	mov	cl, bl            ; /* cl = bits, needs it for shifting */
-	add	bl, 32             ; /* bits += 32 */
-	shl	rax, cl
-	or	rdx, rax          ; /* hold |= *((uint *)in)++ << bits */
-
-L_get_distance_code:
-	and	r8, rdx           ; /* r8 &= hold */
-	mov	eax, [r11+r8*4] ; /* eax = dcode[hold & dmask] */
-
-L_dodist:
-	mov	r15d, eax         ; /* dist = this */
-	shr	r15d, 16           ; /* dist = this.val */
-	mov	cl, ah
-	sub	bl, ah            ; /* bits -= this.bits */
-	shr	rdx, cl           ; /* hold >>= this.bits */
-	mov	cl, al            ; /* cl = this.op */
-
-	test	al, 16             ; /* if ((op & 16) == 0) */
-	jz	L_test_for_second_level_dist
-	and	cl, 15             ; /* op &= 15 */
-	jz	L_check_dist_one
-
-L_add_bits_to_dist:
-	sub	bl, cl
-	xor	eax, eax
-	inc	eax
-	shl	eax, cl
-	dec	eax                 ; /* (1 << op) - 1 */
-	and	eax, edx          ; /* eax &= hold */
-	shr	rdx, cl
-	add	r15d, eax         ; /* dist += hold & ((1 << op) - 1) */
-
-L_check_window:
-	mov	r8, rsi           ; /* save in so from can use it's reg */
-	mov	rax, rdi
-	sub	rax, [rsp+40]      ; /* nbytes = out - beg */
-
-	cmp	eax, r15d
-	jb	L_clip_window        ; /* if (dist > nbytes) 4.2% */
-
-	mov	ecx, r14d         ; /* ecx = len */
-	mov	rsi, rdi
-	sub	rsi, r15          ; /* from = out - dist */
-
-	sar	ecx, 1
-	jnc	L_copy_two           ; /* if len % 2 == 0 */
-
-	rep     movsw
-	mov	al, [rsi]
-	mov	[rdi], al
-	inc	rdi
-
-	mov	rsi, r8           ; /* move in back to %rsi, toss from */
-	jmp	L_while_test
-
-L_copy_two:
-	rep     movsw
-	mov	rsi, r8           ; /* move in back to %rsi, toss from */
-	jmp	L_while_test
-
-ALIGN 4
-L_check_dist_one:
-	cmp	r15d, 1            ; /* if dist 1, is a memset */
-	jne	L_check_window
-	cmp	[rsp+40], rdi      ; /* if out == beg, outside window */
-	je	L_check_window
-
-	mov	ecx, r14d         ; /* ecx = len */
-	mov	al, [rdi-1]
-	mov	ah, al
-
-	sar	ecx, 1
-	jnc	L_set_two
-	mov	[rdi], al
-	inc	rdi
-
-L_set_two:
-	rep     stosw
-	jmp	L_while_test
-
-ALIGN 4
-L_test_for_second_level_length:
-	test	al, 64
-	jnz	L_test_for_end_of_block ; /* if ((op & 64) != 0) */
-
-	xor	eax, eax
-	inc	eax
-	shl	eax, cl
-	dec	eax
-	and	eax, edx         ; /* eax &= hold */
-	add	eax, r14d        ; /* eax += len */
-	mov	eax, [rbp+rax*4] ; /* eax = lcode[val+(hold&mask[op])]*/
-	jmp	L_dolen
-
-ALIGN 4
-L_test_for_second_level_dist:
-	test	al, 64
-	jnz	L_invalid_distance_code ; /* if ((op & 64) != 0) */
-
-	xor	eax, eax
-	inc	eax
-	shl	eax, cl
-	dec	eax
-	and	eax, edx         ; /* eax &= hold */
-	add	eax, r15d        ; /* eax += dist */
-	mov	eax, [r11+rax*4] ; /* eax = dcode[val+(hold&mask[op])]*/
-	jmp	L_dodist
-
-ALIGN 4
-L_clip_window:
-	mov	ecx, eax         ; /* ecx = nbytes */
-	mov	eax, [rsp+92]     ; /* eax = wsize, prepare for dist cmp */
-	neg	ecx                ; /* nbytes = -nbytes */
-
-	cmp	eax, r15d
-	jb	L_invalid_distance_too_far ; /* if (dist > wsize) */
-
-	add	ecx, r15d         ; /* nbytes = dist - nbytes */
-	cmp	dword ptr [rsp+96], 0
-	jne	L_wrap_around_window ; /* if (write != 0) */
-
-	mov	rsi, [rsp+56]     ; /* from  = window */
-	sub	eax, ecx         ; /* eax  -= nbytes */
-	add	rsi, rax         ; /* from += wsize - nbytes */
-
-	mov	eax, r14d        ; /* eax = len */
-	cmp	r14d, ecx
-	jbe	L_do_copy           ; /* if (nbytes >= len) */
-
-	sub	eax, ecx         ; /* eax -= nbytes */
-	rep     movsb
-	mov	rsi, rdi
-	sub	rsi, r15         ; /* from = &out[ -dist ] */
-	jmp	L_do_copy
-
-ALIGN 4
-L_wrap_around_window:
-	mov	eax, [rsp+96]     ; /* eax = write */
-	cmp	ecx, eax
-	jbe	L_contiguous_in_window ; /* if (write >= nbytes) */
-
-	mov	esi, [rsp+92]     ; /* from  = wsize */
-	add	rsi, [rsp+56]     ; /* from += window */
-	add	rsi, rax         ; /* from += write */
-	sub	rsi, rcx         ; /* from -= nbytes */
-	sub	ecx, eax         ; /* nbytes -= write */
-
-	mov	eax, r14d        ; /* eax = len */
-	cmp	eax, ecx
-	jbe	L_do_copy           ; /* if (nbytes >= len) */
-
-	sub	eax, ecx         ; /* len -= nbytes */
-	rep     movsb
-	mov	rsi, [rsp+56]     ; /* from = window */
-	mov	ecx, [rsp+96]     ; /* nbytes = write */
-	cmp	eax, ecx
-	jbe	L_do_copy           ; /* if (nbytes >= len) */
-
-	sub	eax, ecx         ; /* len -= nbytes */
-	rep     movsb
-	mov	rsi, rdi
-	sub	rsi, r15         ; /* from = out - dist */
-	jmp	L_do_copy
-
-ALIGN 4
-L_contiguous_in_window:
-	mov	rsi, [rsp+56]     ; /* rsi = window */
-	add	rsi, rax
-	sub	rsi, rcx         ; /* from += write - nbytes */
-
-	mov	eax, r14d        ; /* eax = len */
-	cmp	eax, ecx
-	jbe	L_do_copy           ; /* if (nbytes >= len) */
-
-	sub	eax, ecx         ; /* len -= nbytes */
-	rep     movsb
-	mov	rsi, rdi
-	sub	rsi, r15         ; /* from = out - dist */
-	jmp	L_do_copy           ; /* if (nbytes >= len) */
-
-ALIGN 4
-L_do_copy:
-	mov	ecx, eax         ; /* ecx = len */
-	rep     movsb
-
-	mov	rsi, r8          ; /* move in back to %esi, toss from */
-	jmp	L_while_test
-
-L_test_for_end_of_block:
-	test	al, 32
-	jz	L_invalid_literal_length_code
-	mov	dword ptr [rsp+116], 1
-	jmp	L_break_loop_with_status
-
-L_invalid_literal_length_code:
-	mov	dword ptr [rsp+116], 2
-	jmp	L_break_loop_with_status
-
-L_invalid_distance_code:
-	mov	dword ptr [rsp+116], 3
-	jmp	L_break_loop_with_status
-
-L_invalid_distance_too_far:
-	mov	dword ptr [rsp+116], 4
-	jmp	L_break_loop_with_status
-
-L_break_loop:
-	mov	dword ptr [rsp+116], 0
-
-L_break_loop_with_status:
-; /* put in, out, bits, and hold back into ar and pop esp */
-	mov	[rsp+16], rsi     ; /* in */
-	mov	[rsp+32], rdi     ; /* out */
-	mov	[rsp+88], ebx     ; /* bits */
-	mov	[rsp+80], rdx     ; /* hold */
-
-	mov	rax, [rsp]       ; /* restore rbp and rsp */
-	mov	rbp, [rsp+8]
-	mov	rsp, rax
-
-
-
-	mov rsi,[rsp-8]
-	mov rdi,[rsp-16]
-	mov r12,[rsp-24]
-	mov r13,[rsp-32]
-	mov r14,[rsp-40]
-	mov r15,[rsp-48]
-	mov rbx,[rsp-56]
-	
-    ret 0
-;          :
-;          : "m" (ar)
-;          : "memory", "%rax", "%rbx", "%rcx", "%rdx", "%rsi", "%rdi",
-;            "%r8", "%r9", "%r10", "%r11", "%r12", "%r13", "%r14", "%r15"
-;    );
-
-inffas8664fnc 	ENDP
-;_TEXT	ENDS
-END
Index: trunk/minix/lib/zlib-1.2.3/contrib/masmx64/readme.txt
===================================================================
--- trunk/minix/lib/zlib-1.2.3/contrib/masmx64/readme.txt	(revision 9)
+++ 	(revision )
@@ -1,28 +1,0 @@
-Summary
--------
-This directory contains ASM implementations of the functions
-longest_match() and inflate_fast(), for 64 bits x86 (both AMD64 and Intel EM64t),
-for use with Microsoft Macro Assembler (x64) for AMD64 and Microsoft C++ 64 bits.
-
-gvmat64.asm is written by Gilles Vollant (2005), by using Brian Raiter 686/32 bits
-   assembly optimized version from Jean-loup Gailly original longest_match function
-
-inffasx64.asm and inffas8664.c were written by Chris Anderson, by optimizing
-   original function from Mark Adler
-
-Use instructions
-----------------
-Copy these files into the zlib source directory.
-
-define ASMV and ASMINF in your project. Include inffas8664.c in your source tree,
-and inffasx64.obj and gvmat64.obj as object to link.
-
-
-Build instructions
-------------------
-run bld_64.bat with Microsoft Macro Assembler (x64) for AMD64 (ml64.exe)
-
-ml64.exe is given with Visual Studio 2005, Windows 2003 server DDK
-
-You can get Windows 2003 server DDK with ml64 and cl for AMD64 from 
-  http://www.microsoft.com/whdc/devtools/ddk/default.mspx for low price)
Index: trunk/minix/lib/zlib-1.2.3/contrib/masmx86/bld_ml32.bat
===================================================================
--- trunk/minix/lib/zlib-1.2.3/contrib/masmx86/bld_ml32.bat	(revision 9)
+++ 	(revision )
@@ -1,2 +1,0 @@
-ml /coff /Zi /c /Flgvmat32.lst  gvmat32.asm 
-ml /coff /Zi /c /Flinffas32.lst inffas32.asm 
Index: trunk/minix/lib/zlib-1.2.3/contrib/masmx86/gvmat32.asm
===================================================================
--- trunk/minix/lib/zlib-1.2.3/contrib/masmx86/gvmat32.asm	(revision 9)
+++ 	(revision )
@@ -1,972 +1,0 @@
-; gvmat32.asm -- Asm portion of the optimized longest_match for 32 bits x86
-; Copyright (C) 1995-1996 Jean-loup Gailly and Gilles Vollant.
-; File written by Gilles Vollant, by modifiying the longest_match
-;  from Jean-loup Gailly in deflate.c
-;
-;         http://www.zlib.net
-;         http://www.winimage.com/zLibDll
-;         http://www.muppetlabs.com/~breadbox/software/assembly.html
-;
-; For Visual C++ 4.x and higher and ML 6.x and higher
-;   ml.exe is in directory \MASM611C of Win95 DDK
-;   ml.exe is also distributed in http://www.masm32.com/masmdl.htm
-;    and in VC++2003 toolkit at http://msdn.microsoft.com/visualc/vctoolkit2003/
-;
-; this file contain two implementation of longest_match
-;
-;  longest_match_7fff : written 1996 by Gilles Vollant optimized for 
-;            first Pentium. Assume s->w_mask == 0x7fff
-;  longest_match_686 : written by Brian raiter (1998), optimized for Pentium Pro
-;
-;  for using an seembly version of longest_match, you need define ASMV in project
-;  There is two way in using gvmat32.asm
-;
-;  A) Suggested method
-;    if you want include both longest_match_7fff and longest_match_686
-;    compile the asm file running
-;           ml /coff /Zi /Flgvmat32.lst /c gvmat32.asm
-;    and include gvmat32c.c in your project
-;    if you have an old cpu (386,486 or first Pentium) and s->w_mask==0x7fff,
-;        longest_match_7fff will be used
-;    if you have a more modern CPU (Pentium Pro, II and higher)
-;        longest_match_686 will be used
-;    on old cpu with s->w_mask!=0x7fff, longest_match_686 will be used,
-;        but this is not a sitation you'll find often
-;
-;  B) Alternative
-;    if you are not interresed in old cpu performance and want the smaller
-;       binaries possible
-;
-;    compile the asm file running
-;           ml /coff /Zi /c /Flgvmat32.lst /DNOOLDPENTIUMCODE gvmat32.asm
-;    and do not include gvmat32c.c in your project (ou define also 
-;              NOOLDPENTIUMCODE)
-;
-; note : as I known, longest_match_686 is very faster than longest_match_7fff
-;        on pentium Pro/II/III, faster (but less) in P4, but it seem
-;        longest_match_7fff can be faster (very very litte) on AMD Athlon64/K8
-;
-; see below : zlib1222add must be adjuster if you use a zlib version < 1.2.2.2
-
-;uInt longest_match_7fff(s, cur_match)
-;    deflate_state *s;
-;    IPos cur_match;                             /* current match */
-
-    NbStack         equ     76
-    cur_match       equ     dword ptr[esp+NbStack-0]
-    str_s           equ     dword ptr[esp+NbStack-4]
-; 5 dword on top (ret,ebp,esi,edi,ebx)
-    adrret          equ     dword ptr[esp+NbStack-8]
-    pushebp         equ     dword ptr[esp+NbStack-12]
-    pushedi         equ     dword ptr[esp+NbStack-16]
-    pushesi         equ     dword ptr[esp+NbStack-20]
-    pushebx         equ     dword ptr[esp+NbStack-24]
-
-    chain_length    equ     dword ptr [esp+NbStack-28]
-    limit           equ     dword ptr [esp+NbStack-32]
-    best_len        equ     dword ptr [esp+NbStack-36]
-    window          equ     dword ptr [esp+NbStack-40]
-    prev            equ     dword ptr [esp+NbStack-44]
-    scan_start      equ      word ptr [esp+NbStack-48]
-    wmask           equ     dword ptr [esp+NbStack-52]
-    match_start_ptr equ     dword ptr [esp+NbStack-56]
-    nice_match      equ     dword ptr [esp+NbStack-60]
-    scan            equ     dword ptr [esp+NbStack-64]
-
-    windowlen       equ     dword ptr [esp+NbStack-68]
-    match_start     equ     dword ptr [esp+NbStack-72]
-    strend          equ     dword ptr [esp+NbStack-76]
-    NbStackAdd      equ     (NbStack-24)
-
-    .386p
-
-    name    gvmatch
-    .MODEL  FLAT
-
-
-
-;  all the +zlib1222add offsets are due to the addition of fields
-;  in zlib in the deflate_state structure since the asm code was first written
-;  (if you compile with zlib 1.0.4 or older, use "zlib1222add equ (-4)").
-;  (if you compile with zlib between 1.0.5 and 1.2.2.1, use "zlib1222add equ 0").
-;  if you compile with zlib 1.2.2.2 or later , use "zlib1222add equ 8").
-
-    zlib1222add         equ     8
-
-;  Note : these value are good with a 8 bytes boundary pack structure
-    dep_chain_length    equ     74h+zlib1222add
-    dep_window          equ     30h+zlib1222add
-    dep_strstart        equ     64h+zlib1222add
-    dep_prev_length     equ     70h+zlib1222add
-    dep_nice_match      equ     88h+zlib1222add
-    dep_w_size          equ     24h+zlib1222add
-    dep_prev            equ     38h+zlib1222add
-    dep_w_mask          equ     2ch+zlib1222add
-    dep_good_match      equ     84h+zlib1222add
-    dep_match_start     equ     68h+zlib1222add
-    dep_lookahead       equ     6ch+zlib1222add
-
-
-_TEXT                   segment
-
-IFDEF NOUNDERLINE
-   IFDEF NOOLDPENTIUMCODE
-            public  longest_match
-            public  match_init
-   ELSE            
-            public  longest_match_7fff
-            public  cpudetect32
-            public  longest_match_686
-   ENDIF
-ELSE
-   IFDEF NOOLDPENTIUMCODE
-            public  _longest_match
-            public  _match_init
-   ELSE
-            public  _longest_match_7fff
-            public  _cpudetect32
-            public  _longest_match_686
-   ENDIF
-ENDIF
-
-    MAX_MATCH           equ     258
-    MIN_MATCH           equ     3
-    MIN_LOOKAHEAD       equ     (MAX_MATCH+MIN_MATCH+1)
-
-
-
-IFNDEF NOOLDPENTIUMCODE
-IFDEF NOUNDERLINE
-longest_match_7fff   proc near
-ELSE
-_longest_match_7fff  proc near
-ENDIF
-
-    mov     edx,[esp+4]
-
-
-
-    push    ebp
-    push    edi
-    push    esi
-    push    ebx
-
-    sub     esp,NbStackAdd
-
-; initialize or check the variables used in match.asm.
-    mov     ebp,edx
-
-; chain_length = s->max_chain_length
-; if (prev_length>=good_match) chain_length >>= 2
-    mov     edx,[ebp+dep_chain_length]
-    mov     ebx,[ebp+dep_prev_length]
-    cmp     [ebp+dep_good_match],ebx
-    ja      noshr
-    shr     edx,2
-noshr:
-; we increment chain_length because in the asm, the --chain_lenght is in the beginning of the loop
-    inc     edx
-    mov     edi,[ebp+dep_nice_match]
-    mov     chain_length,edx
-    mov     eax,[ebp+dep_lookahead]
-    cmp     eax,edi
-; if ((uInt)nice_match > s->lookahead) nice_match = s->lookahead;
-    jae     nolookaheadnicematch
-    mov     edi,eax
-nolookaheadnicematch:
-; best_len = s->prev_length
-    mov     best_len,ebx
-
-; window = s->window
-    mov     esi,[ebp+dep_window]
-    mov     ecx,[ebp+dep_strstart]
-    mov     window,esi
-
-    mov     nice_match,edi
-; scan = window + strstart
-    add     esi,ecx
-    mov     scan,esi
-; dx = *window
-    mov     dx,word ptr [esi]
-; bx = *(window+best_len-1)
-    mov     bx,word ptr [esi+ebx-1]
-    add     esi,MAX_MATCH-1
-; scan_start = *scan
-    mov     scan_start,dx
-; strend = scan + MAX_MATCH-1
-    mov     strend,esi
-; bx = scan_end = *(window+best_len-1)
-
-;    IPos limit = s->strstart > (IPos)MAX_DIST(s) ?
-;        s->strstart - (IPos)MAX_DIST(s) : NIL;
-
-    mov     esi,[ebp+dep_w_size]
-    sub     esi,MIN_LOOKAHEAD
-; here esi = MAX_DIST(s)
-    sub     ecx,esi
-    ja      nodist
-    xor     ecx,ecx
-nodist:
-    mov     limit,ecx
-
-; prev = s->prev
-    mov     edx,[ebp+dep_prev]
-    mov     prev,edx
-
-;
-    mov     edx,dword ptr [ebp+dep_match_start]
-    mov     bp,scan_start
-    mov     eax,cur_match
-    mov     match_start,edx
-
-    mov     edx,window
-    mov     edi,edx
-    add     edi,best_len
-    mov     esi,prev
-    dec     edi
-; windowlen = window + best_len -1
-    mov     windowlen,edi
-
-    jmp     beginloop2
-    align   4
-
-; here, in the loop
-;       eax = ax = cur_match
-;       ecx = limit
-;        bx = scan_end
-;        bp = scan_start
-;       edi = windowlen (window + best_len -1)
-;       esi = prev
-
-
-;// here; chain_length <=16
-normalbeg0add16:
-    add     chain_length,16
-    jz      exitloop
-normalbeg0:
-    cmp     word ptr[edi+eax],bx
-    je      normalbeg2noroll
-rcontlabnoroll:
-; cur_match = prev[cur_match & wmask]
-    and     eax,7fffh
-    mov     ax,word ptr[esi+eax*2]
-; if cur_match > limit, go to exitloop
-    cmp     ecx,eax
-    jnb     exitloop
-; if --chain_length != 0, go to exitloop
-    dec     chain_length
-    jnz     normalbeg0
-    jmp     exitloop
-
-normalbeg2noroll:
-; if (scan_start==*(cur_match+window)) goto normalbeg2
-    cmp     bp,word ptr[edx+eax]
-    jne     rcontlabnoroll
-    jmp     normalbeg2
-
-contloop3:
-    mov     edi,windowlen
-
-; cur_match = prev[cur_match & wmask]
-    and     eax,7fffh
-    mov     ax,word ptr[esi+eax*2]
-; if cur_match > limit, go to exitloop
-    cmp     ecx,eax
-jnbexitloopshort1:
-    jnb     exitloop
-; if --chain_length != 0, go to exitloop
-
-
-; begin the main loop
-beginloop2:
-    sub     chain_length,16+1
-; if chain_length <=16, don't use the unrolled loop
-    jna     normalbeg0add16
-
-do16:
-    cmp     word ptr[edi+eax],bx
-    je      normalbeg2dc0
-
-maccn   MACRO   lab
-    and     eax,7fffh
-    mov     ax,word ptr[esi+eax*2]
-    cmp     ecx,eax
-    jnb     exitloop
-    cmp     word ptr[edi+eax],bx
-    je      lab
-    ENDM
-
-rcontloop0:
-    maccn   normalbeg2dc1
-
-rcontloop1:
-    maccn   normalbeg2dc2
-
-rcontloop2:
-    maccn   normalbeg2dc3
-
-rcontloop3:
-    maccn   normalbeg2dc4
-
-rcontloop4:
-    maccn   normalbeg2dc5
-
-rcontloop5:
-    maccn   normalbeg2dc6
-
-rcontloop6:
-    maccn   normalbeg2dc7
-
-rcontloop7:
-    maccn   normalbeg2dc8
-
-rcontloop8:
-    maccn   normalbeg2dc9
-
-rcontloop9:
-    maccn   normalbeg2dc10
-
-rcontloop10:
-    maccn   short normalbeg2dc11
-
-rcontloop11:
-    maccn   short normalbeg2dc12
-
-rcontloop12:
-    maccn   short normalbeg2dc13
-
-rcontloop13:
-    maccn   short normalbeg2dc14
-
-rcontloop14:
-    maccn   short normalbeg2dc15
-
-rcontloop15:
-    and     eax,7fffh
-    mov     ax,word ptr[esi+eax*2]
-    cmp     ecx,eax
-    jnb     exitloop
-
-    sub     chain_length,16
-    ja      do16
-    jmp     normalbeg0add16
-
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-
-normbeg MACRO   rcontlab,valsub
-; if we are here, we know that *(match+best_len-1) == scan_end
-    cmp     bp,word ptr[edx+eax]
-; if (match != scan_start) goto rcontlab
-    jne     rcontlab
-; calculate the good chain_length, and we'll compare scan and match string
-    add     chain_length,16-valsub
-    jmp     iseq
-    ENDM
-
-
-normalbeg2dc11:
-    normbeg rcontloop11,11
-
-normalbeg2dc12:
-    normbeg short rcontloop12,12
-
-normalbeg2dc13:
-    normbeg short rcontloop13,13
-
-normalbeg2dc14:
-    normbeg short rcontloop14,14
-
-normalbeg2dc15:
-    normbeg short rcontloop15,15
-
-normalbeg2dc10:
-    normbeg rcontloop10,10
-
-normalbeg2dc9:
-    normbeg rcontloop9,9
-
-normalbeg2dc8:
-    normbeg rcontloop8,8
-
-normalbeg2dc7:
-    normbeg rcontloop7,7
-
-normalbeg2dc6:
-    normbeg rcontloop6,6
-
-normalbeg2dc5:
-    normbeg rcontloop5,5
-
-normalbeg2dc4:
-    normbeg rcontloop4,4
-
-normalbeg2dc3:
-    normbeg rcontloop3,3
-
-normalbeg2dc2:
-    normbeg rcontloop2,2
-
-normalbeg2dc1:
-    normbeg rcontloop1,1
-
-normalbeg2dc0:
-    normbeg rcontloop0,0
-
-
-; we go in normalbeg2 because *(ushf*)(match+best_len-1) == scan_end
-
-normalbeg2:
-    mov     edi,window
-
-    cmp     bp,word ptr[edi+eax]
-    jne     contloop3                   ; if *(ushf*)match != scan_start, continue
-
-iseq:
-; if we are here, we know that *(match+best_len-1) == scan_end
-; and (match == scan_start)
-
-    mov     edi,edx
-    mov     esi,scan                    ; esi = scan
-    add     edi,eax                     ; edi = window + cur_match = match
-
-    mov     edx,[esi+3]                 ; compare manually dword at match+3
-    xor     edx,[edi+3]                 ; and scan +3
-
-    jz      begincompare                ; if equal, go to long compare
-
-; we will determine the unmatch byte and calculate len (in esi)
-    or      dl,dl
-    je      eq1rr
-    mov     esi,3
-    jmp     trfinval
-eq1rr:
-    or      dx,dx
-    je      eq1
-
-    mov     esi,4
-    jmp     trfinval
-eq1:
-    and     edx,0ffffffh
-    jz      eq11
-    mov     esi,5
-    jmp     trfinval
-eq11:
-    mov     esi,6
-    jmp     trfinval
-
-begincompare:
-    ; here we now scan and match begin same
-    add     edi,6
-    add     esi,6
-    mov     ecx,(MAX_MATCH-(2+4))/4     ; scan for at most MAX_MATCH bytes
-    repe    cmpsd                       ; loop until mismatch
-
-    je      trfin                       ; go to trfin if not unmatch
-; we determine the unmatch byte
-    sub     esi,4
-    mov     edx,[edi-4]
-    xor     edx,[esi]
-
-    or      dl,dl
-    jnz     trfin
-    inc     esi
-
-    or      dx,dx
-    jnz     trfin
-    inc     esi
-
-    and     edx,0ffffffh
-    jnz     trfin
-    inc     esi
-
-trfin:
-    sub     esi,scan          ; esi = len
-trfinval:
-; here we have finised compare, and esi contain len of equal string
-    cmp     esi,best_len        ; if len > best_len, go newbestlen
-    ja      short newbestlen
-; now we restore edx, ecx and esi, for the big loop
-    mov     esi,prev
-    mov     ecx,limit
-    mov     edx,window
-    jmp     contloop3
-
-newbestlen:
-    mov     best_len,esi        ; len become best_len
-
-    mov     match_start,eax     ; save new position as match_start
-    cmp     esi,nice_match      ; if best_len >= nice_match, exit
-    jae     exitloop
-    mov     ecx,scan
-    mov     edx,window          ; restore edx=window
-    add     ecx,esi
-    add     esi,edx
-
-    dec     esi
-    mov     windowlen,esi       ; windowlen = window + best_len-1
-    mov     bx,[ecx-1]          ; bx = *(scan+best_len-1) = scan_end
-
-; now we restore ecx and esi, for the big loop :
-    mov     esi,prev
-    mov     ecx,limit
-    jmp     contloop3
-
-exitloop:
-; exit : s->match_start=match_start
-    mov     ebx,match_start
-    mov     ebp,str_s
-    mov     ecx,best_len
-    mov     dword ptr [ebp+dep_match_start],ebx
-    mov     eax,dword ptr [ebp+dep_lookahead]
-    cmp     ecx,eax
-    ja      minexlo
-    mov     eax,ecx
-minexlo:
-; return min(best_len,s->lookahead)
-
-; restore stack and register ebx,esi,edi,ebp
-    add     esp,NbStackAdd
-
-    pop     ebx
-    pop     esi
-    pop     edi
-    pop     ebp
-    ret
-InfoAuthor:
-; please don't remove this string !
-; Your are free use gvmat32 in any fre or commercial apps if you don't remove the string in the binary!
-    db     0dh,0ah,"GVMat32 optimised assembly code written 1996-98 by Gilles Vollant",0dh,0ah
-
-
-
-IFDEF NOUNDERLINE
-longest_match_7fff   endp
-ELSE
-_longest_match_7fff  endp
-ENDIF
-
-
-IFDEF NOUNDERLINE
-cpudetect32     proc near
-ELSE
-_cpudetect32    proc near
-ENDIF
-
-    push    ebx
-
-    pushfd                  ; push original EFLAGS
-    pop     eax             ; get original EFLAGS
-    mov     ecx, eax        ; save original EFLAGS
-    xor     eax, 40000h     ; flip AC bit in EFLAGS
-    push    eax             ; save new EFLAGS value on stack
-    popfd                   ; replace current EFLAGS value
-    pushfd                  ; get new EFLAGS
-    pop     eax             ; store new EFLAGS in EAX
-    xor     eax, ecx        ; cant toggle AC bit, processor=80386
-    jz      end_cpu_is_386  ; jump if 80386 processor
-    push    ecx
-    popfd                   ; restore AC bit in EFLAGS first
-
-    pushfd
-    pushfd
-    pop     ecx
-
-    mov     eax, ecx        ; get original EFLAGS
-    xor     eax, 200000h    ; flip ID bit in EFLAGS
-    push    eax             ; save new EFLAGS value on stack
-    popfd                   ; replace current EFLAGS value
-    pushfd                  ; get new EFLAGS
-    pop     eax             ; store new EFLAGS in EAX
-    popfd                   ; restore original EFLAGS
-    xor     eax, ecx        ; cant toggle ID bit,
-    je      is_old_486      ; processor=old
-
-    mov     eax,1
-    db      0fh,0a2h        ;CPUID
-
-exitcpudetect:
-    pop ebx
-    ret
-
-end_cpu_is_386:
-    mov     eax,0300h
-    jmp     exitcpudetect
-
-is_old_486:
-    mov     eax,0400h
-    jmp     exitcpudetect
-
-IFDEF NOUNDERLINE
-cpudetect32     endp
-ELSE
-_cpudetect32    endp
-ENDIF
-ENDIF
-
-MAX_MATCH       equ     258
-MIN_MATCH       equ     3
-MIN_LOOKAHEAD   equ     (MAX_MATCH + MIN_MATCH + 1)
-MAX_MATCH_8_     equ     ((MAX_MATCH + 7) AND 0FFF0h)
-
-
-;;; stack frame offsets
-
-chainlenwmask   equ  esp + 0    ; high word: current chain len
-                    ; low word: s->wmask
-window      equ  esp + 4    ; local copy of s->window
-windowbestlen   equ  esp + 8    ; s->window + bestlen
-scanstart   equ  esp + 16   ; first two bytes of string
-scanend     equ  esp + 12   ; last two bytes of string
-scanalign   equ  esp + 20   ; dword-misalignment of string
-nicematch   equ  esp + 24   ; a good enough match size
-bestlen     equ  esp + 28   ; size of best match so far
-scan        equ  esp + 32   ; ptr to string wanting match
-
-LocalVarsSize   equ 36
-;   saved ebx   byte esp + 36
-;   saved edi   byte esp + 40
-;   saved esi   byte esp + 44
-;   saved ebp   byte esp + 48
-;   return address  byte esp + 52
-deflatestate    equ  esp + 56   ; the function arguments
-curmatch    equ  esp + 60
-
-;;; Offsets for fields in the deflate_state structure. These numbers
-;;; are calculated from the definition of deflate_state, with the
-;;; assumption that the compiler will dword-align the fields. (Thus,
-;;; changing the definition of deflate_state could easily cause this
-;;; program to crash horribly, without so much as a warning at
-;;; compile time. Sigh.)
-
-dsWSize     equ 36+zlib1222add
-dsWMask     equ 44+zlib1222add
-dsWindow    equ 48+zlib1222add
-dsPrev      equ 56+zlib1222add
-dsMatchLen  equ 88+zlib1222add
-dsPrevMatch equ 92+zlib1222add
-dsStrStart  equ 100+zlib1222add
-dsMatchStart    equ 104+zlib1222add
-dsLookahead equ 108+zlib1222add
-dsPrevLen   equ 112+zlib1222add
-dsMaxChainLen   equ 116+zlib1222add
-dsGoodMatch equ 132+zlib1222add
-dsNiceMatch equ 136+zlib1222add
-
-
-;;; match.asm -- Pentium-Pro-optimized version of longest_match()
-;;; Written for zlib 1.1.2
-;;; Copyright (C) 1998 Brian Raiter <breadbox@muppetlabs.com>
-;;; You can look at http://www.muppetlabs.com/~breadbox/software/assembly.html
-;;;
-;;; This is free software; you can redistribute it and/or modify it
-;;; under the terms of the GNU General Public License.
-
-;GLOBAL _longest_match, _match_init
-
-
-;SECTION    .text
-
-;;; uInt longest_match(deflate_state *deflatestate, IPos curmatch)
-
-;_longest_match:
-IFDEF NOOLDPENTIUMCODE
-    IFDEF NOUNDERLINE
-    longest_match       proc near
-    ELSE
-    _longest_match      proc near
-    ENDIF
-ELSE
-    IFDEF NOUNDERLINE
-    longest_match_686   proc near
-    ELSE
-    _longest_match_686  proc near
-    ENDIF
-ENDIF
-
-;;; Save registers that the compiler may be using, and adjust esp to
-;;; make room for our stack frame.
-
-        push    ebp
-        push    edi
-        push    esi
-        push    ebx
-        sub esp, LocalVarsSize
-
-;;; Retrieve the function arguments. ecx will hold cur_match
-;;; throughout the entire function. edx will hold the pointer to the
-;;; deflate_state structure during the function's setup (before
-;;; entering the main loop.
-
-        mov edx, [deflatestate]
-        mov ecx, [curmatch]
-
-;;; uInt wmask = s->w_mask;
-;;; unsigned chain_length = s->max_chain_length;
-;;; if (s->prev_length >= s->good_match) {
-;;;     chain_length >>= 2;
-;;; }
-
-        mov eax, [edx + dsPrevLen]
-        mov ebx, [edx + dsGoodMatch]
-        cmp eax, ebx
-        mov eax, [edx + dsWMask]
-        mov ebx, [edx + dsMaxChainLen]
-        jl  LastMatchGood
-        shr ebx, 2
-LastMatchGood:
-
-;;; chainlen is decremented once beforehand so that the function can
-;;; use the sign flag instead of the zero flag for the exit test.
-;;; It is then shifted into the high word, to make room for the wmask
-;;; value, which it will always accompany.
-
-        dec ebx
-        shl ebx, 16
-        or  ebx, eax
-        mov [chainlenwmask], ebx
-
-;;; if ((uInt)nice_match > s->lookahead) nice_match = s->lookahead;
-
-        mov eax, [edx + dsNiceMatch]
-        mov ebx, [edx + dsLookahead]
-        cmp ebx, eax
-        jl  LookaheadLess
-        mov ebx, eax
-LookaheadLess:  mov [nicematch], ebx
-
-;;; register Bytef *scan = s->window + s->strstart;
-
-        mov esi, [edx + dsWindow]
-        mov [window], esi
-        mov ebp, [edx + dsStrStart]
-        lea edi, [esi + ebp]
-        mov [scan], edi
-
-;;; Determine how many bytes the scan ptr is off from being
-;;; dword-aligned.
-
-        mov eax, edi
-        neg eax
-        and eax, 3
-        mov [scanalign], eax
-
-;;; IPos limit = s->strstart > (IPos)MAX_DIST(s) ?
-;;;     s->strstart - (IPos)MAX_DIST(s) : NIL;
-
-        mov eax, [edx + dsWSize]
-        sub eax, MIN_LOOKAHEAD
-        sub ebp, eax
-        jg  LimitPositive
-        xor ebp, ebp
-LimitPositive:
-
-;;; int best_len = s->prev_length;
-
-        mov eax, [edx + dsPrevLen]
-        mov [bestlen], eax
-
-;;; Store the sum of s->window + best_len in esi locally, and in esi.
-
-        add esi, eax
-        mov [windowbestlen], esi
-
-;;; register ush scan_start = *(ushf*)scan;
-;;; register ush scan_end   = *(ushf*)(scan+best_len-1);
-;;; Posf *prev = s->prev;
-
-        movzx   ebx, word ptr [edi]
-        mov [scanstart], ebx
-        movzx   ebx, word ptr [edi + eax - 1]
-        mov [scanend], ebx
-        mov edi, [edx + dsPrev]
-
-;;; Jump into the main loop.
-
-        mov edx, [chainlenwmask]
-        jmp short LoopEntry
-
-align 4
-
-;;; do {
-;;;     match = s->window + cur_match;
-;;;     if (*(ushf*)(match+best_len-1) != scan_end ||
-;;;         *(ushf*)match != scan_start) continue;
-;;;     [...]
-;;; } while ((cur_match = prev[cur_match & wmask]) > limit
-;;;          && --chain_length != 0);
-;;;
-;;; Here is the inner loop of the function. The function will spend the
-;;; majority of its time in this loop, and majority of that time will
-;;; be spent in the first ten instructions.
-;;;
-;;; Within this loop:
-;;; ebx = scanend
-;;; ecx = curmatch
-;;; edx = chainlenwmask - i.e., ((chainlen << 16) | wmask)
-;;; esi = windowbestlen - i.e., (window + bestlen)
-;;; edi = prev
-;;; ebp = limit
-
-LookupLoop:
-        and ecx, edx
-        movzx   ecx, word ptr [edi + ecx*2]
-        cmp ecx, ebp
-        jbe LeaveNow
-        sub edx, 00010000h
-        js  LeaveNow
-LoopEntry:  movzx   eax, word ptr [esi + ecx - 1]
-        cmp eax, ebx
-        jnz LookupLoop
-        mov eax, [window]
-        movzx   eax, word ptr [eax + ecx]
-        cmp eax, [scanstart]
-        jnz LookupLoop
-
-;;; Store the current value of chainlen.
-
-        mov [chainlenwmask], edx
-
-;;; Point edi to the string under scrutiny, and esi to the string we
-;;; are hoping to match it up with. In actuality, esi and edi are
-;;; both pointed (MAX_MATCH_8 - scanalign) bytes ahead, and edx is
-;;; initialized to -(MAX_MATCH_8 - scanalign).
-
-        mov esi, [window]
-        mov edi, [scan]
-        add esi, ecx
-        mov eax, [scanalign]
-        mov edx, 0fffffef8h; -(MAX_MATCH_8)
-        lea edi, [edi + eax + 0108h] ;MAX_MATCH_8]
-        lea esi, [esi + eax + 0108h] ;MAX_MATCH_8]
-
-;;; Test the strings for equality, 8 bytes at a time. At the end,
-;;; adjust edx so that it is offset to the exact byte that mismatched.
-;;;
-;;; We already know at this point that the first three bytes of the
-;;; strings match each other, and they can be safely passed over before
-;;; starting the compare loop. So what this code does is skip over 0-3
-;;; bytes, as much as necessary in order to dword-align the edi
-;;; pointer. (esi will still be misaligned three times out of four.)
-;;;
-;;; It should be confessed that this loop usually does not represent
-;;; much of the total running time. Replacing it with a more
-;;; straightforward "rep cmpsb" would not drastically degrade
-;;; performance.
-
-LoopCmps:
-        mov eax, [esi + edx]
-        xor eax, [edi + edx]
-        jnz LeaveLoopCmps
-        mov eax, [esi + edx + 4]
-        xor eax, [edi + edx + 4]
-        jnz LeaveLoopCmps4
-        add edx, 8
-        jnz LoopCmps
-        jmp short LenMaximum
-LeaveLoopCmps4: add edx, 4
-LeaveLoopCmps:  test    eax, 0000FFFFh
-        jnz LenLower
-        add edx,  2
-        shr eax, 16
-LenLower:   sub al, 1
-        adc edx, 0
-
-;;; Calculate the length of the match. If it is longer than MAX_MATCH,
-;;; then automatically accept it as the best possible match and leave.
-
-        lea eax, [edi + edx]
-        mov edi, [scan]
-        sub eax, edi
-        cmp eax, MAX_MATCH
-        jge LenMaximum
-
-;;; If the length of the match is not longer than the best match we
-;;; have so far, then forget it and return to the lookup loop.
-
-        mov edx, [deflatestate]
-        mov ebx, [bestlen]
-        cmp eax, ebx
-        jg  LongerMatch
-        mov esi, [windowbestlen]
-        mov edi, [edx + dsPrev]
-        mov ebx, [scanend]
-        mov edx, [chainlenwmask]
-        jmp LookupLoop
-
-;;;         s->match_start = cur_match;
-;;;         best_len = len;
-;;;         if (len >= nice_match) break;
-;;;         scan_end = *(ushf*)(scan+best_len-1);
-
-LongerMatch:    mov ebx, [nicematch]
-        mov [bestlen], eax
-        mov [edx + dsMatchStart], ecx
-        cmp eax, ebx
-        jge LeaveNow
-        mov esi, [window]
-        add esi, eax
-        mov [windowbestlen], esi
-        movzx   ebx, word ptr [edi + eax - 1]
-        mov edi, [edx + dsPrev]
-        mov [scanend], ebx
-        mov edx, [chainlenwmask]
-        jmp LookupLoop
-
-;;; Accept the current string, with the maximum possible length.
-
-LenMaximum: mov edx, [deflatestate]
-        mov dword ptr [bestlen], MAX_MATCH
-        mov [edx + dsMatchStart], ecx
-
-;;; if ((uInt)best_len <= s->lookahead) return (uInt)best_len;
-;;; return s->lookahead;
-
-LeaveNow:
-        mov edx, [deflatestate]
-        mov ebx, [bestlen]
-        mov eax, [edx + dsLookahead]
-        cmp ebx, eax
-        jg  LookaheadRet
-        mov eax, ebx
-LookaheadRet:
-
-;;; Restore the stack and return from whence we came.
-
-        add esp, LocalVarsSize
-        pop ebx
-        pop esi
-        pop edi
-        pop ebp
-
-        ret
-; please don't remove this string !
-; Your can freely use gvmat32 in any free or commercial app if you don't remove the string in the binary!
-    db     0dh,0ah,"asm686 with masm, optimised assembly code from Brian Raiter, written 1998",0dh,0ah
-
-
-IFDEF NOOLDPENTIUMCODE
-    IFDEF NOUNDERLINE
-    longest_match       endp
-    ELSE
-    _longest_match      endp
-    ENDIF
-
-    IFDEF NOUNDERLINE
-    match_init      proc near
-                    ret
-    match_init      endp
-    ELSE
-    _match_init     proc near
-                    ret
-    _match_init     endp
-    ENDIF    
-ELSE
-    IFDEF NOUNDERLINE
-    longest_match_686   endp
-    ELSE
-    _longest_match_686  endp
-    ENDIF
-ENDIF
-
-_TEXT   ends
-end
Index: trunk/minix/lib/zlib-1.2.3/contrib/masmx86/gvmat32c.c
===================================================================
--- trunk/minix/lib/zlib-1.2.3/contrib/masmx86/gvmat32c.c	(revision 9)
+++ 	(revision )
@@ -1,62 +1,0 @@
-/* gvmat32.c -- C portion of the optimized longest_match for 32 bits x86
- * Copyright (C) 1995-1996 Jean-loup Gailly and Gilles Vollant.
- * File written by Gilles Vollant, by modifiying the longest_match
- *  from Jean-loup Gailly in deflate.c
- *  it prepare all parameters and call the assembly longest_match_gvasm
- *  longest_match execute standard C code is wmask != 0x7fff
- *     (assembly code is faster with a fixed wmask)
- *
- * Read comment at beginning of gvmat32.asm for more information
- */
-
-#if defined(ASMV) && (!defined(NOOLDPENTIUMCODE))
-#include "deflate.h"
-
-/* if your C compiler don't add underline before function name,
-        define ADD_UNDERLINE_ASMFUNC */
-#ifdef ADD_UNDERLINE_ASMFUNC
-#define longest_match_7fff _longest_match_7fff
-#define longest_match_686  _longest_match_686
-#define cpudetect32        _cpudetect32
-#endif
-
-
-unsigned long cpudetect32();
-
-uInt longest_match_c(
-    deflate_state *s,
-    IPos cur_match);                             /* current match */
-
-
-uInt longest_match_7fff(
-    deflate_state *s,
-    IPos cur_match);                             /* current match */
-
-uInt longest_match_686(
-    deflate_state *s,
-    IPos cur_match);                             /* current match */
-
-
-static uInt iIsPPro=2;
-
-void match_init ()
-{
-    iIsPPro = (((cpudetect32()/0x100)&0xf)>=6) ? 1 : 0;
-}
-
-uInt longest_match(
-    deflate_state *s,
-    IPos cur_match)                             /* current match */
-{
-    if (iIsPPro!=0)
-        return longest_match_686(s,cur_match);
-
-    if (s->w_mask != 0x7fff)
-        return longest_match_686(s,cur_match);
-
-    /* now ((s->w_mask == 0x7fff) && (iIsPPro==0)) */
-        return longest_match_7fff(s,cur_match);
-}
-
-
-#endif /* defined(ASMV) && (!defined(NOOLDPENTIUMCODE)) */
Index: trunk/minix/lib/zlib-1.2.3/contrib/masmx86/inffas32.asm
===================================================================
--- trunk/minix/lib/zlib-1.2.3/contrib/masmx86/inffas32.asm	(revision 9)
+++ 	(revision )
@@ -1,1083 +1,0 @@
-;/* inffas32.asm is a hand tuned assembler version of inffast.c -- fast decoding
-; *
-; * inffas32.asm is derivated from inffas86.c, with translation of assembly code
-; *
-; * Copyright (C) 1995-2003 Mark Adler
-; * For conditions of distribution and use, see copyright notice in zlib.h
-; *
-; * Copyright (C) 2003 Chris Anderson <christop@charm.net>
-; * Please use the copyright conditions above.
-; *
-; * Mar-13-2003 -- Most of this is derived from inffast.S which is derived from
-; * the gcc -S output of zlib-1.2.0/inffast.c.  Zlib-1.2.0 is in beta release at
-; * the moment.  I have successfully compiled and tested this code with gcc2.96,
-; * gcc3.2, icc5.0, msvc6.0.  It is very close to the speed of inffast.S
-; * compiled with gcc -DNO_MMX, but inffast.S is still faster on the P3 with MMX
-; * enabled.  I will attempt to merge the MMX code into this version.  Newer
-; * versions of this and inffast.S can be found at
-; * http://www.eetbeetee.com/zlib/ and http://www.charm.net/~christop/zlib/
-; * 
-; * 2005 : modification by Gilles Vollant
-; */
-; For Visual C++ 4.x and higher and ML 6.x and higher
-;   ml.exe is in directory \MASM611C of Win95 DDK
-;   ml.exe is also distributed in http://www.masm32.com/masmdl.htm
-;    and in VC++2003 toolkit at http://msdn.microsoft.com/visualc/vctoolkit2003/
-;
-;
-;   compile with command line option
-;   ml  /coff /Zi /c /Flinffas32.lst inffas32.asm
-
-;   if you define NO_GZIP (see inflate.h), compile with
-;   ml  /coff /Zi /c /Flinffas32.lst /DNO_GUNZIP inffas32.asm
-
-
-; zlib122sup is 0 fort zlib 1.2.2.1 and lower
-; zlib122sup is 8 fort zlib 1.2.2.2 and more (with addition of dmax and head 
-;        in inflate_state in inflate.h)
-zlib1222sup      equ    8
-
-
-IFDEF GUNZIP
-  INFLATE_MODE_TYPE    equ 11
-  INFLATE_MODE_BAD     equ 26
-ELSE
-  IFNDEF NO_GUNZIP
-    INFLATE_MODE_TYPE    equ 11
-    INFLATE_MODE_BAD     equ 26
-  ELSE
-    INFLATE_MODE_TYPE    equ 3
-    INFLATE_MODE_BAD     equ 17
-  ENDIF
-ENDIF
-
-
-; 75 "inffast.S"
-;FILE "inffast.S"
-
-;;;GLOBAL _inflate_fast
-
-;;;SECTION .text
-
-
-
-	.586p
-	.mmx
-
-	name	inflate_fast_x86
-	.MODEL	FLAT
-
-_DATA			segment
-inflate_fast_use_mmx:
-	dd	1
-
-
-_TEXT			segment
-PUBLIC _inflate_fast
-
-ALIGN 4
-_inflate_fast:
-	jmp inflate_fast_entry
-
-
-
-ALIGN 4
-	db	'Fast decoding Code from Chris Anderson'
-	db	0
-
-ALIGN 4
-invalid_literal_length_code_msg:
-	db	'invalid literal/length code'
-	db	0
-
-ALIGN 4
-invalid_distance_code_msg:
-	db	'invalid distance code'
-	db	0
-
-ALIGN 4
-invalid_distance_too_far_msg:
-	db	'invalid distance too far back'
-	db	0
-
-
-ALIGN 4
-inflate_fast_mask:
-dd	0
-dd	1
-dd	3
-dd	7
-dd	15
-dd	31
-dd	63
-dd	127
-dd	255
-dd	511
-dd	1023
-dd	2047
-dd	4095
-dd	8191
-dd	16383
-dd	32767
-dd	65535
-dd	131071
-dd	262143
-dd	524287
-dd	1048575
-dd	2097151
-dd	4194303
-dd	8388607
-dd	16777215
-dd	33554431
-dd	67108863
-dd	134217727
-dd	268435455
-dd	536870911
-dd	1073741823
-dd	2147483647
-dd	4294967295
-
-
-mode_state	 equ	0	;/* state->mode	*/
-wsize_state	 equ	(32+zlib1222sup)	;/* state->wsize */
-write_state	 equ	(36+4+zlib1222sup)	;/* state->write */
-window_state	 equ	(40+4+zlib1222sup)	;/* state->window */
-hold_state	 equ	(44+4+zlib1222sup)	;/* state->hold	*/
-bits_state	 equ	(48+4+zlib1222sup)	;/* state->bits	*/
-lencode_state	 equ	(64+4+zlib1222sup)	;/* state->lencode */
-distcode_state	 equ	(68+4+zlib1222sup)	;/* state->distcode */
-lenbits_state	 equ	(72+4+zlib1222sup)	;/* state->lenbits */
-distbits_state	 equ	(76+4+zlib1222sup)	;/* state->distbits */
-
-
-;;SECTION .text
-; 205 "inffast.S"
-;GLOBAL	inflate_fast_use_mmx
-
-;SECTION .data
-
-
-; GLOBAL inflate_fast_use_mmx:object
-;.size inflate_fast_use_mmx, 4
-; 226 "inffast.S"
-;SECTION .text
-
-ALIGN 4
-inflate_fast_entry:
-	push  edi
-	push  esi
-	push  ebp
-	push  ebx
-	pushfd
-	sub  esp,64
-	cld
-
-
-
-
-	mov  esi, [esp+88]
-	mov  edi, [esi+28]
-
-
-
-
-
-
-
-	mov  edx, [esi+4]
-	mov  eax, [esi+0]
-
-	add  edx,eax
-	sub  edx,11
-
-	mov  [esp+44],eax
-	mov  [esp+20],edx
-
-	mov  ebp, [esp+92]
-	mov  ecx, [esi+16]
-	mov  ebx, [esi+12]
-
-	sub  ebp,ecx
-	neg  ebp
-	add  ebp,ebx
-
-	sub  ecx,257
-	add  ecx,ebx
-
-	mov  [esp+60],ebx
-	mov  [esp+40],ebp
-	mov  [esp+16],ecx
-; 285 "inffast.S"
-	mov  eax, [edi+lencode_state]
-	mov  ecx, [edi+distcode_state]
-
-	mov  [esp+8],eax
-	mov  [esp+12],ecx
-
-	mov  eax,1
-	mov  ecx, [edi+lenbits_state]
-	shl  eax,cl
-	dec  eax
-	mov  [esp+0],eax
-
-	mov  eax,1
-	mov  ecx, [edi+distbits_state]
-	shl  eax,cl
-	dec  eax
-	mov  [esp+4],eax
-
-	mov  eax, [edi+wsize_state]
-	mov  ecx, [edi+write_state]
-	mov  edx, [edi+window_state]
-
-	mov  [esp+52],eax
-	mov  [esp+48],ecx
-	mov  [esp+56],edx
-
-	mov  ebp, [edi+hold_state]
-	mov  ebx, [edi+bits_state]
-; 321 "inffast.S"
-	mov  esi, [esp+44]
-	mov  ecx, [esp+20]
-	cmp  ecx,esi
-	ja   L_align_long
-
-	add  ecx,11
-	sub  ecx,esi
-	mov  eax,12
-	sub  eax,ecx
-	lea  edi, [esp+28]
-	rep movsb
-	mov  ecx,eax
-	xor  eax,eax
-	rep stosb
-	lea  esi, [esp+28]
-	mov  [esp+20],esi
-	jmp  L_is_aligned
-
-
-L_align_long:
-	test  esi,3
-	jz   L_is_aligned
-	xor  eax,eax
-	mov  al, [esi]
-	inc  esi
-	mov  ecx,ebx
-	add  ebx,8
-	shl  eax,cl
-	or  ebp,eax
-	jmp L_align_long
-
-L_is_aligned:
-	mov  edi, [esp+60]
-; 366 "inffast.S"
-L_check_mmx:
-	cmp  dword ptr [inflate_fast_use_mmx],2
-	je   L_init_mmx
-	ja   L_do_loop
-
-	push  eax
-	push  ebx
-	push  ecx
-	push  edx
-	pushfd
-	mov  eax, [esp]
-	xor  dword ptr [esp],0200000h
-
-
-
-
-	popfd
-	pushfd
-	pop  edx
-	xor  edx,eax
-	jz   L_dont_use_mmx
-	xor  eax,eax
-	cpuid
-	cmp  ebx,0756e6547h
-	jne  L_dont_use_mmx
-	cmp  ecx,06c65746eh
-	jne  L_dont_use_mmx
-	cmp  edx,049656e69h
-	jne  L_dont_use_mmx
-	mov  eax,1
-	cpuid
-	shr  eax,8
-	and  eax,15
-	cmp  eax,6
-	jne  L_dont_use_mmx
-	test  edx,0800000h
-	jnz  L_use_mmx
-	jmp  L_dont_use_mmx
-L_use_mmx:
-	mov  dword ptr [inflate_fast_use_mmx],2
-	jmp  L_check_mmx_pop
-L_dont_use_mmx:
-	mov  dword ptr [inflate_fast_use_mmx],3
-L_check_mmx_pop:
-	pop  edx
-	pop  ecx
-	pop  ebx
-	pop  eax
-	jmp  L_check_mmx
-; 426 "inffast.S"
-ALIGN 4
-L_do_loop:
-; 437 "inffast.S"
-	cmp  bl,15
-	ja   L_get_length_code
-
-	xor  eax,eax
-	lodsw
-	mov  cl,bl
-	add  bl,16
-	shl  eax,cl
-	or  ebp,eax
-
-L_get_length_code:
-	mov  edx, [esp+0]
-	mov  ecx, [esp+8]
-	and  edx,ebp
-	mov  eax, [ecx+edx*4]
-
-L_dolen:
-
-
-
-
-
-
-	mov  cl,ah
-	sub  bl,ah
-	shr  ebp,cl
-
-
-
-
-
-
-	test  al,al
-	jnz   L_test_for_length_base
-
-	shr  eax,16
-	stosb
-
-L_while_test:
-
-
-	cmp  [esp+16],edi
-	jbe  L_break_loop
-
-	cmp  [esp+20],esi
-	ja   L_do_loop
-	jmp  L_break_loop
-
-L_test_for_length_base:
-; 502 "inffast.S"
-	mov  edx,eax
-	shr  edx,16
-	mov  cl,al
-
-	test  al,16
-	jz   L_test_for_second_level_length
-	and  cl,15
-	jz   L_save_len
-	cmp  bl,cl
-	jae  L_add_bits_to_len
-
-	mov  ch,cl
-	xor  eax,eax
-	lodsw
-	mov  cl,bl
-	add  bl,16
-	shl  eax,cl
-	or  ebp,eax
-	mov  cl,ch
-
-L_add_bits_to_len:
-	mov  eax,1
-	shl  eax,cl
-	dec  eax
-	sub  bl,cl
-	and  eax,ebp
-	shr  ebp,cl
-	add  edx,eax
-
-L_save_len:
-	mov  [esp+24],edx
-
-
-L_decode_distance:
-; 549 "inffast.S"
-	cmp  bl,15
-	ja   L_get_distance_code
-
-	xor  eax,eax
-	lodsw
-	mov  cl,bl
-	add  bl,16
-	shl  eax,cl
-	or  ebp,eax
-
-L_get_distance_code:
-	mov  edx, [esp+4]
-	mov  ecx, [esp+12]
-	and  edx,ebp
-	mov  eax, [ecx+edx*4]
-
-
-L_dodist:
-	mov  edx,eax
-	shr  edx,16
-	mov  cl,ah
-	sub  bl,ah
-	shr  ebp,cl
-; 584 "inffast.S"
-	mov  cl,al
-
-	test  al,16
-	jz  L_test_for_second_level_dist
-	and  cl,15
-	jz  L_check_dist_one
-	cmp  bl,cl
-	jae  L_add_bits_to_dist
-
-	mov  ch,cl
-	xor  eax,eax
-	lodsw
-	mov  cl,bl
-	add  bl,16
-	shl  eax,cl
-	or  ebp,eax
-	mov  cl,ch
-
-L_add_bits_to_dist:
-	mov  eax,1
-	shl  eax,cl
-	dec  eax
-	sub  bl,cl
-	and  eax,ebp
-	shr  ebp,cl
-	add  edx,eax
-	jmp  L_check_window
-
-L_check_window:
-; 625 "inffast.S"
-	mov  [esp+44],esi
-	mov  eax,edi
-	sub  eax, [esp+40]
-
-	cmp  eax,edx
-	jb   L_clip_window
-
-	mov  ecx, [esp+24]
-	mov  esi,edi
-	sub  esi,edx
-
-	sub  ecx,3
-	mov  al, [esi]
-	mov  [edi],al
-	mov  al, [esi+1]
-	mov  dl, [esi+2]
-	add  esi,3
-	mov  [edi+1],al
-	mov  [edi+2],dl
-	add  edi,3
-	rep movsb
-
-	mov  esi, [esp+44]
-	jmp  L_while_test
-
-ALIGN 4
-L_check_dist_one:
-	cmp  edx,1
-	jne  L_check_window
-	cmp  [esp+40],edi
-	je  L_check_window
-
-	dec  edi
-	mov  ecx, [esp+24]
-	mov  al, [edi]
-	sub  ecx,3
-
-	mov  [edi+1],al
-	mov  [edi+2],al
-	mov  [edi+3],al
-	add  edi,4
-	rep stosb
-
-	jmp  L_while_test
-
-ALIGN 4
-L_test_for_second_level_length:
-
-
-
-
-	test  al,64
-	jnz   L_test_for_end_of_block
-
-	mov  eax,1
-	shl  eax,cl
-	dec  eax
-	and  eax,ebp
-	add  eax,edx
-	mov  edx, [esp+8]
-	mov  eax, [edx+eax*4]
-	jmp  L_dolen
-
-ALIGN 4
-L_test_for_second_level_dist:
-
-
-
-
-	test  al,64
-	jnz   L_invalid_distance_code
-
-	mov  eax,1
-	shl  eax,cl
-	dec  eax
-	and  eax,ebp
-	add  eax,edx
-	mov  edx, [esp+12]
-	mov  eax, [edx+eax*4]
-	jmp  L_dodist
-
-ALIGN 4
-L_clip_window:
-; 721 "inffast.S"
-	mov  ecx,eax
-	mov  eax, [esp+52]
-	neg  ecx
-	mov  esi, [esp+56]
-
-	cmp  eax,edx
-	jb   L_invalid_distance_too_far
-
-	add  ecx,edx
-	cmp  dword ptr [esp+48],0
-	jne  L_wrap_around_window
-
-	sub  eax,ecx
-	add  esi,eax
-; 749 "inffast.S"
-	mov  eax, [esp+24]
-	cmp  eax,ecx
-	jbe  L_do_copy1
-
-	sub  eax,ecx
-	rep movsb
-	mov  esi,edi
-	sub  esi,edx
-	jmp  L_do_copy1
-
-	cmp  eax,ecx
-	jbe  L_do_copy1
-
-	sub  eax,ecx
-	rep movsb
-	mov  esi,edi
-	sub  esi,edx
-	jmp  L_do_copy1
-
-L_wrap_around_window:
-; 793 "inffast.S"
-	mov  eax, [esp+48]
-	cmp  ecx,eax
-	jbe  L_contiguous_in_window
-
-	add  esi, [esp+52]
-	add  esi,eax
-	sub  esi,ecx
-	sub  ecx,eax
-
-
-	mov  eax, [esp+24]
-	cmp  eax,ecx
-	jbe  L_do_copy1
-
-	sub  eax,ecx
-	rep movsb
-	mov  esi, [esp+56]
-	mov  ecx, [esp+48]
-	cmp  eax,ecx
-	jbe  L_do_copy1
-
-	sub  eax,ecx
-	rep movsb
-	mov  esi,edi
-	sub  esi,edx
-	jmp  L_do_copy1
-
-L_contiguous_in_window:
-; 836 "inffast.S"
-	add  esi,eax
-	sub  esi,ecx
-
-
-	mov  eax, [esp+24]
-	cmp  eax,ecx
-	jbe  L_do_copy1
-
-	sub  eax,ecx
-	rep movsb
-	mov  esi,edi
-	sub  esi,edx
-
-L_do_copy1:
-; 862 "inffast.S"
-	mov  ecx,eax
-	rep movsb
-
-	mov  esi, [esp+44]
-	jmp  L_while_test
-; 878 "inffast.S"
-ALIGN 4
-L_init_mmx:
-	emms
-
-
-
-
-
-	movd mm0,ebp
-	mov  ebp,ebx
-; 896 "inffast.S"
-	movd mm4,[esp+0]
-	movq mm3,mm4
-	movd mm5,[esp+4]
-	movq mm2,mm5
-	pxor mm1,mm1
-	mov  ebx, [esp+8]
-	jmp  L_do_loop_mmx
-
-ALIGN 4
-L_do_loop_mmx:
-	psrlq mm0,mm1
-
-	cmp  ebp,32
-	ja  L_get_length_code_mmx
-
-	movd mm6,ebp
-	movd mm7,[esi]
-	add  esi,4
-	psllq mm7,mm6
-	add  ebp,32
-	por mm0,mm7
-
-L_get_length_code_mmx:
-	pand mm4,mm0
-	movd eax,mm4
-	movq mm4,mm3
-	mov  eax, [ebx+eax*4]
-
-L_dolen_mmx:
-	movzx  ecx,ah
-	movd mm1,ecx
-	sub  ebp,ecx
-
-	test  al,al
-	jnz L_test_for_length_base_mmx
-
-	shr  eax,16
-	stosb
-
-L_while_test_mmx:
-
-
-	cmp  [esp+16],edi
-	jbe L_break_loop
-
-	cmp  [esp+20],esi
-	ja L_do_loop_mmx
-	jmp L_break_loop
-
-L_test_for_length_base_mmx:
-
-	mov  edx,eax
-	shr  edx,16
-
-	test  al,16
-	jz  L_test_for_second_level_length_mmx
-	and  eax,15
-	jz L_decode_distance_mmx
-
-	psrlq mm0,mm1
-	movd mm1,eax
-	movd ecx,mm0
-	sub  ebp,eax
-	and  ecx, [inflate_fast_mask+eax*4]
-	add  edx,ecx
-
-L_decode_distance_mmx:
-	psrlq mm0,mm1
-
-	cmp  ebp,32
-	ja L_get_dist_code_mmx
-
-	movd mm6,ebp
-	movd mm7,[esi]
-	add  esi,4
-	psllq mm7,mm6
-	add  ebp,32
-	por mm0,mm7
-
-L_get_dist_code_mmx:
-	mov  ebx, [esp+12]
-	pand mm5,mm0
-	movd eax,mm5
-	movq mm5,mm2
-	mov  eax, [ebx+eax*4]
-
-L_dodist_mmx:
-
-	movzx  ecx,ah
-	mov  ebx,eax
-	shr  ebx,16
-	sub  ebp,ecx
-	movd mm1,ecx
-
-	test  al,16
-	jz L_test_for_second_level_dist_mmx
-	and  eax,15
-	jz L_check_dist_one_mmx
-
-L_add_bits_to_dist_mmx:
-	psrlq mm0,mm1
-	movd mm1,eax
-	movd ecx,mm0
-	sub  ebp,eax
-	and  ecx, [inflate_fast_mask+eax*4]
-	add  ebx,ecx
-
-L_check_window_mmx:
-	mov  [esp+44],esi
-	mov  eax,edi
-	sub  eax, [esp+40]
-
-	cmp  eax,ebx
-	jb L_clip_window_mmx
-
-	mov  ecx,edx
-	mov  esi,edi
-	sub  esi,ebx
-
-	sub  ecx,3
-	mov  al, [esi]
-	mov  [edi],al
-	mov  al, [esi+1]
-	mov  dl, [esi+2]
-	add  esi,3
-	mov  [edi+1],al
-	mov  [edi+2],dl
-	add  edi,3
-	rep movsb
-
-	mov  esi, [esp+44]
-	mov  ebx, [esp+8]
-	jmp  L_while_test_mmx
-
-ALIGN 4
-L_check_dist_one_mmx:
-	cmp  ebx,1
-	jne  L_check_window_mmx
-	cmp  [esp+40],edi
-	je   L_check_window_mmx
-
-	dec  edi
-	mov  ecx,edx
-	mov  al, [edi]
-	sub  ecx,3
-
-	mov  [edi+1],al
-	mov  [edi+2],al
-	mov  [edi+3],al
-	add  edi,4
-	rep stosb
-
-	mov  ebx, [esp+8]
-	jmp  L_while_test_mmx
-
-ALIGN 4
-L_test_for_second_level_length_mmx:
-	test  al,64
-	jnz L_test_for_end_of_block
-
-	and  eax,15
-	psrlq mm0,mm1
-	movd ecx,mm0
-	and  ecx, [inflate_fast_mask+eax*4]
-	add  ecx,edx
-	mov  eax, [ebx+ecx*4]
-	jmp L_dolen_mmx
-
-ALIGN 4
-L_test_for_second_level_dist_mmx:
-	test  al,64
-	jnz L_invalid_distance_code
-
-	and  eax,15
-	psrlq mm0,mm1
-	movd ecx,mm0
-	and  ecx, [inflate_fast_mask+eax*4]
-	mov  eax, [esp+12]
-	add  ecx,ebx
-	mov  eax, [eax+ecx*4]
-	jmp  L_dodist_mmx
-
-ALIGN 4
-L_clip_window_mmx:
-
-	mov  ecx,eax
-	mov  eax, [esp+52]
-	neg  ecx
-	mov  esi, [esp+56]
-
-	cmp  eax,ebx
-	jb  L_invalid_distance_too_far
-
-	add  ecx,ebx
-	cmp  dword ptr [esp+48],0
-	jne  L_wrap_around_window_mmx
-
-	sub  eax,ecx
-	add  esi,eax
-
-	cmp  edx,ecx
-	jbe  L_do_copy1_mmx
-
-	sub  edx,ecx
-	rep movsb
-	mov  esi,edi
-	sub  esi,ebx
-	jmp  L_do_copy1_mmx
-
-	cmp  edx,ecx
-	jbe  L_do_copy1_mmx
-
-	sub  edx,ecx
-	rep movsb
-	mov  esi,edi
-	sub  esi,ebx
-	jmp  L_do_copy1_mmx
-
-L_wrap_around_window_mmx:
-
-	mov  eax, [esp+48]
-	cmp  ecx,eax
-	jbe  L_contiguous_in_window_mmx
-
-	add  esi, [esp+52]
-	add  esi,eax
-	sub  esi,ecx
-	sub  ecx,eax
-
-
-	cmp  edx,ecx
-	jbe  L_do_copy1_mmx
-
-	sub  edx,ecx
-	rep movsb
-	mov  esi, [esp+56]
-	mov  ecx, [esp+48]
-	cmp  edx,ecx
-	jbe  L_do_copy1_mmx
-
-	sub  edx,ecx
-	rep movsb
-	mov  esi,edi
-	sub  esi,ebx
-	jmp  L_do_copy1_mmx
-
-L_contiguous_in_window_mmx:
-
-	add  esi,eax
-	sub  esi,ecx
-
-
-	cmp  edx,ecx
-	jbe  L_do_copy1_mmx
-
-	sub  edx,ecx
-	rep movsb
-	mov  esi,edi
-	sub  esi,ebx
-
-L_do_copy1_mmx:
-
-
-	mov  ecx,edx
-	rep movsb
-
-	mov  esi, [esp+44]
-	mov  ebx, [esp+8]
-	jmp  L_while_test_mmx
-; 1174 "inffast.S"
-L_invalid_distance_code:
-
-
-
-
-
-	mov  ecx, invalid_distance_code_msg
-	mov  edx,INFLATE_MODE_BAD
-	jmp  L_update_stream_state
-
-L_test_for_end_of_block:
-
-
-
-
-
-	test  al,32
-	jz  L_invalid_literal_length_code
-
-	mov  ecx,0
-	mov  edx,INFLATE_MODE_TYPE
-	jmp  L_update_stream_state
-
-L_invalid_literal_length_code:
-
-
-
-
-
-	mov  ecx, invalid_literal_length_code_msg
-	mov  edx,INFLATE_MODE_BAD
-	jmp  L_update_stream_state
-
-L_invalid_distance_too_far:
-
-
-
-	mov  esi, [esp+44]
-	mov  ecx, invalid_distance_too_far_msg
-	mov  edx,INFLATE_MODE_BAD
-	jmp  L_update_stream_state
-
-L_update_stream_state:
-
-	mov  eax, [esp+88]
-	test  ecx,ecx
-	jz  L_skip_msg
-	mov  [eax+24],ecx
-L_skip_msg:
-	mov  eax, [eax+28]
-	mov  [eax+mode_state],edx
-	jmp  L_break_loop
-
-ALIGN 4
-L_break_loop:
-; 1243 "inffast.S"
-	cmp  dword ptr [inflate_fast_use_mmx],2
-	jne  L_update_next_in
-
-
-
-	mov  ebx,ebp
-
-L_update_next_in:
-; 1266 "inffast.S"
-	mov  eax, [esp+88]
-	mov  ecx,ebx
-	mov  edx, [eax+28]
-	shr  ecx,3
-	sub  esi,ecx
-	shl  ecx,3
-	sub  ebx,ecx
-	mov  [eax+12],edi
-	mov  [edx+bits_state],ebx
-	mov  ecx,ebx
-
-	lea  ebx, [esp+28]
-	cmp  [esp+20],ebx
-	jne  L_buf_not_used
-
-	sub  esi,ebx
-	mov  ebx, [eax+0]
-	mov  [esp+20],ebx
-	add  esi,ebx
-	mov  ebx, [eax+4]
-	sub  ebx,11
-	add  [esp+20],ebx
-
-L_buf_not_used:
-	mov  [eax+0],esi
-
-	mov  ebx,1
-	shl  ebx,cl
-	dec  ebx
-
-
-
-
-
-	cmp  dword ptr [inflate_fast_use_mmx],2
-	jne  L_update_hold
-
-
-
-	psrlq mm0,mm1
-	movd ebp,mm0
-
-	emms
-
-L_update_hold:
-
-
-
-	and  ebp,ebx
-	mov  [edx+hold_state],ebp
-
-
-
-
-	mov  ebx, [esp+20]
-	cmp  ebx,esi
-	jbe  L_last_is_smaller
-
-	sub  ebx,esi
-	add  ebx,11
-	mov  [eax+4],ebx
-	jmp  L_fixup_out
-L_last_is_smaller:
-	sub  esi,ebx
-	neg  esi
-	add  esi,11
-	mov  [eax+4],esi
-
-
-
-
-L_fixup_out:
-
-	mov  ebx, [esp+16]
-	cmp  ebx,edi
-	jbe  L_end_is_smaller
-
-	sub  ebx,edi
-	add  ebx,257
-	mov  [eax+16],ebx
-	jmp  L_done
-L_end_is_smaller:
-	sub  edi,ebx
-	neg  edi
-	add  edi,257
-	mov  [eax+16],edi
-
-
-
-
-
-L_done:
-	add  esp,64
-	popfd
-	pop  ebx
-	pop  ebp
-	pop  esi
-	pop  edi
-	ret
-
-_TEXT	ends
-end
Index: trunk/minix/lib/zlib-1.2.3/contrib/masmx86/mkasm.bat
===================================================================
--- trunk/minix/lib/zlib-1.2.3/contrib/masmx86/mkasm.bat	(revision 9)
+++ 	(revision )
@@ -1,3 +1,0 @@
-cl /DASMV /I..\.. /O2 /c gvmat32c.c
-ml /coff /Zi /c /Flgvmat32.lst gvmat32.asm
-ml /coff /Zi /c /Flinffas32.lst inffas32.asm
Index: trunk/minix/lib/zlib-1.2.3/contrib/masmx86/readme.txt
===================================================================
--- trunk/minix/lib/zlib-1.2.3/contrib/masmx86/readme.txt	(revision 9)
+++ 	(revision )
@@ -1,21 +1,0 @@
-
-Summary
--------
-This directory contains ASM implementations of the functions
-longest_match() and inflate_fast().
-
-
-Use instructions
-----------------
-Copy these files into the zlib source directory, then run the
-appropriate makefile, as suggested below.
-
-
-Build instructions
-------------------
-* With Microsoft C and MASM:
-nmake -f win32/Makefile.msc LOC="-DASMV -DASMINF" OBJA="gvmat32c.obj gvmat32.obj inffas32.obj"
-
-* With Borland C and TASM:
-make -f win32/Makefile.bor LOCAL_ZLIB="-DASMV -DASMINF" OBJA="gvmat32c.obj gvmat32.obj inffas32.obj" OBJPA="+gvmat32c.obj+gvmat32.obj+inffas32.obj"
-
Index: trunk/minix/lib/zlib-1.2.3/contrib/minizip/ChangeLogUnzip
===================================================================
--- trunk/minix/lib/zlib-1.2.3/contrib/minizip/ChangeLogUnzip	(revision 9)
+++ 	(revision )
@@ -1,67 +1,0 @@
-Change in 1.01e (12 feb 05)
-- Fix in zipOpen2 for globalcomment (Rolf Kalbermatter)
-- Fix possible memory leak in unzip.c (Zoran Stevanovic)
-
-Change in 1.01b (20 may 04)
-- Integrate patch from Debian package (submited by Mark Brown)
-- Add tools mztools from Xavier Roche
-
-Change in 1.01 (8 may 04)
-- fix buffer overrun risk in unzip.c (Xavier Roche)
-- fix a minor buffer insecurity in minizip.c (Mike Whittaker)
-
-Change in 1.00: (10 sept 03)
-- rename to 1.00
-- cosmetic code change
-
-Change in 0.22: (19 May 03)
-- crypting support (unless you define NOCRYPT)
-- append file in existing zipfile
-
-Change in 0.21: (10 Mar 03)
-- bug fixes
-
-Change in 0.17: (27 Jan 02)
-- bug fixes
-
-Change in 0.16: (19 Jan 02)
-- Support of ioapi for virtualize zip file access
-
-Change in 0.15: (19 Mar 98)
-- fix memory leak in minizip.c
-
-Change in 0.14: (10 Mar 98)
-- fix bugs in minizip.c sample for zipping big file
-- fix problem in month in date handling
-- fix bug in unzlocal_GetCurrentFileInfoInternal in unzip.c for
-    comment handling
-
-Change in 0.13: (6 Mar 98)
-- fix bugs in zip.c
-- add real minizip sample
-
-Change in 0.12: (4 Mar 98)
-- add zip.c and zip.h for creates .zip file
-- fix change_file_date in miniunz.c for Unix (Jean-loup Gailly)
-- fix miniunz.c for file without specific record for directory
-
-Change in 0.11: (3 Mar 98)
-- fix bug in unzGetCurrentFileInfo for get extra field and comment
-- enhance miniunz sample, remove the bad unztst.c sample
-
-Change in 0.10: (2 Mar 98)
-- fix bug in unzReadCurrentFile
-- rename unzip* to unz* function and structure
-- remove Windows-like hungary notation variable name
-- modify some structure in unzip.h
-- add somes comment in source
-- remove unzipGetcCurrentFile function
-- replace ZUNZEXPORT by ZEXPORT
-- add unzGetLocalExtrafield for get the local extrafield info
-- add a new sample, miniunz.c
-
-Change in 0.4: (25 Feb 98)
-- suppress the type unzipFileInZip.
-  Only on file in the zipfile can be open at the same time
-- fix somes typo in code
-- added tm_unz structure in unzip_file_info (date/time in readable format)
Index: trunk/minix/lib/zlib-1.2.3/contrib/minizip/Makefile
===================================================================
--- trunk/minix/lib/zlib-1.2.3/contrib/minizip/Makefile	(revision 9)
+++ 	(revision )
@@ -1,25 +1,0 @@
-CC=cc
-CFLAGS=-O -I../..
-
-UNZ_OBJS = miniunz.o unzip.o ioapi.o ../../libz.a
-ZIP_OBJS = minizip.o zip.o   ioapi.o ../../libz.a
-
-.c.o:
-	$(CC) -c $(CFLAGS) $*.c
-
-all: miniunz minizip
-
-miniunz:  $(UNZ_OBJS)
-	$(CC) $(CFLAGS) -o $@ $(UNZ_OBJS)
-
-minizip:  $(ZIP_OBJS)
-	$(CC) $(CFLAGS) -o $@ $(ZIP_OBJS)
-
-test:	miniunz minizip
-	./minizip test readme.txt
-	./miniunz -l test.zip
-	mv readme.txt readme.old
-	./miniunz test.zip
-
-clean:
-	/bin/rm -f *.o *~ minizip miniunz
Index: trunk/minix/lib/zlib-1.2.3/contrib/minizip/crypt.h
===================================================================
--- trunk/minix/lib/zlib-1.2.3/contrib/minizip/crypt.h	(revision 9)
+++ 	(revision )
@@ -1,132 +1,0 @@
-/* crypt.h -- base code for crypt/uncrypt ZIPfile
-
-
-   Version 1.01e, February 12th, 2005
-
-   Copyright (C) 1998-2005 Gilles Vollant
-
-   This code is a modified version of crypting code in Infozip distribution
-
-   The encryption/decryption parts of this source code (as opposed to the
-   non-echoing password parts) were originally written in Europe.  The
-   whole source package can be freely distributed, including from the USA.
-   (Prior to January 2000, re-export from the US was a violation of US law.)
-
-   This encryption code is a direct transcription of the algorithm from
-   Roger Schlafly, described by Phil Katz in the file appnote.txt.  This
-   file (appnote.txt) is distributed with the PKZIP program (even in the
-   version without encryption capabilities).
-
-   If you don't need crypting in your application, just define symbols
-   NOCRYPT and NOUNCRYPT.
-
-   This code support the "Traditional PKWARE Encryption".
-
-   The new AES encryption added on Zip format by Winzip (see the page
-   http://www.winzip.com/aes_info.htm ) and PKWare PKZip 5.x Strong
-   Encryption is not supported.
-*/
-
-#define CRC32(c, b) ((*(pcrc_32_tab+(((int)(c) ^ (b)) & 0xff))) ^ ((c) >> 8))
-
-/***********************************************************************
- * Return the next byte in the pseudo-random sequence
- */
-static int decrypt_byte(unsigned long* pkeys, const unsigned long* pcrc_32_tab)
-{
-    unsigned temp;  /* POTENTIAL BUG:  temp*(temp^1) may overflow in an
-                     * unpredictable manner on 16-bit systems; not a problem
-                     * with any known compiler so far, though */
-
-    temp = ((unsigned)(*(pkeys+2)) & 0xffff) | 2;
-    return (int)(((temp * (temp ^ 1)) >> 8) & 0xff);
-}
-
-/***********************************************************************
- * Update the encryption keys with the next byte of plain text
- */
-static int update_keys(unsigned long* pkeys,const unsigned long* pcrc_32_tab,int c)
-{
-    (*(pkeys+0)) = CRC32((*(pkeys+0)), c);
-    (*(pkeys+1)) += (*(pkeys+0)) & 0xff;
-    (*(pkeys+1)) = (*(pkeys+1)) * 134775813L + 1;
-    {
-      register int keyshift = (int)((*(pkeys+1)) >> 24);
-      (*(pkeys+2)) = CRC32((*(pkeys+2)), keyshift);
-    }
-    return c;
-}
-
-
-/***********************************************************************
- * Initialize the encryption keys and the random header according to
- * the given password.
- */
-static void init_keys(const char* passwd,unsigned long* pkeys,const unsigned long* pcrc_32_tab)
-{
-    *(pkeys+0) = 305419896L;
-    *(pkeys+1) = 591751049L;
-    *(pkeys+2) = 878082192L;
-    while (*passwd != '\0') {
-        update_keys(pkeys,pcrc_32_tab,(int)*passwd);
-        passwd++;
-    }
-}
-
-#define zdecode(pkeys,pcrc_32_tab,c) \
-    (update_keys(pkeys,pcrc_32_tab,c ^= decrypt_byte(pkeys,pcrc_32_tab)))
-
-#define zencode(pkeys,pcrc_32_tab,c,t) \
-    (t=decrypt_byte(pkeys,pcrc_32_tab), update_keys(pkeys,pcrc_32_tab,c), t^(c))
-
-#ifdef INCLUDECRYPTINGCODE_IFCRYPTALLOWED
-
-#define RAND_HEAD_LEN  12
-   /* "last resort" source for second part of crypt seed pattern */
-#  ifndef ZCR_SEED2
-#    define ZCR_SEED2 3141592654UL     /* use PI as default pattern */
-#  endif
-
-static int crypthead(passwd, buf, bufSize, pkeys, pcrc_32_tab, crcForCrypting)
-    const char *passwd;         /* password string */
-    unsigned char *buf;         /* where to write header */
-    int bufSize;
-    unsigned long* pkeys;
-    const unsigned long* pcrc_32_tab;
-    unsigned long crcForCrypting;
-{
-    int n;                       /* index in random header */
-    int t;                       /* temporary */
-    int c;                       /* random byte */
-    unsigned char header[RAND_HEAD_LEN-2]; /* random header */
-    static unsigned calls = 0;   /* ensure different random header each time */
-
-    if (bufSize<RAND_HEAD_LEN)
-      return 0;
-
-    /* First generate RAND_HEAD_LEN-2 random bytes. We encrypt the
-     * output of rand() to get less predictability, since rand() is
-     * often poorly implemented.
-     */
-    if (++calls == 1)
-    {
-        srand((unsigned)(time(NULL) ^ ZCR_SEED2));
-    }
-    init_keys(passwd, pkeys, pcrc_32_tab);
-    for (n = 0; n < RAND_HEAD_LEN-2; n++)
-    {
-        c = (rand() >> 7) & 0xff;
-        header[n] = (unsigned char)zencode(pkeys, pcrc_32_tab, c, t);
-    }
-    /* Encrypt random header (last two bytes is high word of crc) */
-    init_keys(passwd, pkeys, pcrc_32_tab);
-    for (n = 0; n < RAND_HEAD_LEN-2; n++)
-    {
-        buf[n] = (unsigned char)zencode(pkeys, pcrc_32_tab, header[n], t);
-    }
-    buf[n++] = zencode(pkeys, pcrc_32_tab, (int)(crcForCrypting >> 16) & 0xff, t);
-    buf[n++] = zencode(pkeys, pcrc_32_tab, (int)(crcForCrypting >> 24) & 0xff, t);
-    return n;
-}
-
-#endif
Index: trunk/minix/lib/zlib-1.2.3/contrib/minizip/ioapi.c
===================================================================
--- trunk/minix/lib/zlib-1.2.3/contrib/minizip/ioapi.c	(revision 9)
+++ 	(revision )
@@ -1,177 +1,0 @@
-/* ioapi.c -- IO base function header for compress/uncompress .zip
-   files using zlib + zip or unzip API
-
-   Version 1.01e, February 12th, 2005
-
-   Copyright (C) 1998-2005 Gilles Vollant
-*/
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-
-#include "zlib.h"
-#include "ioapi.h"
-
-
-
-/* I've found an old Unix (a SunOS 4.1.3_U1) without all SEEK_* defined.... */
-
-#ifndef SEEK_CUR
-#define SEEK_CUR    1
-#endif
-
-#ifndef SEEK_END
-#define SEEK_END    2
-#endif
-
-#ifndef SEEK_SET
-#define SEEK_SET    0
-#endif
-
-voidpf ZCALLBACK fopen_file_func OF((
-   voidpf opaque,
-   const char* filename,
-   int mode));
-
-uLong ZCALLBACK fread_file_func OF((
-   voidpf opaque,
-   voidpf stream,
-   void* buf,
-   uLong size));
-
-uLong ZCALLBACK fwrite_file_func OF((
-   voidpf opaque,
-   voidpf stream,
-   const void* buf,
-   uLong size));
-
-long ZCALLBACK ftell_file_func OF((
-   voidpf opaque,
-   voidpf stream));
-
-long ZCALLBACK fseek_file_func OF((
-   voidpf opaque,
-   voidpf stream,
-   uLong offset,
-   int origin));
-
-int ZCALLBACK fclose_file_func OF((
-   voidpf opaque,
-   voidpf stream));
-
-int ZCALLBACK ferror_file_func OF((
-   voidpf opaque,
-   voidpf stream));
-
-
-voidpf ZCALLBACK fopen_file_func (opaque, filename, mode)
-   voidpf opaque;
-   const char* filename;
-   int mode;
-{
-    FILE* file = NULL;
-    const char* mode_fopen = NULL;
-    if ((mode & ZLIB_FILEFUNC_MODE_READWRITEFILTER)==ZLIB_FILEFUNC_MODE_READ)
-        mode_fopen = "rb";
-    else
-    if (mode & ZLIB_FILEFUNC_MODE_EXISTING)
-        mode_fopen = "r+b";
-    else
-    if (mode & ZLIB_FILEFUNC_MODE_CREATE)
-        mode_fopen = "wb";
-
-    if ((filename!=NULL) && (mode_fopen != NULL))
-        file = fopen(filename, mode_fopen);
-    return file;
-}
-
-
-uLong ZCALLBACK fread_file_func (opaque, stream, buf, size)
-   voidpf opaque;
-   voidpf stream;
-   void* buf;
-   uLong size;
-{
-    uLong ret;
-    ret = (uLong)fread(buf, 1, (size_t)size, (FILE *)stream);
-    return ret;
-}
-
-
-uLong ZCALLBACK fwrite_file_func (opaque, stream, buf, size)
-   voidpf opaque;
-   voidpf stream;
-   const void* buf;
-   uLong size;
-{
-    uLong ret;
-    ret = (uLong)fwrite(buf, 1, (size_t)size, (FILE *)stream);
-    return ret;
-}
-
-long ZCALLBACK ftell_file_func (opaque, stream)
-   voidpf opaque;
-   voidpf stream;
-{
-    long ret;
-    ret = ftell((FILE *)stream);
-    return ret;
-}
-
-long ZCALLBACK fseek_file_func (opaque, stream, offset, origin)
-   voidpf opaque;
-   voidpf stream;
-   uLong offset;
-   int origin;
-{
-    int fseek_origin=0;
-    long ret;
-    switch (origin)
-    {
-    case ZLIB_FILEFUNC_SEEK_CUR :
-        fseek_origin = SEEK_CUR;
-        break;
-    case ZLIB_FILEFUNC_SEEK_END :
-        fseek_origin = SEEK_END;
-        break;
-    case ZLIB_FILEFUNC_SEEK_SET :
-        fseek_origin = SEEK_SET;
-        break;
-    default: return -1;
-    }
-    ret = 0;
-    fseek((FILE *)stream, offset, fseek_origin);
-    return ret;
-}
-
-int ZCALLBACK fclose_file_func (opaque, stream)
-   voidpf opaque;
-   voidpf stream;
-{
-    int ret;
-    ret = fclose((FILE *)stream);
-    return ret;
-}
-
-int ZCALLBACK ferror_file_func (opaque, stream)
-   voidpf opaque;
-   voidpf stream;
-{
-    int ret;
-    ret = ferror((FILE *)stream);
-    return ret;
-}
-
-void fill_fopen_filefunc (pzlib_filefunc_def)
-  zlib_filefunc_def* pzlib_filefunc_def;
-{
-    pzlib_filefunc_def->zopen_file = fopen_file_func;
-    pzlib_filefunc_def->zread_file = fread_file_func;
-    pzlib_filefunc_def->zwrite_file = fwrite_file_func;
-    pzlib_filefunc_def->ztell_file = ftell_file_func;
-    pzlib_filefunc_def->zseek_file = fseek_file_func;
-    pzlib_filefunc_def->zclose_file = fclose_file_func;
-    pzlib_filefunc_def->zerror_file = ferror_file_func;
-    pzlib_filefunc_def->opaque = NULL;
-}
Index: trunk/minix/lib/zlib-1.2.3/contrib/minizip/ioapi.h
===================================================================
--- trunk/minix/lib/zlib-1.2.3/contrib/minizip/ioapi.h	(revision 9)
+++ 	(revision )
@@ -1,75 +1,0 @@
-/* ioapi.h -- IO base function header for compress/uncompress .zip
-   files using zlib + zip or unzip API
-
-   Version 1.01e, February 12th, 2005
-
-   Copyright (C) 1998-2005 Gilles Vollant
-*/
-
-#ifndef _ZLIBIOAPI_H
-#define _ZLIBIOAPI_H
-
-
-#define ZLIB_FILEFUNC_SEEK_CUR (1)
-#define ZLIB_FILEFUNC_SEEK_END (2)
-#define ZLIB_FILEFUNC_SEEK_SET (0)
-
-#define ZLIB_FILEFUNC_MODE_READ      (1)
-#define ZLIB_FILEFUNC_MODE_WRITE     (2)
-#define ZLIB_FILEFUNC_MODE_READWRITEFILTER (3)
-
-#define ZLIB_FILEFUNC_MODE_EXISTING (4)
-#define ZLIB_FILEFUNC_MODE_CREATE   (8)
-
-
-#ifndef ZCALLBACK
-
-#if (defined(WIN32) || defined (WINDOWS) || defined (_WINDOWS)) && defined(CALLBACK) && defined (USEWINDOWS_CALLBACK)
-#define ZCALLBACK CALLBACK
-#else
-#define ZCALLBACK
-#endif
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-typedef voidpf (ZCALLBACK *open_file_func) OF((voidpf opaque, const char* filename, int mode));
-typedef uLong  (ZCALLBACK *read_file_func) OF((voidpf opaque, voidpf stream, void* buf, uLong size));
-typedef uLong  (ZCALLBACK *write_file_func) OF((voidpf opaque, voidpf stream, const void* buf, uLong size));
-typedef long   (ZCALLBACK *tell_file_func) OF((voidpf opaque, voidpf stream));
-typedef long   (ZCALLBACK *seek_file_func) OF((voidpf opaque, voidpf stream, uLong offset, int origin));
-typedef int    (ZCALLBACK *close_file_func) OF((voidpf opaque, voidpf stream));
-typedef int    (ZCALLBACK *testerror_file_func) OF((voidpf opaque, voidpf stream));
-
-typedef struct zlib_filefunc_def_s
-{
-    open_file_func      zopen_file;
-    read_file_func      zread_file;
-    write_file_func     zwrite_file;
-    tell_file_func      ztell_file;
-    seek_file_func      zseek_file;
-    close_file_func     zclose_file;
-    testerror_file_func zerror_file;
-    voidpf              opaque;
-} zlib_filefunc_def;
-
-
-
-void fill_fopen_filefunc OF((zlib_filefunc_def* pzlib_filefunc_def));
-
-#define ZREAD(filefunc,filestream,buf,size) ((*((filefunc).zread_file))((filefunc).opaque,filestream,buf,size))
-#define ZWRITE(filefunc,filestream,buf,size) ((*((filefunc).zwrite_file))((filefunc).opaque,filestream,buf,size))
-#define ZTELL(filefunc,filestream) ((*((filefunc).ztell_file))((filefunc).opaque,filestream))
-#define ZSEEK(filefunc,filestream,pos,mode) ((*((filefunc).zseek_file))((filefunc).opaque,filestream,pos,mode))
-#define ZCLOSE(filefunc,filestream) ((*((filefunc).zclose_file))((filefunc).opaque,filestream))
-#define ZERROR(filefunc,filestream) ((*((filefunc).zerror_file))((filefunc).opaque,filestream))
-
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif
-
Index: trunk/minix/lib/zlib-1.2.3/contrib/minizip/iowin32.c
===================================================================
--- trunk/minix/lib/zlib-1.2.3/contrib/minizip/iowin32.c	(revision 9)
+++ 	(revision )
@@ -1,270 +1,0 @@
-/* iowin32.c -- IO base function header for compress/uncompress .zip
-   files using zlib + zip or unzip API
-   This IO API version uses the Win32 API (for Microsoft Windows)
-
-   Version 1.01e, February 12th, 2005
-
-   Copyright (C) 1998-2005 Gilles Vollant
-*/
-
-#include <stdlib.h>
-
-#include "zlib.h"
-#include "ioapi.h"
-#include "iowin32.h"
-
-#ifndef INVALID_HANDLE_VALUE
-#define INVALID_HANDLE_VALUE (0xFFFFFFFF)
-#endif
-
-#ifndef INVALID_SET_FILE_POINTER
-#define INVALID_SET_FILE_POINTER ((DWORD)-1)
-#endif
-
-voidpf ZCALLBACK win32_open_file_func OF((
-   voidpf opaque,
-   const char* filename,
-   int mode));
-
-uLong ZCALLBACK win32_read_file_func OF((
-   voidpf opaque,
-   voidpf stream,
-   void* buf,
-   uLong size));
-
-uLong ZCALLBACK win32_write_file_func OF((
-   voidpf opaque,
-   voidpf stream,
-   const void* buf,
-   uLong size));
-
-long ZCALLBACK win32_tell_file_func OF((
-   voidpf opaque,
-   voidpf stream));
-
-long ZCALLBACK win32_seek_file_func OF((
-   voidpf opaque,
-   voidpf stream,
-   uLong offset,
-   int origin));
-
-int ZCALLBACK win32_close_file_func OF((
-   voidpf opaque,
-   voidpf stream));
-
-int ZCALLBACK win32_error_file_func OF((
-   voidpf opaque,
-   voidpf stream));
-
-typedef struct
-{
-    HANDLE hf;
-    int error;
-} WIN32FILE_IOWIN;
-
-voidpf ZCALLBACK win32_open_file_func (opaque, filename, mode)
-   voidpf opaque;
-   const char* filename;
-   int mode;
-{
-    const char* mode_fopen = NULL;
-    DWORD dwDesiredAccess,dwCreationDisposition,dwShareMode,dwFlagsAndAttributes ;
-    HANDLE hFile = 0;
-    voidpf ret=NULL;
-
-    dwDesiredAccess = dwShareMode = dwFlagsAndAttributes = 0;
-
-    if ((mode & ZLIB_FILEFUNC_MODE_READWRITEFILTER)==ZLIB_FILEFUNC_MODE_READ)
-    {
-        dwDesiredAccess = GENERIC_READ;
-        dwCreationDisposition = OPEN_EXISTING;
-        dwShareMode = FILE_SHARE_READ;
-    }
-    else
-    if (mode & ZLIB_FILEFUNC_MODE_EXISTING)
-    {
-        dwDesiredAccess = GENERIC_WRITE | GENERIC_READ;
-        dwCreationDisposition = OPEN_EXISTING;
-    }
-    else
-    if (mode & ZLIB_FILEFUNC_MODE_CREATE)
-    {
-        dwDesiredAccess = GENERIC_WRITE | GENERIC_READ;
-        dwCreationDisposition = CREATE_ALWAYS;
-    }
-
-    if ((filename!=NULL) && (dwDesiredAccess != 0))
-        hFile = CreateFile((LPCTSTR)filename, dwDesiredAccess, dwShareMode, NULL,
-                      dwCreationDisposition, dwFlagsAndAttributes, NULL);
-
-    if (hFile == INVALID_HANDLE_VALUE)
-        hFile = NULL;
-
-    if (hFile != NULL)
-    {
-        WIN32FILE_IOWIN w32fiow;
-        w32fiow.hf = hFile;
-        w32fiow.error = 0;
-        ret = malloc(sizeof(WIN32FILE_IOWIN));
-        if (ret==NULL)
-            CloseHandle(hFile);
-        else *((WIN32FILE_IOWIN*)ret) = w32fiow;
-    }
-    return ret;
-}
-
-
-uLong ZCALLBACK win32_read_file_func (opaque, stream, buf, size)
-   voidpf opaque;
-   voidpf stream;
-   void* buf;
-   uLong size;
-{
-    uLong ret=0;
-    HANDLE hFile = NULL;
-    if (stream!=NULL)
-        hFile = ((WIN32FILE_IOWIN*)stream) -> hf;
-    if (hFile != NULL)
-        if (!ReadFile(hFile, buf, size, &ret, NULL))
-        {
-            DWORD dwErr = GetLastError();
-            if (dwErr == ERROR_HANDLE_EOF)
-                dwErr = 0;
-            ((WIN32FILE_IOWIN*)stream) -> error=(int)dwErr;
-        }
-
-    return ret;
-}
-
-
-uLong ZCALLBACK win32_write_file_func (opaque, stream, buf, size)
-   voidpf opaque;
-   voidpf stream;
-   const void* buf;
-   uLong size;
-{
-    uLong ret=0;
-    HANDLE hFile = NULL;
-    if (stream!=NULL)
-        hFile = ((WIN32FILE_IOWIN*)stream) -> hf;
-
-    if (hFile !=NULL)
-        if (!WriteFile(hFile, buf, size, &ret, NULL))
-        {
-            DWORD dwErr = GetLastError();
-            if (dwErr == ERROR_HANDLE_EOF)
-                dwErr = 0;
-            ((WIN32FILE_IOWIN*)stream) -> error=(int)dwErr;
-        }
-
-    return ret;
-}
-
-long ZCALLBACK win32_tell_file_func (opaque, stream)
-   voidpf opaque;
-   voidpf stream;
-{
-    long ret=-1;
-    HANDLE hFile = NULL;
-    if (stream!=NULL)
-        hFile = ((WIN32FILE_IOWIN*)stream) -> hf;
-    if (hFile != NULL)
-    {
-        DWORD dwSet = SetFilePointer(hFile, 0, NULL, FILE_CURRENT);
-        if (dwSet == INVALID_SET_FILE_POINTER)
-        {
-            DWORD dwErr = GetLastError();
-            ((WIN32FILE_IOWIN*)stream) -> error=(int)dwErr;
-            ret = -1;
-        }
-        else
-            ret=(long)dwSet;
-    }
-    return ret;
-}
-
-long ZCALLBACK win32_seek_file_func (opaque, stream, offset, origin)
-   voidpf opaque;
-   voidpf stream;
-   uLong offset;
-   int origin;
-{
-    DWORD dwMoveMethod=0xFFFFFFFF;
-    HANDLE hFile = NULL;
-
-    long ret=-1;
-    if (stream!=NULL)
-        hFile = ((WIN32FILE_IOWIN*)stream) -> hf;
-    switch (origin)
-    {
-    case ZLIB_FILEFUNC_SEEK_CUR :
-        dwMoveMethod = FILE_CURRENT;
-        break;
-    case ZLIB_FILEFUNC_SEEK_END :
-        dwMoveMethod = FILE_END;
-        break;
-    case ZLIB_FILEFUNC_SEEK_SET :
-        dwMoveMethod = FILE_BEGIN;
-        break;
-    default: return -1;
-    }
-
-    if (hFile != NULL)
-    {
-        DWORD dwSet = SetFilePointer(hFile, offset, NULL, dwMoveMethod);
-        if (dwSet == INVALID_SET_FILE_POINTER)
-        {
-            DWORD dwErr = GetLastError();
-            ((WIN32FILE_IOWIN*)stream) -> error=(int)dwErr;
-            ret = -1;
-        }
-        else
-            ret=0;
-    }
-    return ret;
-}
-
-int ZCALLBACK win32_close_file_func (opaque, stream)
-   voidpf opaque;
-   voidpf stream;
-{
-    int ret=-1;
-
-    if (stream!=NULL)
-    {
-        HANDLE hFile;
-        hFile = ((WIN32FILE_IOWIN*)stream) -> hf;
-        if (hFile != NULL)
-        {
-            CloseHandle(hFile);
-            ret=0;
-        }
-        free(stream);
-    }
-    return ret;
-}
-
-int ZCALLBACK win32_error_file_func (opaque, stream)
-   voidpf opaque;
-   voidpf stream;
-{
-    int ret=-1;
-    if (stream!=NULL)
-    {
-        ret = ((WIN32FILE_IOWIN*)stream) -> error;
-    }
-    return ret;
-}
-
-void fill_win32_filefunc (pzlib_filefunc_def)
-  zlib_filefunc_def* pzlib_filefunc_def;
-{
-    pzlib_filefunc_def->zopen_file = win32_open_file_func;
-    pzlib_filefunc_def->zread_file = win32_read_file_func;
-    pzlib_filefunc_def->zwrite_file = win32_write_file_func;
-    pzlib_filefunc_def->ztell_file = win32_tell_file_func;
-    pzlib_filefunc_def->zseek_file = win32_seek_file_func;
-    pzlib_filefunc_def->zclose_file = win32_close_file_func;
-    pzlib_filefunc_def->zerror_file = win32_error_file_func;
-    pzlib_filefunc_def->opaque=NULL;
-}
Index: trunk/minix/lib/zlib-1.2.3/contrib/minizip/iowin32.h
===================================================================
--- trunk/minix/lib/zlib-1.2.3/contrib/minizip/iowin32.h	(revision 9)
+++ 	(revision )
@@ -1,21 +1,0 @@
-/* iowin32.h -- IO base function header for compress/uncompress .zip
-   files using zlib + zip or unzip API
-   This IO API version uses the Win32 API (for Microsoft Windows)
-
-   Version 1.01e, February 12th, 2005
-
-   Copyright (C) 1998-2005 Gilles Vollant
-*/
-
-#include <windows.h>
-
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-void fill_win32_filefunc OF((zlib_filefunc_def* pzlib_filefunc_def));
-
-#ifdef __cplusplus
-}
-#endif
Index: trunk/minix/lib/zlib-1.2.3/contrib/minizip/miniunz.c
===================================================================
--- trunk/minix/lib/zlib-1.2.3/contrib/minizip/miniunz.c	(revision 9)
+++ 	(revision )
@@ -1,585 +1,0 @@
-/*
-   miniunz.c
-   Version 1.01e, February 12th, 2005
-
-   Copyright (C) 1998-2005 Gilles Vollant
-*/
-
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <time.h>
-#include <errno.h>
-#include <fcntl.h>
-
-#ifdef unix
-# include <unistd.h>
-# include <utime.h>
-#else
-# include <direct.h>
-# include <io.h>
-#endif
-
-#include "unzip.h"
-
-#define CASESENSITIVITY (0)
-#define WRITEBUFFERSIZE (8192)
-#define MAXFILENAME (256)
-
-#ifdef WIN32
-#define USEWIN32IOAPI
-#include "iowin32.h"
-#endif
-/*
-  mini unzip, demo of unzip package
-
-  usage :
-  Usage : miniunz [-exvlo] file.zip [file_to_extract] [-d extractdir]
-
-  list the file in the zipfile, and print the content of FILE_ID.ZIP or README.TXT
-    if it exists
-*/
-
-
-/* change_file_date : change the date/time of a file
-    filename : the filename of the file where date/time must be modified
-    dosdate : the new date at the MSDos format (4 bytes)
-    tmu_date : the SAME new date at the tm_unz format */
-void change_file_date(filename,dosdate,tmu_date)
-    const char *filename;
-    uLong dosdate;
-    tm_unz tmu_date;
-{
-#ifdef WIN32
-  HANDLE hFile;
-  FILETIME ftm,ftLocal,ftCreate,ftLastAcc,ftLastWrite;
-
-  hFile = CreateFile(filename,GENERIC_READ | GENERIC_WRITE,
-                      0,NULL,OPEN_EXISTING,0,NULL);
-  GetFileTime(hFile,&ftCreate,&ftLastAcc,&ftLastWrite);
-  DosDateTimeToFileTime((WORD)(dosdate>>16),(WORD)dosdate,&ftLocal);
-  LocalFileTimeToFileTime(&ftLocal,&ftm);
-  SetFileTime(hFile,&ftm,&ftLastAcc,&ftm);
-  CloseHandle(hFile);
-#else
-#ifdef unix
-  struct utimbuf ut;
-  struct tm newdate;
-  newdate.tm_sec = tmu_date.tm_sec;
-  newdate.tm_min=tmu_date.tm_min;
-  newdate.tm_hour=tmu_date.tm_hour;
-  newdate.tm_mday=tmu_date.tm_mday;
-  newdate.tm_mon=tmu_date.tm_mon;
-  if (tmu_date.tm_year > 1900)
-      newdate.tm_year=tmu_date.tm_year - 1900;
-  else
-      newdate.tm_year=tmu_date.tm_year ;
-  newdate.tm_isdst=-1;
-
-  ut.actime=ut.modtime=mktime(&newdate);
-  utime(filename,&ut);
-#endif
-#endif
-}
-
-
-/* mymkdir and change_file_date are not 100 % portable
-   As I don't know well Unix, I wait feedback for the unix portion */
-
-int mymkdir(dirname)
-    const char* dirname;
-{
-    int ret=0;
-#ifdef WIN32
-    ret = mkdir(dirname);
-#else
-#ifdef unix
-    ret = mkdir (dirname,0775);
-#endif
-#endif
-    return ret;
-}
-
-int makedir (newdir)
-    char *newdir;
-{
-  char *buffer ;
-  char *p;
-  int  len = (int)strlen(newdir);
-
-  if (len <= 0)
-    return 0;
-
-  buffer = (char*)malloc(len+1);
-  strcpy(buffer,newdir);
-
-  if (buffer[len-1] == '/') {
-    buffer[len-1] = '\0';
-  }
-  if (mymkdir(buffer) == 0)
-    {
-      free(buffer);
-      return 1;
-    }
-
-  p = buffer+1;
-  while (1)
-    {
-      char hold;
-
-      while(*p && *p != '\\' && *p != '/')
-        p++;
-      hold = *p;
-      *p = 0;
-      if ((mymkdir(buffer) == -1) && (errno == ENOENT))
-        {
-          printf("couldn't create directory %s\n",buffer);
-          free(buffer);
-          return 0;
-        }
-      if (hold == 0)
-        break;
-      *p++ = hold;
-    }
-  free(buffer);
-  return 1;
-}
-
-void do_banner()
-{
-    printf("MiniUnz 1.01b, demo of zLib + Unz package written by Gilles Vollant\n");
-    printf("more info at http://www.winimage.com/zLibDll/unzip.html\n\n");
-}
-
-void do_help()
-{
-    printf("Usage : miniunz [-e] [-x] [-v] [-l] [-o] [-p password] file.zip [file_to_extr.] [-d extractdir]\n\n" \
-           "  -e  Extract without pathname (junk paths)\n" \
-           "  -x  Extract with pathname\n" \
-           "  -v  list files\n" \
-           "  -l  list files\n" \
-           "  -d  directory to extract into\n" \
-           "  -o  overwrite files without prompting\n" \
-           "  -p  extract crypted file using password\n\n");
-}
-
-
-int do_list(uf)
-    unzFile uf;
-{
-    uLong i;
-    unz_global_info gi;
-    int err;
-
-    err = unzGetGlobalInfo (uf,&gi);
-    if (err!=UNZ_OK)
-        printf("error %d with zipfile in unzGetGlobalInfo \n",err);
-    printf(" Length  Method   Size  Ratio   Date    Time   CRC-32     Name\n");
-    printf(" ------  ------   ----  -----   ----    ----   ------     ----\n");
-    for (i=0;i<gi.number_entry;i++)
-    {
-        char filename_inzip[256];
-        unz_file_info file_info;
-        uLong ratio=0;
-        const char *string_method;
-        char charCrypt=' ';
-        err = unzGetCurrentFileInfo(uf,&file_info,filename_inzip,sizeof(filename_inzip),NULL,0,NULL,0);
-        if (err!=UNZ_OK)
-        {
-            printf("error %d with zipfile in unzGetCurrentFileInfo\n",err);
-            break;
-        }
-        if (file_info.uncompressed_size>0)
-            ratio = (file_info.compressed_size*100)/file_info.uncompressed_size;
-
-        /* display a '*' if the file is crypted */
-        if ((file_info.flag & 1) != 0)
-            charCrypt='*';
-
-        if (file_info.compression_method==0)
-            string_method="Stored";
-        else
-        if (file_info.compression_method==Z_DEFLATED)
-        {
-            uInt iLevel=(uInt)((file_info.flag & 0x6)/2);
-            if (iLevel==0)
-              string_method="Defl:N";
-            else if (iLevel==1)
-              string_method="Defl:X";
-            else if ((iLevel==2) || (iLevel==3))
-              string_method="Defl:F"; /* 2:fast , 3 : extra fast*/
-        }
-        else
-            string_method="Unkn. ";
-
-        printf("%7lu  %6s%c%7lu %3lu%%  %2.2lu-%2.2lu-%2.2lu  %2.2lu:%2.2lu  %8.8lx   %s\n",
-                file_info.uncompressed_size,string_method,
-                charCrypt,
-                file_info.compressed_size,
-                ratio,
-                (uLong)file_info.tmu_date.tm_mon + 1,
-                (uLong)file_info.tmu_date.tm_mday,
-                (uLong)file_info.tmu_date.tm_year % 100,
-                (uLong)file_info.tmu_date.tm_hour,(uLong)file_info.tmu_date.tm_min,
-                (uLong)file_info.crc,filename_inzip);
-        if ((i+1)<gi.number_entry)
-        {
-            err = unzGoToNextFile(uf);
-            if (err!=UNZ_OK)
-            {
-                printf("error %d with zipfile in unzGoToNextFile\n",err);
-                break;
-            }
-        }
-    }
-
-    return 0;
-}
-
-
-int do_extract_currentfile(uf,popt_extract_without_path,popt_overwrite,password)
-    unzFile uf;
-    const int* popt_extract_without_path;
-    int* popt_overwrite;
-    const char* password;
-{
-    char filename_inzip[256];
-    char* filename_withoutpath;
-    char* p;
-    int err=UNZ_OK;
-    FILE *fout=NULL;
-    void* buf;
-    uInt size_buf;
-
-    unz_file_info file_info;
-    uLong ratio=0;
-    err = unzGetCurrentFileInfo(uf,&file_info,filename_inzip,sizeof(filename_inzip),NULL,0,NULL,0);
-
-    if (err!=UNZ_OK)
-    {
-        printf("error %d with zipfile in unzGetCurrentFileInfo\n",err);
-        return err;
-    }
-
-    size_buf = WRITEBUFFERSIZE;
-    buf = (void*)malloc(size_buf);
-    if (buf==NULL)
-    {
-        printf("Error allocating memory\n");
-        return UNZ_INTERNALERROR;
-    }
-
-    p = filename_withoutpath = filename_inzip;
-    while ((*p) != '\0')
-    {
-        if (((*p)=='/') || ((*p)=='\\'))
-            filename_withoutpath = p+1;
-        p++;
-    }
-
-    if ((*filename_withoutpath)=='\0')
-    {
-        if ((*popt_extract_without_path)==0)
-        {
-            printf("creating directory: %s\n",filename_inzip);
-            mymkdir(filename_inzip);
-        }
-    }
-    else
-    {
-        const char* write_filename;
-        int skip=0;
-
-        if ((*popt_extract_without_path)==0)
-            write_filename = filename_inzip;
-        else
-            write_filename = filename_withoutpath;
-
-        err = unzOpenCurrentFilePassword(uf,password);
-        if (err!=UNZ_OK)
-        {
-            printf("error %d with zipfile in unzOpenCurrentFilePassword\n",err);
-        }
-
-        if (((*popt_overwrite)==0) && (err==UNZ_OK))
-        {
-            char rep=0;
-            FILE* ftestexist;
-            ftestexist = fopen(write_filename,"rb");
-            if (ftestexist!=NULL)
-            {
-                fclose(ftestexist);
-                do
-                {
-                    char answer[128];
-                    int ret;
-
-                    printf("The file %s exists. Overwrite ? [y]es, [n]o, [A]ll: ",write_filename);
-                    ret = scanf("%1s",answer);
-                    if (ret != 1) 
-                    {
-                       exit(EXIT_FAILURE);
-                    }
-                    rep = answer[0] ;
-                    if ((rep>='a') && (rep<='z'))
-                        rep -= 0x20;
-                }
-                while ((rep!='Y') && (rep!='N') && (rep!='A'));
-            }
-
-            if (rep == 'N')
-                skip = 1;
-
-            if (rep == 'A')
-                *popt_overwrite=1;
-        }
-
-        if ((skip==0) && (err==UNZ_OK))
-        {
-            fout=fopen(write_filename,"wb");
-
-            /* some zipfile don't contain directory alone before file */
-            if ((fout==NULL) && ((*popt_extract_without_path)==0) &&
-                                (filename_withoutpath!=(char*)filename_inzip))
-            {
-                char c=*(filename_withoutpath-1);
-                *(filename_withoutpath-1)='\0';
-                makedir(write_filename);
-                *(filename_withoutpath-1)=c;
-                fout=fopen(write_filename,"wb");
-            }
-
-            if (fout==NULL)
-            {
-                printf("error opening %s\n",write_filename);
-            }
-        }
-
-        if (fout!=NULL)
-        {
-            printf(" extracting: %s\n",write_filename);
-
-            do
-            {
-                err = unzReadCurrentFile(uf,buf,size_buf);
-                if (err<0)
-                {
-                    printf("error %d with zipfile in unzReadCurrentFile\n",err);
-                    break;
-                }
-                if (err>0)
-                    if (fwrite(buf,err,1,fout)!=1)
-                    {
-                        printf("error in writing extracted file\n");
-                        err=UNZ_ERRNO;
-                        break;
-                    }
-            }
-            while (err>0);
-            if (fout)
-                    fclose(fout);
-
-            if (err==0)
-                change_file_date(write_filename,file_info.dosDate,
-                                 file_info.tmu_date);
-        }
-
-        if (err==UNZ_OK)
-        {
-            err = unzCloseCurrentFile (uf);
-            if (err!=UNZ_OK)
-            {
-                printf("error %d with zipfile in unzCloseCurrentFile\n",err);
-            }
-        }
-        else
-            unzCloseCurrentFile(uf); /* don't lose the error */
-    }
-
-    free(buf);
-    return err;
-}
-
-
-int do_extract(uf,opt_extract_without_path,opt_overwrite,password)
-    unzFile uf;
-    int opt_extract_without_path;
-    int opt_overwrite;
-    const char* password;
-{
-    uLong i;
-    unz_global_info gi;
-    int err;
-    FILE* fout=NULL;
-
-    err = unzGetGlobalInfo (uf,&gi);
-    if (err!=UNZ_OK)
-        printf("error %d with zipfile in unzGetGlobalInfo \n",err);
-
-    for (i=0;i<gi.number_entry;i++)
-    {
-        if (do_extract_currentfile(uf,&opt_extract_without_path,
-                                      &opt_overwrite,
-                                      password) != UNZ_OK)
-            break;
-
-        if ((i+1)<gi.number_entry)
-        {
-            err = unzGoToNextFile(uf);
-            if (err!=UNZ_OK)
-            {
-                printf("error %d with zipfile in unzGoToNextFile\n",err);
-                break;
-            }
-        }
-    }
-
-    return 0;
-}
-
-int do_extract_onefile(uf,filename,opt_extract_without_path,opt_overwrite,password)
-    unzFile uf;
-    const char* filename;
-    int opt_extract_without_path;
-    int opt_overwrite;
-    const char* password;
-{
-    int err = UNZ_OK;
-    if (unzLocateFile(uf,filename,CASESENSITIVITY)!=UNZ_OK)
-    {
-        printf("file %s not found in the zipfile\n",filename);
-        return 2;
-    }
-
-    if (do_extract_currentfile(uf,&opt_extract_without_path,
-                                      &opt_overwrite,
-                                      password) == UNZ_OK)
-        return 0;
-    else
-        return 1;
-}
-
-
-int main(argc,argv)
-    int argc;
-    char *argv[];
-{
-    const char *zipfilename=NULL;
-    const char *filename_to_extract=NULL;
-    const char *password=NULL;
-    char filename_try[MAXFILENAME+16] = "";
-    int i;
-    int opt_do_list=0;
-    int opt_do_extract=1;
-    int opt_do_extract_withoutpath=0;
-    int opt_overwrite=0;
-    int opt_extractdir=0;
-    const char *dirname=NULL;
-    unzFile uf=NULL;
-
-    do_banner();
-    if (argc==1)
-    {
-        do_help();
-        return 0;
-    }
-    else
-    {
-        for (i=1;i<argc;i++)
-        {
-            if ((*argv[i])=='-')
-            {
-                const char *p=argv[i]+1;
-
-                while ((*p)!='\0')
-                {
-                    char c=*(p++);;
-                    if ((c=='l') || (c=='L'))
-                        opt_do_list = 1;
-                    if ((c=='v') || (c=='V'))
-                        opt_do_list = 1;
-                    if ((c=='x') || (c=='X'))
-                        opt_do_extract = 1;
-                    if ((c=='e') || (c=='E'))
-                        opt_do_extract = opt_do_extract_withoutpath = 1;
-                    if ((c=='o') || (c=='O'))
-                        opt_overwrite=1;
-                    if ((c=='d') || (c=='D'))
-                    {
-                        opt_extractdir=1;
-                        dirname=argv[i+1];
-                    }
-
-                    if (((c=='p') || (c=='P')) && (i+1<argc))
-                    {
-                        password=argv[i+1];
-                        i++;
-                    }
-                }
-            }
-            else
-            {
-                if (zipfilename == NULL)
-                    zipfilename = argv[i];
-                else if ((filename_to_extract==NULL) && (!opt_extractdir))
-                        filename_to_extract = argv[i] ;
-            }
-        }
-    }
-
-    if (zipfilename!=NULL)
-    {
-
-#        ifdef USEWIN32IOAPI
-        zlib_filefunc_def ffunc;
-#        endif
-
-        strncpy(filename_try, zipfilename,MAXFILENAME-1);
-        /* strncpy doesnt append the trailing NULL, of the string is too long. */
-        filename_try[ MAXFILENAME ] = '\0';
-
-#        ifdef USEWIN32IOAPI
-        fill_win32_filefunc(&ffunc);
-        uf = unzOpen2(zipfilename,&ffunc);
-#        else
-        uf = unzOpen(zipfilename);
-#        endif
-        if (uf==NULL)
-        {
-            strcat(filename_try,".zip");
-#            ifdef USEWIN32IOAPI
-            uf = unzOpen2(filename_try,&ffunc);
-#            else
-            uf = unzOpen(filename_try);
-#            endif
-        }
-    }
-
-    if (uf==NULL)
-    {
-        printf("Cannot open %s or %s.zip\n",zipfilename,zipfilename);
-        return 1;
-    }
-    printf("%s opened\n",filename_try);
-
-    if (opt_do_list==1)
-        return do_list(uf);
-    else if (opt_do_extract==1)
-    {
-        if (opt_extractdir && chdir(dirname)) 
-        {
-          printf("Error changing into %s, aborting\n", dirname);
-          exit(-1);
-        }
-
-        if (filename_to_extract == NULL)
-            return do_extract(uf,opt_do_extract_withoutpath,opt_overwrite,password);
-        else
-            return do_extract_onefile(uf,filename_to_extract,
-                                      opt_do_extract_withoutpath,opt_overwrite,password);
-    }
-    unzCloseCurrentFile(uf);
-
-    return 0;
-}
Index: trunk/minix/lib/zlib-1.2.3/contrib/minizip/minizip.c
===================================================================
--- trunk/minix/lib/zlib-1.2.3/contrib/minizip/minizip.c	(revision 9)
+++ 	(revision )
@@ -1,420 +1,0 @@
-/*
-   minizip.c
-   Version 1.01e, February 12th, 2005
-
-   Copyright (C) 1998-2005 Gilles Vollant
-*/
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <time.h>
-#include <errno.h>
-#include <fcntl.h>
-
-#ifdef unix
-# include <unistd.h>
-# include <utime.h>
-# include <sys/types.h>
-# include <sys/stat.h>
-#else
-# include <direct.h>
-# include <io.h>
-#endif
-
-#include "zip.h"
-
-#ifdef WIN32
-#define USEWIN32IOAPI
-#include "iowin32.h"
-#endif
-
-
-
-#define WRITEBUFFERSIZE (16384)
-#define MAXFILENAME (256)
-
-#ifdef WIN32
-uLong filetime(f, tmzip, dt)
-    char *f;                /* name of file to get info on */
-    tm_zip *tmzip;             /* return value: access, modific. and creation times */
-    uLong *dt;             /* dostime */
-{
-  int ret = 0;
-  {
-      FILETIME ftLocal;
-      HANDLE hFind;
-      WIN32_FIND_DATA  ff32;
-
-      hFind = FindFirstFile(f,&ff32);
-      if (hFind != INVALID_HANDLE_VALUE)
-      {
-        FileTimeToLocalFileTime(&(ff32.ftLastWriteTime),&ftLocal);
-        FileTimeToDosDateTime(&ftLocal,((LPWORD)dt)+1,((LPWORD)dt)+0);
-        FindClose(hFind);
-        ret = 1;
-      }
-  }
-  return ret;
-}
-#else
-#ifdef unix
-uLong filetime(f, tmzip, dt)
-    char *f;               /* name of file to get info on */
-    tm_zip *tmzip;         /* return value: access, modific. and creation times */
-    uLong *dt;             /* dostime */
-{
-  int ret=0;
-  struct stat s;        /* results of stat() */
-  struct tm* filedate;
-  time_t tm_t=0;
-
-  if (strcmp(f,"-")!=0)
-  {
-    char name[MAXFILENAME+1];
-    int len = strlen(f);
-    if (len > MAXFILENAME)
-      len = MAXFILENAME;
-
-    strncpy(name, f,MAXFILENAME-1);
-    /* strncpy doesnt append the trailing NULL, of the string is too long. */
-    name[ MAXFILENAME ] = '\0';
-
-    if (name[len - 1] == '/')
-      name[len - 1] = '\0';
-    /* not all systems allow stat'ing a file with / appended */
-    if (stat(name,&s)==0)
-    {
-      tm_t = s.st_mtime;
-      ret = 1;
-    }
-  }
-  filedate = localtime(&tm_t);
-
-  tmzip->tm_sec  = filedate->tm_sec;
-  tmzip->tm_min  = filedate->tm_min;
-  tmzip->tm_hour = filedate->tm_hour;
-  tmzip->tm_mday = filedate->tm_mday;
-  tmzip->tm_mon  = filedate->tm_mon ;
-  tmzip->tm_year = filedate->tm_year;
-
-  return ret;
-}
-#else
-uLong filetime(f, tmzip, dt)
-    char *f;                /* name of file to get info on */
-    tm_zip *tmzip;             /* return value: access, modific. and creation times */
-    uLong *dt;             /* dostime */
-{
-    return 0;
-}
-#endif
-#endif
-
-
-
-
-int check_exist_file(filename)
-    const char* filename;
-{
-    FILE* ftestexist;
-    int ret = 1;
-    ftestexist = fopen(filename,"rb");
-    if (ftestexist==NULL)
-        ret = 0;
-    else
-        fclose(ftestexist);
-    return ret;
-}
-
-void do_banner()
-{
-    printf("MiniZip 1.01b, demo of zLib + Zip package written by Gilles Vollant\n");
-    printf("more info at http://www.winimage.com/zLibDll/unzip.html\n\n");
-}
-
-void do_help()
-{
-    printf("Usage : minizip [-o] [-a] [-0 to -9] [-p password] file.zip [files_to_add]\n\n" \
-           "  -o  Overwrite existing file.zip\n" \
-           "  -a  Append to existing file.zip\n" \
-           "  -0  Store only\n" \
-           "  -1  Compress faster\n" \
-           "  -9  Compress better\n\n");
-}
-
-/* calculate the CRC32 of a file,
-   because to encrypt a file, we need known the CRC32 of the file before */
-int getFileCrc(const char* filenameinzip,void*buf,unsigned long size_buf,unsigned long* result_crc)
-{
-   unsigned long calculate_crc=0;
-   int err=ZIP_OK;
-   FILE * fin = fopen(filenameinzip,"rb");
-   unsigned long size_read = 0;
-   unsigned long total_read = 0;
-   if (fin==NULL)
-   {
-       err = ZIP_ERRNO;
-   }
-
-    if (err == ZIP_OK)
-        do
-        {
-            err = ZIP_OK;
-            size_read = (int)fread(buf,1,size_buf,fin);
-            if (size_read < size_buf)
-                if (feof(fin)==0)
-            {
-                printf("error in reading %s\n",filenameinzip);
-                err = ZIP_ERRNO;
-            }
-
-            if (size_read>0)
-                calculate_crc = crc32(calculate_crc,buf,size_read);
-            total_read += size_read;
-
-        } while ((err == ZIP_OK) && (size_read>0));
-
-    if (fin)
-        fclose(fin);
-
-    *result_crc=calculate_crc;
-    printf("file %s crc %x\n",filenameinzip,calculate_crc);
-    return err;
-}
-
-int main(argc,argv)
-    int argc;
-    char *argv[];
-{
-    int i;
-    int opt_overwrite=0;
-    int opt_compress_level=Z_DEFAULT_COMPRESSION;
-    int zipfilenamearg = 0;
-    char filename_try[MAXFILENAME+16];
-    int zipok;
-    int err=0;
-    int size_buf=0;
-    void* buf=NULL;
-    const char* password=NULL;
-
-
-    do_banner();
-    if (argc==1)
-    {
-        do_help();
-        return 0;
-    }
-    else
-    {
-        for (i=1;i<argc;i++)
-        {
-            if ((*argv[i])=='-')
-            {
-                const char *p=argv[i]+1;
-
-                while ((*p)!='\0')
-                {
-                    char c=*(p++);;
-                    if ((c=='o') || (c=='O'))
-                        opt_overwrite = 1;
-                    if ((c=='a') || (c=='A'))
-                        opt_overwrite = 2;
-                    if ((c>='0') && (c<='9'))
-                        opt_compress_level = c-'0';
-
-                    if (((c=='p') || (c=='P')) && (i+1<argc))
-                    {
-                        password=argv[i+1];
-                        i++;
-                    }
-                }
-            }
-            else
-                if (zipfilenamearg == 0)
-                    zipfilenamearg = i ;
-        }
-    }
-
-    size_buf = WRITEBUFFERSIZE;
-    buf = (void*)malloc(size_buf);
-    if (buf==NULL)
-    {
-        printf("Error allocating memory\n");
-        return ZIP_INTERNALERROR;
-    }
-
-    if (zipfilenamearg==0)
-        zipok=0;
-    else
-    {
-        int i,len;
-        int dot_found=0;
-
-        zipok = 1 ;
-        strncpy(filename_try, argv[zipfilenamearg],MAXFILENAME-1);
-        /* strncpy doesnt append the trailing NULL, of the string is too long. */
-        filename_try[ MAXFILENAME ] = '\0';
-
-        len=(int)strlen(filename_try);
-        for (i=0;i<len;i++)
-            if (filename_try[i]=='.')
-                dot_found=1;
-
-        if (dot_found==0)
-            strcat(filename_try,".zip");
-
-        if (opt_overwrite==2)
-        {
-            /* if the file don't exist, we not append file */
-            if (check_exist_file(filename_try)==0)
-                opt_overwrite=1;
-        }
-        else
-        if (opt_overwrite==0)
-            if (check_exist_file(filename_try)!=0)
-            {
-                char rep=0;
-                do
-                {
-                    char answer[128];
-                    int ret;
-                    printf("The file %s exists. Overwrite ? [y]es, [n]o, [a]ppend : ",filename_try);
-                    ret = scanf("%1s",answer);
-                    if (ret != 1)
-                    {
-                       exit(EXIT_FAILURE);
-                    }
-                    rep = answer[0] ;
-                    if ((rep>='a') && (rep<='z'))
-                        rep -= 0x20;
-                }
-                while ((rep!='Y') && (rep!='N') && (rep!='A'));
-                if (rep=='N')
-                    zipok = 0;
-                if (rep=='A')
-                    opt_overwrite = 2;
-            }
-    }
-
-    if (zipok==1)
-    {
-        zipFile zf;
-        int errclose;
-#        ifdef USEWIN32IOAPI
-        zlib_filefunc_def ffunc;
-        fill_win32_filefunc(&ffunc);
-        zf = zipOpen2(filename_try,(opt_overwrite==2) ? 2 : 0,NULL,&ffunc);
-#        else
-        zf = zipOpen(filename_try,(opt_overwrite==2) ? 2 : 0);
-#        endif
-
-        if (zf == NULL)
-        {
-            printf("error opening %s\n",filename_try);
-            err= ZIP_ERRNO;
-        }
-        else
-            printf("creating %s\n",filename_try);
-
-        for (i=zipfilenamearg+1;(i<argc) && (err==ZIP_OK);i++)
-        {
-            if (!((((*(argv[i]))=='-') || ((*(argv[i]))=='/')) &&
-                  ((argv[i][1]=='o') || (argv[i][1]=='O') ||
-                   (argv[i][1]=='a') || (argv[i][1]=='A') ||
-                   (argv[i][1]=='p') || (argv[i][1]=='P') ||
-                   ((argv[i][1]>='0') || (argv[i][1]<='9'))) &&
-                  (strlen(argv[i]) == 2)))
-            {
-                FILE * fin;
-                int size_read;
-                const char* filenameinzip = argv[i];
-                zip_fileinfo zi;
-                unsigned long crcFile=0;
-
-                zi.tmz_date.tm_sec = zi.tmz_date.tm_min = zi.tmz_date.tm_hour =
-                zi.tmz_date.tm_mday = zi.tmz_date.tm_mon = zi.tmz_date.tm_year = 0;
-                zi.dosDate = 0;
-                zi.internal_fa = 0;
-                zi.external_fa = 0;
-                filetime(filenameinzip,&zi.tmz_date,&zi.dosDate);
-
-/*
-                err = zipOpenNewFileInZip(zf,filenameinzip,&zi,
-                                 NULL,0,NULL,0,NULL / * comment * /,
-                                 (opt_compress_level != 0) ? Z_DEFLATED : 0,
-                                 opt_compress_level);
-*/
-                if ((password != NULL) && (err==ZIP_OK))
-                    err = getFileCrc(filenameinzip,buf,size_buf,&crcFile);
-
-                err = zipOpenNewFileInZip3(zf,filenameinzip,&zi,
-                                 NULL,0,NULL,0,NULL /* comment*/,
-                                 (opt_compress_level != 0) ? Z_DEFLATED : 0,
-                                 opt_compress_level,0,
-                                 /* -MAX_WBITS, DEF_MEM_LEVEL, Z_DEFAULT_STRATEGY, */
-                                 -MAX_WBITS, DEF_MEM_LEVEL, Z_DEFAULT_STRATEGY,
-                                 password,crcFile);
-
-                if (err != ZIP_OK)
-                    printf("error in opening %s in zipfile\n",filenameinzip);
-                else
-                {
-                    fin = fopen(filenameinzip,"rb");
-                    if (fin==NULL)
-                    {
-                        err=ZIP_ERRNO;
-                        printf("error in opening %s for reading\n",filenameinzip);
-                    }
-                }
-
-                if (err == ZIP_OK)
-                    do
-                    {
-                        err = ZIP_OK;
-                        size_read = (int)fread(buf,1,size_buf,fin);
-                        if (size_read < size_buf)
-                            if (feof(fin)==0)
-                        {
-                            printf("error in reading %s\n",filenameinzip);
-                            err = ZIP_ERRNO;
-                        }
-
-                        if (size_read>0)
-                        {
-                            err = zipWriteInFileInZip (zf,buf,size_read);
-                            if (err<0)
-                            {
-                                printf("error in writing %s in the zipfile\n",
-                                                 filenameinzip);
-                            }
-
-                        }
-                    } while ((err == ZIP_OK) && (size_read>0));
-
-                if (fin)
-                    fclose(fin);
-
-                if (err<0)
-                    err=ZIP_ERRNO;
-                else
-                {
-                    err = zipCloseFileInZip(zf);
-                    if (err!=ZIP_OK)
-                        printf("error in closing %s in the zipfile\n",
-                                    filenameinzip);
-                }
-            }
-        }
-        errclose = zipClose(zf,NULL);
-        if (errclose != ZIP_OK)
-            printf("error in closing %s\n",filename_try);
-    }
-    else
-    {
-       do_help();
-    }
-
-    free(buf);
-    return 0;
-}
Index: trunk/minix/lib/zlib-1.2.3/contrib/minizip/mztools.c
===================================================================
--- trunk/minix/lib/zlib-1.2.3/contrib/minizip/mztools.c	(revision 9)
+++ 	(revision )
@@ -1,281 +1,0 @@
-/*
-  Additional tools for Minizip
-  Code: Xavier Roche '2004
-  License: Same as ZLIB (www.gzip.org)
-*/
-
-/* Code */
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include "zlib.h"
-#include "unzip.h"
-
-#define READ_8(adr)  ((unsigned char)*(adr))
-#define READ_16(adr) ( READ_8(adr) | (READ_8(adr+1) << 8) )
-#define READ_32(adr) ( READ_16(adr) | (READ_16((adr)+2) << 16) )
-
-#define WRITE_8(buff, n) do { \
-  *((unsigned char*)(buff)) = (unsigned char) ((n) & 0xff); \
-} while(0)
-#define WRITE_16(buff, n) do { \
-  WRITE_8((unsigned char*)(buff), n); \
-  WRITE_8(((unsigned char*)(buff)) + 1, (n) >> 8); \
-} while(0)
-#define WRITE_32(buff, n) do { \
-  WRITE_16((unsigned char*)(buff), (n) & 0xffff); \
-  WRITE_16((unsigned char*)(buff) + 2, (n) >> 16); \
-} while(0)
-
-extern int ZEXPORT unzRepair(file, fileOut, fileOutTmp, nRecovered, bytesRecovered)
-const char* file;
-const char* fileOut;
-const char* fileOutTmp;
-uLong* nRecovered;
-uLong* bytesRecovered;
-{
-  int err = Z_OK;
-  FILE* fpZip = fopen(file, "rb");
-  FILE* fpOut = fopen(fileOut, "wb");
-  FILE* fpOutCD = fopen(fileOutTmp, "wb");
-  if (fpZip != NULL &&  fpOut != NULL) {
-    int entries = 0;
-    uLong totalBytes = 0;
-    char header[30];
-    char filename[256];
-    char extra[1024];
-    int offset = 0;
-    int offsetCD = 0;
-    while ( fread(header, 1, 30, fpZip) == 30 ) {
-      int currentOffset = offset;
-
-      /* File entry */
-      if (READ_32(header) == 0x04034b50) {
-        unsigned int version = READ_16(header + 4);
-        unsigned int gpflag = READ_16(header + 6);
-        unsigned int method = READ_16(header + 8);
-        unsigned int filetime = READ_16(header + 10);
-        unsigned int filedate = READ_16(header + 12);
-        unsigned int crc = READ_32(header + 14); /* crc */
-        unsigned int cpsize = READ_32(header + 18); /* compressed size */
-        unsigned int uncpsize = READ_32(header + 22); /* uncompressed sz */
-        unsigned int fnsize = READ_16(header + 26); /* file name length */
-        unsigned int extsize = READ_16(header + 28); /* extra field length */
-        filename[0] = extra[0] = '\0';
-        
-        /* Header */
-        if (fwrite(header, 1, 30, fpOut) == 30) {
-          offset += 30;
-        } else {
-          err = Z_ERRNO;
-          break;
-        }
-        
-        /* Filename */
-        if (fnsize > 0) {
-          if (fread(filename, 1, fnsize, fpZip) == fnsize) {
-            if (fwrite(filename, 1, fnsize, fpOut) == fnsize) {
-              offset += fnsize;
-            } else {
-              err = Z_ERRNO;
-              break;
-            }
-          } else {
-            err = Z_ERRNO;
-            break;
-          }
-        } else {
-          err = Z_STREAM_ERROR;
-          break;
-        }
-
-        /* Extra field */
-        if (extsize > 0) {
-          if (fread(extra, 1, extsize, fpZip) == extsize) {
-            if (fwrite(extra, 1, extsize, fpOut) == extsize) {
-              offset += extsize;
-            } else {
-              err = Z_ERRNO;
-              break;
-            }
-          } else {
-            err = Z_ERRNO;
-            break;
-          }
-        }
-        
-        /* Data */
-        {
-          int dataSize = cpsize;
-          if (dataSize == 0) {
-            dataSize = uncpsize;
-          }
-          if (dataSize > 0) {
-            char* data = malloc(dataSize);
-            if (data != NULL) {
-              if ((int)fread(data, 1, dataSize, fpZip) == dataSize) {
-                if ((int)fwrite(data, 1, dataSize, fpOut) == dataSize) {
-                  offset += dataSize;
-                  totalBytes += dataSize;
-                } else {
-                  err = Z_ERRNO;
-                }
-              } else {
-                err = Z_ERRNO;
-              }
-              free(data);
-              if (err != Z_OK) {
-                break;
-              }
-            } else {
-              err = Z_MEM_ERROR;
-              break;
-            }
-          }
-        }
-        
-        /* Central directory entry */
-        {
-          char header[46];
-          char* comment = "";
-          int comsize = (int) strlen(comment);
-          WRITE_32(header, 0x02014b50);
-          WRITE_16(header + 4, version);
-          WRITE_16(header + 6, version);
-          WRITE_16(header + 8, gpflag);
-          WRITE_16(header + 10, method);
-          WRITE_16(header + 12, filetime);
-          WRITE_16(header + 14, filedate);
-          WRITE_32(header + 16, crc);
-          WRITE_32(header + 20, cpsize);
-          WRITE_32(header + 24, uncpsize);
-          WRITE_16(header + 28, fnsize);
-          WRITE_16(header + 30, extsize);
-          WRITE_16(header + 32, comsize);
-          WRITE_16(header + 34, 0);     /* disk # */
-          WRITE_16(header + 36, 0);     /* int attrb */
-          WRITE_32(header + 38, 0);     /* ext attrb */
-          WRITE_32(header + 42, currentOffset);
-          /* Header */
-          if (fwrite(header, 1, 46, fpOutCD) == 46) {
-            offsetCD += 46;
-            
-            /* Filename */
-            if (fnsize > 0) {
-              if (fwrite(filename, 1, fnsize, fpOutCD) == fnsize) {
-                offsetCD += fnsize;
-              } else {
-                err = Z_ERRNO;
-                break;
-              }
-            } else {
-              err = Z_STREAM_ERROR;
-              break;
-            }
-            
-            /* Extra field */
-            if (extsize > 0) {
-              if (fwrite(extra, 1, extsize, fpOutCD) == extsize) {
-                offsetCD += extsize;
-              } else {
-                err = Z_ERRNO;
-                break;
-              }
-            }
-            
-            /* Comment field */
-            if (comsize > 0) {
-              if ((int)fwrite(comment, 1, comsize, fpOutCD) == comsize) {
-                offsetCD += comsize;
-              } else {
-                err = Z_ERRNO;
-                break;
-              }
-            }
-            
-            
-          } else {
-            err = Z_ERRNO;
-            break;
-          }
-        }
-
-        /* Success */
-        entries++;
-
-      } else {
-        break;
-      }
-    }
-
-    /* Final central directory  */
-    {
-      int entriesZip = entries;
-      char header[22];
-      char* comment = ""; // "ZIP File recovered by zlib/minizip/mztools";
-      int comsize = (int) strlen(comment);
-      if (entriesZip > 0xffff) {
-        entriesZip = 0xffff;
-      }
-      WRITE_32(header, 0x06054b50);
-      WRITE_16(header + 4, 0);    /* disk # */
-      WRITE_16(header + 6, 0);    /* disk # */
-      WRITE_16(header + 8, entriesZip);   /* hack */
-      WRITE_16(header + 10, entriesZip);  /* hack */
-      WRITE_32(header + 12, offsetCD);    /* size of CD */
-      WRITE_32(header + 16, offset);      /* offset to CD */
-      WRITE_16(header + 20, comsize);     /* comment */
-      
-      /* Header */
-      if (fwrite(header, 1, 22, fpOutCD) == 22) {
-        
-        /* Comment field */
-        if (comsize > 0) {
-          if ((int)fwrite(comment, 1, comsize, fpOutCD) != comsize) {
-            err = Z_ERRNO;
-          }
-        }
-        
-      } else {
-        err = Z_ERRNO;
-      }
-    }
-
-    /* Final merge (file + central directory) */
-    fclose(fpOutCD);
-    if (err == Z_OK) {
-      fpOutCD = fopen(fileOutTmp, "rb");
-      if (fpOutCD != NULL) {
-        int nRead;
-        char buffer[8192];
-        while ( (nRead = (int)fread(buffer, 1, sizeof(buffer), fpOutCD)) > 0) {
-          if ((int)fwrite(buffer, 1, nRead, fpOut) != nRead) {
-            err = Z_ERRNO;
-            break;
-          }
-        }
-        fclose(fpOutCD);
-      }
-    }
-    
-    /* Close */
-    fclose(fpZip);
-    fclose(fpOut);
-    
-    /* Wipe temporary file */
-    (void)remove(fileOutTmp);
-    
-    /* Number of recovered entries */
-    if (err == Z_OK) {
-      if (nRecovered != NULL) {
-        *nRecovered = entries;
-      }
-      if (bytesRecovered != NULL) {
-        *bytesRecovered = totalBytes;
-      }
-    }
-  } else {
-    err = Z_STREAM_ERROR;
-  }
-  return err;
-}
Index: trunk/minix/lib/zlib-1.2.3/contrib/minizip/mztools.h
===================================================================
--- trunk/minix/lib/zlib-1.2.3/contrib/minizip/mztools.h	(revision 9)
+++ 	(revision )
@@ -1,31 +1,0 @@
-/*
-  Additional tools for Minizip
-  Code: Xavier Roche '2004
-  License: Same as ZLIB (www.gzip.org)
-*/
-
-#ifndef _zip_tools_H
-#define _zip_tools_H
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#ifndef _ZLIB_H
-#include "zlib.h"
-#endif
-
-#include "unzip.h"
-
-/* Repair a ZIP file (missing central directory) 
-   file: file to recover
-   fileOut: output file after recovery
-   fileOutTmp: temporary file name used for recovery
-*/
-extern int ZEXPORT unzRepair(const char* file, 
-                             const char* fileOut, 
-                             const char* fileOutTmp, 
-                             uLong* nRecovered,
-                             uLong* bytesRecovered);
-
-#endif
Index: trunk/minix/lib/zlib-1.2.3/contrib/minizip/unzip.c
===================================================================
--- trunk/minix/lib/zlib-1.2.3/contrib/minizip/unzip.c	(revision 9)
+++ 	(revision )
@@ -1,1598 +1,0 @@
-/* unzip.c -- IO for uncompress .zip files using zlib
-   Version 1.01e, February 12th, 2005
-
-   Copyright (C) 1998-2005 Gilles Vollant
-
-   Read unzip.h for more info
-*/
-
-/* Decryption code comes from crypt.c by Info-ZIP but has been greatly reduced in terms of
-compatibility with older software. The following is from the original crypt.c. Code
-woven in by Terry Thorsen 1/2003.
-*/
-/*
-  Copyright (c) 1990-2000 Info-ZIP.  All rights reserved.
-
-  See the accompanying file LICENSE, version 2000-Apr-09 or later
-  (the contents of which are also included in zip.h) for terms of use.
-  If, for some reason, all these files are missing, the Info-ZIP license
-  also may be found at:  ftp://ftp.info-zip.org/pub/infozip/license.html
-*/
-/*
-  crypt.c (full version) by Info-ZIP.      Last revised:  [see crypt.h]
-
-  The encryption/decryption parts of this source code (as opposed to the
-  non-echoing password parts) were originally written in Europe.  The
-  whole source package can be freely distributed, including from the USA.
-  (Prior to January 2000, re-export from the US was a violation of US law.)
- */
-
-/*
-  This encryption code is a direct transcription of the algorithm from
-  Roger Schlafly, described by Phil Katz in the file appnote.txt.  This
-  file (appnote.txt) is distributed with the PKZIP program (even in the
-  version without encryption capabilities).
- */
-
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include "zlib.h"
-#include "unzip.h"
-
-#ifdef STDC
-#  include <stddef.h>
-#  include <string.h>
-#  include <stdlib.h>
-#endif
-#ifdef NO_ERRNO_H
-    extern int errno;
-#else
-#   include <errno.h>
-#endif
-
-
-#ifndef local
-#  define local static
-#endif
-/* compile with -Dlocal if your debugger can't find static symbols */
-
-
-#ifndef CASESENSITIVITYDEFAULT_NO
-#  if !defined(unix) && !defined(CASESENSITIVITYDEFAULT_YES)
-#    define CASESENSITIVITYDEFAULT_NO
-#  endif
-#endif
-
-
-#ifndef UNZ_BUFSIZE
-#define UNZ_BUFSIZE (16384)
-#endif
-
-#ifndef UNZ_MAXFILENAMEINZIP
-#define UNZ_MAXFILENAMEINZIP (256)
-#endif
-
-#ifndef ALLOC
-# define ALLOC(size) (malloc(size))
-#endif
-#ifndef TRYFREE
-# define TRYFREE(p) {if (p) free(p);}
-#endif
-
-#define SIZECENTRALDIRITEM (0x2e)
-#define SIZEZIPLOCALHEADER (0x1e)
-
-
-
-
-const char unz_copyright[] =
-   " unzip 1.01 Copyright 1998-2004 Gilles Vollant - http://www.winimage.com/zLibDll";
-
-/* unz_file_info_interntal contain internal info about a file in zipfile*/
-typedef struct unz_file_info_internal_s
-{
-    uLong offset_curfile;/* relative offset of local header 4 bytes */
-} unz_file_info_internal;
-
-
-/* file_in_zip_read_info_s contain internal information about a file in zipfile,
-    when reading and decompress it */
-typedef struct
-{
-    char  *read_buffer;         /* internal buffer for compressed data */
-    z_stream stream;            /* zLib stream structure for inflate */
-
-    uLong pos_in_zipfile;       /* position in byte on the zipfile, for fseek*/
-    uLong stream_initialised;   /* flag set if stream structure is initialised*/
-
-    uLong offset_local_extrafield;/* offset of the local extra field */
-    uInt  size_local_extrafield;/* size of the local extra field */
-    uLong pos_local_extrafield;   /* position in the local extra field in read*/
-
-    uLong crc32;                /* crc32 of all data uncompressed */
-    uLong crc32_wait;           /* crc32 we must obtain after decompress all */
-    uLong rest_read_compressed; /* number of byte to be decompressed */
-    uLong rest_read_uncompressed;/*number of byte to be obtained after decomp*/
-    zlib_filefunc_def z_filefunc;
-    voidpf filestream;        /* io structore of the zipfile */
-    uLong compression_method;   /* compression method (0==store) */
-    uLong byte_before_the_zipfile;/* byte before the zipfile, (>0 for sfx)*/
-    int   raw;
-} file_in_zip_read_info_s;
-
-
-/* unz_s contain internal information about the zipfile
-*/
-typedef struct
-{
-    zlib_filefunc_def z_filefunc;
-    voidpf filestream;        /* io structore of the zipfile */
-    unz_global_info gi;       /* public global information */
-    uLong byte_before_the_zipfile;/* byte before the zipfile, (>0 for sfx)*/
-    uLong num_file;             /* number of the current file in the zipfile*/
-    uLong pos_in_central_dir;   /* pos of the current file in the central dir*/
-    uLong current_file_ok;      /* flag about the usability of the current file*/
-    uLong central_pos;          /* position of the beginning of the central dir*/
-
-    uLong size_central_dir;     /* size of the central directory  */
-    uLong offset_central_dir;   /* offset of start of central directory with
-                                   respect to the starting disk number */
-
-    unz_file_info cur_file_info; /* public info about the current file in zip*/
-    unz_file_info_internal cur_file_info_internal; /* private info about it*/
-    file_in_zip_read_info_s* pfile_in_zip_read; /* structure about the current
-                                        file if we are decompressing it */
-    int encrypted;
-#    ifndef NOUNCRYPT
-    unsigned long keys[3];     /* keys defining the pseudo-random sequence */
-    const unsigned long* pcrc_32_tab;
-#    endif
-} unz_s;
-
-
-#ifndef NOUNCRYPT
-#include "crypt.h"
-#endif
-
-/* ===========================================================================
-     Read a byte from a gz_stream; update next_in and avail_in. Return EOF
-   for end of file.
-   IN assertion: the stream s has been sucessfully opened for reading.
-*/
-
-
-local int unzlocal_getByte OF((
-    const zlib_filefunc_def* pzlib_filefunc_def,
-    voidpf filestream,
-    int *pi));
-
-local int unzlocal_getByte(pzlib_filefunc_def,filestream,pi)
-    const zlib_filefunc_def* pzlib_filefunc_def;
-    voidpf filestream;
-    int *pi;
-{
-    unsigned char c;
-    int err = (int)ZREAD(*pzlib_filefunc_def,filestream,&c,1);
-    if (err==1)
-    {
-        *pi = (int)c;
-        return UNZ_OK;
-    }
-    else
-    {
-        if (ZERROR(*pzlib_filefunc_def,filestream))
-            return UNZ_ERRNO;
-        else
-            return UNZ_EOF;
-    }
-}
-
-
-/* ===========================================================================
-   Reads a long in LSB order from the given gz_stream. Sets
-*/
-local int unzlocal_getShort OF((
-    const zlib_filefunc_def* pzlib_filefunc_def,
-    voidpf filestream,
-    uLong *pX));
-
-local int unzlocal_getShort (pzlib_filefunc_def,filestream,pX)
-    const zlib_filefunc_def* pzlib_filefunc_def;
-    voidpf filestream;
-    uLong *pX;
-{
-    uLong x ;
-    int i;
-    int err;
-
-    err = unzlocal_getByte(pzlib_filefunc_def,filestream,&i);
-    x = (uLong)i;
-
-    if (err==UNZ_OK)
-        err = unzlocal_getByte(pzlib_filefunc_def,filestream,&i);
-    x += ((uLong)i)<<8;
-
-    if (err==UNZ_OK)
-        *pX = x;
-    else
-        *pX = 0;
-    return err;
-}
-
-local int unzlocal_getLong OF((
-    const zlib_filefunc_def* pzlib_filefunc_def,
-    voidpf filestream,
-    uLong *pX));
-
-local int unzlocal_getLong (pzlib_filefunc_def,filestream,pX)
-    const zlib_filefunc_def* pzlib_filefunc_def;
-    voidpf filestream;
-    uLong *pX;
-{
-    uLong x ;
-    int i;
-    int err;
-
-    err = unzlocal_getByte(pzlib_filefunc_def,filestream,&i);
-    x = (uLong)i;
-
-    if (err==UNZ_OK)
-        err = unzlocal_getByte(pzlib_filefunc_def,filestream,&i);
-    x += ((uLong)i)<<8;
-
-    if (err==UNZ_OK)
-        err = unzlocal_getByte(pzlib_filefunc_def,filestream,&i);
-    x += ((uLong)i)<<16;
-
-    if (err==UNZ_OK)
-        err = unzlocal_getByte(pzlib_filefunc_def,filestream,&i);
-    x += ((uLong)i)<<24;
-
-    if (err==UNZ_OK)
-        *pX = x;
-    else
-        *pX = 0;
-    return err;
-}
-
-
-/* My own strcmpi / strcasecmp */
-local int strcmpcasenosensitive_internal (fileName1,fileName2)
-    const char* fileName1;
-    const char* fileName2;
-{
-    for (;;)
-    {
-        char c1=*(fileName1++);
-        char c2=*(fileName2++);
-        if ((c1>='a') && (c1<='z'))
-            c1 -= 0x20;
-        if ((c2>='a') && (c2<='z'))
-            c2 -= 0x20;
-        if (c1=='\0')
-            return ((c2=='\0') ? 0 : -1);
-        if (c2=='\0')
-            return 1;
-        if (c1<c2)
-            return -1;
-        if (c1>c2)
-            return 1;
-    }
-}
-
-
-#ifdef  CASESENSITIVITYDEFAULT_NO
-#define CASESENSITIVITYDEFAULTVALUE 2
-#else
-#define CASESENSITIVITYDEFAULTVALUE 1
-#endif
-
-#ifndef STRCMPCASENOSENTIVEFUNCTION
-#define STRCMPCASENOSENTIVEFUNCTION strcmpcasenosensitive_internal
-#endif
-
-/*
-   Compare two filename (fileName1,fileName2).
-   If iCaseSenisivity = 1, comparision is case sensitivity (like strcmp)
-   If iCaseSenisivity = 2, comparision is not case sensitivity (like strcmpi
-                                                                or strcasecmp)
-   If iCaseSenisivity = 0, case sensitivity is defaut of your operating system
-        (like 1 on Unix, 2 on Windows)
-
-*/
-extern int ZEXPORT unzStringFileNameCompare (fileName1,fileName2,iCaseSensitivity)
-    const char* fileName1;
-    const char* fileName2;
-    int iCaseSensitivity;
-{
-    if (iCaseSensitivity==0)
-        iCaseSensitivity=CASESENSITIVITYDEFAULTVALUE;
-
-    if (iCaseSensitivity==1)
-        return strcmp(fileName1,fileName2);
-
-    return STRCMPCASENOSENTIVEFUNCTION(fileName1,fileName2);
-}
-
-#ifndef BUFREADCOMMENT
-#define BUFREADCOMMENT (0x400)
-#endif
-
-/*
-  Locate the Central directory of a zipfile (at the end, just before
-    the global comment)
-*/
-local uLong unzlocal_SearchCentralDir OF((
-    const zlib_filefunc_def* pzlib_filefunc_def,
-    voidpf filestream));
-
-local uLong unzlocal_SearchCentralDir(pzlib_filefunc_def,filestream)
-    const zlib_filefunc_def* pzlib_filefunc_def;
-    voidpf filestream;
-{
-    unsigned char* buf;
-    uLong uSizeFile;
-    uLong uBackRead;
-    uLong uMaxBack=0xffff; /* maximum size of global comment */
-    uLong uPosFound=0;
-
-    if (ZSEEK(*pzlib_filefunc_def,filestream,0,ZLIB_FILEFUNC_SEEK_END) != 0)
-        return 0;
-
-
-    uSizeFile = ZTELL(*pzlib_filefunc_def,filestream);
-
-    if (uMaxBack>uSizeFile)
-        uMaxBack = uSizeFile;
-
-    buf = (unsigned char*)ALLOC(BUFREADCOMMENT+4);
-    if (buf==NULL)
-        return 0;
-
-    uBackRead = 4;
-    while (uBackRead<uMaxBack)
-    {
-        uLong uReadSize,uReadPos ;
-        int i;
-        if (uBackRead+BUFREADCOMMENT>uMaxBack)
-            uBackRead = uMaxBack;
-        else
-            uBackRead+=BUFREADCOMMENT;
-        uReadPos = uSizeFile-uBackRead ;
-
-        uReadSize = ((BUFREADCOMMENT+4) < (uSizeFile-uReadPos)) ?
-                     (BUFREADCOMMENT+4) : (uSizeFile-uReadPos);
-        if (ZSEEK(*pzlib_filefunc_def,filestream,uReadPos,ZLIB_FILEFUNC_SEEK_SET)!=0)
-            break;
-
-        if (ZREAD(*pzlib_filefunc_def,filestream,buf,uReadSize)!=uReadSize)
-            break;
-
-        for (i=(int)uReadSize-3; (i--)>0;)
-            if (((*(buf+i))==0x50) && ((*(buf+i+1))==0x4b) &&
-                ((*(buf+i+2))==0x05) && ((*(buf+i+3))==0x06))
-            {
-                uPosFound = uReadPos+i;
-                break;
-            }
-
-        if (uPosFound!=0)
-            break;
-    }
-    TRYFREE(buf);
-    return uPosFound;
-}
-
-/*
-  Open a Zip file. path contain the full pathname (by example,
-     on a Windows NT computer "c:\\test\\zlib114.zip" or on an Unix computer
-     "zlib/zlib114.zip".
-     If the zipfile cannot be opened (file doesn't exist or in not valid), the
-       return value is NULL.
-     Else, the return value is a unzFile Handle, usable with other function
-       of this unzip package.
-*/
-extern unzFile ZEXPORT unzOpen2 (path, pzlib_filefunc_def)
-    const char *path;
-    zlib_filefunc_def* pzlib_filefunc_def;
-{
-    unz_s us;
-    unz_s *s;
-    uLong central_pos,uL;
-
-    uLong number_disk;          /* number of the current dist, used for
-                                   spaning ZIP, unsupported, always 0*/
-    uLong number_disk_with_CD;  /* number the the disk with central dir, used
-                                   for spaning ZIP, unsupported, always 0*/
-    uLong number_entry_CD;      /* total number of entries in
-                                   the central dir
-                                   (same than number_entry on nospan) */
-
-    int err=UNZ_OK;
-
-    if (unz_copyright[0]!=' ')
-        return NULL;
-
-    if (pzlib_filefunc_def==NULL)
-        fill_fopen_filefunc(&us.z_filefunc);
-    else
-        us.z_filefunc = *pzlib_filefunc_def;
-
-    us.filestream= (*(us.z_filefunc.zopen_file))(us.z_filefunc.opaque,
-                                                 path,
-                                                 ZLIB_FILEFUNC_MODE_READ |
-                                                 ZLIB_FILEFUNC_MODE_EXISTING);
-    if (us.filestream==NULL)
-        return NULL;
-
-    central_pos = unzlocal_SearchCentralDir(&us.z_filefunc,us.filestream);
-    if (central_pos==0)
-        err=UNZ_ERRNO;
-
-    if (ZSEEK(us.z_filefunc, us.filestream,
-                                      central_pos,ZLIB_FILEFUNC_SEEK_SET)!=0)
-        err=UNZ_ERRNO;
-
-    /* the signature, already checked */
-    if (unzlocal_getLong(&us.z_filefunc, us.filestream,&uL)!=UNZ_OK)
-        err=UNZ_ERRNO;
-
-    /* number of this disk */
-    if (unzlocal_getShort(&us.z_filefunc, us.filestream,&number_disk)!=UNZ_OK)
-        err=UNZ_ERRNO;
-
-    /* number of the disk with the start of the central directory */
-    if (unzlocal_getShort(&us.z_filefunc, us.filestream,&number_disk_with_CD)!=UNZ_OK)
-        err=UNZ_ERRNO;
-
-    /* total number of entries in the central dir on this disk */
-    if (unzlocal_getShort(&us.z_filefunc, us.filestream,&us.gi.number_entry)!=UNZ_OK)
-        err=UNZ_ERRNO;
-
-    /* total number of entries in the central dir */
-    if (unzlocal_getShort(&us.z_filefunc, us.filestream,&number_entry_CD)!=UNZ_OK)
-        err=UNZ_ERRNO;
-
-    if ((number_entry_CD!=us.gi.number_entry) ||
-        (number_disk_with_CD!=0) ||
-        (number_disk!=0))
-        err=UNZ_BADZIPFILE;
-
-    /* size of the central directory */
-    if (unzlocal_getLong(&us.z_filefunc, us.filestream,&us.size_central_dir)!=UNZ_OK)
-        err=UNZ_ERRNO;
-
-    /* offset of start of central directory with respect to the
-          starting disk number */
-    if (unzlocal_getLong(&us.z_filefunc, us.filestream,&us.offset_central_dir)!=UNZ_OK)
-        err=UNZ_ERRNO;
-
-    /* zipfile comment length */
-    if (unzlocal_getShort(&us.z_filefunc, us.filestream,&us.gi.size_comment)!=UNZ_OK)
-        err=UNZ_ERRNO;
-
-    if ((central_pos<us.offset_central_dir+us.size_central_dir) &&
-        (err==UNZ_OK))
-        err=UNZ_BADZIPFILE;
-
-    if (err!=UNZ_OK)
-    {
-        ZCLOSE(us.z_filefunc, us.filestream);
-        return NULL;
-    }
-
-    us.byte_before_the_zipfile = central_pos -
-                            (us.offset_central_dir+us.size_central_dir);
-    us.central_pos = central_pos;
-    us.pfile_in_zip_read = NULL;
-    us.encrypted = 0;
-
-
-    s=(unz_s*)ALLOC(sizeof(unz_s));
-    *s=us;
-    unzGoToFirstFile((unzFile)s);
-    return (unzFile)s;
-}
-
-
-extern unzFile ZEXPORT unzOpen (path)
-    const char *path;
-{
-    return unzOpen2(path, NULL);
-}
-
-/*
-  Close a ZipFile opened with unzipOpen.
-  If there is files inside the .Zip opened with unzipOpenCurrentFile (see later),
-    these files MUST be closed with unzipCloseCurrentFile before call unzipClose.
-  return UNZ_OK if there is no problem. */
-extern int ZEXPORT unzClose (file)
-    unzFile file;
-{
-    unz_s* s;
-    if (file==NULL)
-        return UNZ_PARAMERROR;
-    s=(unz_s*)file;
-
-    if (s->pfile_in_zip_read!=NULL)
-        unzCloseCurrentFile(file);
-
-    ZCLOSE(s->z_filefunc, s->filestream);
-    TRYFREE(s);
-    return UNZ_OK;
-}
-
-
-/*
-  Write info about the ZipFile in the *pglobal_info structure.
-  No preparation of the structure is needed
-  return UNZ_OK if there is no problem. */
-extern int ZEXPORT unzGetGlobalInfo (file,pglobal_info)
-    unzFile file;
-    unz_global_info *pglobal_info;
-{
-    unz_s* s;
-    if (file==NULL)
-        return UNZ_PARAMERROR;
-    s=(unz_s*)file;
-    *pglobal_info=s->gi;
-    return UNZ_OK;
-}
-
-
-/*
-   Translate date/time from Dos format to tm_unz (readable more easilty)
-*/
-local void unzlocal_DosDateToTmuDate (ulDosDate, ptm)
-    uLong ulDosDate;
-    tm_unz* ptm;
-{
-    uLong uDate;
-    uDate = (uLong)(ulDosDate>>16);
-    ptm->tm_mday = (uInt)(uDate&0x1f) ;
-    ptm->tm_mon =  (uInt)((((uDate)&0x1E0)/0x20)-1) ;
-    ptm->tm_year = (uInt)(((uDate&0x0FE00)/0x0200)+1980) ;
-
-    ptm->tm_hour = (uInt) ((ulDosDate &0xF800)/0x800);
-    ptm->tm_min =  (uInt) ((ulDosDate&0x7E0)/0x20) ;
-    ptm->tm_sec =  (uInt) (2*(ulDosDate&0x1f)) ;
-}
-
-/*
-  Get Info about the current file in the zipfile, with internal only info
-*/
-local int unzlocal_GetCurrentFileInfoInternal OF((unzFile file,
-                                                  unz_file_info *pfile_info,
-                                                  unz_file_info_internal
-                                                  *pfile_info_internal,
-                                                  char *szFileName,
-                                                  uLong fileNameBufferSize,
-                                                  void *extraField,
-                                                  uLong extraFieldBufferSize,
-                                                  char *szComment,
-                                                  uLong commentBufferSize));
-
-local int unzlocal_GetCurrentFileInfoInternal (file,
-                                              pfile_info,
-                                              pfile_info_internal,
-                                              szFileName, fileNameBufferSize,
-                                              extraField, extraFieldBufferSize,
-                                              szComment,  commentBufferSize)
-    unzFile file;
-    unz_file_info *pfile_info;
-    unz_file_info_internal *pfile_info_internal;
-    char *szFileName;
-    uLong fileNameBufferSize;
-    void *extraField;
-    uLong extraFieldBufferSize;
-    char *szComment;
-    uLong commentBufferSize;
-{
-    unz_s* s;
-    unz_file_info file_info;
-    unz_file_info_internal file_info_internal;
-    int err=UNZ_OK;
-    uLong uMagic;
-    long lSeek=0;
-
-    if (file==NULL)
-        return UNZ_PARAMERROR;
-    s=(unz_s*)file;
-    if (ZSEEK(s->z_filefunc, s->filestream,
-              s->pos_in_central_dir+s->byte_before_the_zipfile,
-              ZLIB_FILEFUNC_SEEK_SET)!=0)
-        err=UNZ_ERRNO;
-
-
-    /* we check the magic */
-    if (err==UNZ_OK)
-        if (unzlocal_getLong(&s->z_filefunc, s->filestream,&uMagic) != UNZ_OK)
-            err=UNZ_ERRNO;
-        else if (uMagic!=0x02014b50)
-            err=UNZ_BADZIPFILE;
-
-    if (unzlocal_getShort(&s->z_filefunc, s->filestream,&file_info.version) != UNZ_OK)
-        err=UNZ_ERRNO;
-
-    if (unzlocal_getShort(&s->z_filefunc, s->filestream,&file_info.version_needed) != UNZ_OK)
-        err=UNZ_ERRNO;
-
-    if (unzlocal_getShort(&s->z_filefunc, s->filestream,&file_info.flag) != UNZ_OK)
-        err=UNZ_ERRNO;
-
-    if (unzlocal_getShort(&s->z_filefunc, s->filestream,&file_info.compression_method) != UNZ_OK)
-        err=UNZ_ERRNO;
-
-    if (unzlocal_getLong(&s->z_filefunc, s->filestream,&file_info.dosDate) != UNZ_OK)
-        err=UNZ_ERRNO;
-
-    unzlocal_DosDateToTmuDate(file_info.dosDate,&file_info.tmu_date);
-
-    if (unzlocal_getLong(&s->z_filefunc, s->filestream,&file_info.crc) != UNZ_OK)
-        err=UNZ_ERRNO;
-
-    if (unzlocal_getLong(&s->z_filefunc, s->filestream,&file_info.compressed_size) != UNZ_OK)
-        err=UNZ_ERRNO;
-
-    if (unzlocal_getLong(&s->z_filefunc, s->filestream,&file_info.uncompressed_size) != UNZ_OK)
-        err=UNZ_ERRNO;
-
-    if (unzlocal_getShort(&s->z_filefunc, s->filestream,&file_info.size_filename) != UNZ_OK)
-        err=UNZ_ERRNO;
-
-    if (unzlocal_getShort(&s->z_filefunc, s->filestream,&file_info.size_file_extra) != UNZ_OK)
-        err=UNZ_ERRNO;
-
-    if (unzlocal_getShort(&s->z_filefunc, s->filestream,&file_info.size_file_comment) != UNZ_OK)
-        err=UNZ_ERRNO;
-
-    if (unzlocal_getShort(&s->z_filefunc, s->filestream,&file_info.disk_num_start) != UNZ_OK)
-        err=UNZ_ERRNO;
-
-    if (unzlocal_getShort(&s->z_filefunc, s->filestream,&file_info.internal_fa) != UNZ_OK)
-        err=UNZ_ERRNO;
-
-    if (unzlocal_getLong(&s->z_filefunc, s->filestream,&file_info.external_fa) != UNZ_OK)
-        err=UNZ_ERRNO;
-
-    if (unzlocal_getLong(&s->z_filefunc, s->filestream,&file_info_internal.offset_curfile) != UNZ_OK)
-        err=UNZ_ERRNO;
-
-    lSeek+=file_info.size_filename;
-    if ((err==UNZ_OK) && (szFileName!=NULL))
-    {
-        uLong uSizeRead ;
-        if (file_info.size_filename<fileNameBufferSize)
-        {
-            *(szFileName+file_info.size_filename)='\0';
-            uSizeRead = file_info.size_filename;
-        }
-        else
-            uSizeRead = fileNameBufferSize;
-
-        if ((file_info.size_filename>0) && (fileNameBufferSize>0))
-            if (ZREAD(s->z_filefunc, s->filestream,szFileName,uSizeRead)!=uSizeRead)
-                err=UNZ_ERRNO;
-        lSeek -= uSizeRead;
-    }
-
-
-    if ((err==UNZ_OK) && (extraField!=NULL))
-    {
-        uLong uSizeRead ;
-        if (file_info.size_file_extra<extraFieldBufferSize)
-            uSizeRead = file_info.size_file_extra;
-        else
-            uSizeRead = extraFieldBufferSize;
-
-        if (lSeek!=0)
-            if (ZSEEK(s->z_filefunc, s->filestream,lSeek,ZLIB_FILEFUNC_SEEK_CUR)==0)
-                lSeek=0;
-            else
-                err=UNZ_ERRNO;
-        if ((file_info.size_file_extra>0) && (extraFieldBufferSize>0))
-            if (ZREAD(s->z_filefunc, s->filestream,extraField,uSizeRead)!=uSizeRead)
-                err=UNZ_ERRNO;
-        lSeek += file_info.size_file_extra - uSizeRead;
-    }
-    else
-        lSeek+=file_info.size_file_extra;
-
-
-    if ((err==UNZ_OK) && (szComment!=NULL))
-    {
-        uLong uSizeRead ;
-        if (file_info.size_file_comment<commentBufferSize)
-        {
-            *(szComment+file_info.size_file_comment)='\0';
-            uSizeRead = file_info.size_file_comment;
-        }
-        else
-            uSizeRead = commentBufferSize;
-
-        if (lSeek!=0)
-            if (ZSEEK(s->z_filefunc, s->filestream,lSeek,ZLIB_FILEFUNC_SEEK_CUR)==0)
-                lSeek=0;
-            else
-                err=UNZ_ERRNO;
-        if ((file_info.size_file_comment>0) && (commentBufferSize>0))
-            if (ZREAD(s->z_filefunc, s->filestream,szComment,uSizeRead)!=uSizeRead)
-                err=UNZ_ERRNO;
-        lSeek+=file_info.size_file_comment - uSizeRead;
-    }
-    else
-        lSeek+=file_info.size_file_comment;
-
-    if ((err==UNZ_OK) && (pfile_info!=NULL))
-        *pfile_info=file_info;
-
-    if ((err==UNZ_OK) && (pfile_info_internal!=NULL))
-        *pfile_info_internal=file_info_internal;
-
-    return err;
-}
-
-
-
-/*
-  Write info about the ZipFile in the *pglobal_info structure.
-  No preparation of the structure is needed
-  return UNZ_OK if there is no problem.
-*/
-extern int ZEXPORT unzGetCurrentFileInfo (file,
-                                          pfile_info,
-                                          szFileName, fileNameBufferSize,
-                                          extraField, extraFieldBufferSize,
-                                          szComment,  commentBufferSize)
-    unzFile file;
-    unz_file_info *pfile_info;
-    char *szFileName;
-    uLong fileNameBufferSize;
-    void *extraField;
-    uLong extraFieldBufferSize;
-    char *szComment;
-    uLong commentBufferSize;
-{
-    return unzlocal_GetCurrentFileInfoInternal(file,pfile_info,NULL,
-                                                szFileName,fileNameBufferSize,
-                                                extraField,extraFieldBufferSize,
-                                                szComment,commentBufferSize);
-}
-
-/*
-  Set the current file of the zipfile to the first file.
-  return UNZ_OK if there is no problem
-*/
-extern int ZEXPORT unzGoToFirstFile (file)
-    unzFile file;
-{
-    int err=UNZ_OK;
-    unz_s* s;
-    if (file==NULL)
-        return UNZ_PARAMERROR;
-    s=(unz_s*)file;
-    s->pos_in_central_dir=s->offset_central_dir;
-    s->num_file=0;
-    err=unzlocal_GetCurrentFileInfoInternal(file,&s->cur_file_info,
-                                             &s->cur_file_info_internal,
-                                             NULL,0,NULL,0,NULL,0);
-    s->current_file_ok = (err == UNZ_OK);
-    return err;
-}
-
-/*
-  Set the current file of the zipfile to the next file.
-  return UNZ_OK if there is no problem
-  return UNZ_END_OF_LIST_OF_FILE if the actual file was the latest.
-*/
-extern int ZEXPORT unzGoToNextFile (file)
-    unzFile file;
-{
-    unz_s* s;
-    int err;
-
-    if (file==NULL)
-        return UNZ_PARAMERROR;
-    s=(unz_s*)file;
-    if (!s->current_file_ok)
-        return UNZ_END_OF_LIST_OF_FILE;
-    if (s->gi.number_entry != 0xffff)    /* 2^16 files overflow hack */
-      if (s->num_file+1==s->gi.number_entry)
-        return UNZ_END_OF_LIST_OF_FILE;
-
-    s->pos_in_central_dir += SIZECENTRALDIRITEM + s->cur_file_info.size_filename +
-            s->cur_file_info.size_file_extra + s->cur_file_info.size_file_comment ;
-    s->num_file++;
-    err = unzlocal_GetCurrentFileInfoInternal(file,&s->cur_file_info,
-                                               &s->cur_file_info_internal,
-                                               NULL,0,NULL,0,NULL,0);
-    s->current_file_ok = (err == UNZ_OK);
-    return err;
-}
-
-
-/*
-  Try locate the file szFileName in the zipfile.
-  For the iCaseSensitivity signification, see unzipStringFileNameCompare
-
-  return value :
-  UNZ_OK if the file is found. It becomes the current file.
-  UNZ_END_OF_LIST_OF_FILE if the file is not found
-*/
-extern int ZEXPORT unzLocateFile (file, szFileName, iCaseSensitivity)
-    unzFile file;
-    const char *szFileName;
-    int iCaseSensitivity;
-{
-    unz_s* s;
-    int err;
-
-    /* We remember the 'current' position in the file so that we can jump
-     * back there if we fail.
-     */
-    unz_file_info cur_file_infoSaved;
-    unz_file_info_internal cur_file_info_internalSaved;
-    uLong num_fileSaved;
-    uLong pos_in_central_dirSaved;
-
-
-    if (file==NULL)
-        return UNZ_PARAMERROR;
-
-    if (strlen(szFileName)>=UNZ_MAXFILENAMEINZIP)
-        return UNZ_PARAMERROR;
-
-    s=(unz_s*)file;
-    if (!s->current_file_ok)
-        return UNZ_END_OF_LIST_OF_FILE;
-
-    /* Save the current state */
-    num_fileSaved = s->num_file;
-    pos_in_central_dirSaved = s->pos_in_central_dir;
-    cur_file_infoSaved = s->cur_file_info;
-    cur_file_info_internalSaved = s->cur_file_info_internal;
-
-    err = unzGoToFirstFile(file);
-
-    while (err == UNZ_OK)
-    {
-        char szCurrentFileName[UNZ_MAXFILENAMEINZIP+1];
-        err = unzGetCurrentFileInfo(file,NULL,
-                                    szCurrentFileName,sizeof(szCurrentFileName)-1,
-                                    NULL,0,NULL,0);
-        if (err == UNZ_OK)
-        {
-            if (unzStringFileNameCompare(szCurrentFileName,
-                                            szFileName,iCaseSensitivity)==0)
-                return UNZ_OK;
-            err = unzGoToNextFile(file);
-        }
-    }
-
-    /* We failed, so restore the state of the 'current file' to where we
-     * were.
-     */
-    s->num_file = num_fileSaved ;
-    s->pos_in_central_dir = pos_in_central_dirSaved ;
-    s->cur_file_info = cur_file_infoSaved;
-    s->cur_file_info_internal = cur_file_info_internalSaved;
-    return err;
-}
-
-
-/*
-///////////////////////////////////////////
-// Contributed by Ryan Haksi (mailto://cryogen@infoserve.net)
-// I need random access
-//
-// Further optimization could be realized by adding an ability
-// to cache the directory in memory. The goal being a single
-// comprehensive file read to put the file I need in a memory.
-*/
-
-/*
-typedef struct unz_file_pos_s
-{
-    uLong pos_in_zip_directory;   // offset in file
-    uLong num_of_file;            // # of file
-} unz_file_pos;
-*/
-
-extern int ZEXPORT unzGetFilePos(file, file_pos)
-    unzFile file;
-    unz_file_pos* file_pos;
-{
-    unz_s* s;
-
-    if (file==NULL || file_pos==NULL)
-        return UNZ_PARAMERROR;
-    s=(unz_s*)file;
-    if (!s->current_file_ok)
-        return UNZ_END_OF_LIST_OF_FILE;
-
-    file_pos->pos_in_zip_directory  = s->pos_in_central_dir;
-    file_pos->num_of_file           = s->num_file;
-
-    return UNZ_OK;
-}
-
-extern int ZEXPORT unzGoToFilePos(file, file_pos)
-    unzFile file;
-    unz_file_pos* file_pos;
-{
-    unz_s* s;
-    int err;
-
-    if (file==NULL || file_pos==NULL)
-        return UNZ_PARAMERROR;
-    s=(unz_s*)file;
-
-    /* jump to the right spot */
-    s->pos_in_central_dir = file_pos->pos_in_zip_directory;
-    s->num_file           = file_pos->num_of_file;
-
-    /* set the current file */
-    err = unzlocal_GetCurrentFileInfoInternal(file,&s->cur_file_info,
-                                               &s->cur_file_info_internal,
-                                               NULL,0,NULL,0,NULL,0);
-    /* return results */
-    s->current_file_ok = (err == UNZ_OK);
-    return err;
-}
-
-/*
-// Unzip Helper Functions - should be here?
-///////////////////////////////////////////
-*/
-
-/*
-  Read the local header of the current zipfile
-  Check the coherency of the local header and info in the end of central
-        directory about this file
-  store in *piSizeVar the size of extra info in local header
-        (filename and size of extra field data)
-*/
-local int unzlocal_CheckCurrentFileCoherencyHeader (s,piSizeVar,
-                                                    poffset_local_extrafield,
-                                                    psize_local_extrafield)
-    unz_s* s;
-    uInt* piSizeVar;
-    uLong *poffset_local_extrafield;
-    uInt  *psize_local_extrafield;
-{
-    uLong uMagic,uData,uFlags;
-    uLong size_filename;
-    uLong size_extra_field;
-    int err=UNZ_OK;
-
-    *piSizeVar = 0;
-    *poffset_local_extrafield = 0;
-    *psize_local_extrafield = 0;
-
-    if (ZSEEK(s->z_filefunc, s->filestream,s->cur_file_info_internal.offset_curfile +
-                                s->byte_before_the_zipfile,ZLIB_FILEFUNC_SEEK_SET)!=0)
-        return UNZ_ERRNO;
-
-
-    if (err==UNZ_OK)
-        if (unzlocal_getLong(&s->z_filefunc, s->filestream,&uMagic) != UNZ_OK)
-            err=UNZ_ERRNO;
-        else if (uMagic!=0x04034b50)
-            err=UNZ_BADZIPFILE;
-
-    if (unzlocal_getShort(&s->z_filefunc, s->filestream,&uData) != UNZ_OK)
-        err=UNZ_ERRNO;
-/*
-    else if ((err==UNZ_OK) && (uData!=s->cur_file_info.wVersion))
-        err=UNZ_BADZIPFILE;
-*/
-    if (unzlocal_getShort(&s->z_filefunc, s->filestream,&uFlags) != UNZ_OK)
-        err=UNZ_ERRNO;
-
-    if (unzlocal_getShort(&s->z_filefunc, s->filestream,&uData) != UNZ_OK)
-        err=UNZ_ERRNO;
-    else if ((err==UNZ_OK) && (uData!=s->cur_file_info.compression_method))
-        err=UNZ_BADZIPFILE;
-
-    if ((err==UNZ_OK) && (s->cur_file_info.compression_method!=0) &&
-                         (s->cur_file_info.compression_method!=Z_DEFLATED))
-        err=UNZ_BADZIPFILE;
-
-    if (unzlocal_getLong(&s->z_filefunc, s->filestream,&uData) != UNZ_OK) /* date/time */
-        err=UNZ_ERRNO;
-
-    if (unzlocal_getLong(&s->z_filefunc, s->filestream,&uData) != UNZ_OK) /* crc */
-        err=UNZ_ERRNO;
-    else if ((err==UNZ_OK) && (uData!=s->cur_file_info.crc) &&
-                              ((uFlags & 8)==0))
-        err=UNZ_BADZIPFILE;
-
-    if (unzlocal_getLong(&s->z_filefunc, s->filestream,&uData) != UNZ_OK) /* size compr */
-        err=UNZ_ERRNO;
-    else if ((err==UNZ_OK) && (uData!=s->cur_file_info.compressed_size) &&
-                              ((uFlags & 8)==0))
-        err=UNZ_BADZIPFILE;
-
-    if (unzlocal_getLong(&s->z_filefunc, s->filestream,&uData) != UNZ_OK) /* size uncompr */
-        err=UNZ_ERRNO;
-    else if ((err==UNZ_OK) && (uData!=s->cur_file_info.uncompressed_size) &&
-                              ((uFlags & 8)==0))
-        err=UNZ_BADZIPFILE;
-
-
-    if (unzlocal_getShort(&s->z_filefunc, s->filestream,&size_filename) != UNZ_OK)
-        err=UNZ_ERRNO;
-    else if ((err==UNZ_OK) && (size_filename!=s->cur_file_info.size_filename))
-        err=UNZ_BADZIPFILE;
-
-    *piSizeVar += (uInt)size_filename;
-
-    if (unzlocal_getShort(&s->z_filefunc, s->filestream,&size_extra_field) != UNZ_OK)
-        err=UNZ_ERRNO;
-    *poffset_local_extrafield= s->cur_file_info_internal.offset_curfile +
-                                    SIZEZIPLOCALHEADER + size_filename;
-    *psize_local_extrafield = (uInt)size_extra_field;
-
-    *piSizeVar += (uInt)size_extra_field;
-
-    return err;
-}
-
-/*
-  Open for reading data the current file in the zipfile.
-  If there is no error and the file is opened, the return value is UNZ_OK.
-*/
-extern int ZEXPORT unzOpenCurrentFile3 (file, method, level, raw, password)
-    unzFile file;
-    int* method;
-    int* level;
-    int raw;
-    const char* password;
-{
-    int err=UNZ_OK;
-    uInt iSizeVar;
-    unz_s* s;
-    file_in_zip_read_info_s* pfile_in_zip_read_info;
-    uLong offset_local_extrafield;  /* offset of the local extra field */
-    uInt  size_local_extrafield;    /* size of the local extra field */
-#    ifndef NOUNCRYPT
-    char source[12];
-#    else
-    if (password != NULL)
-        return UNZ_PARAMERROR;
-#    endif
-
-    if (file==NULL)
-        return UNZ_PARAMERROR;
-    s=(unz_s*)file;
-    if (!s->current_file_ok)
-        return UNZ_PARAMERROR;
-
-    if (s->pfile_in_zip_read != NULL)
-        unzCloseCurrentFile(file);
-
-    if (unzlocal_CheckCurrentFileCoherencyHeader(s,&iSizeVar,
-                &offset_local_extrafield,&size_local_extrafield)!=UNZ_OK)
-        return UNZ_BADZIPFILE;
-
-    pfile_in_zip_read_info = (file_in_zip_read_info_s*)
-                                        ALLOC(sizeof(file_in_zip_read_info_s));
-    if (pfile_in_zip_read_info==NULL)
-        return UNZ_INTERNALERROR;
-
-    pfile_in_zip_read_info->read_buffer=(char*)ALLOC(UNZ_BUFSIZE);
-    pfile_in_zip_read_info->offset_local_extrafield = offset_local_extrafield;
-    pfile_in_zip_read_info->size_local_extrafield = size_local_extrafield;
-    pfile_in_zip_read_info->pos_local_extrafield=0;
-    pfile_in_zip_read_info->raw=raw;
-
-    if (pfile_in_zip_read_info->read_buffer==NULL)
-    {
-        TRYFREE(pfile_in_zip_read_info);
-        return UNZ_INTERNALERROR;
-    }
-
-    pfile_in_zip_read_info->stream_initialised=0;
-
-    if (method!=NULL)
-        *method = (int)s->cur_file_info.compression_method;
-
-    if (level!=NULL)
-    {
-        *level = 6;
-        switch (s->cur_file_info.flag & 0x06)
-        {
-          case 6 : *level = 1; break;
-          case 4 : *level = 2; break;
-          case 2 : *level = 9; break;
-        }
-    }
-
-    if ((s->cur_file_info.compression_method!=0) &&
-        (s->cur_file_info.compression_method!=Z_DEFLATED))
-        err=UNZ_BADZIPFILE;
-
-    pfile_in_zip_read_info->crc32_wait=s->cur_file_info.crc;
-    pfile_in_zip_read_info->crc32=0;
-    pfile_in_zip_read_info->compression_method =
-            s->cur_file_info.compression_method;
-    pfile_in_zip_read_info->filestream=s->filestream;
-    pfile_in_zip_read_info->z_filefunc=s->z_filefunc;
-    pfile_in_zip_read_info->byte_before_the_zipfile=s->byte_before_the_zipfile;
-
-    pfile_in_zip_read_info->stream.total_out = 0;
-
-    if ((s->cur_file_info.compression_method==Z_DEFLATED) &&
-        (!raw))
-    {
-      pfile_in_zip_read_info->stream.zalloc = (alloc_func)0;
-      pfile_in_zip_read_info->stream.zfree = (free_func)0;
-      pfile_in_zip_read_info->stream.opaque = (voidpf)0;
-      pfile_in_zip_read_info->stream.next_in = (voidpf)0;
-      pfile_in_zip_read_info->stream.avail_in = 0;
-
-      err=inflateInit2(&pfile_in_zip_read_info->stream, -MAX_WBITS);
-      if (err == Z_OK)
-        pfile_in_zip_read_info->stream_initialised=1;
-      else
-      {
-        TRYFREE(pfile_in_zip_read_info);
-        return err;
-      }
-        /* windowBits is passed < 0 to tell that there is no zlib header.
-         * Note that in this case inflate *requires* an extra "dummy" byte
-         * after the compressed stream in order to complete decompression and
-         * return Z_STREAM_END.
-         * In unzip, i don't wait absolutely Z_STREAM_END because I known the
-         * size of both compressed and uncompressed data
-         */
-    }
-    pfile_in_zip_read_info->rest_read_compressed =
-            s->cur_file_info.compressed_size ;
-    pfile_in_zip_read_info->rest_read_uncompressed =
-            s->cur_file_info.uncompressed_size ;
-
-
-    pfile_in_zip_read_info->pos_in_zipfile =
-            s->cur_file_info_internal.offset_curfile + SIZEZIPLOCALHEADER +
-              iSizeVar;
-
-    pfile_in_zip_read_info->stream.avail_in = (uInt)0;
-
-    s->pfile_in_zip_read = pfile_in_zip_read_info;
-
-#    ifndef NOUNCRYPT
-    if (password != NULL)
-    {
-        int i;
-        s->pcrc_32_tab = get_crc_table();
-        init_keys(password,s->keys,s->pcrc_32_tab);
-        if (ZSEEK(s->z_filefunc, s->filestream,
-                  s->pfile_in_zip_read->pos_in_zipfile +
-                     s->pfile_in_zip_read->byte_before_the_zipfile,
-                  SEEK_SET)!=0)
-            return UNZ_INTERNALERROR;
-        if(ZREAD(s->z_filefunc, s->filestream,source, 12)<12)
-            return UNZ_INTERNALERROR;
-
-        for (i = 0; i<12; i++)
-            zdecode(s->keys,s->pcrc_32_tab,source[i]);
-
-        s->pfile_in_zip_read->pos_in_zipfile+=12;
-        s->encrypted=1;
-    }
-#    endif
-
-
-    return UNZ_OK;
-}
-
-extern int ZEXPORT unzOpenCurrentFile (file)
-    unzFile file;
-{
-    return unzOpenCurrentFile3(file, NULL, NULL, 0, NULL);
-}
-
-extern int ZEXPORT unzOpenCurrentFilePassword (file, password)
-    unzFile file;
-    const char* password;
-{
-    return unzOpenCurrentFile3(file, NULL, NULL, 0, password);
-}
-
-extern int ZEXPORT unzOpenCurrentFile2 (file,method,level,raw)
-    unzFile file;
-    int* method;
-    int* level;
-    int raw;
-{
-    return unzOpenCurrentFile3(file, method, level, raw, NULL);
-}
-
-/*
-  Read bytes from the current file.
-  buf contain buffer where data must be copied
-  len the size of buf.
-
-  return the number of byte copied if somes bytes are copied
-  return 0 if the end of file was reached
-  return <0 with error code if there is an error
-    (UNZ_ERRNO for IO error, or zLib error for uncompress error)
-*/
-extern int ZEXPORT unzReadCurrentFile  (file, buf, len)
-    unzFile file;
-    voidp buf;
-    unsigned len;
-{
-    int err=UNZ_OK;
-    uInt iRead = 0;
-    unz_s* s;
-    file_in_zip_read_info_s* pfile_in_zip_read_info;
-    if (file==NULL)
-        return UNZ_PARAMERROR;
-    s=(unz_s*)file;
-    pfile_in_zip_read_info=s->pfile_in_zip_read;
-
-    if (pfile_in_zip_read_info==NULL)
-        return UNZ_PARAMERROR;
-
-
-    if ((pfile_in_zip_read_info->read_buffer == NULL))
-        return UNZ_END_OF_LIST_OF_FILE;
-    if (len==0)
-        return 0;
-
-    pfile_in_zip_read_info->stream.next_out = (Bytef*)buf;
-
-    pfile_in_zip_read_info->stream.avail_out = (uInt)len;
-
-    if ((len>pfile_in_zip_read_info->rest_read_uncompressed) &&
-        (!(pfile_in_zip_read_info->raw)))
-        pfile_in_zip_read_info->stream.avail_out =
-            (uInt)pfile_in_zip_read_info->rest_read_uncompressed;
-
-    if ((len>pfile_in_zip_read_info->rest_read_compressed+
-           pfile_in_zip_read_info->stream.avail_in) &&
-         (pfile_in_zip_read_info->raw))
-        pfile_in_zip_read_info->stream.avail_out =
-            (uInt)pfile_in_zip_read_info->rest_read_compressed+
-            pfile_in_zip_read_info->stream.avail_in;
-
-    while (pfile_in_zip_read_info->stream.avail_out>0)
-    {
-        if ((pfile_in_zip_read_info->stream.avail_in==0) &&
-            (pfile_in_zip_read_info->rest_read_compressed>0))
-        {
-            uInt uReadThis = UNZ_BUFSIZE;
-            if (pfile_in_zip_read_info->rest_read_compressed<uReadThis)
-                uReadThis = (uInt)pfile_in_zip_read_info->rest_read_compressed;
-            if (uReadThis == 0)
-                return UNZ_EOF;
-            if (ZSEEK(pfile_in_zip_read_info->z_filefunc,
-                      pfile_in_zip_read_info->filestream,
-                      pfile_in_zip_read_info->pos_in_zipfile +
-                         pfile_in_zip_read_info->byte_before_the_zipfile,
-                         ZLIB_FILEFUNC_SEEK_SET)!=0)
-                return UNZ_ERRNO;
-            if (ZREAD(pfile_in_zip_read_info->z_filefunc,
-                      pfile_in_zip_read_info->filestream,
-                      pfile_in_zip_read_info->read_buffer,
-                      uReadThis)!=uReadThis)
-                return UNZ_ERRNO;
-
-
-#            ifndef NOUNCRYPT
-            if(s->encrypted)
-            {
-                uInt i;
-                for(i=0;i<uReadThis;i++)
-                  pfile_in_zip_read_info->read_buffer[i] =
-                      zdecode(s->keys,s->pcrc_32_tab,
-                              pfile_in_zip_read_info->read_buffer[i]);
-            }
-#            endif
-
-
-            pfile_in_zip_read_info->pos_in_zipfile += uReadThis;
-
-            pfile_in_zip_read_info->rest_read_compressed-=uReadThis;
-
-            pfile_in_zip_read_info->stream.next_in =
-                (Bytef*)pfile_in_zip_read_info->read_buffer;
-            pfile_in_zip_read_info->stream.avail_in = (uInt)uReadThis;
-        }
-
-        if ((pfile_in_zip_read_info->compression_method==0) || (pfile_in_zip_read_info->raw))
-        {
-            uInt uDoCopy,i ;
-
-            if ((pfile_in_zip_read_info->stream.avail_in == 0) &&
-                (pfile_in_zip_read_info->rest_read_compressed == 0))
-                return (iRead==0) ? UNZ_EOF : iRead;
-
-            if (pfile_in_zip_read_info->stream.avail_out <
-                            pfile_in_zip_read_info->stream.avail_in)
-                uDoCopy = pfile_in_zip_read_info->stream.avail_out ;
-            else
-                uDoCopy = pfile_in_zip_read_info->stream.avail_in ;
-
-            for (i=0;i<uDoCopy;i++)
-                *(pfile_in_zip_read_info->stream.next_out+i) =
-                        *(pfile_in_zip_read_info->stream.next_in+i);
-
-            pfile_in_zip_read_info->crc32 = crc32(pfile_in_zip_read_info->crc32,
-                                pfile_in_zip_read_info->stream.next_out,
-                                uDoCopy);
-            pfile_in_zip_read_info->rest_read_uncompressed-=uDoCopy;
-            pfile_in_zip_read_info->stream.avail_in -= uDoCopy;
-            pfile_in_zip_read_info->stream.avail_out -= uDoCopy;
-            pfile_in_zip_read_info->stream.next_out += uDoCopy;
-            pfile_in_zip_read_info->stream.next_in += uDoCopy;
-            pfile_in_zip_read_info->stream.total_out += uDoCopy;
-            iRead += uDoCopy;
-        }
-        else
-        {
-            uLong uTotalOutBefore,uTotalOutAfter;
-            const Bytef *bufBefore;
-            uLong uOutThis;
-            int flush=Z_SYNC_FLUSH;
-
-            uTotalOutBefore = pfile_in_zip_read_info->stream.total_out;
-            bufBefore = pfile_in_zip_read_info->stream.next_out;
-
-            /*
-            if ((pfile_in_zip_read_info->rest_read_uncompressed ==
-                     pfile_in_zip_read_info->stream.avail_out) &&
-                (pfile_in_zip_read_info->rest_read_compressed == 0))
-                flush = Z_FINISH;
-            */
-            err=inflate(&pfile_in_zip_read_info->stream,flush);
-
-            if ((err>=0) && (pfile_in_zip_read_info->stream.msg!=NULL))
-              err = Z_DATA_ERROR;
-
-            uTotalOutAfter = pfile_in_zip_read_info->stream.total_out;
-            uOutThis = uTotalOutAfter-uTotalOutBefore;
-
-            pfile_in_zip_read_info->crc32 =
-                crc32(pfile_in_zip_read_info->crc32,bufBefore,
-                        (uInt)(uOutThis));
-
-            pfile_in_zip_read_info->rest_read_uncompressed -=
-                uOutThis;
-
-            iRead += (uInt)(uTotalOutAfter - uTotalOutBefore);
-
-            if (err==Z_STREAM_END)
-                return (iRead==0) ? UNZ_EOF : iRead;
-            if (err!=Z_OK)
-                break;
-        }
-    }
-
-    if (err==Z_OK)
-        return iRead;
-    return err;
-}
-
-
-/*
-  Give the current position in uncompressed data
-*/
-extern z_off_t ZEXPORT unztell (file)
-    unzFile file;
-{
-    unz_s* s;
-    file_in_zip_read_info_s* pfile_in_zip_read_info;
-    if (file==NULL)
-        return UNZ_PARAMERROR;
-    s=(unz_s*)file;
-    pfile_in_zip_read_info=s->pfile_in_zip_read;
-
-    if (pfile_in_zip_read_info==NULL)
-        return UNZ_PARAMERROR;
-
-    return (z_off_t)pfile_in_zip_read_info->stream.total_out;
-}
-
-
-/*
-  return 1 if the end of file was reached, 0 elsewhere
-*/
-extern int ZEXPORT unzeof (file)
-    unzFile file;
-{
-    unz_s* s;
-    file_in_zip_read_info_s* pfile_in_zip_read_info;
-    if (file==NULL)
-        return UNZ_PARAMERROR;
-    s=(unz_s*)file;
-    pfile_in_zip_read_info=s->pfile_in_zip_read;
-
-    if (pfile_in_zip_read_info==NULL)
-        return UNZ_PARAMERROR;
-
-    if (pfile_in_zip_read_info->rest_read_uncompressed == 0)
-        return 1;
-    else
-        return 0;
-}
-
-
-
-/*
-  Read extra field from the current file (opened by unzOpenCurrentFile)
-  This is the local-header version of the extra field (sometimes, there is
-    more info in the local-header version than in the central-header)
-
-  if buf==NULL, it return the size of the local extra field that can be read
-
-  if buf!=NULL, len is the size of the buffer, the extra header is copied in
-    buf.
-  the return value is the number of bytes copied in buf, or (if <0)
-    the error code
-*/
-extern int ZEXPORT unzGetLocalExtrafield (file,buf,len)
-    unzFile file;
-    voidp buf;
-    unsigned len;
-{
-    unz_s* s;
-    file_in_zip_read_info_s* pfile_in_zip_read_info;
-    uInt read_now;
-    uLong size_to_read;
-
-    if (file==NULL)
-        return UNZ_PARAMERROR;
-    s=(unz_s*)file;
-    pfile_in_zip_read_info=s->pfile_in_zip_read;
-
-    if (pfile_in_zip_read_info==NULL)
-        return UNZ_PARAMERROR;
-
-    size_to_read = (pfile_in_zip_read_info->size_local_extrafield -
-                pfile_in_zip_read_info->pos_local_extrafield);
-
-    if (buf==NULL)
-        return (int)size_to_read;
-
-    if (len>size_to_read)
-        read_now = (uInt)size_to_read;
-    else
-        read_now = (uInt)len ;
-
-    if (read_now==0)
-        return 0;
-
-    if (ZSEEK(pfile_in_zip_read_info->z_filefunc,
-              pfile_in_zip_read_info->filestream,
-              pfile_in_zip_read_info->offset_local_extrafield +
-              pfile_in_zip_read_info->pos_local_extrafield,
-              ZLIB_FILEFUNC_SEEK_SET)!=0)
-        return UNZ_ERRNO;
-
-    if (ZREAD(pfile_in_zip_read_info->z_filefunc,
-              pfile_in_zip_read_info->filestream,
-              buf,read_now)!=read_now)
-        return UNZ_ERRNO;
-
-    return (int)read_now;
-}
-
-/*
-  Close the file in zip opened with unzipOpenCurrentFile
-  Return UNZ_CRCERROR if all the file was read but the CRC is not good
-*/
-extern int ZEXPORT unzCloseCurrentFile (file)
-    unzFile file;
-{
-    int err=UNZ_OK;
-
-    unz_s* s;
-    file_in_zip_read_info_s* pfile_in_zip_read_info;
-    if (file==NULL)
-        return UNZ_PARAMERROR;
-    s=(unz_s*)file;
-    pfile_in_zip_read_info=s->pfile_in_zip_read;
-
-    if (pfile_in_zip_read_info==NULL)
-        return UNZ_PARAMERROR;
-
-
-    if ((pfile_in_zip_read_info->rest_read_uncompressed == 0) &&
-        (!pfile_in_zip_read_info->raw))
-    {
-        if (pfile_in_zip_read_info->crc32 != pfile_in_zip_read_info->crc32_wait)
-            err=UNZ_CRCERROR;
-    }
-
-
-    TRYFREE(pfile_in_zip_read_info->read_buffer);
-    pfile_in_zip_read_info->read_buffer = NULL;
-    if (pfile_in_zip_read_info->stream_initialised)
-        inflateEnd(&pfile_in_zip_read_info->stream);
-
-    pfile_in_zip_read_info->stream_initialised = 0;
-    TRYFREE(pfile_in_zip_read_info);
-
-    s->pfile_in_zip_read=NULL;
-
-    return err;
-}
-
-
-/*
-  Get the global comment string of the ZipFile, in the szComment buffer.
-  uSizeBuf is the size of the szComment buffer.
-  return the number of byte copied or an error code <0
-*/
-extern int ZEXPORT unzGetGlobalComment (file, szComment, uSizeBuf)
-    unzFile file;
-    char *szComment;
-    uLong uSizeBuf;
-{
-    int err=UNZ_OK;
-    unz_s* s;
-    uLong uReadThis ;
-    if (file==NULL)
-        return UNZ_PARAMERROR;
-    s=(unz_s*)file;
-
-    uReadThis = uSizeBuf;
-    if (uReadThis>s->gi.size_comment)
-        uReadThis = s->gi.size_comment;
-
-    if (ZSEEK(s->z_filefunc,s->filestream,s->central_pos+22,ZLIB_FILEFUNC_SEEK_SET)!=0)
-        return UNZ_ERRNO;
-
-    if (uReadThis>0)
-    {
-      *szComment='\0';
-      if (ZREAD(s->z_filefunc,s->filestream,szComment,uReadThis)!=uReadThis)
-        return UNZ_ERRNO;
-    }
-
-    if ((szComment != NULL) && (uSizeBuf > s->gi.size_comment))
-        *(szComment+s->gi.size_comment)='\0';
-    return (int)uReadThis;
-}
-
-/* Additions by RX '2004 */
-extern uLong ZEXPORT unzGetOffset (file)
-    unzFile file;
-{
-    unz_s* s;
-
-    if (file==NULL)
-          return UNZ_PARAMERROR;
-    s=(unz_s*)file;
-    if (!s->current_file_ok)
-      return 0;
-    if (s->gi.number_entry != 0 && s->gi.number_entry != 0xffff)
-      if (s->num_file==s->gi.number_entry)
-         return 0;
-    return s->pos_in_central_dir;
-}
-
-extern int ZEXPORT unzSetOffset (file, pos)
-        unzFile file;
-        uLong pos;
-{
-    unz_s* s;
-    int err;
-
-    if (file==NULL)
-        return UNZ_PARAMERROR;
-    s=(unz_s*)file;
-
-    s->pos_in_central_dir = pos;
-    s->num_file = s->gi.number_entry;      /* hack */
-    err = unzlocal_GetCurrentFileInfoInternal(file,&s->cur_file_info,
-                                              &s->cur_file_info_internal,
-                                              NULL,0,NULL,0,NULL,0);
-    s->current_file_ok = (err == UNZ_OK);
-    return err;
-}
Index: trunk/minix/lib/zlib-1.2.3/contrib/minizip/unzip.h
===================================================================
--- trunk/minix/lib/zlib-1.2.3/contrib/minizip/unzip.h	(revision 9)
+++ 	(revision )
@@ -1,354 +1,0 @@
-/* unzip.h -- IO for uncompress .zip files using zlib
-   Version 1.01e, February 12th, 2005
-
-   Copyright (C) 1998-2005 Gilles Vollant
-
-   This unzip package allow extract file from .ZIP file, compatible with PKZip 2.04g
-     WinZip, InfoZip tools and compatible.
-
-   Multi volume ZipFile (span) are not supported.
-   Encryption compatible with pkzip 2.04g only supported
-   Old compressions used by old PKZip 1.x are not supported
-
-
-   I WAIT FEEDBACK at mail info@winimage.com
-   Visit also http://www.winimage.com/zLibDll/unzip.htm for evolution
-
-   Condition of use and distribution are the same than zlib :
-
-  This software is provided 'as-is', without any express or implied
-  warranty.  In no event will the authors be held liable for any damages
-  arising from the use of this software.
-
-  Permission is granted to anyone to use this software for any purpose,
-  including commercial applications, and to alter it and redistribute it
-  freely, subject to the following restrictions:
-
-  1. The origin of this software must not be misrepresented; you must not
-     claim that you wrote the original software. If you use this software
-     in a product, an acknowledgment in the product documentation would be
-     appreciated but is not required.
-  2. Altered source versions must be plainly marked as such, and must not be
-     misrepresented as being the original software.
-  3. This notice may not be removed or altered from any source distribution.
-
-
-*/
-
-/* for more info about .ZIP format, see
-      http://www.info-zip.org/pub/infozip/doc/appnote-981119-iz.zip
-      http://www.info-zip.org/pub/infozip/doc/
-   PkWare has also a specification at :
-      ftp://ftp.pkware.com/probdesc.zip
-*/
-
-#ifndef _unz_H
-#define _unz_H
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#ifndef _ZLIB_H
-#include "zlib.h"
-#endif
-
-#ifndef _ZLIBIOAPI_H
-#include "ioapi.h"
-#endif
-
-#if defined(STRICTUNZIP) || defined(STRICTZIPUNZIP)
-/* like the STRICT of WIN32, we define a pointer that cannot be converted
-    from (void*) without cast */
-typedef struct TagunzFile__ { int unused; } unzFile__;
-typedef unzFile__ *unzFile;
-#else
-typedef voidp unzFile;
-#endif
-
-
-#define UNZ_OK                          (0)
-#define UNZ_END_OF_LIST_OF_FILE         (-100)
-#define UNZ_ERRNO                       (Z_ERRNO)
-#define UNZ_EOF                         (0)
-#define UNZ_PARAMERROR                  (-102)
-#define UNZ_BADZIPFILE                  (-103)
-#define UNZ_INTERNALERROR               (-104)
-#define UNZ_CRCERROR                    (-105)
-
-/* tm_unz contain date/time info */
-typedef struct tm_unz_s
-{
-    uInt tm_sec;            /* seconds after the minute - [0,59] */
-    uInt tm_min;            /* minutes after the hour - [0,59] */
-    uInt tm_hour;           /* hours since midnight - [0,23] */
-    uInt tm_mday;           /* day of the month - [1,31] */
-    uInt tm_mon;            /* months since January - [0,11] */
-    uInt tm_year;           /* years - [1980..2044] */
-} tm_unz;
-
-/* unz_global_info structure contain global data about the ZIPfile
-   These data comes from the end of central dir */
-typedef struct unz_global_info_s
-{
-    uLong number_entry;         /* total number of entries in
-                       the central dir on this disk */
-    uLong size_comment;         /* size of the global comment of the zipfile */
-} unz_global_info;
-
-
-/* unz_file_info contain information about a file in the zipfile */
-typedef struct unz_file_info_s
-{
-    uLong version;              /* version made by                 2 bytes */
-    uLong version_needed;       /* version needed to extract       2 bytes */
-    uLong flag;                 /* general purpose bit flag        2 bytes */
-    uLong compression_method;   /* compression method              2 bytes */
-    uLong dosDate;              /* last mod file date in Dos fmt   4 bytes */
-    uLong crc;                  /* crc-32                          4 bytes */
-    uLong compressed_size;      /* compressed size                 4 bytes */
-    uLong uncompressed_size;    /* uncompressed size               4 bytes */
-    uLong size_filename;        /* filename length                 2 bytes */
-    uLong size_file_extra;      /* extra field length              2 bytes */
-    uLong size_file_comment;    /* file comment length             2 bytes */
-
-    uLong disk_num_start;       /* disk number start               2 bytes */
-    uLong internal_fa;          /* internal file attributes        2 bytes */
-    uLong external_fa;          /* external file attributes        4 bytes */
-
-    tm_unz tmu_date;
-} unz_file_info;
-
-extern int ZEXPORT unzStringFileNameCompare OF ((const char* fileName1,
-                                                 const char* fileName2,
-                                                 int iCaseSensitivity));
-/*
-   Compare two filename (fileName1,fileName2).
-   If iCaseSenisivity = 1, comparision is case sensitivity (like strcmp)
-   If iCaseSenisivity = 2, comparision is not case sensitivity (like strcmpi
-                                or strcasecmp)
-   If iCaseSenisivity = 0, case sensitivity is defaut of your operating system
-    (like 1 on Unix, 2 on Windows)
-*/
-
-
-extern unzFile ZEXPORT unzOpen OF((const char *path));
-/*
-  Open a Zip file. path contain the full pathname (by example,
-     on a Windows XP computer "c:\\zlib\\zlib113.zip" or on an Unix computer
-     "zlib/zlib113.zip".
-     If the zipfile cannot be opened (file don't exist or in not valid), the
-       return value is NULL.
-     Else, the return value is a unzFile Handle, usable with other function
-       of this unzip package.
-*/
-
-extern unzFile ZEXPORT unzOpen2 OF((const char *path,
-                                    zlib_filefunc_def* pzlib_filefunc_def));
-/*
-   Open a Zip file, like unzOpen, but provide a set of file low level API
-      for read/write the zip file (see ioapi.h)
-*/
-
-extern int ZEXPORT unzClose OF((unzFile file));
-/*
-  Close a ZipFile opened with unzipOpen.
-  If there is files inside the .Zip opened with unzOpenCurrentFile (see later),
-    these files MUST be closed with unzipCloseCurrentFile before call unzipClose.
-  return UNZ_OK if there is no problem. */
-
-extern int ZEXPORT unzGetGlobalInfo OF((unzFile file,
-                                        unz_global_info *pglobal_info));
-/*
-  Write info about the ZipFile in the *pglobal_info structure.
-  No preparation of the structure is needed
-  return UNZ_OK if there is no problem. */
-
-
-extern int ZEXPORT unzGetGlobalComment OF((unzFile file,
-                                           char *szComment,
-                                           uLong uSizeBuf));
-/*
-  Get the global comment string of the ZipFile, in the szComment buffer.
-  uSizeBuf is the size of the szComment buffer.
-  return the number of byte copied or an error code <0
-*/
-
-
-/***************************************************************************/
-/* Unzip package allow you browse the directory of the zipfile */
-
-extern int ZEXPORT unzGoToFirstFile OF((unzFile file));
-/*
-  Set the current file of the zipfile to the first file.
-  return UNZ_OK if there is no problem
-*/
-
-extern int ZEXPORT unzGoToNextFile OF((unzFile file));
-/*
-  Set the current file of the zipfile to the next file.
-  return UNZ_OK if there is no problem
-  return UNZ_END_OF_LIST_OF_FILE if the actual file was the latest.
-*/
-
-extern int ZEXPORT unzLocateFile OF((unzFile file,
-                     const char *szFileName,
-                     int iCaseSensitivity));
-/*
-  Try locate the file szFileName in the zipfile.
-  For the iCaseSensitivity signification, see unzStringFileNameCompare
-
-  return value :
-  UNZ_OK if the file is found. It becomes the current file.
-  UNZ_END_OF_LIST_OF_FILE if the file is not found
-*/
-
-
-/* ****************************************** */
-/* Ryan supplied functions */
-/* unz_file_info contain information about a file in the zipfile */
-typedef struct unz_file_pos_s
-{
-    uLong pos_in_zip_directory;   /* offset in zip file directory */
-    uLong num_of_file;            /* # of file */
-} unz_file_pos;
-
-extern int ZEXPORT unzGetFilePos(
-    unzFile file,
-    unz_file_pos* file_pos);
-
-extern int ZEXPORT unzGoToFilePos(
-    unzFile file,
-    unz_file_pos* file_pos);
-
-/* ****************************************** */
-
-extern int ZEXPORT unzGetCurrentFileInfo OF((unzFile file,
-                         unz_file_info *pfile_info,
-                         char *szFileName,
-                         uLong fileNameBufferSize,
-                         void *extraField,
-                         uLong extraFieldBufferSize,
-                         char *szComment,
-                         uLong commentBufferSize));
-/*
-  Get Info about the current file
-  if pfile_info!=NULL, the *pfile_info structure will contain somes info about
-        the current file
-  if szFileName!=NULL, the filemane string will be copied in szFileName
-            (fileNameBufferSize is the size of the buffer)
-  if extraField!=NULL, the extra field information will be copied in extraField
-            (extraFieldBufferSize is the size of the buffer).
-            This is the Central-header version of the extra field
-  if szComment!=NULL, the comment string of the file will be copied in szComment
-            (commentBufferSize is the size of the buffer)
-*/
-
-/***************************************************************************/
-/* for reading the content of the current zipfile, you can open it, read data
-   from it, and close it (you can close it before reading all the file)
-   */
-
-extern int ZEXPORT unzOpenCurrentFile OF((unzFile file));
-/*
-  Open for reading data the current file in the zipfile.
-  If there is no error, the return value is UNZ_OK.
-*/
-
-extern int ZEXPORT unzOpenCurrentFilePassword OF((unzFile file,
-                                                  const char* password));
-/*
-  Open for reading data the current file in the zipfile.
-  password is a crypting password
-  If there is no error, the return value is UNZ_OK.
-*/
-
-extern int ZEXPORT unzOpenCurrentFile2 OF((unzFile file,
-                                           int* method,
-                                           int* level,
-                                           int raw));
-/*
-  Same than unzOpenCurrentFile, but open for read raw the file (not uncompress)
-    if raw==1
-  *method will receive method of compression, *level will receive level of
-     compression
-  note : you can set level parameter as NULL (if you did not want known level,
-         but you CANNOT set method parameter as NULL
-*/
-
-extern int ZEXPORT unzOpenCurrentFile3 OF((unzFile file,
-                                           int* method,
-                                           int* level,
-                                           int raw,
-                                           const char* password));
-/*
-  Same than unzOpenCurrentFile, but open for read raw the file (not uncompress)
-    if raw==1
-  *method will receive method of compression, *level will receive level of
-     compression
-  note : you can set level parameter as NULL (if you did not want known level,
-         but you CANNOT set method parameter as NULL
-*/
-
-
-extern int ZEXPORT unzCloseCurrentFile OF((unzFile file));
-/*
-  Close the file in zip opened with unzOpenCurrentFile
-  Return UNZ_CRCERROR if all the file was read but the CRC is not good
-*/
-
-extern int ZEXPORT unzReadCurrentFile OF((unzFile file,
-                      voidp buf,
-                      unsigned len));
-/*
-  Read bytes from the current file (opened by unzOpenCurrentFile)
-  buf contain buffer where data must be copied
-  len the size of buf.
-
-  return the number of byte copied if somes bytes are copied
-  return 0 if the end of file was reached
-  return <0 with error code if there is an error
-    (UNZ_ERRNO for IO error, or zLib error for uncompress error)
-*/
-
-extern z_off_t ZEXPORT unztell OF((unzFile file));
-/*
-  Give the current position in uncompressed data
-*/
-
-extern int ZEXPORT unzeof OF((unzFile file));
-/*
-  return 1 if the end of file was reached, 0 elsewhere
-*/
-
-extern int ZEXPORT unzGetLocalExtrafield OF((unzFile file,
-                                             voidp buf,
-                                             unsigned len));
-/*
-  Read extra field from the current file (opened by unzOpenCurrentFile)
-  This is the local-header version of the extra field (sometimes, there is
-    more info in the local-header version than in the central-header)
-
-  if buf==NULL, it return the size of the local extra field
-
-  if buf!=NULL, len is the size of the buffer, the extra header is copied in
-    buf.
-  the return value is the number of bytes copied in buf, or (if <0)
-    the error code
-*/
-
-/***************************************************************************/
-
-/* Get the current file offset */
-extern uLong ZEXPORT unzGetOffset (unzFile file);
-
-/* Set the current file offset */
-extern int ZEXPORT unzSetOffset (unzFile file, uLong pos);
-
-
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _unz_H */
Index: trunk/minix/lib/zlib-1.2.3/contrib/minizip/zip.c
===================================================================
--- trunk/minix/lib/zlib-1.2.3/contrib/minizip/zip.c	(revision 9)
+++ 	(revision )
@@ -1,1219 +1,0 @@
-/* zip.c -- IO on .zip files using zlib
-   Version 1.01e, February 12th, 2005
-
-   27 Dec 2004 Rolf Kalbermatter
-   Modification to zipOpen2 to support globalComment retrieval.
-
-   Copyright (C) 1998-2005 Gilles Vollant
-
-   Read zip.h for more info
-*/
-
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <time.h>
-#include "zlib.h"
-#include "zip.h"
-
-#ifdef STDC
-#  include <stddef.h>
-#  include <string.h>
-#  include <stdlib.h>
-#endif
-#ifdef NO_ERRNO_H
-    extern int errno;
-#else
-#   include <errno.h>
-#endif
-
-
-#ifndef local
-#  define local static
-#endif
-/* compile with -Dlocal if your debugger can't find static symbols */
-
-#ifndef VERSIONMADEBY
-# define VERSIONMADEBY   (0x0) /* platform depedent */
-#endif
-
-#ifndef Z_BUFSIZE
-#define Z_BUFSIZE (16384)
-#endif
-
-#ifndef Z_MAXFILENAMEINZIP
-#define Z_MAXFILENAMEINZIP (256)
-#endif
-
-#ifndef ALLOC
-# define ALLOC(size) (malloc(size))
-#endif
-#ifndef TRYFREE
-# define TRYFREE(p) {if (p) free(p);}
-#endif
-
-/*
-#define SIZECENTRALDIRITEM (0x2e)
-#define SIZEZIPLOCALHEADER (0x1e)
-*/
-
-/* I've found an old Unix (a SunOS 4.1.3_U1) without all SEEK_* defined.... */
-
-#ifndef SEEK_CUR
-#define SEEK_CUR    1
-#endif
-
-#ifndef SEEK_END
-#define SEEK_END    2
-#endif
-
-#ifndef SEEK_SET
-#define SEEK_SET    0
-#endif
-
-#ifndef DEF_MEM_LEVEL
-#if MAX_MEM_LEVEL >= 8
-#  define DEF_MEM_LEVEL 8
-#else
-#  define DEF_MEM_LEVEL  MAX_MEM_LEVEL
-#endif
-#endif
-const char zip_copyright[] =
-   " zip 1.01 Copyright 1998-2004 Gilles Vollant - http://www.winimage.com/zLibDll";
-
-
-#define SIZEDATA_INDATABLOCK (4096-(4*4))
-
-#define LOCALHEADERMAGIC    (0x04034b50)
-#define CENTRALHEADERMAGIC  (0x02014b50)
-#define ENDHEADERMAGIC      (0x06054b50)
-
-#define FLAG_LOCALHEADER_OFFSET (0x06)
-#define CRC_LOCALHEADER_OFFSET  (0x0e)
-
-#define SIZECENTRALHEADER (0x2e) /* 46 */
-
-typedef struct linkedlist_datablock_internal_s
-{
-  struct linkedlist_datablock_internal_s* next_datablock;
-  uLong  avail_in_this_block;
-  uLong  filled_in_this_block;
-  uLong  unused; /* for future use and alignement */
-  unsigned char data[SIZEDATA_INDATABLOCK];
-} linkedlist_datablock_internal;
-
-typedef struct linkedlist_data_s
-{
-    linkedlist_datablock_internal* first_block;
-    linkedlist_datablock_internal* last_block;
-} linkedlist_data;
-
-
-typedef struct
-{
-    z_stream stream;            /* zLib stream structure for inflate */
-    int  stream_initialised;    /* 1 is stream is initialised */
-    uInt pos_in_buffered_data;  /* last written byte in buffered_data */
-
-    uLong pos_local_header;     /* offset of the local header of the file
-                                     currenty writing */
-    char* central_header;       /* central header data for the current file */
-    uLong size_centralheader;   /* size of the central header for cur file */
-    uLong flag;                 /* flag of the file currently writing */
-
-    int  method;                /* compression method of file currenty wr.*/
-    int  raw;                   /* 1 for directly writing raw data */
-    Byte buffered_data[Z_BUFSIZE];/* buffer contain compressed data to be writ*/
-    uLong dosDate;
-    uLong crc32;
-    int  encrypt;
-#ifndef NOCRYPT
-    unsigned long keys[3];     /* keys defining the pseudo-random sequence */
-    const unsigned long* pcrc_32_tab;
-    int crypt_header_size;
-#endif
-} curfile_info;
-
-typedef struct
-{
-    zlib_filefunc_def z_filefunc;
-    voidpf filestream;        /* io structore of the zipfile */
-    linkedlist_data central_dir;/* datablock with central dir in construction*/
-    int  in_opened_file_inzip;  /* 1 if a file in the zip is currently writ.*/
-    curfile_info ci;            /* info on the file curretly writing */
-
-    uLong begin_pos;            /* position of the beginning of the zipfile */
-    uLong add_position_when_writting_offset;
-    uLong number_entry;
-#ifndef NO_ADDFILEINEXISTINGZIP
-    char *globalcomment;
-#endif
-} zip_internal;
-
-
-
-#ifndef NOCRYPT
-#define INCLUDECRYPTINGCODE_IFCRYPTALLOWED
-#include "crypt.h"
-#endif
-
-local linkedlist_datablock_internal* allocate_new_datablock()
-{
-    linkedlist_datablock_internal* ldi;
-    ldi = (linkedlist_datablock_internal*)
-                 ALLOC(sizeof(linkedlist_datablock_internal));
-    if (ldi!=NULL)
-    {
-        ldi->next_datablock = NULL ;
-        ldi->filled_in_this_block = 0 ;
-        ldi->avail_in_this_block = SIZEDATA_INDATABLOCK ;
-    }
-    return ldi;
-}
-
-local void free_datablock(ldi)
-    linkedlist_datablock_internal* ldi;
-{
-    while (ldi!=NULL)
-    {
-        linkedlist_datablock_internal* ldinext = ldi->next_datablock;
-        TRYFREE(ldi);
-        ldi = ldinext;
-    }
-}
-
-local void init_linkedlist(ll)
-    linkedlist_data* ll;
-{
-    ll->first_block = ll->last_block = NULL;
-}
-
-local void free_linkedlist(ll)
-    linkedlist_data* ll;
-{
-    free_datablock(ll->first_block);
-    ll->first_block = ll->last_block = NULL;
-}
-
-
-local int add_data_in_datablock(ll,buf,len)
-    linkedlist_data* ll;
-    const void* buf;
-    uLong len;
-{
-    linkedlist_datablock_internal* ldi;
-    const unsigned char* from_copy;
-
-    if (ll==NULL)
-        return ZIP_INTERNALERROR;
-
-    if (ll->last_block == NULL)
-    {
-        ll->first_block = ll->last_block = allocate_new_datablock();
-        if (ll->first_block == NULL)
-            return ZIP_INTERNALERROR;
-    }
-
-    ldi = ll->last_block;
-    from_copy = (unsigned char*)buf;
-
-    while (len>0)
-    {
-        uInt copy_this;
-        uInt i;
-        unsigned char* to_copy;
-
-        if (ldi->avail_in_this_block==0)
-        {
-            ldi->next_datablock = allocate_new_datablock();
-            if (ldi->next_datablock == NULL)
-                return ZIP_INTERNALERROR;
-            ldi = ldi->next_datablock ;
-            ll->last_block = ldi;
-        }
-
-        if (ldi->avail_in_this_block < len)
-            copy_this = (uInt)ldi->avail_in_this_block;
-        else
-            copy_this = (uInt)len;
-
-        to_copy = &(ldi->data[ldi->filled_in_this_block]);
-
-        for (i=0;i<copy_this;i++)
-            *(to_copy+i)=*(from_copy+i);
-
-        ldi->filled_in_this_block += copy_this;
-        ldi->avail_in_this_block -= copy_this;
-        from_copy += copy_this ;
-        len -= copy_this;
-    }
-    return ZIP_OK;
-}
-
-
-
-/****************************************************************************/
-
-#ifndef NO_ADDFILEINEXISTINGZIP
-/* ===========================================================================
-   Inputs a long in LSB order to the given file
-   nbByte == 1, 2 or 4 (byte, short or long)
-*/
-
-local int ziplocal_putValue OF((const zlib_filefunc_def* pzlib_filefunc_def,
-                                voidpf filestream, uLong x, int nbByte));
-local int ziplocal_putValue (pzlib_filefunc_def, filestream, x, nbByte)
-    const zlib_filefunc_def* pzlib_filefunc_def;
-    voidpf filestream;
-    uLong x;
-    int nbByte;
-{
-    unsigned char buf[4];
-    int n;
-    for (n = 0; n < nbByte; n++)
-    {
-        buf[n] = (unsigned char)(x & 0xff);
-        x >>= 8;
-    }
-    if (x != 0)
-      {     /* data overflow - hack for ZIP64 (X Roche) */
-      for (n = 0; n < nbByte; n++)
-        {
-          buf[n] = 0xff;
-        }
-      }
-
-    if (ZWRITE(*pzlib_filefunc_def,filestream,buf,nbByte)!=(uLong)nbByte)
-        return ZIP_ERRNO;
-    else
-        return ZIP_OK;
-}
-
-local void ziplocal_putValue_inmemory OF((void* dest, uLong x, int nbByte));
-local void ziplocal_putValue_inmemory (dest, x, nbByte)
-    void* dest;
-    uLong x;
-    int nbByte;
-{
-    unsigned char* buf=(unsigned char*)dest;
-    int n;
-    for (n = 0; n < nbByte; n++) {
-        buf[n] = (unsigned char)(x & 0xff);
-        x >>= 8;
-    }
-
-    if (x != 0)
-    {     /* data overflow - hack for ZIP64 */
-       for (n = 0; n < nbByte; n++)
-       {
-          buf[n] = 0xff;
-       }
-    }
-}
-
-/****************************************************************************/
-
-
-local uLong ziplocal_TmzDateToDosDate(ptm,dosDate)
-    const tm_zip* ptm;
-    uLong dosDate;
-{
-    uLong year = (uLong)ptm->tm_year;
-    if (year>1980)
-        year-=1980;
-    else if (year>80)
-        year-=80;
-    return
-      (uLong) (((ptm->tm_mday) + (32 * (ptm->tm_mon+1)) + (512 * year)) << 16) |
-        ((ptm->tm_sec/2) + (32* ptm->tm_min) + (2048 * (uLong)ptm->tm_hour));
-}
-
-
-/****************************************************************************/
-
-local int ziplocal_getByte OF((
-    const zlib_filefunc_def* pzlib_filefunc_def,
-    voidpf filestream,
-    int *pi));
-
-local int ziplocal_getByte(pzlib_filefunc_def,filestream,pi)
-    const zlib_filefunc_def* pzlib_filefunc_def;
-    voidpf filestream;
-    int *pi;
-{
-    unsigned char c;
-    int err = (int)ZREAD(*pzlib_filefunc_def,filestream,&c,1);
-    if (err==1)
-    {
-        *pi = (int)c;
-        return ZIP_OK;
-    }
-    else
-    {
-        if (ZERROR(*pzlib_filefunc_def,filestream))
-            return ZIP_ERRNO;
-        else
-            return ZIP_EOF;
-    }
-}
-
-
-/* ===========================================================================
-   Reads a long in LSB order from the given gz_stream. Sets
-*/
-local int ziplocal_getShort OF((
-    const zlib_filefunc_def* pzlib_filefunc_def,
-    voidpf filestream,
-    uLong *pX));
-
-local int ziplocal_getShort (pzlib_filefunc_def,filestream,pX)
-    const zlib_filefunc_def* pzlib_filefunc_def;
-    voidpf filestream;
-    uLong *pX;
-{
-    uLong x ;
-    int i;
-    int err;
-
-    err = ziplocal_getByte(pzlib_filefunc_def,filestream,&i);
-    x = (uLong)i;
-
-    if (err==ZIP_OK)
-        err = ziplocal_getByte(pzlib_filefunc_def,filestream,&i);
-    x += ((uLong)i)<<8;
-
-    if (err==ZIP_OK)
-        *pX = x;
-    else
-        *pX = 0;
-    return err;
-}
-
-local int ziplocal_getLong OF((
-    const zlib_filefunc_def* pzlib_filefunc_def,
-    voidpf filestream,
-    uLong *pX));
-
-local int ziplocal_getLong (pzlib_filefunc_def,filestream,pX)
-    const zlib_filefunc_def* pzlib_filefunc_def;
-    voidpf filestream;
-    uLong *pX;
-{
-    uLong x ;
-    int i;
-    int err;
-
-    err = ziplocal_getByte(pzlib_filefunc_def,filestream,&i);
-    x = (uLong)i;
-
-    if (err==ZIP_OK)
-        err = ziplocal_getByte(pzlib_filefunc_def,filestream,&i);
-    x += ((uLong)i)<<8;
-
-    if (err==ZIP_OK)
-        err = ziplocal_getByte(pzlib_filefunc_def,filestream,&i);
-    x += ((uLong)i)<<16;
-
-    if (err==ZIP_OK)
-        err = ziplocal_getByte(pzlib_filefunc_def,filestream,&i);
-    x += ((uLong)i)<<24;
-
-    if (err==ZIP_OK)
-        *pX = x;
-    else
-        *pX = 0;
-    return err;
-}
-
-#ifndef BUFREADCOMMENT
-#define BUFREADCOMMENT (0x400)
-#endif
-/*
-  Locate the Central directory of a zipfile (at the end, just before
-    the global comment)
-*/
-local uLong ziplocal_SearchCentralDir OF((
-    const zlib_filefunc_def* pzlib_filefunc_def,
-    voidpf filestream));
-
-local uLong ziplocal_SearchCentralDir(pzlib_filefunc_def,filestream)
-    const zlib_filefunc_def* pzlib_filefunc_def;
-    voidpf filestream;
-{
-    unsigned char* buf;
-    uLong uSizeFile;
-    uLong uBackRead;
-    uLong uMaxBack=0xffff; /* maximum size of global comment */
-    uLong uPosFound=0;
-
-    if (ZSEEK(*pzlib_filefunc_def,filestream,0,ZLIB_FILEFUNC_SEEK_END) != 0)
-        return 0;
-
-
-    uSizeFile = ZTELL(*pzlib_filefunc_def,filestream);
-
-    if (uMaxBack>uSizeFile)
-        uMaxBack = uSizeFile;
-
-    buf = (unsigned char*)ALLOC(BUFREADCOMMENT+4);
-    if (buf==NULL)
-        return 0;
-
-    uBackRead = 4;
-    while (uBackRead<uMaxBack)
-    {
-        uLong uReadSize,uReadPos ;
-        int i;
-        if (uBackRead+BUFREADCOMMENT>uMaxBack)
-            uBackRead = uMaxBack;
-        else
-            uBackRead+=BUFREADCOMMENT;
-        uReadPos = uSizeFile-uBackRead ;
-
-        uReadSize = ((BUFREADCOMMENT+4) < (uSizeFile-uReadPos)) ?
-                     (BUFREADCOMMENT+4) : (uSizeFile-uReadPos);
-        if (ZSEEK(*pzlib_filefunc_def,filestream,uReadPos,ZLIB_FILEFUNC_SEEK_SET)!=0)
-            break;
-
-        if (ZREAD(*pzlib_filefunc_def,filestream,buf,uReadSize)!=uReadSize)
-            break;
-
-        for (i=(int)uReadSize-3; (i--)>0;)
-            if (((*(buf+i))==0x50) && ((*(buf+i+1))==0x4b) &&
-                ((*(buf+i+2))==0x05) && ((*(buf+i+3))==0x06))
-            {
-                uPosFound = uReadPos+i;
-                break;
-            }
-
-        if (uPosFound!=0)
-            break;
-    }
-    TRYFREE(buf);
-    return uPosFound;
-}
-#endif /* !NO_ADDFILEINEXISTINGZIP*/
-
-/************************************************************/
-extern zipFile ZEXPORT zipOpen2 (pathname, append, globalcomment, pzlib_filefunc_def)
-    const char *pathname;
-    int append;
-    zipcharpc* globalcomment;
-    zlib_filefunc_def* pzlib_filefunc_def;
-{
-    zip_internal ziinit;
-    zip_internal* zi;
-    int err=ZIP_OK;
-
-
-    if (pzlib_filefunc_def==NULL)
-        fill_fopen_filefunc(&ziinit.z_filefunc);
-    else
-        ziinit.z_filefunc = *pzlib_filefunc_def;
-
-    ziinit.filestream = (*(ziinit.z_filefunc.zopen_file))
-                 (ziinit.z_filefunc.opaque,
-                  pathname,
-                  (append == APPEND_STATUS_CREATE) ?
-                  (ZLIB_FILEFUNC_MODE_READ | ZLIB_FILEFUNC_MODE_WRITE | ZLIB_FILEFUNC_MODE_CREATE) :
-                    (ZLIB_FILEFUNC_MODE_READ | ZLIB_FILEFUNC_MODE_WRITE | ZLIB_FILEFUNC_MODE_EXISTING));
-
-    if (ziinit.filestream == NULL)
-        return NULL;
-    ziinit.begin_pos = ZTELL(ziinit.z_filefunc,ziinit.filestream);
-    ziinit.in_opened_file_inzip = 0;
-    ziinit.ci.stream_initialised = 0;
-    ziinit.number_entry = 0;
-    ziinit.add_position_when_writting_offset = 0;
-    init_linkedlist(&(ziinit.central_dir));
-
-
-    zi = (zip_internal*)ALLOC(sizeof(zip_internal));
-    if (zi==NULL)
-    {
-        ZCLOSE(ziinit.z_filefunc,ziinit.filestream);
-        return NULL;
-    }
-
-    /* now we add file in a zipfile */
-#    ifndef NO_ADDFILEINEXISTINGZIP
-    ziinit.globalcomment = NULL;
-    if (append == APPEND_STATUS_ADDINZIP)
-    {
-        uLong byte_before_the_zipfile;/* byte before the zipfile, (>0 for sfx)*/
-
-        uLong size_central_dir;     /* size of the central directory  */
-        uLong offset_central_dir;   /* offset of start of central directory */
-        uLong central_pos,uL;
-
-        uLong number_disk;          /* number of the current dist, used for
-                                    spaning ZIP, unsupported, always 0*/
-        uLong number_disk_with_CD;  /* number the the disk with central dir, used
-                                    for spaning ZIP, unsupported, always 0*/
-        uLong number_entry;
-        uLong number_entry_CD;      /* total number of entries in
-                                    the central dir
-                                    (same than number_entry on nospan) */
-        uLong size_comment;
-
-        central_pos = ziplocal_SearchCentralDir(&ziinit.z_filefunc,ziinit.filestream);
-        if (central_pos==0)
-            err=ZIP_ERRNO;
-
-        if (ZSEEK(ziinit.z_filefunc, ziinit.filestream,
-                                        central_pos,ZLIB_FILEFUNC_SEEK_SET)!=0)
-            err=ZIP_ERRNO;
-
-        /* the signature, already checked */
-        if (ziplocal_getLong(&ziinit.z_filefunc, ziinit.filestream,&uL)!=ZIP_OK)
-            err=ZIP_ERRNO;
-
-        /* number of this disk */
-        if (ziplocal_getShort(&ziinit.z_filefunc, ziinit.filestream,&number_disk)!=ZIP_OK)
-            err=ZIP_ERRNO;
-
-        /* number of the disk with the start of the central directory */
-        if (ziplocal_getShort(&ziinit.z_filefunc, ziinit.filestream,&number_disk_with_CD)!=ZIP_OK)
-            err=ZIP_ERRNO;
-
-        /* total number of entries in the central dir on this disk */
-        if (ziplocal_getShort(&ziinit.z_filefunc, ziinit.filestream,&number_entry)!=ZIP_OK)
-            err=ZIP_ERRNO;
-
-        /* total number of entries in the central dir */
-        if (ziplocal_getShort(&ziinit.z_filefunc, ziinit.filestream,&number_entry_CD)!=ZIP_OK)
-            err=ZIP_ERRNO;
-
-        if ((number_entry_CD!=number_entry) ||
-            (number_disk_with_CD!=0) ||
-            (number_disk!=0))
-            err=ZIP_BADZIPFILE;
-
-        /* size of the central directory */
-        if (ziplocal_getLong(&ziinit.z_filefunc, ziinit.filestream,&size_central_dir)!=ZIP_OK)
-            err=ZIP_ERRNO;
-
-        /* offset of start of central directory with respect to the
-            starting disk number */
-        if (ziplocal_getLong(&ziinit.z_filefunc, ziinit.filestream,&offset_central_dir)!=ZIP_OK)
-            err=ZIP_ERRNO;
-
-        /* zipfile global comment length */
-        if (ziplocal_getShort(&ziinit.z_filefunc, ziinit.filestream,&size_comment)!=ZIP_OK)
-            err=ZIP_ERRNO;
-
-        if ((central_pos<offset_central_dir+size_central_dir) &&
-            (err==ZIP_OK))
-            err=ZIP_BADZIPFILE;
-
-        if (err!=ZIP_OK)
-        {
-            ZCLOSE(ziinit.z_filefunc, ziinit.filestream);
-            return NULL;
-        }
-
-        if (size_comment>0)
-        {
-            ziinit.globalcomment = ALLOC(size_comment+1);
-            if (ziinit.globalcomment)
-            {
-               size_comment = ZREAD(ziinit.z_filefunc, ziinit.filestream,ziinit.globalcomment,size_comment);
-               ziinit.globalcomment[size_comment]=0;
-            }
-        }
-
-        byte_before_the_zipfile = central_pos -
-                                (offset_central_dir+size_central_dir);
-        ziinit.add_position_when_writting_offset = byte_before_the_zipfile;
-
-        {
-            uLong size_central_dir_to_read = size_central_dir;
-            size_t buf_size = SIZEDATA_INDATABLOCK;
-            void* buf_read = (void*)ALLOC(buf_size);
-            if (ZSEEK(ziinit.z_filefunc, ziinit.filestream,
-                  offset_central_dir + byte_before_the_zipfile,
-                  ZLIB_FILEFUNC_SEEK_SET) != 0)
-                  err=ZIP_ERRNO;
-
-            while ((size_central_dir_to_read>0) && (err==ZIP_OK))
-            {
-                uLong read_this = SIZEDATA_INDATABLOCK;
-                if (read_this > size_central_dir_to_read)
-                    read_this = size_central_dir_to_read;
-                if (ZREAD(ziinit.z_filefunc, ziinit.filestream,buf_read,read_this) != read_this)
-                    err=ZIP_ERRNO;
-
-                if (err==ZIP_OK)
-                    err = add_data_in_datablock(&ziinit.central_dir,buf_read,
-                                                (uLong)read_this);
-                size_central_dir_to_read-=read_this;
-            }
-            TRYFREE(buf_read);
-        }
-        ziinit.begin_pos = byte_before_the_zipfile;
-        ziinit.number_entry = number_entry_CD;
-
-        if (ZSEEK(ziinit.z_filefunc, ziinit.filestream,
-                  offset_central_dir+byte_before_the_zipfile,ZLIB_FILEFUNC_SEEK_SET)!=0)
-            err=ZIP_ERRNO;
-    }
-
-    if (globalcomment)
-    {
-      *globalcomment = ziinit.globalcomment;
-    }
-#    endif /* !NO_ADDFILEINEXISTINGZIP*/
-
-    if (err != ZIP_OK)
-    {
-#    ifndef NO_ADDFILEINEXISTINGZIP
-        TRYFREE(ziinit.globalcomment);
-#    endif /* !NO_ADDFILEINEXISTINGZIP*/
-        TRYFREE(zi);
-        return NULL;
-    }
-    else
-    {
-        *zi = ziinit;
-        return (zipFile)zi;
-    }
-}
-
-extern zipFile ZEXPORT zipOpen (pathname, append)
-    const char *pathname;
-    int append;
-{
-    return zipOpen2(pathname,append,NULL,NULL);
-}
-
-extern int ZEXPORT zipOpenNewFileInZip3 (file, filename, zipfi,
-                                         extrafield_local, size_extrafield_local,
-                                         extrafield_global, size_extrafield_global,
-                                         comment, method, level, raw,
-                                         windowBits, memLevel, strategy,
-                                         password, crcForCrypting)
-    zipFile file;
-    const char* filename;
-    const zip_fileinfo* zipfi;
-    const void* extrafield_local;
-    uInt size_extrafield_local;
-    const void* extrafield_global;
-    uInt size_extrafield_global;
-    const char* comment;
-    int method;
-    int level;
-    int raw;
-    int windowBits;
-    int memLevel;
-    int strategy;
-    const char* password;
-    uLong crcForCrypting;
-{
-    zip_internal* zi;
-    uInt size_filename;
-    uInt size_comment;
-    uInt i;
-    int err = ZIP_OK;
-
-#    ifdef NOCRYPT
-    if (password != NULL)
-        return ZIP_PARAMERROR;
-#    endif
-
-    if (file == NULL)
-        return ZIP_PARAMERROR;
-    if ((method!=0) && (method!=Z_DEFLATED))
-        return ZIP_PARAMERROR;
-
-    zi = (zip_internal*)file;
-
-    if (zi->in_opened_file_inzip == 1)
-    {
-        err = zipCloseFileInZip (file);
-        if (err != ZIP_OK)
-            return err;
-    }
-
-
-    if (filename==NULL)
-        filename="-";
-
-    if (comment==NULL)
-        size_comment = 0;
-    else
-        size_comment = (uInt)strlen(comment);
-
-    size_filename = (uInt)strlen(filename);
-
-    if (zipfi == NULL)
-        zi->ci.dosDate = 0;
-    else
-    {
-        if (zipfi->dosDate != 0)
-            zi->ci.dosDate = zipfi->dosDate;
-        else zi->ci.dosDate = ziplocal_TmzDateToDosDate(&zipfi->tmz_date,zipfi->dosDate);
-    }
-
-    zi->ci.flag = 0;
-    if ((level==8) || (level==9))
-      zi->ci.flag |= 2;
-    if ((level==2))
-      zi->ci.flag |= 4;
-    if ((level==1))
-      zi->ci.flag |= 6;
-    if (password != NULL)
-      zi->ci.flag |= 1;
-
-    zi->ci.crc32 = 0;
-    zi->ci.method = method;
-    zi->ci.encrypt = 0;
-    zi->ci.stream_initialised = 0;
-    zi->ci.pos_in_buffered_data = 0;
-    zi->ci.raw = raw;
-    zi->ci.pos_local_header = ZTELL(zi->z_filefunc,zi->filestream) ;
-    zi->ci.size_centralheader = SIZECENTRALHEADER + size_filename +
-                                      size_extrafield_global + size_comment;
-    zi->ci.central_header = (char*)ALLOC((uInt)zi->ci.size_centralheader);
-
-    ziplocal_putValue_inmemory(zi->ci.central_header,(uLong)CENTRALHEADERMAGIC,4);
-    /* version info */
-    ziplocal_putValue_inmemory(zi->ci.central_header+4,(uLong)VERSIONMADEBY,2);
-    ziplocal_putValue_inmemory(zi->ci.central_header+6,(uLong)20,2);
-    ziplocal_putValue_inmemory(zi->ci.central_header+8,(uLong)zi->ci.flag,2);
-    ziplocal_putValue_inmemory(zi->ci.central_header+10,(uLong)zi->ci.method,2);
-    ziplocal_putValue_inmemory(zi->ci.central_header+12,(uLong)zi->ci.dosDate,4);
-    ziplocal_putValue_inmemory(zi->ci.central_header+16,(uLong)0,4); /*crc*/
-    ziplocal_putValue_inmemory(zi->ci.central_header+20,(uLong)0,4); /*compr size*/
-    ziplocal_putValue_inmemory(zi->ci.central_header+24,(uLong)0,4); /*uncompr size*/
-    ziplocal_putValue_inmemory(zi->ci.central_header+28,(uLong)size_filename,2);
-    ziplocal_putValue_inmemory(zi->ci.central_header+30,(uLong)size_extrafield_global,2);
-    ziplocal_putValue_inmemory(zi->ci.central_header+32,(uLong)size_comment,2);
-    ziplocal_putValue_inmemory(zi->ci.central_header+34,(uLong)0,2); /*disk nm start*/
-
-    if (zipfi==NULL)
-        ziplocal_putValue_inmemory(zi->ci.central_header+36,(uLong)0,2);
-    else
-        ziplocal_putValue_inmemory(zi->ci.central_header+36,(uLong)zipfi->internal_fa,2);
-
-    if (zipfi==NULL)
-        ziplocal_putValue_inmemory(zi->ci.central_header+38,(uLong)0,4);
-    else
-        ziplocal_putValue_inmemory(zi->ci.central_header+38,(uLong)zipfi->external_fa,4);
-
-    ziplocal_putValue_inmemory(zi->ci.central_header+42,(uLong)zi->ci.pos_local_header- zi->add_position_when_writting_offset,4);
-
-    for (i=0;i<size_filename;i++)
-        *(zi->ci.central_header+SIZECENTRALHEADER+i) = *(filename+i);
-
-    for (i=0;i<size_extrafield_global;i++)
-        *(zi->ci.central_header+SIZECENTRALHEADER+size_filename+i) =
-              *(((const char*)extrafield_global)+i);
-
-    for (i=0;i<size_comment;i++)
-        *(zi->ci.central_header+SIZECENTRALHEADER+size_filename+
-              size_extrafield_global+i) = *(comment+i);
-    if (zi->ci.central_header == NULL)
-        return ZIP_INTERNALERROR;
-
-    /* write the local header */
-    err = ziplocal_putValue(&zi->z_filefunc,zi->filestream,(uLong)LOCALHEADERMAGIC,4);
-
-    if (err==ZIP_OK)
-        err = ziplocal_putValue(&zi->z_filefunc,zi->filestream,(uLong)20,2);/* version needed to extract */
-    if (err==ZIP_OK)
-        err = ziplocal_putValue(&zi->z_filefunc,zi->filestream,(uLong)zi->ci.flag,2);
-
-    if (err==ZIP_OK)
-        err = ziplocal_putValue(&zi->z_filefunc,zi->filestream,(uLong)zi->ci.method,2);
-
-    if (err==ZIP_OK)
-        err = ziplocal_putValue(&zi->z_filefunc,zi->filestream,(uLong)zi->ci.dosDate,4);
-
-    if (err==ZIP_OK)
-        err = ziplocal_putValue(&zi->z_filefunc,zi->filestream,(uLong)0,4); /* crc 32, unknown */
-    if (err==ZIP_OK)
-        err = ziplocal_putValue(&zi->z_filefunc,zi->filestream,(uLong)0,4); /* compressed size, unknown */
-    if (err==ZIP_OK)
-        err = ziplocal_putValue(&zi->z_filefunc,zi->filestream,(uLong)0,4); /* uncompressed size, unknown */
-
-    if (err==ZIP_OK)
-        err = ziplocal_putValue(&zi->z_filefunc,zi->filestream,(uLong)size_filename,2);
-
-    if (err==ZIP_OK)
-        err = ziplocal_putValue(&zi->z_filefunc,zi->filestream,(uLong)size_extrafield_local,2);
-
-    if ((err==ZIP_OK) && (size_filename>0))
-        if (ZWRITE(zi->z_filefunc,zi->filestream,filename,size_filename)!=size_filename)
-                err = ZIP_ERRNO;
-
-    if ((err==ZIP_OK) && (size_extrafield_local>0))
-        if (ZWRITE(zi->z_filefunc,zi->filestream,extrafield_local,size_extrafield_local)
-                                                                           !=size_extrafield_local)
-                err = ZIP_ERRNO;
-
-    zi->ci.stream.avail_in = (uInt)0;
-    zi->ci.stream.avail_out = (uInt)Z_BUFSIZE;
-    zi->ci.stream.next_out = zi->ci.buffered_data;
-    zi->ci.stream.total_in = 0;
-    zi->ci.stream.total_out = 0;
-
-    if ((err==ZIP_OK) && (zi->ci.method == Z_DEFLATED) && (!zi->ci.raw))
-    {
-        zi->ci.stream.zalloc = (alloc_func)0;
-        zi->ci.stream.zfree = (free_func)0;
-        zi->ci.stream.opaque = (voidpf)0;
-
-        if (windowBits>0)
-            windowBits = -windowBits;
-
-        err = deflateInit2(&zi->ci.stream, level,
-               Z_DEFLATED, windowBits, memLevel, strategy);
-
-        if (err==Z_OK)
-            zi->ci.stream_initialised = 1;
-    }
-#    ifndef NOCRYPT
-    zi->ci.crypt_header_size = 0;
-    if ((err==Z_OK) && (password != NULL))
-    {
-        unsigned char bufHead[RAND_HEAD_LEN];
-        unsigned int sizeHead;
-        zi->ci.encrypt = 1;
-        zi->ci.pcrc_32_tab = get_crc_table();
-        /*init_keys(password,zi->ci.keys,zi->ci.pcrc_32_tab);*/
-
-        sizeHead=crypthead(password,bufHead,RAND_HEAD_LEN,zi->ci.keys,zi->ci.pcrc_32_tab,crcForCrypting);
-        zi->ci.crypt_header_size = sizeHead;
-
-        if (ZWRITE(zi->z_filefunc,zi->filestream,bufHead,sizeHead) != sizeHead)
-                err = ZIP_ERRNO;
-    }
-#    endif
-
-    if (err==Z_OK)
-        zi->in_opened_file_inzip = 1;
-    return err;
-}
-
-extern int ZEXPORT zipOpenNewFileInZip2(file, filename, zipfi,
-                                        extrafield_local, size_extrafield_local,
-                                        extrafield_global, size_extrafield_global,
-                                        comment, method, level, raw)
-    zipFile file;
-    const char* filename;
-    const zip_fileinfo* zipfi;
-    const void* extrafield_local;
-    uInt size_extrafield_local;
-    const void* extrafield_global;
-    uInt size_extrafield_global;
-    const char* comment;
-    int method;
-    int level;
-    int raw;
-{
-    return zipOpenNewFileInZip3 (file, filename, zipfi,
-                                 extrafield_local, size_extrafield_local,
-                                 extrafield_global, size_extrafield_global,
-                                 comment, method, level, raw,
-                                 -MAX_WBITS, DEF_MEM_LEVEL, Z_DEFAULT_STRATEGY,
-                                 NULL, 0);
-}
-
-extern int ZEXPORT zipOpenNewFileInZip (file, filename, zipfi,
-                                        extrafield_local, size_extrafield_local,
-                                        extrafield_global, size_extrafield_global,
-                                        comment, method, level)
-    zipFile file;
-    const char* filename;
-    const zip_fileinfo* zipfi;
-    const void* extrafield_local;
-    uInt size_extrafield_local;
-    const void* extrafield_global;
-    uInt size_extrafield_global;
-    const char* comment;
-    int method;
-    int level;
-{
-    return zipOpenNewFileInZip2 (file, filename, zipfi,
-                                 extrafield_local, size_extrafield_local,
-                                 extrafield_global, size_extrafield_global,
-                                 comment, method, level, 0);
-}
-
-local int zipFlushWriteBuffer(zi)
-  zip_internal* zi;
-{
-    int err=ZIP_OK;
-
-    if (zi->ci.encrypt != 0)
-    {
-#ifndef NOCRYPT
-        uInt i;
-        int t;
-        for (i=0;i<zi->ci.pos_in_buffered_data;i++)
-            zi->ci.buffered_data[i] = zencode(zi->ci.keys, zi->ci.pcrc_32_tab,
-                                       zi->ci.buffered_data[i],t);
-#endif
-    }
-    if (ZWRITE(zi->z_filefunc,zi->filestream,zi->ci.buffered_data,zi->ci.pos_in_buffered_data)
-                                                                    !=zi->ci.pos_in_buffered_data)
-      err = ZIP_ERRNO;
-    zi->ci.pos_in_buffered_data = 0;
-    return err;
-}
-
-extern int ZEXPORT zipWriteInFileInZip (file, buf, len)
-    zipFile file;
-    const void* buf;
-    unsigned len;
-{
-    zip_internal* zi;
-    int err=ZIP_OK;
-
-    if (file == NULL)
-        return ZIP_PARAMERROR;
-    zi = (zip_internal*)file;
-
-    if (zi->in_opened_file_inzip == 0)
-        return ZIP_PARAMERROR;
-
-    zi->ci.stream.next_in = (void*)buf;
-    zi->ci.stream.avail_in = len;
-    zi->ci.crc32 = crc32(zi->ci.crc32,buf,len);
-
-    while ((err==ZIP_OK) && (zi->ci.stream.avail_in>0))
-    {
-        if (zi->ci.stream.avail_out == 0)
-        {
-            if (zipFlushWriteBuffer(zi) == ZIP_ERRNO)
-                err = ZIP_ERRNO;
-            zi->ci.stream.avail_out = (uInt)Z_BUFSIZE;
-            zi->ci.stream.next_out = zi->ci.buffered_data;
-        }
-
-
-        if(err != ZIP_OK)
-            break;
-
-        if ((zi->ci.method == Z_DEFLATED) && (!zi->ci.raw))
-        {
-            uLong uTotalOutBefore = zi->ci.stream.total_out;
-            err=deflate(&zi->ci.stream,  Z_NO_FLUSH);
-            zi->ci.pos_in_buffered_data += (uInt)(zi->ci.stream.total_out - uTotalOutBefore) ;
-
-        }
-        else
-        {
-            uInt copy_this,i;
-            if (zi->ci.stream.avail_in < zi->ci.stream.avail_out)
-                copy_this = zi->ci.stream.avail_in;
-            else
-                copy_this = zi->ci.stream.avail_out;
-            for (i=0;i<copy_this;i++)
-                *(((char*)zi->ci.stream.next_out)+i) =
-                    *(((const char*)zi->ci.stream.next_in)+i);
-            {
-                zi->ci.stream.avail_in -= copy_this;
-                zi->ci.stream.avail_out-= copy_this;
-                zi->ci.stream.next_in+= copy_this;
-                zi->ci.stream.next_out+= copy_this;
-                zi->ci.stream.total_in+= copy_this;
-                zi->ci.stream.total_out+= copy_this;
-                zi->ci.pos_in_buffered_data += copy_this;
-            }
-        }
-    }
-
-    return err;
-}
-
-extern int ZEXPORT zipCloseFileInZipRaw (file, uncompressed_size, crc32)
-    zipFile file;
-    uLong uncompressed_size;
-    uLong crc32;
-{
-    zip_internal* zi;
-    uLong compressed_size;
-    int err=ZIP_OK;
-
-    if (file == NULL)
-        return ZIP_PARAMERROR;
-    zi = (zip_internal*)file;
-
-    if (zi->in_opened_file_inzip == 0)
-        return ZIP_PARAMERROR;
-    zi->ci.stream.avail_in = 0;
-
-    if ((zi->ci.method == Z_DEFLATED) && (!zi->ci.raw))
-        while (err==ZIP_OK)
-    {
-        uLong uTotalOutBefore;
-        if (zi->ci.stream.avail_out == 0)
-        {
-            if (zipFlushWriteBuffer(zi) == ZIP_ERRNO)
-                err = ZIP_ERRNO;
-            zi->ci.stream.avail_out = (uInt)Z_BUFSIZE;
-            zi->ci.stream.next_out = zi->ci.buffered_data;
-        }
-        uTotalOutBefore = zi->ci.stream.total_out;
-        err=deflate(&zi->ci.stream,  Z_FINISH);
-        zi->ci.pos_in_buffered_data += (uInt)(zi->ci.stream.total_out - uTotalOutBefore) ;
-    }
-
-    if (err==Z_STREAM_END)
-        err=ZIP_OK; /* this is normal */
-
-    if ((zi->ci.pos_in_buffered_data>0) && (err==ZIP_OK))
-        if (zipFlushWriteBuffer(zi)==ZIP_ERRNO)
-            err = ZIP_ERRNO;
-
-    if ((zi->ci.method == Z_DEFLATED) && (!zi->ci.raw))
-    {
-        err=deflateEnd(&zi->ci.stream);
-        zi->ci.stream_initialised = 0;
-    }
-
-    if (!zi->ci.raw)
-    {
-        crc32 = (uLong)zi->ci.crc32;
-        uncompressed_size = (uLong)zi->ci.stream.total_in;
-    }
-    compressed_size = (uLong)zi->ci.stream.total_out;
-#    ifndef NOCRYPT
-    compressed_size += zi->ci.crypt_header_size;
-#    endif
-
-    ziplocal_putValue_inmemory(zi->ci.central_header+16,crc32,4); /*crc*/
-    ziplocal_putValue_inmemory(zi->ci.central_header+20,
-                                compressed_size,4); /*compr size*/
-    if (zi->ci.stream.data_type == Z_ASCII)
-        ziplocal_putValue_inmemory(zi->ci.central_header+36,(uLong)Z_ASCII,2);
-    ziplocal_putValue_inmemory(zi->ci.central_header+24,
-                                uncompressed_size,4); /*uncompr size*/
-
-    if (err==ZIP_OK)
-        err = add_data_in_datablock(&zi->central_dir,zi->ci.central_header,
-                                       (uLong)zi->ci.size_centralheader);
-    free(zi->ci.central_header);
-
-    if (err==ZIP_OK)
-    {
-        long cur_pos_inzip = ZTELL(zi->z_filefunc,zi->filestream);
-        if (ZSEEK(zi->z_filefunc,zi->filestream,
-                  zi->ci.pos_local_header + 14,ZLIB_FILEFUNC_SEEK_SET)!=0)
-            err = ZIP_ERRNO;
-
-        if (err==ZIP_OK)
-            err = ziplocal_putValue(&zi->z_filefunc,zi->filestream,crc32,4); /* crc 32, unknown */
-
-        if (err==ZIP_OK) /* compressed size, unknown */
-            err = ziplocal_putValue(&zi->z_filefunc,zi->filestream,compressed_size,4);
-
-        if (err==ZIP_OK) /* uncompressed size, unknown */
-            err = ziplocal_putValue(&zi->z_filefunc,zi->filestream,uncompressed_size,4);
-
-        if (ZSEEK(zi->z_filefunc,zi->filestream,
-                  cur_pos_inzip,ZLIB_FILEFUNC_SEEK_SET)!=0)
-            err = ZIP_ERRNO;
-    }
-
-    zi->number_entry ++;
-    zi->in_opened_file_inzip = 0;
-
-    return err;
-}
-
-extern int ZEXPORT zipCloseFileInZip (file)
-    zipFile file;
-{
-    return zipCloseFileInZipRaw (file,0,0);
-}
-
-extern int ZEXPORT zipClose (file, global_comment)
-    zipFile file;
-    const char* global_comment;
-{
-    zip_internal* zi;
-    int err = 0;
-    uLong size_centraldir = 0;
-    uLong centraldir_pos_inzip;
-    uInt size_global_comment;
-    if (file == NULL)
-        return ZIP_PARAMERROR;
-    zi = (zip_internal*)file;
-
-    if (zi->in_opened_file_inzip == 1)
-    {
-        err = zipCloseFileInZip (file);
-    }
-
-#ifndef NO_ADDFILEINEXISTINGZIP
-    if (global_comment==NULL)
-        global_comment = zi->globalcomment;
-#endif
-    if (global_comment==NULL)
-        size_global_comment = 0;
-    else
-        size_global_comment = (uInt)strlen(global_comment);
-
-    centraldir_pos_inzip = ZTELL(zi->z_filefunc,zi->filestream);
-    if (err==ZIP_OK)
-    {
-        linkedlist_datablock_internal* ldi = zi->central_dir.first_block ;
-        while (ldi!=NULL)
-        {
-            if ((err==ZIP_OK) && (ldi->filled_in_this_block>0))
-                if (ZWRITE(zi->z_filefunc,zi->filestream,
-                           ldi->data,ldi->filled_in_this_block)
-                              !=ldi->filled_in_this_block )
-                    err = ZIP_ERRNO;
-
-            size_centraldir += ldi->filled_in_this_block;
-            ldi = ldi->next_datablock;
-        }
-    }
-    free_datablock(zi->central_dir.first_block);
-
-    if (err==ZIP_OK) /* Magic End */
-        err = ziplocal_putValue(&zi->z_filefunc,zi->filestream,(uLong)ENDHEADERMAGIC,4);
-
-    if (err==ZIP_OK) /* number of this disk */
-        err = ziplocal_putValue(&zi->z_filefunc,zi->filestream,(uLong)0,2);
-
-    if (err==ZIP_OK) /* number of the disk with the start of the central directory */
-        err = ziplocal_putValue(&zi->z_filefunc,zi->filestream,(uLong)0,2);
-
-    if (err==ZIP_OK) /* total number of entries in the central dir on this disk */
-        err = ziplocal_putValue(&zi->z_filefunc,zi->filestream,(uLong)zi->number_entry,2);
-
-    if (err==ZIP_OK) /* total number of entries in the central dir */
-        err = ziplocal_putValue(&zi->z_filefunc,zi->filestream,(uLong)zi->number_entry,2);
-
-    if (err==ZIP_OK) /* size of the central directory */
-        err = ziplocal_putValue(&zi->z_filefunc,zi->filestream,(uLong)size_centraldir,4);
-
-    if (err==ZIP_OK) /* offset of start of central directory with respect to the
-                            starting disk number */
-        err = ziplocal_putValue(&zi->z_filefunc,zi->filestream,
-                                (uLong)(centraldir_pos_inzip - zi->add_position_when_writting_offset),4);
-
-    if (err==ZIP_OK) /* zipfile comment length */
-        err = ziplocal_putValue(&zi->z_filefunc,zi->filestream,(uLong)size_global_comment,2);
-
-    if ((err==ZIP_OK) && (size_global_comment>0))
-        if (ZWRITE(zi->z_filefunc,zi->filestream,
-                   global_comment,size_global_comment) != size_global_comment)
-                err = ZIP_ERRNO;
-
-    if (ZCLOSE(zi->z_filefunc,zi->filestream) != 0)
-        if (err == ZIP_OK)
-            err = ZIP_ERRNO;
-
-#ifndef NO_ADDFILEINEXISTINGZIP
-    TRYFREE(zi->globalcomment);
-#endif
-    TRYFREE(zi);
-
-    return err;
-}
Index: trunk/minix/lib/zlib-1.2.3/contrib/minizip/zip.h
===================================================================
--- trunk/minix/lib/zlib-1.2.3/contrib/minizip/zip.h	(revision 9)
+++ 	(revision )
@@ -1,235 +1,0 @@
-/* zip.h -- IO for compress .zip files using zlib
-   Version 1.01e, February 12th, 2005
-
-   Copyright (C) 1998-2005 Gilles Vollant
-
-   This unzip package allow creates .ZIP file, compatible with PKZip 2.04g
-     WinZip, InfoZip tools and compatible.
-   Multi volume ZipFile (span) are not supported.
-   Encryption compatible with pkzip 2.04g only supported
-   Old compressions used by old PKZip 1.x are not supported
-
-  For uncompress .zip file, look at unzip.h
-
-
-   I WAIT FEEDBACK at mail info@winimage.com
-   Visit also http://www.winimage.com/zLibDll/unzip.html for evolution
-
-   Condition of use and distribution are the same than zlib :
-
-  This software is provided 'as-is', without any express or implied
-  warranty.  In no event will the authors be held liable for any damages
-  arising from the use of this software.
-
-  Permission is granted to anyone to use this software for any purpose,
-  including commercial applications, and to alter it and redistribute it
-  freely, subject to the following restrictions:
-
-  1. The origin of this software must not be misrepresented; you must not
-     claim that you wrote the original software. If you use this software
-     in a product, an acknowledgment in the product documentation would be
-     appreciated but is not required.
-  2. Altered source versions must be plainly marked as such, and must not be
-     misrepresented as being the original software.
-  3. This notice may not be removed or altered from any source distribution.
-
-
-*/
-
-/* for more info about .ZIP format, see
-      http://www.info-zip.org/pub/infozip/doc/appnote-981119-iz.zip
-      http://www.info-zip.org/pub/infozip/doc/
-   PkWare has also a specification at :
-      ftp://ftp.pkware.com/probdesc.zip
-*/
-
-#ifndef _zip_H
-#define _zip_H
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#ifndef _ZLIB_H
-#include "zlib.h"
-#endif
-
-#ifndef _ZLIBIOAPI_H
-#include "ioapi.h"
-#endif
-
-#if defined(STRICTZIP) || defined(STRICTZIPUNZIP)
-/* like the STRICT of WIN32, we define a pointer that cannot be converted
-    from (void*) without cast */
-typedef struct TagzipFile__ { int unused; } zipFile__;
-typedef zipFile__ *zipFile;
-#else
-typedef voidp zipFile;
-#endif
-
-#define ZIP_OK                          (0)
-#define ZIP_EOF                         (0)
-#define ZIP_ERRNO                       (Z_ERRNO)
-#define ZIP_PARAMERROR                  (-102)
-#define ZIP_BADZIPFILE                  (-103)
-#define ZIP_INTERNALERROR               (-104)
-
-#ifndef DEF_MEM_LEVEL
-#  if MAX_MEM_LEVEL >= 8
-#    define DEF_MEM_LEVEL 8
-#  else
-#    define DEF_MEM_LEVEL  MAX_MEM_LEVEL
-#  endif
-#endif
-/* default memLevel */
-
-/* tm_zip contain date/time info */
-typedef struct tm_zip_s
-{
-    uInt tm_sec;            /* seconds after the minute - [0,59] */
-    uInt tm_min;            /* minutes after the hour - [0,59] */
-    uInt tm_hour;           /* hours since midnight - [0,23] */
-    uInt tm_mday;           /* day of the month - [1,31] */
-    uInt tm_mon;            /* months since January - [0,11] */
-    uInt tm_year;           /* years - [1980..2044] */
-} tm_zip;
-
-typedef struct
-{
-    tm_zip      tmz_date;       /* date in understandable format           */
-    uLong       dosDate;       /* if dos_date == 0, tmu_date is used      */
-/*    uLong       flag;        */   /* general purpose bit flag        2 bytes */
-
-    uLong       internal_fa;    /* internal file attributes        2 bytes */
-    uLong       external_fa;    /* external file attributes        4 bytes */
-} zip_fileinfo;
-
-typedef const char* zipcharpc;
-
-
-#define APPEND_STATUS_CREATE        (0)
-#define APPEND_STATUS_CREATEAFTER   (1)
-#define APPEND_STATUS_ADDINZIP      (2)
-
-extern zipFile ZEXPORT zipOpen OF((const char *pathname, int append));
-/*
-  Create a zipfile.
-     pathname contain on Windows XP a filename like "c:\\zlib\\zlib113.zip" or on
-       an Unix computer "zlib/zlib113.zip".
-     if the file pathname exist and append==APPEND_STATUS_CREATEAFTER, the zip
-       will be created at the end of the file.
-         (useful if the file contain a self extractor code)
-     if the file pathname exist and append==APPEND_STATUS_ADDINZIP, we will
-       add files in existing zip (be sure you don't add file that doesn't exist)
-     If the zipfile cannot be opened, the return value is NULL.
-     Else, the return value is a zipFile Handle, usable with other function
-       of this zip package.
-*/
-
-/* Note : there is no delete function into a zipfile.
-   If you want delete file into a zipfile, you must open a zipfile, and create another
-   Of couse, you can use RAW reading and writing to copy the file you did not want delte
-*/
-
-extern zipFile ZEXPORT zipOpen2 OF((const char *pathname,
-                                   int append,
-                                   zipcharpc* globalcomment,
-                                   zlib_filefunc_def* pzlib_filefunc_def));
-
-extern int ZEXPORT zipOpenNewFileInZip OF((zipFile file,
-                       const char* filename,
-                       const zip_fileinfo* zipfi,
-                       const void* extrafield_local,
-                       uInt size_extrafield_local,
-                       const void* extrafield_global,
-                       uInt size_extrafield_global,
-                       const char* comment,
-                       int method,
-                       int level));
-/*
-  Open a file in the ZIP for writing.
-  filename : the filename in zip (if NULL, '-' without quote will be used
-  *zipfi contain supplemental information
-  if extrafield_local!=NULL and size_extrafield_local>0, extrafield_local
-    contains the extrafield data the the local header
-  if extrafield_global!=NULL and size_extrafield_global>0, extrafield_global
-    contains the extrafield data the the local header
-  if comment != NULL, comment contain the comment string
-  method contain the compression method (0 for store, Z_DEFLATED for deflate)
-  level contain the level of compression (can be Z_DEFAULT_COMPRESSION)
-*/
-
-
-extern int ZEXPORT zipOpenNewFileInZip2 OF((zipFile file,
-                                            const char* filename,
-                                            const zip_fileinfo* zipfi,
-                                            const void* extrafield_local,
-                                            uInt size_extrafield_local,
-                                            const void* extrafield_global,
-                                            uInt size_extrafield_global,
-                                            const char* comment,
-                                            int method,
-                                            int level,
-                                            int raw));
-
-/*
-  Same than zipOpenNewFileInZip, except if raw=1, we write raw file
- */
-
-extern int ZEXPORT zipOpenNewFileInZip3 OF((zipFile file,
-                                            const char* filename,
-                                            const zip_fileinfo* zipfi,
-                                            const void* extrafield_local,
-                                            uInt size_extrafield_local,
-                                            const void* extrafield_global,
-                                            uInt size_extrafield_global,
-                                            const char* comment,
-                                            int method,
-                                            int level,
-                                            int raw,
-                                            int windowBits,
-                                            int memLevel,
-                                            int strategy,
-                                            const char* password,
-                                            uLong crcForCtypting));
-
-/*
-  Same than zipOpenNewFileInZip2, except
-    windowBits,memLevel,,strategy : see parameter strategy in deflateInit2
-    password : crypting password (NULL for no crypting)
-    crcForCtypting : crc of file to compress (needed for crypting)
- */
-
-
-extern int ZEXPORT zipWriteInFileInZip OF((zipFile file,
-                       const void* buf,
-                       unsigned len));
-/*
-  Write data in the zipfile
-*/
-
-extern int ZEXPORT zipCloseFileInZip OF((zipFile file));
-/*
-  Close the current file in the zipfile
-*/
-
-extern int ZEXPORT zipCloseFileInZipRaw OF((zipFile file,
-                                            uLong uncompressed_size,
-                                            uLong crc32));
-/*
-  Close the current file in the zipfile, for fiel opened with
-    parameter raw=1 in zipOpenNewFileInZip2
-  uncompressed_size and crc32 are value for the uncompressed size
-*/
-
-extern int ZEXPORT zipClose OF((zipFile file,
-                const char* global_comment));
-/*
-  Close the zipfile
-*/
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _zip_H */
Index: trunk/minix/lib/zlib-1.2.3/contrib/pascal/example.pas
===================================================================
--- trunk/minix/lib/zlib-1.2.3/contrib/pascal/example.pas	(revision 9)
+++ 	(revision )
@@ -1,599 +1,0 @@
-(* example.c -- usage example of the zlib compression library
- * Copyright (C) 1995-2003 Jean-loup Gailly.
- * For conditions of distribution and use, see copyright notice in zlib.h
- *
- * Pascal translation
- * Copyright (C) 1998 by Jacques Nomssi Nzali.
- * For conditions of distribution and use, see copyright notice in readme.txt
- *
- * Adaptation to the zlibpas interface
- * Copyright (C) 2003 by Cosmin Truta.
- * For conditions of distribution and use, see copyright notice in readme.txt
- *)
-
-program example;
-
-{$DEFINE TEST_COMPRESS}
-{DO NOT $DEFINE TEST_GZIO}
-{$DEFINE TEST_DEFLATE}
-{$DEFINE TEST_INFLATE}
-{$DEFINE TEST_FLUSH}
-{$DEFINE TEST_SYNC}
-{$DEFINE TEST_DICT}
-
-uses SysUtils, zlibpas;
-
-const TESTFILE = 'foo.gz';
-
-(* "hello world" would be more standard, but the repeated "hello"
- * stresses the compression code better, sorry...
- *)
-const hello: PChar = 'hello, hello!';
-
-const dictionary: PChar = 'hello';
-
-var dictId: LongInt; (* Adler32 value of the dictionary *)
-
-procedure CHECK_ERR(err: Integer; msg: String);
-begin
-  if err <> Z_OK then
-  begin
-    WriteLn(msg, ' error: ', err);
-    Halt(1);
-  end;
-end;
-
-procedure EXIT_ERR(const msg: String);
-begin
-  WriteLn('Error: ', msg);
-  Halt(1);
-end;
-
-(* ===========================================================================
- * Test compress and uncompress
- *)
-{$IFDEF TEST_COMPRESS}
-procedure test_compress(compr: Pointer; comprLen: LongInt;
-                        uncompr: Pointer; uncomprLen: LongInt);
-var err: Integer;
-    len: LongInt;
-begin
-  len := StrLen(hello)+1;
-
-  err := compress(compr, comprLen, hello, len);
-  CHECK_ERR(err, 'compress');
-
-  StrCopy(PChar(uncompr), 'garbage');
-
-  err := uncompress(uncompr, uncomprLen, compr, comprLen);
-  CHECK_ERR(err, 'uncompress');
-
-  if StrComp(PChar(uncompr), hello) <> 0 then
-    EXIT_ERR('bad uncompress')
-  else
-    WriteLn('uncompress(): ', PChar(uncompr));
-end;
-{$ENDIF}
-
-(* ===========================================================================
- * Test read/write of .gz files
- *)
-{$IFDEF TEST_GZIO}
-procedure test_gzio(const fname: PChar; (* compressed file name *)
-                    uncompr: Pointer;
-                    uncomprLen: LongInt);
-var err: Integer;
-    len: Integer;
-    zfile: gzFile;
-    pos: LongInt;
-begin
-  len := StrLen(hello)+1;
-
-  zfile := gzopen(fname, 'wb');
-  if zfile = NIL then
-  begin
-    WriteLn('gzopen error');
-    Halt(1);
-  end;
-  gzputc(zfile, 'h');
-  if gzputs(zfile, 'ello') <> 4 then
-  begin
-    WriteLn('gzputs err: ', gzerror(zfile, err));
-    Halt(1);
-  end;
-  {$IFDEF GZ_FORMAT_STRING}
-  if gzprintf(zfile, ', %s!', 'hello') <> 8 then
-  begin
-    WriteLn('gzprintf err: ', gzerror(zfile, err));
-    Halt(1);
-  end;
-  {$ELSE}
-  if gzputs(zfile, ', hello!') <> 8 then
-  begin
-    WriteLn('gzputs err: ', gzerror(zfile, err));
-    Halt(1);
-  end;
-  {$ENDIF}
-  gzseek(zfile, 1, SEEK_CUR); (* add one zero byte *)
-  gzclose(zfile);
-
-  zfile := gzopen(fname, 'rb');
-  if zfile = NIL then
-  begin
-    WriteLn('gzopen error');
-    Halt(1);
-  end;
-
-  StrCopy(PChar(uncompr), 'garbage');
-
-  if gzread(zfile, uncompr, uncomprLen) <> len then
-  begin
-    WriteLn('gzread err: ', gzerror(zfile, err));
-    Halt(1);
-  end;
-  if StrComp(PChar(uncompr), hello) <> 0 then
-  begin
-    WriteLn('bad gzread: ', PChar(uncompr));
-    Halt(1);
-  end
-  else
-    WriteLn('gzread(): ', PChar(uncompr));
-
-  pos := gzseek(zfile, -8, SEEK_CUR);
-  if (pos <> 6) or (gztell(zfile) <> pos) then
-  begin
-    WriteLn('gzseek error, pos=', pos, ', gztell=', gztell(zfile));
-    Halt(1);
-  end;
-
-  if gzgetc(zfile) <> ' ' then
-  begin
-    WriteLn('gzgetc error');
-    Halt(1);
-  end;
-
-  if gzungetc(' ', zfile) <> ' ' then
-  begin
-    WriteLn('gzungetc error');
-    Halt(1);
-  end;
-
-  gzgets(zfile, PChar(uncompr), uncomprLen);
-  uncomprLen := StrLen(PChar(uncompr));
-  if uncomprLen <> 7 then (* " hello!" *)
-  begin
-    WriteLn('gzgets err after gzseek: ', gzerror(zfile, err));
-    Halt(1);
-  end;
-  if StrComp(PChar(uncompr), hello + 6) <> 0 then
-  begin
-    WriteLn('bad gzgets after gzseek');
-    Halt(1);
-  end
-  else
-    WriteLn('gzgets() after gzseek: ', PChar(uncompr));
-
-  gzclose(zfile);
-end;
-{$ENDIF}
-
-(* ===========================================================================
- * Test deflate with small buffers
- *)
-{$IFDEF TEST_DEFLATE}
-procedure test_deflate(compr: Pointer; comprLen: LongInt);
-var c_stream: z_stream; (* compression stream *)
-    err: Integer;
-    len: LongInt;
-begin
-  len := StrLen(hello)+1;
-
-  c_stream.zalloc := NIL;
-  c_stream.zfree := NIL;
-  c_stream.opaque := NIL;
-
-  err := deflateInit(c_stream, Z_DEFAULT_COMPRESSION);
-  CHECK_ERR(err, 'deflateInit');
-
-  c_stream.next_in := hello;
-  c_stream.next_out := compr;
-
-  while (c_stream.total_in <> len) and
-        (c_stream.total_out < comprLen) do
-  begin
-    c_stream.avail_out := 1; { force small buffers }
-    c_stream.avail_in := 1;
-    err := deflate(c_stream, Z_NO_FLUSH);
-    CHECK_ERR(err, 'deflate');
-  end;
-
-  (* Finish the stream, still forcing small buffers: *)
-  while TRUE do
-  begin
-    c_stream.avail_out := 1;
-    err := deflate(c_stream, Z_FINISH);
-    if err = Z_STREAM_END then
-      break;
-    CHECK_ERR(err, 'deflate');
-  end;
-
-  err := deflateEnd(c_stream);
-  CHECK_ERR(err, 'deflateEnd');
-end;
-{$ENDIF}
-
-(* ===========================================================================
- * Test inflate with small buffers
- *)
-{$IFDEF TEST_INFLATE}
-procedure test_inflate(compr: Pointer; comprLen : LongInt;
-                       uncompr: Pointer; uncomprLen : LongInt);
-var err: Integer;
-    d_stream: z_stream; (* decompression stream *)
-begin
-  StrCopy(PChar(uncompr), 'garbage');
-
-  d_stream.zalloc := NIL;
-  d_stream.zfree := NIL;
-  d_stream.opaque := NIL;
-
-  d_stream.next_in := compr;
-  d_stream.avail_in := 0;
-  d_stream.next_out := uncompr;
-
-  err := inflateInit(d_stream);
-  CHECK_ERR(err, 'inflateInit');
-
-  while (d_stream.total_out < uncomprLen) and
-        (d_stream.total_in < comprLen) do
-  begin
-    d_stream.avail_out := 1; (* force small buffers *)
-    d_stream.avail_in := 1;
-    err := inflate(d_stream, Z_NO_FLUSH);
-    if err = Z_STREAM_END then
-      break;
-    CHECK_ERR(err, 'inflate');
-  end;
-
-  err := inflateEnd(d_stream);
-  CHECK_ERR(err, 'inflateEnd');
-
-  if StrComp(PChar(uncompr), hello) <> 0 then
-    EXIT_ERR('bad inflate')
-  else
-    WriteLn('inflate(): ', PChar(uncompr));
-end;
-{$ENDIF}
-
-(* ===========================================================================
- * Test deflate with large buffers and dynamic change of compression level
- *)
-{$IFDEF TEST_DEFLATE}
-procedure test_large_deflate(compr: Pointer; comprLen: LongInt;
-                             uncompr: Pointer; uncomprLen: LongInt);
-var c_stream: z_stream; (* compression stream *)
-    err: Integer;
-begin
-  c_stream.zalloc := NIL;
-  c_stream.zfree := NIL;
-  c_stream.opaque := NIL;
-
-  err := deflateInit(c_stream, Z_BEST_SPEED);
-  CHECK_ERR(err, 'deflateInit');
-
-  c_stream.next_out := compr;
-  c_stream.avail_out := Integer(comprLen);
-
-  (* At this point, uncompr is still mostly zeroes, so it should compress
-   * very well:
-   *)
-  c_stream.next_in := uncompr;
-  c_stream.avail_in := Integer(uncomprLen);
-  err := deflate(c_stream, Z_NO_FLUSH);
-  CHECK_ERR(err, 'deflate');
-  if c_stream.avail_in <> 0 then
-    EXIT_ERR('deflate not greedy');
-
-  (* Feed in already compressed data and switch to no compression: *)
-  deflateParams(c_stream, Z_NO_COMPRESSION, Z_DEFAULT_STRATEGY);
-  c_stream.next_in := compr;
-  c_stream.avail_in := Integer(comprLen div 2);
-  err := deflate(c_stream, Z_NO_FLUSH);
-  CHECK_ERR(err, 'deflate');
-
-  (* Switch back to compressing mode: *)
-  deflateParams(c_stream, Z_BEST_COMPRESSION, Z_FILTERED);
-  c_stream.next_in := uncompr;
-  c_stream.avail_in := Integer(uncomprLen);
-  err := deflate(c_stream, Z_NO_FLUSH);
-  CHECK_ERR(err, 'deflate');
-
-  err := deflate(c_stream, Z_FINISH);
-  if err <> Z_STREAM_END then
-    EXIT_ERR('deflate should report Z_STREAM_END');
-
-  err := deflateEnd(c_stream);
-  CHECK_ERR(err, 'deflateEnd');
-end;
-{$ENDIF}
-
-(* ===========================================================================
- * Test inflate with large buffers
- *)
-{$IFDEF TEST_INFLATE}
-procedure test_large_inflate(compr: Pointer; comprLen: LongInt;
-                             uncompr: Pointer; uncomprLen: LongInt);
-var err: Integer;
-    d_stream: z_stream; (* decompression stream *)
-begin
-  StrCopy(PChar(uncompr), 'garbage');
-
-  d_stream.zalloc := NIL;
-  d_stream.zfree := NIL;
-  d_stream.opaque := NIL;
-
-  d_stream.next_in := compr;
-  d_stream.avail_in := Integer(comprLen);
-
-  err := inflateInit(d_stream);
-  CHECK_ERR(err, 'inflateInit');
-
-  while TRUE do
-  begin
-    d_stream.next_out := uncompr;            (* discard the output *)
-    d_stream.avail_out := Integer(uncomprLen);
-    err := inflate(d_stream, Z_NO_FLUSH);
-    if err = Z_STREAM_END then
-      break;
-    CHECK_ERR(err, 'large inflate');
-  end;
-
-  err := inflateEnd(d_stream);
-  CHECK_ERR(err, 'inflateEnd');
-
-  if d_stream.total_out <> 2 * uncomprLen + comprLen div 2 then
-  begin
-    WriteLn('bad large inflate: ', d_stream.total_out);
-    Halt(1);
-  end
-  else
-    WriteLn('large_inflate(): OK');
-end;
-{$ENDIF}
-
-(* ===========================================================================
- * Test deflate with full flush
- *)
-{$IFDEF TEST_FLUSH}
-procedure test_flush(compr: Pointer; var comprLen : LongInt);
-var c_stream: z_stream; (* compression stream *)
-    err: Integer;
-    len: Integer;
-begin
-  len := StrLen(hello)+1;
-
-  c_stream.zalloc := NIL;
-  c_stream.zfree := NIL;
-  c_stream.opaque := NIL;
-
-  err := deflateInit(c_stream, Z_DEFAULT_COMPRESSION);
-  CHECK_ERR(err, 'deflateInit');
-
-  c_stream.next_in := hello;
-  c_stream.next_out := compr;
-  c_stream.avail_in := 3;
-  c_stream.avail_out := Integer(comprLen);
-  err := deflate(c_stream, Z_FULL_FLUSH);
-  CHECK_ERR(err, 'deflate');
-
-  Inc(PByteArray(compr)^[3]); (* force an error in first compressed block *)
-  c_stream.avail_in := len - 3;
-
-  err := deflate(c_stream, Z_FINISH);
-  if err <> Z_STREAM_END then
-    CHECK_ERR(err, 'deflate');
-
-  err := deflateEnd(c_stream);
-  CHECK_ERR(err, 'deflateEnd');
-
-  comprLen := c_stream.total_out;
-end;
-{$ENDIF}
-
-(* ===========================================================================
- * Test inflateSync()
- *)
-{$IFDEF TEST_SYNC}
-procedure test_sync(compr: Pointer; comprLen: LongInt;
-                    uncompr: Pointer; uncomprLen : LongInt);
-var err: Integer;
-    d_stream: z_stream; (* decompression stream *)
-begin
-  StrCopy(PChar(uncompr), 'garbage');
-
-  d_stream.zalloc := NIL;
-  d_stream.zfree := NIL;
-  d_stream.opaque := NIL;
-
-  d_stream.next_in := compr;
-  d_stream.avail_in := 2; (* just read the zlib header *)
-
-  err := inflateInit(d_stream);
-  CHECK_ERR(err, 'inflateInit');
-
-  d_stream.next_out := uncompr;
-  d_stream.avail_out := Integer(uncomprLen);
-
-  inflate(d_stream, Z_NO_FLUSH);
-  CHECK_ERR(err, 'inflate');
-
-  d_stream.avail_in := Integer(comprLen-2);   (* read all compressed data *)
-  err := inflateSync(d_stream);               (* but skip the damaged part *)
-  CHECK_ERR(err, 'inflateSync');
-
-  err := inflate(d_stream, Z_FINISH);
-  if err <> Z_DATA_ERROR then
-    EXIT_ERR('inflate should report DATA_ERROR');
-    (* Because of incorrect adler32 *)
-
-  err := inflateEnd(d_stream);
-  CHECK_ERR(err, 'inflateEnd');
-
-  WriteLn('after inflateSync(): hel', PChar(uncompr));
-end;
-{$ENDIF}
-
-(* ===========================================================================
- * Test deflate with preset dictionary
- *)
-{$IFDEF TEST_DICT}
-procedure test_dict_deflate(compr: Pointer; comprLen: LongInt);
-var c_stream: z_stream; (* compression stream *)
-    err: Integer;
-begin
-  c_stream.zalloc := NIL;
-  c_stream.zfree := NIL;
-  c_stream.opaque := NIL;
-
-  err := deflateInit(c_stream, Z_BEST_COMPRESSION);
-  CHECK_ERR(err, 'deflateInit');
-
-  err := deflateSetDictionary(c_stream, dictionary, StrLen(dictionary));
-  CHECK_ERR(err, 'deflateSetDictionary');
-
-  dictId := c_stream.adler;
-  c_stream.next_out := compr;
-  c_stream.avail_out := Integer(comprLen);
-
-  c_stream.next_in := hello;
-  c_stream.avail_in := StrLen(hello)+1;
-
-  err := deflate(c_stream, Z_FINISH);
-  if err <> Z_STREAM_END then
-    EXIT_ERR('deflate should report Z_STREAM_END');
-
-  err := deflateEnd(c_stream);
-  CHECK_ERR(err, 'deflateEnd');
-end;
-{$ENDIF}
-
-(* ===========================================================================
- * Test inflate with a preset dictionary
- *)
-{$IFDEF TEST_DICT}
-procedure test_dict_inflate(compr: Pointer; comprLen: LongInt;
-                            uncompr: Pointer; uncomprLen: LongInt);
-var err: Integer;
-    d_stream: z_stream; (* decompression stream *)
-begin
-  StrCopy(PChar(uncompr), 'garbage');
-
-  d_stream.zalloc := NIL;
-  d_stream.zfree := NIL;
-  d_stream.opaque := NIL;
-
-  d_stream.next_in := compr;
-  d_stream.avail_in := Integer(comprLen);
-
-  err := inflateInit(d_stream);
-  CHECK_ERR(err, 'inflateInit');
-
-  d_stream.next_out := uncompr;
-  d_stream.avail_out := Integer(uncomprLen);
-
-  while TRUE do
-  begin
-    err := inflate(d_stream, Z_NO_FLUSH);
-    if err = Z_STREAM_END then
-      break;
-    if err = Z_NEED_DICT then
-    begin
-      if d_stream.adler <> dictId then
-        EXIT_ERR('unexpected dictionary');
-      err := inflateSetDictionary(d_stream, dictionary, StrLen(dictionary));
-    end;
-    CHECK_ERR(err, 'inflate with dict');
-  end;
-
-  err := inflateEnd(d_stream);
-  CHECK_ERR(err, 'inflateEnd');
-
-  if StrComp(PChar(uncompr), hello) <> 0 then
-    EXIT_ERR('bad inflate with dict')
-  else
-    WriteLn('inflate with dictionary: ', PChar(uncompr));
-end;
-{$ENDIF}
-
-var compr, uncompr: Pointer;
-    comprLen, uncomprLen: LongInt;
-
-begin
-  if zlibVersion^ <> ZLIB_VERSION[1] then
-    EXIT_ERR('Incompatible zlib version');
-
-  WriteLn('zlib version: ', zlibVersion);
-  WriteLn('zlib compile flags: ', Format('0x%x', [zlibCompileFlags]));
-
-  comprLen := 10000 * SizeOf(Integer); (* don't overflow on MSDOS *)
-  uncomprLen := comprLen;
-  GetMem(compr, comprLen);
-  GetMem(uncompr, uncomprLen);
-  if (compr = NIL) or (uncompr = NIL) then
-    EXIT_ERR('Out of memory');
-  (* compr and uncompr are cleared to avoid reading uninitialized
-   * data and to ensure that uncompr compresses well.
-   *)
-  FillChar(compr^, comprLen, 0);
-  FillChar(uncompr^, uncomprLen, 0);
-
-  {$IFDEF TEST_COMPRESS}
-  WriteLn('** Testing compress');
-  test_compress(compr, comprLen, uncompr, uncomprLen);
-  {$ENDIF}
-
-  {$IFDEF TEST_GZIO}
-  WriteLn('** Testing gzio');
-  if ParamCount >= 1 then
-    test_gzio(ParamStr(1), uncompr, uncomprLen)
-  else
-    test_gzio(TESTFILE, uncompr, uncomprLen);
-  {$ENDIF}
-
-  {$IFDEF TEST_DEFLATE}
-  WriteLn('** Testing deflate with small buffers');
-  test_deflate(compr, comprLen);
-  {$ENDIF}
-  {$IFDEF TEST_INFLATE}
-  WriteLn('** Testing inflate with small buffers');
-  test_inflate(compr, comprLen, uncompr, uncomprLen);
-  {$ENDIF}
-
-  {$IFDEF TEST_DEFLATE}
-  WriteLn('** Testing deflate with large buffers');
-  test_large_deflate(compr, comprLen, uncompr, uncomprLen);
-  {$ENDIF}
-  {$IFDEF TEST_INFLATE}
-  WriteLn('** Testing inflate with large buffers');
-  test_large_inflate(compr, comprLen, uncompr, uncomprLen);
-  {$ENDIF}
-
-  {$IFDEF TEST_FLUSH}
-  WriteLn('** Testing deflate with full flush');
-  test_flush(compr, comprLen);
-  {$ENDIF}
-  {$IFDEF TEST_SYNC}
-  WriteLn('** Testing inflateSync');
-  test_sync(compr, comprLen, uncompr, uncomprLen);
-  {$ENDIF}
-  comprLen := uncomprLen;
-
-  {$IFDEF TEST_DICT}
-  WriteLn('** Testing deflate and inflate with preset dictionary');
-  test_dict_deflate(compr, comprLen);
-  test_dict_inflate(compr, comprLen, uncompr, uncomprLen);
-  {$ENDIF}
-
-  FreeMem(compr, comprLen);
-  FreeMem(uncompr, uncomprLen);
-end.
Index: trunk/minix/lib/zlib-1.2.3/contrib/pascal/readme.txt
===================================================================
--- trunk/minix/lib/zlib-1.2.3/contrib/pascal/readme.txt	(revision 9)
+++ 	(revision )
@@ -1,76 +1,0 @@
-
-This directory contains a Pascal (Delphi, Kylix) interface to the
-zlib data compression library.
-
-
-Directory listing
-=================
-
-zlibd32.mak     makefile for Borland C++
-example.pas     usage example of zlib
-zlibpas.pas     the Pascal interface to zlib
-readme.txt      this file
-
-
-Compatibility notes
-===================
-
-- Although the name "zlib" would have been more normal for the
-  zlibpas unit, this name is already taken by Borland's ZLib unit.
-  This is somehow unfortunate, because that unit is not a genuine
-  interface to the full-fledged zlib functionality, but a suite of
-  class wrappers around zlib streams.  Other essential features,
-  such as checksums, are missing.
-  It would have been more appropriate for that unit to have a name
-  like "ZStreams", or something similar.
-
-- The C and zlib-supplied types int, uInt, long, uLong, etc. are
-  translated directly into Pascal types of similar sizes (Integer,
-  LongInt, etc.), to avoid namespace pollution.  In particular,
-  there is no conversion of unsigned int into a Pascal unsigned
-  integer.  The Word type is non-portable and has the same size
-  (16 bits) both in a 16-bit and in a 32-bit environment, unlike
-  Integer.  Even if there is a 32-bit Cardinal type, there is no
-  real need for unsigned int in zlib under a 32-bit environment.
-
-- Except for the callbacks, the zlib function interfaces are
-  assuming the calling convention normally used in Pascal
-  (__pascal for DOS and Windows16, __fastcall for Windows32).
-  Since the cdecl keyword is used, the old Turbo Pascal does
-  not work with this interface.
-
-- The gz* function interfaces are not translated, to avoid
-  interfacing problems with the C runtime library.  Besides,
-    gzprintf(gzFile file, const char *format, ...)
-  cannot be translated into Pascal.
-
-
-Legal issues
-============
-
-The zlibpas interface is:
-  Copyright (C) 1995-2003 Jean-loup Gailly and Mark Adler.
-  Copyright (C) 1998 by Bob Dellaca.
-  Copyright (C) 2003 by Cosmin Truta.
-
-The example program is:
-  Copyright (C) 1995-2003 by Jean-loup Gailly.
-  Copyright (C) 1998,1999,2000 by Jacques Nomssi Nzali.
-  Copyright (C) 2003 by Cosmin Truta.
-
-  This software is provided 'as-is', without any express or implied
-  warranty.  In no event will the author be held liable for any damages
-  arising from the use of this software.
-
-  Permission is granted to anyone to use this software for any purpose,
-  including commercial applications, and to alter it and redistribute it
-  freely, subject to the following restrictions:
-
-  1. The origin of this software must not be misrepresented; you must not
-     claim that you wrote the original software. If you use this software
-     in a product, an acknowledgment in the product documentation would be
-     appreciated but is not required.
-  2. Altered source versions must be plainly marked as such, and must not be
-     misrepresented as being the original software.
-  3. This notice may not be removed or altered from any source distribution.
-
Index: trunk/minix/lib/zlib-1.2.3/contrib/pascal/zlibd32.mak
===================================================================
--- trunk/minix/lib/zlib-1.2.3/contrib/pascal/zlibd32.mak	(revision 9)
+++ 	(revision )
@@ -1,93 +1,0 @@
-# Makefile for zlib
-# For use with Delphi and C++ Builder under Win32
-# Updated for zlib 1.2.x by Cosmin Truta
-
-# ------------ Borland C++ ------------
-
-# This project uses the Delphi (fastcall/register) calling convention:
-LOC = -DZEXPORT=__fastcall -DZEXPORTVA=__cdecl
-
-CC = bcc32
-LD = bcc32
-AR = tlib
-# do not use "-pr" in CFLAGS
-CFLAGS = -a -d -k- -O2 $(LOC)
-LDFLAGS =
-
-
-# variables
-ZLIB_LIB = zlib.lib
-
-OBJ1 = adler32.obj compress.obj crc32.obj deflate.obj gzio.obj infback.obj
-OBJ2 = inffast.obj inflate.obj inftrees.obj trees.obj uncompr.obj zutil.obj
-OBJP1 = +adler32.obj+compress.obj+crc32.obj+deflate.obj+gzio.obj+infback.obj
-OBJP2 = +inffast.obj+inflate.obj+inftrees.obj+trees.obj+uncompr.obj+zutil.obj
-
-
-# targets
-all: $(ZLIB_LIB) example.exe minigzip.exe
-
-.c.obj:
-	$(CC) -c $(CFLAGS) $*.c
-
-adler32.obj: adler32.c zlib.h zconf.h
-
-compress.obj: compress.c zlib.h zconf.h
-
-crc32.obj: crc32.c zlib.h zconf.h crc32.h
-
-deflate.obj: deflate.c deflate.h zutil.h zlib.h zconf.h
-
-gzio.obj: gzio.c zutil.h zlib.h zconf.h
-
-infback.obj: infback.c zutil.h zlib.h zconf.h inftrees.h inflate.h \
- inffast.h inffixed.h
-
-inffast.obj: inffast.c zutil.h zlib.h zconf.h inftrees.h inflate.h \
- inffast.h
-
-inflate.obj: inflate.c zutil.h zlib.h zconf.h inftrees.h inflate.h \
- inffast.h inffixed.h
-
-inftrees.obj: inftrees.c zutil.h zlib.h zconf.h inftrees.h
-
-trees.obj: trees.c zutil.h zlib.h zconf.h deflate.h trees.h
-
-uncompr.obj: uncompr.c zlib.h zconf.h
-
-zutil.obj: zutil.c zutil.h zlib.h zconf.h
-
-example.obj: example.c zlib.h zconf.h
-
-minigzip.obj: minigzip.c zlib.h zconf.h
-
-
-# For the sake of the old Borland make,
-# the command line is cut to fit in the MS-DOS 128 byte limit:
-$(ZLIB_LIB): $(OBJ1) $(OBJ2)
-	-del $(ZLIB_LIB)
-	$(AR) $(ZLIB_LIB) $(OBJP1)
-	$(AR) $(ZLIB_LIB) $(OBJP2)
-
-
-# testing
-test: example.exe minigzip.exe
-	example
-	echo hello world | minigzip | minigzip -d
-
-example.exe: example.obj $(ZLIB_LIB)
-	$(LD) $(LDFLAGS) example.obj $(ZLIB_LIB)
-
-minigzip.exe: minigzip.obj $(ZLIB_LIB)
-	$(LD) $(LDFLAGS) minigzip.obj $(ZLIB_LIB)
-
-
-# cleanup
-clean:
-	-del *.obj
-	-del *.exe
-	-del *.lib
-	-del *.tds
-	-del zlib.bak
-	-del foo.gz
-
Index: trunk/minix/lib/zlib-1.2.3/contrib/pascal/zlibpas.pas
===================================================================
--- trunk/minix/lib/zlib-1.2.3/contrib/pascal/zlibpas.pas	(revision 9)
+++ 	(revision )
@@ -1,236 +1,0 @@
-(* zlibpas -- Pascal interface to the zlib data compression library
- *
- * Copyright (C) 2003 Cosmin Truta.
- * Derived from original sources by Bob Dellaca.
- * For conditions of distribution and use, see copyright notice in readme.txt
- *)
-
-unit zlibpas;
-
-interface
-
-const
-  ZLIB_VERSION = '1.2.3';
-
-type
-  alloc_func = function(opaque: Pointer; items, size: Integer): Pointer;
-                 cdecl;
-  free_func  = procedure(opaque, address: Pointer);
-                 cdecl;
-
-  in_func    = function(opaque: Pointer; var buf: PByte): Integer;
-                 cdecl;
-  out_func   = function(opaque: Pointer; buf: PByte; size: Integer): Integer;
-                 cdecl;
-
-  z_streamp = ^z_stream;
-  z_stream = packed record
-    next_in: PChar;       (* next input byte *)
-    avail_in: Integer;    (* number of bytes available at next_in *)
-    total_in: LongInt;    (* total nb of input bytes read so far *)
-
-    next_out: PChar;      (* next output byte should be put there *)
-    avail_out: Integer;   (* remaining free space at next_out *)
-    total_out: LongInt;   (* total nb of bytes output so far *)
-
-    msg: PChar;           (* last error message, NULL if no error *)
-    state: Pointer;       (* not visible by applications *)
-
-    zalloc: alloc_func;   (* used to allocate the internal state *)
-    zfree: free_func;     (* used to free the internal state *)
-    opaque: Pointer;      (* private data object passed to zalloc and zfree *)
-
-    data_type: Integer;   (* best guess about the data type: ascii or binary *)
-    adler: LongInt;       (* adler32 value of the uncompressed data *)
-    reserved: LongInt;    (* reserved for future use *)
-  end;
-
-(* constants *)
-const
-  Z_NO_FLUSH      = 0;
-  Z_PARTIAL_FLUSH = 1;
-  Z_SYNC_FLUSH    = 2;
-  Z_FULL_FLUSH    = 3;
-  Z_FINISH        = 4;
-
-  Z_OK            =  0;
-  Z_STREAM_END    =  1;
-  Z_NEED_DICT     =  2;
-  Z_ERRNO         = -1;
-  Z_STREAM_ERROR  = -2;
-  Z_DATA_ERROR    = -3;
-  Z_MEM_ERROR     = -4;
-  Z_BUF_ERROR     = -5;
-  Z_VERSION_ERROR = -6;
-
-  Z_NO_COMPRESSION       =  0;
-  Z_BEST_SPEED           =  1;
-  Z_BEST_COMPRESSION     =  9;
-  Z_DEFAULT_COMPRESSION  = -1;
-
-  Z_FILTERED            = 1;
-  Z_HUFFMAN_ONLY        = 2;
-  Z_RLE                 = 3;
-  Z_DEFAULT_STRATEGY    = 0;
-
-  Z_BINARY   = 0;
-  Z_ASCII    = 1;
-  Z_UNKNOWN  = 2;
-
-  Z_DEFLATED = 8;
-
-(* basic functions *)
-function zlibVersion: PChar;
-function deflateInit(var strm: z_stream; level: Integer): Integer;
-function deflate(var strm: z_stream; flush: Integer): Integer;
-function deflateEnd(var strm: z_stream): Integer;
-function inflateInit(var strm: z_stream): Integer;
-function inflate(var strm: z_stream; flush: Integer): Integer;
-function inflateEnd(var strm: z_stream): Integer;
-
-(* advanced functions *)
-function deflateInit2(var strm: z_stream; level, method, windowBits,
-                      memLevel, strategy: Integer): Integer;
-function deflateSetDictionary(var strm: z_stream; const dictionary: PChar;
-                              dictLength: Integer): Integer;
-function deflateCopy(var dest, source: z_stream): Integer;
-function deflateReset(var strm: z_stream): Integer;
-function deflateParams(var strm: z_stream; level, strategy: Integer): Integer;
-function deflateBound(var strm: z_stream; sourceLen: LongInt): LongInt;
-function deflatePrime(var strm: z_stream; bits, value: Integer): Integer;
-function inflateInit2(var strm: z_stream; windowBits: Integer): Integer;
-function inflateSetDictionary(var strm: z_stream; const dictionary: PChar;
-                              dictLength: Integer): Integer;
-function inflateSync(var strm: z_stream): Integer;
-function inflateCopy(var dest, source: z_stream): Integer;
-function inflateReset(var strm: z_stream): Integer;
-function inflateBackInit(var strm: z_stream;
-                         windowBits: Integer; window: PChar): Integer;
-function inflateBack(var strm: z_stream; in_fn: in_func; in_desc: Pointer;
-                     out_fn: out_func; out_desc: Pointer): Integer;
-function inflateBackEnd(var strm: z_stream): Integer;
-function zlibCompileFlags: LongInt;
-
-(* utility functions *)
-function compress(dest: PChar; var destLen: LongInt;
-                  const source: PChar; sourceLen: LongInt): Integer;
-function compress2(dest: PChar; var destLen: LongInt;
-                  const source: PChar; sourceLen: LongInt;
-                  level: Integer): Integer;
-function compressBound(sourceLen: LongInt): LongInt;
-function uncompress(dest: PChar; var destLen: LongInt;
-                    const source: PChar; sourceLen: LongInt): Integer;
-
-(* checksum functions *)
-function adler32(adler: LongInt; const buf: PChar; len: Integer): LongInt;
-function crc32(crc: LongInt; const buf: PChar; len: Integer): LongInt;
-
-(* various hacks, don't look :) *)
-function deflateInit_(var strm: z_stream; level: Integer;
-                      const version: PChar; stream_size: Integer): Integer;
-function inflateInit_(var strm: z_stream; const version: PChar;
-                      stream_size: Integer): Integer;
-function deflateInit2_(var strm: z_stream;
-                       level, method, windowBits, memLevel, strategy: Integer;
-                       const version: PChar; stream_size: Integer): Integer;
-function inflateInit2_(var strm: z_stream; windowBits: Integer;
-                       const version: PChar; stream_size: Integer): Integer;
-function inflateBackInit_(var strm: z_stream;
-                          windowBits: Integer; window: PChar;
-                          const version: PChar; stream_size: Integer): Integer;
-
-
-implementation
-
-{$L adler32.obj}
-{$L compress.obj}
-{$L crc32.obj}
-{$L deflate.obj}
-{$L infback.obj}
-{$L inffast.obj}
-{$L inflate.obj}
-{$L inftrees.obj}
-{$L trees.obj}
-{$L uncompr.obj}
-{$L zutil.obj}
-
-function adler32; external;
-function compress; external;
-function compress2; external;
-function compressBound; external;
-function crc32; external;
-function deflate; external;
-function deflateBound; external;
-function deflateCopy; external;
-function deflateEnd; external;
-function deflateInit_; external;
-function deflateInit2_; external;
-function deflateParams; external;
-function deflatePrime; external;
-function deflateReset; external;
-function deflateSetDictionary; external;
-function inflate; external;
-function inflateBack; external;
-function inflateBackEnd; external;
-function inflateBackInit_; external;
-function inflateCopy; external;
-function inflateEnd; external;
-function inflateInit_; external;
-function inflateInit2_; external;
-function inflateReset; external;
-function inflateSetDictionary; external;
-function inflateSync; external;
-function uncompress; external;
-function zlibCompileFlags; external;
-function zlibVersion; external;
-
-function deflateInit(var strm: z_stream; level: Integer): Integer;
-begin
-  Result := deflateInit_(strm, level, ZLIB_VERSION, sizeof(z_stream));
-end;
-
-function deflateInit2(var strm: z_stream; level, method, windowBits, memLevel,
-                      strategy: Integer): Integer;
-begin
-  Result := deflateInit2_(strm, level, method, windowBits, memLevel, strategy,
-                          ZLIB_VERSION, sizeof(z_stream));
-end;
-
-function inflateInit(var strm: z_stream): Integer;
-begin
-  Result := inflateInit_(strm, ZLIB_VERSION, sizeof(z_stream));
-end;
-
-function inflateInit2(var strm: z_stream; windowBits: Integer): Integer;
-begin
-  Result := inflateInit2_(strm, windowBits, ZLIB_VERSION, sizeof(z_stream));
-end;
-
-function inflateBackInit(var strm: z_stream;
-                         windowBits: Integer; window: PChar): Integer;
-begin
-  Result := inflateBackInit_(strm, windowBits, window,
-                             ZLIB_VERSION, sizeof(z_stream));
-end;
-
-function _malloc(Size: Integer): Pointer; cdecl;
-begin
-  GetMem(Result, Size);
-end;
-
-procedure _free(Block: Pointer); cdecl;
-begin
-  FreeMem(Block);
-end;
-
-procedure _memset(P: Pointer; B: Byte; count: Integer); cdecl;
-begin
-  FillChar(P^, count, B);
-end;
-
-procedure _memcpy(dest, source: Pointer; count: Integer); cdecl;
-begin
-  Move(source^, dest^, count);
-end;
-
-end.
Index: trunk/minix/lib/zlib-1.2.3/contrib/puff/Makefile
===================================================================
--- trunk/minix/lib/zlib-1.2.3/contrib/puff/Makefile	(revision 9)
+++ 	(revision )
@@ -1,8 +1,0 @@
-puff: puff.c puff.h
-	cc -DTEST -o puff puff.c
-
-test: puff
-	puff zeros.raw
-
-clean:
-	rm -f puff puff.o
Index: trunk/minix/lib/zlib-1.2.3/contrib/puff/README
===================================================================
--- trunk/minix/lib/zlib-1.2.3/contrib/puff/README	(revision 9)
+++ 	(revision )
@@ -1,63 +1,0 @@
-Puff -- A Simple Inflate
-3 Mar 2003
-Mark Adler
-madler@alumni.caltech.edu
-
-What this is --
-
-puff.c provides the routine puff() to decompress the deflate data format.  It
-does so more slowly than zlib, but the code is about one-fifth the size of the
-inflate code in zlib, and written to be very easy to read.
-
-Why I wrote this --
-
-puff.c was written to document the deflate format unambiguously, by virtue of
-being working C code.  It is meant to supplement RFC 1951, which formally
-describes the deflate format.  I have received many questions on details of the
-deflate format, and I hope that reading this code will answer those questions.
-puff.c is heavily commented with details of the deflate format, especially
-those little nooks and cranies of the format that might not be obvious from a
-specification.
-
-puff.c may also be useful in applications where code size or memory usage is a
-very limited resource, and speed is not as important.
-
-How to use it --
-
-Well, most likely you should just be reading puff.c and using zlib for actual
-applications, but if you must ...
-
-Include puff.h in your code, which provides this prototype:
-
-int puff(unsigned char *dest,           /* pointer to destination pointer */
-         unsigned long *destlen,        /* amount of output space */
-         unsigned char *source,         /* pointer to source data pointer */
-         unsigned long *sourcelen);     /* amount of input available */
-
-Then you can call puff() to decompress a deflate stream that is in memory in
-its entirety at source, to a sufficiently sized block of memory for the
-decompressed data at dest.  puff() is the only external symbol in puff.c  The
-only C library functions that puff.c needs are setjmp() and longjmp(), which
-are used to simplify error checking in the code to improve readabilty.  puff.c
-does no memory allocation, and uses less than 2K bytes off of the stack.
-
-If destlen is not enough space for the uncompressed data, then inflate will
-return an error without writing more than destlen bytes.  Note that this means
-that in order to decompress the deflate data successfully, you need to know
-the size of the uncompressed data ahead of time.
-
-If needed, puff() can determine the size of the uncompressed data with no
-output space.  This is done by passing dest equal to (unsigned char *)0.  Then
-the initial value of *destlen is ignored and *destlen is set to the length of
-the uncompressed data.  So if the size of the uncompressed data is not known,
-then two passes of puff() can be used--first to determine the size, and second
-to do the actual inflation after allocating the appropriate memory.  Not
-pretty, but it works.  (This is one of the reasons you should be using zlib.)
-
-The deflate format is self-terminating.  If the deflate stream does not end
-in *sourcelen bytes, puff() will return an error without reading at or past
-endsource.
-
-On return, *sourcelen is updated to the amount of input data consumed, and
-*destlen is updated to the size of the uncompressed data.  See the comments
-in puff.c for the possible return codes for puff().
Index: trunk/minix/lib/zlib-1.2.3/contrib/puff/puff.c
===================================================================
--- trunk/minix/lib/zlib-1.2.3/contrib/puff/puff.c	(revision 9)
+++ 	(revision )
@@ -1,837 +1,0 @@
-/*
- * puff.c
- * Copyright (C) 2002-2004 Mark Adler
- * For conditions of distribution and use, see copyright notice in puff.h
- * version 1.8, 9 Jan 2004
- *
- * puff.c is a simple inflate written to be an unambiguous way to specify the
- * deflate format.  It is not written for speed but rather simplicity.  As a
- * side benefit, this code might actually be useful when small code is more
- * important than speed, such as bootstrap applications.  For typical deflate
- * data, zlib's inflate() is about four times as fast as puff().  zlib's
- * inflate compiles to around 20K on my machine, whereas puff.c compiles to
- * around 4K on my machine (a PowerPC using GNU cc).  If the faster decode()
- * function here is used, then puff() is only twice as slow as zlib's
- * inflate().
- *
- * All dynamically allocated memory comes from the stack.  The stack required
- * is less than 2K bytes.  This code is compatible with 16-bit int's and
- * assumes that long's are at least 32 bits.  puff.c uses the short data type,
- * assumed to be 16 bits, for arrays in order to to conserve memory.  The code
- * works whether integers are stored big endian or little endian.
- *
- * In the comments below are "Format notes" that describe the inflate process
- * and document some of the less obvious aspects of the format.  This source
- * code is meant to supplement RFC 1951, which formally describes the deflate
- * format:
- *
- *    http://www.zlib.org/rfc-deflate.html
- */
-
-/*
- * Change history:
- *
- * 1.0  10 Feb 2002     - First version
- * 1.1  17 Feb 2002     - Clarifications of some comments and notes
- *                      - Update puff() dest and source pointers on negative
- *                        errors to facilitate debugging deflators
- *                      - Remove longest from struct huffman -- not needed
- *                      - Simplify offs[] index in construct()
- *                      - Add input size and checking, using longjmp() to
- *                        maintain easy readability
- *                      - Use short data type for large arrays
- *                      - Use pointers instead of long to specify source and
- *                        destination sizes to avoid arbitrary 4 GB limits
- * 1.2  17 Mar 2002     - Add faster version of decode(), doubles speed (!),
- *                        but leave simple version for readabilty
- *                      - Make sure invalid distances detected if pointers
- *                        are 16 bits
- *                      - Fix fixed codes table error
- *                      - Provide a scanning mode for determining size of
- *                        uncompressed data
- * 1.3  20 Mar 2002     - Go back to lengths for puff() parameters [Jean-loup]
- *                      - Add a puff.h file for the interface
- *                      - Add braces in puff() for else do [Jean-loup]
- *                      - Use indexes instead of pointers for readability
- * 1.4  31 Mar 2002     - Simplify construct() code set check
- *                      - Fix some comments
- *                      - Add FIXLCODES #define
- * 1.5   6 Apr 2002     - Minor comment fixes
- * 1.6   7 Aug 2002     - Minor format changes
- * 1.7   3 Mar 2003     - Added test code for distribution
- *                      - Added zlib-like license
- * 1.8   9 Jan 2004     - Added some comments on no distance codes case
- */
-
-#include <setjmp.h>             /* for setjmp(), longjmp(), and jmp_buf */
-#include "puff.h"               /* prototype for puff() */
-
-#define local static            /* for local function definitions */
-#define NIL ((unsigned char *)0)        /* for no output option */
-
-/*
- * Maximums for allocations and loops.  It is not useful to change these --
- * they are fixed by the deflate format.
- */
-#define MAXBITS 15              /* maximum bits in a code */
-#define MAXLCODES 286           /* maximum number of literal/length codes */
-#define MAXDCODES 30            /* maximum number of distance codes */
-#define MAXCODES (MAXLCODES+MAXDCODES)  /* maximum codes lengths to read */
-#define FIXLCODES 288           /* number of fixed literal/length codes */
-
-/* input and output state */
-struct state {
-    /* output state */
-    unsigned char *out;         /* output buffer */
-    unsigned long outlen;       /* available space at out */
-    unsigned long outcnt;       /* bytes written to out so far */
-
-    /* input state */
-    unsigned char *in;          /* input buffer */
-    unsigned long inlen;        /* available input at in */
-    unsigned long incnt;        /* bytes read so far */
-    int bitbuf;                 /* bit buffer */
-    int bitcnt;                 /* number of bits in bit buffer */
-
-    /* input limit error return state for bits() and decode() */
-    jmp_buf env;
-};
-
-/*
- * Return need bits from the input stream.  This always leaves less than
- * eight bits in the buffer.  bits() works properly for need == 0.
- *
- * Format notes:
- *
- * - Bits are stored in bytes from the least significant bit to the most
- *   significant bit.  Therefore bits are dropped from the bottom of the bit
- *   buffer, using shift right, and new bytes are appended to the top of the
- *   bit buffer, using shift left.
- */
-local int bits(struct state *s, int need)
-{
-    long val;           /* bit accumulator (can use up to 20 bits) */
-
-    /* load at least need bits into val */
-    val = s->bitbuf;
-    while (s->bitcnt < need) {
-        if (s->incnt == s->inlen) longjmp(s->env, 1);   /* out of input */
-        val |= (long)(s->in[s->incnt++]) << s->bitcnt;  /* load eight bits */
-        s->bitcnt += 8;
-    }
-
-    /* drop need bits and update buffer, always zero to seven bits left */
-    s->bitbuf = (int)(val >> need);
-    s->bitcnt -= need;
-
-    /* return need bits, zeroing the bits above that */
-    return (int)(val & ((1L << need) - 1));
-}
-
-/*
- * Process a stored block.
- *
- * Format notes:
- *
- * - After the two-bit stored block type (00), the stored block length and
- *   stored bytes are byte-aligned for fast copying.  Therefore any leftover
- *   bits in the byte that has the last bit of the type, as many as seven, are
- *   discarded.  The value of the discarded bits are not defined and should not
- *   be checked against any expectation.
- *
- * - The second inverted copy of the stored block length does not have to be
- *   checked, but it's probably a good idea to do so anyway.
- *
- * - A stored block can have zero length.  This is sometimes used to byte-align
- *   subsets of the compressed data for random access or partial recovery.
- */
-local int stored(struct state *s)
-{
-    unsigned len;       /* length of stored block */
-
-    /* discard leftover bits from current byte (assumes s->bitcnt < 8) */
-    s->bitbuf = 0;
-    s->bitcnt = 0;
-
-    /* get length and check against its one's complement */
-    if (s->incnt + 4 > s->inlen) return 2;      /* not enough input */
-    len = s->in[s->incnt++];
-    len |= s->in[s->incnt++] << 8;
-    if (s->in[s->incnt++] != (~len & 0xff) ||
-        s->in[s->incnt++] != ((~len >> 8) & 0xff))
-        return -2;                              /* didn't match complement! */
-
-    /* copy len bytes from in to out */
-    if (s->incnt + len > s->inlen) return 2;    /* not enough input */
-    if (s->out != NIL) {
-        if (s->outcnt + len > s->outlen)
-            return 1;                           /* not enough output space */
-        while (len--)
-            s->out[s->outcnt++] = s->in[s->incnt++];
-    }
-    else {                                      /* just scanning */
-        s->outcnt += len;
-        s->incnt += len;
-    }
-
-    /* done with a valid stored block */
-    return 0;
-}
-
-/*
- * Huffman code decoding tables.  count[1..MAXBITS] is the number of symbols of
- * each length, which for a canonical code are stepped through in order.
- * symbol[] are the symbol values in canonical order, where the number of
- * entries is the sum of the counts in count[].  The decoding process can be
- * seen in the function decode() below.
- */
-struct huffman {
-    short *count;       /* number of symbols of each length */
-    short *symbol;      /* canonically ordered symbols */
-};
-
-/*
- * Decode a code from the stream s using huffman table h.  Return the symbol or
- * a negative value if there is an error.  If all of the lengths are zero, i.e.
- * an empty code, or if the code is incomplete and an invalid code is received,
- * then -9 is returned after reading MAXBITS bits.
- *
- * Format notes:
- *
- * - The codes as stored in the compressed data are bit-reversed relative to
- *   a simple integer ordering of codes of the same lengths.  Hence below the
- *   bits are pulled from the compressed data one at a time and used to
- *   build the code value reversed from what is in the stream in order to
- *   permit simple integer comparisons for decoding.  A table-based decoding
- *   scheme (as used in zlib) does not need to do this reversal.
- *
- * - The first code for the shortest length is all zeros.  Subsequent codes of
- *   the same length are simply integer increments of the previous code.  When
- *   moving up a length, a zero bit is appended to the code.  For a complete
- *   code, the last code of the longest length will be all ones.
- *
- * - Incomplete codes are handled by this decoder, since they are permitted
- *   in the deflate format.  See the format notes for fixed() and dynamic().
- */
-#ifdef SLOW
-local int decode(struct state *s, struct huffman *h)
-{
-    int len;            /* current number of bits in code */
-    int code;           /* len bits being decoded */
-    int first;          /* first code of length len */
-    int count;          /* number of codes of length len */
-    int index;          /* index of first code of length len in symbol table */
-
-    code = first = index = 0;
-    for (len = 1; len <= MAXBITS; len++) {
-        code |= bits(s, 1);             /* get next bit */
-        count = h->count[len];
-        if (code < first + count)       /* if length len, return symbol */
-            return h->symbol[index + (code - first)];
-        index += count;                 /* else update for next length */
-        first += count;
-        first <<= 1;
-        code <<= 1;
-    }
-    return -9;                          /* ran out of codes */
-}
-
-/*
- * A faster version of decode() for real applications of this code.   It's not
- * as readable, but it makes puff() twice as fast.  And it only makes the code
- * a few percent larger.
- */
-#else /* !SLOW */
-local int decode(struct state *s, struct huffman *h)
-{
-    int len;            /* current number of bits in code */
-    int code;           /* len bits being decoded */
-    int first;          /* first code of length len */
-    int count;          /* number of codes of length len */
-    int index;          /* index of first code of length len in symbol table */
-    int bitbuf;         /* bits from stream */
-    int left;           /* bits left in next or left to process */
-    short *next;        /* next number of codes */
-
-    bitbuf = s->bitbuf;
-    left = s->bitcnt;
-    code = first = index = 0;
-    len = 1;
-    next = h->count + 1;
-    while (1) {
-        while (left--) {
-            code |= bitbuf & 1;
-            bitbuf >>= 1;
-            count = *next++;
-            if (code < first + count) { /* if length len, return symbol */
-                s->bitbuf = bitbuf;
-                s->bitcnt = (s->bitcnt - len) & 7;
-                return h->symbol[index + (code - first)];
-            }
-            index += count;             /* else update for next length */
-            first += count;
-            first <<= 1;
-            code <<= 1;
-            len++;
-        }
-        left = (MAXBITS+1) - len;
-        if (left == 0) break;
-        if (s->incnt == s->inlen) longjmp(s->env, 1);   /* out of input */
-        bitbuf = s->in[s->incnt++];
-        if (left > 8) left = 8;
-    }
-    return -9;                          /* ran out of codes */
-}
-#endif /* SLOW */
-
-/*
- * Given the list of code lengths length[0..n-1] representing a canonical
- * Huffman code for n symbols, construct the tables required to decode those
- * codes.  Those tables are the number of codes of each length, and the symbols
- * sorted by length, retaining their original order within each length.  The
- * return value is zero for a complete code set, negative for an over-
- * subscribed code set, and positive for an incomplete code set.  The tables
- * can be used if the return value is zero or positive, but they cannot be used
- * if the return value is negative.  If the return value is zero, it is not
- * possible for decode() using that table to return an error--any stream of
- * enough bits will resolve to a symbol.  If the return value is positive, then
- * it is possible for decode() using that table to return an error for received
- * codes past the end of the incomplete lengths.
- *
- * Not used by decode(), but used for error checking, h->count[0] is the number
- * of the n symbols not in the code.  So n - h->count[0] is the number of
- * codes.  This is useful for checking for incomplete codes that have more than
- * one symbol, which is an error in a dynamic block.
- *
- * Assumption: for all i in 0..n-1, 0 <= length[i] <= MAXBITS
- * This is assured by the construction of the length arrays in dynamic() and
- * fixed() and is not verified by construct().
- *
- * Format notes:
- *
- * - Permitted and expected examples of incomplete codes are one of the fixed
- *   codes and any code with a single symbol which in deflate is coded as one
- *   bit instead of zero bits.  See the format notes for fixed() and dynamic().
- *
- * - Within a given code length, the symbols are kept in ascending order for
- *   the code bits definition.
- */
-local int construct(struct huffman *h, short *length, int n)
-{
-    int symbol;         /* current symbol when stepping through length[] */
-    int len;            /* current length when stepping through h->count[] */
-    int left;           /* number of possible codes left of current length */
-    short offs[MAXBITS+1];      /* offsets in symbol table for each length */
-
-    /* count number of codes of each length */
-    for (len = 0; len <= MAXBITS; len++)
-        h->count[len] = 0;
-    for (symbol = 0; symbol < n; symbol++)
-        (h->count[length[symbol]])++;   /* assumes lengths are within bounds */
-    if (h->count[0] == n)               /* no codes! */
-        return 0;                       /* complete, but decode() will fail */
-
-    /* check for an over-subscribed or incomplete set of lengths */
-    left = 1;                           /* one possible code of zero length */
-    for (len = 1; len <= MAXBITS; len++) {
-        left <<= 1;                     /* one more bit, double codes left */
-        left -= h->count[len];          /* deduct count from possible codes */
-        if (left < 0) return left;      /* over-subscribed--return negative */
-    }                                   /* left > 0 means incomplete */
-
-    /* generate offsets into symbol table for each length for sorting */
-    offs[1] = 0;
-    for (len = 1; len < MAXBITS; len++)
-        offs[len + 1] = offs[len] + h->count[len];
-
-    /*
-     * put symbols in table sorted by length, by symbol order within each
-     * length
-     */
-    for (symbol = 0; symbol < n; symbol++)
-        if (length[symbol] != 0)
-            h->symbol[offs[length[symbol]]++] = symbol;
-
-    /* return zero for complete set, positive for incomplete set */
-    return left;
-}
-
-/*
- * Decode literal/length and distance codes until an end-of-block code.
- *
- * Format notes:
- *
- * - Compressed data that is after the block type if fixed or after the code
- *   description if dynamic is a combination of literals and length/distance
- *   pairs terminated by and end-of-block code.  Literals are simply Huffman
- *   coded bytes.  A length/distance pair is a coded length followed by a
- *   coded distance to represent a string that occurs earlier in the
- *   uncompressed data that occurs again at the current location.
- *
- * - Literals, lengths, and the end-of-block code are combined into a single
- *   code of up to 286 symbols.  They are 256 literals (0..255), 29 length
- *   symbols (257..285), and the end-of-block symbol (256).
- *
- * - There are 256 possible lengths (3..258), and so 29 symbols are not enough
- *   to represent all of those.  Lengths 3..10 and 258 are in fact represented
- *   by just a length symbol.  Lengths 11..257 are represented as a symbol and
- *   some number of extra bits that are added as an integer to the base length
- *   of the length symbol.  The number of extra bits is determined by the base
- *   length symbol.  These are in the static arrays below, lens[] for the base
- *   lengths and lext[] for the corresponding number of extra bits.
- *
- * - The reason that 258 gets its own symbol is that the longest length is used
- *   often in highly redundant files.  Note that 258 can also be coded as the
- *   base value 227 plus the maximum extra value of 31.  While a good deflate
- *   should never do this, it is not an error, and should be decoded properly.
- *
- * - If a length is decoded, including its extra bits if any, then it is
- *   followed a distance code.  There are up to 30 distance symbols.  Again
- *   there are many more possible distances (1..32768), so extra bits are added
- *   to a base value represented by the symbol.  The distances 1..4 get their
- *   own symbol, but the rest require extra bits.  The base distances and
- *   corresponding number of extra bits are below in the static arrays dist[]
- *   and dext[].
- *
- * - Literal bytes are simply written to the output.  A length/distance pair is
- *   an instruction to copy previously uncompressed bytes to the output.  The
- *   copy is from distance bytes back in the output stream, copying for length
- *   bytes.
- *
- * - Distances pointing before the beginning of the output data are not
- *   permitted.
- *
- * - Overlapped copies, where the length is greater than the distance, are
- *   allowed and common.  For example, a distance of one and a length of 258
- *   simply copies the last byte 258 times.  A distance of four and a length of
- *   twelve copies the last four bytes three times.  A simple forward copy
- *   ignoring whether the length is greater than the distance or not implements
- *   this correctly.  You should not use memcpy() since its behavior is not
- *   defined for overlapped arrays.  You should not use memmove() or bcopy()
- *   since though their behavior -is- defined for overlapping arrays, it is
- *   defined to do the wrong thing in this case.
- */
-local int codes(struct state *s,
-                struct huffman *lencode,
-                struct huffman *distcode)
-{
-    int symbol;         /* decoded symbol */
-    int len;            /* length for copy */
-    unsigned dist;      /* distance for copy */
-    static const short lens[29] = { /* Size base for length codes 257..285 */
-        3, 4, 5, 6, 7, 8, 9, 10, 11, 13, 15, 17, 19, 23, 27, 31,
-        35, 43, 51, 59, 67, 83, 99, 115, 131, 163, 195, 227, 258};
-    static const short lext[29] = { /* Extra bits for length codes 257..285 */
-        0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2,
-        3, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5, 0};
-    static const short dists[30] = { /* Offset base for distance codes 0..29 */
-        1, 2, 3, 4, 5, 7, 9, 13, 17, 25, 33, 49, 65, 97, 129, 193,
-        257, 385, 513, 769, 1025, 1537, 2049, 3073, 4097, 6145,
-        8193, 12289, 16385, 24577};
-    static const short dext[30] = { /* Extra bits for distance codes 0..29 */
-        0, 0, 0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6,
-        7, 7, 8, 8, 9, 9, 10, 10, 11, 11,
-        12, 12, 13, 13};
-
-    /* decode literals and length/distance pairs */
-    do {
-        symbol = decode(s, lencode);
-        if (symbol < 0) return symbol;  /* invalid symbol */
-        if (symbol < 256) {             /* literal: symbol is the byte */
-            /* write out the literal */
-            if (s->out != NIL) {
-                if (s->outcnt == s->outlen) return 1;
-                s->out[s->outcnt] = symbol;
-            }
-            s->outcnt++;
-        }
-        else if (symbol > 256) {        /* length */
-            /* get and compute length */
-            symbol -= 257;
-            if (symbol >= 29) return -9;        /* invalid fixed code */
-            len = lens[symbol] + bits(s, lext[symbol]);
-
-            /* get and check distance */
-            symbol = decode(s, distcode);
-            if (symbol < 0) return symbol;      /* invalid symbol */
-            dist = dists[symbol] + bits(s, dext[symbol]);
-            if (dist > s->outcnt)
-                return -10;     /* distance too far back */
-
-            /* copy length bytes from distance bytes back */
-            if (s->out != NIL) {
-                if (s->outcnt + len > s->outlen) return 1;
-                while (len--) {
-                    s->out[s->outcnt] = s->out[s->outcnt - dist];
-                    s->outcnt++;
-                }
-            }
-            else
-                s->outcnt += len;
-        }
-    } while (symbol != 256);            /* end of block symbol */
-
-    /* done with a valid fixed or dynamic block */
-    return 0;
-}
-
-/*
- * Process a fixed codes block.
- *
- * Format notes:
- *
- * - This block type can be useful for compressing small amounts of data for
- *   which the size of the code descriptions in a dynamic block exceeds the
- *   benefit of custom codes for that block.  For fixed codes, no bits are
- *   spent on code descriptions.  Instead the code lengths for literal/length
- *   codes and distance codes are fixed.  The specific lengths for each symbol
- *   can be seen in the "for" loops below.
- *
- * - The literal/length code is complete, but has two symbols that are invalid
- *   and should result in an error if received.  This cannot be implemented
- *   simply as an incomplete code since those two symbols are in the "middle"
- *   of the code.  They are eight bits long and the longest literal/length\
- *   code is nine bits.  Therefore the code must be constructed with those
- *   symbols, and the invalid symbols must be detected after decoding.
- *
- * - The fixed distance codes also have two invalid symbols that should result
- *   in an error if received.  Since all of the distance codes are the same
- *   length, this can be implemented as an incomplete code.  Then the invalid
- *   codes are detected while decoding.
- */
-local int fixed(struct state *s)
-{
-    static int virgin = 1;
-    static short lencnt[MAXBITS+1], lensym[FIXLCODES];
-    static short distcnt[MAXBITS+1], distsym[MAXDCODES];
-    static struct huffman lencode = {lencnt, lensym};
-    static struct huffman distcode = {distcnt, distsym};
-
-    /* build fixed huffman tables if first call (may not be thread safe) */
-    if (virgin) {
-        int symbol;
-        short lengths[FIXLCODES];
-
-        /* literal/length table */
-        for (symbol = 0; symbol < 144; symbol++)
-            lengths[symbol] = 8;
-        for (; symbol < 256; symbol++)
-            lengths[symbol] = 9;
-        for (; symbol < 280; symbol++)
-            lengths[symbol] = 7;
-        for (; symbol < FIXLCODES; symbol++)
-            lengths[symbol] = 8;
-        construct(&lencode, lengths, FIXLCODES);
-
-        /* distance table */
-        for (symbol = 0; symbol < MAXDCODES; symbol++)
-            lengths[symbol] = 5;
-        construct(&distcode, lengths, MAXDCODES);
-
-        /* do this just once */
-        virgin = 0;
-    }
-
-    /* decode data until end-of-block code */
-    return codes(s, &lencode, &distcode);
-}
-
-/*
- * Process a dynamic codes block.
- *
- * Format notes:
- *
- * - A dynamic block starts with a description of the literal/length and
- *   distance codes for that block.  New dynamic blocks allow the compressor to
- *   rapidly adapt to changing data with new codes optimized for that data.
- *
- * - The codes used by the deflate format are "canonical", which means that
- *   the actual bits of the codes are generated in an unambiguous way simply
- *   from the number of bits in each code.  Therefore the code descriptions
- *   are simply a list of code lengths for each symbol.
- *
- * - The code lengths are stored in order for the symbols, so lengths are
- *   provided for each of the literal/length symbols, and for each of the
- *   distance symbols.
- *
- * - If a symbol is not used in the block, this is represented by a zero as
- *   as the code length.  This does not mean a zero-length code, but rather
- *   that no code should be created for this symbol.  There is no way in the
- *   deflate format to represent a zero-length code.
- *
- * - The maximum number of bits in a code is 15, so the possible lengths for
- *   any code are 1..15.
- *
- * - The fact that a length of zero is not permitted for a code has an
- *   interesting consequence.  Normally if only one symbol is used for a given
- *   code, then in fact that code could be represented with zero bits.  However
- *   in deflate, that code has to be at least one bit.  So for example, if
- *   only a single distance base symbol appears in a block, then it will be
- *   represented by a single code of length one, in particular one 0 bit.  This
- *   is an incomplete code, since if a 1 bit is received, it has no meaning,
- *   and should result in an error.  So incomplete distance codes of one symbol
- *   should be permitted, and the receipt of invalid codes should be handled.
- *
- * - It is also possible to have a single literal/length code, but that code
- *   must be the end-of-block code, since every dynamic block has one.  This
- *   is not the most efficient way to create an empty block (an empty fixed
- *   block is fewer bits), but it is allowed by the format.  So incomplete
- *   literal/length codes of one symbol should also be permitted.
- *
- * - If there are only literal codes and no lengths, then there are no distance
- *   codes.  This is represented by one distance code with zero bits.
- *
- * - The list of up to 286 length/literal lengths and up to 30 distance lengths
- *   are themselves compressed using Huffman codes and run-length encoding.  In
- *   the list of code lengths, a 0 symbol means no code, a 1..15 symbol means
- *   that length, and the symbols 16, 17, and 18 are run-length instructions.
- *   Each of 16, 17, and 18 are follwed by extra bits to define the length of
- *   the run.  16 copies the last length 3 to 6 times.  17 represents 3 to 10
- *   zero lengths, and 18 represents 11 to 138 zero lengths.  Unused symbols
- *   are common, hence the special coding for zero lengths.
- *
- * - The symbols for 0..18 are Huffman coded, and so that code must be
- *   described first.  This is simply a sequence of up to 19 three-bit values
- *   representing no code (0) or the code length for that symbol (1..7).
- *
- * - A dynamic block starts with three fixed-size counts from which is computed
- *   the number of literal/length code lengths, the number of distance code
- *   lengths, and the number of code length code lengths (ok, you come up with
- *   a better name!) in the code descriptions.  For the literal/length and
- *   distance codes, lengths after those provided are considered zero, i.e. no
- *   code.  The code length code lengths are received in a permuted order (see
- *   the order[] array below) to make a short code length code length list more
- *   likely.  As it turns out, very short and very long codes are less likely
- *   to be seen in a dynamic code description, hence what may appear initially
- *   to be a peculiar ordering.
- *
- * - Given the number of literal/length code lengths (nlen) and distance code
- *   lengths (ndist), then they are treated as one long list of nlen + ndist
- *   code lengths.  Therefore run-length coding can and often does cross the
- *   boundary between the two sets of lengths.
- *
- * - So to summarize, the code description at the start of a dynamic block is
- *   three counts for the number of code lengths for the literal/length codes,
- *   the distance codes, and the code length codes.  This is followed by the
- *   code length code lengths, three bits each.  This is used to construct the
- *   code length code which is used to read the remainder of the lengths.  Then
- *   the literal/length code lengths and distance lengths are read as a single
- *   set of lengths using the code length codes.  Codes are constructed from
- *   the resulting two sets of lengths, and then finally you can start
- *   decoding actual compressed data in the block.
- *
- * - For reference, a "typical" size for the code description in a dynamic
- *   block is around 80 bytes.
- */
-local int dynamic(struct state *s)
-{
-    int nlen, ndist, ncode;             /* number of lengths in descriptor */
-    int index;                          /* index of lengths[] */
-    int err;                            /* construct() return value */
-    short lengths[MAXCODES];            /* descriptor code lengths */
-    short lencnt[MAXBITS+1], lensym[MAXLCODES];         /* lencode memory */
-    short distcnt[MAXBITS+1], distsym[MAXDCODES];       /* distcode memory */
-    struct huffman lencode = {lencnt, lensym};          /* length code */
-    struct huffman distcode = {distcnt, distsym};       /* distance code */
-    static const short order[19] =      /* permutation of code length codes */
-        {16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15};
-
-    /* get number of lengths in each table, check lengths */
-    nlen = bits(s, 5) + 257;
-    ndist = bits(s, 5) + 1;
-    ncode = bits(s, 4) + 4;
-    if (nlen > MAXLCODES || ndist > MAXDCODES)
-        return -3;                      /* bad counts */
-
-    /* read code length code lengths (really), missing lengths are zero */
-    for (index = 0; index < ncode; index++)
-        lengths[order[index]] = bits(s, 3);
-    for (; index < 19; index++)
-        lengths[order[index]] = 0;
-
-    /* build huffman table for code lengths codes (use lencode temporarily) */
-    err = construct(&lencode, lengths, 19);
-    if (err != 0) return -4;            /* require complete code set here */
-
-    /* read length/literal and distance code length tables */
-    index = 0;
-    while (index < nlen + ndist) {
-        int symbol;             /* decoded value */
-        int len;                /* last length to repeat */
-
-        symbol = decode(s, &lencode);
-        if (symbol < 16)                /* length in 0..15 */
-            lengths[index++] = symbol;
-        else {                          /* repeat instruction */
-            len = 0;                    /* assume repeating zeros */
-            if (symbol == 16) {         /* repeat last length 3..6 times */
-                if (index == 0) return -5;      /* no last length! */
-                len = lengths[index - 1];       /* last length */
-                symbol = 3 + bits(s, 2);
-            }
-            else if (symbol == 17)      /* repeat zero 3..10 times */
-                symbol = 3 + bits(s, 3);
-            else                        /* == 18, repeat zero 11..138 times */
-                symbol = 11 + bits(s, 7);
-            if (index + symbol > nlen + ndist)
-                return -6;              /* too many lengths! */
-            while (symbol--)            /* repeat last or zero symbol times */
-                lengths[index++] = len;
-        }
-    }
-
-    /* build huffman table for literal/length codes */
-    err = construct(&lencode, lengths, nlen);
-    if (err < 0 || (err > 0 && nlen - lencode.count[0] != 1))
-        return -7;      /* only allow incomplete codes if just one code */
-
-    /* build huffman table for distance codes */
-    err = construct(&distcode, lengths + nlen, ndist);
-    if (err < 0 || (err > 0 && ndist - distcode.count[0] != 1))
-        return -8;      /* only allow incomplete codes if just one code */
-
-    /* decode data until end-of-block code */
-    return codes(s, &lencode, &distcode);
-}
-
-/*
- * Inflate source to dest.  On return, destlen and sourcelen are updated to the
- * size of the uncompressed data and the size of the deflate data respectively.
- * On success, the return value of puff() is zero.  If there is an error in the
- * source data, i.e. it is not in the deflate format, then a negative value is
- * returned.  If there is not enough input available or there is not enough
- * output space, then a positive error is returned.  In that case, destlen and
- * sourcelen are not updated to facilitate retrying from the beginning with the
- * provision of more input data or more output space.  In the case of invalid
- * inflate data (a negative error), the dest and source pointers are updated to
- * facilitate the debugging of deflators.
- *
- * puff() also has a mode to determine the size of the uncompressed output with
- * no output written.  For this dest must be (unsigned char *)0.  In this case,
- * the input value of *destlen is ignored, and on return *destlen is set to the
- * size of the uncompressed output.
- *
- * The return codes are:
- *
- *   2:  available inflate data did not terminate
- *   1:  output space exhausted before completing inflate
- *   0:  successful inflate
- *  -1:  invalid block type (type == 3)
- *  -2:  stored block length did not match one's complement
- *  -3:  dynamic block code description: too many length or distance codes
- *  -4:  dynamic block code description: code lengths codes incomplete
- *  -5:  dynamic block code description: repeat lengths with no first length
- *  -6:  dynamic block code description: repeat more than specified lengths
- *  -7:  dynamic block code description: invalid literal/length code lengths
- *  -8:  dynamic block code description: invalid distance code lengths
- *  -9:  invalid literal/length or distance code in fixed or dynamic block
- * -10:  distance is too far back in fixed or dynamic block
- *
- * Format notes:
- *
- * - Three bits are read for each block to determine the kind of block and
- *   whether or not it is the last block.  Then the block is decoded and the
- *   process repeated if it was not the last block.
- *
- * - The leftover bits in the last byte of the deflate data after the last
- *   block (if it was a fixed or dynamic block) are undefined and have no
- *   expected values to check.
- */
-int puff(unsigned char *dest,           /* pointer to destination pointer */
-         unsigned long *destlen,        /* amount of output space */
-         unsigned char *source,         /* pointer to source data pointer */
-         unsigned long *sourcelen)      /* amount of input available */
-{
-    struct state s;             /* input/output state */
-    int last, type;             /* block information */
-    int err;                    /* return value */
-
-    /* initialize output state */
-    s.out = dest;
-    s.outlen = *destlen;                /* ignored if dest is NIL */
-    s.outcnt = 0;
-
-    /* initialize input state */
-    s.in = source;
-    s.inlen = *sourcelen;
-    s.incnt = 0;
-    s.bitbuf = 0;
-    s.bitcnt = 0;
-
-    /* return if bits() or decode() tries to read past available input */
-    if (setjmp(s.env) != 0)             /* if came back here via longjmp() */
-        err = 2;                        /* then skip do-loop, return error */
-    else {
-        /* process blocks until last block or error */
-        do {
-            last = bits(&s, 1);         /* one if last block */
-            type = bits(&s, 2);         /* block type 0..3 */
-            err = type == 0 ? stored(&s) :
-                  (type == 1 ? fixed(&s) :
-                   (type == 2 ? dynamic(&s) :
-                    -1));               /* type == 3, invalid */
-            if (err != 0) break;        /* return with error */
-        } while (!last);
-    }
-
-    /* update the lengths and return */
-    if (err <= 0) {
-        *destlen = s.outcnt;
-        *sourcelen = s.incnt;
-    }
-    return err;
-}
-
-#ifdef TEST
-/* Example of how to use puff() */
-#include <stdio.h>
-#include <stdlib.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-
-local unsigned char *yank(char *name, unsigned long *len)
-{
-    unsigned long size;
-    unsigned char *buf;
-    FILE *in;
-    struct stat s;
-
-    *len = 0;
-    if (stat(name, &s)) return NULL;
-    if ((s.st_mode & S_IFMT) != S_IFREG) return NULL;
-    size = (unsigned long)(s.st_size);
-    if (size == 0 || (off_t)size != s.st_size) return NULL;
-    in = fopen(name, "r");
-    if (in == NULL) return NULL;
-    buf = malloc(size);
-    if (buf != NULL && fread(buf, 1, size, in) != size) {
-        free(buf);
-        buf = NULL;
-    }
-    fclose(in);
-    *len = size;
-    return buf;
-}
-
-int main(int argc, char **argv)
-{
-    int ret;
-    unsigned char *source;
-    unsigned long len, sourcelen, destlen;
-
-    if (argc < 2) return 2;
-    source = yank(argv[1], &len);
-    if (source == NULL) return 2;
-    sourcelen = len;
-    ret = puff(NIL, &destlen, source, &sourcelen);
-    if (ret)
-        printf("puff() failed with return code %d\n", ret);
-    else {
-        printf("puff() succeeded uncompressing %lu bytes\n", destlen);
-        if (sourcelen < len) printf("%lu compressed bytes unused\n",
-                                    len - sourcelen);
-    }
-    free(source);
-    return ret;
-}
-#endif
Index: trunk/minix/lib/zlib-1.2.3/contrib/puff/puff.h
===================================================================
--- trunk/minix/lib/zlib-1.2.3/contrib/puff/puff.h	(revision 9)
+++ 	(revision )
@@ -1,31 +1,0 @@
-/* puff.h
-  Copyright (C) 2002, 2003 Mark Adler, all rights reserved
-  version 1.7, 3 Mar 2002
-
-  This software is provided 'as-is', without any express or implied
-  warranty.  In no event will the author be held liable for any damages
-  arising from the use of this software.
-
-  Permission is granted to anyone to use this software for any purpose,
-  including commercial applications, and to alter it and redistribute it
-  freely, subject to the following restrictions:
-
-  1. The origin of this software must not be misrepresented; you must not
-     claim that you wrote the original software. If you use this software
-     in a product, an acknowledgment in the product documentation would be
-     appreciated but is not required.
-  2. Altered source versions must be plainly marked as such, and must not be
-     misrepresented as being the original software.
-  3. This notice may not be removed or altered from any source distribution.
-
-  Mark Adler    madler@alumni.caltech.edu
- */
-
-
-/*
- * See puff.c for purpose and usage.
- */
-int puff(unsigned char *dest,           /* pointer to destination pointer */
-         unsigned long *destlen,        /* amount of output space */
-         unsigned char *source,         /* pointer to source data pointer */
-         unsigned long *sourcelen);     /* amount of input available */
Index: trunk/minix/lib/zlib-1.2.3/contrib/testzlib/testzlib.c
===================================================================
--- trunk/minix/lib/zlib-1.2.3/contrib/testzlib/testzlib.c	(revision 9)
+++ 	(revision )
@@ -1,275 +1,0 @@
-#include <stdio.h>
-#include <stdlib.h>
-#include <windows.h>
-
-#include "zlib.h"
-
-
-void MyDoMinus64(LARGE_INTEGER *R,LARGE_INTEGER A,LARGE_INTEGER B)
-{
-    R->HighPart = A.HighPart - B.HighPart;
-    if (A.LowPart >= B.LowPart)
-        R->LowPart = A.LowPart - B.LowPart;
-    else
-    {
-        R->LowPart = A.LowPart - B.LowPart;
-        R->HighPart --;
-    }
-}
-
-#ifdef _M_X64
-// see http://msdn2.microsoft.com/library/twchhe95(en-us,vs.80).aspx for __rdtsc
-unsigned __int64 __rdtsc(void);
-void BeginCountRdtsc(LARGE_INTEGER * pbeginTime64)
-{
- //   printf("rdtsc = %I64x\n",__rdtsc());
-   pbeginTime64->QuadPart=__rdtsc();
-}
-
-LARGE_INTEGER GetResRdtsc(LARGE_INTEGER beginTime64,BOOL fComputeTimeQueryPerf)
-{
-    LARGE_INTEGER LIres;
-    unsigned _int64 res=__rdtsc()-((unsigned _int64)(beginTime64.QuadPart));
-    LIres.QuadPart=res;
-   // printf("rdtsc = %I64x\n",__rdtsc());
-    return LIres;
-}
-#else
-#ifdef _M_IX86
-void myGetRDTSC32(LARGE_INTEGER * pbeginTime64)
-{
-    DWORD dwEdx,dwEax;
-    _asm
-    {
-        rdtsc
-        mov dwEax,eax
-        mov dwEdx,edx
-    }
-    pbeginTime64->LowPart=dwEax;
-    pbeginTime64->HighPart=dwEdx;
-}
-
-void BeginCountRdtsc(LARGE_INTEGER * pbeginTime64)
-{
-    myGetRDTSC32(pbeginTime64);
-}
-
-LARGE_INTEGER GetResRdtsc(LARGE_INTEGER beginTime64,BOOL fComputeTimeQueryPerf)
-{
-    LARGE_INTEGER LIres,endTime64;
-    myGetRDTSC32(&endTime64);
-
-    LIres.LowPart=LIres.HighPart=0;
-    MyDoMinus64(&LIres,endTime64,beginTime64);
-    return LIres;
-}
-#else
-void myGetRDTSC32(LARGE_INTEGER * pbeginTime64)
-{
-}
-
-void BeginCountRdtsc(LARGE_INTEGER * pbeginTime64)
-{
-}
-
-LARGE_INTEGER GetResRdtsc(LARGE_INTEGER beginTime64,BOOL fComputeTimeQueryPerf)
-{
-    LARGE_INTEGER lr;
-    lr.QuadPart=0;
-    return lr;
-}
-#endif
-#endif
-
-void BeginCountPerfCounter(LARGE_INTEGER * pbeginTime64,BOOL fComputeTimeQueryPerf)
-{
-    if ((!fComputeTimeQueryPerf) || (!QueryPerformanceCounter(pbeginTime64)))
-    {
-        pbeginTime64->LowPart = GetTickCount();
-        pbeginTime64->HighPart = 0;
-    }
-}
-
-DWORD GetMsecSincePerfCounter(LARGE_INTEGER beginTime64,BOOL fComputeTimeQueryPerf)
-{
-    LARGE_INTEGER endTime64,ticksPerSecond,ticks;
-    DWORDLONG ticksShifted,tickSecShifted;
-    DWORD dwLog=16+0;
-    DWORD dwRet;
-    if ((!fComputeTimeQueryPerf) || (!QueryPerformanceCounter(&endTime64)))
-        dwRet = (GetTickCount() - beginTime64.LowPart)*1;
-    else
-    {
-        MyDoMinus64(&ticks,endTime64,beginTime64);
-        QueryPerformanceFrequency(&ticksPerSecond);
-
-    
-        {
-            ticksShifted = Int64ShrlMod32(*(DWORDLONG*)&ticks,dwLog);
-            tickSecShifted = Int64ShrlMod32(*(DWORDLONG*)&ticksPerSecond,dwLog);
-        
-        } 
-
-        dwRet = (DWORD)((((DWORD)ticksShifted)*1000)/(DWORD)(tickSecShifted));
-        dwRet *=1;
-    }
-    return dwRet;
-}
-
-int ReadFileMemory(const char* filename,long* plFileSize,void** pFilePtr)
-{
-    FILE* stream;
-    void* ptr;
-    int retVal=1;
-    stream=fopen(filename, "rb");
-    if (stream==NULL)
-        return 0;
-
-    fseek(stream,0,SEEK_END);
-
-    *plFileSize=ftell(stream);
-    fseek(stream,0,SEEK_SET);
-    ptr=malloc((*plFileSize)+1);
-    if (ptr==NULL)
-        retVal=0;
-    else
-    {
-        if (fread(ptr, 1, *plFileSize,stream) != (*plFileSize))
-            retVal=0;
-    }
-    fclose(stream);
-    *pFilePtr=ptr;
-    return retVal;
-}
-
-int main(int argc, char *argv[])
-{
-    int BlockSizeCompress=0x8000;
-    int BlockSizeUncompress=0x8000;
-    int cprLevel=Z_DEFAULT_COMPRESSION ;
-    long lFileSize;
-    unsigned char* FilePtr;
-    long lBufferSizeCpr;
-    long lBufferSizeUncpr;
-    long lCompressedSize=0;
-    unsigned char* CprPtr;
-    unsigned char* UncprPtr;
-    long lSizeCpr,lSizeUncpr;
-    DWORD dwGetTick,dwMsecQP;
-    LARGE_INTEGER li_qp,li_rdtsc,dwResRdtsc;
-
-    if (argc<=1)
-    {
-        printf("run TestZlib <File> [BlockSizeCompress] [BlockSizeUncompress] [compres. level]\n");
-        return 0;
-    }
-
-    if (ReadFileMemory(argv[1],&lFileSize,&FilePtr)==0)
-    {
-        printf("error reading %s\n",argv[1]);
-        return 1;
-    }
-    else printf("file %s read, %u bytes\n",argv[1],lFileSize);
-
-    if (argc>=3)
-        BlockSizeCompress=atol(argv[2]);
-
-    if (argc>=4)
-        BlockSizeUncompress=atol(argv[3]);
-
-    if (argc>=5)
-        cprLevel=(int)atol(argv[4]);
-
-    lBufferSizeCpr = lFileSize + (lFileSize/0x10) + 0x200;
-    lBufferSizeUncpr = lBufferSizeCpr;
-
-    CprPtr=(unsigned char*)malloc(lBufferSizeCpr + BlockSizeCompress);
-
-    BeginCountPerfCounter(&li_qp,TRUE);
-    dwGetTick=GetTickCount();
-    BeginCountRdtsc(&li_rdtsc);
-    {
-        z_stream zcpr;
-        int ret=Z_OK;
-        long lOrigToDo = lFileSize;
-        long lOrigDone = 0;
-        int step=0;
-        memset(&zcpr,0,sizeof(z_stream));
-        deflateInit(&zcpr,cprLevel);
-
-        zcpr.next_in = FilePtr;
-        zcpr.next_out = CprPtr;
-
-
-        do
-        {
-            long all_read_before = zcpr.total_in;
-            zcpr.avail_in = min(lOrigToDo,BlockSizeCompress);
-            zcpr.avail_out = BlockSizeCompress;
-            ret=deflate(&zcpr,(zcpr.avail_in==lOrigToDo) ? Z_FINISH : Z_SYNC_FLUSH);
-            lOrigDone += (zcpr.total_in-all_read_before);
-            lOrigToDo -= (zcpr.total_in-all_read_before);
-            step++;
-        } while (ret==Z_OK);
-
-        lSizeCpr=zcpr.total_out;
-        deflateEnd(&zcpr);
-        dwGetTick=GetTickCount()-dwGetTick;
-        dwMsecQP=GetMsecSincePerfCounter(li_qp,TRUE);
-        dwResRdtsc=GetResRdtsc(li_rdtsc,TRUE);
-        printf("total compress size = %u, in %u step\n",lSizeCpr,step);
-        printf("time = %u msec = %f sec\n",dwGetTick,dwGetTick/(double)1000.);
-        printf("defcpr time QP = %u msec = %f sec\n",dwMsecQP,dwMsecQP/(double)1000.);
-        printf("defcpr result rdtsc = %I64x\n\n",dwResRdtsc.QuadPart);
-    }
-
-    CprPtr=(unsigned char*)realloc(CprPtr,lSizeCpr);
-    UncprPtr=(unsigned char*)malloc(lBufferSizeUncpr + BlockSizeUncompress);
-
-    BeginCountPerfCounter(&li_qp,TRUE);
-    dwGetTick=GetTickCount();
-    BeginCountRdtsc(&li_rdtsc);
-    {
-        z_stream zcpr;
-        int ret=Z_OK;
-        long lOrigToDo = lSizeCpr;
-        long lOrigDone = 0;
-        int step=0;
-        memset(&zcpr,0,sizeof(z_stream));
-        inflateInit(&zcpr);
-
-        zcpr.next_in = CprPtr;
-        zcpr.next_out = UncprPtr;
-
-
-        do
-        {
-            long all_read_before = zcpr.total_in;
-            zcpr.avail_in = min(lOrigToDo,BlockSizeUncompress);
-            zcpr.avail_out = BlockSizeUncompress;
-            ret=inflate(&zcpr,Z_SYNC_FLUSH);
-            lOrigDone += (zcpr.total_in-all_read_before);
-            lOrigToDo -= (zcpr.total_in-all_read_before);
-            step++;
-        } while (ret==Z_OK);
-
-        lSizeUncpr=zcpr.total_out;
-        inflateEnd(&zcpr);
-        dwGetTick=GetTickCount()-dwGetTick;
-        dwMsecQP=GetMsecSincePerfCounter(li_qp,TRUE);
-        dwResRdtsc=GetResRdtsc(li_rdtsc,TRUE);
-        printf("total uncompress size = %u, in %u step\n",lSizeUncpr,step);
-        printf("time = %u msec = %f sec\n",dwGetTick,dwGetTick/(double)1000.);
-        printf("uncpr  time QP = %u msec = %f sec\n",dwMsecQP,dwMsecQP/(double)1000.);
-        printf("uncpr  result rdtsc = %I64x\n\n",dwResRdtsc.QuadPart);
-    }
-
-    if (lSizeUncpr==lFileSize)
-    {
-        if (memcmp(FilePtr,UncprPtr,lFileSize)==0)
-            printf("compare ok\n");
-
-    }
-
-    return 0;
-}
Index: trunk/minix/lib/zlib-1.2.3/contrib/testzlib/testzlib.txt
===================================================================
--- trunk/minix/lib/zlib-1.2.3/contrib/testzlib/testzlib.txt	(revision 9)
+++ 	(revision )
@@ -1,10 +1,0 @@
-To build testzLib with Visual Studio 2005:
-
-copy to a directory file from :
-- root of zLib tree
-- contrib/testzlib
-- contrib/masmx86
-- contrib/masmx64
-- contrib/vstudio/vc7
-
-and open testzlib8.sln
Index: trunk/minix/lib/zlib-1.2.3/contrib/untgz/Makefile
===================================================================
--- trunk/minix/lib/zlib-1.2.3/contrib/untgz/Makefile	(revision 9)
+++ 	(revision )
@@ -1,14 +1,0 @@
-CC=cc
-CFLAGS=-g
-
-untgz: untgz.o ../../libz.a
-	$(CC) $(CFLAGS) -o untgz untgz.o -L../.. -lz
-
-untgz.o: untgz.c ../../zlib.h
-	$(CC) $(CFLAGS) -c -I../.. untgz.c
-
-../../libz.a:
-	cd ../..; ./configure; make
-
-clean:
-	rm -f untgz untgz.o *~
Index: trunk/minix/lib/zlib-1.2.3/contrib/untgz/Makefile.msc
===================================================================
--- trunk/minix/lib/zlib-1.2.3/contrib/untgz/Makefile.msc	(revision 9)
+++ 	(revision )
@@ -1,17 +1,0 @@
-CC=cl
-CFLAGS=-MD
-
-untgz.exe: untgz.obj ..\..\zlib.lib
-	$(CC) $(CFLAGS) untgz.obj ..\..\zlib.lib
-
-untgz.obj: untgz.c ..\..\zlib.h
-	$(CC) $(CFLAGS) -c -I..\.. untgz.c
-
-..\..\zlib.lib:
-	cd ..\..
-	$(MAKE) -f win32\makefile.msc
-	cd contrib\untgz
-
-clean:
-	-del untgz.obj
-	-del untgz.exe
Index: trunk/minix/lib/zlib-1.2.3/contrib/untgz/untgz.c
===================================================================
--- trunk/minix/lib/zlib-1.2.3/contrib/untgz/untgz.c	(revision 9)
+++ 	(revision )
@@ -1,674 +1,0 @@
-/*
- * untgz.c -- Display contents and extract files from a gzip'd TAR file
- *
- * written by Pedro A. Aranda Gutierrez <paag@tid.es>
- * adaptation to Unix by Jean-loup Gailly <jloup@gzip.org>
- * various fixes by Cosmin Truta <cosmint@cs.ubbcluj.ro>
- */
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <time.h>
-#include <errno.h>
-
-#include "zlib.h"
-
-#ifdef unix
-#  include <unistd.h>
-#else
-#  include <direct.h>
-#  include <io.h>
-#endif
-
-#ifdef WIN32
-#include <windows.h>
-#  ifndef F_OK
-#    define F_OK  0
-#  endif
-#  define mkdir(dirname,mode)   _mkdir(dirname)
-#  ifdef _MSC_VER
-#    define access(path,mode)   _access(path,mode)
-#    define chmod(path,mode)    _chmod(path,mode)
-#    define strdup(str)         _strdup(str)
-#  endif
-#else
-#  include <utime.h>
-#endif
-
-
-/* values used in typeflag field */
-
-#define REGTYPE  '0'            /* regular file */
-#define AREGTYPE '\0'           /* regular file */
-#define LNKTYPE  '1'            /* link */
-#define SYMTYPE  '2'            /* reserved */
-#define CHRTYPE  '3'            /* character special */
-#define BLKTYPE  '4'            /* block special */
-#define DIRTYPE  '5'            /* directory */
-#define FIFOTYPE '6'            /* FIFO special */
-#define CONTTYPE '7'            /* reserved */
-
-/* GNU tar extensions */
-
-#define GNUTYPE_DUMPDIR  'D'    /* file names from dumped directory */
-#define GNUTYPE_LONGLINK 'K'    /* long link name */
-#define GNUTYPE_LONGNAME 'L'    /* long file name */
-#define GNUTYPE_MULTIVOL 'M'    /* continuation of file from another volume */
-#define GNUTYPE_NAMES    'N'    /* file name that does not fit into main hdr */
-#define GNUTYPE_SPARSE   'S'    /* sparse file */
-#define GNUTYPE_VOLHDR   'V'    /* tape/volume header */
-
-
-/* tar header */
-
-#define BLOCKSIZE     512
-#define SHORTNAMESIZE 100
-
-struct tar_header
-{                               /* byte offset */
-  char name[100];               /*   0 */
-  char mode[8];                 /* 100 */
-  char uid[8];                  /* 108 */
-  char gid[8];                  /* 116 */
-  char size[12];                /* 124 */
-  char mtime[12];               /* 136 */
-  char chksum[8];               /* 148 */
-  char typeflag;                /* 156 */
-  char linkname[100];           /* 157 */
-  char magic[6];                /* 257 */
-  char version[2];              /* 263 */
-  char uname[32];               /* 265 */
-  char gname[32];               /* 297 */
-  char devmajor[8];             /* 329 */
-  char devminor[8];             /* 337 */
-  char prefix[155];             /* 345 */
-                                /* 500 */
-};
-
-union tar_buffer
-{
-  char               buffer[BLOCKSIZE];
-  struct tar_header  header;
-};
-
-struct attr_item
-{
-  struct attr_item  *next;
-  char              *fname;
-  int                mode;
-  time_t             time;
-};
-
-enum { TGZ_EXTRACT, TGZ_LIST, TGZ_INVALID };
-
-char *TGZfname          OF((const char *));
-void TGZnotfound        OF((const char *));
-
-int getoct              OF((char *, int));
-char *strtime           OF((time_t *));
-int setfiletime         OF((char *, time_t));
-void push_attr          OF((struct attr_item **, char *, int, time_t));
-void restore_attr       OF((struct attr_item **));
-
-int ExprMatch           OF((char *, char *));
-
-int makedir             OF((char *));
-int matchname           OF((int, int, char **, char *));
-
-void error              OF((const char *));
-int tar                 OF((gzFile, int, int, int, char **));
-
-void help               OF((int));
-int main                OF((int, char **));
-
-char *prog;
-
-const char *TGZsuffix[] = { "\0", ".tar", ".tar.gz", ".taz", ".tgz", NULL };
-
-/* return the file name of the TGZ archive */
-/* or NULL if it does not exist */
-
-char *TGZfname (const char *arcname)
-{
-  static char buffer[1024];
-  int origlen,i;
-
-  strcpy(buffer,arcname);
-  origlen = strlen(buffer);
-
-  for (i=0; TGZsuffix[i]; i++)
-    {
-       strcpy(buffer+origlen,TGZsuffix[i]);
-       if (access(buffer,F_OK) == 0)
-         return buffer;
-    }
-  return NULL;
-}
-
-
-/* error message for the filename */
-
-void TGZnotfound (const char *arcname)
-{
-  int i;
-
-  fprintf(stderr,"%s: Couldn't find ",prog);
-  for (i=0;TGZsuffix[i];i++)
-    fprintf(stderr,(TGZsuffix[i+1]) ? "%s%s, " : "or %s%s\n",
-            arcname,
-            TGZsuffix[i]);
-  exit(1);
-}
-
-
-/* convert octal digits to int */
-/* on error return -1 */
-
-int getoct (char *p,int width)
-{
-  int result = 0;
-  char c;
-
-  while (width--)
-    {
-      c = *p++;
-      if (c == 0)
-        break;
-      if (c == ' ')
-        continue;
-      if (c < '0' || c > '7')
-        return -1;
-      result = result * 8 + (c - '0');
-    }
-  return result;
-}
-
-
-/* convert time_t to string */
-/* use the "YYYY/MM/DD hh:mm:ss" format */
-
-char *strtime (time_t *t)
-{
-  struct tm   *local;
-  static char result[32];
-
-  local = localtime(t);
-  sprintf(result,"%4d/%02d/%02d %02d:%02d:%02d",
-          local->tm_year+1900, local->tm_mon+1, local->tm_mday,
-          local->tm_hour, local->tm_min, local->tm_sec);
-  return result;
-}
-
-
-/* set file time */
-
-int setfiletime (char *fname,time_t ftime)
-{
-#ifdef WIN32
-  static int isWinNT = -1;
-  SYSTEMTIME st;
-  FILETIME locft, modft;
-  struct tm *loctm;
-  HANDLE hFile;
-  int result;
-
-  loctm = localtime(&ftime);
-  if (loctm == NULL)
-    return -1;
-
-  st.wYear         = (WORD)loctm->tm_year + 1900;
-  st.wMonth        = (WORD)loctm->tm_mon + 1;
-  st.wDayOfWeek    = (WORD)loctm->tm_wday;
-  st.wDay          = (WORD)loctm->tm_mday;
-  st.wHour         = (WORD)loctm->tm_hour;
-  st.wMinute       = (WORD)loctm->tm_min;
-  st.wSecond       = (WORD)loctm->tm_sec;
-  st.wMilliseconds = 0;
-  if (!SystemTimeToFileTime(&st, &locft) ||
-      !LocalFileTimeToFileTime(&locft, &modft))
-    return -1;
-
-  if (isWinNT < 0)
-    isWinNT = (GetVersion() < 0x80000000) ? 1 : 0;
-  hFile = CreateFile(fname, GENERIC_WRITE, 0, NULL, OPEN_EXISTING,
-                     (isWinNT ? FILE_FLAG_BACKUP_SEMANTICS : 0),
-                     NULL);
-  if (hFile == INVALID_HANDLE_VALUE)
-    return -1;
-  result = SetFileTime(hFile, NULL, NULL, &modft) ? 0 : -1;
-  CloseHandle(hFile);
-  return result;
-#else
-  struct utimbuf settime;
-
-  settime.actime = settime.modtime = ftime;
-  return utime(fname,&settime);
-#endif
-}
-
-
-/* push file attributes */
-
-void push_attr(struct attr_item **list,char *fname,int mode,time_t time)
-{
-  struct attr_item *item;
-
-  item = (struct attr_item *)malloc(sizeof(struct attr_item));
-  if (item == NULL)
-    error("Out of memory");
-  item->fname = strdup(fname);
-  item->mode  = mode;
-  item->time  = time;
-  item->next  = *list;
-  *list       = item;
-}
-
-
-/* restore file attributes */
-
-void restore_attr(struct attr_item **list)
-{
-  struct attr_item *item, *prev;
-
-  for (item = *list; item != NULL; )
-    {
-      setfiletime(item->fname,item->time);
-      chmod(item->fname,item->mode);
-      prev = item;
-      item = item->next;
-      free(prev);
-    }
-  *list = NULL;
-}
-
-
-/* match regular expression */
-
-#define ISSPECIAL(c) (((c) == '*') || ((c) == '/'))
-
-int ExprMatch (char *string,char *expr)
-{
-  while (1)
-    {
-      if (ISSPECIAL(*expr))
-        {
-          if (*expr == '/')
-            {
-              if (*string != '\\' && *string != '/')
-                return 0;
-              string ++; expr++;
-            }
-          else if (*expr == '*')
-            {
-              if (*expr ++ == 0)
-                return 1;
-              while (*++string != *expr)
-                if (*string == 0)
-                  return 0;
-            }
-        }
-      else
-        {
-          if (*string != *expr)
-            return 0;
-          if (*expr++ == 0)
-            return 1;
-          string++;
-        }
-    }
-}
-
-
-/* recursive mkdir */
-/* abort on ENOENT; ignore other errors like "directory already exists" */
-/* return 1 if OK */
-/*        0 on error */
-
-int makedir (char *newdir)
-{
-  char *buffer = strdup(newdir);
-  char *p;
-  int  len = strlen(buffer);
-
-  if (len <= 0) {
-    free(buffer);
-    return 0;
-  }
-  if (buffer[len-1] == '/') {
-    buffer[len-1] = '\0';
-  }
-  if (mkdir(buffer, 0755) == 0)
-    {
-      free(buffer);
-      return 1;
-    }
-
-  p = buffer+1;
-  while (1)
-    {
-      char hold;
-
-      while(*p && *p != '\\' && *p != '/')
-        p++;
-      hold = *p;
-      *p = 0;
-      if ((mkdir(buffer, 0755) == -1) && (errno == ENOENT))
-        {
-          fprintf(stderr,"%s: Couldn't create directory %s\n",prog,buffer);
-          free(buffer);
-          return 0;
-        }
-      if (hold == 0)
-        break;
-      *p++ = hold;
-    }
-  free(buffer);
-  return 1;
-}
-
-
-int matchname (int arg,int argc,char **argv,char *fname)
-{
-  if (arg == argc)      /* no arguments given (untgz tgzarchive) */
-    return 1;
-
-  while (arg < argc)
-    if (ExprMatch(fname,argv[arg++]))
-      return 1;
-
-  return 0; /* ignore this for the moment being */
-}
-
-
-/* tar file list or extract */
-
-int tar (gzFile in,int action,int arg,int argc,char **argv)
-{
-  union  tar_buffer buffer;
-  int    len;
-  int    err;
-  int    getheader = 1;
-  int    remaining = 0;
-  FILE   *outfile = NULL;
-  char   fname[BLOCKSIZE];
-  int    tarmode;
-  time_t tartime;
-  struct attr_item *attributes = NULL;
-
-  if (action == TGZ_LIST)
-    printf("    date      time     size                       file\n"
-           " ---------- -------- --------- -------------------------------------\n");
-  while (1)
-    {
-      len = gzread(in, &buffer, BLOCKSIZE);
-      if (len < 0)
-        error(gzerror(in, &err));
-      /*
-       * Always expect complete blocks to process
-       * the tar information.
-       */
-      if (len != BLOCKSIZE)
-        {
-          action = TGZ_INVALID; /* force error exit */
-          remaining = 0;        /* force I/O cleanup */
-        }
-
-      /*
-       * If we have to get a tar header
-       */
-      if (getheader >= 1)
-        {
-          /*
-           * if we met the end of the tar
-           * or the end-of-tar block,
-           * we are done
-           */
-          if (len == 0 || buffer.header.name[0] == 0)
-            break;
-
-          tarmode = getoct(buffer.header.mode,8);
-          tartime = (time_t)getoct(buffer.header.mtime,12);
-          if (tarmode == -1 || tartime == (time_t)-1)
-            {
-              buffer.header.name[0] = 0;
-              action = TGZ_INVALID;
-            }
-
-          if (getheader == 1)
-            {
-              strncpy(fname,buffer.header.name,SHORTNAMESIZE);
-              if (fname[SHORTNAMESIZE-1] != 0)
-                  fname[SHORTNAMESIZE] = 0;
-            }
-          else
-            {
-              /*
-               * The file name is longer than SHORTNAMESIZE
-               */
-              if (strncmp(fname,buffer.header.name,SHORTNAMESIZE-1) != 0)
-                  error("bad long name");
-              getheader = 1;
-            }
-
-          /*
-           * Act according to the type flag
-           */
-          switch (buffer.header.typeflag)
-            {
-            case DIRTYPE:
-              if (action == TGZ_LIST)
-                printf(" %s     <dir> %s\n",strtime(&tartime),fname);
-              if (action == TGZ_EXTRACT)
-                {
-                  makedir(fname);
-                  push_attr(&attributes,fname,tarmode,tartime);
-                }
-              break;
-            case REGTYPE:
-            case AREGTYPE:
-              remaining = getoct(buffer.header.size,12);
-              if (remaining == -1)
-                {
-                  action = TGZ_INVALID;
-                  break;
-                }
-              if (action == TGZ_LIST)
-                printf(" %s %9d %s\n",strtime(&tartime),remaining,fname);
-              else if (action == TGZ_EXTRACT)
-                {
-                  if (matchname(arg,argc,argv,fname))
-                    {
-                      outfile = fopen(fname,"wb");
-                      if (outfile == NULL) {
-                        /* try creating directory */
-                        char *p = strrchr(fname, '/');
-                        if (p != NULL) {
-                          *p = '\0';
-                          makedir(fname);
-                          *p = '/';
-                          outfile = fopen(fname,"wb");
-                        }
-                      }
-                      if (outfile != NULL)
-                        printf("Extracting %s\n",fname);
-                      else
-                        fprintf(stderr, "%s: Couldn't create %s",prog,fname);
-                    }
-                  else
-                    outfile = NULL;
-                }
-              getheader = 0;
-              break;
-            case GNUTYPE_LONGLINK:
-            case GNUTYPE_LONGNAME:
-              remaining = getoct(buffer.header.size,12);
-              if (remaining < 0 || remaining >= BLOCKSIZE)
-                {
-                  action = TGZ_INVALID;
-                  break;
-                }
-              len = gzread(in, fname, BLOCKSIZE);
-              if (len < 0)
-                error(gzerror(in, &err));
-              if (fname[BLOCKSIZE-1] != 0 || (int)strlen(fname) > remaining)
-                {
-                  action = TGZ_INVALID;
-                  break;
-                }
-              getheader = 2;
-              break;
-            default:
-              if (action == TGZ_LIST)
-                printf(" %s     <---> %s\n",strtime(&tartime),fname);
-              break;
-            }
-        }
-      else
-        {
-          unsigned int bytes = (remaining > BLOCKSIZE) ? BLOCKSIZE : remaining;
-
-          if (outfile != NULL)
-            {
-              if (fwrite(&buffer,sizeof(char),bytes,outfile) != bytes)
-                {
-                  fprintf(stderr,
-                    "%s: Error writing %s -- skipping\n",prog,fname);
-                  fclose(outfile);
-                  outfile = NULL;
-                  remove(fname);
-                }
-            }
-          remaining -= bytes;
-        }
-
-      if (remaining == 0)
-        {
-          getheader = 1;
-          if (outfile != NULL)
-            {
-              fclose(outfile);
-              outfile = NULL;
-              if (action != TGZ_INVALID)
-                push_attr(&attributes,fname,tarmode,tartime);
-            }
-        }
-
-      /*
-       * Abandon if errors are found
-       */
-      if (action == TGZ_INVALID)
-        {
-          error("broken archive");
-          break;
-        }
-    }
-
-  /*
-   * Restore file modes and time stamps
-   */
-  restore_attr(&attributes);
-
-  if (gzclose(in) != Z_OK)
-    error("failed gzclose");
-
-  return 0;
-}
-
-
-/* ============================================================ */
-
-void help(int exitval)
-{
-  printf("untgz version 0.2.1\n"
-         "  using zlib version %s\n\n",
-         zlibVersion());
-  printf("Usage: untgz file.tgz            extract all files\n"
-         "       untgz file.tgz fname ...  extract selected files\n"
-         "       untgz -l file.tgz         list archive contents\n"
-         "       untgz -h                  display this help\n");
-  exit(exitval);
-}
-
-void error(const char *msg)
-{
-  fprintf(stderr, "%s: %s\n", prog, msg);
-  exit(1);
-}
-
-
-/* ============================================================ */
-
-#if defined(WIN32) && defined(__GNUC__)
-int _CRT_glob = 0;      /* disable argument globbing in MinGW */
-#endif
-
-int main(int argc,char **argv)
-{
-    int         action = TGZ_EXTRACT;
-    int         arg = 1;
-    char        *TGZfile;
-    gzFile      *f;
-
-    prog = strrchr(argv[0],'\\');
-    if (prog == NULL)
-      {
-        prog = strrchr(argv[0],'/');
-        if (prog == NULL)
-          {
-            prog = strrchr(argv[0],':');
-            if (prog == NULL)
-              prog = argv[0];
-            else
-              prog++;
-          }
-        else
-          prog++;
-      }
-    else
-      prog++;
-
-    if (argc == 1)
-      help(0);
-
-    if (strcmp(argv[arg],"-l") == 0)
-      {
-        action = TGZ_LIST;
-        if (argc == ++arg)
-          help(0);
-      }
-    else if (strcmp(argv[arg],"-h") == 0)
-      {
-        help(0);
-      }
-
-    if ((TGZfile = TGZfname(argv[arg])) == NULL)
-      TGZnotfound(argv[arg]);
-
-    ++arg;
-    if ((action == TGZ_LIST) && (arg != argc))
-      help(1);
-
-/*
- *  Process the TGZ file
- */
-    switch(action)
-      {
-      case TGZ_LIST:
-      case TGZ_EXTRACT:
-        f = gzopen(TGZfile,"rb");
-        if (f == NULL)
-          {
-            fprintf(stderr,"%s: Couldn't gzopen %s\n",prog,TGZfile);
-            return 1;
-          }
-        exit(tar(f, action, arg, argc, argv));
-      break;
-
-      default:
-        error("Unknown option");
-        exit(1);
-      }
-
-    return 0;
-}
Index: trunk/minix/lib/zlib-1.2.3/contrib/vstudio/readme.txt
===================================================================
--- trunk/minix/lib/zlib-1.2.3/contrib/vstudio/readme.txt	(revision 9)
+++ 	(revision )
@@ -1,73 +1,0 @@
-Building instructions for the DLL versions of Zlib 1.2.3
-========================================================
-
-This directory contains projects that build zlib and minizip using
-Microsoft Visual C++ 7.0/7.1, and Visual C++ .
-
-You don't need to build these projects yourself. You can download the
-binaries from:
-  http://www.winimage.com/zLibDll
-
-More information can be found at this site.
-
-
-Build instructions for Visual Studio 7.x (32 bits)
---------------------------------------------------
-- Uncompress current zlib, including all contrib/* files
-- Download the crtdll library from
-    http://www.winimage.com/zLibDll/crtdll.zip
-  Unzip crtdll.zip to extract crtdll.lib on contrib\vstudio\vc7.
-- Open contrib\vstudio\vc7\zlibvc.sln with Microsoft Visual C++ 7.x
-  (Visual Studio .Net 2002 or 2003).
-
-Build instructions for Visual Studio 2005 (32 bits or 64 bits)
---------------------------------------------------------------
-- Uncompress current zlib, including all contrib/* files
-- For 32 bits only: download the crtdll library from
-    http://www.winimage.com/zLibDll/crtdll.zip
-  Unzip crtdll.zip to extract crtdll.lib on contrib\vstudio\vc8.
-- Open contrib\vstudio\vc8\zlibvc.sln with Microsoft Visual C++ 8.0
-
-Build instructions for Visual Studio 2005 64 bits, PSDK compiler
-----------------------------------------------------------------
-at the time of writing this text file, Visual Studio 2005 (and 
-  Microsoft Visual C++ 8.0) is on the beta 2 stage.
-Using you can get the free 64 bits compiler from Platform SDK, 
-  which is NOT a beta, and compile using the Visual studio 2005 IDE
-see http://www.winimage.com/misc/sdk64onvs2005/ for instruction
-
-- Uncompress current zlib, including all contrib/* files
-- start Visual Studio 2005 from a platform SDK command prompt, using
-  the /useenv switch
-- Open contrib\vstudio\vc8\zlibvc.sln with Microsoft Visual C++ 8.0
-
-
-Important
----------
-- To use zlibwapi.dll in your application, you must define the
-  macro ZLIB_WINAPI when compiling your application's source files.
-
-
-Additional notes
-----------------
-- This DLL, named zlibwapi.dll, is compatible to the old zlib.dll built
-  by Gilles Vollant from the zlib 1.1.x sources, and distributed at
-    http://www.winimage.com/zLibDll
-  It uses the WINAPI calling convention for the exported functions, and
-  includes the minizip functionality. If your application needs that
-  particular build of zlib.dll, you can rename zlibwapi.dll to zlib.dll.
-
-- The new DLL was renamed because there exist several incompatible
-  versions of zlib.dll on the Internet.
-
-- There is also an official DLL build of zlib, named zlib1.dll. This one
-  is exporting the functions using the CDECL convention. See the file
-  win32\DLL_FAQ.txt found in this zlib distribution.
-
-- There used to be a ZLIB_DLL macro in zlib 1.1.x, but now this symbol
-  has a slightly different effect. To avoid compatibility problems, do
-  not define it here.
-
-
-Gilles Vollant
-info@winimage.com
Index: trunk/minix/lib/zlib-1.2.3/contrib/vstudio/vc7/miniunz.vcproj
===================================================================
--- trunk/minix/lib/zlib-1.2.3/contrib/vstudio/vc7/miniunz.vcproj	(revision 9)
+++ 	(revision )
@@ -1,126 +1,0 @@
-<?xml version="1.0" encoding = "Windows-1252"?>
-<VisualStudioProject
-	ProjectType="Visual C++"
-	Version="7.00"
-	Name="miniunz"
-	ProjectGUID="{C52F9E7B-498A-42BE-8DB4-85A15694382A}"
-	Keyword="Win32Proj">
-	<Platforms>
-		<Platform
-			Name="Win32"/>
-	</Platforms>
-	<Configurations>
-		<Configuration
-			Name="Debug|Win32"
-			OutputDirectory="Debug"
-			IntermediateDirectory="Debug"
-			ConfigurationType="1"
-			CharacterSet="2">
-			<Tool
-				Name="VCCLCompilerTool"
-				Optimization="0"
-				AdditionalIncludeDirectories="..\..\..;..\..\minizip"
-				PreprocessorDefinitions="WIN32;ZLIB_WINAPI;_DEBUG;_CONSOLE"
-				MinimalRebuild="TRUE"
-				BasicRuntimeChecks="3"
-				RuntimeLibrary="5"
-				UsePrecompiledHeader="0"
-				WarningLevel="3"
-				Detect64BitPortabilityProblems="TRUE"
-				DebugInformationFormat="4"/>
-			<Tool
-				Name="VCCustomBuildTool"/>
-			<Tool
-				Name="VCLinkerTool"
-				OutputFile="$(OutDir)/miniunz.exe"
-				LinkIncremental="2"
-				GenerateDebugInformation="TRUE"
-				ProgramDatabaseFile="$(OutDir)/miniunz.pdb"
-				SubSystem="1"
-				TargetMachine="1"/>
-			<Tool
-				Name="VCMIDLTool"/>
-			<Tool
-				Name="VCPostBuildEventTool"/>
-			<Tool
-				Name="VCPreBuildEventTool"/>
-			<Tool
-				Name="VCPreLinkEventTool"/>
-			<Tool
-				Name="VCResourceCompilerTool"/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"/>
-			<Tool
-				Name="VCWebDeploymentTool"/>
-		</Configuration>
-		<Configuration
-			Name="Release|Win32"
-			OutputDirectory="Release"
-			IntermediateDirectory="Release"
-			ConfigurationType="1"
-			CharacterSet="2">
-			<Tool
-				Name="VCCLCompilerTool"
-				Optimization="2"
-				InlineFunctionExpansion="1"
-				OmitFramePointers="TRUE"
-				AdditionalIncludeDirectories="..\..\..;..\..\minizip"
-				PreprocessorDefinitions="WIN32;ZLIB_WINAPI;NDEBUG;_CONSOLE"
-				StringPooling="TRUE"
-				RuntimeLibrary="4"
-				EnableFunctionLevelLinking="TRUE"
-				UsePrecompiledHeader="0"
-				WarningLevel="3"
-				Detect64BitPortabilityProblems="TRUE"
-				DebugInformationFormat="3"/>
-			<Tool
-				Name="VCCustomBuildTool"/>
-			<Tool
-				Name="VCLinkerTool"
-				OutputFile="$(OutDir)/miniunz.exe"
-				LinkIncremental="1"
-				GenerateDebugInformation="TRUE"
-				SubSystem="1"
-				OptimizeReferences="2"
-				EnableCOMDATFolding="2"
-				OptimizeForWindows98="1"
-				TargetMachine="1"/>
-			<Tool
-				Name="VCMIDLTool"/>
-			<Tool
-				Name="VCPostBuildEventTool"/>
-			<Tool
-				Name="VCPreBuildEventTool"/>
-			<Tool
-				Name="VCPreLinkEventTool"/>
-			<Tool
-				Name="VCResourceCompilerTool"/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"/>
-			<Tool
-				Name="VCWebDeploymentTool"/>
-		</Configuration>
-	</Configurations>
-	<Files>
-		<Filter
-			Name="Source Files"
-			Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm">
-			<File
-				RelativePath="..\..\minizip\miniunz.c">
-			</File>
-		</Filter>
-		<Filter
-			Name="Header Files"
-			Filter="h;hpp;hxx;hm;inl;inc">
-		</Filter>
-		<Filter
-			Name="Resource Files"
-			Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe">
-		</Filter>
-		<File
-			RelativePath="ReleaseDll\zlibwapi.lib">
-		</File>
-	</Files>
-	<Globals>
-	</Globals>
-</VisualStudioProject>
Index: trunk/minix/lib/zlib-1.2.3/contrib/vstudio/vc7/minizip.vcproj
===================================================================
--- trunk/minix/lib/zlib-1.2.3/contrib/vstudio/vc7/minizip.vcproj	(revision 9)
+++ 	(revision )
@@ -1,126 +1,0 @@
-<?xml version="1.0" encoding = "Windows-1252"?>
-<VisualStudioProject
-	ProjectType="Visual C++"
-	Version="7.00"
-	Name="minizip"
-	ProjectGUID="{48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}"
-	Keyword="Win32Proj">
-	<Platforms>
-		<Platform
-			Name="Win32"/>
-	</Platforms>
-	<Configurations>
-		<Configuration
-			Name="Debug|Win32"
-			OutputDirectory="Debug"
-			IntermediateDirectory="Debug"
-			ConfigurationType="1"
-			CharacterSet="2">
-			<Tool
-				Name="VCCLCompilerTool"
-				Optimization="0"
-				AdditionalIncludeDirectories="..\..\..;..\..\minizip"
-				PreprocessorDefinitions="WIN32;ZLIB_WINAPI;_DEBUG;_CONSOLE"
-				MinimalRebuild="TRUE"
-				BasicRuntimeChecks="3"
-				RuntimeLibrary="5"
-				UsePrecompiledHeader="0"
-				WarningLevel="3"
-				Detect64BitPortabilityProblems="TRUE"
-				DebugInformationFormat="4"/>
-			<Tool
-				Name="VCCustomBuildTool"/>
-			<Tool
-				Name="VCLinkerTool"
-				OutputFile="$(OutDir)/minizip.exe"
-				LinkIncremental="2"
-				GenerateDebugInformation="TRUE"
-				ProgramDatabaseFile="$(OutDir)/minizip.pdb"
-				SubSystem="1"
-				TargetMachine="1"/>
-			<Tool
-				Name="VCMIDLTool"/>
-			<Tool
-				Name="VCPostBuildEventTool"/>
-			<Tool
-				Name="VCPreBuildEventTool"/>
-			<Tool
-				Name="VCPreLinkEventTool"/>
-			<Tool
-				Name="VCResourceCompilerTool"/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"/>
-			<Tool
-				Name="VCWebDeploymentTool"/>
-		</Configuration>
-		<Configuration
-			Name="Release|Win32"
-			OutputDirectory="Release"
-			IntermediateDirectory="Release"
-			ConfigurationType="1"
-			CharacterSet="2">
-			<Tool
-				Name="VCCLCompilerTool"
-				Optimization="2"
-				InlineFunctionExpansion="1"
-				OmitFramePointers="TRUE"
-				AdditionalIncludeDirectories="..\..\..;..\..\minizip"
-				PreprocessorDefinitions="WIN32;ZLIB_WINAPI;NDEBUG;_CONSOLE"
-				StringPooling="TRUE"
-				RuntimeLibrary="4"
-				EnableFunctionLevelLinking="TRUE"
-				UsePrecompiledHeader="0"
-				WarningLevel="3"
-				Detect64BitPortabilityProblems="TRUE"
-				DebugInformationFormat="3"/>
-			<Tool
-				Name="VCCustomBuildTool"/>
-			<Tool
-				Name="VCLinkerTool"
-				OutputFile="$(OutDir)/minizip.exe"
-				LinkIncremental="1"
-				GenerateDebugInformation="TRUE"
-				SubSystem="1"
-				OptimizeReferences="2"
-				EnableCOMDATFolding="2"
-				OptimizeForWindows98="1"
-				TargetMachine="1"/>
-			<Tool
-				Name="VCMIDLTool"/>
-			<Tool
-				Name="VCPostBuildEventTool"/>
-			<Tool
-				Name="VCPreBuildEventTool"/>
-			<Tool
-				Name="VCPreLinkEventTool"/>
-			<Tool
-				Name="VCResourceCompilerTool"/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"/>
-			<Tool
-				Name="VCWebDeploymentTool"/>
-		</Configuration>
-	</Configurations>
-	<Files>
-		<Filter
-			Name="Source Files"
-			Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm">
-			<File
-				RelativePath="..\..\minizip\minizip.c">
-			</File>
-		</Filter>
-		<Filter
-			Name="Header Files"
-			Filter="h;hpp;hxx;hm;inl;inc">
-		</Filter>
-		<Filter
-			Name="Resource Files"
-			Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe">
-		</Filter>
-		<File
-			RelativePath="ReleaseDll\zlibwapi.lib">
-		</File>
-	</Files>
-	<Globals>
-	</Globals>
-</VisualStudioProject>
Index: trunk/minix/lib/zlib-1.2.3/contrib/vstudio/vc7/testzlib.vcproj
===================================================================
--- trunk/minix/lib/zlib-1.2.3/contrib/vstudio/vc7/testzlib.vcproj	(revision 9)
+++ 	(revision )
@@ -1,126 +1,0 @@
-<?xml version="1.0" encoding = "Windows-1252"?>
-<VisualStudioProject
-	ProjectType="Visual C++"
-	Version="7.00"
-	Name="testZlibDll"
-	ProjectGUID="{AA6666AA-E09F-4135-9C0C-4FE50C3C654C}"
-	Keyword="Win32Proj">
-	<Platforms>
-		<Platform
-			Name="Win32"/>
-	</Platforms>
-	<Configurations>
-		<Configuration
-			Name="Debug|Win32"
-			OutputDirectory="Debug"
-			IntermediateDirectory="Debug"
-			ConfigurationType="1"
-			CharacterSet="2">
-			<Tool
-				Name="VCCLCompilerTool"
-				Optimization="0"
-				AdditionalIncludeDirectories="..\..\.."
-				PreprocessorDefinitions="WIN32;ZLIB_WINAPI;_DEBUG;_CONSOLE"
-				MinimalRebuild="TRUE"
-				BasicRuntimeChecks="3"
-				RuntimeLibrary="5"
-				UsePrecompiledHeader="0"
-				WarningLevel="3"
-				Detect64BitPortabilityProblems="TRUE"
-				DebugInformationFormat="4"/>
-			<Tool
-				Name="VCCustomBuildTool"/>
-			<Tool
-				Name="VCLinkerTool"
-				OutputFile="$(OutDir)/testzlib.exe"
-				LinkIncremental="2"
-				GenerateDebugInformation="TRUE"
-				ProgramDatabaseFile="$(OutDir)/testzlib.pdb"
-				SubSystem="1"
-				TargetMachine="1"/>
-			<Tool
-				Name="VCMIDLTool"/>
-			<Tool
-				Name="VCPostBuildEventTool"/>
-			<Tool
-				Name="VCPreBuildEventTool"/>
-			<Tool
-				Name="VCPreLinkEventTool"/>
-			<Tool
-				Name="VCResourceCompilerTool"/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"/>
-			<Tool
-				Name="VCWebDeploymentTool"/>
-		</Configuration>
-		<Configuration
-			Name="Release|Win32"
-			OutputDirectory="Release"
-			IntermediateDirectory="Release"
-			ConfigurationType="1"
-			CharacterSet="2">
-			<Tool
-				Name="VCCLCompilerTool"
-				Optimization="2"
-				InlineFunctionExpansion="1"
-				OmitFramePointers="TRUE"
-				AdditionalIncludeDirectories="..\..\.."
-				PreprocessorDefinitions="WIN32;ZLIB_WINAPI;NDEBUG;_CONSOLE"
-				StringPooling="TRUE"
-				RuntimeLibrary="4"
-				EnableFunctionLevelLinking="TRUE"
-				UsePrecompiledHeader="0"
-				WarningLevel="3"
-				Detect64BitPortabilityProblems="TRUE"
-				DebugInformationFormat="3"/>
-			<Tool
-				Name="VCCustomBuildTool"/>
-			<Tool
-				Name="VCLinkerTool"
-				OutputFile="$(OutDir)/testzlib.exe"
-				LinkIncremental="1"
-				GenerateDebugInformation="TRUE"
-				SubSystem="1"
-				OptimizeReferences="2"
-				EnableCOMDATFolding="2"
-				OptimizeForWindows98="1"
-				TargetMachine="1"/>
-			<Tool
-				Name="VCMIDLTool"/>
-			<Tool
-				Name="VCPostBuildEventTool"/>
-			<Tool
-				Name="VCPreBuildEventTool"/>
-			<Tool
-				Name="VCPreLinkEventTool"/>
-			<Tool
-				Name="VCResourceCompilerTool"/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"/>
-			<Tool
-				Name="VCWebDeploymentTool"/>
-		</Configuration>
-	</Configurations>
-	<Files>
-		<Filter
-			Name="Source Files"
-			Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm">
-			<File
-				RelativePath="..\..\testzlib\testzlib.c">
-			</File>
-		</Filter>
-		<Filter
-			Name="Header Files"
-			Filter="h;hpp;hxx;hm;inl;inc">
-		</Filter>
-		<Filter
-			Name="Resource Files"
-			Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe">
-		</Filter>
-		<File
-			RelativePath="ReleaseDll\zlibwapi.lib">
-		</File>
-	</Files>
-	<Globals>
-	</Globals>
-</VisualStudioProject>
Index: trunk/minix/lib/zlib-1.2.3/contrib/vstudio/vc7/zlib.rc
===================================================================
--- trunk/minix/lib/zlib-1.2.3/contrib/vstudio/vc7/zlib.rc	(revision 9)
+++ 	(revision )
@@ -1,32 +1,0 @@
-#include <windows.h>
-
-#define IDR_VERSION1  1
-IDR_VERSION1	VERSIONINFO	MOVEABLE IMPURE LOADONCALL DISCARDABLE
-  FILEVERSION	 1,2,3,0
-  PRODUCTVERSION 1,2,3,0
-  FILEFLAGSMASK	VS_FFI_FILEFLAGSMASK
-  FILEFLAGS	0
-  FILEOS	VOS_DOS_WINDOWS32
-  FILETYPE	VFT_DLL
-  FILESUBTYPE	0	// not used
-BEGIN
-  BLOCK "StringFileInfo"
-  BEGIN
-    BLOCK "040904E4"
-    //language ID = U.S. English, char set = Windows, Multilingual
-
-    BEGIN
-      VALUE "FileDescription", "zlib data compression library\0"
-      VALUE "FileVersion",	"1.2.3.0\0"
-      VALUE "InternalName",	"zlib\0"
-      VALUE "OriginalFilename",	"zlib.dll\0"
-      VALUE "ProductName",	"ZLib.DLL\0"
-      VALUE "Comments","DLL support by Alessandro Iacopetti & Gilles Vollant\0"
-      VALUE "LegalCopyright", "(C) 1995-2003 Jean-loup Gailly & Mark Adler\0"
-    END
-  END
-  BLOCK "VarFileInfo"
-  BEGIN
-    VALUE "Translation", 0x0409, 1252
-  END
-END
Index: trunk/minix/lib/zlib-1.2.3/contrib/vstudio/vc7/zlibstat.vcproj
===================================================================
--- trunk/minix/lib/zlib-1.2.3/contrib/vstudio/vc7/zlibstat.vcproj	(revision 9)
+++ 	(revision )
@@ -1,246 +1,0 @@
-<?xml version="1.0" encoding = "Windows-1252"?>
-<VisualStudioProject
-	ProjectType="Visual C++"
-	Version="7.00"
-	Name="zlibstat"
-	SccProjectName=""
-	SccLocalPath="">
-	<Platforms>
-		<Platform
-			Name="Win32"/>
-	</Platforms>
-	<Configurations>
-		<Configuration
-			Name="Debug|Win32"
-			OutputDirectory=".\zlibstatDebug"
-			IntermediateDirectory=".\zlibstatDebug"
-			ConfigurationType="4"
-			UseOfMFC="0"
-			ATLMinimizesCRunTimeLibraryUsage="FALSE">
-			<Tool
-				Name="VCCLCompilerTool"
-				Optimization="0"
-				AdditionalIncludeDirectories="..\..\..;..\..\masmx86"
-				PreprocessorDefinitions="WIN32;ZLIB_WINAPI"
-				ExceptionHandling="FALSE"
-				RuntimeLibrary="5"
-				PrecompiledHeaderFile=".\zlibstatDebug/zlibstat.pch"
-				AssemblerListingLocation=".\zlibstatDebug/"
-				ObjectFile=".\zlibstatDebug/"
-				ProgramDataBaseFileName=".\zlibstatDebug/"
-				WarningLevel="3"
-				SuppressStartupBanner="TRUE"
-				DebugInformationFormat="1"/>
-			<Tool
-				Name="VCCustomBuildTool"/>
-			<Tool
-				Name="VCLibrarianTool"
-				AdditionalOptions="/NODEFAULTLIB "
-				OutputFile=".\zlibstatDebug\zlibstat.lib"
-				SuppressStartupBanner="TRUE"/>
-			<Tool
-				Name="VCMIDLTool"/>
-			<Tool
-				Name="VCPostBuildEventTool"/>
-			<Tool
-				Name="VCPreBuildEventTool"/>
-			<Tool
-				Name="VCPreLinkEventTool"/>
-			<Tool
-				Name="VCResourceCompilerTool"
-				Culture="1036"/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"/>
-		</Configuration>
-		<Configuration
-			Name="ReleaseAxp|Win32"
-			OutputDirectory=".\zlibsta0"
-			IntermediateDirectory=".\zlibsta0"
-			ConfigurationType="4"
-			UseOfMFC="0"
-			ATLMinimizesCRunTimeLibraryUsage="FALSE">
-			<Tool
-				Name="VCCLCompilerTool"
-				InlineFunctionExpansion="1"
-				AdditionalIncludeDirectories="..\..\..;..\..\masmx86"
-				PreprocessorDefinitions="WIN32;ZLIB_WINAPI"
-				StringPooling="TRUE"
-				ExceptionHandling="FALSE"
-				RuntimeLibrary="4"
-				EnableFunctionLevelLinking="TRUE"
-				PrecompiledHeaderFile=".\zlibsta0/zlibstat.pch"
-				AssemblerListingLocation=".\zlibsta0/"
-				ObjectFile=".\zlibsta0/"
-				ProgramDataBaseFileName=".\zlibsta0/"
-				WarningLevel="3"
-				SuppressStartupBanner="TRUE"/>
-			<Tool
-				Name="VCCustomBuildTool"/>
-			<Tool
-				Name="VCLibrarianTool"
-				AdditionalOptions="/NODEFAULTLIB "
-				OutputFile=".\zlibsta0\zlibstat.lib"
-				SuppressStartupBanner="TRUE"/>
-			<Tool
-				Name="VCMIDLTool"/>
-			<Tool
-				Name="VCPostBuildEventTool"/>
-			<Tool
-				Name="VCPreBuildEventTool"/>
-			<Tool
-				Name="VCPreLinkEventTool"/>
-			<Tool
-				Name="VCResourceCompilerTool"/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"/>
-		</Configuration>
-		<Configuration
-			Name="Release|Win32"
-			OutputDirectory=".\zlibstat"
-			IntermediateDirectory=".\zlibstat"
-			ConfigurationType="4"
-			UseOfMFC="0"
-			ATLMinimizesCRunTimeLibraryUsage="FALSE">
-			<Tool
-				Name="VCCLCompilerTool"
-				InlineFunctionExpansion="1"
-				AdditionalIncludeDirectories="..\..\..;..\..\masmx86"
-				PreprocessorDefinitions="WIN32;ZLIB_WINAPI;ASMV;ASMINF"
-				StringPooling="TRUE"
-				ExceptionHandling="FALSE"
-				RuntimeLibrary="4"
-				EnableFunctionLevelLinking="TRUE"
-				PrecompiledHeaderFile=".\zlibstat/zlibstat.pch"
-				AssemblerListingLocation=".\zlibstat/"
-				ObjectFile=".\zlibstat/"
-				ProgramDataBaseFileName=".\zlibstat/"
-				WarningLevel="3"
-				SuppressStartupBanner="TRUE"/>
-			<Tool
-				Name="VCCustomBuildTool"/>
-			<Tool
-				Name="VCLibrarianTool"
-				AdditionalOptions="..\..\masmx86\gvmat32.obj ..\..\masmx86\inffas32.obj /NODEFAULTLIB "
-				OutputFile=".\zlibstat\zlibstat.lib"
-				SuppressStartupBanner="TRUE"/>
-			<Tool
-				Name="VCMIDLTool"/>
-			<Tool
-				Name="VCPostBuildEventTool"/>
-			<Tool
-				Name="VCPreBuildEventTool"/>
-			<Tool
-				Name="VCPreLinkEventTool"/>
-			<Tool
-				Name="VCResourceCompilerTool"
-				Culture="1036"/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"/>
-		</Configuration>
-		<Configuration
-			Name="ReleaseWithoutAsm|Win32"
-			OutputDirectory="zlibstatWithoutAsm"
-			IntermediateDirectory="zlibstatWithoutAsm"
-			ConfigurationType="4"
-			UseOfMFC="0"
-			ATLMinimizesCRunTimeLibraryUsage="FALSE">
-			<Tool
-				Name="VCCLCompilerTool"
-				InlineFunctionExpansion="1"
-				AdditionalIncludeDirectories="..\..\..;..\..\masmx86"
-				PreprocessorDefinitions="WIN32;ZLIB_WINAPI"
-				StringPooling="TRUE"
-				ExceptionHandling="FALSE"
-				RuntimeLibrary="4"
-				EnableFunctionLevelLinking="TRUE"
-				PrecompiledHeaderFile=".\zlibstat/zlibstat.pch"
-				AssemblerListingLocation=".\zlibstatWithoutAsm/"
-				ObjectFile=".\zlibstatWithoutAsm/"
-				ProgramDataBaseFileName=".\zlibstatWithoutAsm/"
-				WarningLevel="3"
-				SuppressStartupBanner="TRUE"/>
-			<Tool
-				Name="VCCustomBuildTool"/>
-			<Tool
-				Name="VCLibrarianTool"
-				AdditionalOptions=" /NODEFAULTLIB "
-				OutputFile=".\zlibstatWithoutAsm\zlibstat.lib"
-				SuppressStartupBanner="TRUE"/>
-			<Tool
-				Name="VCMIDLTool"/>
-			<Tool
-				Name="VCPostBuildEventTool"/>
-			<Tool
-				Name="VCPreBuildEventTool"/>
-			<Tool
-				Name="VCPreLinkEventTool"/>
-			<Tool
-				Name="VCResourceCompilerTool"
-				Culture="1036"/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"/>
-		</Configuration>
-	</Configurations>
-	<Files>
-		<Filter
-			Name="Source Files"
-			Filter="">
-			<File
-				RelativePath="..\..\..\adler32.c">
-			</File>
-			<File
-				RelativePath="..\..\..\compress.c">
-			</File>
-			<File
-				RelativePath="..\..\..\crc32.c">
-			</File>
-			<File
-				RelativePath="..\..\..\deflate.c">
-			</File>
-			<File
-				RelativePath="..\..\masmx86\gvmat32c.c">
-			</File>
-			<File
-				RelativePath="..\..\..\gzio.c">
-			</File>
-			<File
-				RelativePath="..\..\..\infback.c">
-			</File>
-			<File
-				RelativePath="..\..\..\inffast.c">
-			</File>
-			<File
-				RelativePath="..\..\..\inflate.c">
-			</File>
-			<File
-				RelativePath="..\..\..\inftrees.c">
-			</File>
-			<File
-				RelativePath="..\..\minizip\ioapi.c">
-			</File>
-			<File
-				RelativePath="..\..\..\trees.c">
-			</File>
-			<File
-				RelativePath="..\..\..\uncompr.c">
-			</File>
-			<File
-				RelativePath="..\..\minizip\unzip.c">
-			</File>
-			<File
-				RelativePath="..\..\minizip\zip.c">
-			</File>
-			<File
-				RelativePath=".\zlib.rc">
-			</File>
-			<File
-				RelativePath=".\zlibvc.def">
-			</File>
-			<File
-				RelativePath="..\..\..\zutil.c">
-			</File>
-		</Filter>
-	</Files>
-	<Globals>
-	</Globals>
-</VisualStudioProject>
Index: trunk/minix/lib/zlib-1.2.3/contrib/vstudio/vc7/zlibvc.def
===================================================================
--- trunk/minix/lib/zlib-1.2.3/contrib/vstudio/vc7/zlibvc.def	(revision 9)
+++ 	(revision )
@@ -1,92 +1,0 @@
-
-VERSION		1.23
-
-HEAPSIZE	1048576,8192
-
-EXPORTS
-        adler32                                  @1
-        compress                                 @2
-        crc32                                    @3
-        deflate                                  @4
-        deflateCopy                              @5
-        deflateEnd                               @6
-        deflateInit2_                            @7
-        deflateInit_                             @8
-        deflateParams                            @9
-        deflateReset                             @10
-        deflateSetDictionary                     @11
-        gzclose                                  @12
-        gzdopen                                  @13
-        gzerror                                  @14
-        gzflush                                  @15
-        gzopen                                   @16
-        gzread                                   @17
-        gzwrite                                  @18
-        inflate                                  @19
-        inflateEnd                               @20
-        inflateInit2_                            @21
-        inflateInit_                             @22
-        inflateReset                             @23
-        inflateSetDictionary                     @24
-        inflateSync                              @25
-        uncompress                               @26
-        zlibVersion                              @27
-        gzprintf                                 @28
-        gzputc                                   @29
-        gzgetc                                   @30
-        gzseek                                   @31
-        gzrewind                                 @32
-        gztell                                   @33
-        gzeof                                    @34
-        gzsetparams                              @35
-        zError                                   @36
-        inflateSyncPoint                         @37
-        get_crc_table                            @38
-        compress2                                @39
-        gzputs                                   @40
-        gzgets                                   @41
-        inflateCopy                              @42
-        inflateBackInit_                         @43
-        inflateBack                              @44
-        inflateBackEnd                           @45
-        compressBound                            @46
-        deflateBound                             @47
-        gzclearerr                               @48
-        gzungetc                                 @49
-        zlibCompileFlags                         @50
-        deflatePrime                             @51
-
-        unzOpen                                  @61
-        unzClose                                 @62
-        unzGetGlobalInfo                         @63
-        unzGetCurrentFileInfo                    @64
-        unzGoToFirstFile                         @65
-        unzGoToNextFile                          @66
-        unzOpenCurrentFile                       @67
-        unzReadCurrentFile                       @68
-        unzOpenCurrentFile3                      @69
-        unztell                                  @70
-        unzeof                                   @71
-        unzCloseCurrentFile                      @72
-        unzGetGlobalComment                      @73
-        unzStringFileNameCompare                 @74
-        unzLocateFile                            @75
-        unzGetLocalExtrafield                    @76
-        unzOpen2                                 @77
-        unzOpenCurrentFile2                      @78
-        unzOpenCurrentFilePassword               @79
-
-        zipOpen                                  @80
-        zipOpenNewFileInZip                      @81
-        zipWriteInFileInZip                      @82
-        zipCloseFileInZip                        @83
-        zipClose                                 @84
-        zipOpenNewFileInZip2                     @86
-        zipCloseFileInZipRaw                     @87
-        zipOpen2                                 @88
-        zipOpenNewFileInZip3                     @89
-
-        unzGetFilePos                            @100
-        unzGoToFilePos                           @101
-
-        fill_win32_filefunc                      @110
Index: trunk/minix/lib/zlib-1.2.3/contrib/vstudio/vc7/zlibvc.sln
===================================================================
--- trunk/minix/lib/zlib-1.2.3/contrib/vstudio/vc7/zlibvc.sln	(revision 9)
+++ 	(revision )
@@ -1,78 +1,0 @@
-Microsoft Visual Studio Solution File, Format Version 7.00
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "zlibstat", "zlibstat.vcproj", "{745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}"
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "zlibvc", "zlibvc.vcproj", "{8FD826F8-3739-44E6-8CC8-997122E53B8D}"
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "minizip", "minizip.vcproj", "{48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}"
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "miniunz", "miniunz.vcproj", "{C52F9E7B-498A-42BE-8DB4-85A15694382A}"
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "testZlibDll", "testzlib.vcproj", "{AA6666AA-E09F-4135-9C0C-4FE50C3C654C}"
-EndProject
-Global
-	GlobalSection(SolutionConfiguration) = preSolution
-		ConfigName.0 = Debug
-		ConfigName.1 = Release
-		ConfigName.2 = ReleaseAxp
-		ConfigName.3 = ReleaseWithoutAsm
-		ConfigName.4 = ReleaseWithoutCrtdll
-	EndGlobalSection
-	GlobalSection(ProjectDependencies) = postSolution
-	EndGlobalSection
-	GlobalSection(ProjectConfiguration) = postSolution
-		{745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.Debug.ActiveCfg = Debug|Win32
-		{745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.Debug.Build.0 = Debug|Win32
-		{745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.Release.ActiveCfg = Release|Win32
-		{745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.Release.Build.0 = Release|Win32
-		{745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.ReleaseAxp.ActiveCfg = ReleaseAxp|Win32
-		{745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.ReleaseAxp.Build.0 = ReleaseAxp|Win32
-		{745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.ReleaseWithoutAsm.ActiveCfg = ReleaseWithoutAsm|Win32
-		{745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.ReleaseWithoutAsm.Build.0 = ReleaseWithoutAsm|Win32
-		{745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.ReleaseWithoutCrtdll.ActiveCfg = ReleaseAxp|Win32
-		{745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.ReleaseWithoutCrtdll.Build.0 = ReleaseAxp|Win32
-		{8FD826F8-3739-44E6-8CC8-997122E53B8D}.Debug.ActiveCfg = Debug|Win32
-		{8FD826F8-3739-44E6-8CC8-997122E53B8D}.Debug.Build.0 = Debug|Win32
-		{8FD826F8-3739-44E6-8CC8-997122E53B8D}.Release.ActiveCfg = Release|Win32
-		{8FD826F8-3739-44E6-8CC8-997122E53B8D}.Release.Build.0 = Release|Win32
-		{8FD826F8-3739-44E6-8CC8-997122E53B8D}.ReleaseAxp.ActiveCfg = ReleaseAxp|Win32
-		{8FD826F8-3739-44E6-8CC8-997122E53B8D}.ReleaseAxp.Build.0 = ReleaseAxp|Win32
-		{8FD826F8-3739-44E6-8CC8-997122E53B8D}.ReleaseWithoutAsm.ActiveCfg = ReleaseWithoutAsm|Win32
-		{8FD826F8-3739-44E6-8CC8-997122E53B8D}.ReleaseWithoutAsm.Build.0 = ReleaseWithoutAsm|Win32
-		{8FD826F8-3739-44E6-8CC8-997122E53B8D}.ReleaseWithoutCrtdll.ActiveCfg = ReleaseWithoutCrtdll|Win32
-		{8FD826F8-3739-44E6-8CC8-997122E53B8D}.ReleaseWithoutCrtdll.Build.0 = ReleaseWithoutCrtdll|Win32
-		{48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.Debug.ActiveCfg = Debug|Win32
-		{48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.Debug.Build.0 = Debug|Win32
-		{48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.Release.ActiveCfg = Release|Win32
-		{48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.Release.Build.0 = Release|Win32
-		{48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.ReleaseAxp.ActiveCfg = Release|Win32
-		{48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.ReleaseAxp.Build.0 = Release|Win32
-		{48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.ReleaseWithoutAsm.ActiveCfg = Release|Win32
-		{48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.ReleaseWithoutAsm.Build.0 = Release|Win32
-		{48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.ReleaseWithoutCrtdll.ActiveCfg = Release|Win32
-		{48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.ReleaseWithoutCrtdll.Build.0 = Release|Win32
-		{C52F9E7B-498A-42BE-8DB4-85A15694382A}.Debug.ActiveCfg = Debug|Win32
-		{C52F9E7B-498A-42BE-8DB4-85A15694382A}.Debug.Build.0 = Debug|Win32
-		{C52F9E7B-498A-42BE-8DB4-85A15694382A}.Release.ActiveCfg = Release|Win32
-		{C52F9E7B-498A-42BE-8DB4-85A15694382A}.Release.Build.0 = Release|Win32
-		{C52F9E7B-498A-42BE-8DB4-85A15694382A}.ReleaseAxp.ActiveCfg = Release|Win32
-		{C52F9E7B-498A-42BE-8DB4-85A15694382A}.ReleaseAxp.Build.0 = Release|Win32
-		{C52F9E7B-498A-42BE-8DB4-85A15694382A}.ReleaseWithoutAsm.ActiveCfg = Release|Win32
-		{C52F9E7B-498A-42BE-8DB4-85A15694382A}.ReleaseWithoutAsm.Build.0 = Release|Win32
-		{C52F9E7B-498A-42BE-8DB4-85A15694382A}.ReleaseWithoutCrtdll.ActiveCfg = Release|Win32
-		{C52F9E7B-498A-42BE-8DB4-85A15694382A}.ReleaseWithoutCrtdll.Build.0 = Release|Win32
-		{AA6666AA-E09F-4135-9C0C-4FE50C3C654C}.Debug.ActiveCfg = Debug|Win32
-		{AA6666AA-E09F-4135-9C0C-4FE50C3C654C}.Debug.Build.0 = Debug|Win32
-		{AA6666AA-E09F-4135-9C0C-4FE50C3C654C}.Release.ActiveCfg = Release|Win32
-		{AA6666AA-E09F-4135-9C0C-4FE50C3C654C}.Release.Build.0 = Release|Win32
-		{AA6666AA-E09F-4135-9C0C-4FE50C3C654C}.ReleaseAxp.ActiveCfg = Release|Win32
-		{AA6666AA-E09F-4135-9C0C-4FE50C3C654C}.ReleaseAxp.Build.0 = Release|Win32
-		{AA6666AA-E09F-4135-9C0C-4FE50C3C654C}.ReleaseWithoutAsm.ActiveCfg = Release|Win32
-		{AA6666AA-E09F-4135-9C0C-4FE50C3C654C}.ReleaseWithoutAsm.Build.0 = Release|Win32
-		{AA6666AA-E09F-4135-9C0C-4FE50C3C654C}.ReleaseWithoutCrtdll.ActiveCfg = Release|Win32
-		{AA6666AA-E09F-4135-9C0C-4FE50C3C654C}.ReleaseWithoutCrtdll.Build.0 = Release|Win32
-	EndGlobalSection
-	GlobalSection(ExtensibilityGlobals) = postSolution
-	EndGlobalSection
-	GlobalSection(ExtensibilityAddIns) = postSolution
-	EndGlobalSection
-EndGlobal
Index: trunk/minix/lib/zlib-1.2.3/contrib/vstudio/vc7/zlibvc.vcproj
===================================================================
--- trunk/minix/lib/zlib-1.2.3/contrib/vstudio/vc7/zlibvc.vcproj	(revision 9)
+++ 	(revision )
@@ -1,445 +1,0 @@
-<?xml version="1.0" encoding = "Windows-1252"?>
-<VisualStudioProject
-	ProjectType="Visual C++"
-	Version="7.00"
-	Name="zlibvc"
-	SccProjectName=""
-	SccLocalPath="">
-	<Platforms>
-		<Platform
-			Name="Win32"/>
-	</Platforms>
-	<Configurations>
-		<Configuration
-			Name="Debug|Win32"
-			OutputDirectory=".\DebugDll"
-			IntermediateDirectory=".\DebugDll"
-			ConfigurationType="2"
-			UseOfMFC="0"
-			ATLMinimizesCRunTimeLibraryUsage="FALSE">
-			<Tool
-				Name="VCCLCompilerTool"
-				Optimization="0"
-				AdditionalIncludeDirectories="..\..\..;..\..\masmx86"
-				PreprocessorDefinitions="WIN32,ZLIB_WINAPI,ASMV,ASMINF"
-				ExceptionHandling="FALSE"
-				RuntimeLibrary="1"
-				PrecompiledHeaderFile=".\DebugDll/zlibvc.pch"
-				AssemblerListingLocation=".\DebugDll/"
-				ObjectFile=".\DebugDll/"
-				ProgramDataBaseFileName=".\DebugDll/"
-				WarningLevel="3"
-				SuppressStartupBanner="TRUE"
-				DebugInformationFormat="4"/>
-			<Tool
-				Name="VCCustomBuildTool"/>
-			<Tool
-				Name="VCLinkerTool"
-				AdditionalOptions="/MACHINE:I386"
-				AdditionalDependencies="..\..\masmx86\gvmat32.obj ..\..\masmx86\inffas32.obj"
-				OutputFile=".\DebugDll\zlibwapi.dll"
-				LinkIncremental="2"
-				SuppressStartupBanner="TRUE"
-				ModuleDefinitionFile=".\zlibvc.def"
-				GenerateDebugInformation="TRUE"
-				ProgramDatabaseFile=".\DebugDll/zlibwapi.pdb"
-				SubSystem="2"
-				ImportLibrary=".\DebugDll/zlibwapi.lib"/>
-			<Tool
-				Name="VCMIDLTool"
-				PreprocessorDefinitions="_DEBUG"
-				MkTypLibCompatible="TRUE"
-				SuppressStartupBanner="TRUE"
-				TargetEnvironment="1"
-				TypeLibraryName=".\DebugDll/zlibvc.tlb"/>
-			<Tool
-				Name="VCPostBuildEventTool"/>
-			<Tool
-				Name="VCPreBuildEventTool"/>
-			<Tool
-				Name="VCPreLinkEventTool"/>
-			<Tool
-				Name="VCResourceCompilerTool"
-				PreprocessorDefinitions="_DEBUG"
-				Culture="1036"/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"/>
-			<Tool
-				Name="VCWebDeploymentTool"/>
-		</Configuration>
-		<Configuration
-			Name="ReleaseWithoutAsm|Win32"
-			OutputDirectory=".\zlibDllWithoutAsm"
-			IntermediateDirectory=".\zlibDllWithoutAsm"
-			ConfigurationType="2"
-			UseOfMFC="0"
-			ATLMinimizesCRunTimeLibraryUsage="FALSE"
-			WholeProgramOptimization="TRUE">
-			<Tool
-				Name="VCCLCompilerTool"
-				InlineFunctionExpansion="1"
-				AdditionalIncludeDirectories="..\..\..;..\..\masmx86"
-				PreprocessorDefinitions="WIN32,ZLIB_WINAPI"
-				StringPooling="TRUE"
-				ExceptionHandling="FALSE"
-				RuntimeLibrary="0"
-				EnableFunctionLevelLinking="TRUE"
-				PrecompiledHeaderFile=".\zlibDllWithoutAsm/zlibvc.pch"
-				AssemblerOutput="2"
-				AssemblerListingLocation=".\zlibDllWithoutAsm/"
-				ObjectFile=".\zlibDllWithoutAsm/"
-				ProgramDataBaseFileName=".\zlibDllWithoutAsm/"
-				BrowseInformation="1"
-				WarningLevel="3"
-				SuppressStartupBanner="TRUE"/>
-			<Tool
-				Name="VCCustomBuildTool"/>
-			<Tool
-				Name="VCLinkerTool"
-				AdditionalOptions="/MACHINE:I386"
-				AdditionalDependencies="crtdll.lib"
-				OutputFile=".\zlibDllWithoutAsm\zlibwapi.dll"
-				LinkIncremental="1"
-				SuppressStartupBanner="TRUE"
-				IgnoreAllDefaultLibraries="TRUE"
-				ModuleDefinitionFile=".\zlibvc.def"
-				ProgramDatabaseFile=".\zlibDllWithoutAsm/zlibwapi.pdb"
-				GenerateMapFile="TRUE"
-				MapFileName=".\zlibDllWithoutAsm/zlibwapi.map"
-				SubSystem="2"
-				OptimizeForWindows98="1"
-				ImportLibrary=".\zlibDllWithoutAsm/zlibwapi.lib"/>
-			<Tool
-				Name="VCMIDLTool"
-				PreprocessorDefinitions="NDEBUG"
-				MkTypLibCompatible="TRUE"
-				SuppressStartupBanner="TRUE"
-				TargetEnvironment="1"
-				TypeLibraryName=".\zlibDllWithoutAsm/zlibvc.tlb"/>
-			<Tool
-				Name="VCPostBuildEventTool"/>
-			<Tool
-				Name="VCPreBuildEventTool"/>
-			<Tool
-				Name="VCPreLinkEventTool"/>
-			<Tool
-				Name="VCResourceCompilerTool"
-				PreprocessorDefinitions="NDEBUG"
-				Culture="1036"/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"/>
-			<Tool
-				Name="VCWebDeploymentTool"/>
-		</Configuration>
-		<Configuration
-			Name="ReleaseWithoutCrtdll|Win32"
-			OutputDirectory=".\zlibDllWithoutCrtDll"
-			IntermediateDirectory=".\zlibDllWithoutCrtDll"
-			ConfigurationType="2"
-			UseOfMFC="0"
-			ATLMinimizesCRunTimeLibraryUsage="FALSE"
-			WholeProgramOptimization="TRUE">
-			<Tool
-				Name="VCCLCompilerTool"
-				InlineFunctionExpansion="1"
-				AdditionalIncludeDirectories="..\..\..;..\..\masmx86"
-				PreprocessorDefinitions="WIN32,ZLIB_WINAPI,ASMV,ASMINF"
-				StringPooling="TRUE"
-				ExceptionHandling="FALSE"
-				RuntimeLibrary="0"
-				EnableFunctionLevelLinking="TRUE"
-				PrecompiledHeaderFile=".\zlibDllWithoutCrtDll/zlibvc.pch"
-				AssemblerOutput="2"
-				AssemblerListingLocation=".\zlibDllWithoutCrtDll/"
-				ObjectFile=".\zlibDllWithoutCrtDll/"
-				ProgramDataBaseFileName=".\zlibDllWithoutCrtDll/"
-				BrowseInformation="1"
-				WarningLevel="3"
-				SuppressStartupBanner="TRUE"/>
-			<Tool
-				Name="VCCustomBuildTool"/>
-			<Tool
-				Name="VCLinkerTool"
-				AdditionalOptions="/MACHINE:I386"
-				AdditionalDependencies="..\..\masmx86\gvmat32.obj ..\..\masmx86\inffas32.obj "
-				OutputFile=".\zlibDllWithoutCrtDll\zlibwapi.dll"
-				LinkIncremental="1"
-				SuppressStartupBanner="TRUE"
-				IgnoreAllDefaultLibraries="FALSE"
-				ModuleDefinitionFile=".\zlibvc.def"
-				ProgramDatabaseFile=".\zlibDllWithoutCrtDll/zlibwapi.pdb"
-				GenerateMapFile="TRUE"
-				MapFileName=".\zlibDllWithoutCrtDll/zlibwapi.map"
-				SubSystem="2"
-				OptimizeForWindows98="1"
-				ImportLibrary=".\zlibDllWithoutCrtDll/zlibwapi.lib"/>
-			<Tool
-				Name="VCMIDLTool"
-				PreprocessorDefinitions="NDEBUG"
-				MkTypLibCompatible="TRUE"
-				SuppressStartupBanner="TRUE"
-				TargetEnvironment="1"
-				TypeLibraryName=".\zlibDllWithoutCrtDll/zlibvc.tlb"/>
-			<Tool
-				Name="VCPostBuildEventTool"/>
-			<Tool
-				Name="VCPreBuildEventTool"/>
-			<Tool
-				Name="VCPreLinkEventTool"/>
-			<Tool
-				Name="VCResourceCompilerTool"
-				PreprocessorDefinitions="NDEBUG"
-				Culture="1036"/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"/>
-			<Tool
-				Name="VCWebDeploymentTool"/>
-		</Configuration>
-		<Configuration
-			Name="ReleaseAxp|Win32"
-			OutputDirectory=".\zlibvc__"
-			IntermediateDirectory=".\zlibvc__"
-			ConfigurationType="2"
-			UseOfMFC="0"
-			ATLMinimizesCRunTimeLibraryUsage="FALSE"
-			WholeProgramOptimization="TRUE">
-			<Tool
-				Name="VCCLCompilerTool"
-				InlineFunctionExpansion="1"
-				AdditionalIncludeDirectories="..\..\..;..\..\masmx86"
-				PreprocessorDefinitions="WIN32,ZLIB_WINAPI"
-				StringPooling="TRUE"
-				ExceptionHandling="FALSE"
-				RuntimeLibrary="0"
-				EnableFunctionLevelLinking="TRUE"
-				PrecompiledHeaderFile=".\zlibvc__/zlibvc.pch"
-				AssemblerOutput="2"
-				AssemblerListingLocation=".\zlibvc__/"
-				ObjectFile=".\zlibvc__/"
-				ProgramDataBaseFileName=".\zlibvc__/"
-				BrowseInformation="1"
-				WarningLevel="3"
-				SuppressStartupBanner="TRUE"/>
-			<Tool
-				Name="VCCustomBuildTool"/>
-			<Tool
-				Name="VCLinkerTool"
-				AdditionalDependencies="crtdll.lib"
-				OutputFile="zlibvc__\zlibwapi.dll"
-				LinkIncremental="1"
-				SuppressStartupBanner="TRUE"
-				IgnoreAllDefaultLibraries="TRUE"
-				ModuleDefinitionFile=".\zlibvc.def"
-				ProgramDatabaseFile=".\zlibvc__/zlibwapi.pdb"
-				GenerateMapFile="TRUE"
-				MapFileName=".\zlibvc__/zlibwapi.map"
-				SubSystem="2"
-				ImportLibrary=".\zlibvc__/zlibwapi.lib"/>
-			<Tool
-				Name="VCMIDLTool"
-				PreprocessorDefinitions="NDEBUG"
-				MkTypLibCompatible="TRUE"
-				SuppressStartupBanner="TRUE"
-				TargetEnvironment="1"
-				TypeLibraryName=".\zlibvc__/zlibvc.tlb"/>
-			<Tool
-				Name="VCPostBuildEventTool"/>
-			<Tool
-				Name="VCPreBuildEventTool"/>
-			<Tool
-				Name="VCPreLinkEventTool"/>
-			<Tool
-				Name="VCResourceCompilerTool"
-				PreprocessorDefinitions="NDEBUG"
-				Culture="1036"/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"/>
-			<Tool
-				Name="VCWebDeploymentTool"/>
-		</Configuration>
-		<Configuration
-			Name="Release|Win32"
-			OutputDirectory=".\ReleaseDll"
-			IntermediateDirectory=".\ReleaseDll"
-			ConfigurationType="2"
-			UseOfMFC="0"
-			ATLMinimizesCRunTimeLibraryUsage="FALSE"
-			WholeProgramOptimization="TRUE">
-			<Tool
-				Name="VCCLCompilerTool"
-				InlineFunctionExpansion="1"
-				AdditionalIncludeDirectories="..\..\..;..\..\masmx86"
-				PreprocessorDefinitions="WIN32,ZLIB_WINAPI,ASMV,ASMINF"
-				StringPooling="TRUE"
-				ExceptionHandling="FALSE"
-				RuntimeLibrary="0"
-				EnableFunctionLevelLinking="TRUE"
-				PrecompiledHeaderFile=".\ReleaseDll/zlibvc.pch"
-				AssemblerOutput="2"
-				AssemblerListingLocation=".\ReleaseDll/"
-				ObjectFile=".\ReleaseDll/"
-				ProgramDataBaseFileName=".\ReleaseDll/"
-				BrowseInformation="1"
-				WarningLevel="3"
-				SuppressStartupBanner="TRUE"/>
-			<Tool
-				Name="VCCustomBuildTool"/>
-			<Tool
-				Name="VCLinkerTool"
-				AdditionalOptions="/MACHINE:I386"
-				AdditionalDependencies="..\..\masmx86\gvmat32.obj ..\..\masmx86\inffas32.obj crtdll.lib"
-				OutputFile=".\ReleaseDll\zlibwapi.dll"
-				LinkIncremental="1"
-				SuppressStartupBanner="TRUE"
-				IgnoreAllDefaultLibraries="TRUE"
-				ModuleDefinitionFile=".\zlibvc.def"
-				ProgramDatabaseFile=".\ReleaseDll/zlibwapi.pdb"
-				GenerateMapFile="TRUE"
-				MapFileName=".\ReleaseDll/zlibwapi.map"
-				SubSystem="2"
-				OptimizeForWindows98="1"
-				ImportLibrary=".\ReleaseDll/zlibwapi.lib"/>
-			<Tool
-				Name="VCMIDLTool"
-				PreprocessorDefinitions="NDEBUG"
-				MkTypLibCompatible="TRUE"
-				SuppressStartupBanner="TRUE"
-				TargetEnvironment="1"
-				TypeLibraryName=".\Release/zlibvc.tlb"/>
-			<Tool
-				Name="VCPostBuildEventTool"/>
-			<Tool
-				Name="VCPreBuildEventTool"/>
-			<Tool
-				Name="VCPreLinkEventTool"/>
-			<Tool
-				Name="VCResourceCompilerTool"
-				PreprocessorDefinitions="NDEBUG"
-				Culture="1036"/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"/>
-			<Tool
-				Name="VCWebDeploymentTool"/>
-		</Configuration>
-	</Configurations>
-	<Files>
-		<Filter
-			Name="Source Files"
-			Filter="cpp;c;cxx;rc;def;r;odl;hpj;bat;for;f90">
-			<File
-				RelativePath="..\..\..\adler32.c">
-			</File>
-			<File
-				RelativePath="..\..\..\compress.c">
-			</File>
-			<File
-				RelativePath="..\..\..\crc32.c">
-			</File>
-			<File
-				RelativePath="..\..\..\deflate.c">
-			</File>
-			<File
-				RelativePath="..\..\masmx86\gvmat32c.c">
-				<FileConfiguration
-					Name="ReleaseWithoutAsm|Win32"
-					ExcludedFromBuild="TRUE">
-					<Tool
-						Name="VCCLCompilerTool"/>
-				</FileConfiguration>
-			</File>
-			<File
-				RelativePath="..\..\..\gzio.c">
-			</File>
-			<File
-				RelativePath="..\..\..\infback.c">
-			</File>
-			<File
-				RelativePath="..\..\..\inffast.c">
-			</File>
-			<File
-				RelativePath="..\..\..\inflate.c">
-			</File>
-			<File
-				RelativePath="..\..\..\inftrees.c">
-			</File>
-			<File
-				RelativePath="..\..\minizip\ioapi.c">
-			</File>
-			<File
-				RelativePath="..\..\minizip\iowin32.c">
-			</File>
-			<File
-				RelativePath="..\..\..\trees.c">
-			</File>
-			<File
-				RelativePath="..\..\..\uncompr.c">
-			</File>
-			<File
-				RelativePath="..\..\minizip\unzip.c">
-				<FileConfiguration
-					Name="Release|Win32">
-					<Tool
-						Name="VCCLCompilerTool"
-						AdditionalIncludeDirectories=""
-						PreprocessorDefinitions="ZLIB_INTERNAL"/>
-				</FileConfiguration>
-			</File>
-			<File
-				RelativePath="..\..\minizip\zip.c">
-				<FileConfiguration
-					Name="Release|Win32">
-					<Tool
-						Name="VCCLCompilerTool"
-						AdditionalIncludeDirectories=""
-						PreprocessorDefinitions="ZLIB_INTERNAL"/>
-				</FileConfiguration>
-			</File>
-			<File
-				RelativePath=".\zlib.rc">
-			</File>
-			<File
-				RelativePath=".\zlibvc.def">
-			</File>
-			<File
-				RelativePath="..\..\..\zutil.c">
-			</File>
-		</Filter>
-		<Filter
-			Name="Header Files"
-			Filter="h;hpp;hxx;hm;inl;fi;fd">
-			<File
-				RelativePath="..\..\..\deflate.h">
-			</File>
-			<File
-				RelativePath="..\..\..\infblock.h">
-			</File>
-			<File
-				RelativePath="..\..\..\infcodes.h">
-			</File>
-			<File
-				RelativePath="..\..\..\inffast.h">
-			</File>
-			<File
-				RelativePath="..\..\..\inftrees.h">
-			</File>
-			<File
-				RelativePath="..\..\..\infutil.h">
-			</File>
-			<File
-				RelativePath="..\..\..\zconf.h">
-			</File>
-			<File
-				RelativePath="..\..\..\zlib.h">
-			</File>
-			<File
-				RelativePath="..\..\..\zutil.h">
-			</File>
-		</Filter>
-		<Filter
-			Name="Resource Files"
-			Filter="ico;cur;bmp;dlg;rc2;rct;bin;cnt;rtf;gif;jpg;jpeg;jpe">
-		</Filter>
-	</Files>
-	<Globals>
-	</Globals>
-</VisualStudioProject>
Index: trunk/minix/lib/zlib-1.2.3/contrib/vstudio/vc8/miniunz.vcproj
===================================================================
--- trunk/minix/lib/zlib-1.2.3/contrib/vstudio/vc8/miniunz.vcproj	(revision 9)
+++ 	(revision )
@@ -1,566 +1,0 @@
-<?xml version="1.0" encoding="Windows-1252"?>
-<VisualStudioProject
-	ProjectType="Visual C++"
-	Version="8,00"
-	Name="miniunz"
-	ProjectGUID="{C52F9E7B-498A-42BE-8DB4-85A15694382A}"
-	Keyword="Win32Proj"
-	>
-	<Platforms>
-		<Platform
-			Name="Win32"
-		/>
-		<Platform
-			Name="x64"
-		/>
-		<Platform
-			Name="Itanium"
-		/>
-	</Platforms>
-	<ToolFiles>
-	</ToolFiles>
-	<Configurations>
-		<Configuration
-			Name="Debug|Win32"
-			OutputDirectory="x86\MiniUnzip$(ConfigurationName)"
-			IntermediateDirectory="x86\MiniUnzip$(ConfigurationName)\Tmp"
-			ConfigurationType="1"
-			InheritedPropertySheets="UpgradeFromVC70.vsprops"
-			CharacterSet="2"
-			>
-			<Tool
-				Name="VCPreBuildEventTool"
-			/>
-			<Tool
-				Name="VCCustomBuildTool"
-			/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"
-			/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"
-			/>
-			<Tool
-				Name="VCMIDLTool"
-			/>
-			<Tool
-				Name="VCCLCompilerTool"
-				Optimization="0"
-				AdditionalIncludeDirectories="..\..\..;..\..\minizip"
-				PreprocessorDefinitions="WIN32;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;ZLIB_WINAPI;_DEBUG;_CONSOLE"
-				MinimalRebuild="true"
-				BasicRuntimeChecks="0"
-				RuntimeLibrary="1"
-				BufferSecurityCheck="false"
-				UsePrecompiledHeader="0"
-				AssemblerListingLocation="$(IntDir)\"
-				WarningLevel="3"
-				Detect64BitPortabilityProblems="true"
-				DebugInformationFormat="4"
-			/>
-			<Tool
-				Name="VCManagedResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCPreLinkEventTool"
-			/>
-			<Tool
-				Name="VCLinkerTool"
-				AdditionalDependencies="x86\ZlibDllDebug\zlibwapi.lib"
-				OutputFile="$(OutDir)/miniunz.exe"
-				LinkIncremental="2"
-				GenerateManifest="false"
-				GenerateDebugInformation="true"
-				ProgramDatabaseFile="$(OutDir)/miniunz.pdb"
-				SubSystem="1"
-				TargetMachine="1"
-			/>
-			<Tool
-				Name="VCALinkTool"
-			/>
-			<Tool
-				Name="VCManifestTool"
-			/>
-			<Tool
-				Name="VCXDCMakeTool"
-			/>
-			<Tool
-				Name="VCBscMakeTool"
-			/>
-			<Tool
-				Name="VCFxCopTool"
-			/>
-			<Tool
-				Name="VCAppVerifierTool"
-			/>
-			<Tool
-				Name="VCWebDeploymentTool"
-			/>
-			<Tool
-				Name="VCPostBuildEventTool"
-			/>
-		</Configuration>
-		<Configuration
-			Name="Debug|x64"
-			OutputDirectory="x64\MiniUnzip$(ConfigurationName)"
-			IntermediateDirectory="x64\MiniUnzip$(ConfigurationName)\Tmp"
-			ConfigurationType="1"
-			InheritedPropertySheets="UpgradeFromVC70.vsprops"
-			CharacterSet="2"
-			>
-			<Tool
-				Name="VCPreBuildEventTool"
-			/>
-			<Tool
-				Name="VCCustomBuildTool"
-			/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"
-			/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"
-			/>
-			<Tool
-				Name="VCMIDLTool"
-				TargetEnvironment="3"
-			/>
-			<Tool
-				Name="VCCLCompilerTool"
-				Optimization="0"
-				AdditionalIncludeDirectories="..\..\..;..\..\minizip"
-				PreprocessorDefinitions="_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;ZLIB_WINAPI;_DEBUG;_CONSOLE;WIN64"
-				MinimalRebuild="true"
-				BasicRuntimeChecks="0"
-				RuntimeLibrary="3"
-				BufferSecurityCheck="false"
-				UsePrecompiledHeader="0"
-				AssemblerListingLocation="$(IntDir)\"
-				WarningLevel="3"
-				Detect64BitPortabilityProblems="true"
-				DebugInformationFormat="3"
-			/>
-			<Tool
-				Name="VCManagedResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCPreLinkEventTool"
-			/>
-			<Tool
-				Name="VCLinkerTool"
-				AdditionalDependencies="x64\ZlibDllDebug\zlibwapi.lib"
-				OutputFile="$(OutDir)/miniunz.exe"
-				LinkIncremental="2"
-				GenerateManifest="false"
-				GenerateDebugInformation="true"
-				ProgramDatabaseFile="$(OutDir)/miniunz.pdb"
-				SubSystem="1"
-				TargetMachine="17"
-			/>
-			<Tool
-				Name="VCALinkTool"
-			/>
-			<Tool
-				Name="VCManifestTool"
-			/>
-			<Tool
-				Name="VCXDCMakeTool"
-			/>
-			<Tool
-				Name="VCBscMakeTool"
-			/>
-			<Tool
-				Name="VCFxCopTool"
-			/>
-			<Tool
-				Name="VCAppVerifierTool"
-			/>
-			<Tool
-				Name="VCWebDeploymentTool"
-			/>
-			<Tool
-				Name="VCPostBuildEventTool"
-			/>
-		</Configuration>
-		<Configuration
-			Name="Debug|Itanium"
-			OutputDirectory="ia64\MiniUnzip$(ConfigurationName)"
-			IntermediateDirectory="ia64\MiniUnzip$(ConfigurationName)\Tmp"
-			ConfigurationType="1"
-			InheritedPropertySheets="UpgradeFromVC70.vsprops"
-			CharacterSet="2"
-			>
-			<Tool
-				Name="VCPreBuildEventTool"
-			/>
-			<Tool
-				Name="VCCustomBuildTool"
-			/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"
-			/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"
-			/>
-			<Tool
-				Name="VCMIDLTool"
-				TargetEnvironment="2"
-			/>
-			<Tool
-				Name="VCCLCompilerTool"
-				Optimization="0"
-				AdditionalIncludeDirectories="..\..\..;..\..\minizip"
-				PreprocessorDefinitions="_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;ZLIB_WINAPI;_DEBUG;_CONSOLE;WIN64"
-				MinimalRebuild="true"
-				BasicRuntimeChecks="0"
-				RuntimeLibrary="3"
-				BufferSecurityCheck="false"
-				UsePrecompiledHeader="0"
-				AssemblerListingLocation="$(IntDir)\"
-				WarningLevel="3"
-				Detect64BitPortabilityProblems="true"
-				DebugInformationFormat="3"
-			/>
-			<Tool
-				Name="VCManagedResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCPreLinkEventTool"
-			/>
-			<Tool
-				Name="VCLinkerTool"
-				AdditionalDependencies="ia64\ZlibDllDebug\zlibwapi.lib"
-				OutputFile="$(OutDir)/miniunz.exe"
-				LinkIncremental="2"
-				GenerateManifest="false"
-				GenerateDebugInformation="true"
-				ProgramDatabaseFile="$(OutDir)/miniunz.pdb"
-				SubSystem="1"
-				TargetMachine="5"
-			/>
-			<Tool
-				Name="VCALinkTool"
-			/>
-			<Tool
-				Name="VCManifestTool"
-			/>
-			<Tool
-				Name="VCXDCMakeTool"
-			/>
-			<Tool
-				Name="VCBscMakeTool"
-			/>
-			<Tool
-				Name="VCFxCopTool"
-			/>
-			<Tool
-				Name="VCAppVerifierTool"
-			/>
-			<Tool
-				Name="VCWebDeploymentTool"
-			/>
-			<Tool
-				Name="VCPostBuildEventTool"
-			/>
-		</Configuration>
-		<Configuration
-			Name="Release|Win32"
-			OutputDirectory="x86\MiniUnzip$(ConfigurationName)"
-			IntermediateDirectory="x86\MiniUnzip$(ConfigurationName)\Tmp"
-			ConfigurationType="1"
-			InheritedPropertySheets="UpgradeFromVC70.vsprops"
-			CharacterSet="2"
-			>
-			<Tool
-				Name="VCPreBuildEventTool"
-			/>
-			<Tool
-				Name="VCCustomBuildTool"
-			/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"
-			/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"
-			/>
-			<Tool
-				Name="VCMIDLTool"
-			/>
-			<Tool
-				Name="VCCLCompilerTool"
-				Optimization="2"
-				InlineFunctionExpansion="1"
-				OmitFramePointers="true"
-				AdditionalIncludeDirectories="..\..\..;..\..\minizip"
-				PreprocessorDefinitions="WIN32;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;ZLIB_WINAPI;NDEBUG;_CONSOLE"
-				StringPooling="true"
-				BasicRuntimeChecks="0"
-				RuntimeLibrary="0"
-				BufferSecurityCheck="false"
-				EnableFunctionLevelLinking="true"
-				UsePrecompiledHeader="0"
-				AssemblerListingLocation="$(IntDir)\"
-				WarningLevel="3"
-				Detect64BitPortabilityProblems="true"
-				DebugInformationFormat="3"
-			/>
-			<Tool
-				Name="VCManagedResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCPreLinkEventTool"
-			/>
-			<Tool
-				Name="VCLinkerTool"
-				AdditionalDependencies="x86\ZlibDllRelease\zlibwapi.lib"
-				OutputFile="$(OutDir)/miniunz.exe"
-				LinkIncremental="1"
-				GenerateManifest="false"
-				GenerateDebugInformation="true"
-				SubSystem="1"
-				OptimizeReferences="2"
-				EnableCOMDATFolding="2"
-				OptimizeForWindows98="1"
-				TargetMachine="1"
-			/>
-			<Tool
-				Name="VCALinkTool"
-			/>
-			<Tool
-				Name="VCManifestTool"
-			/>
-			<Tool
-				Name="VCXDCMakeTool"
-			/>
-			<Tool
-				Name="VCBscMakeTool"
-			/>
-			<Tool
-				Name="VCFxCopTool"
-			/>
-			<Tool
-				Name="VCAppVerifierTool"
-			/>
-			<Tool
-				Name="VCWebDeploymentTool"
-			/>
-			<Tool
-				Name="VCPostBuildEventTool"
-			/>
-		</Configuration>
-		<Configuration
-			Name="Release|x64"
-			OutputDirectory="x64\MiniUnzip$(ConfigurationName)"
-			IntermediateDirectory="x64\MiniUnzip$(ConfigurationName)\Tmp"
-			ConfigurationType="1"
-			InheritedPropertySheets="UpgradeFromVC70.vsprops"
-			CharacterSet="2"
-			>
-			<Tool
-				Name="VCPreBuildEventTool"
-			/>
-			<Tool
-				Name="VCCustomBuildTool"
-			/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"
-			/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"
-			/>
-			<Tool
-				Name="VCMIDLTool"
-				TargetEnvironment="3"
-			/>
-			<Tool
-				Name="VCCLCompilerTool"
-				Optimization="2"
-				InlineFunctionExpansion="1"
-				OmitFramePointers="true"
-				AdditionalIncludeDirectories="..\..\..;..\..\minizip"
-				PreprocessorDefinitions="_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;ZLIB_WINAPI;NDEBUG;_CONSOLE;WIN64"
-				StringPooling="true"
-				BasicRuntimeChecks="0"
-				RuntimeLibrary="2"
-				BufferSecurityCheck="false"
-				EnableFunctionLevelLinking="true"
-				UsePrecompiledHeader="0"
-				AssemblerListingLocation="$(IntDir)\"
-				WarningLevel="3"
-				Detect64BitPortabilityProblems="true"
-				DebugInformationFormat="3"
-			/>
-			<Tool
-				Name="VCManagedResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCPreLinkEventTool"
-			/>
-			<Tool
-				Name="VCLinkerTool"
-				AdditionalDependencies="x64\ZlibDllRelease\zlibwapi.lib"
-				OutputFile="$(OutDir)/miniunz.exe"
-				LinkIncremental="1"
-				GenerateManifest="false"
-				GenerateDebugInformation="true"
-				SubSystem="1"
-				OptimizeReferences="2"
-				EnableCOMDATFolding="2"
-				OptimizeForWindows98="1"
-				TargetMachine="17"
-			/>
-			<Tool
-				Name="VCALinkTool"
-			/>
-			<Tool
-				Name="VCManifestTool"
-			/>
-			<Tool
-				Name="VCXDCMakeTool"
-			/>
-			<Tool
-				Name="VCBscMakeTool"
-			/>
-			<Tool
-				Name="VCFxCopTool"
-			/>
-			<Tool
-				Name="VCAppVerifierTool"
-			/>
-			<Tool
-				Name="VCWebDeploymentTool"
-			/>
-			<Tool
-				Name="VCPostBuildEventTool"
-			/>
-		</Configuration>
-		<Configuration
-			Name="Release|Itanium"
-			OutputDirectory="ia64\MiniUnzip$(ConfigurationName)"
-			IntermediateDirectory="ia64\MiniUnzip$(ConfigurationName)\Tmp"
-			ConfigurationType="1"
-			InheritedPropertySheets="UpgradeFromVC70.vsprops"
-			CharacterSet="2"
-			>
-			<Tool
-				Name="VCPreBuildEventTool"
-			/>
-			<Tool
-				Name="VCCustomBuildTool"
-			/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"
-			/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"
-			/>
-			<Tool
-				Name="VCMIDLTool"
-				TargetEnvironment="2"
-			/>
-			<Tool
-				Name="VCCLCompilerTool"
-				Optimization="2"
-				InlineFunctionExpansion="1"
-				OmitFramePointers="true"
-				AdditionalIncludeDirectories="..\..\..;..\..\minizip"
-				PreprocessorDefinitions="_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;ZLIB_WINAPI;NDEBUG;_CONSOLE;WIN64"
-				StringPooling="true"
-				BasicRuntimeChecks="0"
-				RuntimeLibrary="2"
-				BufferSecurityCheck="false"
-				EnableFunctionLevelLinking="true"
-				UsePrecompiledHeader="0"
-				AssemblerListingLocation="$(IntDir)\"
-				WarningLevel="3"
-				Detect64BitPortabilityProblems="true"
-				DebugInformationFormat="3"
-			/>
-			<Tool
-				Name="VCManagedResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCPreLinkEventTool"
-			/>
-			<Tool
-				Name="VCLinkerTool"
-				AdditionalDependencies="ia64\ZlibDllRelease\zlibwapi.lib"
-				OutputFile="$(OutDir)/miniunz.exe"
-				LinkIncremental="1"
-				GenerateManifest="false"
-				GenerateDebugInformation="true"
-				SubSystem="1"
-				OptimizeReferences="2"
-				EnableCOMDATFolding="2"
-				OptimizeForWindows98="1"
-				TargetMachine="5"
-			/>
-			<Tool
-				Name="VCALinkTool"
-			/>
-			<Tool
-				Name="VCManifestTool"
-			/>
-			<Tool
-				Name="VCXDCMakeTool"
-			/>
-			<Tool
-				Name="VCBscMakeTool"
-			/>
-			<Tool
-				Name="VCFxCopTool"
-			/>
-			<Tool
-				Name="VCAppVerifierTool"
-			/>
-			<Tool
-				Name="VCWebDeploymentTool"
-			/>
-			<Tool
-				Name="VCPostBuildEventTool"
-			/>
-		</Configuration>
-	</Configurations>
-	<References>
-	</References>
-	<Files>
-		<Filter
-			Name="Source Files"
-			Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm"
-			>
-			<File
-				RelativePath="..\..\minizip\miniunz.c"
-				>
-			</File>
-		</Filter>
-		<Filter
-			Name="Header Files"
-			Filter="h;hpp;hxx;hm;inl;inc"
-			>
-		</Filter>
-		<Filter
-			Name="Resource Files"
-			Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
-			>
-		</Filter>
-	</Files>
-	<Globals>
-	</Globals>
-</VisualStudioProject>
Index: trunk/minix/lib/zlib-1.2.3/contrib/vstudio/vc8/minizip.vcproj
===================================================================
--- trunk/minix/lib/zlib-1.2.3/contrib/vstudio/vc8/minizip.vcproj	(revision 9)
+++ 	(revision )
@@ -1,563 +1,0 @@
-<?xml version="1.0" encoding="Windows-1252"?>
-<VisualStudioProject
-	ProjectType="Visual C++"
-	Version="8,00"
-	Name="minizip"
-	ProjectGUID="{48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}"
-	Keyword="Win32Proj"
-	>
-	<Platforms>
-		<Platform
-			Name="Win32"
-		/>
-		<Platform
-			Name="x64"
-		/>
-		<Platform
-			Name="Itanium"
-		/>
-	</Platforms>
-	<ToolFiles>
-	</ToolFiles>
-	<Configurations>
-		<Configuration
-			Name="Debug|Win32"
-			OutputDirectory="x86\MiniZip$(ConfigurationName)"
-			IntermediateDirectory="x86\MiniZip$(ConfigurationName)\Tmp"
-			ConfigurationType="1"
-			InheritedPropertySheets="UpgradeFromVC70.vsprops"
-			CharacterSet="2"
-			>
-			<Tool
-				Name="VCPreBuildEventTool"
-			/>
-			<Tool
-				Name="VCCustomBuildTool"
-			/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"
-			/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"
-			/>
-			<Tool
-				Name="VCMIDLTool"
-			/>
-			<Tool
-				Name="VCCLCompilerTool"
-				Optimization="0"
-				AdditionalIncludeDirectories="..\..\..;..\..\minizip"
-				PreprocessorDefinitions="WIN32;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;ZLIB_WINAPI;_DEBUG;_CONSOLE"
-				MinimalRebuild="true"
-				BasicRuntimeChecks="0"
-				RuntimeLibrary="1"
-				BufferSecurityCheck="false"
-				UsePrecompiledHeader="0"
-				AssemblerListingLocation="$(IntDir)\"
-				WarningLevel="3"
-				Detect64BitPortabilityProblems="true"
-				DebugInformationFormat="4"
-			/>
-			<Tool
-				Name="VCManagedResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCPreLinkEventTool"
-			/>
-			<Tool
-				Name="VCLinkerTool"
-				AdditionalDependencies="x86\ZlibDllDebug\zlibwapi.lib"
-				OutputFile="$(OutDir)/minizip.exe"
-				LinkIncremental="2"
-				GenerateManifest="false"
-				GenerateDebugInformation="true"
-				ProgramDatabaseFile="$(OutDir)/minizip.pdb"
-				SubSystem="1"
-				TargetMachine="1"
-			/>
-			<Tool
-				Name="VCALinkTool"
-			/>
-			<Tool
-				Name="VCManifestTool"
-			/>
-			<Tool
-				Name="VCXDCMakeTool"
-			/>
-			<Tool
-				Name="VCBscMakeTool"
-			/>
-			<Tool
-				Name="VCFxCopTool"
-			/>
-			<Tool
-				Name="VCAppVerifierTool"
-			/>
-			<Tool
-				Name="VCWebDeploymentTool"
-			/>
-			<Tool
-				Name="VCPostBuildEventTool"
-			/>
-		</Configuration>
-		<Configuration
-			Name="Debug|x64"
-			OutputDirectory="x64\$(ConfigurationName)"
-			IntermediateDirectory="x64\$(ConfigurationName)"
-			ConfigurationType="1"
-			InheritedPropertySheets="UpgradeFromVC70.vsprops"
-			CharacterSet="2"
-			>
-			<Tool
-				Name="VCPreBuildEventTool"
-			/>
-			<Tool
-				Name="VCCustomBuildTool"
-			/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"
-			/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"
-			/>
-			<Tool
-				Name="VCMIDLTool"
-				TargetEnvironment="3"
-			/>
-			<Tool
-				Name="VCCLCompilerTool"
-				Optimization="0"
-				AdditionalIncludeDirectories="..\..\..;..\..\minizip"
-				PreprocessorDefinitions="_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;ZLIB_WINAPI;_DEBUG;_CONSOLE;WIN64"
-				MinimalRebuild="true"
-				BasicRuntimeChecks="0"
-				RuntimeLibrary="3"
-				BufferSecurityCheck="false"
-				UsePrecompiledHeader="0"
-				AssemblerListingLocation="$(IntDir)\"
-				WarningLevel="3"
-				Detect64BitPortabilityProblems="true"
-				DebugInformationFormat="3"
-			/>
-			<Tool
-				Name="VCManagedResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCPreLinkEventTool"
-			/>
-			<Tool
-				Name="VCLinkerTool"
-				AdditionalDependencies="x64\ZlibDllDebug\zlibwapi.lib"
-				OutputFile="$(OutDir)/minizip.exe"
-				LinkIncremental="2"
-				GenerateManifest="false"
-				GenerateDebugInformation="true"
-				ProgramDatabaseFile="$(OutDir)/minizip.pdb"
-				SubSystem="1"
-				TargetMachine="17"
-			/>
-			<Tool
-				Name="VCALinkTool"
-			/>
-			<Tool
-				Name="VCManifestTool"
-			/>
-			<Tool
-				Name="VCXDCMakeTool"
-			/>
-			<Tool
-				Name="VCBscMakeTool"
-			/>
-			<Tool
-				Name="VCFxCopTool"
-			/>
-			<Tool
-				Name="VCAppVerifierTool"
-			/>
-			<Tool
-				Name="VCWebDeploymentTool"
-			/>
-			<Tool
-				Name="VCPostBuildEventTool"
-			/>
-		</Configuration>
-		<Configuration
-			Name="Debug|Itanium"
-			OutputDirectory="ia64\$(ConfigurationName)"
-			IntermediateDirectory="ia64\$(ConfigurationName)"
-			ConfigurationType="1"
-			InheritedPropertySheets="UpgradeFromVC70.vsprops"
-			CharacterSet="2"
-			>
-			<Tool
-				Name="VCPreBuildEventTool"
-			/>
-			<Tool
-				Name="VCCustomBuildTool"
-			/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"
-			/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"
-			/>
-			<Tool
-				Name="VCMIDLTool"
-				TargetEnvironment="2"
-			/>
-			<Tool
-				Name="VCCLCompilerTool"
-				Optimization="0"
-				AdditionalIncludeDirectories="..\..\..;..\..\minizip"
-				PreprocessorDefinitions="_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;ZLIB_WINAPI;_DEBUG;_CONSOLE;WIN64"
-				MinimalRebuild="true"
-				BasicRuntimeChecks="0"
-				RuntimeLibrary="3"
-				BufferSecurityCheck="false"
-				UsePrecompiledHeader="0"
-				AssemblerListingLocation="$(IntDir)\"
-				WarningLevel="3"
-				Detect64BitPortabilityProblems="true"
-				DebugInformationFormat="3"
-			/>
-			<Tool
-				Name="VCManagedResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCPreLinkEventTool"
-			/>
-			<Tool
-				Name="VCLinkerTool"
-				AdditionalDependencies="ia64\ZlibDllDebug\zlibwapi.lib"
-				OutputFile="$(OutDir)/minizip.exe"
-				LinkIncremental="2"
-				GenerateManifest="false"
-				GenerateDebugInformation="true"
-				ProgramDatabaseFile="$(OutDir)/minizip.pdb"
-				SubSystem="1"
-				TargetMachine="5"
-			/>
-			<Tool
-				Name="VCALinkTool"
-			/>
-			<Tool
-				Name="VCManifestTool"
-			/>
-			<Tool
-				Name="VCXDCMakeTool"
-			/>
-			<Tool
-				Name="VCBscMakeTool"
-			/>
-			<Tool
-				Name="VCFxCopTool"
-			/>
-			<Tool
-				Name="VCAppVerifierTool"
-			/>
-			<Tool
-				Name="VCWebDeploymentTool"
-			/>
-			<Tool
-				Name="VCPostBuildEventTool"
-			/>
-		</Configuration>
-		<Configuration
-			Name="Release|Win32"
-			OutputDirectory="x86\MiniZip$(ConfigurationName)"
-			IntermediateDirectory="x86\MiniZip$(ConfigurationName)\Tmp"
-			ConfigurationType="1"
-			InheritedPropertySheets="UpgradeFromVC70.vsprops"
-			CharacterSet="2"
-			>
-			<Tool
-				Name="VCPreBuildEventTool"
-			/>
-			<Tool
-				Name="VCCustomBuildTool"
-			/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"
-			/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"
-			/>
-			<Tool
-				Name="VCMIDLTool"
-			/>
-			<Tool
-				Name="VCCLCompilerTool"
-				Optimization="2"
-				InlineFunctionExpansion="1"
-				OmitFramePointers="true"
-				AdditionalIncludeDirectories="..\..\..;..\..\minizip"
-				PreprocessorDefinitions="WIN32;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;ZLIB_WINAPI;NDEBUG;_CONSOLE"
-				StringPooling="true"
-				BasicRuntimeChecks="0"
-				RuntimeLibrary="0"
-				BufferSecurityCheck="false"
-				EnableFunctionLevelLinking="true"
-				UsePrecompiledHeader="0"
-				AssemblerListingLocation="$(IntDir)\"
-				WarningLevel="3"
-				Detect64BitPortabilityProblems="true"
-				DebugInformationFormat="3"
-			/>
-			<Tool
-				Name="VCManagedResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCPreLinkEventTool"
-			/>
-			<Tool
-				Name="VCLinkerTool"
-				AdditionalDependencies="x86\ZlibDllRelease\zlibwapi.lib"
-				OutputFile="$(OutDir)/minizip.exe"
-				LinkIncremental="1"
-				GenerateDebugInformation="true"
-				SubSystem="1"
-				OptimizeReferences="2"
-				EnableCOMDATFolding="2"
-				OptimizeForWindows98="1"
-				TargetMachine="1"
-			/>
-			<Tool
-				Name="VCALinkTool"
-			/>
-			<Tool
-				Name="VCManifestTool"
-			/>
-			<Tool
-				Name="VCXDCMakeTool"
-			/>
-			<Tool
-				Name="VCBscMakeTool"
-			/>
-			<Tool
-				Name="VCFxCopTool"
-			/>
-			<Tool
-				Name="VCAppVerifierTool"
-			/>
-			<Tool
-				Name="VCWebDeploymentTool"
-			/>
-			<Tool
-				Name="VCPostBuildEventTool"
-			/>
-		</Configuration>
-		<Configuration
-			Name="Release|x64"
-			OutputDirectory="x64\$(ConfigurationName)"
-			IntermediateDirectory="x64\$(ConfigurationName)"
-			ConfigurationType="1"
-			InheritedPropertySheets="UpgradeFromVC70.vsprops"
-			CharacterSet="2"
-			>
-			<Tool
-				Name="VCPreBuildEventTool"
-			/>
-			<Tool
-				Name="VCCustomBuildTool"
-			/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"
-			/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"
-			/>
-			<Tool
-				Name="VCMIDLTool"
-				TargetEnvironment="3"
-			/>
-			<Tool
-				Name="VCCLCompilerTool"
-				Optimization="2"
-				InlineFunctionExpansion="1"
-				OmitFramePointers="true"
-				AdditionalIncludeDirectories="..\..\..;..\..\minizip"
-				PreprocessorDefinitions="_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;ZLIB_WINAPI;NDEBUG;_CONSOLE;WIN64"
-				StringPooling="true"
-				BasicRuntimeChecks="0"
-				RuntimeLibrary="2"
-				BufferSecurityCheck="false"
-				EnableFunctionLevelLinking="true"
-				UsePrecompiledHeader="0"
-				AssemblerListingLocation="$(IntDir)\"
-				WarningLevel="3"
-				Detect64BitPortabilityProblems="true"
-				DebugInformationFormat="3"
-			/>
-			<Tool
-				Name="VCManagedResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCPreLinkEventTool"
-			/>
-			<Tool
-				Name="VCLinkerTool"
-				AdditionalDependencies="x64\ZlibDllRelease\zlibwapi.lib"
-				OutputFile="$(OutDir)/minizip.exe"
-				LinkIncremental="1"
-				GenerateDebugInformation="true"
-				SubSystem="1"
-				OptimizeReferences="2"
-				EnableCOMDATFolding="2"
-				OptimizeForWindows98="1"
-				TargetMachine="17"
-			/>
-			<Tool
-				Name="VCALinkTool"
-			/>
-			<Tool
-				Name="VCManifestTool"
-			/>
-			<Tool
-				Name="VCXDCMakeTool"
-			/>
-			<Tool
-				Name="VCBscMakeTool"
-			/>
-			<Tool
-				Name="VCFxCopTool"
-			/>
-			<Tool
-				Name="VCAppVerifierTool"
-			/>
-			<Tool
-				Name="VCWebDeploymentTool"
-			/>
-			<Tool
-				Name="VCPostBuildEventTool"
-			/>
-		</Configuration>
-		<Configuration
-			Name="Release|Itanium"
-			OutputDirectory="ia64\$(ConfigurationName)"
-			IntermediateDirectory="ia64\$(ConfigurationName)"
-			ConfigurationType="1"
-			InheritedPropertySheets="UpgradeFromVC70.vsprops"
-			CharacterSet="2"
-			>
-			<Tool
-				Name="VCPreBuildEventTool"
-			/>
-			<Tool
-				Name="VCCustomBuildTool"
-			/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"
-			/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"
-			/>
-			<Tool
-				Name="VCMIDLTool"
-				TargetEnvironment="2"
-			/>
-			<Tool
-				Name="VCCLCompilerTool"
-				Optimization="2"
-				InlineFunctionExpansion="1"
-				OmitFramePointers="true"
-				AdditionalIncludeDirectories="..\..\..;..\..\minizip"
-				PreprocessorDefinitions="_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;ZLIB_WINAPI;NDEBUG;_CONSOLE;WIN64"
-				StringPooling="true"
-				BasicRuntimeChecks="0"
-				RuntimeLibrary="2"
-				BufferSecurityCheck="false"
-				EnableFunctionLevelLinking="true"
-				UsePrecompiledHeader="0"
-				AssemblerListingLocation="$(IntDir)\"
-				WarningLevel="3"
-				Detect64BitPortabilityProblems="true"
-				DebugInformationFormat="3"
-			/>
-			<Tool
-				Name="VCManagedResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCPreLinkEventTool"
-			/>
-			<Tool
-				Name="VCLinkerTool"
-				AdditionalDependencies="ia64\ZlibDllRelease\zlibwapi.lib"
-				OutputFile="$(OutDir)/minizip.exe"
-				LinkIncremental="1"
-				GenerateDebugInformation="true"
-				SubSystem="1"
-				OptimizeReferences="2"
-				EnableCOMDATFolding="2"
-				OptimizeForWindows98="1"
-				TargetMachine="5"
-			/>
-			<Tool
-				Name="VCALinkTool"
-			/>
-			<Tool
-				Name="VCManifestTool"
-			/>
-			<Tool
-				Name="VCXDCMakeTool"
-			/>
-			<Tool
-				Name="VCBscMakeTool"
-			/>
-			<Tool
-				Name="VCFxCopTool"
-			/>
-			<Tool
-				Name="VCAppVerifierTool"
-			/>
-			<Tool
-				Name="VCWebDeploymentTool"
-			/>
-			<Tool
-				Name="VCPostBuildEventTool"
-			/>
-		</Configuration>
-	</Configurations>
-	<References>
-	</References>
-	<Files>
-		<Filter
-			Name="Source Files"
-			Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm"
-			>
-			<File
-				RelativePath="..\..\minizip\minizip.c"
-				>
-			</File>
-		</Filter>
-		<Filter
-			Name="Header Files"
-			Filter="h;hpp;hxx;hm;inl;inc"
-			>
-		</Filter>
-		<Filter
-			Name="Resource Files"
-			Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
-			>
-		</Filter>
-	</Files>
-	<Globals>
-	</Globals>
-</VisualStudioProject>
Index: trunk/minix/lib/zlib-1.2.3/contrib/vstudio/vc8/testzlib.vcproj
===================================================================
--- trunk/minix/lib/zlib-1.2.3/contrib/vstudio/vc8/testzlib.vcproj	(revision 9)
+++ 	(revision )
@@ -1,948 +1,0 @@
-<?xml version="1.0" encoding="Windows-1252"?>
-<VisualStudioProject
-	ProjectType="Visual C++"
-	Version="8,00"
-	Name="testzlib"
-	ProjectGUID="{AA6666AA-E09F-4135-9C0C-4FE50C3C654B}"
-	RootNamespace="testzlib"
-	Keyword="Win32Proj"
-	>
-	<Platforms>
-		<Platform
-			Name="Win32"
-		/>
-		<Platform
-			Name="x64"
-		/>
-		<Platform
-			Name="Itanium"
-		/>
-	</Platforms>
-	<ToolFiles>
-	</ToolFiles>
-	<Configurations>
-		<Configuration
-			Name="Debug|Win32"
-			OutputDirectory="x86\TestZlib$(ConfigurationName)"
-			IntermediateDirectory="x86\TestZlib$(ConfigurationName)\Tmp"
-			ConfigurationType="1"
-			CharacterSet="2"
-			>
-			<Tool
-				Name="VCPreBuildEventTool"
-			/>
-			<Tool
-				Name="VCCustomBuildTool"
-			/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"
-			/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"
-			/>
-			<Tool
-				Name="VCMIDLTool"
-			/>
-			<Tool
-				Name="VCCLCompilerTool"
-				Optimization="0"
-				AdditionalIncludeDirectories="..\..\.."
-				PreprocessorDefinitions="ASMV;ASMINF;WIN32;ZLIB_WINAPI;_DEBUG;_CONSOLE;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE"
-				MinimalRebuild="true"
-				BasicRuntimeChecks="0"
-				RuntimeLibrary="1"
-				BufferSecurityCheck="false"
-				UsePrecompiledHeader="0"
-				AssemblerOutput="4"
-				AssemblerListingLocation="$(IntDir)\"
-				WarningLevel="3"
-				Detect64BitPortabilityProblems="true"
-				DebugInformationFormat="4"
-			/>
-			<Tool
-				Name="VCManagedResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCPreLinkEventTool"
-			/>
-			<Tool
-				Name="VCLinkerTool"
-				AdditionalDependencies="..\..\masmx86\gvmat32.obj ..\..\masmx86\inffas32.obj"
-				OutputFile="$(OutDir)/testzlib.exe"
-				LinkIncremental="2"
-				GenerateManifest="false"
-				GenerateDebugInformation="true"
-				ProgramDatabaseFile="$(OutDir)/testzlib.pdb"
-				SubSystem="1"
-				TargetMachine="1"
-			/>
-			<Tool
-				Name="VCALinkTool"
-			/>
-			<Tool
-				Name="VCManifestTool"
-			/>
-			<Tool
-				Name="VCXDCMakeTool"
-			/>
-			<Tool
-				Name="VCBscMakeTool"
-			/>
-			<Tool
-				Name="VCFxCopTool"
-			/>
-			<Tool
-				Name="VCAppVerifierTool"
-			/>
-			<Tool
-				Name="VCWebDeploymentTool"
-			/>
-			<Tool
-				Name="VCPostBuildEventTool"
-			/>
-		</Configuration>
-		<Configuration
-			Name="Debug|x64"
-			OutputDirectory="x64\TestZlib$(ConfigurationName)"
-			IntermediateDirectory="x64\TestZlib$(ConfigurationName)\Tmp"
-			ConfigurationType="1"
-			>
-			<Tool
-				Name="VCPreBuildEventTool"
-			/>
-			<Tool
-				Name="VCCustomBuildTool"
-			/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"
-			/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"
-			/>
-			<Tool
-				Name="VCMIDLTool"
-			/>
-			<Tool
-				Name="VCCLCompilerTool"
-				AdditionalIncludeDirectories="..\..\.."
-				PreprocessorDefinitions="ASMV;ASMINF;WIN32;ZLIB_WINAPI;_DEBUG;_CONSOLE;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE"
-				BasicRuntimeChecks="0"
-				RuntimeLibrary="3"
-				BufferSecurityCheck="false"
-				AssemblerListingLocation="$(IntDir)\"
-			/>
-			<Tool
-				Name="VCManagedResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCPreLinkEventTool"
-			/>
-			<Tool
-				Name="VCLinkerTool"
-				AdditionalDependencies="..\..\masmx64\gvmat64.obj ..\..\masmx64\inffasx64.obj"
-				GenerateManifest="false"
-			/>
-			<Tool
-				Name="VCALinkTool"
-			/>
-			<Tool
-				Name="VCManifestTool"
-			/>
-			<Tool
-				Name="VCXDCMakeTool"
-			/>
-			<Tool
-				Name="VCBscMakeTool"
-			/>
-			<Tool
-				Name="VCFxCopTool"
-			/>
-			<Tool
-				Name="VCAppVerifierTool"
-			/>
-			<Tool
-				Name="VCWebDeploymentTool"
-			/>
-			<Tool
-				Name="VCPostBuildEventTool"
-			/>
-		</Configuration>
-		<Configuration
-			Name="Debug|Itanium"
-			OutputDirectory="ia64\TestZlib$(ConfigurationName)"
-			IntermediateDirectory="ia64\TestZlib$(ConfigurationName)\Tmp"
-			ConfigurationType="1"
-			CharacterSet="2"
-			>
-			<Tool
-				Name="VCPreBuildEventTool"
-			/>
-			<Tool
-				Name="VCCustomBuildTool"
-			/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"
-			/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"
-			/>
-			<Tool
-				Name="VCMIDLTool"
-				TargetEnvironment="2"
-			/>
-			<Tool
-				Name="VCCLCompilerTool"
-				Optimization="0"
-				AdditionalIncludeDirectories="..\..\.."
-				PreprocessorDefinitions="ZLIB_WINAPI;_DEBUG;_CONSOLE;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;WIN64"
-				MinimalRebuild="true"
-				BasicRuntimeChecks="0"
-				RuntimeLibrary="3"
-				BufferSecurityCheck="false"
-				UsePrecompiledHeader="0"
-				AssemblerOutput="4"
-				AssemblerListingLocation="$(IntDir)\"
-				WarningLevel="3"
-				Detect64BitPortabilityProblems="true"
-				DebugInformationFormat="3"
-			/>
-			<Tool
-				Name="VCManagedResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCPreLinkEventTool"
-			/>
-			<Tool
-				Name="VCLinkerTool"
-				OutputFile="$(OutDir)/testzlib.exe"
-				LinkIncremental="2"
-				GenerateManifest="false"
-				GenerateDebugInformation="true"
-				ProgramDatabaseFile="$(OutDir)/testzlib.pdb"
-				SubSystem="1"
-				TargetMachine="5"
-			/>
-			<Tool
-				Name="VCALinkTool"
-			/>
-			<Tool
-				Name="VCManifestTool"
-			/>
-			<Tool
-				Name="VCXDCMakeTool"
-			/>
-			<Tool
-				Name="VCBscMakeTool"
-			/>
-			<Tool
-				Name="VCFxCopTool"
-			/>
-			<Tool
-				Name="VCAppVerifierTool"
-			/>
-			<Tool
-				Name="VCWebDeploymentTool"
-			/>
-			<Tool
-				Name="VCPostBuildEventTool"
-			/>
-		</Configuration>
-		<Configuration
-			Name="ReleaseWithoutAsm|Win32"
-			OutputDirectory="x86\TestZlib$(ConfigurationName)"
-			IntermediateDirectory="x86\TestZlib$(ConfigurationName)\Tmp"
-			ConfigurationType="1"
-			CharacterSet="2"
-			WholeProgramOptimization="1"
-			>
-			<Tool
-				Name="VCPreBuildEventTool"
-			/>
-			<Tool
-				Name="VCCustomBuildTool"
-			/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"
-			/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"
-			/>
-			<Tool
-				Name="VCMIDLTool"
-			/>
-			<Tool
-				Name="VCCLCompilerTool"
-				Optimization="2"
-				InlineFunctionExpansion="1"
-				OmitFramePointers="true"
-				AdditionalIncludeDirectories="..\..\.."
-				PreprocessorDefinitions="WIN32;ZLIB_WINAPI;NDEBUG;_CONSOLE;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE"
-				StringPooling="true"
-				BasicRuntimeChecks="0"
-				RuntimeLibrary="0"
-				BufferSecurityCheck="false"
-				EnableFunctionLevelLinking="true"
-				UsePrecompiledHeader="0"
-				AssemblerListingLocation="$(IntDir)\"
-				WarningLevel="3"
-				Detect64BitPortabilityProblems="true"
-				DebugInformationFormat="3"
-			/>
-			<Tool
-				Name="VCManagedResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCPreLinkEventTool"
-			/>
-			<Tool
-				Name="VCLinkerTool"
-				OutputFile="$(OutDir)/testzlib.exe"
-				LinkIncremental="1"
-				GenerateManifest="false"
-				GenerateDebugInformation="true"
-				SubSystem="1"
-				OptimizeReferences="2"
-				EnableCOMDATFolding="2"
-				OptimizeForWindows98="1"
-				TargetMachine="1"
-			/>
-			<Tool
-				Name="VCALinkTool"
-			/>
-			<Tool
-				Name="VCManifestTool"
-			/>
-			<Tool
-				Name="VCXDCMakeTool"
-			/>
-			<Tool
-				Name="VCBscMakeTool"
-			/>
-			<Tool
-				Name="VCFxCopTool"
-			/>
-			<Tool
-				Name="VCAppVerifierTool"
-			/>
-			<Tool
-				Name="VCWebDeploymentTool"
-			/>
-			<Tool
-				Name="VCPostBuildEventTool"
-			/>
-		</Configuration>
-		<Configuration
-			Name="ReleaseWithoutAsm|x64"
-			OutputDirectory="x64\TestZlib$(ConfigurationName)"
-			IntermediateDirectory="x64\TestZlib$(ConfigurationName)\Tmp"
-			ConfigurationType="1"
-			WholeProgramOptimization="1"
-			>
-			<Tool
-				Name="VCPreBuildEventTool"
-			/>
-			<Tool
-				Name="VCCustomBuildTool"
-			/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"
-			/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"
-			/>
-			<Tool
-				Name="VCMIDLTool"
-			/>
-			<Tool
-				Name="VCCLCompilerTool"
-				AdditionalIncludeDirectories="..\..\.."
-				PreprocessorDefinitions="WIN32;ZLIB_WINAPI;NDEBUG;_CONSOLE;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE"
-				BasicRuntimeChecks="0"
-				RuntimeLibrary="2"
-				BufferSecurityCheck="false"
-				AssemblerListingLocation="$(IntDir)\"
-			/>
-			<Tool
-				Name="VCManagedResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCPreLinkEventTool"
-			/>
-			<Tool
-				Name="VCLinkerTool"
-				AdditionalDependencies=""
-				GenerateManifest="false"
-			/>
-			<Tool
-				Name="VCALinkTool"
-			/>
-			<Tool
-				Name="VCManifestTool"
-			/>
-			<Tool
-				Name="VCXDCMakeTool"
-			/>
-			<Tool
-				Name="VCBscMakeTool"
-			/>
-			<Tool
-				Name="VCFxCopTool"
-			/>
-			<Tool
-				Name="VCAppVerifierTool"
-			/>
-			<Tool
-				Name="VCWebDeploymentTool"
-			/>
-			<Tool
-				Name="VCPostBuildEventTool"
-			/>
-		</Configuration>
-		<Configuration
-			Name="ReleaseWithoutAsm|Itanium"
-			OutputDirectory="ia64\TestZlib$(ConfigurationName)"
-			IntermediateDirectory="ia64\TestZlib$(ConfigurationName)\Tmp"
-			ConfigurationType="1"
-			CharacterSet="2"
-			WholeProgramOptimization="1"
-			>
-			<Tool
-				Name="VCPreBuildEventTool"
-			/>
-			<Tool
-				Name="VCCustomBuildTool"
-			/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"
-			/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"
-			/>
-			<Tool
-				Name="VCMIDLTool"
-				TargetEnvironment="2"
-			/>
-			<Tool
-				Name="VCCLCompilerTool"
-				Optimization="2"
-				InlineFunctionExpansion="1"
-				OmitFramePointers="true"
-				AdditionalIncludeDirectories="..\..\.."
-				PreprocessorDefinitions="ZLIB_WINAPI;NDEBUG;_CONSOLE;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;WIN64"
-				StringPooling="true"
-				BasicRuntimeChecks="0"
-				RuntimeLibrary="2"
-				BufferSecurityCheck="false"
-				EnableFunctionLevelLinking="true"
-				UsePrecompiledHeader="0"
-				AssemblerListingLocation="$(IntDir)\"
-				WarningLevel="3"
-				Detect64BitPortabilityProblems="true"
-				DebugInformationFormat="3"
-			/>
-			<Tool
-				Name="VCManagedResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCPreLinkEventTool"
-			/>
-			<Tool
-				Name="VCLinkerTool"
-				OutputFile="$(OutDir)/testzlib.exe"
-				LinkIncremental="1"
-				GenerateManifest="false"
-				GenerateDebugInformation="true"
-				SubSystem="1"
-				OptimizeReferences="2"
-				EnableCOMDATFolding="2"
-				OptimizeForWindows98="1"
-				TargetMachine="5"
-			/>
-			<Tool
-				Name="VCALinkTool"
-			/>
-			<Tool
-				Name="VCManifestTool"
-			/>
-			<Tool
-				Name="VCXDCMakeTool"
-			/>
-			<Tool
-				Name="VCBscMakeTool"
-			/>
-			<Tool
-				Name="VCFxCopTool"
-			/>
-			<Tool
-				Name="VCAppVerifierTool"
-			/>
-			<Tool
-				Name="VCWebDeploymentTool"
-			/>
-			<Tool
-				Name="VCPostBuildEventTool"
-			/>
-		</Configuration>
-		<Configuration
-			Name="Release|Win32"
-			OutputDirectory="x86\TestZlib$(ConfigurationName)"
-			IntermediateDirectory="x86\TestZlib$(ConfigurationName)\Tmp"
-			ConfigurationType="1"
-			CharacterSet="2"
-			WholeProgramOptimization="1"
-			>
-			<Tool
-				Name="VCPreBuildEventTool"
-			/>
-			<Tool
-				Name="VCCustomBuildTool"
-			/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"
-			/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"
-			/>
-			<Tool
-				Name="VCMIDLTool"
-			/>
-			<Tool
-				Name="VCCLCompilerTool"
-				Optimization="2"
-				InlineFunctionExpansion="1"
-				OmitFramePointers="true"
-				AdditionalIncludeDirectories="..\..\.."
-				PreprocessorDefinitions="ASMV;ASMINF;WIN32;ZLIB_WINAPI;NDEBUG;_CONSOLE;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE"
-				StringPooling="true"
-				BasicRuntimeChecks="0"
-				RuntimeLibrary="0"
-				BufferSecurityCheck="false"
-				EnableFunctionLevelLinking="true"
-				UsePrecompiledHeader="0"
-				AssemblerListingLocation="$(IntDir)\"
-				WarningLevel="3"
-				Detect64BitPortabilityProblems="true"
-				DebugInformationFormat="3"
-			/>
-			<Tool
-				Name="VCManagedResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCPreLinkEventTool"
-			/>
-			<Tool
-				Name="VCLinkerTool"
-				AdditionalDependencies="..\..\masmx86\gvmat32.obj ..\..\masmx86\inffas32.obj"
-				OutputFile="$(OutDir)/testzlib.exe"
-				LinkIncremental="1"
-				GenerateManifest="false"
-				GenerateDebugInformation="true"
-				SubSystem="1"
-				OptimizeReferences="2"
-				EnableCOMDATFolding="2"
-				OptimizeForWindows98="1"
-				TargetMachine="1"
-			/>
-			<Tool
-				Name="VCALinkTool"
-			/>
-			<Tool
-				Name="VCManifestTool"
-			/>
-			<Tool
-				Name="VCXDCMakeTool"
-			/>
-			<Tool
-				Name="VCBscMakeTool"
-			/>
-			<Tool
-				Name="VCFxCopTool"
-			/>
-			<Tool
-				Name="VCAppVerifierTool"
-			/>
-			<Tool
-				Name="VCWebDeploymentTool"
-			/>
-			<Tool
-				Name="VCPostBuildEventTool"
-			/>
-		</Configuration>
-		<Configuration
-			Name="Release|x64"
-			OutputDirectory="x64\TestZlib$(ConfigurationName)"
-			IntermediateDirectory="x64\TestZlib$(ConfigurationName)\Tmp"
-			ConfigurationType="1"
-			WholeProgramOptimization="1"
-			>
-			<Tool
-				Name="VCPreBuildEventTool"
-			/>
-			<Tool
-				Name="VCCustomBuildTool"
-			/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"
-			/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"
-			/>
-			<Tool
-				Name="VCMIDLTool"
-			/>
-			<Tool
-				Name="VCCLCompilerTool"
-				AdditionalIncludeDirectories="..\..\.."
-				PreprocessorDefinitions="ASMV;ASMINF;WIN32;ZLIB_WINAPI;NDEBUG;_CONSOLE;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE"
-				BasicRuntimeChecks="0"
-				RuntimeLibrary="2"
-				BufferSecurityCheck="false"
-				AssemblerListingLocation="$(IntDir)\"
-			/>
-			<Tool
-				Name="VCManagedResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCPreLinkEventTool"
-			/>
-			<Tool
-				Name="VCLinkerTool"
-				AdditionalDependencies="..\..\masmx64\gvmat64.obj ..\..\masmx64\inffasx64.obj"
-				GenerateManifest="false"
-			/>
-			<Tool
-				Name="VCALinkTool"
-			/>
-			<Tool
-				Name="VCManifestTool"
-			/>
-			<Tool
-				Name="VCXDCMakeTool"
-			/>
-			<Tool
-				Name="VCBscMakeTool"
-			/>
-			<Tool
-				Name="VCFxCopTool"
-			/>
-			<Tool
-				Name="VCAppVerifierTool"
-			/>
-			<Tool
-				Name="VCWebDeploymentTool"
-			/>
-			<Tool
-				Name="VCPostBuildEventTool"
-			/>
-		</Configuration>
-		<Configuration
-			Name="Release|Itanium"
-			OutputDirectory="ia64\TestZlib$(ConfigurationName)"
-			IntermediateDirectory="ia64\TestZlib$(ConfigurationName)\Tmp"
-			ConfigurationType="1"
-			CharacterSet="2"
-			WholeProgramOptimization="1"
-			>
-			<Tool
-				Name="VCPreBuildEventTool"
-			/>
-			<Tool
-				Name="VCCustomBuildTool"
-			/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"
-			/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"
-			/>
-			<Tool
-				Name="VCMIDLTool"
-				TargetEnvironment="2"
-			/>
-			<Tool
-				Name="VCCLCompilerTool"
-				Optimization="2"
-				InlineFunctionExpansion="1"
-				OmitFramePointers="true"
-				AdditionalIncludeDirectories="..\..\.."
-				PreprocessorDefinitions="ZLIB_WINAPI;NDEBUG;_CONSOLE;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;WIN64"
-				StringPooling="true"
-				BasicRuntimeChecks="0"
-				RuntimeLibrary="2"
-				BufferSecurityCheck="false"
-				EnableFunctionLevelLinking="true"
-				UsePrecompiledHeader="0"
-				AssemblerListingLocation="$(IntDir)\"
-				WarningLevel="3"
-				Detect64BitPortabilityProblems="true"
-				DebugInformationFormat="3"
-			/>
-			<Tool
-				Name="VCManagedResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCPreLinkEventTool"
-			/>
-			<Tool
-				Name="VCLinkerTool"
-				OutputFile="$(OutDir)/testzlib.exe"
-				LinkIncremental="1"
-				GenerateManifest="false"
-				GenerateDebugInformation="true"
-				SubSystem="1"
-				OptimizeReferences="2"
-				EnableCOMDATFolding="2"
-				OptimizeForWindows98="1"
-				TargetMachine="5"
-			/>
-			<Tool
-				Name="VCALinkTool"
-			/>
-			<Tool
-				Name="VCManifestTool"
-			/>
-			<Tool
-				Name="VCXDCMakeTool"
-			/>
-			<Tool
-				Name="VCBscMakeTool"
-			/>
-			<Tool
-				Name="VCFxCopTool"
-			/>
-			<Tool
-				Name="VCAppVerifierTool"
-			/>
-			<Tool
-				Name="VCWebDeploymentTool"
-			/>
-			<Tool
-				Name="VCPostBuildEventTool"
-			/>
-		</Configuration>
-	</Configurations>
-	<References>
-	</References>
-	<Files>
-		<Filter
-			Name="Source Files"
-			Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm"
-			>
-			<File
-				RelativePath="..\..\..\adler32.c"
-				>
-			</File>
-			<File
-				RelativePath="..\..\..\compress.c"
-				>
-			</File>
-			<File
-				RelativePath="..\..\..\crc32.c"
-				>
-			</File>
-			<File
-				RelativePath="..\..\..\deflate.c"
-				>
-			</File>
-			<File
-				RelativePath="..\..\masmx86\gvmat32c.c"
-				>
-				<FileConfiguration
-					Name="Debug|x64"
-					ExcludedFromBuild="true"
-					>
-					<Tool
-						Name="VCCLCompilerTool"
-					/>
-				</FileConfiguration>
-				<FileConfiguration
-					Name="Debug|Itanium"
-					ExcludedFromBuild="true"
-					>
-					<Tool
-						Name="VCCLCompilerTool"
-					/>
-				</FileConfiguration>
-				<FileConfiguration
-					Name="ReleaseWithoutAsm|x64"
-					ExcludedFromBuild="true"
-					>
-					<Tool
-						Name="VCCLCompilerTool"
-					/>
-				</FileConfiguration>
-				<FileConfiguration
-					Name="ReleaseWithoutAsm|Itanium"
-					ExcludedFromBuild="true"
-					>
-					<Tool
-						Name="VCCLCompilerTool"
-					/>
-				</FileConfiguration>
-				<FileConfiguration
-					Name="Release|x64"
-					ExcludedFromBuild="true"
-					>
-					<Tool
-						Name="VCCLCompilerTool"
-					/>
-				</FileConfiguration>
-				<FileConfiguration
-					Name="Release|Itanium"
-					ExcludedFromBuild="true"
-					>
-					<Tool
-						Name="VCCLCompilerTool"
-					/>
-				</FileConfiguration>
-				<FileConfiguration
-					Name="Debug|Win64 (AMD64)"
-					ExcludedFromBuild="TRUE"
-					>
-					<Tool
-						Name="VCCLCompilerTool"
-					/>
-				</FileConfiguration>
-				<FileConfiguration
-					Name="Release|Win64 (AMD64)"
-					ExcludedFromBuild="TRUE"
-					>
-					<Tool
-						Name="VCCLCompilerTool"
-					/>
-				</FileConfiguration>
-				<FileConfiguration
-					Name="ReleaseAsm|Win64 (AMD64)"
-					ExcludedFromBuild="TRUE"
-					>
-					<Tool
-						Name="VCCLCompilerTool"
-					/>
-				</FileConfiguration>
-			</File>
-			<File
-				RelativePath="..\..\..\infback.c"
-				>
-			</File>
-			<File
-				RelativePath="..\..\masmx64\inffas8664.c"
-				>
-				<FileConfiguration
-					Name="Debug|Win32"
-					ExcludedFromBuild="true"
-					>
-					<Tool
-						Name="VCCLCompilerTool"
-					/>
-				</FileConfiguration>
-				<FileConfiguration
-					Name="Debug|Itanium"
-					ExcludedFromBuild="true"
-					>
-					<Tool
-						Name="VCCLCompilerTool"
-					/>
-				</FileConfiguration>
-				<FileConfiguration
-					Name="ReleaseWithoutAsm|Win32"
-					ExcludedFromBuild="true"
-					>
-					<Tool
-						Name="VCCLCompilerTool"
-					/>
-				</FileConfiguration>
-				<FileConfiguration
-					Name="ReleaseWithoutAsm|Itanium"
-					ExcludedFromBuild="true"
-					>
-					<Tool
-						Name="VCCLCompilerTool"
-					/>
-				</FileConfiguration>
-				<FileConfiguration
-					Name="Release|Win32"
-					ExcludedFromBuild="true"
-					>
-					<Tool
-						Name="VCCLCompilerTool"
-					/>
-				</FileConfiguration>
-				<FileConfiguration
-					Name="Release|Itanium"
-					ExcludedFromBuild="true"
-					>
-					<Tool
-						Name="VCCLCompilerTool"
-					/>
-				</FileConfiguration>
-			</File>
-			<File
-				RelativePath="..\..\..\inffast.c"
-				>
-			</File>
-			<File
-				RelativePath="..\..\..\inflate.c"
-				>
-			</File>
-			<File
-				RelativePath="..\..\..\inftrees.c"
-				>
-			</File>
-			<File
-				RelativePath="..\..\testzlib\testzlib.c"
-				>
-			</File>
-			<File
-				RelativePath="..\..\..\trees.c"
-				>
-			</File>
-			<File
-				RelativePath="..\..\..\uncompr.c"
-				>
-			</File>
-			<File
-				RelativePath="..\..\..\zutil.c"
-				>
-			</File>
-		</Filter>
-		<Filter
-			Name="Header Files"
-			Filter="h;hpp;hxx;hm;inl;inc"
-			>
-		</Filter>
-		<Filter
-			Name="Resource Files"
-			Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
-			>
-		</Filter>
-	</Files>
-	<Globals>
-	</Globals>
-</VisualStudioProject>
Index: trunk/minix/lib/zlib-1.2.3/contrib/vstudio/vc8/testzlibdll.vcproj
===================================================================
--- trunk/minix/lib/zlib-1.2.3/contrib/vstudio/vc8/testzlibdll.vcproj	(revision 9)
+++ 	(revision )
@@ -1,567 +1,0 @@
-<?xml version="1.0" encoding="Windows-1252"?>
-<VisualStudioProject
-	ProjectType="Visual C++"
-	Version="8,00"
-	Name="TestZlibDll"
-	ProjectGUID="{C52F9E7B-498A-42BE-8DB4-85A15694366A}"
-	Keyword="Win32Proj"
-	SignManifests="true"
-	>
-	<Platforms>
-		<Platform
-			Name="Win32"
-		/>
-		<Platform
-			Name="x64"
-		/>
-		<Platform
-			Name="Itanium"
-		/>
-	</Platforms>
-	<ToolFiles>
-	</ToolFiles>
-	<Configurations>
-		<Configuration
-			Name="Debug|Win32"
-			OutputDirectory="x86\TestZlibDll$(ConfigurationName)"
-			IntermediateDirectory="x86\TestZlibDll$(ConfigurationName)\Tmp"
-			ConfigurationType="1"
-			InheritedPropertySheets="UpgradeFromVC70.vsprops"
-			CharacterSet="2"
-			>
-			<Tool
-				Name="VCPreBuildEventTool"
-			/>
-			<Tool
-				Name="VCCustomBuildTool"
-			/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"
-			/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"
-			/>
-			<Tool
-				Name="VCMIDLTool"
-			/>
-			<Tool
-				Name="VCCLCompilerTool"
-				Optimization="0"
-				AdditionalIncludeDirectories="..\..\..;..\..\minizip"
-				PreprocessorDefinitions="WIN32;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;ZLIB_WINAPI;_DEBUG;_CONSOLE"
-				MinimalRebuild="true"
-				BasicRuntimeChecks="0"
-				RuntimeLibrary="1"
-				BufferSecurityCheck="false"
-				UsePrecompiledHeader="0"
-				AssemblerListingLocation="$(IntDir)\"
-				WarningLevel="3"
-				Detect64BitPortabilityProblems="true"
-				DebugInformationFormat="4"
-			/>
-			<Tool
-				Name="VCManagedResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCPreLinkEventTool"
-			/>
-			<Tool
-				Name="VCLinkerTool"
-				AdditionalDependencies="x86\ZlibDllDebug\zlibwapi.lib"
-				OutputFile="$(OutDir)/testzlib.exe"
-				LinkIncremental="2"
-				GenerateManifest="false"
-				GenerateDebugInformation="true"
-				ProgramDatabaseFile="$(OutDir)/testzlib.pdb"
-				SubSystem="1"
-				TargetMachine="1"
-			/>
-			<Tool
-				Name="VCALinkTool"
-			/>
-			<Tool
-				Name="VCManifestTool"
-			/>
-			<Tool
-				Name="VCXDCMakeTool"
-			/>
-			<Tool
-				Name="VCBscMakeTool"
-			/>
-			<Tool
-				Name="VCFxCopTool"
-			/>
-			<Tool
-				Name="VCAppVerifierTool"
-			/>
-			<Tool
-				Name="VCWebDeploymentTool"
-			/>
-			<Tool
-				Name="VCPostBuildEventTool"
-			/>
-		</Configuration>
-		<Configuration
-			Name="Debug|x64"
-			OutputDirectory="x64\TestZlibDll$(ConfigurationName)"
-			IntermediateDirectory="x64\TestZlibDll$(ConfigurationName)\Tmp"
-			ConfigurationType="1"
-			InheritedPropertySheets="UpgradeFromVC70.vsprops"
-			CharacterSet="2"
-			>
-			<Tool
-				Name="VCPreBuildEventTool"
-			/>
-			<Tool
-				Name="VCCustomBuildTool"
-			/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"
-			/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"
-			/>
-			<Tool
-				Name="VCMIDLTool"
-				TargetEnvironment="3"
-			/>
-			<Tool
-				Name="VCCLCompilerTool"
-				Optimization="0"
-				AdditionalIncludeDirectories="..\..\..;..\..\minizip"
-				PreprocessorDefinitions="_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;ZLIB_WINAPI;_DEBUG;_CONSOLE;WIN64"
-				MinimalRebuild="true"
-				BasicRuntimeChecks="0"
-				RuntimeLibrary="3"
-				BufferSecurityCheck="false"
-				UsePrecompiledHeader="0"
-				AssemblerListingLocation="$(IntDir)\"
-				WarningLevel="3"
-				Detect64BitPortabilityProblems="true"
-				DebugInformationFormat="3"
-			/>
-			<Tool
-				Name="VCManagedResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCPreLinkEventTool"
-			/>
-			<Tool
-				Name="VCLinkerTool"
-				AdditionalDependencies="x64\ZlibDllDebug\zlibwapi.lib"
-				OutputFile="$(OutDir)/testzlib.exe"
-				LinkIncremental="2"
-				GenerateManifest="false"
-				GenerateDebugInformation="true"
-				ProgramDatabaseFile="$(OutDir)/testzlib.pdb"
-				SubSystem="1"
-				TargetMachine="17"
-			/>
-			<Tool
-				Name="VCALinkTool"
-			/>
-			<Tool
-				Name="VCManifestTool"
-			/>
-			<Tool
-				Name="VCXDCMakeTool"
-			/>
-			<Tool
-				Name="VCBscMakeTool"
-			/>
-			<Tool
-				Name="VCFxCopTool"
-			/>
-			<Tool
-				Name="VCAppVerifierTool"
-			/>
-			<Tool
-				Name="VCWebDeploymentTool"
-			/>
-			<Tool
-				Name="VCPostBuildEventTool"
-			/>
-		</Configuration>
-		<Configuration
-			Name="Debug|Itanium"
-			OutputDirectory="ia64\TestZlibDll$(ConfigurationName)"
-			IntermediateDirectory="ia64\TestZlibDll$(ConfigurationName)\Tmp"
-			ConfigurationType="1"
-			InheritedPropertySheets="UpgradeFromVC70.vsprops"
-			CharacterSet="2"
-			>
-			<Tool
-				Name="VCPreBuildEventTool"
-			/>
-			<Tool
-				Name="VCCustomBuildTool"
-			/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"
-			/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"
-			/>
-			<Tool
-				Name="VCMIDLTool"
-				TargetEnvironment="2"
-			/>
-			<Tool
-				Name="VCCLCompilerTool"
-				Optimization="0"
-				AdditionalIncludeDirectories="..\..\..;..\..\minizip"
-				PreprocessorDefinitions="_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;ZLIB_WINAPI;_DEBUG;_CONSOLE;WIN64"
-				MinimalRebuild="true"
-				BasicRuntimeChecks="0"
-				RuntimeLibrary="3"
-				BufferSecurityCheck="false"
-				UsePrecompiledHeader="0"
-				AssemblerListingLocation="$(IntDir)\"
-				WarningLevel="3"
-				Detect64BitPortabilityProblems="true"
-				DebugInformationFormat="3"
-			/>
-			<Tool
-				Name="VCManagedResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCPreLinkEventTool"
-			/>
-			<Tool
-				Name="VCLinkerTool"
-				AdditionalDependencies="ia64\ZlibDllDebug\zlibwapi.lib"
-				OutputFile="$(OutDir)/testzlib.exe"
-				LinkIncremental="2"
-				GenerateManifest="false"
-				GenerateDebugInformation="true"
-				ProgramDatabaseFile="$(OutDir)/testzlib.pdb"
-				SubSystem="1"
-				TargetMachine="5"
-			/>
-			<Tool
-				Name="VCALinkTool"
-			/>
-			<Tool
-				Name="VCManifestTool"
-			/>
-			<Tool
-				Name="VCXDCMakeTool"
-			/>
-			<Tool
-				Name="VCBscMakeTool"
-			/>
-			<Tool
-				Name="VCFxCopTool"
-			/>
-			<Tool
-				Name="VCAppVerifierTool"
-			/>
-			<Tool
-				Name="VCWebDeploymentTool"
-			/>
-			<Tool
-				Name="VCPostBuildEventTool"
-			/>
-		</Configuration>
-		<Configuration
-			Name="Release|Win32"
-			OutputDirectory="x86\TestZlibDll$(ConfigurationName)"
-			IntermediateDirectory="x86\TestZlibDll$(ConfigurationName)\Tmp"
-			ConfigurationType="1"
-			InheritedPropertySheets="UpgradeFromVC70.vsprops"
-			CharacterSet="2"
-			>
-			<Tool
-				Name="VCPreBuildEventTool"
-			/>
-			<Tool
-				Name="VCCustomBuildTool"
-			/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"
-			/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"
-			/>
-			<Tool
-				Name="VCMIDLTool"
-			/>
-			<Tool
-				Name="VCCLCompilerTool"
-				Optimization="2"
-				InlineFunctionExpansion="1"
-				OmitFramePointers="true"
-				AdditionalIncludeDirectories="..\..\..;..\..\minizip"
-				PreprocessorDefinitions="WIN32;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;ZLIB_WINAPI;NDEBUG;_CONSOLE"
-				StringPooling="true"
-				BasicRuntimeChecks="0"
-				RuntimeLibrary="0"
-				BufferSecurityCheck="false"
-				EnableFunctionLevelLinking="true"
-				UsePrecompiledHeader="0"
-				AssemblerListingLocation="$(IntDir)\"
-				WarningLevel="3"
-				Detect64BitPortabilityProblems="true"
-				DebugInformationFormat="3"
-			/>
-			<Tool
-				Name="VCManagedResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCPreLinkEventTool"
-			/>
-			<Tool
-				Name="VCLinkerTool"
-				AdditionalDependencies="x86\ZlibDllRelease\zlibwapi.lib"
-				OutputFile="$(OutDir)/testzlib.exe"
-				LinkIncremental="1"
-				GenerateManifest="false"
-				GenerateDebugInformation="true"
-				SubSystem="1"
-				OptimizeReferences="2"
-				EnableCOMDATFolding="2"
-				OptimizeForWindows98="1"
-				TargetMachine="1"
-			/>
-			<Tool
-				Name="VCALinkTool"
-			/>
-			<Tool
-				Name="VCManifestTool"
-			/>
-			<Tool
-				Name="VCXDCMakeTool"
-			/>
-			<Tool
-				Name="VCBscMakeTool"
-			/>
-			<Tool
-				Name="VCFxCopTool"
-			/>
-			<Tool
-				Name="VCAppVerifierTool"
-			/>
-			<Tool
-				Name="VCWebDeploymentTool"
-			/>
-			<Tool
-				Name="VCPostBuildEventTool"
-			/>
-		</Configuration>
-		<Configuration
-			Name="Release|x64"
-			OutputDirectory="x64\TestZlibDll$(ConfigurationName)"
-			IntermediateDirectory="x64\TestZlibDll$(ConfigurationName)\Tmp"
-			ConfigurationType="1"
-			InheritedPropertySheets="UpgradeFromVC70.vsprops"
-			CharacterSet="2"
-			>
-			<Tool
-				Name="VCPreBuildEventTool"
-			/>
-			<Tool
-				Name="VCCustomBuildTool"
-			/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"
-			/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"
-			/>
-			<Tool
-				Name="VCMIDLTool"
-				TargetEnvironment="3"
-			/>
-			<Tool
-				Name="VCCLCompilerTool"
-				Optimization="2"
-				InlineFunctionExpansion="1"
-				OmitFramePointers="true"
-				AdditionalIncludeDirectories="..\..\..;..\..\minizip"
-				PreprocessorDefinitions="_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;ZLIB_WINAPI;NDEBUG;_CONSOLE;WIN64"
-				StringPooling="true"
-				BasicRuntimeChecks="0"
-				RuntimeLibrary="2"
-				BufferSecurityCheck="false"
-				EnableFunctionLevelLinking="true"
-				UsePrecompiledHeader="0"
-				AssemblerListingLocation="$(IntDir)\"
-				WarningLevel="3"
-				Detect64BitPortabilityProblems="true"
-				DebugInformationFormat="3"
-			/>
-			<Tool
-				Name="VCManagedResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCPreLinkEventTool"
-			/>
-			<Tool
-				Name="VCLinkerTool"
-				AdditionalDependencies="x64\ZlibDllRelease\zlibwapi.lib"
-				OutputFile="$(OutDir)/testzlib.exe"
-				LinkIncremental="1"
-				GenerateManifest="false"
-				GenerateDebugInformation="true"
-				SubSystem="1"
-				OptimizeReferences="2"
-				EnableCOMDATFolding="2"
-				OptimizeForWindows98="1"
-				TargetMachine="17"
-			/>
-			<Tool
-				Name="VCALinkTool"
-			/>
-			<Tool
-				Name="VCManifestTool"
-			/>
-			<Tool
-				Name="VCXDCMakeTool"
-			/>
-			<Tool
-				Name="VCBscMakeTool"
-			/>
-			<Tool
-				Name="VCFxCopTool"
-			/>
-			<Tool
-				Name="VCAppVerifierTool"
-			/>
-			<Tool
-				Name="VCWebDeploymentTool"
-			/>
-			<Tool
-				Name="VCPostBuildEventTool"
-			/>
-		</Configuration>
-		<Configuration
-			Name="Release|Itanium"
-			OutputDirectory="ia64\TestZlibDll$(ConfigurationName)"
-			IntermediateDirectory="ia64\TestZlibDll$(ConfigurationName)\Tmp"
-			ConfigurationType="1"
-			InheritedPropertySheets="UpgradeFromVC70.vsprops"
-			CharacterSet="2"
-			>
-			<Tool
-				Name="VCPreBuildEventTool"
-			/>
-			<Tool
-				Name="VCCustomBuildTool"
-			/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"
-			/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"
-			/>
-			<Tool
-				Name="VCMIDLTool"
-				TargetEnvironment="2"
-			/>
-			<Tool
-				Name="VCCLCompilerTool"
-				Optimization="2"
-				InlineFunctionExpansion="1"
-				OmitFramePointers="true"
-				AdditionalIncludeDirectories="..\..\..;..\..\minizip"
-				PreprocessorDefinitions="_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;ZLIB_WINAPI;NDEBUG;_CONSOLE;WIN64"
-				StringPooling="true"
-				BasicRuntimeChecks="0"
-				RuntimeLibrary="2"
-				BufferSecurityCheck="false"
-				EnableFunctionLevelLinking="true"
-				UsePrecompiledHeader="0"
-				AssemblerListingLocation="$(IntDir)\"
-				WarningLevel="3"
-				Detect64BitPortabilityProblems="true"
-				DebugInformationFormat="3"
-			/>
-			<Tool
-				Name="VCManagedResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCPreLinkEventTool"
-			/>
-			<Tool
-				Name="VCLinkerTool"
-				AdditionalDependencies="ia64\ZlibDllRelease\zlibwapi.lib"
-				OutputFile="$(OutDir)/testzlib.exe"
-				LinkIncremental="1"
-				GenerateManifest="false"
-				GenerateDebugInformation="true"
-				SubSystem="1"
-				OptimizeReferences="2"
-				EnableCOMDATFolding="2"
-				OptimizeForWindows98="1"
-				TargetMachine="5"
-			/>
-			<Tool
-				Name="VCALinkTool"
-			/>
-			<Tool
-				Name="VCManifestTool"
-			/>
-			<Tool
-				Name="VCXDCMakeTool"
-			/>
-			<Tool
-				Name="VCBscMakeTool"
-			/>
-			<Tool
-				Name="VCFxCopTool"
-			/>
-			<Tool
-				Name="VCAppVerifierTool"
-			/>
-			<Tool
-				Name="VCWebDeploymentTool"
-			/>
-			<Tool
-				Name="VCPostBuildEventTool"
-			/>
-		</Configuration>
-	</Configurations>
-	<References>
-	</References>
-	<Files>
-		<Filter
-			Name="Source Files"
-			Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm"
-			>
-			<File
-				RelativePath="..\..\testzlib\testzlib.c"
-				>
-			</File>
-		</Filter>
-		<Filter
-			Name="Header Files"
-			Filter="h;hpp;hxx;hm;inl;inc"
-			>
-		</Filter>
-		<Filter
-			Name="Resource Files"
-			Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
-			>
-		</Filter>
-	</Files>
-	<Globals>
-	</Globals>
-</VisualStudioProject>
Index: trunk/minix/lib/zlib-1.2.3/contrib/vstudio/vc8/zlib.rc
===================================================================
--- trunk/minix/lib/zlib-1.2.3/contrib/vstudio/vc8/zlib.rc	(revision 9)
+++ 	(revision )
@@ -1,32 +1,0 @@
-#include <windows.h>
-
-#define IDR_VERSION1  1
-IDR_VERSION1	VERSIONINFO	MOVEABLE IMPURE LOADONCALL DISCARDABLE
-  FILEVERSION	 1,2,3,0
-  PRODUCTVERSION 1,2,3,0
-  FILEFLAGSMASK	VS_FFI_FILEFLAGSMASK
-  FILEFLAGS	0
-  FILEOS	VOS_DOS_WINDOWS32
-  FILETYPE	VFT_DLL
-  FILESUBTYPE	0	// not used
-BEGIN
-  BLOCK "StringFileInfo"
-  BEGIN
-    BLOCK "040904E4"
-    //language ID = U.S. English, char set = Windows, Multilingual
-
-    BEGIN
-      VALUE "FileDescription", "zlib data compression library\0"
-      VALUE "FileVersion",	"1.2.3.0\0"
-      VALUE "InternalName",	"zlib\0"
-      VALUE "OriginalFilename",	"zlib.dll\0"
-      VALUE "ProductName",	"ZLib.DLL\0"
-      VALUE "Comments","DLL support by Alessandro Iacopetti & Gilles Vollant\0"
-      VALUE "LegalCopyright", "(C) 1995-2003 Jean-loup Gailly & Mark Adler\0"
-    END
-  END
-  BLOCK "VarFileInfo"
-  BEGIN
-    VALUE "Translation", 0x0409, 1252
-  END
-END
Index: trunk/minix/lib/zlib-1.2.3/contrib/vstudio/vc8/zlibstat.vcproj
===================================================================
--- trunk/minix/lib/zlib-1.2.3/contrib/vstudio/vc8/zlibstat.vcproj	(revision 9)
+++ 	(revision )
@@ -1,870 +1,0 @@
-<?xml version="1.0" encoding="Windows-1252"?>
-<VisualStudioProject
-	ProjectType="Visual C++"
-	Version="8,00"
-	Name="zlibstat"
-	ProjectGUID="{745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}"
-	>
-	<Platforms>
-		<Platform
-			Name="Win32"
-		/>
-		<Platform
-			Name="x64"
-		/>
-		<Platform
-			Name="Itanium"
-		/>
-	</Platforms>
-	<ToolFiles>
-	</ToolFiles>
-	<Configurations>
-		<Configuration
-			Name="Debug|Win32"
-			OutputDirectory="x86\ZlibStat$(ConfigurationName)"
-			IntermediateDirectory="x86\ZlibStat$(ConfigurationName)\Tmp"
-			ConfigurationType="4"
-			InheritedPropertySheets="UpgradeFromVC70.vsprops"
-			UseOfMFC="0"
-			ATLMinimizesCRunTimeLibraryUsage="false"
-			>
-			<Tool
-				Name="VCPreBuildEventTool"
-			/>
-			<Tool
-				Name="VCCustomBuildTool"
-			/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"
-			/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"
-			/>
-			<Tool
-				Name="VCMIDLTool"
-			/>
-			<Tool
-				Name="VCCLCompilerTool"
-				Optimization="0"
-				AdditionalIncludeDirectories="..\..\..;..\..\masmx86"
-				PreprocessorDefinitions="WIN32;ZLIB_WINAPI;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE"
-				ExceptionHandling="0"
-				RuntimeLibrary="1"
-				BufferSecurityCheck="false"
-				PrecompiledHeaderFile="$(IntDir)/zlibstat.pch"
-				AssemblerListingLocation="$(IntDir)\"
-				ObjectFile="$(IntDir)\"
-				ProgramDataBaseFileName="$(OutDir)\"
-				WarningLevel="3"
-				SuppressStartupBanner="true"
-				Detect64BitPortabilityProblems="true"
-				DebugInformationFormat="1"
-			/>
-			<Tool
-				Name="VCManagedResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCResourceCompilerTool"
-				Culture="1036"
-			/>
-			<Tool
-				Name="VCPreLinkEventTool"
-			/>
-			<Tool
-				Name="VCLibrarianTool"
-				AdditionalOptions="/MACHINE:X86 /NODEFAULTLIB"
-				OutputFile="$(OutDir)\zlibstat.lib"
-				SuppressStartupBanner="true"
-			/>
-			<Tool
-				Name="VCALinkTool"
-			/>
-			<Tool
-				Name="VCXDCMakeTool"
-			/>
-			<Tool
-				Name="VCBscMakeTool"
-			/>
-			<Tool
-				Name="VCFxCopTool"
-			/>
-			<Tool
-				Name="VCPostBuildEventTool"
-			/>
-		</Configuration>
-		<Configuration
-			Name="Debug|x64"
-			OutputDirectory="x64\ZlibStat$(ConfigurationName)"
-			IntermediateDirectory="x64\ZlibStat$(ConfigurationName)\Tmp"
-			ConfigurationType="4"
-			InheritedPropertySheets="UpgradeFromVC70.vsprops"
-			UseOfMFC="0"
-			ATLMinimizesCRunTimeLibraryUsage="false"
-			>
-			<Tool
-				Name="VCPreBuildEventTool"
-			/>
-			<Tool
-				Name="VCCustomBuildTool"
-			/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"
-			/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"
-			/>
-			<Tool
-				Name="VCMIDLTool"
-				TargetEnvironment="3"
-			/>
-			<Tool
-				Name="VCCLCompilerTool"
-				Optimization="0"
-				AdditionalIncludeDirectories="..\..\..;..\..\masmx86"
-				PreprocessorDefinitions="ZLIB_WINAPI;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;WIN64"
-				ExceptionHandling="0"
-				RuntimeLibrary="3"
-				BufferSecurityCheck="false"
-				PrecompiledHeaderFile="$(IntDir)/zlibstat.pch"
-				AssemblerListingLocation="$(IntDir)\"
-				ObjectFile="$(IntDir)\"
-				ProgramDataBaseFileName="$(OutDir)\"
-				WarningLevel="3"
-				SuppressStartupBanner="true"
-				Detect64BitPortabilityProblems="true"
-				DebugInformationFormat="1"
-			/>
-			<Tool
-				Name="VCManagedResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCResourceCompilerTool"
-				Culture="1036"
-			/>
-			<Tool
-				Name="VCPreLinkEventTool"
-			/>
-			<Tool
-				Name="VCLibrarianTool"
-				AdditionalOptions="/MACHINE:AMD64 /NODEFAULTLIB"
-				OutputFile="$(OutDir)\zlibstat.lib"
-				SuppressStartupBanner="true"
-			/>
-			<Tool
-				Name="VCALinkTool"
-			/>
-			<Tool
-				Name="VCXDCMakeTool"
-			/>
-			<Tool
-				Name="VCBscMakeTool"
-			/>
-			<Tool
-				Name="VCFxCopTool"
-			/>
-			<Tool
-				Name="VCPostBuildEventTool"
-			/>
-		</Configuration>
-		<Configuration
-			Name="Debug|Itanium"
-			OutputDirectory="ia64\ZlibStat$(ConfigurationName)"
-			IntermediateDirectory="ia64\ZlibStat$(ConfigurationName)\Tmp"
-			ConfigurationType="4"
-			InheritedPropertySheets="UpgradeFromVC70.vsprops"
-			UseOfMFC="0"
-			ATLMinimizesCRunTimeLibraryUsage="false"
-			>
-			<Tool
-				Name="VCPreBuildEventTool"
-			/>
-			<Tool
-				Name="VCCustomBuildTool"
-			/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"
-			/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"
-			/>
-			<Tool
-				Name="VCMIDLTool"
-				TargetEnvironment="2"
-			/>
-			<Tool
-				Name="VCCLCompilerTool"
-				Optimization="0"
-				AdditionalIncludeDirectories="..\..\..;..\..\masmx86"
-				PreprocessorDefinitions="ZLIB_WINAPI;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;WIN64"
-				ExceptionHandling="0"
-				RuntimeLibrary="3"
-				BufferSecurityCheck="false"
-				PrecompiledHeaderFile="$(IntDir)/zlibstat.pch"
-				AssemblerListingLocation="$(IntDir)\"
-				ObjectFile="$(IntDir)\"
-				ProgramDataBaseFileName="$(OutDir)\"
-				WarningLevel="3"
-				SuppressStartupBanner="true"
-				Detect64BitPortabilityProblems="true"
-				DebugInformationFormat="1"
-			/>
-			<Tool
-				Name="VCManagedResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCResourceCompilerTool"
-				Culture="1036"
-			/>
-			<Tool
-				Name="VCPreLinkEventTool"
-			/>
-			<Tool
-				Name="VCLibrarianTool"
-				AdditionalOptions="/MACHINE:IA64 /NODEFAULTLIB"
-				OutputFile="$(OutDir)\zlibstat.lib"
-				SuppressStartupBanner="true"
-			/>
-			<Tool
-				Name="VCALinkTool"
-			/>
-			<Tool
-				Name="VCXDCMakeTool"
-			/>
-			<Tool
-				Name="VCBscMakeTool"
-			/>
-			<Tool
-				Name="VCFxCopTool"
-			/>
-			<Tool
-				Name="VCPostBuildEventTool"
-			/>
-		</Configuration>
-		<Configuration
-			Name="Release|Win32"
-			OutputDirectory="x86\ZlibStat$(ConfigurationName)"
-			IntermediateDirectory="x86\ZlibStat$(ConfigurationName)\Tmp"
-			ConfigurationType="4"
-			InheritedPropertySheets="UpgradeFromVC70.vsprops"
-			UseOfMFC="0"
-			ATLMinimizesCRunTimeLibraryUsage="false"
-			>
-			<Tool
-				Name="VCPreBuildEventTool"
-			/>
-			<Tool
-				Name="VCCustomBuildTool"
-			/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"
-			/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"
-			/>
-			<Tool
-				Name="VCMIDLTool"
-			/>
-			<Tool
-				Name="VCCLCompilerTool"
-				InlineFunctionExpansion="1"
-				AdditionalIncludeDirectories="..\..\..;..\..\masmx86"
-				PreprocessorDefinitions="WIN32;ZLIB_WINAPI;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;ASMV;ASMINF"
-				StringPooling="true"
-				ExceptionHandling="0"
-				RuntimeLibrary="0"
-				BufferSecurityCheck="false"
-				EnableFunctionLevelLinking="true"
-				PrecompiledHeaderFile="$(IntDir)/zlibstat.pch"
-				AssemblerListingLocation="$(IntDir)\"
-				ObjectFile="$(IntDir)\"
-				ProgramDataBaseFileName="$(OutDir)\"
-				WarningLevel="3"
-				SuppressStartupBanner="true"
-			/>
-			<Tool
-				Name="VCManagedResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCResourceCompilerTool"
-				Culture="1036"
-			/>
-			<Tool
-				Name="VCPreLinkEventTool"
-			/>
-			<Tool
-				Name="VCLibrarianTool"
-				AdditionalOptions="/MACHINE:X86 /NODEFAULTLIB"
-				AdditionalDependencies="..\..\masmx86\gvmat32.obj ..\..\masmx86\inffas32.obj "
-				OutputFile="$(OutDir)\zlibstat.lib"
-				SuppressStartupBanner="true"
-			/>
-			<Tool
-				Name="VCALinkTool"
-			/>
-			<Tool
-				Name="VCXDCMakeTool"
-			/>
-			<Tool
-				Name="VCBscMakeTool"
-			/>
-			<Tool
-				Name="VCFxCopTool"
-			/>
-			<Tool
-				Name="VCPostBuildEventTool"
-			/>
-		</Configuration>
-		<Configuration
-			Name="Release|x64"
-			OutputDirectory="x64\ZlibStat$(ConfigurationName)"
-			IntermediateDirectory="x64\ZlibStat$(ConfigurationName)\Tmp"
-			ConfigurationType="4"
-			InheritedPropertySheets="UpgradeFromVC70.vsprops"
-			UseOfMFC="0"
-			ATLMinimizesCRunTimeLibraryUsage="false"
-			>
-			<Tool
-				Name="VCPreBuildEventTool"
-			/>
-			<Tool
-				Name="VCCustomBuildTool"
-			/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"
-			/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"
-			/>
-			<Tool
-				Name="VCMIDLTool"
-				TargetEnvironment="3"
-			/>
-			<Tool
-				Name="VCCLCompilerTool"
-				InlineFunctionExpansion="1"
-				AdditionalIncludeDirectories="..\..\..;..\..\masmx86"
-				PreprocessorDefinitions="ZLIB_WINAPI;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;ASMV;ASMINF;WIN64"
-				StringPooling="true"
-				ExceptionHandling="0"
-				RuntimeLibrary="2"
-				BufferSecurityCheck="false"
-				EnableFunctionLevelLinking="true"
-				PrecompiledHeaderFile="$(IntDir)/zlibstat.pch"
-				AssemblerListingLocation="$(IntDir)\"
-				ObjectFile="$(IntDir)\"
-				ProgramDataBaseFileName="$(OutDir)\"
-				WarningLevel="3"
-				SuppressStartupBanner="true"
-			/>
-			<Tool
-				Name="VCManagedResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCResourceCompilerTool"
-				Culture="1036"
-			/>
-			<Tool
-				Name="VCPreLinkEventTool"
-			/>
-			<Tool
-				Name="VCLibrarianTool"
-				AdditionalOptions="/MACHINE:AMD64 /NODEFAULTLIB"
-				AdditionalDependencies="..\..\masmx64\gvmat64.obj ..\..\masmx64\inffasx64.obj "
-				OutputFile="$(OutDir)\zlibstat.lib"
-				SuppressStartupBanner="true"
-			/>
-			<Tool
-				Name="VCALinkTool"
-			/>
-			<Tool
-				Name="VCXDCMakeTool"
-			/>
-			<Tool
-				Name="VCBscMakeTool"
-			/>
-			<Tool
-				Name="VCFxCopTool"
-			/>
-			<Tool
-				Name="VCPostBuildEventTool"
-			/>
-		</Configuration>
-		<Configuration
-			Name="Release|Itanium"
-			OutputDirectory="ia64\ZlibStat$(ConfigurationName)"
-			IntermediateDirectory="ia64\ZlibStat$(ConfigurationName)\Tmp"
-			ConfigurationType="4"
-			InheritedPropertySheets="UpgradeFromVC70.vsprops"
-			UseOfMFC="0"
-			ATLMinimizesCRunTimeLibraryUsage="false"
-			>
-			<Tool
-				Name="VCPreBuildEventTool"
-			/>
-			<Tool
-				Name="VCCustomBuildTool"
-			/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"
-			/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"
-			/>
-			<Tool
-				Name="VCMIDLTool"
-				TargetEnvironment="2"
-			/>
-			<Tool
-				Name="VCCLCompilerTool"
-				InlineFunctionExpansion="1"
-				AdditionalIncludeDirectories="..\..\..;..\..\masmx86"
-				PreprocessorDefinitions="ZLIB_WINAPI;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;WIN64"
-				StringPooling="true"
-				ExceptionHandling="0"
-				RuntimeLibrary="2"
-				BufferSecurityCheck="false"
-				EnableFunctionLevelLinking="true"
-				PrecompiledHeaderFile="$(IntDir)/zlibstat.pch"
-				AssemblerListingLocation="$(IntDir)\"
-				ObjectFile="$(IntDir)\"
-				ProgramDataBaseFileName="$(OutDir)\"
-				WarningLevel="3"
-				SuppressStartupBanner="true"
-			/>
-			<Tool
-				Name="VCManagedResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCResourceCompilerTool"
-				Culture="1036"
-			/>
-			<Tool
-				Name="VCPreLinkEventTool"
-			/>
-			<Tool
-				Name="VCLibrarianTool"
-				AdditionalOptions="/MACHINE:IA64 /NODEFAULTLIB"
-				OutputFile="$(OutDir)\zlibstat.lib"
-				SuppressStartupBanner="true"
-			/>
-			<Tool
-				Name="VCALinkTool"
-			/>
-			<Tool
-				Name="VCXDCMakeTool"
-			/>
-			<Tool
-				Name="VCBscMakeTool"
-			/>
-			<Tool
-				Name="VCFxCopTool"
-			/>
-			<Tool
-				Name="VCPostBuildEventTool"
-			/>
-		</Configuration>
-		<Configuration
-			Name="ReleaseWithoutAsm|Win32"
-			OutputDirectory="x86\ZlibStat$(ConfigurationName)"
-			IntermediateDirectory="x86\ZlibStat$(ConfigurationName)\Tmp"
-			ConfigurationType="4"
-			InheritedPropertySheets="UpgradeFromVC70.vsprops"
-			UseOfMFC="0"
-			ATLMinimizesCRunTimeLibraryUsage="false"
-			>
-			<Tool
-				Name="VCPreBuildEventTool"
-			/>
-			<Tool
-				Name="VCCustomBuildTool"
-			/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"
-			/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"
-			/>
-			<Tool
-				Name="VCMIDLTool"
-			/>
-			<Tool
-				Name="VCCLCompilerTool"
-				InlineFunctionExpansion="1"
-				AdditionalIncludeDirectories="..\..\..;..\..\masmx86"
-				PreprocessorDefinitions="WIN32;ZLIB_WINAPI;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE"
-				StringPooling="true"
-				ExceptionHandling="0"
-				RuntimeLibrary="0"
-				BufferSecurityCheck="false"
-				EnableFunctionLevelLinking="true"
-				PrecompiledHeaderFile="$(IntDir)/zlibstat.pch"
-				AssemblerListingLocation="$(IntDir)\"
-				ObjectFile="$(IntDir)\"
-				ProgramDataBaseFileName="$(OutDir)\"
-				WarningLevel="3"
-				SuppressStartupBanner="true"
-			/>
-			<Tool
-				Name="VCManagedResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCResourceCompilerTool"
-				Culture="1036"
-			/>
-			<Tool
-				Name="VCPreLinkEventTool"
-			/>
-			<Tool
-				Name="VCLibrarianTool"
-				AdditionalOptions="/MACHINE:X86 /NODEFAULTLIB"
-				OutputFile="$(OutDir)\zlibstat.lib"
-				SuppressStartupBanner="true"
-			/>
-			<Tool
-				Name="VCALinkTool"
-			/>
-			<Tool
-				Name="VCXDCMakeTool"
-			/>
-			<Tool
-				Name="VCBscMakeTool"
-			/>
-			<Tool
-				Name="VCFxCopTool"
-			/>
-			<Tool
-				Name="VCPostBuildEventTool"
-			/>
-		</Configuration>
-		<Configuration
-			Name="ReleaseWithoutAsm|x64"
-			OutputDirectory="x64\ZlibStat$(ConfigurationName)"
-			IntermediateDirectory="x64\ZlibStat$(ConfigurationName)\Tmp"
-			ConfigurationType="4"
-			InheritedPropertySheets="UpgradeFromVC70.vsprops"
-			UseOfMFC="0"
-			ATLMinimizesCRunTimeLibraryUsage="false"
-			>
-			<Tool
-				Name="VCPreBuildEventTool"
-			/>
-			<Tool
-				Name="VCCustomBuildTool"
-			/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"
-			/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"
-			/>
-			<Tool
-				Name="VCMIDLTool"
-				TargetEnvironment="3"
-			/>
-			<Tool
-				Name="VCCLCompilerTool"
-				InlineFunctionExpansion="1"
-				AdditionalIncludeDirectories="..\..\..;..\..\masmx86"
-				PreprocessorDefinitions="ZLIB_WINAPI;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;WIN64"
-				StringPooling="true"
-				ExceptionHandling="0"
-				RuntimeLibrary="2"
-				BufferSecurityCheck="false"
-				EnableFunctionLevelLinking="true"
-				PrecompiledHeaderFile="$(IntDir)/zlibstat.pch"
-				AssemblerListingLocation="$(IntDir)\"
-				ObjectFile="$(IntDir)\"
-				ProgramDataBaseFileName="$(OutDir)\"
-				WarningLevel="3"
-				SuppressStartupBanner="true"
-			/>
-			<Tool
-				Name="VCManagedResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCResourceCompilerTool"
-				Culture="1036"
-			/>
-			<Tool
-				Name="VCPreLinkEventTool"
-			/>
-			<Tool
-				Name="VCLibrarianTool"
-				AdditionalOptions="/MACHINE:AMD64 /NODEFAULTLIB"
-				OutputFile="$(OutDir)\zlibstat.lib"
-				SuppressStartupBanner="true"
-			/>
-			<Tool
-				Name="VCALinkTool"
-			/>
-			<Tool
-				Name="VCXDCMakeTool"
-			/>
-			<Tool
-				Name="VCBscMakeTool"
-			/>
-			<Tool
-				Name="VCFxCopTool"
-			/>
-			<Tool
-				Name="VCPostBuildEventTool"
-			/>
-		</Configuration>
-		<Configuration
-			Name="ReleaseWithoutAsm|Itanium"
-			OutputDirectory="ia64\ZlibStat$(ConfigurationName)"
-			IntermediateDirectory="ia64\ZlibStat$(ConfigurationName)\Tmp"
-			ConfigurationType="4"
-			InheritedPropertySheets="UpgradeFromVC70.vsprops"
-			UseOfMFC="0"
-			ATLMinimizesCRunTimeLibraryUsage="false"
-			>
-			<Tool
-				Name="VCPreBuildEventTool"
-			/>
-			<Tool
-				Name="VCCustomBuildTool"
-			/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"
-			/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"
-			/>
-			<Tool
-				Name="VCMIDLTool"
-				TargetEnvironment="2"
-			/>
-			<Tool
-				Name="VCCLCompilerTool"
-				InlineFunctionExpansion="1"
-				AdditionalIncludeDirectories="..\..\..;..\..\masmx86"
-				PreprocessorDefinitions="ZLIB_WINAPI;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;WIN64"
-				StringPooling="true"
-				ExceptionHandling="0"
-				RuntimeLibrary="2"
-				BufferSecurityCheck="false"
-				EnableFunctionLevelLinking="true"
-				PrecompiledHeaderFile="$(IntDir)/zlibstat.pch"
-				AssemblerListingLocation="$(IntDir)\"
-				ObjectFile="$(IntDir)\"
-				ProgramDataBaseFileName="$(OutDir)\"
-				WarningLevel="3"
-				SuppressStartupBanner="true"
-			/>
-			<Tool
-				Name="VCManagedResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCResourceCompilerTool"
-				Culture="1036"
-			/>
-			<Tool
-				Name="VCPreLinkEventTool"
-			/>
-			<Tool
-				Name="VCLibrarianTool"
-				AdditionalOptions="/MACHINE:IA64 /NODEFAULTLIB"
-				OutputFile="$(OutDir)\zlibstat.lib"
-				SuppressStartupBanner="true"
-			/>
-			<Tool
-				Name="VCALinkTool"
-			/>
-			<Tool
-				Name="VCXDCMakeTool"
-			/>
-			<Tool
-				Name="VCBscMakeTool"
-			/>
-			<Tool
-				Name="VCFxCopTool"
-			/>
-			<Tool
-				Name="VCPostBuildEventTool"
-			/>
-		</Configuration>
-	</Configurations>
-	<References>
-	</References>
-	<Files>
-		<Filter
-			Name="Source Files"
-			>
-			<File
-				RelativePath="..\..\..\adler32.c"
-				>
-			</File>
-			<File
-				RelativePath="..\..\..\compress.c"
-				>
-			</File>
-			<File
-				RelativePath="..\..\..\crc32.c"
-				>
-			</File>
-			<File
-				RelativePath="..\..\..\deflate.c"
-				>
-			</File>
-			<File
-				RelativePath="..\..\masmx86\gvmat32c.c"
-				>
-				<FileConfiguration
-					Name="Debug|x64"
-					ExcludedFromBuild="true"
-					>
-					<Tool
-						Name="VCCLCompilerTool"
-					/>
-				</FileConfiguration>
-				<FileConfiguration
-					Name="Debug|Itanium"
-					ExcludedFromBuild="true"
-					>
-					<Tool
-						Name="VCCLCompilerTool"
-					/>
-				</FileConfiguration>
-				<FileConfiguration
-					Name="Release|x64"
-					ExcludedFromBuild="true"
-					>
-					<Tool
-						Name="VCCLCompilerTool"
-					/>
-				</FileConfiguration>
-				<FileConfiguration
-					Name="Release|Itanium"
-					ExcludedFromBuild="true"
-					>
-					<Tool
-						Name="VCCLCompilerTool"
-					/>
-				</FileConfiguration>
-				<FileConfiguration
-					Name="ReleaseWithoutAsm|x64"
-					ExcludedFromBuild="true"
-					>
-					<Tool
-						Name="VCCLCompilerTool"
-					/>
-				</FileConfiguration>
-				<FileConfiguration
-					Name="ReleaseWithoutAsm|Itanium"
-					ExcludedFromBuild="true"
-					>
-					<Tool
-						Name="VCCLCompilerTool"
-					/>
-				</FileConfiguration>
-			</File>
-			<File
-				RelativePath="..\..\..\gzio.c"
-				>
-			</File>
-			<File
-				RelativePath="..\..\..\infback.c"
-				>
-			</File>
-			<File
-				RelativePath="..\..\masmx64\inffas8664.c"
-				>
-				<FileConfiguration
-					Name="Debug|Win32"
-					ExcludedFromBuild="true"
-					>
-					<Tool
-						Name="VCCLCompilerTool"
-					/>
-				</FileConfiguration>
-				<FileConfiguration
-					Name="Debug|Itanium"
-					ExcludedFromBuild="true"
-					>
-					<Tool
-						Name="VCCLCompilerTool"
-					/>
-				</FileConfiguration>
-				<FileConfiguration
-					Name="Release|Win32"
-					ExcludedFromBuild="true"
-					>
-					<Tool
-						Name="VCCLCompilerTool"
-					/>
-				</FileConfiguration>
-				<FileConfiguration
-					Name="Release|Itanium"
-					ExcludedFromBuild="true"
-					>
-					<Tool
-						Name="VCCLCompilerTool"
-					/>
-				</FileConfiguration>
-				<FileConfiguration
-					Name="ReleaseWithoutAsm|Win32"
-					ExcludedFromBuild="true"
-					>
-					<Tool
-						Name="VCCLCompilerTool"
-					/>
-				</FileConfiguration>
-				<FileConfiguration
-					Name="ReleaseWithoutAsm|Itanium"
-					ExcludedFromBuild="true"
-					>
-					<Tool
-						Name="VCCLCompilerTool"
-					/>
-				</FileConfiguration>
-			</File>
-			<File
-				RelativePath="..\..\..\inffast.c"
-				>
-			</File>
-			<File
-				RelativePath="..\..\..\inflate.c"
-				>
-			</File>
-			<File
-				RelativePath="..\..\..\inftrees.c"
-				>
-			</File>
-			<File
-				RelativePath="..\..\minizip\ioapi.c"
-				>
-			</File>
-			<File
-				RelativePath="..\..\..\trees.c"
-				>
-			</File>
-			<File
-				RelativePath="..\..\..\uncompr.c"
-				>
-			</File>
-			<File
-				RelativePath="..\..\minizip\unzip.c"
-				>
-			</File>
-			<File
-				RelativePath="..\..\minizip\zip.c"
-				>
-			</File>
-			<File
-				RelativePath=".\zlib.rc"
-				>
-			</File>
-			<File
-				RelativePath=".\zlibvc.def"
-				>
-			</File>
-			<File
-				RelativePath="..\..\..\zutil.c"
-				>
-			</File>
-		</Filter>
-	</Files>
-	<Globals>
-	</Globals>
-</VisualStudioProject>
Index: trunk/minix/lib/zlib-1.2.3/contrib/vstudio/vc8/zlibvc.def
===================================================================
--- trunk/minix/lib/zlib-1.2.3/contrib/vstudio/vc8/zlibvc.def	(revision 9)
+++ 	(revision )
@@ -1,92 +1,0 @@
-
-VERSION		1.23
-
-HEAPSIZE	1048576,8192
-
-EXPORTS
-        adler32                                  @1
-        compress                                 @2
-        crc32                                    @3
-        deflate                                  @4
-        deflateCopy                              @5
-        deflateEnd                               @6
-        deflateInit2_                            @7
-        deflateInit_                             @8
-        deflateParams                            @9
-        deflateReset                             @10
-        deflateSetDictionary                     @11
-        gzclose                                  @12
-        gzdopen                                  @13
-        gzerror                                  @14
-        gzflush                                  @15
-        gzopen                                   @16
-        gzread                                   @17
-        gzwrite                                  @18
-        inflate                                  @19
-        inflateEnd                               @20
-        inflateInit2_                            @21
-        inflateInit_                             @22
-        inflateReset                             @23
-        inflateSetDictionary                     @24
-        inflateSync                              @25
-        uncompress                               @26
-        zlibVersion                              @27
-        gzprintf                                 @28
-        gzputc                                   @29
-        gzgetc                                   @30
-        gzseek                                   @31
-        gzrewind                                 @32
-        gztell                                   @33
-        gzeof                                    @34
-        gzsetparams                              @35
-        zError                                   @36
-        inflateSyncPoint                         @37
-        get_crc_table                            @38
-        compress2                                @39
-        gzputs                                   @40
-        gzgets                                   @41
-        inflateCopy                              @42
-        inflateBackInit_                         @43
-        inflateBack                              @44
-        inflateBackEnd                           @45
-        compressBound                            @46
-        deflateBound                             @47
-        gzclearerr                               @48
-        gzungetc                                 @49
-        zlibCompileFlags                         @50
-        deflatePrime                             @51
-
-        unzOpen                                  @61
-        unzClose                                 @62
-        unzGetGlobalInfo                         @63
-        unzGetCurrentFileInfo                    @64
-        unzGoToFirstFile                         @65
-        unzGoToNextFile                          @66
-        unzOpenCurrentFile                       @67
-        unzReadCurrentFile                       @68
-        unzOpenCurrentFile3                      @69
-        unztell                                  @70
-        unzeof                                   @71
-        unzCloseCurrentFile                      @72
-        unzGetGlobalComment                      @73
-        unzStringFileNameCompare                 @74
-        unzLocateFile                            @75
-        unzGetLocalExtrafield                    @76
-        unzOpen2                                 @77
-        unzOpenCurrentFile2                      @78
-        unzOpenCurrentFilePassword               @79
-
-        zipOpen                                  @80
-        zipOpenNewFileInZip                      @81
-        zipWriteInFileInZip                      @82
-        zipCloseFileInZip                        @83
-        zipClose                                 @84
-        zipOpenNewFileInZip2                     @86
-        zipCloseFileInZipRaw                     @87
-        zipOpen2                                 @88
-        zipOpenNewFileInZip3                     @89
-
-        unzGetFilePos                            @100
-        unzGoToFilePos                           @101
-
-        fill_win32_filefunc                      @110
Index: trunk/minix/lib/zlib-1.2.3/contrib/vstudio/vc8/zlibvc.sln
===================================================================
--- trunk/minix/lib/zlib-1.2.3/contrib/vstudio/vc8/zlibvc.sln	(revision 9)
+++ 	(revision )
@@ -1,144 +1,0 @@
-﻿
-Microsoft Visual Studio Solution File, Format Version 9.00
-# Visual Studio 2005
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "zlibvc", "zlibvc.vcproj", "{8FD826F8-3739-44E6-8CC8-997122E53B8D}"
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "zlibstat", "zlibstat.vcproj", "{745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}"
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "testzlib", "testzlib.vcproj", "{AA6666AA-E09F-4135-9C0C-4FE50C3C654B}"
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "TestZlibDll", "testzlibdll.vcproj", "{C52F9E7B-498A-42BE-8DB4-85A15694366A}"
-	ProjectSection(ProjectDependencies) = postProject
-		{8FD826F8-3739-44E6-8CC8-997122E53B8D} = {8FD826F8-3739-44E6-8CC8-997122E53B8D}
-	EndProjectSection
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "minizip", "minizip.vcproj", "{48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}"
-	ProjectSection(ProjectDependencies) = postProject
-		{8FD826F8-3739-44E6-8CC8-997122E53B8D} = {8FD826F8-3739-44E6-8CC8-997122E53B8D}
-	EndProjectSection
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "miniunz", "miniunz.vcproj", "{C52F9E7B-498A-42BE-8DB4-85A15694382A}"
-	ProjectSection(ProjectDependencies) = postProject
-		{8FD826F8-3739-44E6-8CC8-997122E53B8D} = {8FD826F8-3739-44E6-8CC8-997122E53B8D}
-	EndProjectSection
-EndProject
-Global
-	GlobalSection(SolutionConfigurationPlatforms) = preSolution
-		Debug|Itanium = Debug|Itanium
-		Debug|Win32 = Debug|Win32
-		Debug|x64 = Debug|x64
-		Release|Itanium = Release|Itanium
-		Release|Win32 = Release|Win32
-		Release|x64 = Release|x64
-		ReleaseWithoutAsm|Itanium = ReleaseWithoutAsm|Itanium
-		ReleaseWithoutAsm|Win32 = ReleaseWithoutAsm|Win32
-		ReleaseWithoutAsm|x64 = ReleaseWithoutAsm|x64
-	EndGlobalSection
-	GlobalSection(ProjectConfigurationPlatforms) = postSolution
-		{8FD826F8-3739-44E6-8CC8-997122E53B8D}.Debug|Itanium.ActiveCfg = Debug|Itanium
-		{8FD826F8-3739-44E6-8CC8-997122E53B8D}.Debug|Itanium.Build.0 = Debug|Itanium
-		{8FD826F8-3739-44E6-8CC8-997122E53B8D}.Debug|Win32.ActiveCfg = Debug|Win32
-		{8FD826F8-3739-44E6-8CC8-997122E53B8D}.Debug|Win32.Build.0 = Debug|Win32
-		{8FD826F8-3739-44E6-8CC8-997122E53B8D}.Debug|x64.ActiveCfg = Debug|x64
-		{8FD826F8-3739-44E6-8CC8-997122E53B8D}.Debug|x64.Build.0 = Debug|x64
-		{8FD826F8-3739-44E6-8CC8-997122E53B8D}.Release|Itanium.ActiveCfg = Release|Itanium
-		{8FD826F8-3739-44E6-8CC8-997122E53B8D}.Release|Itanium.Build.0 = Release|Itanium
-		{8FD826F8-3739-44E6-8CC8-997122E53B8D}.Release|Win32.ActiveCfg = Release|Win32
-		{8FD826F8-3739-44E6-8CC8-997122E53B8D}.Release|Win32.Build.0 = Release|Win32
-		{8FD826F8-3739-44E6-8CC8-997122E53B8D}.Release|x64.ActiveCfg = ReleaseWithoutAsm|x64
-		{8FD826F8-3739-44E6-8CC8-997122E53B8D}.Release|x64.Build.0 = ReleaseWithoutAsm|x64
-		{8FD826F8-3739-44E6-8CC8-997122E53B8D}.ReleaseWithoutAsm|Itanium.ActiveCfg = ReleaseWithoutAsm|Itanium
-		{8FD826F8-3739-44E6-8CC8-997122E53B8D}.ReleaseWithoutAsm|Itanium.Build.0 = ReleaseWithoutAsm|Itanium
-		{8FD826F8-3739-44E6-8CC8-997122E53B8D}.ReleaseWithoutAsm|Win32.ActiveCfg = ReleaseWithoutAsm|Win32
-		{8FD826F8-3739-44E6-8CC8-997122E53B8D}.ReleaseWithoutAsm|Win32.Build.0 = ReleaseWithoutAsm|Win32
-		{8FD826F8-3739-44E6-8CC8-997122E53B8D}.ReleaseWithoutAsm|x64.ActiveCfg = ReleaseWithoutAsm|x64
-		{8FD826F8-3739-44E6-8CC8-997122E53B8D}.ReleaseWithoutAsm|x64.Build.0 = ReleaseWithoutAsm|x64
-		{745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.Debug|Itanium.ActiveCfg = Debug|Itanium
-		{745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.Debug|Itanium.Build.0 = Debug|Itanium
-		{745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.Debug|Win32.ActiveCfg = Debug|Win32
-		{745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.Debug|Win32.Build.0 = Debug|Win32
-		{745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.Debug|x64.ActiveCfg = Debug|x64
-		{745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.Debug|x64.Build.0 = Debug|x64
-		{745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.Release|Itanium.ActiveCfg = Release|Itanium
-		{745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.Release|Itanium.Build.0 = Release|Itanium
-		{745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.Release|Win32.ActiveCfg = Release|Win32
-		{745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.Release|Win32.Build.0 = Release|Win32
-		{745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.Release|x64.ActiveCfg = Release|x64
-		{745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.Release|x64.Build.0 = Release|x64
-		{745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.ReleaseWithoutAsm|Itanium.ActiveCfg = ReleaseWithoutAsm|Itanium
-		{745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.ReleaseWithoutAsm|Itanium.Build.0 = ReleaseWithoutAsm|Itanium
-		{745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.ReleaseWithoutAsm|Win32.ActiveCfg = ReleaseWithoutAsm|Win32
-		{745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.ReleaseWithoutAsm|Win32.Build.0 = ReleaseWithoutAsm|Win32
-		{745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.ReleaseWithoutAsm|x64.ActiveCfg = ReleaseWithoutAsm|x64
-		{745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.ReleaseWithoutAsm|x64.Build.0 = ReleaseWithoutAsm|x64
-		{AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.Debug|Itanium.ActiveCfg = Debug|Itanium
-		{AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.Debug|Itanium.Build.0 = Debug|Itanium
-		{AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.Debug|Win32.ActiveCfg = Debug|Win32
-		{AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.Debug|Win32.Build.0 = Debug|Win32
-		{AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.Debug|x64.ActiveCfg = Debug|x64
-		{AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.Debug|x64.Build.0 = Debug|x64
-		{AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.Release|Itanium.ActiveCfg = Release|Itanium
-		{AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.Release|Itanium.Build.0 = Release|Itanium
-		{AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.Release|Win32.ActiveCfg = Release|Win32
-		{AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.Release|Win32.Build.0 = Release|Win32
-		{AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.Release|x64.ActiveCfg = Release|x64
-		{AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.Release|x64.Build.0 = Release|x64
-		{AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.ReleaseWithoutAsm|Itanium.ActiveCfg = ReleaseWithoutAsm|Itanium
-		{AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.ReleaseWithoutAsm|Itanium.Build.0 = ReleaseWithoutAsm|Itanium
-		{AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.ReleaseWithoutAsm|Win32.ActiveCfg = ReleaseWithoutAsm|Win32
-		{AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.ReleaseWithoutAsm|Win32.Build.0 = ReleaseWithoutAsm|Win32
-		{AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.ReleaseWithoutAsm|x64.ActiveCfg = ReleaseWithoutAsm|x64
-		{AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.ReleaseWithoutAsm|x64.Build.0 = ReleaseWithoutAsm|x64
-		{C52F9E7B-498A-42BE-8DB4-85A15694366A}.Debug|Itanium.ActiveCfg = Debug|Itanium
-		{C52F9E7B-498A-42BE-8DB4-85A15694366A}.Debug|Itanium.Build.0 = Debug|Itanium
-		{C52F9E7B-498A-42BE-8DB4-85A15694366A}.Debug|Win32.ActiveCfg = Debug|Win32
-		{C52F9E7B-498A-42BE-8DB4-85A15694366A}.Debug|Win32.Build.0 = Debug|Win32
-		{C52F9E7B-498A-42BE-8DB4-85A15694366A}.Debug|x64.ActiveCfg = Debug|x64
-		{C52F9E7B-498A-42BE-8DB4-85A15694366A}.Debug|x64.Build.0 = Debug|x64
-		{C52F9E7B-498A-42BE-8DB4-85A15694366A}.Release|Itanium.ActiveCfg = Release|Itanium
-		{C52F9E7B-498A-42BE-8DB4-85A15694366A}.Release|Itanium.Build.0 = Release|Itanium
-		{C52F9E7B-498A-42BE-8DB4-85A15694366A}.Release|Win32.ActiveCfg = Release|Win32
-		{C52F9E7B-498A-42BE-8DB4-85A15694366A}.Release|Win32.Build.0 = Release|Win32
-		{C52F9E7B-498A-42BE-8DB4-85A15694366A}.Release|x64.ActiveCfg = Release|x64
-		{C52F9E7B-498A-42BE-8DB4-85A15694366A}.Release|x64.Build.0 = Release|x64
-		{C52F9E7B-498A-42BE-8DB4-85A15694366A}.ReleaseWithoutAsm|Itanium.ActiveCfg = Release|Itanium
-		{C52F9E7B-498A-42BE-8DB4-85A15694366A}.ReleaseWithoutAsm|Itanium.Build.0 = Release|Itanium
-		{C52F9E7B-498A-42BE-8DB4-85A15694366A}.ReleaseWithoutAsm|Win32.ActiveCfg = Release|Itanium
-		{C52F9E7B-498A-42BE-8DB4-85A15694366A}.ReleaseWithoutAsm|x64.ActiveCfg = Release|Itanium
-		{48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.Debug|Itanium.ActiveCfg = Debug|Itanium
-		{48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.Debug|Itanium.Build.0 = Debug|Itanium
-		{48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.Debug|Win32.ActiveCfg = Debug|Win32
-		{48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.Debug|Win32.Build.0 = Debug|Win32
-		{48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.Debug|x64.ActiveCfg = Debug|x64
-		{48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.Debug|x64.Build.0 = Debug|x64
-		{48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.Release|Itanium.ActiveCfg = Release|Itanium
-		{48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.Release|Itanium.Build.0 = Release|Itanium
-		{48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.Release|Win32.ActiveCfg = Release|Win32
-		{48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.Release|Win32.Build.0 = Release|Win32
-		{48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.Release|x64.ActiveCfg = Release|x64
-		{48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.Release|x64.Build.0 = Release|x64
-		{48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.ReleaseWithoutAsm|Itanium.ActiveCfg = Release|Itanium
-		{48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.ReleaseWithoutAsm|Itanium.Build.0 = Release|Itanium
-		{48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.ReleaseWithoutAsm|Win32.ActiveCfg = Release|Itanium
-		{48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.ReleaseWithoutAsm|x64.ActiveCfg = Release|Itanium
-		{C52F9E7B-498A-42BE-8DB4-85A15694382A}.Debug|Itanium.ActiveCfg = Debug|Itanium
-		{C52F9E7B-498A-42BE-8DB4-85A15694382A}.Debug|Itanium.Build.0 = Debug|Itanium
-		{C52F9E7B-498A-42BE-8DB4-85A15694382A}.Debug|Win32.ActiveCfg = Debug|Win32
-		{C52F9E7B-498A-42BE-8DB4-85A15694382A}.Debug|Win32.Build.0 = Debug|Win32
-		{C52F9E7B-498A-42BE-8DB4-85A15694382A}.Debug|x64.ActiveCfg = Debug|x64
-		{C52F9E7B-498A-42BE-8DB4-85A15694382A}.Debug|x64.Build.0 = Debug|x64
-		{C52F9E7B-498A-42BE-8DB4-85A15694382A}.Release|Itanium.ActiveCfg = Release|Itanium
-		{C52F9E7B-498A-42BE-8DB4-85A15694382A}.Release|Itanium.Build.0 = Release|Itanium
-		{C52F9E7B-498A-42BE-8DB4-85A15694382A}.Release|Win32.ActiveCfg = Release|Win32
-		{C52F9E7B-498A-42BE-8DB4-85A15694382A}.Release|Win32.Build.0 = Release|Win32
-		{C52F9E7B-498A-42BE-8DB4-85A15694382A}.Release|x64.ActiveCfg = Release|x64
-		{C52F9E7B-498A-42BE-8DB4-85A15694382A}.Release|x64.Build.0 = Release|x64
-		{C52F9E7B-498A-42BE-8DB4-85A15694382A}.ReleaseWithoutAsm|Itanium.ActiveCfg = Release|Itanium
-		{C52F9E7B-498A-42BE-8DB4-85A15694382A}.ReleaseWithoutAsm|Itanium.Build.0 = Release|Itanium
-		{C52F9E7B-498A-42BE-8DB4-85A15694382A}.ReleaseWithoutAsm|Win32.ActiveCfg = Release|Itanium
-		{C52F9E7B-498A-42BE-8DB4-85A15694382A}.ReleaseWithoutAsm|x64.ActiveCfg = Release|Itanium
-	EndGlobalSection
-	GlobalSection(SolutionProperties) = preSolution
-		HideSolutionNode = FALSE
-	EndGlobalSection
-EndGlobal
Index: trunk/minix/lib/zlib-1.2.3/contrib/vstudio/vc8/zlibvc.vcproj
===================================================================
--- trunk/minix/lib/zlib-1.2.3/contrib/vstudio/vc8/zlibvc.vcproj	(revision 9)
+++ 	(revision )
@@ -1,1219 +1,0 @@
-<?xml version="1.0" encoding="Windows-1252"?>
-<VisualStudioProject
-	ProjectType="Visual C++"
-	Version="8,00"
-	Name="zlibvc"
-	ProjectGUID="{8FD826F8-3739-44E6-8CC8-997122E53B8D}"
-	>
-	<Platforms>
-		<Platform
-			Name="Win32"
-		/>
-		<Platform
-			Name="x64"
-		/>
-		<Platform
-			Name="Itanium"
-		/>
-	</Platforms>
-	<ToolFiles>
-	</ToolFiles>
-	<Configurations>
-		<Configuration
-			Name="Debug|Win32"
-			OutputDirectory="x86\ZlibDll$(ConfigurationName)"
-			IntermediateDirectory="x86\ZlibDll$(ConfigurationName)\Tmp"
-			ConfigurationType="2"
-			InheritedPropertySheets="UpgradeFromVC70.vsprops"
-			UseOfMFC="0"
-			ATLMinimizesCRunTimeLibraryUsage="false"
-			>
-			<Tool
-				Name="VCPreBuildEventTool"
-			/>
-			<Tool
-				Name="VCCustomBuildTool"
-			/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"
-			/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"
-			/>
-			<Tool
-				Name="VCMIDLTool"
-				PreprocessorDefinitions="_DEBUG"
-				MkTypLibCompatible="true"
-				SuppressStartupBanner="true"
-				TargetEnvironment="1"
-				TypeLibraryName="$(OutDir)/zlibvc.tlb"
-			/>
-			<Tool
-				Name="VCCLCompilerTool"
-				Optimization="0"
-				AdditionalIncludeDirectories="..\..\..;..\..\masmx86"
-				PreprocessorDefinitions="WIN32,_CRT_SECURE_NO_DEPRECATE,ZLIB_WINAPI,ASMV,ASMINF"
-				ExceptionHandling="0"
-				RuntimeLibrary="1"
-				BufferSecurityCheck="false"
-				PrecompiledHeaderFile="$(IntDir)/zlibvc.pch"
-				AssemblerListingLocation="$(IntDir)\"
-				ObjectFile="$(IntDir)\"
-				ProgramDataBaseFileName="$(OutDir)\"
-				BrowseInformation="0"
-				WarningLevel="3"
-				SuppressStartupBanner="true"
-				DebugInformationFormat="4"
-			/>
-			<Tool
-				Name="VCManagedResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCResourceCompilerTool"
-				PreprocessorDefinitions="_DEBUG"
-				Culture="1036"
-			/>
-			<Tool
-				Name="VCPreLinkEventTool"
-			/>
-			<Tool
-				Name="VCLinkerTool"
-				AdditionalOptions="/MACHINE:I386"
-				AdditionalDependencies="..\..\masmx86\gvmat32.obj ..\..\masmx86\inffas32.obj"
-				OutputFile="$(OutDir)\zlibwapi.dll"
-				LinkIncremental="2"
-				SuppressStartupBanner="true"
-				GenerateManifest="false"
-				ModuleDefinitionFile=".\zlibvc.def"
-				GenerateDebugInformation="true"
-				ProgramDatabaseFile="$(OutDir)/zlibwapi.pdb"
-				GenerateMapFile="true"
-				MapFileName="$(OutDir)/zlibwapi.map"
-				SubSystem="2"
-				ImportLibrary="$(OutDir)/zlibwapi.lib"
-			/>
-			<Tool
-				Name="VCALinkTool"
-			/>
-			<Tool
-				Name="VCManifestTool"
-			/>
-			<Tool
-				Name="VCXDCMakeTool"
-			/>
-			<Tool
-				Name="VCBscMakeTool"
-			/>
-			<Tool
-				Name="VCFxCopTool"
-			/>
-			<Tool
-				Name="VCAppVerifierTool"
-			/>
-			<Tool
-				Name="VCWebDeploymentTool"
-			/>
-			<Tool
-				Name="VCPostBuildEventTool"
-			/>
-		</Configuration>
-		<Configuration
-			Name="Debug|x64"
-			OutputDirectory="x64\ZlibDll$(ConfigurationName)"
-			IntermediateDirectory="x64\ZlibDll$(ConfigurationName)\Tmp"
-			ConfigurationType="2"
-			InheritedPropertySheets="UpgradeFromVC70.vsprops"
-			UseOfMFC="0"
-			ATLMinimizesCRunTimeLibraryUsage="false"
-			>
-			<Tool
-				Name="VCPreBuildEventTool"
-			/>
-			<Tool
-				Name="VCCustomBuildTool"
-			/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"
-			/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"
-			/>
-			<Tool
-				Name="VCMIDLTool"
-				PreprocessorDefinitions="_DEBUG"
-				MkTypLibCompatible="true"
-				SuppressStartupBanner="true"
-				TargetEnvironment="3"
-				TypeLibraryName="$(OutDir)/zlibvc.tlb"
-			/>
-			<Tool
-				Name="VCCLCompilerTool"
-				Optimization="0"
-				AdditionalIncludeDirectories="..\..\..;..\..\masmx86"
-				PreprocessorDefinitions="WIN32,_CRT_SECURE_NO_DEPRECATE,ZLIB_WINAPI,ASMV,ASMINF;WIN64"
-				ExceptionHandling="0"
-				RuntimeLibrary="3"
-				BufferSecurityCheck="false"
-				PrecompiledHeaderFile="$(IntDir)/zlibvc.pch"
-				AssemblerListingLocation="$(IntDir)\"
-				ObjectFile="$(IntDir)\"
-				ProgramDataBaseFileName="$(OutDir)\"
-				BrowseInformation="0"
-				WarningLevel="3"
-				SuppressStartupBanner="true"
-				DebugInformationFormat="3"
-			/>
-			<Tool
-				Name="VCManagedResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCResourceCompilerTool"
-				PreprocessorDefinitions="_DEBUG"
-				Culture="1036"
-			/>
-			<Tool
-				Name="VCPreLinkEventTool"
-			/>
-			<Tool
-				Name="VCLinkerTool"
-				AdditionalDependencies="..\..\masmx64\gvmat64.obj ..\..\masmx64\inffasx64.obj "
-				OutputFile="$(OutDir)\zlibwapi.dll"
-				LinkIncremental="2"
-				SuppressStartupBanner="true"
-				GenerateManifest="false"
-				ModuleDefinitionFile=".\zlibvc.def"
-				GenerateDebugInformation="true"
-				ProgramDatabaseFile="$(OutDir)/zlibwapi.pdb"
-				GenerateMapFile="true"
-				MapFileName="$(OutDir)/zlibwapi.map"
-				SubSystem="2"
-				ImportLibrary="$(OutDir)/zlibwapi.lib"
-				TargetMachine="17"
-			/>
-			<Tool
-				Name="VCALinkTool"
-			/>
-			<Tool
-				Name="VCManifestTool"
-			/>
-			<Tool
-				Name="VCXDCMakeTool"
-			/>
-			<Tool
-				Name="VCBscMakeTool"
-			/>
-			<Tool
-				Name="VCFxCopTool"
-			/>
-			<Tool
-				Name="VCAppVerifierTool"
-			/>
-			<Tool
-				Name="VCWebDeploymentTool"
-			/>
-			<Tool
-				Name="VCPostBuildEventTool"
-			/>
-		</Configuration>
-		<Configuration
-			Name="Debug|Itanium"
-			OutputDirectory="ia64\ZlibDll$(ConfigurationName)"
-			IntermediateDirectory="ia64\ZlibDll$(ConfigurationName)\Tmp"
-			ConfigurationType="2"
-			InheritedPropertySheets="UpgradeFromVC70.vsprops"
-			UseOfMFC="0"
-			ATLMinimizesCRunTimeLibraryUsage="false"
-			>
-			<Tool
-				Name="VCPreBuildEventTool"
-			/>
-			<Tool
-				Name="VCCustomBuildTool"
-			/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"
-			/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"
-			/>
-			<Tool
-				Name="VCMIDLTool"
-				PreprocessorDefinitions="_DEBUG"
-				MkTypLibCompatible="true"
-				SuppressStartupBanner="true"
-				TargetEnvironment="2"
-				TypeLibraryName="$(OutDir)/zlibvc.tlb"
-			/>
-			<Tool
-				Name="VCCLCompilerTool"
-				Optimization="0"
-				AdditionalIncludeDirectories="..\..\..;..\..\masmx86"
-				PreprocessorDefinitions="WIN32;_CRT_SECURE_NO_DEPRECATE;ZLIB_WINAPI;WIN64"
-				ExceptionHandling="0"
-				RuntimeLibrary="3"
-				BufferSecurityCheck="false"
-				PrecompiledHeaderFile="$(IntDir)/zlibvc.pch"
-				AssemblerListingLocation="$(IntDir)\"
-				ObjectFile="$(IntDir)\"
-				ProgramDataBaseFileName="$(OutDir)\"
-				BrowseInformation="0"
-				WarningLevel="3"
-				SuppressStartupBanner="true"
-				DebugInformationFormat="3"
-			/>
-			<Tool
-				Name="VCManagedResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCResourceCompilerTool"
-				PreprocessorDefinitions="_DEBUG"
-				Culture="1036"
-			/>
-			<Tool
-				Name="VCPreLinkEventTool"
-			/>
-			<Tool
-				Name="VCLinkerTool"
-				OutputFile="$(OutDir)\zlibwapi.dll"
-				LinkIncremental="2"
-				SuppressStartupBanner="true"
-				GenerateManifest="false"
-				ModuleDefinitionFile=".\zlibvc.def"
-				GenerateDebugInformation="true"
-				ProgramDatabaseFile="$(OutDir)/zlibwapi.pdb"
-				GenerateMapFile="true"
-				MapFileName="$(OutDir)/zlibwapi.map"
-				SubSystem="2"
-				ImportLibrary="$(OutDir)/zlibwapi.lib"
-				TargetMachine="5"
-			/>
-			<Tool
-				Name="VCALinkTool"
-			/>
-			<Tool
-				Name="VCManifestTool"
-			/>
-			<Tool
-				Name="VCXDCMakeTool"
-			/>
-			<Tool
-				Name="VCBscMakeTool"
-			/>
-			<Tool
-				Name="VCFxCopTool"
-			/>
-			<Tool
-				Name="VCAppVerifierTool"
-			/>
-			<Tool
-				Name="VCWebDeploymentTool"
-			/>
-			<Tool
-				Name="VCPostBuildEventTool"
-			/>
-		</Configuration>
-		<Configuration
-			Name="ReleaseWithoutAsm|Win32"
-			OutputDirectory="x86\ZlibDll$(ConfigurationName)"
-			IntermediateDirectory="x86\ZlibDll$(ConfigurationName)\Tmp"
-			ConfigurationType="2"
-			InheritedPropertySheets="UpgradeFromVC70.vsprops"
-			UseOfMFC="0"
-			ATLMinimizesCRunTimeLibraryUsage="false"
-			WholeProgramOptimization="1"
-			>
-			<Tool
-				Name="VCPreBuildEventTool"
-			/>
-			<Tool
-				Name="VCCustomBuildTool"
-			/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"
-			/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"
-			/>
-			<Tool
-				Name="VCMIDLTool"
-				PreprocessorDefinitions="NDEBUG"
-				MkTypLibCompatible="true"
-				SuppressStartupBanner="true"
-				TargetEnvironment="1"
-				TypeLibraryName="$(OutDir)/zlibvc.tlb"
-			/>
-			<Tool
-				Name="VCCLCompilerTool"
-				InlineFunctionExpansion="1"
-				AdditionalIncludeDirectories="..\..\..;..\..\masmx86"
-				PreprocessorDefinitions="WIN32,_CRT_SECURE_NO_DEPRECATE,ZLIB_WINAPI"
-				StringPooling="true"
-				ExceptionHandling="0"
-				RuntimeLibrary="2"
-				BufferSecurityCheck="false"
-				EnableFunctionLevelLinking="true"
-				PrecompiledHeaderFile="$(IntDir)/zlibvc.pch"
-				AssemblerOutput="2"
-				AssemblerListingLocation="$(IntDir)\"
-				ObjectFile="$(IntDir)\"
-				ProgramDataBaseFileName="$(OutDir)\"
-				BrowseInformation="0"
-				WarningLevel="3"
-				SuppressStartupBanner="true"
-			/>
-			<Tool
-				Name="VCManagedResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCResourceCompilerTool"
-				PreprocessorDefinitions="NDEBUG"
-				Culture="1036"
-			/>
-			<Tool
-				Name="VCPreLinkEventTool"
-			/>
-			<Tool
-				Name="VCLinkerTool"
-				AdditionalOptions="/MACHINE:I386"
-				OutputFile="$(OutDir)\zlibwapi.dll"
-				LinkIncremental="1"
-				SuppressStartupBanner="true"
-				GenerateManifest="false"
-				IgnoreAllDefaultLibraries="false"
-				ModuleDefinitionFile=".\zlibvc.def"
-				ProgramDatabaseFile="$(OutDir)/zlibwapi.pdb"
-				GenerateMapFile="true"
-				MapFileName="$(OutDir)/zlibwapi.map"
-				SubSystem="2"
-				OptimizeForWindows98="1"
-				ImportLibrary="$(OutDir)/zlibwapi.lib"
-			/>
-			<Tool
-				Name="VCALinkTool"
-			/>
-			<Tool
-				Name="VCManifestTool"
-			/>
-			<Tool
-				Name="VCXDCMakeTool"
-			/>
-			<Tool
-				Name="VCBscMakeTool"
-			/>
-			<Tool
-				Name="VCFxCopTool"
-			/>
-			<Tool
-				Name="VCAppVerifierTool"
-			/>
-			<Tool
-				Name="VCWebDeploymentTool"
-			/>
-			<Tool
-				Name="VCPostBuildEventTool"
-			/>
-		</Configuration>
-		<Configuration
-			Name="ReleaseWithoutAsm|x64"
-			OutputDirectory="x64\ZlibDll$(ConfigurationName)"
-			IntermediateDirectory="x64\ZlibDll$(ConfigurationName)\Tmp"
-			ConfigurationType="2"
-			InheritedPropertySheets="UpgradeFromVC70.vsprops"
-			UseOfMFC="0"
-			ATLMinimizesCRunTimeLibraryUsage="false"
-			WholeProgramOptimization="1"
-			>
-			<Tool
-				Name="VCPreBuildEventTool"
-			/>
-			<Tool
-				Name="VCCustomBuildTool"
-			/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"
-			/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"
-			/>
-			<Tool
-				Name="VCMIDLTool"
-				PreprocessorDefinitions="NDEBUG"
-				MkTypLibCompatible="true"
-				SuppressStartupBanner="true"
-				TargetEnvironment="3"
-				TypeLibraryName="$(OutDir)/zlibvc.tlb"
-			/>
-			<Tool
-				Name="VCCLCompilerTool"
-				InlineFunctionExpansion="1"
-				AdditionalIncludeDirectories="..\..\..;..\..\masmx86"
-				PreprocessorDefinitions="WIN32,_CRT_SECURE_NO_DEPRECATE,ZLIB_WINAPI;WIN64"
-				StringPooling="true"
-				ExceptionHandling="0"
-				RuntimeLibrary="2"
-				BufferSecurityCheck="false"
-				EnableFunctionLevelLinking="true"
-				PrecompiledHeaderFile="$(IntDir)/zlibvc.pch"
-				AssemblerOutput="2"
-				AssemblerListingLocation="$(IntDir)\"
-				ObjectFile="$(IntDir)\"
-				ProgramDataBaseFileName="$(OutDir)\"
-				BrowseInformation="0"
-				WarningLevel="3"
-				SuppressStartupBanner="true"
-			/>
-			<Tool
-				Name="VCManagedResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCResourceCompilerTool"
-				PreprocessorDefinitions="NDEBUG"
-				Culture="1036"
-			/>
-			<Tool
-				Name="VCPreLinkEventTool"
-			/>
-			<Tool
-				Name="VCLinkerTool"
-				OutputFile="$(OutDir)\zlibwapi.dll"
-				LinkIncremental="1"
-				SuppressStartupBanner="true"
-				GenerateManifest="false"
-				IgnoreAllDefaultLibraries="false"
-				ModuleDefinitionFile=".\zlibvc.def"
-				ProgramDatabaseFile="$(OutDir)/zlibwapi.pdb"
-				GenerateMapFile="true"
-				MapFileName="$(OutDir)/zlibwapi.map"
-				SubSystem="2"
-				OptimizeForWindows98="1"
-				ImportLibrary="$(OutDir)/zlibwapi.lib"
-				TargetMachine="17"
-			/>
-			<Tool
-				Name="VCALinkTool"
-			/>
-			<Tool
-				Name="VCManifestTool"
-			/>
-			<Tool
-				Name="VCXDCMakeTool"
-			/>
-			<Tool
-				Name="VCBscMakeTool"
-			/>
-			<Tool
-				Name="VCFxCopTool"
-			/>
-			<Tool
-				Name="VCAppVerifierTool"
-			/>
-			<Tool
-				Name="VCWebDeploymentTool"
-			/>
-			<Tool
-				Name="VCPostBuildEventTool"
-			/>
-		</Configuration>
-		<Configuration
-			Name="ReleaseWithoutAsm|Itanium"
-			OutputDirectory="ia64\ZlibDll$(ConfigurationName)"
-			IntermediateDirectory="ia64\ZlibDll$(ConfigurationName)\Tmp"
-			ConfigurationType="2"
-			InheritedPropertySheets="UpgradeFromVC70.vsprops"
-			UseOfMFC="0"
-			ATLMinimizesCRunTimeLibraryUsage="false"
-			WholeProgramOptimization="1"
-			>
-			<Tool
-				Name="VCPreBuildEventTool"
-			/>
-			<Tool
-				Name="VCCustomBuildTool"
-			/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"
-			/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"
-			/>
-			<Tool
-				Name="VCMIDLTool"
-				PreprocessorDefinitions="NDEBUG"
-				MkTypLibCompatible="true"
-				SuppressStartupBanner="true"
-				TargetEnvironment="2"
-				TypeLibraryName="$(OutDir)/zlibvc.tlb"
-			/>
-			<Tool
-				Name="VCCLCompilerTool"
-				InlineFunctionExpansion="1"
-				AdditionalIncludeDirectories="..\..\..;..\..\masmx86"
-				PreprocessorDefinitions="WIN32,_CRT_SECURE_NO_DEPRECATE,ZLIB_WINAPI;WIN64"
-				StringPooling="true"
-				ExceptionHandling="0"
-				RuntimeLibrary="2"
-				BufferSecurityCheck="false"
-				EnableFunctionLevelLinking="true"
-				PrecompiledHeaderFile="$(IntDir)/zlibvc.pch"
-				AssemblerOutput="2"
-				AssemblerListingLocation="$(IntDir)\"
-				ObjectFile="$(IntDir)\"
-				ProgramDataBaseFileName="$(OutDir)\"
-				BrowseInformation="0"
-				WarningLevel="3"
-				SuppressStartupBanner="true"
-			/>
-			<Tool
-				Name="VCManagedResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCResourceCompilerTool"
-				PreprocessorDefinitions="NDEBUG"
-				Culture="1036"
-			/>
-			<Tool
-				Name="VCPreLinkEventTool"
-			/>
-			<Tool
-				Name="VCLinkerTool"
-				OutputFile="$(OutDir)\zlibwapi.dll"
-				LinkIncremental="1"
-				SuppressStartupBanner="true"
-				GenerateManifest="false"
-				IgnoreAllDefaultLibraries="false"
-				ModuleDefinitionFile=".\zlibvc.def"
-				ProgramDatabaseFile="$(OutDir)/zlibwapi.pdb"
-				GenerateMapFile="true"
-				MapFileName="$(OutDir)/zlibwapi.map"
-				SubSystem="2"
-				OptimizeForWindows98="1"
-				ImportLibrary="$(OutDir)/zlibwapi.lib"
-				TargetMachine="5"
-			/>
-			<Tool
-				Name="VCALinkTool"
-			/>
-			<Tool
-				Name="VCManifestTool"
-			/>
-			<Tool
-				Name="VCXDCMakeTool"
-			/>
-			<Tool
-				Name="VCBscMakeTool"
-			/>
-			<Tool
-				Name="VCFxCopTool"
-			/>
-			<Tool
-				Name="VCAppVerifierTool"
-			/>
-			<Tool
-				Name="VCWebDeploymentTool"
-			/>
-			<Tool
-				Name="VCPostBuildEventTool"
-			/>
-		</Configuration>
-		<Configuration
-			Name="Release|Win32"
-			OutputDirectory="x86\ZlibDll$(ConfigurationName)"
-			IntermediateDirectory="x86\ZlibDll$(ConfigurationName)\Tmp"
-			ConfigurationType="2"
-			InheritedPropertySheets="UpgradeFromVC70.vsprops"
-			UseOfMFC="0"
-			ATLMinimizesCRunTimeLibraryUsage="false"
-			WholeProgramOptimization="1"
-			>
-			<Tool
-				Name="VCPreBuildEventTool"
-			/>
-			<Tool
-				Name="VCCustomBuildTool"
-			/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"
-			/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"
-			/>
-			<Tool
-				Name="VCMIDLTool"
-				PreprocessorDefinitions="NDEBUG"
-				MkTypLibCompatible="true"
-				SuppressStartupBanner="true"
-				TargetEnvironment="1"
-				TypeLibraryName="$(OutDir)/zlibvc.tlb"
-			/>
-			<Tool
-				Name="VCCLCompilerTool"
-				InlineFunctionExpansion="1"
-				AdditionalIncludeDirectories="..\..\..;..\..\masmx86"
-				PreprocessorDefinitions="WIN32;_CRT_SECURE_NO_DEPRECATE;ZLIB_WINAPI;ASMV;ASMINF"
-				StringPooling="true"
-				ExceptionHandling="0"
-				RuntimeLibrary="2"
-				BufferSecurityCheck="false"
-				EnableFunctionLevelLinking="true"
-				PrecompiledHeaderFile="$(IntDir)/zlibvc.pch"
-				AssemblerOutput="2"
-				AssemblerListingLocation="$(IntDir)\"
-				ObjectFile="$(IntDir)\"
-				ProgramDataBaseFileName="$(OutDir)\"
-				BrowseInformation="0"
-				WarningLevel="3"
-				SuppressStartupBanner="true"
-			/>
-			<Tool
-				Name="VCManagedResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCResourceCompilerTool"
-				PreprocessorDefinitions="NDEBUG"
-				Culture="1036"
-			/>
-			<Tool
-				Name="VCPreLinkEventTool"
-			/>
-			<Tool
-				Name="VCLinkerTool"
-				AdditionalOptions="/MACHINE:I386"
-				AdditionalDependencies="..\..\masmx86\gvmat32.obj ..\..\masmx86\inffas32.obj "
-				OutputFile="$(OutDir)\zlibwapi.dll"
-				LinkIncremental="1"
-				SuppressStartupBanner="true"
-				GenerateManifest="false"
-				IgnoreAllDefaultLibraries="false"
-				ModuleDefinitionFile=".\zlibvc.def"
-				ProgramDatabaseFile="$(OutDir)/zlibwapi.pdb"
-				GenerateMapFile="true"
-				MapFileName="$(OutDir)/zlibwapi.map"
-				SubSystem="2"
-				OptimizeForWindows98="1"
-				ImportLibrary="$(OutDir)/zlibwapi.lib"
-			/>
-			<Tool
-				Name="VCALinkTool"
-			/>
-			<Tool
-				Name="VCManifestTool"
-			/>
-			<Tool
-				Name="VCXDCMakeTool"
-			/>
-			<Tool
-				Name="VCBscMakeTool"
-			/>
-			<Tool
-				Name="VCFxCopTool"
-			/>
-			<Tool
-				Name="VCAppVerifierTool"
-			/>
-			<Tool
-				Name="VCWebDeploymentTool"
-			/>
-			<Tool
-				Name="VCPostBuildEventTool"
-			/>
-		</Configuration>
-		<Configuration
-			Name="Release|x64"
-			OutputDirectory="x64\ZlibDll$(ConfigurationName)"
-			IntermediateDirectory="x64\ZlibDll$(ConfigurationName)\Tmp"
-			ConfigurationType="2"
-			InheritedPropertySheets="UpgradeFromVC70.vsprops"
-			UseOfMFC="0"
-			ATLMinimizesCRunTimeLibraryUsage="false"
-			WholeProgramOptimization="1"
-			>
-			<Tool
-				Name="VCPreBuildEventTool"
-			/>
-			<Tool
-				Name="VCCustomBuildTool"
-			/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"
-			/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"
-			/>
-			<Tool
-				Name="VCMIDLTool"
-				PreprocessorDefinitions="NDEBUG"
-				MkTypLibCompatible="true"
-				SuppressStartupBanner="true"
-				TargetEnvironment="3"
-				TypeLibraryName="$(OutDir)/zlibvc.tlb"
-			/>
-			<Tool
-				Name="VCCLCompilerTool"
-				InlineFunctionExpansion="1"
-				AdditionalIncludeDirectories="..\..\..;..\..\masmx86"
-				PreprocessorDefinitions="_CRT_SECURE_NO_DEPRECATE;ZLIB_WINAPI;ASMV;ASMINF;WIN64"
-				StringPooling="true"
-				ExceptionHandling="0"
-				RuntimeLibrary="2"
-				BufferSecurityCheck="false"
-				EnableFunctionLevelLinking="true"
-				PrecompiledHeaderFile="$(IntDir)/zlibvc.pch"
-				AssemblerOutput="2"
-				AssemblerListingLocation="$(IntDir)\"
-				ObjectFile="$(IntDir)\"
-				ProgramDataBaseFileName="$(OutDir)\"
-				BrowseInformation="0"
-				WarningLevel="3"
-				SuppressStartupBanner="true"
-			/>
-			<Tool
-				Name="VCManagedResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCResourceCompilerTool"
-				PreprocessorDefinitions="NDEBUG"
-				Culture="1036"
-			/>
-			<Tool
-				Name="VCPreLinkEventTool"
-			/>
-			<Tool
-				Name="VCLinkerTool"
-				AdditionalDependencies="..\..\masmx64\gvmat64.obj ..\..\masmx64\inffasx64.obj "
-				OutputFile="$(OutDir)\zlibwapi.dll"
-				LinkIncremental="1"
-				SuppressStartupBanner="true"
-				GenerateManifest="false"
-				IgnoreAllDefaultLibraries="false"
-				ModuleDefinitionFile=".\zlibvc.def"
-				ProgramDatabaseFile="$(OutDir)/zlibwapi.pdb"
-				GenerateMapFile="true"
-				MapFileName="$(OutDir)/zlibwapi.map"
-				SubSystem="2"
-				OptimizeForWindows98="1"
-				ImportLibrary="$(OutDir)/zlibwapi.lib"
-				TargetMachine="17"
-			/>
-			<Tool
-				Name="VCALinkTool"
-			/>
-			<Tool
-				Name="VCManifestTool"
-			/>
-			<Tool
-				Name="VCXDCMakeTool"
-			/>
-			<Tool
-				Name="VCBscMakeTool"
-			/>
-			<Tool
-				Name="VCFxCopTool"
-			/>
-			<Tool
-				Name="VCAppVerifierTool"
-			/>
-			<Tool
-				Name="VCWebDeploymentTool"
-			/>
-			<Tool
-				Name="VCPostBuildEventTool"
-			/>
-		</Configuration>
-		<Configuration
-			Name="Release|Itanium"
-			OutputDirectory="ia64\ZlibDll$(ConfigurationName)"
-			IntermediateDirectory="ia64\ZlibDll$(ConfigurationName)\Tmp"
-			ConfigurationType="2"
-			InheritedPropertySheets="UpgradeFromVC70.vsprops"
-			UseOfMFC="0"
-			ATLMinimizesCRunTimeLibraryUsage="false"
-			WholeProgramOptimization="1"
-			>
-			<Tool
-				Name="VCPreBuildEventTool"
-			/>
-			<Tool
-				Name="VCCustomBuildTool"
-			/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"
-			/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"
-			/>
-			<Tool
-				Name="VCMIDLTool"
-				PreprocessorDefinitions="NDEBUG"
-				MkTypLibCompatible="true"
-				SuppressStartupBanner="true"
-				TargetEnvironment="2"
-				TypeLibraryName="$(OutDir)/zlibvc.tlb"
-			/>
-			<Tool
-				Name="VCCLCompilerTool"
-				InlineFunctionExpansion="1"
-				AdditionalIncludeDirectories="..\..\..;..\..\masmx86"
-				PreprocessorDefinitions="_CRT_SECURE_NO_DEPRECATE;ZLIB_WINAPI;WIN64"
-				StringPooling="true"
-				ExceptionHandling="0"
-				RuntimeLibrary="2"
-				BufferSecurityCheck="false"
-				EnableFunctionLevelLinking="true"
-				PrecompiledHeaderFile="$(IntDir)/zlibvc.pch"
-				AssemblerOutput="2"
-				AssemblerListingLocation="$(IntDir)\"
-				ObjectFile="$(IntDir)\"
-				ProgramDataBaseFileName="$(OutDir)\"
-				BrowseInformation="0"
-				WarningLevel="3"
-				SuppressStartupBanner="true"
-			/>
-			<Tool
-				Name="VCManagedResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCResourceCompilerTool"
-				PreprocessorDefinitions="NDEBUG"
-				Culture="1036"
-			/>
-			<Tool
-				Name="VCPreLinkEventTool"
-			/>
-			<Tool
-				Name="VCLinkerTool"
-				OutputFile="$(OutDir)\zlibwapi.dll"
-				LinkIncremental="1"
-				SuppressStartupBanner="true"
-				GenerateManifest="false"
-				IgnoreAllDefaultLibraries="false"
-				ModuleDefinitionFile=".\zlibvc.def"
-				ProgramDatabaseFile="$(OutDir)/zlibwapi.pdb"
-				GenerateMapFile="true"
-				MapFileName="$(OutDir)/zlibwapi.map"
-				SubSystem="2"
-				OptimizeForWindows98="1"
-				ImportLibrary="$(OutDir)/zlibwapi.lib"
-				TargetMachine="5"
-			/>
-			<Tool
-				Name="VCALinkTool"
-			/>
-			<Tool
-				Name="VCManifestTool"
-			/>
-			<Tool
-				Name="VCXDCMakeTool"
-			/>
-			<Tool
-				Name="VCBscMakeTool"
-			/>
-			<Tool
-				Name="VCFxCopTool"
-			/>
-			<Tool
-				Name="VCAppVerifierTool"
-			/>
-			<Tool
-				Name="VCWebDeploymentTool"
-			/>
-			<Tool
-				Name="VCPostBuildEventTool"
-			/>
-		</Configuration>
-	</Configurations>
-	<References>
-	</References>
-	<Files>
-		<Filter
-			Name="Source Files"
-			Filter="cpp;c;cxx;rc;def;r;odl;hpj;bat;for;f90"
-			>
-			<File
-				RelativePath="..\..\..\adler32.c"
-				>
-			</File>
-			<File
-				RelativePath="..\..\..\compress.c"
-				>
-			</File>
-			<File
-				RelativePath="..\..\..\crc32.c"
-				>
-			</File>
-			<File
-				RelativePath="..\..\..\deflate.c"
-				>
-			</File>
-			<File
-				RelativePath="..\..\masmx86\gvmat32c.c"
-				>
-				<FileConfiguration
-					Name="Debug|x64"
-					ExcludedFromBuild="true"
-					>
-					<Tool
-						Name="VCCLCompilerTool"
-					/>
-				</FileConfiguration>
-				<FileConfiguration
-					Name="Debug|Itanium"
-					ExcludedFromBuild="true"
-					>
-					<Tool
-						Name="VCCLCompilerTool"
-					/>
-				</FileConfiguration>
-				<FileConfiguration
-					Name="ReleaseWithoutAsm|Win32"
-					ExcludedFromBuild="true"
-					>
-					<Tool
-						Name="VCCLCompilerTool"
-					/>
-				</FileConfiguration>
-				<FileConfiguration
-					Name="ReleaseWithoutAsm|x64"
-					ExcludedFromBuild="true"
-					>
-					<Tool
-						Name="VCCLCompilerTool"
-					/>
-				</FileConfiguration>
-				<FileConfiguration
-					Name="ReleaseWithoutAsm|Itanium"
-					ExcludedFromBuild="true"
-					>
-					<Tool
-						Name="VCCLCompilerTool"
-					/>
-				</FileConfiguration>
-				<FileConfiguration
-					Name="Release|x64"
-					ExcludedFromBuild="true"
-					>
-					<Tool
-						Name="VCCLCompilerTool"
-					/>
-				</FileConfiguration>
-				<FileConfiguration
-					Name="Release|Itanium"
-					ExcludedFromBuild="true"
-					>
-					<Tool
-						Name="VCCLCompilerTool"
-					/>
-				</FileConfiguration>
-			</File>
-			<File
-				RelativePath="..\..\..\gzio.c"
-				>
-			</File>
-			<File
-				RelativePath="..\..\..\infback.c"
-				>
-			</File>
-			<File
-				RelativePath="..\..\masmx64\inffas8664.c"
-				>
-				<FileConfiguration
-					Name="Debug|Win32"
-					ExcludedFromBuild="true"
-					>
-					<Tool
-						Name="VCCLCompilerTool"
-					/>
-				</FileConfiguration>
-				<FileConfiguration
-					Name="Debug|Itanium"
-					ExcludedFromBuild="true"
-					>
-					<Tool
-						Name="VCCLCompilerTool"
-					/>
-				</FileConfiguration>
-				<FileConfiguration
-					Name="ReleaseWithoutAsm|Win32"
-					ExcludedFromBuild="true"
-					>
-					<Tool
-						Name="VCCLCompilerTool"
-					/>
-				</FileConfiguration>
-				<FileConfiguration
-					Name="ReleaseWithoutAsm|Itanium"
-					ExcludedFromBuild="true"
-					>
-					<Tool
-						Name="VCCLCompilerTool"
-					/>
-				</FileConfiguration>
-				<FileConfiguration
-					Name="Release|Win32"
-					ExcludedFromBuild="true"
-					>
-					<Tool
-						Name="VCCLCompilerTool"
-					/>
-				</FileConfiguration>
-				<FileConfiguration
-					Name="Release|Itanium"
-					ExcludedFromBuild="true"
-					>
-					<Tool
-						Name="VCCLCompilerTool"
-					/>
-				</FileConfiguration>
-			</File>
-			<File
-				RelativePath="..\..\..\inffast.c"
-				>
-			</File>
-			<File
-				RelativePath="..\..\..\inflate.c"
-				>
-			</File>
-			<File
-				RelativePath="..\..\..\inftrees.c"
-				>
-			</File>
-			<File
-				RelativePath="..\..\minizip\ioapi.c"
-				>
-			</File>
-			<File
-				RelativePath="..\..\minizip\iowin32.c"
-				>
-			</File>
-			<File
-				RelativePath="..\..\..\trees.c"
-				>
-			</File>
-			<File
-				RelativePath="..\..\..\uncompr.c"
-				>
-			</File>
-			<File
-				RelativePath="..\..\minizip\unzip.c"
-				>
-				<FileConfiguration
-					Name="Release|Win32"
-					>
-					<Tool
-						Name="VCCLCompilerTool"
-						AdditionalIncludeDirectories=""
-						PreprocessorDefinitions="ZLIB_INTERNAL"
-					/>
-				</FileConfiguration>
-				<FileConfiguration
-					Name="Release|x64"
-					>
-					<Tool
-						Name="VCCLCompilerTool"
-						AdditionalIncludeDirectories=""
-						PreprocessorDefinitions="ZLIB_INTERNAL"
-					/>
-				</FileConfiguration>
-				<FileConfiguration
-					Name="Release|Itanium"
-					>
-					<Tool
-						Name="VCCLCompilerTool"
-						AdditionalIncludeDirectories=""
-						PreprocessorDefinitions="ZLIB_INTERNAL"
-					/>
-				</FileConfiguration>
-			</File>
-			<File
-				RelativePath="..\..\minizip\zip.c"
-				>
-				<FileConfiguration
-					Name="Release|Win32"
-					>
-					<Tool
-						Name="VCCLCompilerTool"
-						AdditionalIncludeDirectories=""
-						PreprocessorDefinitions="ZLIB_INTERNAL"
-					/>
-				</FileConfiguration>
-				<FileConfiguration
-					Name="Release|x64"
-					>
-					<Tool
-						Name="VCCLCompilerTool"
-						AdditionalIncludeDirectories=""
-						PreprocessorDefinitions="ZLIB_INTERNAL"
-					/>
-				</FileConfiguration>
-				<FileConfiguration
-					Name="Release|Itanium"
-					>
-					<Tool
-						Name="VCCLCompilerTool"
-						AdditionalIncludeDirectories=""
-						PreprocessorDefinitions="ZLIB_INTERNAL"
-					/>
-				</FileConfiguration>
-			</File>
-			<File
-				RelativePath=".\zlib.rc"
-				>
-			</File>
-			<File
-				RelativePath=".\zlibvc.def"
-				>
-			</File>
-			<File
-				RelativePath="..\..\..\zutil.c"
-				>
-			</File>
-		</Filter>
-		<Filter
-			Name="Header Files"
-			Filter="h;hpp;hxx;hm;inl;fi;fd"
-			>
-			<File
-				RelativePath="..\..\..\deflate.h"
-				>
-			</File>
-			<File
-				RelativePath="..\..\..\infblock.h"
-				>
-			</File>
-			<File
-				RelativePath="..\..\..\infcodes.h"
-				>
-			</File>
-			<File
-				RelativePath="..\..\..\inffast.h"
-				>
-			</File>
-			<File
-				RelativePath="..\..\..\inftrees.h"
-				>
-			</File>
-			<File
-				RelativePath="..\..\..\infutil.h"
-				>
-			</File>
-			<File
-				RelativePath="..\..\..\zconf.h"
-				>
-			</File>
-			<File
-				RelativePath="..\..\..\zlib.h"
-				>
-			</File>
-			<File
-				RelativePath="..\..\..\zutil.h"
-				>
-			</File>
-		</Filter>
-		<Filter
-			Name="Resource Files"
-			Filter="ico;cur;bmp;dlg;rc2;rct;bin;cnt;rtf;gif;jpg;jpeg;jpe"
-			>
-		</Filter>
-	</Files>
-	<Globals>
-	</Globals>
-</VisualStudioProject>
Index: trunk/minix/lib/zlib-1.2.3/crc32.c
===================================================================
--- trunk/minix/lib/zlib-1.2.3/crc32.c	(revision 9)
+++ 	(revision )
@@ -1,423 +1,0 @@
-/* crc32.c -- compute the CRC-32 of a data stream
- * Copyright (C) 1995-2005 Mark Adler
- * For conditions of distribution and use, see copyright notice in zlib.h
- *
- * Thanks to Rodney Brown <rbrown64@csc.com.au> for his contribution of faster
- * CRC methods: exclusive-oring 32 bits of data at a time, and pre-computing
- * tables for updating the shift register in one step with three exclusive-ors
- * instead of four steps with four exclusive-ors.  This results in about a
- * factor of two increase in speed on a Power PC G4 (PPC7455) using gcc -O3.
- */
-
-/* @(#) $Id: crc32.c,v 1.1 2005/09/23 22:39:00 beng Exp $ */
-
-/*
-  Note on the use of DYNAMIC_CRC_TABLE: there is no mutex or semaphore
-  protection on the static variables used to control the first-use generation
-  of the crc tables.  Therefore, if you #define DYNAMIC_CRC_TABLE, you should
-  first call get_crc_table() to initialize the tables before allowing more than
-  one thread to use crc32().
- */
-
-#ifdef MAKECRCH
-#  include <stdio.h>
-#  ifndef DYNAMIC_CRC_TABLE
-#    define DYNAMIC_CRC_TABLE
-#  endif /* !DYNAMIC_CRC_TABLE */
-#endif /* MAKECRCH */
-
-#include "zutil.h"      /* for STDC and FAR definitions */
-
-#define local static
-
-/* Find a four-byte integer type for crc32_little() and crc32_big(). */
-#ifndef NOBYFOUR
-#  ifdef STDC           /* need ANSI C limits.h to determine sizes */
-#    include <limits.h>
-#    define BYFOUR
-#    if (UINT_MAX == 0xffffffffUL)
-       typedef unsigned int u4;
-#    else
-#      if (ULONG_MAX == 0xffffffffUL)
-         typedef unsigned long u4;
-#      else
-#        if (USHRT_MAX == 0xffffffffUL)
-           typedef unsigned short u4;
-#        else
-#          undef BYFOUR     /* can't find a four-byte integer type! */
-#        endif
-#      endif
-#    endif
-#  endif /* STDC */
-#endif /* !NOBYFOUR */
-
-/* Definitions for doing the crc four data bytes at a time. */
-#ifdef BYFOUR
-#  define REV(w) (((w)>>24)+(((w)>>8)&0xff00)+ \
-                (((w)&0xff00)<<8)+(((w)&0xff)<<24))
-   local unsigned long crc32_little OF((unsigned long,
-                        const unsigned char FAR *, unsigned));
-   local unsigned long crc32_big OF((unsigned long,
-                        const unsigned char FAR *, unsigned));
-#  define TBLS 8
-#else
-#  define TBLS 1
-#endif /* BYFOUR */
-
-/* Local functions for crc concatenation */
-local unsigned long gf2_matrix_times OF((unsigned long *mat,
-                                         unsigned long vec));
-local void gf2_matrix_square OF((unsigned long *square, unsigned long *mat));
-
-#ifdef DYNAMIC_CRC_TABLE
-
-local volatile int crc_table_empty = 1;
-local unsigned long FAR crc_table[TBLS][256];
-local void make_crc_table OF((void));
-#ifdef MAKECRCH
-   local void write_table OF((FILE *, const unsigned long FAR *));
-#endif /* MAKECRCH */
-/*
-  Generate tables for a byte-wise 32-bit CRC calculation on the polynomial:
-  x^32+x^26+x^23+x^22+x^16+x^12+x^11+x^10+x^8+x^7+x^5+x^4+x^2+x+1.
-
-  Polynomials over GF(2) are represented in binary, one bit per coefficient,
-  with the lowest powers in the most significant bit.  Then adding polynomials
-  is just exclusive-or, and multiplying a polynomial by x is a right shift by
-  one.  If we call the above polynomial p, and represent a byte as the
-  polynomial q, also with the lowest power in the most significant bit (so the
-  byte 0xb1 is the polynomial x^7+x^3+x+1), then the CRC is (q*x^32) mod p,
-  where a mod b means the remainder after dividing a by b.
-
-  This calculation is done using the shift-register method of multiplying and
-  taking the remainder.  The register is initialized to zero, and for each
-  incoming bit, x^32 is added mod p to the register if the bit is a one (where
-  x^32 mod p is p+x^32 = x^26+...+1), and the register is multiplied mod p by
-  x (which is shifting right by one and adding x^32 mod p if the bit shifted
-  out is a one).  We start with the highest power (least significant bit) of
-  q and repeat for all eight bits of q.
-
-  The first table is simply the CRC of all possible eight bit values.  This is
-  all the information needed to generate CRCs on data a byte at a time for all
-  combinations of CRC register values and incoming bytes.  The remaining tables
-  allow for word-at-a-time CRC calculation for both big-endian and little-
-  endian machines, where a word is four bytes.
-*/
-local void make_crc_table()
-{
-    unsigned long c;
-    int n, k;
-    unsigned long poly;                 /* polynomial exclusive-or pattern */
-    /* terms of polynomial defining this crc (except x^32): */
-    static volatile int first = 1;      /* flag to limit concurrent making */
-    static const unsigned char p[] = {0,1,2,4,5,7,8,10,11,12,16,22,23,26};
-
-    /* See if another task is already doing this (not thread-safe, but better
-       than nothing -- significantly reduces duration of vulnerability in
-       case the advice about DYNAMIC_CRC_TABLE is ignored) */
-    if (first) {
-        first = 0;
-
-        /* make exclusive-or pattern from polynomial (0xedb88320UL) */
-        poly = 0UL;
-        for (n = 0; n < sizeof(p)/sizeof(unsigned char); n++)
-            poly |= 1UL << (31 - p[n]);
-
-        /* generate a crc for every 8-bit value */
-        for (n = 0; n < 256; n++) {
-            c = (unsigned long)n;
-            for (k = 0; k < 8; k++)
-                c = c & 1 ? poly ^ (c >> 1) : c >> 1;
-            crc_table[0][n] = c;
-        }
-
-#ifdef BYFOUR
-        /* generate crc for each value followed by one, two, and three zeros,
-           and then the byte reversal of those as well as the first table */
-        for (n = 0; n < 256; n++) {
-            c = crc_table[0][n];
-            crc_table[4][n] = REV(c);
-            for (k = 1; k < 4; k++) {
-                c = crc_table[0][c & 0xff] ^ (c >> 8);
-                crc_table[k][n] = c;
-                crc_table[k + 4][n] = REV(c);
-            }
-        }
-#endif /* BYFOUR */
-
-        crc_table_empty = 0;
-    }
-    else {      /* not first */
-        /* wait for the other guy to finish (not efficient, but rare) */
-        while (crc_table_empty)
-            ;
-    }
-
-#ifdef MAKECRCH
-    /* write out CRC tables to crc32.h */
-    {
-        FILE *out;
-
-        out = fopen("crc32.h", "w");
-        if (out == NULL) return;
-        fprintf(out, "/* crc32.h -- tables for rapid CRC calculation\n");
-        fprintf(out, " * Generated automatically by crc32.c\n */\n\n");
-        fprintf(out, "local const unsigned long FAR ");
-        fprintf(out, "crc_table[TBLS][256] =\n{\n  {\n");
-        write_table(out, crc_table[0]);
-#  ifdef BYFOUR
-        fprintf(out, "#ifdef BYFOUR\n");
-        for (k = 1; k < 8; k++) {
-            fprintf(out, "  },\n  {\n");
-            write_table(out, crc_table[k]);
-        }
-        fprintf(out, "#endif\n");
-#  endif /* BYFOUR */
-        fprintf(out, "  }\n};\n");
-        fclose(out);
-    }
-#endif /* MAKECRCH */
-}
-
-#ifdef MAKECRCH
-local void write_table(out, table)
-    FILE *out;
-    const unsigned long FAR *table;
-{
-    int n;
-
-    for (n = 0; n < 256; n++)
-        fprintf(out, "%s0x%08lxUL%s", n % 5 ? "" : "    ", table[n],
-                n == 255 ? "\n" : (n % 5 == 4 ? ",\n" : ", "));
-}
-#endif /* MAKECRCH */
-
-#else /* !DYNAMIC_CRC_TABLE */
-/* ========================================================================
- * Tables of CRC-32s of all single-byte values, made by make_crc_table().
- */
-#include "crc32.h"
-#endif /* DYNAMIC_CRC_TABLE */
-
-/* =========================================================================
- * This function can be used by asm versions of crc32()
- */
-const unsigned long FAR * ZEXPORT get_crc_table()
-{
-#ifdef DYNAMIC_CRC_TABLE
-    if (crc_table_empty)
-        make_crc_table();
-#endif /* DYNAMIC_CRC_TABLE */
-    return (const unsigned long FAR *)crc_table;
-}
-
-/* ========================================================================= */
-#define DO1 crc = crc_table[0][((int)crc ^ (*buf++)) & 0xff] ^ (crc >> 8)
-#define DO8 DO1; DO1; DO1; DO1; DO1; DO1; DO1; DO1
-
-/* ========================================================================= */
-unsigned long ZEXPORT crc32(crc, buf, len)
-    unsigned long crc;
-    const unsigned char FAR *buf;
-    unsigned len;
-{
-    if (buf == Z_NULL) return 0UL;
-
-#ifdef DYNAMIC_CRC_TABLE
-    if (crc_table_empty)
-        make_crc_table();
-#endif /* DYNAMIC_CRC_TABLE */
-
-#ifdef BYFOUR
-    if (sizeof(void *) == sizeof(ptrdiff_t)) {
-        u4 endian;
-
-        endian = 1;
-        if (*((unsigned char *)(&endian)))
-            return crc32_little(crc, buf, len);
-        else
-            return crc32_big(crc, buf, len);
-    }
-#endif /* BYFOUR */
-    crc = crc ^ 0xffffffffUL;
-    while (len >= 8) {
-        DO8;
-        len -= 8;
-    }
-    if (len) do {
-        DO1;
-    } while (--len);
-    return crc ^ 0xffffffffUL;
-}
-
-#ifdef BYFOUR
-
-/* ========================================================================= */
-#define DOLIT4 c ^= *buf4++; \
-        c = crc_table[3][c & 0xff] ^ crc_table[2][(c >> 8) & 0xff] ^ \
-            crc_table[1][(c >> 16) & 0xff] ^ crc_table[0][c >> 24]
-#define DOLIT32 DOLIT4; DOLIT4; DOLIT4; DOLIT4; DOLIT4; DOLIT4; DOLIT4; DOLIT4
-
-/* ========================================================================= */
-local unsigned long crc32_little(crc, buf, len)
-    unsigned long crc;
-    const unsigned char FAR *buf;
-    unsigned len;
-{
-    register u4 c;
-    register const u4 FAR *buf4;
-
-    c = (u4)crc;
-    c = ~c;
-    while (len && ((ptrdiff_t)buf & 3)) {
-        c = crc_table[0][(c ^ *buf++) & 0xff] ^ (c >> 8);
-        len--;
-    }
-
-    buf4 = (const u4 FAR *)(const void FAR *)buf;
-    while (len >= 32) {
-        DOLIT32;
-        len -= 32;
-    }
-    while (len >= 4) {
-        DOLIT4;
-        len -= 4;
-    }
-    buf = (const unsigned char FAR *)buf4;
-
-    if (len) do {
-        c = crc_table[0][(c ^ *buf++) & 0xff] ^ (c >> 8);
-    } while (--len);
-    c = ~c;
-    return (unsigned long)c;
-}
-
-/* ========================================================================= */
-#define DOBIG4 c ^= *++buf4; \
-        c = crc_table[4][c & 0xff] ^ crc_table[5][(c >> 8) & 0xff] ^ \
-            crc_table[6][(c >> 16) & 0xff] ^ crc_table[7][c >> 24]
-#define DOBIG32 DOBIG4; DOBIG4; DOBIG4; DOBIG4; DOBIG4; DOBIG4; DOBIG4; DOBIG4
-
-/* ========================================================================= */
-local unsigned long crc32_big(crc, buf, len)
-    unsigned long crc;
-    const unsigned char FAR *buf;
-    unsigned len;
-{
-    register u4 c;
-    register const u4 FAR *buf4;
-
-    c = REV((u4)crc);
-    c = ~c;
-    while (len && ((ptrdiff_t)buf & 3)) {
-        c = crc_table[4][(c >> 24) ^ *buf++] ^ (c << 8);
-        len--;
-    }
-
-    buf4 = (const u4 FAR *)(const void FAR *)buf;
-    buf4--;
-    while (len >= 32) {
-        DOBIG32;
-        len -= 32;
-    }
-    while (len >= 4) {
-        DOBIG4;
-        len -= 4;
-    }
-    buf4++;
-    buf = (const unsigned char FAR *)buf4;
-
-    if (len) do {
-        c = crc_table[4][(c >> 24) ^ *buf++] ^ (c << 8);
-    } while (--len);
-    c = ~c;
-    return (unsigned long)(REV(c));
-}
-
-#endif /* BYFOUR */
-
-#define GF2_DIM 32      /* dimension of GF(2) vectors (length of CRC) */
-
-/* ========================================================================= */
-local unsigned long gf2_matrix_times(mat, vec)
-    unsigned long *mat;
-    unsigned long vec;
-{
-    unsigned long sum;
-
-    sum = 0;
-    while (vec) {
-        if (vec & 1)
-            sum ^= *mat;
-        vec >>= 1;
-        mat++;
-    }
-    return sum;
-}
-
-/* ========================================================================= */
-local void gf2_matrix_square(square, mat)
-    unsigned long *square;
-    unsigned long *mat;
-{
-    int n;
-
-    for (n = 0; n < GF2_DIM; n++)
-        square[n] = gf2_matrix_times(mat, mat[n]);
-}
-
-/* ========================================================================= */
-uLong ZEXPORT crc32_combine(crc1, crc2, len2)
-    uLong crc1;
-    uLong crc2;
-    z_off_t len2;
-{
-    int n;
-    unsigned long row;
-    unsigned long even[GF2_DIM];    /* even-power-of-two zeros operator */
-    unsigned long odd[GF2_DIM];     /* odd-power-of-two zeros operator */
-
-    /* degenerate case */
-    if (len2 == 0)
-        return crc1;
-
-    /* put operator for one zero bit in odd */
-    odd[0] = 0xedb88320L;           /* CRC-32 polynomial */
-    row = 1;
-    for (n = 1; n < GF2_DIM; n++) {
-        odd[n] = row;
-        row <<= 1;
-    }
-
-    /* put operator for two zero bits in even */
-    gf2_matrix_square(even, odd);
-
-    /* put operator for four zero bits in odd */
-    gf2_matrix_square(odd, even);
-
-    /* apply len2 zeros to crc1 (first square will put the operator for one
-       zero byte, eight zero bits, in even) */
-    do {
-        /* apply zeros operator for this bit of len2 */
-        gf2_matrix_square(even, odd);
-        if (len2 & 1)
-            crc1 = gf2_matrix_times(even, crc1);
-        len2 >>= 1;
-
-        /* if no more bits set, then done */
-        if (len2 == 0)
-            break;
-
-        /* another iteration of the loop with odd and even swapped */
-        gf2_matrix_square(odd, even);
-        if (len2 & 1)
-            crc1 = gf2_matrix_times(odd, crc1);
-        len2 >>= 1;
-
-        /* if no more bits set, then done */
-    } while (len2 != 0);
-
-    /* return combined crc */
-    crc1 ^= crc2;
-    return crc1;
-}
Index: trunk/minix/lib/zlib-1.2.3/crc32.h
===================================================================
--- trunk/minix/lib/zlib-1.2.3/crc32.h	(revision 9)
+++ 	(revision )
@@ -1,441 +1,0 @@
-/* crc32.h -- tables for rapid CRC calculation
- * Generated automatically by crc32.c
- */
-
-local const unsigned long FAR crc_table[TBLS][256] =
-{
-  {
-    0x00000000UL, 0x77073096UL, 0xee0e612cUL, 0x990951baUL, 0x076dc419UL,
-    0x706af48fUL, 0xe963a535UL, 0x9e6495a3UL, 0x0edb8832UL, 0x79dcb8a4UL,
-    0xe0d5e91eUL, 0x97d2d988UL, 0x09b64c2bUL, 0x7eb17cbdUL, 0xe7b82d07UL,
-    0x90bf1d91UL, 0x1db71064UL, 0x6ab020f2UL, 0xf3b97148UL, 0x84be41deUL,
-    0x1adad47dUL, 0x6ddde4ebUL, 0xf4d4b551UL, 0x83d385c7UL, 0x136c9856UL,
-    0x646ba8c0UL, 0xfd62f97aUL, 0x8a65c9ecUL, 0x14015c4fUL, 0x63066cd9UL,
-    0xfa0f3d63UL, 0x8d080df5UL, 0x3b6e20c8UL, 0x4c69105eUL, 0xd56041e4UL,
-    0xa2677172UL, 0x3c03e4d1UL, 0x4b04d447UL, 0xd20d85fdUL, 0xa50ab56bUL,
-    0x35b5a8faUL, 0x42b2986cUL, 0xdbbbc9d6UL, 0xacbcf940UL, 0x32d86ce3UL,
-    0x45df5c75UL, 0xdcd60dcfUL, 0xabd13d59UL, 0x26d930acUL, 0x51de003aUL,
-    0xc8d75180UL, 0xbfd06116UL, 0x21b4f4b5UL, 0x56b3c423UL, 0xcfba9599UL,
-    0xb8bda50fUL, 0x2802b89eUL, 0x5f058808UL, 0xc60cd9b2UL, 0xb10be924UL,
-    0x2f6f7c87UL, 0x58684c11UL, 0xc1611dabUL, 0xb6662d3dUL, 0x76dc4190UL,
-    0x01db7106UL, 0x98d220bcUL, 0xefd5102aUL, 0x71b18589UL, 0x06b6b51fUL,
-    0x9fbfe4a5UL, 0xe8b8d433UL, 0x7807c9a2UL, 0x0f00f934UL, 0x9609a88eUL,
-    0xe10e9818UL, 0x7f6a0dbbUL, 0x086d3d2dUL, 0x91646c97UL, 0xe6635c01UL,
-    0x6b6b51f4UL, 0x1c6c6162UL, 0x856530d8UL, 0xf262004eUL, 0x6c0695edUL,
-    0x1b01a57bUL, 0x8208f4c1UL, 0xf50fc457UL, 0x65b0d9c6UL, 0x12b7e950UL,
-    0x8bbeb8eaUL, 0xfcb9887cUL, 0x62dd1ddfUL, 0x15da2d49UL, 0x8cd37cf3UL,
-    0xfbd44c65UL, 0x4db26158UL, 0x3ab551ceUL, 0xa3bc0074UL, 0xd4bb30e2UL,
-    0x4adfa541UL, 0x3dd895d7UL, 0xa4d1c46dUL, 0xd3d6f4fbUL, 0x4369e96aUL,
-    0x346ed9fcUL, 0xad678846UL, 0xda60b8d0UL, 0x44042d73UL, 0x33031de5UL,
-    0xaa0a4c5fUL, 0xdd0d7cc9UL, 0x5005713cUL, 0x270241aaUL, 0xbe0b1010UL,
-    0xc90c2086UL, 0x5768b525UL, 0x206f85b3UL, 0xb966d409UL, 0xce61e49fUL,
-    0x5edef90eUL, 0x29d9c998UL, 0xb0d09822UL, 0xc7d7a8b4UL, 0x59b33d17UL,
-    0x2eb40d81UL, 0xb7bd5c3bUL, 0xc0ba6cadUL, 0xedb88320UL, 0x9abfb3b6UL,
-    0x03b6e20cUL, 0x74b1d29aUL, 0xead54739UL, 0x9dd277afUL, 0x04db2615UL,
-    0x73dc1683UL, 0xe3630b12UL, 0x94643b84UL, 0x0d6d6a3eUL, 0x7a6a5aa8UL,
-    0xe40ecf0bUL, 0x9309ff9dUL, 0x0a00ae27UL, 0x7d079eb1UL, 0xf00f9344UL,
-    0x8708a3d2UL, 0x1e01f268UL, 0x6906c2feUL, 0xf762575dUL, 0x806567cbUL,
-    0x196c3671UL, 0x6e6b06e7UL, 0xfed41b76UL, 0x89d32be0UL, 0x10da7a5aUL,
-    0x67dd4accUL, 0xf9b9df6fUL, 0x8ebeeff9UL, 0x17b7be43UL, 0x60b08ed5UL,
-    0xd6d6a3e8UL, 0xa1d1937eUL, 0x38d8c2c4UL, 0x4fdff252UL, 0xd1bb67f1UL,
-    0xa6bc5767UL, 0x3fb506ddUL, 0x48b2364bUL, 0xd80d2bdaUL, 0xaf0a1b4cUL,
-    0x36034af6UL, 0x41047a60UL, 0xdf60efc3UL, 0xa867df55UL, 0x316e8eefUL,
-    0x4669be79UL, 0xcb61b38cUL, 0xbc66831aUL, 0x256fd2a0UL, 0x5268e236UL,
-    0xcc0c7795UL, 0xbb0b4703UL, 0x220216b9UL, 0x5505262fUL, 0xc5ba3bbeUL,
-    0xb2bd0b28UL, 0x2bb45a92UL, 0x5cb36a04UL, 0xc2d7ffa7UL, 0xb5d0cf31UL,
-    0x2cd99e8bUL, 0x5bdeae1dUL, 0x9b64c2b0UL, 0xec63f226UL, 0x756aa39cUL,
-    0x026d930aUL, 0x9c0906a9UL, 0xeb0e363fUL, 0x72076785UL, 0x05005713UL,
-    0x95bf4a82UL, 0xe2b87a14UL, 0x7bb12baeUL, 0x0cb61b38UL, 0x92d28e9bUL,
-    0xe5d5be0dUL, 0x7cdcefb7UL, 0x0bdbdf21UL, 0x86d3d2d4UL, 0xf1d4e242UL,
-    0x68ddb3f8UL, 0x1fda836eUL, 0x81be16cdUL, 0xf6b9265bUL, 0x6fb077e1UL,
-    0x18b74777UL, 0x88085ae6UL, 0xff0f6a70UL, 0x66063bcaUL, 0x11010b5cUL,
-    0x8f659effUL, 0xf862ae69UL, 0x616bffd3UL, 0x166ccf45UL, 0xa00ae278UL,
-    0xd70dd2eeUL, 0x4e048354UL, 0x3903b3c2UL, 0xa7672661UL, 0xd06016f7UL,
-    0x4969474dUL, 0x3e6e77dbUL, 0xaed16a4aUL, 0xd9d65adcUL, 0x40df0b66UL,
-    0x37d83bf0UL, 0xa9bcae53UL, 0xdebb9ec5UL, 0x47b2cf7fUL, 0x30b5ffe9UL,
-    0xbdbdf21cUL, 0xcabac28aUL, 0x53b39330UL, 0x24b4a3a6UL, 0xbad03605UL,
-    0xcdd70693UL, 0x54de5729UL, 0x23d967bfUL, 0xb3667a2eUL, 0xc4614ab8UL,
-    0x5d681b02UL, 0x2a6f2b94UL, 0xb40bbe37UL, 0xc30c8ea1UL, 0x5a05df1bUL,
-    0x2d02ef8dUL
-#ifdef BYFOUR
-  },
-  {
-    0x00000000UL, 0x191b3141UL, 0x32366282UL, 0x2b2d53c3UL, 0x646cc504UL,
-    0x7d77f445UL, 0x565aa786UL, 0x4f4196c7UL, 0xc8d98a08UL, 0xd1c2bb49UL,
-    0xfaefe88aUL, 0xe3f4d9cbUL, 0xacb54f0cUL, 0xb5ae7e4dUL, 0x9e832d8eUL,
-    0x87981ccfUL, 0x4ac21251UL, 0x53d92310UL, 0x78f470d3UL, 0x61ef4192UL,
-    0x2eaed755UL, 0x37b5e614UL, 0x1c98b5d7UL, 0x05838496UL, 0x821b9859UL,
-    0x9b00a918UL, 0xb02dfadbUL, 0xa936cb9aUL, 0xe6775d5dUL, 0xff6c6c1cUL,
-    0xd4413fdfUL, 0xcd5a0e9eUL, 0x958424a2UL, 0x8c9f15e3UL, 0xa7b24620UL,
-    0xbea97761UL, 0xf1e8e1a6UL, 0xe8f3d0e7UL, 0xc3de8324UL, 0xdac5b265UL,
-    0x5d5daeaaUL, 0x44469febUL, 0x6f6bcc28UL, 0x7670fd69UL, 0x39316baeUL,
-    0x202a5aefUL, 0x0b07092cUL, 0x121c386dUL, 0xdf4636f3UL, 0xc65d07b2UL,
-    0xed705471UL, 0xf46b6530UL, 0xbb2af3f7UL, 0xa231c2b6UL, 0x891c9175UL,
-    0x9007a034UL, 0x179fbcfbUL, 0x0e848dbaUL, 0x25a9de79UL, 0x3cb2ef38UL,
-    0x73f379ffUL, 0x6ae848beUL, 0x41c51b7dUL, 0x58de2a3cUL, 0xf0794f05UL,
-    0xe9627e44UL, 0xc24f2d87UL, 0xdb541cc6UL, 0x94158a01UL, 0x8d0ebb40UL,
-    0xa623e883UL, 0xbf38d9c2UL, 0x38a0c50dUL, 0x21bbf44cUL, 0x0a96a78fUL,
-    0x138d96ceUL, 0x5ccc0009UL, 0x45d73148UL, 0x6efa628bUL, 0x77e153caUL,
-    0xbabb5d54UL, 0xa3a06c15UL, 0x888d3fd6UL, 0x91960e97UL, 0xded79850UL,
-    0xc7cca911UL, 0xece1fad2UL, 0xf5facb93UL, 0x7262d75cUL, 0x6b79e61dUL,
-    0x4054b5deUL, 0x594f849fUL, 0x160e1258UL, 0x0f152319UL, 0x243870daUL,
-    0x3d23419bUL, 0x65fd6ba7UL, 0x7ce65ae6UL, 0x57cb0925UL, 0x4ed03864UL,
-    0x0191aea3UL, 0x188a9fe2UL, 0x33a7cc21UL, 0x2abcfd60UL, 0xad24e1afUL,
-    0xb43fd0eeUL, 0x9f12832dUL, 0x8609b26cUL, 0xc94824abUL, 0xd05315eaUL,
-    0xfb7e4629UL, 0xe2657768UL, 0x2f3f79f6UL, 0x362448b7UL, 0x1d091b74UL,
-    0x04122a35UL, 0x4b53bcf2UL, 0x52488db3UL, 0x7965de70UL, 0x607eef31UL,
-    0xe7e6f3feUL, 0xfefdc2bfUL, 0xd5d0917cUL, 0xcccba03dUL, 0x838a36faUL,
-    0x9a9107bbUL, 0xb1bc5478UL, 0xa8a76539UL, 0x3b83984bUL, 0x2298a90aUL,
-    0x09b5fac9UL, 0x10aecb88UL, 0x5fef5d4fUL, 0x46f46c0eUL, 0x6dd93fcdUL,
-    0x74c20e8cUL, 0xf35a1243UL, 0xea412302UL, 0xc16c70c1UL, 0xd8774180UL,
-    0x9736d747UL, 0x8e2de606UL, 0xa500b5c5UL, 0xbc1b8484UL, 0x71418a1aUL,
-    0x685abb5bUL, 0x4377e898UL, 0x5a6cd9d9UL, 0x152d4f1eUL, 0x0c367e5fUL,
-    0x271b2d9cUL, 0x3e001cddUL, 0xb9980012UL, 0xa0833153UL, 0x8bae6290UL,
-    0x92b553d1UL, 0xddf4c516UL, 0xc4eff457UL, 0xefc2a794UL, 0xf6d996d5UL,
-    0xae07bce9UL, 0xb71c8da8UL, 0x9c31de6bUL, 0x852aef2aUL, 0xca6b79edUL,
-    0xd37048acUL, 0xf85d1b6fUL, 0xe1462a2eUL, 0x66de36e1UL, 0x7fc507a0UL,
-    0x54e85463UL, 0x4df36522UL, 0x02b2f3e5UL, 0x1ba9c2a4UL, 0x30849167UL,
-    0x299fa026UL, 0xe4c5aeb8UL, 0xfdde9ff9UL, 0xd6f3cc3aUL, 0xcfe8fd7bUL,
-    0x80a96bbcUL, 0x99b25afdUL, 0xb29f093eUL, 0xab84387fUL, 0x2c1c24b0UL,
-    0x350715f1UL, 0x1e2a4632UL, 0x07317773UL, 0x4870e1b4UL, 0x516bd0f5UL,
-    0x7a468336UL, 0x635db277UL, 0xcbfad74eUL, 0xd2e1e60fUL, 0xf9ccb5ccUL,
-    0xe0d7848dUL, 0xaf96124aUL, 0xb68d230bUL, 0x9da070c8UL, 0x84bb4189UL,
-    0x03235d46UL, 0x1a386c07UL, 0x31153fc4UL, 0x280e0e85UL, 0x674f9842UL,
-    0x7e54a903UL, 0x5579fac0UL, 0x4c62cb81UL, 0x8138c51fUL, 0x9823f45eUL,
-    0xb30ea79dUL, 0xaa1596dcUL, 0xe554001bUL, 0xfc4f315aUL, 0xd7626299UL,
-    0xce7953d8UL, 0x49e14f17UL, 0x50fa7e56UL, 0x7bd72d95UL, 0x62cc1cd4UL,
-    0x2d8d8a13UL, 0x3496bb52UL, 0x1fbbe891UL, 0x06a0d9d0UL, 0x5e7ef3ecUL,
-    0x4765c2adUL, 0x6c48916eUL, 0x7553a02fUL, 0x3a1236e8UL, 0x230907a9UL,
-    0x0824546aUL, 0x113f652bUL, 0x96a779e4UL, 0x8fbc48a5UL, 0xa4911b66UL,
-    0xbd8a2a27UL, 0xf2cbbce0UL, 0xebd08da1UL, 0xc0fdde62UL, 0xd9e6ef23UL,
-    0x14bce1bdUL, 0x0da7d0fcUL, 0x268a833fUL, 0x3f91b27eUL, 0x70d024b9UL,
-    0x69cb15f8UL, 0x42e6463bUL, 0x5bfd777aUL, 0xdc656bb5UL, 0xc57e5af4UL,
-    0xee530937UL, 0xf7483876UL, 0xb809aeb1UL, 0xa1129ff0UL, 0x8a3fcc33UL,
-    0x9324fd72UL
-  },
-  {
-    0x00000000UL, 0x01c26a37UL, 0x0384d46eUL, 0x0246be59UL, 0x0709a8dcUL,
-    0x06cbc2ebUL, 0x048d7cb2UL, 0x054f1685UL, 0x0e1351b8UL, 0x0fd13b8fUL,
-    0x0d9785d6UL, 0x0c55efe1UL, 0x091af964UL, 0x08d89353UL, 0x0a9e2d0aUL,
-    0x0b5c473dUL, 0x1c26a370UL, 0x1de4c947UL, 0x1fa2771eUL, 0x1e601d29UL,
-    0x1b2f0bacUL, 0x1aed619bUL, 0x18abdfc2UL, 0x1969b5f5UL, 0x1235f2c8UL,
-    0x13f798ffUL, 0x11b126a6UL, 0x10734c91UL, 0x153c5a14UL, 0x14fe3023UL,
-    0x16b88e7aUL, 0x177ae44dUL, 0x384d46e0UL, 0x398f2cd7UL, 0x3bc9928eUL,
-    0x3a0bf8b9UL, 0x3f44ee3cUL, 0x3e86840bUL, 0x3cc03a52UL, 0x3d025065UL,
-    0x365e1758UL, 0x379c7d6fUL, 0x35dac336UL, 0x3418a901UL, 0x3157bf84UL,
-    0x3095d5b3UL, 0x32d36beaUL, 0x331101ddUL, 0x246be590UL, 0x25a98fa7UL,
-    0x27ef31feUL, 0x262d5bc9UL, 0x23624d4cUL, 0x22a0277bUL, 0x20e69922UL,
-    0x2124f315UL, 0x2a78b428UL, 0x2bbade1fUL, 0x29fc6046UL, 0x283e0a71UL,
-    0x2d711cf4UL, 0x2cb376c3UL, 0x2ef5c89aUL, 0x2f37a2adUL, 0x709a8dc0UL,
-    0x7158e7f7UL, 0x731e59aeUL, 0x72dc3399UL, 0x7793251cUL, 0x76514f2bUL,
-    0x7417f172UL, 0x75d59b45UL, 0x7e89dc78UL, 0x7f4bb64fUL, 0x7d0d0816UL,
-    0x7ccf6221UL, 0x798074a4UL, 0x78421e93UL, 0x7a04a0caUL, 0x7bc6cafdUL,
-    0x6cbc2eb0UL, 0x6d7e4487UL, 0x6f38fadeUL, 0x6efa90e9UL, 0x6bb5866cUL,
-    0x6a77ec5bUL, 0x68315202UL, 0x69f33835UL, 0x62af7f08UL, 0x636d153fUL,
-    0x612bab66UL, 0x60e9c151UL, 0x65a6d7d4UL, 0x6464bde3UL, 0x662203baUL,
-    0x67e0698dUL, 0x48d7cb20UL, 0x4915a117UL, 0x4b531f4eUL, 0x4a917579UL,
-    0x4fde63fcUL, 0x4e1c09cbUL, 0x4c5ab792UL, 0x4d98dda5UL, 0x46c49a98UL,
-    0x4706f0afUL, 0x45404ef6UL, 0x448224c1UL, 0x41cd3244UL, 0x400f5873UL,
-    0x4249e62aUL, 0x438b8c1dUL, 0x54f16850UL, 0x55330267UL, 0x5775bc3eUL,
-    0x56b7d609UL, 0x53f8c08cUL, 0x523aaabbUL, 0x507c14e2UL, 0x51be7ed5UL,
-    0x5ae239e8UL, 0x5b2053dfUL, 0x5966ed86UL, 0x58a487b1UL, 0x5deb9134UL,
-    0x5c29fb03UL, 0x5e6f455aUL, 0x5fad2f6dUL, 0xe1351b80UL, 0xe0f771b7UL,
-    0xe2b1cfeeUL, 0xe373a5d9UL, 0xe63cb35cUL, 0xe7fed96bUL, 0xe5b86732UL,
-    0xe47a0d05UL, 0xef264a38UL, 0xeee4200fUL, 0xeca29e56UL, 0xed60f461UL,
-    0xe82fe2e4UL, 0xe9ed88d3UL, 0xebab368aUL, 0xea695cbdUL, 0xfd13b8f0UL,
-    0xfcd1d2c7UL, 0xfe976c9eUL, 0xff5506a9UL, 0xfa1a102cUL, 0xfbd87a1bUL,
-    0xf99ec442UL, 0xf85cae75UL, 0xf300e948UL, 0xf2c2837fUL, 0xf0843d26UL,
-    0xf1465711UL, 0xf4094194UL, 0xf5cb2ba3UL, 0xf78d95faUL, 0xf64fffcdUL,
-    0xd9785d60UL, 0xd8ba3757UL, 0xdafc890eUL, 0xdb3ee339UL, 0xde71f5bcUL,
-    0xdfb39f8bUL, 0xddf521d2UL, 0xdc374be5UL, 0xd76b0cd8UL, 0xd6a966efUL,
-    0xd4efd8b6UL, 0xd52db281UL, 0xd062a404UL, 0xd1a0ce33UL, 0xd3e6706aUL,
-    0xd2241a5dUL, 0xc55efe10UL, 0xc49c9427UL, 0xc6da2a7eUL, 0xc7184049UL,
-    0xc25756ccUL, 0xc3953cfbUL, 0xc1d382a2UL, 0xc011e895UL, 0xcb4dafa8UL,
-    0xca8fc59fUL, 0xc8c97bc6UL, 0xc90b11f1UL, 0xcc440774UL, 0xcd866d43UL,
-    0xcfc0d31aUL, 0xce02b92dUL, 0x91af9640UL, 0x906dfc77UL, 0x922b422eUL,
-    0x93e92819UL, 0x96a63e9cUL, 0x976454abUL, 0x9522eaf2UL, 0x94e080c5UL,
-    0x9fbcc7f8UL, 0x9e7eadcfUL, 0x9c381396UL, 0x9dfa79a1UL, 0x98b56f24UL,
-    0x99770513UL, 0x9b31bb4aUL, 0x9af3d17dUL, 0x8d893530UL, 0x8c4b5f07UL,
-    0x8e0de15eUL, 0x8fcf8b69UL, 0x8a809decUL, 0x8b42f7dbUL, 0x89044982UL,
-    0x88c623b5UL, 0x839a6488UL, 0x82580ebfUL, 0x801eb0e6UL, 0x81dcdad1UL,
-    0x8493cc54UL, 0x8551a663UL, 0x8717183aUL, 0x86d5720dUL, 0xa9e2d0a0UL,
-    0xa820ba97UL, 0xaa6604ceUL, 0xaba46ef9UL, 0xaeeb787cUL, 0xaf29124bUL,
-    0xad6fac12UL, 0xacadc625UL, 0xa7f18118UL, 0xa633eb2fUL, 0xa4755576UL,
-    0xa5b73f41UL, 0xa0f829c4UL, 0xa13a43f3UL, 0xa37cfdaaUL, 0xa2be979dUL,
-    0xb5c473d0UL, 0xb40619e7UL, 0xb640a7beUL, 0xb782cd89UL, 0xb2cddb0cUL,
-    0xb30fb13bUL, 0xb1490f62UL, 0xb08b6555UL, 0xbbd72268UL, 0xba15485fUL,
-    0xb853f606UL, 0xb9919c31UL, 0xbcde8ab4UL, 0xbd1ce083UL, 0xbf5a5edaUL,
-    0xbe9834edUL
-  },
-  {
-    0x00000000UL, 0xb8bc6765UL, 0xaa09c88bUL, 0x12b5afeeUL, 0x8f629757UL,
-    0x37def032UL, 0x256b5fdcUL, 0x9dd738b9UL, 0xc5b428efUL, 0x7d084f8aUL,
-    0x6fbde064UL, 0xd7018701UL, 0x4ad6bfb8UL, 0xf26ad8ddUL, 0xe0df7733UL,
-    0x58631056UL, 0x5019579fUL, 0xe8a530faUL, 0xfa109f14UL, 0x42acf871UL,
-    0xdf7bc0c8UL, 0x67c7a7adUL, 0x75720843UL, 0xcdce6f26UL, 0x95ad7f70UL,
-    0x2d111815UL, 0x3fa4b7fbUL, 0x8718d09eUL, 0x1acfe827UL, 0xa2738f42UL,
-    0xb0c620acUL, 0x087a47c9UL, 0xa032af3eUL, 0x188ec85bUL, 0x0a3b67b5UL,
-    0xb28700d0UL, 0x2f503869UL, 0x97ec5f0cUL, 0x8559f0e2UL, 0x3de59787UL,
-    0x658687d1UL, 0xdd3ae0b4UL, 0xcf8f4f5aUL, 0x7733283fUL, 0xeae41086UL,
-    0x525877e3UL, 0x40edd80dUL, 0xf851bf68UL, 0xf02bf8a1UL, 0x48979fc4UL,
-    0x5a22302aUL, 0xe29e574fUL, 0x7f496ff6UL, 0xc7f50893UL, 0xd540a77dUL,
-    0x6dfcc018UL, 0x359fd04eUL, 0x8d23b72bUL, 0x9f9618c5UL, 0x272a7fa0UL,
-    0xbafd4719UL, 0x0241207cUL, 0x10f48f92UL, 0xa848e8f7UL, 0x9b14583dUL,
-    0x23a83f58UL, 0x311d90b6UL, 0x89a1f7d3UL, 0x1476cf6aUL, 0xaccaa80fUL,
-    0xbe7f07e1UL, 0x06c36084UL, 0x5ea070d2UL, 0xe61c17b7UL, 0xf4a9b859UL,
-    0x4c15df3cUL, 0xd1c2e785UL, 0x697e80e0UL, 0x7bcb2f0eUL, 0xc377486bUL,
-    0xcb0d0fa2UL, 0x73b168c7UL, 0x6104c729UL, 0xd9b8a04cUL, 0x446f98f5UL,
-    0xfcd3ff90UL, 0xee66507eUL, 0x56da371bUL, 0x0eb9274dUL, 0xb6054028UL,
-    0xa4b0efc6UL, 0x1c0c88a3UL, 0x81dbb01aUL, 0x3967d77fUL, 0x2bd27891UL,
-    0x936e1ff4UL, 0x3b26f703UL, 0x839a9066UL, 0x912f3f88UL, 0x299358edUL,
-    0xb4446054UL, 0x0cf80731UL, 0x1e4da8dfUL, 0xa6f1cfbaUL, 0xfe92dfecUL,
-    0x462eb889UL, 0x549b1767UL, 0xec277002UL, 0x71f048bbUL, 0xc94c2fdeUL,
-    0xdbf98030UL, 0x6345e755UL, 0x6b3fa09cUL, 0xd383c7f9UL, 0xc1366817UL,
-    0x798a0f72UL, 0xe45d37cbUL, 0x5ce150aeUL, 0x4e54ff40UL, 0xf6e89825UL,
-    0xae8b8873UL, 0x1637ef16UL, 0x048240f8UL, 0xbc3e279dUL, 0x21e91f24UL,
-    0x99557841UL, 0x8be0d7afUL, 0x335cb0caUL, 0xed59b63bUL, 0x55e5d15eUL,
-    0x47507eb0UL, 0xffec19d5UL, 0x623b216cUL, 0xda874609UL, 0xc832e9e7UL,
-    0x708e8e82UL, 0x28ed9ed4UL, 0x9051f9b1UL, 0x82e4565fUL, 0x3a58313aUL,
-    0xa78f0983UL, 0x1f336ee6UL, 0x0d86c108UL, 0xb53aa66dUL, 0xbd40e1a4UL,
-    0x05fc86c1UL, 0x1749292fUL, 0xaff54e4aUL, 0x322276f3UL, 0x8a9e1196UL,
-    0x982bbe78UL, 0x2097d91dUL, 0x78f4c94bUL, 0xc048ae2eUL, 0xd2fd01c0UL,
-    0x6a4166a5UL, 0xf7965e1cUL, 0x4f2a3979UL, 0x5d9f9697UL, 0xe523f1f2UL,
-    0x4d6b1905UL, 0xf5d77e60UL, 0xe762d18eUL, 0x5fdeb6ebUL, 0xc2098e52UL,
-    0x7ab5e937UL, 0x680046d9UL, 0xd0bc21bcUL, 0x88df31eaUL, 0x3063568fUL,
-    0x22d6f961UL, 0x9a6a9e04UL, 0x07bda6bdUL, 0xbf01c1d8UL, 0xadb46e36UL,
-    0x15080953UL, 0x1d724e9aUL, 0xa5ce29ffUL, 0xb77b8611UL, 0x0fc7e174UL,
-    0x9210d9cdUL, 0x2aacbea8UL, 0x38191146UL, 0x80a57623UL, 0xd8c66675UL,
-    0x607a0110UL, 0x72cfaefeUL, 0xca73c99bUL, 0x57a4f122UL, 0xef189647UL,
-    0xfdad39a9UL, 0x45115eccUL, 0x764dee06UL, 0xcef18963UL, 0xdc44268dUL,
-    0x64f841e8UL, 0xf92f7951UL, 0x41931e34UL, 0x5326b1daUL, 0xeb9ad6bfUL,
-    0xb3f9c6e9UL, 0x0b45a18cUL, 0x19f00e62UL, 0xa14c6907UL, 0x3c9b51beUL,
-    0x842736dbUL, 0x96929935UL, 0x2e2efe50UL, 0x2654b999UL, 0x9ee8defcUL,
-    0x8c5d7112UL, 0x34e11677UL, 0xa9362eceUL, 0x118a49abUL, 0x033fe645UL,
-    0xbb838120UL, 0xe3e09176UL, 0x5b5cf613UL, 0x49e959fdUL, 0xf1553e98UL,
-    0x6c820621UL, 0xd43e6144UL, 0xc68bceaaUL, 0x7e37a9cfUL, 0xd67f4138UL,
-    0x6ec3265dUL, 0x7c7689b3UL, 0xc4caeed6UL, 0x591dd66fUL, 0xe1a1b10aUL,
-    0xf3141ee4UL, 0x4ba87981UL, 0x13cb69d7UL, 0xab770eb2UL, 0xb9c2a15cUL,
-    0x017ec639UL, 0x9ca9fe80UL, 0x241599e5UL, 0x36a0360bUL, 0x8e1c516eUL,
-    0x866616a7UL, 0x3eda71c2UL, 0x2c6fde2cUL, 0x94d3b949UL, 0x090481f0UL,
-    0xb1b8e695UL, 0xa30d497bUL, 0x1bb12e1eUL, 0x43d23e48UL, 0xfb6e592dUL,
-    0xe9dbf6c3UL, 0x516791a6UL, 0xccb0a91fUL, 0x740cce7aUL, 0x66b96194UL,
-    0xde0506f1UL
-  },
-  {
-    0x00000000UL, 0x96300777UL, 0x2c610eeeUL, 0xba510999UL, 0x19c46d07UL,
-    0x8ff46a70UL, 0x35a563e9UL, 0xa395649eUL, 0x3288db0eUL, 0xa4b8dc79UL,
-    0x1ee9d5e0UL, 0x88d9d297UL, 0x2b4cb609UL, 0xbd7cb17eUL, 0x072db8e7UL,
-    0x911dbf90UL, 0x6410b71dUL, 0xf220b06aUL, 0x4871b9f3UL, 0xde41be84UL,
-    0x7dd4da1aUL, 0xebe4dd6dUL, 0x51b5d4f4UL, 0xc785d383UL, 0x56986c13UL,
-    0xc0a86b64UL, 0x7af962fdUL, 0xecc9658aUL, 0x4f5c0114UL, 0xd96c0663UL,
-    0x633d0ffaUL, 0xf50d088dUL, 0xc8206e3bUL, 0x5e10694cUL, 0xe44160d5UL,
-    0x727167a2UL, 0xd1e4033cUL, 0x47d4044bUL, 0xfd850dd2UL, 0x6bb50aa5UL,
-    0xfaa8b535UL, 0x6c98b242UL, 0xd6c9bbdbUL, 0x40f9bcacUL, 0xe36cd832UL,
-    0x755cdf45UL, 0xcf0dd6dcUL, 0x593dd1abUL, 0xac30d926UL, 0x3a00de51UL,
-    0x8051d7c8UL, 0x1661d0bfUL, 0xb5f4b421UL, 0x23c4b356UL, 0x9995bacfUL,
-    0x0fa5bdb8UL, 0x9eb80228UL, 0x0888055fUL, 0xb2d90cc6UL, 0x24e90bb1UL,
-    0x877c6f2fUL, 0x114c6858UL, 0xab1d61c1UL, 0x3d2d66b6UL, 0x9041dc76UL,
-    0x0671db01UL, 0xbc20d298UL, 0x2a10d5efUL, 0x8985b171UL, 0x1fb5b606UL,
-    0xa5e4bf9fUL, 0x33d4b8e8UL, 0xa2c90778UL, 0x34f9000fUL, 0x8ea80996UL,
-    0x18980ee1UL, 0xbb0d6a7fUL, 0x2d3d6d08UL, 0x976c6491UL, 0x015c63e6UL,
-    0xf4516b6bUL, 0x62616c1cUL, 0xd8306585UL, 0x4e0062f2UL, 0xed95066cUL,
-    0x7ba5011bUL, 0xc1f40882UL, 0x57c40ff5UL, 0xc6d9b065UL, 0x50e9b712UL,
-    0xeab8be8bUL, 0x7c88b9fcUL, 0xdf1ddd62UL, 0x492dda15UL, 0xf37cd38cUL,
-    0x654cd4fbUL, 0x5861b24dUL, 0xce51b53aUL, 0x7400bca3UL, 0xe230bbd4UL,
-    0x41a5df4aUL, 0xd795d83dUL, 0x6dc4d1a4UL, 0xfbf4d6d3UL, 0x6ae96943UL,
-    0xfcd96e34UL, 0x468867adUL, 0xd0b860daUL, 0x732d0444UL, 0xe51d0333UL,
-    0x5f4c0aaaUL, 0xc97c0dddUL, 0x3c710550UL, 0xaa410227UL, 0x10100bbeUL,
-    0x86200cc9UL, 0x25b56857UL, 0xb3856f20UL, 0x09d466b9UL, 0x9fe461ceUL,
-    0x0ef9de5eUL, 0x98c9d929UL, 0x2298d0b0UL, 0xb4a8d7c7UL, 0x173db359UL,
-    0x810db42eUL, 0x3b5cbdb7UL, 0xad6cbac0UL, 0x2083b8edUL, 0xb6b3bf9aUL,
-    0x0ce2b603UL, 0x9ad2b174UL, 0x3947d5eaUL, 0xaf77d29dUL, 0x1526db04UL,
-    0x8316dc73UL, 0x120b63e3UL, 0x843b6494UL, 0x3e6a6d0dUL, 0xa85a6a7aUL,
-    0x0bcf0ee4UL, 0x9dff0993UL, 0x27ae000aUL, 0xb19e077dUL, 0x44930ff0UL,
-    0xd2a30887UL, 0x68f2011eUL, 0xfec20669UL, 0x5d5762f7UL, 0xcb676580UL,
-    0x71366c19UL, 0xe7066b6eUL, 0x761bd4feUL, 0xe02bd389UL, 0x5a7ada10UL,
-    0xcc4add67UL, 0x6fdfb9f9UL, 0xf9efbe8eUL, 0x43beb717UL, 0xd58eb060UL,
-    0xe8a3d6d6UL, 0x7e93d1a1UL, 0xc4c2d838UL, 0x52f2df4fUL, 0xf167bbd1UL,
-    0x6757bca6UL, 0xdd06b53fUL, 0x4b36b248UL, 0xda2b0dd8UL, 0x4c1b0aafUL,
-    0xf64a0336UL, 0x607a0441UL, 0xc3ef60dfUL, 0x55df67a8UL, 0xef8e6e31UL,
-    0x79be6946UL, 0x8cb361cbUL, 0x1a8366bcUL, 0xa0d26f25UL, 0x36e26852UL,
-    0x95770cccUL, 0x03470bbbUL, 0xb9160222UL, 0x2f260555UL, 0xbe3bbac5UL,
-    0x280bbdb2UL, 0x925ab42bUL, 0x046ab35cUL, 0xa7ffd7c2UL, 0x31cfd0b5UL,
-    0x8b9ed92cUL, 0x1daede5bUL, 0xb0c2649bUL, 0x26f263ecUL, 0x9ca36a75UL,
-    0x0a936d02UL, 0xa906099cUL, 0x3f360eebUL, 0x85670772UL, 0x13570005UL,
-    0x824abf95UL, 0x147ab8e2UL, 0xae2bb17bUL, 0x381bb60cUL, 0x9b8ed292UL,
-    0x0dbed5e5UL, 0xb7efdc7cUL, 0x21dfdb0bUL, 0xd4d2d386UL, 0x42e2d4f1UL,
-    0xf8b3dd68UL, 0x6e83da1fUL, 0xcd16be81UL, 0x5b26b9f6UL, 0xe177b06fUL,
-    0x7747b718UL, 0xe65a0888UL, 0x706a0fffUL, 0xca3b0666UL, 0x5c0b0111UL,
-    0xff9e658fUL, 0x69ae62f8UL, 0xd3ff6b61UL, 0x45cf6c16UL, 0x78e20aa0UL,
-    0xeed20dd7UL, 0x5483044eUL, 0xc2b30339UL, 0x612667a7UL, 0xf71660d0UL,
-    0x4d476949UL, 0xdb776e3eUL, 0x4a6ad1aeUL, 0xdc5ad6d9UL, 0x660bdf40UL,
-    0xf03bd837UL, 0x53aebca9UL, 0xc59ebbdeUL, 0x7fcfb247UL, 0xe9ffb530UL,
-    0x1cf2bdbdUL, 0x8ac2bacaUL, 0x3093b353UL, 0xa6a3b424UL, 0x0536d0baUL,
-    0x9306d7cdUL, 0x2957de54UL, 0xbf67d923UL, 0x2e7a66b3UL, 0xb84a61c4UL,
-    0x021b685dUL, 0x942b6f2aUL, 0x37be0bb4UL, 0xa18e0cc3UL, 0x1bdf055aUL,
-    0x8def022dUL
-  },
-  {
-    0x00000000UL, 0x41311b19UL, 0x82623632UL, 0xc3532d2bUL, 0x04c56c64UL,
-    0x45f4777dUL, 0x86a75a56UL, 0xc796414fUL, 0x088ad9c8UL, 0x49bbc2d1UL,
-    0x8ae8effaUL, 0xcbd9f4e3UL, 0x0c4fb5acUL, 0x4d7eaeb5UL, 0x8e2d839eUL,
-    0xcf1c9887UL, 0x5112c24aUL, 0x1023d953UL, 0xd370f478UL, 0x9241ef61UL,
-    0x55d7ae2eUL, 0x14e6b537UL, 0xd7b5981cUL, 0x96848305UL, 0x59981b82UL,
-    0x18a9009bUL, 0xdbfa2db0UL, 0x9acb36a9UL, 0x5d5d77e6UL, 0x1c6c6cffUL,
-    0xdf3f41d4UL, 0x9e0e5acdUL, 0xa2248495UL, 0xe3159f8cUL, 0x2046b2a7UL,
-    0x6177a9beUL, 0xa6e1e8f1UL, 0xe7d0f3e8UL, 0x2483dec3UL, 0x65b2c5daUL,
-    0xaaae5d5dUL, 0xeb9f4644UL, 0x28cc6b6fUL, 0x69fd7076UL, 0xae6b3139UL,
-    0xef5a2a20UL, 0x2c09070bUL, 0x6d381c12UL, 0xf33646dfUL, 0xb2075dc6UL,
-    0x715470edUL, 0x30656bf4UL, 0xf7f32abbUL, 0xb6c231a2UL, 0x75911c89UL,
-    0x34a00790UL, 0xfbbc9f17UL, 0xba8d840eUL, 0x79dea925UL, 0x38efb23cUL,
-    0xff79f373UL, 0xbe48e86aUL, 0x7d1bc541UL, 0x3c2ade58UL, 0x054f79f0UL,
-    0x447e62e9UL, 0x872d4fc2UL, 0xc61c54dbUL, 0x018a1594UL, 0x40bb0e8dUL,
-    0x83e823a6UL, 0xc2d938bfUL, 0x0dc5a038UL, 0x4cf4bb21UL, 0x8fa7960aUL,
-    0xce968d13UL, 0x0900cc5cUL, 0x4831d745UL, 0x8b62fa6eUL, 0xca53e177UL,
-    0x545dbbbaUL, 0x156ca0a3UL, 0xd63f8d88UL, 0x970e9691UL, 0x5098d7deUL,
-    0x11a9ccc7UL, 0xd2fae1ecUL, 0x93cbfaf5UL, 0x5cd76272UL, 0x1de6796bUL,
-    0xdeb55440UL, 0x9f844f59UL, 0x58120e16UL, 0x1923150fUL, 0xda703824UL,
-    0x9b41233dUL, 0xa76bfd65UL, 0xe65ae67cUL, 0x2509cb57UL, 0x6438d04eUL,
-    0xa3ae9101UL, 0xe29f8a18UL, 0x21cca733UL, 0x60fdbc2aUL, 0xafe124adUL,
-    0xeed03fb4UL, 0x2d83129fUL, 0x6cb20986UL, 0xab2448c9UL, 0xea1553d0UL,
-    0x29467efbUL, 0x687765e2UL, 0xf6793f2fUL, 0xb7482436UL, 0x741b091dUL,
-    0x352a1204UL, 0xf2bc534bUL, 0xb38d4852UL, 0x70de6579UL, 0x31ef7e60UL,
-    0xfef3e6e7UL, 0xbfc2fdfeUL, 0x7c91d0d5UL, 0x3da0cbccUL, 0xfa368a83UL,
-    0xbb07919aUL, 0x7854bcb1UL, 0x3965a7a8UL, 0x4b98833bUL, 0x0aa99822UL,
-    0xc9fab509UL, 0x88cbae10UL, 0x4f5def5fUL, 0x0e6cf446UL, 0xcd3fd96dUL,
-    0x8c0ec274UL, 0x43125af3UL, 0x022341eaUL, 0xc1706cc1UL, 0x804177d8UL,
-    0x47d73697UL, 0x06e62d8eUL, 0xc5b500a5UL, 0x84841bbcUL, 0x1a8a4171UL,
-    0x5bbb5a68UL, 0x98e87743UL, 0xd9d96c5aUL, 0x1e4f2d15UL, 0x5f7e360cUL,
-    0x9c2d1b27UL, 0xdd1c003eUL, 0x120098b9UL, 0x533183a0UL, 0x9062ae8bUL,
-    0xd153b592UL, 0x16c5f4ddUL, 0x57f4efc4UL, 0x94a7c2efUL, 0xd596d9f6UL,
-    0xe9bc07aeUL, 0xa88d1cb7UL, 0x6bde319cUL, 0x2aef2a85UL, 0xed796bcaUL,
-    0xac4870d3UL, 0x6f1b5df8UL, 0x2e2a46e1UL, 0xe136de66UL, 0xa007c57fUL,
-    0x6354e854UL, 0x2265f34dUL, 0xe5f3b202UL, 0xa4c2a91bUL, 0x67918430UL,
-    0x26a09f29UL, 0xb8aec5e4UL, 0xf99fdefdUL, 0x3accf3d6UL, 0x7bfde8cfUL,
-    0xbc6ba980UL, 0xfd5ab299UL, 0x3e099fb2UL, 0x7f3884abUL, 0xb0241c2cUL,
-    0xf1150735UL, 0x32462a1eUL, 0x73773107UL, 0xb4e17048UL, 0xf5d06b51UL,
-    0x3683467aUL, 0x77b25d63UL, 0x4ed7facbUL, 0x0fe6e1d2UL, 0xccb5ccf9UL,
-    0x8d84d7e0UL, 0x4a1296afUL, 0x0b238db6UL, 0xc870a09dUL, 0x8941bb84UL,
-    0x465d2303UL, 0x076c381aUL, 0xc43f1531UL, 0x850e0e28UL, 0x42984f67UL,
-    0x03a9547eUL, 0xc0fa7955UL, 0x81cb624cUL, 0x1fc53881UL, 0x5ef42398UL,
-    0x9da70eb3UL, 0xdc9615aaUL, 0x1b0054e5UL, 0x5a314ffcUL, 0x996262d7UL,
-    0xd85379ceUL, 0x174fe149UL, 0x567efa50UL, 0x952dd77bUL, 0xd41ccc62UL,
-    0x138a8d2dUL, 0x52bb9634UL, 0x91e8bb1fUL, 0xd0d9a006UL, 0xecf37e5eUL,
-    0xadc26547UL, 0x6e91486cUL, 0x2fa05375UL, 0xe836123aUL, 0xa9070923UL,
-    0x6a542408UL, 0x2b653f11UL, 0xe479a796UL, 0xa548bc8fUL, 0x661b91a4UL,
-    0x272a8abdUL, 0xe0bccbf2UL, 0xa18dd0ebUL, 0x62defdc0UL, 0x23efe6d9UL,
-    0xbde1bc14UL, 0xfcd0a70dUL, 0x3f838a26UL, 0x7eb2913fUL, 0xb924d070UL,
-    0xf815cb69UL, 0x3b46e642UL, 0x7a77fd5bUL, 0xb56b65dcUL, 0xf45a7ec5UL,
-    0x370953eeUL, 0x763848f7UL, 0xb1ae09b8UL, 0xf09f12a1UL, 0x33cc3f8aUL,
-    0x72fd2493UL
-  },
-  {
-    0x00000000UL, 0x376ac201UL, 0x6ed48403UL, 0x59be4602UL, 0xdca80907UL,
-    0xebc2cb06UL, 0xb27c8d04UL, 0x85164f05UL, 0xb851130eUL, 0x8f3bd10fUL,
-    0xd685970dUL, 0xe1ef550cUL, 0x64f91a09UL, 0x5393d808UL, 0x0a2d9e0aUL,
-    0x3d475c0bUL, 0x70a3261cUL, 0x47c9e41dUL, 0x1e77a21fUL, 0x291d601eUL,
-    0xac0b2f1bUL, 0x9b61ed1aUL, 0xc2dfab18UL, 0xf5b56919UL, 0xc8f23512UL,
-    0xff98f713UL, 0xa626b111UL, 0x914c7310UL, 0x145a3c15UL, 0x2330fe14UL,
-    0x7a8eb816UL, 0x4de47a17UL, 0xe0464d38UL, 0xd72c8f39UL, 0x8e92c93bUL,
-    0xb9f80b3aUL, 0x3cee443fUL, 0x0b84863eUL, 0x523ac03cUL, 0x6550023dUL,
-    0x58175e36UL, 0x6f7d9c37UL, 0x36c3da35UL, 0x01a91834UL, 0x84bf5731UL,
-    0xb3d59530UL, 0xea6bd332UL, 0xdd011133UL, 0x90e56b24UL, 0xa78fa925UL,
-    0xfe31ef27UL, 0xc95b2d26UL, 0x4c4d6223UL, 0x7b27a022UL, 0x2299e620UL,
-    0x15f32421UL, 0x28b4782aUL, 0x1fdeba2bUL, 0x4660fc29UL, 0x710a3e28UL,
-    0xf41c712dUL, 0xc376b32cUL, 0x9ac8f52eUL, 0xada2372fUL, 0xc08d9a70UL,
-    0xf7e75871UL, 0xae591e73UL, 0x9933dc72UL, 0x1c259377UL, 0x2b4f5176UL,
-    0x72f11774UL, 0x459bd575UL, 0x78dc897eUL, 0x4fb64b7fUL, 0x16080d7dUL,
-    0x2162cf7cUL, 0xa4748079UL, 0x931e4278UL, 0xcaa0047aUL, 0xfdcac67bUL,
-    0xb02ebc6cUL, 0x87447e6dUL, 0xdefa386fUL, 0xe990fa6eUL, 0x6c86b56bUL,
-    0x5bec776aUL, 0x02523168UL, 0x3538f369UL, 0x087faf62UL, 0x3f156d63UL,
-    0x66ab2b61UL, 0x51c1e960UL, 0xd4d7a665UL, 0xe3bd6464UL, 0xba032266UL,
-    0x8d69e067UL, 0x20cbd748UL, 0x17a11549UL, 0x4e1f534bUL, 0x7975914aUL,
-    0xfc63de4fUL, 0xcb091c4eUL, 0x92b75a4cUL, 0xa5dd984dUL, 0x989ac446UL,
-    0xaff00647UL, 0xf64e4045UL, 0xc1248244UL, 0x4432cd41UL, 0x73580f40UL,
-    0x2ae64942UL, 0x1d8c8b43UL, 0x5068f154UL, 0x67023355UL, 0x3ebc7557UL,
-    0x09d6b756UL, 0x8cc0f853UL, 0xbbaa3a52UL, 0xe2147c50UL, 0xd57ebe51UL,
-    0xe839e25aUL, 0xdf53205bUL, 0x86ed6659UL, 0xb187a458UL, 0x3491eb5dUL,
-    0x03fb295cUL, 0x5a456f5eUL, 0x6d2fad5fUL, 0x801b35e1UL, 0xb771f7e0UL,
-    0xeecfb1e2UL, 0xd9a573e3UL, 0x5cb33ce6UL, 0x6bd9fee7UL, 0x3267b8e5UL,
-    0x050d7ae4UL, 0x384a26efUL, 0x0f20e4eeUL, 0x569ea2ecUL, 0x61f460edUL,
-    0xe4e22fe8UL, 0xd388ede9UL, 0x8a36abebUL, 0xbd5c69eaUL, 0xf0b813fdUL,
-    0xc7d2d1fcUL, 0x9e6c97feUL, 0xa90655ffUL, 0x2c101afaUL, 0x1b7ad8fbUL,
-    0x42c49ef9UL, 0x75ae5cf8UL, 0x48e900f3UL, 0x7f83c2f2UL, 0x263d84f0UL,
-    0x115746f1UL, 0x944109f4UL, 0xa32bcbf5UL, 0xfa958df7UL, 0xcdff4ff6UL,
-    0x605d78d9UL, 0x5737bad8UL, 0x0e89fcdaUL, 0x39e33edbUL, 0xbcf571deUL,
-    0x8b9fb3dfUL, 0xd221f5ddUL, 0xe54b37dcUL, 0xd80c6bd7UL, 0xef66a9d6UL,
-    0xb6d8efd4UL, 0x81b22dd5UL, 0x04a462d0UL, 0x33cea0d1UL, 0x6a70e6d3UL,
-    0x5d1a24d2UL, 0x10fe5ec5UL, 0x27949cc4UL, 0x7e2adac6UL, 0x494018c7UL,
-    0xcc5657c2UL, 0xfb3c95c3UL, 0xa282d3c1UL, 0x95e811c0UL, 0xa8af4dcbUL,
-    0x9fc58fcaUL, 0xc67bc9c8UL, 0xf1110bc9UL, 0x740744ccUL, 0x436d86cdUL,
-    0x1ad3c0cfUL, 0x2db902ceUL, 0x4096af91UL, 0x77fc6d90UL, 0x2e422b92UL,
-    0x1928e993UL, 0x9c3ea696UL, 0xab546497UL, 0xf2ea2295UL, 0xc580e094UL,
-    0xf8c7bc9fUL, 0xcfad7e9eUL, 0x9613389cUL, 0xa179fa9dUL, 0x246fb598UL,
-    0x13057799UL, 0x4abb319bUL, 0x7dd1f39aUL, 0x3035898dUL, 0x075f4b8cUL,
-    0x5ee10d8eUL, 0x698bcf8fUL, 0xec9d808aUL, 0xdbf7428bUL, 0x82490489UL,
-    0xb523c688UL, 0x88649a83UL, 0xbf0e5882UL, 0xe6b01e80UL, 0xd1dadc81UL,
-    0x54cc9384UL, 0x63a65185UL, 0x3a181787UL, 0x0d72d586UL, 0xa0d0e2a9UL,
-    0x97ba20a8UL, 0xce0466aaUL, 0xf96ea4abUL, 0x7c78ebaeUL, 0x4b1229afUL,
-    0x12ac6fadUL, 0x25c6adacUL, 0x1881f1a7UL, 0x2feb33a6UL, 0x765575a4UL,
-    0x413fb7a5UL, 0xc429f8a0UL, 0xf3433aa1UL, 0xaafd7ca3UL, 0x9d97bea2UL,
-    0xd073c4b5UL, 0xe71906b4UL, 0xbea740b6UL, 0x89cd82b7UL, 0x0cdbcdb2UL,
-    0x3bb10fb3UL, 0x620f49b1UL, 0x55658bb0UL, 0x6822d7bbUL, 0x5f4815baUL,
-    0x06f653b8UL, 0x319c91b9UL, 0xb48adebcUL, 0x83e01cbdUL, 0xda5e5abfUL,
-    0xed3498beUL
-  },
-  {
-    0x00000000UL, 0x6567bcb8UL, 0x8bc809aaUL, 0xeeafb512UL, 0x5797628fUL,
-    0x32f0de37UL, 0xdc5f6b25UL, 0xb938d79dUL, 0xef28b4c5UL, 0x8a4f087dUL,
-    0x64e0bd6fUL, 0x018701d7UL, 0xb8bfd64aUL, 0xddd86af2UL, 0x3377dfe0UL,
-    0x56106358UL, 0x9f571950UL, 0xfa30a5e8UL, 0x149f10faUL, 0x71f8ac42UL,
-    0xc8c07bdfUL, 0xada7c767UL, 0x43087275UL, 0x266fcecdUL, 0x707fad95UL,
-    0x1518112dUL, 0xfbb7a43fUL, 0x9ed01887UL, 0x27e8cf1aUL, 0x428f73a2UL,
-    0xac20c6b0UL, 0xc9477a08UL, 0x3eaf32a0UL, 0x5bc88e18UL, 0xb5673b0aUL,
-    0xd00087b2UL, 0x6938502fUL, 0x0c5fec97UL, 0xe2f05985UL, 0x8797e53dUL,
-    0xd1878665UL, 0xb4e03addUL, 0x5a4f8fcfUL, 0x3f283377UL, 0x8610e4eaUL,
-    0xe3775852UL, 0x0dd8ed40UL, 0x68bf51f8UL, 0xa1f82bf0UL, 0xc49f9748UL,
-    0x2a30225aUL, 0x4f579ee2UL, 0xf66f497fUL, 0x9308f5c7UL, 0x7da740d5UL,
-    0x18c0fc6dUL, 0x4ed09f35UL, 0x2bb7238dUL, 0xc518969fUL, 0xa07f2a27UL,
-    0x1947fdbaUL, 0x7c204102UL, 0x928ff410UL, 0xf7e848a8UL, 0x3d58149bUL,
-    0x583fa823UL, 0xb6901d31UL, 0xd3f7a189UL, 0x6acf7614UL, 0x0fa8caacUL,
-    0xe1077fbeUL, 0x8460c306UL, 0xd270a05eUL, 0xb7171ce6UL, 0x59b8a9f4UL,
-    0x3cdf154cUL, 0x85e7c2d1UL, 0xe0807e69UL, 0x0e2fcb7bUL, 0x6b4877c3UL,
-    0xa20f0dcbUL, 0xc768b173UL, 0x29c70461UL, 0x4ca0b8d9UL, 0xf5986f44UL,
-    0x90ffd3fcUL, 0x7e5066eeUL, 0x1b37da56UL, 0x4d27b90eUL, 0x284005b6UL,
-    0xc6efb0a4UL, 0xa3880c1cUL, 0x1ab0db81UL, 0x7fd76739UL, 0x9178d22bUL,
-    0xf41f6e93UL, 0x03f7263bUL, 0x66909a83UL, 0x883f2f91UL, 0xed589329UL,
-    0x546044b4UL, 0x3107f80cUL, 0xdfa84d1eUL, 0xbacff1a6UL, 0xecdf92feUL,
-    0x89b82e46UL, 0x67179b54UL, 0x027027ecUL, 0xbb48f071UL, 0xde2f4cc9UL,
-    0x3080f9dbUL, 0x55e74563UL, 0x9ca03f6bUL, 0xf9c783d3UL, 0x176836c1UL,
-    0x720f8a79UL, 0xcb375de4UL, 0xae50e15cUL, 0x40ff544eUL, 0x2598e8f6UL,
-    0x73888baeUL, 0x16ef3716UL, 0xf8408204UL, 0x9d273ebcUL, 0x241fe921UL,
-    0x41785599UL, 0xafd7e08bUL, 0xcab05c33UL, 0x3bb659edUL, 0x5ed1e555UL,
-    0xb07e5047UL, 0xd519ecffUL, 0x6c213b62UL, 0x094687daUL, 0xe7e932c8UL,
-    0x828e8e70UL, 0xd49eed28UL, 0xb1f95190UL, 0x5f56e482UL, 0x3a31583aUL,
-    0x83098fa7UL, 0xe66e331fUL, 0x08c1860dUL, 0x6da63ab5UL, 0xa4e140bdUL,
-    0xc186fc05UL, 0x2f294917UL, 0x4a4ef5afUL, 0xf3762232UL, 0x96119e8aUL,
-    0x78be2b98UL, 0x1dd99720UL, 0x4bc9f478UL, 0x2eae48c0UL, 0xc001fdd2UL,
-    0xa566416aUL, 0x1c5e96f7UL, 0x79392a4fUL, 0x97969f5dUL, 0xf2f123e5UL,
-    0x05196b4dUL, 0x607ed7f5UL, 0x8ed162e7UL, 0xebb6de5fUL, 0x528e09c2UL,
-    0x37e9b57aUL, 0xd9460068UL, 0xbc21bcd0UL, 0xea31df88UL, 0x8f566330UL,
-    0x61f9d622UL, 0x049e6a9aUL, 0xbda6bd07UL, 0xd8c101bfUL, 0x366eb4adUL,
-    0x53090815UL, 0x9a4e721dUL, 0xff29cea5UL, 0x11867bb7UL, 0x74e1c70fUL,
-    0xcdd91092UL, 0xa8beac2aUL, 0x46111938UL, 0x2376a580UL, 0x7566c6d8UL,
-    0x10017a60UL, 0xfeaecf72UL, 0x9bc973caUL, 0x22f1a457UL, 0x479618efUL,
-    0xa939adfdUL, 0xcc5e1145UL, 0x06ee4d76UL, 0x6389f1ceUL, 0x8d2644dcUL,
-    0xe841f864UL, 0x51792ff9UL, 0x341e9341UL, 0xdab12653UL, 0xbfd69aebUL,
-    0xe9c6f9b3UL, 0x8ca1450bUL, 0x620ef019UL, 0x07694ca1UL, 0xbe519b3cUL,
-    0xdb362784UL, 0x35999296UL, 0x50fe2e2eUL, 0x99b95426UL, 0xfcdee89eUL,
-    0x12715d8cUL, 0x7716e134UL, 0xce2e36a9UL, 0xab498a11UL, 0x45e63f03UL,
-    0x208183bbUL, 0x7691e0e3UL, 0x13f65c5bUL, 0xfd59e949UL, 0x983e55f1UL,
-    0x2106826cUL, 0x44613ed4UL, 0xaace8bc6UL, 0xcfa9377eUL, 0x38417fd6UL,
-    0x5d26c36eUL, 0xb389767cUL, 0xd6eecac4UL, 0x6fd61d59UL, 0x0ab1a1e1UL,
-    0xe41e14f3UL, 0x8179a84bUL, 0xd769cb13UL, 0xb20e77abUL, 0x5ca1c2b9UL,
-    0x39c67e01UL, 0x80fea99cUL, 0xe5991524UL, 0x0b36a036UL, 0x6e511c8eUL,
-    0xa7166686UL, 0xc271da3eUL, 0x2cde6f2cUL, 0x49b9d394UL, 0xf0810409UL,
-    0x95e6b8b1UL, 0x7b490da3UL, 0x1e2eb11bUL, 0x483ed243UL, 0x2d596efbUL,
-    0xc3f6dbe9UL, 0xa6916751UL, 0x1fa9b0ccUL, 0x7ace0c74UL, 0x9461b966UL,
-    0xf10605deUL
-#endif
-  }
-};
Index: trunk/minix/lib/zlib-1.2.3/deflate.c
===================================================================
--- trunk/minix/lib/zlib-1.2.3/deflate.c	(revision 9)
+++ 	(revision )
@@ -1,1736 +1,0 @@
-/* deflate.c -- compress data using the deflation algorithm
- * Copyright (C) 1995-2005 Jean-loup Gailly.
- * For conditions of distribution and use, see copyright notice in zlib.h
- */
-
-/*
- *  ALGORITHM
- *
- *      The "deflation" process depends on being able to identify portions
- *      of the input text which are identical to earlier input (within a
- *      sliding window trailing behind the input currently being processed).
- *
- *      The most straightforward technique turns out to be the fastest for
- *      most input files: try all possible matches and select the longest.
- *      The key feature of this algorithm is that insertions into the string
- *      dictionary are very simple and thus fast, and deletions are avoided
- *      completely. Insertions are performed at each input character, whereas
- *      string matches are performed only when the previous match ends. So it
- *      is preferable to spend more time in matches to allow very fast string
- *      insertions and avoid deletions. The matching algorithm for small
- *      strings is inspired from that of Rabin & Karp. A brute force approach
- *      is used to find longer strings when a small match has been found.
- *      A similar algorithm is used in comic (by Jan-Mark Wams) and freeze
- *      (by Leonid Broukhis).
- *         A previous version of this file used a more sophisticated algorithm
- *      (by Fiala and Greene) which is guaranteed to run in linear amortized
- *      time, but has a larger average cost, uses more memory and is patented.
- *      However the F&G algorithm may be faster for some highly redundant
- *      files if the parameter max_chain_length (described below) is too large.
- *
- *  ACKNOWLEDGEMENTS
- *
- *      The idea of lazy evaluation of matches is due to Jan-Mark Wams, and
- *      I found it in 'freeze' written by Leonid Broukhis.
- *      Thanks to many people for bug reports and testing.
- *
- *  REFERENCES
- *
- *      Deutsch, L.P.,"DEFLATE Compressed Data Format Specification".
- *      Available in http://www.ietf.org/rfc/rfc1951.txt
- *
- *      A description of the Rabin and Karp algorithm is given in the book
- *         "Algorithms" by R. Sedgewick, Addison-Wesley, p252.
- *
- *      Fiala,E.R., and Greene,D.H.
- *         Data Compression with Finite Windows, Comm.ACM, 32,4 (1989) 490-595
- *
- */
-
-/* @(#) $Id: deflate.c,v 1.1 2005/09/23 22:39:00 beng Exp $ */
-
-#include "deflate.h"
-
-const char deflate_copyright[] =
-   " deflate 1.2.3 Copyright 1995-2005 Jean-loup Gailly ";
-/*
-  If you use the zlib library in a product, an acknowledgment is welcome
-  in the documentation of your product. If for some reason you cannot
-  include such an acknowledgment, I would appreciate that you keep this
-  copyright string in the executable of your product.
- */
-
-/* ===========================================================================
- *  Function prototypes.
- */
-typedef enum {
-    need_more,      /* block not completed, need more input or more output */
-    block_done,     /* block flush performed */
-    finish_started, /* finish started, need only more output at next deflate */
-    finish_done     /* finish done, accept no more input or output */
-} block_state;
-
-typedef block_state (*compress_func) OF((deflate_state *s, int flush));
-/* Compression function. Returns the block state after the call. */
-
-local void fill_window    OF((deflate_state *s));
-local block_state deflate_stored OF((deflate_state *s, int flush));
-local block_state deflate_fast   OF((deflate_state *s, int flush));
-#ifndef FASTEST
-local block_state deflate_slow   OF((deflate_state *s, int flush));
-#endif
-local void lm_init        OF((deflate_state *s));
-local void putShortMSB    OF((deflate_state *s, uInt b));
-local void flush_pending  OF((z_streamp strm));
-local int read_buf        OF((z_streamp strm, Bytef *buf, unsigned size));
-#ifndef FASTEST
-#ifdef ASMV
-      void match_init OF((void)); /* asm code initialization */
-      uInt longest_match  OF((deflate_state *s, IPos cur_match));
-#else
-local uInt longest_match  OF((deflate_state *s, IPos cur_match));
-#endif
-#endif
-local uInt longest_match_fast OF((deflate_state *s, IPos cur_match));
-
-#ifdef DEBUG
-local  void check_match OF((deflate_state *s, IPos start, IPos match,
-                            int length));
-#endif
-
-/* ===========================================================================
- * Local data
- */
-
-#define NIL 0
-/* Tail of hash chains */
-
-#ifndef TOO_FAR
-#  define TOO_FAR 4096
-#endif
-/* Matches of length 3 are discarded if their distance exceeds TOO_FAR */
-
-#define MIN_LOOKAHEAD (MAX_MATCH+MIN_MATCH+1)
-/* Minimum amount of lookahead, except at the end of the input file.
- * See deflate.c for comments about the MIN_MATCH+1.
- */
-
-/* Values for max_lazy_match, good_match and max_chain_length, depending on
- * the desired pack level (0..9). The values given below have been tuned to
- * exclude worst case performance for pathological files. Better values may be
- * found for specific files.
- */
-typedef struct config_s {
-   ush good_length; /* reduce lazy search above this match length */
-   ush max_lazy;    /* do not perform lazy search above this match length */
-   ush nice_length; /* quit search above this match length */
-   ush max_chain;
-   compress_func func;
-} config;
-
-#ifdef FASTEST
-local const config configuration_table[2] = {
-/*      good lazy nice chain */
-/* 0 */ {0,    0,  0,    0, deflate_stored},  /* store only */
-/* 1 */ {4,    4,  8,    4, deflate_fast}}; /* max speed, no lazy matches */
-#else
-local const config configuration_table[10] = {
-/*      good lazy nice chain */
-/* 0 */ {0,    0,  0,    0, deflate_stored},  /* store only */
-/* 1 */ {4,    4,  8,    4, deflate_fast}, /* max speed, no lazy matches */
-/* 2 */ {4,    5, 16,    8, deflate_fast},
-/* 3 */ {4,    6, 32,   32, deflate_fast},
-
-/* 4 */ {4,    4, 16,   16, deflate_slow},  /* lazy matches */
-/* 5 */ {8,   16, 32,   32, deflate_slow},
-/* 6 */ {8,   16, 128, 128, deflate_slow},
-/* 7 */ {8,   32, 128, 256, deflate_slow},
-/* 8 */ {32, 128, 258, 1024, deflate_slow},
-/* 9 */ {32, 258, 258, 4096, deflate_slow}}; /* max compression */
-#endif
-
-/* Note: the deflate() code requires max_lazy >= MIN_MATCH and max_chain >= 4
- * For deflate_fast() (levels <= 3) good is ignored and lazy has a different
- * meaning.
- */
-
-#define EQUAL 0
-/* result of memcmp for equal strings */
-
-#ifndef NO_DUMMY_DECL
-struct static_tree_desc_s {int dummy;}; /* for buggy compilers */
-#endif
-
-/* ===========================================================================
- * Update a hash value with the given input byte
- * IN  assertion: all calls to to UPDATE_HASH are made with consecutive
- *    input characters, so that a running hash key can be computed from the
- *    previous key instead of complete recalculation each time.
- */
-#define UPDATE_HASH(s,h,c) (h = (((h)<<s->hash_shift) ^ (c)) & s->hash_mask)
-
-
-/* ===========================================================================
- * Insert string str in the dictionary and set match_head to the previous head
- * of the hash chain (the most recent string with same hash key). Return
- * the previous length of the hash chain.
- * If this file is compiled with -DFASTEST, the compression level is forced
- * to 1, and no hash chains are maintained.
- * IN  assertion: all calls to to INSERT_STRING are made with consecutive
- *    input characters and the first MIN_MATCH bytes of str are valid
- *    (except for the last MIN_MATCH-1 bytes of the input file).
- */
-#ifdef FASTEST
-#define INSERT_STRING(s, str, match_head) \
-   (UPDATE_HASH(s, s->ins_h, s->window[(str) + (MIN_MATCH-1)]), \
-    match_head = s->head[s->ins_h], \
-    s->head[s->ins_h] = (Pos)(str))
-#else
-#define INSERT_STRING(s, str, match_head) \
-   (UPDATE_HASH(s, s->ins_h, s->window[(str) + (MIN_MATCH-1)]), \
-    match_head = s->prev[(str) & s->w_mask] = s->head[s->ins_h], \
-    s->head[s->ins_h] = (Pos)(str))
-#endif
-
-/* ===========================================================================
- * Initialize the hash table (avoiding 64K overflow for 16 bit systems).
- * prev[] will be initialized on the fly.
- */
-#define CLEAR_HASH(s) \
-    s->head[s->hash_size-1] = NIL; \
-    zmemzero((Bytef *)s->head, (unsigned)(s->hash_size-1)*sizeof(*s->head));
-
-/* ========================================================================= */
-int ZEXPORT deflateInit_(strm, level, version, stream_size)
-    z_streamp strm;
-    int level;
-    const char *version;
-    int stream_size;
-{
-    return deflateInit2_(strm, level, Z_DEFLATED, MAX_WBITS, DEF_MEM_LEVEL,
-                         Z_DEFAULT_STRATEGY, version, stream_size);
-    /* To do: ignore strm->next_in if we use it as window */
-}
-
-/* ========================================================================= */
-int ZEXPORT deflateInit2_(strm, level, method, windowBits, memLevel, strategy,
-                  version, stream_size)
-    z_streamp strm;
-    int  level;
-    int  method;
-    int  windowBits;
-    int  memLevel;
-    int  strategy;
-    const char *version;
-    int stream_size;
-{
-    deflate_state *s;
-    int wrap = 1;
-    static const char my_version[] = ZLIB_VERSION;
-
-    ushf *overlay;
-    /* We overlay pending_buf and d_buf+l_buf. This works since the average
-     * output size for (length,distance) codes is <= 24 bits.
-     */
-
-    if (version == Z_NULL || version[0] != my_version[0] ||
-        stream_size != sizeof(z_stream)) {
-        return Z_VERSION_ERROR;
-    }
-    if (strm == Z_NULL) return Z_STREAM_ERROR;
-
-    strm->msg = Z_NULL;
-    if (strm->zalloc == (alloc_func)0) {
-        strm->zalloc = zcalloc;
-        strm->opaque = (voidpf)0;
-    }
-    if (strm->zfree == (free_func)0) strm->zfree = zcfree;
-
-#ifdef FASTEST
-    if (level != 0) level = 1;
-#else
-    if (level == Z_DEFAULT_COMPRESSION) level = 6;
-#endif
-
-    if (windowBits < 0) { /* suppress zlib wrapper */
-        wrap = 0;
-        windowBits = -windowBits;
-    }
-#ifdef GZIP
-    else if (windowBits > 15) {
-        wrap = 2;       /* write gzip wrapper instead */
-        windowBits -= 16;
-    }
-#endif
-    if (memLevel < 1 || memLevel > MAX_MEM_LEVEL || method != Z_DEFLATED ||
-        windowBits < 8 || windowBits > 15 || level < 0 || level > 9 ||
-        strategy < 0 || strategy > Z_FIXED) {
-        return Z_STREAM_ERROR;
-    }
-    if (windowBits == 8) windowBits = 9;  /* until 256-byte window bug fixed */
-    s = (deflate_state *) ZALLOC(strm, 1, sizeof(deflate_state));
-    if (s == Z_NULL) return Z_MEM_ERROR;
-    strm->state = (struct internal_state FAR *)s;
-    s->strm = strm;
-
-    s->wrap = wrap;
-    s->gzhead = Z_NULL;
-    s->w_bits = windowBits;
-    s->w_size = 1 << s->w_bits;
-    s->w_mask = s->w_size - 1;
-
-    s->hash_bits = memLevel + 7;
-    s->hash_size = 1 << s->hash_bits;
-    s->hash_mask = s->hash_size - 1;
-    s->hash_shift =  ((s->hash_bits+MIN_MATCH-1)/MIN_MATCH);
-
-    s->window = (Bytef *) ZALLOC(strm, s->w_size, 2*sizeof(Byte));
-    s->prev   = (Posf *)  ZALLOC(strm, s->w_size, sizeof(Pos));
-    s->head   = (Posf *)  ZALLOC(strm, s->hash_size, sizeof(Pos));
-
-    s->lit_bufsize = 1 << (memLevel + 6); /* 16K elements by default */
-
-    overlay = (ushf *) ZALLOC(strm, s->lit_bufsize, sizeof(ush)+2);
-    s->pending_buf = (uchf *) overlay;
-    s->pending_buf_size = (ulg)s->lit_bufsize * (sizeof(ush)+2L);
-
-    if (s->window == Z_NULL || s->prev == Z_NULL || s->head == Z_NULL ||
-        s->pending_buf == Z_NULL) {
-        s->status = FINISH_STATE;
-        strm->msg = (char*)ERR_MSG(Z_MEM_ERROR);
-        deflateEnd (strm);
-        return Z_MEM_ERROR;
-    }
-    s->d_buf = overlay + s->lit_bufsize/sizeof(ush);
-    s->l_buf = s->pending_buf + (1+sizeof(ush))*s->lit_bufsize;
-
-    s->level = level;
-    s->strategy = strategy;
-    s->method = (Byte)method;
-
-    return deflateReset(strm);
-}
-
-/* ========================================================================= */
-int ZEXPORT deflateSetDictionary (strm, dictionary, dictLength)
-    z_streamp strm;
-    const Bytef *dictionary;
-    uInt  dictLength;
-{
-    deflate_state *s;
-    uInt length = dictLength;
-    uInt n;
-    IPos hash_head = 0;
-
-    if (strm == Z_NULL || strm->state == Z_NULL || dictionary == Z_NULL ||
-        strm->state->wrap == 2 ||
-        (strm->state->wrap == 1 && strm->state->status != INIT_STATE))
-        return Z_STREAM_ERROR;
-
-    s = strm->state;
-    if (s->wrap)
-        strm->adler = adler32(strm->adler, dictionary, dictLength);
-
-    if (length < MIN_MATCH) return Z_OK;
-    if (length > MAX_DIST(s)) {
-        length = MAX_DIST(s);
-        dictionary += dictLength - length; /* use the tail of the dictionary */
-    }
-    zmemcpy(s->window, dictionary, length);
-    s->strstart = length;
-    s->block_start = (long)length;
-
-    /* Insert all strings in the hash table (except for the last two bytes).
-     * s->lookahead stays null, so s->ins_h will be recomputed at the next
-     * call of fill_window.
-     */
-    s->ins_h = s->window[0];
-    UPDATE_HASH(s, s->ins_h, s->window[1]);
-    for (n = 0; n <= length - MIN_MATCH; n++) {
-        INSERT_STRING(s, n, hash_head);
-    }
-    if (hash_head) hash_head = 0;  /* to make compiler happy */
-    return Z_OK;
-}
-
-/* ========================================================================= */
-int ZEXPORT deflateReset (strm)
-    z_streamp strm;
-{
-    deflate_state *s;
-
-    if (strm == Z_NULL || strm->state == Z_NULL ||
-        strm->zalloc == (alloc_func)0 || strm->zfree == (free_func)0) {
-        return Z_STREAM_ERROR;
-    }
-
-    strm->total_in = strm->total_out = 0;
-    strm->msg = Z_NULL; /* use zfree if we ever allocate msg dynamically */
-    strm->data_type = Z_UNKNOWN;
-
-    s = (deflate_state *)strm->state;
-    s->pending = 0;
-    s->pending_out = s->pending_buf;
-
-    if (s->wrap < 0) {
-        s->wrap = -s->wrap; /* was made negative by deflate(..., Z_FINISH); */
-    }
-    s->status = s->wrap ? INIT_STATE : BUSY_STATE;
-    strm->adler =
-#ifdef GZIP
-        s->wrap == 2 ? crc32(0L, Z_NULL, 0) :
-#endif
-        adler32(0L, Z_NULL, 0);
-    s->last_flush = Z_NO_FLUSH;
-
-    _tr_init(s);
-    lm_init(s);
-
-    return Z_OK;
-}
-
-/* ========================================================================= */
-int ZEXPORT deflateSetHeader (strm, head)
-    z_streamp strm;
-    gz_headerp head;
-{
-    if (strm == Z_NULL || strm->state == Z_NULL) return Z_STREAM_ERROR;
-    if (strm->state->wrap != 2) return Z_STREAM_ERROR;
-    strm->state->gzhead = head;
-    return Z_OK;
-}
-
-/* ========================================================================= */
-int ZEXPORT deflatePrime (strm, bits, value)
-    z_streamp strm;
-    int bits;
-    int value;
-{
-    if (strm == Z_NULL || strm->state == Z_NULL) return Z_STREAM_ERROR;
-    strm->state->bi_valid = bits;
-    strm->state->bi_buf = (ush)(value & ((1 << bits) - 1));
-    return Z_OK;
-}
-
-/* ========================================================================= */
-int ZEXPORT deflateParams(strm, level, strategy)
-    z_streamp strm;
-    int level;
-    int strategy;
-{
-    deflate_state *s;
-    compress_func func;
-    int err = Z_OK;
-
-    if (strm == Z_NULL || strm->state == Z_NULL) return Z_STREAM_ERROR;
-    s = strm->state;
-
-#ifdef FASTEST
-    if (level != 0) level = 1;
-#else
-    if (level == Z_DEFAULT_COMPRESSION) level = 6;
-#endif
-    if (level < 0 || level > 9 || strategy < 0 || strategy > Z_FIXED) {
-        return Z_STREAM_ERROR;
-    }
-    func = configuration_table[s->level].func;
-
-    if (func != configuration_table[level].func && strm->total_in != 0) {
-        /* Flush the last buffer: */
-        err = deflate(strm, Z_PARTIAL_FLUSH);
-    }
-    if (s->level != level) {
-        s->level = level;
-        s->max_lazy_match   = configuration_table[level].max_lazy;
-        s->good_match       = configuration_table[level].good_length;
-        s->nice_match       = configuration_table[level].nice_length;
-        s->max_chain_length = configuration_table[level].max_chain;
-    }
-    s->strategy = strategy;
-    return err;
-}
-
-/* ========================================================================= */
-int ZEXPORT deflateTune(strm, good_length, max_lazy, nice_length, max_chain)
-    z_streamp strm;
-    int good_length;
-    int max_lazy;
-    int nice_length;
-    int max_chain;
-{
-    deflate_state *s;
-
-    if (strm == Z_NULL || strm->state == Z_NULL) return Z_STREAM_ERROR;
-    s = strm->state;
-    s->good_match = good_length;
-    s->max_lazy_match = max_lazy;
-    s->nice_match = nice_length;
-    s->max_chain_length = max_chain;
-    return Z_OK;
-}
-
-/* =========================================================================
- * For the default windowBits of 15 and memLevel of 8, this function returns
- * a close to exact, as well as small, upper bound on the compressed size.
- * They are coded as constants here for a reason--if the #define's are
- * changed, then this function needs to be changed as well.  The return
- * value for 15 and 8 only works for those exact settings.
- *
- * For any setting other than those defaults for windowBits and memLevel,
- * the value returned is a conservative worst case for the maximum expansion
- * resulting from using fixed blocks instead of stored blocks, which deflate
- * can emit on compressed data for some combinations of the parameters.
- *
- * This function could be more sophisticated to provide closer upper bounds
- * for every combination of windowBits and memLevel, as well as wrap.
- * But even the conservative upper bound of about 14% expansion does not
- * seem onerous for output buffer allocation.
- */
-uLong ZEXPORT deflateBound(strm, sourceLen)
-    z_streamp strm;
-    uLong sourceLen;
-{
-    deflate_state *s;
-    uLong destLen;
-
-    /* conservative upper bound */
-    destLen = sourceLen +
-              ((sourceLen + 7) >> 3) + ((sourceLen + 63) >> 6) + 11;
-
-    /* if can't get parameters, return conservative bound */
-    if (strm == Z_NULL || strm->state == Z_NULL)
-        return destLen;
-
-    /* if not default parameters, return conservative bound */
-    s = strm->state;
-    if (s->w_bits != 15 || s->hash_bits != 8 + 7)
-        return destLen;
-
-    /* default settings: return tight bound for that case */
-    return compressBound(sourceLen);
-}
-
-/* =========================================================================
- * Put a short in the pending buffer. The 16-bit value is put in MSB order.
- * IN assertion: the stream state is correct and there is enough room in
- * pending_buf.
- */
-local void putShortMSB (s, b)
-    deflate_state *s;
-    uInt b;
-{
-    put_byte(s, (Byte)(b >> 8));
-    put_byte(s, (Byte)(b & 0xff));
-}
-
-/* =========================================================================
- * Flush as much pending output as possible. All deflate() output goes
- * through this function so some applications may wish to modify it
- * to avoid allocating a large strm->next_out buffer and copying into it.
- * (See also read_buf()).
- */
-local void flush_pending(strm)
-    z_streamp strm;
-{
-    unsigned len = strm->state->pending;
-
-    if (len > strm->avail_out) len = strm->avail_out;
-    if (len == 0) return;
-
-    zmemcpy(strm->next_out, strm->state->pending_out, len);
-    strm->next_out  += len;
-    strm->state->pending_out  += len;
-    strm->total_out += len;
-    strm->avail_out  -= len;
-    strm->state->pending -= len;
-    if (strm->state->pending == 0) {
-        strm->state->pending_out = strm->state->pending_buf;
-    }
-}
-
-/* ========================================================================= */
-int ZEXPORT deflate (strm, flush)
-    z_streamp strm;
-    int flush;
-{
-    int old_flush; /* value of flush param for previous deflate call */
-    deflate_state *s;
-
-    if (strm == Z_NULL || strm->state == Z_NULL ||
-        flush > Z_FINISH || flush < 0) {
-        return Z_STREAM_ERROR;
-    }
-    s = strm->state;
-
-    if (strm->next_out == Z_NULL ||
-        (strm->next_in == Z_NULL && strm->avail_in != 0) ||
-        (s->status == FINISH_STATE && flush != Z_FINISH)) {
-        ERR_RETURN(strm, Z_STREAM_ERROR);
-    }
-    if (strm->avail_out == 0) ERR_RETURN(strm, Z_BUF_ERROR);
-
-    s->strm = strm; /* just in case */
-    old_flush = s->last_flush;
-    s->last_flush = flush;
-
-    /* Write the header */
-    if (s->status == INIT_STATE) {
-#ifdef GZIP
-        if (s->wrap == 2) {
-            strm->adler = crc32(0L, Z_NULL, 0);
-            put_byte(s, 31);
-            put_byte(s, 139);
-            put_byte(s, 8);
-            if (s->gzhead == NULL) {
-                put_byte(s, 0);
-                put_byte(s, 0);
-                put_byte(s, 0);
-                put_byte(s, 0);
-                put_byte(s, 0);
-                put_byte(s, s->level == 9 ? 2 :
-                            (s->strategy >= Z_HUFFMAN_ONLY || s->level < 2 ?
-                             4 : 0));
-                put_byte(s, OS_CODE);
-                s->status = BUSY_STATE;
-            }
-            else {
-                put_byte(s, (s->gzhead->text ? 1 : 0) +
-                            (s->gzhead->hcrc ? 2 : 0) +
-                            (s->gzhead->extra == Z_NULL ? 0 : 4) +
-                            (s->gzhead->name == Z_NULL ? 0 : 8) +
-                            (s->gzhead->comment == Z_NULL ? 0 : 16)
-                        );
-                put_byte(s, (Byte)(s->gzhead->time & 0xff));
-                put_byte(s, (Byte)((s->gzhead->time >> 8) & 0xff));
-                put_byte(s, (Byte)((s->gzhead->time >> 16) & 0xff));
-                put_byte(s, (Byte)((s->gzhead->time >> 24) & 0xff));
-                put_byte(s, s->level == 9 ? 2 :
-                            (s->strategy >= Z_HUFFMAN_ONLY || s->level < 2 ?
-                             4 : 0));
-                put_byte(s, s->gzhead->os & 0xff);
-                if (s->gzhead->extra != NULL) {
-                    put_byte(s, s->gzhead->extra_len & 0xff);
-                    put_byte(s, (s->gzhead->extra_len >> 8) & 0xff);
-                }
-                if (s->gzhead->hcrc)
-                    strm->adler = crc32(strm->adler, s->pending_buf,
-                                        s->pending);
-                s->gzindex = 0;
-                s->status = EXTRA_STATE;
-            }
-        }
-        else
-#endif
-        {
-            uInt header = (Z_DEFLATED + ((s->w_bits-8)<<4)) << 8;
-            uInt level_flags;
-
-            if (s->strategy >= Z_HUFFMAN_ONLY || s->level < 2)
-                level_flags = 0;
-            else if (s->level < 6)
-                level_flags = 1;
-            else if (s->level == 6)
-                level_flags = 2;
-            else
-                level_flags = 3;
-            header |= (level_flags << 6);
-            if (s->strstart != 0) header |= PRESET_DICT;
-            header += 31 - (header % 31);
-
-            s->status = BUSY_STATE;
-            putShortMSB(s, header);
-
-            /* Save the adler32 of the preset dictionary: */
-            if (s->strstart != 0) {
-                putShortMSB(s, (uInt)(strm->adler >> 16));
-                putShortMSB(s, (uInt)(strm->adler & 0xffff));
-            }
-            strm->adler = adler32(0L, Z_NULL, 0);
-        }
-    }
-#ifdef GZIP
-    if (s->status == EXTRA_STATE) {
-        if (s->gzhead->extra != NULL) {
-            uInt beg = s->pending;  /* start of bytes to update crc */
-
-            while (s->gzindex < (s->gzhead->extra_len & 0xffff)) {
-                if (s->pending == s->pending_buf_size) {
-                    if (s->gzhead->hcrc && s->pending > beg)
-                        strm->adler = crc32(strm->adler, s->pending_buf + beg,
-                                            s->pending - beg);
-                    flush_pending(strm);
-                    beg = s->pending;
-                    if (s->pending == s->pending_buf_size)
-                        break;
-                }
-                put_byte(s, s->gzhead->extra[s->gzindex]);
-                s->gzindex++;
-            }
-            if (s->gzhead->hcrc && s->pending > beg)
-                strm->adler = crc32(strm->adler, s->pending_buf + beg,
-                                    s->pending - beg);
-            if (s->gzindex == s->gzhead->extra_len) {
-                s->gzindex = 0;
-                s->status = NAME_STATE;
-            }
-        }
-        else
-            s->status = NAME_STATE;
-    }
-    if (s->status == NAME_STATE) {
-        if (s->gzhead->name != NULL) {
-            uInt beg = s->pending;  /* start of bytes to update crc */
-            int val;
-
-            do {
-                if (s->pending == s->pending_buf_size) {
-                    if (s->gzhead->hcrc && s->pending > beg)
-                        strm->adler = crc32(strm->adler, s->pending_buf + beg,
-                                            s->pending - beg);
-                    flush_pending(strm);
-                    beg = s->pending;
-                    if (s->pending == s->pending_buf_size) {
-                        val = 1;
-                        break;
-                    }
-                }
-                val = s->gzhead->name[s->gzindex++];
-                put_byte(s, val);
-            } while (val != 0);
-            if (s->gzhead->hcrc && s->pending > beg)
-                strm->adler = crc32(strm->adler, s->pending_buf + beg,
-                                    s->pending - beg);
-            if (val == 0) {
-                s->gzindex = 0;
-                s->status = COMMENT_STATE;
-            }
-        }
-        else
-            s->status = COMMENT_STATE;
-    }
-    if (s->status == COMMENT_STATE) {
-        if (s->gzhead->comment != NULL) {
-            uInt beg = s->pending;  /* start of bytes to update crc */
-            int val;
-
-            do {
-                if (s->pending == s->pending_buf_size) {
-                    if (s->gzhead->hcrc && s->pending > beg)
-                        strm->adler = crc32(strm->adler, s->pending_buf + beg,
-                                            s->pending - beg);
-                    flush_pending(strm);
-                    beg = s->pending;
-                    if (s->pending == s->pending_buf_size) {
-                        val = 1;
-                        break;
-                    }
-                }
-                val = s->gzhead->comment[s->gzindex++];
-                put_byte(s, val);
-            } while (val != 0);
-            if (s->gzhead->hcrc && s->pending > beg)
-                strm->adler = crc32(strm->adler, s->pending_buf + beg,
-                                    s->pending - beg);
-            if (val == 0)
-                s->status = HCRC_STATE;
-        }
-        else
-            s->status = HCRC_STATE;
-    }
-    if (s->status == HCRC_STATE) {
-        if (s->gzhead->hcrc) {
-            if (s->pending + 2 > s->pending_buf_size)
-                flush_pending(strm);
-            if (s->pending + 2 <= s->pending_buf_size) {
-                put_byte(s, (Byte)(strm->adler & 0xff));
-                put_byte(s, (Byte)((strm->adler >> 8) & 0xff));
-                strm->adler = crc32(0L, Z_NULL, 0);
-                s->status = BUSY_STATE;
-            }
-        }
-        else
-            s->status = BUSY_STATE;
-    }
-#endif
-
-    /* Flush as much pending output as possible */
-    if (s->pending != 0) {
-        flush_pending(strm);
-        if (strm->avail_out == 0) {
-            /* Since avail_out is 0, deflate will be called again with
-             * more output space, but possibly with both pending and
-             * avail_in equal to zero. There won't be anything to do,
-             * but this is not an error situation so make sure we
-             * return OK instead of BUF_ERROR at next call of deflate:
-             */
-            s->last_flush = -1;
-            return Z_OK;
-        }
-
-    /* Make sure there is something to do and avoid duplicate consecutive
-     * flushes. For repeated and useless calls with Z_FINISH, we keep
-     * returning Z_STREAM_END instead of Z_BUF_ERROR.
-     */
-    } else if (strm->avail_in == 0 && flush <= old_flush &&
-               flush != Z_FINISH) {
-        ERR_RETURN(strm, Z_BUF_ERROR);
-    }
-
-    /* User must not provide more input after the first FINISH: */
-    if (s->status == FINISH_STATE && strm->avail_in != 0) {
-        ERR_RETURN(strm, Z_BUF_ERROR);
-    }
-
-    /* Start a new block or continue the current one.
-     */
-    if (strm->avail_in != 0 || s->lookahead != 0 ||
-        (flush != Z_NO_FLUSH && s->status != FINISH_STATE)) {
-        block_state bstate;
-
-        bstate = (*(configuration_table[s->level].func))(s, flush);
-
-        if (bstate == finish_started || bstate == finish_done) {
-            s->status = FINISH_STATE;
-        }
-        if (bstate == need_more || bstate == finish_started) {
-            if (strm->avail_out == 0) {
-                s->last_flush = -1; /* avoid BUF_ERROR next call, see above */
-            }
-            return Z_OK;
-            /* If flush != Z_NO_FLUSH && avail_out == 0, the next call
-             * of deflate should use the same flush parameter to make sure
-             * that the flush is complete. So we don't have to output an
-             * empty block here, this will be done at next call. This also
-             * ensures that for a very small output buffer, we emit at most
-             * one empty block.
-             */
-        }
-        if (bstate == block_done) {
-            if (flush == Z_PARTIAL_FLUSH) {
-                _tr_align(s);
-            } else { /* FULL_FLUSH or SYNC_FLUSH */
-                _tr_stored_block(s, (char*)0, 0L, 0);
-                /* For a full flush, this empty block will be recognized
-                 * as a special marker by inflate_sync().
-                 */
-                if (flush == Z_FULL_FLUSH) {
-                    CLEAR_HASH(s);             /* forget history */
-                }
-            }
-            flush_pending(strm);
-            if (strm->avail_out == 0) {
-              s->last_flush = -1; /* avoid BUF_ERROR at next call, see above */
-              return Z_OK;
-            }
-        }
-    }
-    Assert(strm->avail_out > 0, "bug2");
-
-    if (flush != Z_FINISH) return Z_OK;
-    if (s->wrap <= 0) return Z_STREAM_END;
-
-    /* Write the trailer */
-#ifdef GZIP
-    if (s->wrap == 2) {
-        put_byte(s, (Byte)(strm->adler & 0xff));
-        put_byte(s, (Byte)((strm->adler >> 8) & 0xff));
-        put_byte(s, (Byte)((strm->adler >> 16) & 0xff));
-        put_byte(s, (Byte)((strm->adler >> 24) & 0xff));
-        put_byte(s, (Byte)(strm->total_in & 0xff));
-        put_byte(s, (Byte)((strm->total_in >> 8) & 0xff));
-        put_byte(s, (Byte)((strm->total_in >> 16) & 0xff));
-        put_byte(s, (Byte)((strm->total_in >> 24) & 0xff));
-    }
-    else
-#endif
-    {
-        putShortMSB(s, (uInt)(strm->adler >> 16));
-        putShortMSB(s, (uInt)(strm->adler & 0xffff));
-    }
-    flush_pending(strm);
-    /* If avail_out is zero, the application will call deflate again
-     * to flush the rest.
-     */
-    if (s->wrap > 0) s->wrap = -s->wrap; /* write the trailer only once! */
-    return s->pending != 0 ? Z_OK : Z_STREAM_END;
-}
-
-/* ========================================================================= */
-int ZEXPORT deflateEnd (strm)
-    z_streamp strm;
-{
-    int status;
-
-    if (strm == Z_NULL || strm->state == Z_NULL) return Z_STREAM_ERROR;
-
-    status = strm->state->status;
-    if (status != INIT_STATE &&
-        status != EXTRA_STATE &&
-        status != NAME_STATE &&
-        status != COMMENT_STATE &&
-        status != HCRC_STATE &&
-        status != BUSY_STATE &&
-        status != FINISH_STATE) {
-      return Z_STREAM_ERROR;
-    }
-
-    /* Deallocate in reverse order of allocations: */
-    TRY_FREE(strm, strm->state->pending_buf);
-    TRY_FREE(strm, strm->state->head);
-    TRY_FREE(strm, strm->state->prev);
-    TRY_FREE(strm, strm->state->window);
-
-    ZFREE(strm, strm->state);
-    strm->state = Z_NULL;
-
-    return status == BUSY_STATE ? Z_DATA_ERROR : Z_OK;
-}
-
-/* =========================================================================
- * Copy the source state to the destination state.
- * To simplify the source, this is not supported for 16-bit MSDOS (which
- * doesn't have enough memory anyway to duplicate compression states).
- */
-int ZEXPORT deflateCopy (dest, source)
-    z_streamp dest;
-    z_streamp source;
-{
-#ifdef MAXSEG_64K
-    return Z_STREAM_ERROR;
-#else
-    deflate_state *ds;
-    deflate_state *ss;
-    ushf *overlay;
-
-
-    if (source == Z_NULL || dest == Z_NULL || source->state == Z_NULL) {
-        return Z_STREAM_ERROR;
-    }
-
-    ss = source->state;
-
-    zmemcpy(dest, source, sizeof(z_stream));
-
-    ds = (deflate_state *) ZALLOC(dest, 1, sizeof(deflate_state));
-    if (ds == Z_NULL) return Z_MEM_ERROR;
-    dest->state = (struct internal_state FAR *) ds;
-    zmemcpy(ds, ss, sizeof(deflate_state));
-    ds->strm = dest;
-
-    ds->window = (Bytef *) ZALLOC(dest, ds->w_size, 2*sizeof(Byte));
-    ds->prev   = (Posf *)  ZALLOC(dest, ds->w_size, sizeof(Pos));
-    ds->head   = (Posf *)  ZALLOC(dest, ds->hash_size, sizeof(Pos));
-    overlay = (ushf *) ZALLOC(dest, ds->lit_bufsize, sizeof(ush)+2);
-    ds->pending_buf = (uchf *) overlay;
-
-    if (ds->window == Z_NULL || ds->prev == Z_NULL || ds->head == Z_NULL ||
-        ds->pending_buf == Z_NULL) {
-        deflateEnd (dest);
-        return Z_MEM_ERROR;
-    }
-    /* following zmemcpy do not work for 16-bit MSDOS */
-    zmemcpy(ds->window, ss->window, ds->w_size * 2 * sizeof(Byte));
-    zmemcpy(ds->prev, ss->prev, ds->w_size * sizeof(Pos));
-    zmemcpy(ds->head, ss->head, ds->hash_size * sizeof(Pos));
-    zmemcpy(ds->pending_buf, ss->pending_buf, (uInt)ds->pending_buf_size);
-
-    ds->pending_out = ds->pending_buf + (ss->pending_out - ss->pending_buf);
-    ds->d_buf = overlay + ds->lit_bufsize/sizeof(ush);
-    ds->l_buf = ds->pending_buf + (1+sizeof(ush))*ds->lit_bufsize;
-
-    ds->l_desc.dyn_tree = ds->dyn_ltree;
-    ds->d_desc.dyn_tree = ds->dyn_dtree;
-    ds->bl_desc.dyn_tree = ds->bl_tree;
-
-    return Z_OK;
-#endif /* MAXSEG_64K */
-}
-
-/* ===========================================================================
- * Read a new buffer from the current input stream, update the adler32
- * and total number of bytes read.  All deflate() input goes through
- * this function so some applications may wish to modify it to avoid
- * allocating a large strm->next_in buffer and copying from it.
- * (See also flush_pending()).
- */
-local int read_buf(strm, buf, size)
-    z_streamp strm;
-    Bytef *buf;
-    unsigned size;
-{
-    unsigned len = strm->avail_in;
-
-    if (len > size) len = size;
-    if (len == 0) return 0;
-
-    strm->avail_in  -= len;
-
-    if (strm->state->wrap == 1) {
-        strm->adler = adler32(strm->adler, strm->next_in, len);
-    }
-#ifdef GZIP
-    else if (strm->state->wrap == 2) {
-        strm->adler = crc32(strm->adler, strm->next_in, len);
-    }
-#endif
-    zmemcpy(buf, strm->next_in, len);
-    strm->next_in  += len;
-    strm->total_in += len;
-
-    return (int)len;
-}
-
-/* ===========================================================================
- * Initialize the "longest match" routines for a new zlib stream
- */
-local void lm_init (s)
-    deflate_state *s;
-{
-    s->window_size = (ulg)2L*s->w_size;
-
-    CLEAR_HASH(s);
-
-    /* Set the default configuration parameters:
-     */
-    s->max_lazy_match   = configuration_table[s->level].max_lazy;
-    s->good_match       = configuration_table[s->level].good_length;
-    s->nice_match       = configuration_table[s->level].nice_length;
-    s->max_chain_length = configuration_table[s->level].max_chain;
-
-    s->strstart = 0;
-    s->block_start = 0L;
-    s->lookahead = 0;
-    s->match_length = s->prev_length = MIN_MATCH-1;
-    s->match_available = 0;
-    s->ins_h = 0;
-#ifndef FASTEST
-#ifdef ASMV
-    match_init(); /* initialize the asm code */
-#endif
-#endif
-}
-
-#ifndef FASTEST
-/* ===========================================================================
- * Set match_start to the longest match starting at the given string and
- * return its length. Matches shorter or equal to prev_length are discarded,
- * in which case the result is equal to prev_length and match_start is
- * garbage.
- * IN assertions: cur_match is the head of the hash chain for the current
- *   string (strstart) and its distance is <= MAX_DIST, and prev_length >= 1
- * OUT assertion: the match length is not greater than s->lookahead.
- */
-#ifndef ASMV
-/* For 80x86 and 680x0, an optimized version will be provided in match.asm or
- * match.S. The code will be functionally equivalent.
- */
-local uInt longest_match(s, cur_match)
-    deflate_state *s;
-    IPos cur_match;                             /* current match */
-{
-    unsigned chain_length = s->max_chain_length;/* max hash chain length */
-    register Bytef *scan = s->window + s->strstart; /* current string */
-    register Bytef *match;                       /* matched string */
-    register int len;                           /* length of current match */
-    int best_len = s->prev_length;              /* best match length so far */
-    int nice_match = s->nice_match;             /* stop if match long enough */
-    IPos limit = s->strstart > (IPos)MAX_DIST(s) ?
-        s->strstart - (IPos)MAX_DIST(s) : NIL;
-    /* Stop when cur_match becomes <= limit. To simplify the code,
-     * we prevent matches with the string of window index 0.
-     */
-    Posf *prev = s->prev;
-    uInt wmask = s->w_mask;
-
-#ifdef UNALIGNED_OK
-    /* Compare two bytes at a time. Note: this is not always beneficial.
-     * Try with and without -DUNALIGNED_OK to check.
-     */
-    register Bytef *strend = s->window + s->strstart + MAX_MATCH - 1;
-    register ush scan_start = *(ushf*)scan;
-    register ush scan_end   = *(ushf*)(scan+best_len-1);
-#else
-    register Bytef *strend = s->window + s->strstart + MAX_MATCH;
-    register Byte scan_end1  = scan[best_len-1];
-    register Byte scan_end   = scan[best_len];
-#endif
-
-    /* The code is optimized for HASH_BITS >= 8 and MAX_MATCH-2 multiple of 16.
-     * It is easy to get rid of this optimization if necessary.
-     */
-    Assert(s->hash_bits >= 8 && MAX_MATCH == 258, "Code too clever");
-
-    /* Do not waste too much time if we already have a good match: */
-    if (s->prev_length >= s->good_match) {
-        chain_length >>= 2;
-    }
-    /* Do not look for matches beyond the end of the input. This is necessary
-     * to make deflate deterministic.
-     */
-    if ((uInt)nice_match > s->lookahead) nice_match = s->lookahead;
-
-    Assert((ulg)s->strstart <= s->window_size-MIN_LOOKAHEAD, "need lookahead");
-
-    do {
-        Assert(cur_match < s->strstart, "no future");
-        match = s->window + cur_match;
-
-        /* Skip to next match if the match length cannot increase
-         * or if the match length is less than 2.  Note that the checks below
-         * for insufficient lookahead only occur occasionally for performance
-         * reasons.  Therefore uninitialized memory will be accessed, and
-         * conditional jumps will be made that depend on those values.
-         * However the length of the match is limited to the lookahead, so
-         * the output of deflate is not affected by the uninitialized values.
-         */
-#if (defined(UNALIGNED_OK) && MAX_MATCH == 258)
-        /* This code assumes sizeof(unsigned short) == 2. Do not use
-         * UNALIGNED_OK if your compiler uses a different size.
-         */
-        if (*(ushf*)(match+best_len-1) != scan_end ||
-            *(ushf*)match != scan_start) continue;
-
-        /* It is not necessary to compare scan[2] and match[2] since they are
-         * always equal when the other bytes match, given that the hash keys
-         * are equal and that HASH_BITS >= 8. Compare 2 bytes at a time at
-         * strstart+3, +5, ... up to strstart+257. We check for insufficient
-         * lookahead only every 4th comparison; the 128th check will be made
-         * at strstart+257. If MAX_MATCH-2 is not a multiple of 8, it is
-         * necessary to put more guard bytes at the end of the window, or
-         * to check more often for insufficient lookahead.
-         */
-        Assert(scan[2] == match[2], "scan[2]?");
-        scan++, match++;
-        do {
-        } while (*(ushf*)(scan+=2) == *(ushf*)(match+=2) &&
-                 *(ushf*)(scan+=2) == *(ushf*)(match+=2) &&
-                 *(ushf*)(scan+=2) == *(ushf*)(match+=2) &&
-                 *(ushf*)(scan+=2) == *(ushf*)(match+=2) &&
-                 scan < strend);
-        /* The funny "do {}" generates better code on most compilers */
-
-        /* Here, scan <= window+strstart+257 */
-        Assert(scan <= s->window+(unsigned)(s->window_size-1), "wild scan");
-        if (*scan == *match) scan++;
-
-        len = (MAX_MATCH - 1) - (int)(strend-scan);
-        scan = strend - (MAX_MATCH-1);
-
-#else /* UNALIGNED_OK */
-
-        if (match[best_len]   != scan_end  ||
-            match[best_len-1] != scan_end1 ||
-            *match            != *scan     ||
-            *++match          != scan[1])      continue;
-
-        /* The check at best_len-1 can be removed because it will be made
-         * again later. (This heuristic is not always a win.)
-         * It is not necessary to compare scan[2] and match[2] since they
-         * are always equal when the other bytes match, given that
-         * the hash keys are equal and that HASH_BITS >= 8.
-         */
-        scan += 2, match++;
-        Assert(*scan == *match, "match[2]?");
-
-        /* We check for insufficient lookahead only every 8th comparison;
-         * the 256th check will be made at strstart+258.
-         */
-        do {
-        } while (*++scan == *++match && *++scan == *++match &&
-                 *++scan == *++match && *++scan == *++match &&
-                 *++scan == *++match && *++scan == *++match &&
-                 *++scan == *++match && *++scan == *++match &&
-                 scan < strend);
-
-        Assert(scan <= s->window+(unsigned)(s->window_size-1), "wild scan");
-
-        len = MAX_MATCH - (int)(strend - scan);
-        scan = strend - MAX_MATCH;
-
-#endif /* UNALIGNED_OK */
-
-        if (len > best_len) {
-            s->match_start = cur_match;
-            best_len = len;
-            if (len >= nice_match) break;
-#ifdef UNALIGNED_OK
-            scan_end = *(ushf*)(scan+best_len-1);
-#else
-            scan_end1  = scan[best_len-1];
-            scan_end   = scan[best_len];
-#endif
-        }
-    } while ((cur_match = prev[cur_match & wmask]) > limit
-             && --chain_length != 0);
-
-    if ((uInt)best_len <= s->lookahead) return (uInt)best_len;
-    return s->lookahead;
-}
-#endif /* ASMV */
-#endif /* FASTEST */
-
-/* ---------------------------------------------------------------------------
- * Optimized version for level == 1 or strategy == Z_RLE only
- */
-local uInt longest_match_fast(s, cur_match)
-    deflate_state *s;
-    IPos cur_match;                             /* current match */
-{
-    register Bytef *scan = s->window + s->strstart; /* current string */
-    register Bytef *match;                       /* matched string */
-    register int len;                           /* length of current match */
-    register Bytef *strend = s->window + s->strstart + MAX_MATCH;
-
-    /* The code is optimized for HASH_BITS >= 8 and MAX_MATCH-2 multiple of 16.
-     * It is easy to get rid of this optimization if necessary.
-     */
-    Assert(s->hash_bits >= 8 && MAX_MATCH == 258, "Code too clever");
-
-    Assert((ulg)s->strstart <= s->window_size-MIN_LOOKAHEAD, "need lookahead");
-
-    Assert(cur_match < s->strstart, "no future");
-
-    match = s->window + cur_match;
-
-    /* Return failure if the match length is less than 2:
-     */
-    if (match[0] != scan[0] || match[1] != scan[1]) return MIN_MATCH-1;
-
-    /* The check at best_len-1 can be removed because it will be made
-     * again later. (This heuristic is not always a win.)
-     * It is not necessary to compare scan[2] and match[2] since they
-     * are always equal when the other bytes match, given that
-     * the hash keys are equal and that HASH_BITS >= 8.
-     */
-    scan += 2, match += 2;
-    Assert(*scan == *match, "match[2]?");
-
-    /* We check for insufficient lookahead only every 8th comparison;
-     * the 256th check will be made at strstart+258.
-     */
-    do {
-    } while (*++scan == *++match && *++scan == *++match &&
-             *++scan == *++match && *++scan == *++match &&
-             *++scan == *++match && *++scan == *++match &&
-             *++scan == *++match && *++scan == *++match &&
-             scan < strend);
-
-    Assert(scan <= s->window+(unsigned)(s->window_size-1), "wild scan");
-
-    len = MAX_MATCH - (int)(strend - scan);
-
-    if (len < MIN_MATCH) return MIN_MATCH - 1;
-
-    s->match_start = cur_match;
-    return (uInt)len <= s->lookahead ? (uInt)len : s->lookahead;
-}
-
-#ifdef DEBUG
-/* ===========================================================================
- * Check that the match at match_start is indeed a match.
- */
-local void check_match(s, start, match, length)
-    deflate_state *s;
-    IPos start, match;
-    int length;
-{
-    /* check that the match is indeed a match */
-    if (zmemcmp(s->window + match,
-                s->window + start, length) != EQUAL) {
-        fprintf(stderr, " start %u, match %u, length %d\n",
-                start, match, length);
-        do {
-            fprintf(stderr, "%c%c", s->window[match++], s->window[start++]);
-        } while (--length != 0);
-        z_error("invalid match");
-    }
-    if (z_verbose > 1) {
-        fprintf(stderr,"\\[%d,%d]", start-match, length);
-        do { putc(s->window[start++], stderr); } while (--length != 0);
-    }
-}
-#else
-#  define check_match(s, start, match, length)
-#endif /* DEBUG */
-
-/* ===========================================================================
- * Fill the window when the lookahead becomes insufficient.
- * Updates strstart and lookahead.
- *
- * IN assertion: lookahead < MIN_LOOKAHEAD
- * OUT assertions: strstart <= window_size-MIN_LOOKAHEAD
- *    At least one byte has been read, or avail_in == 0; reads are
- *    performed for at least two bytes (required for the zip translate_eol
- *    option -- not supported here).
- */
-local void fill_window(s)
-    deflate_state *s;
-{
-    register unsigned n, m;
-    register Posf *p;
-    unsigned more;    /* Amount of free space at the end of the window. */
-    uInt wsize = s->w_size;
-
-    do {
-        more = (unsigned)(s->window_size -(ulg)s->lookahead -(ulg)s->strstart);
-
-        /* Deal with !@#$% 64K limit: */
-        if (sizeof(int) <= 2) {
-            if (more == 0 && s->strstart == 0 && s->lookahead == 0) {
-                more = wsize;
-
-            } else if (more == (unsigned)(-1)) {
-                /* Very unlikely, but possible on 16 bit machine if
-                 * strstart == 0 && lookahead == 1 (input done a byte at time)
-                 */
-                more--;
-            }
-        }
-
-        /* If the window is almost full and there is insufficient lookahead,
-         * move the upper half to the lower one to make room in the upper half.
-         */
-        if (s->strstart >= wsize+MAX_DIST(s)) {
-
-            zmemcpy(s->window, s->window+wsize, (unsigned)wsize);
-            s->match_start -= wsize;
-            s->strstart    -= wsize; /* we now have strstart >= MAX_DIST */
-            s->block_start -= (long) wsize;
-
-            /* Slide the hash table (could be avoided with 32 bit values
-               at the expense of memory usage). We slide even when level == 0
-               to keep the hash table consistent if we switch back to level > 0
-               later. (Using level 0 permanently is not an optimal usage of
-               zlib, so we don't care about this pathological case.)
-             */
-            /* %%% avoid this when Z_RLE */
-            n = s->hash_size;
-            p = &s->head[n];
-            do {
-                m = *--p;
-                *p = (Pos)(m >= wsize ? m-wsize : NIL);
-            } while (--n);
-
-            n = wsize;
-#ifndef FASTEST
-            p = &s->prev[n];
-            do {
-                m = *--p;
-                *p = (Pos)(m >= wsize ? m-wsize : NIL);
-                /* If n is not on any hash chain, prev[n] is garbage but
-                 * its value will never be used.
-                 */
-            } while (--n);
-#endif
-            more += wsize;
-        }
-        if (s->strm->avail_in == 0) return;
-
-        /* If there was no sliding:
-         *    strstart <= WSIZE+MAX_DIST-1 && lookahead <= MIN_LOOKAHEAD - 1 &&
-         *    more == window_size - lookahead - strstart
-         * => more >= window_size - (MIN_LOOKAHEAD-1 + WSIZE + MAX_DIST-1)
-         * => more >= window_size - 2*WSIZE + 2
-         * In the BIG_MEM or MMAP case (not yet supported),
-         *   window_size == input_size + MIN_LOOKAHEAD  &&
-         *   strstart + s->lookahead <= input_size => more >= MIN_LOOKAHEAD.
-         * Otherwise, window_size == 2*WSIZE so more >= 2.
-         * If there was sliding, more >= WSIZE. So in all cases, more >= 2.
-         */
-        Assert(more >= 2, "more < 2");
-
-        n = read_buf(s->strm, s->window + s->strstart + s->lookahead, more);
-        s->lookahead += n;
-
-        /* Initialize the hash value now that we have some input: */
-        if (s->lookahead >= MIN_MATCH) {
-            s->ins_h = s->window[s->strstart];
-            UPDATE_HASH(s, s->ins_h, s->window[s->strstart+1]);
-#if MIN_MATCH != 3
-            Call UPDATE_HASH() MIN_MATCH-3 more times
-#endif
-        }
-        /* If the whole input has less than MIN_MATCH bytes, ins_h is garbage,
-         * but this is not important since only literal bytes will be emitted.
-         */
-
-    } while (s->lookahead < MIN_LOOKAHEAD && s->strm->avail_in != 0);
-}
-
-/* ===========================================================================
- * Flush the current block, with given end-of-file flag.
- * IN assertion: strstart is set to the end of the current match.
- */
-#define FLUSH_BLOCK_ONLY(s, eof) { \
-   _tr_flush_block(s, (s->block_start >= 0L ? \
-                   (charf *)&s->window[(unsigned)s->block_start] : \
-                   (charf *)Z_NULL), \
-                (ulg)((long)s->strstart - s->block_start), \
-                (eof)); \
-   s->block_start = s->strstart; \
-   flush_pending(s->strm); \
-   Tracev((stderr,"[FLUSH]")); \
-}
-
-/* Same but force premature exit if necessary. */
-#define FLUSH_BLOCK(s, eof) { \
-   FLUSH_BLOCK_ONLY(s, eof); \
-   if (s->strm->avail_out == 0) return (eof) ? finish_started : need_more; \
-}
-
-/* ===========================================================================
- * Copy without compression as much as possible from the input stream, return
- * the current block state.
- * This function does not insert new strings in the dictionary since
- * uncompressible data is probably not useful. This function is used
- * only for the level=0 compression option.
- * NOTE: this function should be optimized to avoid extra copying from
- * window to pending_buf.
- */
-local block_state deflate_stored(s, flush)
-    deflate_state *s;
-    int flush;
-{
-    /* Stored blocks are limited to 0xffff bytes, pending_buf is limited
-     * to pending_buf_size, and each stored block has a 5 byte header:
-     */
-    ulg max_block_size = 0xffff;
-    ulg max_start;
-
-    if (max_block_size > s->pending_buf_size - 5) {
-        max_block_size = s->pending_buf_size - 5;
-    }
-
-    /* Copy as much as possible from input to output: */
-    for (;;) {
-        /* Fill the window as much as possible: */
-        if (s->lookahead <= 1) {
-
-            Assert(s->strstart < s->w_size+MAX_DIST(s) ||
-                   s->block_start >= (long)s->w_size, "slide too late");
-
-            fill_window(s);
-            if (s->lookahead == 0 && flush == Z_NO_FLUSH) return need_more;
-
-            if (s->lookahead == 0) break; /* flush the current block */
-        }
-        Assert(s->block_start >= 0L, "block gone");
-
-        s->strstart += s->lookahead;
-        s->lookahead = 0;
-
-        /* Emit a stored block if pending_buf will be full: */
-        max_start = s->block_start + max_block_size;
-        if (s->strstart == 0 || (ulg)s->strstart >= max_start) {
-            /* strstart == 0 is possible when wraparound on 16-bit machine */
-            s->lookahead = (uInt)(s->strstart - max_start);
-            s->strstart = (uInt)max_start;
-            FLUSH_BLOCK(s, 0);
-        }
-        /* Flush if we may have to slide, otherwise block_start may become
-         * negative and the data will be gone:
-         */
-        if (s->strstart - (uInt)s->block_start >= MAX_DIST(s)) {
-            FLUSH_BLOCK(s, 0);
-        }
-    }
-    FLUSH_BLOCK(s, flush == Z_FINISH);
-    return flush == Z_FINISH ? finish_done : block_done;
-}
-
-/* ===========================================================================
- * Compress as much as possible from the input stream, return the current
- * block state.
- * This function does not perform lazy evaluation of matches and inserts
- * new strings in the dictionary only for unmatched strings or for short
- * matches. It is used only for the fast compression options.
- */
-local block_state deflate_fast(s, flush)
-    deflate_state *s;
-    int flush;
-{
-    IPos hash_head = NIL; /* head of the hash chain */
-    int bflush;           /* set if current block must be flushed */
-
-    for (;;) {
-        /* Make sure that we always have enough lookahead, except
-         * at the end of the input file. We need MAX_MATCH bytes
-         * for the next match, plus MIN_MATCH bytes to insert the
-         * string following the next match.
-         */
-        if (s->lookahead < MIN_LOOKAHEAD) {
-            fill_window(s);
-            if (s->lookahead < MIN_LOOKAHEAD && flush == Z_NO_FLUSH) {
-                return need_more;
-            }
-            if (s->lookahead == 0) break; /* flush the current block */
-        }
-
-        /* Insert the string window[strstart .. strstart+2] in the
-         * dictionary, and set hash_head to the head of the hash chain:
-         */
-        if (s->lookahead >= MIN_MATCH) {
-            INSERT_STRING(s, s->strstart, hash_head);
-        }
-
-        /* Find the longest match, discarding those <= prev_length.
-         * At this point we have always match_length < MIN_MATCH
-         */
-        if (hash_head != NIL && s->strstart - hash_head <= MAX_DIST(s)) {
-            /* To simplify the code, we prevent matches with the string
-             * of window index 0 (in particular we have to avoid a match
-             * of the string with itself at the start of the input file).
-             */
-#ifdef FASTEST
-            if ((s->strategy != Z_HUFFMAN_ONLY && s->strategy != Z_RLE) ||
-                (s->strategy == Z_RLE && s->strstart - hash_head == 1)) {
-                s->match_length = longest_match_fast (s, hash_head);
-            }
-#else
-            if (s->strategy != Z_HUFFMAN_ONLY && s->strategy != Z_RLE) {
-                s->match_length = longest_match (s, hash_head);
-            } else if (s->strategy == Z_RLE && s->strstart - hash_head == 1) {
-                s->match_length = longest_match_fast (s, hash_head);
-            }
-#endif
-            /* longest_match() or longest_match_fast() sets match_start */
-        }
-        if (s->match_length >= MIN_MATCH) {
-            check_match(s, s->strstart, s->match_start, s->match_length);
-
-            _tr_tally_dist(s, s->strstart - s->match_start,
-                           s->match_length - MIN_MATCH, bflush);
-
-            s->lookahead -= s->match_length;
-
-            /* Insert new strings in the hash table only if the match length
-             * is not too large. This saves time but degrades compression.
-             */
-#ifndef FASTEST
-            if (s->match_length <= s->max_insert_length &&
-                s->lookahead >= MIN_MATCH) {
-                s->match_length--; /* string at strstart already in table */
-                do {
-                    s->strstart++;
-                    INSERT_STRING(s, s->strstart, hash_head);
-                    /* strstart never exceeds WSIZE-MAX_MATCH, so there are
-                     * always MIN_MATCH bytes ahead.
-                     */
-                } while (--s->match_length != 0);
-                s->strstart++;
-            } else
-#endif
-            {
-                s->strstart += s->match_length;
-                s->match_length = 0;
-                s->ins_h = s->window[s->strstart];
-                UPDATE_HASH(s, s->ins_h, s->window[s->strstart+1]);
-#if MIN_MATCH != 3
-                Call UPDATE_HASH() MIN_MATCH-3 more times
-#endif
-                /* If lookahead < MIN_MATCH, ins_h is garbage, but it does not
-                 * matter since it will be recomputed at next deflate call.
-                 */
-            }
-        } else {
-            /* No match, output a literal byte */
-            Tracevv((stderr,"%c", s->window[s->strstart]));
-            _tr_tally_lit (s, s->window[s->strstart], bflush);
-            s->lookahead--;
-            s->strstart++;
-        }
-        if (bflush) FLUSH_BLOCK(s, 0);
-    }
-    FLUSH_BLOCK(s, flush == Z_FINISH);
-    return flush == Z_FINISH ? finish_done : block_done;
-}
-
-#ifndef FASTEST
-/* ===========================================================================
- * Same as above, but achieves better compression. We use a lazy
- * evaluation for matches: a match is finally adopted only if there is
- * no better match at the next window position.
- */
-local block_state deflate_slow(s, flush)
-    deflate_state *s;
-    int flush;
-{
-    IPos hash_head = NIL;    /* head of hash chain */
-    int bflush;              /* set if current block must be flushed */
-
-    /* Process the input block. */
-    for (;;) {
-        /* Make sure that we always have enough lookahead, except
-         * at the end of the input file. We need MAX_MATCH bytes
-         * for the next match, plus MIN_MATCH bytes to insert the
-         * string following the next match.
-         */
-        if (s->lookahead < MIN_LOOKAHEAD) {
-            fill_window(s);
-            if (s->lookahead < MIN_LOOKAHEAD && flush == Z_NO_FLUSH) {
-                return need_more;
-            }
-            if (s->lookahead == 0) break; /* flush the current block */
-        }
-
-        /* Insert the string window[strstart .. strstart+2] in the
-         * dictionary, and set hash_head to the head of the hash chain:
-         */
-        if (s->lookahead >= MIN_MATCH) {
-            INSERT_STRING(s, s->strstart, hash_head);
-        }
-
-        /* Find the longest match, discarding those <= prev_length.
-         */
-        s->prev_length = s->match_length, s->prev_match = s->match_start;
-        s->match_length = MIN_MATCH-1;
-
-        if (hash_head != NIL && s->prev_length < s->max_lazy_match &&
-            s->strstart - hash_head <= MAX_DIST(s)) {
-            /* To simplify the code, we prevent matches with the string
-             * of window index 0 (in particular we have to avoid a match
-             * of the string with itself at the start of the input file).
-             */
-            if (s->strategy != Z_HUFFMAN_ONLY && s->strategy != Z_RLE) {
-                s->match_length = longest_match (s, hash_head);
-            } else if (s->strategy == Z_RLE && s->strstart - hash_head == 1) {
-                s->match_length = longest_match_fast (s, hash_head);
-            }
-            /* longest_match() or longest_match_fast() sets match_start */
-
-            if (s->match_length <= 5 && (s->strategy == Z_FILTERED
-#if TOO_FAR <= 32767
-                || (s->match_length == MIN_MATCH &&
-                    s->strstart - s->match_start > TOO_FAR)
-#endif
-                )) {
-
-                /* If prev_match is also MIN_MATCH, match_start is garbage
-                 * but we will ignore the current match anyway.
-                 */
-                s->match_length = MIN_MATCH-1;
-            }
-        }
-        /* If there was a match at the previous step and the current
-         * match is not better, output the previous match:
-         */
-        if (s->prev_length >= MIN_MATCH && s->match_length <= s->prev_length) {
-            uInt max_insert = s->strstart + s->lookahead - MIN_MATCH;
-            /* Do not insert strings in hash table beyond this. */
-
-            check_match(s, s->strstart-1, s->prev_match, s->prev_length);
-
-            _tr_tally_dist(s, s->strstart -1 - s->prev_match,
-                           s->prev_length - MIN_MATCH, bflush);
-
-            /* Insert in hash table all strings up to the end of the match.
-             * strstart-1 and strstart are already inserted. If there is not
-             * enough lookahead, the last two strings are not inserted in
-             * the hash table.
-             */
-            s->lookahead -= s->prev_length-1;
-            s->prev_length -= 2;
-            do {
-                if (++s->strstart <= max_insert) {
-                    INSERT_STRING(s, s->strstart, hash_head);
-                }
-            } while (--s->prev_length != 0);
-            s->match_available = 0;
-            s->match_length = MIN_MATCH-1;
-            s->strstart++;
-
-            if (bflush) FLUSH_BLOCK(s, 0);
-
-        } else if (s->match_available) {
-            /* If there was no match at the previous position, output a
-             * single literal. If there was a match but the current match
-             * is longer, truncate the previous match to a single literal.
-             */
-            Tracevv((stderr,"%c", s->window[s->strstart-1]));
-            _tr_tally_lit(s, s->window[s->strstart-1], bflush);
-            if (bflush) {
-                FLUSH_BLOCK_ONLY(s, 0);
-            }
-            s->strstart++;
-            s->lookahead--;
-            if (s->strm->avail_out == 0) return need_more;
-        } else {
-            /* There is no previous match to compare with, wait for
-             * the next step to decide.
-             */
-            s->match_available = 1;
-            s->strstart++;
-            s->lookahead--;
-        }
-    }
-    Assert (flush != Z_NO_FLUSH, "no flush?");
-    if (s->match_available) {
-        Tracevv((stderr,"%c", s->window[s->strstart-1]));
-        _tr_tally_lit(s, s->window[s->strstart-1], bflush);
-        s->match_available = 0;
-    }
-    FLUSH_BLOCK(s, flush == Z_FINISH);
-    return flush == Z_FINISH ? finish_done : block_done;
-}
-#endif /* FASTEST */
-
-#if 0
-/* ===========================================================================
- * For Z_RLE, simply look for runs of bytes, generate matches only of distance
- * one.  Do not maintain a hash table.  (It will be regenerated if this run of
- * deflate switches away from Z_RLE.)
- */
-local block_state deflate_rle(s, flush)
-    deflate_state *s;
-    int flush;
-{
-    int bflush;         /* set if current block must be flushed */
-    uInt run;           /* length of run */
-    uInt max;           /* maximum length of run */
-    uInt prev;          /* byte at distance one to match */
-    Bytef *scan;        /* scan for end of run */
-
-    for (;;) {
-        /* Make sure that we always have enough lookahead, except
-         * at the end of the input file. We need MAX_MATCH bytes
-         * for the longest encodable run.
-         */
-        if (s->lookahead < MAX_MATCH) {
-            fill_window(s);
-            if (s->lookahead < MAX_MATCH && flush == Z_NO_FLUSH) {
-                return need_more;
-            }
-            if (s->lookahead == 0) break; /* flush the current block */
-        }
-
-        /* See how many times the previous byte repeats */
-        run = 0;
-        if (s->strstart > 0) {      /* if there is a previous byte, that is */
-            max = s->lookahead < MAX_MATCH ? s->lookahead : MAX_MATCH;
-            scan = s->window + s->strstart - 1;
-            prev = *scan++;
-            do {
-                if (*scan++ != prev)
-                    break;
-            } while (++run < max);
-        }
-
-        /* Emit match if have run of MIN_MATCH or longer, else emit literal */
-        if (run >= MIN_MATCH) {
-            check_match(s, s->strstart, s->strstart - 1, run);
-            _tr_tally_dist(s, 1, run - MIN_MATCH, bflush);
-            s->lookahead -= run;
-            s->strstart += run;
-        } else {
-            /* No match, output a literal byte */
-            Tracevv((stderr,"%c", s->window[s->strstart]));
-            _tr_tally_lit (s, s->window[s->strstart], bflush);
-            s->lookahead--;
-            s->strstart++;
-        }
-        if (bflush) FLUSH_BLOCK(s, 0);
-    }
-    FLUSH_BLOCK(s, flush == Z_FINISH);
-    return flush == Z_FINISH ? finish_done : block_done;
-}
-#endif
Index: trunk/minix/lib/zlib-1.2.3/deflate.h
===================================================================
--- trunk/minix/lib/zlib-1.2.3/deflate.h	(revision 9)
+++ 	(revision )
@@ -1,331 +1,0 @@
-/* deflate.h -- internal compression state
- * Copyright (C) 1995-2004 Jean-loup Gailly
- * For conditions of distribution and use, see copyright notice in zlib.h
- */
-
-/* WARNING: this file should *not* be used by applications. It is
-   part of the implementation of the compression library and is
-   subject to change. Applications should only use zlib.h.
- */
-
-/* @(#) $Id: deflate.h,v 1.1 2005/09/23 22:39:00 beng Exp $ */
-
-#ifndef DEFLATE_H
-#define DEFLATE_H
-
-#include "zutil.h"
-
-/* define NO_GZIP when compiling if you want to disable gzip header and
-   trailer creation by deflate().  NO_GZIP would be used to avoid linking in
-   the crc code when it is not needed.  For shared libraries, gzip encoding
-   should be left enabled. */
-#ifndef NO_GZIP
-#  define GZIP
-#endif
-
-/* ===========================================================================
- * Internal compression state.
- */
-
-#define LENGTH_CODES 29
-/* number of length codes, not counting the special END_BLOCK code */
-
-#define LITERALS  256
-/* number of literal bytes 0..255 */
-
-#define L_CODES (LITERALS+1+LENGTH_CODES)
-/* number of Literal or Length codes, including the END_BLOCK code */
-
-#define D_CODES   30
-/* number of distance codes */
-
-#define BL_CODES  19
-/* number of codes used to transfer the bit lengths */
-
-#define HEAP_SIZE (2*L_CODES+1)
-/* maximum heap size */
-
-#define MAX_BITS 15
-/* All codes must not exceed MAX_BITS bits */
-
-#define INIT_STATE    42
-#define EXTRA_STATE   69
-#define NAME_STATE    73
-#define COMMENT_STATE 91
-#define HCRC_STATE   103
-#define BUSY_STATE   113
-#define FINISH_STATE 666
-/* Stream status */
-
-
-/* Data structure describing a single value and its code string. */
-typedef struct ct_data_s {
-    union {
-        ush  freq;       /* frequency count */
-        ush  code;       /* bit string */
-    } fc;
-    union {
-        ush  dad;        /* father node in Huffman tree */
-        ush  len;        /* length of bit string */
-    } dl;
-} FAR ct_data;
-
-#define Freq fc.freq
-#define Code fc.code
-#define Dad  dl.dad
-#define Len  dl.len
-
-typedef struct static_tree_desc_s  static_tree_desc;
-
-typedef struct tree_desc_s {
-    ct_data *dyn_tree;           /* the dynamic tree */
-    int     max_code;            /* largest code with non zero frequency */
-    static_tree_desc *stat_desc; /* the corresponding static tree */
-} FAR tree_desc;
-
-typedef ush Pos;
-typedef Pos FAR Posf;
-typedef unsigned IPos;
-
-/* A Pos is an index in the character window. We use short instead of int to
- * save space in the various tables. IPos is used only for parameter passing.
- */
-
-typedef struct internal_state {
-    z_streamp strm;      /* pointer back to this zlib stream */
-    int   status;        /* as the name implies */
-    Bytef *pending_buf;  /* output still pending */
-    ulg   pending_buf_size; /* size of pending_buf */
-    Bytef *pending_out;  /* next pending byte to output to the stream */
-    uInt   pending;      /* nb of bytes in the pending buffer */
-    int   wrap;          /* bit 0 true for zlib, bit 1 true for gzip */
-    gz_headerp  gzhead;  /* gzip header information to write */
-    uInt   gzindex;      /* where in extra, name, or comment */
-    Byte  method;        /* STORED (for zip only) or DEFLATED */
-    int   last_flush;    /* value of flush param for previous deflate call */
-
-                /* used by deflate.c: */
-
-    uInt  w_size;        /* LZ77 window size (32K by default) */
-    uInt  w_bits;        /* log2(w_size)  (8..16) */
-    uInt  w_mask;        /* w_size - 1 */
-
-    Bytef *window;
-    /* Sliding window. Input bytes are read into the second half of the window,
-     * and move to the first half later to keep a dictionary of at least wSize
-     * bytes. With this organization, matches are limited to a distance of
-     * wSize-MAX_MATCH bytes, but this ensures that IO is always
-     * performed with a length multiple of the block size. Also, it limits
-     * the window size to 64K, which is quite useful on MSDOS.
-     * To do: use the user input buffer as sliding window.
-     */
-
-    ulg window_size;
-    /* Actual size of window: 2*wSize, except when the user input buffer
-     * is directly used as sliding window.
-     */
-
-    Posf *prev;
-    /* Link to older string with same hash index. To limit the size of this
-     * array to 64K, this link is maintained only for the last 32K strings.
-     * An index in this array is thus a window index modulo 32K.
-     */
-
-    Posf *head; /* Heads of the hash chains or NIL. */
-
-    uInt  ins_h;          /* hash index of string to be inserted */
-    uInt  hash_size;      /* number of elements in hash table */
-    uInt  hash_bits;      /* log2(hash_size) */
-    uInt  hash_mask;      /* hash_size-1 */
-
-    uInt  hash_shift;
-    /* Number of bits by which ins_h must be shifted at each input
-     * step. It must be such that after MIN_MATCH steps, the oldest
-     * byte no longer takes part in the hash key, that is:
-     *   hash_shift * MIN_MATCH >= hash_bits
-     */
-
-    long block_start;
-    /* Window position at the beginning of the current output block. Gets
-     * negative when the window is moved backwards.
-     */
-
-    uInt match_length;           /* length of best match */
-    IPos prev_match;             /* previous match */
-    int match_available;         /* set if previous match exists */
-    uInt strstart;               /* start of string to insert */
-    uInt match_start;            /* start of matching string */
-    uInt lookahead;              /* number of valid bytes ahead in window */
-
-    uInt prev_length;
-    /* Length of the best match at previous step. Matches not greater than this
-     * are discarded. This is used in the lazy match evaluation.
-     */
-
-    uInt max_chain_length;
-    /* To speed up deflation, hash chains are never searched beyond this
-     * length.  A higher limit improves compression ratio but degrades the
-     * speed.
-     */
-
-    uInt max_lazy_match;
-    /* Attempt to find a better match only when the current match is strictly
-     * smaller than this value. This mechanism is used only for compression
-     * levels >= 4.
-     */
-#   define max_insert_length  max_lazy_match
-    /* Insert new strings in the hash table only if the match length is not
-     * greater than this length. This saves time but degrades compression.
-     * max_insert_length is used only for compression levels <= 3.
-     */
-
-    int level;    /* compression level (1..9) */
-    int strategy; /* favor or force Huffman coding*/
-
-    uInt good_match;
-    /* Use a faster search when the previous match is longer than this */
-
-    int nice_match; /* Stop searching when current match exceeds this */
-
-                /* used by trees.c: */
-    /* Didn't use ct_data typedef below to supress compiler warning */
-    struct ct_data_s dyn_ltree[HEAP_SIZE];   /* literal and length tree */
-    struct ct_data_s dyn_dtree[2*D_CODES+1]; /* distance tree */
-    struct ct_data_s bl_tree[2*BL_CODES+1];  /* Huffman tree for bit lengths */
-
-    struct tree_desc_s l_desc;               /* desc. for literal tree */
-    struct tree_desc_s d_desc;               /* desc. for distance tree */
-    struct tree_desc_s bl_desc;              /* desc. for bit length tree */
-
-    ush bl_count[MAX_BITS+1];
-    /* number of codes at each bit length for an optimal tree */
-
-    int heap[2*L_CODES+1];      /* heap used to build the Huffman trees */
-    int heap_len;               /* number of elements in the heap */
-    int heap_max;               /* element of largest frequency */
-    /* The sons of heap[n] are heap[2*n] and heap[2*n+1]. heap[0] is not used.
-     * The same heap array is used to build all trees.
-     */
-
-    uch depth[2*L_CODES+1];
-    /* Depth of each subtree used as tie breaker for trees of equal frequency
-     */
-
-    uchf *l_buf;          /* buffer for literals or lengths */
-
-    uInt  lit_bufsize;
-    /* Size of match buffer for literals/lengths.  There are 4 reasons for
-     * limiting lit_bufsize to 64K:
-     *   - frequencies can be kept in 16 bit counters
-     *   - if compression is not successful for the first block, all input
-     *     data is still in the window so we can still emit a stored block even
-     *     when input comes from standard input.  (This can also be done for
-     *     all blocks if lit_bufsize is not greater than 32K.)
-     *   - if compression is not successful for a file smaller than 64K, we can
-     *     even emit a stored file instead of a stored block (saving 5 bytes).
-     *     This is applicable only for zip (not gzip or zlib).
-     *   - creating new Huffman trees less frequently may not provide fast
-     *     adaptation to changes in the input data statistics. (Take for
-     *     example a binary file with poorly compressible code followed by
-     *     a highly compressible string table.) Smaller buffer sizes give
-     *     fast adaptation but have of course the overhead of transmitting
-     *     trees more frequently.
-     *   - I can't count above 4
-     */
-
-    uInt last_lit;      /* running index in l_buf */
-
-    ushf *d_buf;
-    /* Buffer for distances. To simplify the code, d_buf and l_buf have
-     * the same number of elements. To use different lengths, an extra flag
-     * array would be necessary.
-     */
-
-    ulg opt_len;        /* bit length of current block with optimal trees */
-    ulg static_len;     /* bit length of current block with static trees */
-    uInt matches;       /* number of string matches in current block */
-    int last_eob_len;   /* bit length of EOB code for last block */
-
-#ifdef DEBUG
-    ulg compressed_len; /* total bit length of compressed file mod 2^32 */
-    ulg bits_sent;      /* bit length of compressed data sent mod 2^32 */
-#endif
-
-    ush bi_buf;
-    /* Output buffer. bits are inserted starting at the bottom (least
-     * significant bits).
-     */
-    int bi_valid;
-    /* Number of valid bits in bi_buf.  All bits above the last valid bit
-     * are always zero.
-     */
-
-} FAR deflate_state;
-
-/* Output a byte on the stream.
- * IN assertion: there is enough room in pending_buf.
- */
-#define put_byte(s, c) {s->pending_buf[s->pending++] = (c);}
-
-
-#define MIN_LOOKAHEAD (MAX_MATCH+MIN_MATCH+1)
-/* Minimum amount of lookahead, except at the end of the input file.
- * See deflate.c for comments about the MIN_MATCH+1.
- */
-
-#define MAX_DIST(s)  ((s)->w_size-MIN_LOOKAHEAD)
-/* In order to simplify the code, particularly on 16 bit machines, match
- * distances are limited to MAX_DIST instead of WSIZE.
- */
-
-        /* in trees.c */
-void _tr_init         OF((deflate_state *s));
-int  _tr_tally        OF((deflate_state *s, unsigned dist, unsigned lc));
-void _tr_flush_block  OF((deflate_state *s, charf *buf, ulg stored_len,
-                          int eof));
-void _tr_align        OF((deflate_state *s));
-void _tr_stored_block OF((deflate_state *s, charf *buf, ulg stored_len,
-                          int eof));
-
-#define d_code(dist) \
-   ((dist) < 256 ? _dist_code[dist] : _dist_code[256+((dist)>>7)])
-/* Mapping from a distance to a distance code. dist is the distance - 1 and
- * must not have side effects. _dist_code[256] and _dist_code[257] are never
- * used.
- */
-
-#ifndef DEBUG
-/* Inline versions of _tr_tally for speed: */
-
-#if defined(GEN_TREES_H) || !defined(STDC)
-  extern uch _length_code[];
-  extern uch _dist_code[];
-#else
-  extern const uch _length_code[];
-  extern const uch _dist_code[];
-#endif
-
-# define _tr_tally_lit(s, c, flush) \
-  { uch cc = (c); \
-    s->d_buf[s->last_lit] = 0; \
-    s->l_buf[s->last_lit++] = cc; \
-    s->dyn_ltree[cc].Freq++; \
-    flush = (s->last_lit == s->lit_bufsize-1); \
-   }
-# define _tr_tally_dist(s, distance, length, flush) \
-  { uch len = (length); \
-    ush dist = (distance); \
-    s->d_buf[s->last_lit] = dist; \
-    s->l_buf[s->last_lit++] = len; \
-    dist--; \
-    s->dyn_ltree[_length_code[len]+LITERALS+1].Freq++; \
-    s->dyn_dtree[d_code(dist)].Freq++; \
-    flush = (s->last_lit == s->lit_bufsize-1); \
-  }
-#else
-# define _tr_tally_lit(s, c, flush) flush = _tr_tally(s, 0, c)
-# define _tr_tally_dist(s, distance, length, flush) \
-              flush = _tr_tally(s, distance, length)
-#endif
-
-#endif /* DEFLATE_H */
Index: trunk/minix/lib/zlib-1.2.3/example.c
===================================================================
--- trunk/minix/lib/zlib-1.2.3/example.c	(revision 9)
+++ 	(revision )
@@ -1,565 +1,0 @@
-/* example.c -- usage example of the zlib compression library
- * Copyright (C) 1995-2004 Jean-loup Gailly.
- * For conditions of distribution and use, see copyright notice in zlib.h
- */
-
-/* @(#) $Id: example.c,v 1.1 2005/09/23 22:39:00 beng Exp $ */
-
-#include <stdio.h>
-#include "zlib.h"
-
-#ifdef STDC
-#  include <string.h>
-#  include <stdlib.h>
-#endif
-
-#if defined(VMS) || defined(RISCOS)
-#  define TESTFILE "foo-gz"
-#else
-#  define TESTFILE "foo.gz"
-#endif
-
-#define CHECK_ERR(err, msg) { \
-    if (err != Z_OK) { \
-        fprintf(stderr, "%s error: %d\n", msg, err); \
-        exit(1); \
-    } \
-}
-
-const char hello[] = "hello, hello!";
-/* "hello world" would be more standard, but the repeated "hello"
- * stresses the compression code better, sorry...
- */
-
-const char dictionary[] = "hello";
-uLong dictId; /* Adler32 value of the dictionary */
-
-void test_compress      OF((Byte *compr, uLong comprLen,
-                            Byte *uncompr, uLong uncomprLen));
-void test_gzio          OF((const char *fname,
-                            Byte *uncompr, uLong uncomprLen));
-void test_deflate       OF((Byte *compr, uLong comprLen));
-void test_inflate       OF((Byte *compr, uLong comprLen,
-                            Byte *uncompr, uLong uncomprLen));
-void test_large_deflate OF((Byte *compr, uLong comprLen,
-                            Byte *uncompr, uLong uncomprLen));
-void test_large_inflate OF((Byte *compr, uLong comprLen,
-                            Byte *uncompr, uLong uncomprLen));
-void test_flush         OF((Byte *compr, uLong *comprLen));
-void test_sync          OF((Byte *compr, uLong comprLen,
-                            Byte *uncompr, uLong uncomprLen));
-void test_dict_deflate  OF((Byte *compr, uLong comprLen));
-void test_dict_inflate  OF((Byte *compr, uLong comprLen,
-                            Byte *uncompr, uLong uncomprLen));
-int  main               OF((int argc, char *argv[]));
-
-/* ===========================================================================
- * Test compress() and uncompress()
- */
-void test_compress(compr, comprLen, uncompr, uncomprLen)
-    Byte *compr, *uncompr;
-    uLong comprLen, uncomprLen;
-{
-    int err;
-    uLong len = (uLong)strlen(hello)+1;
-
-    err = compress(compr, &comprLen, (const Bytef*)hello, len);
-    CHECK_ERR(err, "compress");
-
-    strcpy((char*)uncompr, "garbage");
-
-    err = uncompress(uncompr, &uncomprLen, compr, comprLen);
-    CHECK_ERR(err, "uncompress");
-
-    if (strcmp((char*)uncompr, hello)) {
-        fprintf(stderr, "bad uncompress\n");
-        exit(1);
-    } else {
-        printf("uncompress(): %s\n", (char *)uncompr);
-    }
-}
-
-/* ===========================================================================
- * Test read/write of .gz files
- */
-void test_gzio(fname, uncompr, uncomprLen)
-    const char *fname; /* compressed file name */
-    Byte *uncompr;
-    uLong uncomprLen;
-{
-#ifdef NO_GZCOMPRESS
-    fprintf(stderr, "NO_GZCOMPRESS -- gz* functions cannot compress\n");
-#else
-    int err;
-    int len = (int)strlen(hello)+1;
-    gzFile file;
-    z_off_t pos;
-
-    file = gzopen(fname, "wb");
-    if (file == NULL) {
-        fprintf(stderr, "gzopen error\n");
-        exit(1);
-    }
-    gzputc(file, 'h');
-    if (gzputs(file, "ello") != 4) {
-        fprintf(stderr, "gzputs err: %s\n", gzerror(file, &err));
-        exit(1);
-    }
-    if (gzprintf(file, ", %s!", "hello") != 8) {
-        fprintf(stderr, "gzprintf err: %s\n", gzerror(file, &err));
-        exit(1);
-    }
-    gzseek(file, 1L, SEEK_CUR); /* add one zero byte */
-    gzclose(file);
-
-    file = gzopen(fname, "rb");
-    if (file == NULL) {
-        fprintf(stderr, "gzopen error\n");
-        exit(1);
-    }
-    strcpy((char*)uncompr, "garbage");
-
-    if (gzread(file, uncompr, (unsigned)uncomprLen) != len) {
-        fprintf(stderr, "gzread err: %s\n", gzerror(file, &err));
-        exit(1);
-    }
-    if (strcmp((char*)uncompr, hello)) {
-        fprintf(stderr, "bad gzread: %s\n", (char*)uncompr);
-        exit(1);
-    } else {
-        printf("gzread(): %s\n", (char*)uncompr);
-    }
-
-    pos = gzseek(file, -8L, SEEK_CUR);
-    if (pos != 6 || gztell(file) != pos) {
-        fprintf(stderr, "gzseek error, pos=%ld, gztell=%ld\n",
-                (long)pos, (long)gztell(file));
-        exit(1);
-    }
-
-    if (gzgetc(file) != ' ') {
-        fprintf(stderr, "gzgetc error\n");
-        exit(1);
-    }
-
-    if (gzungetc(' ', file) != ' ') {
-        fprintf(stderr, "gzungetc error\n");
-        exit(1);
-    }
-
-    gzgets(file, (char*)uncompr, (int)uncomprLen);
-    if (strlen((char*)uncompr) != 7) { /* " hello!" */
-        fprintf(stderr, "gzgets err after gzseek: %s\n", gzerror(file, &err));
-        exit(1);
-    }
-    if (strcmp((char*)uncompr, hello + 6)) {
-        fprintf(stderr, "bad gzgets after gzseek\n");
-        exit(1);
-    } else {
-        printf("gzgets() after gzseek: %s\n", (char*)uncompr);
-    }
-
-    gzclose(file);
-#endif
-}
-
-/* ===========================================================================
- * Test deflate() with small buffers
- */
-void test_deflate(compr, comprLen)
-    Byte *compr;
-    uLong comprLen;
-{
-    z_stream c_stream; /* compression stream */
-    int err;
-    uLong len = (uLong)strlen(hello)+1;
-
-    c_stream.zalloc = (alloc_func)0;
-    c_stream.zfree = (free_func)0;
-    c_stream.opaque = (voidpf)0;
-
-    err = deflateInit(&c_stream, Z_DEFAULT_COMPRESSION);
-    CHECK_ERR(err, "deflateInit");
-
-    c_stream.next_in  = (Bytef*)hello;
-    c_stream.next_out = compr;
-
-    while (c_stream.total_in != len && c_stream.total_out < comprLen) {
-        c_stream.avail_in = c_stream.avail_out = 1; /* force small buffers */
-        err = deflate(&c_stream, Z_NO_FLUSH);
-        CHECK_ERR(err, "deflate");
-    }
-    /* Finish the stream, still forcing small buffers: */
-    for (;;) {
-        c_stream.avail_out = 1;
-        err = deflate(&c_stream, Z_FINISH);
-        if (err == Z_STREAM_END) break;
-        CHECK_ERR(err, "deflate");
-    }
-
-    err = deflateEnd(&c_stream);
-    CHECK_ERR(err, "deflateEnd");
-}
-
-/* ===========================================================================
- * Test inflate() with small buffers
- */
-void test_inflate(compr, comprLen, uncompr, uncomprLen)
-    Byte *compr, *uncompr;
-    uLong comprLen, uncomprLen;
-{
-    int err;
-    z_stream d_stream; /* decompression stream */
-
-    strcpy((char*)uncompr, "garbage");
-
-    d_stream.zalloc = (alloc_func)0;
-    d_stream.zfree = (free_func)0;
-    d_stream.opaque = (voidpf)0;
-
-    d_stream.next_in  = compr;
-    d_stream.avail_in = 0;
-    d_stream.next_out = uncompr;
-
-    err = inflateInit(&d_stream);
-    CHECK_ERR(err, "inflateInit");
-
-    while (d_stream.total_out < uncomprLen && d_stream.total_in < comprLen) {
-        d_stream.avail_in = d_stream.avail_out = 1; /* force small buffers */
-        err = inflate(&d_stream, Z_NO_FLUSH);
-        if (err == Z_STREAM_END) break;
-        CHECK_ERR(err, "inflate");
-    }
-
-    err = inflateEnd(&d_stream);
-    CHECK_ERR(err, "inflateEnd");
-
-    if (strcmp((char*)uncompr, hello)) {
-        fprintf(stderr, "bad inflate\n");
-        exit(1);
-    } else {
-        printf("inflate(): %s\n", (char *)uncompr);
-    }
-}
-
-/* ===========================================================================
- * Test deflate() with large buffers and dynamic change of compression level
- */
-void test_large_deflate(compr, comprLen, uncompr, uncomprLen)
-    Byte *compr, *uncompr;
-    uLong comprLen, uncomprLen;
-{
-    z_stream c_stream; /* compression stream */
-    int err;
-
-    c_stream.zalloc = (alloc_func)0;
-    c_stream.zfree = (free_func)0;
-    c_stream.opaque = (voidpf)0;
-
-    err = deflateInit(&c_stream, Z_BEST_SPEED);
-    CHECK_ERR(err, "deflateInit");
-
-    c_stream.next_out = compr;
-    c_stream.avail_out = (uInt)comprLen;
-
-    /* At this point, uncompr is still mostly zeroes, so it should compress
-     * very well:
-     */
-    c_stream.next_in = uncompr;
-    c_stream.avail_in = (uInt)uncomprLen;
-    err = deflate(&c_stream, Z_NO_FLUSH);
-    CHECK_ERR(err, "deflate");
-    if (c_stream.avail_in != 0) {
-        fprintf(stderr, "deflate not greedy\n");
-        exit(1);
-    }
-
-    /* Feed in already compressed data and switch to no compression: */
-    deflateParams(&c_stream, Z_NO_COMPRESSION, Z_DEFAULT_STRATEGY);
-    c_stream.next_in = compr;
-    c_stream.avail_in = (uInt)comprLen/2;
-    err = deflate(&c_stream, Z_NO_FLUSH);
-    CHECK_ERR(err, "deflate");
-
-    /* Switch back to compressing mode: */
-    deflateParams(&c_stream, Z_BEST_COMPRESSION, Z_FILTERED);
-    c_stream.next_in = uncompr;
-    c_stream.avail_in = (uInt)uncomprLen;
-    err = deflate(&c_stream, Z_NO_FLUSH);
-    CHECK_ERR(err, "deflate");
-
-    err = deflate(&c_stream, Z_FINISH);
-    if (err != Z_STREAM_END) {
-        fprintf(stderr, "deflate should report Z_STREAM_END\n");
-        exit(1);
-    }
-    err = deflateEnd(&c_stream);
-    CHECK_ERR(err, "deflateEnd");
-}
-
-/* ===========================================================================
- * Test inflate() with large buffers
- */
-void test_large_inflate(compr, comprLen, uncompr, uncomprLen)
-    Byte *compr, *uncompr;
-    uLong comprLen, uncomprLen;
-{
-    int err;
-    z_stream d_stream; /* decompression stream */
-
-    strcpy((char*)uncompr, "garbage");
-
-    d_stream.zalloc = (alloc_func)0;
-    d_stream.zfree = (free_func)0;
-    d_stream.opaque = (voidpf)0;
-
-    d_stream.next_in  = compr;
-    d_stream.avail_in = (uInt)comprLen;
-
-    err = inflateInit(&d_stream);
-    CHECK_ERR(err, "inflateInit");
-
-    for (;;) {
-        d_stream.next_out = uncompr;            /* discard the output */
-        d_stream.avail_out = (uInt)uncomprLen;
-        err = inflate(&d_stream, Z_NO_FLUSH);
-        if (err == Z_STREAM_END) break;
-        CHECK_ERR(err, "large inflate");
-    }
-
-    err = inflateEnd(&d_stream);
-    CHECK_ERR(err, "inflateEnd");
-
-    if (d_stream.total_out != 2*uncomprLen + comprLen/2) {
-        fprintf(stderr, "bad large inflate: %ld\n", d_stream.total_out);
-        exit(1);
-    } else {
-        printf("large_inflate(): OK\n");
-    }
-}
-
-/* ===========================================================================
- * Test deflate() with full flush
- */
-void test_flush(compr, comprLen)
-    Byte *compr;
-    uLong *comprLen;
-{
-    z_stream c_stream; /* compression stream */
-    int err;
-    uInt len = (uInt)strlen(hello)+1;
-
-    c_stream.zalloc = (alloc_func)0;
-    c_stream.zfree = (free_func)0;
-    c_stream.opaque = (voidpf)0;
-
-    err = deflateInit(&c_stream, Z_DEFAULT_COMPRESSION);
-    CHECK_ERR(err, "deflateInit");
-
-    c_stream.next_in  = (Bytef*)hello;
-    c_stream.next_out = compr;
-    c_stream.avail_in = 3;
-    c_stream.avail_out = (uInt)*comprLen;
-    err = deflate(&c_stream, Z_FULL_FLUSH);
-    CHECK_ERR(err, "deflate");
-
-    compr[3]++; /* force an error in first compressed block */
-    c_stream.avail_in = len - 3;
-
-    err = deflate(&c_stream, Z_FINISH);
-    if (err != Z_STREAM_END) {
-        CHECK_ERR(err, "deflate");
-    }
-    err = deflateEnd(&c_stream);
-    CHECK_ERR(err, "deflateEnd");
-
-    *comprLen = c_stream.total_out;
-}
-
-/* ===========================================================================
- * Test inflateSync()
- */
-void test_sync(compr, comprLen, uncompr, uncomprLen)
-    Byte *compr, *uncompr;
-    uLong comprLen, uncomprLen;
-{
-    int err;
-    z_stream d_stream; /* decompression stream */
-
-    strcpy((char*)uncompr, "garbage");
-
-    d_stream.zalloc = (alloc_func)0;
-    d_stream.zfree = (free_func)0;
-    d_stream.opaque = (voidpf)0;
-
-    d_stream.next_in  = compr;
-    d_stream.avail_in = 2; /* just read the zlib header */
-
-    err = inflateInit(&d_stream);
-    CHECK_ERR(err, "inflateInit");
-
-    d_stream.next_out = uncompr;
-    d_stream.avail_out = (uInt)uncomprLen;
-
-    inflate(&d_stream, Z_NO_FLUSH);
-    CHECK_ERR(err, "inflate");
-
-    d_stream.avail_in = (uInt)comprLen-2;   /* read all compressed data */
-    err = inflateSync(&d_stream);           /* but skip the damaged part */
-    CHECK_ERR(err, "inflateSync");
-
-    err = inflate(&d_stream, Z_FINISH);
-    if (err != Z_DATA_ERROR) {
-        fprintf(stderr, "inflate should report DATA_ERROR\n");
-        /* Because of incorrect adler32 */
-        exit(1);
-    }
-    err = inflateEnd(&d_stream);
-    CHECK_ERR(err, "inflateEnd");
-
-    printf("after inflateSync(): hel%s\n", (char *)uncompr);
-}
-
-/* ===========================================================================
- * Test deflate() with preset dictionary
- */
-void test_dict_deflate(compr, comprLen)
-    Byte *compr;
-    uLong comprLen;
-{
-    z_stream c_stream; /* compression stream */
-    int err;
-
-    c_stream.zalloc = (alloc_func)0;
-    c_stream.zfree = (free_func)0;
-    c_stream.opaque = (voidpf)0;
-
-    err = deflateInit(&c_stream, Z_BEST_COMPRESSION);
-    CHECK_ERR(err, "deflateInit");
-
-    err = deflateSetDictionary(&c_stream,
-                               (const Bytef*)dictionary, sizeof(dictionary));
-    CHECK_ERR(err, "deflateSetDictionary");
-
-    dictId = c_stream.adler;
-    c_stream.next_out = compr;
-    c_stream.avail_out = (uInt)comprLen;
-
-    c_stream.next_in = (Bytef*)hello;
-    c_stream.avail_in = (uInt)strlen(hello)+1;
-
-    err = deflate(&c_stream, Z_FINISH);
-    if (err != Z_STREAM_END) {
-        fprintf(stderr, "deflate should report Z_STREAM_END\n");
-        exit(1);
-    }
-    err = deflateEnd(&c_stream);
-    CHECK_ERR(err, "deflateEnd");
-}
-
-/* ===========================================================================
- * Test inflate() with a preset dictionary
- */
-void test_dict_inflate(compr, comprLen, uncompr, uncomprLen)
-    Byte *compr, *uncompr;
-    uLong comprLen, uncomprLen;
-{
-    int err;
-    z_stream d_stream; /* decompression stream */
-
-    strcpy((char*)uncompr, "garbage");
-
-    d_stream.zalloc = (alloc_func)0;
-    d_stream.zfree = (free_func)0;
-    d_stream.opaque = (voidpf)0;
-
-    d_stream.next_in  = compr;
-    d_stream.avail_in = (uInt)comprLen;
-
-    err = inflateInit(&d_stream);
-    CHECK_ERR(err, "inflateInit");
-
-    d_stream.next_out = uncompr;
-    d_stream.avail_out = (uInt)uncomprLen;
-
-    for (;;) {
-        err = inflate(&d_stream, Z_NO_FLUSH);
-        if (err == Z_STREAM_END) break;
-        if (err == Z_NEED_DICT) {
-            if (d_stream.adler != dictId) {
-                fprintf(stderr, "unexpected dictionary");
-                exit(1);
-            }
-            err = inflateSetDictionary(&d_stream, (const Bytef*)dictionary,
-                                       sizeof(dictionary));
-        }
-        CHECK_ERR(err, "inflate with dict");
-    }
-
-    err = inflateEnd(&d_stream);
-    CHECK_ERR(err, "inflateEnd");
-
-    if (strcmp((char*)uncompr, hello)) {
-        fprintf(stderr, "bad inflate with dict\n");
-        exit(1);
-    } else {
-        printf("inflate with dictionary: %s\n", (char *)uncompr);
-    }
-}
-
-/* ===========================================================================
- * Usage:  example [output.gz  [input.gz]]
- */
-
-int main(argc, argv)
-    int argc;
-    char *argv[];
-{
-    Byte *compr, *uncompr;
-    uLong comprLen = 10000*sizeof(int); /* don't overflow on MSDOS */
-    uLong uncomprLen = comprLen;
-    static const char* myVersion = ZLIB_VERSION;
-
-    if (zlibVersion()[0] != myVersion[0]) {
-        fprintf(stderr, "incompatible zlib version\n");
-        exit(1);
-
-    } else if (strcmp(zlibVersion(), ZLIB_VERSION) != 0) {
-        fprintf(stderr, "warning: different zlib version\n");
-    }
-
-    printf("zlib version %s = 0x%04x, compile flags = 0x%lx\n",
-            ZLIB_VERSION, ZLIB_VERNUM, zlibCompileFlags());
-
-    compr    = (Byte*)calloc((uInt)comprLen, 1);
-    uncompr  = (Byte*)calloc((uInt)uncomprLen, 1);
-    /* compr and uncompr are cleared to avoid reading uninitialized
-     * data and to ensure that uncompr compresses well.
-     */
-    if (compr == Z_NULL || uncompr == Z_NULL) {
-        printf("out of memory\n");
-        exit(1);
-    }
-    test_compress(compr, comprLen, uncompr, uncomprLen);
-
-    test_gzio((argc > 1 ? argv[1] : TESTFILE),
-              uncompr, uncomprLen);
-
-    test_deflate(compr, comprLen);
-    test_inflate(compr, comprLen, uncompr, uncomprLen);
-
-    test_large_deflate(compr, comprLen, uncompr, uncomprLen);
-    test_large_inflate(compr, comprLen, uncompr, uncomprLen);
-
-    test_flush(compr, &comprLen);
-    test_sync(compr, comprLen, uncompr, uncomprLen);
-    comprLen = uncomprLen;
-
-    test_dict_deflate(compr, comprLen);
-    test_dict_inflate(compr, comprLen, uncompr, uncomprLen);
-
-    free(compr);
-    free(uncompr);
-
-    return 0;
-}
Index: trunk/minix/lib/zlib-1.2.3/examples/README.examples
===================================================================
--- trunk/minix/lib/zlib-1.2.3/examples/README.examples	(revision 9)
+++ 	(revision )
@@ -1,42 +1,0 @@
-This directory contains examples of the use of zlib.
-
-fitblk.c
-    compress just enough input to nearly fill a requested output size
-    - zlib isn't designed to do this, but fitblk does it anyway
-
-gun.c
-    uncompress a gzip file
-    - illustrates the use of inflateBack() for high speed file-to-file
-      decompression using call-back functions
-    - is approximately twice as fast as gzip -d
-    - also provides Unix uncompress functionality, again twice as fast
-
-gzappend.c
-    append to a gzip file
-    - illustrates the use of the Z_BLOCK flush parameter for inflate()
-    - illustrates the use of deflatePrime() to start at any bit
-
-gzjoin.c
-    join gzip files without recalculating the crc or recompressing
-    - illustrates the use of the Z_BLOCK flush parameter for inflate()
-    - illustrates the use of crc32_combine()
-
-gzlog.c
-gzlog.h
-    efficiently maintain a message log file in gzip format
-    - illustrates use of raw deflate and Z_SYNC_FLUSH
-    - illustrates use of gzip header extra field
-
-zlib_how.html
-    painfully comprehensive description of zpipe.c (see below)
-    - describes in excruciating detail the use of deflate() and inflate()
-
-zpipe.c
-    reads and writes zlib streams from stdin to stdout
-    - illustrates the proper use of deflate() and inflate()
-    - deeply commented in zlib_how.html (see above)
-
-zran.c
-    index a zlib or gzip stream and randomly access it
-    - illustrates the use of Z_BLOCK, inflatePrime(), and
-      inflateSetDictionary() to provide random access
Index: trunk/minix/lib/zlib-1.2.3/examples/fitblk.c
===================================================================
--- trunk/minix/lib/zlib-1.2.3/examples/fitblk.c	(revision 9)
+++ 	(revision )
@@ -1,233 +1,0 @@
-/* fitblk.c: example of fitting compressed output to a specified size
-   Not copyrighted -- provided to the public domain
-   Version 1.1  25 November 2004  Mark Adler */
-
-/* Version history:
-   1.0  24 Nov 2004  First version
-   1.1  25 Nov 2004  Change deflateInit2() to deflateInit()
-                     Use fixed-size, stack-allocated raw buffers
-                     Simplify code moving compression to subroutines
-                     Use assert() for internal errors
-                     Add detailed description of approach
- */
-
-/* Approach to just fitting a requested compressed size:
-
-   fitblk performs three compression passes on a portion of the input
-   data in order to determine how much of that input will compress to
-   nearly the requested output block size.  The first pass generates
-   enough deflate blocks to produce output to fill the requested
-   output size plus a specfied excess amount (see the EXCESS define
-   below).  The last deflate block may go quite a bit past that, but
-   is discarded.  The second pass decompresses and recompresses just
-   the compressed data that fit in the requested plus excess sized
-   buffer.  The deflate process is terminated after that amount of
-   input, which is less than the amount consumed on the first pass.
-   The last deflate block of the result will be of a comparable size
-   to the final product, so that the header for that deflate block and
-   the compression ratio for that block will be about the same as in
-   the final product.  The third compression pass decompresses the
-   result of the second step, but only the compressed data up to the
-   requested size minus an amount to allow the compressed stream to
-   complete (see the MARGIN define below).  That will result in a
-   final compressed stream whose length is less than or equal to the
-   requested size.  Assuming sufficient input and a requested size
-   greater than a few hundred bytes, the shortfall will typically be
-   less than ten bytes.
-
-   If the input is short enough that the first compression completes
-   before filling the requested output size, then that compressed
-   stream is return with no recompression.
-
-   EXCESS is chosen to be just greater than the shortfall seen in a
-   two pass approach similar to the above.  That shortfall is due to
-   the last deflate block compressing more efficiently with a smaller
-   header on the second pass.  EXCESS is set to be large enough so
-   that there is enough uncompressed data for the second pass to fill
-   out the requested size, and small enough so that the final deflate
-   block of the second pass will be close in size to the final deflate
-   block of the third and final pass.  MARGIN is chosen to be just
-   large enough to assure that the final compression has enough room
-   to complete in all cases.
- */
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <assert.h>
-#include "zlib.h"
-
-#define local static
-
-/* print nastygram and leave */
-local void quit(char *why)
-{
-    fprintf(stderr, "fitblk abort: %s\n", why);
-    exit(1);
-}
-
-#define RAWLEN 4096    /* intermediate uncompressed buffer size */
-
-/* compress from file to def until provided buffer is full or end of
-   input reached; return last deflate() return value, or Z_ERRNO if
-   there was read error on the file */
-local int partcompress(FILE *in, z_streamp def)
-{
-    int ret, flush;
-    unsigned char raw[RAWLEN];
-
-    flush = Z_NO_FLUSH;
-    do {
-        def->avail_in = fread(raw, 1, RAWLEN, in);
-        if (ferror(in))
-            return Z_ERRNO;
-        def->next_in = raw;
-        if (feof(in))
-            flush = Z_FINISH;
-        ret = deflate(def, flush);
-        assert(ret != Z_STREAM_ERROR);
-    } while (def->avail_out != 0 && flush == Z_NO_FLUSH);
-    return ret;
-}
-
-/* recompress from inf's input to def's output; the input for inf and
-   the output for def are set in those structures before calling;
-   return last deflate() return value, or Z_MEM_ERROR if inflate()
-   was not able to allocate enough memory when it needed to */
-local int recompress(z_streamp inf, z_streamp def)
-{
-    int ret, flush;
-    unsigned char raw[RAWLEN];
-
-    flush = Z_NO_FLUSH;
-    do {
-        /* decompress */
-        inf->avail_out = RAWLEN;
-        inf->next_out = raw;
-        ret = inflate(inf, Z_NO_FLUSH);
-        assert(ret != Z_STREAM_ERROR && ret != Z_DATA_ERROR &&
-               ret != Z_NEED_DICT);
-        if (ret == Z_MEM_ERROR)
-            return ret;
-
-        /* compress what was decompresed until done or no room */
-        def->avail_in = RAWLEN - inf->avail_out;
-        def->next_in = raw;
-        if (inf->avail_out != 0)
-            flush = Z_FINISH;
-        ret = deflate(def, flush);
-        assert(ret != Z_STREAM_ERROR);
-    } while (ret != Z_STREAM_END && def->avail_out != 0);
-    return ret;
-}
-
-#define EXCESS 256      /* empirically determined stream overage */
-#define MARGIN 8        /* amount to back off for completion */
-
-/* compress from stdin to fixed-size block on stdout */
-int main(int argc, char **argv)
-{
-    int ret;                /* return code */
-    unsigned size;          /* requested fixed output block size */
-    unsigned have;          /* bytes written by deflate() call */
-    unsigned char *blk;     /* intermediate and final stream */
-    unsigned char *tmp;     /* close to desired size stream */
-    z_stream def, inf;      /* zlib deflate and inflate states */
-
-    /* get requested output size */
-    if (argc != 2)
-        quit("need one argument: size of output block");
-    ret = strtol(argv[1], argv + 1, 10);
-    if (argv[1][0] != 0)
-        quit("argument must be a number");
-    if (ret < 8)            /* 8 is minimum zlib stream size */
-        quit("need positive size of 8 or greater");
-    size = (unsigned)ret;
-
-    /* allocate memory for buffers and compression engine */
-    blk = malloc(size + EXCESS);
-    def.zalloc = Z_NULL;
-    def.zfree = Z_NULL;
-    def.opaque = Z_NULL;
-    ret = deflateInit(&def, Z_DEFAULT_COMPRESSION);
-    if (ret != Z_OK || blk == NULL)
-        quit("out of memory");
-
-    /* compress from stdin until output full, or no more input */
-    def.avail_out = size + EXCESS;
-    def.next_out = blk;
-    ret = partcompress(stdin, &def);
-    if (ret == Z_ERRNO)
-        quit("error reading input");
-
-    /* if it all fit, then size was undersubscribed -- done! */
-    if (ret == Z_STREAM_END && def.avail_out >= EXCESS) {
-        /* write block to stdout */
-        have = size + EXCESS - def.avail_out;
-        if (fwrite(blk, 1, have, stdout) != have || ferror(stdout))
-            quit("error writing output");
-
-        /* clean up and print results to stderr */
-        ret = deflateEnd(&def);
-        assert(ret != Z_STREAM_ERROR);
-        free(blk);
-        fprintf(stderr,
-                "%u bytes unused out of %u requested (all input)\n",
-                size - have, size);
-        return 0;
-    }
-
-    /* it didn't all fit -- set up for recompression */
-    inf.zalloc = Z_NULL;
-    inf.zfree = Z_NULL;
-    inf.opaque = Z_NULL;
-    inf.avail_in = 0;
-    inf.next_in = Z_NULL;
-    ret = inflateInit(&inf);
-    tmp = malloc(size + EXCESS);
-    if (ret != Z_OK || tmp == NULL)
-        quit("out of memory");
-    ret = deflateReset(&def);
-    assert(ret != Z_STREAM_ERROR);
-
-    /* do first recompression close to the right amount */
-    inf.avail_in = size + EXCESS;
-    inf.next_in = blk;
-    def.avail_out = size + EXCESS;
-    def.next_out = tmp;
-    ret = recompress(&inf, &def);
-    if (ret == Z_MEM_ERROR)
-        quit("out of memory");
-
-    /* set up for next reocmpression */
-    ret = inflateReset(&inf);
-    assert(ret != Z_STREAM_ERROR);
-    ret = deflateReset(&def);
-    assert(ret != Z_STREAM_ERROR);
-
-    /* do second and final recompression (third compression) */
-    inf.avail_in = size - MARGIN;   /* assure stream will complete */
-    inf.next_in = tmp;
-    def.avail_out = size;
-    def.next_out = blk;
-    ret = recompress(&inf, &def);
-    if (ret == Z_MEM_ERROR)
-        quit("out of memory");
-    assert(ret == Z_STREAM_END);    /* otherwise MARGIN too small */
-
-    /* done -- write block to stdout */
-    have = size - def.avail_out;
-    if (fwrite(blk, 1, have, stdout) != have || ferror(stdout))
-        quit("error writing output");
-
-    /* clean up and print results to stderr */
-    free(tmp);
-    ret = inflateEnd(&inf);
-    assert(ret != Z_STREAM_ERROR);
-    ret = deflateEnd(&def);
-    assert(ret != Z_STREAM_ERROR);
-    free(blk);
-    fprintf(stderr,
-            "%u bytes unused out of %u requested (%lu input)\n",
-            size - have, size, def.total_in);
-    return 0;
-}
Index: trunk/minix/lib/zlib-1.2.3/examples/gun.c
===================================================================
--- trunk/minix/lib/zlib-1.2.3/examples/gun.c	(revision 9)
+++ 	(revision )
@@ -1,693 +1,0 @@
-/* gun.c -- simple gunzip to give an example of the use of inflateBack()
- * Copyright (C) 2003, 2005 Mark Adler
- * For conditions of distribution and use, see copyright notice in zlib.h
-   Version 1.3  12 June 2005  Mark Adler */
-
-/* Version history:
-   1.0  16 Feb 2003  First version for testing of inflateBack()
-   1.1  21 Feb 2005  Decompress concatenated gzip streams
-                     Remove use of "this" variable (C++ keyword)
-                     Fix return value for in()
-                     Improve allocation failure checking
-                     Add typecasting for void * structures
-                     Add -h option for command version and usage
-                     Add a bunch of comments
-   1.2  20 Mar 2005  Add Unix compress (LZW) decompression
-                     Copy file attributes from input file to output file
-   1.3  12 Jun 2005  Add casts for error messages [Oberhumer]
- */
-
-/*
-   gun [ -t ] [ name ... ]
-
-   decompresses the data in the named gzip files.  If no arguments are given,
-   gun will decompress from stdin to stdout.  The names must end in .gz, -gz,
-   .z, -z, _z, or .Z.  The uncompressed data will be written to a file name
-   with the suffix stripped.  On success, the original file is deleted.  On
-   failure, the output file is deleted.  For most failures, the command will
-   continue to process the remaining names on the command line.  A memory
-   allocation failure will abort the command.  If -t is specified, then the
-   listed files or stdin will be tested as gzip files for integrity (without
-   checking for a proper suffix), no output will be written, and no files
-   will be deleted.
-
-   Like gzip, gun allows concatenated gzip streams and will decompress them,
-   writing all of the uncompressed data to the output.  Unlike gzip, gun allows
-   an empty file on input, and will produce no error writing an empty output
-   file.
-
-   gun will also decompress files made by Unix compress, which uses LZW
-   compression.  These files are automatically detected by virtue of their
-   magic header bytes.  Since the end of Unix compress stream is marked by the
-   end-of-file, they cannot be concantenated.  If a Unix compress stream is
-   encountered in an input file, it is the last stream in that file.
-
-   Like gunzip and uncompress, the file attributes of the orignal compressed
-   file are maintained in the final uncompressed file, to the extent that the
-   user permissions allow it.
-
-   On my Mac OS X PowerPC G4, gun is almost twice as fast as gunzip (version
-   1.2.4) is on the same file, when gun is linked with zlib 1.2.2.  Also the
-   LZW decompression provided by gun is about twice as fast as the standard
-   Unix uncompress command.
- */
-
-/* external functions and related types and constants */
-#include <stdio.h>          /* fprintf() */
-#include <stdlib.h>         /* malloc(), free() */
-#include <string.h>         /* strerror(), strcmp(), strlen(), memcpy() */
-#include <errno.h>          /* errno */
-#include <fcntl.h>          /* open() */
-#include <unistd.h>         /* read(), write(), close(), chown(), unlink() */
-#include <sys/types.h>
-#include <sys/stat.h>       /* stat(), chmod() */
-#include <utime.h>          /* utime() */
-#include "zlib.h"           /* inflateBackInit(), inflateBack(), */
-                            /* inflateBackEnd(), crc32() */
-
-/* function declaration */
-#define local static
-
-/* buffer constants */
-#define SIZE 32768U         /* input and output buffer sizes */
-#define PIECE 16384         /* limits i/o chunks for 16-bit int case */
-
-/* structure for infback() to pass to input function in() -- it maintains the
-   input file and a buffer of size SIZE */
-struct ind {
-    int infile;
-    unsigned char *inbuf;
-};
-
-/* Load input buffer, assumed to be empty, and return bytes loaded and a
-   pointer to them.  read() is called until the buffer is full, or until it
-   returns end-of-file or error.  Return 0 on error. */
-local unsigned in(void *in_desc, unsigned char **buf)
-{
-    int ret;
-    unsigned len;
-    unsigned char *next;
-    struct ind *me = (struct ind *)in_desc;
-
-    next = me->inbuf;
-    *buf = next;
-    len = 0;
-    do {
-        ret = PIECE;
-        if ((unsigned)ret > SIZE - len)
-            ret = (int)(SIZE - len);
-        ret = (int)read(me->infile, next, ret);
-        if (ret == -1) {
-            len = 0;
-            break;
-        }
-        next += ret;
-        len += ret;
-    } while (ret != 0 && len < SIZE);
-    return len;
-}
-
-/* structure for infback() to pass to output function out() -- it maintains the
-   output file, a running CRC-32 check on the output and the total number of
-   bytes output, both for checking against the gzip trailer.  (The length in
-   the gzip trailer is stored modulo 2^32, so it's ok if a long is 32 bits and
-   the output is greater than 4 GB.) */
-struct outd {
-    int outfile;
-    int check;                  /* true if checking crc and total */
-    unsigned long crc;
-    unsigned long total;
-};
-
-/* Write output buffer and update the CRC-32 and total bytes written.  write()
-   is called until all of the output is written or an error is encountered.
-   On success out() returns 0.  For a write failure, out() returns 1.  If the
-   output file descriptor is -1, then nothing is written.
- */
-local int out(void *out_desc, unsigned char *buf, unsigned len)
-{
-    int ret;
-    struct outd *me = (struct outd *)out_desc;
-
-    if (me->check) {
-        me->crc = crc32(me->crc, buf, len);
-        me->total += len;
-    }
-    if (me->outfile != -1)
-        do {
-            ret = PIECE;
-            if ((unsigned)ret > len)
-                ret = (int)len;
-            ret = (int)write(me->outfile, buf, ret);
-            if (ret == -1)
-                return 1;
-            buf += ret;
-            len -= ret;
-        } while (len != 0);
-    return 0;
-}
-
-/* next input byte macro for use inside lunpipe() and gunpipe() */
-#define NEXT() (have ? 0 : (have = in(indp, &next)), \
-                last = have ? (have--, (int)(*next++)) : -1)
-
-/* memory for gunpipe() and lunpipe() --
-   the first 256 entries of prefix[] and suffix[] are never used, could
-   have offset the index, but it's faster to waste the memory */
-unsigned char inbuf[SIZE];              /* input buffer */
-unsigned char outbuf[SIZE];             /* output buffer */
-unsigned short prefix[65536];           /* index to LZW prefix string */
-unsigned char suffix[65536];            /* one-character LZW suffix */
-unsigned char match[65280 + 2];         /* buffer for reversed match or gzip
-                                           32K sliding window */
-
-/* throw out what's left in the current bits byte buffer (this is a vestigial
-   aspect of the compressed data format derived from an implementation that
-   made use of a special VAX machine instruction!) */
-#define FLUSHCODE() \
-    do { \
-        left = 0; \
-        rem = 0; \
-        if (chunk > have) { \
-            chunk -= have; \
-            have = 0; \
-            if (NEXT() == -1) \
-                break; \
-            chunk--; \
-            if (chunk > have) { \
-                chunk = have = 0; \
-                break; \
-            } \
-        } \
-        have -= chunk; \
-        next += chunk; \
-        chunk = 0; \
-    } while (0)
-
-/* Decompress a compress (LZW) file from indp to outfile.  The compress magic
-   header (two bytes) has already been read and verified.  There are have bytes
-   of buffered input at next.  strm is used for passing error information back
-   to gunpipe().
-
-   lunpipe() will return Z_OK on success, Z_BUF_ERROR for an unexpected end of
-   file, read error, or write error (a write error indicated by strm->next_in
-   not equal to Z_NULL), or Z_DATA_ERROR for invalid input.
- */
-local int lunpipe(unsigned have, unsigned char *next, struct ind *indp,
-                  int outfile, z_stream *strm)
-{
-    int last;                   /* last byte read by NEXT(), or -1 if EOF */
-    int chunk;                  /* bytes left in current chunk */
-    int left;                   /* bits left in rem */
-    unsigned rem;               /* unused bits from input */
-    int bits;                   /* current bits per code */
-    unsigned code;              /* code, table traversal index */
-    unsigned mask;              /* mask for current bits codes */
-    int max;                    /* maximum bits per code for this stream */
-    int flags;                  /* compress flags, then block compress flag */
-    unsigned end;               /* last valid entry in prefix/suffix tables */
-    unsigned temp;              /* current code */
-    unsigned prev;              /* previous code */
-    unsigned final;             /* last character written for previous code */
-    unsigned stack;             /* next position for reversed string */
-    unsigned outcnt;            /* bytes in output buffer */
-    struct outd outd;           /* output structure */
-
-    /* set up output */
-    outd.outfile = outfile;
-    outd.check = 0;
-
-    /* process remainder of compress header -- a flags byte */
-    flags = NEXT();
-    if (last == -1)
-        return Z_BUF_ERROR;
-    if (flags & 0x60) {
-        strm->msg = (char *)"unknown lzw flags set";
-        return Z_DATA_ERROR;
-    }
-    max = flags & 0x1f;
-    if (max < 9 || max > 16) {
-        strm->msg = (char *)"lzw bits out of range";
-        return Z_DATA_ERROR;
-    }
-    if (max == 9)                           /* 9 doesn't really mean 9 */
-        max = 10;
-    flags &= 0x80;                          /* true if block compress */
-
-    /* clear table */
-    bits = 9;
-    mask = 0x1ff;
-    end = flags ? 256 : 255;
-
-    /* set up: get first 9-bit code, which is the first decompressed byte, but
-       don't create a table entry until the next code */
-    if (NEXT() == -1)                       /* no compressed data is ok */
-        return Z_OK;
-    final = prev = (unsigned)last;          /* low 8 bits of code */
-    if (NEXT() == -1)                       /* missing a bit */
-        return Z_BUF_ERROR;
-    if (last & 1) {                         /* code must be < 256 */
-        strm->msg = (char *)"invalid lzw code";
-        return Z_DATA_ERROR;
-    }
-    rem = (unsigned)last >> 1;              /* remaining 7 bits */
-    left = 7;
-    chunk = bits - 2;                       /* 7 bytes left in this chunk */
-    outbuf[0] = (unsigned char)final;       /* write first decompressed byte */
-    outcnt = 1;
-
-    /* decode codes */
-    stack = 0;
-    for (;;) {
-        /* if the table will be full after this, increment the code size */
-        if (end >= mask && bits < max) {
-            FLUSHCODE();
-            bits++;
-            mask <<= 1;
-            mask++;
-        }
-
-        /* get a code of length bits */
-        if (chunk == 0)                     /* decrement chunk modulo bits */
-            chunk = bits;
-        code = rem;                         /* low bits of code */
-        if (NEXT() == -1) {                 /* EOF is end of compressed data */
-            /* write remaining buffered output */
-            if (outcnt && out(&outd, outbuf, outcnt)) {
-                strm->next_in = outbuf;     /* signal write error */
-                return Z_BUF_ERROR;
-            }
-            return Z_OK;
-        }
-        code += (unsigned)last << left;     /* middle (or high) bits of code */
-        left += 8;
-        chunk--;
-        if (bits > left) {                  /* need more bits */
-            if (NEXT() == -1)               /* can't end in middle of code */
-                return Z_BUF_ERROR;
-            code += (unsigned)last << left; /* high bits of code */
-            left += 8;
-            chunk--;
-        }
-        code &= mask;                       /* mask to current code length */
-        left -= bits;                       /* number of unused bits */
-        rem = (unsigned)last >> (8 - left); /* unused bits from last byte */
-
-        /* process clear code (256) */
-        if (code == 256 && flags) {
-            FLUSHCODE();
-            bits = 9;                       /* initialize bits and mask */
-            mask = 0x1ff;
-            end = 255;                      /* empty table */
-            continue;                       /* get next code */
-        }
-
-        /* special code to reuse last match */
-        temp = code;                        /* save the current code */
-        if (code > end) {
-            /* Be picky on the allowed code here, and make sure that the code
-               we drop through (prev) will be a valid index so that random
-               input does not cause an exception.  The code != end + 1 check is
-               empirically derived, and not checked in the original uncompress
-               code.  If this ever causes a problem, that check could be safely
-               removed.  Leaving this check in greatly improves gun's ability
-               to detect random or corrupted input after a compress header.
-               In any case, the prev > end check must be retained. */
-            if (code != end + 1 || prev > end) {
-                strm->msg = (char *)"invalid lzw code";
-                return Z_DATA_ERROR;
-            }
-            match[stack++] = (unsigned char)final;
-            code = prev;
-        }
-
-        /* walk through linked list to generate output in reverse order */
-        while (code >= 256) {
-            match[stack++] = suffix[code];
-            code = prefix[code];
-        }
-        match[stack++] = (unsigned char)code;
-        final = code;
-
-        /* link new table entry */
-        if (end < mask) {
-            end++;
-            prefix[end] = (unsigned short)prev;
-            suffix[end] = (unsigned char)final;
-        }
-
-        /* set previous code for next iteration */
-        prev = temp;
-
-        /* write output in forward order */
-        while (stack > SIZE - outcnt) {
-            while (outcnt < SIZE)
-                outbuf[outcnt++] = match[--stack];
-            if (out(&outd, outbuf, outcnt)) {
-                strm->next_in = outbuf; /* signal write error */
-                return Z_BUF_ERROR;
-            }
-            outcnt = 0;
-        }
-        do {
-            outbuf[outcnt++] = match[--stack];
-        } while (stack);
-
-        /* loop for next code with final and prev as the last match, rem and
-           left provide the first 0..7 bits of the next code, end is the last
-           valid table entry */
-    }
-}
-
-/* Decompress a gzip file from infile to outfile.  strm is assumed to have been
-   successfully initialized with inflateBackInit().  The input file may consist
-   of a series of gzip streams, in which case all of them will be decompressed
-   to the output file.  If outfile is -1, then the gzip stream(s) integrity is
-   checked and nothing is written.
-
-   The return value is a zlib error code: Z_MEM_ERROR if out of memory,
-   Z_DATA_ERROR if the header or the compressed data is invalid, or if the
-   trailer CRC-32 check or length doesn't match, Z_BUF_ERROR if the input ends
-   prematurely or a write error occurs, or Z_ERRNO if junk (not a another gzip
-   stream) follows a valid gzip stream.
- */
-local int gunpipe(z_stream *strm, int infile, int outfile)
-{
-    int ret, first, last;
-    unsigned have, flags, len;
-    unsigned char *next;
-    struct ind ind, *indp;
-    struct outd outd;
-
-    /* setup input buffer */
-    ind.infile = infile;
-    ind.inbuf = inbuf;
-    indp = &ind;
-
-    /* decompress concatenated gzip streams */
-    have = 0;                               /* no input data read in yet */
-    first = 1;                              /* looking for first gzip header */
-    strm->next_in = Z_NULL;                 /* so Z_BUF_ERROR means EOF */
-    for (;;) {
-        /* look for the two magic header bytes for a gzip stream */
-        if (NEXT() == -1) {
-            ret = Z_OK;
-            break;                          /* empty gzip stream is ok */
-        }
-        if (last != 31 || (NEXT() != 139 && last != 157)) {
-            strm->msg = (char *)"incorrect header check";
-            ret = first ? Z_DATA_ERROR : Z_ERRNO;
-            break;                          /* not a gzip or compress header */
-        }
-        first = 0;                          /* next non-header is junk */
-
-        /* process a compress (LZW) file -- can't be concatenated after this */
-        if (last == 157) {
-            ret = lunpipe(have, next, indp, outfile, strm);
-            break;
-        }
-
-        /* process remainder of gzip header */
-        ret = Z_BUF_ERROR;
-        if (NEXT() != 8) {                  /* only deflate method allowed */
-            if (last == -1) break;
-            strm->msg = (char *)"unknown compression method";
-            ret = Z_DATA_ERROR;
-            break;
-        }
-        flags = NEXT();                     /* header flags */
-        NEXT();                             /* discard mod time, xflgs, os */
-        NEXT();
-        NEXT();
-        NEXT();
-        NEXT();
-        NEXT();
-        if (last == -1) break;
-        if (flags & 0xe0) {
-            strm->msg = (char *)"unknown header flags set";
-            ret = Z_DATA_ERROR;
-            break;
-        }
-        if (flags & 4) {                    /* extra field */
-            len = NEXT();
-            len += (unsigned)(NEXT()) << 8;
-            if (last == -1) break;
-            while (len > have) {
-                len -= have;
-                have = 0;
-                if (NEXT() == -1) break;
-                len--;
-            }
-            if (last == -1) break;
-            have -= len;
-            next += len;
-        }
-        if (flags & 8)                      /* file name */
-            while (NEXT() != 0 && last != -1)
-                ;
-        if (flags & 16)                     /* comment */
-            while (NEXT() != 0 && last != -1)
-                ;
-        if (flags & 2) {                    /* header crc */
-            NEXT();
-            NEXT();
-        }
-        if (last == -1) break;
-
-        /* set up output */
-        outd.outfile = outfile;
-        outd.check = 1;
-        outd.crc = crc32(0L, Z_NULL, 0);
-        outd.total = 0;
-
-        /* decompress data to output */
-        strm->next_in = next;
-        strm->avail_in = have;
-        ret = inflateBack(strm, in, indp, out, &outd);
-        if (ret != Z_STREAM_END) break;
-        next = strm->next_in;
-        have = strm->avail_in;
-        strm->next_in = Z_NULL;             /* so Z_BUF_ERROR means EOF */
-
-        /* check trailer */
-        ret = Z_BUF_ERROR;
-        if (NEXT() != (outd.crc & 0xff) ||
-            NEXT() != ((outd.crc >> 8) & 0xff) ||
-            NEXT() != ((outd.crc >> 16) & 0xff) ||
-            NEXT() != ((outd.crc >> 24) & 0xff)) {
-            /* crc error */
-            if (last != -1) {
-                strm->msg = (char *)"incorrect data check";
-                ret = Z_DATA_ERROR;
-            }
-            break;
-        }
-        if (NEXT() != (outd.total & 0xff) ||
-            NEXT() != ((outd.total >> 8) & 0xff) ||
-            NEXT() != ((outd.total >> 16) & 0xff) ||
-            NEXT() != ((outd.total >> 24) & 0xff)) {
-            /* length error */
-            if (last != -1) {
-                strm->msg = (char *)"incorrect length check";
-                ret = Z_DATA_ERROR;
-            }
-            break;
-        }
-
-        /* go back and look for another gzip stream */
-    }
-
-    /* clean up and return */
-    return ret;
-}
-
-/* Copy file attributes, from -> to, as best we can.  This is best effort, so
-   no errors are reported.  The mode bits, including suid, sgid, and the sticky
-   bit are copied (if allowed), the owner's user id and group id are copied
-   (again if allowed), and the access and modify times are copied. */
-local void copymeta(char *from, char *to)
-{
-    struct stat was;
-    struct utimbuf when;
-
-    /* get all of from's Unix meta data, return if not a regular file */
-    if (stat(from, &was) != 0 || (was.st_mode & S_IFMT) != S_IFREG)
-        return;
-
-    /* set to's mode bits, ignore errors */
-    (void)chmod(to, was.st_mode & 07777);
-
-    /* copy owner's user and group, ignore errors */
-    (void)chown(to, was.st_uid, was.st_gid);
-
-    /* copy access and modify times, ignore errors */
-    when.actime = was.st_atime;
-    when.modtime = was.st_mtime;
-    (void)utime(to, &when);
-}
-
-/* Decompress the file inname to the file outnname, of if test is true, just
-   decompress without writing and check the gzip trailer for integrity.  If
-   inname is NULL or an empty string, read from stdin.  If outname is NULL or
-   an empty string, write to stdout.  strm is a pre-initialized inflateBack
-   structure.  When appropriate, copy the file attributes from inname to
-   outname.
-
-   gunzip() returns 1 if there is an out-of-memory error or an unexpected
-   return code from gunpipe().  Otherwise it returns 0.
- */
-local int gunzip(z_stream *strm, char *inname, char *outname, int test)
-{
-    int ret;
-    int infile, outfile;
-
-    /* open files */
-    if (inname == NULL || *inname == 0) {
-        inname = "-";
-        infile = 0;     /* stdin */
-    }
-    else {
-        infile = open(inname, O_RDONLY, 0);
-        if (infile == -1) {
-            fprintf(stderr, "gun cannot open %s\n", inname);
-            return 0;
-        }
-    }
-    if (test)
-        outfile = -1;
-    else if (outname == NULL || *outname == 0) {
-        outname = "-";
-        outfile = 1;    /* stdout */
-    }
-    else {
-        outfile = open(outname, O_CREAT | O_TRUNC | O_WRONLY, 0666);
-        if (outfile == -1) {
-            close(infile);
-            fprintf(stderr, "gun cannot create %s\n", outname);
-            return 0;
-        }
-    }
-    errno = 0;
-
-    /* decompress */
-    ret = gunpipe(strm, infile, outfile);
-    if (outfile > 2) close(outfile);
-    if (infile > 2) close(infile);
-
-    /* interpret result */
-    switch (ret) {
-    case Z_OK:
-    case Z_ERRNO:
-        if (infile > 2 && outfile > 2) {
-            copymeta(inname, outname);          /* copy attributes */
-            unlink(inname);
-        }
-        if (ret == Z_ERRNO)
-            fprintf(stderr, "gun warning: trailing garbage ignored in %s\n",
-                    inname);
-        break;
-    case Z_DATA_ERROR:
-        if (outfile > 2) unlink(outname);
-        fprintf(stderr, "gun data error on %s: %s\n", inname, strm->msg);
-        break;
-    case Z_MEM_ERROR:
-        if (outfile > 2) unlink(outname);
-        fprintf(stderr, "gun out of memory error--aborting\n");
-        return 1;
-    case Z_BUF_ERROR:
-        if (outfile > 2) unlink(outname);
-        if (strm->next_in != Z_NULL) {
-            fprintf(stderr, "gun write error on %s: %s\n",
-                    outname, strerror(errno));
-        }
-        else if (errno) {
-            fprintf(stderr, "gun read error on %s: %s\n",
-                    inname, strerror(errno));
-        }
-        else {
-            fprintf(stderr, "gun unexpected end of file on %s\n",
-                    inname);
-        }
-        break;
-    default:
-        if (outfile > 2) unlink(outname);
-        fprintf(stderr, "gun internal error--aborting\n");
-        return 1;
-    }
-    return 0;
-}
-
-/* Process the gun command line arguments.  See the command syntax near the
-   beginning of this source file. */
-int main(int argc, char **argv)
-{
-    int ret, len, test;
-    char *outname;
-    unsigned char *window;
-    z_stream strm;
-
-    /* initialize inflateBack state for repeated use */
-    window = match;                         /* reuse LZW match buffer */
-    strm.zalloc = Z_NULL;
-    strm.zfree = Z_NULL;
-    strm.opaque = Z_NULL;
-    ret = inflateBackInit(&strm, 15, window);
-    if (ret != Z_OK) {
-        fprintf(stderr, "gun out of memory error--aborting\n");
-        return 1;
-    }
-
-    /* decompress each file to the same name with the suffix removed */
-    argc--;
-    argv++;
-    test = 0;
-    if (argc && strcmp(*argv, "-h") == 0) {
-        fprintf(stderr, "gun 1.3 (12 Jun 2005)\n");
-        fprintf(stderr, "Copyright (c) 2005 Mark Adler\n");
-        fprintf(stderr, "usage: gun [-t] [file1.gz [file2.Z ...]]\n");
-        return 0;
-    }
-    if (argc && strcmp(*argv, "-t") == 0) {
-        test = 1;
-        argc--;
-        argv++;
-    }
-    if (argc)
-        do {
-            if (test)
-                outname = NULL;
-            else {
-                len = (int)strlen(*argv);
-                if (strcmp(*argv + len - 3, ".gz") == 0 ||
-                    strcmp(*argv + len - 3, "-gz") == 0)
-                    len -= 3;
-                else if (strcmp(*argv + len - 2, ".z") == 0 ||
-                    strcmp(*argv + len - 2, "-z") == 0 ||
-                    strcmp(*argv + len - 2, "_z") == 0 ||
-                    strcmp(*argv + len - 2, ".Z") == 0)
-                    len -= 2;
-                else {
-                    fprintf(stderr, "gun error: no gz type on %s--skipping\n",
-                            *argv);
-                    continue;
-                }
-                outname = malloc(len + 1);
-                if (outname == NULL) {
-                    fprintf(stderr, "gun out of memory error--aborting\n");
-                    ret = 1;
-                    break;
-                }
-                memcpy(outname, *argv, len);
-                outname[len] = 0;
-            }
-            ret = gunzip(&strm, *argv, outname, test);
-            if (outname != NULL) free(outname);
-            if (ret) break;
-        } while (argv++, --argc);
-    else
-        ret = gunzip(&strm, NULL, NULL, test);
-
-    /* clean up */
-    inflateBackEnd(&strm);
-    return ret;
-}
Index: trunk/minix/lib/zlib-1.2.3/examples/gzappend.c
===================================================================
--- trunk/minix/lib/zlib-1.2.3/examples/gzappend.c	(revision 9)
+++ 	(revision )
@@ -1,500 +1,0 @@
-/* gzappend -- command to append to a gzip file
-
-  Copyright (C) 2003 Mark Adler, all rights reserved
-  version 1.1, 4 Nov 2003
-
-  This software is provided 'as-is', without any express or implied
-  warranty.  In no event will the author be held liable for any damages
-  arising from the use of this software.
-
-  Permission is granted to anyone to use this software for any purpose,
-  including commercial applications, and to alter it and redistribute it
-  freely, subject to the following restrictions:
-
-  1. The origin of this software must not be misrepresented; you must not
-     claim that you wrote the original software. If you use this software
-     in a product, an acknowledgment in the product documentation would be
-     appreciated but is not required.
-  2. Altered source versions must be plainly marked as such, and must not be
-     misrepresented as being the original software.
-  3. This notice may not be removed or altered from any source distribution.
-
-  Mark Adler    madler@alumni.caltech.edu
- */
-
-/*
- * Change history:
- *
- * 1.0  19 Oct 2003     - First version
- * 1.1   4 Nov 2003     - Expand and clarify some comments and notes
- *                      - Add version and copyright to help
- *                      - Send help to stdout instead of stderr
- *                      - Add some preemptive typecasts
- *                      - Add L to constants in lseek() calls
- *                      - Remove some debugging information in error messages
- *                      - Use new data_type definition for zlib 1.2.1
- *                      - Simplfy and unify file operations
- *                      - Finish off gzip file in gztack()
- *                      - Use deflatePrime() instead of adding empty blocks
- *                      - Keep gzip file clean on appended file read errors
- *                      - Use in-place rotate instead of auxiliary buffer
- *                        (Why you ask?  Because it was fun to write!)
- */
-
-/*
-   gzappend takes a gzip file and appends to it, compressing files from the
-   command line or data from stdin.  The gzip file is written to directly, to
-   avoid copying that file, in case it's large.  Note that this results in the
-   unfriendly behavior that if gzappend fails, the gzip file is corrupted.
-
-   This program was written to illustrate the use of the new Z_BLOCK option of
-   zlib 1.2.x's inflate() function.  This option returns from inflate() at each
-   block boundary to facilitate locating and modifying the last block bit at
-   the start of the final deflate block.  Also whether using Z_BLOCK or not,
-   another required feature of zlib 1.2.x is that inflate() now provides the
-   number of unusued bits in the last input byte used.  gzappend will not work
-   with versions of zlib earlier than 1.2.1.
-
-   gzappend first decompresses the gzip file internally, discarding all but
-   the last 32K of uncompressed data, and noting the location of the last block
-   bit and the number of unused bits in the last byte of the compressed data.
-   The gzip trailer containing the CRC-32 and length of the uncompressed data
-   is verified.  This trailer will be later overwritten.
-
-   Then the last block bit is cleared by seeking back in the file and rewriting
-   the byte that contains it.  Seeking forward, the last byte of the compressed
-   data is saved along with the number of unused bits to initialize deflate.
-
-   A deflate process is initialized, using the last 32K of the uncompressed
-   data from the gzip file to initialize the dictionary.  If the total
-   uncompressed data was less than 32K, then all of it is used to initialize
-   the dictionary.  The deflate output bit buffer is also initialized with the
-   last bits from the original deflate stream.  From here on, the data to
-   append is simply compressed using deflate, and written to the gzip file.
-   When that is complete, the new CRC-32 and uncompressed length are written
-   as the trailer of the gzip file.
- */
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <fcntl.h>
-#include <unistd.h>
-#include "zlib.h"
-
-#define local static
-#define LGCHUNK 14
-#define CHUNK (1U << LGCHUNK)
-#define DSIZE 32768U
-
-/* print an error message and terminate with extreme prejudice */
-local void bye(char *msg1, char *msg2)
-{
-    fprintf(stderr, "gzappend error: %s%s\n", msg1, msg2);
-    exit(1);
-}
-
-/* return the greatest common divisor of a and b using Euclid's algorithm,
-   modified to be fast when one argument much greater than the other, and
-   coded to avoid unnecessary swapping */
-local unsigned gcd(unsigned a, unsigned b)
-{
-    unsigned c;
-
-    while (a && b)
-        if (a > b) {
-            c = b;
-            while (a - c >= c)
-                c <<= 1;
-            a -= c;
-        }
-        else {
-            c = a;
-            while (b - c >= c)
-                c <<= 1;
-            b -= c;
-        }
-    return a + b;
-}
-
-/* rotate list[0..len-1] left by rot positions, in place */
-local void rotate(unsigned char *list, unsigned len, unsigned rot)
-{
-    unsigned char tmp;
-    unsigned cycles;
-    unsigned char *start, *last, *to, *from;
-
-    /* normalize rot and handle degenerate cases */
-    if (len < 2) return;
-    if (rot >= len) rot %= len;
-    if (rot == 0) return;
-
-    /* pointer to last entry in list */
-    last = list + (len - 1);
-
-    /* do simple left shift by one */
-    if (rot == 1) {
-        tmp = *list;
-        memcpy(list, list + 1, len - 1);
-        *last = tmp;
-        return;
-    }
-
-    /* do simple right shift by one */
-    if (rot == len - 1) {
-        tmp = *last;
-        memmove(list + 1, list, len - 1);
-        *list = tmp;
-        return;
-    }
-
-    /* otherwise do rotate as a set of cycles in place */
-    cycles = gcd(len, rot);             /* number of cycles */
-    do {
-        start = from = list + cycles;   /* start index is arbitrary */
-        tmp = *from;                    /* save entry to be overwritten */
-        for (;;) {
-            to = from;                  /* next step in cycle */
-            from += rot;                /* go right rot positions */
-            if (from > last) from -= len;   /* (pointer better not wrap) */
-            if (from == start) break;   /* all but one shifted */
-            *to = *from;                /* shift left */
-        }
-        *to = tmp;                      /* complete the circle */
-    } while (--cycles);
-}
-
-/* structure for gzip file read operations */
-typedef struct {
-    int fd;                     /* file descriptor */
-    int size;                   /* 1 << size is bytes in buf */
-    unsigned left;              /* bytes available at next */
-    unsigned char *buf;         /* buffer */
-    unsigned char *next;        /* next byte in buffer */
-    char *name;                 /* file name for error messages */
-} file;
-
-/* reload buffer */
-local int readin(file *in)
-{
-    int len;
-
-    len = read(in->fd, in->buf, 1 << in->size);
-    if (len == -1) bye("error reading ", in->name);
-    in->left = (unsigned)len;
-    in->next = in->buf;
-    return len;
-}
-
-/* read from file in, exit if end-of-file */
-local int readmore(file *in)
-{
-    if (readin(in) == 0) bye("unexpected end of ", in->name);
-    return 0;
-}
-
-#define read1(in) (in->left == 0 ? readmore(in) : 0, \
-                   in->left--, *(in->next)++)
-
-/* skip over n bytes of in */
-local void skip(file *in, unsigned n)
-{
-    unsigned bypass;
-
-    if (n > in->left) {
-        n -= in->left;
-        bypass = n & ~((1U << in->size) - 1);
-        if (bypass) {
-            if (lseek(in->fd, (off_t)bypass, SEEK_CUR) == -1)
-                bye("seeking ", in->name);
-            n -= bypass;
-        }
-        readmore(in);
-        if (n > in->left)
-            bye("unexpected end of ", in->name);
-    }
-    in->left -= n;
-    in->next += n;
-}
-
-/* read a four-byte unsigned integer, little-endian, from in */
-unsigned long read4(file *in)
-{
-    unsigned long val;
-
-    val = read1(in);
-    val += (unsigned)read1(in) << 8;
-    val += (unsigned long)read1(in) << 16;
-    val += (unsigned long)read1(in) << 24;
-    return val;
-}
-
-/* skip over gzip header */
-local void gzheader(file *in)
-{
-    int flags;
-    unsigned n;
-
-    if (read1(in) != 31 || read1(in) != 139) bye(in->name, " not a gzip file");
-    if (read1(in) != 8) bye("unknown compression method in", in->name);
-    flags = read1(in);
-    if (flags & 0xe0) bye("unknown header flags set in", in->name);
-    skip(in, 6);
-    if (flags & 4) {
-        n = read1(in);
-        n += (unsigned)(read1(in)) << 8;
-        skip(in, n);
-    }
-    if (flags & 8) while (read1(in) != 0) ;
-    if (flags & 16) while (read1(in) != 0) ;
-    if (flags & 2) skip(in, 2);
-}
-
-/* decompress gzip file "name", return strm with a deflate stream ready to
-   continue compression of the data in the gzip file, and return a file
-   descriptor pointing to where to write the compressed data -- the deflate
-   stream is initialized to compress using level "level" */
-local int gzscan(char *name, z_stream *strm, int level)
-{
-    int ret, lastbit, left, full;
-    unsigned have;
-    unsigned long crc, tot;
-    unsigned char *window;
-    off_t lastoff, end;
-    file gz;
-
-    /* open gzip file */
-    gz.name = name;
-    gz.fd = open(name, O_RDWR, 0);
-    if (gz.fd == -1) bye("cannot open ", name);
-    gz.buf = malloc(CHUNK);
-    if (gz.buf == NULL) bye("out of memory", "");
-    gz.size = LGCHUNK;
-    gz.left = 0;
-
-    /* skip gzip header */
-    gzheader(&gz);
-
-    /* prepare to decompress */
-    window = malloc(DSIZE);
-    if (window == NULL) bye("out of memory", "");
-    strm->zalloc = Z_NULL;
-    strm->zfree = Z_NULL;
-    strm->opaque = Z_NULL;
-    ret = inflateInit2(strm, -15);
-    if (ret != Z_OK) bye("out of memory", " or library mismatch");
-
-    /* decompress the deflate stream, saving append information */
-    lastbit = 0;
-    lastoff = lseek(gz.fd, 0L, SEEK_CUR) - gz.left;
-    left = 0;
-    strm->avail_in = gz.left;
-    strm->next_in = gz.next;
-    crc = crc32(0L, Z_NULL, 0);
-    have = full = 0;
-    do {
-        /* if needed, get more input */
-        if (strm->avail_in == 0) {
-            readmore(&gz);
-            strm->avail_in = gz.left;
-            strm->next_in = gz.next;
-        }
-
-        /* set up output to next available section of sliding window */
-        strm->avail_out = DSIZE - have;
-        strm->next_out = window + have;
-
-        /* inflate and check for errors */
-        ret = inflate(strm, Z_BLOCK);
-        if (ret == Z_STREAM_ERROR) bye("internal stream error!", "");
-        if (ret == Z_MEM_ERROR) bye("out of memory", "");
-        if (ret == Z_DATA_ERROR)
-            bye("invalid compressed data--format violated in", name);
-
-        /* update crc and sliding window pointer */
-        crc = crc32(crc, window + have, DSIZE - have - strm->avail_out);
-        if (strm->avail_out)
-            have = DSIZE - strm->avail_out;
-        else {
-            have = 0;
-            full = 1;
-        }
-
-        /* process end of block */
-        if (strm->data_type & 128) {
-            if (strm->data_type & 64)
-                left = strm->data_type & 0x1f;
-            else {
-                lastbit = strm->data_type & 0x1f;
-                lastoff = lseek(gz.fd, 0L, SEEK_CUR) - strm->avail_in;
-            }
-        }
-    } while (ret != Z_STREAM_END);
-    inflateEnd(strm);
-    gz.left = strm->avail_in;
-    gz.next = strm->next_in;
-
-    /* save the location of the end of the compressed data */
-    end = lseek(gz.fd, 0L, SEEK_CUR) - gz.left;
-
-    /* check gzip trailer and save total for deflate */
-    if (crc != read4(&gz))
-        bye("invalid compressed data--crc mismatch in ", name);
-    tot = strm->total_out;
-    if ((tot & 0xffffffffUL) != read4(&gz))
-        bye("invalid compressed data--length mismatch in", name);
-
-    /* if not at end of file, warn */
-    if (gz.left || readin(&gz))
-        fprintf(stderr,
-            "gzappend warning: junk at end of gzip file overwritten\n");
-
-    /* clear last block bit */
-    lseek(gz.fd, lastoff - (lastbit != 0), SEEK_SET);
-    if (read(gz.fd, gz.buf, 1) != 1) bye("reading after seek on ", name);
-    *gz.buf = (unsigned char)(*gz.buf ^ (1 << ((8 - lastbit) & 7)));
-    lseek(gz.fd, -1L, SEEK_CUR);
-    if (write(gz.fd, gz.buf, 1) != 1) bye("writing after seek to ", name);
-
-    /* if window wrapped, build dictionary from window by rotating */
-    if (full) {
-        rotate(window, DSIZE, have);
-        have = DSIZE;
-    }
-
-    /* set up deflate stream with window, crc, total_in, and leftover bits */
-    ret = deflateInit2(strm, level, Z_DEFLATED, -15, 8, Z_DEFAULT_STRATEGY);
-    if (ret != Z_OK) bye("out of memory", "");
-    deflateSetDictionary(strm, window, have);
-    strm->adler = crc;
-    strm->total_in = tot;
-    if (left) {
-        lseek(gz.fd, --end, SEEK_SET);
-        if (read(gz.fd, gz.buf, 1) != 1) bye("reading after seek on ", name);
-        deflatePrime(strm, 8 - left, *gz.buf);
-    }
-    lseek(gz.fd, end, SEEK_SET);
-
-    /* clean up and return */
-    free(window);
-    free(gz.buf);
-    return gz.fd;
-}
-
-/* append file "name" to gzip file gd using deflate stream strm -- if last
-   is true, then finish off the deflate stream at the end */
-local void gztack(char *name, int gd, z_stream *strm, int last)
-{
-    int fd, len, ret;
-    unsigned left;
-    unsigned char *in, *out;
-
-    /* open file to compress and append */
-    fd = 0;
-    if (name != NULL) {
-        fd = open(name, O_RDONLY, 0);
-        if (fd == -1)
-            fprintf(stderr, "gzappend warning: %s not found, skipping ...\n",
-                    name);
-    }
-
-    /* allocate buffers */
-    in = fd == -1 ? NULL : malloc(CHUNK);
-    out = malloc(CHUNK);
-    if (out == NULL) bye("out of memory", "");
-
-    /* compress input file and append to gzip file */
-    do {
-        /* get more input */
-        len = fd == -1 ? 0 : read(fd, in, CHUNK);
-        if (len == -1) {
-            fprintf(stderr,
-                    "gzappend warning: error reading %s, skipping rest ...\n",
-                    name);
-            len = 0;
-        }
-        strm->avail_in = (unsigned)len;
-        strm->next_in = in;
-        if (len) strm->adler = crc32(strm->adler, in, (unsigned)len);
-
-        /* compress and write all available output */
-        do {
-            strm->avail_out = CHUNK;
-            strm->next_out = out;
-            ret = deflate(strm, last && len == 0 ? Z_FINISH : Z_NO_FLUSH);
-            left = CHUNK - strm->avail_out;
-            while (left) {
-                len = write(gd, out + CHUNK - strm->avail_out - left, left);
-                if (len == -1) bye("writing gzip file", "");
-                left -= (unsigned)len;
-            }
-        } while (strm->avail_out == 0 && ret != Z_STREAM_END);
-    } while (len != 0);
-
-    /* write trailer after last entry */
-    if (last) {
-        deflateEnd(strm);
-        out[0] = (unsigned char)(strm->adler);
-        out[1] = (unsigned char)(strm->adler >> 8);
-        out[2] = (unsigned char)(strm->adler >> 16);
-        out[3] = (unsigned char)(strm->adler >> 24);
-        out[4] = (unsigned char)(strm->total_in);
-        out[5] = (unsigned char)(strm->total_in >> 8);
-        out[6] = (unsigned char)(strm->total_in >> 16);
-        out[7] = (unsigned char)(strm->total_in >> 24);
-        len = 8;
-        do {
-            ret = write(gd, out + 8 - len, len);
-            if (ret == -1) bye("writing gzip file", "");
-            len -= ret;
-        } while (len);
-        close(gd);
-    }
-
-    /* clean up and return */
-    free(out);
-    if (in != NULL) free(in);
-    if (fd > 0) close(fd);
-}
-
-/* process the compression level option if present, scan the gzip file, and
-   append the specified files, or append the data from stdin if no other file
-   names are provided on the command line -- the gzip file must be writable
-   and seekable */
-int main(int argc, char **argv)
-{
-    int gd, level;
-    z_stream strm;
-
-    /* ignore command name */
-    argv++;
-
-    /* provide usage if no arguments */
-    if (*argv == NULL) {
-        printf("gzappend 1.1 (4 Nov 2003) Copyright (C) 2003 Mark Adler\n");
-        printf(
-            "usage: gzappend [-level] file.gz [ addthis [ andthis ... ]]\n");
-        return 0;
-    }
-
-    /* set compression level */
-    level = Z_DEFAULT_COMPRESSION;
-    if (argv[0][0] == '-') {
-        if (argv[0][1] < '0' || argv[0][1] > '9' || argv[0][2] != 0)
-            bye("invalid compression level", "");
-        level = argv[0][1] - '0';
-        if (*++argv == NULL) bye("no gzip file name after options", "");
-    }
-
-    /* prepare to append to gzip file */
-    gd = gzscan(*argv++, &strm, level);
-
-    /* append files on command line, or from stdin if none */
-    if (*argv == NULL)
-        gztack(NULL, gd, &strm, 1);
-    else
-        do {
-            gztack(*argv, gd, &strm, argv[1] == NULL);
-        } while (*++argv != NULL);
-    return 0;
-}
Index: trunk/minix/lib/zlib-1.2.3/examples/gzjoin.c
===================================================================
--- trunk/minix/lib/zlib-1.2.3/examples/gzjoin.c	(revision 9)
+++ 	(revision )
@@ -1,448 +1,0 @@
-/* gzjoin -- command to join gzip files into one gzip file
-
-  Copyright (C) 2004 Mark Adler, all rights reserved
-  version 1.0, 11 Dec 2004
-
-  This software is provided 'as-is', without any express or implied
-  warranty.  In no event will the author be held liable for any damages
-  arising from the use of this software.
-
-  Permission is granted to anyone to use this software for any purpose,
-  including commercial applications, and to alter it and redistribute it
-  freely, subject to the following restrictions:
-
-  1. The origin of this software must not be misrepresented; you must not
-     claim that you wrote the original software. If you use this software
-     in a product, an acknowledgment in the product documentation would be
-     appreciated but is not required.
-  2. Altered source versions must be plainly marked as such, and must not be
-     misrepresented as being the original software.
-  3. This notice may not be removed or altered from any source distribution.
-
-  Mark Adler    madler@alumni.caltech.edu
- */
-
-/*
- * Change history:
- *
- * 1.0  11 Dec 2004     - First version
- * 1.1  12 Jun 2005     - Changed ssize_t to long for portability
- */
-
-/*
-   gzjoin takes one or more gzip files on the command line and writes out a
-   single gzip file that will uncompress to the concatenation of the
-   uncompressed data from the individual gzip files.  gzjoin does this without
-   having to recompress any of the data and without having to calculate a new
-   crc32 for the concatenated uncompressed data.  gzjoin does however have to
-   decompress all of the input data in order to find the bits in the compressed
-   data that need to be modified to concatenate the streams.
-
-   gzjoin does not do an integrity check on the input gzip files other than
-   checking the gzip header and decompressing the compressed data.  They are
-   otherwise assumed to be complete and correct.
-
-   Each joint between gzip files removes at least 18 bytes of previous trailer
-   and subsequent header, and inserts an average of about three bytes to the
-   compressed data in order to connect the streams.  The output gzip file
-   has a minimal ten-byte gzip header with no file name or modification time.
-
-   This program was written to illustrate the use of the Z_BLOCK option of
-   inflate() and the crc32_combine() function.  gzjoin will not compile with
-   versions of zlib earlier than 1.2.3.
- */
-
-#include <stdio.h>      /* fputs(), fprintf(), fwrite(), putc() */
-#include <stdlib.h>     /* exit(), malloc(), free() */
-#include <fcntl.h>      /* open() */
-#include <unistd.h>     /* close(), read(), lseek() */
-#include "zlib.h"
-    /* crc32(), crc32_combine(), inflateInit2(), inflate(), inflateEnd() */
-
-#define local static
-
-/* exit with an error (return a value to allow use in an expression) */
-local int bail(char *why1, char *why2)
-{
-    fprintf(stderr, "gzjoin error: %s%s, output incomplete\n", why1, why2);
-    exit(1);
-    return 0;
-}
-
-/* -- simple buffered file input with access to the buffer -- */
-
-#define CHUNK 32768         /* must be a power of two and fit in unsigned */
-
-/* bin buffered input file type */
-typedef struct {
-    char *name;             /* name of file for error messages */
-    int fd;                 /* file descriptor */
-    unsigned left;          /* bytes remaining at next */
-    unsigned char *next;    /* next byte to read */
-    unsigned char *buf;     /* allocated buffer of length CHUNK */
-} bin;
-
-/* close a buffered file and free allocated memory */
-local void bclose(bin *in)
-{
-    if (in != NULL) {
-        if (in->fd != -1)
-            close(in->fd);
-        if (in->buf != NULL)
-            free(in->buf);
-        free(in);
-    }
-}
-
-/* open a buffered file for input, return a pointer to type bin, or NULL on
-   failure */
-local bin *bopen(char *name)
-{
-    bin *in;
-
-    in = malloc(sizeof(bin));
-    if (in == NULL)
-        return NULL;
-    in->buf = malloc(CHUNK);
-    in->fd = open(name, O_RDONLY, 0);
-    if (in->buf == NULL || in->fd == -1) {
-        bclose(in);
-        return NULL;
-    }
-    in->left = 0;
-    in->next = in->buf;
-    in->name = name;
-    return in;
-}
-
-/* load buffer from file, return -1 on read error, 0 or 1 on success, with
-   1 indicating that end-of-file was reached */
-local int bload(bin *in)
-{
-    long len;
-
-    if (in == NULL)
-        return -1;
-    if (in->left != 0)
-        return 0;
-    in->next = in->buf;
-    do {
-        len = (long)read(in->fd, in->buf + in->left, CHUNK - in->left);
-        if (len < 0)
-            return -1;
-        in->left += (unsigned)len;
-    } while (len != 0 && in->left < CHUNK);
-    return len == 0 ? 1 : 0;
-}
-
-/* get a byte from the file, bail if end of file */
-#define bget(in) (in->left ? 0 : bload(in), \
-                  in->left ? (in->left--, *(in->next)++) : \
-                    bail("unexpected end of file on ", in->name))
-
-/* get a four-byte little-endian unsigned integer from file */
-local unsigned long bget4(bin *in)
-{
-    unsigned long val;
-
-    val = bget(in);
-    val += (unsigned long)(bget(in)) << 8;
-    val += (unsigned long)(bget(in)) << 16;
-    val += (unsigned long)(bget(in)) << 24;
-    return val;
-}
-
-/* skip bytes in file */
-local void bskip(bin *in, unsigned skip)
-{
-    /* check pointer */
-    if (in == NULL)
-        return;
-
-    /* easy case -- skip bytes in buffer */
-    if (skip <= in->left) {
-        in->left -= skip;
-        in->next += skip;
-        return;
-    }
-
-    /* skip what's in buffer, discard buffer contents */
-    skip -= in->left;
-    in->left = 0;
-
-    /* seek past multiples of CHUNK bytes */
-    if (skip > CHUNK) {
-        unsigned left;
-
-        left = skip & (CHUNK - 1);
-        if (left == 0) {
-            /* exact number of chunks: seek all the way minus one byte to check
-               for end-of-file with a read */
-            lseek(in->fd, skip - 1, SEEK_CUR);
-            if (read(in->fd, in->buf, 1) != 1)
-                bail("unexpected end of file on ", in->name);
-            return;
-        }
-
-        /* skip the integral chunks, update skip with remainder */
-        lseek(in->fd, skip - left, SEEK_CUR);
-        skip = left;
-    }
-
-    /* read more input and skip remainder */
-    bload(in);
-    if (skip > in->left)
-        bail("unexpected end of file on ", in->name);
-    in->left -= skip;
-    in->next += skip;
-}
-
-/* -- end of buffered input functions -- */
-
-/* skip the gzip header from file in */
-local void gzhead(bin *in)
-{
-    int flags;
-
-    /* verify gzip magic header and compression method */
-    if (bget(in) != 0x1f || bget(in) != 0x8b || bget(in) != 8)
-        bail(in->name, " is not a valid gzip file");
-
-    /* get and verify flags */
-    flags = bget(in);
-    if ((flags & 0xe0) != 0)
-        bail("unknown reserved bits set in ", in->name);
-
-    /* skip modification time, extra flags, and os */
-    bskip(in, 6);
-
-    /* skip extra field if present */
-    if (flags & 4) {
-        unsigned len;
-
-        len = bget(in);
-        len += (unsigned)(bget(in)) << 8;
-        bskip(in, len);
-    }
-
-    /* skip file name if present */
-    if (flags & 8)
-        while (bget(in) != 0)
-            ;
-
-    /* skip comment if present */
-    if (flags & 16)
-        while (bget(in) != 0)
-            ;
-
-    /* skip header crc if present */
-    if (flags & 2)
-        bskip(in, 2);
-}
-
-/* write a four-byte little-endian unsigned integer to out */
-local void put4(unsigned long val, FILE *out)
-{
-    putc(val & 0xff, out);
-    putc((val >> 8) & 0xff, out);
-    putc((val >> 16) & 0xff, out);
-    putc((val >> 24) & 0xff, out);
-}
-
-/* Load up zlib stream from buffered input, bail if end of file */
-local void zpull(z_streamp strm, bin *in)
-{
-    if (in->left == 0)
-        bload(in);
-    if (in->left == 0)
-        bail("unexpected end of file on ", in->name);
-    strm->avail_in = in->left;
-    strm->next_in = in->next;
-}
-
-/* Write header for gzip file to out and initialize trailer. */
-local void gzinit(unsigned long *crc, unsigned long *tot, FILE *out)
-{
-    fwrite("\x1f\x8b\x08\0\0\0\0\0\0\xff", 1, 10, out);
-    *crc = crc32(0L, Z_NULL, 0);
-    *tot = 0;
-}
-
-/* Copy the compressed data from name, zeroing the last block bit of the last
-   block if clr is true, and adding empty blocks as needed to get to a byte
-   boundary.  If clr is false, then the last block becomes the last block of
-   the output, and the gzip trailer is written.  crc and tot maintains the
-   crc and length (modulo 2^32) of the output for the trailer.  The resulting
-   gzip file is written to out.  gzinit() must be called before the first call
-   of gzcopy() to write the gzip header and to initialize crc and tot. */
-local void gzcopy(char *name, int clr, unsigned long *crc, unsigned long *tot,
-                  FILE *out)
-{
-    int ret;                /* return value from zlib functions */
-    int pos;                /* where the "last block" bit is in byte */
-    int last;               /* true if processing the last block */
-    bin *in;                /* buffered input file */
-    unsigned char *start;   /* start of compressed data in buffer */
-    unsigned char *junk;    /* buffer for uncompressed data -- discarded */
-    z_off_t len;            /* length of uncompressed data (support > 4 GB) */
-    z_stream strm;          /* zlib inflate stream */
-
-    /* open gzip file and skip header */
-    in = bopen(name);
-    if (in == NULL)
-        bail("could not open ", name);
-    gzhead(in);
-
-    /* allocate buffer for uncompressed data and initialize raw inflate
-       stream */
-    junk = malloc(CHUNK);
-    strm.zalloc = Z_NULL;
-    strm.zfree = Z_NULL;
-    strm.opaque = Z_NULL;
-    strm.avail_in = 0;
-    strm.next_in = Z_NULL;
-    ret = inflateInit2(&strm, -15);
-    if (junk == NULL || ret != Z_OK)
-        bail("out of memory", "");
-
-    /* inflate and copy compressed data, clear last-block bit if requested */
-    len = 0;
-    zpull(&strm, in);
-    start = strm.next_in;
-    last = start[0] & 1;
-    if (last && clr)
-        start[0] &= ~1;
-    strm.avail_out = 0;
-    for (;;) {
-        /* if input used and output done, write used input and get more */
-        if (strm.avail_in == 0 && strm.avail_out != 0) {
-            fwrite(start, 1, strm.next_in - start, out);
-            start = in->buf;
-            in->left = 0;
-            zpull(&strm, in);
-        }
-
-        /* decompress -- return early when end-of-block reached */
-        strm.avail_out = CHUNK;
-        strm.next_out = junk;
-        ret = inflate(&strm, Z_BLOCK);
-        switch (ret) {
-        case Z_MEM_ERROR:
-            bail("out of memory", "");
-        case Z_DATA_ERROR:
-            bail("invalid compressed data in ", in->name);
-        }
-
-        /* update length of uncompressed data */
-        len += CHUNK - strm.avail_out;
-
-        /* check for block boundary (only get this when block copied out) */
-        if (strm.data_type & 128) {
-            /* if that was the last block, then done */
-            if (last)
-                break;
-
-            /* number of unused bits in last byte */
-            pos = strm.data_type & 7;
-
-            /* find the next last-block bit */
-            if (pos != 0) {
-                /* next last-block bit is in last used byte */
-                pos = 0x100 >> pos;
-                last = strm.next_in[-1] & pos;
-                if (last && clr)
-                    strm.next_in[-1] &= ~pos;
-            }
-            else {
-                /* next last-block bit is in next unused byte */
-                if (strm.avail_in == 0) {
-                    /* don't have that byte yet -- get it */
-                    fwrite(start, 1, strm.next_in - start, out);
-                    start = in->buf;
-                    in->left = 0;
-                    zpull(&strm, in);
-                }
-                last = strm.next_in[0] & 1;
-                if (last && clr)
-                    strm.next_in[0] &= ~1;
-            }
-        }
-    }
-
-    /* update buffer with unused input */
-    in->left = strm.avail_in;
-    in->next = strm.next_in;
-
-    /* copy used input, write empty blocks to get to byte boundary */
-    pos = strm.data_type & 7;
-    fwrite(start, 1, in->next - start - 1, out);
-    last = in->next[-1];
-    if (pos == 0 || !clr)
-        /* already at byte boundary, or last file: write last byte */
-        putc(last, out);
-    else {
-        /* append empty blocks to last byte */
-        last &= ((0x100 >> pos) - 1);       /* assure unused bits are zero */
-        if (pos & 1) {
-            /* odd -- append an empty stored block */
-            putc(last, out);
-            if (pos == 1)
-                putc(0, out);               /* two more bits in block header */
-            fwrite("\0\0\xff\xff", 1, 4, out);
-        }
-        else {
-            /* even -- append 1, 2, or 3 empty fixed blocks */
-            switch (pos) {
-            case 6:
-                putc(last | 8, out);
-                last = 0;
-            case 4:
-                putc(last | 0x20, out);
-                last = 0;
-            case 2:
-                putc(last | 0x80, out);
-                putc(0, out);
-            }
-        }
-    }
-
-    /* update crc and tot */
-    *crc = crc32_combine(*crc, bget4(in), len);
-    *tot += (unsigned long)len;
-
-    /* clean up */
-    inflateEnd(&strm);
-    free(junk);
-    bclose(in);
-
-    /* write trailer if this is the last gzip file */
-    if (!clr) {
-        put4(*crc, out);
-        put4(*tot, out);
-    }
-}
-
-/* join the gzip files on the command line, write result to stdout */
-int main(int argc, char **argv)
-{
-    unsigned long crc, tot;     /* running crc and total uncompressed length */
-
-    /* skip command name */
-    argc--;
-    argv++;
-
-    /* show usage if no arguments */
-    if (argc == 0) {
-        fputs("gzjoin usage: gzjoin f1.gz [f2.gz [f3.gz ...]] > fjoin.gz\n",
-              stderr);
-        return 0;
-    }
-
-    /* join gzip files on command line and write to stdout */
-    gzinit(&crc, &tot, stdout);
-    while (argc--)
-        gzcopy(*argv++, argc, &crc, &tot, stdout);
-
-    /* done */
-    return 0;
-}
Index: trunk/minix/lib/zlib-1.2.3/examples/gzlog.c
===================================================================
--- trunk/minix/lib/zlib-1.2.3/examples/gzlog.c	(revision 9)
+++ 	(revision )
@@ -1,413 +1,0 @@
-/*
- * gzlog.c
- * Copyright (C) 2004 Mark Adler
- * For conditions of distribution and use, see copyright notice in gzlog.h
- * version 1.0, 26 Nov 2004
- *
- */
-
-#include <string.h>             /* memcmp() */
-#include <stdlib.h>             /* malloc(), free(), NULL */
-#include <sys/types.h>          /* size_t, off_t */
-#include <unistd.h>             /* read(), close(), sleep(), ftruncate(), */
-                                /* lseek() */
-#include <fcntl.h>              /* open() */
-#include <sys/file.h>           /* flock() */
-#include "zlib.h"               /* deflateInit2(), deflate(), deflateEnd() */
-
-#include "gzlog.h"              /* interface */
-#define local static
-
-/* log object structure */
-typedef struct {
-    int id;                 /* object identifier */
-    int fd;                 /* log file descriptor */
-    off_t extra;            /* offset of extra "ap" subfield */
-    off_t mark_off;         /* offset of marked data */
-    off_t last_off;         /* offset of last block */
-    unsigned long crc;      /* uncompressed crc */
-    unsigned long len;      /* uncompressed length (modulo 2^32) */
-    unsigned stored;        /* length of current stored block */
-} gz_log;
-
-#define GZLOGID 19334       /* gz_log object identifier */
-
-#define LOCK_RETRY 1            /* retry lock once a second */
-#define LOCK_PATIENCE 1200      /* try about twenty minutes before forcing */
-
-/* acquire a lock on a file */
-local int lock(int fd)
-{
-    int patience;
-
-    /* try to lock every LOCK_RETRY seconds for LOCK_PATIENCE seconds */
-    patience = LOCK_PATIENCE;
-    do {
-        if (flock(fd, LOCK_EX + LOCK_NB) == 0)
-            return 0;
-        (void)sleep(LOCK_RETRY);
-        patience -= LOCK_RETRY;
-    } while (patience > 0);
-
-    /* we've run out of patience -- give up */
-    return -1;
-}
-
-/* release lock */
-local void unlock(int fd)
-{
-    (void)flock(fd, LOCK_UN);
-}
-
-/* release a log object */
-local void log_clean(gz_log *log)
-{
-    unlock(log->fd);
-    (void)close(log->fd);
-    free(log);
-}
-
-/* read an unsigned long from a byte buffer little-endian */
-local unsigned long make_ulg(unsigned char *buf)
-{
-    int n;
-    unsigned long val;
-
-    val = (unsigned long)(*buf++);
-    for (n = 8; n < 32; n += 8)
-        val += (unsigned long)(*buf++) << n;
-    return val;
-}
-
-/* read an off_t from a byte buffer little-endian */
-local off_t make_off(unsigned char *buf)
-{
-    int n;
-    off_t val;
-
-    val = (off_t)(*buf++);
-    for (n = 8; n < 64; n += 8)
-        val += (off_t)(*buf++) << n;
-    return val;
-}
-
-/* write an unsigned long little-endian to byte buffer */
-local void dice_ulg(unsigned long val, unsigned char *buf)
-{
-    int n;
-
-    for (n = 0; n < 4; n++) {
-        *buf++ = val & 0xff;
-        val >>= 8;
-    }
-}
-
-/* write an off_t little-endian to byte buffer */
-local void dice_off(off_t val, unsigned char *buf)
-{
-    int n;
-
-    for (n = 0; n < 8; n++) {
-        *buf++ = val & 0xff;
-        val >>= 8;
-    }
-}
-
-/* initial, empty gzip file for appending */
-local char empty_gz[] = {
-    0x1f, 0x8b,                 /* magic gzip id */
-    8,                          /* compression method is deflate */
-    4,                          /* there is an extra field */
-    0, 0, 0, 0,                 /* no modification time provided */
-    0, 0xff,                    /* no extra flags, no OS */
-    20, 0, 'a', 'p', 16, 0,     /* extra field with "ap" subfield */
-    32, 0, 0, 0, 0, 0, 0, 0,    /* offset of uncompressed data */
-    32, 0, 0, 0, 0, 0, 0, 0,    /* offset of last block */
-    1, 0, 0, 0xff, 0xff,        /* empty stored block (last) */
-    0, 0, 0, 0,                 /* crc */
-    0, 0, 0, 0                  /* uncompressed length */
-};
-
-/* initialize a log object with locking */
-void *gzlog_open(char *path)
-{
-    unsigned xlen;
-    unsigned char temp[20];
-    unsigned sub_len;
-    int good;
-    gz_log *log;
-
-    /* allocate log structure */
-    log = malloc(sizeof(gz_log));
-    if (log == NULL)
-        return NULL;
-    log->id = GZLOGID;
-
-    /* open file, creating it if necessary, and locking it */
-    log->fd = open(path, O_RDWR | O_CREAT, 0600);
-    if (log->fd < 0) {
-        free(log);
-        return NULL;
-    }
-    if (lock(log->fd)) {
-        close(log->fd);
-        free(log);
-        return NULL;
-    }
-
-    /* if file is empty, write new gzip stream */
-    if (lseek(log->fd, 0, SEEK_END) == 0) {
-        if (write(log->fd, empty_gz, sizeof(empty_gz)) != sizeof(empty_gz)) {
-            log_clean(log);
-            return NULL;
-        }
-    }
-
-    /* check gzip header */
-    (void)lseek(log->fd, 0, SEEK_SET);
-    if (read(log->fd, temp, 12) != 12 || temp[0] != 0x1f ||
-        temp[1] != 0x8b || temp[2] != 8 || (temp[3] & 4) == 0) {
-        log_clean(log);
-        return NULL;
-    }
-
-    /* process extra field to find "ap" sub-field */
-    xlen = temp[10] + (temp[11] << 8);
-    good = 0;
-    while (xlen) {
-        if (xlen < 4 || read(log->fd, temp, 4) != 4)
-            break;
-        sub_len = temp[2];
-        sub_len += temp[3] << 8;
-        xlen -= 4;
-        if (memcmp(temp, "ap", 2) == 0 && sub_len == 16) {
-            good = 1;
-            break;
-        }
-        if (xlen < sub_len)
-            break;
-        (void)lseek(log->fd, sub_len, SEEK_CUR);
-        xlen -= sub_len;
-    }
-    if (!good) {
-        log_clean(log);
-        return NULL;
-    }
-
-    /* read in "ap" sub-field */
-    log->extra = lseek(log->fd, 0, SEEK_CUR);
-    if (read(log->fd, temp, 16) != 16) {
-        log_clean(log);
-        return NULL;
-    }
-    log->mark_off = make_off(temp);
-    log->last_off = make_off(temp + 8);
-
-    /* get crc, length of gzip file */
-    (void)lseek(log->fd, log->last_off, SEEK_SET);
-    if (read(log->fd, temp, 13) != 13 ||
-        memcmp(temp, "\001\000\000\377\377", 5) != 0) {
-        log_clean(log);
-        return NULL;
-    }
-    log->crc = make_ulg(temp + 5);
-    log->len = make_ulg(temp + 9);
-
-    /* set up to write over empty last block */
-    (void)lseek(log->fd, log->last_off + 5, SEEK_SET);
-    log->stored = 0;
-    return (void *)log;
-}
-
-/* maximum amount to put in a stored block before starting a new one */
-#define MAX_BLOCK 16384
-
-/* write a block to a log object */
-int gzlog_write(void *obj, char *data, size_t len)
-{
-    size_t some;
-    unsigned char temp[5];
-    gz_log *log;
-
-    /* check object */
-    log = (gz_log *)obj;
-    if (log == NULL || log->id != GZLOGID)
-        return 1;
-
-    /* write stored blocks until all of the input is written */
-    do {
-        some = MAX_BLOCK - log->stored;
-        if (some > len)
-            some = len;
-        if (write(log->fd, data, some) != some)
-            return 1;
-        log->crc = crc32(log->crc, data, some);
-        log->len += some;
-        len -= some;
-        data += some;
-        log->stored += some;
-
-        /* if the stored block is full, end it and start another */
-        if (log->stored == MAX_BLOCK) {
-            (void)lseek(log->fd, log->last_off, SEEK_SET);
-            temp[0] = 0;
-            dice_ulg(log->stored + ((unsigned long)(~log->stored) << 16),
-                     temp + 1);
-            if (write(log->fd, temp, 5) != 5)
-                return 1;
-            log->last_off = lseek(log->fd, log->stored, SEEK_CUR);
-            (void)lseek(log->fd, 5, SEEK_CUR);
-            log->stored = 0;
-        }
-    } while (len);
-    return 0;
-}
-
-/* recompress the remaining stored deflate data in place */
-local int recomp(gz_log *log)
-{
-    z_stream strm;
-    size_t len, max;
-    unsigned char *in;
-    unsigned char *out;
-    unsigned char temp[16];
-
-    /* allocate space and read it all in (it's around 1 MB) */
-    len = log->last_off - log->mark_off;
-    max = len + (len >> 12) + (len >> 14) + 11;
-    out = malloc(max);
-    if (out == NULL)
-        return 1;
-    in = malloc(len);
-    if (in == NULL) {
-        free(out);
-        return 1;
-    }
-    (void)lseek(log->fd, log->mark_off, SEEK_SET);
-    if (read(log->fd, in, len) != len) {
-        free(in);
-        free(out);
-        return 1;
-    }
-
-    /* recompress in memory, decoding stored data as we go */
-    /* note: this assumes that unsigned is four bytes or more */
-    /*       consider not making that assumption */
-    strm.zalloc = Z_NULL;
-    strm.zfree = Z_NULL;
-    strm.opaque = Z_NULL;
-    if (deflateInit2(&strm, Z_BEST_COMPRESSION, Z_DEFLATED, -15, 8,
-        Z_DEFAULT_STRATEGY) != Z_OK) {
-        free(in);
-        free(out);
-        return 1;
-    }
-    strm.next_in = in;
-    strm.avail_out = max;
-    strm.next_out = out;
-    while (len >= 5) {
-        if (strm.next_in[0] != 0)
-            break;
-        strm.avail_in = strm.next_in[1] + (strm.next_in[2] << 8);
-        strm.next_in += 5;
-        len -= 5;
-        if (strm.avail_in != 0) {
-            if (len < strm.avail_in)
-                break;
-            len -= strm.avail_in;
-            (void)deflate(&strm, Z_NO_FLUSH);
-            if (strm.avail_in != 0 || strm.avail_out == 0)
-                break;
-        }
-    }
-    (void)deflate(&strm, Z_SYNC_FLUSH);
-    (void)deflateEnd(&strm);
-    free(in);
-    if (len != 0 || strm.avail_out == 0) {
-        free(out);
-        return 1;
-    }
-
-    /* overwrite stored data with compressed data */
-    (void)lseek(log->fd, log->mark_off, SEEK_SET);
-    len = max - strm.avail_out;
-    if (write(log->fd, out, len) != len) {
-        free(out);
-        return 1;
-    }
-    free(out);
-
-    /* write last empty block, crc, and length */
-    log->mark_off = log->last_off = lseek(log->fd, 0, SEEK_CUR);
-    temp[0] = 1;
-    dice_ulg(0xffffL << 16, temp + 1);
-    dice_ulg(log->crc, temp + 5);
-    dice_ulg(log->len, temp + 9);
-    if (write(log->fd, temp, 13) != 13)
-        return 1;
-
-    /* truncate file to discard remaining stored data and old trailer */
-    ftruncate(log->fd, lseek(log->fd, 0, SEEK_CUR));
-
-    /* update extra field to point to new last empty block */
-    (void)lseek(log->fd, log->extra, SEEK_SET);
-    dice_off(log->mark_off, temp);
-    dice_off(log->last_off, temp + 8);
-    if (write(log->fd, temp, 16) != 16)
-        return 1;
-    return 0;
-}
-
-/* maximum accumulation of stored blocks before compressing */
-#define MAX_STORED 1048576
-
-/* close log object */
-int gzlog_close(void *obj)
-{
-    unsigned char temp[8];
-    gz_log *log;
-
-    /* check object */
-    log = (gz_log *)obj;
-    if (log == NULL || log->id != GZLOGID)
-        return 1;
-
-    /* go to start of most recent block being written */
-    (void)lseek(log->fd, log->last_off, SEEK_SET);
-
-    /* if some stuff was put there, update block */
-    if (log->stored) {
-        temp[0] = 0;
-        dice_ulg(log->stored + ((unsigned long)(~log->stored) << 16),
-                 temp + 1);
-        if (write(log->fd, temp, 5) != 5)
-            return 1;
-        log->last_off = lseek(log->fd, log->stored, SEEK_CUR);
-    }
-
-    /* write last block (empty) */
-    if (write(log->fd, "\001\000\000\377\377", 5) != 5)
-        return 1;
-
-    /* write updated crc and uncompressed length */
-    dice_ulg(log->crc, temp);
-    dice_ulg(log->len, temp + 4);
-    if (write(log->fd, temp, 8) != 8)
-        return 1;
-
-    /* put offset of that last block in gzip extra block */
-    (void)lseek(log->fd, log->extra + 8, SEEK_SET);
-    dice_off(log->last_off, temp);
-    if (write(log->fd, temp, 8) != 8)
-        return 1;
-
-    /* if more than 1 MB stored, then time to compress it */
-    if (log->last_off - log->mark_off > MAX_STORED) {
-        if (recomp(log))
-            return 1;
-    }
-
-    /* unlock and close file */
-    log_clean(log);
-    return 0;
-}
Index: trunk/minix/lib/zlib-1.2.3/examples/gzlog.h
===================================================================
--- trunk/minix/lib/zlib-1.2.3/examples/gzlog.h	(revision 9)
+++ 	(revision )
@@ -1,58 +1,0 @@
-/* gzlog.h
-  Copyright (C) 2004 Mark Adler, all rights reserved
-  version 1.0, 26 Nov 2004
-
-  This software is provided 'as-is', without any express or implied
-  warranty.  In no event will the author be held liable for any damages
-  arising from the use of this software.
-
-  Permission is granted to anyone to use this software for any purpose,
-  including commercial applications, and to alter it and redistribute it
-  freely, subject to the following restrictions:
-
-  1. The origin of this software must not be misrepresented; you must not
-     claim that you wrote the original software. If you use this software
-     in a product, an acknowledgment in the product documentation would be
-     appreciated but is not required.
-  2. Altered source versions must be plainly marked as such, and must not be
-     misrepresented as being the original software.
-  3. This notice may not be removed or altered from any source distribution.
-
-  Mark Adler    madler@alumni.caltech.edu
- */
-
-/*
-   The gzlog object allows writing short messages to a gzipped log file,
-   opening the log file locked for small bursts, and then closing it.  The log
-   object works by appending stored data to the gzip file until 1 MB has been
-   accumulated.  At that time, the stored data is compressed, and replaces the
-   uncompressed data in the file.  The log file is truncated to its new size at
-   that time.  After closing, the log file is always valid gzip file that can
-   decompressed to recover what was written.
-
-   A gzip header "extra" field contains two file offsets for appending.  The
-   first points to just after the last compressed data.  The second points to
-   the last stored block in the deflate stream, which is empty.  All of the
-   data between those pointers is uncompressed.
- */
-
-/* Open a gzlog object, creating the log file if it does not exist.  Return
-   NULL on error.  Note that gzlog_open() could take a long time to return if
-   there is difficulty in locking the file. */
-void *gzlog_open(char *path);
-
-/* Write to a gzlog object.  Return non-zero on error.  This function will
-   simply write data to the file uncompressed.  Compression of the data
-   will not occur until gzlog_close() is called.  It is expected that
-   gzlog_write() is used for a short message, and then gzlog_close() is
-   called.  If a large amount of data is to be written, then the application
-   should write no more than 1 MB at a time with gzlog_write() before
-   calling gzlog_close() and then gzlog_open() again. */
-int gzlog_write(void *log, char *data, size_t len);
-
-/* Close a gzlog object.  Return non-zero on error.  The log file is locked
-   until this function is called.  This function will compress stored data
-   at the end of the gzip file if at least 1 MB has been accumulated.  Note
-   that the file will not be a valid gzip file until this function completes.
- */
-int gzlog_close(void *log);
Index: trunk/minix/lib/zlib-1.2.3/examples/zlib_how.html
===================================================================
--- trunk/minix/lib/zlib-1.2.3/examples/zlib_how.html	(revision 9)
+++ 	(revision )
@@ -1,523 +1,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"
-  "http://www.w3.org/TR/REC-html40/loose.dtd">
-<html>
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
-<title>zlib Usage Example</title>
-<!--  Copyright (c) 2004 Mark Adler.  -->
-</head>
-<body bgcolor="#FFFFFF" text="#000000" link="#0000FF" vlink="#00A000">
-<h2 align="center"> zlib Usage Example </h2>
-We often get questions about how the <tt>deflate()</tt> and <tt>inflate()</tt> functions should be used.
-Users wonder when they should provide more input, when they should use more output,
-what to do with a <tt>Z_BUF_ERROR</tt>, how to make sure the process terminates properly, and
-so on.  So for those who have read <tt>zlib.h</tt> (a few times), and
-would like further edification, below is an annotated example in C of simple routines to compress and decompress
-from an input file to an output file using <tt>deflate()</tt> and <tt>inflate()</tt> respectively.  The
-annotations are interspersed between lines of the code.  So please read between the lines.
-We hope this helps explain some of the intricacies of <em>zlib</em>.
-<p>
-Without further adieu, here is the program <a href="zpipe.c"><tt>zpipe.c</tt></a>:
-<pre><b>
-/* zpipe.c: example of proper use of zlib's inflate() and deflate()
-   Not copyrighted -- provided to the public domain
-   Version 1.2  9 November 2004  Mark Adler */
-
-/* Version history:
-   1.0  30 Oct 2004  First version
-   1.1   8 Nov 2004  Add void casting for unused return values
-                     Use switch statement for inflate() return values
-   1.2   9 Nov 2004  Add assertions to document zlib guarantees
- */
-</b></pre><!-- -->
-We now include the header files for the required definitions.  From
-<tt>stdio.h</tt> we use <tt>fopen()</tt>, <tt>fread()</tt>, <tt>fwrite()</tt>,
-<tt>feof()</tt>, <tt>ferror()</tt>, and <tt>fclose()</tt> for file i/o, and
-<tt>fputs()</tt> for error messages.  From <tt>string.h</tt> we use
-<tt>strcmp()</tt> for command line argument processing.
-From <tt>assert.h</tt> we use the <tt>assert()</tt> macro.
-From <tt>zlib.h</tt>
-we use the basic compression functions <tt>deflateInit()</tt>,
-<tt>deflate()</tt>, and <tt>deflateEnd()</tt>, and the basic decompression
-functions <tt>inflateInit()</tt>, <tt>inflate()</tt>, and
-<tt>inflateEnd()</tt>.
-<pre><b>
-#include &lt;stdio.h&gt;
-#include &lt;string.h&gt;
-#include &lt;assert.h&gt;
-#include "zlib.h"
-</b></pre><!-- -->
-<tt>CHUNK</tt> is simply the buffer size for feeding data to and pulling data
-from the <em>zlib</em> routines.  Larger buffer sizes would be more efficient,
-especially for <tt>inflate()</tt>.  If the memory is available, buffers sizes
-on the order of 128K or 256K bytes should be used.
-<pre><b>
-#define CHUNK 16384
-</b></pre><!-- -->
-The <tt>def()</tt> routine compresses data from an input file to an output file.  The output data
-will be in the <em>zlib</em> format, which is different from the <em>gzip</em> or <em>zip</em>
-formats.  The <em>zlib</em> format has a very small header of only two bytes to identify it as
-a <em>zlib</em> stream and to provide decoding information, and a four-byte trailer with a fast
-check value to verify the integrity of the uncompressed data after decoding.
-<pre><b>
-/* Compress from file source to file dest until EOF on source.
-   def() returns Z_OK on success, Z_MEM_ERROR if memory could not be
-   allocated for processing, Z_STREAM_ERROR if an invalid compression
-   level is supplied, Z_VERSION_ERROR if the version of zlib.h and the
-   version of the library linked do not match, or Z_ERRNO if there is
-   an error reading or writing the files. */
-int def(FILE *source, FILE *dest, int level)
-{
-</b></pre>
-Here are the local variables for <tt>def()</tt>.  <tt>ret</tt> will be used for <em>zlib</em>
-return codes.  <tt>flush</tt> will keep track of the current flushing state for <tt>deflate()</tt>,
-which is either no flushing, or flush to completion after the end of the input file is reached.
-<tt>have</tt> is the amount of data returned from <tt>deflate()</tt>.  The <tt>strm</tt> structure
-is used to pass information to and from the <em>zlib</em> routines, and to maintain the
-<tt>deflate()</tt> state.  <tt>in</tt> and <tt>out</tt> are the input and output buffers for
-<tt>deflate()</tt>.
-<pre><b>
-    int ret, flush;
-    unsigned have;
-    z_stream strm;
-    char in[CHUNK];
-    char out[CHUNK];
-</b></pre><!-- -->
-The first thing we do is to initialize the <em>zlib</em> state for compression using
-<tt>deflateInit()</tt>.  This must be done before the first use of <tt>deflate()</tt>.
-The <tt>zalloc</tt>, <tt>zfree</tt>, and <tt>opaque</tt> fields in the <tt>strm</tt>
-structure must be initialized before calling <tt>deflateInit()</tt>.  Here they are
-set to the <em>zlib</em> constant <tt>Z_NULL</tt> to request that <em>zlib</em> use
-the default memory allocation routines.  An application may also choose to provide
-custom memory allocation routines here.  <tt>deflateInit()</tt> will allocate on the
-order of 256K bytes for the internal state.
-(See <a href="zlib_tech.html"><em>zlib Technical Details</em></a>.)
-<p>
-<tt>deflateInit()</tt> is called with a pointer to the structure to be initialized and
-the compression level, which is an integer in the range of -1 to 9.  Lower compression
-levels result in faster execution, but less compression.  Higher levels result in
-greater compression, but slower execution.  The <em>zlib</em> constant Z_DEFAULT_COMPRESSION,
-equal to -1,
-provides a good compromise between compression and speed and is equivalent to level 6.
-Level 0 actually does no compression at all, and in fact expands the data slightly to produce
-the <em>zlib</em> format (it is not a byte-for-byte copy of the input).
-More advanced applications of <em>zlib</em>
-may use <tt>deflateInit2()</tt> here instead.  Such an application may want to reduce how
-much memory will be used, at some price in compression.  Or it may need to request a
-<em>gzip</em> header and trailer instead of a <em>zlib</em> header and trailer, or raw
-encoding with no header or trailer at all.
-<p>
-We must check the return value of <tt>deflateInit()</tt> against the <em>zlib</em> constant
-<tt>Z_OK</tt> to make sure that it was able to
-allocate memory for the internal state, and that the provided arguments were valid.
-<tt>deflateInit()</tt> will also check that the version of <em>zlib</em> that the <tt>zlib.h</tt>
-file came from matches the version of <em>zlib</em> actually linked with the program.  This
-is especially important for environments in which <em>zlib</em> is a shared library.
-<p>
-Note that an application can initialize multiple, independent <em>zlib</em> streams, which can
-operate in parallel.  The state information maintained in the structure allows the <em>zlib</em>
-routines to be reentrant.
-<pre><b>
-    /* allocate deflate state */
-    strm.zalloc = Z_NULL;
-    strm.zfree = Z_NULL;
-    strm.opaque = Z_NULL;
-    ret = deflateInit(&amp;strm, level);
-    if (ret != Z_OK)
-        return ret;
-</b></pre><!-- -->
-With the pleasantries out of the way, now we can get down to business.  The outer <tt>do</tt>-loop
-reads all of the input file and exits at the bottom of the loop once end-of-file is reached.
-This loop contains the only call of <tt>deflate()</tt>.  So we must make sure that all of the
-input data has been processed and that all of the output data has been generated and consumed
-before we fall out of the loop at the bottom.
-<pre><b>
-    /* compress until end of file */
-    do {
-</b></pre>
-We start off by reading data from the input file.  The number of bytes read is put directly
-into <tt>avail_in</tt>, and a pointer to those bytes is put into <tt>next_in</tt>.  We also
-check to see if end-of-file on the input has been reached.  If we are at the end of file, then <tt>flush</tt> is set to the
-<em>zlib</em> constant <tt>Z_FINISH</tt>, which is later passed to <tt>deflate()</tt> to
-indicate that this is the last chunk of input data to compress.  We need to use <tt>feof()</tt>
-to check for end-of-file as opposed to seeing if fewer than <tt>CHUNK</tt> bytes have been read.  The
-reason is that if the input file length is an exact multiple of <tt>CHUNK</tt>, we will miss
-the fact that we got to the end-of-file, and not know to tell <tt>deflate()</tt> to finish
-up the compressed stream.  If we are not yet at the end of the input, then the <em>zlib</em>
-constant <tt>Z_NO_FLUSH</tt> will be passed to <tt>deflate</tt> to indicate that we are still
-in the middle of the uncompressed data.
-<p>
-If there is an error in reading from the input file, the process is aborted with
-<tt>deflateEnd()</tt> being called to free the allocated <em>zlib</em> state before returning
-the error.  We wouldn't want a memory leak, now would we?  <tt>deflateEnd()</tt> can be called
-at any time after the state has been initialized.  Once that's done, <tt>deflateInit()</tt> (or
-<tt>deflateInit2()</tt>) would have to be called to start a new compression process.  There is
-no point here in checking the <tt>deflateEnd()</tt> return code.  The deallocation can't fail.
-<pre><b>
-        strm.avail_in = fread(in, 1, CHUNK, source);
-        if (ferror(source)) {
-            (void)deflateEnd(&amp;strm);
-            return Z_ERRNO;
-        }
-        flush = feof(source) ? Z_FINISH : Z_NO_FLUSH;
-        strm.next_in = in;
-</b></pre><!-- -->
-The inner <tt>do</tt>-loop passes our chunk of input data to <tt>deflate()</tt>, and then
-keeps calling <tt>deflate()</tt> until it is done producing output.  Once there is no more
-new output, <tt>deflate()</tt> is guaranteed to have consumed all of the input, i.e.,
-<tt>avail_in</tt> will be zero.
-<pre><b>
-        /* run deflate() on input until output buffer not full, finish
-           compression if all of source has been read in */
-        do {
-</b></pre>
-Output space is provided to <tt>deflate()</tt> by setting <tt>avail_out</tt> to the number
-of available output bytes and <tt>next_out</tt> to a pointer to that space.
-<pre><b>
-            strm.avail_out = CHUNK;
-            strm.next_out = out;
-</b></pre>
-Now we call the compression engine itself, <tt>deflate()</tt>.  It takes as many of the
-<tt>avail_in</tt> bytes at <tt>next_in</tt> as it can process, and writes as many as
-<tt>avail_out</tt> bytes to <tt>next_out</tt>.  Those counters and pointers are then
-updated past the input data consumed and the output data written.  It is the amount of
-output space available that may limit how much input is consumed.
-Hence the inner loop to make sure that
-all of the input is consumed by providing more output space each time.  Since <tt>avail_in</tt>
-and <tt>next_in</tt> are updated by <tt>deflate()</tt>, we don't have to mess with those
-between <tt>deflate()</tt> calls until it's all used up.
-<p>
-The parameters to <tt>deflate()</tt> are a pointer to the <tt>strm</tt> structure containing
-the input and output information and the internal compression engine state, and a parameter
-indicating whether and how to flush data to the output.  Normally <tt>deflate</tt> will consume
-several K bytes of input data before producing any output (except for the header), in order
-to accumulate statistics on the data for optimum compression.  It will then put out a burst of
-compressed data, and proceed to consume more input before the next burst.  Eventually,
-<tt>deflate()</tt>
-must be told to terminate the stream, complete the compression with provided input data, and
-write out the trailer check value.  <tt>deflate()</tt> will continue to compress normally as long
-as the flush parameter is <tt>Z_NO_FLUSH</tt>.  Once the <tt>Z_FINISH</tt> parameter is provided,
-<tt>deflate()</tt> will begin to complete the compressed output stream.  However depending on how
-much output space is provided, <tt>deflate()</tt> may have to be called several times until it
-has provided the complete compressed stream, even after it has consumed all of the input.  The flush
-parameter must continue to be <tt>Z_FINISH</tt> for those subsequent calls.
-<p>
-There are other values of the flush parameter that are used in more advanced applications.  You can
-force <tt>deflate()</tt> to produce a burst of output that encodes all of the input data provided
-so far, even if it wouldn't have otherwise, for example to control data latency on a link with
-compressed data.  You can also ask that <tt>deflate()</tt> do that as well as erase any history up to
-that point so that what follows can be decompressed independently, for example for random access
-applications.  Both requests will degrade compression by an amount depending on how often such
-requests are made.
-<p>
-<tt>deflate()</tt> has a return value that can indicate errors, yet we do not check it here.  Why
-not?  Well, it turns out that <tt>deflate()</tt> can do no wrong here.  Let's go through
-<tt>deflate()</tt>'s return values and dispense with them one by one.  The possible values are
-<tt>Z_OK</tt>, <tt>Z_STREAM_END</tt>, <tt>Z_STREAM_ERROR</tt>, or <tt>Z_BUF_ERROR</tt>.  <tt>Z_OK</tt>
-is, well, ok.  <tt>Z_STREAM_END</tt> is also ok and will be returned for the last call of
-<tt>deflate()</tt>.  This is already guaranteed by calling <tt>deflate()</tt> with <tt>Z_FINISH</tt>
-until it has no more output.  <tt>Z_STREAM_ERROR</tt> is only possible if the stream is not
-initialized properly, but we did initialize it properly.  There is no harm in checking for
-<tt>Z_STREAM_ERROR</tt> here, for example to check for the possibility that some
-other part of the application inadvertently clobbered the memory containing the <em>zlib</em> state.
-<tt>Z_BUF_ERROR</tt> will be explained further below, but
-suffice it to say that this is simply an indication that <tt>deflate()</tt> could not consume
-more input or produce more output.  <tt>deflate()</tt> can be called again with more output space
-or more available input, which it will be in this code.
-<pre><b>
-            ret = deflate(&amp;strm, flush);    /* no bad return value */
-            assert(ret != Z_STREAM_ERROR);  /* state not clobbered */
-</b></pre>
-Now we compute how much output <tt>deflate()</tt> provided on the last call, which is the
-difference between how much space was provided before the call, and how much output space
-is still available after the call.  Then that data, if any, is written to the output file.
-We can then reuse the output buffer for the next call of <tt>deflate()</tt>.  Again if there
-is a file i/o error, we call <tt>deflateEnd()</tt> before returning to avoid a memory leak.
-<pre><b>
-            have = CHUNK - strm.avail_out;
-            if (fwrite(out, 1, have, dest) != have || ferror(dest)) {
-                (void)deflateEnd(&amp;strm);
-                return Z_ERRNO;
-            }
-</b></pre>
-The inner <tt>do</tt>-loop is repeated until the last <tt>deflate()</tt> call fails to fill the
-provided output buffer.  Then we know that <tt>deflate()</tt> has done as much as it can with
-the provided input, and that all of that input has been consumed.  We can then fall out of this
-loop and reuse the input buffer.
-<p>
-The way we tell that <tt>deflate()</tt> has no more output is by seeing that it did not fill
-the output buffer, leaving <tt>avail_out</tt> greater than zero.  However suppose that
-<tt>deflate()</tt> has no more output, but just so happened to exactly fill the output buffer!
-<tt>avail_out</tt> is zero, and we can't tell that <tt>deflate()</tt> has done all it can.
-As far as we know, <tt>deflate()</tt>
-has more output for us.  So we call it again.  But now <tt>deflate()</tt> produces no output
-at all, and <tt>avail_out</tt> remains unchanged as <tt>CHUNK</tt>.  That <tt>deflate()</tt> call
-wasn't able to do anything, either consume input or produce output, and so it returns
-<tt>Z_BUF_ERROR</tt>.  (See, I told you I'd cover this later.)  However this is not a problem at
-all.  Now we finally have the desired indication that <tt>deflate()</tt> is really done,
-and so we drop out of the inner loop to provide more input to <tt>deflate()</tt>.
-<p>
-With <tt>flush</tt> set to <tt>Z_FINISH</tt>, this final set of <tt>deflate()</tt> calls will
-complete the output stream.  Once that is done, subsequent calls of <tt>deflate()</tt> would return
-<tt>Z_STREAM_ERROR</tt> if the flush parameter is not <tt>Z_FINISH</tt>, and do no more processing
-until the state is reinitialized.
-<p>
-Some applications of <em>zlib</em> have two loops that call <tt>deflate()</tt>
-instead of the single inner loop we have here.  The first loop would call
-without flushing and feed all of the data to <tt>deflate()</tt>.  The second loop would call
-<tt>deflate()</tt> with no more
-data and the <tt>Z_FINISH</tt> parameter to complete the process.  As you can see from this
-example, that can be avoided by simply keeping track of the current flush state.
-<pre><b>
-        } while (strm.avail_out == 0);
-        assert(strm.avail_in == 0);     /* all input will be used */
-</b></pre><!-- -->
-Now we check to see if we have already processed all of the input file.  That information was
-saved in the <tt>flush</tt> variable, so we see if that was set to <tt>Z_FINISH</tt>.  If so,
-then we're done and we fall out of the outer loop.  We're guaranteed to get <tt>Z_STREAM_END</tt>
-from the last <tt>deflate()</tt> call, since we ran it until the last chunk of input was
-consumed and all of the output was generated.
-<pre><b>
-        /* done when last data in file processed */
-    } while (flush != Z_FINISH);
-    assert(ret == Z_STREAM_END);        /* stream will be complete */
-</b></pre><!-- -->
-The process is complete, but we still need to deallocate the state to avoid a memory leak
-(or rather more like a memory hemorrhage if you didn't do this).  Then
-finally we can return with a happy return value.
-<pre><b>
-    /* clean up and return */
-    (void)deflateEnd(&amp;strm);
-    return Z_OK;
-}
-</b></pre><!-- -->
-Now we do the same thing for decompression in the <tt>inf()</tt> routine. <tt>inf()</tt>
-decompresses what is hopefully a valid <em>zlib</em> stream from the input file and writes the
-uncompressed data to the output file.  Much of the discussion above for <tt>def()</tt>
-applies to <tt>inf()</tt> as well, so the discussion here will focus on the differences between
-the two.
-<pre><b>
-/* Decompress from file source to file dest until stream ends or EOF.
-   inf() returns Z_OK on success, Z_MEM_ERROR if memory could not be
-   allocated for processing, Z_DATA_ERROR if the deflate data is
-   invalid or incomplete, Z_VERSION_ERROR if the version of zlib.h and
-   the version of the library linked do not match, or Z_ERRNO if there
-   is an error reading or writing the files. */
-int inf(FILE *source, FILE *dest)
-{
-</b></pre>
-The local variables have the same functionality as they do for <tt>def()</tt>.  The
-only difference is that there is no <tt>flush</tt> variable, since <tt>inflate()</tt>
-can tell from the <em>zlib</em> stream itself when the stream is complete.
-<pre><b>
-    int ret;
-    unsigned have;
-    z_stream strm;
-    char in[CHUNK];
-    char out[CHUNK];
-</b></pre><!-- -->
-The initialization of the state is the same, except that there is no compression level,
-of course, and two more elements of the structure are initialized.  <tt>avail_in</tt>
-and <tt>next_in</tt> must be initialized before calling <tt>inflateInit()</tt>.  This
-is because the application has the option to provide the start of the zlib stream in
-order for <tt>inflateInit()</tt> to have access to information about the compression
-method to aid in memory allocation.  In the current implementation of <em>zlib</em>
-(up through versions 1.2.x), the method-dependent memory allocations are deferred to the first call of
-<tt>inflate()</tt> anyway.  However those fields must be initialized since later versions
-of <em>zlib</em> that provide more compression methods may take advantage of this interface.
-In any case, no decompression is performed by <tt>inflateInit()</tt>, so the
-<tt>avail_out</tt> and <tt>next_out</tt> fields do not need to be initialized before calling.
-<p>
-Here <tt>avail_in</tt> is set to zero and <tt>next_in</tt> is set to <tt>Z_NULL</tt> to
-indicate that no input data is being provided.
-<pre><b>
-    /* allocate inflate state */
-    strm.zalloc = Z_NULL;
-    strm.zfree = Z_NULL;
-    strm.opaque = Z_NULL;
-    strm.avail_in = 0;
-    strm.next_in = Z_NULL;
-    ret = inflateInit(&amp;strm);
-    if (ret != Z_OK)
-        return ret;
-</b></pre><!-- -->
-The outer <tt>do</tt>-loop decompresses input until <tt>inflate()</tt> indicates
-that it has reached the end of the compressed data and has produced all of the uncompressed
-output.  This is in contrast to <tt>def()</tt> which processes all of the input file.
-If end-of-file is reached before the compressed data self-terminates, then the compressed
-data is incomplete and an error is returned.
-<pre><b>
-    /* decompress until deflate stream ends or end of file */
-    do {
-</b></pre>
-We read input data and set the <tt>strm</tt> structure accordingly.  If we've reached the
-end of the input file, then we leave the outer loop and report an error, since the
-compressed data is incomplete.  Note that we may read more data than is eventually consumed
-by <tt>inflate()</tt>, if the input file continues past the <em>zlib</em> stream.
-For applications where <em>zlib</em> streams are embedded in other data, this routine would
-need to be modified to return the unused data, or at least indicate how much of the input
-data was not used, so the application would know where to pick up after the <em>zlib</em> stream.
-<pre><b>
-        strm.avail_in = fread(in, 1, CHUNK, source);
-        if (ferror(source)) {
-            (void)inflateEnd(&amp;strm);
-            return Z_ERRNO;
-        }
-        if (strm.avail_in == 0)
-            break;
-        strm.next_in = in;
-</b></pre><!-- -->
-The inner <tt>do</tt>-loop has the same function it did in <tt>def()</tt>, which is to
-keep calling <tt>inflate()</tt> until has generated all of the output it can with the
-provided input.
-<pre><b>
-        /* run inflate() on input until output buffer not full */
-        do {
-</b></pre>
-Just like in <tt>def()</tt>, the same output space is provided for each call of <tt>inflate()</tt>.
-<pre><b>
-            strm.avail_out = CHUNK;
-            strm.next_out = out;
-</b></pre>
-Now we run the decompression engine itself.  There is no need to adjust the flush parameter, since
-the <em>zlib</em> format is self-terminating. The main difference here is that there are
-return values that we need to pay attention to.  <tt>Z_DATA_ERROR</tt>
-indicates that <tt>inflate()</tt> detected an error in the <em>zlib</em> compressed data format,
-which means that either the data is not a <em>zlib</em> stream to begin with, or that the data was
-corrupted somewhere along the way since it was compressed.  The other error to be processed is
-<tt>Z_MEM_ERROR</tt>, which can occur since memory allocation is deferred until <tt>inflate()</tt>
-needs it, unlike <tt>deflate()</tt>, whose memory is allocated at the start by <tt>deflateInit()</tt>.
-<p>
-Advanced applications may use
-<tt>deflateSetDictionary()</tt> to prime <tt>deflate()</tt> with a set of likely data to improve the
-first 32K or so of compression.  This is noted in the <em>zlib</em> header, so <tt>inflate()</tt>
-requests that that dictionary be provided before it can start to decompress.  Without the dictionary,
-correct decompression is not possible.  For this routine, we have no idea what the dictionary is,
-so the <tt>Z_NEED_DICT</tt> indication is converted to a <tt>Z_DATA_ERROR</tt>.
-<p>
-<tt>inflate()</tt> can also return <tt>Z_STREAM_ERROR</tt>, which should not be possible here,
-but could be checked for as noted above for <tt>def()</tt>.  <tt>Z_BUF_ERROR</tt> does not need to be
-checked for here, for the same reasons noted for <tt>def()</tt>.  <tt>Z_STREAM_END</tt> will be
-checked for later.
-<pre><b>
-            ret = inflate(&amp;strm, Z_NO_FLUSH);
-            assert(ret != Z_STREAM_ERROR);  /* state not clobbered */
-            switch (ret) {
-            case Z_NEED_DICT:
-                ret = Z_DATA_ERROR;     /* and fall through */
-            case Z_DATA_ERROR:
-            case Z_MEM_ERROR:
-                (void)inflateEnd(&amp;strm);
-                return ret;
-            }
-</b></pre>
-The output of <tt>inflate()</tt> is handled identically to that of <tt>deflate()</tt>.
-<pre><b>
-            have = CHUNK - strm.avail_out;
-            if (fwrite(out, 1, have, dest) != have || ferror(dest)) {
-                (void)inflateEnd(&amp;strm);
-                return Z_ERRNO;
-            }
-</b></pre>
-The inner <tt>do</tt>-loop ends when <tt>inflate()</tt> has no more output as indicated
-by not filling the output buffer, just as for <tt>deflate()</tt>.  In this case, we cannot
-assert that <tt>strm.avail_in</tt> will be zero, since the deflate stream may end before the file
-does.
-<pre><b>
-        } while (strm.avail_out == 0);
-</b></pre><!-- -->
-The outer <tt>do</tt>-loop ends when <tt>inflate()</tt> reports that it has reached the
-end of the input <em>zlib</em> stream, has completed the decompression and integrity
-check, and has provided all of the output.  This is indicated by the <tt>inflate()</tt>
-return value <tt>Z_STREAM_END</tt>.  The inner loop is guaranteed to leave <tt>ret</tt>
-equal to <tt>Z_STREAM_END</tt> if the last chunk of the input file read contained the end
-of the <em>zlib</em> stream.  So if the return value is not <tt>Z_STREAM_END</tt>, the
-loop continues to read more input.
-<pre><b>
-        /* done when inflate() says it's done */
-    } while (ret != Z_STREAM_END);
-</b></pre><!-- -->
-At this point, decompression successfully completed, or we broke out of the loop due to no
-more data being available from the input file.  If the last <tt>inflate()</tt> return value
-is not <tt>Z_STREAM_END</tt>, then the <em>zlib</em> stream was incomplete and a data error
-is returned.  Otherwise, we return with a happy return value.  Of course, <tt>inflateEnd()</tt>
-is called first to avoid a memory leak.
-<pre><b>
-    /* clean up and return */
-    (void)inflateEnd(&amp;strm);
-    return ret == Z_STREAM_END ? Z_OK : Z_DATA_ERROR;
-}
-</b></pre><!-- -->
-That ends the routines that directly use <em>zlib</em>.  The following routines make this
-a command-line program by running data through the above routines from <tt>stdin</tt> to
-<tt>stdout</tt>, and handling any errors reported by <tt>def()</tt> or <tt>inf()</tt>.
-<p>
-<tt>zerr()</tt> is used to interpret the possible error codes from <tt>def()</tt>
-and <tt>inf()</tt>, as detailed in their comments above, and print out an error message.
-Note that these are only a subset of the possible return values from <tt>deflate()</tt>
-and <tt>inflate()</tt>.
-<pre><b>
-/* report a zlib or i/o error */
-void zerr(int ret)
-{
-    fputs("zpipe: ", stderr);
-    switch (ret) {
-    case Z_ERRNO:
-        if (ferror(stdin))
-            fputs("error reading stdin\n", stderr);
-        if (ferror(stdout))
-            fputs("error writing stdout\n", stderr);
-        break;
-    case Z_STREAM_ERROR:
-        fputs("invalid compression level\n", stderr);
-        break;
-    case Z_DATA_ERROR:
-        fputs("invalid or incomplete deflate data\n", stderr);
-        break;
-    case Z_MEM_ERROR:
-        fputs("out of memory\n", stderr);
-        break;
-    case Z_VERSION_ERROR:
-        fputs("zlib version mismatch!\n", stderr);
-    }
-}
-</b></pre><!-- -->
-Here is the <tt>main()</tt> routine used to test <tt>def()</tt> and <tt>inf()</tt>.  The
-<tt>zpipe</tt> command is simply a compression pipe from <tt>stdin</tt> to <tt>stdout</tt>, if
-no arguments are given, or it is a decompression pipe if <tt>zpipe -d</tt> is used.  If any other
-arguments are provided, no compression or decompression is performed.  Instead a usage
-message is displayed.  Examples are <tt>zpipe < foo.txt > foo.txt.z</tt> to compress, and
-<tt>zpipe -d < foo.txt.z > foo.txt</tt> to decompress.
-<pre><b>
-/* compress or decompress from stdin to stdout */
-int main(int argc, char **argv)
-{
-    int ret;
-
-    /* do compression if no arguments */
-    if (argc == 1) {
-        ret = def(stdin, stdout, Z_DEFAULT_COMPRESSION);
-        if (ret != Z_OK)
-            zerr(ret);
-        return ret;
-    }
-
-    /* do decompression if -d specified */
-    else if (argc == 2 &amp;&amp; strcmp(argv[1], "-d") == 0) {
-        ret = inf(stdin, stdout);
-        if (ret != Z_OK)
-            zerr(ret);
-        return ret;
-    }
-
-    /* otherwise, report usage */
-    else {
-        fputs("zpipe usage: zpipe [-d] &lt; source &gt; dest\n", stderr);
-        return 1;
-    }
-}
-</b></pre>
-<hr>
-<i>Copyright (c) 2004 by Mark Adler<br>Last modified 13 November 2004</i>
-</body>
-</html>
Index: trunk/minix/lib/zlib-1.2.3/examples/zpipe.c
===================================================================
--- trunk/minix/lib/zlib-1.2.3/examples/zpipe.c	(revision 9)
+++ 	(revision )
@@ -1,191 +1,0 @@
-/* zpipe.c: example of proper use of zlib's inflate() and deflate()
-   Not copyrighted -- provided to the public domain
-   Version 1.2  9 November 2004  Mark Adler */
-
-/* Version history:
-   1.0  30 Oct 2004  First version
-   1.1   8 Nov 2004  Add void casting for unused return values
-                     Use switch statement for inflate() return values
-   1.2   9 Nov 2004  Add assertions to document zlib guarantees
-   1.3   6 Apr 2005  Remove incorrect assertion in inf()
- */
-
-#include <stdio.h>
-#include <string.h>
-#include <assert.h>
-#include "zlib.h"
-
-#define CHUNK 16384
-
-/* Compress from file source to file dest until EOF on source.
-   def() returns Z_OK on success, Z_MEM_ERROR if memory could not be
-   allocated for processing, Z_STREAM_ERROR if an invalid compression
-   level is supplied, Z_VERSION_ERROR if the version of zlib.h and the
-   version of the library linked do not match, or Z_ERRNO if there is
-   an error reading or writing the files. */
-int def(FILE *source, FILE *dest, int level)
-{
-    int ret, flush;
-    unsigned have;
-    z_stream strm;
-    char in[CHUNK];
-    char out[CHUNK];
-
-    /* allocate deflate state */
-    strm.zalloc = Z_NULL;
-    strm.zfree = Z_NULL;
-    strm.opaque = Z_NULL;
-    ret = deflateInit(&strm, level);
-    if (ret != Z_OK)
-        return ret;
-
-    /* compress until end of file */
-    do {
-        strm.avail_in = fread(in, 1, CHUNK, source);
-        if (ferror(source)) {
-            (void)deflateEnd(&strm);
-            return Z_ERRNO;
-        }
-        flush = feof(source) ? Z_FINISH : Z_NO_FLUSH;
-        strm.next_in = in;
-
-        /* run deflate() on input until output buffer not full, finish
-           compression if all of source has been read in */
-        do {
-            strm.avail_out = CHUNK;
-            strm.next_out = out;
-            ret = deflate(&strm, flush);    /* no bad return value */
-            assert(ret != Z_STREAM_ERROR);  /* state not clobbered */
-            have = CHUNK - strm.avail_out;
-            if (fwrite(out, 1, have, dest) != have || ferror(dest)) {
-                (void)deflateEnd(&strm);
-                return Z_ERRNO;
-            }
-        } while (strm.avail_out == 0);
-        assert(strm.avail_in == 0);     /* all input will be used */
-
-        /* done when last data in file processed */
-    } while (flush != Z_FINISH);
-    assert(ret == Z_STREAM_END);        /* stream will be complete */
-
-    /* clean up and return */
-    (void)deflateEnd(&strm);
-    return Z_OK;
-}
-
-/* Decompress from file source to file dest until stream ends or EOF.
-   inf() returns Z_OK on success, Z_MEM_ERROR if memory could not be
-   allocated for processing, Z_DATA_ERROR if the deflate data is
-   invalid or incomplete, Z_VERSION_ERROR if the version of zlib.h and
-   the version of the library linked do not match, or Z_ERRNO if there
-   is an error reading or writing the files. */
-int inf(FILE *source, FILE *dest)
-{
-    int ret;
-    unsigned have;
-    z_stream strm;
-    char in[CHUNK];
-    char out[CHUNK];
-
-    /* allocate inflate state */
-    strm.zalloc = Z_NULL;
-    strm.zfree = Z_NULL;
-    strm.opaque = Z_NULL;
-    strm.avail_in = 0;
-    strm.next_in = Z_NULL;
-    ret = inflateInit(&strm);
-    if (ret != Z_OK)
-        return ret;
-
-    /* decompress until deflate stream ends or end of file */
-    do {
-        strm.avail_in = fread(in, 1, CHUNK, source);
-        if (ferror(source)) {
-            (void)inflateEnd(&strm);
-            return Z_ERRNO;
-        }
-        if (strm.avail_in == 0)
-            break;
-        strm.next_in = in;
-
-        /* run inflate() on input until output buffer not full */
-        do {
-            strm.avail_out = CHUNK;
-            strm.next_out = out;
-            ret = inflate(&strm, Z_NO_FLUSH);
-            assert(ret != Z_STREAM_ERROR);  /* state not clobbered */
-            switch (ret) {
-            case Z_NEED_DICT:
-                ret = Z_DATA_ERROR;     /* and fall through */
-            case Z_DATA_ERROR:
-            case Z_MEM_ERROR:
-                (void)inflateEnd(&strm);
-                return ret;
-            }
-            have = CHUNK - strm.avail_out;
-            if (fwrite(out, 1, have, dest) != have || ferror(dest)) {
-                (void)inflateEnd(&strm);
-                return Z_ERRNO;
-            }
-        } while (strm.avail_out == 0);
-
-        /* done when inflate() says it's done */
-    } while (ret != Z_STREAM_END);
-
-    /* clean up and return */
-    (void)inflateEnd(&strm);
-    return ret == Z_STREAM_END ? Z_OK : Z_DATA_ERROR;
-}
-
-/* report a zlib or i/o error */
-void zerr(int ret)
-{
-    fputs("zpipe: ", stderr);
-    switch (ret) {
-    case Z_ERRNO:
-        if (ferror(stdin))
-            fputs("error reading stdin\n", stderr);
-        if (ferror(stdout))
-            fputs("error writing stdout\n", stderr);
-        break;
-    case Z_STREAM_ERROR:
-        fputs("invalid compression level\n", stderr);
-        break;
-    case Z_DATA_ERROR:
-        fputs("invalid or incomplete deflate data\n", stderr);
-        break;
-    case Z_MEM_ERROR:
-        fputs("out of memory\n", stderr);
-        break;
-    case Z_VERSION_ERROR:
-        fputs("zlib version mismatch!\n", stderr);
-    }
-}
-
-/* compress or decompress from stdin to stdout */
-int main(int argc, char **argv)
-{
-    int ret;
-
-    /* do compression if no arguments */
-    if (argc == 1) {
-        ret = def(stdin, stdout, Z_DEFAULT_COMPRESSION);
-        if (ret != Z_OK)
-            zerr(ret);
-        return ret;
-    }
-
-    /* do decompression if -d specified */
-    else if (argc == 2 && strcmp(argv[1], "-d") == 0) {
-        ret = inf(stdin, stdout);
-        if (ret != Z_OK)
-            zerr(ret);
-        return ret;
-    }
-
-    /* otherwise, report usage */
-    else {
-        fputs("zpipe usage: zpipe [-d] < source > dest\n", stderr);
-        return 1;
-    }
-}
Index: trunk/minix/lib/zlib-1.2.3/examples/zran.c
===================================================================
--- trunk/minix/lib/zlib-1.2.3/examples/zran.c	(revision 9)
+++ 	(revision )
@@ -1,404 +1,0 @@
-/* zran.c -- example of zlib/gzip stream indexing and random access
- * Copyright (C) 2005 Mark Adler
- * For conditions of distribution and use, see copyright notice in zlib.h
-   Version 1.0  29 May 2005  Mark Adler */
-
-/* Illustrate the use of Z_BLOCK, inflatePrime(), and inflateSetDictionary()
-   for random access of a compressed file.  A file containing a zlib or gzip
-   stream is provided on the command line.  The compressed stream is decoded in
-   its entirety, and an index built with access points about every SPAN bytes
-   in the uncompressed output.  The compressed file is left open, and can then
-   be read randomly, having to decompress on the average SPAN/2 uncompressed
-   bytes before getting to the desired block of data.
-
-   An access point can be created at the start of any deflate block, by saving
-   the starting file offset and bit of that block, and the 32K bytes of
-   uncompressed data that precede that block.  Also the uncompressed offset of
-   that block is saved to provide a referece for locating a desired starting
-   point in the uncompressed stream.  build_index() works by decompressing the
-   input zlib or gzip stream a block at a time, and at the end of each block
-   deciding if enough uncompressed data has gone by to justify the creation of
-   a new access point.  If so, that point is saved in a data structure that
-   grows as needed to accommodate the points.
-
-   To use the index, an offset in the uncompressed data is provided, for which
-   the latest accees point at or preceding that offset is located in the index.
-   The input file is positioned to the specified location in the index, and if
-   necessary the first few bits of the compressed data is read from the file.
-   inflate is initialized with those bits and the 32K of uncompressed data, and
-   the decompression then proceeds until the desired offset in the file is
-   reached.  Then the decompression continues to read the desired uncompressed
-   data from the file.
-
-   Another approach would be to generate the index on demand.  In that case,
-   requests for random access reads from the compressed data would try to use
-   the index, but if a read far enough past the end of the index is required,
-   then further index entries would be generated and added.
-
-   There is some fair bit of overhead to starting inflation for the random
-   access, mainly copying the 32K byte dictionary.  So if small pieces of the
-   file are being accessed, it would make sense to implement a cache to hold
-   some lookahead and avoid many calls to extract() for small lengths.
-
-   Another way to build an index would be to use inflateCopy().  That would
-   not be constrained to have access points at block boundaries, but requires
-   more memory per access point, and also cannot be saved to file due to the
-   use of pointers in the state.  The approach here allows for storage of the
-   index in a file.
- */
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include "zlib.h"
-
-#define local static
-
-#define SPAN 1048576L       /* desired distance between access points */
-#define WINSIZE 32768U      /* sliding window size */
-#define CHUNK 16384         /* file input buffer size */
-
-/* access point entry */
-struct point {
-    off_t out;          /* corresponding offset in uncompressed data */
-    off_t in;           /* offset in input file of first full byte */
-    int bits;           /* number of bits (1-7) from byte at in - 1, or 0 */
-    unsigned char window[WINSIZE];  /* preceding 32K of uncompressed data */
-};
-
-/* access point list */
-struct access {
-    int have;           /* number of list entries filled in */
-    int size;           /* number of list entries allocated */
-    struct point *list; /* allocated list */
-};
-
-/* Deallocate an index built by build_index() */
-local void free_index(struct access *index)
-{
-    if (index != NULL) {
-        free(index->list);
-        free(index);
-    }
-}
-
-/* Add an entry to the access point list.  If out of memory, deallocate the
-   existing list and return NULL. */
-local struct access *addpoint(struct access *index, int bits,
-    off_t in, off_t out, unsigned left, unsigned char *window)
-{
-    struct point *next;
-
-    /* if list is empty, create it (start with eight points) */
-    if (index == NULL) {
-        index = malloc(sizeof(struct access));
-        if (index == NULL) return NULL;
-        index->list = malloc(sizeof(struct point) << 3);
-        if (index->list == NULL) {
-            free(index);
-            return NULL;
-        }
-        index->size = 8;
-        index->have = 0;
-    }
-
-    /* if list is full, make it bigger */
-    else if (index->have == index->size) {
-        index->size <<= 1;
-        next = realloc(index->list, sizeof(struct point) * index->size);
-        if (next == NULL) {
-            free_index(index);
-            return NULL;
-        }
-        index->list = next;
-    }
-
-    /* fill in entry and increment how many we have */
-    next = index->list + index->have;
-    next->bits = bits;
-    next->in = in;
-    next->out = out;
-    if (left)
-        memcpy(next->window, window + WINSIZE - left, left);
-    if (left < WINSIZE)
-        memcpy(next->window + left, window, WINSIZE - left);
-    index->have++;
-
-    /* return list, possibly reallocated */
-    return index;
-}
-
-/* Make one entire pass through the compressed stream and build an index, with
-   access points about every span bytes of uncompressed output -- span is
-   chosen to balance the speed of random access against the memory requirements
-   of the list, about 32K bytes per access point.  Note that data after the end
-   of the first zlib or gzip stream in the file is ignored.  build_index()
-   returns the number of access points on success (>= 1), Z_MEM_ERROR for out
-   of memory, Z_DATA_ERROR for an error in the input file, or Z_ERRNO for a
-   file read error.  On success, *built points to the resulting index. */
-local int build_index(FILE *in, off_t span, struct access **built)
-{
-    int ret;
-    off_t totin, totout;        /* our own total counters to avoid 4GB limit */
-    off_t last;                 /* totout value of last access point */
-    struct access *index;       /* access points being generated */
-    z_stream strm;
-    unsigned char input[CHUNK];
-    unsigned char window[WINSIZE];
-
-    /* initialize inflate */
-    strm.zalloc = Z_NULL;
-    strm.zfree = Z_NULL;
-    strm.opaque = Z_NULL;
-    strm.avail_in = 0;
-    strm.next_in = Z_NULL;
-    ret = inflateInit2(&strm, 47);      /* automatic zlib or gzip decoding */
-    if (ret != Z_OK)
-        return ret;
-
-    /* inflate the input, maintain a sliding window, and build an index -- this
-       also validates the integrity of the compressed data using the check
-       information at the end of the gzip or zlib stream */
-    totin = totout = last = 0;
-    index = NULL;               /* will be allocated by first addpoint() */
-    strm.avail_out = 0;
-    do {
-        /* get some compressed data from input file */
-        strm.avail_in = fread(input, 1, CHUNK, in);
-        if (ferror(in)) {
-            ret = Z_ERRNO;
-            goto build_index_error;
-        }
-        if (strm.avail_in == 0) {
-            ret = Z_DATA_ERROR;
-            goto build_index_error;
-        }
-        strm.next_in = input;
-
-        /* process all of that, or until end of stream */
-        do {
-            /* reset sliding window if necessary */
-            if (strm.avail_out == 0) {
-                strm.avail_out = WINSIZE;
-                strm.next_out = window;
-            }
-
-            /* inflate until out of input, output, or at end of block --
-               update the total input and output counters */
-            totin += strm.avail_in;
-            totout += strm.avail_out;
-            ret = inflate(&strm, Z_BLOCK);      /* return at end of block */
-            totin -= strm.avail_in;
-            totout -= strm.avail_out;
-            if (ret == Z_NEED_DICT)
-                ret = Z_DATA_ERROR;
-            if (ret == Z_MEM_ERROR || ret == Z_DATA_ERROR)
-                goto build_index_error;
-            if (ret == Z_STREAM_END)
-                break;
-
-            /* if at end of block, consider adding an index entry (note that if
-               data_type indicates an end-of-block, then all of the
-               uncompressed data from that block has been delivered, and none
-               of the compressed data after that block has been consumed,
-               except for up to seven bits) -- the totout == 0 provides an
-               entry point after the zlib or gzip header, and assures that the
-               index always has at least one access point; we avoid creating an
-               access point after the last block by checking bit 6 of data_type
-             */
-            if ((strm.data_type & 128) && !(strm.data_type & 64) &&
-                (totout == 0 || totout - last > span)) {
-                index = addpoint(index, strm.data_type & 7, totin,
-                                 totout, strm.avail_out, window);
-                if (index == NULL) {
-                    ret = Z_MEM_ERROR;
-                    goto build_index_error;
-                }
-                last = totout;
-            }
-        } while (strm.avail_in != 0);
-    } while (ret != Z_STREAM_END);
-
-    /* clean up and return index (release unused entries in list) */
-    (void)inflateEnd(&strm);
-    index = realloc(index, sizeof(struct point) * index->have);
-    index->size = index->have;
-    *built = index;
-    return index->size;
-
-    /* return error */
-  build_index_error:
-    (void)inflateEnd(&strm);
-    if (index != NULL)
-        free_index(index);
-    return ret;
-}
-
-/* Use the index to read len bytes from offset into buf, return bytes read or
-   negative for error (Z_DATA_ERROR or Z_MEM_ERROR).  If data is requested past
-   the end of the uncompressed data, then extract() will return a value less
-   than len, indicating how much as actually read into buf.  This function
-   should not return a data error unless the file was modified since the index
-   was generated.  extract() may also return Z_ERRNO if there is an error on
-   reading or seeking the input file. */
-local int extract(FILE *in, struct access *index, off_t offset,
-                  unsigned char *buf, int len)
-{
-    int ret, skip;
-    z_stream strm;
-    struct point *here;
-    unsigned char input[CHUNK];
-    unsigned char discard[WINSIZE];
-
-    /* proceed only if something reasonable to do */
-    if (len < 0)
-        return 0;
-
-    /* find where in stream to start */
-    here = index->list;
-    ret = index->have;
-    while (--ret && here[1].out <= offset)
-        here++;
-
-    /* initialize file and inflate state to start there */
-    strm.zalloc = Z_NULL;
-    strm.zfree = Z_NULL;
-    strm.opaque = Z_NULL;
-    strm.avail_in = 0;
-    strm.next_in = Z_NULL;
-    ret = inflateInit2(&strm, -15);         /* raw inflate */
-    if (ret != Z_OK)
-        return ret;
-    ret = fseeko(in, here->in - (here->bits ? 1 : 0), SEEK_SET);
-    if (ret == -1)
-        goto extract_ret;
-    if (here->bits) {
-        ret = getc(in);
-        if (ret == -1) {
-            ret = ferror(in) ? Z_ERRNO : Z_DATA_ERROR;
-            goto extract_ret;
-        }
-        (void)inflatePrime(&strm, here->bits, ret >> (8 - here->bits));
-    }
-    (void)inflateSetDictionary(&strm, here->window, WINSIZE);
-
-    /* skip uncompressed bytes until offset reached, then satisfy request */
-    offset -= here->out;
-    strm.avail_in = 0;
-    skip = 1;                               /* while skipping to offset */
-    do {
-        /* define where to put uncompressed data, and how much */
-        if (offset == 0 && skip) {          /* at offset now */
-            strm.avail_out = len;
-            strm.next_out = buf;
-            skip = 0;                       /* only do this once */
-        }
-        if (offset > WINSIZE) {             /* skip WINSIZE bytes */
-            strm.avail_out = WINSIZE;
-            strm.next_out = discard;
-            offset -= WINSIZE;
-        }
-        else if (offset != 0) {             /* last skip */
-            strm.avail_out = (unsigned)offset;
-            strm.next_out = discard;
-            offset = 0;
-        }
-
-        /* uncompress until avail_out filled, or end of stream */
-        do {
-            if (strm.avail_in == 0) {
-                strm.avail_in = fread(input, 1, CHUNK, in);
-                if (ferror(in)) {
-                    ret = Z_ERRNO;
-                    goto extract_ret;
-                }
-                if (strm.avail_in == 0) {
-                    ret = Z_DATA_ERROR;
-                    goto extract_ret;
-                }
-                strm.next_in = input;
-            }
-            ret = inflate(&strm, Z_NO_FLUSH);       /* normal inflate */
-            if (ret == Z_NEED_DICT)
-                ret = Z_DATA_ERROR;
-            if (ret == Z_MEM_ERROR || ret == Z_DATA_ERROR)
-                goto extract_ret;
-            if (ret == Z_STREAM_END)
-                break;
-        } while (strm.avail_out != 0);
-
-        /* if reach end of stream, then don't keep trying to get more */
-        if (ret == Z_STREAM_END)
-            break;
-
-        /* do until offset reached and requested data read, or stream ends */
-    } while (skip);
-
-    /* compute number of uncompressed bytes read after offset */
-    ret = skip ? 0 : len - strm.avail_out;
-
-    /* clean up and return bytes read or error */
-  extract_ret:
-    (void)inflateEnd(&strm);
-    return ret;
-}
-
-/* Demonstrate the use of build_index() and extract() by processing the file
-   provided on the command line, and the extracting 16K from about 2/3rds of
-   the way through the uncompressed output, and writing that to stdout. */
-int main(int argc, char **argv)
-{
-    int len;
-    off_t offset;
-    FILE *in;
-    struct access *index;
-    unsigned char buf[CHUNK];
-
-    /* open input file */
-    if (argc != 2) {
-        fprintf(stderr, "usage: zran file.gz\n");
-        return 1;
-    }
-    in = fopen(argv[1], "rb");
-    if (in == NULL) {
-        fprintf(stderr, "zran: could not open %s for reading\n", argv[1]);
-        return 1;
-    }
-
-    /* build index */
-    len = build_index(in, SPAN, &index);
-    if (len < 0) {
-        fclose(in);
-        switch (len) {
-        case Z_MEM_ERROR:
-            fprintf(stderr, "zran: out of memory\n");
-            break;
-        case Z_DATA_ERROR:
-            fprintf(stderr, "zran: compressed data error in %s\n", argv[1]);
-            break;
-        case Z_ERRNO:
-            fprintf(stderr, "zran: read error on %s\n", argv[1]);
-            break;
-        default:
-            fprintf(stderr, "zran: error %d while building index\n", len);
-        }
-        return 1;
-    }
-    fprintf(stderr, "zran: built index with %d access points\n", len);
-
-    /* use index by reading some bytes from an arbitrary offset */
-    offset = (index->list[index->have - 1].out << 1) / 3;
-    len = extract(in, index, offset, buf, CHUNK);
-    if (len < 0)
-        fprintf(stderr, "zran: extraction failed: %s error\n",
-                len == Z_MEM_ERROR ? "out of memory" : "input corrupted");
-    else {
-        fwrite(buf, 1, len, stdout);
-        fprintf(stderr, "zran: extracted %d bytes at %llu\n", len, offset);
-    }
-
-    /* clean up and exit */
-    free_index(index);
-    fclose(in);
-    return 0;
-}
Index: trunk/minix/lib/zlib-1.2.3/gzio.c
===================================================================
--- trunk/minix/lib/zlib-1.2.3/gzio.c	(revision 9)
+++ 	(revision )
@@ -1,1026 +1,0 @@
-/* gzio.c -- IO on .gz files
- * Copyright (C) 1995-2005 Jean-loup Gailly.
- * For conditions of distribution and use, see copyright notice in zlib.h
- *
- * Compile this file with -DNO_GZCOMPRESS to avoid the compression code.
- */
-
-/* @(#) $Id: gzio.c,v 1.1 2005/09/23 22:39:00 beng Exp $ */
-
-#include <stdio.h>
-
-#include "zutil.h"
-
-#ifdef NO_DEFLATE       /* for compatibility with old definition */
-#  define NO_GZCOMPRESS
-#endif
-
-#ifndef NO_DUMMY_DECL
-struct internal_state {int dummy;}; /* for buggy compilers */
-#endif
-
-#ifndef Z_BUFSIZE
-#  ifdef MAXSEG_64K
-#    define Z_BUFSIZE 4096 /* minimize memory usage for 16-bit DOS */
-#  else
-#    define Z_BUFSIZE 16384
-#  endif
-#endif
-#ifndef Z_PRINTF_BUFSIZE
-#  define Z_PRINTF_BUFSIZE 4096
-#endif
-
-#ifdef __MVS__
-#  pragma map (fdopen , "\174\174FDOPEN")
-   FILE *fdopen(int, const char *);
-#endif
-
-#ifndef STDC
-extern voidp  malloc OF((uInt size));
-extern void   free   OF((voidpf ptr));
-#endif
-
-#define ALLOC(size) malloc(size)
-#define TRYFREE(p) {if (p) free(p);}
-
-static int const gz_magic[2] = {0x1f, 0x8b}; /* gzip magic header */
-
-/* gzip flag byte */
-#define ASCII_FLAG   0x01 /* bit 0 set: file probably ascii text */
-#define HEAD_CRC     0x02 /* bit 1 set: header CRC present */
-#define EXTRA_FIELD  0x04 /* bit 2 set: extra field present */
-#define ORIG_NAME    0x08 /* bit 3 set: original file name present */
-#define COMMENT      0x10 /* bit 4 set: file comment present */
-#define RESERVED     0xE0 /* bits 5..7: reserved */
-
-typedef struct gz_stream {
-    z_stream stream;
-    int      z_err;   /* error code for last stream operation */
-    int      z_eof;   /* set if end of input file */
-    FILE     *file;   /* .gz file */
-    Byte     *inbuf;  /* input buffer */
-    Byte     *outbuf; /* output buffer */
-    uLong    crc;     /* crc32 of uncompressed data */
-    char     *msg;    /* error message */
-    char     *path;   /* path name for debugging only */
-    int      transparent; /* 1 if input file is not a .gz file */
-    char     mode;    /* 'w' or 'r' */
-    z_off_t  start;   /* start of compressed data in file (header skipped) */
-    z_off_t  in;      /* bytes into deflate or inflate */
-    z_off_t  out;     /* bytes out of deflate or inflate */
-    int      back;    /* one character push-back */
-    int      last;    /* true if push-back is last character */
-} gz_stream;
-
-
-local gzFile gz_open      OF((const char *path, const char *mode, int  fd));
-local int do_flush        OF((gzFile file, int flush));
-local int    get_byte     OF((gz_stream *s));
-local void   check_header OF((gz_stream *s));
-local int    destroy      OF((gz_stream *s));
-local void   putLong      OF((FILE *file, uLong x));
-local uLong  getLong      OF((gz_stream *s));
-
-/* ===========================================================================
-     Opens a gzip (.gz) file for reading or writing. The mode parameter
-   is as in fopen ("rb" or "wb"). The file is given either by file descriptor
-   or path name (if fd == -1).
-     gz_open returns NULL if the file could not be opened or if there was
-   insufficient memory to allocate the (de)compression state; errno
-   can be checked to distinguish the two cases (if errno is zero, the
-   zlib error is Z_MEM_ERROR).
-*/
-local gzFile gz_open (path, mode, fd)
-    const char *path;
-    const char *mode;
-    int  fd;
-{
-    int err;
-    int level = Z_DEFAULT_COMPRESSION; /* compression level */
-    int strategy = Z_DEFAULT_STRATEGY; /* compression strategy */
-    char *p = (char*)mode;
-    gz_stream *s;
-    char fmode[80]; /* copy of mode, without the compression level */
-    char *m = fmode;
-
-    if (!path || !mode) return Z_NULL;
-
-    s = (gz_stream *)ALLOC(sizeof(gz_stream));
-    if (!s) return Z_NULL;
-
-    s->stream.zalloc = (alloc_func)0;
-    s->stream.zfree = (free_func)0;
-    s->stream.opaque = (voidpf)0;
-    s->stream.next_in = s->inbuf = Z_NULL;
-    s->stream.next_out = s->outbuf = Z_NULL;
-    s->stream.avail_in = s->stream.avail_out = 0;
-    s->file = NULL;
-    s->z_err = Z_OK;
-    s->z_eof = 0;
-    s->in = 0;
-    s->out = 0;
-    s->back = EOF;
-    s->crc = crc32(0L, Z_NULL, 0);
-    s->msg = NULL;
-    s->transparent = 0;
-
-    s->path = (char*)ALLOC(strlen(path)+1);
-    if (s->path == NULL) {
-        return destroy(s), (gzFile)Z_NULL;
-    }
-    strcpy(s->path, path); /* do this early for debugging */
-
-    s->mode = '\0';
-    do {
-        if (*p == 'r') s->mode = 'r';
-        if (*p == 'w' || *p == 'a') s->mode = 'w';
-        if (*p >= '0' && *p <= '9') {
-            level = *p - '0';
-        } else if (*p == 'f') {
-          strategy = Z_FILTERED;
-        } else if (*p == 'h') {
-          strategy = Z_HUFFMAN_ONLY;
-        } else if (*p == 'R') {
-          strategy = Z_RLE;
-        } else {
-            *m++ = *p; /* copy the mode */
-        }
-    } while (*p++ && m != fmode + sizeof(fmode));
-    if (s->mode == '\0') return destroy(s), (gzFile)Z_NULL;
-
-    if (s->mode == 'w') {
-#ifdef NO_GZCOMPRESS
-        err = Z_STREAM_ERROR;
-#else
-        err = deflateInit2(&(s->stream), level,
-                           Z_DEFLATED, -MAX_WBITS, DEF_MEM_LEVEL, strategy);
-        /* windowBits is passed < 0 to suppress zlib header */
-
-        s->stream.next_out = s->outbuf = (Byte*)ALLOC(Z_BUFSIZE);
-#endif
-        if (err != Z_OK || s->outbuf == Z_NULL) {
-            return destroy(s), (gzFile)Z_NULL;
-        }
-    } else {
-        s->stream.next_in  = s->inbuf = (Byte*)ALLOC(Z_BUFSIZE);
-
-        err = inflateInit2(&(s->stream), -MAX_WBITS);
-        /* windowBits is passed < 0 to tell that there is no zlib header.
-         * Note that in this case inflate *requires* an extra "dummy" byte
-         * after the compressed stream in order to complete decompression and
-         * return Z_STREAM_END. Here the gzip CRC32 ensures that 4 bytes are
-         * present after the compressed stream.
-         */
-        if (err != Z_OK || s->inbuf == Z_NULL) {
-            return destroy(s), (gzFile)Z_NULL;
-        }
-    }
-    s->stream.avail_out = Z_BUFSIZE;
-
-    errno = 0;
-    s->file = fd < 0 ? F_OPEN(path, fmode) : (FILE*)fdopen(fd, fmode);
-
-    if (s->file == NULL) {
-        return destroy(s), (gzFile)Z_NULL;
-    }
-    if (s->mode == 'w') {
-        /* Write a very simple .gz header:
-         */
-        fprintf(s->file, "%c%c%c%c%c%c%c%c%c%c", gz_magic[0], gz_magic[1],
-             Z_DEFLATED, 0 /*flags*/, 0,0,0,0 /*time*/, 0 /*xflags*/, OS_CODE);
-        s->start = 10L;
-        /* We use 10L instead of ftell(s->file) to because ftell causes an
-         * fflush on some systems. This version of the library doesn't use
-         * start anyway in write mode, so this initialization is not
-         * necessary.
-         */
-    } else {
-        check_header(s); /* skip the .gz header */
-        s->start = ftell(s->file) - s->stream.avail_in;
-    }
-
-    return (gzFile)s;
-}
-
-/* ===========================================================================
-     Opens a gzip (.gz) file for reading or writing.
-*/
-gzFile ZEXPORT gzopen (path, mode)
-    const char *path;
-    const char *mode;
-{
-    return gz_open (path, mode, -1);
-}
-
-/* ===========================================================================
-     Associate a gzFile with the file descriptor fd. fd is not dup'ed here
-   to mimic the behavio(u)r of fdopen.
-*/
-gzFile ZEXPORT gzdopen (fd, mode)
-    int fd;
-    const char *mode;
-{
-    char name[46];      /* allow for up to 128-bit integers */
-
-    if (fd < 0) return (gzFile)Z_NULL;
-    sprintf(name, "<fd:%d>", fd); /* for debugging */
-
-    return gz_open (name, mode, fd);
-}
-
-/* ===========================================================================
- * Update the compression level and strategy
- */
-int ZEXPORT gzsetparams (file, level, strategy)
-    gzFile file;
-    int level;
-    int strategy;
-{
-    gz_stream *s = (gz_stream*)file;
-
-    if (s == NULL || s->mode != 'w') return Z_STREAM_ERROR;
-
-    /* Make room to allow flushing */
-    if (s->stream.avail_out == 0) {
-
-        s->stream.next_out = s->outbuf;
-        if (fwrite(s->outbuf, 1, Z_BUFSIZE, s->file) != Z_BUFSIZE) {
-            s->z_err = Z_ERRNO;
-        }
-        s->stream.avail_out = Z_BUFSIZE;
-    }
-
-    return deflateParams (&(s->stream), level, strategy);
-}
-
-/* ===========================================================================
-     Read a byte from a gz_stream; update next_in and avail_in. Return EOF
-   for end of file.
-   IN assertion: the stream s has been sucessfully opened for reading.
-*/
-local int get_byte(s)
-    gz_stream *s;
-{
-    if (s->z_eof) return EOF;
-    if (s->stream.avail_in == 0) {
-        errno = 0;
-        s->stream.avail_in = (uInt)fread(s->inbuf, 1, Z_BUFSIZE, s->file);
-        if (s->stream.avail_in == 0) {
-            s->z_eof = 1;
-            if (ferror(s->file)) s->z_err = Z_ERRNO;
-            return EOF;
-        }
-        s->stream.next_in = s->inbuf;
-    }
-    s->stream.avail_in--;
-    return *(s->stream.next_in)++;
-}
-
-/* ===========================================================================
-      Check the gzip header of a gz_stream opened for reading. Set the stream
-    mode to transparent if the gzip magic header is not present; set s->err
-    to Z_DATA_ERROR if the magic header is present but the rest of the header
-    is incorrect.
-    IN assertion: the stream s has already been created sucessfully;
-       s->stream.avail_in is zero for the first time, but may be non-zero
-       for concatenated .gz files.
-*/
-local void check_header(s)
-    gz_stream *s;
-{
-    int method; /* method byte */
-    int flags;  /* flags byte */
-    uInt len;
-    int c;
-
-    /* Assure two bytes in the buffer so we can peek ahead -- handle case
-       where first byte of header is at the end of the buffer after the last
-       gzip segment */
-    len = s->stream.avail_in;
-    if (len < 2) {
-        if (len) s->inbuf[0] = s->stream.next_in[0];
-        errno = 0;
-        len = (uInt)fread(s->inbuf + len, 1, Z_BUFSIZE >> len, s->file);
-        if (len == 0 && ferror(s->file)) s->z_err = Z_ERRNO;
-        s->stream.avail_in += len;
-        s->stream.next_in = s->inbuf;
-        if (s->stream.avail_in < 2) {
-            s->transparent = s->stream.avail_in;
-            return;
-        }
-    }
-
-    /* Peek ahead to check the gzip magic header */
-    if (s->stream.next_in[0] != gz_magic[0] ||
-        s->stream.next_in[1] != gz_magic[1]) {
-        s->transparent = 1;
-        return;
-    }
-    s->stream.avail_in -= 2;
-    s->stream.next_in += 2;
-
-    /* Check the rest of the gzip header */
-    method = get_byte(s);
-    flags = get_byte(s);
-    if (method != Z_DEFLATED || (flags & RESERVED) != 0) {
-        s->z_err = Z_DATA_ERROR;
-        return;
-    }
-
-    /* Discard time, xflags and OS code: */
-    for (len = 0; len < 6; len++) (void)get_byte(s);
-
-    if ((flags & EXTRA_FIELD) != 0) { /* skip the extra field */
-        len  =  (uInt)get_byte(s);
-        len += ((uInt)get_byte(s))<<8;
-        /* len is garbage if EOF but the loop below will quit anyway */
-        while (len-- != 0 && get_byte(s) != EOF) ;
-    }
-    if ((flags & ORIG_NAME) != 0) { /* skip the original file name */
-        while ((c = get_byte(s)) != 0 && c != EOF) ;
-    }
-    if ((flags & COMMENT) != 0) {   /* skip the .gz file comment */
-        while ((c = get_byte(s)) != 0 && c != EOF) ;
-    }
-    if ((flags & HEAD_CRC) != 0) {  /* skip the header crc */
-        for (len = 0; len < 2; len++) (void)get_byte(s);
-    }
-    s->z_err = s->z_eof ? Z_DATA_ERROR : Z_OK;
-}
-
- /* ===========================================================================
- * Cleanup then free the given gz_stream. Return a zlib error code.
-   Try freeing in the reverse order of allocations.
- */
-local int destroy (s)
-    gz_stream *s;
-{
-    int err = Z_OK;
-
-    if (!s) return Z_STREAM_ERROR;
-
-    TRYFREE(s->msg);
-
-    if (s->stream.state != NULL) {
-        if (s->mode == 'w') {
-#ifdef NO_GZCOMPRESS
-            err = Z_STREAM_ERROR;
-#else
-            err = deflateEnd(&(s->stream));
-#endif
-        } else if (s->mode == 'r') {
-            err = inflateEnd(&(s->stream));
-        }
-    }
-    if (s->file != NULL && fclose(s->file)) {
-#ifdef ESPIPE
-        if (errno != ESPIPE) /* fclose is broken for pipes in HP/UX */
-#endif
-            err = Z_ERRNO;
-    }
-    if (s->z_err < 0) err = s->z_err;
-
-    TRYFREE(s->inbuf);
-    TRYFREE(s->outbuf);
-    TRYFREE(s->path);
-    TRYFREE(s);
-    return err;
-}
-
-/* ===========================================================================
-     Reads the given number of uncompressed bytes from the compressed file.
-   gzread returns the number of bytes actually read (0 for end of file).
-*/
-int ZEXPORT gzread (file, buf, len)
-    gzFile file;
-    voidp buf;
-    unsigned len;
-{
-    gz_stream *s = (gz_stream*)file;
-    Bytef *start = (Bytef*)buf; /* starting point for crc computation */
-    Byte  *next_out; /* == stream.next_out but not forced far (for MSDOS) */
-
-    if (s == NULL || s->mode != 'r') return Z_STREAM_ERROR;
-
-    if (s->z_err == Z_DATA_ERROR || s->z_err == Z_ERRNO) return -1;
-    if (s->z_err == Z_STREAM_END) return 0;  /* EOF */
-
-    next_out = (Byte*)buf;
-    s->stream.next_out = (Bytef*)buf;
-    s->stream.avail_out = len;
-
-    if (s->stream.avail_out && s->back != EOF) {
-        *next_out++ = s->back;
-        s->stream.next_out++;
-        s->stream.avail_out--;
-        s->back = EOF;
-        s->out++;
-        start++;
-        if (s->last) {
-            s->z_err = Z_STREAM_END;
-            return 1;
-        }
-    }
-
-    while (s->stream.avail_out != 0) {
-
-        if (s->transparent) {
-            /* Copy first the lookahead bytes: */
-            uInt n = s->stream.avail_in;
-            if (n > s->stream.avail_out) n = s->stream.avail_out;
-            if (n > 0) {
-                zmemcpy(s->stream.next_out, s->stream.next_in, n);
-                next_out += n;
-                s->stream.next_out = next_out;
-                s->stream.next_in   += n;
-                s->stream.avail_out -= n;
-                s->stream.avail_in  -= n;
-            }
-            if (s->stream.avail_out > 0) {
-                s->stream.avail_out -=
-                    (uInt)fread(next_out, 1, s->stream.avail_out, s->file);
-            }
-            len -= s->stream.avail_out;
-            s->in  += len;
-            s->out += len;
-            if (len == 0) s->z_eof = 1;
-            return (int)len;
-        }
-        if (s->stream.avail_in == 0 && !s->z_eof) {
-
-            errno = 0;
-            s->stream.avail_in = (uInt)fread(s->inbuf, 1, Z_BUFSIZE, s->file);
-            if (s->stream.avail_in == 0) {
-                s->z_eof = 1;
-                if (ferror(s->file)) {
-                    s->z_err = Z_ERRNO;
-                    break;
-                }
-            }
-            s->stream.next_in = s->inbuf;
-        }
-        s->in += s->stream.avail_in;
-        s->out += s->stream.avail_out;
-        s->z_err = inflate(&(s->stream), Z_NO_FLUSH);
-        s->in -= s->stream.avail_in;
-        s->out -= s->stream.avail_out;
-
-        if (s->z_err == Z_STREAM_END) {
-            /* Check CRC and original size */
-            s->crc = crc32(s->crc, start, (uInt)(s->stream.next_out - start));
-            start = s->stream.next_out;
-
-            if (getLong(s) != s->crc) {
-                s->z_err = Z_DATA_ERROR;
-            } else {
-                (void)getLong(s);
-                /* The uncompressed length returned by above getlong() may be
-                 * different from s->out in case of concatenated .gz files.
-                 * Check for such files:
-                 */
-                check_header(s);
-                if (s->z_err == Z_OK) {
-                    inflateReset(&(s->stream));
-                    s->crc = crc32(0L, Z_NULL, 0);
-                }
-            }
-        }
-        if (s->z_err != Z_OK || s->z_eof) break;
-    }
-    s->crc = crc32(s->crc, start, (uInt)(s->stream.next_out - start));
-
-    if (len == s->stream.avail_out &&
-        (s->z_err == Z_DATA_ERROR || s->z_err == Z_ERRNO))
-        return -1;
-    return (int)(len - s->stream.avail_out);
-}
-
-
-/* ===========================================================================
-      Reads one byte from the compressed file. gzgetc returns this byte
-   or -1 in case of end of file or error.
-*/
-int ZEXPORT gzgetc(file)
-    gzFile file;
-{
-    unsigned char c;
-
-    return gzread(file, &c, 1) == 1 ? c : -1;
-}
-
-
-/* ===========================================================================
-      Push one byte back onto the stream.
-*/
-int ZEXPORT gzungetc(c, file)
-    int c;
-    gzFile file;
-{
-    gz_stream *s = (gz_stream*)file;
-
-    if (s == NULL || s->mode != 'r' || c == EOF || s->back != EOF) return EOF;
-    s->back = c;
-    s->out--;
-    s->last = (s->z_err == Z_STREAM_END);
-    if (s->last) s->z_err = Z_OK;
-    s->z_eof = 0;
-    return c;
-}
-
-
-/* ===========================================================================
-      Reads bytes from the compressed file until len-1 characters are
-   read, or a newline character is read and transferred to buf, or an
-   end-of-file condition is encountered.  The string is then terminated
-   with a null character.
-      gzgets returns buf, or Z_NULL in case of error.
-
-      The current implementation is not optimized at all.
-*/
-char * ZEXPORT gzgets(file, buf, len)
-    gzFile file;
-    char *buf;
-    int len;
-{
-    char *b = buf;
-    if (buf == Z_NULL || len <= 0) return Z_NULL;
-
-    while (--len > 0 && gzread(file, buf, 1) == 1 && *buf++ != '\n') ;
-    *buf = '\0';
-    return b == buf && len > 0 ? Z_NULL : b;
-}
-
-
-#ifndef NO_GZCOMPRESS
-/* ===========================================================================
-     Writes the given number of uncompressed bytes into the compressed file.
-   gzwrite returns the number of bytes actually written (0 in case of error).
-*/
-int ZEXPORT gzwrite (file, buf, len)
-    gzFile file;
-    voidpc buf;
-    unsigned len;
-{
-    gz_stream *s = (gz_stream*)file;
-
-    if (s == NULL || s->mode != 'w') return Z_STREAM_ERROR;
-
-    s->stream.next_in = (Bytef*)buf;
-    s->stream.avail_in = len;
-
-    while (s->stream.avail_in != 0) {
-
-        if (s->stream.avail_out == 0) {
-
-            s->stream.next_out = s->outbuf;
-            if (fwrite(s->outbuf, 1, Z_BUFSIZE, s->file) != Z_BUFSIZE) {
-                s->z_err = Z_ERRNO;
-                break;
-            }
-            s->stream.avail_out = Z_BUFSIZE;
-        }
-        s->in += s->stream.avail_in;
-        s->out += s->stream.avail_out;
-        s->z_err = deflate(&(s->stream), Z_NO_FLUSH);
-        s->in -= s->stream.avail_in;
-        s->out -= s->stream.avail_out;
-        if (s->z_err != Z_OK) break;
-    }
-    s->crc = crc32(s->crc, (const Bytef *)buf, len);
-
-    return (int)(len - s->stream.avail_in);
-}
-
-
-/* ===========================================================================
-     Converts, formats, and writes the args to the compressed file under
-   control of the format string, as in fprintf. gzprintf returns the number of
-   uncompressed bytes actually written (0 in case of error).
-*/
-#ifdef STDC
-#include <stdarg.h>
-
-int ZEXPORTVA gzprintf (gzFile file, const char *format, /* args */ ...)
-{
-    char buf[Z_PRINTF_BUFSIZE];
-    va_list va;
-    int len;
-
-    buf[sizeof(buf) - 1] = 0;
-    va_start(va, format);
-#ifdef NO_vsnprintf
-#  ifdef HAS_vsprintf_void
-    (void)vsprintf(buf, format, va);
-    va_end(va);
-    for (len = 0; len < sizeof(buf); len++)
-        if (buf[len] == 0) break;
-#  else
-    len = vsprintf(buf, format, va);
-    va_end(va);
-#  endif
-#else
-#  ifdef HAS_vsnprintf_void
-    (void)vsnprintf(buf, sizeof(buf), format, va);
-    va_end(va);
-    len = strlen(buf);
-#  else
-    len = vsnprintf(buf, sizeof(buf), format, va);
-    va_end(va);
-#  endif
-#endif
-    if (len <= 0 || len >= (int)sizeof(buf) || buf[sizeof(buf) - 1] != 0)
-        return 0;
-    return gzwrite(file, buf, (unsigned)len);
-}
-#else /* not ANSI C */
-
-int ZEXPORTVA gzprintf (file, format, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10,
-                       a11, a12, a13, a14, a15, a16, a17, a18, a19, a20)
-    gzFile file;
-    const char *format;
-    int a1, a2, a3, a4, a5, a6, a7, a8, a9, a10,
-        a11, a12, a13, a14, a15, a16, a17, a18, a19, a20;
-{
-    char buf[Z_PRINTF_BUFSIZE];
-    int len;
-
-    buf[sizeof(buf) - 1] = 0;
-#ifdef NO_snprintf
-#  ifdef HAS_sprintf_void
-    sprintf(buf, format, a1, a2, a3, a4, a5, a6, a7, a8,
-            a9, a10, a11, a12, a13, a14, a15, a16, a17, a18, a19, a20);
-    for (len = 0; len < sizeof(buf); len++)
-        if (buf[len] == 0) break;
-#  else
-    len = sprintf(buf, format, a1, a2, a3, a4, a5, a6, a7, a8,
-                a9, a10, a11, a12, a13, a14, a15, a16, a17, a18, a19, a20);
-#  endif
-#else
-#  ifdef HAS_snprintf_void
-    snprintf(buf, sizeof(buf), format, a1, a2, a3, a4, a5, a6, a7, a8,
-             a9, a10, a11, a12, a13, a14, a15, a16, a17, a18, a19, a20);
-    len = strlen(buf);
-#  else
-    len = snprintf(buf, sizeof(buf), format, a1, a2, a3, a4, a5, a6, a7, a8,
-                 a9, a10, a11, a12, a13, a14, a15, a16, a17, a18, a19, a20);
-#  endif
-#endif
-    if (len <= 0 || len >= sizeof(buf) || buf[sizeof(buf) - 1] != 0)
-        return 0;
-    return gzwrite(file, buf, len);
-}
-#endif
-
-/* ===========================================================================
-      Writes c, converted to an unsigned char, into the compressed file.
-   gzputc returns the value that was written, or -1 in case of error.
-*/
-int ZEXPORT gzputc(file, c)
-    gzFile file;
-    int c;
-{
-    unsigned char cc = (unsigned char) c; /* required for big endian systems */
-
-    return gzwrite(file, &cc, 1) == 1 ? (int)cc : -1;
-}
-
-
-/* ===========================================================================
-      Writes the given null-terminated string to the compressed file, excluding
-   the terminating null character.
-      gzputs returns the number of characters written, or -1 in case of error.
-*/
-int ZEXPORT gzputs(file, s)
-    gzFile file;
-    const char *s;
-{
-    return gzwrite(file, (char*)s, (unsigned)strlen(s));
-}
-
-
-/* ===========================================================================
-     Flushes all pending output into the compressed file. The parameter
-   flush is as in the deflate() function.
-*/
-local int do_flush (file, flush)
-    gzFile file;
-    int flush;
-{
-    uInt len;
-    int done = 0;
-    gz_stream *s = (gz_stream*)file;
-
-    if (s == NULL || s->mode != 'w') return Z_STREAM_ERROR;
-
-    s->stream.avail_in = 0; /* should be zero already anyway */
-
-    for (;;) {
-        len = Z_BUFSIZE - s->stream.avail_out;
-
-        if (len != 0) {
-            if ((uInt)fwrite(s->outbuf, 1, len, s->file) != len) {
-                s->z_err = Z_ERRNO;
-                return Z_ERRNO;
-            }
-            s->stream.next_out = s->outbuf;
-            s->stream.avail_out = Z_BUFSIZE;
-        }
-        if (done) break;
-        s->out += s->stream.avail_out;
-        s->z_err = deflate(&(s->stream), flush);
-        s->out -= s->stream.avail_out;
-
-        /* Ignore the second of two consecutive flushes: */
-        if (len == 0 && s->z_err == Z_BUF_ERROR) s->z_err = Z_OK;
-
-        /* deflate has finished flushing only when it hasn't used up
-         * all the available space in the output buffer:
-         */
-        done = (s->stream.avail_out != 0 || s->z_err == Z_STREAM_END);
-
-        if (s->z_err != Z_OK && s->z_err != Z_STREAM_END) break;
-    }
-    return  s->z_err == Z_STREAM_END ? Z_OK : s->z_err;
-}
-
-int ZEXPORT gzflush (file, flush)
-     gzFile file;
-     int flush;
-{
-    gz_stream *s = (gz_stream*)file;
-    int err = do_flush (file, flush);
-
-    if (err) return err;
-    fflush(s->file);
-    return  s->z_err == Z_STREAM_END ? Z_OK : s->z_err;
-}
-#endif /* NO_GZCOMPRESS */
-
-/* ===========================================================================
-      Sets the starting position for the next gzread or gzwrite on the given
-   compressed file. The offset represents a number of bytes in the
-      gzseek returns the resulting offset location as measured in bytes from
-   the beginning of the uncompressed stream, or -1 in case of error.
-      SEEK_END is not implemented, returns error.
-      In this version of the library, gzseek can be extremely slow.
-*/
-z_off_t ZEXPORT gzseek (file, offset, whence)
-    gzFile file;
-    z_off_t offset;
-    int whence;
-{
-    gz_stream *s = (gz_stream*)file;
-
-    if (s == NULL || whence == SEEK_END ||
-        s->z_err == Z_ERRNO || s->z_err == Z_DATA_ERROR) {
-        return -1L;
-    }
-
-    if (s->mode == 'w') {
-#ifdef NO_GZCOMPRESS
-        return -1L;
-#else
-        if (whence == SEEK_SET) {
-            offset -= s->in;
-        }
-        if (offset < 0) return -1L;
-
-        /* At this point, offset is the number of zero bytes to write. */
-        if (s->inbuf == Z_NULL) {
-            s->inbuf = (Byte*)ALLOC(Z_BUFSIZE); /* for seeking */
-            if (s->inbuf == Z_NULL) return -1L;
-            zmemzero(s->inbuf, Z_BUFSIZE);
-        }
-        while (offset > 0)  {
-            uInt size = Z_BUFSIZE;
-            if (offset < Z_BUFSIZE) size = (uInt)offset;
-
-            size = gzwrite(file, s->inbuf, size);
-            if (size == 0) return -1L;
-
-            offset -= size;
-        }
-        return s->in;
-#endif
-    }
-    /* Rest of function is for reading only */
-
-    /* compute absolute position */
-    if (whence == SEEK_CUR) {
-        offset += s->out;
-    }
-    if (offset < 0) return -1L;
-
-    if (s->transparent) {
-        /* map to fseek */
-        s->back = EOF;
-        s->stream.avail_in = 0;
-        s->stream.next_in = s->inbuf;
-        if (fseek(s->file, offset, SEEK_SET) < 0) return -1L;
-
-        s->in = s->out = offset;
-        return offset;
-    }
-
-    /* For a negative seek, rewind and use positive seek */
-    if (offset >= s->out) {
-        offset -= s->out;
-    } else if (gzrewind(file) < 0) {
-        return -1L;
-    }
-    /* offset is now the number of bytes to skip. */
-
-    if (offset != 0 && s->outbuf == Z_NULL) {
-        s->outbuf = (Byte*)ALLOC(Z_BUFSIZE);
-        if (s->outbuf == Z_NULL) return -1L;
-    }
-    if (offset && s->back != EOF) {
-        s->back = EOF;
-        s->out++;
-        offset--;
-        if (s->last) s->z_err = Z_STREAM_END;
-    }
-    while (offset > 0)  {
-        int size = Z_BUFSIZE;
-        if (offset < Z_BUFSIZE) size = (int)offset;
-
-        size = gzread(file, s->outbuf, (uInt)size);
-        if (size <= 0) return -1L;
-        offset -= size;
-    }
-    return s->out;
-}
-
-/* ===========================================================================
-     Rewinds input file.
-*/
-int ZEXPORT gzrewind (file)
-    gzFile file;
-{
-    gz_stream *s = (gz_stream*)file;
-
-    if (s == NULL || s->mode != 'r') return -1;
-
-    s->z_err = Z_OK;
-    s->z_eof = 0;
-    s->back = EOF;
-    s->stream.avail_in = 0;
-    s->stream.next_in = s->inbuf;
-    s->crc = crc32(0L, Z_NULL, 0);
-    if (!s->transparent) (void)inflateReset(&s->stream);
-    s->in = 0;
-    s->out = 0;
-    return fseek(s->file, s->start, SEEK_SET);
-}
-
-/* ===========================================================================
-     Returns the starting position for the next gzread or gzwrite on the
-   given compressed file. This position represents a number of bytes in the
-   uncompressed data stream.
-*/
-z_off_t ZEXPORT gztell (file)
-    gzFile file;
-{
-    return gzseek(file, 0L, SEEK_CUR);
-}
-
-/* ===========================================================================
-     Returns 1 when EOF has previously been detected reading the given
-   input stream, otherwise zero.
-*/
-int ZEXPORT gzeof (file)
-    gzFile file;
-{
-    gz_stream *s = (gz_stream*)file;
-
-    /* With concatenated compressed files that can have embedded
-     * crc trailers, z_eof is no longer the only/best indicator of EOF
-     * on a gz_stream. Handle end-of-stream error explicitly here.
-     */
-    if (s == NULL || s->mode != 'r') return 0;
-    if (s->z_eof) return 1;
-    return s->z_err == Z_STREAM_END;
-}
-
-/* ===========================================================================
-     Returns 1 if reading and doing so transparently, otherwise zero.
-*/
-int ZEXPORT gzdirect (file)
-    gzFile file;
-{
-    gz_stream *s = (gz_stream*)file;
-
-    if (s == NULL || s->mode != 'r') return 0;
-    return s->transparent;
-}
-
-/* ===========================================================================
-   Outputs a long in LSB order to the given file
-*/
-local void putLong (file, x)
-    FILE *file;
-    uLong x;
-{
-    int n;
-    for (n = 0; n < 4; n++) {
-        fputc((int)(x & 0xff), file);
-        x >>= 8;
-    }
-}
-
-/* ===========================================================================
-   Reads a long in LSB order from the given gz_stream. Sets z_err in case
-   of error.
-*/
-local uLong getLong (s)
-    gz_stream *s;
-{
-    uLong x = (uLong)get_byte(s);
-    int c;
-
-    x += ((uLong)get_byte(s))<<8;
-    x += ((uLong)get_byte(s))<<16;
-    c = get_byte(s);
-    if (c == EOF) s->z_err = Z_DATA_ERROR;
-    x += ((uLong)c)<<24;
-    return x;
-}
-
-/* ===========================================================================
-     Flushes all pending output if necessary, closes the compressed file
-   and deallocates all the (de)compression state.
-*/
-int ZEXPORT gzclose (file)
-    gzFile file;
-{
-    gz_stream *s = (gz_stream*)file;
-
-    if (s == NULL) return Z_STREAM_ERROR;
-
-    if (s->mode == 'w') {
-#ifdef NO_GZCOMPRESS
-        return Z_STREAM_ERROR;
-#else
-        if (do_flush (file, Z_FINISH) != Z_OK)
-            return destroy((gz_stream*)file);
-
-        putLong (s->file, s->crc);
-        putLong (s->file, (uLong)(s->in & 0xffffffff));
-#endif
-    }
-    return destroy((gz_stream*)file);
-}
-
-#ifdef STDC
-#  define zstrerror(errnum) strerror(errnum)
-#else
-#  define zstrerror(errnum) ""
-#endif
-
-/* ===========================================================================
-     Returns the error message for the last error which occurred on the
-   given compressed file. errnum is set to zlib error number. If an
-   error occurred in the file system and not in the compression library,
-   errnum is set to Z_ERRNO and the application may consult errno
-   to get the exact error code.
-*/
-const char * ZEXPORT gzerror (file, errnum)
-    gzFile file;
-    int *errnum;
-{
-    char *m;
-    gz_stream *s = (gz_stream*)file;
-
-    if (s == NULL) {
-        *errnum = Z_STREAM_ERROR;
-        return (const char*)ERR_MSG(Z_STREAM_ERROR);
-    }
-    *errnum = s->z_err;
-    if (*errnum == Z_OK) return (const char*)"";
-
-    m = (char*)(*errnum == Z_ERRNO ? zstrerror(errno) : s->stream.msg);
-
-    if (m == NULL || *m == '\0') m = (char*)ERR_MSG(s->z_err);
-
-    TRYFREE(s->msg);
-    s->msg = (char*)ALLOC(strlen(s->path) + strlen(m) + 3);
-    if (s->msg == Z_NULL) return (const char*)ERR_MSG(Z_MEM_ERROR);
-    strcpy(s->msg, s->path);
-    strcat(s->msg, ": ");
-    strcat(s->msg, m);
-    return (const char*)s->msg;
-}
-
-/* ===========================================================================
-     Clear the error and end-of-file flags, and do the same for the real file.
-*/
-void ZEXPORT gzclearerr (file)
-    gzFile file;
-{
-    gz_stream *s = (gz_stream*)file;
-
-    if (s == NULL) return;
-    if (s->z_err != Z_STREAM_END) s->z_err = Z_OK;
-    s->z_eof = 0;
-    clearerr(s->file);
-}
Index: trunk/minix/lib/zlib-1.2.3/infback.c
===================================================================
--- trunk/minix/lib/zlib-1.2.3/infback.c	(revision 9)
+++ 	(revision )
@@ -1,623 +1,0 @@
-/* infback.c -- inflate using a call-back interface
- * Copyright (C) 1995-2005 Mark Adler
- * For conditions of distribution and use, see copyright notice in zlib.h
- */
-
-/*
-   This code is largely copied from inflate.c.  Normally either infback.o or
-   inflate.o would be linked into an application--not both.  The interface
-   with inffast.c is retained so that optimized assembler-coded versions of
-   inflate_fast() can be used with either inflate.c or infback.c.
- */
-
-#include "zutil.h"
-#include "inftrees.h"
-#include "inflate.h"
-#include "inffast.h"
-
-/* function prototypes */
-local void fixedtables OF((struct inflate_state FAR *state));
-
-/*
-   strm provides memory allocation functions in zalloc and zfree, or
-   Z_NULL to use the library memory allocation functions.
-
-   windowBits is in the range 8..15, and window is a user-supplied
-   window and output buffer that is 2**windowBits bytes.
- */
-int ZEXPORT inflateBackInit_(strm, windowBits, window, version, stream_size)
-z_streamp strm;
-int windowBits;
-unsigned char FAR *window;
-const char *version;
-int stream_size;
-{
-    struct inflate_state FAR *state;
-
-    if (version == Z_NULL || version[0] != ZLIB_VERSION[0] ||
-        stream_size != (int)(sizeof(z_stream)))
-        return Z_VERSION_ERROR;
-    if (strm == Z_NULL || window == Z_NULL ||
-        windowBits < 8 || windowBits > 15)
-        return Z_STREAM_ERROR;
-    strm->msg = Z_NULL;                 /* in case we return an error */
-    if (strm->zalloc == (alloc_func)0) {
-        strm->zalloc = zcalloc;
-        strm->opaque = (voidpf)0;
-    }
-    if (strm->zfree == (free_func)0) strm->zfree = zcfree;
-    state = (struct inflate_state FAR *)ZALLOC(strm, 1,
-                                               sizeof(struct inflate_state));
-    if (state == Z_NULL) return Z_MEM_ERROR;
-    Tracev((stderr, "inflate: allocated\n"));
-    strm->state = (struct internal_state FAR *)state;
-    state->dmax = 32768U;
-    state->wbits = windowBits;
-    state->wsize = 1U << windowBits;
-    state->window = window;
-    state->write = 0;
-    state->whave = 0;
-    return Z_OK;
-}
-
-/*
-   Return state with length and distance decoding tables and index sizes set to
-   fixed code decoding.  Normally this returns fixed tables from inffixed.h.
-   If BUILDFIXED is defined, then instead this routine builds the tables the
-   first time it's called, and returns those tables the first time and
-   thereafter.  This reduces the size of the code by about 2K bytes, in
-   exchange for a little execution time.  However, BUILDFIXED should not be
-   used for threaded applications, since the rewriting of the tables and virgin
-   may not be thread-safe.
- */
-local void fixedtables(state)
-struct inflate_state FAR *state;
-{
-#ifdef BUILDFIXED
-    static int virgin = 1;
-    static code *lenfix, *distfix;
-    static code fixed[544];
-
-    /* build fixed huffman tables if first call (may not be thread safe) */
-    if (virgin) {
-        unsigned sym, bits;
-        static code *next;
-
-        /* literal/length table */
-        sym = 0;
-        while (sym < 144) state->lens[sym++] = 8;
-        while (sym < 256) state->lens[sym++] = 9;
-        while (sym < 280) state->lens[sym++] = 7;
-        while (sym < 288) state->lens[sym++] = 8;
-        next = fixed;
-        lenfix = next;
-        bits = 9;
-        inflate_table(LENS, state->lens, 288, &(next), &(bits), state->work);
-
-        /* distance table */
-        sym = 0;
-        while (sym < 32) state->lens[sym++] = 5;
-        distfix = next;
-        bits = 5;
-        inflate_table(DISTS, state->lens, 32, &(next), &(bits), state->work);
-
-        /* do this just once */
-        virgin = 0;
-    }
-#else /* !BUILDFIXED */
-#   include "inffixed.h"
-#endif /* BUILDFIXED */
-    state->lencode = lenfix;
-    state->lenbits = 9;
-    state->distcode = distfix;
-    state->distbits = 5;
-}
-
-/* Macros for inflateBack(): */
-
-/* Load returned state from inflate_fast() */
-#define LOAD() \
-    do { \
-        put = strm->next_out; \
-        left = strm->avail_out; \
-        next = strm->next_in; \
-        have = strm->avail_in; \
-        hold = state->hold; \
-        bits = state->bits; \
-    } while (0)
-
-/* Set state from registers for inflate_fast() */
-#define RESTORE() \
-    do { \
-        strm->next_out = put; \
-        strm->avail_out = left; \
-        strm->next_in = next; \
-        strm->avail_in = have; \
-        state->hold = hold; \
-        state->bits = bits; \
-    } while (0)
-
-/* Clear the input bit accumulator */
-#define INITBITS() \
-    do { \
-        hold = 0; \
-        bits = 0; \
-    } while (0)
-
-/* Assure that some input is available.  If input is requested, but denied,
-   then return a Z_BUF_ERROR from inflateBack(). */
-#define PULL() \
-    do { \
-        if (have == 0) { \
-            have = in(in_desc, &next); \
-            if (have == 0) { \
-                next = Z_NULL; \
-                ret = Z_BUF_ERROR; \
-                goto inf_leave; \
-            } \
-        } \
-    } while (0)
-
-/* Get a byte of input into the bit accumulator, or return from inflateBack()
-   with an error if there is no input available. */
-#define PULLBYTE() \
-    do { \
-        PULL(); \
-        have--; \
-        hold += (unsigned long)(*next++) << bits; \
-        bits += 8; \
-    } while (0)
-
-/* Assure that there are at least n bits in the bit accumulator.  If there is
-   not enough available input to do that, then return from inflateBack() with
-   an error. */
-#define NEEDBITS(n) \
-    do { \
-        while (bits < (unsigned)(n)) \
-            PULLBYTE(); \
-    } while (0)
-
-/* Return the low n bits of the bit accumulator (n < 16) */
-#define BITS(n) \
-    ((unsigned)hold & ((1U << (n)) - 1))
-
-/* Remove n bits from the bit accumulator */
-#define DROPBITS(n) \
-    do { \
-        hold >>= (n); \
-        bits -= (unsigned)(n); \
-    } while (0)
-
-/* Remove zero to seven bits as needed to go to a byte boundary */
-#define BYTEBITS() \
-    do { \
-        hold >>= bits & 7; \
-        bits -= bits & 7; \
-    } while (0)
-
-/* Assure that some output space is available, by writing out the window
-   if it's full.  If the write fails, return from inflateBack() with a
-   Z_BUF_ERROR. */
-#define ROOM() \
-    do { \
-        if (left == 0) { \
-            put = state->window; \
-            left = state->wsize; \
-            state->whave = left; \
-            if (out(out_desc, put, left)) { \
-                ret = Z_BUF_ERROR; \
-                goto inf_leave; \
-            } \
-        } \
-    } while (0)
-
-/*
-   strm provides the memory allocation functions and window buffer on input,
-   and provides information on the unused input on return.  For Z_DATA_ERROR
-   returns, strm will also provide an error message.
-
-   in() and out() are the call-back input and output functions.  When
-   inflateBack() needs more input, it calls in().  When inflateBack() has
-   filled the window with output, or when it completes with data in the
-   window, it calls out() to write out the data.  The application must not
-   change the provided input until in() is called again or inflateBack()
-   returns.  The application must not change the window/output buffer until
-   inflateBack() returns.
-
-   in() and out() are called with a descriptor parameter provided in the
-   inflateBack() call.  This parameter can be a structure that provides the
-   information required to do the read or write, as well as accumulated
-   information on the input and output such as totals and check values.
-
-   in() should return zero on failure.  out() should return non-zero on
-   failure.  If either in() or out() fails, than inflateBack() returns a
-   Z_BUF_ERROR.  strm->next_in can be checked for Z_NULL to see whether it
-   was in() or out() that caused in the error.  Otherwise,  inflateBack()
-   returns Z_STREAM_END on success, Z_DATA_ERROR for an deflate format
-   error, or Z_MEM_ERROR if it could not allocate memory for the state.
-   inflateBack() can also return Z_STREAM_ERROR if the input parameters
-   are not correct, i.e. strm is Z_NULL or the state was not initialized.
- */
-int ZEXPORT inflateBack(strm, in, in_desc, out, out_desc)
-z_streamp strm;
-in_func in;
-void FAR *in_desc;
-out_func out;
-void FAR *out_desc;
-{
-    struct inflate_state FAR *state;
-    unsigned char FAR *next;    /* next input */
-    unsigned char FAR *put;     /* next output */
-    unsigned have, left;        /* available input and output */
-    unsigned long hold;         /* bit buffer */
-    unsigned bits;              /* bits in bit buffer */
-    unsigned copy;              /* number of stored or match bytes to copy */
-    unsigned char FAR *from;    /* where to copy match bytes from */
-    code this;                  /* current decoding table entry */
-    code last;                  /* parent table entry */
-    unsigned len;               /* length to copy for repeats, bits to drop */
-    int ret;                    /* return code */
-    static const unsigned short order[19] = /* permutation of code lengths */
-        {16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15};
-
-    /* Check that the strm exists and that the state was initialized */
-    if (strm == Z_NULL || strm->state == Z_NULL)
-        return Z_STREAM_ERROR;
-    state = (struct inflate_state FAR *)strm->state;
-
-    /* Reset the state */
-    strm->msg = Z_NULL;
-    state->mode = TYPE;
-    state->last = 0;
-    state->whave = 0;
-    next = strm->next_in;
-    have = next != Z_NULL ? strm->avail_in : 0;
-    hold = 0;
-    bits = 0;
-    put = state->window;
-    left = state->wsize;
-
-    /* Inflate until end of block marked as last */
-    for (;;)
-        switch (state->mode) {
-        case TYPE:
-            /* determine and dispatch block type */
-            if (state->last) {
-                BYTEBITS();
-                state->mode = DONE;
-                break;
-            }
-            NEEDBITS(3);
-            state->last = BITS(1);
-            DROPBITS(1);
-            switch (BITS(2)) {
-            case 0:                             /* stored block */
-                Tracev((stderr, "inflate:     stored block%s\n",
-                        state->last ? " (last)" : ""));
-                state->mode = STORED;
-                break;
-            case 1:                             /* fixed block */
-                fixedtables(state);
-                Tracev((stderr, "inflate:     fixed codes block%s\n",
-                        state->last ? " (last)" : ""));
-                state->mode = LEN;              /* decode codes */
-                break;
-            case 2:                             /* dynamic block */
-                Tracev((stderr, "inflate:     dynamic codes block%s\n",
-                        state->last ? " (last)" : ""));
-                state->mode = TABLE;
-                break;
-            case 3:
-                strm->msg = (char *)"invalid block type";
-                state->mode = BAD;
-            }
-            DROPBITS(2);
-            break;
-
-        case STORED:
-            /* get and verify stored block length */
-            BYTEBITS();                         /* go to byte boundary */
-            NEEDBITS(32);
-            if ((hold & 0xffff) != ((hold >> 16) ^ 0xffff)) {
-                strm->msg = (char *)"invalid stored block lengths";
-                state->mode = BAD;
-                break;
-            }
-            state->length = (unsigned)hold & 0xffff;
-            Tracev((stderr, "inflate:       stored length %u\n",
-                    state->length));
-            INITBITS();
-
-            /* copy stored block from input to output */
-            while (state->length != 0) {
-                copy = state->length;
-                PULL();
-                ROOM();
-                if (copy > have) copy = have;
-                if (copy > left) copy = left;
-                zmemcpy(put, next, copy);
-                have -= copy;
-                next += copy;
-                left -= copy;
-                put += copy;
-                state->length -= copy;
-            }
-            Tracev((stderr, "inflate:       stored end\n"));
-            state->mode = TYPE;
-            break;
-
-        case TABLE:
-            /* get dynamic table entries descriptor */
-            NEEDBITS(14);
-            state->nlen = BITS(5) + 257;
-            DROPBITS(5);
-            state->ndist = BITS(5) + 1;
-            DROPBITS(5);
-            state->ncode = BITS(4) + 4;
-            DROPBITS(4);
-#ifndef PKZIP_BUG_WORKAROUND
-            if (state->nlen > 286 || state->ndist > 30) {
-                strm->msg = (char *)"too many length or distance symbols";
-                state->mode = BAD;
-                break;
-            }
-#endif
-            Tracev((stderr, "inflate:       table sizes ok\n"));
-
-            /* get code length code lengths (not a typo) */
-            state->have = 0;
-            while (state->have < state->ncode) {
-                NEEDBITS(3);
-                state->lens[order[state->have++]] = (unsigned short)BITS(3);
-                DROPBITS(3);
-            }
-            while (state->have < 19)
-                state->lens[order[state->have++]] = 0;
-            state->next = state->codes;
-            state->lencode = (code const FAR *)(state->next);
-            state->lenbits = 7;
-            ret = inflate_table(CODES, state->lens, 19, &(state->next),
-                                &(state->lenbits), state->work);
-            if (ret) {
-                strm->msg = (char *)"invalid code lengths set";
-                state->mode = BAD;
-                break;
-            }
-            Tracev((stderr, "inflate:       code lengths ok\n"));
-
-            /* get length and distance code code lengths */
-            state->have = 0;
-            while (state->have < state->nlen + state->ndist) {
-                for (;;) {
-                    this = state->lencode[BITS(state->lenbits)];
-                    if ((unsigned)(this.bits) <= bits) break;
-                    PULLBYTE();
-                }
-                if (this.val < 16) {
-                    NEEDBITS(this.bits);
-                    DROPBITS(this.bits);
-                    state->lens[state->have++] = this.val;
-                }
-                else {
-                    if (this.val == 16) {
-                        NEEDBITS(this.bits + 2);
-                        DROPBITS(this.bits);
-                        if (state->have == 0) {
-                            strm->msg = (char *)"invalid bit length repeat";
-                            state->mode = BAD;
-                            break;
-                        }
-                        len = (unsigned)(state->lens[state->have - 1]);
-                        copy = 3 + BITS(2);
-                        DROPBITS(2);
-                    }
-                    else if (this.val == 17) {
-                        NEEDBITS(this.bits + 3);
-                        DROPBITS(this.bits);
-                        len = 0;
-                        copy = 3 + BITS(3);
-                        DROPBITS(3);
-                    }
-                    else {
-                        NEEDBITS(this.bits + 7);
-                        DROPBITS(this.bits);
-                        len = 0;
-                        copy = 11 + BITS(7);
-                        DROPBITS(7);
-                    }
-                    if (state->have + copy > state->nlen + state->ndist) {
-                        strm->msg = (char *)"invalid bit length repeat";
-                        state->mode = BAD;
-                        break;
-                    }
-                    while (copy--)
-                        state->lens[state->have++] = (unsigned short)len;
-                }
-            }
-
-            /* handle error breaks in while */
-            if (state->mode == BAD) break;
-
-            /* build code tables */
-            state->next = state->codes;
-            state->lencode = (code const FAR *)(state->next);
-            state->lenbits = 9;
-            ret = inflate_table(LENS, state->lens, state->nlen, &(state->next),
-                                &(state->lenbits), state->work);
-            if (ret) {
-                strm->msg = (char *)"invalid literal/lengths set";
-                state->mode = BAD;
-                break;
-            }
-            state->distcode = (code const FAR *)(state->next);
-            state->distbits = 6;
-            ret = inflate_table(DISTS, state->lens + state->nlen, state->ndist,
-                            &(state->next), &(state->distbits), state->work);
-            if (ret) {
-                strm->msg = (char *)"invalid distances set";
-                state->mode = BAD;
-                break;
-            }
-            Tracev((stderr, "inflate:       codes ok\n"));
-            state->mode = LEN;
-
-        case LEN:
-            /* use inflate_fast() if we have enough input and output */
-            if (have >= 6 && left >= 258) {
-                RESTORE();
-                if (state->whave < state->wsize)
-                    state->whave = state->wsize - left;
-                inflate_fast(strm, state->wsize);
-                LOAD();
-                break;
-            }
-
-            /* get a literal, length, or end-of-block code */
-            for (;;) {
-                this = state->lencode[BITS(state->lenbits)];
-                if ((unsigned)(this.bits) <= bits) break;
-                PULLBYTE();
-            }
-            if (this.op && (this.op & 0xf0) == 0) {
-                last = this;
-                for (;;) {
-                    this = state->lencode[last.val +
-                            (BITS(last.bits + last.op) >> last.bits)];
-                    if ((unsigned)(last.bits + this.bits) <= bits) break;
-                    PULLBYTE();
-                }
-                DROPBITS(last.bits);
-            }
-            DROPBITS(this.bits);
-            state->length = (unsigned)this.val;
-
-            /* process literal */
-            if (this.op == 0) {
-                Tracevv((stderr, this.val >= 0x20 && this.val < 0x7f ?
-                        "inflate:         literal '%c'\n" :
-                        "inflate:         literal 0x%02x\n", this.val));
-                ROOM();
-                *put++ = (unsigned char)(state->length);
-                left--;
-                state->mode = LEN;
-                break;
-            }
-
-            /* process end of block */
-            if (this.op & 32) {
-                Tracevv((stderr, "inflate:         end of block\n"));
-                state->mode = TYPE;
-                break;
-            }
-
-            /* invalid code */
-            if (this.op & 64) {
-                strm->msg = (char *)"invalid literal/length code";
-                state->mode = BAD;
-                break;
-            }
-
-            /* length code -- get extra bits, if any */
-            state->extra = (unsigned)(this.op) & 15;
-            if (state->extra != 0) {
-                NEEDBITS(state->extra);
-                state->length += BITS(state->extra);
-                DROPBITS(state->extra);
-            }
-            Tracevv((stderr, "inflate:         length %u\n", state->length));
-
-            /* get distance code */
-            for (;;) {
-                this = state->distcode[BITS(state->distbits)];
-                if ((unsigned)(this.bits) <= bits) break;
-                PULLBYTE();
-            }
-            if ((this.op & 0xf0) == 0) {
-                last = this;
-                for (;;) {
-                    this = state->distcode[last.val +
-                            (BITS(last.bits + last.op) >> last.bits)];
-                    if ((unsigned)(last.bits + this.bits) <= bits) break;
-                    PULLBYTE();
-                }
-                DROPBITS(last.bits);
-            }
-            DROPBITS(this.bits);
-            if (this.op & 64) {
-                strm->msg = (char *)"invalid distance code";
-                state->mode = BAD;
-                break;
-            }
-            state->offset = (unsigned)this.val;
-
-            /* get distance extra bits, if any */
-            state->extra = (unsigned)(this.op) & 15;
-            if (state->extra != 0) {
-                NEEDBITS(state->extra);
-                state->offset += BITS(state->extra);
-                DROPBITS(state->extra);
-            }
-            if (state->offset > state->wsize - (state->whave < state->wsize ?
-                                                left : 0)) {
-                strm->msg = (char *)"invalid distance too far back";
-                state->mode = BAD;
-                break;
-            }
-            Tracevv((stderr, "inflate:         distance %u\n", state->offset));
-
-            /* copy match from window to output */
-            do {
-                ROOM();
-                copy = state->wsize - state->offset;
-                if (copy < left) {
-                    from = put + copy;
-                    copy = left - copy;
-                }
-                else {
-                    from = put - state->offset;
-                    copy = left;
-                }
-                if (copy > state->length) copy = state->length;
-                state->length -= copy;
-                left -= copy;
-                do {
-                    *put++ = *from++;
-                } while (--copy);
-            } while (state->length != 0);
-            break;
-
-        case DONE:
-            /* inflate stream terminated properly -- write leftover output */
-            ret = Z_STREAM_END;
-            if (left < state->wsize) {
-                if (out(out_desc, state->window, state->wsize - left))
-                    ret = Z_BUF_ERROR;
-            }
-            goto inf_leave;
-
-        case BAD:
-            ret = Z_DATA_ERROR;
-            goto inf_leave;
-
-        default:                /* can't happen, but makes compilers happy */
-            ret = Z_STREAM_ERROR;
-            goto inf_leave;
-        }
-
-    /* Return unused input */
-  inf_leave:
-    strm->next_in = next;
-    strm->avail_in = have;
-    return ret;
-}
-
-int ZEXPORT inflateBackEnd(strm)
-z_streamp strm;
-{
-    if (strm == Z_NULL || strm->state == Z_NULL || strm->zfree == (free_func)0)
-        return Z_STREAM_ERROR;
-    ZFREE(strm, strm->state);
-    strm->state = Z_NULL;
-    Tracev((stderr, "inflate: end\n"));
-    return Z_OK;
-}
Index: trunk/minix/lib/zlib-1.2.3/inffast.c
===================================================================
--- trunk/minix/lib/zlib-1.2.3/inffast.c	(revision 9)
+++ 	(revision )
@@ -1,318 +1,0 @@
-/* inffast.c -- fast decoding
- * Copyright (C) 1995-2004 Mark Adler
- * For conditions of distribution and use, see copyright notice in zlib.h
- */
-
-#include "zutil.h"
-#include "inftrees.h"
-#include "inflate.h"
-#include "inffast.h"
-
-#ifndef ASMINF
-
-/* Allow machine dependent optimization for post-increment or pre-increment.
-   Based on testing to date,
-   Pre-increment preferred for:
-   - PowerPC G3 (Adler)
-   - MIPS R5000 (Randers-Pehrson)
-   Post-increment preferred for:
-   - none
-   No measurable difference:
-   - Pentium III (Anderson)
-   - M68060 (Nikl)
- */
-#ifdef POSTINC
-#  define OFF 0
-#  define PUP(a) *(a)++
-#else
-#  define OFF 1
-#  define PUP(a) *++(a)
-#endif
-
-/*
-   Decode literal, length, and distance codes and write out the resulting
-   literal and match bytes until either not enough input or output is
-   available, an end-of-block is encountered, or a data error is encountered.
-   When large enough input and output buffers are supplied to inflate(), for
-   example, a 16K input buffer and a 64K output buffer, more than 95% of the
-   inflate execution time is spent in this routine.
-
-   Entry assumptions:
-
-        state->mode == LEN
-        strm->avail_in >= 6
-        strm->avail_out >= 258
-        start >= strm->avail_out
-        state->bits < 8
-
-   On return, state->mode is one of:
-
-        LEN -- ran out of enough output space or enough available input
-        TYPE -- reached end of block code, inflate() to interpret next block
-        BAD -- error in block data
-
-   Notes:
-
-    - The maximum input bits used by a length/distance pair is 15 bits for the
-      length code, 5 bits for the length extra, 15 bits for the distance code,
-      and 13 bits for the distance extra.  This totals 48 bits, or six bytes.
-      Therefore if strm->avail_in >= 6, then there is enough input to avoid
-      checking for available input while decoding.
-
-    - The maximum bytes that a single length/distance pair can output is 258
-      bytes, which is the maximum length that can be coded.  inflate_fast()
-      requires strm->avail_out >= 258 for each loop to avoid checking for
-      output space.
- */
-void inflate_fast(strm, start)
-z_streamp strm;
-unsigned start;         /* inflate()'s starting value for strm->avail_out */
-{
-    struct inflate_state FAR *state;
-    unsigned char FAR *in;      /* local strm->next_in */
-    unsigned char FAR *last;    /* while in < last, enough input available */
-    unsigned char FAR *out;     /* local strm->next_out */
-    unsigned char FAR *beg;     /* inflate()'s initial strm->next_out */
-    unsigned char FAR *end;     /* while out < end, enough space available */
-#ifdef INFLATE_STRICT
-    unsigned dmax;              /* maximum distance from zlib header */
-#endif
-    unsigned wsize;             /* window size or zero if not using window */
-    unsigned whave;             /* valid bytes in the window */
-    unsigned write;             /* window write index */
-    unsigned char FAR *window;  /* allocated sliding window, if wsize != 0 */
-    unsigned long hold;         /* local strm->hold */
-    unsigned bits;              /* local strm->bits */
-    code const FAR *lcode;      /* local strm->lencode */
-    code const FAR *dcode;      /* local strm->distcode */
-    unsigned lmask;             /* mask for first level of length codes */
-    unsigned dmask;             /* mask for first level of distance codes */
-    code this;                  /* retrieved table entry */
-    unsigned op;                /* code bits, operation, extra bits, or */
-                                /*  window position, window bytes to copy */
-    unsigned len;               /* match length, unused bytes */
-    unsigned dist;              /* match distance */
-    unsigned char FAR *from;    /* where to copy match from */
-
-    /* copy state to local variables */
-    state = (struct inflate_state FAR *)strm->state;
-    in = strm->next_in - OFF;
-    last = in + (strm->avail_in - 5);
-    out = strm->next_out - OFF;
-    beg = out - (start - strm->avail_out);
-    end = out + (strm->avail_out - 257);
-#ifdef INFLATE_STRICT
-    dmax = state->dmax;
-#endif
-    wsize = state->wsize;
-    whave = state->whave;
-    write = state->write;
-    window = state->window;
-    hold = state->hold;
-    bits = state->bits;
-    lcode = state->lencode;
-    dcode = state->distcode;
-    lmask = (1U << state->lenbits) - 1;
-    dmask = (1U << state->distbits) - 1;
-
-    /* decode literals and length/distances until end-of-block or not enough
-       input data or output space */
-    do {
-        if (bits < 15) {
-            hold += (unsigned long)(PUP(in)) << bits;
-            bits += 8;
-            hold += (unsigned long)(PUP(in)) << bits;
-            bits += 8;
-        }
-        this = lcode[hold & lmask];
-      dolen:
-        op = (unsigned)(this.bits);
-        hold >>= op;
-        bits -= op;
-        op = (unsigned)(this.op);
-        if (op == 0) {                          /* literal */
-            Tracevv((stderr, this.val >= 0x20 && this.val < 0x7f ?
-                    "inflate:         literal '%c'\n" :
-                    "inflate:         literal 0x%02x\n", this.val));
-            PUP(out) = (unsigned char)(this.val);
-        }
-        else if (op & 16) {                     /* length base */
-            len = (unsigned)(this.val);
-            op &= 15;                           /* number of extra bits */
-            if (op) {
-                if (bits < op) {
-                    hold += (unsigned long)(PUP(in)) << bits;
-                    bits += 8;
-                }
-                len += (unsigned)hold & ((1U << op) - 1);
-                hold >>= op;
-                bits -= op;
-            }
-            Tracevv((stderr, "inflate:         length %u\n", len));
-            if (bits < 15) {
-                hold += (unsigned long)(PUP(in)) << bits;
-                bits += 8;
-                hold += (unsigned long)(PUP(in)) << bits;
-                bits += 8;
-            }
-            this = dcode[hold & dmask];
-          dodist:
-            op = (unsigned)(this.bits);
-            hold >>= op;
-            bits -= op;
-            op = (unsigned)(this.op);
-            if (op & 16) {                      /* distance base */
-                dist = (unsigned)(this.val);
-                op &= 15;                       /* number of extra bits */
-                if (bits < op) {
-                    hold += (unsigned long)(PUP(in)) << bits;
-                    bits += 8;
-                    if (bits < op) {
-                        hold += (unsigned long)(PUP(in)) << bits;
-                        bits += 8;
-                    }
-                }
-                dist += (unsigned)hold & ((1U << op) - 1);
-#ifdef INFLATE_STRICT
-                if (dist > dmax) {
-                    strm->msg = (char *)"invalid distance too far back";
-                    state->mode = BAD;
-                    break;
-                }
-#endif
-                hold >>= op;
-                bits -= op;
-                Tracevv((stderr, "inflate:         distance %u\n", dist));
-                op = (unsigned)(out - beg);     /* max distance in output */
-                if (dist > op) {                /* see if copy from window */
-                    op = dist - op;             /* distance back in window */
-                    if (op > whave) {
-                        strm->msg = (char *)"invalid distance too far back";
-                        state->mode = BAD;
-                        break;
-                    }
-                    from = window - OFF;
-                    if (write == 0) {           /* very common case */
-                        from += wsize - op;
-                        if (op < len) {         /* some from window */
-                            len -= op;
-                            do {
-                                PUP(out) = PUP(from);
-                            } while (--op);
-                            from = out - dist;  /* rest from output */
-                        }
-                    }
-                    else if (write < op) {      /* wrap around window */
-                        from += wsize + write - op;
-                        op -= write;
-                        if (op < len) {         /* some from end of window */
-                            len -= op;
-                            do {
-                                PUP(out) = PUP(from);
-                            } while (--op);
-                            from = window - OFF;
-                            if (write < len) {  /* some from start of window */
-                                op = write;
-                                len -= op;
-                                do {
-                                    PUP(out) = PUP(from);
-                                } while (--op);
-                                from = out - dist;      /* rest from output */
-                            }
-                        }
-                    }
-                    else {                      /* contiguous in window */
-                        from += write - op;
-                        if (op < len) {         /* some from window */
-                            len -= op;
-                            do {
-                                PUP(out) = PUP(from);
-                            } while (--op);
-                            from = out - dist;  /* rest from output */
-                        }
-                    }
-                    while (len > 2) {
-                        PUP(out) = PUP(from);
-                        PUP(out) = PUP(from);
-                        PUP(out) = PUP(from);
-                        len -= 3;
-                    }
-                    if (len) {
-                        PUP(out) = PUP(from);
-                        if (len > 1)
-                            PUP(out) = PUP(from);
-                    }
-                }
-                else {
-                    from = out - dist;          /* copy direct from output */
-                    do {                        /* minimum length is three */
-                        PUP(out) = PUP(from);
-                        PUP(out) = PUP(from);
-                        PUP(out) = PUP(from);
-                        len -= 3;
-                    } while (len > 2);
-                    if (len) {
-                        PUP(out) = PUP(from);
-                        if (len > 1)
-                            PUP(out) = PUP(from);
-                    }
-                }
-            }
-            else if ((op & 64) == 0) {          /* 2nd level distance code */
-                this = dcode[this.val + (hold & ((1U << op) - 1))];
-                goto dodist;
-            }
-            else {
-                strm->msg = (char *)"invalid distance code";
-                state->mode = BAD;
-                break;
-            }
-        }
-        else if ((op & 64) == 0) {              /* 2nd level length code */
-            this = lcode[this.val + (hold & ((1U << op) - 1))];
-            goto dolen;
-        }
-        else if (op & 32) {                     /* end-of-block */
-            Tracevv((stderr, "inflate:         end of block\n"));
-            state->mode = TYPE;
-            break;
-        }
-        else {
-            strm->msg = (char *)"invalid literal/length code";
-            state->mode = BAD;
-            break;
-        }
-    } while (in < last && out < end);
-
-    /* return unused bytes (on entry, bits < 8, so in won't go too far back) */
-    len = bits >> 3;
-    in -= len;
-    bits -= len << 3;
-    hold &= (1U << bits) - 1;
-
-    /* update state and return */
-    strm->next_in = in + OFF;
-    strm->next_out = out + OFF;
-    strm->avail_in = (unsigned)(in < last ? 5 + (last - in) : 5 - (in - last));
-    strm->avail_out = (unsigned)(out < end ?
-                                 257 + (end - out) : 257 - (out - end));
-    state->hold = hold;
-    state->bits = bits;
-    return;
-}
-
-/*
-   inflate_fast() speedups that turned out slower (on a PowerPC G3 750CXe):
-   - Using bit fields for code structure
-   - Different op definition to avoid & for extra bits (do & for table bits)
-   - Three separate decoding do-loops for direct, window, and write == 0
-   - Special case for distance > 1 copies to do overlapped load and store copy
-   - Explicit branch predictions (based on measured branch probabilities)
-   - Deferring match copy and interspersed it with decoding subsequent codes
-   - Swapping literal/length else
-   - Swapping window/direct else
-   - Larger unrolled copy loops (three is about right)
-   - Moving len -= 3 statement into middle of loop
- */
-
-#endif /* !ASMINF */
Index: trunk/minix/lib/zlib-1.2.3/inffast.h
===================================================================
--- trunk/minix/lib/zlib-1.2.3/inffast.h	(revision 9)
+++ 	(revision )
@@ -1,11 +1,0 @@
-/* inffast.h -- header to use inffast.c
- * Copyright (C) 1995-2003 Mark Adler
- * For conditions of distribution and use, see copyright notice in zlib.h
- */
-
-/* WARNING: this file should *not* be used by applications. It is
-   part of the implementation of the compression library and is
-   subject to change. Applications should only use zlib.h.
- */
-
-void inflate_fast OF((z_streamp strm, unsigned start));
Index: trunk/minix/lib/zlib-1.2.3/inffixed.h
===================================================================
--- trunk/minix/lib/zlib-1.2.3/inffixed.h	(revision 9)
+++ 	(revision )
@@ -1,94 +1,0 @@
-    /* inffixed.h -- table for decoding fixed codes
-     * Generated automatically by makefixed().
-     */
-
-    /* WARNING: this file should *not* be used by applications. It
-       is part of the implementation of the compression library and
-       is subject to change. Applications should only use zlib.h.
-     */
-
-    static const code lenfix[512] = {
-        {96,7,0},{0,8,80},{0,8,16},{20,8,115},{18,7,31},{0,8,112},{0,8,48},
-        {0,9,192},{16,7,10},{0,8,96},{0,8,32},{0,9,160},{0,8,0},{0,8,128},
-        {0,8,64},{0,9,224},{16,7,6},{0,8,88},{0,8,24},{0,9,144},{19,7,59},
-        {0,8,120},{0,8,56},{0,9,208},{17,7,17},{0,8,104},{0,8,40},{0,9,176},
-        {0,8,8},{0,8,136},{0,8,72},{0,9,240},{16,7,4},{0,8,84},{0,8,20},
-        {21,8,227},{19,7,43},{0,8,116},{0,8,52},{0,9,200},{17,7,13},{0,8,100},
-        {0,8,36},{0,9,168},{0,8,4},{0,8,132},{0,8,68},{0,9,232},{16,7,8},
-        {0,8,92},{0,8,28},{0,9,152},{20,7,83},{0,8,124},{0,8,60},{0,9,216},
-        {18,7,23},{0,8,108},{0,8,44},{0,9,184},{0,8,12},{0,8,140},{0,8,76},
-        {0,9,248},{16,7,3},{0,8,82},{0,8,18},{21,8,163},{19,7,35},{0,8,114},
-        {0,8,50},{0,9,196},{17,7,11},{0,8,98},{0,8,34},{0,9,164},{0,8,2},
-        {0,8,130},{0,8,66},{0,9,228},{16,7,7},{0,8,90},{0,8,26},{0,9,148},
-        {20,7,67},{0,8,122},{0,8,58},{0,9,212},{18,7,19},{0,8,106},{0,8,42},
-        {0,9,180},{0,8,10},{0,8,138},{0,8,74},{0,9,244},{16,7,5},{0,8,86},
-        {0,8,22},{64,8,0},{19,7,51},{0,8,118},{0,8,54},{0,9,204},{17,7,15},
-        {0,8,102},{0,8,38},{0,9,172},{0,8,6},{0,8,134},{0,8,70},{0,9,236},
-        {16,7,9},{0,8,94},{0,8,30},{0,9,156},{20,7,99},{0,8,126},{0,8,62},
-        {0,9,220},{18,7,27},{0,8,110},{0,8,46},{0,9,188},{0,8,14},{0,8,142},
-        {0,8,78},{0,9,252},{96,7,0},{0,8,81},{0,8,17},{21,8,131},{18,7,31},
-        {0,8,113},{0,8,49},{0,9,194},{16,7,10},{0,8,97},{0,8,33},{0,9,162},
-        {0,8,1},{0,8,129},{0,8,65},{0,9,226},{16,7,6},{0,8,89},{0,8,25},
-        {0,9,146},{19,7,59},{0,8,121},{0,8,57},{0,9,210},{17,7,17},{0,8,105},
-        {0,8,41},{0,9,178},{0,8,9},{0,8,137},{0,8,73},{0,9,242},{16,7,4},
-        {0,8,85},{0,8,21},{16,8,258},{19,7,43},{0,8,117},{0,8,53},{0,9,202},
-        {17,7,13},{0,8,101},{0,8,37},{0,9,170},{0,8,5},{0,8,133},{0,8,69},
-        {0,9,234},{16,7,8},{0,8,93},{0,8,29},{0,9,154},{20,7,83},{0,8,125},
-        {0,8,61},{0,9,218},{18,7,23},{0,8,109},{0,8,45},{0,9,186},{0,8,13},
-        {0,8,141},{0,8,77},{0,9,250},{16,7,3},{0,8,83},{0,8,19},{21,8,195},
-        {19,7,35},{0,8,115},{0,8,51},{0,9,198},{17,7,11},{0,8,99},{0,8,35},
-        {0,9,166},{0,8,3},{0,8,131},{0,8,67},{0,9,230},{16,7,7},{0,8,91},
-        {0,8,27},{0,9,150},{20,7,67},{0,8,123},{0,8,59},{0,9,214},{18,7,19},
-        {0,8,107},{0,8,43},{0,9,182},{0,8,11},{0,8,139},{0,8,75},{0,9,246},
-        {16,7,5},{0,8,87},{0,8,23},{64,8,0},{19,7,51},{0,8,119},{0,8,55},
-        {0,9,206},{17,7,15},{0,8,103},{0,8,39},{0,9,174},{0,8,7},{0,8,135},
-        {0,8,71},{0,9,238},{16,7,9},{0,8,95},{0,8,31},{0,9,158},{20,7,99},
-        {0,8,127},{0,8,63},{0,9,222},{18,7,27},{0,8,111},{0,8,47},{0,9,190},
-        {0,8,15},{0,8,143},{0,8,79},{0,9,254},{96,7,0},{0,8,80},{0,8,16},
-        {20,8,115},{18,7,31},{0,8,112},{0,8,48},{0,9,193},{16,7,10},{0,8,96},
-        {0,8,32},{0,9,161},{0,8,0},{0,8,128},{0,8,64},{0,9,225},{16,7,6},
-        {0,8,88},{0,8,24},{0,9,145},{19,7,59},{0,8,120},{0,8,56},{0,9,209},
-        {17,7,17},{0,8,104},{0,8,40},{0,9,177},{0,8,8},{0,8,136},{0,8,72},
-        {0,9,241},{16,7,4},{0,8,84},{0,8,20},{21,8,227},{19,7,43},{0,8,116},
-        {0,8,52},{0,9,201},{17,7,13},{0,8,100},{0,8,36},{0,9,169},{0,8,4},
-        {0,8,132},{0,8,68},{0,9,233},{16,7,8},{0,8,92},{0,8,28},{0,9,153},
-        {20,7,83},{0,8,124},{0,8,60},{0,9,217},{18,7,23},{0,8,108},{0,8,44},
-        {0,9,185},{0,8,12},{0,8,140},{0,8,76},{0,9,249},{16,7,3},{0,8,82},
-        {0,8,18},{21,8,163},{19,7,35},{0,8,114},{0,8,50},{0,9,197},{17,7,11},
-        {0,8,98},{0,8,34},{0,9,165},{0,8,2},{0,8,130},{0,8,66},{0,9,229},
-        {16,7,7},{0,8,90},{0,8,26},{0,9,149},{20,7,67},{0,8,122},{0,8,58},
-        {0,9,213},{18,7,19},{0,8,106},{0,8,42},{0,9,181},{0,8,10},{0,8,138},
-        {0,8,74},{0,9,245},{16,7,5},{0,8,86},{0,8,22},{64,8,0},{19,7,51},
-        {0,8,118},{0,8,54},{0,9,205},{17,7,15},{0,8,102},{0,8,38},{0,9,173},
-        {0,8,6},{0,8,134},{0,8,70},{0,9,237},{16,7,9},{0,8,94},{0,8,30},
-        {0,9,157},{20,7,99},{0,8,126},{0,8,62},{0,9,221},{18,7,27},{0,8,110},
-        {0,8,46},{0,9,189},{0,8,14},{0,8,142},{0,8,78},{0,9,253},{96,7,0},
-        {0,8,81},{0,8,17},{21,8,131},{18,7,31},{0,8,113},{0,8,49},{0,9,195},
-        {16,7,10},{0,8,97},{0,8,33},{0,9,163},{0,8,1},{0,8,129},{0,8,65},
-        {0,9,227},{16,7,6},{0,8,89},{0,8,25},{0,9,147},{19,7,59},{0,8,121},
-        {0,8,57},{0,9,211},{17,7,17},{0,8,105},{0,8,41},{0,9,179},{0,8,9},
-        {0,8,137},{0,8,73},{0,9,243},{16,7,4},{0,8,85},{0,8,21},{16,8,258},
-        {19,7,43},{0,8,117},{0,8,53},{0,9,203},{17,7,13},{0,8,101},{0,8,37},
-        {0,9,171},{0,8,5},{0,8,133},{0,8,69},{0,9,235},{16,7,8},{0,8,93},
-        {0,8,29},{0,9,155},{20,7,83},{0,8,125},{0,8,61},{0,9,219},{18,7,23},
-        {0,8,109},{0,8,45},{0,9,187},{0,8,13},{0,8,141},{0,8,77},{0,9,251},
-        {16,7,3},{0,8,83},{0,8,19},{21,8,195},{19,7,35},{0,8,115},{0,8,51},
-        {0,9,199},{17,7,11},{0,8,99},{0,8,35},{0,9,167},{0,8,3},{0,8,131},
-        {0,8,67},{0,9,231},{16,7,7},{0,8,91},{0,8,27},{0,9,151},{20,7,67},
-        {0,8,123},{0,8,59},{0,9,215},{18,7,19},{0,8,107},{0,8,43},{0,9,183},
-        {0,8,11},{0,8,139},{0,8,75},{0,9,247},{16,7,5},{0,8,87},{0,8,23},
-        {64,8,0},{19,7,51},{0,8,119},{0,8,55},{0,9,207},{17,7,15},{0,8,103},
-        {0,8,39},{0,9,175},{0,8,7},{0,8,135},{0,8,71},{0,9,239},{16,7,9},
-        {0,8,95},{0,8,31},{0,9,159},{20,7,99},{0,8,127},{0,8,63},{0,9,223},
-        {18,7,27},{0,8,111},{0,8,47},{0,9,191},{0,8,15},{0,8,143},{0,8,79},
-        {0,9,255}
-    };
-
-    static const code distfix[32] = {
-        {16,5,1},{23,5,257},{19,5,17},{27,5,4097},{17,5,5},{25,5,1025},
-        {21,5,65},{29,5,16385},{16,5,3},{24,5,513},{20,5,33},{28,5,8193},
-        {18,5,9},{26,5,2049},{22,5,129},{64,5,0},{16,5,2},{23,5,385},
-        {19,5,25},{27,5,6145},{17,5,7},{25,5,1537},{21,5,97},{29,5,24577},
-        {16,5,4},{24,5,769},{20,5,49},{28,5,12289},{18,5,13},{26,5,3073},
-        {22,5,193},{64,5,0}
-    };
Index: trunk/minix/lib/zlib-1.2.3/inflate.c
===================================================================
--- trunk/minix/lib/zlib-1.2.3/inflate.c	(revision 9)
+++ 	(revision )
@@ -1,1368 +1,0 @@
-/* inflate.c -- zlib decompression
- * Copyright (C) 1995-2005 Mark Adler
- * For conditions of distribution and use, see copyright notice in zlib.h
- */
-
-/*
- * Change history:
- *
- * 1.2.beta0    24 Nov 2002
- * - First version -- complete rewrite of inflate to simplify code, avoid
- *   creation of window when not needed, minimize use of window when it is
- *   needed, make inffast.c even faster, implement gzip decoding, and to
- *   improve code readability and style over the previous zlib inflate code
- *
- * 1.2.beta1    25 Nov 2002
- * - Use pointers for available input and output checking in inffast.c
- * - Remove input and output counters in inffast.c
- * - Change inffast.c entry and loop from avail_in >= 7 to >= 6
- * - Remove unnecessary second byte pull from length extra in inffast.c
- * - Unroll direct copy to three copies per loop in inffast.c
- *
- * 1.2.beta2    4 Dec 2002
- * - Change external routine names to reduce potential conflicts
- * - Correct filename to inffixed.h for fixed tables in inflate.c
- * - Make hbuf[] unsigned char to match parameter type in inflate.c
- * - Change strm->next_out[-state->offset] to *(strm->next_out - state->offset)
- *   to avoid negation problem on Alphas (64 bit) in inflate.c
- *
- * 1.2.beta3    22 Dec 2002
- * - Add comments on state->bits assertion in inffast.c
- * - Add comments on op field in inftrees.h
- * - Fix bug in reuse of allocated window after inflateReset()
- * - Remove bit fields--back to byte structure for speed
- * - Remove distance extra == 0 check in inflate_fast()--only helps for lengths
- * - Change post-increments to pre-increments in inflate_fast(), PPC biased?
- * - Add compile time option, POSTINC, to use post-increments instead (Intel?)
- * - Make MATCH copy in inflate() much faster for when inflate_fast() not used
- * - Use local copies of stream next and avail values, as well as local bit
- *   buffer and bit count in inflate()--for speed when inflate_fast() not used
- *
- * 1.2.beta4    1 Jan 2003
- * - Split ptr - 257 statements in inflate_table() to avoid compiler warnings
- * - Move a comment on output buffer sizes from inffast.c to inflate.c
- * - Add comments in inffast.c to introduce the inflate_fast() routine
- * - Rearrange window copies in inflate_fast() for speed and simplification
- * - Unroll last copy for window match in inflate_fast()
- * - Use local copies of window variables in inflate_fast() for speed
- * - Pull out common write == 0 case for speed in inflate_fast()
- * - Make op and len in inflate_fast() unsigned for consistency
- * - Add FAR to lcode and dcode declarations in inflate_fast()
- * - Simplified bad distance check in inflate_fast()
- * - Added inflateBackInit(), inflateBack(), and inflateBackEnd() in new
- *   source file infback.c to provide a call-back interface to inflate for
- *   programs like gzip and unzip -- uses window as output buffer to avoid
- *   window copying
- *
- * 1.2.beta5    1 Jan 2003
- * - Improved inflateBack() interface to allow the caller to provide initial
- *   input in strm.
- * - Fixed stored blocks bug in inflateBack()
- *
- * 1.2.beta6    4 Jan 2003
- * - Added comments in inffast.c on effectiveness of POSTINC
- * - Typecasting all around to reduce compiler warnings
- * - Changed loops from while (1) or do {} while (1) to for (;;), again to
- *   make compilers happy
- * - Changed type of window in inflateBackInit() to unsigned char *
- *
- * 1.2.beta7    27 Jan 2003
- * - Changed many types to unsigned or unsigned short to avoid warnings
- * - Added inflateCopy() function
- *
- * 1.2.0        9 Mar 2003
- * - Changed inflateBack() interface to provide separate opaque descriptors
- *   for the in() and out() functions
- * - Changed inflateBack() argument and in_func typedef to swap the length
- *   and buffer address return values for the input function
- * - Check next_in and next_out for Z_NULL on entry to inflate()
- *
- * The history for versions after 1.2.0 are in ChangeLog in zlib distribution.
- */
-
-#include "zutil.h"
-#include "inftrees.h"
-#include "inflate.h"
-#include "inffast.h"
-
-#ifdef MAKEFIXED
-#  ifndef BUILDFIXED
-#    define BUILDFIXED
-#  endif
-#endif
-
-/* function prototypes */
-local void fixedtables OF((struct inflate_state FAR *state));
-local int updatewindow OF((z_streamp strm, unsigned out));
-#ifdef BUILDFIXED
-   void makefixed OF((void));
-#endif
-local unsigned syncsearch OF((unsigned FAR *have, unsigned char FAR *buf,
-                              unsigned len));
-
-int ZEXPORT inflateReset(strm)
-z_streamp strm;
-{
-    struct inflate_state FAR *state;
-
-    if (strm == Z_NULL || strm->state == Z_NULL) return Z_STREAM_ERROR;
-    state = (struct inflate_state FAR *)strm->state;
-    strm->total_in = strm->total_out = state->total = 0;
-    strm->msg = Z_NULL;
-    strm->adler = 1;        /* to support ill-conceived Java test suite */
-    state->mode = HEAD;
-    state->last = 0;
-    state->havedict = 0;
-    state->dmax = 32768U;
-    state->head = Z_NULL;
-    state->wsize = 0;
-    state->whave = 0;
-    state->write = 0;
-    state->hold = 0;
-    state->bits = 0;
-    state->lencode = state->distcode = state->next = state->codes;
-    Tracev((stderr, "inflate: reset\n"));
-    return Z_OK;
-}
-
-int ZEXPORT inflatePrime(strm, bits, value)
-z_streamp strm;
-int bits;
-int value;
-{
-    struct inflate_state FAR *state;
-
-    if (strm == Z_NULL || strm->state == Z_NULL) return Z_STREAM_ERROR;
-    state = (struct inflate_state FAR *)strm->state;
-    if (bits > 16 || state->bits + bits > 32) return Z_STREAM_ERROR;
-    value &= (1L << bits) - 1;
-    state->hold += value << state->bits;
-    state->bits += bits;
-    return Z_OK;
-}
-
-int ZEXPORT inflateInit2_(strm, windowBits, version, stream_size)
-z_streamp strm;
-int windowBits;
-const char *version;
-int stream_size;
-{
-    struct inflate_state FAR *state;
-
-    if (version == Z_NULL || version[0] != ZLIB_VERSION[0] ||
-        stream_size != (int)(sizeof(z_stream)))
-        return Z_VERSION_ERROR;
-    if (strm == Z_NULL) return Z_STREAM_ERROR;
-    strm->msg = Z_NULL;                 /* in case we return an error */
-    if (strm->zalloc == (alloc_func)0) {
-        strm->zalloc = zcalloc;
-        strm->opaque = (voidpf)0;
-    }
-    if (strm->zfree == (free_func)0) strm->zfree = zcfree;
-    state = (struct inflate_state FAR *)
-            ZALLOC(strm, 1, sizeof(struct inflate_state));
-    if (state == Z_NULL) return Z_MEM_ERROR;
-    Tracev((stderr, "inflate: allocated\n"));
-    strm->state = (struct internal_state FAR *)state;
-    if (windowBits < 0) {
-        state->wrap = 0;
-        windowBits = -windowBits;
-    }
-    else {
-        state->wrap = (windowBits >> 4) + 1;
-#ifdef GUNZIP
-        if (windowBits < 48) windowBits &= 15;
-#endif
-    }
-    if (windowBits < 8 || windowBits > 15) {
-        ZFREE(strm, state);
-        strm->state = Z_NULL;
-        return Z_STREAM_ERROR;
-    }
-    state->wbits = (unsigned)windowBits;
-    state->window = Z_NULL;
-    return inflateReset(strm);
-}
-
-int ZEXPORT inflateInit_(strm, version, stream_size)
-z_streamp strm;
-const char *version;
-int stream_size;
-{
-    return inflateInit2_(strm, DEF_WBITS, version, stream_size);
-}
-
-/*
-   Return state with length and distance decoding tables and index sizes set to
-   fixed code decoding.  Normally this returns fixed tables from inffixed.h.
-   If BUILDFIXED is defined, then instead this routine builds the tables the
-   first time it's called, and returns those tables the first time and
-   thereafter.  This reduces the size of the code by about 2K bytes, in
-   exchange for a little execution time.  However, BUILDFIXED should not be
-   used for threaded applications, since the rewriting of the tables and virgin
-   may not be thread-safe.
- */
-local void fixedtables(state)
-struct inflate_state FAR *state;
-{
-#ifdef BUILDFIXED
-    static int virgin = 1;
-    static code *lenfix, *distfix;
-    static code fixed[544];
-
-    /* build fixed huffman tables if first call (may not be thread safe) */
-    if (virgin) {
-        unsigned sym, bits;
-        static code *next;
-
-        /* literal/length table */
-        sym = 0;
-        while (sym < 144) state->lens[sym++] = 8;
-        while (sym < 256) state->lens[sym++] = 9;
-        while (sym < 280) state->lens[sym++] = 7;
-        while (sym < 288) state->lens[sym++] = 8;
-        next = fixed;
-        lenfix = next;
-        bits = 9;
-        inflate_table(LENS, state->lens, 288, &(next), &(bits), state->work);
-
-        /* distance table */
-        sym = 0;
-        while (sym < 32) state->lens[sym++] = 5;
-        distfix = next;
-        bits = 5;
-        inflate_table(DISTS, state->lens, 32, &(next), &(bits), state->work);
-
-        /* do this just once */
-        virgin = 0;
-    }
-#else /* !BUILDFIXED */
-#   include "inffixed.h"
-#endif /* BUILDFIXED */
-    state->lencode = lenfix;
-    state->lenbits = 9;
-    state->distcode = distfix;
-    state->distbits = 5;
-}
-
-#ifdef MAKEFIXED
-#include <stdio.h>
-
-/*
-   Write out the inffixed.h that is #include'd above.  Defining MAKEFIXED also
-   defines BUILDFIXED, so the tables are built on the fly.  makefixed() writes
-   those tables to stdout, which would be piped to inffixed.h.  A small program
-   can simply call makefixed to do this:
-
-    void makefixed(void);
-
-    int main(void)
-    {
-        makefixed();
-        return 0;
-    }
-
-   Then that can be linked with zlib built with MAKEFIXED defined and run:
-
-    a.out > inffixed.h
- */
-void makefixed()
-{
-    unsigned low, size;
-    struct inflate_state state;
-
-    fixedtables(&state);
-    puts("    /* inffixed.h -- table for decoding fixed codes");
-    puts("     * Generated automatically by makefixed().");
-    puts("     */");
-    puts("");
-    puts("    /* WARNING: this file should *not* be used by applications.");
-    puts("       It is part of the implementation of this library and is");
-    puts("       subject to change. Applications should only use zlib.h.");
-    puts("     */");
-    puts("");
-    size = 1U << 9;
-    printf("    static const code lenfix[%u] = {", size);
-    low = 0;
-    for (;;) {
-        if ((low % 7) == 0) printf("\n        ");
-        printf("{%u,%u,%d}", state.lencode[low].op, state.lencode[low].bits,
-               state.lencode[low].val);
-        if (++low == size) break;
-        putchar(',');
-    }
-    puts("\n    };");
-    size = 1U << 5;
-    printf("\n    static const code distfix[%u] = {", size);
-    low = 0;
-    for (;;) {
-        if ((low % 6) == 0) printf("\n        ");
-        printf("{%u,%u,%d}", state.distcode[low].op, state.distcode[low].bits,
-               state.distcode[low].val);
-        if (++low == size) break;
-        putchar(',');
-    }
-    puts("\n    };");
-}
-#endif /* MAKEFIXED */
-
-/*
-   Update the window with the last wsize (normally 32K) bytes written before
-   returning.  If window does not exist yet, create it.  This is only called
-   when a window is already in use, or when output has been written during this
-   inflate call, but the end of the deflate stream has not been reached yet.
-   It is also called to create a window for dictionary data when a dictionary
-   is loaded.
-
-   Providing output buffers larger than 32K to inflate() should provide a speed
-   advantage, since only the last 32K of output is copied to the sliding window
-   upon return from inflate(), and since all distances after the first 32K of
-   output will fall in the output data, making match copies simpler and faster.
-   The advantage may be dependent on the size of the processor's data caches.
- */
-local int updatewindow(strm, out)
-z_streamp strm;
-unsigned out;
-{
-    struct inflate_state FAR *state;
-    unsigned copy, dist;
-
-    state = (struct inflate_state FAR *)strm->state;
-
-    /* if it hasn't been done already, allocate space for the window */
-    if (state->window == Z_NULL) {
-        state->window = (unsigned char FAR *)
-                        ZALLOC(strm, 1U << state->wbits,
-                               sizeof(unsigned char));
-        if (state->window == Z_NULL) return 1;
-    }
-
-    /* if window not in use yet, initialize */
-    if (state->wsize == 0) {
-        state->wsize = 1U << state->wbits;
-        state->write = 0;
-        state->whave = 0;
-    }
-
-    /* copy state->wsize or less output bytes into the circular window */
-    copy = out - strm->avail_out;
-    if (copy >= state->wsize) {
-        zmemcpy(state->window, strm->next_out - state->wsize, state->wsize);
-        state->write = 0;
-        state->whave = state->wsize;
-    }
-    else {
-        dist = state->wsize - state->write;
-        if (dist > copy) dist = copy;
-        zmemcpy(state->window + state->write, strm->next_out - copy, dist);
-        copy -= dist;
-        if (copy) {
-            zmemcpy(state->window, strm->next_out - copy, copy);
-            state->write = copy;
-            state->whave = state->wsize;
-        }
-        else {
-            state->write += dist;
-            if (state->write == state->wsize) state->write = 0;
-            if (state->whave < state->wsize) state->whave += dist;
-        }
-    }
-    return 0;
-}
-
-/* Macros for inflate(): */
-
-/* check function to use adler32() for zlib or crc32() for gzip */
-#ifdef GUNZIP
-#  define UPDATE(check, buf, len) \
-    (state->flags ? crc32(check, buf, len) : adler32(check, buf, len))
-#else
-#  define UPDATE(check, buf, len) adler32(check, buf, len)
-#endif
-
-/* check macros for header crc */
-#ifdef GUNZIP
-#  define CRC2(check, word) \
-    do { \
-        hbuf[0] = (unsigned char)(word); \
-        hbuf[1] = (unsigned char)((word) >> 8); \
-        check = crc32(check, hbuf, 2); \
-    } while (0)
-
-#  define CRC4(check, word) \
-    do { \
-        hbuf[0] = (unsigned char)(word); \
-        hbuf[1] = (unsigned char)((word) >> 8); \
-        hbuf[2] = (unsigned char)((word) >> 16); \
-        hbuf[3] = (unsigned char)((word) >> 24); \
-        check = crc32(check, hbuf, 4); \
-    } while (0)
-#endif
-
-/* Load registers with state in inflate() for speed */
-#define LOAD() \
-    do { \
-        put = strm->next_out; \
-        left = strm->avail_out; \
-        next = strm->next_in; \
-        have = strm->avail_in; \
-        hold = state->hold; \
-        bits = state->bits; \
-    } while (0)
-
-/* Restore state from registers in inflate() */
-#define RESTORE() \
-    do { \
-        strm->next_out = put; \
-        strm->avail_out = left; \
-        strm->next_in = next; \
-        strm->avail_in = have; \
-        state->hold = hold; \
-        state->bits = bits; \
-    } while (0)
-
-/* Clear the input bit accumulator */
-#define INITBITS() \
-    do { \
-        hold = 0; \
-        bits = 0; \
-    } while (0)
-
-/* Get a byte of input into the bit accumulator, or return from inflate()
-   if there is no input available. */
-#define PULLBYTE() \
-    do { \
-        if (have == 0) goto inf_leave; \
-        have--; \
-        hold += (unsigned long)(*next++) << bits; \
-        bits += 8; \
-    } while (0)
-
-/* Assure that there are at least n bits in the bit accumulator.  If there is
-   not enough available input to do that, then return from inflate(). */
-#define NEEDBITS(n) \
-    do { \
-        while (bits < (unsigned)(n)) \
-            PULLBYTE(); \
-    } while (0)
-
-/* Return the low n bits of the bit accumulator (n < 16) */
-#define BITS(n) \
-    ((unsigned)hold & ((1U << (n)) - 1))
-
-/* Remove n bits from the bit accumulator */
-#define DROPBITS(n) \
-    do { \
-        hold >>= (n); \
-        bits -= (unsigned)(n); \
-    } while (0)
-
-/* Remove zero to seven bits as needed to go to a byte boundary */
-#define BYTEBITS() \
-    do { \
-        hold >>= bits & 7; \
-        bits -= bits & 7; \
-    } while (0)
-
-/* Reverse the bytes in a 32-bit value */
-#define REVERSE(q) \
-    ((((q) >> 24) & 0xff) + (((q) >> 8) & 0xff00) + \
-     (((q) & 0xff00) << 8) + (((q) & 0xff) << 24))
-
-/*
-   inflate() uses a state machine to process as much input data and generate as
-   much output data as possible before returning.  The state machine is
-   structured roughly as follows:
-
-    for (;;) switch (state) {
-    ...
-    case STATEn:
-        if (not enough input data or output space to make progress)
-            return;
-        ... make progress ...
-        state = STATEm;
-        break;
-    ...
-    }
-
-   so when inflate() is called again, the same case is attempted again, and
-   if the appropriate resources are provided, the machine proceeds to the
-   next state.  The NEEDBITS() macro is usually the way the state evaluates
-   whether it can proceed or should return.  NEEDBITS() does the return if
-   the requested bits are not available.  The typical use of the BITS macros
-   is:
-
-        NEEDBITS(n);
-        ... do something with BITS(n) ...
-        DROPBITS(n);
-
-   where NEEDBITS(n) either returns from inflate() if there isn't enough
-   input left to load n bits into the accumulator, or it continues.  BITS(n)
-   gives the low n bits in the accumulator.  When done, DROPBITS(n) drops
-   the low n bits off the accumulator.  INITBITS() clears the accumulator
-   and sets the number of available bits to zero.  BYTEBITS() discards just
-   enough bits to put the accumulator on a byte boundary.  After BYTEBITS()
-   and a NEEDBITS(8), then BITS(8) would return the next byte in the stream.
-
-   NEEDBITS(n) uses PULLBYTE() to get an available byte of input, or to return
-   if there is no input available.  The decoding of variable length codes uses
-   PULLBYTE() directly in order to pull just enough bytes to decode the next
-   code, and no more.
-
-   Some states loop until they get enough input, making sure that enough
-   state information is maintained to continue the loop where it left off
-   if NEEDBITS() returns in the loop.  For example, want, need, and keep
-   would all have to actually be part of the saved state in case NEEDBITS()
-   returns:
-
-    case STATEw:
-        while (want < need) {
-            NEEDBITS(n);
-            keep[want++] = BITS(n);
-            DROPBITS(n);
-        }
-        state = STATEx;
-    case STATEx:
-
-   As shown above, if the next state is also the next case, then the break
-   is omitted.
-
-   A state may also return if there is not enough output space available to
-   complete that state.  Those states are copying stored data, writing a
-   literal byte, and copying a matching string.
-
-   When returning, a "goto inf_leave" is used to update the total counters,
-   update the check value, and determine whether any progress has been made
-   during that inflate() call in order to return the proper return code.
-   Progress is defined as a change in either strm->avail_in or strm->avail_out.
-   When there is a window, goto inf_leave will update the window with the last
-   output written.  If a goto inf_leave occurs in the middle of decompression
-   and there is no window currently, goto inf_leave will create one and copy
-   output to the window for the next call of inflate().
-
-   In this implementation, the flush parameter of inflate() only affects the
-   return code (per zlib.h).  inflate() always writes as much as possible to
-   strm->next_out, given the space available and the provided input--the effect
-   documented in zlib.h of Z_SYNC_FLUSH.  Furthermore, inflate() always defers
-   the allocation of and copying into a sliding window until necessary, which
-   provides the effect documented in zlib.h for Z_FINISH when the entire input
-   stream available.  So the only thing the flush parameter actually does is:
-   when flush is set to Z_FINISH, inflate() cannot return Z_OK.  Instead it
-   will return Z_BUF_ERROR if it has not reached the end of the stream.
- */
-
-int ZEXPORT inflate(strm, flush)
-z_streamp strm;
-int flush;
-{
-    struct inflate_state FAR *state;
-    unsigned char FAR *next;    /* next input */
-    unsigned char FAR *put;     /* next output */
-    unsigned have, left;        /* available input and output */
-    unsigned long hold;         /* bit buffer */
-    unsigned bits;              /* bits in bit buffer */
-    unsigned in, out;           /* save starting available input and output */
-    unsigned copy;              /* number of stored or match bytes to copy */
-    unsigned char FAR *from;    /* where to copy match bytes from */
-    code this;                  /* current decoding table entry */
-    code last;                  /* parent table entry */
-    unsigned len;               /* length to copy for repeats, bits to drop */
-    int ret;                    /* return code */
-#ifdef GUNZIP
-    unsigned char hbuf[4];      /* buffer for gzip header crc calculation */
-#endif
-    static const unsigned short order[19] = /* permutation of code lengths */
-        {16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15};
-
-    if (strm == Z_NULL || strm->state == Z_NULL || strm->next_out == Z_NULL ||
-        (strm->next_in == Z_NULL && strm->avail_in != 0))
-        return Z_STREAM_ERROR;
-
-    state = (struct inflate_state FAR *)strm->state;
-    if (state->mode == TYPE) state->mode = TYPEDO;      /* skip check */
-    LOAD();
-    in = have;
-    out = left;
-    ret = Z_OK;
-    for (;;)
-        switch (state->mode) {
-        case HEAD:
-            if (state->wrap == 0) {
-                state->mode = TYPEDO;
-                break;
-            }
-            NEEDBITS(16);
-#ifdef GUNZIP
-            if ((state->wrap & 2) && hold == 0x8b1f) {  /* gzip header */
-                state->check = crc32(0L, Z_NULL, 0);
-                CRC2(state->check, hold);
-                INITBITS();
-                state->mode = FLAGS;
-                break;
-            }
-            state->flags = 0;           /* expect zlib header */
-            if (state->head != Z_NULL)
-                state->head->done = -1;
-            if (!(state->wrap & 1) ||   /* check if zlib header allowed */
-#else
-            if (
-#endif
-                ((BITS(8) << 8) + (hold >> 8)) % 31) {
-                strm->msg = (char *)"incorrect header check";
-                state->mode = BAD;
-                break;
-            }
-            if (BITS(4) != Z_DEFLATED) {
-                strm->msg = (char *)"unknown compression method";
-                state->mode = BAD;
-                break;
-            }
-            DROPBITS(4);
-            len = BITS(4) + 8;
-            if (len > state->wbits) {
-                strm->msg = (char *)"invalid window size";
-                state->mode = BAD;
-                break;
-            }
-            state->dmax = 1U << len;
-            Tracev((stderr, "inflate:   zlib header ok\n"));
-            strm->adler = state->check = adler32(0L, Z_NULL, 0);
-            state->mode = hold & 0x200 ? DICTID : TYPE;
-            INITBITS();
-            break;
-#ifdef GUNZIP
-        case FLAGS:
-            NEEDBITS(16);
-            state->flags = (int)(hold);
-            if ((state->flags & 0xff) != Z_DEFLATED) {
-                strm->msg = (char *)"unknown compression method";
-                state->mode = BAD;
-                break;
-            }
-            if (state->flags & 0xe000) {
-                strm->msg = (char *)"unknown header flags set";
-                state->mode = BAD;
-                break;
-            }
-            if (state->head != Z_NULL)
-                state->head->text = (int)((hold >> 8) & 1);
-            if (state->flags & 0x0200) CRC2(state->check, hold);
-            INITBITS();
-            state->mode = TIME;
-        case TIME:
-            NEEDBITS(32);
-            if (state->head != Z_NULL)
-                state->head->time = hold;
-            if (state->flags & 0x0200) CRC4(state->check, hold);
-            INITBITS();
-            state->mode = OS;
-        case OS:
-            NEEDBITS(16);
-            if (state->head != Z_NULL) {
-                state->head->xflags = (int)(hold & 0xff);
-                state->head->os = (int)(hold >> 8);
-            }
-            if (state->flags & 0x0200) CRC2(state->check, hold);
-            INITBITS();
-            state->mode = EXLEN;
-        case EXLEN:
-            if (state->flags & 0x0400) {
-                NEEDBITS(16);
-                state->length = (unsigned)(hold);
-                if (state->head != Z_NULL)
-                    state->head->extra_len = (unsigned)hold;
-                if (state->flags & 0x0200) CRC2(state->check, hold);
-                INITBITS();
-            }
-            else if (state->head != Z_NULL)
-                state->head->extra = Z_NULL;
-            state->mode = EXTRA;
-        case EXTRA:
-            if (state->flags & 0x0400) {
-                copy = state->length;
-                if (copy > have) copy = have;
-                if (copy) {
-                    if (state->head != Z_NULL &&
-                        state->head->extra != Z_NULL) {
-                        len = state->head->extra_len - state->length;
-                        zmemcpy(state->head->extra + len, next,
-                                len + copy > state->head->extra_max ?
-                                state->head->extra_max - len : copy);
-                    }
-                    if (state->flags & 0x0200)
-                        state->check = crc32(state->check, next, copy);
-                    have -= copy;
-                    next += copy;
-                    state->length -= copy;
-                }
-                if (state->length) goto inf_leave;
-            }
-            state->length = 0;
-            state->mode = NAME;
-        case NAME:
-            if (state->flags & 0x0800) {
-                if (have == 0) goto inf_leave;
-                copy = 0;
-                do {
-                    len = (unsigned)(next[copy++]);
-                    if (state->head != Z_NULL &&
-                            state->head->name != Z_NULL &&
-                            state->length < state->head->name_max)
-                        state->head->name[state->length++] = len;
-                } while (len && copy < have);
-                if (state->flags & 0x0200)
-                    state->check = crc32(state->check, next, copy);
-                have -= copy;
-                next += copy;
-                if (len) goto inf_leave;
-            }
-            else if (state->head != Z_NULL)
-                state->head->name = Z_NULL;
-            state->length = 0;
-            state->mode = COMMENT;
-        case COMMENT:
-            if (state->flags & 0x1000) {
-                if (have == 0) goto inf_leave;
-                copy = 0;
-                do {
-                    len = (unsigned)(next[copy++]);
-                    if (state->head != Z_NULL &&
-                            state->head->comment != Z_NULL &&
-                            state->length < state->head->comm_max)
-                        state->head->comment[state->length++] = len;
-                } while (len && copy < have);
-                if (state->flags & 0x0200)
-                    state->check = crc32(state->check, next, copy);
-                have -= copy;
-                next += copy;
-                if (len) goto inf_leave;
-            }
-            else if (state->head != Z_NULL)
-                state->head->comment = Z_NULL;
-            state->mode = HCRC;
-        case HCRC:
-            if (state->flags & 0x0200) {
-                NEEDBITS(16);
-                if (hold != (state->check & 0xffff)) {
-                    strm->msg = (char *)"header crc mismatch";
-                    state->mode = BAD;
-                    break;
-                }
-                INITBITS();
-            }
-            if (state->head != Z_NULL) {
-                state->head->hcrc = (int)((state->flags >> 9) & 1);
-                state->head->done = 1;
-            }
-            strm->adler = state->check = crc32(0L, Z_NULL, 0);
-            state->mode = TYPE;
-            break;
-#endif
-        case DICTID:
-            NEEDBITS(32);
-            strm->adler = state->check = REVERSE(hold);
-            INITBITS();
-            state->mode = DICT;
-        case DICT:
-            if (state->havedict == 0) {
-                RESTORE();
-                return Z_NEED_DICT;
-            }
-            strm->adler = state->check = adler32(0L, Z_NULL, 0);
-            state->mode = TYPE;
-        case TYPE:
-            if (flush == Z_BLOCK) goto inf_leave;
-        case TYPEDO:
-            if (state->last) {
-                BYTEBITS();
-                state->mode = CHECK;
-                break;
-            }
-            NEEDBITS(3);
-            state->last = BITS(1);
-            DROPBITS(1);
-            switch (BITS(2)) {
-            case 0:                             /* stored block */
-                Tracev((stderr, "inflate:     stored block%s\n",
-                        state->last ? " (last)" : ""));
-                state->mode = STORED;
-                break;
-            case 1:                             /* fixed block */
-                fixedtables(state);
-                Tracev((stderr, "inflate:     fixed codes block%s\n",
-                        state->last ? " (last)" : ""));
-                state->mode = LEN;              /* decode codes */
-                break;
-            case 2:                             /* dynamic block */
-                Tracev((stderr, "inflate:     dynamic codes block%s\n",
-                        state->last ? " (last)" : ""));
-                state->mode = TABLE;
-                break;
-            case 3:
-                strm->msg = (char *)"invalid block type";
-                state->mode = BAD;
-            }
-            DROPBITS(2);
-            break;
-        case STORED:
-            BYTEBITS();                         /* go to byte boundary */
-            NEEDBITS(32);
-            if ((hold & 0xffff) != ((hold >> 16) ^ 0xffff)) {
-                strm->msg = (char *)"invalid stored block lengths";
-                state->mode = BAD;
-                break;
-            }
-            state->length = (unsigned)hold & 0xffff;
-            Tracev((stderr, "inflate:       stored length %u\n",
-                    state->length));
-            INITBITS();
-            state->mode = COPY;
-        case COPY:
-            copy = state->length;
-            if (copy) {
-                if (copy > have) copy = have;
-                if (copy > left) copy = left;
-                if (copy == 0) goto inf_leave;
-                zmemcpy(put, next, copy);
-                have -= copy;
-                next += copy;
-                left -= copy;
-                put += copy;
-                state->length -= copy;
-                break;
-            }
-            Tracev((stderr, "inflate:       stored end\n"));
-            state->mode = TYPE;
-            break;
-        case TABLE:
-            NEEDBITS(14);
-            state->nlen = BITS(5) + 257;
-            DROPBITS(5);
-            state->ndist = BITS(5) + 1;
-            DROPBITS(5);
-            state->ncode = BITS(4) + 4;
-            DROPBITS(4);
-#ifndef PKZIP_BUG_WORKAROUND
-            if (state->nlen > 286 || state->ndist > 30) {
-                strm->msg = (char *)"too many length or distance symbols";
-                state->mode = BAD;
-                break;
-            }
-#endif
-            Tracev((stderr, "inflate:       table sizes ok\n"));
-            state->have = 0;
-            state->mode = LENLENS;
-        case LENLENS:
-            while (state->have < state->ncode) {
-                NEEDBITS(3);
-                state->lens[order[state->have++]] = (unsigned short)BITS(3);
-                DROPBITS(3);
-            }
-            while (state->have < 19)
-                state->lens[order[state->have++]] = 0;
-            state->next = state->codes;
-            state->lencode = (code const FAR *)(state->next);
-            state->lenbits = 7;
-            ret = inflate_table(CODES, state->lens, 19, &(state->next),
-                                &(state->lenbits), state->work);
-            if (ret) {
-                strm->msg = (char *)"invalid code lengths set";
-                state->mode = BAD;
-                break;
-            }
-            Tracev((stderr, "inflate:       code lengths ok\n"));
-            state->have = 0;
-            state->mode = CODELENS;
-        case CODELENS:
-            while (state->have < state->nlen + state->ndist) {
-                for (;;) {
-                    this = state->lencode[BITS(state->lenbits)];
-                    if ((unsigned)(this.bits) <= bits) break;
-                    PULLBYTE();
-                }
-                if (this.val < 16) {
-                    NEEDBITS(this.bits);
-                    DROPBITS(this.bits);
-                    state->lens[state->have++] = this.val;
-                }
-                else {
-                    if (this.val == 16) {
-                        NEEDBITS(this.bits + 2);
-                        DROPBITS(this.bits);
-                        if (state->have == 0) {
-                            strm->msg = (char *)"invalid bit length repeat";
-                            state->mode = BAD;
-                            break;
-                        }
-                        len = state->lens[state->have - 1];
-                        copy = 3 + BITS(2);
-                        DROPBITS(2);
-                    }
-                    else if (this.val == 17) {
-                        NEEDBITS(this.bits + 3);
-                        DROPBITS(this.bits);
-                        len = 0;
-                        copy = 3 + BITS(3);
-                        DROPBITS(3);
-                    }
-                    else {
-                        NEEDBITS(this.bits + 7);
-                        DROPBITS(this.bits);
-                        len = 0;
-                        copy = 11 + BITS(7);
-                        DROPBITS(7);
-                    }
-                    if (state->have + copy > state->nlen + state->ndist) {
-                        strm->msg = (char *)"invalid bit length repeat";
-                        state->mode = BAD;
-                        break;
-                    }
-                    while (copy--)
-                        state->lens[state->have++] = (unsigned short)len;
-                }
-            }
-
-            /* handle error breaks in while */
-            if (state->mode == BAD) break;
-
-            /* build code tables */
-            state->next = state->codes;
-            state->lencode = (code const FAR *)(state->next);
-            state->lenbits = 9;
-            ret = inflate_table(LENS, state->lens, state->nlen, &(state->next),
-                                &(state->lenbits), state->work);
-            if (ret) {
-                strm->msg = (char *)"invalid literal/lengths set";
-                state->mode = BAD;
-                break;
-            }
-            state->distcode = (code const FAR *)(state->next);
-            state->distbits = 6;
-            ret = inflate_table(DISTS, state->lens + state->nlen, state->ndist,
-                            &(state->next), &(state->distbits), state->work);
-            if (ret) {
-                strm->msg = (char *)"invalid distances set";
-                state->mode = BAD;
-                break;
-            }
-            Tracev((stderr, "inflate:       codes ok\n"));
-            state->mode = LEN;
-        case LEN:
-            if (have >= 6 && left >= 258) {
-                RESTORE();
-                inflate_fast(strm, out);
-                LOAD();
-                break;
-            }
-            for (;;) {
-                this = state->lencode[BITS(state->lenbits)];
-                if ((unsigned)(this.bits) <= bits) break;
-                PULLBYTE();
-            }
-            if (this.op && (this.op & 0xf0) == 0) {
-                last = this;
-                for (;;) {
-                    this = state->lencode[last.val +
-                            (BITS(last.bits + last.op) >> last.bits)];
-                    if ((unsigned)(last.bits + this.bits) <= bits) break;
-                    PULLBYTE();
-                }
-                DROPBITS(last.bits);
-            }
-            DROPBITS(this.bits);
-            state->length = (unsigned)this.val;
-            if ((int)(this.op) == 0) {
-                Tracevv((stderr, this.val >= 0x20 && this.val < 0x7f ?
-                        "inflate:         literal '%c'\n" :
-                        "inflate:         literal 0x%02x\n", this.val));
-                state->mode = LIT;
-                break;
-            }
-            if (this.op & 32) {
-                Tracevv((stderr, "inflate:         end of block\n"));
-                state->mode = TYPE;
-                break;
-            }
-            if (this.op & 64) {
-                strm->msg = (char *)"invalid literal/length code";
-                state->mode = BAD;
-                break;
-            }
-            state->extra = (unsigned)(this.op) & 15;
-            state->mode = LENEXT;
-        case LENEXT:
-            if (state->extra) {
-                NEEDBITS(state->extra);
-                state->length += BITS(state->extra);
-                DROPBITS(state->extra);
-            }
-            Tracevv((stderr, "inflate:         length %u\n", state->length));
-            state->mode = DIST;
-        case DIST:
-            for (;;) {
-                this = state->distcode[BITS(state->distbits)];
-                if ((unsigned)(this.bits) <= bits) break;
-                PULLBYTE();
-            }
-            if ((this.op & 0xf0) == 0) {
-                last = this;
-                for (;;) {
-                    this = state->distcode[last.val +
-                            (BITS(last.bits + last.op) >> last.bits)];
-                    if ((unsigned)(last.bits + this.bits) <= bits) break;
-                    PULLBYTE();
-                }
-                DROPBITS(last.bits);
-            }
-            DROPBITS(this.bits);
-            if (this.op & 64) {
-                strm->msg = (char *)"invalid distance code";
-                state->mode = BAD;
-                break;
-            }
-            state->offset = (unsigned)this.val;
-            state->extra = (unsigned)(this.op) & 15;
-            state->mode = DISTEXT;
-        case DISTEXT:
-            if (state->extra) {
-                NEEDBITS(state->extra);
-                state->offset += BITS(state->extra);
-                DROPBITS(state->extra);
-            }
-#ifdef INFLATE_STRICT
-            if (state->offset > state->dmax) {
-                strm->msg = (char *)"invalid distance too far back";
-                state->mode = BAD;
-                break;
-            }
-#endif
-            if (state->offset > state->whave + out - left) {
-                strm->msg = (char *)"invalid distance too far back";
-                state->mode = BAD;
-                break;
-            }
-            Tracevv((stderr, "inflate:         distance %u\n", state->offset));
-            state->mode = MATCH;
-        case MATCH:
-            if (left == 0) goto inf_leave;
-            copy = out - left;
-            if (state->offset > copy) {         /* copy from window */
-                copy = state->offset - copy;
-                if (copy > state->write) {
-                    copy -= state->write;
-                    from = state->window + (state->wsize - copy);
-                }
-                else
-                    from = state->window + (state->write - copy);
-                if (copy > state->length) copy = state->length;
-            }
-            else {                              /* copy from output */
-                from = put - state->offset;
-                copy = state->length;
-            }
-            if (copy > left) copy = left;
-            left -= copy;
-            state->length -= copy;
-            do {
-                *put++ = *from++;
-            } while (--copy);
-            if (state->length == 0) state->mode = LEN;
-            break;
-        case LIT:
-            if (left == 0) goto inf_leave;
-            *put++ = (unsigned char)(state->length);
-            left--;
-            state->mode = LEN;
-            break;
-        case CHECK:
-            if (state->wrap) {
-                NEEDBITS(32);
-                out -= left;
-                strm->total_out += out;
-                state->total += out;
-                if (out)
-                    strm->adler = state->check =
-                        UPDATE(state->check, put - out, out);
-                out = left;
-                if ((
-#ifdef GUNZIP
-                     state->flags ? hold :
-#endif
-                     REVERSE(hold)) != state->check) {
-                    strm->msg = (char *)"incorrect data check";
-                    state->mode = BAD;
-                    break;
-                }
-                INITBITS();
-                Tracev((stderr, "inflate:   check matches trailer\n"));
-            }
-#ifdef GUNZIP
-            state->mode = LENGTH;
-        case LENGTH:
-            if (state->wrap && state->flags) {
-                NEEDBITS(32);
-                if (hold != (state->total & 0xffffffffUL)) {
-                    strm->msg = (char *)"incorrect length check";
-                    state->mode = BAD;
-                    break;
-                }
-                INITBITS();
-                Tracev((stderr, "inflate:   length matches trailer\n"));
-            }
-#endif
-            state->mode = DONE;
-        case DONE:
-            ret = Z_STREAM_END;
-            goto inf_leave;
-        case BAD:
-            ret = Z_DATA_ERROR;
-            goto inf_leave;
-        case MEM:
-            return Z_MEM_ERROR;
-        case SYNC:
-        default:
-            return Z_STREAM_ERROR;
-        }
-
-    /*
-       Return from inflate(), updating the total counts and the check value.
-       If there was no progress during the inflate() call, return a buffer
-       error.  Call updatewindow() to create and/or update the window state.
-       Note: a memory error from inflate() is non-recoverable.
-     */
-  inf_leave:
-    RESTORE();
-    if (state->wsize || (state->mode < CHECK && out != strm->avail_out))
-        if (updatewindow(strm, out)) {
-            state->mode = MEM;
-            return Z_MEM_ERROR;
-        }
-    in -= strm->avail_in;
-    out -= strm->avail_out;
-    strm->total_in += in;
-    strm->total_out += out;
-    state->total += out;
-    if (state->wrap && out)
-        strm->adler = state->check =
-            UPDATE(state->check, strm->next_out - out, out);
-    strm->data_type = state->bits + (state->last ? 64 : 0) +
-                      (state->mode == TYPE ? 128 : 0);
-    if (((in == 0 && out == 0) || flush == Z_FINISH) && ret == Z_OK)
-        ret = Z_BUF_ERROR;
-    return ret;
-}
-
-int ZEXPORT inflateEnd(strm)
-z_streamp strm;
-{
-    struct inflate_state FAR *state;
-    if (strm == Z_NULL || strm->state == Z_NULL || strm->zfree == (free_func)0)
-        return Z_STREAM_ERROR;
-    state = (struct inflate_state FAR *)strm->state;
-    if (state->window != Z_NULL) ZFREE(strm, state->window);
-    ZFREE(strm, strm->state);
-    strm->state = Z_NULL;
-    Tracev((stderr, "inflate: end\n"));
-    return Z_OK;
-}
-
-int ZEXPORT inflateSetDictionary(strm, dictionary, dictLength)
-z_streamp strm;
-const Bytef *dictionary;
-uInt dictLength;
-{
-    struct inflate_state FAR *state;
-    unsigned long id;
-
-    /* check state */
-    if (strm == Z_NULL || strm->state == Z_NULL) return Z_STREAM_ERROR;
-    state = (struct inflate_state FAR *)strm->state;
-    if (state->wrap != 0 && state->mode != DICT)
-        return Z_STREAM_ERROR;
-
-    /* check for correct dictionary id */
-    if (state->mode == DICT) {
-        id = adler32(0L, Z_NULL, 0);
-        id = adler32(id, dictionary, dictLength);
-        if (id != state->check)
-            return Z_DATA_ERROR;
-    }
-
-    /* copy dictionary to window */
-    if (updatewindow(strm, strm->avail_out)) {
-        state->mode = MEM;
-        return Z_MEM_ERROR;
-    }
-    if (dictLength > state->wsize) {
-        zmemcpy(state->window, dictionary + dictLength - state->wsize,
-                state->wsize);
-        state->whave = state->wsize;
-    }
-    else {
-        zmemcpy(state->window + state->wsize - dictLength, dictionary,
-                dictLength);
-        state->whave = dictLength;
-    }
-    state->havedict = 1;
-    Tracev((stderr, "inflate:   dictionary set\n"));
-    return Z_OK;
-}
-
-int ZEXPORT inflateGetHeader(strm, head)
-z_streamp strm;
-gz_headerp head;
-{
-    struct inflate_state FAR *state;
-
-    /* check state */
-    if (strm == Z_NULL || strm->state == Z_NULL) return Z_STREAM_ERROR;
-    state = (struct inflate_state FAR *)strm->state;
-    if ((state->wrap & 2) == 0) return Z_STREAM_ERROR;
-
-    /* save header structure */
-    state->head = head;
-    head->done = 0;
-    return Z_OK;
-}
-
-/*
-   Search buf[0..len-1] for the pattern: 0, 0, 0xff, 0xff.  Return when found
-   or when out of input.  When called, *have is the number of pattern bytes
-   found in order so far, in 0..3.  On return *have is updated to the new
-   state.  If on return *have equals four, then the pattern was found and the
-   return value is how many bytes were read including the last byte of the
-   pattern.  If *have is less than four, then the pattern has not been found
-   yet and the return value is len.  In the latter case, syncsearch() can be
-   called again with more data and the *have state.  *have is initialized to
-   zero for the first call.
- */
-local unsigned syncsearch(have, buf, len)
-unsigned FAR *have;
-unsigned char FAR *buf;
-unsigned len;
-{
-    unsigned got;
-    unsigned next;
-
-    got = *have;
-    next = 0;
-    while (next < len && got < 4) {
-        if ((int)(buf[next]) == (got < 2 ? 0 : 0xff))
-            got++;
-        else if (buf[next])
-            got = 0;
-        else
-            got = 4 - got;
-        next++;
-    }
-    *have = got;
-    return next;
-}
-
-int ZEXPORT inflateSync(strm)
-z_streamp strm;
-{
-    unsigned len;               /* number of bytes to look at or looked at */
-    unsigned long in, out;      /* temporary to save total_in and total_out */
-    unsigned char buf[4];       /* to restore bit buffer to byte string */
-    struct inflate_state FAR *state;
-
-    /* check parameters */
-    if (strm == Z_NULL || strm->state == Z_NULL) return Z_STREAM_ERROR;
-    state = (struct inflate_state FAR *)strm->state;
-    if (strm->avail_in == 0 && state->bits < 8) return Z_BUF_ERROR;
-
-    /* if first time, start search in bit buffer */
-    if (state->mode != SYNC) {
-        state->mode = SYNC;
-        state->hold <<= state->bits & 7;
-        state->bits -= state->bits & 7;
-        len = 0;
-        while (state->bits >= 8) {
-            buf[len++] = (unsigned char)(state->hold);
-            state->hold >>= 8;
-            state->bits -= 8;
-        }
-        state->have = 0;
-        syncsearch(&(state->have), buf, len);
-    }
-
-    /* search available input */
-    len = syncsearch(&(state->have), strm->next_in, strm->avail_in);
-    strm->avail_in -= len;
-    strm->next_in += len;
-    strm->total_in += len;
-
-    /* return no joy or set up to restart inflate() on a new block */
-    if (state->have != 4) return Z_DATA_ERROR;
-    in = strm->total_in;  out = strm->total_out;
-    inflateReset(strm);
-    strm->total_in = in;  strm->total_out = out;
-    state->mode = TYPE;
-    return Z_OK;
-}
-
-/*
-   Returns true if inflate is currently at the end of a block generated by
-   Z_SYNC_FLUSH or Z_FULL_FLUSH. This function is used by one PPP
-   implementation to provide an additional safety check. PPP uses
-   Z_SYNC_FLUSH but removes the length bytes of the resulting empty stored
-   block. When decompressing, PPP checks that at the end of input packet,
-   inflate is waiting for these length bytes.
- */
-int ZEXPORT inflateSyncPoint(strm)
-z_streamp strm;
-{
-    struct inflate_state FAR *state;
-
-    if (strm == Z_NULL || strm->state == Z_NULL) return Z_STREAM_ERROR;
-    state = (struct inflate_state FAR *)strm->state;
-    return state->mode == STORED && state->bits == 0;
-}
-
-int ZEXPORT inflateCopy(dest, source)
-z_streamp dest;
-z_streamp source;
-{
-    struct inflate_state FAR *state;
-    struct inflate_state FAR *copy;
-    unsigned char FAR *window;
-    unsigned wsize;
-
-    /* check input */
-    if (dest == Z_NULL || source == Z_NULL || source->state == Z_NULL ||
-        source->zalloc == (alloc_func)0 || source->zfree == (free_func)0)
-        return Z_STREAM_ERROR;
-    state = (struct inflate_state FAR *)source->state;
-
-    /* allocate space */
-    copy = (struct inflate_state FAR *)
-           ZALLOC(source, 1, sizeof(struct inflate_state));
-    if (copy == Z_NULL) return Z_MEM_ERROR;
-    window = Z_NULL;
-    if (state->window != Z_NULL) {
-        window = (unsigned char FAR *)
-                 ZALLOC(source, 1U << state->wbits, sizeof(unsigned char));
-        if (window == Z_NULL) {
-            ZFREE(source, copy);
-            return Z_MEM_ERROR;
-        }
-    }
-
-    /* copy state */
-    zmemcpy(dest, source, sizeof(z_stream));
-    zmemcpy(copy, state, sizeof(struct inflate_state));
-    if (state->lencode >= state->codes &&
-        state->lencode <= state->codes + ENOUGH - 1) {
-        copy->lencode = copy->codes + (state->lencode - state->codes);
-        copy->distcode = copy->codes + (state->distcode - state->codes);
-    }
-    copy->next = copy->codes + (state->next - state->codes);
-    if (window != Z_NULL) {
-        wsize = 1U << state->wbits;
-        zmemcpy(window, state->window, wsize);
-    }
-    copy->window = window;
-    dest->state = (struct internal_state FAR *)copy;
-    return Z_OK;
-}
Index: trunk/minix/lib/zlib-1.2.3/inflate.h
===================================================================
--- trunk/minix/lib/zlib-1.2.3/inflate.h	(revision 9)
+++ 	(revision )
@@ -1,115 +1,0 @@
-/* inflate.h -- internal inflate state definition
- * Copyright (C) 1995-2004 Mark Adler
- * For conditions of distribution and use, see copyright notice in zlib.h
- */
-
-/* WARNING: this file should *not* be used by applications. It is
-   part of the implementation of the compression library and is
-   subject to change. Applications should only use zlib.h.
- */
-
-/* define NO_GZIP when compiling if you want to disable gzip header and
-   trailer decoding by inflate().  NO_GZIP would be used to avoid linking in
-   the crc code when it is not needed.  For shared libraries, gzip decoding
-   should be left enabled. */
-#ifndef NO_GZIP
-#  define GUNZIP
-#endif
-
-/* Possible inflate modes between inflate() calls */
-typedef enum {
-    HEAD,       /* i: waiting for magic header */
-    FLAGS,      /* i: waiting for method and flags (gzip) */
-    TIME,       /* i: waiting for modification time (gzip) */
-    OS,         /* i: waiting for extra flags and operating system (gzip) */
-    EXLEN,      /* i: waiting for extra length (gzip) */
-    EXTRA,      /* i: waiting for extra bytes (gzip) */
-    NAME,       /* i: waiting for end of file name (gzip) */
-    COMMENT,    /* i: waiting for end of comment (gzip) */
-    HCRC,       /* i: waiting for header crc (gzip) */
-    DICTID,     /* i: waiting for dictionary check value */
-    DICT,       /* waiting for inflateSetDictionary() call */
-        TYPE,       /* i: waiting for type bits, including last-flag bit */
-        TYPEDO,     /* i: same, but skip check to exit inflate on new block */
-        STORED,     /* i: waiting for stored size (length and complement) */
-        COPY,       /* i/o: waiting for input or output to copy stored block */
-        TABLE,      /* i: waiting for dynamic block table lengths */
-        LENLENS,    /* i: waiting for code length code lengths */
-        CODELENS,   /* i: waiting for length/lit and distance code lengths */
-            LEN,        /* i: waiting for length/lit code */
-            LENEXT,     /* i: waiting for length extra bits */
-            DIST,       /* i: waiting for distance code */
-            DISTEXT,    /* i: waiting for distance extra bits */
-            MATCH,      /* o: waiting for output space to copy string */
-            LIT,        /* o: waiting for output space to write literal */
-    CHECK,      /* i: waiting for 32-bit check value */
-    LENGTH,     /* i: waiting for 32-bit length (gzip) */
-    DONE,       /* finished check, done -- remain here until reset */
-    BAD,        /* got a data error -- remain here until reset */
-    MEM,        /* got an inflate() memory error -- remain here until reset */
-    SYNC        /* looking for synchronization bytes to restart inflate() */
-} inflate_mode;
-
-/*
-    State transitions between above modes -
-
-    (most modes can go to the BAD or MEM mode -- not shown for clarity)
-
-    Process header:
-        HEAD -> (gzip) or (zlib)
-        (gzip) -> FLAGS -> TIME -> OS -> EXLEN -> EXTRA -> NAME
-        NAME -> COMMENT -> HCRC -> TYPE
-        (zlib) -> DICTID or TYPE
-        DICTID -> DICT -> TYPE
-    Read deflate blocks:
-            TYPE -> STORED or TABLE or LEN or CHECK
-            STORED -> COPY -> TYPE
-            TABLE -> LENLENS -> CODELENS -> LEN
-    Read deflate codes:
-                LEN -> LENEXT or LIT or TYPE
-                LENEXT -> DIST -> DISTEXT -> MATCH -> LEN
-                LIT -> LEN
-    Process trailer:
-        CHECK -> LENGTH -> DONE
- */
-
-/* state maintained between inflate() calls.  Approximately 7K bytes. */
-struct inflate_state {
-    inflate_mode mode;          /* current inflate mode */
-    int last;                   /* true if processing last block */
-    int wrap;                   /* bit 0 true for zlib, bit 1 true for gzip */
-    int havedict;               /* true if dictionary provided */
-    int flags;                  /* gzip header method and flags (0 if zlib) */
-    unsigned dmax;              /* zlib header max distance (INFLATE_STRICT) */
-    unsigned long check;        /* protected copy of check value */
-    unsigned long total;        /* protected copy of output count */
-    gz_headerp head;            /* where to save gzip header information */
-        /* sliding window */
-    unsigned wbits;             /* log base 2 of requested window size */
-    unsigned wsize;             /* window size or zero if not using window */
-    unsigned whave;             /* valid bytes in the window */
-    unsigned write;             /* window write index */
-    unsigned char FAR *window;  /* allocated sliding window, if needed */
-        /* bit accumulator */
-    unsigned long hold;         /* input bit accumulator */
-    unsigned bits;              /* number of bits in "in" */
-        /* for string and stored block copying */
-    unsigned length;            /* literal or length of data to copy */
-    unsigned offset;            /* distance back to copy string from */
-        /* for table and code decoding */
-    unsigned extra;             /* extra bits needed */
-        /* fixed and dynamic code tables */
-    code const FAR *lencode;    /* starting table for length/literal codes */
-    code const FAR *distcode;   /* starting table for distance codes */
-    unsigned lenbits;           /* index bits for lencode */
-    unsigned distbits;          /* index bits for distcode */
-        /* dynamic table building */
-    unsigned ncode;             /* number of code length code lengths */
-    unsigned nlen;              /* number of length code lengths */
-    unsigned ndist;             /* number of distance code lengths */
-    unsigned have;              /* number of code lengths in lens[] */
-    code FAR *next;             /* next available space in codes[] */
-    unsigned short lens[320];   /* temporary storage for code lengths */
-    unsigned short work[288];   /* work area for code table building */
-    code codes[ENOUGH];         /* space for code tables */
-};
Index: trunk/minix/lib/zlib-1.2.3/inftrees.c
===================================================================
--- trunk/minix/lib/zlib-1.2.3/inftrees.c	(revision 9)
+++ 	(revision )
@@ -1,329 +1,0 @@
-/* inftrees.c -- generate Huffman trees for efficient decoding
- * Copyright (C) 1995-2005 Mark Adler
- * For conditions of distribution and use, see copyright notice in zlib.h
- */
-
-#include "zutil.h"
-#include "inftrees.h"
-
-#define MAXBITS 15
-
-const char inflate_copyright[] =
-   " inflate 1.2.3 Copyright 1995-2005 Mark Adler ";
-/*
-  If you use the zlib library in a product, an acknowledgment is welcome
-  in the documentation of your product. If for some reason you cannot
-  include such an acknowledgment, I would appreciate that you keep this
-  copyright string in the executable of your product.
- */
-
-/*
-   Build a set of tables to decode the provided canonical Huffman code.
-   The code lengths are lens[0..codes-1].  The result starts at *table,
-   whose indices are 0..2^bits-1.  work is a writable array of at least
-   lens shorts, which is used as a work area.  type is the type of code
-   to be generated, CODES, LENS, or DISTS.  On return, zero is success,
-   -1 is an invalid code, and +1 means that ENOUGH isn't enough.  table
-   on return points to the next available entry's address.  bits is the
-   requested root table index bits, and on return it is the actual root
-   table index bits.  It will differ if the request is greater than the
-   longest code or if it is less than the shortest code.
- */
-int inflate_table(type, lens, codes, table, bits, work)
-codetype type;
-unsigned short FAR *lens;
-unsigned codes;
-code FAR * FAR *table;
-unsigned FAR *bits;
-unsigned short FAR *work;
-{
-    unsigned len;               /* a code's length in bits */
-    unsigned sym;               /* index of code symbols */
-    unsigned min, max;          /* minimum and maximum code lengths */
-    unsigned root;              /* number of index bits for root table */
-    unsigned curr;              /* number of index bits for current table */
-    unsigned drop;              /* code bits to drop for sub-table */
-    int left;                   /* number of prefix codes available */
-    unsigned used;              /* code entries in table used */
-    unsigned huff;              /* Huffman code */
-    unsigned incr;              /* for incrementing code, index */
-    unsigned fill;              /* index for replicating entries */
-    unsigned low;               /* low bits for current root entry */
-    unsigned mask;              /* mask for low root bits */
-    code this;                  /* table entry for duplication */
-    code FAR *next;             /* next available space in table */
-    const unsigned short FAR *base;     /* base value table to use */
-    const unsigned short FAR *extra;    /* extra bits table to use */
-    int end;                    /* use base and extra for symbol > end */
-    unsigned short count[MAXBITS+1];    /* number of codes of each length */
-    unsigned short offs[MAXBITS+1];     /* offsets in table for each length */
-    static const unsigned short lbase[31] = { /* Length codes 257..285 base */
-        3, 4, 5, 6, 7, 8, 9, 10, 11, 13, 15, 17, 19, 23, 27, 31,
-        35, 43, 51, 59, 67, 83, 99, 115, 131, 163, 195, 227, 258, 0, 0};
-    static const unsigned short lext[31] = { /* Length codes 257..285 extra */
-        16, 16, 16, 16, 16, 16, 16, 16, 17, 17, 17, 17, 18, 18, 18, 18,
-        19, 19, 19, 19, 20, 20, 20, 20, 21, 21, 21, 21, 16, 201, 196};
-    static const unsigned short dbase[32] = { /* Distance codes 0..29 base */
-        1, 2, 3, 4, 5, 7, 9, 13, 17, 25, 33, 49, 65, 97, 129, 193,
-        257, 385, 513, 769, 1025, 1537, 2049, 3073, 4097, 6145,
-        8193, 12289, 16385, 24577, 0, 0};
-    static const unsigned short dext[32] = { /* Distance codes 0..29 extra */
-        16, 16, 16, 16, 17, 17, 18, 18, 19, 19, 20, 20, 21, 21, 22, 22,
-        23, 23, 24, 24, 25, 25, 26, 26, 27, 27,
-        28, 28, 29, 29, 64, 64};
-
-    /*
-       Process a set of code lengths to create a canonical Huffman code.  The
-       code lengths are lens[0..codes-1].  Each length corresponds to the
-       symbols 0..codes-1.  The Huffman code is generated by first sorting the
-       symbols by length from short to long, and retaining the symbol order
-       for codes with equal lengths.  Then the code starts with all zero bits
-       for the first code of the shortest length, and the codes are integer
-       increments for the same length, and zeros are appended as the length
-       increases.  For the deflate format, these bits are stored backwards
-       from their more natural integer increment ordering, and so when the
-       decoding tables are built in the large loop below, the integer codes
-       are incremented backwards.
-
-       This routine assumes, but does not check, that all of the entries in
-       lens[] are in the range 0..MAXBITS.  The caller must assure this.
-       1..MAXBITS is interpreted as that code length.  zero means that that
-       symbol does not occur in this code.
-
-       The codes are sorted by computing a count of codes for each length,
-       creating from that a table of starting indices for each length in the
-       sorted table, and then entering the symbols in order in the sorted
-       table.  The sorted table is work[], with that space being provided by
-       the caller.
-
-       The length counts are used for other purposes as well, i.e. finding
-       the minimum and maximum length codes, determining if there are any
-       codes at all, checking for a valid set of lengths, and looking ahead
-       at length counts to determine sub-table sizes when building the
-       decoding tables.
-     */
-
-    /* accumulate lengths for codes (assumes lens[] all in 0..MAXBITS) */
-    for (len = 0; len <= MAXBITS; len++)
-        count[len] = 0;
-    for (sym = 0; sym < codes; sym++)
-        count[lens[sym]]++;
-
-    /* bound code lengths, force root to be within code lengths */
-    root = *bits;
-    for (max = MAXBITS; max >= 1; max--)
-        if (count[max] != 0) break;
-    if (root > max) root = max;
-    if (max == 0) {                     /* no symbols to code at all */
-        this.op = (unsigned char)64;    /* invalid code marker */
-        this.bits = (unsigned char)1;
-        this.val = (unsigned short)0;
-        *(*table)++ = this;             /* make a table to force an error */
-        *(*table)++ = this;
-        *bits = 1;
-        return 0;     /* no symbols, but wait for decoding to report error */
-    }
-    for (min = 1; min <= MAXBITS; min++)
-        if (count[min] != 0) break;
-    if (root < min) root = min;
-
-    /* check for an over-subscribed or incomplete set of lengths */
-    left = 1;
-    for (len = 1; len <= MAXBITS; len++) {
-        left <<= 1;
-        left -= count[len];
-        if (left < 0) return -1;        /* over-subscribed */
-    }
-    if (left > 0 && (type == CODES || max != 1))
-        return -1;                      /* incomplete set */
-
-    /* generate offsets into symbol table for each length for sorting */
-    offs[1] = 0;
-    for (len = 1; len < MAXBITS; len++)
-        offs[len + 1] = offs[len] + count[len];
-
-    /* sort symbols by length, by symbol order within each length */
-    for (sym = 0; sym < codes; sym++)
-        if (lens[sym] != 0) work[offs[lens[sym]]++] = (unsigned short)sym;
-
-    /*
-       Create and fill in decoding tables.  In this loop, the table being
-       filled is at next and has curr index bits.  The code being used is huff
-       with length len.  That code is converted to an index by dropping drop
-       bits off of the bottom.  For codes where len is less than drop + curr,
-       those top drop + curr - len bits are incremented through all values to
-       fill the table with replicated entries.
-
-       root is the number of index bits for the root table.  When len exceeds
-       root, sub-tables are created pointed to by the root entry with an index
-       of the low root bits of huff.  This is saved in low to check for when a
-       new sub-table should be started.  drop is zero when the root table is
-       being filled, and drop is root when sub-tables are being filled.
-
-       When a new sub-table is needed, it is necessary to look ahead in the
-       code lengths to determine what size sub-table is needed.  The length
-       counts are used for this, and so count[] is decremented as codes are
-       entered in the tables.
-
-       used keeps track of how many table entries have been allocated from the
-       provided *table space.  It is checked when a LENS table is being made
-       against the space in *table, ENOUGH, minus the maximum space needed by
-       the worst case distance code, MAXD.  This should never happen, but the
-       sufficiency of ENOUGH has not been proven exhaustively, hence the check.
-       This assumes that when type == LENS, bits == 9.
-
-       sym increments through all symbols, and the loop terminates when
-       all codes of length max, i.e. all codes, have been processed.  This
-       routine permits incomplete codes, so another loop after this one fills
-       in the rest of the decoding tables with invalid code markers.
-     */
-
-    /* set up for code type */
-    switch (type) {
-    case CODES:
-        base = extra = work;    /* dummy value--not used */
-        end = 19;
-        break;
-    case LENS:
-        base = lbase;
-        base -= 257;
-        extra = lext;
-        extra -= 257;
-        end = 256;
-        break;
-    default:            /* DISTS */
-        base = dbase;
-        extra = dext;
-        end = -1;
-    }
-
-    /* initialize state for loop */
-    huff = 0;                   /* starting code */
-    sym = 0;                    /* starting code symbol */
-    len = min;                  /* starting code length */
-    next = *table;              /* current table to fill in */
-    curr = root;                /* current table index bits */
-    drop = 0;                   /* current bits to drop from code for index */
-    low = (unsigned)(-1);       /* trigger new sub-table when len > root */
-    used = 1U << root;          /* use root table entries */
-    mask = used - 1;            /* mask for comparing low */
-
-    /* check available table space */
-    if (type == LENS && used >= ENOUGH - MAXD)
-        return 1;
-
-    /* process all codes and make table entries */
-    for (;;) {
-        /* create table entry */
-        this.bits = (unsigned char)(len - drop);
-        if ((int)(work[sym]) < end) {
-            this.op = (unsigned char)0;
-            this.val = work[sym];
-        }
-        else if ((int)(work[sym]) > end) {
-            this.op = (unsigned char)(extra[work[sym]]);
-            this.val = base[work[sym]];
-        }
-        else {
-            this.op = (unsigned char)(32 + 64);         /* end of block */
-            this.val = 0;
-        }
-
-        /* replicate for those indices with low len bits equal to huff */
-        incr = 1U << (len - drop);
-        fill = 1U << curr;
-        min = fill;                 /* save offset to next table */
-        do {
-            fill -= incr;
-            next[(huff >> drop) + fill] = this;
-        } while (fill != 0);
-
-        /* backwards increment the len-bit code huff */
-        incr = 1U << (len - 1);
-        while (huff & incr)
-            incr >>= 1;
-        if (incr != 0) {
-            huff &= incr - 1;
-            huff += incr;
-        }
-        else
-            huff = 0;
-
-        /* go to next symbol, update count, len */
-        sym++;
-        if (--(count[len]) == 0) {
-            if (len == max) break;
-            len = lens[work[sym]];
-        }
-
-        /* create new sub-table if needed */
-        if (len > root && (huff & mask) != low) {
-            /* if first time, transition to sub-tables */
-            if (drop == 0)
-                drop = root;
-
-            /* increment past last table */
-            next += min;            /* here min is 1 << curr */
-
-            /* determine length of next table */
-            curr = len - drop;
-            left = (int)(1 << curr);
-            while (curr + drop < max) {
-                left -= count[curr + drop];
-                if (left <= 0) break;
-                curr++;
-                left <<= 1;
-            }
-
-            /* check for enough space */
-            used += 1U << curr;
-            if (type == LENS && used >= ENOUGH - MAXD)
-                return 1;
-
-            /* point entry in root table to sub-table */
-            low = huff & mask;
-            (*table)[low].op = (unsigned char)curr;
-            (*table)[low].bits = (unsigned char)root;
-            (*table)[low].val = (unsigned short)(next - *table);
-        }
-    }
-
-    /*
-       Fill in rest of table for incomplete codes.  This loop is similar to the
-       loop above in incrementing huff for table indices.  It is assumed that
-       len is equal to curr + drop, so there is no loop needed to increment
-       through high index bits.  When the current sub-table is filled, the loop
-       drops back to the root table to fill in any remaining entries there.
-     */
-    this.op = (unsigned char)64;                /* invalid code marker */
-    this.bits = (unsigned char)(len - drop);
-    this.val = (unsigned short)0;
-    while (huff != 0) {
-        /* when done with sub-table, drop back to root table */
-        if (drop != 0 && (huff & mask) != low) {
-            drop = 0;
-            len = root;
-            next = *table;
-            this.bits = (unsigned char)len;
-        }
-
-        /* put invalid code marker in table */
-        next[huff >> drop] = this;
-
-        /* backwards increment the len-bit code huff */
-        incr = 1U << (len - 1);
-        while (huff & incr)
-            incr >>= 1;
-        if (incr != 0) {
-            huff &= incr - 1;
-            huff += incr;
-        }
-        else
-            huff = 0;
-    }
-
-    /* set return parameters */
-    *table += used;
-    *bits = root;
-    return 0;
-}
Index: trunk/minix/lib/zlib-1.2.3/inftrees.h
===================================================================
--- trunk/minix/lib/zlib-1.2.3/inftrees.h	(revision 9)
+++ 	(revision )
@@ -1,55 +1,0 @@
-/* inftrees.h -- header to use inftrees.c
- * Copyright (C) 1995-2005 Mark Adler
- * For conditions of distribution and use, see copyright notice in zlib.h
- */
-
-/* WARNING: this file should *not* be used by applications. It is
-   part of the implementation of the compression library and is
-   subject to change. Applications should only use zlib.h.
- */
-
-/* Structure for decoding tables.  Each entry provides either the
-   information needed to do the operation requested by the code that
-   indexed that table entry, or it provides a pointer to another
-   table that indexes more bits of the code.  op indicates whether
-   the entry is a pointer to another table, a literal, a length or
-   distance, an end-of-block, or an invalid code.  For a table
-   pointer, the low four bits of op is the number of index bits of
-   that table.  For a length or distance, the low four bits of op
-   is the number of extra bits to get after the code.  bits is
-   the number of bits in this code or part of the code to drop off
-   of the bit buffer.  val is the actual byte to output in the case
-   of a literal, the base length or distance, or the offset from
-   the current table to the next table.  Each entry is four bytes. */
-typedef struct {
-    unsigned char op;           /* operation, extra bits, table bits */
-    unsigned char bits;         /* bits in this part of the code */
-    unsigned short val;         /* offset in table or code value */
-} code;
-
-/* op values as set by inflate_table():
-    00000000 - literal
-    0000tttt - table link, tttt != 0 is the number of table index bits
-    0001eeee - length or distance, eeee is the number of extra bits
-    01100000 - end of block
-    01000000 - invalid code
- */
-
-/* Maximum size of dynamic tree.  The maximum found in a long but non-
-   exhaustive search was 1444 code structures (852 for length/literals
-   and 592 for distances, the latter actually the result of an
-   exhaustive search).  The true maximum is not known, but the value
-   below is more than safe. */
-#define ENOUGH 2048
-#define MAXD 592
-
-/* Type of code to build for inftable() */
-typedef enum {
-    CODES,
-    LENS,
-    DISTS
-} codetype;
-
-extern int inflate_table OF((codetype type, unsigned short FAR *lens,
-                             unsigned codes, code FAR * FAR *table,
-                             unsigned FAR *bits, unsigned short FAR *work));
Index: trunk/minix/lib/zlib-1.2.3/make_vms.com
===================================================================
--- trunk/minix/lib/zlib-1.2.3/make_vms.com	(revision 9)
+++ 	(revision )
@@ -1,461 +1,0 @@
-$! make libz under VMS written by
-$! Martin P.J. Zinser
-$! <zinser@zinser.no-ip.info or zinser@sysdev.deutsche-boerse.com>
-$!
-$ on error then goto err_exit
-$!
-$!
-$! Just some general constants...
-$!
-$ true  = 1
-$ false = 0
-$ tmpnam = "temp_" + f$getjpi("","pid")
-$ SAY = "WRITE SYS$OUTPUT"
-$!
-$! Setup variables holding "config" information
-$!
-$ Make     = ""
-$ name     = "Zlib"
-$ version  = "?.?.?"
-$ v_string = "ZLIB_VERSION"
-$ v_file   = "zlib.h"
-$ ccopt    = ""
-$ lopts    = ""
-$ linkonly = false
-$ optfile  = name + ".opt"
-$ its_decc = false
-$ its_vaxc = false
-$ its_gnuc = false
-$ axp      = f$getsyi("HW_MODEL").ge.1024
-$ s_case   = false
-$! Check for MMK/MMS
-$!
-$ If F$Search ("Sys$System:MMS.EXE") .nes. "" Then Make = "MMS"
-$ If F$Type (MMK) .eqs. "STRING" Then Make = "MMK"
-$!
-$!
-$ gosub find_version
-$!
-$ gosub check_opts
-$!
-$! Look for the compiler used
-$!
-$ gosub check_compiler
-$ if its_decc
-$ then
-$   ccopt = "/prefix=all" + ccopt
-$   if f$trnlnm("SYS") .eqs. ""
-$   then
-$     if axp
-$     then
-$       define sys sys$library:
-$     else
-$       ccopt = "/decc" + ccopt
-$       define sys decc$library_include:
-$     endif
-$   endif
-$ endif
-$ if its_vaxc .or. its_gnuc
-$ then
-$    if f$trnlnm("SYS").eqs."" then define sys sys$library:
-$ endif
-$!
-$! Build the thing plain or with mms
-$!
-$ write sys$output "Compiling Zlib sources ..."
-$ if make.eqs.""
-$  then
-$   dele example.obj;*,minigzip.obj;*
-$   CALL MAKE adler32.OBJ "CC ''CCOPT' adler32" -
-                adler32.c zlib.h zconf.h
-$   CALL MAKE compress.OBJ "CC ''CCOPT' compress" -
-                compress.c zlib.h zconf.h
-$   CALL MAKE crc32.OBJ "CC ''CCOPT' crc32" -
-                crc32.c zlib.h zconf.h
-$   CALL MAKE deflate.OBJ "CC ''CCOPT' deflate" -
-                deflate.c deflate.h zutil.h zlib.h zconf.h
-$   CALL MAKE gzio.OBJ "CC ''CCOPT' gzio" -
-                gzio.c zutil.h zlib.h zconf.h
-$   CALL MAKE infback.OBJ "CC ''CCOPT' infback" -
-                infback.c zutil.h inftrees.h inflate.h inffast.h inffixed.h
-$   CALL MAKE inffast.OBJ "CC ''CCOPT' inffast" -
-                inffast.c zutil.h zlib.h zconf.h inffast.h
-$   CALL MAKE inflate.OBJ "CC ''CCOPT' inflate" -
-                inflate.c zutil.h zlib.h zconf.h infblock.h
-$   CALL MAKE inftrees.OBJ "CC ''CCOPT' inftrees" -
-                inftrees.c zutil.h zlib.h zconf.h inftrees.h
-$   CALL MAKE trees.OBJ "CC ''CCOPT' trees" -
-                trees.c deflate.h zutil.h zlib.h zconf.h
-$   CALL MAKE uncompr.OBJ "CC ''CCOPT' uncompr" -
-                uncompr.c zlib.h zconf.h
-$   CALL MAKE zutil.OBJ "CC ''CCOPT' zutil" -
-                zutil.c zutil.h zlib.h zconf.h
-$   write sys$output "Building Zlib ..."
-$   CALL MAKE libz.OLB "lib/crea libz.olb *.obj" *.OBJ
-$   write sys$output "Building example..."
-$   CALL MAKE example.OBJ "CC ''CCOPT' example" -
-                example.c zlib.h zconf.h
-$   call make example.exe "LINK example,libz.olb/lib" example.obj libz.olb
-$   if f$search("x11vms:xvmsutils.olb") .nes. ""
-$   then
-$     write sys$output "Building minigzip..."
-$     CALL MAKE minigzip.OBJ "CC ''CCOPT' minigzip" -
-                minigzip.c zlib.h zconf.h
-$     call make minigzip.exe -
-                "LINK minigzip,libz.olb/lib,x11vms:xvmsutils.olb/lib" -
-                minigzip.obj libz.olb
-$   endif
-$  else
-$   gosub crea_mms
-$   SAY "Make ''name' ''version' with ''Make' "
-$   'make'
-$  endif
-$!
-$! Alpha gets a shareable image
-$!
-$ If axp
-$ Then
-$   gosub crea_olist
-$   write sys$output "Creating libzshr.exe"
-$   call anal_obj_axp modules.opt _link.opt
-$   if s_case
-$   then
-$      open/append optf modules.opt
-$      write optf "case_sensitive=YES"
-$      close optf
-$   endif
-$   LINK_'lopts'/SHARE=libzshr.exe modules.opt/opt,_link.opt/opt
-$ endif
-$ write sys$output "Zlib build completed"
-$ exit
-$CC_ERR:
-$ write sys$output "C compiler required to build ''name'"
-$ goto err_exit
-$ERR_EXIT:
-$ set message/facil/ident/sever/text
-$ write sys$output "Exiting..."
-$ exit 2
-$!
-$!
-$MAKE: SUBROUTINE   !SUBROUTINE TO CHECK DEPENDENCIES
-$ V = 'F$Verify(0)
-$! P1 = What we are trying to make
-$! P2 = Command to make it
-$! P3 - P8  What it depends on
-$
-$ If F$Search(P1) .Eqs. "" Then Goto Makeit
-$ Time = F$CvTime(F$File(P1,"RDT"))
-$arg=3
-$Loop:
-$       Argument = P'arg
-$       If Argument .Eqs. "" Then Goto Exit
-$       El=0
-$Loop2:
-$       File = F$Element(El," ",Argument)
-$       If File .Eqs. " " Then Goto Endl
-$       AFile = ""
-$Loop3:
-$       OFile = AFile
-$       AFile = F$Search(File)
-$       If AFile .Eqs. "" .Or. AFile .Eqs. OFile Then Goto NextEl
-$       If F$CvTime(F$File(AFile,"RDT")) .Ges. Time Then Goto Makeit
-$       Goto Loop3
-$NextEL:
-$       El = El + 1
-$       Goto Loop2
-$EndL:
-$ arg=arg+1
-$ If arg .Le. 8 Then Goto Loop
-$ Goto Exit
-$
-$Makeit:
-$ VV=F$VERIFY(0)
-$ write sys$output P2
-$ 'P2
-$ VV='F$Verify(VV)
-$Exit:
-$ If V Then Set Verify
-$ENDSUBROUTINE
-$!------------------------------------------------------------------------------
-$!
-$! Check command line options and set symbols accordingly
-$!
-$ CHECK_OPTS:
-$ i = 1
-$ OPT_LOOP:
-$ if i .lt. 9
-$ then
-$   cparm = f$edit(p'i',"upcase")
-$   if cparm .eqs. "DEBUG"
-$   then
-$     ccopt = ccopt + "/noopt/deb"
-$     lopts = lopts + "/deb"
-$   endif
-$   if f$locate("CCOPT=",cparm) .lt. f$length(cparm)
-$   then
-$     start = f$locate("=",cparm) + 1
-$     len   = f$length(cparm) - start
-$     ccopt = ccopt + f$extract(start,len,cparm)
-$     if f$locate("AS_IS",f$edit(ccopt,"UPCASE")) .lt. f$length(ccopt) -
-         then s_case = true
-$   endif
-$   if cparm .eqs. "LINK" then linkonly = true
-$   if f$locate("LOPTS=",cparm) .lt. f$length(cparm)
-$   then
-$     start = f$locate("=",cparm) + 1
-$     len   = f$length(cparm) - start
-$     lopts = lopts + f$extract(start,len,cparm)
-$   endif
-$   if f$locate("CC=",cparm) .lt. f$length(cparm)
-$   then
-$     start  = f$locate("=",cparm) + 1
-$     len    = f$length(cparm) - start
-$     cc_com = f$extract(start,len,cparm)
-      if (cc_com .nes. "DECC") .and. -
-         (cc_com .nes. "VAXC") .and. -
-	 (cc_com .nes. "GNUC")
-$     then
-$       write sys$output "Unsupported compiler choice ''cc_com' ignored"
-$       write sys$output "Use DECC, VAXC, or GNUC instead"
-$     else
-$     	if cc_com .eqs. "DECC" then its_decc = true
-$     	if cc_com .eqs. "VAXC" then its_vaxc = true
-$     	if cc_com .eqs. "GNUC" then its_gnuc = true
-$     endif
-$   endif
-$   if f$locate("MAKE=",cparm) .lt. f$length(cparm)
-$   then
-$     start  = f$locate("=",cparm) + 1
-$     len    = f$length(cparm) - start
-$     mmks = f$extract(start,len,cparm)
-$     if (mmks .eqs. "MMK") .or. (mmks .eqs. "MMS")
-$     then
-$       make = mmks
-$     else
-$       write sys$output "Unsupported make choice ''mmks' ignored"
-$       write sys$output "Use MMK or MMS instead"
-$     endif
-$   endif
-$   i = i + 1
-$   goto opt_loop
-$ endif
-$ return
-$!------------------------------------------------------------------------------
-$!
-$! Look for the compiler used
-$!
-$CHECK_COMPILER:
-$ if (.not. (its_decc .or. its_vaxc .or. its_gnuc))
-$ then
-$   its_decc = (f$search("SYS$SYSTEM:DECC$COMPILER.EXE") .nes. "")
-$   its_vaxc = .not. its_decc .and. (F$Search("SYS$System:VAXC.Exe") .nes. "")
-$   its_gnuc = .not. (its_decc .or. its_vaxc) .and. (f$trnlnm("gnu_cc") .nes. "")
-$ endif
-$!
-$! Exit if no compiler available
-$!
-$ if (.not. (its_decc .or. its_vaxc .or. its_gnuc))
-$ then goto CC_ERR
-$ else
-$   if its_decc then write sys$output "CC compiler check ... Compaq C"
-$   if its_vaxc then write sys$output "CC compiler check ... VAX C"
-$   if its_gnuc then write sys$output "CC compiler check ... GNU C"
-$ endif
-$ return
-$!------------------------------------------------------------------------------
-$!
-$! If MMS/MMK are available dump out the descrip.mms if required
-$!
-$CREA_MMS:
-$ write sys$output "Creating descrip.mms..."
-$ create descrip.mms
-$ open/append out descrip.mms
-$ copy sys$input: out
-$ deck
-# descrip.mms: MMS description file for building zlib on VMS
-# written by Martin P.J. Zinser
-# <zinser@zinser.no-ip.info or zinser@sysdev.deutsche-boerse.com>
-
-OBJS = adler32.obj, compress.obj, crc32.obj, gzio.obj, uncompr.obj, infback.obj\
-       deflate.obj, trees.obj, zutil.obj, inflate.obj, \
-       inftrees.obj, inffast.obj
-
-$ eod
-$ write out "CFLAGS=", ccopt
-$ write out "LOPTS=", lopts
-$ copy sys$input: out
-$ deck
-
-all : example.exe minigzip.exe libz.olb
-        @ write sys$output " Example applications available"
-
-libz.olb : libz.olb($(OBJS))
-	@ write sys$output " libz available"
-
-example.exe : example.obj libz.olb
-              link $(LOPTS) example,libz.olb/lib
-
-minigzip.exe : minigzip.obj libz.olb
-              link $(LOPTS) minigzip,libz.olb/lib,x11vms:xvmsutils.olb/lib
-
-clean :
-	delete *.obj;*,libz.olb;*,*.opt;*,*.exe;*
-
-
-# Other dependencies.
-adler32.obj  : adler32.c zutil.h zlib.h zconf.h
-compress.obj : compress.c zlib.h zconf.h
-crc32.obj    : crc32.c zutil.h zlib.h zconf.h
-deflate.obj  : deflate.c deflate.h zutil.h zlib.h zconf.h
-example.obj  : example.c zlib.h zconf.h
-gzio.obj     : gzio.c zutil.h zlib.h zconf.h
-inffast.obj  : inffast.c zutil.h zlib.h zconf.h inftrees.h inffast.h
-inflate.obj  : inflate.c zutil.h zlib.h zconf.h
-inftrees.obj : inftrees.c zutil.h zlib.h zconf.h inftrees.h
-minigzip.obj : minigzip.c zlib.h zconf.h
-trees.obj    : trees.c deflate.h zutil.h zlib.h zconf.h
-uncompr.obj  : uncompr.c zlib.h zconf.h
-zutil.obj    : zutil.c zutil.h zlib.h zconf.h
-infback.obj  : infback.c zutil.h inftrees.h inflate.h inffast.h inffixed.h
-$ eod
-$ close out
-$ return
-$!------------------------------------------------------------------------------
-$!
-$! Read list of core library sources from makefile.in and create options
-$! needed to build shareable image
-$!
-$CREA_OLIST:
-$ open/read min makefile.in
-$ open/write mod modules.opt
-$ src_check = "OBJS ="
-$MRLOOP:
-$ read/end=mrdone min rec
-$ if (f$extract(0,6,rec) .nes. src_check) then goto mrloop
-$ rec = rec - src_check
-$ gosub extra_filnam
-$ if (f$element(1,"\",rec) .eqs. "\") then goto mrdone
-$MRSLOOP:
-$ read/end=mrdone min rec
-$ gosub extra_filnam
-$ if (f$element(1,"\",rec) .nes. "\") then goto mrsloop
-$MRDONE:
-$ close min
-$ close mod
-$ return
-$!------------------------------------------------------------------------------
-$!
-$! Take record extracted in crea_olist and split it into single filenames
-$!
-$EXTRA_FILNAM:
-$ myrec = f$edit(rec - "\", "trim,compress")
-$ i = 0
-$FELOOP:
-$ srcfil = f$element(i," ", myrec)
-$ if (srcfil .nes. " ")
-$ then
-$   write mod f$parse(srcfil,,,"NAME"), ".obj"
-$   i = i + 1
-$   goto feloop
-$ endif
-$ return
-$!------------------------------------------------------------------------------
-$!
-$! Find current Zlib version number
-$!
-$FIND_VERSION:
-$ open/read h_in 'v_file'
-$hloop:
-$ read/end=hdone h_in rec
-$ rec = f$edit(rec,"TRIM")
-$ if (f$extract(0,1,rec) .nes. "#") then goto hloop
-$ rec = f$edit(rec - "#", "TRIM")
-$ if f$element(0," ",rec) .nes. "define" then goto hloop
-$ if f$element(1," ",rec) .eqs. v_string
-$ then
-$   version = 'f$element(2," ",rec)'
-$   goto hdone
-$ endif
-$ goto hloop
-$hdone:
-$ close h_in
-$ return
-$!------------------------------------------------------------------------------
-$!
-$! Analyze Object files for OpenVMS AXP to extract Procedure and Data
-$! information to build a symbol vector for a shareable image
-$! All the "brains" of this logic was suggested by Hartmut Becker
-$! (Hartmut.Becker@compaq.com). All the bugs were introduced by me
-$! (zinser@decus.de), so if you do have problem reports please do not
-$! bother Hartmut/HP, but get in touch with me
-$!
-$ ANAL_OBJ_AXP: Subroutine
-$ V = 'F$Verify(0)
-$ SAY := "WRITE_ SYS$OUTPUT"
-$
-$ IF F$SEARCH("''P1'") .EQS. ""
-$ THEN
-$    SAY "ANAL_OBJ_AXP-E-NOSUCHFILE:  Error, inputfile ''p1' not available"
-$    goto exit_aa
-$ ENDIF
-$ IF "''P2'" .EQS. ""
-$ THEN
-$    SAY "ANAL_OBJ_AXP:  Error, no output file provided"
-$    goto exit_aa
-$ ENDIF
-$
-$ open/read in 'p1
-$ create a.tmp
-$ open/append atmp a.tmp
-$ loop:
-$ read/end=end_loop in line
-$ f= f$search(line)
-$ if f .eqs. ""
-$ then
-$	write sys$output "ANAL_OBJ_AXP-w-nosuchfile, ''line'"
-$	goto loop
-$ endif
-$ define/user sys$output nl:
-$ define/user sys$error nl:
-$ anal/obj/gsd 'f /out=x.tmp
-$ open/read xtmp x.tmp
-$ XLOOP:
-$ read/end=end_xloop xtmp xline
-$ xline = f$edit(xline,"compress")
-$ write atmp xline
-$ goto xloop
-$ END_XLOOP:
-$ close xtmp
-$ goto loop
-$ end_loop:
-$ close in
-$ close atmp
-$ if f$search("a.tmp") .eqs. "" -
-	then $ exit
-$ ! all global definitions
-$ search a.tmp "symbol:","EGSY$V_DEF 1","EGSY$V_NORM 1"/out=b.tmp
-$ ! all procedures
-$ search b.tmp "EGSY$V_NORM 1"/wind=(0,1) /out=c.tmp
-$ search c.tmp "symbol:"/out=d.tmp
-$ define/user sys$output nl:
-$ edito/edt/command=sys$input d.tmp
-sub/symbol: "/symbol_vector=(/whole
-sub/"/=PROCEDURE)/whole
-exit
-$ ! all data
-$ search b.tmp "EGSY$V_DEF 1"/wind=(0,1) /out=e.tmp
-$ search e.tmp "symbol:"/out=f.tmp
-$ define/user sys$output nl:
-$ edito/edt/command=sys$input f.tmp
-sub/symbol: "/symbol_vector=(/whole
-sub/"/=DATA)/whole
-exit
-$ sort/nodupl d.tmp,f.tmp 'p2'
-$ delete a.tmp;*,b.tmp;*,c.tmp;*,d.tmp;*,e.tmp;*,f.tmp;*
-$ if f$search("x.tmp") .nes. "" -
-	then $ delete x.tmp;*
-$!
-$ EXIT_AA:
-$ if V then set verify
-$ endsubroutine
-$!------------------------------------------------------------------------------
Index: trunk/minix/lib/zlib-1.2.3/minigzip.c
===================================================================
--- trunk/minix/lib/zlib-1.2.3/minigzip.c	(revision 9)
+++ 	(revision )
@@ -1,322 +1,0 @@
-/* minigzip.c -- simulate gzip using the zlib compression library
- * Copyright (C) 1995-2005 Jean-loup Gailly.
- * For conditions of distribution and use, see copyright notice in zlib.h
- */
-
-/*
- * minigzip is a minimal implementation of the gzip utility. This is
- * only an example of using zlib and isn't meant to replace the
- * full-featured gzip. No attempt is made to deal with file systems
- * limiting names to 14 or 8+3 characters, etc... Error checking is
- * very limited. So use minigzip only for testing; use gzip for the
- * real thing. On MSDOS, use only on file names without extension
- * or in pipe mode.
- */
-
-/* @(#) $Id: minigzip.c,v 1.1 2005/09/23 22:39:00 beng Exp $ */
-
-#include <stdio.h>
-#include "zlib.h"
-
-#ifdef STDC
-#  include <string.h>
-#  include <stdlib.h>
-#endif
-
-#ifdef USE_MMAP
-#  include <sys/types.h>
-#  include <sys/mman.h>
-#  include <sys/stat.h>
-#endif
-
-#if defined(MSDOS) || defined(OS2) || defined(WIN32) || defined(__CYGWIN__)
-#  include <fcntl.h>
-#  include <io.h>
-#  define SET_BINARY_MODE(file) setmode(fileno(file), O_BINARY)
-#else
-#  define SET_BINARY_MODE(file)
-#endif
-
-#ifdef VMS
-#  define unlink delete
-#  define GZ_SUFFIX "-gz"
-#endif
-#ifdef RISCOS
-#  define unlink remove
-#  define GZ_SUFFIX "-gz"
-#  define fileno(file) file->__file
-#endif
-#if defined(__MWERKS__) && __dest_os != __be_os && __dest_os != __win32_os
-#  include <unix.h> /* for fileno */
-#endif
-
-#ifndef WIN32 /* unlink already in stdio.h for WIN32 */
-  extern int unlink OF((const char *));
-#endif
-
-#ifndef GZ_SUFFIX
-#  define GZ_SUFFIX ".gz"
-#endif
-#define SUFFIX_LEN (sizeof(GZ_SUFFIX)-1)
-
-#define BUFLEN      16384
-#define MAX_NAME_LEN 1024
-
-#ifdef MAXSEG_64K
-#  define local static
-   /* Needed for systems with limitation on stack size. */
-#else
-#  define local
-#endif
-
-char *prog;
-
-void error            OF((const char *msg));
-void gz_compress      OF((FILE   *in, gzFile out));
-#ifdef USE_MMAP
-int  gz_compress_mmap OF((FILE   *in, gzFile out));
-#endif
-void gz_uncompress    OF((gzFile in, FILE   *out));
-void file_compress    OF((char  *file, char *mode));
-void file_uncompress  OF((char  *file));
-int  main             OF((int argc, char *argv[]));
-
-/* ===========================================================================
- * Display error message and exit
- */
-void error(msg)
-    const char *msg;
-{
-    fprintf(stderr, "%s: %s\n", prog, msg);
-    exit(1);
-}
-
-/* ===========================================================================
- * Compress input to output then close both files.
- */
-
-void gz_compress(in, out)
-    FILE   *in;
-    gzFile out;
-{
-    local char buf[BUFLEN];
-    int len;
-    int err;
-
-#ifdef USE_MMAP
-    /* Try first compressing with mmap. If mmap fails (minigzip used in a
-     * pipe), use the normal fread loop.
-     */
-    if (gz_compress_mmap(in, out) == Z_OK) return;
-#endif
-    for (;;) {
-        len = (int)fread(buf, 1, sizeof(buf), in);
-        if (ferror(in)) {
-            perror("fread");
-            exit(1);
-        }
-        if (len == 0) break;
-
-        if (gzwrite(out, buf, (unsigned)len) != len) error(gzerror(out, &err));
-    }
-    fclose(in);
-    if (gzclose(out) != Z_OK) error("failed gzclose");
-}
-
-#ifdef USE_MMAP /* MMAP version, Miguel Albrecht <malbrech@eso.org> */
-
-/* Try compressing the input file at once using mmap. Return Z_OK if
- * if success, Z_ERRNO otherwise.
- */
-int gz_compress_mmap(in, out)
-    FILE   *in;
-    gzFile out;
-{
-    int len;
-    int err;
-    int ifd = fileno(in);
-    caddr_t buf;    /* mmap'ed buffer for the entire input file */
-    off_t buf_len;  /* length of the input file */
-    struct stat sb;
-
-    /* Determine the size of the file, needed for mmap: */
-    if (fstat(ifd, &sb) < 0) return Z_ERRNO;
-    buf_len = sb.st_size;
-    if (buf_len <= 0) return Z_ERRNO;
-
-    /* Now do the actual mmap: */
-    buf = mmap((caddr_t) 0, buf_len, PROT_READ, MAP_SHARED, ifd, (off_t)0);
-    if (buf == (caddr_t)(-1)) return Z_ERRNO;
-
-    /* Compress the whole file at once: */
-    len = gzwrite(out, (char *)buf, (unsigned)buf_len);
-
-    if (len != (int)buf_len) error(gzerror(out, &err));
-
-    munmap(buf, buf_len);
-    fclose(in);
-    if (gzclose(out) != Z_OK) error("failed gzclose");
-    return Z_OK;
-}
-#endif /* USE_MMAP */
-
-/* ===========================================================================
- * Uncompress input to output then close both files.
- */
-void gz_uncompress(in, out)
-    gzFile in;
-    FILE   *out;
-{
-    local char buf[BUFLEN];
-    int len;
-    int err;
-
-    for (;;) {
-        len = gzread(in, buf, sizeof(buf));
-        if (len < 0) error (gzerror(in, &err));
-        if (len == 0) break;
-
-        if ((int)fwrite(buf, 1, (unsigned)len, out) != len) {
-            error("failed fwrite");
-        }
-    }
-    if (fclose(out)) error("failed fclose");
-
-    if (gzclose(in) != Z_OK) error("failed gzclose");
-}
-
-
-/* ===========================================================================
- * Compress the given file: create a corresponding .gz file and remove the
- * original.
- */
-void file_compress(file, mode)
-    char  *file;
-    char  *mode;
-{
-    local char outfile[MAX_NAME_LEN];
-    FILE  *in;
-    gzFile out;
-
-    strcpy(outfile, file);
-    strcat(outfile, GZ_SUFFIX);
-
-    in = fopen(file, "rb");
-    if (in == NULL) {
-        perror(file);
-        exit(1);
-    }
-    out = gzopen(outfile, mode);
-    if (out == NULL) {
-        fprintf(stderr, "%s: can't gzopen %s\n", prog, outfile);
-        exit(1);
-    }
-    gz_compress(in, out);
-
-    unlink(file);
-}
-
-
-/* ===========================================================================
- * Uncompress the given file and remove the original.
- */
-void file_uncompress(file)
-    char  *file;
-{
-    local char buf[MAX_NAME_LEN];
-    char *infile, *outfile;
-    FILE  *out;
-    gzFile in;
-    uInt len = (uInt)strlen(file);
-
-    strcpy(buf, file);
-
-    if (len > SUFFIX_LEN && strcmp(file+len-SUFFIX_LEN, GZ_SUFFIX) == 0) {
-        infile = file;
-        outfile = buf;
-        outfile[len-3] = '\0';
-    } else {
-        outfile = file;
-        infile = buf;
-        strcat(infile, GZ_SUFFIX);
-    }
-    in = gzopen(infile, "rb");
-    if (in == NULL) {
-        fprintf(stderr, "%s: can't gzopen %s\n", prog, infile);
-        exit(1);
-    }
-    out = fopen(outfile, "wb");
-    if (out == NULL) {
-        perror(file);
-        exit(1);
-    }
-
-    gz_uncompress(in, out);
-
-    unlink(infile);
-}
-
-
-/* ===========================================================================
- * Usage:  minigzip [-d] [-f] [-h] [-r] [-1 to -9] [files...]
- *   -d : decompress
- *   -f : compress with Z_FILTERED
- *   -h : compress with Z_HUFFMAN_ONLY
- *   -r : compress with Z_RLE
- *   -1 to -9 : compression level
- */
-
-int main(argc, argv)
-    int argc;
-    char *argv[];
-{
-    int uncompr = 0;
-    gzFile file;
-    char outmode[20];
-
-    strcpy(outmode, "wb6 ");
-
-    prog = argv[0];
-    argc--, argv++;
-
-    while (argc > 0) {
-      if (strcmp(*argv, "-d") == 0)
-        uncompr = 1;
-      else if (strcmp(*argv, "-f") == 0)
-        outmode[3] = 'f';
-      else if (strcmp(*argv, "-h") == 0)
-        outmode[3] = 'h';
-      else if (strcmp(*argv, "-r") == 0)
-        outmode[3] = 'R';
-      else if ((*argv)[0] == '-' && (*argv)[1] >= '1' && (*argv)[1] <= '9' &&
-               (*argv)[2] == 0)
-        outmode[2] = (*argv)[1];
-      else
-        break;
-      argc--, argv++;
-    }
-    if (outmode[3] == ' ')
-        outmode[3] = 0;
-    if (argc == 0) {
-        SET_BINARY_MODE(stdin);
-        SET_BINARY_MODE(stdout);
-        if (uncompr) {
-            file = gzdopen(fileno(stdin), "rb");
-            if (file == NULL) error("can't gzdopen stdin");
-            gz_uncompress(file, stdout);
-        } else {
-            file = gzdopen(fileno(stdout), outmode);
-            if (file == NULL) error("can't gzdopen stdout");
-            gz_compress(stdin, file);
-        }
-    } else {
-        do {
-            if (uncompr) {
-                file_uncompress(*argv);
-            } else {
-                file_compress(*argv, outmode);
-            }
-        } while (argv++, --argc);
-    }
-    return 0;
-}
Index: trunk/minix/lib/zlib-1.2.3/msdos/Makefile.bor
===================================================================
--- trunk/minix/lib/zlib-1.2.3/msdos/Makefile.bor	(revision 9)
+++ 	(revision )
@@ -1,109 +1,0 @@
-# Makefile for zlib
-# Borland C++
-# Last updated: 15-Mar-2003
-
-# To use, do "make -fmakefile.bor"
-# To compile in small model, set below: MODEL=s
-
-# WARNING: the small model is supported but only for small values of
-# MAX_WBITS and MAX_MEM_LEVEL. For example:
-#    -DMAX_WBITS=11 -DDEF_WBITS=11 -DMAX_MEM_LEVEL=3
-# If you wish to reduce the memory requirements (default 256K for big
-# objects plus a few K), you can add to the LOC macro below:
-#   -DMAX_MEM_LEVEL=7 -DMAX_WBITS=14
-# See zconf.h for details about the memory requirements.
-
-# ------------ Turbo C++, Borland C++ ------------
-
-#    Optional nonstandard preprocessor flags (e.g. -DMAX_MEM_LEVEL=7)
-#    should be added to the environment via "set LOCAL_ZLIB=-DFOO" or added
-#    to the declaration of LOC here:
-LOC = $(LOCAL_ZLIB)
-
-# type for CPU required: 0: 8086, 1: 80186, 2: 80286, 3: 80386, etc.
-CPU_TYP = 0
-
-# memory model: one of s, m, c, l (small, medium, compact, large)
-MODEL=l
-
-# replace bcc with tcc for Turbo C++ 1.0, with bcc32 for the 32 bit version
-CC=bcc
-LD=bcc
-AR=tlib
-
-# compiler flags
-# replace "-O2" by "-O -G -a -d" for Turbo C++ 1.0
-CFLAGS=-O2 -Z -m$(MODEL) $(LOC)
-
-LDFLAGS=-m$(MODEL) -f-
-
-
-# variables
-ZLIB_LIB = zlib_$(MODEL).lib
-
-OBJ1 = adler32.obj compress.obj crc32.obj deflate.obj gzio.obj infback.obj
-OBJ2 = inffast.obj inflate.obj inftrees.obj trees.obj uncompr.obj zutil.obj
-OBJP1 = +adler32.obj+compress.obj+crc32.obj+deflate.obj+gzio.obj+infback.obj
-OBJP2 = +inffast.obj+inflate.obj+inftrees.obj+trees.obj+uncompr.obj+zutil.obj
-
-
-# targets
-all: $(ZLIB_LIB) example.exe minigzip.exe
-
-.c.obj:
-	$(CC) -c $(CFLAGS) $*.c
-
-adler32.obj: adler32.c zlib.h zconf.h
-
-compress.obj: compress.c zlib.h zconf.h
-
-crc32.obj: crc32.c zlib.h zconf.h crc32.h
-
-deflate.obj: deflate.c deflate.h zutil.h zlib.h zconf.h
-
-gzio.obj: gzio.c zutil.h zlib.h zconf.h
-
-infback.obj: infback.c zutil.h zlib.h zconf.h inftrees.h inflate.h \
- inffast.h inffixed.h
-
-inffast.obj: inffast.c zutil.h zlib.h zconf.h inftrees.h inflate.h \
- inffast.h
-
-inflate.obj: inflate.c zutil.h zlib.h zconf.h inftrees.h inflate.h \
- inffast.h inffixed.h
-
-inftrees.obj: inftrees.c zutil.h zlib.h zconf.h inftrees.h
-
-trees.obj: trees.c zutil.h zlib.h zconf.h deflate.h trees.h
-
-uncompr.obj: uncompr.c zlib.h zconf.h
-
-zutil.obj: zutil.c zutil.h zlib.h zconf.h
-
-example.obj: example.c zlib.h zconf.h
-
-minigzip.obj: minigzip.c zlib.h zconf.h
-
-
-# the command line is cut to fit in the MS-DOS 128 byte limit:
-$(ZLIB_LIB): $(OBJ1) $(OBJ2)
-	-del $(ZLIB_LIB)
-	$(AR) $(ZLIB_LIB) $(OBJP1)
-	$(AR) $(ZLIB_LIB) $(OBJP2)
-
-example.exe: example.obj $(ZLIB_LIB)
-	$(LD) $(LDFLAGS) example.obj $(ZLIB_LIB)
-
-minigzip.exe: minigzip.obj $(ZLIB_LIB)
-	$(LD) $(LDFLAGS) minigzip.obj $(ZLIB_LIB)
-
-test: example.exe minigzip.exe
-	example
-	echo hello world | minigzip | minigzip -d
-
-clean:
-	-del *.obj
-	-del *.lib
-	-del *.exe
-	-del zlib_*.bak
-	-del foo.gz
Index: trunk/minix/lib/zlib-1.2.3/msdos/Makefile.dj2
===================================================================
--- trunk/minix/lib/zlib-1.2.3/msdos/Makefile.dj2	(revision 9)
+++ 	(revision )
@@ -1,104 +1,0 @@
-# Makefile for zlib.  Modified for djgpp v2.0 by F. J. Donahoe, 3/15/96.
-# Copyright (C) 1995-1998 Jean-loup Gailly.
-# For conditions of distribution and use, see copyright notice in zlib.h
-
-# To compile, or to compile and test, type:
-#
-#   make -fmakefile.dj2;  make test -fmakefile.dj2
-#
-# To install libz.a, zconf.h and zlib.h in the djgpp directories, type:
-#
-#    make install -fmakefile.dj2
-#
-# after first defining LIBRARY_PATH and INCLUDE_PATH in djgpp.env as
-# in the sample below if the pattern of the DJGPP distribution is to
-# be followed.  Remember that, while <sp>'es around <=> are ignored in
-# makefiles, they are *not* in batch files or in djgpp.env.
-# - - - - -
-# [make]
-# INCLUDE_PATH=%\>;INCLUDE_PATH%%\DJDIR%\include
-# LIBRARY_PATH=%\>;LIBRARY_PATH%%\DJDIR%\lib
-# BUTT=-m486
-# - - - - -
-# Alternately, these variables may be defined below, overriding the values
-# in djgpp.env, as
-# INCLUDE_PATH=c:\usr\include
-# LIBRARY_PATH=c:\usr\lib
-
-CC=gcc
-
-#CFLAGS=-MMD -O
-#CFLAGS=-O -DMAX_WBITS=14 -DMAX_MEM_LEVEL=7
-#CFLAGS=-MMD -g -DDEBUG
-CFLAGS=-MMD -O3 $(BUTT) -Wall -Wwrite-strings -Wpointer-arith -Wconversion \
-             -Wstrict-prototypes -Wmissing-prototypes
-
-# If cp.exe is available, replace "copy /Y" with "cp -fp" .
-CP=copy /Y
-# If gnu install.exe is available, replace $(CP) with ginstall.
-INSTALL=$(CP)
-# The default value of RM is "rm -f."  If "rm.exe" is found, comment out:
-RM=del
-LDLIBS=-L. -lz
-LD=$(CC) -s -o
-LDSHARED=$(CC)
-
-INCL=zlib.h zconf.h
-LIBS=libz.a
-
-AR=ar rcs
-
-prefix=/usr/local
-exec_prefix = $(prefix)
-
-OBJS = adler32.o compress.o crc32.o gzio.o uncompr.o deflate.o trees.o \
-       zutil.o inflate.o infback.o inftrees.o inffast.o
-
-OBJA =
-# to use the asm code: make OBJA=match.o
-
-TEST_OBJS = example.o minigzip.o
-
-all: example.exe minigzip.exe
-
-check: test
-test: all
-	./example
-	echo hello world | .\minigzip | .\minigzip -d
-
-%.o : %.c
-	$(CC) $(CFLAGS) -c $< -o $@
-
-libz.a: $(OBJS) $(OBJA)
-	$(AR) $@ $(OBJS) $(OBJA)
-
-%.exe : %.o $(LIBS)
-	$(LD) $@ $< $(LDLIBS)
-
-# INCLUDE_PATH and LIBRARY_PATH were set for [make] in djgpp.env .
-
-.PHONY : uninstall clean
-
-install: $(INCL) $(LIBS)
-	-@if not exist $(INCLUDE_PATH)\nul mkdir $(INCLUDE_PATH)
-	-@if not exist $(LIBRARY_PATH)\nul mkdir $(LIBRARY_PATH)
-	$(INSTALL) zlib.h $(INCLUDE_PATH)
-	$(INSTALL) zconf.h $(INCLUDE_PATH)
-	$(INSTALL) libz.a $(LIBRARY_PATH)
-
-uninstall:
-	$(RM) $(INCLUDE_PATH)\zlib.h
-	$(RM) $(INCLUDE_PATH)\zconf.h
-	$(RM) $(LIBRARY_PATH)\libz.a
-
-clean:
-	$(RM) *.d
-	$(RM) *.o
-	$(RM) *.exe
-	$(RM) libz.a
-	$(RM) foo.gz
-
-DEPS := $(wildcard *.d)
-ifneq ($(DEPS),)
-include $(DEPS)
-endif
Index: trunk/minix/lib/zlib-1.2.3/msdos/Makefile.emx
===================================================================
--- trunk/minix/lib/zlib-1.2.3/msdos/Makefile.emx	(revision 9)
+++ 	(revision )
@@ -1,69 +1,0 @@
-# Makefile for zlib.  Modified for emx 0.9c by Chr. Spieler, 6/17/98.
-# Copyright (C) 1995-1998 Jean-loup Gailly.
-# For conditions of distribution and use, see copyright notice in zlib.h
-
-# To compile, or to compile and test, type:
-#
-#   make -fmakefile.emx;  make test -fmakefile.emx
-#
-
-CC=gcc
-
-#CFLAGS=-MMD -O
-#CFLAGS=-O -DMAX_WBITS=14 -DMAX_MEM_LEVEL=7
-#CFLAGS=-MMD -g -DDEBUG
-CFLAGS=-MMD -O3 $(BUTT) -Wall -Wwrite-strings -Wpointer-arith -Wconversion \
-             -Wstrict-prototypes -Wmissing-prototypes
-
-# If cp.exe is available, replace "copy /Y" with "cp -fp" .
-CP=copy /Y
-# If gnu install.exe is available, replace $(CP) with ginstall.
-INSTALL=$(CP)
-# The default value of RM is "rm -f."  If "rm.exe" is found, comment out:
-RM=del
-LDLIBS=-L. -lzlib
-LD=$(CC) -s -o
-LDSHARED=$(CC)
-
-INCL=zlib.h zconf.h
-LIBS=zlib.a
-
-AR=ar rcs
-
-prefix=/usr/local
-exec_prefix = $(prefix)
-
-OBJS = adler32.o compress.o crc32.o gzio.o uncompr.o deflate.o trees.o \
-       zutil.o inflate.o infback.o inftrees.o inffast.o
-
-TEST_OBJS = example.o minigzip.o
-
-all: example.exe minigzip.exe
-
-test: all
-	./example
-	echo hello world | .\minigzip | .\minigzip -d
-
-%.o : %.c
-	$(CC) $(CFLAGS) -c $< -o $@
-
-zlib.a: $(OBJS)
-	$(AR) $@ $(OBJS)
-
-%.exe : %.o $(LIBS)
-	$(LD) $@ $< $(LDLIBS)
-
-
-.PHONY : clean
-
-clean:
-	$(RM) *.d
-	$(RM) *.o
-	$(RM) *.exe
-	$(RM) zlib.a
-	$(RM) foo.gz
-
-DEPS := $(wildcard *.d)
-ifneq ($(DEPS),)
-include $(DEPS)
-endif
Index: trunk/minix/lib/zlib-1.2.3/msdos/Makefile.msc
===================================================================
--- trunk/minix/lib/zlib-1.2.3/msdos/Makefile.msc	(revision 9)
+++ 	(revision )
@@ -1,106 +1,0 @@
-# Makefile for zlib
-# Microsoft C 5.1 or later
-# Last updated: 19-Mar-2003
-
-# To use, do "make makefile.msc"
-# To compile in small model, set below: MODEL=S
-
-# If you wish to reduce the memory requirements (default 256K for big
-# objects plus a few K), you can add to the LOC macro below:
-#   -DMAX_MEM_LEVEL=7 -DMAX_WBITS=14
-# See zconf.h for details about the memory requirements.
-
-# ------------- Microsoft C 5.1 and later -------------
-
-#    Optional nonstandard preprocessor flags (e.g. -DMAX_MEM_LEVEL=7)
-#    should be added to the environment via "set LOCAL_ZLIB=-DFOO" or added
-#    to the declaration of LOC here:
-LOC = $(LOCAL_ZLIB)
-
-# Type for CPU required: 0: 8086, 1: 80186, 2: 80286, 3: 80386, etc.
-CPU_TYP = 0
-
-# Memory model: one of S, M, C, L (small, medium, compact, large)
-MODEL=L
-
-CC=cl
-CFLAGS=-nologo -A$(MODEL) -G$(CPU_TYP) -W3 -Oait -Gs $(LOC)
-#-Ox generates bad code with MSC 5.1
-LIB_CFLAGS=-Zl $(CFLAGS)
-
-LD=link
-LDFLAGS=/noi/e/st:0x1500/noe/farcall/packcode
-# "/farcall/packcode" are only useful for `large code' memory models
-# but should be a "no-op" for small code models.
-
-
-# variables
-ZLIB_LIB = zlib_$(MODEL).lib
-
-OBJ1 = adler32.obj compress.obj crc32.obj deflate.obj gzio.obj infback.obj
-OBJ2 = inffast.obj inflate.obj inftrees.obj trees.obj uncompr.obj zutil.obj
-
-
-# targets
-all:  $(ZLIB_LIB) example.exe minigzip.exe
-
-.c.obj:
-	$(CC) -c $(LIB_CFLAGS) $*.c
-
-adler32.obj: adler32.c zlib.h zconf.h
-
-compress.obj: compress.c zlib.h zconf.h
-
-crc32.obj: crc32.c zlib.h zconf.h crc32.h
-
-deflate.obj: deflate.c deflate.h zutil.h zlib.h zconf.h
-
-gzio.obj: gzio.c zutil.h zlib.h zconf.h
-
-infback.obj: infback.c zutil.h zlib.h zconf.h inftrees.h inflate.h \
- inffast.h inffixed.h
-
-inffast.obj: inffast.c zutil.h zlib.h zconf.h inftrees.h inflate.h \
- inffast.h
-
-inflate.obj: inflate.c zutil.h zlib.h zconf.h inftrees.h inflate.h \
- inffast.h inffixed.h
-
-inftrees.obj: inftrees.c zutil.h zlib.h zconf.h inftrees.h
-
-trees.obj: trees.c zutil.h zlib.h zconf.h deflate.h trees.h
-
-uncompr.obj: uncompr.c zlib.h zconf.h
-
-zutil.obj: zutil.c zutil.h zlib.h zconf.h
-
-example.obj: example.c zlib.h zconf.h
-	$(CC) -c $(CFLAGS) $*.c
-
-minigzip.obj: minigzip.c zlib.h zconf.h
-	$(CC) -c $(CFLAGS) $*.c
-
-
-# the command line is cut to fit in the MS-DOS 128 byte limit:
-$(ZLIB_LIB): $(OBJ1) $(OBJ2)
-	if exist $(ZLIB_LIB) del $(ZLIB_LIB)
-	lib $(ZLIB_LIB) $(OBJ1);
-	lib $(ZLIB_LIB) $(OBJ2);
-
-example.exe: example.obj $(ZLIB_LIB)
-	$(LD) $(LDFLAGS) example.obj,,,$(ZLIB_LIB);
-
-minigzip.exe: minigzip.obj $(ZLIB_LIB)
-	$(LD) $(LDFLAGS) minigzip.obj,,,$(ZLIB_LIB);
-
-test: example.exe minigzip.exe
-	example
-	echo hello world | minigzip | minigzip -d
-
-clean:
-	-del *.obj
-	-del *.lib
-	-del *.exe
-	-del *.map
-	-del zlib_*.bak
-	-del foo.gz
Index: trunk/minix/lib/zlib-1.2.3/msdos/Makefile.tc
===================================================================
--- trunk/minix/lib/zlib-1.2.3/msdos/Makefile.tc	(revision 9)
+++ 	(revision )
@@ -1,94 +1,0 @@
-# Makefile for zlib
-# Turbo C 2.01, Turbo C++ 1.01
-# Last updated: 15-Mar-2003
-
-# To use, do "make -fmakefile.tc"
-# To compile in small model, set below: MODEL=s
-
-# WARNING: the small model is supported but only for small values of
-# MAX_WBITS and MAX_MEM_LEVEL. For example:
-#    -DMAX_WBITS=11 -DMAX_MEM_LEVEL=3
-# If you wish to reduce the memory requirements (default 256K for big
-# objects plus a few K), you can add to CFLAGS below:
-#   -DMAX_MEM_LEVEL=7 -DMAX_WBITS=14
-# See zconf.h for details about the memory requirements.
-
-# ------------ Turbo C 2.01, Turbo C++ 1.01 ------------
-MODEL=l
-CC=tcc
-LD=tcc
-AR=tlib
-# CFLAGS=-O2 -G -Z -m$(MODEL) -DMAX_WBITS=11 -DMAX_MEM_LEVEL=3
-CFLAGS=-O2 -G -Z -m$(MODEL)
-LDFLAGS=-m$(MODEL) -f-
-
-
-# variables
-ZLIB_LIB = zlib_$(MODEL).lib
-
-OBJ1 = adler32.obj compress.obj crc32.obj deflate.obj gzio.obj infback.obj
-OBJ2 = inffast.obj inflate.obj inftrees.obj trees.obj uncompr.obj zutil.obj
-OBJP1 = +adler32.obj+compress.obj+crc32.obj+deflate.obj+gzio.obj+infback.obj
-OBJP2 = +inffast.obj+inflate.obj+inftrees.obj+trees.obj+uncompr.obj+zutil.obj
-
-
-# targets
-all: $(ZLIB_LIB) example.exe minigzip.exe
-
-.c.obj:
-	$(CC) -c $(CFLAGS) $*.c
-
-adler32.obj: adler32.c zlib.h zconf.h
-
-compress.obj: compress.c zlib.h zconf.h
-
-crc32.obj: crc32.c zlib.h zconf.h crc32.h
-
-deflate.obj: deflate.c deflate.h zutil.h zlib.h zconf.h
-
-gzio.obj: gzio.c zutil.h zlib.h zconf.h
-
-infback.obj: infback.c zutil.h zlib.h zconf.h inftrees.h inflate.h \
- inffast.h inffixed.h
-
-inffast.obj: inffast.c zutil.h zlib.h zconf.h inftrees.h inflate.h \
- inffast.h
-
-inflate.obj: inflate.c zutil.h zlib.h zconf.h inftrees.h inflate.h \
- inffast.h inffixed.h
-
-inftrees.obj: inftrees.c zutil.h zlib.h zconf.h inftrees.h
-
-trees.obj: trees.c zutil.h zlib.h zconf.h deflate.h trees.h
-
-uncompr.obj: uncompr.c zlib.h zconf.h
-
-zutil.obj: zutil.c zutil.h zlib.h zconf.h
-
-example.obj: example.c zlib.h zconf.h
-
-minigzip.obj: minigzip.c zlib.h zconf.h
-
-
-# the command line is cut to fit in the MS-DOS 128 byte limit:
-$(ZLIB_LIB): $(OBJ1) $(OBJ2)
-	-del $(ZLIB_LIB)
-	$(AR) $(ZLIB_LIB) $(OBJP1)
-	$(AR) $(ZLIB_LIB) $(OBJP2)
-
-example.exe: example.obj $(ZLIB_LIB)
-	$(LD) $(LDFLAGS) example.obj $(ZLIB_LIB)
-
-minigzip.exe: minigzip.obj $(ZLIB_LIB)
-	$(LD) $(LDFLAGS) minigzip.obj $(ZLIB_LIB)
-
-test: example.exe minigzip.exe
-	example
-	echo hello world | minigzip | minigzip -d
-
-clean:
-	-del *.obj
-	-del *.lib
-	-del *.exe
-	-del zlib_*.bak
-	-del foo.gz
Index: trunk/minix/lib/zlib-1.2.3/old/Makefile.riscos
===================================================================
--- trunk/minix/lib/zlib-1.2.3/old/Makefile.riscos	(revision 9)
+++ 	(revision )
@@ -1,151 +1,0 @@
-# Project:   zlib_1_03
-# Patched for zlib 1.1.2 rw@shadow.org.uk 19980430
-# test works out-of-the-box, installs `somewhere' on demand
-
-# Toolflags:
-CCflags = -c -depend !Depend -IC: -g -throwback  -DRISCOS  -fah
-C++flags = -c -depend !Depend -IC: -throwback
-Linkflags = -aif -c++ -o $@
-ObjAsmflags = -throwback -NoCache -depend !Depend
-CMHGflags =
-LibFileflags = -c -l -o $@
-Squeezeflags = -o $@
-
-# change the line below to where _you_ want the library installed.
-libdest = lib:zlib
-
-# Final targets:
-@.lib:   @.o.adler32 @.o.compress @.o.crc32 @.o.deflate @.o.gzio \
-        @.o.infblock @.o.infcodes @.o.inffast @.o.inflate @.o.inftrees @.o.infutil @.o.trees \
-        @.o.uncompr @.o.zutil
-        LibFile $(LibFileflags) @.o.adler32 @.o.compress @.o.crc32 @.o.deflate \
-        @.o.gzio @.o.infblock @.o.infcodes @.o.inffast @.o.inflate @.o.inftrees @.o.infutil \
-        @.o.trees @.o.uncompr @.o.zutil
-test:   @.minigzip @.example @.lib
-	@copy @.lib @.libc  A~C~DF~L~N~P~Q~RS~TV
-	@echo running tests: hang on.
-	@/@.minigzip -f -9 libc
-	@/@.minigzip -d libc-gz
-	@/@.minigzip -f -1 libc
-	@/@.minigzip -d libc-gz
-	@/@.minigzip -h -9 libc
-	@/@.minigzip -d libc-gz
-	@/@.minigzip -h -1 libc
-	@/@.minigzip -d libc-gz
-	@/@.minigzip -9 libc
-	@/@.minigzip -d libc-gz
-	@/@.minigzip -1 libc
-	@/@.minigzip -d libc-gz
-	@diff @.lib @.libc
-	@echo that should have reported '@.lib and @.libc identical' if you have diff.
-	@/@.example @.fred @.fred
-	@echo that will have given lots of hello!'s.
-
-@.minigzip:   @.o.minigzip @.lib C:o.Stubs
-        Link $(Linkflags) @.o.minigzip @.lib C:o.Stubs
-@.example:   @.o.example @.lib C:o.Stubs
-        Link $(Linkflags) @.o.example @.lib C:o.Stubs
-
-install: @.lib
-	cdir $(libdest)
-	cdir $(libdest).h
-	@copy @.h.zlib $(libdest).h.zlib A~C~DF~L~N~P~Q~RS~TV
-	@copy @.h.zconf $(libdest).h.zconf A~C~DF~L~N~P~Q~RS~TV
-	@copy @.lib $(libdest).lib  A~C~DF~L~N~P~Q~RS~TV
-	@echo okay, installed zlib in $(libdest)
-
-clean:; remove @.minigzip
-	remove @.example
-	remove @.libc
-	-wipe @.o.* F~r~cV
-	remove @.fred
-
-# User-editable dependencies:
-.c.o:
-        cc $(ccflags) -o $@ $<
-
-# Static dependencies:
-
-# Dynamic dependencies:
-o.example:	c.example
-o.example:	h.zlib
-o.example:	h.zconf
-o.minigzip:	c.minigzip
-o.minigzip:	h.zlib
-o.minigzip:	h.zconf
-o.adler32:	c.adler32
-o.adler32:	h.zlib
-o.adler32:	h.zconf
-o.compress:	c.compress
-o.compress:	h.zlib
-o.compress:	h.zconf
-o.crc32:	c.crc32
-o.crc32:	h.zlib
-o.crc32:	h.zconf
-o.deflate:	c.deflate
-o.deflate:	h.deflate
-o.deflate:	h.zutil
-o.deflate:	h.zlib
-o.deflate:	h.zconf
-o.gzio:	c.gzio
-o.gzio:	h.zutil
-o.gzio:	h.zlib
-o.gzio:	h.zconf
-o.infblock:	c.infblock
-o.infblock:	h.zutil
-o.infblock:	h.zlib
-o.infblock:	h.zconf
-o.infblock:	h.infblock
-o.infblock:	h.inftrees
-o.infblock:	h.infcodes
-o.infblock:	h.infutil
-o.infcodes:	c.infcodes
-o.infcodes:	h.zutil
-o.infcodes:	h.zlib
-o.infcodes:	h.zconf
-o.infcodes:	h.inftrees
-o.infcodes:	h.infblock
-o.infcodes:	h.infcodes
-o.infcodes:	h.infutil
-o.infcodes:	h.inffast
-o.inffast:	c.inffast
-o.inffast:	h.zutil
-o.inffast:	h.zlib
-o.inffast:	h.zconf
-o.inffast:	h.inftrees
-o.inffast:	h.infblock
-o.inffast:	h.infcodes
-o.inffast:	h.infutil
-o.inffast:	h.inffast
-o.inflate:	c.inflate
-o.inflate:	h.zutil
-o.inflate:	h.zlib
-o.inflate:	h.zconf
-o.inflate:	h.infblock
-o.inftrees:	c.inftrees
-o.inftrees:	h.zutil
-o.inftrees:	h.zlib
-o.inftrees:	h.zconf
-o.inftrees:	h.inftrees
-o.inftrees:	h.inffixed
-o.infutil:	c.infutil
-o.infutil:	h.zutil
-o.infutil:	h.zlib
-o.infutil:	h.zconf
-o.infutil:	h.infblock
-o.infutil:	h.inftrees
-o.infutil:	h.infcodes
-o.infutil:	h.infutil
-o.trees:	c.trees
-o.trees:	h.deflate
-o.trees:	h.zutil
-o.trees:	h.zlib
-o.trees:	h.zconf
-o.trees:	h.trees
-o.uncompr:	c.uncompr
-o.uncompr:	h.zlib
-o.uncompr:	h.zconf
-o.zutil:	c.zutil
-o.zutil:	h.zutil
-o.zutil:	h.zlib
-o.zutil:	h.zconf
Index: trunk/minix/lib/zlib-1.2.3/old/README
===================================================================
--- trunk/minix/lib/zlib-1.2.3/old/README	(revision 9)
+++ 	(revision )
@@ -1,3 +1,0 @@
-This directory contains files that have not been updated for zlib 1.2.x
-
-(Volunteers are encouraged to help clean this up.  Thanks.)
Index: trunk/minix/lib/zlib-1.2.3/old/descrip.mms
===================================================================
--- trunk/minix/lib/zlib-1.2.3/old/descrip.mms	(revision 9)
+++ 	(revision )
@@ -1,48 +1,0 @@
-# descrip.mms: MMS description file for building zlib on VMS
-# written by Martin P.J. Zinser <m.zinser@gsi.de>
-
-cc_defs =
-c_deb =
-
-.ifdef __DECC__
-pref = /prefix=all
-.endif
-
-OBJS = adler32.obj, compress.obj, crc32.obj, gzio.obj, uncompr.obj,\
-       deflate.obj, trees.obj, zutil.obj, inflate.obj, infblock.obj,\
-       inftrees.obj, infcodes.obj, infutil.obj, inffast.obj
-
-CFLAGS= $(C_DEB) $(CC_DEFS) $(PREF)
-
-all : example.exe minigzip.exe
-        @ write sys$output " Example applications available"
-libz.olb : libz.olb($(OBJS))
-	@ write sys$output " libz available"
-
-example.exe : example.obj libz.olb
-              link example,libz.olb/lib
-
-minigzip.exe : minigzip.obj libz.olb
-              link minigzip,libz.olb/lib,x11vms:xvmsutils.olb/lib
-
-clean :
-	delete *.obj;*,libz.olb;*
-
-
-# Other dependencies.
-adler32.obj : zutil.h zlib.h zconf.h
-compress.obj : zlib.h zconf.h
-crc32.obj : zutil.h zlib.h zconf.h
-deflate.obj : deflate.h zutil.h zlib.h zconf.h
-example.obj : zlib.h zconf.h
-gzio.obj : zutil.h zlib.h zconf.h
-infblock.obj : zutil.h zlib.h zconf.h infblock.h inftrees.h infcodes.h infutil.h
-infcodes.obj : zutil.h zlib.h zconf.h inftrees.h infutil.h infcodes.h inffast.h
-inffast.obj : zutil.h zlib.h zconf.h inftrees.h infutil.h inffast.h
-inflate.obj : zutil.h zlib.h zconf.h infblock.h
-inftrees.obj : zutil.h zlib.h zconf.h inftrees.h
-infutil.obj : zutil.h zlib.h zconf.h inftrees.h infutil.h
-minigzip.obj : zlib.h zconf.h
-trees.obj : deflate.h zutil.h zlib.h zconf.h
-uncompr.obj : zlib.h zconf.h
-zutil.obj : zutil.h zlib.h zconf.h
Index: trunk/minix/lib/zlib-1.2.3/old/os2/Makefile.os2
===================================================================
--- trunk/minix/lib/zlib-1.2.3/old/os2/Makefile.os2	(revision 9)
+++ 	(revision )
@@ -1,136 +1,0 @@
-# Makefile for zlib under OS/2 using GCC (PGCC)
-# For conditions of distribution and use, see copyright notice in zlib.h
-
-# To compile and test, type:
-#   cp Makefile.os2 ..
-#   cd ..
-#   make -f Makefile.os2 test
-
-# This makefile will build a static library z.lib, a shared library
-# z.dll and a import library zdll.lib. You can use either z.lib or
-# zdll.lib by specifying either -lz or -lzdll on gcc's command line
-
-CC=gcc -Zomf -s
-
-CFLAGS=-O6 -Wall
-#CFLAGS=-O -DMAX_WBITS=14 -DMAX_MEM_LEVEL=7
-#CFLAGS=-g -DDEBUG
-#CFLAGS=-O3 -Wall -Wwrite-strings -Wpointer-arith -Wconversion \
-#           -Wstrict-prototypes -Wmissing-prototypes
-
-#################### BUG WARNING: #####################
-## infcodes.c hits a bug in pgcc-1.0, so you have to use either
-## -O# where # <= 4 or one of (-fno-ommit-frame-pointer or -fno-force-mem)
-## This bug is reportedly fixed in pgcc >1.0, but this was not tested
-CFLAGS+=-fno-force-mem
-
-LDFLAGS=-s -L. -lzdll -Zcrtdll
-LDSHARED=$(CC) -s -Zomf -Zdll -Zcrtdll
-
-VER=1.1.0
-ZLIB=z.lib
-SHAREDLIB=z.dll
-SHAREDLIBIMP=zdll.lib
-LIBS=$(ZLIB) $(SHAREDLIB) $(SHAREDLIBIMP)
-
-AR=emxomfar cr
-IMPLIB=emximp
-RANLIB=echo
-TAR=tar
-SHELL=bash
-
-prefix=/usr/local
-exec_prefix = $(prefix)
-
-OBJS = adler32.o compress.o crc32.o gzio.o uncompr.o deflate.o trees.o \
-       zutil.o inflate.o infblock.o inftrees.o infcodes.o infutil.o inffast.o
-
-TEST_OBJS = example.o minigzip.o
-
-DISTFILES = README INDEX ChangeLog configure Make*[a-z0-9] *.[ch] descrip.mms \
-  algorithm.txt zlib.3 msdos/Make*[a-z0-9] msdos/zlib.def msdos/zlib.rc \
-  nt/Makefile.nt nt/zlib.dnt  contrib/README.contrib contrib/*.txt \
-  contrib/asm386/*.asm contrib/asm386/*.c \
-  contrib/asm386/*.bat contrib/asm386/zlibvc.d?? contrib/iostream/*.cpp \
-  contrib/iostream/*.h  contrib/iostream2/*.h contrib/iostream2/*.cpp \
-  contrib/untgz/Makefile contrib/untgz/*.c contrib/untgz/*.w32
-
-all: example.exe minigzip.exe
-
-test: all
-	@LD_LIBRARY_PATH=.:$(LD_LIBRARY_PATH) ; export LD_LIBRARY_PATH; \
-	echo hello world | ./minigzip | ./minigzip -d || \
-	  echo '		*** minigzip test FAILED ***' ; \
-	if ./example; then \
-	  echo '		*** zlib test OK ***'; \
-	else \
-	  echo '		*** zlib test FAILED ***'; \
-	fi
-
-$(ZLIB): $(OBJS)
-	$(AR) $@ $(OBJS)
-	-@ ($(RANLIB) $@ || true) >/dev/null 2>&1
-
-$(SHAREDLIB): $(OBJS) os2/z.def
-	$(LDSHARED) -o $@ $^
-
-$(SHAREDLIBIMP): os2/z.def
-	$(IMPLIB) -o $@ $^
-
-example.exe: example.o $(LIBS)
-	$(CC) $(CFLAGS) -o $@ example.o $(LDFLAGS)
-
-minigzip.exe: minigzip.o $(LIBS)
-	$(CC) $(CFLAGS) -o $@ minigzip.o $(LDFLAGS)
-
-clean:
-	rm -f *.o *~ example minigzip libz.a libz.so* foo.gz
-
-distclean:	clean
-
-zip:
-	mv Makefile Makefile~; cp -p Makefile.in Makefile
-	rm -f test.c ztest*.c
-	v=`sed -n -e 's/\.//g' -e '/VERSION "/s/.*"\(.*\)".*/\1/p' < zlib.h`;\
-	zip -ul9 zlib$$v $(DISTFILES)
-	mv Makefile~ Makefile
-
-dist:
-	mv Makefile Makefile~; cp -p Makefile.in Makefile
-	rm -f test.c ztest*.c
-	d=zlib-`sed -n '/VERSION "/s/.*"\(.*\)".*/\1/p' < zlib.h`;\
-	rm -f $$d.tar.gz; \
-	if test ! -d ../$$d; then rm -f ../$$d; ln -s `pwd` ../$$d; fi; \
-	files=""; \
-	for f in $(DISTFILES); do files="$$files $$d/$$f"; done; \
-	cd ..; \
-	GZIP=-9 $(TAR) chofz $$d/$$d.tar.gz $$files; \
-	if test ! -d $$d; then rm -f $$d; fi
-	mv Makefile~ Makefile
-
-tags:
-	etags *.[ch]
-
-depend:
-	makedepend -- $(CFLAGS) -- *.[ch]
-
-# DO NOT DELETE THIS LINE -- make depend depends on it.
-
-adler32.o: zlib.h zconf.h
-compress.o: zlib.h zconf.h
-crc32.o: zlib.h zconf.h
-deflate.o: deflate.h zutil.h zlib.h zconf.h
-example.o: zlib.h zconf.h
-gzio.o: zutil.h zlib.h zconf.h
-infblock.o: infblock.h inftrees.h infcodes.h infutil.h zutil.h zlib.h zconf.h
-infcodes.o: zutil.h zlib.h zconf.h
-infcodes.o: inftrees.h infblock.h infcodes.h infutil.h inffast.h
-inffast.o: zutil.h zlib.h zconf.h inftrees.h
-inffast.o: infblock.h infcodes.h infutil.h inffast.h
-inflate.o: zutil.h zlib.h zconf.h infblock.h
-inftrees.o: zutil.h zlib.h zconf.h inftrees.h
-infutil.o: zutil.h zlib.h zconf.h infblock.h inftrees.h infcodes.h infutil.h
-minigzip.o: zlib.h zconf.h
-trees.o: deflate.h zutil.h zlib.h zconf.h trees.h
-uncompr.o: zlib.h zconf.h
-zutil.o: zutil.h zlib.h zconf.h
Index: trunk/minix/lib/zlib-1.2.3/old/os2/zlib.def
===================================================================
--- trunk/minix/lib/zlib-1.2.3/old/os2/zlib.def	(revision 9)
+++ 	(revision )
@@ -1,51 +1,0 @@
-;
-; Slightly modified version of ../nt/zlib.dnt :-)
-;
-
-LIBRARY		Z
-DESCRIPTION	"Zlib compression library for OS/2"
-CODE		PRELOAD MOVEABLE DISCARDABLE
-DATA		PRELOAD MOVEABLE MULTIPLE
-
-EXPORTS
-    adler32
-    compress
-    crc32
-    deflate
-    deflateCopy
-    deflateEnd
-    deflateInit2_
-    deflateInit_
-    deflateParams
-    deflateReset
-    deflateSetDictionary
-    gzclose
-    gzdopen
-    gzerror
-    gzflush
-    gzopen
-    gzread
-    gzwrite
-    inflate
-    inflateEnd
-    inflateInit2_
-    inflateInit_
-    inflateReset
-    inflateSetDictionary
-    inflateSync
-    uncompress
-    zlibVersion
-    gzprintf
-    gzputc
-    gzgetc
-    gzseek
-    gzrewind
-    gztell
-    gzeof
-    gzsetparams
-    zError
-    inflateSyncPoint
-    get_crc_table
-    compress2
-    gzputs
-    gzgets
Index: trunk/minix/lib/zlib-1.2.3/old/visual-basic.txt
===================================================================
--- trunk/minix/lib/zlib-1.2.3/old/visual-basic.txt	(revision 9)
+++ 	(revision )
@@ -1,160 +1,0 @@
-See below some functions declarations for Visual Basic.
-
-Frequently Asked Question:
-
-Q: Each time I use the compress function I get the -5 error (not enough
-   room in the output buffer).
-
-A: Make sure that the length of the compressed buffer is passed by
-   reference ("as any"), not by value ("as long"). Also check that
-   before the call of compress this length is equal to the total size of
-   the compressed buffer and not zero.
-
-
-From: "Jon Caruana" <jon-net@usa.net>
-Subject: Re: How to port zlib declares to vb?
-Date: Mon, 28 Oct 1996 18:33:03 -0600
-
-Got the answer! (I haven't had time to check this but it's what I got, and
-looks correct):
-
-He has the following routines working:
-        compress
-        uncompress
-        gzopen
-        gzwrite
-        gzread
-        gzclose
-
-Declares follow: (Quoted from Carlos Rios <c_rios@sonda.cl>, in Vb4 form)
-
-#If Win16 Then   'Use Win16 calls.
-Declare Function compress Lib "ZLIB.DLL" (ByVal compr As
-        String, comprLen As Any, ByVal buf As String, ByVal buflen
-        As Long) As Integer
-Declare Function uncompress Lib "ZLIB.DLL" (ByVal uncompr
-        As String, uncomprLen As Any, ByVal compr As String, ByVal
-        lcompr As Long) As Integer
-Declare Function gzopen Lib "ZLIB.DLL" (ByVal filePath As
-        String, ByVal mode As String) As Long
-Declare Function gzread Lib "ZLIB.DLL" (ByVal file As
-        Long, ByVal uncompr As String, ByVal uncomprLen As Integer)
-        As Integer
-Declare Function gzwrite Lib "ZLIB.DLL" (ByVal file As
-        Long, ByVal uncompr As String, ByVal uncomprLen As Integer)
-        As Integer
-Declare Function gzclose Lib "ZLIB.DLL" (ByVal file As
-        Long) As Integer
-#Else
-Declare Function compress Lib "ZLIB32.DLL"
-        (ByVal compr As String, comprLen As Any, ByVal buf As
-        String, ByVal buflen As Long) As Integer
-Declare Function uncompress Lib "ZLIB32.DLL"
-        (ByVal uncompr As String, uncomprLen As Any, ByVal compr As
-        String, ByVal lcompr As Long) As Long
-Declare Function gzopen Lib "ZLIB32.DLL"
-        (ByVal file As String, ByVal mode As String) As Long
-Declare Function gzread Lib "ZLIB32.DLL"
-        (ByVal file As Long, ByVal uncompr As String, ByVal
-        uncomprLen As Long) As Long
-Declare Function gzwrite Lib "ZLIB32.DLL"
-        (ByVal file As Long, ByVal uncompr As String, ByVal
-        uncomprLen As Long) As Long
-Declare Function gzclose Lib "ZLIB32.DLL"
-        (ByVal file As Long) As Long
-#End If
-
--Jon Caruana
-jon-net@usa.net
-Microsoft Sitebuilder Network Level 1 Member - HTML Writer's Guild Member
-
-
-Here is another example from Michael <michael_borgsys@hotmail.com> that he
-says conforms to the VB guidelines, and that solves the problem of not
-knowing the uncompressed size by storing it at the end of the file:
-
-'Calling the functions:
-'bracket meaning: <parameter> [optional] {Range of possible values}
-'Call subCompressFile(<path with filename to compress> [, <path with
-filename to write to>, [level of compression {1..9}]])
-'Call subUncompressFile(<path with filename to compress>)
-
-Option Explicit
-Private lngpvtPcnSml As Long 'Stores value for 'lngPercentSmaller'
-Private Const SUCCESS As Long = 0
-Private Const strFilExt As String = ".cpr"
-Private Declare Function lngfncCpr Lib "zlib.dll" Alias "compress2" (ByRef
-dest As Any, ByRef destLen As Any, ByRef src As Any, ByVal srcLen As Long,
-ByVal level As Integer) As Long
-Private Declare Function lngfncUcp Lib "zlib.dll" Alias "uncompress" (ByRef
-dest As Any, ByRef destLen As Any, ByRef src As Any, ByVal srcLen As Long)
-As Long
-
-Public Sub subCompressFile(ByVal strargOriFilPth As String, Optional ByVal
-strargCprFilPth As String, Optional ByVal intLvl As Integer = 9)
-    Dim strCprPth As String
-    Dim lngOriSiz As Long
-    Dim lngCprSiz As Long
-    Dim bytaryOri() As Byte
-    Dim bytaryCpr() As Byte
-    lngOriSiz = FileLen(strargOriFilPth)
-    ReDim bytaryOri(lngOriSiz - 1)
-    Open strargOriFilPth For Binary Access Read As #1
-        Get #1, , bytaryOri()
-    Close #1
-    strCprPth = IIf(strargCprFilPth = "", strargOriFilPth, strargCprFilPth)
-'Select file path and name
-    strCprPth = strCprPth & IIf(Right(strCprPth, Len(strFilExt)) =
-strFilExt, "", strFilExt) 'Add file extension if not exists
-    lngCprSiz = (lngOriSiz * 1.01) + 12 'Compression needs temporary a bit
-more space then original file size
-    ReDim bytaryCpr(lngCprSiz - 1)
-    If lngfncCpr(bytaryCpr(0), lngCprSiz, bytaryOri(0), lngOriSiz, intLvl) =
-SUCCESS Then
-        lngpvtPcnSml = (1# - (lngCprSiz / lngOriSiz)) * 100
-        ReDim Preserve bytaryCpr(lngCprSiz - 1)
-        Open strCprPth For Binary Access Write As #1
-            Put #1, , bytaryCpr()
-            Put #1, , lngOriSiz 'Add the the original size value to the end
-(last 4 bytes)
-        Close #1
-    Else
-        MsgBox "Compression error"
-    End If
-    Erase bytaryCpr
-    Erase bytaryOri
-End Sub
-
-Public Sub subUncompressFile(ByVal strargFilPth As String)
-    Dim bytaryCpr() As Byte
-    Dim bytaryOri() As Byte
-    Dim lngOriSiz As Long
-    Dim lngCprSiz As Long
-    Dim strOriPth As String
-    lngCprSiz = FileLen(strargFilPth)
-    ReDim bytaryCpr(lngCprSiz - 1)
-    Open strargFilPth For Binary Access Read As #1
-        Get #1, , bytaryCpr()
-    Close #1
-    'Read the original file size value:
-    lngOriSiz = bytaryCpr(lngCprSiz - 1) * (2 ^ 24) _
-              + bytaryCpr(lngCprSiz - 2) * (2 ^ 16) _
-              + bytaryCpr(lngCprSiz - 3) * (2 ^ 8) _
-              + bytaryCpr(lngCprSiz - 4)
-    ReDim Preserve bytaryCpr(lngCprSiz - 5) 'Cut of the original size value
-    ReDim bytaryOri(lngOriSiz - 1)
-    If lngfncUcp(bytaryOri(0), lngOriSiz, bytaryCpr(0), lngCprSiz) = SUCCESS
-Then
-        strOriPth = Left(strargFilPth, Len(strargFilPth) - Len(strFilExt))
-        Open strOriPth For Binary Access Write As #1
-            Put #1, , bytaryOri()
-        Close #1
-    Else
-        MsgBox "Uncompression error"
-    End If
-    Erase bytaryCpr
-    Erase bytaryOri
-End Sub
-Public Property Get lngPercentSmaller() As Long
-    lngPercentSmaller = lngpvtPcnSml
-End Property
Index: trunk/minix/lib/zlib-1.2.3/old/zlib.html
===================================================================
--- trunk/minix/lib/zlib-1.2.3/old/zlib.html	(revision 9)
+++ 	(revision )
@@ -1,971 +1,0 @@
-<html>
-<head>
- <title>
- zlib general purpose compression library version 1.1.4
- </title>
-</head>
-<body bgcolor="White" text="Black" vlink="Red" alink="Navy" link="Red">
-<!-- background="zlibbg.gif" -->
-
-<h1> zlib 1.1.4 Manual </h1>
-<hr>
-<a name="Contents"><h2>Contents</h2>
-<ol type="I">
-<li> <a href="#Prologue">Prologue</a>
-<li> <a href="#Introduction">Introduction</a>
-<li> <a href="#Utility functions">Utility functions</a>
-<li> <a href="#Basic functions">Basic functions</a>
-<li> <a href="#Advanced functions">Advanced functions</a>
-<li> <a href="#Constants">Constants</a>
-<li> <a href="#struct z_stream_s">struct z_stream_s</a>
-<li> <a href="#Checksum functions">Checksum functions</a>
-<li> <a href="#Misc">Misc</a>
-</ol>
-<hr>
-<a name="Prologue"><h2> Prologue </h2>
-  'zlib' general purpose compression library version 1.1.4, March 11th, 2002
-  <p>
-  Copyright (C) 1995-2002 Jean-loup Gailly and Mark Adler
-  <p>
-  This software is provided 'as-is', without any express or implied
-  warranty.  In no event will the authors be held liable for any damages
-  arising from the use of this software.
-  <p>
-  Permission is granted to anyone to use this software for any purpose,
-  including commercial applications, and to alter it and redistribute it
-  freely, subject to the following restrictions:
-  <ol>
-   <li> The origin of this software must not be misrepresented ; you must not
-     claim that you wrote the original software. If you use this software
-     in a product, an acknowledgment in the product documentation would be
-     appreciated but is not required.
-   <li> Altered source versions must be plainly marked as such, and must not be
-     misrepresented as being the original software.
-   <li> This notice may not be removed or altered from any source distribution.
-  </ol>
-
-  <dl>
-  <dt>Jean-loup Gailly
-  <dd><a href="mailto:jloup@gzip.org">jloup@gzip.org</a>
-  <dt>Mark Adler
-  <dd><a href="mailto:madler@alumni.caltech.edu">madler@alumni.caltech.edu</a>
-  </dl>
-
-  The data format used by the zlib library is described by RFCs (Request for
-  Comments) 1950 to 1952 in the files
-  <a href="ftp://ds.internic.net/rfc/rfc1950.txt">
-  ftp://ds.internic.net/rfc/rfc1950.txt </a>
-  (zlib format),
-  <a href="ftp://ds.internic.net/rfc/rfc1951.txt">
-  rfc1951.txt </a>
-  (<a href="#deflate">deflate</a> format) and
-  <a href="ftp://ds.internic.net/rfc/rfc1952.txt">
-  rfc1952.txt </a>
-  (gzip format).
-  <p>
-  This manual is converted from zlib.h by
-  <a href="mailto:piaip@csie.ntu.edu.tw"> piaip </a>
-  <p>
-  Visit <a href="http://ftp.cdrom.com/pub/infozip/zlib/">
-  http://ftp.cdrom.com/pub/infozip/zlib/</a>
-  for the official zlib web page.
-  <p>
-
-<hr>
-<a name="Introduction"><h2> Introduction </h2>
-     The 'zlib' compression library provides in-memory compression and
-  decompression functions, including integrity checks of the uncompressed
-  data.  This version of the library supports only one compression method
-  (deflation) but other algorithms will be added later and will have the same
-  stream interface.
-  <p>
-
-     Compression can be done in a single step if the buffers are large
-  enough (for example if an input file is mmap'ed), or can be done by
-  repeated calls of the compression function.  In the latter case, the
-  application must provide more input and/or consume the output
-  (providing more output space) before each call.
-  <p>
-
-     The library also supports reading and writing files in gzip (.gz) format
-  with an interface similar to that of stdio.
-  <p>
-
-     The library does not install any signal handler. The decoder checks
-  the consistency of the compressed data, so the library should never
-  crash even in case of corrupted input.
-  <p>
-
-<hr>
-<a name="Utility functions"><h2> Utility functions </h2>
-     The following utility functions are implemented on top of the
-   <a href="#Basic functions">basic stream-oriented functions</a>.
-   To simplify the interface, some
-   default options are assumed (compression level and memory usage,
-   standard memory allocation functions). The source code of these
-   utility functions can easily be modified if you need special options.
-<h3> Function list </h3>
-<ul>
-<li> int  <a href="#compress">compress</a> (Bytef *dest,   uLongf *destLen, const Bytef *source, uLong sourceLen);
-<li> int  <a href="#compress2">compress2</a> (Bytef *dest,   uLongf *destLen, const Bytef *source, uLong sourceLen, int level);
-<li> int  <a href="#uncompress">uncompress</a> (Bytef *dest,   uLongf *destLen, const Bytef *source, uLong sourceLen);
-<li> typedef voidp gzFile;
-<li>  gzFile  <a href="#gzopen">gzopen</a>  (const char *path, const char *mode);
-<li> gzFile  <a href="#gzdopen">gzdopen</a>  (int fd, const char *mode);
-<li> int  <a href="#gzsetparams">gzsetparams</a> (gzFile file, int level, int strategy);
-<li> int     <a href="#gzread">gzread</a>  (gzFile file, voidp buf, unsigned len);
-<li> int     <a href="#gzwrite">gzwrite</a> (gzFile file, const voidp buf, unsigned len);
-<li> int VA   <a href="#gzprintf">gzprintf</a> (gzFile file, const char *format, ...);
-<li> int  <a href="#gzputs">gzputs</a> (gzFile file, const char *s);
-<li> char *  <a href="#gzgets">gzgets</a> (gzFile file, char *buf, int len);
-<li> int     <a href="#gzputc">gzputc</a> (gzFile file, int c);
-<li> int     <a href="#gzgetc">gzgetc</a> (gzFile file);
-<li> int     <a href="#gzflush">gzflush</a> (gzFile file, int flush);
-<li> z_off_t     <a href="#gzseek">gzseek</a> (gzFile file, z_off_t offset, int whence);
-<li> z_off_t     <a href="#gztell">gztell</a> (gzFile file);
-<li> int     <a href="#gzrewind">gzrewind</a> (gzFile file);
-<li> int  <a href="#gzeof">gzeof</a> (gzFile file);
-<li> int     <a href="#gzclose">gzclose</a> (gzFile file);
-<li> const char *  <a href="#gzerror">gzerror</a> (gzFile file, int *errnum);
-</ul>
-<h3> Function description </h3>
-<dl>
-<font color="Blue"><dt> int  <a name="compress">compress</a> (Bytef *dest,   uLongf *destLen, const Bytef *source, uLong sourceLen);</font>
-<dd>
-     Compresses the source buffer into the destination buffer.  sourceLen is
-   the byte length of the source buffer. Upon entry, destLen is the total
-   size of the destination buffer, which must be at least 0.1% larger than
-   sourceLen plus 12 bytes. Upon exit, destLen is the actual size of the
-   compressed buffer.<p>
-     This function can be used to <a href="#compress">compress</a> a whole file at once if the
-   input file is mmap'ed.<p>
-     <a href="#compress">compress</a> returns <a href="#Z_OK">Z_OK</a> if success, <a href="#Z_MEM_ERROR">Z_MEM_ERROR</a> if there was not
-   enough memory, <a href="#Z_BUF_ERROR">Z_BUF_ERROR</a> if there was not enough room in the output
-   buffer.<p>
-
-<font color="Blue"><dt> int  <a name="compress2">compress2</a> (Bytef *dest,   uLongf *destLen, const Bytef *source, uLong sourceLen, int level);</font>
-<dd>
-     Compresses the source buffer into the destination buffer. The level
-   parameter has the same meaning as in <a href="#deflateInit">deflateInit</a>.  sourceLen is the byte
-   length of the source buffer. Upon entry, destLen is the total size of the
-   destination buffer, which must be at least 0.1% larger than sourceLen plus
-   12 bytes. Upon exit, destLen is the actual size of the compressed buffer.
-   <p>
-
-     <a href="#compress2">compress2</a> returns <a href="#Z_OK">Z_OK</a> if success, <a href="#Z_MEM_ERROR">Z_MEM_ERROR</a> if there was not enough
-   memory, <a href="#Z_BUF_ERROR">Z_BUF_ERROR</a> if there was not enough room in the output buffer,
-   <a href="#Z_STREAM_ERROR">Z_STREAM_ERROR</a> if the level parameter is invalid.
-   <p>
-
-<font color="Blue"><dt> int  <a name="uncompress">uncompress</a> (Bytef *dest,   uLongf *destLen, const Bytef *source, uLong sourceLen);</font>
-<dd>
-     Decompresses the source buffer into the destination buffer.  sourceLen is
-   the byte length of the source buffer. Upon entry, destLen is the total
-   size of the destination buffer, which must be large enough to hold the
-   entire uncompressed data. (The size of the uncompressed data must have
-   been saved previously by the compressor and transmitted to the decompressor
-   by some mechanism outside the scope of this compression library.)
-   Upon exit, destLen is the actual size of the compressed buffer. <p>
-     This function can be used to decompress a whole file at once if the
-   input file is mmap'ed.
-   <p>
-
-     <a href="#uncompress">uncompress</a> returns <a href="#Z_OK">Z_OK</a> if success, <a href="#Z_MEM_ERROR">Z_MEM_ERROR</a> if there was not
-   enough memory, <a href="#Z_BUF_ERROR">Z_BUF_ERROR</a> if there was not enough room in the output
-   buffer, or <a href="#Z_DATA_ERROR">Z_DATA_ERROR</a> if the input data was corrupted.
-   <p>
-
-<dt> typedef voidp gzFile;
-<dd> <p>
-
-<font color="Blue"><dt>  gzFile  <a name="gzopen">gzopen</a>  (const char *path, const char *mode);</font>
-<dd>
-     Opens a gzip (.gz) file for reading or writing. The mode parameter
-   is as in fopen ("rb" or "wb") but can also include a compression level
-   ("wb9") or a strategy: 'f' for filtered data as in "wb6f", 'h' for
-   Huffman only compression as in "wb1h". (See the description
-   of <a href="#deflateInit2">deflateInit2</a> for more information about the strategy parameter.)
-   <p>
-
-     <a href="#gzopen">gzopen</a> can be used to read a file which is not in gzip format ; in this
-   case <a href="#gzread">gzread</a> will directly read from the file without decompression.
-   <p>
-
-     <a href="#gzopen">gzopen</a> returns NULL if the file could not be opened or if there was
-   insufficient memory to allocate the (de)compression <a href="#state">state</a> ; errno
-   can be checked to distinguish the two cases (if errno is zero, the
-   zlib error is <a href="#Z_MEM_ERROR">Z_MEM_ERROR</a>).
-   <p>
-
-<font color="Blue"><dt> gzFile  <a name="gzdopen">gzdopen</a>  (int fd, const char *mode);</font>
-<dd>
-     <a href="#gzdopen">gzdopen</a>() associates a gzFile with the file descriptor fd.  File
-   descriptors are obtained from calls like open, dup, creat, pipe or
-   fileno (in the file has been previously opened with fopen).
-   The mode parameter is as in <a href="#gzopen">gzopen</a>.
-   <p>
-     The next call of <a href="#gzclose">gzclose</a> on the returned gzFile will also close the
-   file descriptor fd, just like fclose(fdopen(fd), mode) closes the file
-   descriptor fd. If you want to keep fd open, use <a href="#gzdopen">gzdopen</a>(dup(fd), mode).
-   <p>
-     <a href="#gzdopen">gzdopen</a> returns NULL if there was insufficient memory to allocate
-   the (de)compression <a href="#state">state</a>.
-   <p>
-
-<font color="Blue"><dt> int  <a name="gzsetparams">gzsetparams</a> (gzFile file, int level, int strategy);</font>
-<dd>
-     Dynamically update the compression level or strategy. See the description
-   of <a href="#deflateInit2">deflateInit2</a> for the meaning of these parameters.
-   <p>
-     <a href="#gzsetparams">gzsetparams</a> returns <a href="#Z_OK">Z_OK</a> if success, or <a href="#Z_STREAM_ERROR">Z_STREAM_ERROR</a> if the file was not
-   opened for writing.
-   <p>
-
-<font color="Blue"><dt> int     <a name="gzread">gzread</a>  (gzFile file, voidp buf, unsigned len);</font>
-<dd>
-     Reads the given number of uncompressed bytes from the compressed file.
-   If the input file was not in gzip format, <a href="#gzread">gzread</a> copies the given number
-   of bytes into the buffer.
-   <p>
-     <a href="#gzread">gzread</a> returns the number of uncompressed bytes actually read (0 for
-   end of file, -1 for error).
-   <p>
-
-<font color="Blue"><dt> int     <a name="gzwrite">gzwrite</a> (gzFile file, const voidp buf, unsigned len);</font>
-<dd>
-     Writes the given number of uncompressed bytes into the compressed file.
-   <a href="#gzwrite">gzwrite</a> returns the number of uncompressed bytes actually written
-   (0 in case of error).
-   <p>
-
-<font color="Blue"><dt> int VA   <a name="gzprintf">gzprintf</a> (gzFile file, const char *format, ...);</font>
-<dd>
-     Converts, formats, and writes the args to the compressed file under
-   control of the format string, as in fprintf. <a href="#gzprintf">gzprintf</a> returns the number of
-   uncompressed bytes actually written (0 in case of error).
-   <p>
-
-<font color="Blue"><dt> int  <a name="gzputs">gzputs</a> (gzFile file, const char *s);</font>
-<dd>
-      Writes the given null-terminated string to the compressed file, excluding
-   the terminating null character.
-   <p>
-      <a href="#gzputs">gzputs</a> returns the number of characters written, or -1 in case of error.
-      <p>
-
-<font color="Blue"><dt> char *  <a name="gzgets">gzgets</a> (gzFile file, char *buf, int len);</font>
-<dd>
-      Reads bytes from the compressed file until len-1 characters are read, or
-   a newline character is read and transferred to buf, or an end-of-file
-   condition is encountered.  The string is then terminated with a null
-   character.
-   <p>
-      <a href="#gzgets">gzgets</a> returns buf, or <a href="#Z_NULL">Z_NULL</a> in case of error.
-      <p>
-
-<font color="Blue"><dt> int     <a name="gzputc">gzputc</a> (gzFile file, int c);</font>
-<dd>
-      Writes c, converted to an unsigned char, into the compressed file.
-   <a href="#gzputc">gzputc</a> returns the value that was written, or -1 in case of error.
-   <p>
-
-<font color="Blue"><dt> int     <a name="gzgetc">gzgetc</a> (gzFile file);</font>
-<dd>
-      Reads one byte from the compressed file. <a href="#gzgetc">gzgetc</a> returns this byte
-   or -1 in case of end of file or error.
-   <p>
-
-<font color="Blue"><dt> int     <a name="gzflush">gzflush</a> (gzFile file, int flush);</font>
-<dd>
-     Flushes all pending output into the compressed file. The parameter
-   flush is as in the <a href="#deflate">deflate</a>() function. The return value is the zlib
-   error number (see function <a href="#gzerror">gzerror</a> below). <a href="#gzflush">gzflush</a> returns <a href="#Z_OK">Z_OK</a> if
-   the flush parameter is <a href="#Z_FINISH">Z_FINISH</a> and all output could be flushed.
-   <p>
-     <a href="#gzflush">gzflush</a> should be called only when strictly necessary because it can
-   degrade compression.
-   <p>
-
-<font color="Blue"><dt> z_off_t     <a name="gzseek">gzseek</a> (gzFile file, z_off_t offset, int whence);</font>
-<dd>
-      Sets the starting position for the next <a href="#gzread">gzread</a> or <a href="#gzwrite">gzwrite</a> on the
-   given compressed file. The offset represents a number of bytes in the
-   uncompressed data stream. The whence parameter is defined as in lseek(2);
-   the value SEEK_END is not supported.
-   <p>
-     If the file is opened for reading, this function is emulated but can be
-   extremely slow. If the file is opened for writing, only forward seeks are
-   supported ; <a href="#gzseek">gzseek</a> then compresses a sequence of zeroes up to the new
-   starting position.
-   <p>
-      <a href="#gzseek">gzseek</a> returns the resulting offset location as measured in bytes from
-   the beginning of the uncompressed stream, or -1 in case of error, in
-   particular if the file is opened for writing and the new starting position
-   would be before the current position.
-   <p>
-
-<font color="Blue"><dt> int     <a name="gzrewind">gzrewind</a> (gzFile file);</font>
-<dd>
-     Rewinds the given file. This function is supported only for reading.
-     <p>
-   <a href="#gzrewind">gzrewind</a>(file) is equivalent to (int)<a href="#gzseek">gzseek</a>(file, 0L, SEEK_SET)
-   <p>
-
-<font color="Blue"><dt> z_off_t     <a name="gztell">gztell</a> (gzFile file);</font>
-<dd>
-     Returns the starting position for the next <a href="#gzread">gzread</a> or <a href="#gzwrite">gzwrite</a> on the
-   given compressed file. This position represents a number of bytes in the
-   uncompressed data stream.
-   <p>
-
-   <a href="#gztell">gztell</a>(file) is equivalent to <a href="#gzseek">gzseek</a>(file, 0L, SEEK_CUR)
-   <p>
-
-<font color="Blue"><dt> int  <a name="gzeof">gzeof</a> (gzFile file);</font>
-<dd>
-     Returns 1 when EOF has previously been detected reading the given
-   input stream, otherwise zero.
-   <p>
-
-<font color="Blue"><dt> int     <a name="gzclose">gzclose</a> (gzFile file);</font>
-<dd>
-     Flushes all pending output if necessary, closes the compressed file
-   and deallocates all the (de)compression <a href="#state">state</a>. The return value is the zlib
-   error number (see function <a href="#gzerror">gzerror</a> below).
-   <p>
-
-<font color="Blue"><dt> const char *  <a name="gzerror">gzerror</a> (gzFile file, int *errnum);</font>
-<dd>
-     Returns the error message for the last error which occurred on the
-   given compressed file. errnum is set to zlib error number. If an
-   error occurred in the file system and not in the compression library,
-   errnum is set to <a href="#Z_ERRNO">Z_ERRNO</a> and the application may consult errno
-   to get the exact error code.
-   <p>
-</dl>
-<hr>
-<a name="Basic functions"><h2> Basic functions </h2>
-<h3> Function list </h3>
-<ul>
-<li>  const char *  <a href="#zlibVersion">zlibVersion</a> (void);
-<li>  int  <a href="#deflateInit">deflateInit</a> (<a href="#z_streamp">z_streamp</a> strm, int level);
-<li>  int  <a href="#deflate">deflate</a> (<a href="#z_streamp">z_streamp</a> strm, int flush);
-<li>  int  <a href="#deflateEnd">deflateEnd</a> (<a href="#z_streamp">z_streamp</a> strm);
-<li>  int  <a href="#inflateInit">inflateInit</a> (<a href="#z_streamp">z_streamp</a> strm);
-<li>  int  <a href="#inflate">inflate</a> (<a href="#z_streamp">z_streamp</a> strm, int flush);
-<li>  int  <a href="#inflateEnd">inflateEnd</a> (<a href="#z_streamp">z_streamp</a> strm);
-</ul>
-
-<h3> Function description </h3>
-<dl>
-<font color="Blue"><dt>  const char *  <a name="zlibVersion">zlibVersion</a> (void);</font>
-<dd> The application can compare <a href="#zlibVersion">zlibVersion</a> and ZLIB_VERSION for consistency.
-   If the first character differs, the library code actually used is
-   not compatible with the zlib.h header file used by the application.
-   This check is automatically made by <a href="#deflateInit">deflateInit</a> and <a href="#inflateInit">inflateInit</a>.
-   <p>
-
-<font color="Blue"><dt> int  <a name="deflateInit">deflateInit</a> (<a href="#z_streamp">z_streamp</a> strm, int level);</font>
-<dd>
-     Initializes the internal stream <a href="#state">state</a> for compression. The fields
-   <a href="#zalloc">zalloc</a>, <a href="#zfree">zfree</a> and <a href="#opaque">opaque</a> must be initialized before by the caller.
-   If <a href="#zalloc">zalloc</a> and <a href="#zfree">zfree</a> are set to <a href="#Z_NULL">Z_NULL</a>, <a href="#deflateInit">deflateInit</a> updates them to
-   use default allocation functions.
-   <p>
-
-     The compression level must be <a href="#Z_DEFAULT_COMPRESSION">Z_DEFAULT_COMPRESSION</a>, or between 0 and 9:
-   1 gives best speed, 9 gives best compression, 0 gives no compression at
-   all (the input data is simply copied a block at a time).
-   <p>
-
-   <a href="#Z_DEFAULT_COMPRESSION">Z_DEFAULT_COMPRESSION</a> requests a default compromise between speed and
-   compression (currently equivalent to level 6).
-   <p>
-
-     <a href="#deflateInit">deflateInit</a> returns <a href="#Z_OK">Z_OK</a> if success, <a href="#Z_MEM_ERROR">Z_MEM_ERROR</a> if there was not
-   enough memory, <a href="#Z_STREAM_ERROR">Z_STREAM_ERROR</a> if level is not a valid compression level,
-   <a href="#Z_VERSION_ERROR">Z_VERSION_ERROR</a> if the zlib library version (<a href="#zlib_version">zlib_version</a>) is incompatible
-   with the version assumed by the caller (ZLIB_VERSION).
-   <a href="#msg">msg</a> is set to null if there is no error message.  <a href="#deflateInit">deflateInit</a> does not
-   perform any compression: this will be done by <a href="#deflate">deflate</a>().
-   <p>
-
-<font color="Blue"><dt>  int  <a name="deflate">deflate</a> (<a href="#z_streamp">z_streamp</a> strm, int flush);</font>
-<dd>
-    <a href="#deflate">deflate</a> compresses as much data as possible, and stops when the input
-  buffer becomes empty or the output buffer becomes full. It may introduce some
-  output latency (reading input without producing any output) except when
-  forced to flush.<p>
-
-    The detailed semantics are as follows. <a href="#deflate">deflate</a> performs one or both of the
-  following actions:
-
-  <ul>
-  <li> Compress more input starting at <a href="#next_in">next_in</a> and update <a href="#next_in">next_in</a> and <a href="#avail_in">avail_in</a>
-    accordingly. If not all input can be processed (because there is not
-    enough room in the output buffer), <a href="#next_in">next_in</a> and <a href="#avail_in">avail_in</a> are updated and
-    processing will resume at this point for the next call of <a href="#deflate">deflate</a>().
-
-  <li>
-    Provide more output starting at <a href="#next_out">next_out</a> and update <a href="#next_out">next_out</a> and <a href="#avail_out">avail_out</a>
-    accordingly. This action is forced if the parameter flush is non zero.
-    Forcing flush frequently degrades the compression ratio, so this parameter
-    should be set only when necessary (in interactive applications).
-    Some output may be provided even if flush is not set.
-  </ul> <p>
-
-  Before the call of <a href="#deflate">deflate</a>(), the application should ensure that at least
-  one of the actions is possible, by providing more input and/or consuming
-  more output, and updating <a href="#avail_in">avail_in</a> or <a href="#avail_out">avail_out</a> accordingly ; <a href="#avail_out">avail_out</a>
-  should never be zero before the call. The application can consume the
-  compressed output when it wants, for example when the output buffer is full
-  (<a href="#avail_out">avail_out</a> == 0), or after each call of <a href="#deflate">deflate</a>(). If <a href="#deflate">deflate</a> returns <a href="#Z_OK">Z_OK</a>
-  and with zero <a href="#avail_out">avail_out</a>, it must be called again after making room in the
-  output buffer because there might be more output pending.
-  <p>
-
-    If the parameter flush is set to <a href="#Z_SYNC_FLUSH">Z_SYNC_FLUSH</a>, all pending output is
-  flushed to the output buffer and the output is aligned on a byte boundary, so
-  that the decompressor can get all input data available so far. (In particular
-  <a href="#avail_in">avail_in</a> is zero after the call if enough output space has been provided
-  before the call.)  Flushing may degrade compression for some compression
-  algorithms and so it should be used only when necessary.
-  <p>
-
-    If flush is set to <a href="#Z_FULL_FLUSH">Z_FULL_FLUSH</a>, all output is flushed as with
-  <a href="#Z_SYNC_FLUSH">Z_SYNC_FLUSH</a>, and the compression <a href="#state">state</a> is reset so that decompression can
-  restart from this point if previous compressed data has been damaged or if
-  random access is desired. Using <a href="#Z_FULL_FLUSH">Z_FULL_FLUSH</a> too often can seriously degrade
-  the compression.
-  <p>
-
-    If <a href="#deflate">deflate</a> returns with <a href="#avail_out">avail_out</a> == 0, this function must be called again
-  with the same value of the flush parameter and more output space (updated
-  <a href="#avail_out">avail_out</a>), until the flush is complete (<a href="#deflate">deflate</a> returns with non-zero
-  <a href="#avail_out">avail_out</a>).
-  <p>
-
-    If the parameter flush is set to <a href="#Z_FINISH">Z_FINISH</a>, pending input is processed,
-  pending output is flushed and <a href="#deflate">deflate</a> returns with <a href="#Z_STREAM_END">Z_STREAM_END</a> if there
-  was enough output space ; if <a href="#deflate">deflate</a> returns with <a href="#Z_OK">Z_OK</a>, this function must be
-  called again with <a href="#Z_FINISH">Z_FINISH</a> and more output space (updated <a href="#avail_out">avail_out</a>) but no
-  more input data, until it returns with <a href="#Z_STREAM_END">Z_STREAM_END</a> or an error. After
-  <a href="#deflate">deflate</a> has returned <a href="#Z_STREAM_END">Z_STREAM_END</a>, the only possible operations on the
-  stream are <a href="#deflateReset">deflateReset</a> or <a href="#deflateEnd">deflateEnd</a>.
-  <p>
-
-    <a href="#Z_FINISH">Z_FINISH</a> can be used immediately after <a href="#deflateInit">deflateInit</a> if all the compression
-  is to be done in a single step. In this case, <a href="#avail_out">avail_out</a> must be at least
-  0.1% larger than <a href="#avail_in">avail_in</a> plus 12 bytes.  If <a href="#deflate">deflate</a> does not return
-  <a href="#Z_STREAM_END">Z_STREAM_END</a>, then it must be called again as described above.
-  <p>
-
-    <a href="#deflate">deflate</a>() sets strm-&gt <a href="#adler">adler</a> to the <a href="#adler32">adler32</a> checksum of all input read
-  so far (that is, <a href="#total_in">total_in</a> bytes).
-  <p>
-
-    <a href="#deflate">deflate</a>() may update <a href="#data_type">data_type</a> if it can make a good guess about
-  the input data type (<a href="#Z_ASCII">Z_ASCII</a> or <a href="#Z_BINARY">Z_BINARY</a>). In doubt, the data is considered
-  binary. This field is only for information purposes and does not affect
-  the compression algorithm in any manner.
-  <p>
-
-    <a href="#deflate">deflate</a>() returns <a href="#Z_OK">Z_OK</a> if some progress has been made (more input
-  processed or more output produced), <a href="#Z_STREAM_END">Z_STREAM_END</a> if all input has been
-  consumed and all output has been produced (only when flush is set to
-  <a href="#Z_FINISH">Z_FINISH</a>), <a href="#Z_STREAM_ERROR">Z_STREAM_ERROR</a> if the stream <a href="#state">state</a> was inconsistent (for example
-  if <a href="#next_in">next_in</a> or <a href="#next_out">next_out</a> was NULL), <a href="#Z_BUF_ERROR">Z_BUF_ERROR</a> if no progress is possible
-  (for example <a href="#avail_in">avail_in</a> or <a href="#avail_out">avail_out</a> was zero).
-  <p>
-
-<font color="Blue"><dt>  int  <a name="deflateEnd">deflateEnd</a> (<a href="#z_streamp">z_streamp</a> strm);</font>
-<dd>
-     All dynamically allocated data structures for this stream are freed.
-   This function discards any unprocessed input and does not flush any
-   pending output.
-   <p>
-
-     <a href="#deflateEnd">deflateEnd</a> returns <a href="#Z_OK">Z_OK</a> if success, <a href="#Z_STREAM_ERROR">Z_STREAM_ERROR</a> if the
-   stream <a href="#state">state</a> was inconsistent, <a href="#Z_DATA_ERROR">Z_DATA_ERROR</a> if the stream was freed
-   prematurely (some input or output was discarded). In the error case,
-   <a href="#msg">msg</a> may be set but then points to a static string (which must not be
-   deallocated).
-   <p>
-
-<font color="Blue"><dt>  int  <a name="inflateInit">inflateInit</a> (<a href="#z_streamp">z_streamp</a> strm);</font>
-<dd>
-	Initializes the internal stream <a href="#state">state</a> for decompression. The fields
-   <a href="#next_in">next_in</a>, <a href="#avail_in">avail_in</a>, <a href="#zalloc">zalloc</a>, <a href="#zfree">zfree</a> and <a href="#opaque">opaque</a> must be initialized before by
-   the caller. If <a href="#next_in">next_in</a> is not <a href="#Z_NULL">Z_NULL</a> and <a href="#avail_in">avail_in</a> is large enough (the exact
-   value depends on the compression method), <a href="#inflateInit">inflateInit</a> determines the
-   compression method from the zlib header and allocates all data structures
-   accordingly ; otherwise the allocation will be deferred to the first call of
-   <a href="#inflate">inflate</a>.  If <a href="#zalloc">zalloc</a> and <a href="#zfree">zfree</a> are set to <a href="#Z_NULL">Z_NULL</a>, <a href="#inflateInit">inflateInit</a> updates them to
-   use default allocation functions.
-   <p>
-
-     <a href="#inflateInit">inflateInit</a> returns <a href="#Z_OK">Z_OK</a> if success, <a href="#Z_MEM_ERROR">Z_MEM_ERROR</a> if there was not enough
-   memory, <a href="#Z_VERSION_ERROR">Z_VERSION_ERROR</a> if the zlib library version is incompatible with the
-   version assumed by the caller.  <a href="#msg">msg</a> is set to null if there is no error
-   message. <a href="#inflateInit">inflateInit</a> does not perform any decompression apart from reading
-   the zlib header if present: this will be done by <a href="#inflate">inflate</a>().  (So <a href="#next_in">next_in</a> and
-   <a href="#avail_in">avail_in</a> may be modified, but <a href="#next_out">next_out</a> and <a href="#avail_out">avail_out</a> are unchanged.)
-   <p>
-
-<font color="Blue"><dt>  int  <a name="inflate">inflate</a> (<a href="#z_streamp">z_streamp</a> strm, int flush);</font>
-<dd>
-    <a href="#inflate">inflate</a> decompresses as much data as possible, and stops when the input
-  buffer becomes empty or the output buffer becomes full. It may some
-  introduce some output latency (reading input without producing any output)
-  except when forced to flush.
-  <p>
-
-  The detailed semantics are as follows. <a href="#inflate">inflate</a> performs one or both of the
-  following actions:
-
-  <ul>
-  <li> Decompress more input starting at <a href="#next_in">next_in</a> and update <a href="#next_in">next_in</a> and <a href="#avail_in">avail_in</a>
-    accordingly. If not all input can be processed (because there is not
-    enough room in the output buffer), <a href="#next_in">next_in</a> is updated and processing
-    will resume at this point for the next call of <a href="#inflate">inflate</a>().
-
-  <li> Provide more output starting at <a href="#next_out">next_out</a> and update <a href="#next_out">next_out</a> and
-    <a href="#avail_out">avail_out</a> accordingly.  <a href="#inflate">inflate</a>() provides as much output as possible,
-    until there is no more input data or no more space in the output buffer
-    (see below about the flush parameter).
-  </ul> <p>
-
-  Before the call of <a href="#inflate">inflate</a>(), the application should ensure that at least
-  one of the actions is possible, by providing more input and/or consuming
-  more output, and updating the next_* and avail_* values accordingly.
-  The application can consume the uncompressed output when it wants, for
-  example when the output buffer is full (<a href="#avail_out">avail_out</a> == 0), or after each
-  call of <a href="#inflate">inflate</a>(). If <a href="#inflate">inflate</a> returns <a href="#Z_OK">Z_OK</a> and with zero <a href="#avail_out">avail_out</a>, it
-  must be called again after making room in the output buffer because there
-  might be more output pending.
-  <p>
-
-    If the parameter flush is set to <a href="#Z_SYNC_FLUSH">Z_SYNC_FLUSH</a>, <a href="#inflate">inflate</a> flushes as much
-  output as possible to the output buffer. The flushing behavior of <a href="#inflate">inflate</a> is
-  not specified for values of the flush parameter other than <a href="#Z_SYNC_FLUSH">Z_SYNC_FLUSH</a>
-  and <a href="#Z_FINISH">Z_FINISH</a>, but the current implementation actually flushes as much output
-  as possible anyway.
-  <p>
-
-    <a href="#inflate">inflate</a>() should normally be called until it returns <a href="#Z_STREAM_END">Z_STREAM_END</a> or an
-  error. However if all decompression is to be performed in a single step
-  (a single call of <a href="#inflate">inflate</a>), the parameter flush should be set to
-  <a href="#Z_FINISH">Z_FINISH</a>. In this case all pending input is processed and all pending
-  output is flushed ; <a href="#avail_out">avail_out</a> must be large enough to hold all the
-  uncompressed data. (The size of the uncompressed data may have been saved
-  by the compressor for this purpose.) The next operation on this stream must
-  be <a href="#inflateEnd">inflateEnd</a> to deallocate the decompression <a href="#state">state</a>. The use of <a href="#Z_FINISH">Z_FINISH</a>
-  is never required, but can be used to inform <a href="#inflate">inflate</a> that a faster routine
-  may be used for the single <a href="#inflate">inflate</a>() call.
-  <p>
-
-     If a preset dictionary is needed at this point (see <a href="#inflateSetDictionary">inflateSetDictionary</a>
-  below), <a href="#inflate">inflate</a> sets strm-<a href="#adler">adler</a> to the <a href="#adler32">adler32</a> checksum of the
-  dictionary chosen by the compressor and returns <a href="#Z_NEED_DICT">Z_NEED_DICT</a> ; otherwise
-  it sets strm-&gt <a href="#adler">adler</a> to the <a href="#adler32">adler32</a> checksum of all output produced
-  so far (that is, <a href="#total_out">total_out</a> bytes) and returns <a href="#Z_OK">Z_OK</a>, <a href="#Z_STREAM_END">Z_STREAM_END</a> or
-  an error code as described below. At the end of the stream, <a href="#inflate">inflate</a>()
-  checks that its computed <a href="#adler32">adler32</a> checksum is equal to that saved by the
-  compressor and returns <a href="#Z_STREAM_END">Z_STREAM_END</a> only if the checksum is correct.
-  <p>
-
-    <a href="#inflate">inflate</a>() returns <a href="#Z_OK">Z_OK</a> if some progress has been made (more input processed
-  or more output produced), <a href="#Z_STREAM_END">Z_STREAM_END</a> if the end of the compressed data has
-  been reached and all uncompressed output has been produced, <a href="#Z_NEED_DICT">Z_NEED_DICT</a> if a
-  preset dictionary is needed at this point, <a href="#Z_DATA_ERROR">Z_DATA_ERROR</a> if the input data was
-  corrupted (input stream not conforming to the zlib format or incorrect
-  <a href="#adler32">adler32</a> checksum), <a href="#Z_STREAM_ERROR">Z_STREAM_ERROR</a> if the stream structure was inconsistent
-  (for example if <a href="#next_in">next_in</a> or <a href="#next_out">next_out</a> was NULL), <a href="#Z_MEM_ERROR">Z_MEM_ERROR</a> if there was not
-  enough memory, <a href="#Z_BUF_ERROR">Z_BUF_ERROR</a> if no progress is possible or if there was not
-  enough room in the output buffer when <a href="#Z_FINISH">Z_FINISH</a> is used. In the <a href="#Z_DATA_ERROR">Z_DATA_ERROR</a>
-  case, the application may then call <a href="#inflateSync">inflateSync</a> to look for a good
-  compression block.
-  <p>
-
-<font color="Blue"><dt>  int  <a name="inflateEnd">inflateEnd</a> (<a href="#z_streamp">z_streamp</a> strm);</font>
-<dd>
-     All dynamically allocated data structures for this stream are freed.
-   This function discards any unprocessed input and does not flush any
-   pending output.
-   <p>
-
-     <a href="#inflateEnd">inflateEnd</a> returns <a href="#Z_OK">Z_OK</a> if success, <a href="#Z_STREAM_ERROR">Z_STREAM_ERROR</a> if the stream <a href="#state">state</a>
-   was inconsistent. In the error case, <a href="#msg">msg</a> may be set but then points to a
-   static string (which must not be deallocated).
-</dl>
-<hr>
-<a name="Advanced functions"><h2> Advanced functions </h2>
-    The following functions are needed only in some special applications.
-<h3> Function list </h3>
-<ul>
-<li>  int  <a href="#deflateInit2">deflateInit2</a> (<a href="#z_streamp">z_streamp</a> strm,
-<li> int  <a href="#deflateSetDictionary">deflateSetDictionary</a> (<a href="#z_streamp">z_streamp</a> strm, const Bytef *dictionary, uInt  dictLength);
-<li> int  <a href="#deflateCopy">deflateCopy</a> (<a href="#z_streamp">z_streamp</a> dest, <a href="#z_streamp">z_streamp</a> source);
-<li> int  <a href="#deflateReset">deflateReset</a> (<a href="#z_streamp">z_streamp</a> strm);
-<li> int  <a href="#deflateParams">deflateParams</a> (<a href="#z_streamp">z_streamp</a> strm, int level, int strategy);
-<li> int  <a href="#inflateInit2">inflateInit2</a> (<a href="#z_streamp">z_streamp</a> strm, int  windowBits);
-<li>  int  <a href="#inflateSetDictionary">inflateSetDictionary</a> (<a href="#z_streamp">z_streamp</a> strm, const Bytef *dictionary, uInt  dictLength);
-<li> int  <a href="#inflateSync">inflateSync</a> (<a href="#z_streamp">z_streamp</a> strm);
-<li> int  <a href="#inflateReset">inflateReset</a> (<a href="#z_streamp">z_streamp</a> strm);
-
-</ul>
-<h3> Function description </h3>
-<dl>
-<font color="Blue"><dt>  int  <a name="deflateInit2">deflateInit2</a> (<a href="#z_streamp">z_streamp</a> strm, int  level, int  method, int  windowBits, int  memLevel, int  strategy);</font>
-
-<dd> This is another version of <a href="#deflateInit">deflateInit</a> with more compression options. The
-   fields <a href="#next_in">next_in</a>, <a href="#zalloc">zalloc</a>, <a href="#zfree">zfree</a> and <a href="#opaque">opaque</a> must be initialized before by
-   the caller.<p>
-
-     The method parameter is the compression method. It must be <a href="#Z_DEFLATED">Z_DEFLATED</a> in
-   this version of the library.<p>
-
-     The windowBits parameter is the base two logarithm of the window size
-   (the size of the history buffer).  It should be in the range 8..15 for this
-   version of the library. Larger values of this parameter result in better
-   compression at the expense of memory usage. The default value is 15 if
-   <a href="#deflateInit">deflateInit</a> is used instead.<p>
-
-     The memLevel parameter specifies how much memory should be allocated
-   for the internal compression <a href="#state">state</a>. memLevel=1 uses minimum memory but
-   is slow and reduces compression ratio ; memLevel=9 uses maximum memory
-   for optimal speed. The default value is 8. See zconf.h for total memory
-   usage as a function of windowBits and memLevel.<p>
-
-     The strategy parameter is used to tune the compression algorithm. Use the
-   value <a href="#Z_DEFAULT_STRATEGY">Z_DEFAULT_STRATEGY</a> for normal data, <a href="#Z_FILTERED">Z_FILTERED</a> for data produced by a
-   filter (or predictor), or <a href="#Z_HUFFMAN_ONLY">Z_HUFFMAN_ONLY</a> to force Huffman encoding only (no
-   string match).  Filtered data consists mostly of small values with a
-   somewhat random distribution. In this case, the compression algorithm is
-   tuned to <a href="#compress">compress</a> them better. The effect of <a href="#Z_FILTERED">Z_FILTERED</a> is to force more
-   Huffman coding and less string matching ; it is somewhat intermediate
-   between Z_DEFAULT and <a href="#Z_HUFFMAN_ONLY">Z_HUFFMAN_ONLY</a>. The strategy parameter only affects
-   the compression ratio but not the correctness of the compressed output even
-   if it is not set appropriately.<p>
-
-      <a href="#deflateInit2">deflateInit2</a> returns <a href="#Z_OK">Z_OK</a> if success, <a href="#Z_MEM_ERROR">Z_MEM_ERROR</a> if there was not enough
-   memory, <a href="#Z_STREAM_ERROR">Z_STREAM_ERROR</a> if a parameter is invalid (such as an invalid
-   method). <a href="#msg">msg</a> is set to null if there is no error message.  <a href="#deflateInit2">deflateInit2</a> does
-   not perform any compression: this will be done by <a href="#deflate">deflate</a>().<p>
-
-<font color="Blue"><dt> int  <a name="deflateSetDictionary">deflateSetDictionary</a> (<a href="#z_streamp">z_streamp</a> strm, const Bytef *dictionary, uInt  dictLength);</font>
-<dd>
-     Initializes the compression dictionary from the given byte sequence
-   without producing any compressed output. This function must be called
-   immediately after <a href="#deflateInit">deflateInit</a>, <a href="#deflateInit2">deflateInit2</a> or <a href="#deflateReset">deflateReset</a>, before any
-   call of <a href="#deflate">deflate</a>. The compressor and decompressor must use exactly the same
-   dictionary (see <a href="#inflateSetDictionary">inflateSetDictionary</a>).<p>
-
-     The dictionary should consist of strings (byte sequences) that are likely
-   to be encountered later in the data to be compressed, with the most commonly
-   used strings preferably put towards the end of the dictionary. Using a
-   dictionary is most useful when the data to be compressed is short and can be
-   predicted with good accuracy ; the data can then be compressed better than
-   with the default empty dictionary.<p>
-
-     Depending on the size of the compression data structures selected by
-   <a href="#deflateInit">deflateInit</a> or <a href="#deflateInit2">deflateInit2</a>, a part of the dictionary may in effect be
-   discarded, for example if the dictionary is larger than the window size in
-   <a href="#deflate">deflate</a> or deflate2. Thus the strings most likely to be useful should be
-   put at the end of the dictionary, not at the front.<p>
-
-     Upon return of this function, strm-&gt <a href="#adler">adler</a> is set to the Adler32 value
-   of the dictionary ; the decompressor may later use this value to determine
-   which dictionary has been used by the compressor. (The Adler32 value
-   applies to the whole dictionary even if only a subset of the dictionary is
-   actually used by the compressor.)<p>
-
-     <a href="#deflateSetDictionary">deflateSetDictionary</a> returns <a href="#Z_OK">Z_OK</a> if success, or <a href="#Z_STREAM_ERROR">Z_STREAM_ERROR</a> if a
-   parameter is invalid (such as NULL dictionary) or the stream <a href="#state">state</a> is
-   inconsistent (for example if <a href="#deflate">deflate</a> has already been called for this stream
-   or if the compression method is bsort). <a href="#deflateSetDictionary">deflateSetDictionary</a> does not
-   perform any compression: this will be done by <a href="#deflate">deflate</a>().<p>
-
-<font color="Blue"><dt> int  <a name="deflateCopy">deflateCopy</a> (<a href="#z_streamp">z_streamp</a> dest, <a href="#z_streamp">z_streamp</a> source);</font>
-<dd>
-     Sets the destination stream as a complete copy of the source stream.<p>
-
-     This function can be useful when several compression strategies will be
-   tried, for example when there are several ways of pre-processing the input
-   data with a filter. The streams that will be discarded should then be freed
-   by calling <a href="#deflateEnd">deflateEnd</a>.  Note that <a href="#deflateCopy">deflateCopy</a> duplicates the internal
-   compression <a href="#state">state</a> which can be quite large, so this strategy is slow and
-   can consume lots of memory.<p>
-
-     <a href="#deflateCopy">deflateCopy</a> returns <a href="#Z_OK">Z_OK</a> if success, <a href="#Z_MEM_ERROR">Z_MEM_ERROR</a> if there was not
-   enough memory, <a href="#Z_STREAM_ERROR">Z_STREAM_ERROR</a> if the source stream <a href="#state">state</a> was inconsistent
-   (such as <a href="#zalloc">zalloc</a> being NULL). <a href="#msg">msg</a> is left unchanged in both source and
-   destination.<p>
-
-<font color="Blue"><dt> int  <a name="deflateReset">deflateReset</a> (<a href="#z_streamp">z_streamp</a> strm);</font>
-<dd>     This function is equivalent to <a href="#deflateEnd">deflateEnd</a> followed by <a href="#deflateInit">deflateInit</a>,
-   but does not free and reallocate all the internal compression <a href="#state">state</a>.
-   The stream will keep the same compression level and any other attributes
-   that may have been set by <a href="#deflateInit2">deflateInit2</a>.<p>
-
-      <a href="#deflateReset">deflateReset</a> returns <a href="#Z_OK">Z_OK</a> if success, or <a href="#Z_STREAM_ERROR">Z_STREAM_ERROR</a> if the source
-   stream <a href="#state">state</a> was inconsistent (such as <a href="#zalloc">zalloc</a> or <a href="#state">state</a> being NULL).<p>
-
-<font color="Blue"><dt> int  <a name="deflateParams">deflateParams</a> (<a href="#z_streamp">z_streamp</a> strm, int level, int strategy);</font>
-<dd>
-     Dynamically update the compression level and compression strategy.  The
-   interpretation of level and strategy is as in <a href="#deflateInit2">deflateInit2</a>.  This can be
-   used to switch between compression and straight copy of the input data, or
-   to switch to a different kind of input data requiring a different
-   strategy. If the compression level is changed, the input available so far
-   is compressed with the old level (and may be flushed); the new level will
-   take effect only at the next call of <a href="#deflate">deflate</a>().<p>
-
-     Before the call of <a href="#deflateParams">deflateParams</a>, the stream <a href="#state">state</a> must be set as for
-   a call of <a href="#deflate">deflate</a>(), since the currently available input may have to
-   be compressed and flushed. In particular, strm-&gt <a href="#avail_out">avail_out</a> must be
-   non-zero.<p>
-
-     <a href="#deflateParams">deflateParams</a> returns <a href="#Z_OK">Z_OK</a> if success, <a href="#Z_STREAM_ERROR">Z_STREAM_ERROR</a> if the source
-   stream <a href="#state">state</a> was inconsistent or if a parameter was invalid, <a href="#Z_BUF_ERROR">Z_BUF_ERROR</a>
-   if strm-&gtavail_out was zero.<p>
-
-<font color="Blue"><dt> int  <a name="inflateInit2">inflateInit2</a> (<a href="#z_streamp">z_streamp</a> strm, int  windowBits);</font>
-
-<dd>     This is another version of <a href="#inflateInit">inflateInit</a> with an extra parameter. The
-   fields <a href="#next_in">next_in</a>, <a href="#avail_in">avail_in</a>, <a href="#zalloc">zalloc</a>, <a href="#zfree">zfree</a> and <a href="#opaque">opaque</a> must be initialized
-   before by the caller.<p>
-
-     The windowBits parameter is the base two logarithm of the maximum window
-   size (the size of the history buffer).  It should be in the range 8..15 for
-   this version of the library. The default value is 15 if <a href="#inflateInit">inflateInit</a> is used
-   instead. If a compressed stream with a larger window size is given as
-   input, <a href="#inflate">inflate</a>() will return with the error code <a href="#Z_DATA_ERROR">Z_DATA_ERROR</a> instead of
-   trying to allocate a larger window.<p>
-
-      <a href="#inflateInit2">inflateInit2</a> returns <a href="#Z_OK">Z_OK</a> if success, <a href="#Z_MEM_ERROR">Z_MEM_ERROR</a> if there was not enough
-   memory, <a href="#Z_STREAM_ERROR">Z_STREAM_ERROR</a> if a parameter is invalid (such as a negative
-   memLevel). <a href="#msg">msg</a> is set to null if there is no error message.  <a href="#inflateInit2">inflateInit2</a>
-   does not perform any decompression apart from reading the zlib header if
-   present: this will be done by <a href="#inflate">inflate</a>(). (So <a href="#next_in">next_in</a> and <a href="#avail_in">avail_in</a> may be
-   modified, but <a href="#next_out">next_out</a> and <a href="#avail_out">avail_out</a> are unchanged.)<p>
-
-<font color="Blue"><dt>  int  <a name="inflateSetDictionary">inflateSetDictionary</a> (<a href="#z_streamp">z_streamp</a> strm, const Bytef *dictionary, uInt  dictLength);</font>
-<dd>
-     Initializes the decompression dictionary from the given uncompressed byte
-   sequence. This function must be called immediately after a call of <a href="#inflate">inflate</a>
-   if this call returned <a href="#Z_NEED_DICT">Z_NEED_DICT</a>. The dictionary chosen by the compressor
-   can be determined from the Adler32 value returned by this call of
-   <a href="#inflate">inflate</a>. The compressor and decompressor must use exactly the same
-   dictionary (see <a href="#deflateSetDictionary">deflateSetDictionary</a>).<p>
-
-     <a href="#inflateSetDictionary">inflateSetDictionary</a> returns <a href="#Z_OK">Z_OK</a> if success, <a href="#Z_STREAM_ERROR">Z_STREAM_ERROR</a> if a
-   parameter is invalid (such as NULL dictionary) or the stream <a href="#state">state</a> is
-   inconsistent, <a href="#Z_DATA_ERROR">Z_DATA_ERROR</a> if the given dictionary doesn't match the
-   expected one (incorrect Adler32 value). <a href="#inflateSetDictionary">inflateSetDictionary</a> does not
-   perform any decompression: this will be done by subsequent calls of
-   <a href="#inflate">inflate</a>().<p>
-
-<font color="Blue"><dt> int  <a name="inflateSync">inflateSync</a> (<a href="#z_streamp">z_streamp</a> strm);</font>
-
-<dd>    Skips invalid compressed data until a full flush point (see above the
-  description of <a href="#deflate">deflate</a> with <a href="#Z_FULL_FLUSH">Z_FULL_FLUSH</a>) can be found, or until all
-  available input is skipped. No output is provided.<p>
-
-    <a href="#inflateSync">inflateSync</a> returns <a href="#Z_OK">Z_OK</a> if a full flush point has been found, <a href="#Z_BUF_ERROR">Z_BUF_ERROR</a>
-  if no more input was provided, <a href="#Z_DATA_ERROR">Z_DATA_ERROR</a> if no flush point has been found,
-  or <a href="#Z_STREAM_ERROR">Z_STREAM_ERROR</a> if the stream structure was inconsistent. In the success
-  case, the application may save the current current value of <a href="#total_in">total_in</a> which
-  indicates where valid compressed data was found. In the error case, the
-  application may repeatedly call <a href="#inflateSync">inflateSync</a>, providing more input each time,
-  until success or end of the input data.<p>
-
-<font color="Blue"><dt> int  <a name="inflateReset">inflateReset</a> (<a href="#z_streamp">z_streamp</a> strm);</font>
-<dd>
-     This function is equivalent to <a href="#inflateEnd">inflateEnd</a> followed by <a href="#inflateInit">inflateInit</a>,
-   but does not free and reallocate all the internal decompression <a href="#state">state</a>.
-   The stream will keep attributes that may have been set by <a href="#inflateInit2">inflateInit2</a>.
-   <p>
-
-      <a href="#inflateReset">inflateReset</a> returns <a href="#Z_OK">Z_OK</a> if success, or <a href="#Z_STREAM_ERROR">Z_STREAM_ERROR</a> if the source
-   stream <a href="#state">state</a> was inconsistent (such as <a href="#zalloc">zalloc</a> or <a href="#state">state</a> being NULL).
-   <p>
-</dl>
-
-<hr>
-<a name="Checksum functions"><h2> Checksum functions </h2>
-     These functions are not related to compression but are exported
-   anyway because they might be useful in applications using the
-   compression library.
-<h3> Function list </h3>
-<ul>
-<li> uLong  <a href="#adler32">adler32</a> (uLong <a href="#adler">adler</a>, const Bytef *buf, uInt len);
-<li> uLong  <a href="#crc32">crc32</a>   (uLong crc, const Bytef *buf, uInt len);
-</ul>
-<h3> Function description </h3>
-<dl>
-<font color="Blue"><dt> uLong  <a name="adler32">adler32</a> (uLong <a href="#adler">adler</a>, const Bytef *buf, uInt len);</font>
-<dd>
-     Update a running Adler-32 checksum with the bytes buf[0..len-1] and
-   return the updated checksum. If buf is NULL, this function returns
-   the required initial value for the checksum.
-   <p>
-   An Adler-32 checksum is almost as reliable as a CRC32 but can be computed
-   much faster. Usage example:
-   <pre>
-
-     uLong <a href="#adler">adler</a> = <a href="#adler32">adler32</a>(0L, <a href="#Z_NULL">Z_NULL</a>, 0);
-
-     while (read_buffer(buffer, length) != EOF) {
-       <a href="#adler">adler</a> = <a href="#adler32">adler32</a>(<a href="#adler">adler</a>, buffer, length);
-     }
-     if (<a href="#adler">adler</a> != original_adler) error();
-   </pre>
-
-<font color="Blue"><dt> uLong  <a name="crc32">crc32</a>   (uLong crc, const Bytef *buf, uInt len);</font>
-<dd>
-     Update a running crc with the bytes buf[0..len-1] and return the updated
-   crc. If buf is NULL, this function returns the required initial value
-   for the crc. Pre- and post-conditioning (one's complement) is performed
-   within this function so it shouldn't be done by the application.
-   Usage example:
-   <pre>
-
-     uLong crc = <a href="#crc32">crc32</a>(0L, <a href="#Z_NULL">Z_NULL</a>, 0);
-
-     while (read_buffer(buffer, length) != EOF) {
-       crc = <a href="#crc32">crc32</a>(crc, buffer, length);
-     }
-     if (crc != original_crc) error();
-   </pre>
-</dl>
-<hr>
-<a name="struct z_stream_s"><h2> struct z_stream_s </h2>
-<font color="Blue">
-<a name="z_stream_s">
-<pre>
-typedef struct z_stream_s {
-    Bytef    *<a name="next_in">next_in</a>;  /* next input byte */
-    uInt     <a name="avail_in">avail_in</a>;  /* number of bytes available at <a href="#next_in">next_in</a> */
-    uLong    <a name="total_in">total_in</a>;  /* total nb of input bytes read so far */
-
-    Bytef    *<a name="next_out">next_out</a>; /* next output byte should be put there */
-    uInt     <a name="avail_out">avail_out</a>; /* remaining free space at <a href="#next_out">next_out</a> */
-    uLong    <a name="total_out">total_out</a>; /* total nb of bytes output so far */
-
-    char     *<a name="msg">msg</a>;      /* last error message, NULL if no error */
-    struct internal_state FAR *<a name="state">state</a>; /* not visible by applications */
-
-    alloc_func <a name="zalloc">zalloc</a>;  /* used to allocate the internal <a href="#state">state</a> */
-    free_func  <a name="zfree">zfree</a>;   /* used to free the internal <a href="#state">state</a> */
-    voidpf     <a name="opaque">opaque</a>;  /* private data object passed to <a href="#zalloc">zalloc</a> and <a href="#zfree">zfree</a> */
-
-    int     <a name="data_type">data_type</a>;  /* best guess about the data type: ascii or binary */
-    uLong   <a name="adler">adler</a>;      /* <a href="#adler32">adler32</a> value of the uncompressed data */
-    uLong   <a name="reserved">reserved</a>;   /* <a href="#reserved">reserved</a> for future use */
-} <a href="#z_stream_s">z_stream</a> ;
-
-typedef <a href="#z_stream_s">z_stream</a> FAR * <a name="z_streamp">z_streamp</a>;  ÿ
-</pre>
-</font>
-   The application must update <a href="#next_in">next_in</a> and <a href="#avail_in">avail_in</a> when <a href="#avail_in">avail_in</a> has
-   dropped to zero. It must update <a href="#next_out">next_out</a> and <a href="#avail_out">avail_out</a> when <a href="#avail_out">avail_out</a>
-   has dropped to zero. The application must initialize <a href="#zalloc">zalloc</a>, <a href="#zfree">zfree</a> and
-   <a href="#opaque">opaque</a> before calling the init function. All other fields are set by the
-   compression library and must not be updated by the application. <p>
-
-   The <a href="#opaque">opaque</a> value provided by the application will be passed as the first
-   parameter for calls of <a href="#zalloc">zalloc</a> and <a href="#zfree">zfree</a>. This can be useful for custom
-   memory management. The compression library attaches no meaning to the
-   <a href="#opaque">opaque</a> value. <p>
-
-   <a href="#zalloc">zalloc</a> must return <a href="#Z_NULL">Z_NULL</a> if there is not enough memory for the object.
-   If zlib is used in a multi-threaded application, <a href="#zalloc">zalloc</a> and <a href="#zfree">zfree</a> must be
-   thread safe. <p>
-
-   On 16-bit systems, the functions <a href="#zalloc">zalloc</a> and <a href="#zfree">zfree</a> must be able to allocate
-   exactly 65536 bytes, but will not be required to allocate more than this
-   if the symbol MAXSEG_64K is defined (see zconf.h). WARNING: On MSDOS,
-   pointers returned by <a href="#zalloc">zalloc</a> for objects of exactly 65536 bytes *must*
-   have their offset normalized to zero. The default allocation function
-   provided by this library ensures this (see zutil.c). To reduce memory
-   requirements and avoid any allocation of 64K objects, at the expense of
-   compression ratio, compile the library with -DMAX_WBITS=14 (see zconf.h).
-   <p>
-
-   The fields <a href="#total_in">total_in</a> and <a href="#total_out">total_out</a> can be used for statistics or
-   progress reports. After compression, <a href="#total_in">total_in</a> holds the total size of
-   the uncompressed data and may be saved for use in the decompressor
-   (particularly if the decompressor wants to decompress everything in
-   a single step). <p>
-
-<hr>
-<a name="Constants"><h2> Constants </h2>
-<font color="Blue">
-<pre>
-#define <a name="Z_NO_FLUSH">Z_NO_FLUSH</a>      0
-#define <a name="Z_PARTIAL_FLUSH">Z_PARTIAL_FLUSH</a> 1
-	/* will be removed, use <a href="#Z_SYNC_FLUSH">Z_SYNC_FLUSH</a> instead */
-#define <a name="Z_SYNC_FLUSH">Z_SYNC_FLUSH</a>    2
-#define <a name="Z_FULL_FLUSH">Z_FULL_FLUSH</a>    3
-#define <a name="Z_FINISH">Z_FINISH</a>        4
-/* Allowed flush values ; see <a href="#deflate">deflate</a>() below for details */
-
-#define <a name="Z_OK">Z_OK</a>            0
-#define <a name="Z_STREAM_END">Z_STREAM_END</a>    1
-#define <a name="Z_NEED_DICT">Z_NEED_DICT</a>     2
-#define <a name="Z_ERRNO">Z_ERRNO</a>        (-1)
-#define <a name="Z_STREAM_ERROR">Z_STREAM_ERROR</a> (-2)
-#define <a name="Z_DATA_ERROR">Z_DATA_ERROR</a>   (-3)
-#define <a name="Z_MEM_ERROR">Z_MEM_ERROR</a>    (-4)
-#define <a name="Z_BUF_ERROR">Z_BUF_ERROR</a>    (-5)
-#define <a name="Z_VERSION_ERROR">Z_VERSION_ERROR</a> (-6)
-/* Return codes for the compression/decompression functions. Negative
- * values are errors, positive values are used for special but normal events.
- */
-
-#define <a name="Z_NO_COMPRESSION">Z_NO_COMPRESSION</a>         0
-#define <a name="Z_BEST_SPEED">Z_BEST_SPEED</a>             1
-#define <a name="Z_BEST_COMPRESSION">Z_BEST_COMPRESSION</a>       9
-#define <a name="Z_DEFAULT_COMPRESSION">Z_DEFAULT_COMPRESSION</a>  (-1)
-/* compression levels */
-
-#define <a name="Z_FILTERED">Z_FILTERED</a>            1
-#define <a name="Z_HUFFMAN_ONLY">Z_HUFFMAN_ONLY</a>        2
-#define <a name="Z_DEFAULT_STRATEGY">Z_DEFAULT_STRATEGY</a>    0
-/* compression strategy ; see <a href="#deflateInit2">deflateInit2</a>() below for details */
-
-#define <a name="Z_BINARY">Z_BINARY</a>   0
-#define <a name="Z_ASCII">Z_ASCII</a>    1
-#define <a name="Z_UNKNOWN">Z_UNKNOWN</a>  2
-/* Possible values of the <a href="#data_type">data_type</a> field */
-
-#define <a name="Z_DEFLATED">Z_DEFLATED</a>   8
-/* The <a href="#deflate">deflate</a> compression method (the only one supported in this version) */
-
-#define <a name="Z_NULL">Z_NULL</a>  0  /* for initializing <a href="#zalloc">zalloc</a>, <a href="#zfree">zfree</a>, <a href="#opaque">opaque</a> */
-
-#define <a name="zlib_version">zlib_version</a> <a href="#zlibVersion">zlibVersion</a>()
-/* for compatibility with versions less than 1.0.2 */
-</pre>
-</font>
-
-<hr>
-<a name="Misc"><h2> Misc </h2>
- <a href="#deflateInit">deflateInit</a> and <a href="#inflateInit">inflateInit</a> are macros to allow checking the zlib version
- and the compiler's view of <a href="#z_stream_s">z_stream</a>.
- <p>
- Other functions:
- <dl>
- <font color="Blue"><dt> const char   *  <a name="zError">zError</a>           (int err);</font>
- <font color="Blue"><dt> int             <a name="inflateSyncPoint">inflateSyncPoint</a> (<a href="#z_streamp">z_streamp</a> z);</font>
- <font color="Blue"><dt> const uLongf *  <a name="get_crc_table">get_crc_table</a>    (void);</font>
- </dl>
- <hr>
- <font size="-1">
- Last update: Wed Oct 13 20:42:34 1999<br>
- piapi@csie.ntu.edu.tw
- </font>
-
-</body>
-</html>
Index: trunk/minix/lib/zlib-1.2.3/projects/README.projects
===================================================================
--- trunk/minix/lib/zlib-1.2.3/projects/README.projects	(revision 9)
+++ 	(revision )
@@ -1,41 +1,0 @@
-This directory contains project files for building zlib under various
-Integrated Development Environments (IDE).
-
-If you wish to submit a new project to this directory, you should comply
-to the following requirements.  Otherwise (e.g. if you wish to integrate
-a custom piece of code that changes the zlib interface or its behavior),
-please consider submitting the project to the contrib directory.
-
-
-Requirements
-============
-
-- The project must build zlib using the source files from the official
-  zlib source distribution, exclusively.
-
-- If the project produces redistributable builds (e.g. shared objects
-  or DLL files), these builds must be compatible to those produced by
-  makefiles, if such makefiles exist in the zlib distribution.
-  In particular, if the project produces a DLL build for the Win32
-  platform, this build must comply to the officially-ammended Win32 DLL
-  Application Binary Interface (ABI), described in win32/DLL_FAQ.txt.
-
-- The project may provide additional build targets, which depend on
-  3rd-party (unofficially-supported) software, present in the contrib
-  directory.  For example, it is possible to provide an "ASM build",
-  besides the officially-supported build, and have ASM source files
-  among its dependencies.
-
-- If there are significant differences between the project files created
-  by different versions of an IDE (e.g. Visual C++ 6.0 vs. 7.0), the name
-  of the project directory should contain the version number of the IDE
-  for which the project is intended (e.g. "visualc6" for Visual C++ 6.0,
-  or "visualc7" for Visual C++ 7.0 and 7.1).
-
-
-Current projects
-================
-
-visualc6/   by Simon-Pierre Cadieux <methodex@methodex.ca>
-            and Cosmin Truta <cosmint@cs.ubbcluj.ro>
-        Project for Microsoft Visual C++ 6.0
Index: trunk/minix/lib/zlib-1.2.3/projects/visualc6/README.txt
===================================================================
--- trunk/minix/lib/zlib-1.2.3/projects/visualc6/README.txt	(revision 9)
+++ 	(revision )
@@ -1,73 +1,0 @@
-Microsoft Developer Studio Project Files, Format Version 6.00 for zlib.
-
-Copyright (C) 2000-2004 Simon-Pierre Cadieux.
-Copyright (C) 2004 Cosmin Truta.
-For conditions of distribution and use, see copyright notice in zlib.h.
-
-
-This project builds the zlib binaries as follows:
-
-* Win32_DLL_Release\zlib1.dll       DLL build
-* Win32_DLL_Debug\zlib1d.dll        DLL build (debug version)
-* Win32_DLL_ASM_Release\zlib1.dll   DLL build using ASM code
-* Win32_DLL_ASM_Debug\zlib1d.dll    DLL build using ASM code (debug version)
-* Win32_LIB_Release\zlib.lib        static build
-* Win32_LIB_Debug\zlibd.lib         static build (debug version)
-* Win32_LIB_ASM_Release\zlib.lib    static build using ASM code
-* Win32_LIB_ASM_Debug\zlibd.lib     static build using ASM code (debug version)
-
-
-For more information regarding the DLL builds, please see the DLL FAQ
-in ..\..\win32\DLL_FAQ.txt.
-
-
-To build and test:
-
-1) On the main menu, select "File | Open Workspace".
-   Open "zlib.dsw".
-
-2) Select "Build | Set Active Configuration".
-   Choose the configuration you wish to build.
-
-3) Select "Build | Clean".
-
-4) Select "Build | Build ... (F7)".  Ignore warning messages about
-   not being able to find certain include files (e.g. alloc.h).
-
-5) If you built one of the sample programs (example or minigzip),
-   select "Build | Execute ... (Ctrl+F5)".
-
-
-To use:
-
-1) Select "Project | Settings (Alt+F7)".
-   Make note of the configuration names used in your project.
-   Usually, these names are "Win32 Release" and "Win32 Debug".
-
-2) In the Workspace window, select the "FileView" tab.
-   Right-click on the root item "Workspace '...'".
-   Select "Insert Project into Workspace".
-   Switch on the checkbox "Dependency of:", and select the name
-   of your project.  Open "zlib.dsp".
-
-3) Select "Build | Configurations".
-   For each configuration of your project:
-   3.1) Choose the zlib configuration you wish to use.
-   3.2) Click on "Add".
-   3.3) Set the new zlib configuration name to the name used by
-        the configuration from the current iteration.
-
-4) Select "Build | Set Active Configuration".
-   Choose the configuration you wish to build.
-
-5) Select "Build | Build ... (F7)".
-
-6) If you built an executable program, select
-   "Build | Execute ... (Ctrl+F5)".
-
-
-Note:
-
-To build the ASM-enabled code, you need Microsoft Assembler
-(ML.EXE).  You can get it by downloading and installing the
-latest Processor Pack for Visual C++ 6.0.
Index: trunk/minix/lib/zlib-1.2.3/projects/visualc6/example.dsp
===================================================================
--- trunk/minix/lib/zlib-1.2.3/projects/visualc6/example.dsp	(revision 9)
+++ 	(revision )
@@ -1,278 +1,0 @@
-# Microsoft Developer Studio Project File - Name="example" - Package Owner=<4>
-# Microsoft Developer Studio Generated Build File, Format Version 6.00
-# ** DO NOT EDIT **
-
-# TARGTYPE "Win32 (x86) Console Application" 0x0103
-
-CFG=example - Win32 LIB Debug
-!MESSAGE This is not a valid makefile. To build this project using NMAKE,
-!MESSAGE use the Export Makefile command and run
-!MESSAGE 
-!MESSAGE NMAKE /f "example.mak".
-!MESSAGE 
-!MESSAGE You can specify a configuration when running NMAKE
-!MESSAGE by defining the macro CFG on the command line. For example:
-!MESSAGE 
-!MESSAGE NMAKE /f "example.mak" CFG="example - Win32 LIB Debug"
-!MESSAGE 
-!MESSAGE Possible choices for configuration are:
-!MESSAGE 
-!MESSAGE "example - Win32 DLL Release" (based on "Win32 (x86) Console Application")
-!MESSAGE "example - Win32 DLL Debug" (based on "Win32 (x86) Console Application")
-!MESSAGE "example - Win32 DLL ASM Release" (based on "Win32 (x86) Console Application")
-!MESSAGE "example - Win32 DLL ASM Debug" (based on "Win32 (x86) Console Application")
-!MESSAGE "example - Win32 LIB Release" (based on "Win32 (x86) Console Application")
-!MESSAGE "example - Win32 LIB Debug" (based on "Win32 (x86) Console Application")
-!MESSAGE "example - Win32 LIB ASM Release" (based on "Win32 (x86) Console Application")
-!MESSAGE "example - Win32 LIB ASM Debug" (based on "Win32 (x86) Console Application")
-!MESSAGE 
-
-# Begin Project
-# PROP AllowPerConfigDependencies 0
-# PROP Scc_ProjName ""
-# PROP Scc_LocalPath ""
-CPP=cl.exe
-RSC=rc.exe
-
-!IF  "$(CFG)" == "example - Win32 DLL Release"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 0
-# PROP BASE Output_Dir "example___Win32_DLL_Release"
-# PROP BASE Intermediate_Dir "example___Win32_DLL_Release"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 0
-# PROP Output_Dir "Win32_DLL_Release"
-# PROP Intermediate_Dir "Win32_DLL_Release"
-# PROP Ignore_Export_Lib 0
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /MD /W3 /O2 /D "WIN32" /D "NDEBUG" /FD /c
-# SUBTRACT BASE CPP /YX
-# ADD CPP /nologo /MD /W3 /O2 /D "WIN32" /D "NDEBUG" /FD /c
-# SUBTRACT CPP /YX
-# ADD BASE RSC /l 0x409 /d "NDEBUG"
-# ADD RSC /l 0x409 /d "NDEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
-# ADD LINK32 /nologo /subsystem:console /machine:I386
-
-!ELSEIF  "$(CFG)" == "example - Win32 DLL Debug"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 1
-# PROP BASE Output_Dir "example___Win32_DLL_Debug"
-# PROP BASE Intermediate_Dir "example___Win32_DLL_Debug"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 1
-# PROP Output_Dir "Win32_DLL_Debug"
-# PROP Intermediate_Dir "Win32_DLL_Debug"
-# PROP Ignore_Export_Lib 0
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /MDd /W3 /Gm /ZI /Od /D "WIN32" /D "_DEBUG" /FD /GZ /c
-# SUBTRACT BASE CPP /YX
-# ADD CPP /nologo /MDd /W3 /Gm /ZI /Od /D "WIN32" /D "_DEBUG" /FD /GZ /c
-# SUBTRACT CPP /YX
-# ADD BASE RSC /l 0x409 /d "_DEBUG"
-# ADD RSC /l 0x409 /d "_DEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
-# ADD LINK32 /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
-
-!ELSEIF  "$(CFG)" == "example - Win32 DLL ASM Release"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 0
-# PROP BASE Output_Dir "example___Win32_DLL_ASM_Release"
-# PROP BASE Intermediate_Dir "example___Win32_DLL_ASM_Release"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 0
-# PROP Output_Dir "Win32_DLL_ASM_Release"
-# PROP Intermediate_Dir "Win32_DLL_ASM_Release"
-# PROP Ignore_Export_Lib 0
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /MD /W3 /O2 /D "WIN32" /D "NDEBUG" /FD /c
-# SUBTRACT BASE CPP /YX
-# ADD CPP /nologo /MD /W3 /O2 /D "WIN32" /D "NDEBUG" /FD /c
-# SUBTRACT CPP /YX
-# ADD BASE RSC /l 0x409 /d "NDEBUG"
-# ADD RSC /l 0x409 /d "NDEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
-# ADD LINK32 /nologo /subsystem:console /machine:I386
-
-!ELSEIF  "$(CFG)" == "example - Win32 DLL ASM Debug"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 1
-# PROP BASE Output_Dir "example___Win32_DLL_ASM_Debug"
-# PROP BASE Intermediate_Dir "example___Win32_DLL_ASM_Debug"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 1
-# PROP Output_Dir "Win32_DLL_ASM_Debug"
-# PROP Intermediate_Dir "Win32_DLL_ASM_Debug"
-# PROP Ignore_Export_Lib 0
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /MDd /W3 /Gm /ZI /Od /D "WIN32" /D "_DEBUG" /FD /GZ /c
-# SUBTRACT BASE CPP /YX
-# ADD CPP /nologo /MDd /W3 /Gm /ZI /Od /D "WIN32" /D "_DEBUG" /FD /GZ /c
-# SUBTRACT CPP /YX
-# ADD BASE RSC /l 0x409 /d "_DEBUG"
-# ADD RSC /l 0x409 /d "_DEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
-# ADD LINK32 /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
-
-!ELSEIF  "$(CFG)" == "example - Win32 LIB Release"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 0
-# PROP BASE Output_Dir "example___Win32_LIB_Release"
-# PROP BASE Intermediate_Dir "example___Win32_LIB_Release"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 0
-# PROP Output_Dir "Win32_LIB_Release"
-# PROP Intermediate_Dir "Win32_LIB_Release"
-# PROP Ignore_Export_Lib 0
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /MD /W3 /O2 /D "WIN32" /D "NDEBUG" /FD /c
-# SUBTRACT BASE CPP /YX
-# ADD CPP /nologo /MD /W3 /O2 /D "WIN32" /D "NDEBUG" /FD /c
-# SUBTRACT CPP /YX
-# ADD BASE RSC /l 0x409 /d "NDEBUG"
-# ADD RSC /l 0x409 /d "NDEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
-# ADD LINK32 /nologo /subsystem:console /machine:I386
-
-!ELSEIF  "$(CFG)" == "example - Win32 LIB Debug"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 1
-# PROP BASE Output_Dir "example___Win32_LIB_Debug"
-# PROP BASE Intermediate_Dir "example___Win32_LIB_Debug"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 1
-# PROP Output_Dir "Win32_LIB_Debug"
-# PROP Intermediate_Dir "Win32_LIB_Debug"
-# PROP Ignore_Export_Lib 0
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /MDd /W3 /Gm /ZI /Od /D "WIN32" /D "_DEBUG" /FD /GZ /c
-# SUBTRACT BASE CPP /YX
-# ADD CPP /nologo /MDd /W3 /Gm /ZI /Od /D "WIN32" /D "_DEBUG" /FD /GZ /c
-# SUBTRACT CPP /YX
-# ADD BASE RSC /l 0x409 /d "_DEBUG"
-# ADD RSC /l 0x409 /d "_DEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
-# ADD LINK32 /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
-
-!ELSEIF  "$(CFG)" == "example - Win32 LIB ASM Release"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 0
-# PROP BASE Output_Dir "example___Win32_LIB_ASM_Release"
-# PROP BASE Intermediate_Dir "example___Win32_LIB_ASM_Release"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 0
-# PROP Output_Dir "Win32_LIB_ASM_Release"
-# PROP Intermediate_Dir "Win32_LIB_ASM_Release"
-# PROP Ignore_Export_Lib 0
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /MD /W3 /O2 /D "WIN32" /D "NDEBUG" /FD /c
-# SUBTRACT BASE CPP /YX
-# ADD CPP /nologo /MD /W3 /O2 /D "WIN32" /D "NDEBUG" /FD /c
-# SUBTRACT CPP /YX
-# ADD BASE RSC /l 0x409 /d "NDEBUG"
-# ADD RSC /l 0x409 /d "NDEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
-# ADD LINK32 /nologo /subsystem:console /machine:I386
-
-!ELSEIF  "$(CFG)" == "example - Win32 LIB ASM Debug"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 1
-# PROP BASE Output_Dir "example___Win32_LIB_ASM_Debug"
-# PROP BASE Intermediate_Dir "example___Win32_LIB_ASM_Debug"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 1
-# PROP Output_Dir "Win32_LIB_ASM_Debug"
-# PROP Intermediate_Dir "Win32_LIB_ASM_Debug"
-# PROP Ignore_Export_Lib 0
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /MDd /W3 /Gm /ZI /Od /D "WIN32" /D "_DEBUG" /FD /GZ /c
-# SUBTRACT BASE CPP /YX
-# ADD CPP /nologo /MDd /W3 /Gm /ZI /Od /D "WIN32" /D "_DEBUG" /FD /GZ /c
-# SUBTRACT CPP /YX
-# ADD BASE RSC /l 0x409 /d "_DEBUG"
-# ADD RSC /l 0x409 /d "_DEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
-# ADD LINK32 /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
-
-!ENDIF 
-
-# Begin Target
-
-# Name "example - Win32 DLL Release"
-# Name "example - Win32 DLL Debug"
-# Name "example - Win32 DLL ASM Release"
-# Name "example - Win32 DLL ASM Debug"
-# Name "example - Win32 LIB Release"
-# Name "example - Win32 LIB Debug"
-# Name "example - Win32 LIB ASM Release"
-# Name "example - Win32 LIB ASM Debug"
-# Begin Group "Source Files"
-
-# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
-# Begin Source File
-
-SOURCE=..\..\example.c
-# End Source File
-# End Group
-# Begin Group "Header Files"
-
-# PROP Default_Filter "h;hpp;hxx;hm;inl"
-# Begin Source File
-
-SOURCE=..\..\zconf.h
-# End Source File
-# Begin Source File
-
-SOURCE=..\..\zlib.h
-# End Source File
-# End Group
-# End Target
-# End Project
Index: trunk/minix/lib/zlib-1.2.3/projects/visualc6/minigzip.dsp
===================================================================
--- trunk/minix/lib/zlib-1.2.3/projects/visualc6/minigzip.dsp	(revision 9)
+++ 	(revision )
@@ -1,278 +1,0 @@
-# Microsoft Developer Studio Project File - Name="minigzip" - Package Owner=<4>
-# Microsoft Developer Studio Generated Build File, Format Version 6.00
-# ** DO NOT EDIT **
-
-# TARGTYPE "Win32 (x86) Console Application" 0x0103
-
-CFG=minigzip - Win32 LIB Debug
-!MESSAGE This is not a valid makefile. To build this project using NMAKE,
-!MESSAGE use the Export Makefile command and run
-!MESSAGE 
-!MESSAGE NMAKE /f "minigzip.mak".
-!MESSAGE 
-!MESSAGE You can specify a configuration when running NMAKE
-!MESSAGE by defining the macro CFG on the command line. For example:
-!MESSAGE 
-!MESSAGE NMAKE /f "minigzip.mak" CFG="minigzip - Win32 LIB Debug"
-!MESSAGE 
-!MESSAGE Possible choices for configuration are:
-!MESSAGE 
-!MESSAGE "minigzip - Win32 DLL Release" (based on "Win32 (x86) Console Application")
-!MESSAGE "minigzip - Win32 DLL Debug" (based on "Win32 (x86) Console Application")
-!MESSAGE "minigzip - Win32 DLL ASM Release" (based on "Win32 (x86) Console Application")
-!MESSAGE "minigzip - Win32 DLL ASM Debug" (based on "Win32 (x86) Console Application")
-!MESSAGE "minigzip - Win32 LIB Release" (based on "Win32 (x86) Console Application")
-!MESSAGE "minigzip - Win32 LIB Debug" (based on "Win32 (x86) Console Application")
-!MESSAGE "minigzip - Win32 LIB ASM Release" (based on "Win32 (x86) Console Application")
-!MESSAGE "minigzip - Win32 LIB ASM Debug" (based on "Win32 (x86) Console Application")
-!MESSAGE 
-
-# Begin Project
-# PROP AllowPerConfigDependencies 0
-# PROP Scc_ProjName ""
-# PROP Scc_LocalPath ""
-CPP=cl.exe
-RSC=rc.exe
-
-!IF  "$(CFG)" == "minigzip - Win32 DLL Release"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 0
-# PROP BASE Output_Dir "minigzip___Win32_DLL_Release"
-# PROP BASE Intermediate_Dir "minigzip___Win32_DLL_Release"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 0
-# PROP Output_Dir "Win32_DLL_Release"
-# PROP Intermediate_Dir "Win32_DLL_Release"
-# PROP Ignore_Export_Lib 0
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /MD /W3 /O2 /D "WIN32" /D "NDEBUG" /FD /c
-# SUBTRACT BASE CPP /YX
-# ADD CPP /nologo /MD /W3 /O2 /D "WIN32" /D "NDEBUG" /FD /c
-# SUBTRACT CPP /YX
-# ADD BASE RSC /l 0x409 /d "NDEBUG"
-# ADD RSC /l 0x409 /d "NDEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
-# ADD LINK32 /nologo /subsystem:console /machine:I386
-
-!ELSEIF  "$(CFG)" == "minigzip - Win32 DLL Debug"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 1
-# PROP BASE Output_Dir "minigzip___Win32_DLL_Debug"
-# PROP BASE Intermediate_Dir "minigzip___Win32_DLL_Debug"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 1
-# PROP Output_Dir "Win32_DLL_Debug"
-# PROP Intermediate_Dir "Win32_DLL_Debug"
-# PROP Ignore_Export_Lib 0
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /MDd /W3 /Gm /ZI /Od /D "WIN32" /D "_DEBUG" /FD /GZ /c
-# SUBTRACT BASE CPP /YX
-# ADD CPP /nologo /MDd /W3 /Gm /ZI /Od /D "WIN32" /D "_DEBUG" /FD /GZ /c
-# SUBTRACT CPP /YX
-# ADD BASE RSC /l 0x409 /d "_DEBUG"
-# ADD RSC /l 0x409 /d "_DEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
-# ADD LINK32 /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
-
-!ELSEIF  "$(CFG)" == "minigzip - Win32 DLL ASM Release"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 0
-# PROP BASE Output_Dir "minigzip___Win32_DLL_ASM_Release"
-# PROP BASE Intermediate_Dir "minigzip___Win32_DLL_ASM_Release"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 0
-# PROP Output_Dir "Win32_DLL_ASM_Release"
-# PROP Intermediate_Dir "Win32_DLL_ASM_Release"
-# PROP Ignore_Export_Lib 0
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /MD /W3 /O2 /D "WIN32" /D "NDEBUG" /FD /c
-# SUBTRACT BASE CPP /YX
-# ADD CPP /nologo /MD /W3 /O2 /D "WIN32" /D "NDEBUG" /FD /c
-# SUBTRACT CPP /YX
-# ADD BASE RSC /l 0x409 /d "NDEBUG"
-# ADD RSC /l 0x409 /d "NDEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
-# ADD LINK32 /nologo /subsystem:console /machine:I386
-
-!ELSEIF  "$(CFG)" == "minigzip - Win32 DLL ASM Debug"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 1
-# PROP BASE Output_Dir "minigzip___Win32_DLL_ASM_Debug"
-# PROP BASE Intermediate_Dir "minigzip___Win32_DLL_ASM_Debug"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 1
-# PROP Output_Dir "Win32_DLL_ASM_Debug"
-# PROP Intermediate_Dir "Win32_DLL_ASM_Debug"
-# PROP Ignore_Export_Lib 0
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /MDd /W3 /Gm /ZI /Od /D "WIN32" /D "_DEBUG" /FD /GZ /c
-# SUBTRACT BASE CPP /YX
-# ADD CPP /nologo /MDd /W3 /Gm /ZI /Od /D "WIN32" /D "_DEBUG" /FD /GZ /c
-# SUBTRACT CPP /YX
-# ADD BASE RSC /l 0x409 /d "_DEBUG"
-# ADD RSC /l 0x409 /d "_DEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
-# ADD LINK32 /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
-
-!ELSEIF  "$(CFG)" == "minigzip - Win32 LIB Release"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 0
-# PROP BASE Output_Dir "minigzip___Win32_LIB_Release"
-# PROP BASE Intermediate_Dir "minigzip___Win32_LIB_Release"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 0
-# PROP Output_Dir "Win32_LIB_Release"
-# PROP Intermediate_Dir "Win32_LIB_Release"
-# PROP Ignore_Export_Lib 0
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /MD /W3 /O2 /D "WIN32" /D "NDEBUG" /FD /c
-# SUBTRACT BASE CPP /YX
-# ADD CPP /nologo /MD /W3 /O2 /D "WIN32" /D "NDEBUG" /FD /c
-# SUBTRACT CPP /YX
-# ADD BASE RSC /l 0x409 /d "NDEBUG"
-# ADD RSC /l 0x409 /d "NDEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
-# ADD LINK32 /nologo /subsystem:console /machine:I386
-
-!ELSEIF  "$(CFG)" == "minigzip - Win32 LIB Debug"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 1
-# PROP BASE Output_Dir "minigzip___Win32_LIB_Debug"
-# PROP BASE Intermediate_Dir "minigzip___Win32_LIB_Debug"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 1
-# PROP Output_Dir "Win32_LIB_Debug"
-# PROP Intermediate_Dir "Win32_LIB_Debug"
-# PROP Ignore_Export_Lib 0
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /MDd /W3 /Gm /ZI /Od /D "WIN32" /D "_DEBUG" /FD /GZ /c
-# SUBTRACT BASE CPP /YX
-# ADD CPP /nologo /MDd /W3 /Gm /ZI /Od /D "WIN32" /D "_DEBUG" /FD /GZ /c
-# SUBTRACT CPP /YX
-# ADD BASE RSC /l 0x409 /d "_DEBUG"
-# ADD RSC /l 0x409 /d "_DEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
-# ADD LINK32 /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
-
-!ELSEIF  "$(CFG)" == "minigzip - Win32 LIB ASM Release"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 0
-# PROP BASE Output_Dir "minigzip___Win32_LIB_ASM_Release"
-# PROP BASE Intermediate_Dir "minigzip___Win32_LIB_ASM_Release"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 0
-# PROP Output_Dir "Win32_LIB_ASM_Release"
-# PROP Intermediate_Dir "Win32_LIB_ASM_Release"
-# PROP Ignore_Export_Lib 0
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /MD /W3 /O2 /D "WIN32" /D "NDEBUG" /FD /c
-# SUBTRACT BASE CPP /YX
-# ADD CPP /nologo /MD /W3 /O2 /D "WIN32" /D "NDEBUG" /FD /c
-# SUBTRACT CPP /YX
-# ADD BASE RSC /l 0x409 /d "NDEBUG"
-# ADD RSC /l 0x409 /d "NDEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
-# ADD LINK32 /nologo /subsystem:console /machine:I386
-
-!ELSEIF  "$(CFG)" == "minigzip - Win32 LIB ASM Debug"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 1
-# PROP BASE Output_Dir "minigzip___Win32_LIB_ASM_Debug"
-# PROP BASE Intermediate_Dir "minigzip___Win32_LIB_ASM_Debug"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 1
-# PROP Output_Dir "Win32_LIB_ASM_Debug"
-# PROP Intermediate_Dir "Win32_LIB_ASM_Debug"
-# PROP Ignore_Export_Lib 0
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /MDd /W3 /Gm /ZI /Od /D "WIN32" /D "_DEBUG" /FD /GZ /c
-# SUBTRACT BASE CPP /YX
-# ADD CPP /nologo /MDd /W3 /Gm /ZI /Od /D "WIN32" /D "_DEBUG" /FD /GZ /c
-# SUBTRACT CPP /YX
-# ADD BASE RSC /l 0x409 /d "_DEBUG"
-# ADD RSC /l 0x409 /d "_DEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
-# ADD LINK32 /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
-
-!ENDIF 
-
-# Begin Target
-
-# Name "minigzip - Win32 DLL Release"
-# Name "minigzip - Win32 DLL Debug"
-# Name "minigzip - Win32 DLL ASM Release"
-# Name "minigzip - Win32 DLL ASM Debug"
-# Name "minigzip - Win32 LIB Release"
-# Name "minigzip - Win32 LIB Debug"
-# Name "minigzip - Win32 LIB ASM Release"
-# Name "minigzip - Win32 LIB ASM Debug"
-# Begin Group "Source Files"
-
-# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
-# Begin Source File
-
-SOURCE=..\..\minigzip.c
-# End Source File
-# End Group
-# Begin Group "Header Files"
-
-# PROP Default_Filter "h;hpp;hxx;hm;inl"
-# Begin Source File
-
-SOURCE=..\..\zconf.h
-# End Source File
-# Begin Source File
-
-SOURCE=..\..\zlib.h
-# End Source File
-# End Group
-# End Target
-# End Project
Index: trunk/minix/lib/zlib-1.2.3/projects/visualc6/zlib.dsp
===================================================================
--- trunk/minix/lib/zlib-1.2.3/projects/visualc6/zlib.dsp	(revision 9)
+++ 	(revision )
@@ -1,609 +1,0 @@
-# Microsoft Developer Studio Project File - Name="zlib" - Package Owner=<4>
-# Microsoft Developer Studio Generated Build File, Format Version 6.00
-# ** DO NOT EDIT **
-
-# TARGTYPE "Win32 (x86) Dynamic-Link Library" 0x0102
-# TARGTYPE "Win32 (x86) Static Library" 0x0104
-
-CFG=zlib - Win32 LIB Debug
-!MESSAGE This is not a valid makefile. To build this project using NMAKE,
-!MESSAGE use the Export Makefile command and run
-!MESSAGE 
-!MESSAGE NMAKE /f "zlib.mak".
-!MESSAGE 
-!MESSAGE You can specify a configuration when running NMAKE
-!MESSAGE by defining the macro CFG on the command line. For example:
-!MESSAGE 
-!MESSAGE NMAKE /f "zlib.mak" CFG="zlib - Win32 LIB Debug"
-!MESSAGE 
-!MESSAGE Possible choices for configuration are:
-!MESSAGE 
-!MESSAGE "zlib - Win32 DLL Release" (based on "Win32 (x86) Dynamic-Link Library")
-!MESSAGE "zlib - Win32 DLL Debug" (based on "Win32 (x86) Dynamic-Link Library")
-!MESSAGE "zlib - Win32 DLL ASM Release" (based on "Win32 (x86) Dynamic-Link Library")
-!MESSAGE "zlib - Win32 DLL ASM Debug" (based on "Win32 (x86) Dynamic-Link Library")
-!MESSAGE "zlib - Win32 LIB Release" (based on "Win32 (x86) Static Library")
-!MESSAGE "zlib - Win32 LIB Debug" (based on "Win32 (x86) Static Library")
-!MESSAGE "zlib - Win32 LIB ASM Release" (based on "Win32 (x86) Static Library")
-!MESSAGE "zlib - Win32 LIB ASM Debug" (based on "Win32 (x86) Static Library")
-!MESSAGE 
-
-# Begin Project
-# PROP AllowPerConfigDependencies 0
-# PROP Scc_ProjName ""
-# PROP Scc_LocalPath ""
-
-!IF  "$(CFG)" == "zlib - Win32 DLL Release"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 0
-# PROP BASE Output_Dir "zlib___Win32_DLL_Release"
-# PROP BASE Intermediate_Dir "zlib___Win32_DLL_Release"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 0
-# PROP Output_Dir "Win32_DLL_Release"
-# PROP Intermediate_Dir "Win32_DLL_Release"
-# PROP Ignore_Export_Lib 0
-# PROP Target_Dir ""
-CPP=cl.exe
-# ADD BASE CPP /nologo /MD /W3 /O2 /D "WIN32" /D "NDEBUG" /FD /c
-# SUBTRACT BASE CPP /YX /Yc /Yu
-# ADD CPP /nologo /MD /W3 /O2 /D "WIN32" /D "NDEBUG" /FD /c
-# SUBTRACT CPP /YX /Yc /Yu
-MTL=midl.exe
-# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32
-# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32
-RSC=rc.exe
-# ADD BASE RSC /l 0x409 /d "NDEBUG"
-# ADD RSC /l 0x409 /d "NDEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /machine:I386
-# ADD LINK32 /nologo /dll /machine:I386 /out:"Win32_DLL_Release\zlib1.dll"
-
-!ELSEIF  "$(CFG)" == "zlib - Win32 DLL Debug"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 1
-# PROP BASE Output_Dir "zlib___Win32_DLL_Debug"
-# PROP BASE Intermediate_Dir "zlib___Win32_DLL_Debug"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 1
-# PROP Output_Dir "Win32_DLL_Debug"
-# PROP Intermediate_Dir "Win32_DLL_Debug"
-# PROP Ignore_Export_Lib 0
-# PROP Target_Dir ""
-CPP=cl.exe
-# ADD BASE CPP /nologo /MDd /W3 /Gm /ZI /Od /D "WIN32" /D "_DEBUG" /FD /GZ /c
-# SUBTRACT BASE CPP /YX /Yc /Yu
-# ADD CPP /nologo /MDd /W3 /Gm /ZI /Od /D "WIN32" /D "_DEBUG" /FD /GZ /c
-# SUBTRACT CPP /YX /Yc /Yu
-MTL=midl.exe
-# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32
-# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32
-RSC=rc.exe
-# ADD BASE RSC /l 0x409 /d "_DEBUG"
-# ADD RSC /l 0x409 /d "_DEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /debug /machine:I386 /pdbtype:sept
-# ADD LINK32 /nologo /dll /debug /machine:I386 /out:"Win32_DLL_Debug\zlib1d.dll" /pdbtype:sept
-
-!ELSEIF  "$(CFG)" == "zlib - Win32 DLL ASM Release"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 0
-# PROP BASE Output_Dir "zlib___Win32_DLL_ASM_Release"
-# PROP BASE Intermediate_Dir "zlib___Win32_DLL_ASM_Release"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 0
-# PROP Output_Dir "Win32_DLL_ASM_Release"
-# PROP Intermediate_Dir "Win32_DLL_ASM_Release"
-# PROP Ignore_Export_Lib 0
-# PROP Target_Dir ""
-CPP=cl.exe
-# ADD BASE CPP /nologo /MD /W3 /O2 /D "WIN32" /D "NDEBUG" /FD /c
-# SUBTRACT BASE CPP /YX /Yc /Yu
-# ADD CPP /nologo /MD /W3 /O2 /D "WIN32" /D "NDEBUG" /D "ASMV" /D "ASMINF" /FD /c
-# SUBTRACT CPP /YX /Yc /Yu
-MTL=midl.exe
-# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32
-# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32
-RSC=rc.exe
-# ADD BASE RSC /l 0x409 /d "NDEBUG"
-# ADD RSC /l 0x409 /d "NDEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /machine:I386
-# ADD LINK32 /nologo /dll /machine:I386 /out:"Win32_DLL_ASM_Release\zlib1.dll"
-
-!ELSEIF  "$(CFG)" == "zlib - Win32 DLL ASM Debug"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 1
-# PROP BASE Output_Dir "zlib___Win32_DLL_ASM_Debug"
-# PROP BASE Intermediate_Dir "zlib___Win32_DLL_ASM_Debug"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 1
-# PROP Output_Dir "Win32_DLL_ASM_Debug"
-# PROP Intermediate_Dir "Win32_DLL_ASM_Debug"
-# PROP Ignore_Export_Lib 0
-# PROP Target_Dir ""
-CPP=cl.exe
-# ADD BASE CPP /nologo /MDd /W3 /Gm /ZI /Od /D "WIN32" /D "_DEBUG" /FD /GZ /c
-# SUBTRACT BASE CPP /YX /Yc /Yu
-# ADD CPP /nologo /MDd /W3 /Gm /ZI /Od /D "WIN32" /D "_DEBUG" /D "ASMV" /D "ASMINF" /FD /GZ /c
-# SUBTRACT CPP /YX /Yc /Yu
-MTL=midl.exe
-# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32
-# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32
-RSC=rc.exe
-# ADD BASE RSC /l 0x409 /d "_DEBUG"
-# ADD RSC /l 0x409 /d "_DEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /debug /machine:I386 /pdbtype:sept
-# ADD LINK32 /nologo /dll /debug /machine:I386 /out:"Win32_DLL_ASM_Debug\zlib1d.dll" /pdbtype:sept
-
-!ELSEIF  "$(CFG)" == "zlib - Win32 LIB Release"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 0
-# PROP BASE Output_Dir "zlib___Win32_LIB_Release"
-# PROP BASE Intermediate_Dir "zlib___Win32_LIB_Release"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 0
-# PROP Output_Dir "Win32_LIB_Release"
-# PROP Intermediate_Dir "Win32_LIB_Release"
-# PROP Target_Dir ""
-CPP=cl.exe
-# ADD BASE CPP /nologo /MD /W3 /O2 /D "WIN32" /D "NDEBUG" /FD /c
-# SUBTRACT BASE CPP /YX /Yc /Yu
-# ADD CPP /nologo /MD /W3 /O2 /D "WIN32" /D "NDEBUG" /FD /c
-# SUBTRACT CPP /YX /Yc /Yu
-RSC=rc.exe
-# ADD BASE RSC /l 0x409 /d "NDEBUG"
-# ADD RSC /l 0x409 /d "NDEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LIB32=link.exe -lib
-# ADD BASE LIB32 /nologo
-# ADD LIB32 /nologo
-
-!ELSEIF  "$(CFG)" == "zlib - Win32 LIB Debug"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 1
-# PROP BASE Output_Dir "zlib___Win32_LIB_Debug"
-# PROP BASE Intermediate_Dir "zlib___Win32_LIB_Debug"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 1
-# PROP Output_Dir "Win32_LIB_Debug"
-# PROP Intermediate_Dir "Win32_LIB_Debug"
-# PROP Target_Dir ""
-CPP=cl.exe
-# ADD BASE CPP /nologo /MDd /W3 /Gm /ZI /Od /D "WIN32" /D "_DEBUG" /FD /GZ /c
-# SUBTRACT BASE CPP /YX /Yc /Yu
-# ADD CPP /nologo /MDd /W3 /Gm /ZI /Od /D "WIN32" /D "_DEBUG" /FD /GZ /c
-# SUBTRACT CPP /YX /Yc /Yu
-RSC=rc.exe
-# ADD BASE RSC /l 0x409 /d "_DEBUG"
-# ADD RSC /l 0x409 /d "_DEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LIB32=link.exe -lib
-# ADD BASE LIB32 /nologo
-# ADD LIB32 /nologo /out:"Win32_LIB_Debug\zlibd.lib"
-
-!ELSEIF  "$(CFG)" == "zlib - Win32 LIB ASM Release"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 0
-# PROP BASE Output_Dir "zlib___Win32_LIB_ASM_Release"
-# PROP BASE Intermediate_Dir "zlib___Win32_LIB_ASM_Release"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 0
-# PROP Output_Dir "Win32_LIB_ASM_Release"
-# PROP Intermediate_Dir "Win32_LIB_ASM_Release"
-# PROP Target_Dir ""
-CPP=cl.exe
-# ADD BASE CPP /nologo /MD /W3 /O2 /D "WIN32" /D "NDEBUG" /FD /c
-# SUBTRACT BASE CPP /YX /Yc /Yu
-# ADD CPP /nologo /MD /W3 /O2 /D "WIN32" /D "NDEBUG" /D "ASMV" /D "ASMINF" /FD /c
-# SUBTRACT CPP /YX /Yc /Yu
-RSC=rc.exe
-# ADD BASE RSC /l 0x409 /d "NDEBUG"
-# ADD RSC /l 0x409 /d "NDEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LIB32=link.exe -lib
-# ADD BASE LIB32 /nologo
-# ADD LIB32 /nologo
-
-!ELSEIF  "$(CFG)" == "zlib - Win32 LIB ASM Debug"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 1
-# PROP BASE Output_Dir "zlib___Win32_LIB_ASM_Debug"
-# PROP BASE Intermediate_Dir "zlib___Win32_LIB_ASM_Debug"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 1
-# PROP Output_Dir "Win32_LIB_ASM_Debug"
-# PROP Intermediate_Dir "Win32_LIB_ASM_Debug"
-# PROP Target_Dir ""
-CPP=cl.exe
-# ADD BASE CPP /nologo /MDd /W3 /Gm /ZI /Od /D "WIN32" /D "_DEBUG" /FD /GZ /c
-# SUBTRACT BASE CPP /YX /Yc /Yu
-# ADD CPP /nologo /MDd /W3 /Gm /ZI /Od /D "WIN32" /D "_DEBUG" /D "ASMV" /D "ASMINF" /FD /GZ /c
-# SUBTRACT CPP /YX /Yc /Yu
-RSC=rc.exe
-# ADD BASE RSC /l 0x409 /d "_DEBUG"
-# ADD RSC /l 0x409 /d "_DEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LIB32=link.exe -lib
-# ADD BASE LIB32 /nologo
-# ADD LIB32 /nologo /out:"Win32_LIB_ASM_Debug\zlibd.lib"
-
-!ENDIF 
-
-# Begin Target
-
-# Name "zlib - Win32 DLL Release"
-# Name "zlib - Win32 DLL Debug"
-# Name "zlib - Win32 DLL ASM Release"
-# Name "zlib - Win32 DLL ASM Debug"
-# Name "zlib - Win32 LIB Release"
-# Name "zlib - Win32 LIB Debug"
-# Name "zlib - Win32 LIB ASM Release"
-# Name "zlib - Win32 LIB ASM Debug"
-# Begin Group "Source Files"
-
-# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
-# Begin Source File
-
-SOURCE=..\..\adler32.c
-# End Source File
-# Begin Source File
-
-SOURCE=..\..\compress.c
-# End Source File
-# Begin Source File
-
-SOURCE=..\..\crc32.c
-# End Source File
-# Begin Source File
-
-SOURCE=..\..\deflate.c
-# End Source File
-# Begin Source File
-
-SOURCE=..\..\gzio.c
-# End Source File
-# Begin Source File
-
-SOURCE=..\..\infback.c
-# End Source File
-# Begin Source File
-
-SOURCE=..\..\inffast.c
-# End Source File
-# Begin Source File
-
-SOURCE=..\..\inflate.c
-# End Source File
-# Begin Source File
-
-SOURCE=..\..\inftrees.c
-# End Source File
-# Begin Source File
-
-SOURCE=..\..\trees.c
-# End Source File
-# Begin Source File
-
-SOURCE=..\..\uncompr.c
-# End Source File
-# Begin Source File
-
-SOURCE=..\..\win32\zlib.def
-
-!IF  "$(CFG)" == "zlib - Win32 DLL Release"
-
-!ELSEIF  "$(CFG)" == "zlib - Win32 DLL Debug"
-
-!ELSEIF  "$(CFG)" == "zlib - Win32 DLL ASM Release"
-
-!ELSEIF  "$(CFG)" == "zlib - Win32 DLL ASM Debug"
-
-!ELSEIF  "$(CFG)" == "zlib - Win32 LIB Release"
-
-# PROP Exclude_From_Build 1
-
-!ELSEIF  "$(CFG)" == "zlib - Win32 LIB Debug"
-
-# PROP Exclude_From_Build 1
-
-!ELSEIF  "$(CFG)" == "zlib - Win32 LIB ASM Release"
-
-# PROP Exclude_From_Build 1
-
-!ELSEIF  "$(CFG)" == "zlib - Win32 LIB ASM Debug"
-
-# PROP Exclude_From_Build 1
-
-!ENDIF 
-
-# End Source File
-# Begin Source File
-
-SOURCE=..\..\zutil.c
-# End Source File
-# End Group
-# Begin Group "Header Files"
-
-# PROP Default_Filter "h;hpp;hxx;hm;inl"
-# Begin Source File
-
-SOURCE=..\..\crc32.h
-# End Source File
-# Begin Source File
-
-SOURCE=..\..\deflate.h
-# End Source File
-# Begin Source File
-
-SOURCE=..\..\inffast.h
-# End Source File
-# Begin Source File
-
-SOURCE=..\..\inffixed.h
-# End Source File
-# Begin Source File
-
-SOURCE=..\..\inflate.h
-# End Source File
-# Begin Source File
-
-SOURCE=..\..\inftrees.h
-# End Source File
-# Begin Source File
-
-SOURCE=..\..\trees.h
-# End Source File
-# Begin Source File
-
-SOURCE=..\..\zconf.h
-# End Source File
-# Begin Source File
-
-SOURCE=..\..\zlib.h
-# End Source File
-# Begin Source File
-
-SOURCE=..\..\zutil.h
-# End Source File
-# End Group
-# Begin Group "Resource Files"
-
-# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
-# Begin Source File
-
-SOURCE=..\..\win32\zlib1.rc
-# End Source File
-# End Group
-# Begin Group "Assembler Files (Unsupported)"
-
-# PROP Default_Filter "asm;obj;c;cpp;cxx;h;hpp;hxx"
-# Begin Source File
-
-SOURCE=..\..\contrib\masmx86\gvmat32.asm
-
-!IF  "$(CFG)" == "zlib - Win32 DLL Release"
-
-# PROP Exclude_From_Build 1
-
-!ELSEIF  "$(CFG)" == "zlib - Win32 DLL Debug"
-
-# PROP Exclude_From_Build 1
-
-!ELSEIF  "$(CFG)" == "zlib - Win32 DLL ASM Release"
-
-# Begin Custom Build - Assembling...
-IntDir=.\Win32_DLL_ASM_Release
-InputPath=..\..\contrib\masmx86\gvmat32.asm
-InputName=gvmat32
-
-"$(IntDir)\$(InputName).obj" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
-	ml.exe /nologo /c /coff /Cx /Fo"$(IntDir)\$(InputName).obj" "$(InputPath)"
-
-# End Custom Build
-
-!ELSEIF  "$(CFG)" == "zlib - Win32 DLL ASM Debug"
-
-# Begin Custom Build - Assembling...
-IntDir=.\Win32_DLL_ASM_Debug
-InputPath=..\..\contrib\masmx86\gvmat32.asm
-InputName=gvmat32
-
-"$(IntDir)\$(InputName).obj" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
-	ml.exe /nologo /c /coff /Cx /Zi /Fo"$(IntDir)\$(InputName).obj" "$(InputPath)"
-
-# End Custom Build
-
-!ELSEIF  "$(CFG)" == "zlib - Win32 LIB Release"
-
-# PROP Exclude_From_Build 1
-
-!ELSEIF  "$(CFG)" == "zlib - Win32 LIB Debug"
-
-# PROP Exclude_From_Build 1
-
-!ELSEIF  "$(CFG)" == "zlib - Win32 LIB ASM Release"
-
-# Begin Custom Build - Assembling...
-IntDir=.\Win32_LIB_ASM_Release
-InputPath=..\..\contrib\masmx86\gvmat32.asm
-InputName=gvmat32
-
-"$(IntDir)\$(InputName).obj" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
-	ml.exe /nologo /c /coff /Cx /Fo"$(IntDir)\$(InputName).obj" "$(InputPath)"
-
-# End Custom Build
-
-!ELSEIF  "$(CFG)" == "zlib - Win32 LIB ASM Debug"
-
-# Begin Custom Build - Assembling...
-IntDir=.\Win32_LIB_ASM_Debug
-InputPath=..\..\contrib\masmx86\gvmat32.asm
-InputName=gvmat32
-
-"$(IntDir)\$(InputName).obj" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
-	ml.exe /nologo /c /coff /Cx /Zi /Fo"$(IntDir)\$(InputName).obj" "$(InputPath)"
-
-# End Custom Build
-
-!ENDIF 
-
-# End Source File
-# Begin Source File
-
-SOURCE=..\..\contrib\masmx86\gvmat32c.c
-
-!IF  "$(CFG)" == "zlib - Win32 DLL Release"
-
-# PROP Exclude_From_Build 1
-# ADD CPP /I "..\.."
-
-!ELSEIF  "$(CFG)" == "zlib - Win32 DLL Debug"
-
-# PROP Exclude_From_Build 1
-# ADD CPP /I "..\.."
-
-!ELSEIF  "$(CFG)" == "zlib - Win32 DLL ASM Release"
-
-# ADD CPP /I "..\.."
-
-!ELSEIF  "$(CFG)" == "zlib - Win32 DLL ASM Debug"
-
-# ADD CPP /I "..\.."
-
-!ELSEIF  "$(CFG)" == "zlib - Win32 LIB Release"
-
-# PROP Exclude_From_Build 1
-# ADD CPP /I "..\.."
-
-!ELSEIF  "$(CFG)" == "zlib - Win32 LIB Debug"
-
-# PROP Exclude_From_Build 1
-# ADD CPP /I "..\.."
-
-!ELSEIF  "$(CFG)" == "zlib - Win32 LIB ASM Release"
-
-# ADD CPP /I "..\.."
-
-!ELSEIF  "$(CFG)" == "zlib - Win32 LIB ASM Debug"
-
-# ADD CPP /I "..\.."
-
-!ENDIF 
-
-# End Source File
-# Begin Source File
-
-SOURCE=..\..\contrib\masmx86\inffas32.asm
-
-!IF  "$(CFG)" == "zlib - Win32 DLL Release"
-
-# PROP Exclude_From_Build 1
-
-!ELSEIF  "$(CFG)" == "zlib - Win32 DLL Debug"
-
-# PROP Exclude_From_Build 1
-
-!ELSEIF  "$(CFG)" == "zlib - Win32 DLL ASM Release"
-
-# Begin Custom Build - Assembling...
-IntDir=.\Win32_DLL_ASM_Release
-InputPath=..\..\contrib\masmx86\inffas32.asm
-InputName=inffas32
-
-"$(IntDir)\$(InputName).obj" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
-	ml.exe /nologo /c /coff /Cx /Fo"$(IntDir)\$(InputName).obj" "$(InputPath)"
-
-# End Custom Build
-
-!ELSEIF  "$(CFG)" == "zlib - Win32 DLL ASM Debug"
-
-# Begin Custom Build - Assembling...
-IntDir=.\Win32_DLL_ASM_Debug
-InputPath=..\..\contrib\masmx86\inffas32.asm
-InputName=inffas32
-
-"$(IntDir)\$(InputName).obj" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
-	ml.exe /nologo /c /coff /Cx /Zi /Fo"$(IntDir)\$(InputName).obj" "$(InputPath)"
-
-# End Custom Build
-
-!ELSEIF  "$(CFG)" == "zlib - Win32 LIB Release"
-
-# PROP Exclude_From_Build 1
-
-!ELSEIF  "$(CFG)" == "zlib - Win32 LIB Debug"
-
-# PROP Exclude_From_Build 1
-
-!ELSEIF  "$(CFG)" == "zlib - Win32 LIB ASM Release"
-
-# Begin Custom Build - Assembling...
-IntDir=.\Win32_LIB_ASM_Release
-InputPath=..\..\contrib\masmx86\inffas32.asm
-InputName=inffas32
-
-"$(IntDir)\$(InputName).obj" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
-	ml.exe /nologo /c /coff /Cx /Fo"$(IntDir)\$(InputName).obj" "$(InputPath)"
-
-# End Custom Build
-
-!ELSEIF  "$(CFG)" == "zlib - Win32 LIB ASM Debug"
-
-# Begin Custom Build - Assembling...
-IntDir=.\Win32_LIB_ASM_Debug
-InputPath=..\..\contrib\masmx86\inffas32.asm
-InputName=inffas32
-
-"$(IntDir)\$(InputName).obj" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
-	ml.exe /nologo /c /coff /Cx /Zi /Fo"$(IntDir)\$(InputName).obj" "$(InputPath)"
-
-# End Custom Build
-
-!ENDIF 
-
-# End Source File
-# End Group
-# Begin Source File
-
-SOURCE=.\README.txt
-# End Source File
-# End Target
-# End Project
Index: trunk/minix/lib/zlib-1.2.3/projects/visualc6/zlib.dsw
===================================================================
--- trunk/minix/lib/zlib-1.2.3/projects/visualc6/zlib.dsw	(revision 9)
+++ 	(revision )
@@ -1,59 +1,0 @@
-Microsoft Developer Studio Workspace File, Format Version 6.00
-# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE!
-
-###############################################################################
-
-Project: "example"=.\example.dsp - Package Owner=<4>
-
-Package=<5>
-{{{
-}}}
-
-Package=<4>
-{{{
-    Begin Project Dependency
-    Project_Dep_Name zlib
-    End Project Dependency
-}}}
-
-###############################################################################
-
-Project: "minigzip"=.\minigzip.dsp - Package Owner=<4>
-
-Package=<5>
-{{{
-}}}
-
-Package=<4>
-{{{
-    Begin Project Dependency
-    Project_Dep_Name zlib
-    End Project Dependency
-}}}
-
-###############################################################################
-
-Project: "zlib"=.\zlib.dsp - Package Owner=<4>
-
-Package=<5>
-{{{
-}}}
-
-Package=<4>
-{{{
-}}}
-
-###############################################################################
-
-Global:
-
-Package=<5>
-{{{
-}}}
-
-Package=<3>
-{{{
-}}}
-
-###############################################################################
-
Index: trunk/minix/lib/zlib-1.2.3/qnx/package.qpg
===================================================================
--- trunk/minix/lib/zlib-1.2.3/qnx/package.qpg	(revision 9)
+++ 	(revision )
@@ -1,141 +1,0 @@
-<QPG:Generation>
-   <QPG:Options>
-      <QPG:User unattended="no" verbosity="2" listfiles="yes"/>
-      <QPG:Defaults type="qnx_package"/>
-      <QPG:Source></QPG:Source>
-      <QPG:Release number="+"/>
-      <QPG:Build></QPG:Build>
-      <QPG:FileSorting strip="yes"/>
-      <QPG:Package targets="combine"/>
-      <QPG:Repository generate="yes"/>
-      <QPG:FinalDir></QPG:FinalDir>
-      <QPG:Cleanup></QPG:Cleanup>
-   </QPG:Options>
-
-   <QPG:Responsible>
-      <QPG:Company></QPG:Company>
-      <QPG:Department></QPG:Department>
-      <QPG:Group></QPG:Group>
-      <QPG:Team></QPG:Team>
-      <QPG:Employee></QPG:Employee>
-      <QPG:EmailAddress></QPG:EmailAddress>
-   </QPG:Responsible>
-
-   <QPG:Values>
-      <QPG:Files>
-         <QPG:Add file="../zconf.h" install="/opt/include/" user="root:sys" permission="644"/>
-         <QPG:Add file="../zlib.h" install="/opt/include/" user="root:sys" permission="644"/>
-         <QPG:Add file="../libz.so.1.2.3" install="/opt/lib/" user="root:bin" permission="644"/>
-         <QPG:Add file="libz.so" install="/opt/lib/" component="dev" filetype="symlink" linkto="libz.so.1.2.3"/>
-         <QPG:Add file="libz.so.1" install="/opt/lib/" filetype="symlink" linkto="libz.so.1.2.3"/>
-         <QPG:Add file="../libz.so.1.2.3" install="/opt/lib/" component="slib"/>
-      </QPG:Files>
-
-      <QPG:PackageFilter>
-         <QPM:PackageManifest>
-            <QPM:PackageDescription>
-               <QPM:PackageType>Library</QPM:PackageType>
-               <QPM:PackageReleaseNotes></QPM:PackageReleaseNotes>
-               <QPM:PackageReleaseUrgency>Medium</QPM:PackageReleaseUrgency>
-               <QPM:PackageRepository></QPM:PackageRepository>
-               <QPM:FileVersion>2.0</QPM:FileVersion>
-            </QPM:PackageDescription>
-
-            <QPM:ProductDescription>
-               <QPM:ProductName>zlib</QPM:ProductName>
-               <QPM:ProductIdentifier>zlib</QPM:ProductIdentifier>
-               <QPM:ProductEmail>alain.bonnefoy@icbt.com</QPM:ProductEmail>
-               <QPM:VendorName>Public</QPM:VendorName>
-               <QPM:VendorInstallName>public</QPM:VendorInstallName>
-               <QPM:VendorURL>www.gzip.org/zlib</QPM:VendorURL>
-               <QPM:VendorEmbedURL></QPM:VendorEmbedURL>
-               <QPM:VendorEmail></QPM:VendorEmail>
-               <QPM:AuthorName>Jean-Loup Gailly,Mark Adler</QPM:AuthorName>
-               <QPM:AuthorURL>www.gzip.org/zlib</QPM:AuthorURL>
-               <QPM:AuthorEmbedURL></QPM:AuthorEmbedURL>
-               <QPM:AuthorEmail>zlib@gzip.org</QPM:AuthorEmail>
-               <QPM:ProductIconSmall></QPM:ProductIconSmall>
-               <QPM:ProductIconLarge></QPM:ProductIconLarge>
-               <QPM:ProductDescriptionShort>A massively spiffy yet delicately unobtrusive compression library.</QPM:ProductDescriptionShort>
-               <QPM:ProductDescriptionLong>zlib is designed to be a free, general-purpose, legally unencumbered, lossless data compression library for use on virtually any computer hardware and operating system.</QPM:ProductDescriptionLong>
-               <QPM:ProductDescriptionURL>http://www.gzip.org/zlib</QPM:ProductDescriptionURL>
-               <QPM:ProductDescriptionEmbedURL></QPM:ProductDescriptionEmbedURL>
-            </QPM:ProductDescription>
-
-            <QPM:ReleaseDescription>
-               <QPM:ReleaseVersion>1.2.3</QPM:ReleaseVersion>
-               <QPM:ReleaseUrgency>Medium</QPM:ReleaseUrgency>
-               <QPM:ReleaseStability>Stable</QPM:ReleaseStability>
-               <QPM:ReleaseNoteMinor></QPM:ReleaseNoteMinor>
-               <QPM:ReleaseNoteMajor></QPM:ReleaseNoteMajor>
-               <QPM:ExcludeCountries>
-                  <QPM:Country></QPM:Country>
-               </QPM:ExcludeCountries>
-
-               <QPM:ReleaseCopyright>No License</QPM:ReleaseCopyright>
-            </QPM:ReleaseDescription>
-
-            <QPM:ContentDescription>
-               <QPM:ContentTopic xmlmultiple="true">Software Development/Libraries and Extensions/C Libraries</QPM:ContentTopic>
-               <QPM:ContentKeyword>zlib,compression</QPM:ContentKeyword>
-               <QPM:TargetOS>qnx6</QPM:TargetOS>
-               <QPM:HostOS>qnx6</QPM:HostOS>
-               <QPM:DisplayEnvironment xmlmultiple="true">None</QPM:DisplayEnvironment>
-               <QPM:TargetAudience xmlmultiple="true">Developer</QPM:TargetAudience>
-            </QPM:ContentDescription>
-         </QPM:PackageManifest>
-      </QPG:PackageFilter>
-
-      <QPG:PackageFilter proc="none" target="none">
-         <QPM:PackageManifest>
-            <QPM:ProductInstallationDependencies>
-               <QPM:ProductRequirements></QPM:ProductRequirements>
-            </QPM:ProductInstallationDependencies>
-
-            <QPM:ProductInstallationProcedure>
-               <QPM:Script xmlmultiple="true">
-                  <QPM:ScriptName></QPM:ScriptName>
-                  <QPM:ScriptType>Install</QPM:ScriptType>
-                  <QPM:ScriptTiming>Post</QPM:ScriptTiming>
-                  <QPM:ScriptBlocking>No</QPM:ScriptBlocking>
-                  <QPM:ScriptResult>Ignore</QPM:ScriptResult>
-                  <QPM:ShortDescription></QPM:ShortDescription>
-                  <QPM:UseBinaries>No</QPM:UseBinaries>
-                  <QPM:Priority>Optional</QPM:Priority>
-               </QPM:Script>
-            </QPM:ProductInstallationProcedure>
-         </QPM:PackageManifest>
-
-         <QPM:Launch>
-         </QPM:Launch>
-      </QPG:PackageFilter>
-
-      <QPG:PackageFilter type="core" component="none">
-         <QPM:PackageManifest>
-            <QPM:ProductInstallationProcedure>
-	       <QPM:OrderDependency xmlmultiple="true">
-	          <QPM:Order>InstallOver</QPM:Order>
-	          <QPM:Product>zlib</QPM:Product>
-	       </QPM:OrderDependency>
-            </QPM:ProductInstallationProcedure>
-         </QPM:PackageManifest>
-
-         <QPM:Launch>
-         </QPM:Launch>
-      </QPG:PackageFilter>
-
-      <QPG:PackageFilter type="core" component="dev">
-         <QPM:PackageManifest>
-            <QPM:ProductInstallationProcedure>
-	       <QPM:OrderDependency xmlmultiple="true">
-	          <QPM:Order>InstallOver</QPM:Order>
-	          <QPM:Product>zlib-dev</QPM:Product>
-	       </QPM:OrderDependency>
-            </QPM:ProductInstallationProcedure>
-         </QPM:PackageManifest>
-
-         <QPM:Launch>
-         </QPM:Launch>
-      </QPG:PackageFilter>
-   </QPG:Values>
-</QPG:Generation>
Index: trunk/minix/lib/zlib-1.2.3/trees.c
===================================================================
--- trunk/minix/lib/zlib-1.2.3/trees.c	(revision 9)
+++ 	(revision )
@@ -1,1219 +1,0 @@
-/* trees.c -- output deflated data using Huffman coding
- * Copyright (C) 1995-2005 Jean-loup Gailly
- * For conditions of distribution and use, see copyright notice in zlib.h
- */
-
-/*
- *  ALGORITHM
- *
- *      The "deflation" process uses several Huffman trees. The more
- *      common source values are represented by shorter bit sequences.
- *
- *      Each code tree is stored in a compressed form which is itself
- * a Huffman encoding of the lengths of all the code strings (in
- * ascending order by source values).  The actual code strings are
- * reconstructed from the lengths in the inflate process, as described
- * in the deflate specification.
- *
- *  REFERENCES
- *
- *      Deutsch, L.P.,"'Deflate' Compressed Data Format Specification".
- *      Available in ftp.uu.net:/pub/archiving/zip/doc/deflate-1.1.doc
- *
- *      Storer, James A.
- *          Data Compression:  Methods and Theory, pp. 49-50.
- *          Computer Science Press, 1988.  ISBN 0-7167-8156-5.
- *
- *      Sedgewick, R.
- *          Algorithms, p290.
- *          Addison-Wesley, 1983. ISBN 0-201-06672-6.
- */
-
-/* @(#) $Id: trees.c,v 1.1 2005/09/23 22:39:00 beng Exp $ */
-
-/* #define GEN_TREES_H */
-
-#include "deflate.h"
-
-#ifdef DEBUG
-#  include <ctype.h>
-#endif
-
-/* ===========================================================================
- * Constants
- */
-
-#define MAX_BL_BITS 7
-/* Bit length codes must not exceed MAX_BL_BITS bits */
-
-#define END_BLOCK 256
-/* end of block literal code */
-
-#define REP_3_6      16
-/* repeat previous bit length 3-6 times (2 bits of repeat count) */
-
-#define REPZ_3_10    17
-/* repeat a zero length 3-10 times  (3 bits of repeat count) */
-
-#define REPZ_11_138  18
-/* repeat a zero length 11-138 times  (7 bits of repeat count) */
-
-local const int extra_lbits[LENGTH_CODES] /* extra bits for each length code */
-   = {0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0};
-
-local const int extra_dbits[D_CODES] /* extra bits for each distance code */
-   = {0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13};
-
-local const int extra_blbits[BL_CODES]/* extra bits for each bit length code */
-   = {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7};
-
-local const uch bl_order[BL_CODES]
-   = {16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15};
-/* The lengths of the bit length codes are sent in order of decreasing
- * probability, to avoid transmitting the lengths for unused bit length codes.
- */
-
-#define Buf_size (8 * 2*sizeof(char))
-/* Number of bits used within bi_buf. (bi_buf might be implemented on
- * more than 16 bits on some systems.)
- */
-
-/* ===========================================================================
- * Local data. These are initialized only once.
- */
-
-#define DIST_CODE_LEN  512 /* see definition of array dist_code below */
-
-#if defined(GEN_TREES_H) || !defined(STDC)
-/* non ANSI compilers may not accept trees.h */
-
-local ct_data static_ltree[L_CODES+2];
-/* The static literal tree. Since the bit lengths are imposed, there is no
- * need for the L_CODES extra codes used during heap construction. However
- * The codes 286 and 287 are needed to build a canonical tree (see _tr_init
- * below).
- */
-
-local ct_data static_dtree[D_CODES];
-/* The static distance tree. (Actually a trivial tree since all codes use
- * 5 bits.)
- */
-
-uch _dist_code[DIST_CODE_LEN];
-/* Distance codes. The first 256 values correspond to the distances
- * 3 .. 258, the last 256 values correspond to the top 8 bits of
- * the 15 bit distances.
- */
-
-uch _length_code[MAX_MATCH-MIN_MATCH+1];
-/* length code for each normalized match length (0 == MIN_MATCH) */
-
-local int base_length[LENGTH_CODES];
-/* First normalized length for each code (0 = MIN_MATCH) */
-
-local int base_dist[D_CODES];
-/* First normalized distance for each code (0 = distance of 1) */
-
-#else
-#  include "trees.h"
-#endif /* GEN_TREES_H */
-
-struct static_tree_desc_s {
-    const ct_data *static_tree;  /* static tree or NULL */
-    const intf *extra_bits;      /* extra bits for each code or NULL */
-    int     extra_base;          /* base index for extra_bits */
-    int     elems;               /* max number of elements in the tree */
-    int     max_length;          /* max bit length for the codes */
-};
-
-local static_tree_desc  static_l_desc =
-{static_ltree, extra_lbits, LITERALS+1, L_CODES, MAX_BITS};
-
-local static_tree_desc  static_d_desc =
-{static_dtree, extra_dbits, 0,          D_CODES, MAX_BITS};
-
-local static_tree_desc  static_bl_desc =
-{(const ct_data *)0, extra_blbits, 0,   BL_CODES, MAX_BL_BITS};
-
-/* ===========================================================================
- * Local (static) routines in this file.
- */
-
-local void tr_static_init OF((void));
-local void init_block     OF((deflate_state *s));
-local void pqdownheap     OF((deflate_state *s, ct_data *tree, int k));
-local void gen_bitlen     OF((deflate_state *s, tree_desc *desc));
-local void gen_codes      OF((ct_data *tree, int max_code, ushf *bl_count));
-local void build_tree     OF((deflate_state *s, tree_desc *desc));
-local void scan_tree      OF((deflate_state *s, ct_data *tree, int max_code));
-local void send_tree      OF((deflate_state *s, ct_data *tree, int max_code));
-local int  build_bl_tree  OF((deflate_state *s));
-local void send_all_trees OF((deflate_state *s, int lcodes, int dcodes,
-                              int blcodes));
-local void compress_block OF((deflate_state *s, ct_data *ltree,
-                              ct_data *dtree));
-local void set_data_type  OF((deflate_state *s));
-local unsigned bi_reverse OF((unsigned value, int length));
-local void bi_windup      OF((deflate_state *s));
-local void bi_flush       OF((deflate_state *s));
-local void copy_block     OF((deflate_state *s, charf *buf, unsigned len,
-                              int header));
-
-#ifdef GEN_TREES_H
-local void gen_trees_header OF((void));
-#endif
-
-#ifndef DEBUG
-#  define send_code(s, c, tree) send_bits(s, tree[c].Code, tree[c].Len)
-   /* Send a code of the given tree. c and tree must not have side effects */
-
-#else /* DEBUG */
-#  define send_code(s, c, tree) \
-     { if (z_verbose>2) fprintf(stderr,"\ncd %3d ",(c)); \
-       send_bits(s, tree[c].Code, tree[c].Len); }
-#endif
-
-/* ===========================================================================
- * Output a short LSB first on the stream.
- * IN assertion: there is enough room in pendingBuf.
- */
-#define put_short(s, w) { \
-    put_byte(s, (uch)((w) & 0xff)); \
-    put_byte(s, (uch)((ush)(w) >> 8)); \
-}
-
-/* ===========================================================================
- * Send a value on a given number of bits.
- * IN assertion: length <= 16 and value fits in length bits.
- */
-#ifdef DEBUG
-local void send_bits      OF((deflate_state *s, int value, int length));
-
-local void send_bits(s, value, length)
-    deflate_state *s;
-    int value;  /* value to send */
-    int length; /* number of bits */
-{
-    Tracevv((stderr," l %2d v %4x ", length, value));
-    Assert(length > 0 && length <= 15, "invalid length");
-    s->bits_sent += (ulg)length;
-
-    /* If not enough room in bi_buf, use (valid) bits from bi_buf and
-     * (16 - bi_valid) bits from value, leaving (width - (16-bi_valid))
-     * unused bits in value.
-     */
-    if (s->bi_valid > (int)Buf_size - length) {
-        s->bi_buf |= (value << s->bi_valid);
-        put_short(s, s->bi_buf);
-        s->bi_buf = (ush)value >> (Buf_size - s->bi_valid);
-        s->bi_valid += length - Buf_size;
-    } else {
-        s->bi_buf |= value << s->bi_valid;
-        s->bi_valid += length;
-    }
-}
-#else /* !DEBUG */
-
-#define send_bits(s, value, length) \
-{ int len = length;\
-  if (s->bi_valid > (int)Buf_size - len) {\
-    int val = value;\
-    s->bi_buf |= (val << s->bi_valid);\
-    put_short(s, s->bi_buf);\
-    s->bi_buf = (ush)val >> (Buf_size - s->bi_valid);\
-    s->bi_valid += len - Buf_size;\
-  } else {\
-    s->bi_buf |= (value) << s->bi_valid;\
-    s->bi_valid += len;\
-  }\
-}
-#endif /* DEBUG */
-
-
-/* the arguments must not have side effects */
-
-/* ===========================================================================
- * Initialize the various 'constant' tables.
- */
-local void tr_static_init()
-{
-#if defined(GEN_TREES_H) || !defined(STDC)
-    static int static_init_done = 0;
-    int n;        /* iterates over tree elements */
-    int bits;     /* bit counter */
-    int length;   /* length value */
-    int code;     /* code value */
-    int dist;     /* distance index */
-    ush bl_count[MAX_BITS+1];
-    /* number of codes at each bit length for an optimal tree */
-
-    if (static_init_done) return;
-
-    /* For some embedded targets, global variables are not initialized: */
-    static_l_desc.static_tree = static_ltree;
-    static_l_desc.extra_bits = extra_lbits;
-    static_d_desc.static_tree = static_dtree;
-    static_d_desc.extra_bits = extra_dbits;
-    static_bl_desc.extra_bits = extra_blbits;
-
-    /* Initialize the mapping length (0..255) -> length code (0..28) */
-    length = 0;
-    for (code = 0; code < LENGTH_CODES-1; code++) {
-        base_length[code] = length;
-        for (n = 0; n < (1<<extra_lbits[code]); n++) {
-            _length_code[length++] = (uch)code;
-        }
-    }
-    Assert (length == 256, "tr_static_init: length != 256");
-    /* Note that the length 255 (match length 258) can be represented
-     * in two different ways: code 284 + 5 bits or code 285, so we
-     * overwrite length_code[255] to use the best encoding:
-     */
-    _length_code[length-1] = (uch)code;
-
-    /* Initialize the mapping dist (0..32K) -> dist code (0..29) */
-    dist = 0;
-    for (code = 0 ; code < 16; code++) {
-        base_dist[code] = dist;
-        for (n = 0; n < (1<<extra_dbits[code]); n++) {
-            _dist_code[dist++] = (uch)code;
-        }
-    }
-    Assert (dist == 256, "tr_static_init: dist != 256");
-    dist >>= 7; /* from now on, all distances are divided by 128 */
-    for ( ; code < D_CODES; code++) {
-        base_dist[code] = dist << 7;
-        for (n = 0; n < (1<<(extra_dbits[code]-7)); n++) {
-            _dist_code[256 + dist++] = (uch)code;
-        }
-    }
-    Assert (dist == 256, "tr_static_init: 256+dist != 512");
-
-    /* Construct the codes of the static literal tree */
-    for (bits = 0; bits <= MAX_BITS; bits++) bl_count[bits] = 0;
-    n = 0;
-    while (n <= 143) static_ltree[n++].Len = 8, bl_count[8]++;
-    while (n <= 255) static_ltree[n++].Len = 9, bl_count[9]++;
-    while (n <= 279) static_ltree[n++].Len = 7, bl_count[7]++;
-    while (n <= 287) static_ltree[n++].Len = 8, bl_count[8]++;
-    /* Codes 286 and 287 do not exist, but we must include them in the
-     * tree construction to get a canonical Huffman tree (longest code
-     * all ones)
-     */
-    gen_codes((ct_data *)static_ltree, L_CODES+1, bl_count);
-
-    /* The static distance tree is trivial: */
-    for (n = 0; n < D_CODES; n++) {
-        static_dtree[n].Len = 5;
-        static_dtree[n].Code = bi_reverse((unsigned)n, 5);
-    }
-    static_init_done = 1;
-
-#  ifdef GEN_TREES_H
-    gen_trees_header();
-#  endif
-#endif /* defined(GEN_TREES_H) || !defined(STDC) */
-}
-
-/* ===========================================================================
- * Genererate the file trees.h describing the static trees.
- */
-#ifdef GEN_TREES_H
-#  ifndef DEBUG
-#    include <stdio.h>
-#  endif
-
-#  define SEPARATOR(i, last, width) \
-      ((i) == (last)? "\n};\n\n" :    \
-       ((i) % (width) == (width)-1 ? ",\n" : ", "))
-
-void gen_trees_header()
-{
-    FILE *header = fopen("trees.h", "w");
-    int i;
-
-    Assert (header != NULL, "Can't open trees.h");
-    fprintf(header,
-            "/* header created automatically with -DGEN_TREES_H */\n\n");
-
-    fprintf(header, "local const ct_data static_ltree[L_CODES+2] = {\n");
-    for (i = 0; i < L_CODES+2; i++) {
-        fprintf(header, "{{%3u},{%3u}}%s", static_ltree[i].Code,
-                static_ltree[i].Len, SEPARATOR(i, L_CODES+1, 5));
-    }
-
-    fprintf(header, "local const ct_data static_dtree[D_CODES] = {\n");
-    for (i = 0; i < D_CODES; i++) {
-        fprintf(header, "{{%2u},{%2u}}%s", static_dtree[i].Code,
-                static_dtree[i].Len, SEPARATOR(i, D_CODES-1, 5));
-    }
-
-    fprintf(header, "const uch _dist_code[DIST_CODE_LEN] = {\n");
-    for (i = 0; i < DIST_CODE_LEN; i++) {
-        fprintf(header, "%2u%s", _dist_code[i],
-                SEPARATOR(i, DIST_CODE_LEN-1, 20));
-    }
-
-    fprintf(header, "const uch _length_code[MAX_MATCH-MIN_MATCH+1]= {\n");
-    for (i = 0; i < MAX_MATCH-MIN_MATCH+1; i++) {
-        fprintf(header, "%2u%s", _length_code[i],
-                SEPARATOR(i, MAX_MATCH-MIN_MATCH, 20));
-    }
-
-    fprintf(header, "local const int base_length[LENGTH_CODES] = {\n");
-    for (i = 0; i < LENGTH_CODES; i++) {
-        fprintf(header, "%1u%s", base_length[i],
-                SEPARATOR(i, LENGTH_CODES-1, 20));
-    }
-
-    fprintf(header, "local const int base_dist[D_CODES] = {\n");
-    for (i = 0; i < D_CODES; i++) {
-        fprintf(header, "%5u%s", base_dist[i],
-                SEPARATOR(i, D_CODES-1, 10));
-    }
-
-    fclose(header);
-}
-#endif /* GEN_TREES_H */
-
-/* ===========================================================================
- * Initialize the tree data structures for a new zlib stream.
- */
-void _tr_init(s)
-    deflate_state *s;
-{
-    tr_static_init();
-
-    s->l_desc.dyn_tree = s->dyn_ltree;
-    s->l_desc.stat_desc = &static_l_desc;
-
-    s->d_desc.dyn_tree = s->dyn_dtree;
-    s->d_desc.stat_desc = &static_d_desc;
-
-    s->bl_desc.dyn_tree = s->bl_tree;
-    s->bl_desc.stat_desc = &static_bl_desc;
-
-    s->bi_buf = 0;
-    s->bi_valid = 0;
-    s->last_eob_len = 8; /* enough lookahead for inflate */
-#ifdef DEBUG
-    s->compressed_len = 0L;
-    s->bits_sent = 0L;
-#endif
-
-    /* Initialize the first block of the first file: */
-    init_block(s);
-}
-
-/* ===========================================================================
- * Initialize a new block.
- */
-local void init_block(s)
-    deflate_state *s;
-{
-    int n; /* iterates over tree elements */
-
-    /* Initialize the trees. */
-    for (n = 0; n < L_CODES;  n++) s->dyn_ltree[n].Freq = 0;
-    for (n = 0; n < D_CODES;  n++) s->dyn_dtree[n].Freq = 0;
-    for (n = 0; n < BL_CODES; n++) s->bl_tree[n].Freq = 0;
-
-    s->dyn_ltree[END_BLOCK].Freq = 1;
-    s->opt_len = s->static_len = 0L;
-    s->last_lit = s->matches = 0;
-}
-
-#define SMALLEST 1
-/* Index within the heap array of least frequent node in the Huffman tree */
-
-
-/* ===========================================================================
- * Remove the smallest element from the heap and recreate the heap with
- * one less element. Updates heap and heap_len.
- */
-#define pqremove(s, tree, top) \
-{\
-    top = s->heap[SMALLEST]; \
-    s->heap[SMALLEST] = s->heap[s->heap_len--]; \
-    pqdownheap(s, tree, SMALLEST); \
-}
-
-/* ===========================================================================
- * Compares to subtrees, using the tree depth as tie breaker when
- * the subtrees have equal frequency. This minimizes the worst case length.
- */
-#define smaller(tree, n, m, depth) \
-   (tree[n].Freq < tree[m].Freq || \
-   (tree[n].Freq == tree[m].Freq && depth[n] <= depth[m]))
-
-/* ===========================================================================
- * Restore the heap property by moving down the tree starting at node k,
- * exchanging a node with the smallest of its two sons if necessary, stopping
- * when the heap property is re-established (each father smaller than its
- * two sons).
- */
-local void pqdownheap(s, tree, k)
-    deflate_state *s;
-    ct_data *tree;  /* the tree to restore */
-    int k;               /* node to move down */
-{
-    int v = s->heap[k];
-    int j = k << 1;  /* left son of k */
-    while (j <= s->heap_len) {
-        /* Set j to the smallest of the two sons: */
-        if (j < s->heap_len &&
-            smaller(tree, s->heap[j+1], s->heap[j], s->depth)) {
-            j++;
-        }
-        /* Exit if v is smaller than both sons */
-        if (smaller(tree, v, s->heap[j], s->depth)) break;
-
-        /* Exchange v with the smallest son */
-        s->heap[k] = s->heap[j];  k = j;
-
-        /* And continue down the tree, setting j to the left son of k */
-        j <<= 1;
-    }
-    s->heap[k] = v;
-}
-
-/* ===========================================================================
- * Compute the optimal bit lengths for a tree and update the total bit length
- * for the current block.
- * IN assertion: the fields freq and dad are set, heap[heap_max] and
- *    above are the tree nodes sorted by increasing frequency.
- * OUT assertions: the field len is set to the optimal bit length, the
- *     array bl_count contains the frequencies for each bit length.
- *     The length opt_len is updated; static_len is also updated if stree is
- *     not null.
- */
-local void gen_bitlen(s, desc)
-    deflate_state *s;
-    tree_desc *desc;    /* the tree descriptor */
-{
-    ct_data *tree        = desc->dyn_tree;
-    int max_code         = desc->max_code;
-    const ct_data *stree = desc->stat_desc->static_tree;
-    const intf *extra    = desc->stat_desc->extra_bits;
-    int base             = desc->stat_desc->extra_base;
-    int max_length       = desc->stat_desc->max_length;
-    int h;              /* heap index */
-    int n, m;           /* iterate over the tree elements */
-    int bits;           /* bit length */
-    int xbits;          /* extra bits */
-    ush f;              /* frequency */
-    int overflow = 0;   /* number of elements with bit length too large */
-
-    for (bits = 0; bits <= MAX_BITS; bits++) s->bl_count[bits] = 0;
-
-    /* In a first pass, compute the optimal bit lengths (which may
-     * overflow in the case of the bit length tree).
-     */
-    tree[s->heap[s->heap_max]].Len = 0; /* root of the heap */
-
-    for (h = s->heap_max+1; h < HEAP_SIZE; h++) {
-        n = s->heap[h];
-        bits = tree[tree[n].Dad].Len + 1;
-        if (bits > max_length) bits = max_length, overflow++;
-        tree[n].Len = (ush)bits;
-        /* We overwrite tree[n].Dad which is no longer needed */
-
-        if (n > max_code) continue; /* not a leaf node */
-
-        s->bl_count[bits]++;
-        xbits = 0;
-        if (n >= base) xbits = extra[n-base];
-        f = tree[n].Freq;
-        s->opt_len += (ulg)f * (bits + xbits);
-        if (stree) s->static_len += (ulg)f * (stree[n].Len + xbits);
-    }
-    if (overflow == 0) return;
-
-    Trace((stderr,"\nbit length overflow\n"));
-    /* This happens for example on obj2 and pic of the Calgary corpus */
-
-    /* Find the first bit length which could increase: */
-    do {
-        bits = max_length-1;
-        while (s->bl_count[bits] == 0) bits--;
-        s->bl_count[bits]--;      /* move one leaf down the tree */
-        s->bl_count[bits+1] += 2; /* move one overflow item as its brother */
-        s->bl_count[max_length]--;
-        /* The brother of the overflow item also moves one step up,
-         * but this does not affect bl_count[max_length]
-         */
-        overflow -= 2;
-    } while (overflow > 0);
-
-    /* Now recompute all bit lengths, scanning in increasing frequency.
-     * h is still equal to HEAP_SIZE. (It is simpler to reconstruct all
-     * lengths instead of fixing only the wrong ones. This idea is taken
-     * from 'ar' written by Haruhiko Okumura.)
-     */
-    for (bits = max_length; bits != 0; bits--) {
-        n = s->bl_count[bits];
-        while (n != 0) {
-            m = s->heap[--h];
-            if (m > max_code) continue;
-            if ((unsigned) tree[m].Len != (unsigned) bits) {
-                Trace((stderr,"code %d bits %d->%d\n", m, tree[m].Len, bits));
-                s->opt_len += ((long)bits - (long)tree[m].Len)
-                              *(long)tree[m].Freq;
-                tree[m].Len = (ush)bits;
-            }
-            n--;
-        }
-    }
-}
-
-/* ===========================================================================
- * Generate the codes for a given tree and bit counts (which need not be
- * optimal).
- * IN assertion: the array bl_count contains the bit length statistics for
- * the given tree and the field len is set for all tree elements.
- * OUT assertion: the field code is set for all tree elements of non
- *     zero code length.
- */
-local void gen_codes (tree, max_code, bl_count)
-    ct_data *tree;             /* the tree to decorate */
-    int max_code;              /* largest code with non zero frequency */
-    ushf *bl_count;            /* number of codes at each bit length */
-{
-    ush next_code[MAX_BITS+1]; /* next code value for each bit length */
-    ush code = 0;              /* running code value */
-    int bits;                  /* bit index */
-    int n;                     /* code index */
-
-    /* The distribution counts are first used to generate the code values
-     * without bit reversal.
-     */
-    for (bits = 1; bits <= MAX_BITS; bits++) {
-        next_code[bits] = code = (code + bl_count[bits-1]) << 1;
-    }
-    /* Check that the bit counts in bl_count are consistent. The last code
-     * must be all ones.
-     */
-    Assert (code + bl_count[MAX_BITS]-1 == (1<<MAX_BITS)-1,
-            "inconsistent bit counts");
-    Tracev((stderr,"\ngen_codes: max_code %d ", max_code));
-
-    for (n = 0;  n <= max_code; n++) {
-        int len = tree[n].Len;
-        if (len == 0) continue;
-        /* Now reverse the bits */
-        tree[n].Code = bi_reverse(next_code[len]++, len);
-
-        Tracecv(tree != static_ltree, (stderr,"\nn %3d %c l %2d c %4x (%x) ",
-             n, (isgraph(n) ? n : ' '), len, tree[n].Code, next_code[len]-1));
-    }
-}
-
-/* ===========================================================================
- * Construct one Huffman tree and assigns the code bit strings and lengths.
- * Update the total bit length for the current block.
- * IN assertion: the field freq is set for all tree elements.
- * OUT assertions: the fields len and code are set to the optimal bit length
- *     and corresponding code. The length opt_len is updated; static_len is
- *     also updated if stree is not null. The field max_code is set.
- */
-local void build_tree(s, desc)
-    deflate_state *s;
-    tree_desc *desc; /* the tree descriptor */
-{
-    ct_data *tree         = desc->dyn_tree;
-    const ct_data *stree  = desc->stat_desc->static_tree;
-    int elems             = desc->stat_desc->elems;
-    int n, m;          /* iterate over heap elements */
-    int max_code = -1; /* largest code with non zero frequency */
-    int node;          /* new node being created */
-
-    /* Construct the initial heap, with least frequent element in
-     * heap[SMALLEST]. The sons of heap[n] are heap[2*n] and heap[2*n+1].
-     * heap[0] is not used.
-     */
-    s->heap_len = 0, s->heap_max = HEAP_SIZE;
-
-    for (n = 0; n < elems; n++) {
-        if (tree[n].Freq != 0) {
-            s->heap[++(s->heap_len)] = max_code = n;
-            s->depth[n] = 0;
-        } else {
-            tree[n].Len = 0;
-        }
-    }
-
-    /* The pkzip format requires that at least one distance code exists,
-     * and that at least one bit should be sent even if there is only one
-     * possible code. So to avoid special checks later on we force at least
-     * two codes of non zero frequency.
-     */
-    while (s->heap_len < 2) {
-        node = s->heap[++(s->heap_len)] = (max_code < 2 ? ++max_code : 0);
-        tree[node].Freq = 1;
-        s->depth[node] = 0;
-        s->opt_len--; if (stree) s->static_len -= stree[node].Len;
-        /* node is 0 or 1 so it does not have extra bits */
-    }
-    desc->max_code = max_code;
-
-    /* The elements heap[heap_len/2+1 .. heap_len] are leaves of the tree,
-     * establish sub-heaps of increasing lengths:
-     */
-    for (n = s->heap_len/2; n >= 1; n--) pqdownheap(s, tree, n);
-
-    /* Construct the Huffman tree by repeatedly combining the least two
-     * frequent nodes.
-     */
-    node = elems;              /* next internal node of the tree */
-    do {
-        pqremove(s, tree, n);  /* n = node of least frequency */
-        m = s->heap[SMALLEST]; /* m = node of next least frequency */
-
-        s->heap[--(s->heap_max)] = n; /* keep the nodes sorted by frequency */
-        s->heap[--(s->heap_max)] = m;
-
-        /* Create a new node father of n and m */
-        tree[node].Freq = tree[n].Freq + tree[m].Freq;
-        s->depth[node] = (uch)((s->depth[n] >= s->depth[m] ?
-                                s->depth[n] : s->depth[m]) + 1);
-        tree[n].Dad = tree[m].Dad = (ush)node;
-#ifdef DUMP_BL_TREE
-        if (tree == s->bl_tree) {
-            fprintf(stderr,"\nnode %d(%d), sons %d(%d) %d(%d)",
-                    node, tree[node].Freq, n, tree[n].Freq, m, tree[m].Freq);
-        }
-#endif
-        /* and insert the new node in the heap */
-        s->heap[SMALLEST] = node++;
-        pqdownheap(s, tree, SMALLEST);
-
-    } while (s->heap_len >= 2);
-
-    s->heap[--(s->heap_max)] = s->heap[SMALLEST];
-
-    /* At this point, the fields freq and dad are set. We can now
-     * generate the bit lengths.
-     */
-    gen_bitlen(s, (tree_desc *)desc);
-
-    /* The field len is now set, we can generate the bit codes */
-    gen_codes ((ct_data *)tree, max_code, s->bl_count);
-}
-
-/* ===========================================================================
- * Scan a literal or distance tree to determine the frequencies of the codes
- * in the bit length tree.
- */
-local void scan_tree (s, tree, max_code)
-    deflate_state *s;
-    ct_data *tree;   /* the tree to be scanned */
-    int max_code;    /* and its largest code of non zero frequency */
-{
-    int n;                     /* iterates over all tree elements */
-    int prevlen = -1;          /* last emitted length */
-    int curlen;                /* length of current code */
-    int nextlen = tree[0].Len; /* length of next code */
-    int count = 0;             /* repeat count of the current code */
-    int max_count = 7;         /* max repeat count */
-    int min_count = 4;         /* min repeat count */
-
-    if (nextlen == 0) max_count = 138, min_count = 3;
-    tree[max_code+1].Len = (ush)0xffff; /* guard */
-
-    for (n = 0; n <= max_code; n++) {
-        curlen = nextlen; nextlen = tree[n+1].Len;
-        if (++count < max_count && curlen == nextlen) {
-            continue;
-        } else if (count < min_count) {
-            s->bl_tree[curlen].Freq += count;
-        } else if (curlen != 0) {
-            if (curlen != prevlen) s->bl_tree[curlen].Freq++;
-            s->bl_tree[REP_3_6].Freq++;
-        } else if (count <= 10) {
-            s->bl_tree[REPZ_3_10].Freq++;
-        } else {
-            s->bl_tree[REPZ_11_138].Freq++;
-        }
-        count = 0; prevlen = curlen;
-        if (nextlen == 0) {
-            max_count = 138, min_count = 3;
-        } else if (curlen == nextlen) {
-            max_count = 6, min_count = 3;
-        } else {
-            max_count = 7, min_count = 4;
-        }
-    }
-}
-
-/* ===========================================================================
- * Send a literal or distance tree in compressed form, using the codes in
- * bl_tree.
- */
-local void send_tree (s, tree, max_code)
-    deflate_state *s;
-    ct_data *tree; /* the tree to be scanned */
-    int max_code;       /* and its largest code of non zero frequency */
-{
-    int n;                     /* iterates over all tree elements */
-    int prevlen = -1;          /* last emitted length */
-    int curlen;                /* length of current code */
-    int nextlen = tree[0].Len; /* length of next code */
-    int count = 0;             /* repeat count of the current code */
-    int max_count = 7;         /* max repeat count */
-    int min_count = 4;         /* min repeat count */
-
-    /* tree[max_code+1].Len = -1; */  /* guard already set */
-    if (nextlen == 0) max_count = 138, min_count = 3;
-
-    for (n = 0; n <= max_code; n++) {
-        curlen = nextlen; nextlen = tree[n+1].Len;
-        if (++count < max_count && curlen == nextlen) {
-            continue;
-        } else if (count < min_count) {
-            do { send_code(s, curlen, s->bl_tree); } while (--count != 0);
-
-        } else if (curlen != 0) {
-            if (curlen != prevlen) {
-                send_code(s, curlen, s->bl_tree); count--;
-            }
-            Assert(count >= 3 && count <= 6, " 3_6?");
-            send_code(s, REP_3_6, s->bl_tree); send_bits(s, count-3, 2);
-
-        } else if (count <= 10) {
-            send_code(s, REPZ_3_10, s->bl_tree); send_bits(s, count-3, 3);
-
-        } else {
-            send_code(s, REPZ_11_138, s->bl_tree); send_bits(s, count-11, 7);
-        }
-        count = 0; prevlen = curlen;
-        if (nextlen == 0) {
-            max_count = 138, min_count = 3;
-        } else if (curlen == nextlen) {
-            max_count = 6, min_count = 3;
-        } else {
-            max_count = 7, min_count = 4;
-        }
-    }
-}
-
-/* ===========================================================================
- * Construct the Huffman tree for the bit lengths and return the index in
- * bl_order of the last bit length code to send.
- */
-local int build_bl_tree(s)
-    deflate_state *s;
-{
-    int max_blindex;  /* index of last bit length code of non zero freq */
-
-    /* Determine the bit length frequencies for literal and distance trees */
-    scan_tree(s, (ct_data *)s->dyn_ltree, s->l_desc.max_code);
-    scan_tree(s, (ct_data *)s->dyn_dtree, s->d_desc.max_code);
-
-    /* Build the bit length tree: */
-    build_tree(s, (tree_desc *)(&(s->bl_desc)));
-    /* opt_len now includes the length of the tree representations, except
-     * the lengths of the bit lengths codes and the 5+5+4 bits for the counts.
-     */
-
-    /* Determine the number of bit length codes to send. The pkzip format
-     * requires that at least 4 bit length codes be sent. (appnote.txt says
-     * 3 but the actual value used is 4.)
-     */
-    for (max_blindex = BL_CODES-1; max_blindex >= 3; max_blindex--) {
-        if (s->bl_tree[bl_order[max_blindex]].Len != 0) break;
-    }
-    /* Update opt_len to include the bit length tree and counts */
-    s->opt_len += 3*(max_blindex+1) + 5+5+4;
-    Tracev((stderr, "\ndyn trees: dyn %ld, stat %ld",
-            s->opt_len, s->static_len));
-
-    return max_blindex;
-}
-
-/* ===========================================================================
- * Send the header for a block using dynamic Huffman trees: the counts, the
- * lengths of the bit length codes, the literal tree and the distance tree.
- * IN assertion: lcodes >= 257, dcodes >= 1, blcodes >= 4.
- */
-local void send_all_trees(s, lcodes, dcodes, blcodes)
-    deflate_state *s;
-    int lcodes, dcodes, blcodes; /* number of codes for each tree */
-{
-    int rank;                    /* index in bl_order */
-
-    Assert (lcodes >= 257 && dcodes >= 1 && blcodes >= 4, "not enough codes");
-    Assert (lcodes <= L_CODES && dcodes <= D_CODES && blcodes <= BL_CODES,
-            "too many codes");
-    Tracev((stderr, "\nbl counts: "));
-    send_bits(s, lcodes-257, 5); /* not +255 as stated in appnote.txt */
-    send_bits(s, dcodes-1,   5);
-    send_bits(s, blcodes-4,  4); /* not -3 as stated in appnote.txt */
-    for (rank = 0; rank < blcodes; rank++) {
-        Tracev((stderr, "\nbl code %2d ", bl_order[rank]));
-        send_bits(s, s->bl_tree[bl_order[rank]].Len, 3);
-    }
-    Tracev((stderr, "\nbl tree: sent %ld", s->bits_sent));
-
-    send_tree(s, (ct_data *)s->dyn_ltree, lcodes-1); /* literal tree */
-    Tracev((stderr, "\nlit tree: sent %ld", s->bits_sent));
-
-    send_tree(s, (ct_data *)s->dyn_dtree, dcodes-1); /* distance tree */
-    Tracev((stderr, "\ndist tree: sent %ld", s->bits_sent));
-}
-
-/* ===========================================================================
- * Send a stored block
- */
-void _tr_stored_block(s, buf, stored_len, eof)
-    deflate_state *s;
-    charf *buf;       /* input block */
-    ulg stored_len;   /* length of input block */
-    int eof;          /* true if this is the last block for a file */
-{
-    send_bits(s, (STORED_BLOCK<<1)+eof, 3);  /* send block type */
-#ifdef DEBUG
-    s->compressed_len = (s->compressed_len + 3 + 7) & (ulg)~7L;
-    s->compressed_len += (stored_len + 4) << 3;
-#endif
-    copy_block(s, buf, (unsigned)stored_len, 1); /* with header */
-}
-
-/* ===========================================================================
- * Send one empty static block to give enough lookahead for inflate.
- * This takes 10 bits, of which 7 may remain in the bit buffer.
- * The current inflate code requires 9 bits of lookahead. If the
- * last two codes for the previous block (real code plus EOB) were coded
- * on 5 bits or less, inflate may have only 5+3 bits of lookahead to decode
- * the last real code. In this case we send two empty static blocks instead
- * of one. (There are no problems if the previous block is stored or fixed.)
- * To simplify the code, we assume the worst case of last real code encoded
- * on one bit only.
- */
-void _tr_align(s)
-    deflate_state *s;
-{
-    send_bits(s, STATIC_TREES<<1, 3);
-    send_code(s, END_BLOCK, static_ltree);
-#ifdef DEBUG
-    s->compressed_len += 10L; /* 3 for block type, 7 for EOB */
-#endif
-    bi_flush(s);
-    /* Of the 10 bits for the empty block, we have already sent
-     * (10 - bi_valid) bits. The lookahead for the last real code (before
-     * the EOB of the previous block) was thus at least one plus the length
-     * of the EOB plus what we have just sent of the empty static block.
-     */
-    if (1 + s->last_eob_len + 10 - s->bi_valid < 9) {
-        send_bits(s, STATIC_TREES<<1, 3);
-        send_code(s, END_BLOCK, static_ltree);
-#ifdef DEBUG
-        s->compressed_len += 10L;
-#endif
-        bi_flush(s);
-    }
-    s->last_eob_len = 7;
-}
-
-/* ===========================================================================
- * Determine the best encoding for the current block: dynamic trees, static
- * trees or store, and output the encoded block to the zip file.
- */
-void _tr_flush_block(s, buf, stored_len, eof)
-    deflate_state *s;
-    charf *buf;       /* input block, or NULL if too old */
-    ulg stored_len;   /* length of input block */
-    int eof;          /* true if this is the last block for a file */
-{
-    ulg opt_lenb, static_lenb; /* opt_len and static_len in bytes */
-    int max_blindex = 0;  /* index of last bit length code of non zero freq */
-
-    /* Build the Huffman trees unless a stored block is forced */
-    if (s->level > 0) {
-
-        /* Check if the file is binary or text */
-        if (stored_len > 0 && s->strm->data_type == Z_UNKNOWN)
-            set_data_type(s);
-
-        /* Construct the literal and distance trees */
-        build_tree(s, (tree_desc *)(&(s->l_desc)));
-        Tracev((stderr, "\nlit data: dyn %ld, stat %ld", s->opt_len,
-                s->static_len));
-
-        build_tree(s, (tree_desc *)(&(s->d_desc)));
-        Tracev((stderr, "\ndist data: dyn %ld, stat %ld", s->opt_len,
-                s->static_len));
-        /* At this point, opt_len and static_len are the total bit lengths of
-         * the compressed block data, excluding the tree representations.
-         */
-
-        /* Build the bit length tree for the above two trees, and get the index
-         * in bl_order of the last bit length code to send.
-         */
-        max_blindex = build_bl_tree(s);
-
-        /* Determine the best encoding. Compute the block lengths in bytes. */
-        opt_lenb = (s->opt_len+3+7)>>3;
-        static_lenb = (s->static_len+3+7)>>3;
-
-        Tracev((stderr, "\nopt %lu(%lu) stat %lu(%lu) stored %lu lit %u ",
-                opt_lenb, s->opt_len, static_lenb, s->static_len, stored_len,
-                s->last_lit));
-
-        if (static_lenb <= opt_lenb) opt_lenb = static_lenb;
-
-    } else {
-        Assert(buf != (char*)0, "lost buf");
-        opt_lenb = static_lenb = stored_len + 5; /* force a stored block */
-    }
-
-#ifdef FORCE_STORED
-    if (buf != (char*)0) { /* force stored block */
-#else
-    if (stored_len+4 <= opt_lenb && buf != (char*)0) {
-                       /* 4: two words for the lengths */
-#endif
-        /* The test buf != NULL is only necessary if LIT_BUFSIZE > WSIZE.
-         * Otherwise we can't have processed more than WSIZE input bytes since
-         * the last block flush, because compression would have been
-         * successful. If LIT_BUFSIZE <= WSIZE, it is never too late to
-         * transform a block into a stored block.
-         */
-        _tr_stored_block(s, buf, stored_len, eof);
-
-#ifdef FORCE_STATIC
-    } else if (static_lenb >= 0) { /* force static trees */
-#else
-    } else if (s->strategy == Z_FIXED || static_lenb == opt_lenb) {
-#endif
-        send_bits(s, (STATIC_TREES<<1)+eof, 3);
-        compress_block(s, (ct_data *)static_ltree, (ct_data *)static_dtree);
-#ifdef DEBUG
-        s->compressed_len += 3 + s->static_len;
-#endif
-    } else {
-        send_bits(s, (DYN_TREES<<1)+eof, 3);
-        send_all_trees(s, s->l_desc.max_code+1, s->d_desc.max_code+1,
-                       max_blindex+1);
-        compress_block(s, (ct_data *)s->dyn_ltree, (ct_data *)s->dyn_dtree);
-#ifdef DEBUG
-        s->compressed_len += 3 + s->opt_len;
-#endif
-    }
-    Assert (s->compressed_len == s->bits_sent, "bad compressed size");
-    /* The above check is made mod 2^32, for files larger than 512 MB
-     * and uLong implemented on 32 bits.
-     */
-    init_block(s);
-
-    if (eof) {
-        bi_windup(s);
-#ifdef DEBUG
-        s->compressed_len += 7;  /* align on byte boundary */
-#endif
-    }
-    Tracev((stderr,"\ncomprlen %lu(%lu) ", s->compressed_len>>3,
-           s->compressed_len-7*eof));
-}
-
-/* ===========================================================================
- * Save the match info and tally the frequency counts. Return true if
- * the current block must be flushed.
- */
-int _tr_tally (s, dist, lc)
-    deflate_state *s;
-    unsigned dist;  /* distance of matched string */
-    unsigned lc;    /* match length-MIN_MATCH or unmatched char (if dist==0) */
-{
-    s->d_buf[s->last_lit] = (ush)dist;
-    s->l_buf[s->last_lit++] = (uch)lc;
-    if (dist == 0) {
-        /* lc is the unmatched char */
-        s->dyn_ltree[lc].Freq++;
-    } else {
-        s->matches++;
-        /* Here, lc is the match length - MIN_MATCH */
-        dist--;             /* dist = match distance - 1 */
-        Assert((ush)dist < (ush)MAX_DIST(s) &&
-               (ush)lc <= (ush)(MAX_MATCH-MIN_MATCH) &&
-               (ush)d_code(dist) < (ush)D_CODES,  "_tr_tally: bad match");
-
-        s->dyn_ltree[_length_code[lc]+LITERALS+1].Freq++;
-        s->dyn_dtree[d_code(dist)].Freq++;
-    }
-
-#ifdef TRUNCATE_BLOCK
-    /* Try to guess if it is profitable to stop the current block here */
-    if ((s->last_lit & 0x1fff) == 0 && s->level > 2) {
-        /* Compute an upper bound for the compressed length */
-        ulg out_length = (ulg)s->last_lit*8L;
-        ulg in_length = (ulg)((long)s->strstart - s->block_start);
-        int dcode;
-        for (dcode = 0; dcode < D_CODES; dcode++) {
-            out_length += (ulg)s->dyn_dtree[dcode].Freq *
-                (5L+extra_dbits[dcode]);
-        }
-        out_length >>= 3;
-        Tracev((stderr,"\nlast_lit %u, in %ld, out ~%ld(%ld%%) ",
-               s->last_lit, in_length, out_length,
-               100L - out_length*100L/in_length));
-        if (s->matches < s->last_lit/2 && out_length < in_length/2) return 1;
-    }
-#endif
-    return (s->last_lit == s->lit_bufsize-1);
-    /* We avoid equality with lit_bufsize because of wraparound at 64K
-     * on 16 bit machines and because stored blocks are restricted to
-     * 64K-1 bytes.
-     */
-}
-
-/* ===========================================================================
- * Send the block data compressed using the given Huffman trees
- */
-local void compress_block(s, ltree, dtree)
-    deflate_state *s;
-    ct_data *ltree; /* literal tree */
-    ct_data *dtree; /* distance tree */
-{
-    unsigned dist;      /* distance of matched string */
-    int lc;             /* match length or unmatched char (if dist == 0) */
-    unsigned lx = 0;    /* running index in l_buf */
-    unsigned code;      /* the code to send */
-    int extra;          /* number of extra bits to send */
-
-    if (s->last_lit != 0) do {
-        dist = s->d_buf[lx];
-        lc = s->l_buf[lx++];
-        if (dist == 0) {
-            send_code(s, lc, ltree); /* send a literal byte */
-            Tracecv(isgraph(lc), (stderr," '%c' ", lc));
-        } else {
-            /* Here, lc is the match length - MIN_MATCH */
-            code = _length_code[lc];
-            send_code(s, code+LITERALS+1, ltree); /* send the length code */
-            extra = extra_lbits[code];
-            if (extra != 0) {
-                lc -= base_length[code];
-                send_bits(s, lc, extra);       /* send the extra length bits */
-            }
-            dist--; /* dist is now the match distance - 1 */
-            code = d_code(dist);
-            Assert (code < D_CODES, "bad d_code");
-
-            send_code(s, code, dtree);       /* send the distance code */
-            extra = extra_dbits[code];
-            if (extra != 0) {
-                dist -= base_dist[code];
-                send_bits(s, dist, extra);   /* send the extra distance bits */
-            }
-        } /* literal or match pair ? */
-
-        /* Check that the overlay between pending_buf and d_buf+l_buf is ok: */
-        Assert((uInt)(s->pending) < s->lit_bufsize + 2*lx,
-               "pendingBuf overflow");
-
-    } while (lx < s->last_lit);
-
-    send_code(s, END_BLOCK, ltree);
-    s->last_eob_len = ltree[END_BLOCK].Len;
-}
-
-/* ===========================================================================
- * Set the data type to BINARY or TEXT, using a crude approximation:
- * set it to Z_TEXT if all symbols are either printable characters (33 to 255)
- * or white spaces (9 to 13, or 32); or set it to Z_BINARY otherwise.
- * IN assertion: the fields Freq of dyn_ltree are set.
- */
-local void set_data_type(s)
-    deflate_state *s;
-{
-    int n;
-
-    for (n = 0; n < 9; n++)
-        if (s->dyn_ltree[n].Freq != 0)
-            break;
-    if (n == 9)
-        for (n = 14; n < 32; n++)
-            if (s->dyn_ltree[n].Freq != 0)
-                break;
-    s->strm->data_type = (n == 32) ? Z_TEXT : Z_BINARY;
-}
-
-/* ===========================================================================
- * Reverse the first len bits of a code, using straightforward code (a faster
- * method would use a table)
- * IN assertion: 1 <= len <= 15
- */
-local unsigned bi_reverse(code, len)
-    unsigned code; /* the value to invert */
-    int len;       /* its bit length */
-{
-    register unsigned res = 0;
-    do {
-        res |= code & 1;
-        code >>= 1, res <<= 1;
-    } while (--len > 0);
-    return res >> 1;
-}
-
-/* ===========================================================================
- * Flush the bit buffer, keeping at most 7 bits in it.
- */
-local void bi_flush(s)
-    deflate_state *s;
-{
-    if (s->bi_valid == 16) {
-        put_short(s, s->bi_buf);
-        s->bi_buf = 0;
-        s->bi_valid = 0;
-    } else if (s->bi_valid >= 8) {
-        put_byte(s, (Byte)s->bi_buf);
-        s->bi_buf >>= 8;
-        s->bi_valid -= 8;
-    }
-}
-
-/* ===========================================================================
- * Flush the bit buffer and align the output on a byte boundary
- */
-local void bi_windup(s)
-    deflate_state *s;
-{
-    if (s->bi_valid > 8) {
-        put_short(s, s->bi_buf);
-    } else if (s->bi_valid > 0) {
-        put_byte(s, (Byte)s->bi_buf);
-    }
-    s->bi_buf = 0;
-    s->bi_valid = 0;
-#ifdef DEBUG
-    s->bits_sent = (s->bits_sent+7) & ~7;
-#endif
-}
-
-/* ===========================================================================
- * Copy a stored block, storing first the length and its
- * one's complement if requested.
- */
-local void copy_block(s, buf, len, header)
-    deflate_state *s;
-    charf    *buf;    /* the input data */
-    unsigned len;     /* its length */
-    int      header;  /* true if block header must be written */
-{
-    bi_windup(s);        /* align on byte boundary */
-    s->last_eob_len = 8; /* enough lookahead for inflate */
-
-    if (header) {
-        put_short(s, (ush)len);
-        put_short(s, (ush)~len);
-#ifdef DEBUG
-        s->bits_sent += 2*16;
-#endif
-    }
-#ifdef DEBUG
-    s->bits_sent += (ulg)len<<3;
-#endif
-    while (len--) {
-        put_byte(s, *buf++);
-    }
-}
Index: trunk/minix/lib/zlib-1.2.3/trees.h
===================================================================
--- trunk/minix/lib/zlib-1.2.3/trees.h	(revision 9)
+++ 	(revision )
@@ -1,128 +1,0 @@
-/* header created automatically with -DGEN_TREES_H */
-
-local const ct_data static_ltree[L_CODES+2] = {
-{{ 12},{  8}}, {{140},{  8}}, {{ 76},{  8}}, {{204},{  8}}, {{ 44},{  8}},
-{{172},{  8}}, {{108},{  8}}, {{236},{  8}}, {{ 28},{  8}}, {{156},{  8}},
-{{ 92},{  8}}, {{220},{  8}}, {{ 60},{  8}}, {{188},{  8}}, {{124},{  8}},
-{{252},{  8}}, {{  2},{  8}}, {{130},{  8}}, {{ 66},{  8}}, {{194},{  8}},
-{{ 34},{  8}}, {{162},{  8}}, {{ 98},{  8}}, {{226},{  8}}, {{ 18},{  8}},
-{{146},{  8}}, {{ 82},{  8}}, {{210},{  8}}, {{ 50},{  8}}, {{178},{  8}},
-{{114},{  8}}, {{242},{  8}}, {{ 10},{  8}}, {{138},{  8}}, {{ 74},{  8}},
-{{202},{  8}}, {{ 42},{  8}}, {{170},{  8}}, {{106},{  8}}, {{234},{  8}},
-{{ 26},{  8}}, {{154},{  8}}, {{ 90},{  8}}, {{218},{  8}}, {{ 58},{  8}},
-{{186},{  8}}, {{122},{  8}}, {{250},{  8}}, {{  6},{  8}}, {{134},{  8}},
-{{ 70},{  8}}, {{198},{  8}}, {{ 38},{  8}}, {{166},{  8}}, {{102},{  8}},
-{{230},{  8}}, {{ 22},{  8}}, {{150},{  8}}, {{ 86},{  8}}, {{214},{  8}},
-{{ 54},{  8}}, {{182},{  8}}, {{118},{  8}}, {{246},{  8}}, {{ 14},{  8}},
-{{142},{  8}}, {{ 78},{  8}}, {{206},{  8}}, {{ 46},{  8}}, {{174},{  8}},
-{{110},{  8}}, {{238},{  8}}, {{ 30},{  8}}, {{158},{  8}}, {{ 94},{  8}},
-{{222},{  8}}, {{ 62},{  8}}, {{190},{  8}}, {{126},{  8}}, {{254},{  8}},
-{{  1},{  8}}, {{129},{  8}}, {{ 65},{  8}}, {{193},{  8}}, {{ 33},{  8}},
-{{161},{  8}}, {{ 97},{  8}}, {{225},{  8}}, {{ 17},{  8}}, {{145},{  8}},
-{{ 81},{  8}}, {{209},{  8}}, {{ 49},{  8}}, {{177},{  8}}, {{113},{  8}},
-{{241},{  8}}, {{  9},{  8}}, {{137},{  8}}, {{ 73},{  8}}, {{201},{  8}},
-{{ 41},{  8}}, {{169},{  8}}, {{105},{  8}}, {{233},{  8}}, {{ 25},{  8}},
-{{153},{  8}}, {{ 89},{  8}}, {{217},{  8}}, {{ 57},{  8}}, {{185},{  8}},
-{{121},{  8}}, {{249},{  8}}, {{  5},{  8}}, {{133},{  8}}, {{ 69},{  8}},
-{{197},{  8}}, {{ 37},{  8}}, {{165},{  8}}, {{101},{  8}}, {{229},{  8}},
-{{ 21},{  8}}, {{149},{  8}}, {{ 85},{  8}}, {{213},{  8}}, {{ 53},{  8}},
-{{181},{  8}}, {{117},{  8}}, {{245},{  8}}, {{ 13},{  8}}, {{141},{  8}},
-{{ 77},{  8}}, {{205},{  8}}, {{ 45},{  8}}, {{173},{  8}}, {{109},{  8}},
-{{237},{  8}}, {{ 29},{  8}}, {{157},{  8}}, {{ 93},{  8}}, {{221},{  8}},
-{{ 61},{  8}}, {{189},{  8}}, {{125},{  8}}, {{253},{  8}}, {{ 19},{  9}},
-{{275},{  9}}, {{147},{  9}}, {{403},{  9}}, {{ 83},{  9}}, {{339},{  9}},
-{{211},{  9}}, {{467},{  9}}, {{ 51},{  9}}, {{307},{  9}}, {{179},{  9}},
-{{435},{  9}}, {{115},{  9}}, {{371},{  9}}, {{243},{  9}}, {{499},{  9}},
-{{ 11},{  9}}, {{267},{  9}}, {{139},{  9}}, {{395},{  9}}, {{ 75},{  9}},
-{{331},{  9}}, {{203},{  9}}, {{459},{  9}}, {{ 43},{  9}}, {{299},{  9}},
-{{171},{  9}}, {{427},{  9}}, {{107},{  9}}, {{363},{  9}}, {{235},{  9}},
-{{491},{  9}}, {{ 27},{  9}}, {{283},{  9}}, {{155},{  9}}, {{411},{  9}},
-{{ 91},{  9}}, {{347},{  9}}, {{219},{  9}}, {{475},{  9}}, {{ 59},{  9}},
-{{315},{  9}}, {{187},{  9}}, {{443},{  9}}, {{123},{  9}}, {{379},{  9}},
-{{251},{  9}}, {{507},{  9}}, {{  7},{  9}}, {{263},{  9}}, {{135},{  9}},
-{{391},{  9}}, {{ 71},{  9}}, {{327},{  9}}, {{199},{  9}}, {{455},{  9}},
-{{ 39},{  9}}, {{295},{  9}}, {{167},{  9}}, {{423},{  9}}, {{103},{  9}},
-{{359},{  9}}, {{231},{  9}}, {{487},{  9}}, {{ 23},{  9}}, {{279},{  9}},
-{{151},{  9}}, {{407},{  9}}, {{ 87},{  9}}, {{343},{  9}}, {{215},{  9}},
-{{471},{  9}}, {{ 55},{  9}}, {{311},{  9}}, {{183},{  9}}, {{439},{  9}},
-{{119},{  9}}, {{375},{  9}}, {{247},{  9}}, {{503},{  9}}, {{ 15},{  9}},
-{{271},{  9}}, {{143},{  9}}, {{399},{  9}}, {{ 79},{  9}}, {{335},{  9}},
-{{207},{  9}}, {{463},{  9}}, {{ 47},{  9}}, {{303},{  9}}, {{175},{  9}},
-{{431},{  9}}, {{111},{  9}}, {{367},{  9}}, {{239},{  9}}, {{495},{  9}},
-{{ 31},{  9}}, {{287},{  9}}, {{159},{  9}}, {{415},{  9}}, {{ 95},{  9}},
-{{351},{  9}}, {{223},{  9}}, {{479},{  9}}, {{ 63},{  9}}, {{319},{  9}},
-{{191},{  9}}, {{447},{  9}}, {{127},{  9}}, {{383},{  9}}, {{255},{  9}},
-{{511},{  9}}, {{  0},{  7}}, {{ 64},{  7}}, {{ 32},{  7}}, {{ 96},{  7}},
-{{ 16},{  7}}, {{ 80},{  7}}, {{ 48},{  7}}, {{112},{  7}}, {{  8},{  7}},
-{{ 72},{  7}}, {{ 40},{  7}}, {{104},{  7}}, {{ 24},{  7}}, {{ 88},{  7}},
-{{ 56},{  7}}, {{120},{  7}}, {{  4},{  7}}, {{ 68},{  7}}, {{ 36},{  7}},
-{{100},{  7}}, {{ 20},{  7}}, {{ 84},{  7}}, {{ 52},{  7}}, {{116},{  7}},
-{{  3},{  8}}, {{131},{  8}}, {{ 67},{  8}}, {{195},{  8}}, {{ 35},{  8}},
-{{163},{  8}}, {{ 99},{  8}}, {{227},{  8}}
-};
-
-local const ct_data static_dtree[D_CODES] = {
-{{ 0},{ 5}}, {{16},{ 5}}, {{ 8},{ 5}}, {{24},{ 5}}, {{ 4},{ 5}},
-{{20},{ 5}}, {{12},{ 5}}, {{28},{ 5}}, {{ 2},{ 5}}, {{18},{ 5}},
-{{10},{ 5}}, {{26},{ 5}}, {{ 6},{ 5}}, {{22},{ 5}}, {{14},{ 5}},
-{{30},{ 5}}, {{ 1},{ 5}}, {{17},{ 5}}, {{ 9},{ 5}}, {{25},{ 5}},
-{{ 5},{ 5}}, {{21},{ 5}}, {{13},{ 5}}, {{29},{ 5}}, {{ 3},{ 5}},
-{{19},{ 5}}, {{11},{ 5}}, {{27},{ 5}}, {{ 7},{ 5}}, {{23},{ 5}}
-};
-
-const uch _dist_code[DIST_CODE_LEN] = {
- 0,  1,  2,  3,  4,  4,  5,  5,  6,  6,  6,  6,  7,  7,  7,  7,  8,  8,  8,  8,
- 8,  8,  8,  8,  9,  9,  9,  9,  9,  9,  9,  9, 10, 10, 10, 10, 10, 10, 10, 10,
-10, 10, 10, 10, 10, 10, 10, 10, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11,
-11, 11, 11, 11, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12,
-12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 13, 13, 13, 13,
-13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13,
-13, 13, 13, 13, 13, 13, 13, 13, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14,
-14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14,
-14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14,
-14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 15, 15, 15, 15, 15, 15, 15, 15,
-15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15,
-15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15,
-15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15,  0,  0, 16, 17,
-18, 18, 19, 19, 20, 20, 20, 20, 21, 21, 21, 21, 22, 22, 22, 22, 22, 22, 22, 22,
-23, 23, 23, 23, 23, 23, 23, 23, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24,
-24, 24, 24, 24, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25,
-26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26,
-26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 27, 27, 27, 27, 27, 27, 27, 27,
-27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27,
-27, 27, 27, 27, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28,
-28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28,
-28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28,
-28, 28, 28, 28, 28, 28, 28, 28, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29,
-29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29,
-29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29,
-29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29
-};
-
-const uch _length_code[MAX_MATCH-MIN_MATCH+1]= {
- 0,  1,  2,  3,  4,  5,  6,  7,  8,  8,  9,  9, 10, 10, 11, 11, 12, 12, 12, 12,
-13, 13, 13, 13, 14, 14, 14, 14, 15, 15, 15, 15, 16, 16, 16, 16, 16, 16, 16, 16,
-17, 17, 17, 17, 17, 17, 17, 17, 18, 18, 18, 18, 18, 18, 18, 18, 19, 19, 19, 19,
-19, 19, 19, 19, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20,
-21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 22, 22, 22, 22,
-22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 23, 23, 23, 23, 23, 23, 23, 23,
-23, 23, 23, 23, 23, 23, 23, 23, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24,
-24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24,
-25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25,
-25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 26, 26, 26, 26, 26, 26, 26, 26,
-26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26,
-26, 26, 26, 26, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27,
-27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 28
-};
-
-local const int base_length[LENGTH_CODES] = {
-0, 1, 2, 3, 4, 5, 6, 7, 8, 10, 12, 14, 16, 20, 24, 28, 32, 40, 48, 56,
-64, 80, 96, 112, 128, 160, 192, 224, 0
-};
-
-local const int base_dist[D_CODES] = {
-    0,     1,     2,     3,     4,     6,     8,    12,    16,    24,
-   32,    48,    64,    96,   128,   192,   256,   384,   512,   768,
- 1024,  1536,  2048,  3072,  4096,  6144,  8192, 12288, 16384, 24576
-};
-
Index: trunk/minix/lib/zlib-1.2.3/uncompr.c
===================================================================
--- trunk/minix/lib/zlib-1.2.3/uncompr.c	(revision 9)
+++ 	(revision )
@@ -1,61 +1,0 @@
-/* uncompr.c -- decompress a memory buffer
- * Copyright (C) 1995-2003 Jean-loup Gailly.
- * For conditions of distribution and use, see copyright notice in zlib.h
- */
-
-/* @(#) $Id: uncompr.c,v 1.1 2005/09/23 22:39:00 beng Exp $ */
-
-#define ZLIB_INTERNAL
-#include "zlib.h"
-
-/* ===========================================================================
-     Decompresses the source buffer into the destination buffer.  sourceLen is
-   the byte length of the source buffer. Upon entry, destLen is the total
-   size of the destination buffer, which must be large enough to hold the
-   entire uncompressed data. (The size of the uncompressed data must have
-   been saved previously by the compressor and transmitted to the decompressor
-   by some mechanism outside the scope of this compression library.)
-   Upon exit, destLen is the actual size of the compressed buffer.
-     This function can be used to decompress a whole file at once if the
-   input file is mmap'ed.
-
-     uncompress returns Z_OK if success, Z_MEM_ERROR if there was not
-   enough memory, Z_BUF_ERROR if there was not enough room in the output
-   buffer, or Z_DATA_ERROR if the input data was corrupted.
-*/
-int ZEXPORT uncompress (dest, destLen, source, sourceLen)
-    Bytef *dest;
-    uLongf *destLen;
-    const Bytef *source;
-    uLong sourceLen;
-{
-    z_stream stream;
-    int err;
-
-    stream.next_in = (Bytef*)source;
-    stream.avail_in = (uInt)sourceLen;
-    /* Check for source > 64K on 16-bit machine: */
-    if ((uLong)stream.avail_in != sourceLen) return Z_BUF_ERROR;
-
-    stream.next_out = dest;
-    stream.avail_out = (uInt)*destLen;
-    if ((uLong)stream.avail_out != *destLen) return Z_BUF_ERROR;
-
-    stream.zalloc = (alloc_func)0;
-    stream.zfree = (free_func)0;
-
-    err = inflateInit(&stream);
-    if (err != Z_OK) return err;
-
-    err = inflate(&stream, Z_FINISH);
-    if (err != Z_STREAM_END) {
-        inflateEnd(&stream);
-        if (err == Z_NEED_DICT || (err == Z_BUF_ERROR && stream.avail_in == 0))
-            return Z_DATA_ERROR;
-        return err;
-    }
-    *destLen = stream.total_out;
-
-    err = inflateEnd(&stream);
-    return err;
-}
Index: trunk/minix/lib/zlib-1.2.3/win32/DLL_FAQ.txt
===================================================================
--- trunk/minix/lib/zlib-1.2.3/win32/DLL_FAQ.txt	(revision 9)
+++ 	(revision )
@@ -1,397 +1,0 @@
-
-            Frequently Asked Questions about ZLIB1.DLL
-
-
-This document describes the design, the rationale, and the usage
-of the official DLL build of zlib, named ZLIB1.DLL.  If you have
-general questions about zlib, you should see the file "FAQ" found
-in the zlib distribution, or at the following location:
-  http://www.gzip.org/zlib/zlib_faq.html
-
-
- 1. What is ZLIB1.DLL, and how can I get it?
-
-  - ZLIB1.DLL is the official build of zlib as a DLL.
-    (Please remark the character '1' in the name.)
-
-    Pointers to a precompiled ZLIB1.DLL can be found in the zlib
-    web site at:
-      http://www.zlib.org/
-
-    Applications that link to ZLIB1.DLL can rely on the following
-    specification:
-
-    * The exported symbols are exclusively defined in the source
-      files "zlib.h" and "zlib.def", found in an official zlib
-      source distribution.
-    * The symbols are exported by name, not by ordinal.
-    * The exported names are undecorated.
-    * The calling convention of functions is "C" (CDECL).
-    * The ZLIB1.DLL binary is linked to MSVCRT.DLL.
-
-    The archive in which ZLIB1.DLL is bundled contains compiled
-    test programs that must run with a valid build of ZLIB1.DLL.
-    It is recommended to download the prebuilt DLL from the zlib
-    web site, instead of building it yourself, to avoid potential
-    incompatibilities that could be introduced by your compiler
-    and build settings.  If you do build the DLL yourself, please
-    make sure that it complies with all the above requirements,
-    and it runs with the precompiled test programs, bundled with
-    the original ZLIB1.DLL distribution.
-
-    If, for any reason, you need to build an incompatible DLL,
-    please use a different file name.
-
-
- 2. Why did you change the name of the DLL to ZLIB1.DLL?
-    What happened to the old ZLIB.DLL?
-
-  - The old ZLIB.DLL, built from zlib-1.1.4 or earlier, required
-    compilation settings that were incompatible to those used by
-    a static build.  The DLL settings were supposed to be enabled
-    by defining the macro ZLIB_DLL, before including "zlib.h".
-    Incorrect handling of this macro was silently accepted at
-    build time, resulting in two major problems:
-
-    * ZLIB_DLL was missing from the old makefile.  When building
-      the DLL, not all people added it to the build options.  In
-      consequence, incompatible incarnations of ZLIB.DLL started
-      to circulate around the net.
-
-    * When switching from using the static library to using the
-      DLL, applications had to define the ZLIB_DLL macro and
-      to recompile all the sources that contained calls to zlib
-      functions.  Failure to do so resulted in creating binaries
-      that were unable to run with the official ZLIB.DLL build.
-
-    The only possible solution that we could foresee was to make
-    a binary-incompatible change in the DLL interface, in order to
-    remove the dependency on the ZLIB_DLL macro, and to release
-    the new DLL under a different name.
-
-    We chose the name ZLIB1.DLL, where '1' indicates the major
-    zlib version number.  We hope that we will not have to break
-    the binary compatibility again, at least not as long as the
-    zlib-1.x series will last.
-
-    There is still a ZLIB_DLL macro, that can trigger a more
-    efficient build and use of the DLL, but compatibility no
-    longer dependents on it.
-
-
- 3. Can I build ZLIB.DLL from the new zlib sources, and replace
-    an old ZLIB.DLL, that was built from zlib-1.1.4 or earlier?
-
-  - In principle, you can do it by assigning calling convention
-    keywords to the macros ZEXPORT and ZEXPORTVA.  In practice,
-    it depends on what you mean by "an old ZLIB.DLL", because the
-    old DLL exists in several mutually-incompatible versions.
-    You have to find out first what kind of calling convention is
-    being used in your particular ZLIB.DLL build, and to use the
-    same one in the new build.  If you don't know what this is all
-    about, you might be better off if you would just leave the old
-    DLL intact.
-
-
- 4. Can I compile my application using the new zlib interface, and
-    link it to an old ZLIB.DLL, that was built from zlib-1.1.4 or
-    earlier?
-
-  - The official answer is "no"; the real answer depends again on
-    what kind of ZLIB.DLL you have.  Even if you are lucky, this
-    course of action is unreliable.
-
-    If you rebuild your application and you intend to use a newer
-    version of zlib (post- 1.1.4), it is strongly recommended to
-    link it to the new ZLIB1.DLL.
-
-
- 5. Why are the zlib symbols exported by name, and not by ordinal?
-
-  - Although exporting symbols by ordinal is a little faster, it
-    is risky.  Any single glitch in the maintenance or use of the
-    DEF file that contains the ordinals can result in incompatible
-    builds and frustrating crashes.  Simply put, the benefits of
-    exporting symbols by ordinal do not justify the risks.
-
-    Technically, it should be possible to maintain ordinals in
-    the DEF file, and still export the symbols by name.  Ordinals
-    exist in every DLL, and even if the dynamic linking performed
-    at the DLL startup is searching for names, ordinals serve as
-    hints, for a faster name lookup.  However, if the DEF file
-    contains ordinals, the Microsoft linker automatically builds
-    an implib that will cause the executables linked to it to use
-    those ordinals, and not the names.  It is interesting to
-    notice that the GNU linker for Win32 does not suffer from this
-    problem.
-
-    It is possible to avoid the DEF file if the exported symbols
-    are accompanied by a "__declspec(dllexport)" attribute in the
-    source files.  You can do this in zlib by predefining the
-    ZLIB_DLL macro.
-
-
- 6. I see that the ZLIB1.DLL functions use the "C" (CDECL) calling
-    convention.  Why not use the STDCALL convention?
-    STDCALL is the standard convention in Win32, and I need it in
-    my Visual Basic project!
-
-    (For readability, we use CDECL to refer to the convention
-     triggered by the "__cdecl" keyword, STDCALL to refer to
-     the convention triggered by "__stdcall", and FASTCALL to
-     refer to the convention triggered by "__fastcall".)
-
-  - Most of the native Windows API functions (without varargs) use
-    indeed the WINAPI convention (which translates to STDCALL in
-    Win32), but the standard C functions use CDECL.  If a user
-    application is intrinsically tied to the Windows API (e.g.
-    it calls native Windows API functions such as CreateFile()),
-    sometimes it makes sense to decorate its own functions with
-    WINAPI.  But if ANSI C or POSIX portability is a goal (e.g.
-    it calls standard C functions such as fopen()), it is not a
-    sound decision to request the inclusion of <windows.h>, or to
-    use non-ANSI constructs, for the sole purpose to make the user
-    functions STDCALL-able.
-
-    The functionality offered by zlib is not in the category of
-    "Windows functionality", but is more like "C functionality".
-
-    Technically, STDCALL is not bad; in fact, it is slightly
-    faster than CDECL, and it works with variable-argument
-    functions, just like CDECL.  It is unfortunate that, in spite
-    of using STDCALL in the Windows API, it is not the default
-    convention used by the C compilers that run under Windows.
-    The roots of the problem reside deep inside the unsafety of
-    the K&R-style function prototypes, where the argument types
-    are not specified; but that is another story for another day.
-
-    The remaining fact is that CDECL is the default convention.
-    Even if an explicit convention is hard-coded into the function
-    prototypes inside C headers, problems may appear.  The
-    necessity to expose the convention in users' callbacks is one
-    of these problems.
-
-    The calling convention issues are also important when using
-    zlib in other programming languages.  Some of them, like Ada
-    (GNAT) and Fortran (GNU G77), have C bindings implemented
-    initially on Unix, and relying on the C calling convention.
-    On the other hand, the pre- .NET versions of Microsoft Visual
-    Basic require STDCALL, while Borland Delphi prefers, although
-    it does not require, FASTCALL.
-
-    In fairness to all possible uses of zlib outside the C
-    programming language, we choose the default "C" convention.
-    Anyone interested in different bindings or conventions is
-    encouraged to maintain specialized projects.  The "contrib/"
-    directory from the zlib distribution already holds a couple
-    of foreign bindings, such as Ada, C++, and Delphi.
-
-
- 7. I need a DLL for my Visual Basic project.  What can I do?
-
-  - Define the ZLIB_WINAPI macro before including "zlib.h", when
-    building both the DLL and the user application (except that
-    you don't need to define anything when using the DLL in Visual
-    Basic).  The ZLIB_WINAPI macro will switch on the WINAPI
-    (STDCALL) convention.  The name of this DLL must be different
-    than the official ZLIB1.DLL.
-
-    Gilles Vollant has contributed a build named ZLIBWAPI.DLL,
-    with the ZLIB_WINAPI macro turned on, and with the minizip
-    functionality built in.  For more information, please read
-    the notes inside "contrib/vstudio/readme.txt", found in the
-    zlib distribution.
-
-
- 8. I need to use zlib in my Microsoft .NET project.  What can I
-    do?
-
-  - Henrik Ravn has contributed a .NET wrapper around zlib.  Look
-    into contrib/dotzlib/, inside the zlib distribution.
-
-
- 9. If my application uses ZLIB1.DLL, should I link it to
-    MSVCRT.DLL?  Why?
-
-  - It is not required, but it is recommended to link your
-    application to MSVCRT.DLL, if it uses ZLIB1.DLL.
-
-    The executables (.EXE, .DLL, etc.) that are involved in the
-    same process and are using the C run-time library (i.e. they
-    are calling standard C functions), must link to the same
-    library.  There are several libraries in the Win32 system:
-    CRTDLL.DLL, MSVCRT.DLL, the static C libraries, etc.
-    Since ZLIB1.DLL is linked to MSVCRT.DLL, the executables that
-    depend on it should also be linked to MSVCRT.DLL.
-
-
-10. Why are you saying that ZLIB1.DLL and my application should
-    be linked to the same C run-time (CRT) library?  I linked my
-    application and my DLLs to different C libraries (e.g. my
-    application to a static library, and my DLLs to MSVCRT.DLL),
-    and everything works fine.
-
-  - If a user library invokes only pure Win32 API (accessible via
-    <windows.h> and the related headers), its DLL build will work
-    in any context.  But if this library invokes standard C API,
-    things get more complicated.
-
-    There is a single Win32 library in a Win32 system.  Every
-    function in this library resides in a single DLL module, that
-    is safe to call from anywhere.  On the other hand, there are
-    multiple versions of the C library, and each of them has its
-    own separate internal state.  Standalone executables and user
-    DLLs that call standard C functions must link to a C run-time
-    (CRT) library, be it static or shared (DLL).  Intermixing
-    occurs when an executable (not necessarily standalone) and a
-    DLL are linked to different CRTs, and both are running in the
-    same process.
-
-    Intermixing multiple CRTs is possible, as long as their
-    internal states are kept intact.  The Microsoft Knowledge Base
-    articles KB94248 "HOWTO: Use the C Run-Time" and KB140584
-    "HOWTO: Link with the Correct C Run-Time (CRT) Library"
-    mention the potential problems raised by intermixing.
-
-    If intermixing works for you, it's because your application
-    and DLLs are avoiding the corruption of each of the CRTs'
-    internal states, maybe by careful design, or maybe by fortune.
-
-    Also note that linking ZLIB1.DLL to non-Microsoft CRTs, such
-    as those provided by Borland, raises similar problems.
-
-
-11. Why are you linking ZLIB1.DLL to MSVCRT.DLL?
-
-  - MSVCRT.DLL exists on every Windows 95 with a new service pack
-    installed, or with Microsoft Internet Explorer 4 or later, and
-    on all other Windows 4.x or later (Windows 98, Windows NT 4,
-    or later).  It is freely distributable; if not present in the
-    system, it can be downloaded from Microsoft or from other
-    software provider for free.
-
-    The fact that MSVCRT.DLL does not exist on a virgin Windows 95
-    is not so problematic.  Windows 95 is scarcely found nowadays,
-    Microsoft ended its support a long time ago, and many recent
-    applications from various vendors, including Microsoft, do not
-    even run on it.  Furthermore, no serious user should run
-    Windows 95 without a proper update installed.
-
-
-12. Why are you not linking ZLIB1.DLL to
-    <<my favorite C run-time library>> ?
-
-  - We considered and abandoned the following alternatives:
-
-    * Linking ZLIB1.DLL to a static C library (LIBC.LIB, or
-      LIBCMT.LIB) is not a good option.  People are using the DLL
-      mainly to save disk space.  If you are linking your program
-      to a static C library, you may as well consider linking zlib
-      in statically, too.
-
-    * Linking ZLIB1.DLL to CRTDLL.DLL looks appealing, because
-      CRTDLL.DLL is present on every Win32 installation.
-      Unfortunately, it has a series of problems: it does not
-      work properly with Microsoft's C++ libraries, it does not
-      provide support for 64-bit file offsets, (and so on...),
-      and Microsoft discontinued its support a long time ago.
-
-    * Linking ZLIB1.DLL to MSVCR70.DLL or MSVCR71.DLL, supplied
-      with the Microsoft .NET platform, and Visual C++ 7.0/7.1,
-      raises problems related to the status of ZLIB1.DLL as a
-      system component.  According to the Microsoft Knowledge Base
-      article KB326922 "INFO: Redistribution of the Shared C
-      Runtime Component in Visual C++ .NET", MSVCR70.DLL and
-      MSVCR71.DLL are not supposed to function as system DLLs,
-      because they may clash with MSVCRT.DLL.  Instead, the
-      application's installer is supposed to put these DLLs
-      (if needed) in the application's private directory.
-      If ZLIB1.DLL depends on a non-system runtime, it cannot
-      function as a redistributable system component.
-
-    * Linking ZLIB1.DLL to non-Microsoft runtimes, such as
-      Borland's, or Cygwin's, raises problems related to the
-      reliable presence of these runtimes on Win32 systems.
-      It's easier to let the DLL build of zlib up to the people
-      who distribute these runtimes, and who may proceed as
-      explained in the answer to Question 14.
-
-
-13. If ZLIB1.DLL cannot be linked to MSVCR70.DLL or MSVCR71.DLL,
-    how can I build/use ZLIB1.DLL in Microsoft Visual C++ 7.0
-    (Visual Studio .NET) or newer?
-
-  - Due to the problems explained in the Microsoft Knowledge Base
-    article KB326922 (see the previous answer), the C runtime that
-    comes with the VC7 environment is no longer considered a
-    system component.  That is, it should not be assumed that this
-    runtime exists, or may be installed in a system directory.
-    Since ZLIB1.DLL is supposed to be a system component, it may
-    not depend on a non-system component.
-
-    In order to link ZLIB1.DLL and your application to MSVCRT.DLL
-    in VC7, you need the library of Visual C++ 6.0 or older.  If
-    you don't have this library at hand, it's probably best not to
-    use ZLIB1.DLL.
-
-    We are hoping that, in the future, Microsoft will provide a
-    way to build applications linked to a proper system runtime,
-    from the Visual C++ environment.  Until then, you have a
-    couple of alternatives, such as linking zlib in statically.
-    If your application requires dynamic linking, you may proceed
-    as explained in the answer to Question 14.
-
-
-14. I need to link my own DLL build to a CRT different than
-    MSVCRT.DLL.  What can I do?
-
-  - Feel free to rebuild the DLL from the zlib sources, and link
-    it the way you want.  You should, however, clearly state that
-    your build is unofficial.  You should give it a different file
-    name, and/or install it in a private directory that can be
-    accessed by your application only, and is not visible to the
-    others (e.g. it's not in the SYSTEM or the SYSTEM32 directory,
-    and it's not in the PATH).  Otherwise, your build may clash
-    with applications that link to the official build.
-
-    For example, in Cygwin, zlib is linked to the Cygwin runtime
-    CYGWIN1.DLL, and it is distributed under the name CYGZ.DLL.
-
-
-15. May I include additional pieces of code that I find useful,
-    link them in ZLIB1.DLL, and export them?
-
-  - No.  A legitimate build of ZLIB1.DLL must not include code
-    that does not originate from the official zlib source code.
-    But you can make your own private DLL build, under a different
-    file name, as suggested in the previous answer.
-
-    For example, zlib is a part of the VCL library, distributed
-    with Borland Delphi and C++ Builder.  The DLL build of VCL
-    is a redistributable file, named VCLxx.DLL.
-
-
-16. May I remove some functionality out of ZLIB1.DLL, by enabling
-    macros like NO_GZCOMPRESS or NO_GZIP at compile time?
-
-  - No.  A legitimate build of ZLIB1.DLL must provide the complete
-    zlib functionality, as implemented in the official zlib source
-    code.  But you can make your own private DLL build, under a
-    different file name, as suggested in the previous answer.
-
-
-17. I made my own ZLIB1.DLL build.  Can I test it for compliance?
-
-  - We prefer that you download the official DLL from the zlib
-    web site.  If you need something peculiar from this DLL, you
-    can send your suggestion to the zlib mailing list.
-
-    However, in case you do rebuild the DLL yourself, you can run
-    it with the test programs found in the DLL distribution.
-    Running these test programs is not a guarantee of compliance,
-    but a failure can imply a detected problem.
-
-**
-
-This document is written and maintained by
-Cosmin Truta <cosmint@cs.ubbcluj.ro>
Index: trunk/minix/lib/zlib-1.2.3/win32/Makefile.bor
===================================================================
--- trunk/minix/lib/zlib-1.2.3/win32/Makefile.bor	(revision 9)
+++ 	(revision )
@@ -1,107 +1,0 @@
-# Makefile for zlib
-# Borland C++ for Win32
-#
-# Updated for zlib 1.2.x by Cosmin Truta, 11-Mar-2003
-# Last updated: 28-Aug-2003
-#
-# Usage:
-#  make -f win32/Makefile.bor
-#  make -f win32/Makefile.bor LOCAL_ZLIB=-DASMV OBJA=match.obj OBJPA=+match.obj
-
-# ------------ Borland C++ ------------
-
-# Optional nonstandard preprocessor flags (e.g. -DMAX_MEM_LEVEL=7)
-# should be added to the environment via "set LOCAL_ZLIB=-DFOO" or
-# added to the declaration of LOC here:
-LOC = $(LOCAL_ZLIB)
-
-CC = bcc32
-AS = bcc32
-LD = bcc32
-AR = tlib
-CFLAGS  = -a -d -k- -O2 $(LOC)
-ASFLAGS = $(LOC)
-LDFLAGS = $(LOC)
-
-
-# variables
-ZLIB_LIB = zlib.lib
-
-OBJ1  = adler32.obj compress.obj crc32.obj deflate.obj gzio.obj infback.obj
-OBJ2  = inffast.obj inflate.obj inftrees.obj trees.obj uncompr.obj zutil.obj
-#OBJA =
-OBJP1 = +adler32.obj+compress.obj+crc32.obj+deflate.obj+gzio.obj+infback.obj
-OBJP2 = +inffast.obj+inflate.obj+inftrees.obj+trees.obj+uncompr.obj+zutil.obj
-#OBJPA=
-
-
-# targets
-all: $(ZLIB_LIB) example.exe minigzip.exe
-
-.c.obj:
-	$(CC) -c $(CFLAGS) $<
-
-.asm.obj:
-	$(AS) -c $(ASFLAGS) $<
-
-adler32.obj: adler32.c zlib.h zconf.h
-
-compress.obj: compress.c zlib.h zconf.h
-
-crc32.obj: crc32.c zlib.h zconf.h crc32.h
-
-deflate.obj: deflate.c deflate.h zutil.h zlib.h zconf.h
-
-gzio.obj: gzio.c zutil.h zlib.h zconf.h
-
-infback.obj: infback.c zutil.h zlib.h zconf.h inftrees.h inflate.h \
- inffast.h inffixed.h
-
-inffast.obj: inffast.c zutil.h zlib.h zconf.h inftrees.h inflate.h \
- inffast.h
-
-inflate.obj: inflate.c zutil.h zlib.h zconf.h inftrees.h inflate.h \
- inffast.h inffixed.h
-
-inftrees.obj: inftrees.c zutil.h zlib.h zconf.h inftrees.h
-
-trees.obj: trees.c zutil.h zlib.h zconf.h deflate.h trees.h
-
-uncompr.obj: uncompr.c zlib.h zconf.h
-
-zutil.obj: zutil.c zutil.h zlib.h zconf.h
-
-example.obj: example.c zlib.h zconf.h
-
-minigzip.obj: minigzip.c zlib.h zconf.h
-
-
-# For the sake of the old Borland make,
-# the command line is cut to fit in the MS-DOS 128 byte limit:
-$(ZLIB_LIB): $(OBJ1) $(OBJ2) $(OBJA)
-	-del $(ZLIB_LIB)
-	$(AR) $(ZLIB_LIB) $(OBJP1)
-	$(AR) $(ZLIB_LIB) $(OBJP2)
-	$(AR) $(ZLIB_LIB) $(OBJPA)
-
-
-# testing
-test: example.exe minigzip.exe
-	example
-	echo hello world | minigzip | minigzip -d
-
-example.exe: example.obj $(ZLIB_LIB)
-	$(LD) $(LDFLAGS) example.obj $(ZLIB_LIB)
-
-minigzip.exe: minigzip.obj $(ZLIB_LIB)
-	$(LD) $(LDFLAGS) minigzip.obj $(ZLIB_LIB)
-
-
-# cleanup
-clean:
-	-del *.obj
-	-del *.lib
-	-del *.exe
-	-del *.tds
-	-del zlib.bak
-	-del foo.gz
Index: trunk/minix/lib/zlib-1.2.3/win32/Makefile.emx
===================================================================
--- trunk/minix/lib/zlib-1.2.3/win32/Makefile.emx	(revision 9)
+++ 	(revision )
@@ -1,69 +1,0 @@
-# Makefile for zlib.  Modified for emx/rsxnt by Chr. Spieler, 6/16/98.
-# Copyright (C) 1995-1998 Jean-loup Gailly.
-# For conditions of distribution and use, see copyright notice in zlib.h
-
-# To compile, or to compile and test, type:
-#
-#   make -fmakefile.emx;  make test -fmakefile.emx
-#
-
-CC=gcc -Zwin32
-
-#CFLAGS=-MMD -O
-#CFLAGS=-O -DMAX_WBITS=14 -DMAX_MEM_LEVEL=7
-#CFLAGS=-MMD -g -DDEBUG
-CFLAGS=-MMD -O3 $(BUTT) -Wall -Wwrite-strings -Wpointer-arith -Wconversion \
-             -Wstrict-prototypes -Wmissing-prototypes
-
-# If cp.exe is available, replace "copy /Y" with "cp -fp" .
-CP=copy /Y
-# If gnu install.exe is available, replace $(CP) with ginstall.
-INSTALL=$(CP)
-# The default value of RM is "rm -f."  If "rm.exe" is found, comment out:
-RM=del
-LDLIBS=-L. -lzlib
-LD=$(CC) -s -o
-LDSHARED=$(CC)
-
-INCL=zlib.h zconf.h
-LIBS=zlib.a
-
-AR=ar rcs
-
-prefix=/usr/local
-exec_prefix = $(prefix)
-
-OBJS = adler32.o compress.o crc32.o gzio.o uncompr.o deflate.o trees.o \
-       zutil.o inflate.o infback.o inftrees.o inffast.o
-
-TEST_OBJS = example.o minigzip.o
-
-all: example.exe minigzip.exe
-
-test: all
-	./example
-	echo hello world | .\minigzip | .\minigzip -d
-
-%.o : %.c
-	$(CC) $(CFLAGS) -c $< -o $@
-
-zlib.a: $(OBJS)
-	$(AR) $@ $(OBJS)
-
-%.exe : %.o $(LIBS)
-	$(LD) $@ $< $(LDLIBS)
-
-
-.PHONY : clean
-
-clean:
-	$(RM) *.d
-	$(RM) *.o
-	$(RM) *.exe
-	$(RM) zlib.a
-	$(RM) foo.gz
-
-DEPS := $(wildcard *.d)
-ifneq ($(DEPS),)
-include $(DEPS)
-endif
Index: trunk/minix/lib/zlib-1.2.3/win32/Makefile.gcc
===================================================================
--- trunk/minix/lib/zlib-1.2.3/win32/Makefile.gcc	(revision 9)
+++ 	(revision )
@@ -1,141 +1,0 @@
-# Makefile for zlib, derived from Makefile.dj2.
-# Modified for mingw32 by C. Spieler, 6/16/98.
-# Updated for zlib 1.2.x by Christian Spieler and Cosmin Truta, Mar-2003.
-# Last updated: 1-Aug-2003.
-# Tested under Cygwin and MinGW.
-
-# Copyright (C) 1995-2003 Jean-loup Gailly.
-# For conditions of distribution and use, see copyright notice in zlib.h
-
-# To compile, or to compile and test, type:
-#
-#   make -fmakefile.gcc;  make test testdll -fmakefile.gcc
-#
-# To use the asm code, type:
-#   cp contrib/asm?86/match.S ./match.S
-#   make LOC=-DASMV OBJA=match.o -fmakefile.gcc
-#
-# To install libz.a, zconf.h and zlib.h in the system directories, type:
-#
-#   make install -fmakefile.gcc
-
-# Note:
-# If the platform is *not* MinGW (e.g. it is Cygwin or UWIN),
-# the DLL name should be changed from "zlib1.dll".
-
-STATICLIB = libz.a
-SHAREDLIB = zlib1.dll
-IMPLIB    = libzdll.a
-
-#LOC = -DASMV
-#LOC = -DDEBUG -g
-
-CC = gcc
-CFLAGS = $(LOC) -O3 -Wall
-
-AS = $(CC)
-ASFLAGS = $(LOC) -Wall
-
-LD = $(CC)
-LDFLAGS = $(LOC) -s
-
-AR = ar
-ARFLAGS = rcs
-
-RC = windres
-RCFLAGS = --define GCC_WINDRES
-
-CP = cp -fp
-# If GNU install is available, replace $(CP) with install.
-INSTALL = $(CP)
-RM = rm -f
-
-prefix = /usr/local
-exec_prefix = $(prefix)
-
-OBJS = adler32.o compress.o crc32.o deflate.o gzio.o infback.o \
-       inffast.o inflate.o inftrees.o trees.o uncompr.o zutil.o
-OBJA =
-
-all: $(STATICLIB) $(SHAREDLIB) $(IMPLIB) example minigzip example_d minigzip_d
-
-test: example minigzip
-	./example
-	echo hello world | ./minigzip | ./minigzip -d
-
-testdll: example_d minigzip_d
-	./example_d
-	echo hello world | ./minigzip_d | ./minigzip_d -d
-
-.c.o:
-	$(CC) $(CFLAGS) -c -o $@ $<
-
-.S.o:
-	$(AS) $(ASFLAGS) -c -o $@ $<
-
-$(STATICLIB): $(OBJS) $(OBJA)
-	$(AR) $(ARFLAGS) $@ $(OBJS) $(OBJA)
-
-$(IMPLIB): $(SHAREDLIB)
-
-$(SHAREDLIB): win32/zlib.def $(OBJS) $(OBJA) zlibrc.o
-	dllwrap --driver-name $(CC) --def win32/zlib.def \
-	  --implib $(IMPLIB) -o $@ $(OBJS) $(OBJA) zlibrc.o
-	strip $@
-
-example: example.o $(STATICLIB)
-	$(LD) $(LDFLAGS) -o $@ example.o $(STATICLIB)
-
-minigzip: minigzip.o $(STATICLIB)
-	$(LD) $(LDFLAGS) -o $@ minigzip.o $(STATICLIB)
-
-example_d: example.o $(IMPLIB)
-	$(LD) $(LDFLAGS) -o $@ example.o $(IMPLIB)
-
-minigzip_d: minigzip.o $(IMPLIB)
-	$(LD) $(LDFLAGS) -o $@ minigzip.o $(IMPLIB)
-
-zlibrc.o: win32/zlib1.rc
-	$(RC) $(RCFLAGS) -o $@ win32/zlib1.rc
-
-
-# INCLUDE_PATH and LIBRARY_PATH must be set.
-
-.PHONY: install uninstall clean
-
-install: zlib.h zconf.h $(LIB)
-	-@if not exist $(INCLUDE_PATH)/nul mkdir $(INCLUDE_PATH)
-	-@if not exist $(LIBRARY_PATH)/nul mkdir $(LIBRARY_PATH)
-	-$(INSTALL) zlib.h $(INCLUDE_PATH)
-	-$(INSTALL) zconf.h $(INCLUDE_PATH)
-	-$(INSTALL) $(STATICLIB) $(LIBRARY_PATH)
-	-$(INSTALL) $(IMPLIB) $(LIBRARY_PATH)
-
-uninstall:
-	-$(RM) $(INCLUDE_PATH)/zlib.h
-	-$(RM) $(INCLUDE_PATH)/zconf.h
-	-$(RM) $(LIBRARY_PATH)/$(STATICLIB)
-	-$(RM) $(LIBRARY_PATH)/$(IMPLIB)
-
-clean:
-	-$(RM) $(STATICLIB)
-	-$(RM) $(SHAREDLIB)
-	-$(RM) $(IMPLIB)
-	-$(RM) *.o
-	-$(RM) *.exe
-	-$(RM) foo.gz
-
-adler32.o: zlib.h zconf.h
-compress.o: zlib.h zconf.h
-crc32.o: crc32.h zlib.h zconf.h
-deflate.o: deflate.h zutil.h zlib.h zconf.h
-example.o: zlib.h zconf.h
-gzio.o: zutil.h zlib.h zconf.h
-inffast.o: zutil.h zlib.h zconf.h inftrees.h inflate.h inffast.h
-inflate.o: zutil.h zlib.h zconf.h inftrees.h inflate.h inffast.h
-infback.o: zutil.h zlib.h zconf.h inftrees.h inflate.h inffast.h
-inftrees.o: zutil.h zlib.h zconf.h inftrees.h
-minigzip.o: zlib.h zconf.h
-trees.o: deflate.h zutil.h zlib.h zconf.h trees.h
-uncompr.o: zlib.h zconf.h
-zutil.o: zutil.h zlib.h zconf.h
Index: trunk/minix/lib/zlib-1.2.3/win32/Makefile.msc
===================================================================
--- trunk/minix/lib/zlib-1.2.3/win32/Makefile.msc	(revision 9)
+++ 	(revision )
@@ -1,126 +1,0 @@
-# Makefile for zlib -- Microsoft (Visual) C
-#
-# Authors:
-#   Cosmin Truta, 11-Mar-2003
-#   Christian Spieler, 19-Mar-2003
-#
-# Last updated:
-#   Cosmin Truta, 27-Aug-2003
-#
-# Usage:
-#   nmake -f win32/Makefile.msc            (standard build)
-#   nmake -f win32/Makefile.msc LOC=-DFOO  (nonstandard build)
-#   nmake -f win32/Makefile.msc LOC=-DASMV OBJA=match.obj  (use ASM code)
-
-
-# optional build flags
-LOC =
-
-
-# variables
-STATICLIB = zlib.lib
-SHAREDLIB = zlib1.dll
-IMPLIB    = zdll.lib
-
-CC = cl
-AS = ml
-LD = link
-AR = lib
-RC = rc
-CFLAGS  = -nologo -MD -O2 $(LOC)
-ASFLAGS = -coff
-LDFLAGS = -nologo -release
-ARFLAGS = -nologo
-RCFLAGS = /dWIN32 /r
-
-OBJS = adler32.obj compress.obj crc32.obj deflate.obj gzio.obj infback.obj \
-       inffast.obj inflate.obj inftrees.obj trees.obj uncompr.obj zutil.obj
-OBJA =
-
-
-# targets
-all: $(STATICLIB) $(SHAREDLIB) $(IMPLIB) \
-     example.exe minigzip.exe example_d.exe minigzip_d.exe
-
-$(STATICLIB): $(OBJS) $(OBJA)
-	$(AR) $(ARFLAGS) -out:$@ $(OBJS) $(OBJA)
-
-$(IMPLIB): $(SHAREDLIB)
-
-$(SHAREDLIB): win32/zlib.def $(OBJS) $(OBJA) zlib1.res
-	$(LD) $(LDFLAGS) -def:win32/zlib.def -dll -implib:$(IMPLIB) \
-	  -out:$@ $(OBJS) $(OBJA) zlib1.res
-
-example.exe: example.obj $(STATICLIB)
-	$(LD) $(LDFLAGS) example.obj $(STATICLIB)
-
-minigzip.exe: minigzip.obj $(STATICLIB)
-	$(LD) $(LDFLAGS) minigzip.obj $(STATICLIB)
-
-example_d.exe: example.obj $(IMPLIB)
-	$(LD) $(LDFLAGS) -out:$@ example.obj $(IMPLIB)
-
-minigzip_d.exe: minigzip.obj $(IMPLIB)
-	$(LD) $(LDFLAGS) -out:$@ minigzip.obj $(IMPLIB)
-
-.c.obj:
-	$(CC) -c $(CFLAGS) $<
-
-.asm.obj:
-	$(AS) -c $(ASFLAGS) $<
-
-adler32.obj: adler32.c zlib.h zconf.h
-
-compress.obj: compress.c zlib.h zconf.h
-
-crc32.obj: crc32.c zlib.h zconf.h crc32.h
-
-deflate.obj: deflate.c deflate.h zutil.h zlib.h zconf.h
-
-gzio.obj: gzio.c zutil.h zlib.h zconf.h
-
-infback.obj: infback.c zutil.h zlib.h zconf.h inftrees.h inflate.h \
-             inffast.h inffixed.h
-
-inffast.obj: inffast.c zutil.h zlib.h zconf.h inftrees.h inflate.h \
-             inffast.h
-
-inflate.obj: inflate.c zutil.h zlib.h zconf.h inftrees.h inflate.h \
-             inffast.h inffixed.h
-
-inftrees.obj: inftrees.c zutil.h zlib.h zconf.h inftrees.h
-
-trees.obj: trees.c zutil.h zlib.h zconf.h deflate.h trees.h
-
-uncompr.obj: uncompr.c zlib.h zconf.h
-
-zutil.obj: zutil.c zutil.h zlib.h zconf.h
-
-example.obj: example.c zlib.h zconf.h
-
-minigzip.obj: minigzip.c zlib.h zconf.h
-
-zlib1.res: win32/zlib1.rc
-	$(RC) $(RCFLAGS) /fo$@ win32/zlib1.rc
-
-
-# testing
-test: example.exe minigzip.exe
-	example
-	echo hello world | minigzip | minigzip -d
-
-testdll: example_d.exe minigzip_d.exe
-	example_d
-	echo hello world | minigzip_d | minigzip_d -d
-
-
-# cleanup
-clean:
-	-del $(STATICLIB)
-	-del $(SHAREDLIB)
-	-del $(IMPLIB)
-	-del *.obj
-	-del *.res
-	-del *.exp
-	-del *.exe
-	-del foo.gz
Index: trunk/minix/lib/zlib-1.2.3/win32/VisualC.txt
===================================================================
--- trunk/minix/lib/zlib-1.2.3/win32/VisualC.txt	(revision 9)
+++ 	(revision )
@@ -1,3 +1,0 @@
-
-To build zlib using the Microsoft Visual C++ environment,
-use the appropriate project from the projects/ directory.
Index: trunk/minix/lib/zlib-1.2.3/win32/zlib.def
===================================================================
--- trunk/minix/lib/zlib-1.2.3/win32/zlib.def	(revision 9)
+++ 	(revision )
@@ -1,60 +1,0 @@
-LIBRARY
-; zlib data compression library
-
-EXPORTS
-; basic functions
-    zlibVersion
-    deflate
-    deflateEnd
-    inflate
-    inflateEnd
-; advanced functions
-    deflateSetDictionary
-    deflateCopy
-    deflateReset
-    deflateParams
-    deflateBound
-    deflatePrime
-    inflateSetDictionary
-    inflateSync
-    inflateCopy
-    inflateReset
-    inflateBack
-    inflateBackEnd
-    zlibCompileFlags
-; utility functions
-    compress
-    compress2
-    compressBound
-    uncompress
-    gzopen
-    gzdopen
-    gzsetparams
-    gzread
-    gzwrite
-    gzprintf
-    gzputs
-    gzgets
-    gzputc
-    gzgetc
-    gzungetc
-    gzflush
-    gzseek
-    gzrewind
-    gztell
-    gzeof
-    gzclose
-    gzerror
-    gzclearerr
-; checksum functions
-    adler32
-    crc32
-; various hacks, don't look :)
-    deflateInit_
-    deflateInit2_
-    inflateInit_
-    inflateInit2_
-    inflateBackInit_
-    inflateSyncPoint
-    get_crc_table
-    zError
Index: trunk/minix/lib/zlib-1.2.3/win32/zlib1.rc
===================================================================
--- trunk/minix/lib/zlib-1.2.3/win32/zlib1.rc	(revision 9)
+++ 	(revision )
@@ -1,39 +1,0 @@
-#include <windows.h>
-
-#ifdef GCC_WINDRES
-VS_VERSION_INFO		VERSIONINFO
-#else
-VS_VERSION_INFO		VERSIONINFO	MOVEABLE IMPURE LOADONCALL DISCARDABLE
-#endif
-  FILEVERSION		1,2,2,0
-  PRODUCTVERSION	1,2,2,0
-  FILEFLAGSMASK		VS_FFI_FILEFLAGSMASK
-#ifdef _DEBUG
-  FILEFLAGS		1
-#else
-  FILEFLAGS		0
-#endif
-  FILEOS		VOS_DOS_WINDOWS32
-  FILETYPE		VFT_DLL
-  FILESUBTYPE		0	// not used
-BEGIN
-  BLOCK "StringFileInfo"
-  BEGIN
-    BLOCK "040904E4"
-    //language ID = U.S. English, char set = Windows, Multilingual
-    BEGIN
-      VALUE "FileDescription",	"zlib data compression library\0"
-      VALUE "FileVersion",	"1.2.3\0"
-      VALUE "InternalName",	"zlib1.dll\0"
-      VALUE "LegalCopyright",	"(C) 1995-2004 Jean-loup Gailly & Mark Adler\0"
-      VALUE "OriginalFilename",	"zlib1.dll\0"
-      VALUE "ProductName",	"zlib\0"
-      VALUE "ProductVersion",	"1.2.3\0"
-      VALUE "Comments","DLL support by Alessandro Iacopetti & Gilles Vollant\0"
-    END
-  END
-  BLOCK "VarFileInfo"
-  BEGIN
-    VALUE "Translation", 0x0409, 1252
-  END
-END
Index: trunk/minix/lib/zlib-1.2.3/zconf.h
===================================================================
--- trunk/minix/lib/zlib-1.2.3/zconf.h	(revision 9)
+++ 	(revision )
@@ -1,332 +1,0 @@
-/* zconf.h -- configuration of the zlib compression library
- * Copyright (C) 1995-2005 Jean-loup Gailly.
- * For conditions of distribution and use, see copyright notice in zlib.h
- */
-
-/* @(#) $Id: zconf.h,v 1.1 2005/09/23 22:39:00 beng Exp $ */
-
-#ifndef ZCONF_H
-#define ZCONF_H
-
-/*
- * If you *really* need a unique prefix for all types and library functions,
- * compile with -DZ_PREFIX. The "standard" zlib should be compiled without it.
- */
-#ifdef Z_PREFIX
-#  define deflateInit_          z_deflateInit_
-#  define deflate               z_deflate
-#  define deflateEnd            z_deflateEnd
-#  define inflateInit_          z_inflateInit_
-#  define inflate               z_inflate
-#  define inflateEnd            z_inflateEnd
-#  define deflateInit2_         z_deflateInit2_
-#  define deflateSetDictionary  z_deflateSetDictionary
-#  define deflateCopy           z_deflateCopy
-#  define deflateReset          z_deflateReset
-#  define deflateParams         z_deflateParams
-#  define deflateBound          z_deflateBound
-#  define deflatePrime          z_deflatePrime
-#  define inflateInit2_         z_inflateInit2_
-#  define inflateSetDictionary  z_inflateSetDictionary
-#  define inflateSync           z_inflateSync
-#  define inflateSyncPoint      z_inflateSyncPoint
-#  define inflateCopy           z_inflateCopy
-#  define inflateReset          z_inflateReset
-#  define inflateBack           z_inflateBack
-#  define inflateBackEnd        z_inflateBackEnd
-#  define compress              z_compress
-#  define compress2             z_compress2
-#  define compressBound         z_compressBound
-#  define uncompress            z_uncompress
-#  define adler32               z_adler32
-#  define crc32                 z_crc32
-#  define get_crc_table         z_get_crc_table
-#  define zError                z_zError
-
-#  define alloc_func            z_alloc_func
-#  define free_func             z_free_func
-#  define in_func               z_in_func
-#  define out_func              z_out_func
-#  define Byte                  z_Byte
-#  define uInt                  z_uInt
-#  define uLong                 z_uLong
-#  define Bytef                 z_Bytef
-#  define charf                 z_charf
-#  define intf                  z_intf
-#  define uIntf                 z_uIntf
-#  define uLongf                z_uLongf
-#  define voidpf                z_voidpf
-#  define voidp                 z_voidp
-#endif
-
-#if defined(__MSDOS__) && !defined(MSDOS)
-#  define MSDOS
-#endif
-#if (defined(OS_2) || defined(__OS2__)) && !defined(OS2)
-#  define OS2
-#endif
-#if defined(_WINDOWS) && !defined(WINDOWS)
-#  define WINDOWS
-#endif
-#if defined(_WIN32) || defined(_WIN32_WCE) || defined(__WIN32__)
-#  ifndef WIN32
-#    define WIN32
-#  endif
-#endif
-#if (defined(MSDOS) || defined(OS2) || defined(WINDOWS)) && !defined(WIN32)
-#  if !defined(__GNUC__) && !defined(__FLAT__) && !defined(__386__)
-#    ifndef SYS16BIT
-#      define SYS16BIT
-#    endif
-#  endif
-#endif
-
-/*
- * Compile with -DMAXSEG_64K if the alloc function cannot allocate more
- * than 64k bytes at a time (needed on systems with 16-bit int).
- */
-#ifdef SYS16BIT
-#  define MAXSEG_64K
-#endif
-#ifdef MSDOS
-#  define UNALIGNED_OK
-#endif
-
-#ifdef __STDC_VERSION__
-#  ifndef STDC
-#    define STDC
-#  endif
-#  if __STDC_VERSION__ >= 199901L
-#    ifndef STDC99
-#      define STDC99
-#    endif
-#  endif
-#endif
-#if !defined(STDC) && (defined(__STDC__) || defined(__cplusplus))
-#  define STDC
-#endif
-#if !defined(STDC) && (defined(__GNUC__) || defined(__BORLANDC__))
-#  define STDC
-#endif
-#if !defined(STDC) && (defined(MSDOS) || defined(WINDOWS) || defined(WIN32))
-#  define STDC
-#endif
-#if !defined(STDC) && (defined(OS2) || defined(__HOS_AIX__))
-#  define STDC
-#endif
-
-#if defined(__OS400__) && !defined(STDC)    /* iSeries (formerly AS/400). */
-#  define STDC
-#endif
-
-#ifndef STDC
-#  ifndef const /* cannot use !defined(STDC) && !defined(const) on Mac */
-#    define const       /* note: need a more gentle solution here */
-#  endif
-#endif
-
-/* Some Mac compilers merge all .h files incorrectly: */
-#if defined(__MWERKS__)||defined(applec)||defined(THINK_C)||defined(__SC__)
-#  define NO_DUMMY_DECL
-#endif
-
-/* Maximum value for memLevel in deflateInit2 */
-#ifndef MAX_MEM_LEVEL
-#  ifdef MAXSEG_64K
-#    define MAX_MEM_LEVEL 8
-#  else
-#    define MAX_MEM_LEVEL 9
-#  endif
-#endif
-
-/* Maximum value for windowBits in deflateInit2 and inflateInit2.
- * WARNING: reducing MAX_WBITS makes minigzip unable to extract .gz files
- * created by gzip. (Files created by minigzip can still be extracted by
- * gzip.)
- */
-#ifndef MAX_WBITS
-#  define MAX_WBITS   15 /* 32K LZ77 window */
-#endif
-
-/* The memory requirements for deflate are (in bytes):
-            (1 << (windowBits+2)) +  (1 << (memLevel+9))
- that is: 128K for windowBits=15  +  128K for memLevel = 8  (default values)
- plus a few kilobytes for small objects. For example, if you want to reduce
- the default memory requirements from 256K to 128K, compile with
-     make CFLAGS="-O -DMAX_WBITS=14 -DMAX_MEM_LEVEL=7"
- Of course this will generally degrade compression (there's no free lunch).
-
-   The memory requirements for inflate are (in bytes) 1 << windowBits
- that is, 32K for windowBits=15 (default value) plus a few kilobytes
- for small objects.
-*/
-
-                        /* Type declarations */
-
-#ifndef OF /* function prototypes */
-#  ifdef STDC
-#    define OF(args)  args
-#  else
-#    define OF(args)  ()
-#  endif
-#endif
-
-/* The following definitions for FAR are needed only for MSDOS mixed
- * model programming (small or medium model with some far allocations).
- * This was tested only with MSC; for other MSDOS compilers you may have
- * to define NO_MEMCPY in zutil.h.  If you don't need the mixed model,
- * just define FAR to be empty.
- */
-#ifdef SYS16BIT
-#  if defined(M_I86SM) || defined(M_I86MM)
-     /* MSC small or medium model */
-#    define SMALL_MEDIUM
-#    ifdef _MSC_VER
-#      define FAR _far
-#    else
-#      define FAR far
-#    endif
-#  endif
-#  if (defined(__SMALL__) || defined(__MEDIUM__))
-     /* Turbo C small or medium model */
-#    define SMALL_MEDIUM
-#    ifdef __BORLANDC__
-#      define FAR _far
-#    else
-#      define FAR far
-#    endif
-#  endif
-#endif
-
-#if defined(WINDOWS) || defined(WIN32)
-   /* If building or using zlib as a DLL, define ZLIB_DLL.
-    * This is not mandatory, but it offers a little performance increase.
-    */
-#  ifdef ZLIB_DLL
-#    if defined(WIN32) && (!defined(__BORLANDC__) || (__BORLANDC__ >= 0x500))
-#      ifdef ZLIB_INTERNAL
-#        define ZEXTERN extern __declspec(dllexport)
-#      else
-#        define ZEXTERN extern __declspec(dllimport)
-#      endif
-#    endif
-#  endif  /* ZLIB_DLL */
-   /* If building or using zlib with the WINAPI/WINAPIV calling convention,
-    * define ZLIB_WINAPI.
-    * Caution: the standard ZLIB1.DLL is NOT compiled using ZLIB_WINAPI.
-    */
-#  ifdef ZLIB_WINAPI
-#    ifdef FAR
-#      undef FAR
-#    endif
-#    include <windows.h>
-     /* No need for _export, use ZLIB.DEF instead. */
-     /* For complete Windows compatibility, use WINAPI, not __stdcall. */
-#    define ZEXPORT WINAPI
-#    ifdef WIN32
-#      define ZEXPORTVA WINAPIV
-#    else
-#      define ZEXPORTVA FAR CDECL
-#    endif
-#  endif
-#endif
-
-#if defined (__BEOS__)
-#  ifdef ZLIB_DLL
-#    ifdef ZLIB_INTERNAL
-#      define ZEXPORT   __declspec(dllexport)
-#      define ZEXPORTVA __declspec(dllexport)
-#    else
-#      define ZEXPORT   __declspec(dllimport)
-#      define ZEXPORTVA __declspec(dllimport)
-#    endif
-#  endif
-#endif
-
-#ifndef ZEXTERN
-#  define ZEXTERN extern
-#endif
-#ifndef ZEXPORT
-#  define ZEXPORT
-#endif
-#ifndef ZEXPORTVA
-#  define ZEXPORTVA
-#endif
-
-#ifndef FAR
-#  define FAR
-#endif
-
-#if !defined(__MACTYPES__)
-typedef unsigned char  Byte;  /* 8 bits */
-#endif
-typedef unsigned int   uInt;  /* 16 bits or more */
-typedef unsigned long  uLong; /* 32 bits or more */
-
-#ifdef SMALL_MEDIUM
-   /* Borland C/C++ and some old MSC versions ignore FAR inside typedef */
-#  define Bytef Byte FAR
-#else
-   typedef Byte  FAR Bytef;
-#endif
-typedef char  FAR charf;
-typedef int   FAR intf;
-typedef uInt  FAR uIntf;
-typedef uLong FAR uLongf;
-
-#ifdef STDC
-   typedef void const *voidpc;
-   typedef void FAR   *voidpf;
-   typedef void       *voidp;
-#else
-   typedef Byte const *voidpc;
-   typedef Byte FAR   *voidpf;
-   typedef Byte       *voidp;
-#endif
-
-#if 0           /* HAVE_UNISTD_H -- this line is updated by ./configure */
-#  include <sys/types.h> /* for off_t */
-#  include <unistd.h>    /* for SEEK_* and off_t */
-#  ifdef VMS
-#    include <unixio.h>   /* for off_t */
-#  endif
-#  define z_off_t off_t
-#endif
-#ifndef SEEK_SET
-#  define SEEK_SET        0       /* Seek from beginning of file.  */
-#  define SEEK_CUR        1       /* Seek from current position.  */
-#  define SEEK_END        2       /* Set file pointer to EOF plus "offset" */
-#endif
-#ifndef z_off_t
-#  define z_off_t long
-#endif
-
-#if defined(__OS400__)
-#  define NO_vsnprintf
-#endif
-
-#if defined(__MVS__)
-#  define NO_vsnprintf
-#  ifdef FAR
-#    undef FAR
-#  endif
-#endif
-
-/* MVS linker does not support external names larger than 8 bytes */
-#if defined(__MVS__)
-#   pragma map(deflateInit_,"DEIN")
-#   pragma map(deflateInit2_,"DEIN2")
-#   pragma map(deflateEnd,"DEEND")
-#   pragma map(deflateBound,"DEBND")
-#   pragma map(inflateInit_,"ININ")
-#   pragma map(inflateInit2_,"ININ2")
-#   pragma map(inflateEnd,"INEND")
-#   pragma map(inflateSync,"INSY")
-#   pragma map(inflateSetDictionary,"INSEDI")
-#   pragma map(compressBound,"CMBND")
-#   pragma map(inflate_table,"INTABL")
-#   pragma map(inflate_fast,"INFA")
-#   pragma map(inflate_copyright,"INCOPY")
-#endif
-
-#endif /* ZCONF_H */
Index: trunk/minix/lib/zlib-1.2.3/zconf.in.h
===================================================================
--- trunk/minix/lib/zlib-1.2.3/zconf.in.h	(revision 9)
+++ 	(revision )
@@ -1,332 +1,0 @@
-/* zconf.h -- configuration of the zlib compression library
- * Copyright (C) 1995-2005 Jean-loup Gailly.
- * For conditions of distribution and use, see copyright notice in zlib.h
- */
-
-/* @(#) $Id: zconf.in.h,v 1.1 2005/09/23 22:39:00 beng Exp $ */
-
-#ifndef ZCONF_H
-#define ZCONF_H
-
-/*
- * If you *really* need a unique prefix for all types and library functions,
- * compile with -DZ_PREFIX. The "standard" zlib should be compiled without it.
- */
-#ifdef Z_PREFIX
-#  define deflateInit_          z_deflateInit_
-#  define deflate               z_deflate
-#  define deflateEnd            z_deflateEnd
-#  define inflateInit_          z_inflateInit_
-#  define inflate               z_inflate
-#  define inflateEnd            z_inflateEnd
-#  define deflateInit2_         z_deflateInit2_
-#  define deflateSetDictionary  z_deflateSetDictionary
-#  define deflateCopy           z_deflateCopy
-#  define deflateReset          z_deflateReset
-#  define deflateParams         z_deflateParams
-#  define deflateBound          z_deflateBound
-#  define deflatePrime          z_deflatePrime
-#  define inflateInit2_         z_inflateInit2_
-#  define inflateSetDictionary  z_inflateSetDictionary
-#  define inflateSync           z_inflateSync
-#  define inflateSyncPoint      z_inflateSyncPoint
-#  define inflateCopy           z_inflateCopy
-#  define inflateReset          z_inflateReset
-#  define inflateBack           z_inflateBack
-#  define inflateBackEnd        z_inflateBackEnd
-#  define compress              z_compress
-#  define compress2             z_compress2
-#  define compressBound         z_compressBound
-#  define uncompress            z_uncompress
-#  define adler32               z_adler32
-#  define crc32                 z_crc32
-#  define get_crc_table         z_get_crc_table
-#  define zError                z_zError
-
-#  define alloc_func            z_alloc_func
-#  define free_func             z_free_func
-#  define in_func               z_in_func
-#  define out_func              z_out_func
-#  define Byte                  z_Byte
-#  define uInt                  z_uInt
-#  define uLong                 z_uLong
-#  define Bytef                 z_Bytef
-#  define charf                 z_charf
-#  define intf                  z_intf
-#  define uIntf                 z_uIntf
-#  define uLongf                z_uLongf
-#  define voidpf                z_voidpf
-#  define voidp                 z_voidp
-#endif
-
-#if defined(__MSDOS__) && !defined(MSDOS)
-#  define MSDOS
-#endif
-#if (defined(OS_2) || defined(__OS2__)) && !defined(OS2)
-#  define OS2
-#endif
-#if defined(_WINDOWS) && !defined(WINDOWS)
-#  define WINDOWS
-#endif
-#if defined(_WIN32) || defined(_WIN32_WCE) || defined(__WIN32__)
-#  ifndef WIN32
-#    define WIN32
-#  endif
-#endif
-#if (defined(MSDOS) || defined(OS2) || defined(WINDOWS)) && !defined(WIN32)
-#  if !defined(__GNUC__) && !defined(__FLAT__) && !defined(__386__)
-#    ifndef SYS16BIT
-#      define SYS16BIT
-#    endif
-#  endif
-#endif
-
-/*
- * Compile with -DMAXSEG_64K if the alloc function cannot allocate more
- * than 64k bytes at a time (needed on systems with 16-bit int).
- */
-#ifdef SYS16BIT
-#  define MAXSEG_64K
-#endif
-#ifdef MSDOS
-#  define UNALIGNED_OK
-#endif
-
-#ifdef __STDC_VERSION__
-#  ifndef STDC
-#    define STDC
-#  endif
-#  if __STDC_VERSION__ >= 199901L
-#    ifndef STDC99
-#      define STDC99
-#    endif
-#  endif
-#endif
-#if !defined(STDC) && (defined(__STDC__) || defined(__cplusplus))
-#  define STDC
-#endif
-#if !defined(STDC) && (defined(__GNUC__) || defined(__BORLANDC__))
-#  define STDC
-#endif
-#if !defined(STDC) && (defined(MSDOS) || defined(WINDOWS) || defined(WIN32))
-#  define STDC
-#endif
-#if !defined(STDC) && (defined(OS2) || defined(__HOS_AIX__))
-#  define STDC
-#endif
-
-#if defined(__OS400__) && !defined(STDC)    /* iSeries (formerly AS/400). */
-#  define STDC
-#endif
-
-#ifndef STDC
-#  ifndef const /* cannot use !defined(STDC) && !defined(const) on Mac */
-#    define const       /* note: need a more gentle solution here */
-#  endif
-#endif
-
-/* Some Mac compilers merge all .h files incorrectly: */
-#if defined(__MWERKS__)||defined(applec)||defined(THINK_C)||defined(__SC__)
-#  define NO_DUMMY_DECL
-#endif
-
-/* Maximum value for memLevel in deflateInit2 */
-#ifndef MAX_MEM_LEVEL
-#  ifdef MAXSEG_64K
-#    define MAX_MEM_LEVEL 8
-#  else
-#    define MAX_MEM_LEVEL 9
-#  endif
-#endif
-
-/* Maximum value for windowBits in deflateInit2 and inflateInit2.
- * WARNING: reducing MAX_WBITS makes minigzip unable to extract .gz files
- * created by gzip. (Files created by minigzip can still be extracted by
- * gzip.)
- */
-#ifndef MAX_WBITS
-#  define MAX_WBITS   15 /* 32K LZ77 window */
-#endif
-
-/* The memory requirements for deflate are (in bytes):
-            (1 << (windowBits+2)) +  (1 << (memLevel+9))
- that is: 128K for windowBits=15  +  128K for memLevel = 8  (default values)
- plus a few kilobytes for small objects. For example, if you want to reduce
- the default memory requirements from 256K to 128K, compile with
-     make CFLAGS="-O -DMAX_WBITS=14 -DMAX_MEM_LEVEL=7"
- Of course this will generally degrade compression (there's no free lunch).
-
-   The memory requirements for inflate are (in bytes) 1 << windowBits
- that is, 32K for windowBits=15 (default value) plus a few kilobytes
- for small objects.
-*/
-
-                        /* Type declarations */
-
-#ifndef OF /* function prototypes */
-#  ifdef STDC
-#    define OF(args)  args
-#  else
-#    define OF(args)  ()
-#  endif
-#endif
-
-/* The following definitions for FAR are needed only for MSDOS mixed
- * model programming (small or medium model with some far allocations).
- * This was tested only with MSC; for other MSDOS compilers you may have
- * to define NO_MEMCPY in zutil.h.  If you don't need the mixed model,
- * just define FAR to be empty.
- */
-#ifdef SYS16BIT
-#  if defined(M_I86SM) || defined(M_I86MM)
-     /* MSC small or medium model */
-#    define SMALL_MEDIUM
-#    ifdef _MSC_VER
-#      define FAR _far
-#    else
-#      define FAR far
-#    endif
-#  endif
-#  if (defined(__SMALL__) || defined(__MEDIUM__))
-     /* Turbo C small or medium model */
-#    define SMALL_MEDIUM
-#    ifdef __BORLANDC__
-#      define FAR _far
-#    else
-#      define FAR far
-#    endif
-#  endif
-#endif
-
-#if defined(WINDOWS) || defined(WIN32)
-   /* If building or using zlib as a DLL, define ZLIB_DLL.
-    * This is not mandatory, but it offers a little performance increase.
-    */
-#  ifdef ZLIB_DLL
-#    if defined(WIN32) && (!defined(__BORLANDC__) || (__BORLANDC__ >= 0x500))
-#      ifdef ZLIB_INTERNAL
-#        define ZEXTERN extern __declspec(dllexport)
-#      else
-#        define ZEXTERN extern __declspec(dllimport)
-#      endif
-#    endif
-#  endif  /* ZLIB_DLL */
-   /* If building or using zlib with the WINAPI/WINAPIV calling convention,
-    * define ZLIB_WINAPI.
-    * Caution: the standard ZLIB1.DLL is NOT compiled using ZLIB_WINAPI.
-    */
-#  ifdef ZLIB_WINAPI
-#    ifdef FAR
-#      undef FAR
-#    endif
-#    include <windows.h>
-     /* No need for _export, use ZLIB.DEF instead. */
-     /* For complete Windows compatibility, use WINAPI, not __stdcall. */
-#    define ZEXPORT WINAPI
-#    ifdef WIN32
-#      define ZEXPORTVA WINAPIV
-#    else
-#      define ZEXPORTVA FAR CDECL
-#    endif
-#  endif
-#endif
-
-#if defined (__BEOS__)
-#  ifdef ZLIB_DLL
-#    ifdef ZLIB_INTERNAL
-#      define ZEXPORT   __declspec(dllexport)
-#      define ZEXPORTVA __declspec(dllexport)
-#    else
-#      define ZEXPORT   __declspec(dllimport)
-#      define ZEXPORTVA __declspec(dllimport)
-#    endif
-#  endif
-#endif
-
-#ifndef ZEXTERN
-#  define ZEXTERN extern
-#endif
-#ifndef ZEXPORT
-#  define ZEXPORT
-#endif
-#ifndef ZEXPORTVA
-#  define ZEXPORTVA
-#endif
-
-#ifndef FAR
-#  define FAR
-#endif
-
-#if !defined(__MACTYPES__)
-typedef unsigned char  Byte;  /* 8 bits */
-#endif
-typedef unsigned int   uInt;  /* 16 bits or more */
-typedef unsigned long  uLong; /* 32 bits or more */
-
-#ifdef SMALL_MEDIUM
-   /* Borland C/C++ and some old MSC versions ignore FAR inside typedef */
-#  define Bytef Byte FAR
-#else
-   typedef Byte  FAR Bytef;
-#endif
-typedef char  FAR charf;
-typedef int   FAR intf;
-typedef uInt  FAR uIntf;
-typedef uLong FAR uLongf;
-
-#ifdef STDC
-   typedef void const *voidpc;
-   typedef void FAR   *voidpf;
-   typedef void       *voidp;
-#else
-   typedef Byte const *voidpc;
-   typedef Byte FAR   *voidpf;
-   typedef Byte       *voidp;
-#endif
-
-#if 0           /* HAVE_UNISTD_H -- this line is updated by ./configure */
-#  include <sys/types.h> /* for off_t */
-#  include <unistd.h>    /* for SEEK_* and off_t */
-#  ifdef VMS
-#    include <unixio.h>   /* for off_t */
-#  endif
-#  define z_off_t off_t
-#endif
-#ifndef SEEK_SET
-#  define SEEK_SET        0       /* Seek from beginning of file.  */
-#  define SEEK_CUR        1       /* Seek from current position.  */
-#  define SEEK_END        2       /* Set file pointer to EOF plus "offset" */
-#endif
-#ifndef z_off_t
-#  define z_off_t long
-#endif
-
-#if defined(__OS400__)
-#  define NO_vsnprintf
-#endif
-
-#if defined(__MVS__)
-#  define NO_vsnprintf
-#  ifdef FAR
-#    undef FAR
-#  endif
-#endif
-
-/* MVS linker does not support external names larger than 8 bytes */
-#if defined(__MVS__)
-#   pragma map(deflateInit_,"DEIN")
-#   pragma map(deflateInit2_,"DEIN2")
-#   pragma map(deflateEnd,"DEEND")
-#   pragma map(deflateBound,"DEBND")
-#   pragma map(inflateInit_,"ININ")
-#   pragma map(inflateInit2_,"ININ2")
-#   pragma map(inflateEnd,"INEND")
-#   pragma map(inflateSync,"INSY")
-#   pragma map(inflateSetDictionary,"INSEDI")
-#   pragma map(compressBound,"CMBND")
-#   pragma map(inflate_table,"INTABL")
-#   pragma map(inflate_fast,"INFA")
-#   pragma map(inflate_copyright,"INCOPY")
-#endif
-
-#endif /* ZCONF_H */
Index: trunk/minix/lib/zlib-1.2.3/zlib.3
===================================================================
--- trunk/minix/lib/zlib-1.2.3/zlib.3	(revision 9)
+++ 	(revision )
@@ -1,159 +1,0 @@
-.TH ZLIB 3 "18 July 2005"
-.SH NAME
-zlib \- compression/decompression library
-.SH SYNOPSIS
-[see
-.I zlib.h
-for full description]
-.SH DESCRIPTION
-The
-.I zlib
-library is a general purpose data compression library.
-The code is thread safe.
-It provides in-memory compression and decompression functions,
-including integrity checks of the uncompressed data.
-This version of the library supports only one compression method (deflation)
-but other algorithms will be added later
-and will have the same stream interface.
-.LP
-Compression can be done in a single step if the buffers are large enough
-(for example if an input file is mmap'ed),
-or can be done by repeated calls of the compression function.
-In the latter case,
-the application must provide more input and/or consume the output
-(providing more output space) before each call.
-.LP
-The library also supports reading and writing files in
-.IR gzip (1)
-(.gz) format
-with an interface similar to that of stdio.
-.LP
-The library does not install any signal handler.
-The decoder checks the consistency of the compressed data,
-so the library should never crash even in case of corrupted input.
-.LP
-All functions of the compression library are documented in the file
-.IR zlib.h .
-The distribution source includes examples of use of the library
-in the files
-.I example.c
-and
-.IR minigzip.c .
-.LP
-Changes to this version are documented in the file
-.I ChangeLog
-that accompanies the source,
-and are concerned primarily with bug fixes and portability enhancements.
-.LP
-A Java implementation of
-.I zlib
-is available in the Java Development Kit 1.1:
-.IP
-http://www.javasoft.com/products/JDK/1.1/docs/api/Package-java.util.zip.html
-.LP
-A Perl interface to
-.IR zlib ,
-written by Paul Marquess (pmqs@cpan.org),
-is available at CPAN (Comprehensive Perl Archive Network) sites,
-including:
-.IP
-http://www.cpan.org/modules/by-module/Compress/
-.LP
-A Python interface to
-.IR zlib ,
-written by A.M. Kuchling (amk@magnet.com),
-is available in Python 1.5 and later versions:
-.IP
-http://www.python.org/doc/lib/module-zlib.html
-.LP
-A
-.I zlib
-binding for
-.IR tcl (1),
-written by Andreas Kupries (a.kupries@westend.com),
-is availlable at:
-.IP
-http://www.westend.com/~kupries/doc/trf/man/man.html
-.LP
-An experimental package to read and write files in .zip format,
-written on top of
-.I zlib
-by Gilles Vollant (info@winimage.com),
-is available at:
-.IP
-http://www.winimage.com/zLibDll/unzip.html
-and also in the
-.I contrib/minizip
-directory of the main
-.I zlib
-web site.
-.SH "SEE ALSO"
-The
-.I zlib
-web site can be found at either of these locations:
-.IP
-http://www.zlib.org
-.br
-http://www.gzip.org/zlib/
-.LP
-The data format used by the zlib library is described by RFC
-(Request for Comments) 1950 to 1952 in the files:
-.IP
-http://www.ietf.org/rfc/rfc1950.txt (concerning zlib format)
-.br
-http://www.ietf.org/rfc/rfc1951.txt (concerning deflate format)
-.br
-http://www.ietf.org/rfc/rfc1952.txt (concerning gzip format)
-.LP
-These documents are also available in other formats from:
-.IP
-ftp://ftp.uu.net/graphics/png/documents/zlib/zdoc-index.html
-.LP
-Mark Nelson (markn@ieee.org) wrote an article about
-.I zlib
-for the Jan. 1997 issue of  Dr. Dobb's Journal;
-a copy of the article is available at:
-.IP
-http://dogma.net/markn/articles/zlibtool/zlibtool.htm
-.SH "REPORTING PROBLEMS"
-Before reporting a problem,
-please check the
-.I zlib
-web site to verify that you have the latest version of
-.IR zlib ;
-otherwise,
-obtain the latest version and see if the problem still exists.
-Please read the
-.I zlib
-FAQ at:
-.IP
-http://www.gzip.org/zlib/zlib_faq.html
-.LP
-before asking for help.
-Send questions and/or comments to zlib@gzip.org,
-or (for the Windows DLL version) to Gilles Vollant (info@winimage.com).
-.SH AUTHORS
-Version 1.2.3
-Copyright (C) 1995-2005 Jean-loup Gailly (jloup@gzip.org)
-and Mark Adler (madler@alumni.caltech.edu).
-.LP
-This software is provided "as-is,"
-without any express or implied warranty.
-In no event will the authors be held liable for any damages
-arising from the use of this software.
-See the distribution directory with respect to requirements
-governing redistribution.
-The deflate format used by
-.I zlib
-was defined by Phil Katz.
-The deflate and
-.I zlib
-specifications were written by L. Peter Deutsch.
-Thanks to all the people who reported problems and suggested various
-improvements in
-.IR zlib ;
-who are too numerous to cite here.
-.LP
-UNIX manual page by R. P. C. Rodgers,
-U.S. National Library of Medicine (rodgers@nlm.nih.gov).
-.\" end of man page
Index: trunk/minix/lib/zlib-1.2.3/zlib.h
===================================================================
--- trunk/minix/lib/zlib-1.2.3/zlib.h	(revision 9)
+++ 	(revision )
@@ -1,1357 +1,0 @@
-/* zlib.h -- interface of the 'zlib' general purpose compression library
-  version 1.2.3, July 18th, 2005
-
-  Copyright (C) 1995-2005 Jean-loup Gailly and Mark Adler
-
-  This software is provided 'as-is', without any express or implied
-  warranty.  In no event will the authors be held liable for any damages
-  arising from the use of this software.
-
-  Permission is granted to anyone to use this software for any purpose,
-  including commercial applications, and to alter it and redistribute it
-  freely, subject to the following restrictions:
-
-  1. The origin of this software must not be misrepresented; you must not
-     claim that you wrote the original software. If you use this software
-     in a product, an acknowledgment in the product documentation would be
-     appreciated but is not required.
-  2. Altered source versions must be plainly marked as such, and must not be
-     misrepresented as being the original software.
-  3. This notice may not be removed or altered from any source distribution.
-
-  Jean-loup Gailly        Mark Adler
-  jloup@gzip.org          madler@alumni.caltech.edu
-
-
-  The data format used by the zlib library is described by RFCs (Request for
-  Comments) 1950 to 1952 in the files http://www.ietf.org/rfc/rfc1950.txt
-  (zlib format), rfc1951.txt (deflate format) and rfc1952.txt (gzip format).
-*/
-
-#ifndef ZLIB_H
-#define ZLIB_H
-
-#include "zconf.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#define ZLIB_VERSION "1.2.3"
-#define ZLIB_VERNUM 0x1230
-
-/*
-     The 'zlib' compression library provides in-memory compression and
-  decompression functions, including integrity checks of the uncompressed
-  data.  This version of the library supports only one compression method
-  (deflation) but other algorithms will be added later and will have the same
-  stream interface.
-
-     Compression can be done in a single step if the buffers are large
-  enough (for example if an input file is mmap'ed), or can be done by
-  repeated calls of the compression function.  In the latter case, the
-  application must provide more input and/or consume the output
-  (providing more output space) before each call.
-
-     The compressed data format used by default by the in-memory functions is
-  the zlib format, which is a zlib wrapper documented in RFC 1950, wrapped
-  around a deflate stream, which is itself documented in RFC 1951.
-
-     The library also supports reading and writing files in gzip (.gz) format
-  with an interface similar to that of stdio using the functions that start
-  with "gz".  The gzip format is different from the zlib format.  gzip is a
-  gzip wrapper, documented in RFC 1952, wrapped around a deflate stream.
-
-     This library can optionally read and write gzip streams in memory as well.
-
-     The zlib format was designed to be compact and fast for use in memory
-  and on communications channels.  The gzip format was designed for single-
-  file compression on file systems, has a larger header than zlib to maintain
-  directory information, and uses a different, slower check method than zlib.
-
-     The library does not install any signal handler. The decoder checks
-  the consistency of the compressed data, so the library should never
-  crash even in case of corrupted input.
-*/
-
-typedef voidpf (*alloc_func) OF((voidpf opaque, uInt items, uInt size));
-typedef void   (*free_func)  OF((voidpf opaque, voidpf address));
-
-struct internal_state;
-
-typedef struct z_stream_s {
-    Bytef    *next_in;  /* next input byte */
-    uInt     avail_in;  /* number of bytes available at next_in */
-    uLong    total_in;  /* total nb of input bytes read so far */
-
-    Bytef    *next_out; /* next output byte should be put there */
-    uInt     avail_out; /* remaining free space at next_out */
-    uLong    total_out; /* total nb of bytes output so far */
-
-    char     *msg;      /* last error message, NULL if no error */
-    struct internal_state FAR *state; /* not visible by applications */
-
-    alloc_func zalloc;  /* used to allocate the internal state */
-    free_func  zfree;   /* used to free the internal state */
-    voidpf     opaque;  /* private data object passed to zalloc and zfree */
-
-    int     data_type;  /* best guess about the data type: binary or text */
-    uLong   adler;      /* adler32 value of the uncompressed data */
-    uLong   reserved;   /* reserved for future use */
-} z_stream;
-
-typedef z_stream FAR *z_streamp;
-
-/*
-     gzip header information passed to and from zlib routines.  See RFC 1952
-  for more details on the meanings of these fields.
-*/
-typedef struct gz_header_s {
-    int     text;       /* true if compressed data believed to be text */
-    uLong   time;       /* modification time */
-    int     xflags;     /* extra flags (not used when writing a gzip file) */
-    int     os;         /* operating system */
-    Bytef   *extra;     /* pointer to extra field or Z_NULL if none */
-    uInt    extra_len;  /* extra field length (valid if extra != Z_NULL) */
-    uInt    extra_max;  /* space at extra (only when reading header) */
-    Bytef   *name;      /* pointer to zero-terminated file name or Z_NULL */
-    uInt    name_max;   /* space at name (only when reading header) */
-    Bytef   *comment;   /* pointer to zero-terminated comment or Z_NULL */
-    uInt    comm_max;   /* space at comment (only when reading header) */
-    int     hcrc;       /* true if there was or will be a header crc */
-    int     done;       /* true when done reading gzip header (not used
-                           when writing a gzip file) */
-} gz_header;
-
-typedef gz_header FAR *gz_headerp;
-
-/*
-   The application must update next_in and avail_in when avail_in has
-   dropped to zero. It must update next_out and avail_out when avail_out
-   has dropped to zero. The application must initialize zalloc, zfree and
-   opaque before calling the init function. All other fields are set by the
-   compression library and must not be updated by the application.
-
-   The opaque value provided by the application will be passed as the first
-   parameter for calls of zalloc and zfree. This can be useful for custom
-   memory management. The compression library attaches no meaning to the
-   opaque value.
-
-   zalloc must return Z_NULL if there is not enough memory for the object.
-   If zlib is used in a multi-threaded application, zalloc and zfree must be
-   thread safe.
-
-   On 16-bit systems, the functions zalloc and zfree must be able to allocate
-   exactly 65536 bytes, but will not be required to allocate more than this
-   if the symbol MAXSEG_64K is defined (see zconf.h). WARNING: On MSDOS,
-   pointers returned by zalloc for objects of exactly 65536 bytes *must*
-   have their offset normalized to zero. The default allocation function
-   provided by this library ensures this (see zutil.c). To reduce memory
-   requirements and avoid any allocation of 64K objects, at the expense of
-   compression ratio, compile the library with -DMAX_WBITS=14 (see zconf.h).
-
-   The fields total_in and total_out can be used for statistics or
-   progress reports. After compression, total_in holds the total size of
-   the uncompressed data and may be saved for use in the decompressor
-   (particularly if the decompressor wants to decompress everything in
-   a single step).
-*/
-
-                        /* constants */
-
-#define Z_NO_FLUSH      0
-#define Z_PARTIAL_FLUSH 1 /* will be removed, use Z_SYNC_FLUSH instead */
-#define Z_SYNC_FLUSH    2
-#define Z_FULL_FLUSH    3
-#define Z_FINISH        4
-#define Z_BLOCK         5
-/* Allowed flush values; see deflate() and inflate() below for details */
-
-#define Z_OK            0
-#define Z_STREAM_END    1
-#define Z_NEED_DICT     2
-#define Z_ERRNO        (-1)
-#define Z_STREAM_ERROR (-2)
-#define Z_DATA_ERROR   (-3)
-#define Z_MEM_ERROR    (-4)
-#define Z_BUF_ERROR    (-5)
-#define Z_VERSION_ERROR (-6)
-/* Return codes for the compression/decompression functions. Negative
- * values are errors, positive values are used for special but normal events.
- */
-
-#define Z_NO_COMPRESSION         0
-#define Z_BEST_SPEED             1
-#define Z_BEST_COMPRESSION       9
-#define Z_DEFAULT_COMPRESSION  (-1)
-/* compression levels */
-
-#define Z_FILTERED            1
-#define Z_HUFFMAN_ONLY        2
-#define Z_RLE                 3
-#define Z_FIXED               4
-#define Z_DEFAULT_STRATEGY    0
-/* compression strategy; see deflateInit2() below for details */
-
-#define Z_BINARY   0
-#define Z_TEXT     1
-#define Z_ASCII    Z_TEXT   /* for compatibility with 1.2.2 and earlier */
-#define Z_UNKNOWN  2
-/* Possible values of the data_type field (though see inflate()) */
-
-#define Z_DEFLATED   8
-/* The deflate compression method (the only one supported in this version) */
-
-#define Z_NULL  0  /* for initializing zalloc, zfree, opaque */
-
-#define zlib_version zlibVersion()
-/* for compatibility with versions < 1.0.2 */
-
-                        /* basic functions */
-
-ZEXTERN const char * ZEXPORT zlibVersion OF((void));
-/* The application can compare zlibVersion and ZLIB_VERSION for consistency.
-   If the first character differs, the library code actually used is
-   not compatible with the zlib.h header file used by the application.
-   This check is automatically made by deflateInit and inflateInit.
- */
-
-/*
-ZEXTERN int ZEXPORT deflateInit OF((z_streamp strm, int level));
-
-     Initializes the internal stream state for compression. The fields
-   zalloc, zfree and opaque must be initialized before by the caller.
-   If zalloc and zfree are set to Z_NULL, deflateInit updates them to
-   use default allocation functions.
-
-     The compression level must be Z_DEFAULT_COMPRESSION, or between 0 and 9:
-   1 gives best speed, 9 gives best compression, 0 gives no compression at
-   all (the input data is simply copied a block at a time).
-   Z_DEFAULT_COMPRESSION requests a default compromise between speed and
-   compression (currently equivalent to level 6).
-
-     deflateInit returns Z_OK if success, Z_MEM_ERROR if there was not
-   enough memory, Z_STREAM_ERROR if level is not a valid compression level,
-   Z_VERSION_ERROR if the zlib library version (zlib_version) is incompatible
-   with the version assumed by the caller (ZLIB_VERSION).
-   msg is set to null if there is no error message.  deflateInit does not
-   perform any compression: this will be done by deflate().
-*/
-
-
-ZEXTERN int ZEXPORT deflate OF((z_streamp strm, int flush));
-/*
-    deflate compresses as much data as possible, and stops when the input
-  buffer becomes empty or the output buffer becomes full. It may introduce some
-  output latency (reading input without producing any output) except when
-  forced to flush.
-
-    The detailed semantics are as follows. deflate performs one or both of the
-  following actions:
-
-  - Compress more input starting at next_in and update next_in and avail_in
-    accordingly. If not all input can be processed (because there is not
-    enough room in the output buffer), next_in and avail_in are updated and
-    processing will resume at this point for the next call of deflate().
-
-  - Provide more output starting at next_out and update next_out and avail_out
-    accordingly. This action is forced if the parameter flush is non zero.
-    Forcing flush frequently degrades the compression ratio, so this parameter
-    should be set only when necessary (in interactive applications).
-    Some output may be provided even if flush is not set.
-
-  Before the call of deflate(), the application should ensure that at least
-  one of the actions is possible, by providing more input and/or consuming
-  more output, and updating avail_in or avail_out accordingly; avail_out
-  should never be zero before the call. The application can consume the
-  compressed output when it wants, for example when the output buffer is full
-  (avail_out == 0), or after each call of deflate(). If deflate returns Z_OK
-  and with zero avail_out, it must be called again after making room in the
-  output buffer because there might be more output pending.
-
-    Normally the parameter flush is set to Z_NO_FLUSH, which allows deflate to
-  decide how much data to accumualte before producing output, in order to
-  maximize compression.
-
-    If the parameter flush is set to Z_SYNC_FLUSH, all pending output is
-  flushed to the output buffer and the output is aligned on a byte boundary, so
-  that the decompressor can get all input data available so far. (In particular
-  avail_in is zero after the call if enough output space has been provided
-  before the call.)  Flushing may degrade compression for some compression
-  algorithms and so it should be used only when necessary.
-
-    If flush is set to Z_FULL_FLUSH, all output is flushed as with
-  Z_SYNC_FLUSH, and the compression state is reset so that decompression can
-  restart from this point if previous compressed data has been damaged or if
-  random access is desired. Using Z_FULL_FLUSH too often can seriously degrade
-  compression.
-
-    If deflate returns with avail_out == 0, this function must be called again
-  with the same value of the flush parameter and more output space (updated
-  avail_out), until the flush is complete (deflate returns with non-zero
-  avail_out). In the case of a Z_FULL_FLUSH or Z_SYNC_FLUSH, make sure that
-  avail_out is greater than six to avoid repeated flush markers due to
-  avail_out == 0 on return.
-
-    If the parameter flush is set to Z_FINISH, pending input is processed,
-  pending output is flushed and deflate returns with Z_STREAM_END if there
-  was enough output space; if deflate returns with Z_OK, this function must be
-  called again with Z_FINISH and more output space (updated avail_out) but no
-  more input data, until it returns with Z_STREAM_END or an error. After
-  deflate has returned Z_STREAM_END, the only possible operations on the
-  stream are deflateReset or deflateEnd.
-
-    Z_FINISH can be used immediately after deflateInit if all the compression
-  is to be done in a single step. In this case, avail_out must be at least
-  the value returned by deflateBound (see below). If deflate does not return
-  Z_STREAM_END, then it must be called again as described above.
-
-    deflate() sets strm->adler to the adler32 checksum of all input read
-  so far (that is, total_in bytes).
-
-    deflate() may update strm->data_type if it can make a good guess about
-  the input data type (Z_BINARY or Z_TEXT). In doubt, the data is considered
-  binary. This field is only for information purposes and does not affect
-  the compression algorithm in any manner.
-
-    deflate() returns Z_OK if some progress has been made (more input
-  processed or more output produced), Z_STREAM_END if all input has been
-  consumed and all output has been produced (only when flush is set to
-  Z_FINISH), Z_STREAM_ERROR if the stream state was inconsistent (for example
-  if next_in or next_out was NULL), Z_BUF_ERROR if no progress is possible
-  (for example avail_in or avail_out was zero). Note that Z_BUF_ERROR is not
-  fatal, and deflate() can be called again with more input and more output
-  space to continue compressing.
-*/
-
-
-ZEXTERN int ZEXPORT deflateEnd OF((z_streamp strm));
-/*
-     All dynamically allocated data structures for this stream are freed.
-   This function discards any unprocessed input and does not flush any
-   pending output.
-
-     deflateEnd returns Z_OK if success, Z_STREAM_ERROR if the
-   stream state was inconsistent, Z_DATA_ERROR if the stream was freed
-   prematurely (some input or output was discarded). In the error case,
-   msg may be set but then points to a static string (which must not be
-   deallocated).
-*/
-
-
-/*
-ZEXTERN int ZEXPORT inflateInit OF((z_streamp strm));
-
-     Initializes the internal stream state for decompression. The fields
-   next_in, avail_in, zalloc, zfree and opaque must be initialized before by
-   the caller. If next_in is not Z_NULL and avail_in is large enough (the exact
-   value depends on the compression method), inflateInit determines the
-   compression method from the zlib header and allocates all data structures
-   accordingly; otherwise the allocation will be deferred to the first call of
-   inflate.  If zalloc and zfree are set to Z_NULL, inflateInit updates them to
-   use default allocation functions.
-
-     inflateInit returns Z_OK if success, Z_MEM_ERROR if there was not enough
-   memory, Z_VERSION_ERROR if the zlib library version is incompatible with the
-   version assumed by the caller.  msg is set to null if there is no error
-   message. inflateInit does not perform any decompression apart from reading
-   the zlib header if present: this will be done by inflate().  (So next_in and
-   avail_in may be modified, but next_out and avail_out are unchanged.)
-*/
-
-
-ZEXTERN int ZEXPORT inflate OF((z_streamp strm, int flush));
-/*
-    inflate decompresses as much data as possible, and stops when the input
-  buffer becomes empty or the output buffer becomes full. It may introduce
-  some output latency (reading input without producing any output) except when
-  forced to flush.
-
-  The detailed semantics are as follows. inflate performs one or both of the
-  following actions:
-
-  - Decompress more input starting at next_in and update next_in and avail_in
-    accordingly. If not all input can be processed (because there is not
-    enough room in the output buffer), next_in is updated and processing
-    will resume at this point for the next call of inflate().
-
-  - Provide more output starting at next_out and update next_out and avail_out
-    accordingly.  inflate() provides as much output as possible, until there
-    is no more input data or no more space in the output buffer (see below
-    about the flush parameter).
-
-  Before the call of inflate(), the application should ensure that at least
-  one of the actions is possible, by providing more input and/or consuming
-  more output, and updating the next_* and avail_* values accordingly.
-  The application can consume the uncompressed output when it wants, for
-  example when the output buffer is full (avail_out == 0), or after each
-  call of inflate(). If inflate returns Z_OK and with zero avail_out, it
-  must be called again after making room in the output buffer because there
-  might be more output pending.
-
-    The flush parameter of inflate() can be Z_NO_FLUSH, Z_SYNC_FLUSH,
-  Z_FINISH, or Z_BLOCK. Z_SYNC_FLUSH requests that inflate() flush as much
-  output as possible to the output buffer. Z_BLOCK requests that inflate() stop
-  if and when it gets to the next deflate block boundary. When decoding the
-  zlib or gzip format, this will cause inflate() to return immediately after
-  the header and before the first block. When doing a raw inflate, inflate()
-  will go ahead and process the first block, and will return when it gets to
-  the end of that block, or when it runs out of data.
-
-    The Z_BLOCK option assists in appending to or combining deflate streams.
-  Also to assist in this, on return inflate() will set strm->data_type to the
-  number of unused bits in the last byte taken from strm->next_in, plus 64
-  if inflate() is currently decoding the last block in the deflate stream,
-  plus 128 if inflate() returned immediately after decoding an end-of-block
-  code or decoding the complete header up to just before the first byte of the
-  deflate stream. The end-of-block will not be indicated until all of the
-  uncompressed data from that block has been written to strm->next_out.  The
-  number of unused bits may in general be greater than seven, except when
-  bit 7 of data_type is set, in which case the number of unused bits will be
-  less than eight.
-
-    inflate() should normally be called until it returns Z_STREAM_END or an
-  error. However if all decompression is to be performed in a single step
-  (a single call of inflate), the parameter flush should be set to
-  Z_FINISH. In this case all pending input is processed and all pending
-  output is flushed; avail_out must be large enough to hold all the
-  uncompressed data. (The size of the uncompressed data may have been saved
-  by the compressor for this purpose.) The next operation on this stream must
-  be inflateEnd to deallocate the decompression state. The use of Z_FINISH
-  is never required, but can be used to inform inflate that a faster approach
-  may be used for the single inflate() call.
-
-     In this implementation, inflate() always flushes as much output as
-  possible to the output buffer, and always uses the faster approach on the
-  first call. So the only effect of the flush parameter in this implementation
-  is on the return value of inflate(), as noted below, or when it returns early
-  because Z_BLOCK is used.
-
-     If a preset dictionary is needed after this call (see inflateSetDictionary
-  below), inflate sets strm->adler to the adler32 checksum of the dictionary
-  chosen by the compressor and returns Z_NEED_DICT; otherwise it sets
-  strm->adler to the adler32 checksum of all output produced so far (that is,
-  total_out bytes) and returns Z_OK, Z_STREAM_END or an error code as described
-  below. At the end of the stream, inflate() checks that its computed adler32
-  checksum is equal to that saved by the compressor and returns Z_STREAM_END
-  only if the checksum is correct.
-
-    inflate() will decompress and check either zlib-wrapped or gzip-wrapped
-  deflate data.  The header type is detected automatically.  Any information
-  contained in the gzip header is not retained, so applications that need that
-  information should instead use raw inflate, see inflateInit2() below, or
-  inflateBack() and perform their own processing of the gzip header and
-  trailer.
-
-    inflate() returns Z_OK if some progress has been made (more input processed
-  or more output produced), Z_STREAM_END if the end of the compressed data has
-  been reached and all uncompressed output has been produced, Z_NEED_DICT if a
-  preset dictionary is needed at this point, Z_DATA_ERROR if the input data was
-  corrupted (input stream not conforming to the zlib format or incorrect check
-  value), Z_STREAM_ERROR if the stream structure was inconsistent (for example
-  if next_in or next_out was NULL), Z_MEM_ERROR if there was not enough memory,
-  Z_BUF_ERROR if no progress is possible or if there was not enough room in the
-  output buffer when Z_FINISH is used. Note that Z_BUF_ERROR is not fatal, and
-  inflate() can be called again with more input and more output space to
-  continue decompressing. If Z_DATA_ERROR is returned, the application may then
-  call inflateSync() to look for a good compression block if a partial recovery
-  of the data is desired.
-*/
-
-
-ZEXTERN int ZEXPORT inflateEnd OF((z_streamp strm));
-/*
-     All dynamically allocated data structures for this stream are freed.
-   This function discards any unprocessed input and does not flush any
-   pending output.
-
-     inflateEnd returns Z_OK if success, Z_STREAM_ERROR if the stream state
-   was inconsistent. In the error case, msg may be set but then points to a
-   static string (which must not be deallocated).
-*/
-
-                        /* Advanced functions */
-
-/*
-    The following functions are needed only in some special applications.
-*/
-
-/*
-ZEXTERN int ZEXPORT deflateInit2 OF((z_streamp strm,
-                                     int  level,
-                                     int  method,
-                                     int  windowBits,
-                                     int  memLevel,
-                                     int  strategy));
-
-     This is another version of deflateInit with more compression options. The
-   fields next_in, zalloc, zfree and opaque must be initialized before by
-   the caller.
-
-     The method parameter is the compression method. It must be Z_DEFLATED in
-   this version of the library.
-
-     The windowBits parameter is the base two logarithm of the window size
-   (the size of the history buffer). It should be in the range 8..15 for this
-   version of the library. Larger values of this parameter result in better
-   compression at the expense of memory usage. The default value is 15 if
-   deflateInit is used instead.
-
-     windowBits can also be -8..-15 for raw deflate. In this case, -windowBits
-   determines the window size. deflate() will then generate raw deflate data
-   with no zlib header or trailer, and will not compute an adler32 check value.
-
-     windowBits can also be greater than 15 for optional gzip encoding. Add
-   16 to windowBits to write a simple gzip header and trailer around the
-   compressed data instead of a zlib wrapper. The gzip header will have no
-   file name, no extra data, no comment, no modification time (set to zero),
-   no header crc, and the operating system will be set to 255 (unknown).  If a
-   gzip stream is being written, strm->adler is a crc32 instead of an adler32.
-
-     The memLevel parameter specifies how much memory should be allocated
-   for the internal compression state. memLevel=1 uses minimum memory but
-   is slow and reduces compression ratio; memLevel=9 uses maximum memory
-   for optimal speed. The default value is 8. See zconf.h for total memory
-   usage as a function of windowBits and memLevel.
-
-     The strategy parameter is used to tune the compression algorithm. Use the
-   value Z_DEFAULT_STRATEGY for normal data, Z_FILTERED for data produced by a
-   filter (or predictor), Z_HUFFMAN_ONLY to force Huffman encoding only (no
-   string match), or Z_RLE to limit match distances to one (run-length
-   encoding). Filtered data consists mostly of small values with a somewhat
-   random distribution. In this case, the compression algorithm is tuned to
-   compress them better. The effect of Z_FILTERED is to force more Huffman
-   coding and less string matching; it is somewhat intermediate between
-   Z_DEFAULT and Z_HUFFMAN_ONLY. Z_RLE is designed to be almost as fast as
-   Z_HUFFMAN_ONLY, but give better compression for PNG image data. The strategy
-   parameter only affects the compression ratio but not the correctness of the
-   compressed output even if it is not set appropriately.  Z_FIXED prevents the
-   use of dynamic Huffman codes, allowing for a simpler decoder for special
-   applications.
-
-      deflateInit2 returns Z_OK if success, Z_MEM_ERROR if there was not enough
-   memory, Z_STREAM_ERROR if a parameter is invalid (such as an invalid
-   method). msg is set to null if there is no error message.  deflateInit2 does
-   not perform any compression: this will be done by deflate().
-*/
-
-ZEXTERN int ZEXPORT deflateSetDictionary OF((z_streamp strm,
-                                             const Bytef *dictionary,
-                                             uInt  dictLength));
-/*
-     Initializes the compression dictionary from the given byte sequence
-   without producing any compressed output. This function must be called
-   immediately after deflateInit, deflateInit2 or deflateReset, before any
-   call of deflate. The compressor and decompressor must use exactly the same
-   dictionary (see inflateSetDictionary).
-
-     The dictionary should consist of strings (byte sequences) that are likely
-   to be encountered later in the data to be compressed, with the most commonly
-   used strings preferably put towards the end of the dictionary. Using a
-   dictionary is most useful when the data to be compressed is short and can be
-   predicted with good accuracy; the data can then be compressed better than
-   with the default empty dictionary.
-
-     Depending on the size of the compression data structures selected by
-   deflateInit or deflateInit2, a part of the dictionary may in effect be
-   discarded, for example if the dictionary is larger than the window size in
-   deflate or deflate2. Thus the strings most likely to be useful should be
-   put at the end of the dictionary, not at the front. In addition, the
-   current implementation of deflate will use at most the window size minus
-   262 bytes of the provided dictionary.
-
-     Upon return of this function, strm->adler is set to the adler32 value
-   of the dictionary; the decompressor may later use this value to determine
-   which dictionary has been used by the compressor. (The adler32 value
-   applies to the whole dictionary even if only a subset of the dictionary is
-   actually used by the compressor.) If a raw deflate was requested, then the
-   adler32 value is not computed and strm->adler is not set.
-
-     deflateSetDictionary returns Z_OK if success, or Z_STREAM_ERROR if a
-   parameter is invalid (such as NULL dictionary) or the stream state is
-   inconsistent (for example if deflate has already been called for this stream
-   or if the compression method is bsort). deflateSetDictionary does not
-   perform any compression: this will be done by deflate().
-*/
-
-ZEXTERN int ZEXPORT deflateCopy OF((z_streamp dest,
-                                    z_streamp source));
-/*
-     Sets the destination stream as a complete copy of the source stream.
-
-     This function can be useful when several compression strategies will be
-   tried, for example when there are several ways of pre-processing the input
-   data with a filter. The streams that will be discarded should then be freed
-   by calling deflateEnd.  Note that deflateCopy duplicates the internal
-   compression state which can be quite large, so this strategy is slow and
-   can consume lots of memory.
-
-     deflateCopy returns Z_OK if success, Z_MEM_ERROR if there was not
-   enough memory, Z_STREAM_ERROR if the source stream state was inconsistent
-   (such as zalloc being NULL). msg is left unchanged in both source and
-   destination.
-*/
-
-ZEXTERN int ZEXPORT deflateReset OF((z_streamp strm));
-/*
-     This function is equivalent to deflateEnd followed by deflateInit,
-   but does not free and reallocate all the internal compression state.
-   The stream will keep the same compression level and any other attributes
-   that may have been set by deflateInit2.
-
-      deflateReset returns Z_OK if success, or Z_STREAM_ERROR if the source
-   stream state was inconsistent (such as zalloc or state being NULL).
-*/
-
-ZEXTERN int ZEXPORT deflateParams OF((z_streamp strm,
-                                      int level,
-                                      int strategy));
-/*
-     Dynamically update the compression level and compression strategy.  The
-   interpretation of level and strategy is as in deflateInit2.  This can be
-   used to switch between compression and straight copy of the input data, or
-   to switch to a different kind of input data requiring a different
-   strategy. If the compression level is changed, the input available so far
-   is compressed with the old level (and may be flushed); the new level will
-   take effect only at the next call of deflate().
-
-     Before the call of deflateParams, the stream state must be set as for
-   a call of deflate(), since the currently available input may have to
-   be compressed and flushed. In particular, strm->avail_out must be non-zero.
-
-     deflateParams returns Z_OK if success, Z_STREAM_ERROR if the source
-   stream state was inconsistent or if a parameter was invalid, Z_BUF_ERROR
-   if strm->avail_out was zero.
-*/
-
-ZEXTERN int ZEXPORT deflateTune OF((z_streamp strm,
-                                    int good_length,
-                                    int max_lazy,
-                                    int nice_length,
-                                    int max_chain));
-/*
-     Fine tune deflate's internal compression parameters.  This should only be
-   used by someone who understands the algorithm used by zlib's deflate for
-   searching for the best matching string, and even then only by the most
-   fanatic optimizer trying to squeeze out the last compressed bit for their
-   specific input data.  Read the deflate.c source code for the meaning of the
-   max_lazy, good_length, nice_length, and max_chain parameters.
-
-     deflateTune() can be called after deflateInit() or deflateInit2(), and
-   returns Z_OK on success, or Z_STREAM_ERROR for an invalid deflate stream.
- */
-
-ZEXTERN uLong ZEXPORT deflateBound OF((z_streamp strm,
-                                       uLong sourceLen));
-/*
-     deflateBound() returns an upper bound on the compressed size after
-   deflation of sourceLen bytes.  It must be called after deflateInit()
-   or deflateInit2().  This would be used to allocate an output buffer
-   for deflation in a single pass, and so would be called before deflate().
-*/
-
-ZEXTERN int ZEXPORT deflatePrime OF((z_streamp strm,
-                                     int bits,
-                                     int value));
-/*
-     deflatePrime() inserts bits in the deflate output stream.  The intent
-  is that this function is used to start off the deflate output with the
-  bits leftover from a previous deflate stream when appending to it.  As such,
-  this function can only be used for raw deflate, and must be used before the
-  first deflate() call after a deflateInit2() or deflateReset().  bits must be
-  less than or equal to 16, and that many of the least significant bits of
-  value will be inserted in the output.
-
-      deflatePrime returns Z_OK if success, or Z_STREAM_ERROR if the source
-   stream state was inconsistent.
-*/
-
-ZEXTERN int ZEXPORT deflateSetHeader OF((z_streamp strm,
-                                         gz_headerp head));
-/*
-      deflateSetHeader() provides gzip header information for when a gzip
-   stream is requested by deflateInit2().  deflateSetHeader() may be called
-   after deflateInit2() or deflateReset() and before the first call of
-   deflate().  The text, time, os, extra field, name, and comment information
-   in the provided gz_header structure are written to the gzip header (xflag is
-   ignored -- the extra flags are set according to the compression level).  The
-   caller must assure that, if not Z_NULL, name and comment are terminated with
-   a zero byte, and that if extra is not Z_NULL, that extra_len bytes are
-   available there.  If hcrc is true, a gzip header crc is included.  Note that
-   the current versions of the command-line version of gzip (up through version
-   1.3.x) do not support header crc's, and will report that it is a "multi-part
-   gzip file" and give up.
-
-      If deflateSetHeader is not used, the default gzip header has text false,
-   the time set to zero, and os set to 255, with no extra, name, or comment
-   fields.  The gzip header is returned to the default state by deflateReset().
-
-      deflateSetHeader returns Z_OK if success, or Z_STREAM_ERROR if the source
-   stream state was inconsistent.
-*/
-
-/*
-ZEXTERN int ZEXPORT inflateInit2 OF((z_streamp strm,
-                                     int  windowBits));
-
-     This is another version of inflateInit with an extra parameter. The
-   fields next_in, avail_in, zalloc, zfree and opaque must be initialized
-   before by the caller.
-
-     The windowBits parameter is the base two logarithm of the maximum window
-   size (the size of the history buffer).  It should be in the range 8..15 for
-   this version of the library. The default value is 15 if inflateInit is used
-   instead. windowBits must be greater than or equal to the windowBits value
-   provided to deflateInit2() while compressing, or it must be equal to 15 if
-   deflateInit2() was not used. If a compressed stream with a larger window
-   size is given as input, inflate() will return with the error code
-   Z_DATA_ERROR instead of trying to allocate a larger window.
-
-     windowBits can also be -8..-15 for raw inflate. In this case, -windowBits
-   determines the window size. inflate() will then process raw deflate data,
-   not looking for a zlib or gzip header, not generating a check value, and not
-   looking for any check values for comparison at the end of the stream. This
-   is for use with other formats that use the deflate compressed data format
-   such as zip.  Those formats provide their own check values. If a custom
-   format is developed using the raw deflate format for compressed data, it is
-   recommended that a check value such as an adler32 or a crc32 be applied to
-   the uncompressed data as is done in the zlib, gzip, and zip formats.  For
-   most applications, the zlib format should be used as is. Note that comments
-   above on the use in deflateInit2() applies to the magnitude of windowBits.
-
-     windowBits can also be greater than 15 for optional gzip decoding. Add
-   32 to windowBits to enable zlib and gzip decoding with automatic header
-   detection, or add 16 to decode only the gzip format (the zlib format will
-   return a Z_DATA_ERROR).  If a gzip stream is being decoded, strm->adler is
-   a crc32 instead of an adler32.
-
-     inflateInit2 returns Z_OK if success, Z_MEM_ERROR if there was not enough
-   memory, Z_STREAM_ERROR if a parameter is invalid (such as a null strm). msg
-   is set to null if there is no error message.  inflateInit2 does not perform
-   any decompression apart from reading the zlib header if present: this will
-   be done by inflate(). (So next_in and avail_in may be modified, but next_out
-   and avail_out are unchanged.)
-*/
-
-ZEXTERN int ZEXPORT inflateSetDictionary OF((z_streamp strm,
-                                             const Bytef *dictionary,
-                                             uInt  dictLength));
-/*
-     Initializes the decompression dictionary from the given uncompressed byte
-   sequence. This function must be called immediately after a call of inflate,
-   if that call returned Z_NEED_DICT. The dictionary chosen by the compressor
-   can be determined from the adler32 value returned by that call of inflate.
-   The compressor and decompressor must use exactly the same dictionary (see
-   deflateSetDictionary).  For raw inflate, this function can be called
-   immediately after inflateInit2() or inflateReset() and before any call of
-   inflate() to set the dictionary.  The application must insure that the
-   dictionary that was used for compression is provided.
-
-     inflateSetDictionary returns Z_OK if success, Z_STREAM_ERROR if a
-   parameter is invalid (such as NULL dictionary) or the stream state is
-   inconsistent, Z_DATA_ERROR if the given dictionary doesn't match the
-   expected one (incorrect adler32 value). inflateSetDictionary does not
-   perform any decompression: this will be done by subsequent calls of
-   inflate().
-*/
-
-ZEXTERN int ZEXPORT inflateSync OF((z_streamp strm));
-/*
-    Skips invalid compressed data until a full flush point (see above the
-  description of deflate with Z_FULL_FLUSH) can be found, or until all
-  available input is skipped. No output is provided.
-
-    inflateSync returns Z_OK if a full flush point has been found, Z_BUF_ERROR
-  if no more input was provided, Z_DATA_ERROR if no flush point has been found,
-  or Z_STREAM_ERROR if the stream structure was inconsistent. In the success
-  case, the application may save the current current value of total_in which
-  indicates where valid compressed data was found. In the error case, the
-  application may repeatedly call inflateSync, providing more input each time,
-  until success or end of the input data.
-*/
-
-ZEXTERN int ZEXPORT inflateCopy OF((z_streamp dest,
-                                    z_streamp source));
-/*
-     Sets the destination stream as a complete copy of the source stream.
-
-     This function can be useful when randomly accessing a large stream.  The
-   first pass through the stream can periodically record the inflate state,
-   allowing restarting inflate at those points when randomly accessing the
-   stream.
-
-     inflateCopy returns Z_OK if success, Z_MEM_ERROR if there was not
-   enough memory, Z_STREAM_ERROR if the source stream state was inconsistent
-   (such as zalloc being NULL). msg is left unchanged in both source and
-   destination.
-*/
-
-ZEXTERN int ZEXPORT inflateReset OF((z_streamp strm));
-/*
-     This function is equivalent to inflateEnd followed by inflateInit,
-   but does not free and reallocate all the internal decompression state.
-   The stream will keep attributes that may have been set by inflateInit2.
-
-      inflateReset returns Z_OK if success, or Z_STREAM_ERROR if the source
-   stream state was inconsistent (such as zalloc or state being NULL).
-*/
-
-ZEXTERN int ZEXPORT inflatePrime OF((z_streamp strm,
-                                     int bits,
-                                     int value));
-/*
-     This function inserts bits in the inflate input stream.  The intent is
-  that this function is used to start inflating at a bit position in the
-  middle of a byte.  The provided bits will be used before any bytes are used
-  from next_in.  This function should only be used with raw inflate, and
-  should be used before the first inflate() call after inflateInit2() or
-  inflateReset().  bits must be less than or equal to 16, and that many of the
-  least significant bits of value will be inserted in the input.
-
-      inflatePrime returns Z_OK if success, or Z_STREAM_ERROR if the source
-   stream state was inconsistent.
-*/
-
-ZEXTERN int ZEXPORT inflateGetHeader OF((z_streamp strm,
-                                         gz_headerp head));
-/*
-      inflateGetHeader() requests that gzip header information be stored in the
-   provided gz_header structure.  inflateGetHeader() may be called after
-   inflateInit2() or inflateReset(), and before the first call of inflate().
-   As inflate() processes the gzip stream, head->done is zero until the header
-   is completed, at which time head->done is set to one.  If a zlib stream is
-   being decoded, then head->done is set to -1 to indicate that there will be
-   no gzip header information forthcoming.  Note that Z_BLOCK can be used to
-   force inflate() to return immediately after header processing is complete
-   and before any actual data is decompressed.
-
-      The text, time, xflags, and os fields are filled in with the gzip header
-   contents.  hcrc is set to true if there is a header CRC.  (The header CRC
-   was valid if done is set to one.)  If extra is not Z_NULL, then extra_max
-   contains the maximum number of bytes to write to extra.  Once done is true,
-   extra_len contains the actual extra field length, and extra contains the
-   extra field, or that field truncated if extra_max is less than extra_len.
-   If name is not Z_NULL, then up to name_max characters are written there,
-   terminated with a zero unless the length is greater than name_max.  If
-   comment is not Z_NULL, then up to comm_max characters are written there,
-   terminated with a zero unless the length is greater than comm_max.  When
-   any of extra, name, or comment are not Z_NULL and the respective field is
-   not present in the header, then that field is set to Z_NULL to signal its
-   absence.  This allows the use of deflateSetHeader() with the returned
-   structure to duplicate the header.  However if those fields are set to
-   allocated memory, then the application will need to save those pointers
-   elsewhere so that they can be eventually freed.
-
-      If inflateGetHeader is not used, then the header information is simply
-   discarded.  The header is always checked for validity, including the header
-   CRC if present.  inflateReset() will reset the process to discard the header
-   information.  The application would need to call inflateGetHeader() again to
-   retrieve the header from the next gzip stream.
-
-      inflateGetHeader returns Z_OK if success, or Z_STREAM_ERROR if the source
-   stream state was inconsistent.
-*/
-
-/*
-ZEXTERN int ZEXPORT inflateBackInit OF((z_streamp strm, int windowBits,
-                                        unsigned char FAR *window));
-
-     Initialize the internal stream state for decompression using inflateBack()
-   calls.  The fields zalloc, zfree and opaque in strm must be initialized
-   before the call.  If zalloc and zfree are Z_NULL, then the default library-
-   derived memory allocation routines are used.  windowBits is the base two
-   logarithm of the window size, in the range 8..15.  window is a caller
-   supplied buffer of that size.  Except for special applications where it is
-   assured that deflate was used with small window sizes, windowBits must be 15
-   and a 32K byte window must be supplied to be able to decompress general
-   deflate streams.
-
-     See inflateBack() for the usage of these routines.
-
-     inflateBackInit will return Z_OK on success, Z_STREAM_ERROR if any of
-   the paramaters are invalid, Z_MEM_ERROR if the internal state could not
-   be allocated, or Z_VERSION_ERROR if the version of the library does not
-   match the version of the header file.
-*/
-
-typedef unsigned (*in_func) OF((void FAR *, unsigned char FAR * FAR *));
-typedef int (*out_func) OF((void FAR *, unsigned char FAR *, unsigned));
-
-ZEXTERN int ZEXPORT inflateBack OF((z_streamp strm,
-                                    in_func in, void FAR *in_desc,
-                                    out_func out, void FAR *out_desc));
-/*
-     inflateBack() does a raw inflate with a single call using a call-back
-   interface for input and output.  This is more efficient than inflate() for
-   file i/o applications in that it avoids copying between the output and the
-   sliding window by simply making the window itself the output buffer.  This
-   function trusts the application to not change the output buffer passed by
-   the output function, at least until inflateBack() returns.
-
-     inflateBackInit() must be called first to allocate the internal state
-   and to initialize the state with the user-provided window buffer.
-   inflateBack() may then be used multiple times to inflate a complete, raw
-   deflate stream with each call.  inflateBackEnd() is then called to free
-   the allocated state.
-
-     A raw deflate stream is one with no zlib or gzip header or trailer.
-   This routine would normally be used in a utility that reads zip or gzip
-   files and writes out uncompressed files.  The utility would decode the
-   header and process the trailer on its own, hence this routine expects
-   only the raw deflate stream to decompress.  This is different from the
-   normal behavior of inflate(), which expects either a zlib or gzip header and
-   trailer around the deflate stream.
-
-     inflateBack() uses two subroutines supplied by the caller that are then
-   called by inflateBack() for input and output.  inflateBack() calls those
-   routines until it reads a complete deflate stream and writes out all of the
-   uncompressed data, or until it encounters an error.  The function's
-   parameters and return types are defined above in the in_func and out_func
-   typedefs.  inflateBack() will call in(in_desc, &buf) which should return the
-   number of bytes of provided input, and a pointer to that input in buf.  If
-   there is no input available, in() must return zero--buf is ignored in that
-   case--and inflateBack() will return a buffer error.  inflateBack() will call
-   out(out_desc, buf, len) to write the uncompressed data buf[0..len-1].  out()
-   should return zero on success, or non-zero on failure.  If out() returns
-   non-zero, inflateBack() will return with an error.  Neither in() nor out()
-   are permitted to change the contents of the window provided to
-   inflateBackInit(), which is also the buffer that out() uses to write from.
-   The length written by out() will be at most the window size.  Any non-zero
-   amount of input may be provided by in().
-
-     For convenience, inflateBack() can be provided input on the first call by
-   setting strm->next_in and strm->avail_in.  If that input is exhausted, then
-   in() will be called.  Therefore strm->next_in must be initialized before
-   calling inflateBack().  If strm->next_in is Z_NULL, then in() will be called
-   immediately for input.  If strm->next_in is not Z_NULL, then strm->avail_in
-   must also be initialized, and then if strm->avail_in is not zero, input will
-   initially be taken from strm->next_in[0 .. strm->avail_in - 1].
-
-     The in_desc and out_desc parameters of inflateBack() is passed as the
-   first parameter of in() and out() respectively when they are called.  These
-   descriptors can be optionally used to pass any information that the caller-
-   supplied in() and out() functions need to do their job.
-
-     On return, inflateBack() will set strm->next_in and strm->avail_in to
-   pass back any unused input that was provided by the last in() call.  The
-   return values of inflateBack() can be Z_STREAM_END on success, Z_BUF_ERROR
-   if in() or out() returned an error, Z_DATA_ERROR if there was a format
-   error in the deflate stream (in which case strm->msg is set to indicate the
-   nature of the error), or Z_STREAM_ERROR if the stream was not properly
-   initialized.  In the case of Z_BUF_ERROR, an input or output error can be
-   distinguished using strm->next_in which will be Z_NULL only if in() returned
-   an error.  If strm->next is not Z_NULL, then the Z_BUF_ERROR was due to
-   out() returning non-zero.  (in() will always be called before out(), so
-   strm->next_in is assured to be defined if out() returns non-zero.)  Note
-   that inflateBack() cannot return Z_OK.
-*/
-
-ZEXTERN int ZEXPORT inflateBackEnd OF((z_streamp strm));
-/*
-     All memory allocated by inflateBackInit() is freed.
-
-     inflateBackEnd() returns Z_OK on success, or Z_STREAM_ERROR if the stream
-   state was inconsistent.
-*/
-
-ZEXTERN uLong ZEXPORT zlibCompileFlags OF((void));
-/* Return flags indicating compile-time options.
-
-    Type sizes, two bits each, 00 = 16 bits, 01 = 32, 10 = 64, 11 = other:
-     1.0: size of uInt
-     3.2: size of uLong
-     5.4: size of voidpf (pointer)
-     7.6: size of z_off_t
-
-    Compiler, assembler, and debug options:
-     8: DEBUG
-     9: ASMV or ASMINF -- use ASM code
-     10: ZLIB_WINAPI -- exported functions use the WINAPI calling convention
-     11: 0 (reserved)
-
-    One-time table building (smaller code, but not thread-safe if true):
-     12: BUILDFIXED -- build static block decoding tables when needed
-     13: DYNAMIC_CRC_TABLE -- build CRC calculation tables when needed
-     14,15: 0 (reserved)
-
-    Library content (indicates missing functionality):
-     16: NO_GZCOMPRESS -- gz* functions cannot compress (to avoid linking
-                          deflate code when not needed)
-     17: NO_GZIP -- deflate can't write gzip streams, and inflate can't detect
-                    and decode gzip streams (to avoid linking crc code)
-     18-19: 0 (reserved)
-
-    Operation variations (changes in library functionality):
-     20: PKZIP_BUG_WORKAROUND -- slightly more permissive inflate
-     21: FASTEST -- deflate algorithm with only one, lowest compression level
-     22,23: 0 (reserved)
-
-    The sprintf variant used by gzprintf (zero is best):
-     24: 0 = vs*, 1 = s* -- 1 means limited to 20 arguments after the format
-     25: 0 = *nprintf, 1 = *printf -- 1 means gzprintf() not secure!
-     26: 0 = returns value, 1 = void -- 1 means inferred string length returned
-
-    Remainder:
-     27-31: 0 (reserved)
- */
-
-
-                        /* utility functions */
-
-/*
-     The following utility functions are implemented on top of the
-   basic stream-oriented functions. To simplify the interface, some
-   default options are assumed (compression level and memory usage,
-   standard memory allocation functions). The source code of these
-   utility functions can easily be modified if you need special options.
-*/
-
-ZEXTERN int ZEXPORT compress OF((Bytef *dest,   uLongf *destLen,
-                                 const Bytef *source, uLong sourceLen));
-/*
-     Compresses the source buffer into the destination buffer.  sourceLen is
-   the byte length of the source buffer. Upon entry, destLen is the total
-   size of the destination buffer, which must be at least the value returned
-   by compressBound(sourceLen). Upon exit, destLen is the actual size of the
-   compressed buffer.
-     This function can be used to compress a whole file at once if the
-   input file is mmap'ed.
-     compress returns Z_OK if success, Z_MEM_ERROR if there was not
-   enough memory, Z_BUF_ERROR if there was not enough room in the output
-   buffer.
-*/
-
-ZEXTERN int ZEXPORT compress2 OF((Bytef *dest,   uLongf *destLen,
-                                  const Bytef *source, uLong sourceLen,
-                                  int level));
-/*
-     Compresses the source buffer into the destination buffer. The level
-   parameter has the same meaning as in deflateInit.  sourceLen is the byte
-   length of the source buffer. Upon entry, destLen is the total size of the
-   destination buffer, which must be at least the value returned by
-   compressBound(sourceLen). Upon exit, destLen is the actual size of the
-   compressed buffer.
-
-     compress2 returns Z_OK if success, Z_MEM_ERROR if there was not enough
-   memory, Z_BUF_ERROR if there was not enough room in the output buffer,
-   Z_STREAM_ERROR if the level parameter is invalid.
-*/
-
-ZEXTERN uLong ZEXPORT compressBound OF((uLong sourceLen));
-/*
-     compressBound() returns an upper bound on the compressed size after
-   compress() or compress2() on sourceLen bytes.  It would be used before
-   a compress() or compress2() call to allocate the destination buffer.
-*/
-
-ZEXTERN int ZEXPORT uncompress OF((Bytef *dest,   uLongf *destLen,
-                                   const Bytef *source, uLong sourceLen));
-/*
-     Decompresses the source buffer into the destination buffer.  sourceLen is
-   the byte length of the source buffer. Upon entry, destLen is the total
-   size of the destination buffer, which must be large enough to hold the
-   entire uncompressed data. (The size of the uncompressed data must have
-   been saved previously by the compressor and transmitted to the decompressor
-   by some mechanism outside the scope of this compression library.)
-   Upon exit, destLen is the actual size of the compressed buffer.
-     This function can be used to decompress a whole file at once if the
-   input file is mmap'ed.
-
-     uncompress returns Z_OK if success, Z_MEM_ERROR if there was not
-   enough memory, Z_BUF_ERROR if there was not enough room in the output
-   buffer, or Z_DATA_ERROR if the input data was corrupted or incomplete.
-*/
-
-
-typedef voidp gzFile;
-
-ZEXTERN gzFile ZEXPORT gzopen  OF((const char *path, const char *mode));
-/*
-     Opens a gzip (.gz) file for reading or writing. The mode parameter
-   is as in fopen ("rb" or "wb") but can also include a compression level
-   ("wb9") or a strategy: 'f' for filtered data as in "wb6f", 'h' for
-   Huffman only compression as in "wb1h", or 'R' for run-length encoding
-   as in "wb1R". (See the description of deflateInit2 for more information
-   about the strategy parameter.)
-
-     gzopen can be used to read a file which is not in gzip format; in this
-   case gzread will directly read from the file without decompression.
-
-     gzopen returns NULL if the file could not be opened or if there was
-   insufficient memory to allocate the (de)compression state; errno
-   can be checked to distinguish the two cases (if errno is zero, the
-   zlib error is Z_MEM_ERROR).  */
-
-ZEXTERN gzFile ZEXPORT gzdopen  OF((int fd, const char *mode));
-/*
-     gzdopen() associates a gzFile with the file descriptor fd.  File
-   descriptors are obtained from calls like open, dup, creat, pipe or
-   fileno (in the file has been previously opened with fopen).
-   The mode parameter is as in gzopen.
-     The next call of gzclose on the returned gzFile will also close the
-   file descriptor fd, just like fclose(fdopen(fd), mode) closes the file
-   descriptor fd. If you want to keep fd open, use gzdopen(dup(fd), mode).
-     gzdopen returns NULL if there was insufficient memory to allocate
-   the (de)compression state.
-*/
-
-ZEXTERN int ZEXPORT gzsetparams OF((gzFile file, int level, int strategy));
-/*
-     Dynamically update the compression level or strategy. See the description
-   of deflateInit2 for the meaning of these parameters.
-     gzsetparams returns Z_OK if success, or Z_STREAM_ERROR if the file was not
-   opened for writing.
-*/
-
-ZEXTERN int ZEXPORT    gzread  OF((gzFile file, voidp buf, unsigned len));
-/*
-     Reads the given number of uncompressed bytes from the compressed file.
-   If the input file was not in gzip format, gzread copies the given number
-   of bytes into the buffer.
-     gzread returns the number of uncompressed bytes actually read (0 for
-   end of file, -1 for error). */
-
-ZEXTERN int ZEXPORT    gzwrite OF((gzFile file,
-                                   voidpc buf, unsigned len));
-/*
-     Writes the given number of uncompressed bytes into the compressed file.
-   gzwrite returns the number of uncompressed bytes actually written
-   (0 in case of error).
-*/
-
-ZEXTERN int ZEXPORTVA   gzprintf OF((gzFile file, const char *format, ...));
-/*
-     Converts, formats, and writes the args to the compressed file under
-   control of the format string, as in fprintf. gzprintf returns the number of
-   uncompressed bytes actually written (0 in case of error).  The number of
-   uncompressed bytes written is limited to 4095. The caller should assure that
-   this limit is not exceeded. If it is exceeded, then gzprintf() will return
-   return an error (0) with nothing written. In this case, there may also be a
-   buffer overflow with unpredictable consequences, which is possible only if
-   zlib was compiled with the insecure functions sprintf() or vsprintf()
-   because the secure snprintf() or vsnprintf() functions were not available.
-*/
-
-ZEXTERN int ZEXPORT gzputs OF((gzFile file, const char *s));
-/*
-      Writes the given null-terminated string to the compressed file, excluding
-   the terminating null character.
-      gzputs returns the number of characters written, or -1 in case of error.
-*/
-
-ZEXTERN char * ZEXPORT gzgets OF((gzFile file, char *buf, int len));
-/*
-      Reads bytes from the compressed file until len-1 characters are read, or
-   a newline character is read and transferred to buf, or an end-of-file
-   condition is encountered.  The string is then terminated with a null
-   character.
-      gzgets returns buf, or Z_NULL in case of error.
-*/
-
-ZEXTERN int ZEXPORT    gzputc OF((gzFile file, int c));
-/*
-      Writes c, converted to an unsigned char, into the compressed file.
-   gzputc returns the value that was written, or -1 in case of error.
-*/
-
-ZEXTERN int ZEXPORT    gzgetc OF((gzFile file));
-/*
-      Reads one byte from the compressed file. gzgetc returns this byte
-   or -1 in case of end of file or error.
-*/
-
-ZEXTERN int ZEXPORT    gzungetc OF((int c, gzFile file));
-/*
-      Push one character back onto the stream to be read again later.
-   Only one character of push-back is allowed.  gzungetc() returns the
-   character pushed, or -1 on failure.  gzungetc() will fail if a
-   character has been pushed but not read yet, or if c is -1. The pushed
-   character will be discarded if the stream is repositioned with gzseek()
-   or gzrewind().
-*/
-
-ZEXTERN int ZEXPORT    gzflush OF((gzFile file, int flush));
-/*
-     Flushes all pending output into the compressed file. The parameter
-   flush is as in the deflate() function. The return value is the zlib
-   error number (see function gzerror below). gzflush returns Z_OK if
-   the flush parameter is Z_FINISH and all output could be flushed.
-     gzflush should be called only when strictly necessary because it can
-   degrade compression.
-*/
-
-ZEXTERN z_off_t ZEXPORT    gzseek OF((gzFile file,
-                                      z_off_t offset, int whence));
-/*
-      Sets the starting position for the next gzread or gzwrite on the
-   given compressed file. The offset represents a number of bytes in the
-   uncompressed data stream. The whence parameter is defined as in lseek(2);
-   the value SEEK_END is not supported.
-     If the file is opened for reading, this function is emulated but can be
-   extremely slow. If the file is opened for writing, only forward seeks are
-   supported; gzseek then compresses a sequence of zeroes up to the new
-   starting position.
-
-      gzseek returns the resulting offset location as measured in bytes from
-   the beginning of the uncompressed stream, or -1 in case of error, in
-   particular if the file is opened for writing and the new starting position
-   would be before the current position.
-*/
-
-ZEXTERN int ZEXPORT    gzrewind OF((gzFile file));
-/*
-     Rewinds the given file. This function is supported only for reading.
-
-   gzrewind(file) is equivalent to (int)gzseek(file, 0L, SEEK_SET)
-*/
-
-ZEXTERN z_off_t ZEXPORT    gztell OF((gzFile file));
-/*
-     Returns the starting position for the next gzread or gzwrite on the
-   given compressed file. This position represents a number of bytes in the
-   uncompressed data stream.
-
-   gztell(file) is equivalent to gzseek(file, 0L, SEEK_CUR)
-*/
-
-ZEXTERN int ZEXPORT gzeof OF((gzFile file));
-/*
-     Returns 1 when EOF has previously been detected reading the given
-   input stream, otherwise zero.
-*/
-
-ZEXTERN int ZEXPORT gzdirect OF((gzFile file));
-/*
-     Returns 1 if file is being read directly without decompression, otherwise
-   zero.
-*/
-
-ZEXTERN int ZEXPORT    gzclose OF((gzFile file));
-/*
-     Flushes all pending output if necessary, closes the compressed file
-   and deallocates all the (de)compression state. The return value is the zlib
-   error number (see function gzerror below).
-*/
-
-ZEXTERN const char * ZEXPORT gzerror OF((gzFile file, int *errnum));
-/*
-     Returns the error message for the last error which occurred on the
-   given compressed file. errnum is set to zlib error number. If an
-   error occurred in the file system and not in the compression library,
-   errnum is set to Z_ERRNO and the application may consult errno
-   to get the exact error code.
-*/
-
-ZEXTERN void ZEXPORT gzclearerr OF((gzFile file));
-/*
-     Clears the error and end-of-file flags for file. This is analogous to the
-   clearerr() function in stdio. This is useful for continuing to read a gzip
-   file that is being written concurrently.
-*/
-
-                        /* checksum functions */
-
-/*
-     These functions are not related to compression but are exported
-   anyway because they might be useful in applications using the
-   compression library.
-*/
-
-ZEXTERN uLong ZEXPORT adler32 OF((uLong adler, const Bytef *buf, uInt len));
-/*
-     Update a running Adler-32 checksum with the bytes buf[0..len-1] and
-   return the updated checksum. If buf is NULL, this function returns
-   the required initial value for the checksum.
-   An Adler-32 checksum is almost as reliable as a CRC32 but can be computed
-   much faster. Usage example:
-
-     uLong adler = adler32(0L, Z_NULL, 0);
-
-     while (read_buffer(buffer, length) != EOF) {
-       adler = adler32(adler, buffer, length);
-     }
-     if (adler != original_adler) error();
-*/
-
-ZEXTERN uLong ZEXPORT adler32_combine OF((uLong adler1, uLong adler2,
-                                          z_off_t len2));
-/*
-     Combine two Adler-32 checksums into one.  For two sequences of bytes, seq1
-   and seq2 with lengths len1 and len2, Adler-32 checksums were calculated for
-   each, adler1 and adler2.  adler32_combine() returns the Adler-32 checksum of
-   seq1 and seq2 concatenated, requiring only adler1, adler2, and len2.
-*/
-
-ZEXTERN uLong ZEXPORT crc32   OF((uLong crc, const Bytef *buf, uInt len));
-/*
-     Update a running CRC-32 with the bytes buf[0..len-1] and return the
-   updated CRC-32. If buf is NULL, this function returns the required initial
-   value for the for the crc. Pre- and post-conditioning (one's complement) is
-   performed within this function so it shouldn't be done by the application.
-   Usage example:
-
-     uLong crc = crc32(0L, Z_NULL, 0);
-
-     while (read_buffer(buffer, length) != EOF) {
-       crc = crc32(crc, buffer, length);
-     }
-     if (crc != original_crc) error();
-*/
-
-ZEXTERN uLong ZEXPORT crc32_combine OF((uLong crc1, uLong crc2, z_off_t len2));
-
-/*
-     Combine two CRC-32 check values into one.  For two sequences of bytes,
-   seq1 and seq2 with lengths len1 and len2, CRC-32 check values were
-   calculated for each, crc1 and crc2.  crc32_combine() returns the CRC-32
-   check value of seq1 and seq2 concatenated, requiring only crc1, crc2, and
-   len2.
-*/
-
-
-                        /* various hacks, don't look :) */
-
-/* deflateInit and inflateInit are macros to allow checking the zlib version
- * and the compiler's view of z_stream:
- */
-ZEXTERN int ZEXPORT deflateInit_ OF((z_streamp strm, int level,
-                                     const char *version, int stream_size));
-ZEXTERN int ZEXPORT inflateInit_ OF((z_streamp strm,
-                                     const char *version, int stream_size));
-ZEXTERN int ZEXPORT deflateInit2_ OF((z_streamp strm, int  level, int  method,
-                                      int windowBits, int memLevel,
-                                      int strategy, const char *version,
-                                      int stream_size));
-ZEXTERN int ZEXPORT inflateInit2_ OF((z_streamp strm, int  windowBits,
-                                      const char *version, int stream_size));
-ZEXTERN int ZEXPORT inflateBackInit_ OF((z_streamp strm, int windowBits,
-                                         unsigned char FAR *window,
-                                         const char *version,
-                                         int stream_size));
-#define deflateInit(strm, level) \
-        deflateInit_((strm), (level),       ZLIB_VERSION, sizeof(z_stream))
-#define inflateInit(strm) \
-        inflateInit_((strm),                ZLIB_VERSION, sizeof(z_stream))
-#define deflateInit2(strm, level, method, windowBits, memLevel, strategy) \
-        deflateInit2_((strm),(level),(method),(windowBits),(memLevel),\
-                      (strategy),           ZLIB_VERSION, sizeof(z_stream))
-#define inflateInit2(strm, windowBits) \
-        inflateInit2_((strm), (windowBits), ZLIB_VERSION, sizeof(z_stream))
-#define inflateBackInit(strm, windowBits, window) \
-        inflateBackInit_((strm), (windowBits), (window), \
-        ZLIB_VERSION, sizeof(z_stream))
-
-
-#if !defined(ZUTIL_H) && !defined(NO_DUMMY_DECL)
-    struct internal_state {int dummy;}; /* hack for buggy compilers */
-#endif
-
-ZEXTERN const char   * ZEXPORT zError           OF((int));
-ZEXTERN int            ZEXPORT inflateSyncPoint OF((z_streamp z));
-ZEXTERN const uLongf * ZEXPORT get_crc_table    OF((void));
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* ZLIB_H */
Index: trunk/minix/lib/zlib-1.2.3/zutil.c
===================================================================
--- trunk/minix/lib/zlib-1.2.3/zutil.c	(revision 9)
+++ 	(revision )
@@ -1,318 +1,0 @@
-/* zutil.c -- target dependent utility functions for the compression library
- * Copyright (C) 1995-2005 Jean-loup Gailly.
- * For conditions of distribution and use, see copyright notice in zlib.h
- */
-
-/* @(#) $Id: zutil.c,v 1.1 2005/09/23 22:39:00 beng Exp $ */
-
-#include "zutil.h"
-
-#ifndef NO_DUMMY_DECL
-struct internal_state      {int dummy;}; /* for buggy compilers */
-#endif
-
-const char * const z_errmsg[10] = {
-"need dictionary",     /* Z_NEED_DICT       2  */
-"stream end",          /* Z_STREAM_END      1  */
-"",                    /* Z_OK              0  */
-"file error",          /* Z_ERRNO         (-1) */
-"stream error",        /* Z_STREAM_ERROR  (-2) */
-"data error",          /* Z_DATA_ERROR    (-3) */
-"insufficient memory", /* Z_MEM_ERROR     (-4) */
-"buffer error",        /* Z_BUF_ERROR     (-5) */
-"incompatible version",/* Z_VERSION_ERROR (-6) */
-""};
-
-
-const char * ZEXPORT zlibVersion()
-{
-    return ZLIB_VERSION;
-}
-
-uLong ZEXPORT zlibCompileFlags()
-{
-    uLong flags;
-
-    flags = 0;
-    switch (sizeof(uInt)) {
-    case 2:     break;
-    case 4:     flags += 1;     break;
-    case 8:     flags += 2;     break;
-    default:    flags += 3;
-    }
-    switch (sizeof(uLong)) {
-    case 2:     break;
-    case 4:     flags += 1 << 2;        break;
-    case 8:     flags += 2 << 2;        break;
-    default:    flags += 3 << 2;
-    }
-    switch (sizeof(voidpf)) {
-    case 2:     break;
-    case 4:     flags += 1 << 4;        break;
-    case 8:     flags += 2 << 4;        break;
-    default:    flags += 3 << 4;
-    }
-    switch (sizeof(z_off_t)) {
-    case 2:     break;
-    case 4:     flags += 1 << 6;        break;
-    case 8:     flags += 2 << 6;        break;
-    default:    flags += 3 << 6;
-    }
-#ifdef DEBUG
-    flags += 1 << 8;
-#endif
-#if defined(ASMV) || defined(ASMINF)
-    flags += 1 << 9;
-#endif
-#ifdef ZLIB_WINAPI
-    flags += 1 << 10;
-#endif
-#ifdef BUILDFIXED
-    flags += 1 << 12;
-#endif
-#ifdef DYNAMIC_CRC_TABLE
-    flags += 1 << 13;
-#endif
-#ifdef NO_GZCOMPRESS
-    flags += 1L << 16;
-#endif
-#ifdef NO_GZIP
-    flags += 1L << 17;
-#endif
-#ifdef PKZIP_BUG_WORKAROUND
-    flags += 1L << 20;
-#endif
-#ifdef FASTEST
-    flags += 1L << 21;
-#endif
-#ifdef STDC
-#  ifdef NO_vsnprintf
-        flags += 1L << 25;
-#    ifdef HAS_vsprintf_void
-        flags += 1L << 26;
-#    endif
-#  else
-#    ifdef HAS_vsnprintf_void
-        flags += 1L << 26;
-#    endif
-#  endif
-#else
-        flags += 1L << 24;
-#  ifdef NO_snprintf
-        flags += 1L << 25;
-#    ifdef HAS_sprintf_void
-        flags += 1L << 26;
-#    endif
-#  else
-#    ifdef HAS_snprintf_void
-        flags += 1L << 26;
-#    endif
-#  endif
-#endif
-    return flags;
-}
-
-#ifdef DEBUG
-
-#  ifndef verbose
-#    define verbose 0
-#  endif
-int z_verbose = verbose;
-
-void z_error (m)
-    char *m;
-{
-    fprintf(stderr, "%s\n", m);
-    exit(1);
-}
-#endif
-
-/* exported to allow conversion of error code to string for compress() and
- * uncompress()
- */
-const char * ZEXPORT zError(err)
-    int err;
-{
-    return ERR_MSG(err);
-}
-
-#if defined(_WIN32_WCE)
-    /* The Microsoft C Run-Time Library for Windows CE doesn't have
-     * errno.  We define it as a global variable to simplify porting.
-     * Its value is always 0 and should not be used.
-     */
-    int errno = 0;
-#endif
-
-#ifndef HAVE_MEMCPY
-
-void zmemcpy(dest, source, len)
-    Bytef* dest;
-    const Bytef* source;
-    uInt  len;
-{
-    if (len == 0) return;
-    do {
-        *dest++ = *source++; /* ??? to be unrolled */
-    } while (--len != 0);
-}
-
-int zmemcmp(s1, s2, len)
-    const Bytef* s1;
-    const Bytef* s2;
-    uInt  len;
-{
-    uInt j;
-
-    for (j = 0; j < len; j++) {
-        if (s1[j] != s2[j]) return 2*(s1[j] > s2[j])-1;
-    }
-    return 0;
-}
-
-void zmemzero(dest, len)
-    Bytef* dest;
-    uInt  len;
-{
-    if (len == 0) return;
-    do {
-        *dest++ = 0;  /* ??? to be unrolled */
-    } while (--len != 0);
-}
-#endif
-
-
-#ifdef SYS16BIT
-
-#ifdef __TURBOC__
-/* Turbo C in 16-bit mode */
-
-#  define MY_ZCALLOC
-
-/* Turbo C malloc() does not allow dynamic allocation of 64K bytes
- * and farmalloc(64K) returns a pointer with an offset of 8, so we
- * must fix the pointer. Warning: the pointer must be put back to its
- * original form in order to free it, use zcfree().
- */
-
-#define MAX_PTR 10
-/* 10*64K = 640K */
-
-local int next_ptr = 0;
-
-typedef struct ptr_table_s {
-    voidpf org_ptr;
-    voidpf new_ptr;
-} ptr_table;
-
-local ptr_table table[MAX_PTR];
-/* This table is used to remember the original form of pointers
- * to large buffers (64K). Such pointers are normalized with a zero offset.
- * Since MSDOS is not a preemptive multitasking OS, this table is not
- * protected from concurrent access. This hack doesn't work anyway on
- * a protected system like OS/2. Use Microsoft C instead.
- */
-
-voidpf zcalloc (voidpf opaque, unsigned items, unsigned size)
-{
-    voidpf buf = opaque; /* just to make some compilers happy */
-    ulg bsize = (ulg)items*size;
-
-    /* If we allocate less than 65520 bytes, we assume that farmalloc
-     * will return a usable pointer which doesn't have to be normalized.
-     */
-    if (bsize < 65520L) {
-        buf = farmalloc(bsize);
-        if (*(ush*)&buf != 0) return buf;
-    } else {
-        buf = farmalloc(bsize + 16L);
-    }
-    if (buf == NULL || next_ptr >= MAX_PTR) return NULL;
-    table[next_ptr].org_ptr = buf;
-
-    /* Normalize the pointer to seg:0 */
-    *((ush*)&buf+1) += ((ush)((uch*)buf-0) + 15) >> 4;
-    *(ush*)&buf = 0;
-    table[next_ptr++].new_ptr = buf;
-    return buf;
-}
-
-void  zcfree (voidpf opaque, voidpf ptr)
-{
-    int n;
-    if (*(ush*)&ptr != 0) { /* object < 64K */
-        farfree(ptr);
-        return;
-    }
-    /* Find the original pointer */
-    for (n = 0; n < next_ptr; n++) {
-        if (ptr != table[n].new_ptr) continue;
-
-        farfree(table[n].org_ptr);
-        while (++n < next_ptr) {
-            table[n-1] = table[n];
-        }
-        next_ptr--;
-        return;
-    }
-    ptr = opaque; /* just to make some compilers happy */
-    Assert(0, "zcfree: ptr not found");
-}
-
-#endif /* __TURBOC__ */
-
-
-#ifdef M_I86
-/* Microsoft C in 16-bit mode */
-
-#  define MY_ZCALLOC
-
-#if (!defined(_MSC_VER) || (_MSC_VER <= 600))
-#  define _halloc  halloc
-#  define _hfree   hfree
-#endif
-
-voidpf zcalloc (voidpf opaque, unsigned items, unsigned size)
-{
-    if (opaque) opaque = 0; /* to make compiler happy */
-    return _halloc((long)items, size);
-}
-
-void  zcfree (voidpf opaque, voidpf ptr)
-{
-    if (opaque) opaque = 0; /* to make compiler happy */
-    _hfree(ptr);
-}
-
-#endif /* M_I86 */
-
-#endif /* SYS16BIT */
-
-
-#ifndef MY_ZCALLOC /* Any system without a special alloc function */
-
-#ifndef STDC
-extern voidp  malloc OF((uInt size));
-extern voidp  calloc OF((uInt items, uInt size));
-extern void   free   OF((voidpf ptr));
-#endif
-
-voidpf zcalloc (opaque, items, size)
-    voidpf opaque;
-    unsigned items;
-    unsigned size;
-{
-    if (opaque) items += size - size; /* make compiler happy */
-    return sizeof(uInt) > 2 ? (voidpf)malloc(items * size) :
-                              (voidpf)calloc(items, size);
-}
-
-void  zcfree (opaque, ptr)
-    voidpf opaque;
-    voidpf ptr;
-{
-    free(ptr);
-    if (opaque) return; /* make compiler happy */
-}
-
-#endif /* MY_ZCALLOC */
Index: trunk/minix/lib/zlib-1.2.3/zutil.h
===================================================================
--- trunk/minix/lib/zlib-1.2.3/zutil.h	(revision 9)
+++ 	(revision )
@@ -1,269 +1,0 @@
-/* zutil.h -- internal interface and configuration of the compression library
- * Copyright (C) 1995-2005 Jean-loup Gailly.
- * For conditions of distribution and use, see copyright notice in zlib.h
- */
-
-/* WARNING: this file should *not* be used by applications. It is
-   part of the implementation of the compression library and is
-   subject to change. Applications should only use zlib.h.
- */
-
-/* @(#) $Id: zutil.h,v 1.1 2005/09/23 22:39:00 beng Exp $ */
-
-#ifndef ZUTIL_H
-#define ZUTIL_H
-
-#define ZLIB_INTERNAL
-#include "zlib.h"
-
-#ifdef STDC
-#  ifndef _WIN32_WCE
-#    include <stddef.h>
-#  endif
-#  include <string.h>
-#  include <stdlib.h>
-#endif
-#ifdef NO_ERRNO_H
-#   ifdef _WIN32_WCE
-      /* The Microsoft C Run-Time Library for Windows CE doesn't have
-       * errno.  We define it as a global variable to simplify porting.
-       * Its value is always 0 and should not be used.  We rename it to
-       * avoid conflict with other libraries that use the same workaround.
-       */
-#     define errno z_errno
-#   endif
-    extern int errno;
-#else
-#  ifndef _WIN32_WCE
-#    include <errno.h>
-#  endif
-#endif
-
-#ifndef local
-#  define local static
-#endif
-/* compile with -Dlocal if your debugger can't find static symbols */
-
-typedef unsigned char  uch;
-typedef uch FAR uchf;
-typedef unsigned short ush;
-typedef ush FAR ushf;
-typedef unsigned long  ulg;
-
-extern const char * const z_errmsg[10]; /* indexed by 2-zlib_error */
-/* (size given to avoid silly warnings with Visual C++) */
-
-#define ERR_MSG(err) z_errmsg[Z_NEED_DICT-(err)]
-
-#define ERR_RETURN(strm,err) \
-  return (strm->msg = (char*)ERR_MSG(err), (err))
-/* To be used only when the state is known to be valid */
-
-        /* common constants */
-
-#ifndef DEF_WBITS
-#  define DEF_WBITS MAX_WBITS
-#endif
-/* default windowBits for decompression. MAX_WBITS is for compression only */
-
-#if MAX_MEM_LEVEL >= 8
-#  define DEF_MEM_LEVEL 8
-#else
-#  define DEF_MEM_LEVEL  MAX_MEM_LEVEL
-#endif
-/* default memLevel */
-
-#define STORED_BLOCK 0
-#define STATIC_TREES 1
-#define DYN_TREES    2
-/* The three kinds of block type */
-
-#define MIN_MATCH  3
-#define MAX_MATCH  258
-/* The minimum and maximum match lengths */
-
-#define PRESET_DICT 0x20 /* preset dictionary flag in zlib header */
-
-        /* target dependencies */
-
-#if defined(MSDOS) || (defined(WINDOWS) && !defined(WIN32))
-#  define OS_CODE  0x00
-#  if defined(__TURBOC__) || defined(__BORLANDC__)
-#    if(__STDC__ == 1) && (defined(__LARGE__) || defined(__COMPACT__))
-       /* Allow compilation with ANSI keywords only enabled */
-       void _Cdecl farfree( void *block );
-       void *_Cdecl farmalloc( unsigned long nbytes );
-#    else
-#      include <alloc.h>
-#    endif
-#  else /* MSC or DJGPP */
-#    include <malloc.h>
-#  endif
-#endif
-
-#ifdef AMIGA
-#  define OS_CODE  0x01
-#endif
-
-#if defined(VAXC) || defined(VMS)
-#  define OS_CODE  0x02
-#  define F_OPEN(name, mode) \
-     fopen((name), (mode), "mbc=60", "ctx=stm", "rfm=fix", "mrs=512")
-#endif
-
-#if defined(ATARI) || defined(atarist)
-#  define OS_CODE  0x05
-#endif
-
-#ifdef OS2
-#  define OS_CODE  0x06
-#  ifdef M_I86
-     #include <malloc.h>
-#  endif
-#endif
-
-#if defined(MACOS) || defined(TARGET_OS_MAC)
-#  define OS_CODE  0x07
-#  if defined(__MWERKS__) && __dest_os != __be_os && __dest_os != __win32_os
-#    include <unix.h> /* for fdopen */
-#  else
-#    ifndef fdopen
-#      define fdopen(fd,mode) NULL /* No fdopen() */
-#    endif
-#  endif
-#endif
-
-#ifdef TOPS20
-#  define OS_CODE  0x0a
-#endif
-
-#ifdef WIN32
-#  ifndef __CYGWIN__  /* Cygwin is Unix, not Win32 */
-#    define OS_CODE  0x0b
-#  endif
-#endif
-
-#ifdef __50SERIES /* Prime/PRIMOS */
-#  define OS_CODE  0x0f
-#endif
-
-#if defined(_BEOS_) || defined(RISCOS)
-#  define fdopen(fd,mode) NULL /* No fdopen() */
-#endif
-
-#if (defined(_MSC_VER) && (_MSC_VER > 600))
-#  if defined(_WIN32_WCE)
-#    define fdopen(fd,mode) NULL /* No fdopen() */
-#    ifndef _PTRDIFF_T_DEFINED
-       typedef int ptrdiff_t;
-#      define _PTRDIFF_T_DEFINED
-#    endif
-#  else
-#    define fdopen(fd,type)  _fdopen(fd,type)
-#  endif
-#endif
-
-        /* common defaults */
-
-#ifndef OS_CODE
-#  define OS_CODE  0x03  /* assume Unix */
-#endif
-
-#ifndef F_OPEN
-#  define F_OPEN(name, mode) fopen((name), (mode))
-#endif
-
-         /* functions */
-
-#if defined(STDC99) || (defined(__TURBOC__) && __TURBOC__ >= 0x550)
-#  ifndef HAVE_VSNPRINTF
-#    define HAVE_VSNPRINTF
-#  endif
-#endif
-#if defined(__CYGWIN__)
-#  ifndef HAVE_VSNPRINTF
-#    define HAVE_VSNPRINTF
-#  endif
-#endif
-#ifndef HAVE_VSNPRINTF
-#  ifdef MSDOS
-     /* vsnprintf may exist on some MS-DOS compilers (DJGPP?),
-        but for now we just assume it doesn't. */
-#    define NO_vsnprintf
-#  endif
-#  ifdef __TURBOC__
-#    define NO_vsnprintf
-#  endif
-#  ifdef WIN32
-     /* In Win32, vsnprintf is available as the "non-ANSI" _vsnprintf. */
-#    if !defined(vsnprintf) && !defined(NO_vsnprintf)
-#      define vsnprintf _vsnprintf
-#    endif
-#  endif
-#  ifdef __SASC
-#    define NO_vsnprintf
-#  endif
-#endif
-#ifdef VMS
-#  define NO_vsnprintf
-#endif
-
-#if defined(pyr)
-#  define NO_MEMCPY
-#endif
-#if defined(SMALL_MEDIUM) && !defined(_MSC_VER) && !defined(__SC__)
- /* Use our own functions for small and medium model with MSC <= 5.0.
-  * You may have to use the same strategy for Borland C (untested).
-  * The __SC__ check is for Symantec.
-  */
-#  define NO_MEMCPY
-#endif
-#if defined(STDC) && !defined(HAVE_MEMCPY) && !defined(NO_MEMCPY)
-#  define HAVE_MEMCPY
-#endif
-#ifdef HAVE_MEMCPY
-#  ifdef SMALL_MEDIUM /* MSDOS small or medium model */
-#    define zmemcpy _fmemcpy
-#    define zmemcmp _fmemcmp
-#    define zmemzero(dest, len) _fmemset(dest, 0, len)
-#  else
-#    define zmemcpy memcpy
-#    define zmemcmp memcmp
-#    define zmemzero(dest, len) memset(dest, 0, len)
-#  endif
-#else
-   extern void zmemcpy  OF((Bytef* dest, const Bytef* source, uInt len));
-   extern int  zmemcmp  OF((const Bytef* s1, const Bytef* s2, uInt len));
-   extern void zmemzero OF((Bytef* dest, uInt len));
-#endif
-
-/* Diagnostic functions */
-#ifdef DEBUG
-#  include <stdio.h>
-   extern int z_verbose;
-   extern void z_error    OF((char *m));
-#  define Assert(cond,msg) {if(!(cond)) z_error(msg);}
-#  define Trace(x) {if (z_verbose>=0) fprintf x ;}
-#  define Tracev(x) {if (z_verbose>0) fprintf x ;}
-#  define Tracevv(x) {if (z_verbose>1) fprintf x ;}
-#  define Tracec(c,x) {if (z_verbose>0 && (c)) fprintf x ;}
-#  define Tracecv(c,x) {if (z_verbose>1 && (c)) fprintf x ;}
-#else
-#  define Assert(cond,msg)
-#  define Trace(x)
-#  define Tracev(x)
-#  define Tracevv(x)
-#  define Tracec(c,x)
-#  define Tracecv(c,x)
-#endif
-
-
-voidpf zcalloc OF((voidpf opaque, unsigned items, unsigned size));
-void   zcfree  OF((voidpf opaque, voidpf ptr));
-
-#define ZALLOC(strm, items, size) \
-           (*((strm)->zalloc))((strm)->opaque, (items), (size))
-#define ZFREE(strm, addr)  (*((strm)->zfree))((strm)->opaque, (voidpf)(addr))
-#define TRY_FREE(s, p) {if (p) ZFREE(s, p);}
-
-#endif /* ZUTIL_H */
