nulib2/nufxlib-0
2002-12-28 03:10:09 +00:00
..
samples Made a number of changes to allow NufxLib to be used as a Win32 DLL. 2002-12-06 01:04:20 +00:00
Archive.c Update copyright notices and legalese. 2002-10-11 20:15:50 +00:00
ArchiveIO.c Update copyright notices and legalese. 2002-10-11 20:15:50 +00:00
Bzip2.c Update copyright notices and legalese. 2002-10-11 20:15:50 +00:00
ChangeLog.txt Release 1.1.0. 2002-10-21 01:56:05 +00:00
Compress.c Update copyright notices and legalese. 2002-10-11 20:15:50 +00:00
config.guess Updated these to the latest from ftp://ftp.gnu.org/pub/gnu/config/. 2002-09-21 00:34:30 +00:00
config.h.in Update copyright notices and legalese. 2002-10-11 20:15:50 +00:00
config.sub Updated these to the latest from ftp://ftp.gnu.org/pub/gnu/config/. 2002-09-21 00:34:30 +00:00
configure Added support for compressing data with libbz2. Disabled by default. 2002-10-09 23:12:06 +00:00
configure.in Update copyright notices and legalese. 2002-10-11 20:15:50 +00:00
COPYING-LIB Imported sources. 2000-05-23 01:55:31 +00:00
Crc16.c Update copyright notices and legalese. 2002-10-11 20:15:50 +00:00
Debug.c Update copyright notices and legalese. 2002-10-11 20:15:50 +00:00
Deferred.c Update copyright notices and legalese. 2002-10-11 20:15:50 +00:00
Deflate.c Update copyright notices and legalese. 2002-10-11 20:15:50 +00:00
Entry.c Made a number of changes to allow NufxLib to be used as a Win32 DLL. 2002-12-06 01:04:20 +00:00
Expand.c Update copyright notices and legalese. 2002-10-11 20:15:50 +00:00
FileIO.c Update copyright notices and legalese. 2002-10-11 20:15:50 +00:00
Funnel.c Implemented "percentComplete" field in progress update. 2002-12-28 03:10:09 +00:00
INSTALL Imported sources. 2000-05-23 01:55:31 +00:00
install-sh Imported sources. 2000-05-23 01:55:31 +00:00
Lzc.c Made a number of changes to allow NufxLib to be used as a Win32 DLL. 2002-12-06 01:04:20 +00:00
Lzw.c Update copyright notices and legalese. 2002-10-11 20:15:50 +00:00
Makefile.dll Added /D DEBUG_MSGS to DLL debug builds. 2002-12-13 17:47:53 +00:00
Makefile.in Update copyright notices and legalese. 2002-10-11 20:15:50 +00:00
Makefile.msc Made a number of changes to allow NufxLib to be used as a Win32 DLL. 2002-12-06 01:04:20 +00:00
MiscStuff.c Update copyright notices and legalese. 2002-10-11 20:15:50 +00:00
MiscStuff.h Update copyright notices and legalese. 2002-10-11 20:15:50 +00:00
MiscUtils.c Update copyright notices and legalese. 2002-10-11 20:15:50 +00:00
mkinstalldirs Imported sources. 2000-05-23 01:55:31 +00:00
NOTES.txt Reformatted files to use spaces instead of hard tabs. No substantitve changes. 2002-09-21 01:13:21 +00:00
NufxLib.h Added access bit values to comment. 2002-12-27 22:51:47 +00:00
NufxLibPriv.h Implemented "percentComplete" field in progress update. 2002-12-28 03:10:09 +00:00
README.txt Made a number of changes to allow NufxLib to be used as a Win32 DLL. 2002-12-06 01:04:20 +00:00
Record.c Changed a printf() to a DBUG(). 2002-10-19 01:09:58 +00:00
SourceSink.c Update copyright notices and legalese. 2002-10-11 20:15:50 +00:00
Squeeze.c Update copyright notices and legalese. 2002-10-11 20:15:50 +00:00
SunOS4.h Update copyright notices and legalese. 2002-10-11 20:15:50 +00:00
SysDefs.h Changed F_OK for Windows from 02 to 0. 2002-12-19 23:21:32 +00:00
Thread.c Update copyright notices and legalese. 2002-10-11 20:15:50 +00:00
Value.c Update copyright notices and legalese. 2002-10-11 20:15:50 +00:00
Version.c.in Update copyright notices and legalese. 2002-10-11 20:15:50 +00:00

NufxLib README, updated 2002/10/11
http://www.nulib.com/

See "COPYING-LIB" for distribution restrictions.


UNIX
====

Run the "configure" script.  Read through "INSTALL" if you haven't used
one of these before, especially if you want to use a specific compiler
or a particular set of compiler flags.

You can disable specific compression methods with "--disable-METHOD"
(run "sh ./configure --help" to see the possible options).  By default,
all methods are enabled except bzip2.

Run "make depend" if you have makedepend, and then type "make".  This will
build the library and all of the programs in the "samples" directory.
There are some useful programs in "samples", described in a README.txt
file there.  In particular, you should run samples/test-basic to verify
that things are more or less working.

If you want to install the library and header file into standard system
locations (usually /usr/local), run "make install".  To learn how to
specify different locations, read the INSTALL document.

There are some flags in "OPT" you may want to use.  The "autoconf" default
for @CFLAGS@ is "-g -O2".

-DNDEBUG
  Disable assert() calls and extra tests.  This will speed things up,
  but errors won't get caught until later on, making the root cause
  harder to locate.

-DDEBUG_MSGS
  Enable debug messages.  This increases the size of the executable,
  but shouldn't affect performance.  When errors occur, more output is
  produced.  The "debug dump" feature is enabled by this flag.

-DDEBUG_VERBOSE
  (Implicitly sets DEBUG_MSGS.)  Spray lots of debugging output.

If you want to do benchmarks, use "-O2 -DNDEBUG".  For pre-v1.0 sources,
setting -DNDEBUG is otherwise discouraged.  The recommended configuration
is "-g -O2 -DDEBUG_MSGS", so that verbose debug output is available when
errors occur.

The flags are stuffed into Version.c, so the application program can
examine and display the flags that were used to build the library.


BeOS
====

This works just like the UNIX version, but certain defaults have been
changed.  Running configure without arguments under BeOS is equivalent to:

    ./configure --prefix=/boot --includedir='${prefix}/develop/headers'
      --libdir='${exec_prefix}/home/config/lib' --mandir='/tmp'
      --bindir='${exec_prefix}/home/config/bin'

If you're using BeOS/PPC, it will also do:

    CC=cc CFLAGS='-proc 603 -opt full'


Win32
=====

If you're using an environment that supports "configure" scripts, such as
DJGPP, follow the UNIX instructions.

NufxLib has been tested with Microsoft Visual C++ 6.0.  To build NufxLib,
start up a DOS shell and run vcvars32.bat to set your environment.  Run:
    nmake -f makefile.msc
to build with debugging info, or
    nmake -f makefile.msc nodebug=1
to build optimized.

See the makefile for comments about including zlib or libbz2.  These
need to be enabled at compile time and linked into the sample apps.

Once the library has been built, "cd samples" and run the same command there.
When it finishes, run "test-basic.exe".

If you want to build NufxLib as a DLL, use "makefile.dll" instead.
If you're using zlib or libbz2, these will need to be linked into the DLL.
You will probably need to set the application that links against it to
use the "multithreaded DLL" version of the C library.  (In Visual C++,
go to Project->Settings...->C/C++ tab, select Category: Code Generation,
and in the "Use run-time library" box choose "Multithreaded DLL" for
Release and "Debug Multithreaded DLL" for Debug.)

You have to use the DLL version because NufxLib allows certain calls to
pass in a malloc()ed pointer which the library then takes ownership of.
If nufxlib.dll and the application are using different heaps, the memory
is being allocated on one and freed from another, which doesn't work.
Debug versions of the DLL will halt with an assertion failure, most
likely in a NuFlush or NuClose call.  Non-debug versions will silently
leak memory, or possibly corrupt other structures.  You can test this
easily by running the "test-basic" application after linking it against
the DLL without specifying "DLL=1" on the makefile line.


Other Notes
===========

All of the source code is now formatted with spaces instead of tabs.

If you want to use the library in a multithreaded application, you should
define "USE_REENTRANT_CALLS" to tell it to use reentrant versions of
certain library calls.  This defines _REENTRANT, which causes Solaris to
add the appropriate goodies.  (Seems to me you'd always want this on, but
for some reason Solaris makes you take an extra step, so I'm not going to
define it by default.)


Legalese
========

NufxLib, a NuFX archive manipulation library
Copyright (C) 2000-2002 by Andy McFadden, All Rights Reserved.

This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library 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
Library General Public License for more details.

You should have received a copy of the GNU Library 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