home *** CD-ROM | disk | FTP | other *** search
/ Microsoft Programmer's Library 1.3 / Microsoft-Programers-Library-v1.3.iso / sampcode / os2sdk / os2sdk12 / pipes / pc.c next >
Encoding:
C/C++ Source or Header  |  1989-11-20  |  469 b   |  26 lines

  1. /*
  2.  * Child program for pipes example. This program
  3.  * is a filter which transliterates lower case
  4.  * characters into upper case and passes others
  5.  * through unchanged.
  6.  *
  7.  * Created by Microsoft Corp. 1987
  8.  */
  9.  
  10. #define INCL_DOSPROCESS
  11.  
  12. #include <os2def.h>
  13. #include <bsedos.h>
  14. #include <stdio.h>
  15.  
  16. main()
  17. {
  18.     int c;
  19.  
  20.     while((c = getchar()) != EOF)
  21.         putchar(toupper(c));
  22.     printf("Child saw an EOF\n");
  23.     fflush(stdout);
  24.     DosExit(EXIT_THREAD,0);
  25. }
  26.