Commit fcd2c942 authored by thomas.forbriger's avatar thomas.forbriger Committed by thomas.forbriger
Browse files

STAT and DAST reading code should now be robust in absence of flag characters

This is a legacy commit from before 2015-03-01.
It may be incomplete as well as inconsistent.
See COPYING.legacy and README.history for details.


SVN Path:     http://gpitrsvn.gpi.uni-karlsruhe.de/repos/TFSoftware/trunk
SVN Revision: 1492
SVN UUID:     67feda4a-a26e-11df-9d6e-31afc202ad0c
parent 7600395e
......@@ -3,7 +3,7 @@
*
* ----------------------------------------------------------------------------
*
* $Id: sffxx.cc,v 1.7 2003-12-30 17:18:53 tforb Exp $
* $Id: sffxx.cc,v 1.8 2004-02-23 14:36:59 tforb Exp $
* \author Thomas Forbriger
* \date 21/12/2003
*
......@@ -13,14 +13,17 @@
*
* REVISIONS and CHANGES
* - 21/12/2003 V1.0 Thomas Forbriger
* - 23/02/2004 V1.1 changed DAST and STAT reading code
* there are not necessarily any flag characters
*
* ============================================================================
*/
#define TF_SFFXX_CC_VERSION \
"TF_SFFXX_CC V1.0 "
#define TF_SFFXX_CC_CVSID \
"$Id: sffxx.cc,v 1.7 2003-12-30 17:18:53 tforb Exp $"
"$Id: sffxx.cc,v 1.8 2004-02-23 14:36:59 tforb Exp $"
#include<sstream>
#include <sffxx.h>
#include <gsexx.h>
......@@ -108,8 +111,14 @@ namespace sff {
return(retval);
} // STAT::line()
void STAT::read(std::istream& is)
void STAT::read(std::istream& fis)
{
std::string theline("");
const int bufsize=81;
char inputline[bufsize];
fis.getline(inputline,bufsize);
theline=inputline;
std::istringstream is(inputline);
std::string lineID;
is >> lineID;
if (!helper::IDmatch<STAT>(lineID)) throw
......@@ -215,8 +224,14 @@ namespace sff {
return(retval);
} // DAST::line()
void DAST::read(std::istream& is)
void DAST::read(std::istream& fis)
{
std::string theline("");
const int bufsize=81;
char inputline[bufsize];
fis.getline(inputline,bufsize);
theline=inputline;
std::istringstream is(inputline);
std::string lineID;
is >> lineID;
if (!helper::IDmatch<DAST>(lineID)) throw
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment