nather@ut-sally.UUCP (Ed Nather) (09/15/87)
I'm trying to write a C program for the IBM PC that will accept output from a pipe via "stdin" and still wait for keyboard characters at the proper spot in the program. I've tried several things, including direct DOS system calls, all without success. Characters from the stdin stream are accepted as keyboard characters, and the desired pause doesn't happen. The closest I came was this: open "con" as an input stream separate from stdin accept input from that stream as keyboard input This worked, except that the input was buffered; to be useful, the keyboard input must be unechoed and unbuffered. Using Microsoft C 4.0, I tried to insist, via setvbuf(), that the "con" stream be treated as unbuffered, but that was ignored. If anybody can tell me, via e-mail, how to do this, I'd be very grateful. Ed Nather Astronomy Dept, U of Texas @ Austin {allegra,ihnp4}!{noao,ut-sally}!utastro!nather nather@astro.AS.UTEXAS.EDU -- Ed Nather Astronomy Dept, U of Texas @ Austin {allegra,ihnp4}!{noao,ut-sally}!utastro!nather nather@astro.AS.UTEXAS.EDU