[libmseed] 03/05: New upstream version 2.19.5
Pierre Duperray
zulu-guest at moszumanska.debian.org
Sat Nov 18 19:53:54 UTC 2017
This is an automated email from the git hooks/post-receive script.
zulu-guest pushed a commit to branch master
in repository libmseed.
commit 05147581cd315686b0ec25ef8dba3155a6ee4f13
Author: Pierre Duperray <pierreduperray at free.fr>
Date: Fri Nov 3 13:36:05 2017 +0100
New upstream version 2.19.5
---
ChangeLog | 7 +++++++
README.md | 2 ++
doc/ms_time.3 | 4 ++++
libmseed.def | 1 +
libmseed.h | 4 ++--
msrutils.c | 12 ++++++++++--
unpackdata.c | 8 ++++----
7 files changed, 30 insertions(+), 8 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 8c766f1..7f8e09d 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2017.283: 2.19.5
+ - msr_endtime(): calculate correct end time during a leap second.
+ - Fixed signedness comparison warning.
+
+2017.125:
+ - Export LM_SIZEOF_OFF_T on Windows via libmseed.def.
+
2017.118: 2.19.4
- Add global LM_SIZEOF_OFF_T variable that is set to the size of
the off_t data type as determined at compile time.
diff --git a/README.md b/README.md
index 1a7cb33..7324df4 100644
--- a/README.md
+++ b/README.md
@@ -56,3 +56,5 @@ in the ChangeLog.
This library also uses code bits published in the public domain and
acknowledgement is included in the code whenever possible.
+
+With software provided by http://2038bug.com/ (site offline, checked Oct. 2017)
diff --git a/doc/ms_time.3 b/doc/ms_time.3
index 5c5c367..d9d1c63 100644
--- a/doc/ms_time.3
+++ b/doc/ms_time.3
@@ -191,6 +191,10 @@ values.
A special value defined as HPTERROR in libmseed.h is used to represent
errors for routines returning hptime.
+.SH ACKNOWLEDGEMENTS
+
+With software provided by http://2038bug.com/ (site offline, checked Oct. 2017)
+
.SH AUTHOR
.nf
Chad Trabant
diff --git a/libmseed.def b/libmseed.def
index f415164..4be57c3 100644
--- a/libmseed.def
+++ b/libmseed.def
@@ -102,3 +102,4 @@ EXPORTS
ms_gswap2a
ms_gswap4a
ms_gswap8a
+ LM_SIZEOF_OFF_T
diff --git a/libmseed.h b/libmseed.h
index 87adb84..f708dc0 100644
--- a/libmseed.h
+++ b/libmseed.h
@@ -28,8 +28,8 @@
extern "C" {
#endif
-#define LIBMSEED_VERSION "2.19.4"
-#define LIBMSEED_RELEASE "2017.118"
+#define LIBMSEED_VERSION "2.19.5"
+#define LIBMSEED_RELEASE "2017.283"
/* C99 standard headers */
#include <stdlib.h>
diff --git a/msrutils.c b/msrutils.c
index 314f02d..76a66ff 100644
--- a/msrutils.c
+++ b/msrutils.c
@@ -7,7 +7,7 @@
* ORFEUS/EC-Project MEREDIAN
* IRIS Data Management Center
*
- * modified: 2016.286
+ * modified: 2016.283
***************************************************************************/
#include <stdio.h>
@@ -571,6 +571,14 @@ msr_starttime_uc (MSRecord *msr)
* actual last sample time and *not* the time "covered" by the last
* sample.
*
+ * On the epoch time scale the value of a leap second is the same as
+ * the second following the leap second, without external information
+ * the values are ambiguous.
+ *
+ * Leap second handling: when a record completely contains a leap
+ * second, starts before and ends after, the calculated end time will
+ * be adjusted (reduced) by one second.
+ *
* Returns the time of the last sample as a high precision epoch time
* on success and HPTERROR on error.
***************************************************************************/
@@ -592,7 +600,7 @@ msr_endtime (MSRecord *msr)
while (lslist)
{
if (lslist->leapsecond > msr->starttime &&
- lslist->leapsecond < (msr->starttime + span))
+ lslist->leapsecond <= (msr->starttime + span - HPTMODULUS))
{
span -= HPTMODULUS;
break;
diff --git a/unpackdata.c b/unpackdata.c
index 3ef84a2..24d30ff 100644
--- a/unpackdata.c
+++ b/unpackdata.c
@@ -3,7 +3,7 @@
* STEIM2, GEOSCOPE (24bit and gain ranged), CDSN, SRO and DWWSSN
* encoded data.
*
- * modified: 2017.053
+ * modified: 2017.283
************************************************************************/
#include <memory.h>
@@ -628,7 +628,7 @@ msr_decode_geoscope (char *input, int samplecount, float *output,
mantissa = sample32.i;
/* Take 2's complement for mantissa for overflow */
- if (mantissa > MAX24)
+ if ((unsigned long)mantissa > MAX24)
mantissa -= 2 * (MAX24 + 1);
/* Store */
@@ -851,7 +851,7 @@ msr_decode_sro (int16_t *input, int samplecount, int32_t *output,
gainrange = (sint & SRO_GAINRANGE_MASK) >> SRO_SHIFT;
/* Take 2's complement for mantissa */
- if (mantissa > MAX12)
+ if ((unsigned long)mantissa > MAX12)
mantissa -= 2 * (MAX12 + 1);
/* Calculate exponent, SRO exponent = 0..10 */
@@ -902,7 +902,7 @@ msr_decode_dwwssn (int16_t *input, int samplecount, int32_t *output,
sample = (int32_t)sint;
/* Take 2's complement for sample */
- if (sample > MAX16)
+ if ((unsigned long)sample > MAX16)
sample -= 2 * (MAX16 + 1);
/* Save sample in output array */
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-science/packages/libmseed.git
More information about the debian-science-commits
mailing list