Opening more than 20 files
Kevin D. Quitt
kdq at demott.COM
Wed Mar 14 08:59:27 AEST 1990
Apropos previous questions about opening more than 20 files. Using
Microsoft C 5.1, the following technique works:
Modify CRT0DAT.ASM to increase the number of files that can be "open"ed.
_NFILE_ = 40 ; If you want 40 open files.
Modify _FILE.C to increase the number of files than can be "fopen"ed
#define _NFILE_ 40 /* If you want 40 fopen files */
Note that the number in CRT0DAT.ASM must be greater or equal to the
number in _FILE.C.
Finally, modify your CONFIG.SYS to reflect the new count:
FILES=40
This does not increase the number of files that can be opened by a
single process, however. To do this, look in CRT0DAT.ASM for the
comment: "Increase file handle count" and uncomment the code immediately
following it.
; mov ah,67h
; mov bx,_NFILE_
; callos
Now compile/assemble the modules and either link with them
explicitly, or replace them into your libraries.
Good Luck!
kdq
--
Kevin D. Quitt Manager, Software Development
DeMott Electronics Co. VOICE (818) 988-4975
14707 Keswick St. FAX (818) 997-1190
Van Nuys, CA 91405-1266 MODEM (818) 997-4496 Telebit PEP last
34 12 N 118 27 W srhqla!demott!kdq kdq at demott.com
"Next time, Jack, write a God-damned memo!" - Jack Ryan - Hunt for Red Oct.
More information about the Comp.lang.c
mailing list