home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #16 / NN_1992_16.iso / spool / comp / os / os2 / programm / 3678 next >
Encoding:
Text File  |  1992-07-20  |  1.4 KB  |  39 lines

  1. Newsgroups: comp.os.os2.programmer
  2. Path: sparky!uunet!zaphod.mps.ohio-state.edu!wupost!gumby!destroyer!ubc-cs!unixg.ubc.ca!kakwa.ucs.ualberta.ca!ee.ualberta.ca!jarman
  3. From: jarman@ee.ualberta.ca (Andrew Jarman)
  4. Subject: What's wrong with this?
  5. Message-ID: <jarman.711695763@ee.ualberta.ca>
  6. Sender: news@kakwa.ucs.ualberta.ca
  7. Nntp-Posting-Host: bode.ee.ualberta.ca
  8. Organization: University Of Alberta, Edmonton Canada
  9. Date: Tue, 21 Jul 1992 05:16:03 GMT
  10. Lines: 27
  11.  
  12. I have finally got a chance to start porting some of our work utilities
  13. to OS/2 using GCC 2.1  A lot of our programs are really simple command
  14. line utilties used for manipulating data files.  Can someone tell
  15. me what is wrong with this?  I compile and run it under gcc 2.1, no
  16. errors in the compilation.  The system does not print any output until
  17. I type in enough input first, or press ^Z, to end my input stream.
  18.  
  19. #include <stdio.h>
  20. #include <stdlib.h>
  21.  
  22. main() {
  23.     char buffer[100];
  24.  
  25.     printf("This is a test\n");
  26.     scanf("%s", buffer);
  27.     printf("Buffer = %s\n", buffer);
  28. }
  29.  
  30. Is there an ioctl statement I need to use first? This is such a basic
  31. program that I figure it MUST work.  Any ideas?
  32. Thanks.
  33.  
  34. -- 
  35. /***************************************************************************\
  36. |  Andrew Jarman                 |   Computer Engineering                   |
  37. |  jarman@bode.ee.ualberta.ca    |   University of Alberta, Canada          |
  38. \***************************************************************************/
  39.