SUMMARY:
CLIB_16.LIB - Selected independent far model replacement functions from the standard C (Microsoft C/C++ 7.00) library. Distribution zip file includes sources, Makefile, and limited documentation.

DISTRIBUTION clib_16.zip CONTENTS:

string\strcpy.asm
string\strlen.asm
string\skipsp.asm
string\skiptosp.asm
string\strcat.asm
string\strcmp.asm
string\strchr.asm
string\strstr.asm
string\strrchr.asm
string\stricmp.asm
string\skipspr.asm
string\skiptosr.asm
string\strlwr.asm
string\strupr.asm
string\strncpy.asm
string\strncat.asm
string\memmove.asm
string\memset.asm
string\memcmp.asm
string\string.h
string\string.inc
string\Makefile
misc\isspace.asm
misc\isalnum.asm
misc\isalpha.asm
misc\isascii.asm
misc\iscntrl.asm
misc\iscsym.asm
misc\iscsymf.asm
misc\isdigit.asm
misc\islower.asm
misc\isupper.asm
misc\isxdigit.asm
misc\misc.h
misc\misc.inc
misc\Makefile
clibc_16.inc
clibc_16.txt
Makefile
Makefile.g

BUILD THE LIBRARY:

BUILD - UNZIP DISTRIBUTION
Pkzip 2.50 zipped/ compressed the library distribution file. To unzip the library, place the clib_16.zip file into the desired directory.
pkunzip -d clib_16.zip
creates and places above listed files/ directories into directory clib_16
change to directory clib_16

BUILD - EDIT MAKEFILE
After unzipping the distribution package, edit Makefile.g (NOT Makefile) as required.
Four configuration options require attention.
DIR_C_INCLUDE
Set to the location to copy the library C include (*.h) files into. Note, these files will be placed into the clib_16 subdirectory within DIR_C_INCLUDE. May be identical to DIR_ASM_INCLUDE.
DIR_ASM_INCLUDE
Set to the location to copy the library MASM include (*.inc) files into. Note, these files will be placed into the clib_16 subdirectory within DIR_ASM_INCLUDE. May be identical to DIR_C_INCLUDE.
DIRLIB
Set to the location to copy the library (clib_16.lib) into.
DEBUG=0
Value of 1 builds debug (CodeView DOS) version of library.

BUILD - NMAKE
Once the files are unziped, and the Makefile.g edited, run
NMAKE clean

Then run
NMAKE
to build the library


CLIB_16.LIB BUILD TOOLS
The library is built (and debugged) with the following Microsoft development tools:
NMAKE 1.30    (MSVC 1.0 distribution)
MASM 6.14     (MASM 6.11 distribution, updated with ML614.EXE Patch)
MSC/C++ 8.0   (MSVC 1.0 distribution)
LINK 5.50     (MSVC 1.0 distribution)
PWB 2.1.49    (C/C++ 7.0 distribution)
CODEVIEW 4.10 (MSVC 1.0 distribution)
LIB 3.31      (MSVC 1.0 distribution)

Note:
Most tools runs in a Windows9X DOS box.

DOCUMENTATION:
See the Run-Time Library Reference manual for each individual function. Except where noted, clib_16.lib function parameters and return values are identical.

Some functions in clib_16 have corresponding Microsoft intrinsic versions. To use the library, disabling automatic intrinsic substitution may be required in some cases.

All functions in clib_16.lib are far model; Pointers are far and procedure calls are far. Each function, where applicable, preserves the es register, for additional compatibility with assembly routines. Due to the semantics of the fastcall convention, only a subset of far model routines have corresponding fastcall routines. If a fastcall function exists, then all registers, except ax (and dx for 4 byte return values) are restored, to improve assembly language integration.

GENERAL:
Independent means that each function included in clib_16.lib is completely independent of any other function. Most C library functions are dependent on other library functions, computer hardware, BIOS, and may require initialization. Because each clib_16.lib function is independent, no initialization is required, and each individual function may be included as required in an application. Programmers developing applications requiring independent functions should appreciate clib_16.lib. Due to the independent nature of each function, only a subset of the standard C library may be implemented. As demand warrants, and/or as they are completed, and/or as they are donated, functions that may be implemented as independent will be added to clib_16.lib. Contributions gladly accepted, especially sprintf and sscanf.

See clibc_16.lib for near model (com/small) independent functions.

CONTACT INFORMATION:

email:
bkyoung@cwnet.com

Address:
Byron Young
2351 Woodthrush Way
Pleasanton, CA 94566

COPYRIGHT INFORMATION:
All work herein copyrighted by the author. Commercial use and distribution of this library without the prior written permission of the author is prohibited. Library may only be distributed to individuals for personal use in original zip format by the simtel network.

DISCLAIMER
No warranty, expressed or implied, is given concerning the functionality or operability of the code included in this distribution.

BUGS
A project of this type will never be bug free. Writing simultaneous, almost identical functions, for two different models (near, far) and two calling conventions (cdecl, fastcall) always generates some confusion. Bug reports gladly accepted, and are appreciated.

A consistent "bug" concerns segment registers. Some function, to determine if two pointers are equal, compare segment registers. Applications using these functions that switch between real and protected mode must be certain that the segment registers are synced with the hidden registers after switching modes. Future versions may correct this 'bug".

REVISIONS
Release_03 09/14/2002 ilib_03.zip
Major project reorganization. New Makefiles, source directories.
Added test sources to project.

Release_02 09/14/2002 ilib_02.zip
Fastcall functions debugged.
Numerous bug fixes in other functions.

Release_01 09/04/2002 ilib_01.zip
Initial Release.