per@philabs.UUCP (Paul Rutter) (09/01/85)
I have two troubles with I/O using the Megamax 2.1 C compiler: 1) buffering on disk files: after using "freopen(,,stdout)", the last block of a disk file is not written out on program exit. Calling "exit(0)" does not help. Calling "fflush(stdout)" does it, but this was not necessary with the previous version of Megamax C, and in theory all open files are flushed and closed on exit. 2) Serial ports I get a bomb (and the great pleasure of reloading my RAM disk) when trying to read from ".Ain" or ".Bin". This occurs no matter whether the devices are opened with fopen or open, whether in "r+" or "br+" mode. Does anybody have a ver 2.1 program fragment which opens the serial port and reads from it? thanx philabs!per