home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.sources.misc
- From: pdh@netcom.com (Philip D. Howard)
- Subject: v35i107: bitio - portable bit stream function library, Part03/03
- Message-ID: <1993Mar3.151951.14165@sparky.imd.sterling.com>
- X-Md4-Signature: 3aa5094aea7ceadf43f6dac0d4edafc1
- Date: Wed, 3 Mar 1993 15:19:51 GMT
- Approved: kent@sparky.imd.sterling.com
-
- Submitted-by: pdh@netcom.com (Philip D. Howard)
- Posting-number: Volume 35, Issue 107
- Archive-name: bitio/part03
- Environment: MS-DOS, UNIX, ANSI-C, BCC, GCC, MSC, PC, NeXT, Sparc, Sequent
-
- #! /bin/sh
- # This is a shell archive. Remove anything before this line, then feed it
- # into a shell via "sh file" or similar. To overwrite existing files,
- # type "sh file -c".
- # Contents: bitio104/CHANGES bitio104/PLATFORM bitio104/VERSION
- # bitio104/bcc.mf bitio104/bclean.bat bitio104/bithput.c
- # bitio104/bitlget.c bitio104/bitlput.c bitio104/bmake.bat
- # bitio104/bmakeall.bat bitio104/bremake.bat bitio104/bvirgin.bat
- # bitio104/gcc.mf bitio104/gclean bitio104/gmake bitio104/gremake
- # bitio104/gvirgin bitio104/mclean.bat bitio104/mmake.bat
- # bitio104/mmakeall.bat bitio104/mremake.bat bitio104/msc.mf
- # bitio104/mvirgin.bat bitio104/test bitio104/test.bat
- # bitio104/testi.c bitio104/testo.c
- # Wrapped by kent@sparky on Wed Mar 3 09:07:11 1993
- PATH=/bin:/usr/bin:/usr/ucb:/usr/local/bin:/usr/lbin ; export PATH
- echo If this archive is complete, you will see the following message:
- echo ' "shar: End of archive 3 (of 3)."'
- if test -f 'bitio104/CHANGES' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'bitio104/CHANGES'\"
- else
- echo shar: Extracting \"'bitio104/CHANGES'\" \(999 characters\)
- sed "s/^X//" >'bitio104/CHANGES' <<'END_OF_FILE'
- X========================================================================
- X1993-Feb-22 version 1.04
- X
- X1. Work around a Borland C++ 3.1 bad code compilation bug.
- X
- X2. Replace bit shift with array indexing to constuct certain masks.
- X
- X3. Set byte file buffer size under MS-DOS.
- X
- X4. Rewrote makefiles.
- X
- X5. More source comments.
- X========================================================================
- X1993-Jan-20 version 1.03
- X
- X1. Ported BITIO to MS-DOS with Borland C++ 3.1.
- X
- X2. Did some cleaning of makefiles.
- X========================================================================
- X1993-Jan-13 version 1.02
- X
- X1. Fixed bug in BIT1GET macro which failed to return an EOF.
- X
- X2. Added test programs "testmo" and "testmi" to perform a speed run
- X on BIT1PUT and BIT1GET macros.
- X========================================================================
- X1993-Jan-12 version 1.01
- X
- X1. Ported BITIO to MS-DOS with MicroSoft C 6.00a.
- X========================================================================
- END_OF_FILE
- if test 999 -ne `wc -c <'bitio104/CHANGES'`; then
- echo shar: \"'bitio104/CHANGES'\" unpacked with wrong size!
- fi
- # end of 'bitio104/CHANGES'
- fi
- if test -f 'bitio104/PLATFORM' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'bitio104/PLATFORM'\"
- else
- echo shar: Extracting \"'bitio104/PLATFORM'\" \(185 characters\)
- sed "s/^X//" >'bitio104/PLATFORM' <<'END_OF_FILE'
- XThese platforms have been tested with at least some version of BITIO and
- Xfound to work:
- X
- XMS-DOS Borland C++ 3.1
- XMS-DOS MicroSoft C 6.00a
- XNeXT
- XSequent Symmetry (Dynix)
- XSun Sparc (SunOS)
- END_OF_FILE
- if test 185 -ne `wc -c <'bitio104/PLATFORM'`; then
- echo shar: \"'bitio104/PLATFORM'\" unpacked with wrong size!
- fi
- # end of 'bitio104/PLATFORM'
- fi
- if test -f 'bitio104/VERSION' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'bitio104/VERSION'\"
- else
- echo shar: Extracting \"'bitio104/VERSION'\" \(9 characters\)
- sed "s/^X//" >'bitio104/VERSION' <<'END_OF_FILE'
- Xbitio104
- END_OF_FILE
- if test 9 -ne `wc -c <'bitio104/VERSION'`; then
- echo shar: \"'bitio104/VERSION'\" unpacked with wrong size!
- fi
- # end of 'bitio104/VERSION'
- fi
- if test -f 'bitio104/bcc.mf' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'bitio104/bcc.mf'\"
- else
- echo shar: Extracting \"'bitio104/bcc.mf'\" \(1643 characters\)
- sed "s/^X//" >'bitio104/bcc.mf' <<'END_OF_FILE'
- X# makefile for Borland C++ 3.1 (and maybe other versions)
- X#define MODEL on the MAKE command line in lower case
- X
- XLIBNAME = bitio
- X
- XINCLUDE = .;$(INCLUDE)
- XLIB = .;$(LIB)
- X
- XCC = bcc
- XCCFLAGS = -a -c -d -G -g9 -j9 -N -O2 -Qx=1024 -S -w -Z -D__STDC__=0
- XAS = tasm
- XASFLAGS = /c /l /la /m /ml /z
- XLB = tlib
- XLBFLAGS = /C /P16
- XLN = tlink
- XLNFLAGS = /c /d /s
- X
- XLIBS = $(LIBNAME)$(MODEL).lib c$(MODEL).lib math$(MODEL).lib
- X
- XFUNCS = bit1get.obj bit1put.obj bitclose.obj bitflush.obj bithget.obj\
- X bithput.obj bitlget.obj bitlput.obj bitopen.obj bituse.obj
- X
- XTESTS = testi.exe testmi.exe testmo.exe testo.exe
- X
- X.c.obj:
- X $(CC) $(CCFLAGS) -I$(INCLUDE) -m$(MODEL) -o$*.asm $*.c
- X $(AS) $(ASFLAGS) $*.asm , $*.obj , $*.lst , $*.xrf
- X $(LB) $(LBFLAGS) $(LIBNAME)$(MODEL).lib -+$*.obj
- X
- X.c.exe:
- X $(CC) $(CCFLAGS) -I$(INCLUDE) -m$(MODEL) -o$*.asm $*.c
- X $(AS) $(ASFLAGS) $*.asm , $*.obj , $*.lst , $*.xrf
- X $(LN) $(LNFLAGS) /Tde c0$(MODEL).obj $*.obj, $*.exe, $*.map, $(LIBS)
- X
- Xall: $(FUNCS) $(TESTS)
- X
- Xlibrary: $(FUNCS)
- X
- Xbit1get.obj: bitio.h bit1get.c
- X
- Xbit1put.obj: bitio.h bit1put.c
- X
- Xbitclose.obj: bitio.h bitclose.c
- X
- Xbitflush.obj: bitio.h bitflush.c
- X
- Xbithget.obj: bitio.h bitget.h bithget.c
- X
- Xbithput.obj: bitio.h bitput.h bithput.c
- X
- Xbitlget.obj: bitio.h bitget.h bitlget.c
- X
- Xbitlput.obj: bitio.h bitput.h bitlput.c
- X
- Xbitopen.obj: bitio.h bitopen.c
- X
- Xbituse.obj: bitio.h bituse.c
- X
- Xtesti.exe: bitio.h testio.h rand.h randul.c testi.c
- X
- Xtestmi.exe: bitio.h testmi.c
- X
- Xtestmo.exe: bitio.h testmo.c
- X
- Xtesto.exe: bitio.h testio.h rand.h randul.c testo.c
- X
- Xclean:
- X del *.asm
- X del *.bak
- X del *.dat
- X del *.lst
- X del *.obj
- X del *.map
- X del *.xrf
- X
- Xvirgin: clean
- X del *.lib
- X del *.exe
- END_OF_FILE
- if test 1643 -ne `wc -c <'bitio104/bcc.mf'`; then
- echo shar: \"'bitio104/bcc.mf'\" unpacked with wrong size!
- fi
- # end of 'bitio104/bcc.mf'
- fi
- if test -f 'bitio104/bclean.bat' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'bitio104/bclean.bat'\"
- else
- echo shar: Extracting \"'bitio104/bclean.bat'\" \(20 characters\)
- sed "s/^X//" >'bitio104/bclean.bat' <<'END_OF_FILE'
- Xmake -fbcc.mf clean
- END_OF_FILE
- if test 20 -ne `wc -c <'bitio104/bclean.bat'`; then
- echo shar: \"'bitio104/bclean.bat'\" unpacked with wrong size!
- fi
- # end of 'bitio104/bclean.bat'
- fi
- if test -f 'bitio104/bithput.c' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'bitio104/bithput.c'\"
- else
- echo shar: Extracting \"'bitio104/bithput.c'\" \(1905 characters\)
- sed "s/^X//" >'bitio104/bithput.c' <<'END_OF_FILE'
- X/***********************************************************************\
- X| Copyright (C) 1993 - by Philip David Howard - all rights reserved |
- X| |
- X| This library is free software; you may redistribute it and/or |
- X| modify it under the terms of the GNU Library General Public |
- X| License as published by the Free Software Foundation; either |
- X| version 2 of the license, or (at your option) any later version. |
- X| |
- X| This library is distributed in the hope that it will be useful, |
- X| but WITHOUT ANY WARRANTY; without even the implied warranty of |
- X| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
- X| GNU Library General Public License for more details. |
- X| |
- X| You should have received a copy of the GNU Library General Public |
- X| License along with this library. If not, write to the Free |
- X| Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. |
- X| |
- X|author: Philip D. Howard (ka9wgn) |
- X|email: pdh@netcom.com |
- X|postal: PO Box 5012; Champaign, IL 61825-5012 |
- X|voice/fax: 217-384-4934 |
- X\***********************************************************************/
- X/***********************************************************************\
- X|function: bithput |
- X|purpose: to output bit data to a bit stream file |
- X| data is high order justified |
- X| |
- X|arguments: 1 (BITFILE *) bit stream file to be written to |
- X| 2 (ulong) bit data to be written |
- X| 3 (uint) count of bits to be written 0..32 |
- X|returns: (int) ==EOF: error !=EOF: ok |
- X\***********************************************************************/
- X#include <bitio.h>
- X
- X#ifdef __STDC__
- X
- Xint bithput(
- X BITFILE * bitstream ,
- X ulong data ,
- X uint count
- X)
- X
- X#else
- X
- Xint bithput( bitstream , data , count )
- X BITFILE * bitstream ;
- X ulong data ;
- X uint count ;
- X
- X#endif
- X
- X#define BITIO_HIGH
- X#include <bitput.h>
- END_OF_FILE
- if test 1905 -ne `wc -c <'bitio104/bithput.c'`; then
- echo shar: \"'bitio104/bithput.c'\" unpacked with wrong size!
- fi
- # end of 'bitio104/bithput.c'
- fi
- if test -f 'bitio104/bitlget.c' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'bitio104/bitlget.c'\"
- else
- echo shar: Extracting \"'bitio104/bitlget.c'\" \(1987 characters\)
- sed "s/^X//" >'bitio104/bitlget.c' <<'END_OF_FILE'
- X/***********************************************************************\
- X| Copyright (C) 1993 - by Philip David Howard - all rights reserved |
- X| |
- X| This library is free software; you may redistribute it and/or |
- X| modify it under the terms of the GNU Library General Public |
- X| License as published by the Free Software Foundation; either |
- X| version 2 of the license, or (at your option) any later version. |
- X| |
- X| This library is distributed in the hope that it will be useful, |
- X| but WITHOUT ANY WARRANTY; without even the implied warranty of |
- X| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
- X| GNU Library General Public License for more details. |
- X| |
- X| You should have received a copy of the GNU Library General Public |
- X| License along with this library. If not, write to the Free |
- X| Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. |
- X| |
- X|author: Philip D. Howard (ka9wgn) |
- X|email: pdh@netcom.com |
- X|postal: PO Box 5012; Champaign, IL 61825-5012 |
- X|voice/fax: 217-384-4934 |
- X\***********************************************************************/
- X/***********************************************************************\
- X|function: bitlget |
- X|purpose: to input bit data from a bit stream file |
- X| data is low order justified |
- X| |
- X|arguments: 1 (BITFILE *) bit stream file to be read from |
- X| 2 (uint *) pointer to where actual count goes |
- X| 3 (uint) count of bits to get |
- X|returns: (ulong) data from bit stream file |
- X| |
- X|note: returned count is 0 for EOF, -1 for error |
- X\***********************************************************************/
- X#include <bitio.h>
- X
- X#ifdef __STDC__
- X
- Xulong bitlget(
- X BITFILE * bitstream ,
- X uint * countptr ,
- X uint count
- X)
- X
- X#else
- X
- Xulong bitlget( bitstream , countptr , count )
- X BITFILE * bitstream ;
- X uint * countptr ;
- X uint count ;
- X
- X#endif
- X
- X#define BITIO_LOW
- X#include <bitget.h>
- END_OF_FILE
- if test 1987 -ne `wc -c <'bitio104/bitlget.c'`; then
- echo shar: \"'bitio104/bitlget.c'\" unpacked with wrong size!
- fi
- # end of 'bitio104/bitlget.c'
- fi
- if test -f 'bitio104/bitlput.c' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'bitio104/bitlput.c'\"
- else
- echo shar: Extracting \"'bitio104/bitlput.c'\" \(1903 characters\)
- sed "s/^X//" >'bitio104/bitlput.c' <<'END_OF_FILE'
- X/***********************************************************************\
- X| Copyright (C) 1993 - by Philip David Howard - all rights reserved |
- X| |
- X| This library is free software; you may redistribute it and/or |
- X| modify it under the terms of the GNU Library General Public |
- X| License as published by the Free Software Foundation; either |
- X| version 2 of the license, or (at your option) any later version. |
- X| |
- X| This library is distributed in the hope that it will be useful, |
- X| but WITHOUT ANY WARRANTY; without even the implied warranty of |
- X| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
- X| GNU Library General Public License for more details. |
- X| |
- X| You should have received a copy of the GNU Library General Public |
- X| License along with this library. If not, write to the Free |
- X| Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. |
- X| |
- X|author: Philip D. Howard (ka9wgn) |
- X|email: pdh@netcom.com |
- X|postal: PO Box 5012; Champaign, IL 61825-5012 |
- X|voice/fax: 217-384-4934 |
- X\***********************************************************************/
- X/***********************************************************************\
- X|function: bitlput |
- X|purpose: to output bit data to a bit stream file |
- X| data is low order justified |
- X| |
- X|arguments: 1 (BITFILE *) bit stream file to be written to |
- X| 2 (ulong) bit data to be written |
- X| 3 (uint) count of bits to be written 0..32 |
- X|returns: (int) ==EOF: error !=EOF: ok |
- X\***********************************************************************/
- X#include <bitio.h>
- X
- X#ifdef __STDC__
- X
- Xint bitlput(
- X BITFILE * bitstream ,
- X ulong data ,
- X uint count
- X)
- X
- X#else
- X
- Xint bitlput( bitstream , data , count )
- X BITFILE * bitstream ;
- X ulong data ;
- X uint count ;
- X
- X#endif
- X
- X#define BITIO_LOW
- X#include <bitput.h>
- END_OF_FILE
- if test 1903 -ne `wc -c <'bitio104/bitlput.c'`; then
- echo shar: \"'bitio104/bitlput.c'\" unpacked with wrong size!
- fi
- # end of 'bitio104/bitlput.c'
- fi
- if test -f 'bitio104/bmake.bat' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'bitio104/bmake.bat'\"
- else
- echo shar: Extracting \"'bitio104/bmake.bat'\" \(28 characters\)
- sed "s/^X//" >'bitio104/bmake.bat' <<'END_OF_FILE'
- Xmake -fbcc.mf -DMODEL=c all
- END_OF_FILE
- if test 28 -ne `wc -c <'bitio104/bmake.bat'`; then
- echo shar: \"'bitio104/bmake.bat'\" unpacked with wrong size!
- fi
- # end of 'bitio104/bmake.bat'
- fi
- if test -f 'bitio104/bmakeall.bat' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'bitio104/bmakeall.bat'\"
- else
- echo shar: Extracting \"'bitio104/bmakeall.bat'\" \(665 characters\)
- sed "s/^X//" >'bitio104/bmakeall.bat' <<'END_OF_FILE'
- X@echo ========================================================================
- Xmake -fbcc.mf -DMODEL=c virgin library
- X@echo ========================================================================
- Xmake -fbcc.mf -DMODEL=h clean library
- X@echo ========================================================================
- Xmake -fbcc.mf -DMODEL=l clean library
- X@echo ========================================================================
- Xmake -fbcc.mf -DMODEL=m clean library
- X@echo ========================================================================
- Xmake -fbcc.mf -DMODEL=s clean library
- X@echo ========================================================================
- END_OF_FILE
- if test 665 -ne `wc -c <'bitio104/bmakeall.bat'`; then
- echo shar: \"'bitio104/bmakeall.bat'\" unpacked with wrong size!
- fi
- # end of 'bitio104/bmakeall.bat'
- fi
- if test -f 'bitio104/bremake.bat' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'bitio104/bremake.bat'\"
- else
- echo shar: Extracting \"'bitio104/bremake.bat'\" \(35 characters\)
- sed "s/^X//" >'bitio104/bremake.bat' <<'END_OF_FILE'
- Xmake -fbcc.mf -DMODEL=c virgin all
- END_OF_FILE
- if test 35 -ne `wc -c <'bitio104/bremake.bat'`; then
- echo shar: \"'bitio104/bremake.bat'\" unpacked with wrong size!
- fi
- # end of 'bitio104/bremake.bat'
- fi
- if test -f 'bitio104/bvirgin.bat' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'bitio104/bvirgin.bat'\"
- else
- echo shar: Extracting \"'bitio104/bvirgin.bat'\" \(21 characters\)
- sed "s/^X//" >'bitio104/bvirgin.bat' <<'END_OF_FILE'
- Xmake -fbcc.mf virgin
- END_OF_FILE
- if test 21 -ne `wc -c <'bitio104/bvirgin.bat'`; then
- echo shar: \"'bitio104/bvirgin.bat'\" unpacked with wrong size!
- fi
- # end of 'bitio104/bvirgin.bat'
- fi
- if test -f 'bitio104/gcc.mf' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'bitio104/gcc.mf'\"
- else
- echo shar: Extracting \"'bitio104/gcc.mf'\" \(1491 characters\)
- sed "s/^X//" >'bitio104/gcc.mf' <<'END_OF_FILE'
- X# makefile for GNU CC on UNIX
- X
- XLIBNAME = bitio
- X
- XINCLUDE = .;$(INCLUDE)
- XLIB = .;$(LIB)
- X
- XCC = gcc
- XCCFLAGS = -DGCC -DUNIX -O -S -I.
- XAS = gcc
- XASFLAGS = -DGCC -DUNIX -c
- XLB = lib
- XLBFLAGS = /nologo
- XLN = gcc
- XLNFLAGS =
- X
- XFUNCS = bit1get.o bit1put.o bitclose.o bitflush.o bithget.o\
- X bithput.o bitlget.o bitlput.o bitopen.o bituse.o
- X
- XTESTS = testi testmi testmo testo
- X
- X.c.o:
- X $(CC) $(CCFLAGS) $*.c
- X $(AS) $(ASFLAGS) $*.s
- X
- Xall: library $(TESTS)
- X
- Xlibrary: $(FUNCS)
- X ar cr lib$(LIBNAME).a $(FUNCS)
- X ranlib lib$(LIBNAME).a
- X
- Xbit1get.o: bitio.h bit1get.c
- X
- Xbit1put.o: bitio.h bit1put.c
- X
- Xbitclose.o: bitio.h bitclose.c
- X
- Xbitflush.o: bitio.h bitflush.c
- X
- Xbithget.o: bitio.h bitget.h bithget.c
- X
- Xbithput.o: bitio.h bitput.h bithput.c
- X
- Xbitlget.o: bitio.h bitget.h bitlget.c
- X
- Xbitlput.o: bitio.h bitput.h bitlput.c
- X
- Xbitopen.o: bitio.h bitopen.c
- X
- Xbituse.o: bitio.h bituse.c
- X
- Xtesti: bitio.h testio.h rand.h randul.c testi.c
- X $(CC) $(CCFLAGS) testi.c
- X $(AS) $(ASFLAGS) testi.s
- X $(LN) -o testi testi.o -L. -l$(LIBNAME)
- X
- Xtestmi: bitio.h testmi.c
- X $(CC) $(CCFLAGS) testmi.c
- X $(AS) $(ASFLAGS) testmi.s
- X $(LN) -o testmi testmi.o -L. -l$(LIBNAME)
- X
- Xtestmo: bitio.h testmo.c
- X $(CC) $(CCFLAGS) testmo.c
- X $(AS) $(ASFLAGS) testmo.s
- X $(LN) -o testmo testmo.o -L. -l$(LIBNAME)
- X
- Xtesto: bitio.h testio.h rand.h randul.c testo.c
- X $(CC) $(CCFLAGS) testo.c
- X $(AS) $(ASFLAGS) testo.s
- X $(LN) -o testo testo.o -L. -l$(LIBNAME)
- X
- Xclean:
- X sh -c 'rm -f *.cpp *.dat *.i *.o *.s *~ #*#'
- X
- Xvirgin: clean
- X sh -c 'rm -f *.a $(TESTS)'
- X
- X
- X
- X
- X
- X
- END_OF_FILE
- if test 1491 -ne `wc -c <'bitio104/gcc.mf'`; then
- echo shar: \"'bitio104/gcc.mf'\" unpacked with wrong size!
- fi
- # end of 'bitio104/gcc.mf'
- fi
- if test -f 'bitio104/gclean' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'bitio104/gclean'\"
- else
- echo shar: Extracting \"'bitio104/gclean'\" \(36 characters\)
- sed "s/^X//" >'bitio104/gclean' <<'END_OF_FILE'
- X#!/bin/sh
- Xexec make -f gcc.mf clean
- END_OF_FILE
- if test 36 -ne `wc -c <'bitio104/gclean'`; then
- echo shar: \"'bitio104/gclean'\" unpacked with wrong size!
- fi
- chmod +x 'bitio104/gclean'
- # end of 'bitio104/gclean'
- fi
- if test -f 'bitio104/gmake' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'bitio104/gmake'\"
- else
- echo shar: Extracting \"'bitio104/gmake'\" \(34 characters\)
- sed "s/^X//" >'bitio104/gmake' <<'END_OF_FILE'
- X#!/bin/sh
- Xexec make -f gcc.mf all
- END_OF_FILE
- if test 34 -ne `wc -c <'bitio104/gmake'`; then
- echo shar: \"'bitio104/gmake'\" unpacked with wrong size!
- fi
- chmod +x 'bitio104/gmake'
- # end of 'bitio104/gmake'
- fi
- if test -f 'bitio104/gremake' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'bitio104/gremake'\"
- else
- echo shar: Extracting \"'bitio104/gremake'\" \(41 characters\)
- sed "s/^X//" >'bitio104/gremake' <<'END_OF_FILE'
- X#!/bin/sh
- Xexec make -f gcc.mf virgin all
- END_OF_FILE
- if test 41 -ne `wc -c <'bitio104/gremake'`; then
- echo shar: \"'bitio104/gremake'\" unpacked with wrong size!
- fi
- chmod +x 'bitio104/gremake'
- # end of 'bitio104/gremake'
- fi
- if test -f 'bitio104/gvirgin' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'bitio104/gvirgin'\"
- else
- echo shar: Extracting \"'bitio104/gvirgin'\" \(37 characters\)
- sed "s/^X//" >'bitio104/gvirgin' <<'END_OF_FILE'
- X#!/bin/sh
- Xexec make -f gcc.mf virgin
- END_OF_FILE
- if test 37 -ne `wc -c <'bitio104/gvirgin'`; then
- echo shar: \"'bitio104/gvirgin'\" unpacked with wrong size!
- fi
- chmod +x 'bitio104/gvirgin'
- # end of 'bitio104/gvirgin'
- fi
- if test -f 'bitio104/mclean.bat' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'bitio104/mclean.bat'\"
- else
- echo shar: Extracting \"'bitio104/mclean.bat'\" \(22 characters\)
- sed "s/^X//" >'bitio104/mclean.bat' <<'END_OF_FILE'
- Xnmake /F msc.mf clean
- END_OF_FILE
- if test 22 -ne `wc -c <'bitio104/mclean.bat'`; then
- echo shar: \"'bitio104/mclean.bat'\" unpacked with wrong size!
- fi
- # end of 'bitio104/mclean.bat'
- fi
- if test -f 'bitio104/mmake.bat' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'bitio104/mmake.bat'\"
- else
- echo shar: Extracting \"'bitio104/mmake.bat'\" \(28 characters\)
- sed "s/^X//" >'bitio104/mmake.bat' <<'END_OF_FILE'
- Xnmake /F msc.mf MODEL=C all
- END_OF_FILE
- if test 28 -ne `wc -c <'bitio104/mmake.bat'`; then
- echo shar: \"'bitio104/mmake.bat'\" unpacked with wrong size!
- fi
- # end of 'bitio104/mmake.bat'
- fi
- if test -f 'bitio104/mmakeall.bat' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'bitio104/mmakeall.bat'\"
- else
- echo shar: Extracting \"'bitio104/mmakeall.bat'\" \(665 characters\)
- sed "s/^X//" >'bitio104/mmakeall.bat' <<'END_OF_FILE'
- X@echo ========================================================================
- Xnmake /F msc.mf MODEL=C virgin library
- X@echo ========================================================================
- Xnmake /F msc.mf MODEL=H clean library
- X@echo ========================================================================
- Xnmake /F msc.mf MODEL=L clean library
- X@echo ========================================================================
- Xnmake /F msc.mf MODEL=M clean library
- X@echo ========================================================================
- Xnmake /F msc.mf MODEL=S clean library
- X@echo ========================================================================
- END_OF_FILE
- if test 665 -ne `wc -c <'bitio104/mmakeall.bat'`; then
- echo shar: \"'bitio104/mmakeall.bat'\" unpacked with wrong size!
- fi
- # end of 'bitio104/mmakeall.bat'
- fi
- if test -f 'bitio104/mremake.bat' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'bitio104/mremake.bat'\"
- else
- echo shar: Extracting \"'bitio104/mremake.bat'\" \(34 characters\)
- sed "s/^X//" >'bitio104/mremake.bat' <<'END_OF_FILE'
- Xnmake /F msc.mf MODEL=C clean all
- END_OF_FILE
- if test 34 -ne `wc -c <'bitio104/mremake.bat'`; then
- echo shar: \"'bitio104/mremake.bat'\" unpacked with wrong size!
- fi
- # end of 'bitio104/mremake.bat'
- fi
- if test -f 'bitio104/msc.mf' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'bitio104/msc.mf'\"
- else
- echo shar: Extracting \"'bitio104/msc.mf'\" \(1452 characters\)
- sed "s/^X//" >'bitio104/msc.mf' <<'END_OF_FILE'
- X# makefile for MicroSoft C 6.00 (and maybe other versions)
- X# define MODEL on the NMAKE command line in upper case
- X
- XLIBNAME = bitio
- X
- XINCLUDE = .;$(INCLUDE)
- XLIB = .;$(LIB)
- X
- XCC = cl
- XCCFLAGS = /nologo /c /EM /D__STDC__=0
- XLB = lib
- XLBFLAGS = /nologo
- XLN = link
- XLNFLAGS = /nologo /M /ST:0x1000
- X
- XLIBS = $(MODEL)$(LIBNAME) $(MODEL)LIBCE
- X
- XFUNCS = bit1get.obj bit1put.obj bitclose.obj bitflush.obj bithget.obj\
- X bithput.obj bitlget.obj bitlput.obj bitopen.obj bituse.obj
- X
- XTESTS = testi.exe testmi.exe testmo.exe testo.exe
- X
- X.c.obj:
- X $(CC) $(CCFLAGS) /A$(MODEL) /Fc$*.lst /Fo$*.obj $*.c
- X $(LB) $(LBFLAGS) $(MODEL)$(LIBNAME).lib -+$*.obj ;
- X
- X.c.exe:
- X $(CC) $(CCFLAGS) /A$(MODEL) /Fc$*.lst /Fo$*.obj $*.c
- X $(LN) $(LNFLAGS) $*.obj , $*.exe , $*.map , $(LIBS) , ;
- X
- Xall: $(FUNCS) $(TESTS)
- X
- Xlibrary: $(FUNCS)
- X
- Xbit1get.obj: bitio.h bit1get.c
- X
- Xbit1put.obj: bitio.h bit1put.c
- X
- Xbitclose.obj: bitio.h bitclose.c
- X
- Xbitflush.obj: bitio.h bitflush.c
- X
- Xbithget.obj: bitio.h bitget.h bithget.c
- X
- Xbithput.obj: bitio.h bitput.h bithput.c
- X
- Xbitlget.obj: bitio.h bitget.h bitlget.c
- X
- Xbitlput.obj: bitio.h bitput.h bitlput.c
- X
- Xbitopen.obj: bitio.h bitopen.c
- X
- Xbituse.obj: bitio.h bituse.c
- X
- Xtesti.exe: bitio.h testio.h rand.h randul.c testi.c
- X
- Xtestmi.exe: bitio.h testmi.c
- X
- Xtestmo.exe: bitio.h testmo.c
- X
- Xtesto.exe: bitio.h testio.h rand.h randul.c testo.c
- X
- Xclean:
- X del *.asm
- X del *.bak
- X del *.dat
- X del *.lst
- X del *.obj
- X del *.map
- X del *.xrf
- X
- Xvirgin: clean
- X del *.lib
- X del *.exe
- END_OF_FILE
- if test 1452 -ne `wc -c <'bitio104/msc.mf'`; then
- echo shar: \"'bitio104/msc.mf'\" unpacked with wrong size!
- fi
- # end of 'bitio104/msc.mf'
- fi
- if test -f 'bitio104/mvirgin.bat' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'bitio104/mvirgin.bat'\"
- else
- echo shar: Extracting \"'bitio104/mvirgin.bat'\" \(23 characters\)
- sed "s/^X//" >'bitio104/mvirgin.bat' <<'END_OF_FILE'
- Xnmake /F msc.mf virgin
- END_OF_FILE
- if test 23 -ne `wc -c <'bitio104/mvirgin.bat'`; then
- echo shar: \"'bitio104/mvirgin.bat'\" unpacked with wrong size!
- fi
- # end of 'bitio104/mvirgin.bat'
- fi
- if test -f 'bitio104/test' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'bitio104/test'\"
- else
- echo shar: Extracting \"'bitio104/test'\" \(654 characters\)
- sed "s/^X//" >'bitio104/test' <<'END_OF_FILE'
- X#!/bin/sh
- X#-------
- X# the portability test verifies that you can read and write data
- X# exactly the same way as other platforms
- X#-------
- Xtesti test.bit 4096 73
- Xtesto test.dat 4096 73
- Xcmp test.dat test.bit
- X#-------
- X# the consistency test does input and output of random bit sizes and values
- X# comparing what is read on input using the same random sequence
- X#-------
- Xtesto test1.dat 65536 97
- Xtesti test1.dat 65536 97
- X#-------
- X# the macro speed test just does a speed run on the one bit macros
- X# this is only a demo speed test; you will need to add your own timing
- X# code somewhere if you need actual timings
- X#-------
- Xtestmo test2.dat 4194304
- Xtestmi test2.dat
- END_OF_FILE
- if test 654 -ne `wc -c <'bitio104/test'`; then
- echo shar: \"'bitio104/test'\" unpacked with wrong size!
- fi
- chmod +x 'bitio104/test'
- # end of 'bitio104/test'
- fi
- if test -f 'bitio104/test.bat' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'bitio104/test.bat'\"
- else
- echo shar: Extracting \"'bitio104/test.bat'\" \(882 characters\)
- sed "s/^X//" >'bitio104/test.bat' <<'END_OF_FILE'
- Xrem =========================================================
- Xrem this test compares against data contained in the
- Xrem distribution of this version of BITIO to verify
- Xrem correct portability
- Xrem =========================================================
- Xtesti test.bit 4096 73
- Xrem
- Xrem =========================================================
- Xrem the consistency test does input and output of random
- Xrem bit sizes and values comparing what is read on input
- Xrem using the same random sequence
- Xrem =========================================================
- Xtesto test1.dat 65536 97
- Xtesti test1.dat 65536 97
- Xrem
- Xrem =========================================================
- Xrem this test writes and then reads 4194304 bits using
- Xrem the macros BIT1PUT and BIT1GET for maximum speed
- Xrem =========================================================
- Xtestmo test2.dat 4194304
- Xtestmi test2.dat
- END_OF_FILE
- if test 882 -ne `wc -c <'bitio104/test.bat'`; then
- echo shar: \"'bitio104/test.bat'\" unpacked with wrong size!
- fi
- # end of 'bitio104/test.bat'
- fi
- if test -f 'bitio104/testi.c' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'bitio104/testi.c'\"
- else
- echo shar: Extracting \"'bitio104/testi.c'\" \(1210 characters\)
- sed "s/^X//" >'bitio104/testi.c' <<'END_OF_FILE'
- X/***********************************************************************\
- X| Copyright (C) 1993 - by Philip David Howard - all rights reserved |
- X| |
- X| This library is free software; you may redistribute it and/or |
- X| modify it under the terms of the GNU Library General Public |
- X| License as published by the Free Software Foundation; either |
- X| version 2 of the license, or (at your option) any later version. |
- X| |
- X| This library is distributed in the hope that it will be useful, |
- X| but WITHOUT ANY WARRANTY; without even the implied warranty of |
- X| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
- X| GNU Library General Public License for more details. |
- X| |
- X| You should have received a copy of the GNU Library General Public |
- X| License along with this library. If not, write to the Free |
- X| Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. |
- X| |
- X|author: Philip D. Howard (ka9wgn) |
- X|email: pdh@netcom.com |
- X|postal: PO Box 5012; Champaign, IL 61825-5012 |
- X|voice/fax: 217-384-4934 |
- X\***********************************************************************/
- X#define INPUT
- X#include "testio.h"
- END_OF_FILE
- if test 1210 -ne `wc -c <'bitio104/testi.c'`; then
- echo shar: \"'bitio104/testi.c'\" unpacked with wrong size!
- fi
- # end of 'bitio104/testi.c'
- fi
- if test -f 'bitio104/testo.c' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'bitio104/testo.c'\"
- else
- echo shar: Extracting \"'bitio104/testo.c'\" \(1211 characters\)
- sed "s/^X//" >'bitio104/testo.c' <<'END_OF_FILE'
- X/***********************************************************************\
- X| Copyright (C) 1993 - by Philip David Howard - all rights reserved |
- X| |
- X| This library is free software; you may redistribute it and/or |
- X| modify it under the terms of the GNU Library General Public |
- X| License as published by the Free Software Foundation; either |
- X| version 2 of the license, or (at your option) any later version. |
- X| |
- X| This library is distributed in the hope that it will be useful, |
- X| but WITHOUT ANY WARRANTY; without even the implied warranty of |
- X| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
- X| GNU Library General Public License for more details. |
- X| |
- X| You should have received a copy of the GNU Library General Public |
- X| License along with this library. If not, write to the Free |
- X| Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. |
- X| |
- X|author: Philip D. Howard (ka9wgn) |
- X|email: pdh@netcom.com |
- X|postal: PO Box 5012; Champaign, IL 61825-5012 |
- X|voice/fax: 217-384-4934 |
- X\***********************************************************************/
- X#define OUTPUT
- X#include "testio.h"
- END_OF_FILE
- if test 1211 -ne `wc -c <'bitio104/testo.c'`; then
- echo shar: \"'bitio104/testo.c'\" unpacked with wrong size!
- fi
- # end of 'bitio104/testo.c'
- fi
- echo shar: End of archive 3 \(of 3\).
- cp /dev/null ark3isdone
- MISSING=""
- for I in 1 2 3 ; do
- if test ! -f ark${I}isdone ; then
- MISSING="${MISSING} ${I}"
- fi
- done
- if test "${MISSING}" = "" ; then
- echo You have unpacked all 3 archives.
- rm -f ark[1-9]isdone
- else
- echo You still must unpack the following archives:
- echo " " ${MISSING}
- fi
- exit 0
- exit 0 # Just in case...
-