summaryrefslogtreecommitdiff
path: root/Build/source/utils/gzip/msdos
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2009-06-18 17:59:39 +0000
committerKarl Berry <karl@freefriends.org>2009-06-18 17:59:39 +0000
commit7c08bfdb116dc52e6817eb10481dd3f20a4132f9 (patch)
treebd6770ee3cc652efca53f9925b32f2c672686653 /Build/source/utils/gzip/msdos
parent105ccc5310edd2930a6a0b687e5629ccb6d4b34c (diff)
remove gzip, it is in w32 sources where it belongs
git-svn-id: svn://tug.org/texlive/trunk@13824 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/utils/gzip/msdos')
-rw-r--r--Build/source/utils/gzip/msdos/Makefile.bor118
-rw-r--r--Build/source/utils/gzip/msdos/Makefile.djg224
-rw-r--r--Build/source/utils/gzip/msdos/Makefile.msc108
-rwxr-xr-xBuild/source/utils/gzip/msdos/doturboc.bat18
-rw-r--r--Build/source/utils/gzip/msdos/gzip.prj17
-rw-r--r--Build/source/utils/gzip/msdos/match.asm240
-rw-r--r--Build/source/utils/gzip/msdos/tailor.c58
7 files changed, 0 insertions, 783 deletions
diff --git a/Build/source/utils/gzip/msdos/Makefile.bor b/Build/source/utils/gzip/msdos/Makefile.bor
deleted file mode 100644
index 1165b7cff52..00000000000
--- a/Build/source/utils/gzip/msdos/Makefile.bor
+++ /dev/null
@@ -1,118 +0,0 @@
-# Makefile for gzip
-# Borland (Turbo) C++.
-# Warning: this file is not suitable for Turbo C 2.0. In this case, read
-# then invoke the file doturboc.bat.
-
-# To use, do "make -fmakefile.bor"
-
-# Turbo C++ 1.0 seems to have a buggy exit() function. You must add
-# to CFLAGS: -Dexit=_exit
-
-# WARNING: the small model is not supported. The compact model is used
-# here. If you want to use the large model, add -D__LARGE__ to ASFLAGS
-# Add -DSMALL_MEM to CFLAGS if you wish to reduce the memory
-# requirements. Add -DNO_ASM to CFLAGS and remove match.obj from OBJA if
-# you do not have tasm.
-
-# ------------- Turbo C++, Borland C++ -------------
-MODEL=-mc
-#CFLAGS=-w -w-eff -w-def -w-sig -w-cln -a -d -G -O -Z $(MODEL)
-CFLAGS=-O2 -Z $(MODEL)
-CC=bcc
-LD=bcc
-# replace bcc with tcc for Turbo C++ 1.0
-LDFLAGS=$(MODEL)
-AS=tasm
-ASFLAGS=-ml -t -DDYN_ALLOC -DSS_NEQ_DS
-LIB = c:\bcc\lib
-
-# ------------- Common declarations:
-STRIP=rem
-# If you don't have lzexe, get it (by ftp on wuarchive.wustl.edu
-# in /mirrors/msdos/filutl/lzexe91e.zip). Then define:
-#STRIP=lzexe
-# Or if you've registered PKLITE, then define:
-#STRIP=pklite
-# This makes a big difference in .exe size (and possibly load time)
-
-O=.obj
-OBJA=match$(O) tailor$(O) $(LIB)\wildargs.obj
-
-# ------------- Used by install rule
-# set BIN to the directory you want to install the executables to
-BIN = c:\bin
-
-# variables
-OBJ1 = gzip$(O) zip$(O) deflate$(O) trees$(O) bits$(O) unzip$(O) inflate$(O) \
- util$(O)
-OBJ2 = crypt$(O) lzw$(O) unlzw$(O) unpack$(O) unlzh$(O) getopt$(O) $(OBJA)
-
-all: gzip.exe
-
-gzip.obj: gzip.c gzip.h tailor.h crypt.h revision.h lzw.h
- $(CC) -c $(CFLAGS) $*.c
-
-zip.obj: zip.c gzip.h tailor.h crypt.h
- $(CC) -c $(CFLAGS) $*.c
-
-deflate.obj: deflate.c gzip.h tailor.h
- $(CC) -c $(CFLAGS) $*.c
-
-trees.obj: trees.c gzip.h tailor.h
- $(CC) -c $(CFLAGS) $*.c
-
-bits.obj: bits.c gzip.h tailor.h crypt.h
- $(CC) -c $(CFLAGS) $*.c
-
-unzip.obj: unzip.c gzip.h tailor.h crypt.h
- $(CC) -c $(CFLAGS) $*.c
-
-inflate.obj: inflate.c gzip.h tailor.h
- $(CC) -c $(CFLAGS) $*.c
-
-util.obj: util.c gzip.h tailor.h crypt.h
- $(CC) -c $(CFLAGS) $*.c
-
-crypt.obj: crypt.c gzip.h tailor.h crypt.h
- $(CC) -c $(CFLAGS) $*.c
-
-lzw.obj: lzw.c gzip.h tailor.h
- $(CC) -c $(CFLAGS) $*.c
-
-unlzw.obj: unlzw.c gzip.h tailor.h lzw.h
- $(CC) -c $(CFLAGS) $*.c
-
-unpack.obj: unpack.c gzip.h tailor.h
- $(CC) -c $(CFLAGS) $*.c
-
-unlzh.obj: unlzh.c gzip.h tailor.h
- $(CC) -c $(CFLAGS) $*.c
-
-tailor.obj: msdos\tailor.c gzip.h tailor.h
- $(CC) -c $(CFLAGS) msdos\$*.c
-
-getopt.obj: getopt.c getopt.h
- $(CC) -c $(CFLAGS) $*.c
-
-match.obj: msdos\match.asm
- $(AS) $(ASFLAGS) msdos\match, match;
-
-# we must cut the command line to fit in the MS/DOS 128 byte limit:
-gzip.exe: $(OBJ1) $(OBJ2)
- echo $(OBJ1) > gzip.rsp
- echo $(OBJ2) >> gzip.rsp
- $(LD) $(LDFLAGS) @gzip.rsp
- del gzip.rsp
- $(STRIP) gzip.exe
-# If you use Borland make, you can use instead:
-# $(LD) $(LDFLAGS) @&&|
-#$**
-#|
-
-install: gzip.exe
- copy /b gzip.exe $(BIN)
- copy /b gzip.exe $(BIN)\gunzip.exe
-
-clean:
- del *.obj
- del *.exe
diff --git a/Build/source/utils/gzip/msdos/Makefile.djg b/Build/source/utils/gzip/msdos/Makefile.djg
deleted file mode 100644
index 514d963d9e4..00000000000
--- a/Build/source/utils/gzip/msdos/Makefile.djg
+++ /dev/null
@@ -1,224 +0,0 @@
-# Makefile for gzip (GNU zip) -*- Indented-Text -*-
-# Copyright (C) 1992-1993 Jean-loup Gailly and the Free Software Foundation
-# Modified for GNUish make/MS_SH200/DJGPP 1.09+ by Eric Backus
-
-# This program 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, or (at your option)
-# any later version.
-
-# This program 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 program; if not, write to the Free Software
-# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
-
-# $Id: Makefile.djg,v 1.3 1993/06/22 15:43:24 jloup Exp $
-
-#### Start of system configuration section. ####
-
-.SUFFIXES: .o
-LONGARGS = gcc:rm
-
-srcdir = .
-VPATH = .
-
-CC = gcc
-CPP = gcc -O -E
-
-INSTALL = install -c
-INSTALL_PROGRAM = $(INSTALL)
-INSTALL_DATA = $(INSTALL) -m 644
-
-# tailor.h defines things for DJGPP so nothing is needed here
-DEFS =
-LIBS =
-
-# additional assembly sources for particular systems may be required.
-OBJA = match.o
-
-SEDCMD = 1d
-
-CFLAGS = -O2 -finline-functions -fomit-frame-pointer
-LDFLAGS = -s
-
-X=.exe
-# For OS/2 or MSDOS, use: X=.exe
-
-O=.o
-# For OS/2 or MSDOS, use: O=.obj
-
-prefix = /usr/local
-exec_prefix = $(prefix)
-
-bindir = $(exec_prefix)/bin
-datadir = $(prefix)/lib
-libdir = $(prefix)/lib
-infodir = $(prefix)/info
-
-# Extension (not including `.') for the installed manual page filenames.
-manext = 1
-# Where to install the manual pages.
-mandir = $(prefix)/man/man$(manext)
-
-#### End of system configuration section. ####
-
-SHELL = /bin/sh
-
-LOADLIBES = $(LIBS)
-
-TAR = tar
-
-SRCS = gzip.c zip.c deflate.c trees.c bits.c unzip.c inflate.c util.c crypt.c\
- lzw.c unlzw.c unpack.c unlzh.c makecrc.c getopt.c match.S
-
-OBJ1 = gzip$(O) zip$(O) deflate$(O) trees$(O) bits$(O) unzip$(O) inflate$(O) \
- util$(O)
-OBJ2 = crypt$(O) lzw$(O) unlzw$(O) unpack$(O) unlzh$(O) getopt$(O) $(OBJA)
-
-HDRS = gzip.h lzw.h tailor.h revision.h crypt.h getopt.h
-
-.c$O:
- $(CC) -c $(DEFS) $(CFLAGS) $<
-
-#.PHONY: default all force test check
-
-default: all
-all: gzip$X zcmp zdiff zmore znew zforce gzexe
-force:
-
-install: all
- for f in gzip$X zcmp zdiff zmore znew zforce gzexe; do \
- $(INSTALL_PROGRAM) $${f} $(bindir)/$${f}; done
- for f in gunzip$X zcat$X ; do \
- rm -f $(bindir)/$${f}; ln $(bindir)/gzip$X $(bindir)/$${f}; done
- -cd $(srcdir); \
- for f in gzip gunzip zcat zcmp zmore znew zforce gzexe; do \
- rm -f $(mandir)/$${f}.$(manext); \
- $(INSTALL_DATA) $${f}.1 $(mandir)/$${f}.$(manext); done
- -cd $(srcdir); for f in gzip.info* ; do $(INSTALL_DATA) $${f} \
- $(infodir)/$${f}; done
-
-uninstall: force
- -cd $(bindir); rm -f gzip$X gunzip$X zcat$X \
- zcmp zdiff zmore znew zforce gzexe
- -for f in gzip gunzip zcat zcmp zmore znew gzexe; do \
- rm -f $(mandir)/$${f}.$(manext); done
- -cd $(infodir); rm -f gzip.info*
-
-# install all files and replace compress (not recommended)
-install_compress: install
- -test -f $(bindir)/compress.old || \
- mv $(bindir)/compress$X $(bindir)/compress.old
- ln $(bindir)/gzip$X $(bindir)/compress$X
- rm -f $(bindir)/uncompress$X
- ln $(bindir)/gzip$X $(bindir)/uncompress$X
-
-test: check
-check: all
- ./gzip -5 < $(srcdir)/texinfo.tex > _gztest.z
- # Either GNUish make or MS_SH has trouble with backquotes
- #@if test `wc -c < _gztest.z` -ne 30890; then \
- # echo FAILED gzip test: incorrect size; rm -f _gztest*; exit 1; \
- # else :; fi
- @echo Should be 30890:\\c
- @wc -c < _gztest.z
- rm -f _gztest
- ./gzip -d _gztest.z
- @if cmp _gztest $(srcdir)/texinfo.tex; then \
- echo gzip test OK; \
- else \
- echo FAILED gzip test: incorrect decompress; \
- fi
- rm -f _gztest*
-
-TAGS: $(SRCS) $(HDRS)
- cd $(srcdir); etags $(SRCS) $(HDRS)
-
-Makefile: Makefile.in ./config.status
- ./config.status
-
-./config.status: configure
- $(srcdir)/configure --srcdir=$(srcdir) --no-create
-
-configure: configure.in
- @echo Warning: configure is out of date
-# cd $(srcdir); autoconf
-
-clean:
- rm -f *$O gzip$X gunzip$X zcat$X a.out core gzip
- rm -f zcmp zdiff zmore znew zforce gzexe _gztest*
- rm -f *.aux *.cp *.cps *.dvi *.fn *.fns *.ky *.kys *.log
- rm -f *.pg *.pgs *.toc *.tp *.tps *.vr *.vrs
-
-mostlyclean: clean
-
-distclean: clean
- rm -f Makefile config.status
-
-realclean: distclean
- rm -f TAGS gzip.info*
-
-# Actual build-related targets
-
-gzip$X: gzip
- aout2exe gzip
-
-gzip: $(OBJ1) $(OBJ2)
- echo $(OBJ1) > gzip.rsp
- echo $(OBJ2) $(LIBS) >> gzip.rsp
- $(CC) $(LDFLAGS) -o $@ @gzip.rsp
- del gzip.rsp
-
-gzip$O zip$O deflate$O trees$O bits$O unzip$O inflate$O: gzip.h tailor.h
-util$O lzw$O unlzw$O unpack$O unlzh$O crypt$O: gzip.h tailor.h
-
-gzip$O unlzw$O: revision.h lzw.h
-
-bits$O unzip$O util$O zip$O: crypt.h
-
-gzip$O getopt$O: getopt.h
-
-match$O: match.S
- $(CC) -c match.S
-
-zcmp: zcmp.in
- sed "$(SEDCMD)" $(srcdir)/zcmp.in > zcmp
- chmod 755 zcmp
-
-zdiff: zdiff.in
- sed "$(SEDCMD)" $(srcdir)/zdiff.in > zdiff
- chmod 755 zdiff
-
-zmore: zmore.in
- sed "$(SEDCMD)" $(srcdir)/zmore.in > zmore
- chmod 755 zmore
-
-znew: znew.in
- sed "$(SEDCMD)" $(srcdir)/znew.in > znew
- chmod 755 znew
-
-zforce: zforce.in
- sed "$(SEDCMD)" $(srcdir)/zforce.in > zforce
- chmod 755 zforce
-
-gzexe: gzexe.in
- sed "$(SEDCMD)" $(srcdir)/gzexe.in > gzexe
- chmod 755 gzexe
-
-gzip.info: gzip.texi
- cd $(srcdir); makeinfo gzip.texi
-
-gzip.dvi: gzip.texi
- cd $(srcdir); texi2dvi gzip.texi
-
-gzip.doc: gzip.1
- cd $(srcdir); nroff -man gzip.1 | col -b | uniq > gzip.doc
-
-# Prevent GNU make v3 from overflowing arg limit on SysV.
-.NOEXPORT:
-
-# end of file
diff --git a/Build/source/utils/gzip/msdos/Makefile.msc b/Build/source/utils/gzip/msdos/Makefile.msc
deleted file mode 100644
index e2aceba1bb8..00000000000
--- a/Build/source/utils/gzip/msdos/Makefile.msc
+++ /dev/null
@@ -1,108 +0,0 @@
-# Makefile for gzip
-# Microsoft C 5.1 or 6.0.
-
-# To use, do "make makefile.msc"
-
-# WARNING: the small model is not supported. The compact model is used
-# here. If you want to use the large model, add -D__LARGE__ to ASFLAGS
-# Add -DSMALL_MEM to CFLAGS if you wish to reduce the memory
-# requirements. Add -DNO_ASM to CFLAGS and remove match.obj from OBJI if
-# you do not have masm.
-
-# ------------- Microsoft C 5.1 and later -------------
-MODEL=-AC
-FP=
-CFLAGS=-Ox -nologo $(MODEL)
-BFLAGS=-Oait -Gs -nologo $(MODEL)
-# BFLAGS are the 'bug workaround' flags.
-CC=cl
-LD=link
-LDFLAGS=/e/st:0x1000/noe
-# If you use lzexe as recommended, remove /e from LDFLAGS
-AS=masm
-# For MSC 6.0, use: AS=ml
-ASFLAGS=-ml -t
-# Add -DDYN_ALLOC to ASFLAGS if you have defined it in tailor.h or CFLAGS
-LIB = c:\c51\lib
-
-# ------------- Common declarations:
-STRIP=rem
-# If you don't have lzexe, get it (by ftp on wuarchive.wustl.edu
-# in /mirrors/msdos/filutl/lzexe91e.zip). Then define:
-#STRIP=lzexe
-# Or if you've registered PKLITE, then define:
-#STRIP=pklite
-# This makes a big difference in .exe size (and possibly load time)
-
-O=.obj
-OBJA=match$(O) $(LIB)\setargv$(O)
-
-# ------------- Used by install rule
-# set BIN to the directory you want to install the executables to
-BIN = c:\bin
-
-# variables
-OBJ1 = gzip$(O) zip$(O) deflate$(O) trees$(O) bits$(O) unzip$(O) inflate$(O) \
- util$(O)
-OBJ2 = crypt$(O) lzw$(O) unlzw$(O) unpack$(O) unlzh$(O) getopt$(O) $(OBJA)
-
-gzip.obj: gzip.c gzip.h tailor.h crypt.h revision.h lzw.h
- $(CC) -c $(CFLAGS) $*.c
-
-zip.obj: zip.c gzip.h tailor.h crypt.h
- $(CC) -c $(CFLAGS) $*.c
-
-deflate.obj: deflate.c gzip.h tailor.h
- $(CC) -c $(CFLAGS) $*.c
-
-trees.obj: trees.c gzip.h tailor.h
- $(CC) -c $(CFLAGS) $*.c
-
-bits.obj: bits.c gzip.h tailor.h crypt.h
- $(CC) -c $(CFLAGS) $*.c
-
-unzip.obj: unzip.c gzip.h tailor.h crypt.h
- $(CC) -c $(CFLAGS) $*.c
-
-inflate.obj: inflate.c gzip.h tailor.h
- $(CC) -c $(CFLAGS) $*.c
-
-util.obj: util.c gzip.h tailor.h crypt.h
- $(CC) -c $(BFLAGS) $*.c
-
-crypt.obj: crypt.c gzip.h tailor.h crypt.h
- $(CC) -c $(CFLAGS) $*.c
-
-lzw.obj: lzw.c gzip.h tailor.h
- $(CC) -c $(CFLAGS) $*.c
-
-unlzw.obj: unlzw.c gzip.h tailor.h lzw.h
- $(CC) -c $(CFLAGS) $*.c
-
-unpack.obj: unpack.c gzip.h tailor.h
- $(CC) -c $(CFLAGS) $*.c
-
-unlzh.obj: unlzh.c gzip.h tailor.h
- $(CC) -c $(BFLAGS) $*.c
-
-getopt.obj: getopt.c getopt.h
- $(CC) -c $(CFLAGS) $*.c
-
-match.obj: msdos\match.asm
- $(AS) $(ASFLAGS) msdos\match, match;
-
-# we must cut the command line to fit in the MS/DOS 128 byte limit:
-gzip.exe: $(OBJ1) $(OBJ2)
- echo $(OBJ1)+ > gzip.rsp
- echo $(OBJ2); >> gzip.rsp
- $(LD) $(LDFLAGS) @gzip.rsp
- del gzip.rsp
- $(STRIP) gzip.exe
-
-install: gzip.exe
- copy /b gzip.exe $(BIN)
- copy /b gzip.exe $(BIN)\gunzip.exe
-
-#clean:
-# del *.obj
-# del *.exe
diff --git a/Build/source/utils/gzip/msdos/doturboc.bat b/Build/source/utils/gzip/msdos/doturboc.bat
deleted file mode 100755
index 1cccb964369..00000000000
--- a/Build/source/utils/gzip/msdos/doturboc.bat
+++ /dev/null
@@ -1,18 +0,0 @@
-: This file is a complement to gzip.prj for Turbo C 2.0 users.
-: To construct gzip, first transform all files to msdos CR LF format.
-: (Use utilities such as flip or do file transfers in ascii mode.)
-: Then invoke this file. Then enter Turbo C, set the the
-: compilation model to compact, and the project file to gzip.prj.
-: Change the compilation flags if you wish (add SMALL_MEM
-: to reduce the memory requirements), and press F9...
-: WARNING: you must use the compact or large model in this version.
-: To use the large model, add -D__LARGE__ in the tasm command below.
-: To get the file wildargs.obj, do:
-:
-: pkunpak \tcc\startup wildargs.obj
-:
-: pkunpak is available in wuarchive.wustl.edu:/mirrors/msdos/starter/pk361.exe
-:
-: After compiling gzip.exe, do: copy gzip.exe gunzip.exe
-:
-tasm -ml -DDYN_ALLOC -DSS_NEQ_DS msdos\match, match;
diff --git a/Build/source/utils/gzip/msdos/gzip.prj b/Build/source/utils/gzip/msdos/gzip.prj
deleted file mode 100644
index 1601d51e07a..00000000000
--- a/Build/source/utils/gzip/msdos/gzip.prj
+++ /dev/null
@@ -1,17 +0,0 @@
-gzip.c (gzip.h tailor.h crypt.h revision.h lzw.h)
-zip.c (gzip.h tailor.h crypt.h)
-deflate.c (gzip.h tailor.h)
-trees.c (gzip.h tailor.h)
-bits.c (gzip.h tailor.h crypt.h)
-unzip.c (gzip.h tailor.h crypt.h)
-inflate.c (gzip.h tailor.h)
-util.c (gzip.h tailor.h crypt.h)
-crypt.c (gzip.h tailor.h crypt.h)
-lzw.c (gzip.h tailor.h)
-unlzw.c (gzip.h tailor.h lzw.h)
-unpack.c (gzip.h tailor.h)
-unlzh.c (gzip.h tailor.h)
-msdos\tailor.c (gzip.h tailor.h)
-getopt.c (getopt.h)
-match.obj
-wildargs.obj
diff --git a/Build/source/utils/gzip/msdos/match.asm b/Build/source/utils/gzip/msdos/match.asm
deleted file mode 100644
index cee59c5962d..00000000000
--- a/Build/source/utils/gzip/msdos/match.asm
+++ /dev/null
@@ -1,240 +0,0 @@
-; match.asm -- optional optimized asm version of longest match in deflate.c
-; Copyright (C) 1992-1993 Jean-loup Gailly
-; This is free software; you can redistribute it and/or modify it under the
-; terms of the GNU General Public License, see the file COPYING.
-;
-; Must be assembled with masm -ml. To be used only with C compact model
-; or large model. (For large model, assemble with -D__LARGE__).
-; This file is only optional. If you don't have masm or tasm, use the
-; C version (add -DNO_ASM to CFLAGS in makefile.msc and remove match.obj
-; from OBJI). If you have reduced WSIZE in zip.h, then change its value
-; below.
-;
-; Turbo C 2.0 does not support static allocation of more than 64K bytes per
-; file, and does not have SS == DS. So TC and BC++ users must use:
-; tasm -ml -DDYN_ALLOC -DSS_NEQ_DS match;
-;
-; To simplify the code, the option -DDYN_ALLOC is supported for OS/2
-; only if the arrays are guaranteed to have zero offset (allocated by
-; halloc). We also require SS==DS. This is satisfied for MSC but not Turbo C.
-
-; $Id: match.asm,v 0.6 1993/01/21 18:49:05 jloup Exp $
-
- name match
-
-ifndef DYN_ALLOC
- extrn _prev : word
- extrn _window : byte
- prev equ _prev ; offset part
- window equ _window
-endif
-
-_DATA segment word public 'DATA'
- extrn _nice_match : word
- extrn _match_start : word
- extrn _prev_length : word
- extrn _good_match : word
- extrn _strstart : word
- extrn _max_chain_length : word
-ifdef DYN_ALLOC
- extrn _prev : word
- extrn _window : word
- prev equ 0 ; offset forced to zero
- window equ 0
- window_seg equ _window[2]
- window_off equ 0
-else
- wseg dw seg _window
- window_seg equ wseg
- window_off equ offset _window
-endif
-_DATA ends
-
-DGROUP group _DATA
-
-_TEXT segment word public 'CODE'
- assume cs: _TEXT, ds: DGROUP
-
- public _match_init
- public _longest_match
-
- MIN_MATCH equ 3
- MAX_MATCH equ 258
- WSIZE equ 32768 ; keep in sync with zip.h !
- MIN_LOOKAHEAD equ (MAX_MATCH+MIN_MATCH+1)
- MAX_DIST equ (WSIZE-MIN_LOOKAHEAD)
-
-prev_ptr dw seg _prev ; pointer to the prev array
-ifdef SS_NEQ_DS
- match_start dw 0 ; copy of _match_start if SS != DS
- nice_match dw 0 ; copy of _nice_match if SS != DS
-endif
-
-; initialize or check the variables used in match.asm.
-
-ifdef __LARGE__
-_match_init proc far ; 'proc far' for large model
-else
-_match_init proc near ; 'proc near' for compact model
-endif
-ifdef SS_NEQ_DS
- ma_start equ cs:match_start ; does not work on OS/2
- nice equ cs:nice_match
- mov ax,_nice_match
- mov cs:nice_match,ax ; ugly write to code, crash on OS/2
-else
- assume ss: DGROUP
- ma_start equ ss:_match_start
- nice equ ss:_nice_match
- mov ax,ds
- mov bx,ss
- cmp ax,bx ; SS == DS?
- jne error
-endif
-ifdef DYN_ALLOC
- cmp _prev[0],0 ; verify zero offset
- jne error
- cmp _window[0],0
- jne error
- ifdef SS_NEQ_DS
- mov ax,_prev[2] ; segment value
- mov cs:prev_ptr,ax ; ugly write to code, crash on OS/2
- prev_seg equ cs:prev_ptr
- else
- prev_seg equ ss:_prev[2] ; works on OS/2 if SS == DS
- endif
-else
- prev_seg equ cs:prev_ptr
-endif
- ret
-ifdef __LARGE__
- extrn _exit : far ; 'far' for large model
-else
- extrn _exit : near ; 'near' for compact model
-endif
-error: call _exit
-
-_match_init endp
-
-; -----------------------------------------------------------------------
-; 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
-
-; int longest_match(cur_match)
-
-ifdef __LARGE__
-_longest_match proc far ; 'proc far' for large model
-else
-_longest_match proc near ; 'proc near' for compact model
-endif
- push bp
- mov bp,sp
- push di
- push si
- push ds
-
-ifdef __LARGE__
- cur_match equ word ptr [bp+6] ; [bp+6] for large model
-else
- cur_match equ word ptr [bp+4] ; [bp+4] for compact model
-endif
-
-; window equ es:window (es:0 for DYN_ALLOC)
-; prev equ ds:prev
-; match equ es:si
-; scan equ es:di
-; chain_length equ bp
-; best_len equ bx
-; limit equ dx
-
- mov si,cur_match ; use bp before it is destroyed
- mov bp,_max_chain_length ; chain_length = max_chain_length
- mov di,_strstart
- mov dx,di
- sub dx,MAX_DIST ; limit = strstart-MAX_DIST
- jae limit_ok
- sub dx,dx ; limit = NIL
-limit_ok:
- add di,2+window_off ; di = offset(window + strstart + 2)
- mov bx,_prev_length ; best_len = prev_length
- mov es,window_seg
- mov ax,es:[bx+di-3] ; ax = scan[best_len-1..best_len]
- mov cx,es:[di-2] ; cx = scan[0..1]
- cmp bx,_good_match ; do we have a good match already?
- mov ds,prev_seg ; (does not destroy the flags)
- assume ds: nothing
- jb do_scan ; good match?
- shr bp,1 ; chain_length >>= 2
- shr bp,1
- jmp short do_scan
-
- even ; align destination of branch
-long_loop:
-; at this point, ds:di == scan+2, ds:si == cur_match
- mov ax,[bx+di-3] ; ax = scan[best_len-1..best_len]
- mov cx,[di-2] ; cx = scan[0..1]
- mov ds,prev_seg ; reset ds to address the prev array
-short_loop:
-; at this point, di == scan+2, si = cur_match,
-; ax = scan[best_len-1..best_len] and cx = scan[0..1]
-if (WSIZE-32768)
- and si,WSIZE-1 ; not needed if WSIZE=32768
-endif
- shl si,1 ; cur_match as word index
- mov si,prev[si] ; cur_match = prev[cur_match]
- cmp si,dx ; cur_match <= limit ?
- jbe the_end
- dec bp ; --chain_length
- jz the_end
-do_scan:
- cmp ax,word ptr es:window[bx+si-1] ; check match at best_len-1
- jne short_loop
- cmp cx,word ptr es:window[si] ; check min_match_length match
- jne short_loop
-
- lea si,window[si+2] ; si = match
- mov ax,di ; ax = scan+2
- mov cx,es
- mov ds,cx ; ds = es = window
- mov cx,(MAX_MATCH-2)/2 ; scan for at most MAX_MATCH bytes
- repe cmpsw ; loop until mismatch
- je maxmatch ; match of length MAX_MATCH?
-mismatch:
- mov cl,[di-2] ; mismatch on first or second byte?
- sub cl,[si-2] ; cl = 0 if first bytes equal
- xchg ax,di ; di = scan+2, ax = end of scan
- sub ax,di ; ax = len
- sub si,ax ; si = cur_match + 2 + offset(window)
- sub si,2+window_off ; si = cur_match
- sub cl,1 ; set carry if cl == 0 (can't use DEC)
- adc ax,0 ; ax = carry ? len+1 : len
- cmp ax,bx ; len > best_len ?
- jle long_loop
- mov ma_start,si ; match_start = cur_match
- mov bx,ax ; bx = best_len = len
- cmp ax,nice ; len >= nice_match ?
- jl long_loop
-the_end:
- pop ds
- assume ds: DGROUP
-ifdef SS_NEQ_DS
- mov ax,ma_start ; garbage if no match found
- mov ds:_match_start,ax
-endif
- pop si
- pop di
- pop bp
- mov ax,bx ; result = ax = best_len
- ret
-maxmatch: ; come here if maximum match
- cmpsb ; increment si and di
- jmp mismatch ; force match_length = MAX_LENGTH
-
-_longest_match endp
-
-_TEXT ends
-end
diff --git a/Build/source/utils/gzip/msdos/tailor.c b/Build/source/utils/gzip/msdos/tailor.c
deleted file mode 100644
index 4d41b22a600..00000000000
--- a/Build/source/utils/gzip/msdos/tailor.c
+++ /dev/null
@@ -1,58 +0,0 @@
-/* tailor.c -- target dependent functions
- * Copyright (C) 1992-1993 Jean-loup Gailly
- * This is free software; you can redistribute it and/or modify it under the
- * terms of the GNU General Public License, see the file COPYING.
- */
-
-/* tailor.c is a bunch of non portable routines.
- * It should be kept to a minimum.
- */
-
-#include "tailor.h"
-#include "gzip.h"
-
-#ifndef lint
-static char rcsid[] = "$Id: tailor.c,v 0.8 1993/02/24 18:24:54 jloup Exp $";
-#endif
-
-#ifdef __TURBOC__
-
-/************************/
-/* Function fcalloc() */
-/************************/
-
-/* 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 fcfree().
- * For MSC, use halloc instead of this function (see tailor.h).
- */
-static ush ptr_offset = 0;
-
-void * fcalloc(items, size)
- unsigned items; /* number of items */
- unsigned size; /* item size */
-{
- void * buf = farmalloc((ulg)items*size + 16L);
- if (buf == NULL) return NULL;
- /* Normalize the pointer to seg:0 */
- if (ptr_offset == 0) {
- ptr_offset = (ush)((uch*)buf-0);
- } else if (ptr_offset != (ush)((uch*)buf-0)) {
- error("inconsistent ptr_offset");
- }
- *((ush*)&buf+1) += (ptr_offset + 15) >> 4;
- *(ush*)&buf = 0;
- return buf;
-}
-
-void fcfree(ptr)
- void *ptr; /* region allocated with fcalloc() */
-{
- /* Put the pointer back to its original form: */
- *((ush*)&ptr+1) -= (ptr_offset + 15) >> 4;
- *(ush*)&ptr = ptr_offset;
- farfree(ptr);
- }
-
-#endif /* __TURBOC__ */