home *** CD-ROM | disk | FTP | other *** search
/ The C Users' Group Library 1994 August / wc-cdrom-cusersgrouplibrary-1994-08.iso / listings / v_09_03 / 9n03076a < prev    next >
Text File  |  1991-01-17  |  995b  |  51 lines

  1.  
  2. /*****************************************************/
  3. /*                                                   */
  4. /*               iolink.c                            */
  5. /*                                                   */
  6. /*           stdio tie for Turbo C/C++ Compilers     */
  7. /*                                                   */
  8. /*              Copyright (C) 1990                   */
  9. /*              Pasquale J. Villani                  */
  10. /*              All Rights Reserved                  */
  11. /*                                                   */
  12. /*****************************************************/
  13.  
  14.  
  15. #include <stdio.h>
  16.  
  17. FILE _streams[20];
  18.  
  19.  
  20. fputc(c, f)
  21. char c;
  22. FILE *f;
  23. {
  24.     return _fputc(c, f);
  25. }
  26.  
  27.  
  28. _fputc(c, f)
  29. char c;
  30. FILE *f;
  31. {
  32.     if(write(1, &c, 1) == 1)
  33.         return c;
  34.     else
  35.         return EOF;
  36. }
  37.  
  38.  
  39. _fgetc(f)
  40. FILE *f;
  41. {
  42.     char c;
  43.  
  44.     if(read(0, &c, 1) != 1)
  45.         return EOF;
  46.     else
  47.         return c;
  48. }
  49.  
  50.  
  51.