home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / stl453up.zip / stl453fx / stlport / cstdio < prev    next >
Text File  |  2002-04-29  |  4KB  |  131 lines

  1. /*
  2.  * Copyright (c) 1999 
  3.  * Boris Fomitchev
  4.  *
  5.  * This material is provided "as is", with absolutely no warranty expressed
  6.  * or implied. Any use is at your own risk.
  7.  *
  8.  * Permission to use or copy this software for any purpose is hereby granted 
  9.  * without fee, provided the above notices are retained on all copies.
  10.  * Permission to modify the code and to distribute modified code is granted,
  11.  * provided the above notices are retained, and a notice that the code was
  12.  * modified is included with the above copyright notice.
  13.  *
  14.  */
  15.  
  16. #ifndef _STLP_CSTDIO
  17. # define _STLP_CSTDIO
  18.  
  19. # ifndef _STLP_OUTERMOST_HEADER_ID
  20. #  define _STLP_OUTERMOST_HEADER_ID 15
  21. #  include <stl/_prolog.h>
  22. # endif
  23.  
  24. #ifdef __Lynx__
  25. #  include _STLP_NATIVE_C_HEADER(stdarg.h)
  26. #endif
  27.  
  28. # if defined (_STLP_USE_NEW_C_HEADERS)
  29. #  include _STLP_NATIVE_CPP_C_HEADER(cstdio)
  30. # else
  31. #  include _STLP_NATIVE_C_HEADER(stdio.h)
  32. # endif
  33.  
  34. # ifdef __MWERKS__
  35. #  undef stdin
  36. #  undef stdout
  37. #  undef stderr
  38. #  define stdin      (&_STLP_VENDOR_CSTD::__files[0])
  39. #  define stdout    (&_STLP_VENDOR_CSTD::__files[1])
  40. #  define stderr    (&_STLP_VENDOR_CSTD::__files[2])
  41. # endif
  42.  
  43. #  if defined (_STLP_MSVC) || defined (__ICL)
  44. inline
  45. int vsnprintf(char *s1, size_t n, const char *s2, va_list v)
  46. {
  47.     return _STLP_VENDOR_CSTD::_vsnprintf(s1, n, s2, v);
  48. }
  49. #  endif
  50.  
  51. # ifdef _STLP_IMPORT_VENDOR_CSTD 
  52. _STLP_BEGIN_NAMESPACE
  53. using _STLP_VENDOR_CSTD::FILE;
  54. using _STLP_VENDOR_CSTD::fpos_t;
  55. using _STLP_VENDOR_CSTD::size_t;
  56.  
  57. # if !defined(__amigaos__)
  58. // undef obsolete macros
  59. # undef putc
  60. # undef getc
  61. # undef getchar
  62. # undef putchar
  63. # undef feof
  64. # undef ferror
  65. # endif
  66.  
  67. #  ifndef _STLP_NO_CSTD_FUNCTION_IMPORTS
  68. using _STLP_VENDOR_CSTD::clearerr;
  69. using _STLP_VENDOR_CSTD::fclose;
  70. using _STLP_VENDOR_CSTD::feof;
  71. using _STLP_VENDOR_CSTD::ferror;
  72. using _STLP_VENDOR_CSTD::fflush;
  73. using _STLP_VENDOR_CSTD::fgetc;
  74. using _STLP_VENDOR_CSTD::fgetpos;
  75. using _STLP_VENDOR_CSTD::fgets;
  76. using _STLP_VENDOR_CSTD::fopen;
  77. using _STLP_VENDOR_CSTD::fprintf;
  78. using _STLP_VENDOR_CSTD::fputc;
  79. using _STLP_VENDOR_CSTD::fputs;
  80. using _STLP_VENDOR_CSTD::fread;
  81. using _STLP_VENDOR_CSTD::freopen;
  82. using _STLP_VENDOR_CSTD::fscanf;
  83. using _STLP_VENDOR_CSTD::fseek;
  84. using _STLP_VENDOR_CSTD::fsetpos;
  85. using _STLP_VENDOR_CSTD::ftell;
  86. using _STLP_VENDOR_CSTD::fwrite;
  87.  
  88. #   if  ( !( defined (__IBMCPP__) && (__IBMCPP__ >= 500) )  )
  89.  using _STLP_VENDOR_CSTD::getc;
  90.  using _STLP_VENDOR_CSTD::getchar;
  91.  using _STLP_VENDOR_CSTD::putc;
  92.  using _STLP_VENDOR_CSTD::putchar;
  93. #   endif
  94.  
  95. using _STLP_VENDOR_CSTD::gets;
  96. using _STLP_VENDOR_CSTD::perror;
  97. using _STLP_VENDOR_CSTD::printf;
  98. using _STLP_VENDOR_CSTD::puts;
  99. using _STLP_VENDOR_CSTD::remove;
  100. using _STLP_VENDOR_CSTD::rename;
  101. using _STLP_VENDOR_CSTD::rewind;
  102. using _STLP_VENDOR_CSTD::scanf;
  103. using _STLP_VENDOR_CSTD::setbuf;
  104. using _STLP_VENDOR_CSTD::setvbuf;
  105. using _STLP_VENDOR_CSTD::sprintf;
  106. using _STLP_VENDOR_CSTD::sscanf;
  107. using _STLP_VENDOR_CSTD::tmpfile;
  108. using _STLP_VENDOR_CSTD::tmpnam;
  109. using _STLP_VENDOR_CSTD::ungetc;
  110. using _STLP_VENDOR_CSTD::vfprintf;
  111. using _STLP_VENDOR_CSTD::vprintf;
  112. using _STLP_VENDOR_CSTD::vsprintf;
  113. #   if (defined (__MWERKS__) || defined (_STLP_MSVC) || defined (__ICL) || \
  114. ( defined (__BORLANDC__) && __BORLANDC__ > 0x530))
  115. using _STLP_VENDOR_CSTD::vsnprintf;
  116. #   endif
  117. #  endif /* _STLP_NO_CSTD_FUNCTION_IMPORTS */
  118. _STLP_END_NAMESPACE
  119. # endif /* _STLP_IMPORT_VENDOR_CSTD */
  120.  
  121. # if (_STLP_OUTERMOST_HEADER_ID == 15)
  122. #  include <stl/_epilog.h>
  123. #  undef _STLP_OUTERMOST_HEADER_ID
  124. # endif
  125.  
  126. #endif
  127.  
  128. // Local Variables:
  129. // mode:C++
  130. // End:
  131.