home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1994 October / usenetsourcesnewsgroupsinfomagicoctober1994disk2.iso / unix / volume3 / modula_pp / InOut.c next >
C/C++ Source or Header  |  1986-11-30  |  357b  |  39 lines

  1. #include    <stdio.h>
  2.  
  3. int InOut_Done    = 0;
  4.  
  5. InOut__init()
  6. {
  7.     InOut_Done = 0;
  8. }
  9.  
  10. InOut_Read(c)
  11.     char    *c;
  12. {
  13.     register char    ch;
  14.  
  15.     if ((ch = getchar()) == EOF)
  16.         InOut_Done = 1;
  17.     else
  18.         *c = ch & 0177;
  19. }
  20.  
  21. InOut_Write(c)
  22.     char    c;
  23. {
  24.     putchar(c);
  25. }
  26.  
  27. InOut_WriteLn()
  28. {
  29.     putchar('\n');
  30. }
  31.  
  32. InOut_WriteString(s, l)
  33.     char    *s;
  34.     int    l;
  35. {
  36.     while (l-- > 0)
  37.         putchar(*s++);
  38. }
  39.