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

allow reading of 1.09 files

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: 2013
SVN UUID:     67feda4a-a26e-11df-9d6e-31afc202ad0c
parent 410ba009
......@@ -3,7 +3,7 @@
*
* ----------------------------------------------------------------------------
*
* $Id: sffxx.cc,v 1.18 2005-03-15 18:17:44 tforb Exp $
* $Id: sffxx.cc,v 1.19 2006-03-27 10:48:58 tforb Exp $
* \author Thomas Forbriger
* \date 21/12/2003
*
......@@ -25,13 +25,15 @@
* whitespace
* - added some debug output
* - check SFF file type version to be at least 1.10
* - 27/03/2006 V1.6 allow reading of V1.09 files
* introduced sff::STAT::decode_libversion
*
* ============================================================================
*/
#define TF_SFFXX_CC_VERSION \
"TF_SFFXX_CC V1.5"
"TF_SFFXX_CC V1.6"
#define TF_SFFXX_CC_CVSID \
"$Id: sffxx.cc,v 1.18 2005-03-15 18:17:44 tforb Exp $"
"$Id: sffxx.cc,v 1.19 2006-03-27 10:48:58 tforb Exp $"
#include<sstream>
#include <sffxx.h>
......@@ -47,7 +49,10 @@ namespace sff {
} // namespace helper
//! Fortran library version (to ensure compatibility)
//! library writes version 1.10
const double STAT::libversion=1.10;
//! library decodes version 1.09
const double STAT::decode_libversion=1.09;
const char* const STAT::LINEID="STAT";
const char* const FREE::LINEID="FREE";
const char* const SRCE::LINEID="SRCE";
......@@ -89,6 +94,8 @@ namespace sff {
* It contains the version of the library that wrote the file,
* a timestamp and flags indicating the presence of optional elements lika a
* FREE block or an SRCE line.
*
* 27/3/2006: Allow reading of version 1.09 files.
*/
STAT::STAT(): hasfree(false), hassrce(false)
{ setstamp(libtime::now()); }
......@@ -141,7 +148,7 @@ namespace sff {
throw
GSE2::Terror("ERROR (STAT::read): file library version too large!");
}
if (inlibversion<1.10)
if (inlibversion<STAT::decode_libversion)
{
throw
GSE2::Terror("ERROR (STAT::read): incompatible SFF version!");
......
......@@ -3,7 +3,7 @@
*
* ----------------------------------------------------------------------------
*
* $Id: sffxx.h,v 1.24 2005-07-21 07:40:17 tforb Exp $
* $Id: sffxx.h,v 1.25 2006-03-27 10:48:58 tforb Exp $
* \author Thomas Forbriger
* \date 21/12/2003
*
......@@ -20,6 +20,7 @@
* - FileHeader modification functions
* - TraceHeader modification functions
* - 23/12/2004 V1.3 added full block append to FREE
* - 27/03/2006 V1.4 introduced sff::STAT::decode_libversion
*
* ============================================================================
*/
......@@ -28,9 +29,9 @@
#ifndef TF_SFFXX_H_VERSION
#define TF_SFFXX_H_VERSION \
"TF_SFFXX_H V1.3"
"TF_SFFXX_H V1.4"
#define TF_SFFXX_H_CVSID \
"$Id: sffxx.h,v 1.24 2005-07-21 07:40:17 tforb Exp $"
"$Id: sffxx.h,v 1.25 2006-03-27 10:48:58 tforb Exp $"
#include<string>
#include<cmath>
......@@ -82,6 +83,7 @@ namespace sff {
struct STAT {
static const double libversion;
static const double decode_libversion;
static const char* const LINEID;
STAT();
STAT(std::istream& is, const bool& debug=false) { read(is, debug); }
......
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