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

  1. /*
  2.  * Copyright (c) 1999
  3.  * Silicon Graphics Computer Systems, Inc.
  4.  *
  5.  * Copyright (c) 1999 
  6.  * Boris Fomitchev
  7.  *
  8.  * This material is provided "as is", with absolutely no warranty expressed
  9.  * or implied. Any use is at your own risk.
  10.  *
  11.  * Permission to use or copy this software for any purpose is hereby granted 
  12.  * without fee, provided the above notices are retained on all copies.
  13.  * Permission to modify the code and to distribute modified code is granted,
  14.  * provided the above notices are retained, and a notice that the code was
  15.  * modified is included with the above copyright notice.
  16.  *
  17.  */ 
  18.  
  19. #ifndef _STLP_IOSTREAM
  20. #define _STLP_IOSTREAM
  21.  
  22. # ifndef _STLP_OUTERMOST_HEADER_ID
  23. #  define _STLP_OUTERMOST_HEADER_ID 0x1037
  24. #  include <stl/_prolog.h>
  25. # endif
  26.  
  27. # if defined (_STLP_OWN_IOSTREAMS)
  28.  
  29. #include <stl/_iosfwd.h>
  30. #include <stl/_istream.h>
  31.  
  32. _STLP_BEGIN_NAMESPACE
  33.  
  34. #ifndef _STLP_USE_NAMESPACES
  35. // in case of SGI iostreams, we have to rename our streams not to clash with those
  36. // provided in native lib
  37. # define cin _STLP_cin
  38. # define cout _STLP_cout
  39. # define cerr _STLP_cerr
  40. # define clog _STLP_clog
  41. #endif
  42.  
  43. // Note: cin and wcin are both associated with stdio.  The C standard
  44. // (Amendment 1, section 4.6.2.1) says that it is an error to mix
  45. // wide- and narrow-oriented I/O on the same stream.  This implies
  46. // that it is an error to use both cin and wcin in the same C++
  47. // program; the same applies to cout and wcout, and cerr/clog and
  48. // wcerr/wclog.
  49.  
  50. extern _STLP_DECLSPEC istream cin;
  51. extern _STLP_DECLSPEC ostream cout;
  52. extern _STLP_DECLSPEC ostream cerr;
  53. extern _STLP_DECLSPEC ostream clog;
  54.  
  55. # ifndef _STLP_NO_WCHAR_T
  56. extern _STLP_DECLSPEC wistream wcin;
  57. extern _STLP_DECLSPEC wostream wcout;
  58. extern _STLP_DECLSPEC wostream wcerr;
  59. extern _STLP_DECLSPEC wostream wclog;
  60. # endif
  61.  
  62. # ifndef __LOCALE_INITIALIZED
  63. #  define __LOCALE_INITIALIZED
  64. // Global initializer object, to ensure initialization of locale subsystem.
  65. static ios_base::_Loc_init _LocInit;
  66. # endif
  67.  
  68. # ifndef __IOS_BASE_INITIALIZED
  69. #  define __IOS_BASE_INITIALIZED
  70. // Global initializer object, to ensure construction of static objects.
  71. static ios_base::Init _IosInit;
  72. # endif
  73.  
  74. _STLP_END_NAMESPACE
  75.  
  76. # elif defined ( _STLP_USE_NO_IOSTREAMS )
  77. #  include <stl/_null_stream.h>
  78. # else
  79.  
  80. #  include <wrap_std/iostream>
  81.  
  82. # endif /* STL_USE_NO_IOSTREAMS */
  83.  
  84. # if (_STLP_OUTERMOST_HEADER_ID == 0x1037)
  85. #  include <stl/_epilog.h>
  86. #  undef _STLP_OUTERMOST_HEADER_ID
  87. # endif
  88.  
  89. #endif /* _STLP_IOSTREAM */
  90.  
  91. // Local Variables:
  92. // mode:C++
  93. // End:
  94.