home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.os.os2.programmer
- Path: sparky!uunet!psinntp!panix!os2man
- From: os2man@panix.com (Larry Salomon Jr.)
- Subject: Re: What's wrong with this?
- Message-ID: <1992Jul22.020718.17468@panix.com>
- Date: Wed, 22 Jul 1992 02:07:18 GMT
- References: <jarman.711695763@ee.ualberta.ca>
- Organization: PANIX Public Access Unix, NYC
- Lines: 31
-
- In <jarman.711695763@ee.ualberta.ca> jarman@ee.ualberta.ca (Andrew Jarman) writes:
-
- >I have finally got a chance to start porting some of our work utilities
- >to OS/2 using GCC 2.1 A lot of our programs are really simple command
- >line utilties used for manipulating data files. Can someone tell
- >me what is wrong with this? I compile and run it under gcc 2.1, no
- >errors in the compilation. The system does not print any output until
- >I type in enough input first, or press ^Z, to end my input stream.
-
- >#include <stdio.h>
- >#include <stdlib.h>
-
- >main() {
- > char buffer[100];
-
- > printf("This is a test\n");
- > scanf("%s", buffer);
- > printf("Buffer = %s\n", buffer);
- >}
-
- >Is there an ioctl statement I need to use first? This is such a basic
- >program that I figure it MUST work. Any ideas?
- >Thanks.
-
- Insure that you set output buffering off. I believe the call is
- setbuf(stdout,NULL) .
- --
- Cheers,
- Q
- -----------------------------------------------------------------------
- "If you still choose not to decide, | "My other account is in the
-