Brian_Borchers%RPI-MTS.Mailnet@MIT-MULTICS.ARPA (08/12/84)
Does anyone out there have a good understanding of the Lattice C library routines? In particular, I'm trying to figure out the relationship, (If any), between the file handles returned by open(), and DOS 2.0 handles.
guido@mcvax.UUCP (Guido van Rossum) (08/27/84)
Careful reading of the files stdio.h, ios1.h and main.c, provided with the Lattice distribution (2.04), show that (for DOS 2.0) there is a table, to be declared as struct UFB _ufbs[]; which is indexed with the "unix" file handle (the number returned by fileno(f)). Each entry contains a field named ufbfh which contains the DOS file handle, as I understand it (I never tried this out). So the following would give the DOS file handle of f, declared as FILE *f: _ufbs[fileno(f)].ufbfh You must #include <stdio.h> and <ios1.h> (and <dos.h>?) -- Guido van Rossum, "Stamp Out BASIC" Committee, CWI, Amsterdam guido @ mcvax