home *** CD-ROM | disk | FTP | other *** search
/ Collection of Internet / Collection of Internet.iso / msdos / lynx / source / doslynx / inc / capstdio.h < prev    next >
Encoding:
C/C++ Source or Header  |  1994-10-25  |  1.8 KB  |  89 lines

  1. #ifndef __CAPSTDIO_H
  2. /*
  3.  *    Avoid include redundancy
  4.  */
  5. #define __CAPSTDIO_H
  6.  
  7. /*
  8.  *    Copyright (c) 1994, University of Kansas, All Rights Reserved
  9.  *
  10.  *    Include File:    capstdio.h
  11.  *    Purpose:    Capture function writing to stdout, stderr, and
  12.  *            redirect their output into a window.
  13.  *    Remarks/Portability/Dependencies/Restrictions:
  14.  *        All functions used to write to the streams stdout and stderr
  15.  *        should be written here to capture the output.
  16.  *        This header files should be included in all source using the
  17.  *        functions that will need to be captured.
  18.  *    Revision History:
  19.  *        01-08-94    created
  20.  */
  21.  
  22. /*
  23.  *    Constant defines
  24.  */
  25. #include<stdio.h>
  26. #define    fprintf    capfprintf
  27. #define fputs    capfputs
  28. #define fwrite    capfwrite
  29. #define perror    capperror
  30. #define printf    capprintf
  31. #ifdef putc
  32. #undef putc
  33. #endif /* putc */
  34. #define putc    capputc
  35.  
  36. #ifdef WATTCP
  37. /*
  38.  *     We are using the wattcp libraries.
  39.  *    Capture their assembly output functions.
  40.  */
  41. #define outs    capouts
  42. #define outch    capoutch
  43. #define outhex    capouthex
  44. #endif /* WATTCP */
  45.  
  46. /*
  47.  *    Required includes
  48.  */
  49.  
  50. /*
  51.  *    Function declarations
  52.  */
  53. #ifdef __cplusplus
  54. extern "C"    {
  55. #endif /* __cplusplus */
  56.  
  57. int capfprintf(FILE *Fp_stream, const char *cp_format, ...);
  58. int capfputs(const char *cp_s, FILE *Fp_stream);
  59. size_t capfwrite(const void *vp, size_t st_size, size_t st_n, FILE *Fp_stream);
  60. void capperror(const char *cp_s);
  61. int capprintf(const char *cp_format, ...);
  62. int capputc(int c, FILE *Fp_stream);
  63.  
  64. /*
  65.  *    Actually found in TCapture.cpp
  66.  */
  67. void cap_stdout(const char *);
  68. void cap_stderr(const char *);
  69.  
  70. #ifdef WATTCP
  71. void capoutch(char c);
  72. void capouts(char *cp);
  73. void capouthex(char c);
  74. #endif /* WATTCP */
  75.  
  76. #ifdef __cplusplus
  77. }
  78. #endif /* __cplusplus */
  79.  
  80. /*
  81.  *    Global variable declarations
  82.  */
  83.  
  84. /*
  85.  *    Macros
  86.  */
  87.  
  88. #endif /* __CAPSTDIO_H */
  89.