home *** CD-ROM | disk | FTP | other *** search
/ Geek Gadgets 1 / ADE-1.bin / ade-dist / libg++-2.7.1-bin.lha / lib / g++-include / iostdio.h < prev    next >
C/C++ Source or Header  |  1996-10-12  |  3KB  |  111 lines

  1. /* 
  2. Copyright (C) 1993 Free Software Foundation
  3.  
  4. This file is part of the GNU IO Library.  This library is free
  5. software; you can redistribute it and/or modify it under the
  6. terms of the GNU General Public License as published by the
  7. Free Software Foundation; either version 2, or (at your option)
  8. any later version.
  9.  
  10. This library is distributed in the hope that it will be useful,
  11. but WITHOUT ANY WARRANTY; without even the implied warranty of
  12. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  13. GNU General Public License for more details.
  14.  
  15. You should have received a copy of the GNU General Public License
  16. along with this library; see the file COPYING.  If not, write to the Free
  17. Software Foundation, 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
  18.  
  19. As a special exception, if you link this library with files
  20. compiled with a GNU compiler to produce an executable, this does not cause
  21. the resulting executable to be covered by the GNU General Public License.
  22. This exception does not however invalidate any other reasons why
  23. the executable file might be covered by the GNU General Public License. */
  24.  
  25. /* This file defines a stdio-like environment, except that it avoid
  26.    link-time name clashes with an existing stdio.
  27.    It allows for testing the libio using stdio-using programs
  28.    with an incompatible libc.a.
  29.    It is not predantically correct - e.g. some macros are used
  30.    that may evaluate a stream argument more than once.  */
  31.  
  32. #ifndef _IOSTDIO_H
  33. #define _IOSTDIO_H
  34.  
  35. #include "iolibio.h"
  36.  
  37. typedef _IO_FILE FILE;
  38. #ifndef EOF
  39. #define EOF (-1)
  40. #endif
  41. #ifndef BUFSIZ
  42. #define BUFSIZ 1024
  43. #endif
  44.  
  45. /* #define size_t, fpos_t L_tmpname TMP_MAX */
  46.  
  47. #define _IOFBF 0 /* Fully buffered. */
  48. #define _IOLBF 1 /* Line buffered. */
  49. #define _IONBF 2 /* No buffering. */
  50.  
  51. #define SEEK_SET 0
  52. #define SEEK_CUR 1
  53. #define SEEK_END 2
  54.  
  55. #define stdin _IO_stdin
  56. #define stdout _IO_stdout
  57. #define stderr _IO_stderr
  58.  
  59. #define getc(_fp) _IO_getc(_fp)
  60. #define putc(_ch, _fp) _IO_putc(_ch, _fp)
  61.  
  62. #define clearerr _IO_clearerr
  63. #define fclose _IO_fclose
  64. #define feof _IO_feof
  65. #define ferror _IO_ferror
  66. #define fflush _IO_fflush
  67. #define fgetc(__fp) _IO_getc(_fp)
  68. #define fgetpos _IO_fgetpos
  69. #define fgets _IO_fgets
  70. #define fopen _IO_fopen
  71. #define fprintf _IO_fprintf
  72. #define fputc(_ch, _fp) _IO_putc(_ch, _fp)
  73. #define fputs _IO_fputs
  74. #define fread _IO_fread
  75. #define freopen _IO_freopen
  76. #define fscanf _IO_fscanf
  77. #define fseek _IO_fseek
  78. #define fsetpos _IO_fsetpos
  79. #define ftell _IO_ftell
  80. #define fwrite _IO_fwrite
  81. #define gets _IO_gets
  82. #define perror _IO_perror
  83. #define printf _IO_printf
  84. #define puts _IO_puts
  85. #define remove ??? __P((const char*))
  86. #define rename ??? __P((const char* _old, const char* _new))
  87. #define rewind _IO_rewind
  88. #define scanf _IO_scanf
  89. #define setbuf _IO_setbuf
  90. #define setbuffer _IO_setbuffer
  91. #define setvbuf _IO_setvbuf
  92. #define sprintf _IO_sprintf
  93. #define sscanf _IO_sscanf
  94. #define tmpfile ??? __P((void))
  95. #define tmpnam ??? __P((char*))
  96. #define ungetc _IO_ungetc
  97. #define vfprintf _IO_vfprintf
  98. #define vprintf(__fmt, __args) vfprintf(stdout, __fmt, __args)
  99. #define vsprintf _IO_vsprintf
  100.  
  101. #if !defined(__STRICT_ANSI__) || defined(_POSIX_SOURCE)
  102. #define fdopen _IO_fdopen
  103. #define fileno _IO_fileno
  104. #define popen _IO_popen
  105. #define pclose _IO_pclose
  106. #define setbuf _IO_setbuf
  107. #define setlinebuf _IO_setlinebuf
  108. #endif
  109.  
  110. #endif /* _IOSTDIO_H */
  111.