home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 22 gnu / 22-gnu.zip / spmio10.zip / gcc2 / pmio / test5.cc < prev    next >
C/C++ Source or Header  |  1994-08-28  |  424b  |  24 lines

  1. /*
  2.  * Demonstration of basic pmio stdin facilities.
  3.  */
  4.  
  5. #include <stdio.h>
  6. #include <string.h>
  7. #include <pmio.h>
  8.  
  9. int main ()
  10. {
  11.   start_pmio ();
  12.   set_cursor_color (RED);
  13.   printf ("Hello, world!\n");
  14.   char buf[1024];
  15.   do
  16.     {
  17.       printf ("type exit to quit > ");
  18.       fgets (buf, sizeof (buf), stdin);
  19.       printf ("You typed: %s", buf);
  20.     }
  21.   while (strcmp ("exit\n", buf));
  22.   return 0;
  23. }
  24.