Skip to content

Commit

Permalink
Update libmseed to 3.0.17 and mark as version 1.0.0
Browse files Browse the repository at this point in the history
  • Loading branch information
chad-earthscope committed Jul 25, 2023
1 parent 01315c7 commit c7075cb
Show file tree
Hide file tree
Showing 30 changed files with 668 additions and 609 deletions.
3 changes: 3 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
2023.206: 1.0.0
- Update libmseed to 3.0.17.

2023.162: 0.9.3
- Update libmseed to 3.0.15 with fixes for v2 packing.
- Retain format v2 sequence numbers and data quality indicators if
Expand Down
25 changes: 25 additions & 0 deletions libmseed/ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,28 @@
2023.206: 3.0.17
- Add tests for default record length and encoding.
- Document versioning schema as semantic versioning.
- Add const qualifiers to packing routines that do not modify the
passed MS3Record structure.

2023.204: 3.0.16
- Additional Steim 1 & 2 decoder optimization.
- Add more const qualifiers to pointer values. Thanks @damb.

2023.185:
- Fix logic in `msr3_duplicate()` for certain cases.
- Add many const qualifiers to pointer values where the library
interface does not modify the data. Thanks @damb

2023.180:
- Add const qualifier to record pointer declarations where the
library interface does not modify the data.

2023.177:
- Incorporate ms_gswapX() functions into libmseed.h to promote inlining.
- Optimize Steim 1 & 2 decoders.
- Change test for environment variable DECODE_DEBUG to compile-time define
- Change test for environment variable ENCODE_DEBUG to compile-time define

2023.162: 3.0.15
- Print sample rate in Hz consistently in msr3_print()
- Fix writing of SNR values field 9 of Blockette 201 (v2)
Expand Down
6 changes: 3 additions & 3 deletions libmseed/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@ DOCDIR ?= $(DATAROOTDIR)/doc/libmseed
MANDIR ?= $(DATAROOTDIR)/man
MAN3DIR ?= $(MANDIR)/man3

LIB_SRCS = fileutils.c genutils.c gswap.c msio.c lookup.c yyjson.c \
msrutils.c extraheaders.c pack.c packdata.c tracelist.c gmtime64.c \
crc32c.c parseutils.c unpack.c unpackdata.c selection.c logging.c
LIB_SRCS = fileutils.c genutils.c msio.c lookup.c yyjson.c msrutils.c \
extraheaders.c pack.c packdata.c tracelist.c gmtime64.c crc32c.c \
parseutils.c unpack.c unpackdata.c selection.c logging.c

LIB_OBJS = $(LIB_SRCS:.c=.o)
LIB_LOBJS = $(LIB_SRCS:.c=.lo)
Expand Down
1 change: 0 additions & 1 deletion libmseed/Makefile.win
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ LM_DEF = libmseed.def

OBJS = fileutils.obj \
genutils.obj \
gswap.obj \
msio.obj \
lookup.obj \
yyjson.obj \
Expand Down
179 changes: 112 additions & 67 deletions libmseed/doc/Doxyfile

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions libmseed/doc/faq.dox
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ You can use the @ref ms_sid2nslc() and @ref ms_nslc2sid() routines to convert be
Except for potentially larger individual codes, the major difference in the two representations is the
\a channel code. In the SEED specification this is a fixed 3-character code, while in the FDSN Source Identifier
specification the channel is 3 codes separated by underscores, with each code potentially being larger than a
single character. The library is agnostic to form of a channel reprsentation, accepting either and converting
single character. The library is agnostic to form of a channel representation, accepting either and converting
between them whenever possible and appropriate.

@subsection faq-7 The library API changed! Why? How do I port my libmseed 2.x program to the 3.x API?
Expand All @@ -93,7 +93,7 @@ Thank you!

It won't be everyone's cup of tea. Some alternative libraries are:

P. Crotwell's <a class="el" href="https://www.seis.sc.edu/seisFile.html">seisFile</a> - Java library with miniSEED support.
P. Crotwell's <a class="el" href="https://www.seis.sc.edu/seisFile.html">SeisFile</a> - Java library with miniSEED support.

D. Neuhauser's <a class="el" href="https://www.ncedc.org/qug/software/ucb/">Qlib2</a> - C library with miniSEED support.

Expand Down
6 changes: 5 additions & 1 deletion libmseed/doc/mainpage.dox
Original file line number Diff line number Diff line change
Expand Up @@ -43,11 +43,15 @@ libmseed project</a>.
A @ref porting-guide is available for developer porting software that
previously used version 2 of the library.

@subsection versioning-main Versioning

Releases are versioned using <a class="el" href="http://semver.org/">Semantic Versioning</a>.

@subsection main-acknowledgements Acknowlegements

Numerous improvements have been incorporated based on feedback and
patches submitted by others. Individual acknowlegements are included
in the ChangeLog. Contributions are welcome and greatly appreciated.
in the ChangeLog and/or commit messages. Contributions are welcome and greatly appreciated.

This library also uses code bits published in the public domain and
acknowledgement is included in the code whenever possible.
Expand Down
10 changes: 2 additions & 8 deletions libmseed/example/lm_pack.c
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@
static flag verbose = 0;
static int reclen = -1;
static int encoding = 10;
static int byteorder = -1;
static int msformat = 3;
static char *outfile = NULL;

Expand Down Expand Up @@ -297,10 +296,6 @@ parameter_proc (int argcount, char **argvec)
{
encoding = strtol (argvec[++optind], NULL, 10);
}
else if (strcmp (argvec[optind], "-b") == 0)
{
byteorder = strtol (argvec[++optind], NULL, 10);
}
else if (strcmp (argvec[optind], "-o") == 0)
{
outfile = argvec[++optind];
Expand Down Expand Up @@ -347,13 +342,12 @@ usage (void)
" -V Report program version\n"
" -h Show this usage message\n"
" -v Be more verbose, multiple flags can be used\n"
" -2 Create miniSEED v2 format, default is v3\n"
" -F format Specify miniSEED version format, default is v3\n"
" -r bytes Specify maximum record length in bytes, default 4096\n"
" -e encoding Specify encoding format\n"
" -b byteorder Specify byte order for packing, MSBF: 1, LSBF: 0\n"
"\n"
" -o outfile Specify the output file, required\n"
"\n"
"This program packs static, test data into miniSEED\n"
"\n");
} /* End of usage() */
} /* End of usage() */
4 changes: 2 additions & 2 deletions libmseed/extraheaders.c
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ parse_json (char *jsonstring, size_t length, LM_PARSED_JSON *parsed)
* \sa mseh_free_parsestate()
***************************************************************************/
int
mseh_get_ptr_r (MS3Record *msr, const char *ptr,
mseh_get_ptr_r (const MS3Record *msr, const char *ptr,
void *value, char type, size_t maxlength,
LM_PARSED_JSON **parsestate)
{
Expand Down Expand Up @@ -1083,7 +1083,7 @@ mseh_free_parsestate (LM_PARSED_JSON **parsestate)
* @returns 0 on success and a (negative) libmseed error code on error.
***************************************************************************/
int
mseh_print (MS3Record *msr, int indent)
mseh_print (const MS3Record *msr, int indent)
{
char *extra;
int idx;
Expand Down
4 changes: 2 additions & 2 deletions libmseed/extraheaders.h
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,11 @@ void *_priv_realloc(void *ctx, void *ptr, size_t oldsize, size_t size);
void _priv_free(void *ctx, void *ptr);

/* Internal structure for holding parsed JSON extra headers */
typedef struct LM_PARSED_JSON
struct LM_PARSED_JSON_s
{
yyjson_doc *doc;
yyjson_mut_doc *mut_doc;
} LM_PARSED_JSON;
};

#ifdef __cplusplus
}
Expand Down
12 changes: 6 additions & 6 deletions libmseed/fileutils.c
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,7 @@ ms3_shift_msfp (MS3FileParam *msfp, int shift)
*********************************************************************/
int
ms3_readmsr_selection (MS3FileParam **ppmsfp, MS3Record **ppmsr, const char *mspath,
uint32_t flags, MS3Selections *selections, int8_t verbose)
uint32_t flags, const MS3Selections *selections, int8_t verbose)
{
MS3FileParam *msfp;
uint32_t pflags = flags;
Expand Down Expand Up @@ -540,7 +540,7 @@ ms3_readmsr_selection (MS3FileParam **ppmsfp, MS3Record **ppmsr, const char *msp
*********************************************************************/
int
ms3_readtracelist (MS3TraceList **ppmstl, const char *mspath,
MS3Tolerance *tolerance, int8_t splitversion,
const MS3Tolerance *tolerance, int8_t splitversion,
uint32_t flags, int8_t verbose)
{
return ms3_readtracelist_selection (ppmstl, mspath, tolerance, NULL,
Expand All @@ -565,7 +565,7 @@ ms3_readtracelist (MS3TraceList **ppmstl, const char *mspath,
*********************************************************************/
int
ms3_readtracelist_timewin (MS3TraceList **ppmstl, const char *mspath,
MS3Tolerance *tolerance,
const MS3Tolerance *tolerance,
nstime_t starttime, nstime_t endtime,
int8_t splitversion, uint32_t flags, int8_t verbose)
{
Expand Down Expand Up @@ -629,7 +629,7 @@ ms3_readtracelist_timewin (MS3TraceList **ppmstl, const char *mspath,
*********************************************************************/
int
ms3_readtracelist_selection (MS3TraceList **ppmstl, const char *mspath,
MS3Tolerance *tolerance, MS3Selections *selections,
const MS3Tolerance *tolerance, const MS3Selections *selections,
int8_t splitversion, uint32_t flags, int8_t verbose)
{
MS3Record *msr = NULL;
Expand Down Expand Up @@ -877,7 +877,7 @@ msr3_writemseed (MS3Record *msr, const char *mspath, int8_t overwrite,
/* Close file and return record count */
fclose (ofp);

return (packedrecords >= 0) ? packedrecords : -1;
return packedrecords;
} /* End of msr3_writemseed() */

/**********************************************************************/ /**
Expand Down Expand Up @@ -944,7 +944,7 @@ mstl3_writemseed (MS3TraceList *mstl, const char *mspath, int8_t overwrite,
/* Close file and return record count */
fclose (ofp);

return (packedrecords >= 0) ? packedrecords : -1;
return packedrecords;
} /* End of mstl3_writemseed() */


Expand Down
94 changes: 0 additions & 94 deletions libmseed/gswap.c

This file was deleted.

Loading

0 comments on commit c7075cb

Please sign in to comment.