CompuServe Messages

#stdio in Lattice C

    02-Jul-88 20:54:58
Sb: #stdio in Lattice C
Fm: JEFFREY C. DEGE 76426,211
To: All
I am trying to figure oyt programming on the Amiga. I'm using Lattice C 4.01, and I'm havin a bit of a problem. I've gotten up to chapter four in Berry's "Inside the Amiga". In his examples 4-5 and 4-6, he seems to be using stdin, etc. in ways that just don't work. In a rather round-about way, he attemps to use stdin as a File Handle for an AmigaDOS Read(). As I understand the Lattice manual, stdin is a Lattice level 2 File Pointer. FILE *stdin; not struct FileHandle *stdin; I've found a function, fdopen(), that will take a level 1 File Handle and return a level 2 File Pointer. I can't figure out how to do it the other way around. I've looked through stdio.h, and the FILE is a typedef for a pointer to a struct _iobuf. _iobuf contains info on the buffers, and an int file descriptor, which doesn't seem to be what I want. Anybody out there using Lattice C 4.0+ have any ideas?