Hello community, here is the log from the commit of package getdata for openSUSE:Factory checked in at 2015-08-12 15:13:42 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/getdata (Old) and /work/SRC/openSUSE:Factory/.getdata.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "getdata" Changes: -------- --- /work/SRC/openSUSE:Factory/getdata/getdata.changes 2015-05-16 19:01:59.000000000 +0200 +++ /work/SRC/openSUSE:Factory/.getdata.new/getdata.changes 2015-08-12 15:13:43.000000000 +0200 @@ -1,0 +2,28 @@ +Mon Aug 10 18:32:38 UTC 2015 - [email protected] + +- update 0.8.9 + * BUG FIX: The metadata writer now correctly stores bytes in the range + 0x01 through 0x1F to the format files (encoded as hex escape sequences: + \x##). + * BUG FIX: A number of memory leaks associated with error returns from + libary functions have been fixed. + * BUG FIX: Attempting to create a new field or alias with the name of + an existing dangling alias now fails with error GD_E_DUPLICATE, as it + should. Reported by Alexandra Rahlin. + * BUG FIX: Random-access reads on a RAW field with a frame offset no + longer result in mispositioning of the field's I/O pointer, which + previously would result in returning data from the wrong part of a + field. Reported by S. J. Benton. + * BUG FIX: The return value of gd_nframes() is now correct when using a + sample-index encoded field as the reference field. + * BUG FIX: The sample-index encoding no longer creates sequential records + with the same value. + * F77 and F95 BUG FIX: Passing zero as the field code length (F77) to + GDFLSH GDSYNC GDRCLO, or, equivalently, an empty string as the field + code to fgd_flush, fgd_sync, fgd_raw_close now causes operation on all + fields, as with passing NULL to the corresponding C API functions does. + This is what the documentation said these functions did all along. + * PYTHON BUG FIX: Accessing the prefix or suffix member of fragment + objects no longer leaks memory if the other affix is non-NULL. + +------------------------------------------------------------------- Old: ---- getdata-0.8.8.tar.bz2 New: ---- getdata-0.8.9.tar.bz2 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ getdata.spec ++++++ --- /var/tmp/diff_new_pack.UZ5aVs/_old 2015-08-12 15:13:43.000000000 +0200 +++ /var/tmp/diff_new_pack.UZ5aVs/_new 2015-08-12 15:13:43.000000000 +0200 @@ -18,7 +18,7 @@ Name: getdata -Version: 0.8.8 +Version: 0.8.9 Release: 0 Summary: Library for reading and writing dirfile data License: LGPL-2.1+ ++++++ getdata-0.8.8.tar.bz2 -> getdata-0.8.9.tar.bz2 ++++++ ++++ 1982 lines of diff (skipped) ++++ retrying with extended exclude list diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/getdata-0.8.8/ChangeLog new/getdata-0.8.9/ChangeLog --- old/getdata-0.8.8/ChangeLog 2015-05-14 01:53:24.000000000 +0200 +++ new/getdata-0.8.9/ChangeLog 2015-07-25 04:04:26.000000000 +0200 @@ -1,3 +1,65 @@ +2015-07-24 D. V. Wiebe <[email protected]> svn:980 + * src/sie.c (_GD_SampIndSize): Fix return value. + + * src/sie.c (_GD_SampIndWrite): Flush stdio buffer before truncating to + avoid having a partially written file on disk. + * test/sie_put_trunc_nf.c: Added. + + * test/flush_hex.c: Call gd_discard() before exit. + + * test/seek_foffs2.c: Fix memset call. + +2015-05-25 D. V. Wiebe <[email protected]> svn:979 + * bindings/f77/fgetdata.c (GDFLSH GDSYNC GDRCLO): Fix zero-length string + checks. + + * bindings/python/pyfragment.c (gdpy_fragment_getprefix + gdpy_fragment_getsuffix): Fix memory leaks. + + * src/add.c (_GD_Add) src/legacy.c (_GD_GetDirfile) src/mod.c + (gd_alter_spec) src/name.c (_GD_Rename) src/parse.c (_GD_ParseCarray): Fix + on-error memory leaks. + + * src/common.c (_GD_GetRepr): Only set field_code to field_code_in if + necessary. + + * src/entry.c (gd_linterp_tablename): Fix error reporting. + + * src/flush.c (_GD_StringEscapeise): Fix upper nibble of hex encoding. + * test/flush_hex.c: Added. + + * src/getdata.c (_GD_DoBit): Fix sign mask. + + * src/mod.c (_GD_AlterScalar): Remove duplicate case. + +2015-05-25 D. V. Wiebe <[email protected]> svn:977 + * src/getdata.c (_GD_DoRaw): Rewind RAW file if necessary after + zero-padding. + * test/get_foffs2.c test/seek_foffs2.c: Added. + + * src/raw.c (_GD_RawSeek): Handle landing in the middle of a sample. + + * src/raw.c (_GD_RawSeek): Remember the actual position, not the + requested position. + + * bindings/idl/test/Makefile.am bindings/matlab/test/Makefile.am + bindings/perl/Makefile.am bindings/python/test/Makefile.am: Fix + DL_LIBRARY_PATH ordering. + + * bindings/perl/GetData.pm.in: Fix perldoc markup. + +2015-05-20 D. V. Wiebe <[email protected]> svn:976 + * cmake/test/CMakeLists.txt: blacklist gzip tests. + + * src/getdata.h.in: Don't attempt to use __nonnull. + + * configure.ac: Fix cygwin check. + +2015-05-19 D. V. Wiebe <[email protected]> svn:973 + * src/add.c (_GD_Add _GD_AddAlias) src/fragment.c (_GD_CheckAffixes): + Don't dealias during the duplicate field name check. + * test/add_dangle_dup.c: Added. + 2015-05-13 D. V. Wiebe <[email protected]> svn:969 GetData-0.8.8 released: @@ -117,7 +179,7 @@ * test/open_sym_a.c test/open_sym_al.c test/open_sym_at.c test/tok_escape.c test/tok_quote.c: Free strings. -2015-04-05 D. V. Wiebe <[email protected]> svn:939 +2015-04-05 D. V. Wiebe <[email protected]> svn:949 * src/include.c (_GD_Include): Only open the file read-write if it's being truncated or created. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/getdata-0.8.8/NEWS new/getdata-0.8.9/NEWS --- old/getdata-0.8.8/NEWS 2015-05-14 01:54:28.000000000 +0200 +++ new/getdata-0.8.9/NEWS 2015-07-29 03:29:08.000000000 +0200 @@ -1,3 +1,43 @@ +New in verison 0.8.9: + + Library Changes: + + * BUG FIX: The metadata writer now correctly stores bytes in the range + 0x01 through 0x1F to the format files (encoded as hex escape sequences: + \x##). + + * BUG FIX: A number of memory leaks associated with error returns from + libary functions have been fixed. + + * BUG FIX: Attempting to create a new field or alias with the name of + an existing dangling alias now fails with error GD_E_DUPLICATE, as it + should. Reported by Alexandra Rahlin. + + * BUG FIX: Random-access reads on a RAW field with a frame offset no + longer result in mispositioning of the field's I/O pointer, which + previously would result in returning data from the wrong part of a + field. Reported by S. J. Benton. + + * BUG FIX: The return value of gd_nframes() is now correct when using a + sample-index encoded field as the reference field. + + * BUG FIX: The sample-index encoding no longer creates sequential records + with the same value. + + Bindings Changes: + + * F77 and F95 BUG FIX: Passing zero as the field code length (F77) to + GDFLSH GDSYNC GDRCLO, or, equivalently, an empty string as the field + code to fgd_flush, fgd_sync, fgd_raw_close now causes operation on all + fields, as with passing NULL to the corresponding C API functions does. + This is what the documentation said these functions did all along. + + * PYTHON BUG FIX: Accessing the prefix or suffix member of fragment + objects no longer leaks memory if the other affix is non-NULL. + + +|=========================================================================| + New in verison 0.8.8: Library Changes: @@ -6,6 +46,8 @@ in getdata.h (those associated with the GD_64BIT_API symbol), which prevented GetData-0.8.7 from compiling on 32-bit systems, has been fixed. + GetData-0.8.8 is ABI compatible with GetData-0.8.7. + |==============================================================================| New in verison 0.8.7: diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/getdata-0.8.8/bindings/cxx/entry.cpp new/getdata-0.8.9/bindings/cxx/entry.cpp --- old/getdata-0.8.8/bindings/cxx/entry.cpp 2014-12-05 22:40:35.000000000 +0100 +++ new/getdata-0.8.9/bindings/cxx/entry.cpp 2015-05-28 23:41:24.000000000 +0200 @@ -1,4 +1,4 @@ -// Copyright (C) 2008-2012, 2014 D. V. Wiebe +// Copyright (C) 2008-2012, 2014, 2015 D. V. Wiebe // /////////////////////////////////////////////////////////////////////////// // @@ -102,6 +102,11 @@ if (E.field == NULL) { E.field = strdup(new_name); } else { + /* For a metafield, the length of the string that ends up in nn cannot + * be larger than the following, because E.field must have at least one + * character after the / which will be deleted (and it's space used for + * the terminating NUL). + */ char* nn = (char*)malloc(strlen(E.field) + strlen(new_name)); strcpy(nn, E.field); ptr = strchr(nn, '/'); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/getdata-0.8.8/bindings/f77/fgetdata.c new/getdata-0.8.9/bindings/f77/fgetdata.c --- old/getdata-0.8.8/bindings/f77/fgetdata.c 2015-04-30 02:58:42.000000000 +0200 +++ new/getdata-0.8.9/bindings/f77/fgetdata.c 2015-05-28 23:41:35.000000000 +0200 @@ -1,4 +1,4 @@ -/* Copyright (C) 2008-2014 D. V. Wiebe +/* Copyright (C) 2008-2015 D. V. Wiebe * ************************************************************************* * @@ -257,7 +257,7 @@ { dtrace("%i, %p, %i", *dirfile, field_code, *field_code_l); - if (field_code_l == 0) + if (*field_code_l == 0) gd_flush(_GDF_GetDirfile(*dirfile), NULL); else { char *out; @@ -3846,7 +3846,7 @@ { dtrace("%i, %p, %i", *dirfile, field_code, *field_code_l); - if (field_code_l == 0) + if (*field_code_l == 0) gd_sync(_GDF_GetDirfile(*dirfile), NULL); else { char *out; @@ -3864,7 +3864,7 @@ { dtrace("%i, %p, %i", *dirfile, field_code, *field_code_l); - if (field_code_l == 0) + if (*field_code_l == 0) gd_sync(_GDF_GetDirfile(*dirfile), NULL); else { char *out; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/getdata-0.8.8/bindings/idl/test/Makefile.am new/getdata-0.8.9/bindings/idl/test/Makefile.am --- old/getdata-0.8.8/bindings/idl/test/Makefile.am 2014-12-05 02:44:42.000000000 +0100 +++ new/getdata-0.8.9/bindings/idl/test/Makefile.am 2015-05-25 23:58:41.000000000 +0200 @@ -1,4 +1,4 @@ -# Copyright (C) 2009-2010 D. V. Wiebe +# Copyright (C) 2009-2010, 2015 D. V. Wiebe # ########################################################################## # @@ -21,7 +21,7 @@ AUTOMAKE_OPTIONS = foreign serial-tests if TEST_IDL -TESTS_ENVIRONMENT=${DL_LIBRARY_PATH}=${${DL_LIBRARY_PATH}}:../../../src/.libs IDL_PATH="${srcdir}" IDL_DLM_PATH=../.libs ${IDL} +TESTS_ENVIRONMENT=${DL_LIBRARY_PATH}=../../../src/.libs:${${DL_LIBRARY_PATH}} IDL_PATH="${srcdir}" IDL_DLM_PATH=../.libs ${IDL} idlTESTS=big_test.pro TESTS=$(addprefix ${srcdir}/,$(idlTESTS)) endif diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/getdata-0.8.8/bindings/matlab/getdata_constants.m new/getdata-0.8.9/bindings/matlab/getdata_constants.m --- old/getdata-0.8.8/bindings/matlab/getdata_constants.m 2015-05-14 01:56:08.000000000 +0200 +++ new/getdata-0.8.9/bindings/matlab/getdata_constants.m 2015-07-29 03:26:26.000000000 +0200 @@ -31,7 +31,7 @@ % See also GETDATA GD = struct(... - 'VERSION', '0.8.8', ... + 'VERSION', '0.8.9', ... 'E_OK', int32(0), ... 'E_OPEN', int32(1), ... 'E_FORMAT', int32(2), ... diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/getdata-0.8.8/bindings/matlab/test/Makefile.am new/getdata-0.8.9/bindings/matlab/test/Makefile.am --- old/getdata-0.8.8/bindings/matlab/test/Makefile.am 2014-12-05 02:44:42.000000000 +0100 +++ new/getdata-0.8.9/bindings/matlab/test/Makefile.am 2015-05-25 23:58:46.000000000 +0200 @@ -1,4 +1,4 @@ -# Copyright (C) 2013 D. V. Wiebe +# Copyright (C) 2013, 2015 D. V. Wiebe # ########################################################################## # @@ -21,7 +21,7 @@ AUTOMAKE_OPTIONS = foreign serial-tests if TEST_MATLAB -TESTS_ENVIRONMENT=${DL_LIBRARY_PATH}=${${DL_LIBRARY_PATH}}:../../../src/.libs:../.libs MATLABPATH=${srcdir}:..:${srcdir}/.. ${srcdir}/test.sh ${MATLAB} +TESTS_ENVIRONMENT=${DL_LIBRARY_PATH}=../../../src/.libs:../.libs:${${DL_LIBRARY_PATH}} MATLABPATH=${srcdir}:..:${srcdir}/.. ${srcdir}/test.sh ${MATLAB} matlabTESTS=big_test.m diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/getdata-0.8.8/bindings/perl/GetData.pm.in new/getdata-0.8.9/bindings/perl/GetData.pm.in --- old/getdata-0.8.8/bindings/perl/GetData.pm.in 2013-11-13 22:42:26.000000000 +0100 +++ new/getdata-0.8.9/bindings/perl/GetData.pm.in 2015-05-25 23:58:51.000000000 +0200 @@ -1,4 +1,4 @@ -# Copyright (C) 2011 D. V. Wiebe +# Copyright (C) 2011, 2015 D. V. Wiebe # ########################################################################## # @@ -595,7 +595,7 @@ to the return type C<$RETURN_TYPE>, which should be one of the symbols listed under L</"Data Types"> above. The first sample returned is C<$FIRST_SAMP> samples after the start of C<$FIRST_FRAME> and the amount of data returned is -L<$NUM_FRAMES> frames plus L<$NUM_SAMP> samples. If called in scalar context +C<$NUM_FRAMES> frames plus C<$NUM_SAMP> samples. If called in scalar context returns a string of packed data. If called in array context, the data will be unpacked and returned as an array. Complex data are returned as C<Math::Complex> objects. See gd_getdata(3). diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/getdata-0.8.8/bindings/perl/Makefile.am new/getdata-0.8.9/bindings/perl/Makefile.am --- old/getdata-0.8.8/bindings/perl/Makefile.am 2015-04-30 02:17:43.000000000 +0200 +++ new/getdata-0.8.9/bindings/perl/Makefile.am 2015-05-25 23:58:56.000000000 +0200 @@ -1,4 +1,4 @@ -# Copyright (C) 2011, 2012 D. V. Wiebe +# Copyright (C) 2011, 2012, 2015 D. V. Wiebe # ########################################################################## # @@ -94,10 +94,10 @@ if TEST_PERL check: $(PERL_TESTS) - ${DL_LIBRARY_PATH}=${${DL_LIBRARY_PATH}}:../../src/.libs $(PERL) ./Build test ${TEST_VERBOSE} + ${DL_LIBRARY_PATH}=../../src/.libs:${${DL_LIBRARY_PATH}} $(PERL) ./Build test ${TEST_VERBOSE} testdb testcover: $(PERL_TESTS) - ${DL_LIBRARY_PATH}=${${DL_LIBRARY_PATH}}:../../src/.libs $(PERL) ./Build $@ ${TEST_VERBOSE} + ${DL_LIBRARY_PATH}=../../src/.libs:${${DL_LIBRARY_PATH}} $(PERL) ./Build $@ ${TEST_VERBOSE} .PHONY: check testdb testcover endif diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/getdata-0.8.8/bindings/python/pyfragment.c new/getdata-0.8.9/bindings/python/pyfragment.c --- old/getdata-0.8.8/bindings/python/pyfragment.c 2014-12-05 02:44:42.000000000 +0100 +++ new/getdata-0.8.9/bindings/python/pyfragment.c 2015-05-28 23:42:54.000000000 +0200 @@ -1,4 +1,4 @@ -/* Copyright (C) 2009-2011, 2013 D. V. Wiebe +/* Copyright (C) 2009-2011, 2013, 2015 D. V. Wiebe * *************************************************************************** * @@ -312,6 +312,7 @@ PYGD_CHECK_ERROR(self->dirfile->D, NULL); + free(suffix); if (prefix == NULL) { Py_INCREF(Py_None); dreturn("%p", Py_None); @@ -358,6 +359,7 @@ PYGD_CHECK_ERROR(self->dirfile->D, NULL); + free(prefix); if (suffix == NULL) { Py_INCREF(Py_None); dreturn("%p", Py_None); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/getdata-0.8.8/bindings/python/test/Makefile.am new/getdata-0.8.9/bindings/python/test/Makefile.am --- old/getdata-0.8.8/bindings/python/test/Makefile.am 2015-05-08 02:59:26.000000000 +0200 +++ new/getdata-0.8.9/bindings/python/test/Makefile.am 2015-05-25 23:59:01.000000000 +0200 @@ -1,4 +1,4 @@ -# Copyright (C) 2009-2010 D. V. Wiebe +# Copyright (C) 2009-2010, 2015 D. V. Wiebe # ########################################################################## # @@ -21,7 +21,7 @@ AUTOMAKE_OPTIONS = foreign serial-tests if TEST_PYTHON -TESTS_ENVIRONMENT=${DL_LIBRARY_PATH}=${${DL_LIBRARY_PATH}}:../../../src/.libs PYTHONPATH=${PYTHONPATH}:../.libs/ ${PYTHON} +TESTS_ENVIRONMENT=${DL_LIBRARY_PATH}=../../../src/.libs:${${DL_LIBRARY_PATH}} PYTHONPATH=${PYTHONPATH}:../.libs/ ${PYTHON} pyTESTS=callback.py big_test.py TESTS=$(addprefix ${srcdir}/,$(pyTESTS)) endif diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/getdata-0.8.8/configure.ac new/getdata-0.8.9/configure.ac --- old/getdata-0.8.8/configure.ac 2015-05-02 03:54:46.000000000 +0200 +++ new/getdata-0.8.9/configure.ac 2015-07-28 00:21:40.000000000 +0200 @@ -400,7 +400,7 @@ *-pc-mingw*) NO_UNDEFINED=" -no-undefined" NO_DLOPEN_TESTS=1 ;; - *-pc-cygwin*) + *-*-cygwin*) NO_UNDEFINED=" -no-undefined -enable-auto-import" NO_DLOPEN_TESTS=1 ;; *) NO_DLOPEN_TESTS=0 ;; @@ -471,7 +471,9 @@ AC_CHECK_PROGS([BUILDCC], [gcc cc cl]) fi else - BUILDCC=$CC + if test -z "$BUILDCC"; then + BUILDCC=$CC + fi AC_SUBST([BUILDCC]) fi diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/getdata-0.8.8/m4/version.m4 new/getdata-0.8.9/m4/version.m4 --- old/getdata-0.8.8/m4/version.m4 2015-05-13 22:54:51.000000000 +0200 +++ new/getdata-0.8.9/m4/version.m4 2015-07-29 03:25:23.000000000 +0200 @@ -20,7 +20,7 @@ m4_define(getdata_major, 0) m4_define(getdata_minor, 8) -m4_define(getdata_revision, 8) +m4_define(getdata_revision, 9) m4_define(getdata_extra, []) m4_define(getdata_version, getdata_major.getdata_minor.getdata_revision[]getdata_extra) @@ -28,18 +28,18 @@ dnl libgetdata current interface version m4_define(getdata_iface_version, 6) dnl libgetdata current interface implementation revision -m4_define(getdata_impl_revision, 6) +m4_define(getdata_impl_revision, 7) dnl libgetdata interface age (current interface - oldest supported interface) m4_define(getdata_iface_age, 1) -dnl libgetdata++ interface version info +dnl libgetdata++ interface version info (current:revision:age) m4_define(getdataxx_version, 5:1:2) dnl libfgetdata interface version info -m4_define(fgetdata_version, 4:3:2) +m4_define(fgetdata_version, 4:4:2) dnl libf95getdata interface version info -m4_define(f95getdata_version, 5:2:3) +m4_define(f95getdata_version, 5:3:3) dnl libgetdata-matlab interface version info m4_define(matlabgetdata_version, 0:1:0) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/getdata-0.8.8/src/add.c new/getdata-0.8.9/src/add.c --- old/getdata-0.8.8/src/add.c 2014-12-05 22:40:33.000000000 +0100 +++ new/getdata-0.8.9/src/add.c 2015-05-28 23:43:55.000000000 +0200 @@ -1,4 +1,4 @@ -/* Copyright (C) 2008-2014 D. V. Wiebe +/* Copyright (C) 2008-2015 D. V. Wiebe * *************************************************************************** * @@ -196,7 +196,7 @@ } /* check for duplicate field */ - if (_GD_FindField(D, temp_buffer, D->entry, D->n_entries, 1, &u)) { + if (_GD_FindField(D, temp_buffer, D->entry, D->n_entries, 0, &u)) { _GD_SetError(D, GD_E_DUPLICATE, 0, NULL, 0, temp_buffer); free(temp_buffer); dreturn("%p", NULL); @@ -215,6 +215,7 @@ /* New entry */ E = (gd_entry_t *)_GD_Malloc(D, sizeof(gd_entry_t)); if (E == NULL) { + free(temp_buffer); dreturn("%p", NULL); return NULL; } @@ -2067,7 +2068,7 @@ /* check alias name */ if (_GD_ValidateField(munged_code + offset, D->standards, 1, 0, NULL)) _GD_SetError(D, GD_E_BAD_CODE, GD_E_CODE_INVALID, NULL, 0, field_code); - else if (_GD_FindField(D, munged_code, D->entry, D->n_entries, 1, &u)) + else if (_GD_FindField(D, munged_code, D->entry, D->n_entries, 0, &u)) _GD_SetError(D, GD_E_DUPLICATE, 0, NULL, 0, munged_code); else _GD_CheckCodeAffixes(D, NULL, target, fragment_index); /* check target */ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/getdata-0.8.8/src/common.c new/getdata-0.8.9/src/common.c --- old/getdata-0.8.8/src/common.c 2015-04-24 03:37:21.000000000 +0200 +++ new/getdata-0.8.9/src/common.c 2015-05-28 23:44:05.000000000 +0200 @@ -1,5 +1,5 @@ /* Copyright (C) 2002-2005 C. Barth Netterfield - * Copyright (C) 2005-2012, 2014 D. V. Wiebe + * Copyright (C) 2005-2012, 2014, 2015 D. V. Wiebe * *************************************************************************** * @@ -817,7 +817,6 @@ dtrace("%p, \"%s\", %p, %i", D, field_code_in, field_code, err); - *field_code = (char *)field_code_in; /* find the representation, if any */ if (field_code_len > 2 && field_code_in[field_code_len - 2] == '.') { switch (field_code_in[field_code_len - 1]) { @@ -845,7 +844,8 @@ *field_code = _GD_Strdup(D, field_code_in); if (*field_code) (*field_code)[field_code_len - 2] = '\0'; - } + } else + *field_code = (char *)field_code_in; dreturn("%i", repr); return repr; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/getdata-0.8.8/src/entry.c new/getdata-0.8.9/src/entry.c --- old/getdata-0.8.8/src/entry.c 2013-11-13 22:42:25.000000000 +0100 +++ new/getdata-0.8.9/src/entry.c 2015-05-28 23:45:23.000000000 +0200 @@ -1,4 +1,4 @@ -/* Copyright (C) 2008-2013 D. V. Wiebe +/* Copyright (C) 2008-2013, 2015 D. V. Wiebe * *************************************************************************** * @@ -850,7 +850,8 @@ free(field_code); if (E->field_type != GD_LINTERP_ENTRY) { - _GD_SetError(D, GD_E_BAD_FIELD_TYPE, GD_E_FIELD_BAD, NULL, 0, field_code); + _GD_SetError(D, GD_E_BAD_FIELD_TYPE, GD_E_FIELD_BAD, NULL, 0, + field_code_in); dreturn("%p", NULL); return NULL; } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/getdata-0.8.8/src/flush.c new/getdata-0.8.9/src/flush.c --- old/getdata-0.8.8/src/flush.c 2014-12-05 02:41:11.000000000 +0100 +++ new/getdata-0.8.9/src/flush.c 2015-05-28 23:45:32.000000000 +0200 @@ -1,4 +1,4 @@ -/* Copyright (C) 2008-2012 D. V. Wiebe +/* Copyright (C) 2008-2012, 2015 D. V. Wiebe * *************************************************************************** * @@ -253,7 +253,7 @@ #endif ) { fputs("\\x", stream); - fputc(HexDigit[*in >> 8], stream); + fputc(HexDigit[*in >> 4], stream); fputc(HexDigit[*in & 0xF], stream); len += 4; } else if (meta && *in == '/') diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/getdata-0.8.8/src/fragment.c new/getdata-0.8.9/src/fragment.c --- old/getdata-0.8.8/src/fragment.c 2013-11-13 22:42:25.000000000 +0100 +++ new/getdata-0.8.9/src/fragment.c 2015-05-19 22:44:17.000000000 +0200 @@ -143,7 +143,7 @@ /* look for a duplicate and validate */ if (new_codes[nn - 1] && _GD_FindField(D, new_codes[nn - 1], D->entry, - D->n_entries, 1, NULL)) + D->n_entries, 0, NULL)) { _GD_SetError(D, GD_E_DUPLICATE, 0, NULL, 0, new_codes[nn - 1]); } else if (_GD_ValidateField(new_codes[nn - 1], D->standards, 1, 0, diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/getdata-0.8.8/src/getdata.c new/getdata-0.8.9/src/getdata.c --- old/getdata-0.8.8/src/getdata.c 2014-12-05 22:40:33.000000000 +0100 +++ new/getdata-0.8.9/src/getdata.c 2015-05-28 22:12:34.000000000 +0200 @@ -1,5 +1,5 @@ /* Copyright (C) 2002-2005 C. Barth Netterfield - * Copyright (C) 2005-2013 D. V. Wiebe + * Copyright (C) 2005-2015 D. V. Wiebe * *************************************************************************** * @@ -274,17 +274,27 @@ } if (zero_pad > 0) { - n_read = _GD_FillZero(databuffer, E->EN(raw,data_type), (zero_pad > ns) ? - ns : - zero_pad); - ns -= n_read; - E->e->u.raw.file[0].pos = s0 + n_read - E->EN(raw,spf) * + /* frame offset in samples */ + off64_t foffs = E->EN(raw,spf) * D->fragment[E->fragment_index].frame_offset; + + n_read = _GD_FillZero(databuffer, E->EN(raw,data_type), + (zero_pad > ns) ? ns : zero_pad); + ns -= n_read; + + /* Padding up to the end of the frameoffset, results in a "real" file + * position. In this case we need to make sure the underlying file is + * actually at the BOF, for consistency. + */ + if (s0 + (off64_t)n_read == foffs) /* ie. file->pos is zero */ + _GD_Seek(D, E, foffs, GD_SEEK_SET); + else + E->e->u.raw.file[0].pos = s0 + n_read - foffs; s0 = 0; } if (ns > 0) { - /** open the file (and cache the fp) if it hasn't been opened yet. */ + /* open the file (and cache the fp) if it hasn't been opened yet. */ if (_GD_InitRawIO(D, E, NULL, 0, NULL, GD_EF_SEEK | GD_EF_READ, GD_FILE_READ, 0)) { @@ -1404,7 +1414,7 @@ /* extract bits */ if (is_signed) { - uint64_t sign = -1 << (E->EN(bit,numbits) - 1); + uint64_t sign = -1LL << (E->EN(bit,numbits) - 1); for (i = 0; i < n_read; i++) ((int64_t *)tmpbuf)[i] = (((((uint64_t *)tmpbuf)[i] >> E->EN(bit,bitnum)) & mask) + sign) ^ sign; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/getdata-0.8.8/src/getdata.h.in new/getdata-0.8.9/src/getdata.h.in --- old/getdata-0.8.8/src/getdata.h.in 2015-05-13 22:54:35.000000000 +0200 +++ new/getdata-0.8.9/src/getdata.h.in 2015-05-20 18:27:25.000000000 +0200 @@ -102,8 +102,6 @@ /* ICC complains that it ignores the __nonnull__ attribute */ #ifdef __INTEL_COMPILER # define gd_nonnull(...) /**/ -#elif defined __nonnull -# define gd_nonnull __nonnull #elif gd_gnu_enough # define gd_nonnull(...) __attribute__ ((__nonnull__ __VA_ARGS__)) #else diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/getdata-0.8.8/src/legacy.c new/getdata-0.8.9/src/legacy.c --- old/getdata-0.8.8/src/legacy.c 2014-12-05 02:41:11.000000000 +0100 +++ new/getdata-0.8.9/src/legacy.c 2015-05-28 23:46:46.000000000 +0200 @@ -1,6 +1,6 @@ /* Copyright (C) 2002-2005 C. Barth Netterfield * Copyright (C) 2003-2005 Theodore Kisner - * Copyright (C) 2005-2012 D. V. Wiebe + * Copyright (C) 2005-2012, 2015 D. V. Wiebe * *************************************************************************** * @@ -160,6 +160,7 @@ ptr = realloc(_GD_Dirfiles.D, (_GD_Dirfiles.n + 1) * sizeof(DIRFILE*)); if (ptr == NULL) { *error_code = _GD_GlobalErrors.error = GD_E_ALLOC; + free(filedir); dreturn("%p", NULL); return NULL; } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/getdata-0.8.8/src/mod.c new/getdata-0.8.9/src/mod.c --- old/getdata-0.8.8/src/mod.c 2014-12-05 02:41:11.000000000 +0100 +++ new/getdata-0.8.9/src/mod.c 2015-05-28 23:47:11.000000000 +0200 @@ -1,4 +1,4 @@ -/* Copyright (C) 2008-2012 D. V. Wiebe +/* Copyright (C) 2008-2012, 2015 D. V. Wiebe * *************************************************************************** * @@ -102,8 +102,6 @@ *(int32_t *)lout = *(int32_t *)lin; else if (type == GD_UINT32) *(uint32_t *)lout = *(uint32_t *)lin; - else if (type == GD_INT64) - *(int64_t *)lout = *(int64_t *)lin; else if (type == GD_UINT64) *(uint64_t *)lout = *(uint64_t *)lin; else @@ -1708,12 +1706,6 @@ return -1; } - /* the parser will modifiy in_cols[0] if it contains a metafield code */ - if ((new_code = _GD_Strdup(D, in_cols[0])) == NULL) { - dreturn("%i", -1); - return -1; - } - N = _GD_FindField(D, in_cols[0], D->entry, D->n_entries, 1, NULL); if (N == NULL) { @@ -1723,6 +1715,12 @@ return -1; } + /* the parser will modifiy in_cols[0] if it contains a metafield code */ + if ((new_code = _GD_Strdup(D, in_cols[0])) == NULL) { + dreturn("%i", -1); + return -1; + } + /* Let the parser compose the entry */ N = _GD_ParseFieldSpec(D, n_cols, in_cols, NULL, "dirfile_alter_spec()", 0, N->fragment_index, standards, 0, GD_PEDANTIC, 0, &outstring, tok_pos); @@ -1730,11 +1728,12 @@ free(outstring); if (D->error) { + free(new_code); dreturn("%i", -1); /* field spec parser threw an error */ return -1; } - /* The parse will have re-applied the prefix and suffix, undo that */ + /* The parser will have re-applied the prefix and suffix, undo that */ free(N->field); N->field = new_code; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/getdata-0.8.8/src/name.c new/getdata-0.8.9/src/name.c --- old/getdata-0.8.8/src/name.c 2013-11-13 22:42:25.000000000 +0100 +++ new/getdata-0.8.9/src/name.c 2015-05-28 23:49:33.000000000 +0200 @@ -1,4 +1,4 @@ -/* Copyright (C) 2008-2012 D. V. Wiebe +/* Copyright (C) 2008-2012, 2015 D. V. Wiebe * *************************************************************************** * @@ -541,6 +541,7 @@ if (ptr == NULL) { free(name); + free(filebase); dreturn("%i", -1); return -1; } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/getdata-0.8.8/src/parse.c new/getdata-0.8.9/src/parse.c --- old/getdata-0.8.8/src/parse.c 2014-12-05 22:40:33.000000000 +0100 +++ new/getdata-0.8.9/src/parse.c 2015-05-28 23:50:23.000000000 +0200 @@ -1,5 +1,5 @@ /* Copyright (C) 2002-2005 C. Barth Netterfield - * Copyright (C) 2005-2014 D. V. Wiebe + * Copyright (C) 2005-2015 D. V. Wiebe * *************************************************************************** * @@ -138,7 +138,7 @@ /* there were trailing characters in the double or real part of complex */ if (ptr != semicolon) { ptr = _GD_Strdup(D, token); - if (D->error) { + if (ptr == NULL) { dreturn("%p", NULL); return NULL; } @@ -1300,8 +1300,6 @@ for (c = first; c < n_cols; ++c) { ptr = _GD_SetScalar(D, in_cols[c], (char *)data + s * n++, t, me, format_file, line, &offset, &offset, standards, pedantic); - if (n == GD_MAX_CARRAY_LENGTH) - break; if (ptr) { free(ptr); @@ -1312,6 +1310,9 @@ dreturn("%p", NULL); return NULL; } + + if (n == GD_MAX_CARRAY_LENGTH) + break; } if (n_cols < MAX_IN_COLS) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/getdata-0.8.8/src/raw.c new/getdata-0.8.9/src/raw.c --- old/getdata-0.8.8/src/raw.c 2013-11-13 22:42:25.000000000 +0100 +++ new/getdata-0.8.9/src/raw.c 2015-05-25 23:59:43.000000000 +0200 @@ -1,4 +1,4 @@ -/* Copyright (C) 2008, 2010, 2011 D. V. Wiebe +/* Copyright (C) 2008, 2010, 2011, 2015 D. V. Wiebe * *************************************************************************** * @@ -59,15 +59,21 @@ pos = lseek64(file->idata, count * GD_SIZE(data_type), SEEK_SET); + /* If we've landed in the middle of a sample, we have to back up */ + if (pos > 0 && (pos % GD_SIZE(data_type))) + pos = lseek64(file->idata, -(pos % GD_SIZE(data_type)), SEEK_CUR); + if (pos == -1) { dreturn("%i", -1); return -1; } - file->pos = count; + pos /= GD_SIZE(data_type); + + file->pos = pos; - dreturn("%lli", (long long)count); - return count; + dreturn("%lli", (long long)pos); + return pos; } ssize_t _GD_RawRead(struct gd_raw_file_ *restrict file, void *restrict ptr, diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/getdata-0.8.8/src/sie.c new/getdata-0.8.9/src/sie.c --- old/getdata-0.8.8/src/sie.c 2015-05-02 01:24:37.000000000 +0200 +++ new/getdata-0.8.9/src/sie.c 2015-07-25 02:52:03.000000000 +0200 @@ -1,4 +1,4 @@ -/* Copyright (C) 2011, 2012, 2013 D. V. Wiebe +/* Copyright (C) 2011, 2012, 2013, 2015 D. V. Wiebe * *************************************************************************** * @@ -571,6 +571,11 @@ /* truncate the file if necessary */ if (rin < rout) { + if (fflush(f->fp)) { + free(p); + dreturn("%i", -1); + return -1; + } if (gd_truncate(fileno(f->fp), (nrec - rout + rin) * size)) { free(p); dreturn("%i", -1); @@ -673,6 +678,6 @@ fclose(f.fp); - dreturn("%llx", (long long unsigned)n); - return (off64_t)n; + dreturn("%llx", (long long unsigned)n + 1); + return (off64_t)n + 1; } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/getdata-0.8.8/test/Makefile.am new/getdata-0.8.9/test/Makefile.am --- old/getdata-0.8.8/test/Makefile.am 2015-05-05 01:39:49.000000000 +0200 +++ new/getdata-0.8.9/test/Makefile.am 2015-07-25 02:23:55.000000000 +0200 @@ -36,9 +36,9 @@ ADD_TESTS=add add_affix add_alias add_alias_affix add_alias_meta add_bit \ add_bit_bitnum add_bit_bitsize add_bit_invalid add_bit_numbits \ add_bit_scalars add_carray add_clincom add_code add_const \ - add_cpolynom add_crecip add_crecip89 add_divide add_divide_invalid \ - add_duplicate add_format add_invalid add_lincom add_lincom_affix \ - add_lincom_invalid add_lincom_nfields add_linterp \ + add_cpolynom add_crecip add_crecip89 add_dangle_dup add_divide \ + add_divide_invalid add_duplicate add_format add_invalid add_lincom \ + add_lincom_affix add_lincom_invalid add_lincom_nfields add_linterp \ add_linterp_invalid add_meta add_meta_alias add_mplex \ add_mplex_scalars add_multiply add_multiply_invalid add_phase \ add_phase_invalid add_polynom add_polynom_scalar add_protect add_raw \ @@ -164,8 +164,8 @@ flist_meta_invalid flist_type flist_type_hidden flist_type_invalid \ flist_type_meta flist_type_meta_hidden flist_type_meta_invalid -FLUSH_TESTS=flush flush_all flush_bad_code flush_invalid flush_meta flush_ref \ - flush_spec +FLUSH_TESTS=flush flush_all flush_bad_code flush_hex flush_invalid flush_meta \ + flush_ref flush_spec FOFFS_TESTS=foffs_alter foffs_get foffs_move @@ -186,7 +186,8 @@ get_endian_float32_arm get_endian_float32_big \ get_endian_float32_little get_endian_float64_arm \ get_endian_float64_big get_endian_float64_little get_ff get_float32 \ - get_float64 get_foffs get_fs get_here get_here_foffs get_heres \ + get_float64 get_foffs get_foffs2 get_fs get_here get_here_foffs \ + get_heres \ get_int8 get_int16 get_int32 get_int64 get_invalid get_lincom1 \ get_lincom2 get_lincom3 get_lincom_noin get_lincom_non \ get_lincom_null get_lincom_spf get_linterp get_linterp_noin \ @@ -329,12 +330,13 @@ repr_real_m repr_real_r repr_uint16 repr_uint32 repr_uint64 \ repr_uint8 -SEEK_TESTS=seek64 seek_cur seek_end seek_foffs seek_neg seek_set +SEEK_TESTS=seek64 seek_cur seek_end seek_foffs seek_foffs2 seek_neg seek_set SIE_TESTS=sie_get_big sie_get_little sie_move_from sie_move_to sie_nframes_big \ sie_nframes_little sie_put_big sie_put_append sie_put_append2 \ sie_put_back sie_put_little sie_put_many sie_put_newo sie_put_newo0 \ - sie_put_pad sie_put_pad0 sie_put_trunc sie_put_trunc2 sie_sync + sie_put_pad sie_put_pad0 sie_put_trunc sie_put_trunc2 \ + sie_put_trunc_nf sie_sync SLIM_TESTS=slim_get slim_nframes diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/getdata-0.8.8/test/add_dangle_dup.c new/getdata-0.8.9/test/add_dangle_dup.c --- old/getdata-0.8.8/test/add_dangle_dup.c 1970-01-01 01:00:00.000000000 +0100 +++ new/getdata-0.8.9/test/add_dangle_dup.c 2015-05-19 22:53:07.000000000 +0200 @@ -0,0 +1,51 @@ +/* Copyright (C) 2014 D. V. Wiebe + * + *************************************************************************** + * + * This file is part of the GetData project. + * + * GetData is free software; you can redistribute it and/or modify it under + * the terms of the GNU Lesser General Public License as published by the + * Free Software Foundation; either version 2.1 of the License, or (at your + * option) any later version. + * + * GetData is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public + * License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with GetData; if not, write to the Free Software Foundation, Inc., + * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + */ +#include "test.h" + +int main(void) +{ + const char *filedir = "dirfile"; + const char *format = "dirfile/format"; + int e1, e2, e3, r = 0; + DIRFILE *D; + + rmdirfile(); + + D = gd_open(filedir, GD_RDWR | GD_CREAT); + gd_add_alias(D, "name", "target", 0); + e1 = gd_error(D); + CHECKI(e1, GD_E_OK); + + gd_add_raw(D, "name", GD_UINT8, 1, 0); + e2 = gd_error(D); + CHECKI(e2, GD_E_DUPLICATE); + + gd_add_alias(D, "name", "target", 0); + e3 = gd_error(D); + CHECKI(e3, GD_E_DUPLICATE); + + gd_discard(D); + + unlink(format); + rmdir(filedir); + + return r; +} diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/getdata-0.8.8/test/flush_hex.c new/getdata-0.8.9/test/flush_hex.c --- old/getdata-0.8.8/test/flush_hex.c 1970-01-01 01:00:00.000000000 +0100 +++ new/getdata-0.8.9/test/flush_hex.c 2015-07-25 04:00:16.000000000 +0200 @@ -0,0 +1,54 @@ +/* Copyright (C) 2015 D. V. Wiebe + * + *************************************************************************** + * + * This file is part of the GetData project. + * + * GetData is free software; you can redistribute it and/or modify it under + * the terms of the GNU Lesser General Public License as published by the + * Free Software Foundation; either version 2.1 of the License, or (at your + * option) any later version. + * + * GetData is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public + * License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with GetData; if not, write to the Free Software Foundation, Inc., + * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + */ +#include "test.h" + +int main(void) +{ + const char *filedir = "dirfile"; + const char *format = "dirfile/format"; + int e1, e2, r = 0; + const char *in = + "\xF\x1E\x2D\x3C\x4B\x5A\x69\x78\x87\x96\xA5\xB4\xC3\xD2\xE1\xF0"; + char s[1000]; + DIRFILE *D; + + rmdirfile(); + D = gd_open(filedir, GD_RDWR | GD_CREAT | GD_TRUNC | + GD_VERBOSE); + gd_add_string(D, "STRING", in, 0); + e1 = gd_error(D); + CHECKI(e1, 0); + + gd_close(D); + + D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); + gd_get_string(D, "STRING", 1000, s); + e2 = gd_error(D); + CHECKI(e2, 0); + CHECKS(s, in); + + gd_discard(D); + + unlink(format); + rmdir(filedir); + + return r; +} diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/getdata-0.8.8/test/get_foffs2.c new/getdata-0.8.9/test/get_foffs2.c --- old/getdata-0.8.8/test/get_foffs2.c 1970-01-01 01:00:00.000000000 +0100 +++ new/getdata-0.8.9/test/get_foffs2.c 2015-05-25 23:08:27.000000000 +0200 @@ -0,0 +1,79 @@ +/* Copyright (C) 2015 D. V. Wiebe + * + *************************************************************************** + * + * This file is part of the GetData project. + * + * GetData is free software; you can redistribute it and/or modify it under + * the terms of the GNU Lesser General Public License as published by the + * Free Software Foundation; either version 2.1 of the License, or (at your + * option) any later version. + * + * GetData is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public + * License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with GetData; if not, write to the Free Software Foundation, Inc., + * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + */ +#include "test.h" + +#include <stdlib.h> +#include <sys/types.h> +#include <sys/stat.h> +#include <fcntl.h> +#include <string.h> +#include <errno.h> + +int main(void) +{ + const char *filedir = "dirfile"; + const char *format = "dirfile/format"; + const char *data = "dirfile/data"; + const char *format_data = "FRAMEOFFSET 2\ndata RAW UINT8 1\n"; + unsigned char c1[5], c2[5]; + unsigned char data_data[256]; + int i, fd, n1, n2, e1, e2, r = 0; + DIRFILE *D; + + rmdirfile(); + mkdir(filedir, 0777); + + for (i = 0; i < 256; ++i) + data_data[i] = (unsigned char)i; + + fd = open(format, O_CREAT | O_EXCL | O_WRONLY, 0666); + write(fd, format_data, strlen(format_data)); + close(fd); + + fd = open(data, O_CREAT | O_EXCL | O_WRONLY | O_BINARY, 0666); + write(fd, data_data, 256); + close(fd); + + D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); + n1 = gd_getdata(D, "data", 0, 0, 5, 0, GD_UINT8, c1); + e1 = gd_error(D); + CHECKI(n1, 5); + CHECKI(e1, 0); + + for (i = 0; i < 5; ++i) + CHECKUi(i, c1[i], (i < 2) ? 0 : i - 2); + + n2 = gd_getdata(D, "data", 0, 0, 5, 0, GD_UINT8, c2); + e2 = gd_error(D); + CHECKI(n2, 5); + CHECKI(e2, 0); + + for (i = 0; i < 5; ++i) + CHECKUi(i, c2[i], (i < 2) ? 0 : i - 2); + + gd_close(D); + + unlink(data); + unlink(format); + rmdir(filedir); + + return r; +} diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/getdata-0.8.8/test/seek_foffs2.c new/getdata-0.8.9/test/seek_foffs2.c --- old/getdata-0.8.8/test/seek_foffs2.c 1970-01-01 01:00:00.000000000 +0100 +++ new/getdata-0.8.9/test/seek_foffs2.c 2015-07-25 04:03:16.000000000 +0200 @@ -0,0 +1,73 @@ +/* Copyright (C) 2015 D. V. Wiebe + * + *************************************************************************** + * + * This file is part of the GetData project. + * + * GetData is free software; you can redistribute it and/or modify it under + * the terms of the GNU Lesser General Public License as published by the + * Free Software Foundation; either version 2.1 of the License, or (at your + * option) any later version. + * + * GetData is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public + * License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with GetData; if not, write to the Free Software Foundation, Inc., + * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + */ +#include "test.h" + +#include <stdlib.h> +#include <sys/types.h> +#include <sys/stat.h> +#include <fcntl.h> +#include <string.h> +#include <errno.h> + +int main(void) +{ + const char *filedir = "dirfile"; + const char *format = "dirfile/format"; + const char *data = "dirfile/data"; + const char *format_data = "FRAMEOFFSET 2\ndata RAW UINT8 1\n"; + unsigned char c1[5], c2[5]; + unsigned char data_data[256]; + int i, fd, e, r = 0; + off_t t, s; + DIRFILE *D; + + rmdirfile(); + mkdir(filedir, 0777); + + memset(data_data, 0, 256); + + fd = open(format, O_CREAT | O_EXCL | O_WRONLY, 0666); + write(fd, format_data, strlen(format_data)); + close(fd); + + fd = open(data, O_CREAT | O_EXCL | O_WRONLY | O_BINARY, 0666); + write(fd, data_data, 256); + close(fd); + + D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); + + for (i = 0; i < 10; ++i) { + s = gd_seek(D, "data", i, 0, GD_SEEK_SET); + e = gd_error(D); + t = gd_tell(D, "data"); + CHECKIi(i, s, i); + CHECKIi(i, e, GD_E_OK); + CHECKIi(i, t, i); + } + + gd_discard(D); + + unlink(data); + unlink(format); + rmdir(filedir); + + return r; +} diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/getdata-0.8.8/test/sie_nframes_big.c new/getdata-0.8.9/test/sie_nframes_big.c --- old/getdata-0.8.8/test/sie_nframes_big.c 2015-04-30 23:48:30.000000000 +0200 +++ new/getdata-0.8.9/test/sie_nframes_big.c 2015-07-25 00:34:02.000000000 +0200 @@ -1,4 +1,4 @@ -/* Copyright (C) 2011 D. V. Wiebe +/* Copyright (C) 2011, 2015 D. V. Wiebe * *************************************************************************** * @@ -28,7 +28,7 @@ const char *filedir = "dirfile"; const char *format = "dirfile/format"; const char *data = "dirfile/data.sie"; - const char *format_data = "data RAW UINT8 8\n/ENCODING sie\n/ENDIAN big\n"; + const char *format_data = "data RAW UINT8 1\n/ENCODING sie\n/ENDIAN big\n"; const uint8_t data_data[] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x12, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x22, @@ -56,7 +56,7 @@ gd_close(D); CHECKI(error, 0); - CHECKI(n, 6); + CHECKI(n, 0x31); return r; } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/getdata-0.8.8/test/sie_nframes_little.c new/getdata-0.8.9/test/sie_nframes_little.c --- old/getdata-0.8.8/test/sie_nframes_little.c 2015-04-30 23:48:37.000000000 +0200 +++ new/getdata-0.8.9/test/sie_nframes_little.c 2015-07-25 00:33:58.000000000 +0200 @@ -1,4 +1,4 @@ -/* Copyright (C) 2011 D. V. Wiebe +/* Copyright (C) 2011, 2015 D. V. Wiebe * *************************************************************************** * @@ -28,7 +28,7 @@ const char *filedir = "dirfile"; const char *format = "dirfile/format"; const char *data = "dirfile/data.sie"; - const char *format_data = "data RAW UINT8 8\n/ENCODING sie\n/ENDIAN little\n"; + const char *format_data = "data RAW UINT8 1\n/ENCODING sie\n/ENDIAN little\n"; const uint8_t data_data[] = { 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x12, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x22, @@ -56,7 +56,7 @@ gd_close(D); CHECKI(error, 0); - CHECKI(n, 6); + CHECKI(n, 0x31); return r; } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/getdata-0.8.8/test/sie_put_trunc_nf.c new/getdata-0.8.9/test/sie_put_trunc_nf.c --- old/getdata-0.8.8/test/sie_put_trunc_nf.c 1970-01-01 01:00:00.000000000 +0100 +++ new/getdata-0.8.9/test/sie_put_trunc_nf.c 2015-07-25 02:29:38.000000000 +0200 @@ -0,0 +1,60 @@ +/* Copyright (C) 2013 D. V. Wiebe + * + *************************************************************************** + * + * This file is part of the GetData project. + * + * GetData is free software; you can redistribute it and/or modify it under + * the terms of the GNU Lesser General Public License as published by the + * Free Software Foundation; either version 2.1 of the License, or (at your + * option) any later version. + * + * GetData is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public + * License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with GetData; if not, write to the Free Software Foundation, Inc., + * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + */ +#include "test.h" + +#include <stdlib.h> + +int main(void) +{ + const char *filedir = "dirfile"; + const char *format = "dirfile/format"; + const char *data = "dirfile/data.sie"; + const char *format_data = "/ENCODING sie\n/ENDIAN little\n"; + unsigned char c[] = {1, 1, 2, 1}; + DIRFILE *D; + int fd, n1, n2, r = 0; + + rmdirfile(); + mkdir(filedir, 0777); + + fd = open(format, O_CREAT | O_EXCL | O_WRONLY, 0666); + write(fd, format_data, strlen(format_data)); + close(fd); + + D = gd_open(filedir, GD_RDWR | GD_VERBOSE); + gd_add_raw(D, "data", GD_UINT8, 1, 0); + gd_putdata(D, "data", 0, 0, 0, 4, GD_UINT8, c); + gd_raw_close(D, "data"); + n1 = gd_nframes(D); + CHECKI(n1, 4); + + gd_putdata(D, "data", 0, 2, 0, 2, GD_UINT8, c); + n2 = gd_nframes(D); + CHECKI(n2, 4); + + gd_discard(D); + + unlink(data); + unlink(format); + rmdir(filedir); + + return r; +}
