home *** CD-ROM | disk | FTP | other *** search
-
-
- *********** streams under Turbo C and DJGPP ***********
-
- First, the bad news. If you are using a version of Turbo C earlier than
- BCC++ v3.0, this package includes no code to increase the number of streams
- in Turbo C. For these earlier verions of Turbo C, you are still limited to
- a maximum of 20 streams. If you want to increase this limit you will have
- to re-write the stream handling functions for yourself!
-
- Now the good news. If you are using BCC++ 3.0 (and presumably later), you
- will get and increased number of streams along with the increased number
- of handles. Also, this package includes modifications to DJGPP which
- will allow programs to open a number of streams which is limited only by
- the number of available handles (a maximum of 252 streams is possible).
-
- The steps to follow for DJGPP are: (Note: the diffs are for DJGPP v1.05)
-
- (1) Use patch to apply "include.dif" to the DJGPP "include" directory.
-
- (2) Use patch to apply "sys.dif" to the DJGPP "libsrc/c/sys" directory.
-
- (3) Now the time-consuming part. Since the FILE structure has now changed
- in size, it is necessary to re-compile ALL library modules which refer
- to the file structure. It is probably simplest to just re-compile the
- whole library! At a minimum, this means switching to the DJGPP
- "libsrc/c" directory and running "make". This needs to be repeated
- with "make -f makefile.p" if you ever use libpc_p.a.
- It appears that the only other file which needs to be re-compiled
- is mouse.c in "libsrc/gr".
-
- (4) Put the new libraries in your DJGPP library directory (GCCLIB).
-
- (5) Compile test2.exe using "make -f makefile.g" and run the resulting
- test2.exe. You should get a lot of files with names "str_nnn.$$$"
- where nnn ranges from 000 to some maximum value. If all went well,
- this maximum value should be 248, indicating that you had 249 files
- opened as streams at one time. Check that all files have the same
- size (53 bytes).
-
-
- It is possible to avoid all of the re-compiling if you do not want more
- than 128 handles. To do this you must edit "close.c" from this package
- and #define MAX_FD 128 This will ensure that a handle can never have
- a value greater than 127 and can therefore be represented as an unsigned
- char. If you want to do this then skip step (1) above and look at the
- patch in step (2) above and change the value to 123 (=128-5-3+3) instead.
- You will need to re-compile "getdtabl.c" and replace the resulting .o
- module in the libraries.
-
-
-
-
- 30th March 1992
-
- W. Metzenthen
- apm233m@vaxc.cc.monash.edu.au
-