README.txt In this directory you will find the source for the code for the book File Structures: an Object-Oriented Approach Using C++, by Folk, Zoellick, and Riccardi. Also included are makefiles that use the Gnu C++ and make packages to build executables. There are two versions, one for DOS and one for Unix. The primary differences are the use of ios::binary in the DOS code, and the difference in path names and OS utilities for copy and delete in the makefiles. The file filecode.zip contains the DOS directory structure. The file filecode.unix.tar.gz contains the Unix directory structure. To use the makefiles, first create a directory that contains the src directory and the two files 'Makefile' and 'default.mk'. Type 'make setup' to create the directories 'object', 'lib', and 'include'. Type 'make' to create subdirectories under object, create the executables and the libraries, and populate the include and lib directories. The individual appendices can be made one at a time. For example, 'make app_d' will make the app_d object directory only. The makefiles are rather simple and will generate error messages in the phase that populates the include and lib directories. You can safely ignore these messages. If you are using an integrated tool such as Microsoft Visual C++, you will not need the makefiles. You will need shared include and lib directories since the code in later appendices uses classes from the earlier appendices. It is strongly recommended that you consult the README files on the Addison Wesley Longman ftp site to keep abreast of changes in the code. Please let me know if you encounter problems, find errors or have suggestions for improvements. Greg Riccardi riccardi@cs.fsu.edu Changes: Notes and Errata: Some problems that may be encountered: 1. The use of .cc and .cpp extensions. Some compilers are sensitive to the exact extension used for source files. For example, Microsoft Visual C++ may refuse to recognize .cc as a C++ source file extension. The DJGPP distribution of the Gnu C++ compiler supports either .cc or .cpp, but the debugger (dgb) will only recognize .cc for source file display. The Unix versions that I have tried are insensitive to the extension. The makefiles that are included will use either extension. You may need to change the extensions of some source files. 2. The use of ios::bin and ios::binary as file modes causes portability problems. These flags are needed by DOS and Windows compilers to make sure that there is no special treatment for end-of-line characters. Some compilers may require one or the other, and some Unix compilers do not define either. The DOS code uses 'ios::binary'. 3. There are some difficulties with file modes in the DJGPP distribution of the Gnu C++ system. In particular, in some versions any use of ios::out in a C++ stream causes the stream to be truncated when it is opened. This means that code that tries to write on a file that has already been created will not work properly. If you are using the DJGPP C++ system, you may want to construct a simple test to see if you can open an existing file in mode ios::in|ios::out without the file being truncated. For example, the program app_d/listcpp.cpp may be modified to perform this test. This error can be fixed, but it may require a modification of the compiler source code and regeneration of the C++ libraries. Errata fixed: January 6, 1997 Files in app_f were changed to fix an error in that occured in testfile.cc in the call to VarLengthBuffer::ReadHeader. A 9 character string was being read into a 6 character variable. Files iobuffer.cc, varlen.cc, fixlen.cc, fixfld.cc were changed.