                             CHILIB README.TXT
      Copyright (C) Cay S. Horstmann 1994 - 1999. All Rights Reserved.

11/1/94 Version 1.00 
4/10/95 Version 1.01
6/20/95 Version 1.02
10/14/95 Version 1.03
2/09/97 Version 1.04
12/27/98 Version 1.05

0. License and warranty

The original purchaser of the book "Mastering Object-Oriented Design in C++" 
is hereby given a license to use, execute and modify the programs, source 
code and text files of this floppy disk (hereinafter referred to as the 
"licensed materials") for private, noncommercial use only. In addition, 
instructors who adopt the book "Mastering Object-Oriented Design in C++" as 
a required text for a course, as well as all students participating in such 
a course, are given a license to use the licensed materials for educational 
use only. The licensee agrees not to make copies of the licensed materials 
available to third parties without prior written permission by the copyright 
holder. The licensee agrees not to levy a charge for such copies or the act 
of performing such copies unless expressly authorized by the copyright 
holder.

The licensed materials are licensed "as is". All warranties of 
merchantability or fitness for a particular purpose are expressly 
disclaimed. Under no circumstances shall the copyright holder or publisher 
be liable for any damages (including incidental or consequential damages for 
loss of money, time, business opportunity or other losses) arising out of 
the use or inability to use the licensed materials, even if the copyright 
holder or publisher has been advised of the possibility of such damages. 

In case of a defect, our entire liability and your exclusive remedy shall 
be, at our option, either a refund of the price of the disk media or 
replacement of the licensed materials. 

There is no free technical support available for these licensed materials. 


1. Installation

To install the contents of this disk onto your hard disk, copy the contents 
of the disk (including the two subdirectories EXAMPLES and MDGEN) onto your 
hard disk, preferably a subdirectory named CHILIB. 

       MD C:\CHILIB
       XCOPY A:\ C:\CHILIB /S

To use mdgen from any directory, add \CHILIB\MDGEN to the path or move the 
executable files to another location on the path. To run mdgen on a platform 
other than DOS, supply your own awk interpreter (such as nawk on Unix) and 
use the included awk script.


2. Compatibility

This version of ChiLib has been tested under DOS and Windows with Borland 
C++ 3.0, 3.1, 4.0, 4.5 and 5.0, Microsoft 2.1, Microsoft 4.x, Symantec 7.0
and Watcom 10.0. Most of these compilers have one or more bugs for which
workarounds are available PROVIDED YOU DEFINE one of the following pre-
processor variables:

Borland 3.0    CHI_BC30
Borland 3.1    CHI_BC31
Borland 4.0    CHI_BC40
Borland 4.5    CHI_BC45
Borland 5.0    CHI_BC50
Microsoft 2.1  CHI_MC21
Microsoft 4.x  CHI_BC40
Symantec 7.x   CHI_SC70
Watcom 10.0    CHI_WC10
Gnu C++        CHI_GCC

(For example, place #define CHI_BC45 into chisetup.h.) 


3. Adding Files to Projects

The easiest method for using ChiLib, and the one I recommend, is to
add all necessary CHIxxxxx.CPP files to each project. For most applications
you need
   CHIERROR.CPP
   CHISTRNG.CPP
   CHIARRAY.CPP
For graphical applications, you also need
   CHIGCWIN.CPP
   CHISHAPE.CPP


4. Graphics programs

Windows programs don't have a main program. Instead, the library contains 
WinMain and calls 

       int chi_main(int argc, char** argv)

For compatibility between Windows and BGI programs, we do the same for BGI. 
The library contains main (which simply calls chi_main). Hence you should 
always use chi_main, not main, as the starting point for programs that use 
ChiLib graphics. 

Remember to always #define CHI_WIN or CHI_BGI when compiling graphics 
programs.

*** IMPORTANT *** For Win32 programs, in particular all Microsoft compilers,
you must also #define CHI_WIN32

For Borland graphics, remember to include the following BGI files:

       EGAVGA.BGI (or the graphics file for your adapter)
       SANS.CHR
       TRIP.CHR


5. List of changes

Version 1.05:

1. Support has been added for Linux/g++/X11. Compile with CHI_GCC and CHI_X11

Version 1.04:

1. Support has been added for 32-bit Windows. Compile with CHI_WIN32

2. Support has been added for Microsoft 4.x, Symantec and Watcom

Version 1.03:

1. chigcwin.cpp: Fixed a bug when drawing rectangles in Windows in a 
coordinate system with top left corner != (0,0)

2. chidate.cpp: Fixed the August and September day counts 

3. chiarray.cpp: Force alignment to double so code will run on Sparc

4. chistrng.cpp: Removed nonstandard functions gcvt, ltoa, stricmp. Will now
compile on Mac and Unix

5. mdgen.awk: Changed target extension from .H to .h

Version 1.02:

1. Fixed the self-extracting MDGENZIP.EXE (it didn't self-extract 
in version 1.01)

Version 1.01:

1. Identified bugs in Borland 4.5 (can't handle rectangle constructors with 
two anonymous point arguments) and Borland 3.0 (finds a spurious ambiguity 
when using String::compare as a function pointer). Provided workarounds--
compile with CHI_BC30 or CHI_BC45 defined.

2. To humor a number of buggy compilers that can't handle Chi_Array of non-
class types, all examples have been rewritten with Chi_NumArray or 
Chi_PtrArray where necessary. A Chi_PtrPriorityQueue has been added. 

3. The Chi_Array::insert and insert_range operations have been rewritten to 
act more sensibly when inserting elements beyond the current bounds.

4. Made sure graphics programs cannot compile without CHI_WIN, CHI_BGI, ... 
defined, by issuing an error directive in chigc.h.


6. Technical Support

Sorry, NO FREE TECHNICAL SUPPORT is available on the ChiLib library.

There is a list of frequently asked questions (FAQ) on the internet
(http://www.horstmann.com/mood.html). You can also
download the most current version of Chilib (as a ZIP or TAR file) from that
location. Please read the FAQ and make sure you have the most current version
before going any further.

If you have found a bug in our code that is not mentioned in the FAQ, then
I'd like to know about it. Please send an email to horstman@cs.sjsu.edu,
explaining
        - what platform and compiler you are using, and what version
        - what version of ChiLib is involved (so I can ignore your report
          if it isn't about the most current one)
        - what file and line number cause the problem. If you can't determine
          this, distill the problem down to less than 50 lines of code.


