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

 
Output of file : ISTRLDBL.CXX contained in archive : VCCRT1.ZIP
/***
* istrldbl.cxx - definitions for istream class operator>>(long double) funct
*
* Copyright (c) 1991-1992, Microsoft Corporation. All rights reserved.
*
*Purpose:
* Definitions of operator>>(long double) member function for istream
* class.
* [AT&T C++]
*
*******************************************************************************/

#include
#include
#include
#pragma hdrstop

#pragma check_stack(on) // large buffer(s)

// CONSIDER: validate this maximum length
#define MAXLDBLSIZ 32

istream& istream::operator>>(long double& n)
{
_WINSTATIC char ibuffer[MAXLDBLSIZ];
char ** endptr = (char**)NULL;
if (ipfx(0))
{
if (getdouble(ibuffer, MAXLDBLSIZ)>0)
{
n = _strtold(ibuffer, endptr);
#if 0
if (**endptr)
{
//UNDONE: put back any unread characters, if possible
}
#endif
}
isfx();
}
return *this;
}


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