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

 
Output of file : OSTREAM1.CXX contained in archive : VCCRT1.ZIP
/***
* ostream1.cxx - definitions for ostream class non-core member functions
*
* Copyright (c) 1991-1992, Microsoft Corporation. All rights reserved.
*
*Purpose:
* Contains the non-core member function definitions for ostream class.
*
*******************************************************************************/

#include
#include
#pragma hdrstop

ostream& ostream::seekp(streampos _strmp)
{
if (bp->seekpos(_strmp, ios::out)==EOF)
state |= failbit;
return(*this);
}

ostream& ostream::seekp(streamoff _strmf, seek_dir _sd)
{
if (bp->seekoff(_strmf, _sd, ios::out)==EOF)
state |= failbit;
return(*this);
}

streampos ostream::tellp()
{
streampos retval;
if ((retval=bp->seekoff(streamoff(0), ios::cur, ios::out))==EOF)
state |= failbit;
return(retval);
}

ostream& ostream::operator<<(streambuf * instm)
{
int c;
if (opfx())
{
while ((c=instm->sbumpc())!=EOF)
if (bp->sputc(c) == EOF)
{
state |= failbit; // CONSIDER: is this redundent?
break;
}
// CONSIDER: not very efficient in many cases
osfx();
}
return *this;
}


  3 Responses to “Category : C++ Source Code
Archive   : VCCRT1.ZIP
Filename : OSTREAM1.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/