Category : C++ Source Code
Archive   : VCCRT1.ZIP
Filename : IOSTRINI.CXX

 
Output of file : IOSTRINI.CXX contained in archive : VCCRT1.ZIP
/***
*iostrini.cxx - definition and initialization for predefined stream cout.
*
* Copyright (c) 1991-1992, Microsoft Corporation. All rights reserved.
*
*Purpose:
* Definition and initialization of and predefined iostream cout.
*
*******************************************************************************/
#include
#include
#include
#pragma hdrstop

// put contructors in special MS-specific XIFM segment
#pragma warning(disable:4074) // turn off init_seg warning
#pragma init_seg(compiler)

#if ((!defined(_WINDOWS)) || defined(_QWIN))
ostream_withassign cout(new filebuf(1));

static Iostream_init __InitCout(cout,-1);

#endif

/***
*Iostream_init::Iostream_init() - initialize predefined streams
*
*Purpose:
* For compatibility only. Not used.
*Entry:
*
*Exit:
*
*Exceptions:
*
*******************************************************************************/
Iostream_init::Iostream_init() { } // do nothing

/***
*Iostream_init::Iostream_init() - initialize predefined streams
*
*Purpose:
* Initializes predefined streams: cin, cout, cerr, clog;
*Entry:
* pstrm = cin, cout, cerr, or clog
* sflg = 1 if cerr (unit buffered)
*
*Exit:
*
*Exceptions:
*
*******************************************************************************/
Iostream_init::Iostream_init(ios& pstrm, int sflg)
{
#if ((!defined(_WINDOWS)) || defined(_QWIN))
pstrm.delbuf(1);
if (sflg>=0) // make sure not cout
pstrm.tie(&cout);
if (sflg>0)
pstrm.setf(ios::unitbuf);
#endif
}

/***
*Iostream_init::~Iostream_init() - destroy predefined streams on exit
*
*Purpose:
* Destroy predefined streams: cin, cout, cerr, clog;
*Entry:
*
*Exit:
*
*Exceptions:
*
*******************************************************************************/
Iostream_init::~Iostream_init() { } // do nothing



  3 Responses to “Category : C++ Source Code
Archive   : VCCRT1.ZIP
Filename : IOSTRINI.CXX

  1. Very nice! Thank you for this wonderful archive. I wonder why I found it only now. Long live the BBS file archives!

  2. This is so awesome! 😀 I’d be cool if you could download an entire archive of this at once, though.

  3. But one thing that puzzles me is the “mtswslnkmcjklsdlsbdmMICROSOFT” string. There is an article about it here. It is definitely worth a read: http://www.os2museum.com/wp/mtswslnk/