Category : Files from Magazines
Archive   : CUJ0894.ZIP
Filename : ESXSTREM.C

 
Output of file : ESXSTREM.C contained in archive : CUJ0894.ZIP
-------------------------- Listing 5: streambuf extractor ---------

// isxstream -- istream::operator>>(streambuf&)
#include

istream& istream::operator>>(streambuf& sb)
{ // extract into streambuf
_Bool copied = 0;
_TRY_IO_BEGIN
if (ipfx())
{ // copy characters until failure
char buf[512];
int n;
for (; 0 < (n = rdbuf()->sgetn(buf, sizeof (buf)));
copied = 1)
_TRY_BEGIN
if (sb.sputn(buf, n) != n)
break;
_CATCH_ALL
break;
_CATCH_END
}
if (!copied)
setstate(failbit);
isfx();
_CATCH_IO_END
return (*this);
}


  3 Responses to “Category : Files from Magazines
Archive   : CUJ0894.ZIP
Filename : ESXSTREM.C

  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/