- Allow ms_readleapsecondfile() to be called multiple times, by @pn2200
- Fix compiler warning in mst_printsynclist().
- Fix memory leak (on error) in msr_duplicate() and other fixes by @pn2200.
- msr_endtime(): calculate correct end time during a leap second.
- Fixed signedness comparison warning.
- Export LM_SIZEOF_OFF_T on Windows via libmseed.def.
- Add global LM_SIZEOF_OFF_T variable that is set to the size of
the off_t data type as determined at compile time.
- Add missing public, global symbols to libmseed.map, thanks
to Elliott Sales de Andrade.
- Provide install target in Makefile thanks to by Pierre Duperray.
- Deprecate dynamic build target, the shared target will now build
shared or dynamic (Darwin) libraries depending on the system.
- Limit symbols exported in shared libraries to public interfaces
as defined in libmseed.map, thanks again to Pierre Duperray.
- Allow tests to work on Darwin with dynamic libraries.
- Derive versioning of shared/dynamic library from canonical version
defined as LIBMSEED_VERSION in libmseed.h.
- Apply updates to more standardized use of NAME and typos in man pages,
submitted by Pierre Duperray.
- Incorporate lmplatform.h details into libmseed.h for improved usage.
All that is needed is the static/shared/dynamic library and libmseed.h.
- Avoid undefined left shifts of signed values that would go out of
range and specify the types of some constants.
- Remove dependency on ntwin32.mak for Windows nmake makefiles, now
building works in plain MSVC development environments.
- Remove limitation on sample rate before calling ms_genfactmult()
in the normal path of packing records. Previously generating the
factor and multiplier was not attempted for rates higher than
- ms_genfactmult() now support a much larger range of integer
sample rates and periods.
- ms_genfactmult() now sets the factor and multiplier using the
SECONDS/SAMPLE notation for sample rates less than 1.0 to retain
precision for low rates.
- ms_genfactmult() now assumes the specified rate is a sample
period in seconds if the samprate value is negative.
- Add ms_rsqrt64() as a general use reciprocal sqrt for doubles.
- Use memcpy() instead of assignment when unpacking float32 and
float64 samples to avoid problems with NaN's. Thanks Lion Krischer.
- Add test for reading records without Blockette 1000.
- Reformat all source code using included clang-format profile.
- A more elegant sanity check for output length in packing by mbyt.
- Improvements for test suite, more consistency.
- Remove msr_decode_steim? from libmseed.def, they are internal.
- Add sanity to length check before memset calls in packing functions.
- Check for environment variables ENCODE_DEBUG and DECODE_DEBUG
and set debugging output, at this point it is Steim frame details
and differences being encoded/decoded.
- Fix padding in steim encoding routines.
- Remove unneeded output buffer checks in steim decoding routines.
- Replace data sample packing and unpacking routines from qlib2 with
new routines developed from scratch. All code is now LGPL licensed.
- Add test suite with tests for encoding, decoding, parsing, etc.
- Update licensing to GNU-LGPL version 3 and include (L)GPL licenses
- Define needed C99 int types for MSVC 2012 or earlier. Previously
this was only done for versions earlier than MSVC 2010.
- Round Fixed Section Data Header start time values to the nearest
tenth of millisecond and restrict the microsecond offset value
to a range between -50 and +49 as recommended in SEED. Previously
start times were truncated at tenths of millisecond resolution
and the microsecond offset value was between 0 and +99. This also
addresses a bug where microsecond offsets were off by 100ms for times
before Jan 1 1970. Thanks to Lion Krischer for reporting.
Note to future hackers: the definition of HPTMODULUS governing the
time tick interval for high precision time values implies that this
tick interval may be changed. In reality, this should not be changed
from the default, microsecond tick value without thorough testing.
Some logic is know to be dependent on the microsecond tick.
- Add defines for needed integer types and macros from inttypes.h
missing in older MSVC versions. MSVC 2010 and later appear to have
enough C99 support.
- Add define tests for _WIN32 and _WIN64 to cover all WINs.
- ms_fread(): Add cast to quiet warning for conversion from size_t
to int. In this case the read will always be <= MAXRECLEN, much
smaller than int, making the conversion safe.
- Update minor release version in Makefile.
- Cleanup of lmplatform.h removing unneeded headers and using C99
standard headers except for a few platform specific cases.
- Convert all printf() and scanf() usage of %lld for 64-bit integers
to use the C99 PRId64 and SCNd64 macros for portability (MinGW).
- Change detection of Linux/Cygwin to set global define LMP_LINUX
instead of LMP_GLIB2 (now marked as deprecated).
- Change detection of Windows to set global define LMP_WIN instead
of LMP_WIN32 (now marked as deprecated).
- Add detection of __MINGW64__ define.
- Tested building on Win7 with: Open Watcom 1.9, MinGW gcc 4.8.1 and
Cygwin 1.7.35 (gcc 2.9.2).
- Define NTP-Posix time epoch conversion constant specifically as
a long long integer to avoid warnings on some compilers.
- Fix infinite loop if blockette chain is corrupt. Patch submitted
by Elliott Sales de Andrade.
- Fix memory leak when msr_pack() returns after an error. Patch
contributed by Larry Baker and Eric Thomas.
- Change casting of values passed to isdigit() to int intead of
unsigned character. Apparently this was consufing on ARM archs.
- Add ms_readleapseconds() and ms_readleapsecondfile() routines to
read a leap seconds file into an internal list.
- Modify msr_endtime() to check for an internal leap second list,
check for overlap with the record and adjust the end time as needed
when leap seconds are present. When a leap second list is present
any indication of positive leap seconds in the fixed section data
header are ignored.
- Add casting to size_t and int to avoid build warnings on certain
build systems (e.g. older MS Visual Studio).
The effective maximum sample buffer and record buffer size is ~2GB.
- Clean up Makefile and example/Makefile, remove all GCC-specific and
debug targets. Makefiles are compatible with both GNU and BSD make.
As before, the shared target works only for GCC-compatible compilers.
Thanks to Elliott Sales de Andrade for pointing out that shared library
targets did not work with parallel builds, prompting this clean up.
- Support 128-byte record length by changing MINRECLEN to 128 (was 256).
The current SEED specification is a minimum record length of 256-bytes,
but there are cases (e.g. low latency data flow) using 128-byte records.
- Add declarations, casting and string truncation to clear warnings
uncovered in ObsPy testing (thanks to Elliott Sales de Andrade).
- Add __CYGWIN__ defined test to Linux section of lmplatform.h.
- Add mst_convertsamples() and mstl_convertsamples() to convert sample
types. When converting from float & double types to integer type
a simple rounding is employed to compensate for machine representation
of floating point numbers.
- msr_endtime(): Check activity flags in fixed section of data header,
if bit 4 is set then a positive leap occurred during the record and
the end time should be reduced by one second to properly match the now
shifted UTC time. As long as the next record in the series is
properly marked with the correct UTC time no artificial time tear
will be generated when reconstructing the time series.
- Update docs for transition to 64-bit sample counts done in 2011!
- Initialize internal counters in mst_pack() to avoid their use
in error conditions. Thanks to D. Ketchum and M. Potter for help.
- Add 'const' qualifier to the msfile argument of the file reading and
writing family of routines to stop compiler warnings resulting from
generated binding functions. Thanks to M. Bach for reporting.
- Add more sanity checks to msr_unpack_data() to catch bad/corrupted
data records and avoid crashes due to impossible pointer construction.
- Extend parsing of day-of-year style time strings to allow parsing
of time fields separated by dashes in addition to allowing the day
and time fields to be separated by a 'T' or space. Modifications
were made to ms_seedtimestr2hptime().
- Extend parsing of year-month-day style time strings to allow parsing
of time fields separated by commas. Modifications were made to
- Add MS_ISVALIDYEARDAY() macro to test range for year and day values,
years between 1900 and 2100 and days between 1 and 366.
- Use new macro to determine when byte swapping is needed. This test
leaves a non-determination of byte order for days 1, 256 and 257 in
the year 2056, beware future data users.
2013.007: 2.8 (again)
- Add msr_parse_selection() to libmseed.def for Windows builds.
- Fix errors in pseudo code in doc/msr_parse.3.
- Implement msr_parse_selection() which is a wrapper of msr_parse()
that searches for the first parsable miniSEED record in a memory
buffer and returns it. Optionally a Selections list may be specified
to limit the returned data to records matching specific criteria.
- Fix corruption of float sample types when opposite byte order than
host in certain architecture combinations. By not addressing
individual float samples directly as floats prior to byte swapping
we avoid the values being placed into the FPU where they may be
corrupted. Thanks to Moritz Beyreuther and Lion Krischer for discovery
- Expose the msr_unpack_data() function for use by removing the static
declaration. Change verbose flag type to match others and document.
- Fix some logging messages, typos, etc.
Add define for MINGW32 to use _fstat and _stat.
- Change record parsing code to trim trailing spaces from network,
station, location and channel parameters. Spaces in between non-space
- Update example/test.mseed to new data with an earthquake to make it
more recognizable compared to ambient noise in the previous example.
- Add many type casts to quiet newer GCC and MSVC compilers.
For 32-bit programs there are some places, mostly in packing routines,
where 64-bit integers are converted to 32-bit values for sample buffer
sizes and counts leaving the potential for overflow. This will become
a problem when byte counts for sample buffers are beyond 2^31, for
32-bit integer sample values that is more than 536 million samples.
So programmer beware if using such buffer sizes for packing miniSEED.
- When parsing records copy the ASCII string fields (sequence number,
network, station, location, channel) directly without removing spaces.
This makes the parser more lenient to unallowed characters and
synchronizes read and write capabilities.
- For sampling rates above 32,767 Hz only print a warning for high
verbosity settings and set the sample rate factor and multipler to zero.
Previously an error was printed during rational approximation.
The expectation is that a record with such a high sample rate will
include a blockette 100 to specify the actual sample rate.
This is not an official convention for SEED, but is a kludge to
support extremly high sample rates without printing errors.
- Fix conversion to doubles in examples/msrepack.c.
- Increase precision of sample rate in SYNC printing routines to
avoid trucation of rate values.
- Add '_lm' suffix to declaration of pivotal_gmtime_r_stamp in
genutils.c to avoid conflicts with other libraries. Thanks to Doug
Neuhauser for the tip.
- example/msrepack.c: add -N option to specify network code for output
- example/msrepack.c: make sure input buffer is flushed/packed, retain
good input data when the end of the file contains bad data.
- example/msrepack.c: convert samples to needed type for specified
output encoding, e.g. integers to floats.
- example/msrepack.c: do not open output file until after all options
have been parsed to avoid clobbering the output file unnecessarily.
- Update dynamic library version.
- Add notes to the users guide and intro about functions useful for
detecting and parsing records in a memory buffer.
- Correctly determine record lengths implied by presence of pack header
by avoiding record header searches in buffer beyond pack header.
- Fix ms_parse to return correct hint of how many more bytes are needed
when record length has not been determined.
- Change the samplecnt and numsamples elements of the MSRecord, MSTrace
and MSTraceSeg structures to 64-bit integers to avoid overflow.
- Allow lowercase 't' in ISO time string parsing.
- Add check for invalid blockette offset in ms_detect().
- Fix handling of sample data in internal MSTraceList routines.
- Cleanup WIN32 defines, make MSVC and Open Watcom play nicely.
- Default data byte order to big endian when blockette 1000 contains
invalid byte order value, previously defaulted to host byte order.
- Update libmseed.def to match current libmseed.h declaractions.
- Cleanup to avoid MSVC warnings.
- Do not return MS_NOTSEED when no records read from packed file.
- Update user guide to include note about MSTraceLists and change
the miniSEED creation example to use mst_writemseed().
- Fix parsing of records without blockette 1000, use pack headers
and end-of-file to determine implied record lengths.
- Fix handling of truncated records, partial reads at EOF.
- Fix offset tracking when reading from stdin.
- Add convience routines to only read selected records from a file:
- Add convience routines to write Mini-SEED data to specified file:
- Fix bug when either mst_pack() or mst_packgroup() was called with
a NULL packedsamples pointer.
- Fix bugs when (re)initializing read buffer.
- Fix return of file position in ms_readmsr_main()..
- Add internal ms_gmtime_r() to replace call to system gmtime_r(). The
internal version handles dates beyond year 2038 and avoids the system
call. Tested with years up to 5000.
- Add parseutils.c source file.
- Add msr_parse() to detect & unpack a record in a memory buffer.
- Add ms_detect() to check a memory buffer for a record.
- Rewrite ms_readmsr_main() to use msr_parse() and reduce I/O by
using a double-buffer to increase the average read size and other
simplifications and optimizations.
The internal read buffer size is MAXRECLEN as defined in libmseed.h.
Each file parameter structure used, including the global default,
will allocate a buffer of this size. For specialized applications
requiring low memory use the MAXRECLEN, current 1 MB, can be reduced.
- Change ms_readmsr_main() to interpret reclen <= 0 as a request
for autodetection of each record, a value of 0 no longer means all
records are the same length as the first record.
- Remove ms_find_reclen() function, replacement is ms_detect().
- Move ms_parse_raw() into parseutils.c.
- Change year sanity check to allow range 1800 to 5000.
- Use 64-bit values in hptime calculation to correctly handle years
- The "last" record indicator argument to the ms_readmsr() family
is considered deprecated and will probably be removed in future
releases. New programs should not use this functionality, it does
not, and will never, work in cases where there is more than
MINRECLEN padding after the last valid record in a file.
- Use gmtime_r() to avoid the non-thread-safe system gmtime() function.
- Define gmtime_r() for WIN32 and WIN64 in terms of gmtime() which is
thread-safe under WIN32.
- Add define for WIN64 even though WIN32 is probably defined for 64-bit.
- Add check for spaces as valid characters in sequence numbers.
- Add check for log parameters in ms_log_main().
- Fix small printing bug in diagnostic ms_printselections().
- Allow file name for ms_readselectionfile() to be "-" and read
stdin as a special case.
- Fix tracking of first and last MSTraceSeg entries in mstl_addmsr().
- Make the non-fatal Steim integrity failure and sample mismatch log
output print as "Warning" instead of "ERROR".
- Change ms_addselect() to take a srcname argument and create
ms_addselect_comp() as a wrapper that creates a srcname from
individual source name components.
- Fix unpacking of 16-bit integer encoded data, thanks to
- Fix special case of "--" location ID in ms_addselect().
- Add SelectTime **ppselecttime argument to ms_matchselect()
and msr_matchselect() routines so that the matching time range
can optionally be returned to the caller.
- Add a check for ATTRIBUTE_PACKED define (lmplatform.h) and
if set add an __attribute__((packed)) qualifier to all structs
that are mapped to SEED structures (and cannot be padded).
This is useful on platforms such as ARM that pad structures
for alignment by default. To use add "-DATTRIBUTE_PACKED" to
CFLAGS or equivalent.
- Fixes to gswapX() routines for platforms where structures
are padded for alignment; patch from Laurence Withers, thanks.
- Add msr_matchselect and ms_printselections() routine to
- Simplify packed file reading in ms_readmsr_main() and allow
data sections to be skipped based on a Selection list, packed
files are used internally at the IRIS DMC.
- Rename ms_readmsr_r() to ms_readmsr_main() and create a
simple wrapper function for ms_readmsr_r().
- Add selection.c containing routines to manage data selection
lists based on network, station, location, channel, quality,
start and end times. The name parameters may contain globbing
charaters for matching. External routines are: ms_addselect(),
ms_matchselect(), ms_readselectionfile() and ms_freeselections().
- Correctly track microsecond offset in Blockette 1001 when
msr_pack() creates more than one record.
- Reduce error accumulation of record start times in pack.c,
thanks to Roman Racine for the report and suggested fix.
The error only accumulated to significant values when packing
a large number of records with a single call to msr_pack().
- Change return type of internal ms_readpackinfo() to off_t and
fix small error return check.
- Add ms_splitsrcname() routine to split "NET_STA_LOC_CHAN[_QUAL]"
into separate components.
- Update MINOR_VER version to 4 anticipating the 2.4 release
(seem to have forgotten 3).
- msr_unpack(): change new blockette count and data offset
test failures to "Warning" instead of "ERROR".
- Fix record offset reporting when record length detection fails.
- Add diagnostic reporting of data problems in ms_readmsr_r()
by calling ms_parse_raw().
- Fix corner case trace sorting error in mstl_addmsr().
- Add ms_nomsamprate() to genutils.c to calculate the sample rate
specified as a SEED sample rate factor and multiplier.
- Add ms_parse_raw() implementing a simple validating parser
to report invalid header values and print raw header fields.
- msr_unpack(): add tests for blockette count and data offset.
- Change byte swapping test of year to 1920 to 2050 range.
- Store blockette offset in BlktLink structure.
- Add CDSN decoding support due to popular demand.
- Incorporate enhanced dynamic library versioning as recommended
by Laurence Withers.
- Fix bug in ASCII encoding routine, thanks again Laurence Withers.
- Add and update libmseed.def which can be used with the Win32 DLL
for linking, original file contributed by Robert Barsch.
- Improve mstl_addmsr() sorting and suturing logic so that it
matches the healed and sorted output from the trace group routines.
- Add ms_readtracelist() to read all records from a file into a
- Update all man pages with changes and add new man pages.
- Fix auto sorting of traces in mstl_addmsr().
- Add MSTraceList facility which is functionally equivalent to
the existing MSTraceGroup facility but more efficiently populated,
especially when data records are in time order or the time series
are very gappy. The MSTraceList related functions are prefixed
with "mstl_" and exist in the new source file tracelist.c.
- Add mst_printsynclist() and mstl_printsynclist() functions to
print trace segment lists in SYNC format.
- Change one call in fileutils.c to fseeko() to lmp_fseeko()
so Win32 builds work again.
- Optimize mst_findadjacent() by first testing for time segment
match, then sample rate and finally source name components.
- Allow a caller of ms_readmsr()/ms_readmsr_r() to specify a
starting offset into the file by setting the value pointed to by
the fpos argument to a negative value (interpreted as a positive
- Optimize Steim 1 & 2 encoders significantly by using small local
working buffers and eliminating many redundant calculations.
Thanks to Jean-Francois Fels.
- Add Matlab/GNU Octave interface routines, thanks to Stefan Mertl.
- Remove 'const' qualifier from argument of log printing function
pointers, too many useless compiler warnings.
- Allow data record sequence numbers to be NULL values in addition
to ASCII numbers.
- Fix string parsing error for IRIS DMC packed files, thanks Sandy!
- Use a merge sort algorithm insteam of the bubble sort previsouly
used in mst_groupsort(), better performance.
- Do raw string manipulation in msr_srcname() and mst_srcname()
instead of using sprintf(), slightly better performance.
- Do raw string comparison in mst_findmatch() for better performance.
- Include compression history for Steim encodings by tracking the
last sample value packed for each data stream. For the first
record of a stream, a cold-start, the first difference is zero.
This included the addition of a StreamState struct and associated
pointers for MSRecord and MSTrace which get allocated during packing
- Do not adjust start time of record header during packing when
sampling rate is zero or negative.
- Add ms_hptime2mdtimestr() and ms_btime2mdtimestr routines to
create time strings in month-day format, this is the same as
the ISO format without the 'T' between the date and time.
- Add a 'subsecond' flag argument to all ms_hptime2<string>
routines to control the addition of sub-second precision.
- Fix log message bug for unknown encoding format while unpacking,
this could cause certain systems to segfault if encountered.
- Rename MS_UNPACKENCODINGFORMATFALLBACK macro to
MS_UNPACKENCODINGFALLBACK to match the actual variable name.
- Fix handling of fallback encoding format in unpack.c, worked
earlier but had regressed to a broken state.
- Remove declaration for lmp_strerror() which does not exist.
- Use calloc instead of malloc to allocate and clear a fsdh_s
in msr_pack_header_raw() when none is available in the passed
MSRecord. Previously this could result in a subtle bug for systems
where malloc'd memory is not zeroed. This would only have effected
programs that were creating Mini-SEED in a particular way.
- Create LMP_BSD platform definition to cover the BSDs including
Apple Mac OS X, this replaces LMP_DARWIN. Specifically FreeBSD,
OpenBSD, NetBSD and Apple are detected for this platform.
- Add msr_duplicate() function to duplicate an MSRecord struct.
- Use msr_duplicate() in example/msrepack.c example program to
track the most current MSRecord as a template for packing.
- Removed caveat comment from mst_groupheal() man page.
- mst_groupheal() now sorts the MSTraceGroup before it tries to
heal the traces, this increases the chances of healing all
- msr_pack(): add void *handlerdata argument that wil be passed
directly to the record_handler(), this is intended to allow
private data to be passed from the msr_repack() caller to the
record handling routine.
- mst_pack(): add void *handlerdata argument that is passed
directly to msr_pack() and used as described above.
- mst_packgroup(): add void *handlerdata argument that is passed
directly to mst_pack() and used as described above.
- Add macros for setting the pack & unpack, header & data byte
order override variables: MS_PACKHEADERBYTEORDER(X),
MS_PACKDATABYTEORDER(X), MS_UNPACKHEADERBYTEORDER(X) and
- Add macros for setting the unpack encoding format override and
encoding format fallback variables: MS_UNPACKENCODINGFORMAT(X)
- Fix typos in the docs referring to msr_readtraces() that should
be ms_readtraces(), thanks Richard Boaz.
- mst_groupheal(): fix removal of first trace in group.
- mst_groupheal(): reset MSTrace data quality indicator when
merged traces do not have matching qualities.
- Set no default CFLAGS and CC variables for building and add a
note to the Makefile about using them for build configuration.
- Eliminate compiler warning for genutils.c routines.
- Add new pack file type 8.
- Allow 'M' as a valid data record indidator/quality flag.
- Determine needs for GEOSCOPE decoding and remove the need
for using the pow() function and linking with the math library.
- Fix resetting of global MSFileParam in ms_readmsr_f() when
cleanup is requested.
- Change mst_groupsort() to sort on: srcname, then starttime,
then descending endtime and finally sample rate. This moves
sample rate to the end of the criteria, the previous order was:
srcname, sample rate, starttime and endtime.
- Stamp 2.0rc1.
- Fix diagnostic printing bug in pack.c.
- Fix ms_gswap.3 man page.
- Change "get_" prefix for lookup routines to "ms_".
- Change ms_encoding() to ms_encodingstr().
- Document ms_errorstr() in the lookup and other man pages.
- Document and use ms_log(3) in User Guide/ms_intro(3).
- Add "ms_" prefix to gswap routines.
- Change SWAPBTIME macro to MS_SWAPBTIME.
- Add buffer length sanity check in ms_find_reclen() suggested by
- Change mst_printracelist() and mst_printgaplist() to print
"-0" when the gap is 0 (one sample overlap) and "==" when there
is no gap.
- Add memory allocation checks, every allocation is now tested.
- Fix usage message for example programs, use fprintf for the long
section of the output.
- Add source name to all unpacking error and diagnostic messages.
- Add source name to all packing error and diagnostic messages.
- Reorganize sanity check code in msr_unpack() to use the
- Add ms_recsrcname() function to calculate the source name for
an unpacked record.
- Add ms_readmsr_r() as a reenentrant, thread safe version of what
ms_readmsr() used to be and make ms_readmsr() a wrapper for the new
reentrant version that uses global file reading parameters.
- Use ms_readmsr_r() in ms_readtraces() so that it's now thread
- Add logging.c routines and declarations in libmseed.h. This
constitutes a new logging facility that is used throughout the
library and can be used by libmseed based programs. The facility
allows the caller to redirect all the log, diagnostic and error
output from the library to specific functions. The facility
also allows user specifed prefixes for all output messages.
- Prefix all data encoding type defines with DE_ to avoid collision.
- Add GEOSCOPE (three subtypes), SRO and DWWSSN data decoders, there
are no encoders for these types.
- Need of the pow() function now requires linking with -lm (math lib).
- Add MS_ISVALIDBLANK macro to libmseed.h to test memory for valid
blank/noise records: valid sequence number followed by ASCII spaces.
- Use MS_ISVALIDBLANK in ms_find_reclen() to implicitly find record
lengths, when reading ahead the record length can now be determined
if then next record is a real data record or a blank record.
- Use MS_ISVALIDBLANK in ms_readmsr() to print out a more specific
message when skipping blank records as opposed to non-data records
- Use MS_ISVALIDHEADER instead of MS_ISDATAINDICATOR when verifying
data records when the record length is not autodetected in ms_readmsr().
- In msr_unpack_data() move the test of reallocation directly after
the reallocation so it's only tested when actually done.
- In msr_unpack_data() include text description of encoding in the
unsupported encoding error message.
- Add 'quality' flag argument to mst_srcname() to control the
addition of the quality indicator in the srcname.
- Add 'quality' flag argument to mst_groupsort() to control the
inclusion of quality indicator in the sorting.
- Use memory-aligned swap functions in unpackdata.c for speed.
- Fix return type of ms_readtraces() on success and documentation.
- Tweak verbose flag checking in fileutils.c to avoid spurious msgs.
- Add gcc32gprof and gcc64gprof targets to Makefiles for profiling.
- Fix dynamic target and update API version in Makefile.
- Require GCC for shared and dynamic library building.
- Include ctype.h header in lmplatform.h for WIN32 platform.
- Add function msr_normalize_header() to update the FSDH and
blockettes with values at the MSRecord level.
- Add 'normalize' flag argument to msr_pack_header() control the
calling of msr_normalize_header() when packing.
- Change the MSRecord element 'private' to 'prvtptr' to avoid
collision with the C++ reserved word.
- Add a 'quality' flag argument to msr_srcname() to control the
addition of the quality indicator to the srcname.
- Move MS_ISVALIDHEADER(X) macro to libmseed.h for general use; this
macro tests for valid SEED data record signatures and is used for
detection of data records when reading data from files.
- Remove two redundant tests of swapflag in Steim-1 decompression.
- Declare starttime in msr_starttime() as hptime_t instead of double,
testing indicates that this never caused a problem in practice.
- Update example programs for API changes.
- Add -fPIC to GCCFLAGS in Makefile.
- Remove declaration for non-existent ms_verify_header() in libmseed.h
(thanks LLoyd Carothers).
- Add correct swapping of fsdh.numsamples and fsdh.data_offset,
problem and fix reported by Doreen Pahlke (thanks!). This fixes
packing of data when packing to a byte-order opposite of the host
2006.208: version 1.8
- Fix memmove bounds for out-of-time-order data additions in both
mst_addmsr() and mst_addspan().
- Fix memory leak in mst_pack() by freeing the temporary MSRecord
when no template is used.
- Add get_errorstr() function in lookup.c to return text descriptions
for specified libmseed return/error codes.
- Add gcc32, gcc32debug and gcc64debug targets to Makefiles.
2006.182: version 1.7
- Add MS_WRONGLENGTH error code and have msr_unpack() and the
file reading routines return it when the read length does not match
length specified in the Blockette 1000. This most commonly occurs
when either the specified record length or the length of the first
record is auto detected and the following record lengths assumed
do not match the actual records.
- Use MS_ISRATETOLERABLE macro in mst_groupsort() to compare the
sampling rates of adjacent trace segments. This is how sampling
rates are compared in other routines and will avoid problems
associated with testing the equality of floating point values.
- Remove some of the useless error codes.
- Steim compression integrity check failure and sample count
mismatch are not fatal unpacking errors, only warnings are printed.
- Changed return type of ms_readmsr() to int and added a pointer
to a pointer to an MSRecord to the arguments. Function now returns
- Changed return type of ms_readtraces() to int and added a pointer
to a pointer to an MSTraceGroup to the arguments. Function now
returns status/error codes.
- Changed return type of msr_unpack() to int. Function now
returns status/error codes.
- Changes to many internal functions to support the new unpacking
error code bubble.
- Removed the MSRecord.unpackerr element as it is now unneeded.
- Found and fixed bug resulting in the assumption that all sample
sizes were 8 bytes (which would usually be wrong) during unpacking.
2006.124: version 1.6.3
- Fix (int *)packedsamples handling for packing routines.
- Fix compilation under Open Watcom (Win32).
2006.122: version 1.6.2
- More fixes for sampling rate == 0 when calculating the sample
2006.121: version 1.6.1
- msr_endtime() now checks that the sample count is greater than
zero. If the sampling rate or sample count is less than or equal
to zero msr_endtime() returns the starttime.
2006.115: version 1.6
- Rename mst_heal() to mst_groupheal().
- Change examples for ms_readtraces() in documentation that implied
an incorrect return type.
- Small changes to error messages for clarity (e.g. add file read
offset, print sample types as char not int).
- Fix offset determination for packed files and files without
- Add MS_ISVALIDHEADER macro to fileutils.c, verifies that a
specified buffer contains a valid fixed section data header.
- ms_find_reclen(): moved to fileutils.c
- ms_find_reclen(): More data record verification by checking
for valid time values (e.g. 0 <= hour <= 23 ).
- ms_find_reclen(): Detect record lengths even when no blockette
1000 is found by reading the next 48 bytes from the file and
looking for another record header or EOF. This check is not
performed if the specified FILE pointer is NULL. The original
file read position is restored. This required adding another
argument: FILE *fileptr.
- Change output of msr_print() to include record length for
the lowest detail output (single line per record).
- Change example msview program to autodetect each record by
2006.082: version 1.5.2
- Make msr_pack() emit a warning with the function pointer to
the record_handler() is not set instead of bombing out. The
packed record is not accessible any other way.
- Make the packedsamples argument to msr_pack() optional, the
pointer can be NULL if this information is not needed.
- Modify ms_readmsr() to be able to read packed files which are
indexed files used internally at the IRIS-DMC and probably no
- Add lmp_fseeko() portable function (used in fileutils.c).
2006.079: version 1.5.1
- Add file name check in ms_readmsr() to make sure subsequent
reads are done on the same file. If the function is called with a
different file name than the file that is currently open the
current file will be closed and the new one opened and an error
- Change mst_srcname to include the data quality code in the
srcname if it is non-zero.
- Remove the data quality code specifics from mst_print* functions
as it is now included in the source name.
2006.076: version 1.5
- No changes, just stamp 1.5.
- Change structure names:
* Trace -> MSTrace
* TraceGroup -> MSTraceGroup
* MSrecord -> MSRecord
A bothersome change, but it will ease inclusion into source
base of other libraries, etc.
- Change struct fsdh.drec_indicator to fsdh.dataquality.
- Change MSRecord.drec_indicator to MSRecord.dataquality.
- Add MSTrace.dataquality element.
- Add data quality matching flag arguments to ms_readtraces()
and mst_addmsrtogroup() to control matching of data qualities.
- Add data quality value arguments to mst_findmatch() and
mst_findadjacent() to control matching of data qualities.
- Modify mst_printtracelist() and mst_printgaplist() to include
data quality flags in their output when they have been set.
- Improve the data record verification in ms_find_reclen() to
improve the detection of non-data versus data records. In
particular the routine now requires a record to start with
6 ASCII digits followed by a valid data record indicator
followed by either a space or NULL character (even though
a NULL here is not valid SEED).
- Fix mst_groupsort for near srcname matches.
- Add end time sort level to mst_groupsort(), now the function
will sort on: source name, sample rate, start time and
descending end time in that order.
- Include WIN32 define for strcasecmp->_stricmp.
- Fix typo in blockette 200 printing.
- Include sys/types.h for Win32 systems in lmplatform.h and
do not typedef off_t.
- In mst_findadjacent() do not perform the time and sample
rate tolerance checks if the tolerance is specified as -2.0.
- Remove the msi.c example program, it has diverged from the
separate released msi.
- In mst_addmsr() and mst_addspan() test if data sample
memory needs to be moved before moving, allows adding an
msr to a trace which has no data samples (e.g. a flushing
pack has been done).
- Do not try to pack Traces with numsamples==0 in
- Add check for sample count mismatch and decrement
mst->samplecnt when packing in mst_pack().
- Free mst->private in mst_init().
- Add lmplatform.[ch] to hold platform dependent defines
and portability routines.
- Create lmp_ftello() portable routines and use it.
- Change all uses of fopen() to include a 'b' in the mode
in order to open files in "binary" mode on Win32.
- Add Makefile.wat for Open Watcom's wmake.
- Add Makefile.win for Microsoft's nmake.
- Test using Open Watcom 1.3 under Win32 (Windows XP).
- Add 'dynamic' target in Makefile to build a dynamic lib
on Mac OSX.
- Update many unpacking routines so that the MS_SAMPMISMATCH
error code is correctly returned and that none of the errors
are show stoppers, it is left to the application to decide.
- Remove error message when read fails during detection, the
end of the file is simply that, no error.
- Fix definition of MS_EPOCH2HPTIME and MS_HPTIME2EPOCH in
ms_time.3 man page.
- Change int64_t types to hptime_t types in documentation.
- Add 'chainpos' argument to msr_addblockette() to control
which end of the blockette chain the blockette is added to.
- Change msr_pack() to add any missing 1000 Blockettes to
the end of the blockette chain.
2005.201: 1.0 Final
- Change version of example programs so they don't conflict
with future, non-example versions.
- Generate links to man pages and tar up a source package.
- No library code changes since pre6.
- Set MSrecord->reclen to -1 in msr_init() to trigger
the default value in msr_pack(), etc.
- Fix off-by-one error in number of samples for overlaps.
- Add check for an UNPACK_DATA_FORMAT_FALLBACK environment
variable that defines a fallback format for when no encoding
format is specified in the data record (no blkt 1000).
- Set a default format fallback encoding of 10 (Steim 1).
If this default gets invoked, the byteorder will fallback
to big-endian if it has not been specified.
- Change the MS_EPOCH2HPTIME(X) and MS_HPTIME2EPOCH(X)
macro definitions to not include a semi-colon, duh.
- Add a 'timeformat' flag to the mst_printtracelist() and
mst_printgaplist() functions that indicates which format
the time stamp will be in: SEED time, ISO time or epoch.
- Add an option to msi to specify the time format in trace
and gap listings.
- Add check for the following environment variable to force
the data encoding format when unpacking:
UNPACK_DATA_FORMAT = data encoding format
- Add '-e' option to msi/msrepack to specify the input data
encoding format allowing them to work with plain data records.
- Define _LARGEFILE_SOURCE in fileutils.c to get ftello()
without a compiler warning on Linux.
- Fixup swapping when byte order is forced on LE arch.
- Add checking for the following environment variables that
can be used to force the byte-order for the header and data:
PACK_HEADER_BYTEORDER = 0 or 1
PACK_DATA_BYTEORDER = 0 or 1
UNPACK_HEADER_BYTEORDER = 0 or 1
UNPACK_DATA_BYTEORDER = 0 or 1
- Change the fpos argument to ms_readmsr() to be type off_t.
- Change the calls to ftell() in ms_readmsr() to ftello() to
return type off_t, this is required for large file support
where 64-bit offsets are needed.
- Change the header byte order determination to check for
start years between 1920 and 2020.
- Add gcc64 target to Makefile and example/Makefile.
- Change msr_pack() to use a 'D' record indicator by default.
- Cleanup examples directory.
- Remove '-g' from common GCCFLAGS in examples/Makefile.
- Small update to ms_time.3 to clarify that MS_HPTIME2EPOCH
can be used to get both a truncated integer epoch or a
double precision epoch.
- Remove '-g' from common GCCFLAGS in Makefile.
- Fix printing of Blockette 500.
- Change macro defines to upper case macro names.
- Add ms_isratetolerable() macro to perform the default
sample rate tolerance check. Update appropriate functions.
- Fix sample rate checking in mst_print*() functions.
- Fix msi example code so negative min/max gaps (overlaps)
are parsed correctly from command line.
- Change mst_print() to mst_printtracelist() and add
- Both of the above routines now report gaps as the time
of the first sample after the gap minus the time of the last
sample before the gap, sample "coverage" time is no longer
- Make mst_groupsort() sort on source->samplerate->starttime
instead of source->starttime.
- ms_readmsr() will now skip non-data records when doing
record length autodetection.
- Add ms_hptime2epoch() macro to convert hptimes to
Unix/POSIX epoch times, integer truncation, no rounding.
- Add macro ms_isdataindicator() which tests a character
for a valid data record header indicator (D,R,Q,etc.)
- Example program msi now takes -min and -max options to
specify min and max gap/overlap to display in gap list.
- Add ms_epoch2hptime() macro to convert Unix/POSIX
epoch times to hptimes.
- Add 'skipnotdata' flag argument to ms_readmsr() and
ms_readtraces() and update their respective man pages.
- Shuffle order of arguments for ms_readtraces(), no big
deal but since the interface was changing anyway...
- Change printing of sample rates to print higher precision
so that small differences in rates are noticeable.
- Change fixed section header printing of sample rate to be
the actual calculated value using the factor and multiplier.
- Spell check README/INSTALL files and man pages.
- Remove WIN32 Makefiles and hooks in example sources.
- Minor printing fixups in the example code msi.c.
- Change ms_readmsr() to search valid record lengths up
to 8192 bytes when auto detecting the record size.
- Change msr_addblockette() to always add Blockette 1000s
to the beginning of the blockette chain and others to the
end of the blockette chain.
- Fix reduction of precision when unpacking doubles.
- Change typo in pack.c from 'Unpacking' to 'Packing'.
- Improve printing of float/double samples in msi.
- Add proper rounding for span calculation in msr_endtime().
2004.341 - Release version 0.9.1