[med-svn] [SCM] aghermann branch, master, updated. 9c95ea59282c4fc6ef7eb192072500f9d0659fc3
Andrei Zavada
johnhommer at gmail.com
Tue Jan 8 00:24:52 UTC 2013
The following commit has been merged in the master branch:
commit 92fa7271415c2a70d40216181cd0849650e95614
Author: Andrei Zavada <johnhommer at gmail.com>
Date: Sun Jan 6 03:04:13 2013 +0200
consider physical_range of type double
diff --git a/src/libsigfile/edf.cc b/src/libsigfile/edf.cc
index 301b8b0..906f883 100644
--- a/src/libsigfile/edf.cc
+++ b/src/libsigfile/edf.cc
@@ -300,7 +300,7 @@ CEDFFile (const char *fname_, int flags_,
void
sigfile::CEDFFile::SSignal::
-set_physical_range( float m, float M)
+set_physical_range( double m, double M)
{
strncpy( header.physical_min, agh::str::pad( to_string( physical_min = m), 8).c_str(), 8);
strncpy( header.physical_max, agh::str::pad( to_string( physical_max = M), 8).c_str(), 8);
@@ -616,7 +616,7 @@ _parse_header()
for ( auto &H : channels ) {
_get_next_field( H.header.physical_min, 8);
- if ( sscanf( H.header.physical_min, "%8g",
+ if ( sscanf( H.header.physical_min, "%8lg",
&H.physical_min) != 1 ) {
_status |= bad_numfld;
if ( not (flags() & no_field_consistency_check) )
@@ -625,7 +625,7 @@ _parse_header()
}
for ( auto &H : channels ) {
_get_next_field( H.header.physical_max, 8);
- if ( sscanf( H.header.physical_max, "%8g",
+ if ( sscanf( H.header.physical_max, "%8lg",
&H.physical_max) != 1 ) {
_status |= bad_numfld;
if ( not (flags() & no_field_consistency_check) )
diff --git a/src/libsigfile/edf.hh b/src/libsigfile/edf.hh
index 436055e..8e7e704 100644
--- a/src/libsigfile/edf.hh
+++ b/src/libsigfile/edf.hh
@@ -473,10 +473,10 @@ class CEDFFile
int digital_min,
digital_max;
- float physical_min,
+ double physical_min,
physical_max,
scale;
- void set_physical_range( float, float);
+ void set_physical_range( double, double);
void set_digital_range( int16_t, int16_t);
size_t samples_per_record;
--
Sleep experiment manager
More information about the debian-med-commit
mailing list