Path: utzoo!utgpu!water!watmath!clyde!att!osu-cis!tut.cis.ohio-state.edu!bloom-beacon!mit-eddie!ll-xn!ames!pasteur!ucbvax!hplabs!hpda!hpcuhb!hpindda!mintz From: mintz@hpindda.HP.COM (Ken Mintz) Newsgroups: comp.sys.ibm.pc Subject: RFC: DOS/LatticeC defects? Message-ID: <4330078@hpindda.HP.COM> Date: 8 May 88 23:42:47 GMT Organization: HP Technical Networks, Cupertino, Calif. Lines: 29 While doing my 1st DOS program in many years, I may have stumbled onto 2 defects. Can someone confirm my observations and perhaps tell me if these have since been fixed in updates? (My versions are VERY old.) (1) It appears that DOS (or the Lattice C library) echos stdin to stdout, even if they're both redirected. In my case, stdin was redirected from a disk file, and stdout was redirected to the printer. Is there a straight-forward way to avoid this? I worked around it by opening the disk file explicitly, but I prefer to write filters which can operate on either stdin or a disk file. (2) It appears that the "b" option of fopen() in the Lattice C library does not work, or at least is ignored by putc(). When I give putc() a \012 (LF), it appears to be translated to a \015 (CR). (My file was lpt1:.) This problem is not apparent if I open() the file with O_RAW and use write(). By the way, does anyone know what the Lattice C library (or DOS) wants to see from the keyboard for EOF? ^D doesn't do it. A pointer to where this is documented would be appreciated. Thanks in advance. Ken Mintz