Article View: comp.os.os2.programmer
Article #378What's wrong with this?
From: Andrew Jarman
Date: Tue, 21 Jul 1992 05:16
Date: Tue, 21 Jul 1992 05:16
27 lines
1518 bytes
1518 bytes
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.
--
/***************************************************************************\
| Andrew Jarman | Computer Engineering |
| jarman@bode.ee.ualberta.ca | University of Alberta, Canada |
\***************************************************************************/
Technical Details
Message-ID:
<jarman.711695763@ee.ualberta.ca>Path:
arc1-ca.pugleaf.net!sparky!uunet!zaphod.mps.ohio-state.edu!wupost!gumby!destroyer!ubc-cs!unixg.ubc.ca!kakwa.ucs.ualberta.ca!ee.ualberta.ca!jarmanShow Full Headers
Complete Article Headers
Newsgroups: comp.os.os2.programmer Path: arc1-ca.pugleaf.net!sparky!uunet!zaphod.mps.ohio-state.edu!wupost!gumby!destroyer!ubc-cs!unixg.ubc.ca!kakwa.ucs.ualberta.ca!ee.ualberta.ca!jarman From: jarman@ee.ualberta.ca (Andrew Jarman) Subject: What's wrong with this? Message-ID: <jarman.711695763@ee.ualberta.ca> Sender: news@kakwa.ucs.ualberta.ca Nntp-Posting-Host: bode.ee.ualberta.ca Organization: University Of Alberta, Edmonton Canada Date: Tue, 21 Jul 1992 05:16:03 GMT Lines: 27