Category : Files from Magazines
Archive   : CUJ0894.ZIP
Filename : ISXLONG.C
// isxlong -- istream::operator>>(long&)
#include
#include
#include
istream& istream::operator>>(long& lo)
{ // extract a long
_TRY_IO_BEGIN
if (!ipfx())
setstate(failbit);
else
{ // gather characters and convert
char ac[_MAX_INT_DIG];
char *ep;
errno = 0;
const long x = strtol(ac, &ep, _Getifld(ac));
if (ep == ac || errno != 0)
setstate(failbit);
else
lo = x;
}
isfx();
_CATCH_IO_END
return (*this);
}
Very nice! Thank you for this wonderful archive. I wonder why I found it only now. Long live the BBS file archives!
This is so awesome! 😀 I’d be cool if you could download an entire archive of this at once, though.
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/