Contents of the CLIPLITE.DOC file
(Clipper is a trademark of Nantucket Corporation)
WHAT IS IT?
CLIPPER LITE is a group of .OBJ files intended to help reduce the size of .EXE
files, in Clipper programs which do not use all of the features/commands of
Clipper in a single program. It is based on work done by Jerry Gilmore. I am
deeply grateful to him- many people have tried to put the bite on me, but he
is the first one ever to take the byte away.
These files are offered for educational & experimental purposes only. They
work for me, but may not be reliable in your programs. You will have to test
the usefulness of these files yourself. No warranty is made of fitness.
HOW DOES IT WORK?
These object files are linked into your program (at link time), and replace
chunks of related routines in CLIPPER.LIB with dummy routines, thus reducing
the size of your .EXE file. Each .OBJ file is named for what it replaces:
e.g. NOMACRO replaces macro handling routines. If you link in an .OBJ file
which replaces something you need in a particular program, your program will
either work strangely or crash, so test every part of your program.
Example (Using Tlink 1.0)
TLINK Myprog nomacro nonet nomemo,,,clipper.lib
If you link in all of these .OBJ files, you will save about 75K to 80K bytes.
You may at first think that a Clipper Program couldn't be very useful without
database and index capabilities, for instance, but after some thought, you
may see uses for it. An installation program, for instance, may use menus,
GETs, file copying, etc. but not need to do any actual DBF handling. This
method may make the installation program small enough to fit on a disk with
your application, saving a second (or third) distribution disk. I have
written a complete Un-arcing shell in Clipper that handles ZIP, ARC, PAK,
ZOO, and LZH (Lharc) files. Linking in most of these .OBJ files allowed me
to reduce the .EXE from 175K to 96K... adding 79K of usable RAM space!
More info is in the Denver Clipper Users Group Newsletter of June 1989, and
in the file SHRINKCL.ARC by Jerry Gilmore.
Filename Savings Purpose
NODBF 24K Database file handling, locate, etc.
NOINDEX 13K Index file handling, seek, index on, etc.
NOMATH 13K Floating point math, ASC(), related routines
NOMACRO 11K Macro expansion, conversion, related routines
NONET 240 bytes Network functions
NOMEMO 1K Memo & DBT functions
NOREEF 5K Somebody please tell me what this does!
NOSORT 5K Database sorting, probably ASORT()
These files do not comprise the ultimate reduction in EXE possible. There are
more things waiting to be discovered in the library that are not used with some
commands. For instance, you can modify ERRORSYS.PRG to contain only one-line
dummy routines that return .T. or .F. without any messages or error handling.
Sort of a user-hostile interface, but in a utility program that you only use
yourself, you could get by with it.
I am interested in hearing from anybody who has done any related work on
Clipper internals. If you have anything to add to this, let me know! I also
would like to know if anybody knows how to invoke the Clipper internals to
allow me to stop the program at a line or single-step it without using Debug.