2011-03-24 D. V. Wiebe <getdata@ketiltrout.net> svn:556
GetData-0.7.2 released. 2011-03-24 D. V. Wiebe <getdata@ketiltrout.net> svn:555 * test/move_data_enc_ar.c test/entry_phase.c test/get_ss.c test/alter_raw_type.c: Actually fail on error. 2011-03-23 D. V. Wiebe <getdata@ketiltrout.net> svn:551 GetData-0.7.2rc3: * m4/version.m4 configure.ac: Fix library soversion defines. 2011-03-23 D. V. Wiebe <getdata@ketiltrout.net> svn:550 * test/test.h: Write paths properly under WIN32/WIN64. 2011-03-23 D. V. Wiebe <getdata@ketiltrout.net> svn:549 * m4/python.m4: Use the BSD `jot' if the Linux/Plan 9 `seq' is not found. Also, look for python2.7. 2011-03-23 D. V. Wiebe <getdata@ketiltrout.net> svn:546 * src/include.c (_GD_Include): Handle WIN32 paths. 2011-03-23 D. V. Wiebe <getdata@ketiltrout.net> svn:545 * src/add.c (_GD_Add): strdup ref_name when propagating upwards to prevent double-free when _GD_FreeD() is called. * test/add_raw_include.c: Added. * src/include.c (gd_include): If GD_CREAT is specified, but no encoding, inherit encoding from parent. 2011-03-22 Peter Kümmel <syntheticpp@gmx.net> svn:535-541 * backport MSVC support * finish strtoll/strtoull replacement with gd_* functions * update CMake instructions * add CMake module which could be used by other CMake based projects 2011-03-22 D. V. Wiebe <getdata@ketiltrout.net> svn:532 GetData-0.7.2rc2. 2011-03-18 D. V. Wiebe <getdata@ketiltrout.net> svn:529 * m4/python.m4: Added --with-python-module-dir 2011-03-18 D. V. Wiebe <getdata@ketiltrout.net> svn:527 * test/test.h: Explicitly use long long format types in the checks. * src/legacy.c (GetFormat): Fix memset call. * src/common.c (_GD_GetLine): Remove unused first_char. * src/raw.c (_GD_RawSeek): nread is a ssize_t. * bindings/python/pydirfile.c (gdpy_dirfile_putcarray): Remove unused ns. * bindings/f77/test/big_test.f bindings/f77/test/big_test95.f90 bindings/f77/test/gdcopn.f bindings/f77/getdata.f90.in: Explicity specify constant kinds to stop the ridiculous complaints from Fedora's gfortran. * bindings/idl/Makefile.am: Don't needlessly rebuild sublist.c. * m4/encoding.m4: $1 is going to get overwritten, so save it early. Also, don't define $5 and $6 to the same name. 2011-03-17 Peter Kümmel <syntheticpp@gmx.net> * use _stat64 and struct _stat64 with msvc * fix tests by removing the content of dirfile * guard definitions of macros in C++ binding * build tests with C89 API 2011-03-17 D. V. Wiebe <getdata@ketiltrout.net> svn:517 * src/getdata.h.in: Replace #undefs with @DEFINE_...@ tokens. Define gd_off64_t instead of polluting the namespace. Remove MSCRT specal casing for the gd_*int*_t types. * configure.ac: Update for changes to getdata.h.in. Run getdata.h.in through config.status twice, first as an AC_CONFIG_FILE to replace all the @DEFINE...@s, second as an AC_CONFIG_HEADER as a NOP, just to get the change check. * cmake/CMakeLists.txt: Add DEFINE_... variables. * configure.ac: Check for _strtoi64() and _strtoui64() * src/internal.h: Use MSCRT's _strto[u]i64 for strto[u]ll when found. * cmake/CMakeLists.txt: Add -DHAVE__STRTOI64 -DHAVE__STRTOUI64 * test/parse_include_absrel.c test/parse_include_relabs.c test/parse_include_absolute.c: Free cwd. 2011-03-16 D. V. Wiebe <getdata@ketiltrout.net> svn:516 * configure.ac: check for "slimdata" in addition to "slim", which is what the binary is called under Fedora. * m4/encoding.m4 (GD_CHECK_ENCODING): Handle multiple binary names in $5 and $6. 2011-03-16 D. V. Wiebe <getdata@ketiltrout.net> svn:515 GetData-0.7.2rc1: * src/parse.c (_GD_ParseFieldSpec): Fix GD_E_FORMAT_DUPLICATE error data. Merged in changes from trunk, revision 514: * src/internal.h: Define S_ISREG and S_ISDIR if missing. 2011-03-14 D. V. Wiebe <getdata@ketiltrout.net> svn:513 * test/parse_include_absolute.c test/parse_include_absrel.c test/parse_include_relabs.c test/parse_include_relrel.c: Added. * src/include.c (_GD_Include): Handle absolute paths in /INCLUDE directives. The sname now contains D->name when appropriate. * src/add.c (_GD_Add) src/parse.c (_GD_ParseRaw) src/move.c (gd_move): Fix computation of filebase for new sname. 2011-03-03 D. V. Wiebe <getdata@ketiltrout.net> svn:510 * m4/idl.m4: Munge IDL_LIBS to convert "-m <arg>" into "-m<arg>" since libtool seems to delete <arg> if that's not the case. * m4/version.m4: Added. * bindings/idl/package: Added. * bindings/idl/Makefile.am bindings/idl/getdata.c: Update for external build. * configure.ac: Shipped version stuff off into m4/version.m4 * Makefile.am: Add rules for making idl_getdata package. * bindings/idl/makedlm.sh.in: Handle missing keyword "KEYWORD" better. 2011-02-26 D. V. Wiebe <getdata@ketiltrout.net> svn:507 * m4/python.m4 m4/encoding.m4 m4/idl.m4 configure.ac: Fix double quoting of brackets. * m4/win32.m4 m4/idl.m4: Fix some non-critical errors for OS X 10.5. * src/configure.ac: Added --with-module-dir. * src/Makefile.am: Install modules in $moduledir. -DGETDATA_MODULEDIR. * src/encoding.c (_GD_MissingFramework): Look for modules in GETDATA_MODULEDIR, but fall back to the default searchpath if that fails. Also removed support for unversioned modules. * bindings/python/test/big_test.py: Instead of whining, just delete the dirfile at the end. * src/encoding.c (_GD_MissingFramework): Release the mutex and zero _gd_ef[].provides on failure to find a module. 2010-12-13 Peter Kümmel <syntheticpp@gmx.net> svn 499 - 504 * cmake folder: CMake build system for Windows using MinGW or MS Visual Studio * src/msvc: files not available in MSVC, patched MinGW files * src/getdata.h.in: patches for MinGW and MSVC 2010-12-08 D. V. Wiebe <getdata@ketiltrout.net> svn:498 * src/getdata.h.in: Add meaningless stuff after #undef's to appease msys's config.status. 2010-12-08 D. V. Wiebe <getdata@ketiltrout.net> svn:497 * m4/encoding.m4: Replace TEST_<foo> AM_CONDITIONALs with a preprocessor symbols. * test/Makefile.am: Remove TEST_<foo> conditionals. * test/gzip_move_from.c test/bzip_get_get.c test/gzip_get_get.c test/gzip_get.c test/xz_nframes.c test/slim_nframes.c test/lzma_nframes.c test/slim_get.c test/lzma_get.c test/bzip_move_from.c test/xz_get.c: If helper binaries are unavailable, just skip these tests. * test/test.h: MSVC mkdir() patch from Peter Kümmel. 2010-12-07 D. V. Wiebe <getdata@ketiltrout.net> svn:494 MSVC fixes from Peter: * test/*.c: Remove unistd.h include. (It will be included in internal.h when needed.) * src/flush.c: No need to make the GD_VERS_* macros long longs. * src/putdata.c (_GD_DoConstOut): Cast to char* before performing pointer arithmetic. * src/mod.c (_gd_max): Renamed from max for better encapsulation. * src/internal.h: Conditionalise inclusion of non-ANSI unistd.h and stdint.h. Various _MSC_VER specific code. Also, define gd_stat64 and gd_stat64_t to plausibly useful things by default. * src/getdata.h.in: Remove unistd.h. Add math.h and some _MSC_VER specific code. (There are still unresolved MSVC issues with this file.) * bindings/cxx/*.cpp: Fix constructor inhertiance. * configure.ac: Check for unistd.h and stdint.h. 2010-12-06 D. V. Wiebe <getdata@ketiltrout.net> svn:493 GetData-0.7.1 released. 2010-11-30 D. V. Wiebe <getdata@ketiltrout.net> svn:488 GetData-0.7.1rc1: * src/del.c (gd_delete): Fix order of tests to avoid accessing out-of-bounds memory. * src/parse.c (_GD_ParseDirective): Don't update the version list if _GD_Include failed. * src/common.c (_GD_GetRepr): Don't attempt to find a representation suffix on field codes which are too short to contain them. * src/add.c (_GD_Add): Zero memory allocated for a CARRAY or CONST so behaviour is deterministic when creating these fields via gd_[m]add(). 2010-11-28 D. V. Wiebe <getdata@ketiltrout.net> svn:487 * src/ test/ bindings/: Separate declarations from statements; * src/common.c (_GD_SetTablePath): Don't use fixed length buffers. 2010-11-27 D. V. Wiebe <getdata@ketiltrout.net> svn:486 * bindings/cxx/test/big_test.cpp: Delete stuff. 2010-11-27 D. V. Wiebe <getdata@ketiltrout.net> svn:485 * test/alter_polynom_coeff.c test/include_ignore.c test/alter_entry.c test/entry_linterp.c test/entry_multiply.c test/move_data_enc_ar.c test/gzip_move_from.c test/include_ref.c test/global_name.c test/entry_phase.c test/move_data_foffs.c test/entry_raw_scalar.c test/alter_entry_scalar3.c test/move_data_endian.c test/move.c test/entry_raw.c test/move_data_nop.c test/alter_entry_scalar4.c test/entry_polynom_scalar.c test/move_index.c test/header_complex.c test/alter_entry_recode.c test/entry_bit_scalar.c test/entry_scalar_repr.c test/entry_polynom.c test/file.c test/entry_lincom.c test/name_move.c test/fragment_name.c test/move_data_enc_ra.c test/move_protect.c test/alter_entry_scalar2n.c test/move_subdir.c test/entry_lincom_scalar.c test/entry_phase_scalar.c test/alter_crecip89.c test/bzip_move_from.c test/move_meta.c test/name.c test/entry_bit.c test/alter_entry_scalar2a.c test/alter_linterp.c test/global_ref_set.c test/global_ref.c test/include_auto.c: Free strings. * test/trunc_rofs.c test/open_notdirfile.c test/open_nonexistent.c: Close dirfiles. * src/entry.c (_GD_FreeE): Free LUT. * src/open.c (_GD_CreateDirfile): Close DIR after truncation. * src/close.c (_GD_FreeD): Free dot list. * src/getdata.c (_GD_DoRaw) src/putdata.c (_GD_DoRawOut): Free databuffer on error. * src/lzma.c (_GD_LzmaSize) src/bzip.c (_GD_Bzip2Size): Close file. * src/move.c (_GD_MogrifyFile): Free new_filebase if necessary. * src/parse.c (_GD_ParseFieldSpec): Free entry on duplicate field name. * src/mod.c (_GD_Change): Transfer the old file structure to the new entry in the case of RAW fields. Don't forget to free the old CONST storage, if necessary. * src/include.c (gd_include): Always free ref_name. * src/raw.c (_GD_RawTemp): Call the right close function on error. * src/mod.c (gd_alter_crecip89): For some reason, intialise scalar_ind[0]. * src/parse.c (_GD_ParseFragment _GD_ParseFieldSpec): Handle GD_IGNORE_DUPS inside _GD_ParseFieldSpec, which eliminates the spurious error message if GD_VERBOSE is given. 2010-11-26 D. V. Wiebe <getdata@ketiltrout.net> svn:484 * test/ascii_get_get.c: Added. * src/ascii.c (_GD_AsciiRead): Update fp as necessary so we don't get lost. * bindings/python/pygetdata.c (gdpy_convert_from_pylist): Don't type-pun the return array into a gdpy_quadruple_value. * src/open.c (gd_cbopen): Don't allocate error string buffers. * src/errors.c (_GD_SetError): Use strdup to copy error strings. * bindings/f77/fgetdata.c (GDASCA): Clean-up. * src/del.c (gd_delete): Alloc the correct del_list for metafields. * src/common.c (_GD_GetLine): Deallocate the line before returning NULL. * src/entry.c (_GD_FreeE): Free p.meta_entry when appropriate. * src/nan.h: Added. * src/internal.h: Removed NAN code. * util/dirfile2ascii.c: Add missing -u option. Allow cart-before-horse arguments (ie. "dirfile2ascii -e field dirfile"). Handle running past the end-of-field nicelier (added -z option). Complain on no dirfile. 2010-11-22 D. V. Wiebe <getdata@ketiltrout.net> svn:480 GetData 0.7.0 released. 2010-11-20 D. V. Wiebe <getdata@ketiltrout.net> svn:478 * bindings/idl/getdata.c: Properly terminate IDL keyword lists. 2010-11-17 D. V. Wiebe <getdata@ketiltrout.net> svn:476 * bindings/python/pydirfile.c (gdpy_dirfile_init) bindings/cxx/getdata/dirfile.h: Open dirfiles read-only by default (for compatibility with the C API. 2010-11-16 D. V. Wiebe <getdata@ketiltrout.net> svn:475 * bindings/python/pydirfile.c (gdpy_dirfile_getdata): If neither num_samples or num_frames are specified, raise ValueError. 2010-11-06 D. V. Wiebe <getdata@ketiltrout.net> svn:473 GetData-0.7.0rc4: * src/errors.c (_GD_SetError): Rename variable.o * bindings/python/pygetdata.c (gdpy_type_from_npytype): Explicitly cast the computed types. 2010-11-06 D. V. Wiebe <getdata@ketiltrout.net> svn:472 * src/ascii.c (_GD_AsciiOpen _GD_AsciiSize _GD_AsciiTemp) src/common.c (_GD_ReadLinterpFile): Open text files in binary mode. * src/internal.h: Define EOVERFLOW if necessary. Also handle missing fseeko64 and ftello64. * src/compat.c (getdelim): Work around the bizarre behaviour of MSVCRT's standard I/O. 2010-11-06 D. V. Wiebe <getdata@ketiltrout.net> svn:470 * src/getdata.h.in: Rename 'cons' to 'scalar' in the unified entry struct. * src/internal.h: Remove GD_ANON from the private entry struct. 2010-11-06 D. V. Wiebe <getdata@ketiltrout.net> svn:469 * bindings/python/test/big_test.py bindings/cxx/test/big_test.cpp bindings/f77/test/big_test.f bindings/f77/test/big_test95.f90 bindings/idl/test/big_test.pro: Added tests 158 through 181. * test/put_carray_slice.c test/cvlist_array_meta.c test/del_carray.c test/get_carray_slice.c test/cvlist_array.c test/del_carray_deref.c test/nmeta_vectors_del.c test/get_carray.c test/parse_carray.c test/madd_carray.c test/add_carray.c test/put_carray.c test/get_carray_len.c test/parse_carray_long.c test/alter_carray_len.c test/alter_carray_type.c: Added. * test/madd.c: Remove gd_get_constant call. * test/parse_const.c: Actually test what is advertised. * bindings/python/pydirfile.c (gdpy_dirfile_getcarray gdpy_dirfile_carraylen gdpy_dirfile_carrays gdpy_dirfile_mcarrays gdpy_dirfile_putcarray) bindings/python/pyentry.c (gdpy_entry_getarraylen gdpy_entry_setarraylen): Added. * bindings/python/pyentry.c (gdpy_set_entry_from_tuple gdpy_set_entry_from_dict gdpy_entry_getinfields gdpy_entry_getdatatypename gdpy_entry_getdatatype): Update for CARRAY. * bindings/cxx/bitentry.cpp (BitEntry::ScalarIndex) bindings/cxx/entry.cpp (scalar_ok Entry::ScalarIndex Entry::SetScalar) bindings/cxx/lincomentry.cpp (LincomEntry::ScalarIndex) bindings/cxx/dirfile.cpp (Dirfile::Carrays Dirfile::CarrayLen Dirfile::MCarrays Dirfile::GetCarray Dirfile::PutCarray) bindings/cxx/polynomentry.cpp (PolynomEntry::ScalarIndex) bindings/cxx/sbitentry.cpp (SBitEntry::ScalarIndex) bindings/cxx/getdata/rawentry.h (ScalarIndex) bindings/cxx/getdata/recipentry.h (ScalarIndex): Added. * bindings/cxx/bitentry.cpp (BitEntry::SetFirstBit BitEntry::SetNumBits) bindings/cxx/lincomentry.cpp (LincomEntry::SetScale LincomEntry::SetOffset) bindings/cxx/polynomentry.cpp (PolynomEntry::SetCoefficient) bindings/cxx/phaseentry.cpp (PhaseEntry::SetShift) bindings/cxx/sbitentry.cpp (SBitEntry::SetFirstBit SBitEntry::SetNumBits) bindings/cxx/recipentry.cpp (RecipEntry::SetDividend): Call Entry::SetScalar. * bindings/cxx/entry.cpp (Entry::Scalar): Call scalar_ok. * bindings/cxx/carrayentry.cpp bindings/cxx/getdata/carrayentry.h: Added. * bindings/cxx/dirfile.cpp (Dirfile::ErrorString): Let the C library malloc the string. Also added a prototype with no parameters. * bindings/f77/fgetdata.c (GDGECA GDADCA GDGTCA GDGCAS GDCALN GDPTCA GDPCAS GDALCA): * bindings/f77/fgetdata.c (GDGTCO GDPTCO): Removed the returned integer. * bindings/f77/fgetdata.c (GDGSCA GDASCA): Deal with scalar index. * bindings/f77/getdata.f90.in (fgd_get_constant_n fgd_get_constant_i1 fgd_get_constant_i2 fgd_get_constant_i4 fgd_get_constant_i8 fgd_get_constant_r4 fgd_get_constant_r8 fgd_get_constant_c8 fgd_get_constant_c16 fgd_put_constant_i1 fgd_put_constant_i2 fgd_put_constant_i4 fgd_put_constant_i8 fgd_put_constant_r4 fgd_put_constant_r8 fgd_put_constant_c8 fgd_put_constant_c16): Convert to subroutines. * bindings/f77/getdata.f90.in (fgd_entry fgd_add fgd_madd fgd_alter_entry): Update for CARRAY. * bindings/f77/getdata.f90.in (fgd_get_carray_n fgd_get_carray_i1 fgd_get_carray_i2 fgd_get_carray_i4 fgd_get_carray_i8 fgd_get_carray_c16 fgd_put_carray_i1 fgd_put_carray_i2 fgd_put_carray_i4 fgd_put_carray_i8 fgd_put_carray_r4 fgd_put_carray_r8 fgd_put_carray_c8 fgd_put_carray_c16 fgd_carray_len fgd_add_carray fgd_madd_carray fgd_alter_carray): Added. * bindings/idl/getdata.c (gdidl_make_idl_entry): Update for CARRAY. * bindings/idl/getdata.c (gdidl_add_const): fix handling of data values * bindings/idl/getdata.c (gdidl_add_carray gdidl_alter_carray gdidl_get_carray gdidl_carray_len gdidl_put_carray): Added. * bindings/idl/getdata.c (gdidl_getdata): Free data on error. * bindings/idl/getdata.c (gdidl_get_constant): Free data on return. * src/interna.h: Replace the const data union with a void pointer. * src/getdata.h.in: Define GD_MAX_CARRAY_LENGTH. * src/common.c (_GD_GetLine): Call getdelim. Return string length not string itself. * src/parse.c (_GD_ParseFragment): Handle n_cols < 2. Raise GD_E_LINE_TOO_LONG on overflow. * src/parse.c (_GD_ParseFragment) mod.c (gd_alter_spec gd_malter_spec) src/add.c (gd_add_spec gd_madd_spec): Don't provide buffers for instring and outstring: they will be malloc'd by others. * src/parse.c (_GD_Tokenise): Dynamically allocate outstring. Also, remember position, so tokenising can resume. * src/parse.c (_GD_ParseFieldSpec _GD_ParseDirective): Pass through tok_pos and outstring. * src/compat.c (getdelim): Added. * src/parse.c (_GD_ParseFragment): Permit the parser callback to re-malloc pdata.line. Also pass it the current length of pdata.line. * src/entry.c (_GD_FreeE) src/nmeta.c (gd_nmvectors gd_nmfields_by_type) src/close.c (_GD_FreeD) src/flush.c (_GD_FieldSpec) src/nfields.c (gd_nvectors gd_nfields_by_type) src/native.c (_GD_NativeType) src/del.c (gd_delete) src/parse.c (_GD_ParseFieldSpec) src/mod.c (_GD_Change) src/add.c (_GD_Add): Update for CARRAY. * src/getdata.c (_GD_DoConst) src/putdata.c (_GD_DoConstOut) src/flush.c (_GD_WriteConst): Handle both CONST and CARRAY. * src/constant.c (gd_get_carray_slice gd_get_carray gd_carray_len gd_put_carray_slice gd_put_carray) src/parse.c (_GD_ConstType _GD_ParseCarray) gd_field_lists (gd_carrays) src/mod.c (gd_alter_carray) src/meta_list.c (gd_mcarrays) src/add.c (gd_add_carray gd_madd_carray): Added. * src/parse.c (_GD_ParseConst): Storage for constant value is now dynamic. * src/del.c (gd_delete): Update parent when deleting a metafield. * src/ascii.c (_GD_AsciiSize) src/common.c (_GD_ReadLinterpFile): Call getdelim. * src/flush.c (_GD_FlushFragment): Skip writing and /ENCODING directive if not known. * src/errors.c (gd_error_string): malloc a suitably sized buffer for the string if passed buffer=NULL. * src/name.c (gd_rename) src/del.c (gd_delete) src/include.c (gd_uninclude): Invalidate the field lists. * src/flush.c (_GD_StringEscapeise _GD_PadField) _GD_FieldSpec: Write directly to the stream, rathen than an intermediate buffer. * src/entry.c (_GD_GetScalar) parse.c (_GD_SetScalar) src/mod.c (_GD_AlterScalar): Handle the scalar index. * src/legacy.c (_GD_CopyGlobalError): Dynamically handle error strings, rather than using _GD_GlobalErrorString and _GD_GlobalErrorFile. 2010-10-28 D. V. Wiebe <getdata@ketiltrout.net> svn:468 * src/legacy.c (GetFormat): Fix counting of POLYNOM fields. 2010-10-22 D. V. Wiebe <getdata@ketiltrout.net> svn:463 GetData-0.7.0rc3: * src/parse.c (_GD_ParseDirective): Update passed flags, not D->flags after /INCLUDE. * src/common.c (lutcmp): Don't rely on typecasting to retain the -0+ distiction. 2010-10-22 D. V. Wiebe <getdata@ketiltrout.net> svn:462 * configure.ac m4/encoding.m4: Compute PRIVATE_LIBS * src/getdata.pc: Correct private libs. 2010-10-22 D. V. Wiebe <getdata@ketiltrout.net> svn:461 * bindings/python/test/big_test.py bindings/cxx/test/big_test.cpp bindings/f77/test/big_test.f bindings/f77/test/big_test95.f90 bindings/idl/test/big_test.pro: Added tests 156 and 157. * bindings/python/pydirfile.c (gdpy_dirfile_init): Allow name=None to create an invalid dirfile. * bindings/python/pydirfile.c (gdpy_dirfile_close gdpy_dirfile_discard): Don't check dirfile error on success. * bindings/python/pygetdata.c: Add missing exceptions. * bindings/python/pydirfile.c bindings/python/pyfragment.c: Update docs. * bindings/make_parameters.c: GD_ARM_ENDIAN and GD_NOT_ARM_ENDIAN are type 2 constants. Exclude unnecessary constants in Python and IDL. GD_VERSION_* added. * bindings/cxx/dirfile.cpp (Dirfile::Dirfile): Create the invalid dirfile using gd_invalid_dirfile(). * bindings/python/pydirfile.c (gdpy_dirfile_getstandards gdpy_dirfile_setstandards) bindings/f77/fgetdata.c (GDINVD GDSTDV) bindings/f77/getdata.f90.in (fgd_invalid_dirfile fgd_dirfile_standards) bindings/idl/getdata.c (gdidl_invalid_dirfile gdidl_dirfile_standards) bindings/cxx/dirfile.cpp (Dirfile::Standards): Added. * bindings/idl/getdata.c: Fix for GD_NOT_ARM_ENDIAN. 2010-10-21 D. V. Wiebe <getdata@ketiltrout.net> svn:460 * test/endian_get.c: Test ARM endianness. * bindings/python/test/big_test.py bindings/cxx/test/big_test.cpp bindings/f77/test/big_test.f bindings/f77/test/big_test95.f90 bindings/idl/test/big_test.pro: Fix test 79 on middle-ended platforms. * src/getdata.h.in: Added GD_NOT_ARM_ENDIAN and conditionally figure out whether it or GD_ARM_ENDIAN should be zero. * bindings/make_parameters.c: Added GD_NOT_ARM_ENDIAN. * src/internal.h: compute GD_ARM_FLAG. * src/endian.c (_GD_ByteSwapFragment) src/open.c (gd_cbopen) src/getdata.c (_GD_DoRaw) src/flush.c (_GD_FlushFragment) src/putdata.c (_GD_DoRawOut) src/parse.c (_GD_ParseDirective): Fix handling of ARM flag. * src/move.c (_GD_MogrifyFile): Only apply the ARM fix to double precision data. Also fixed the count in byte swapping calls. * src/flush.c (_GD_FindVersion): Fix logic for ARM endianness. Fix ordering of fragment metadata tests. * src/flush.c (_GD_FindVersion) src/errors.c: Better script for GD_E_BAD_VERSION. Differentiate between a non-conformant dirfile and an invalid version number. 2010-10-20 D. V. Wiebe <getdata@ketiltrout.net> svn:459 * test/version_5.c: Fix for WORDS_BIGENDIAN. * src/getdata.c (_GD_DoRaw) src/putdata.c (_GD_DoRawOut): Fix _GD_FixEndianness test. * src/flush.c (_GD_FindVersion): Native byte sex is assumed in early versions. 2010-10-19 D. V. Wiebe <getdata@ketiltrout.net> svn:457 * legacy.c (_GD_GetDirfile): On error, set *error_code (now passed as a parameter), copy the error, discard the bad dirfile, and return NULL. 2010-10-18 D. V. Wiebe <getdata@ketiltrout.net> svn:456 GetData-0.7.0rc2: * encoding.c (_GD_ResolveSymbol _GD_MissingFramework): Fix types for USE_MODULES. 2010-10-17 D. V. Wiebe <getdata@ketiltrout.net> svn:455 GetData-0.7.0rc1: * configure.ac: update library interface numbers. Removed --disable-checkdirfile. * MEWS: Update. 2010-10-16 D. V. Wiebe <getdata@ketiltrout.net> svn:453 * configure.ac: Generate Makefiles even for bindings we're not using (so we can still run maintainer tasks on them.) 2010-10-16 D. V. Wiebe <getdata@ketiltrout.net> svn:452 * src/getdata.h.in: Keep anonymous structs and unions in C99-mode. * src/internal.h: Helper macros for C99/C89 differences. * test/ src/ bindings/: Update for changes. 2010-09-18 D. V. Wiebe <getdata@ketiltrout.net> svn:448 * bindings/python/pydirfile.c (gdpy_dirfile_close gdpy_dirfile_discard) bindings/cxx/dirfile.cpp (Dirfile::Discard Dirfile::Close) bindings/f77/fgetdata.c (_GDF_InitDirfiles) bindings/idl/getdata.c (gdidl_init_dirfile): Call gd_invalid_dirfile() instead of using GetData C internals. * src/open.c (gd_invalid_dirfile): Added. * bindings/cxx/: Declare const member functions. * configure.ac: Fix mkdir check for C++ compilers masquerading as C compilers. * src/legacy.c: Humanely initialise _GD_GlobalErrors when possible. 2010-09-17 D. V. Wiebe <getdata@ketiltrout.net> svn:447 * test/Makefile.am src/Makefile.am bindings/python/Makefile.am bindings/cxx/Makefile.am bindings/f77/test/Makefile.am bindings/f77/Makefile.am bindings/idl/Makefile.am util/Makefile.am: Remove hardcoded -Wall. * m4/compiler.m4 (GD_PROG_CC_WALL GD_PROG_CXX_WALL GD_PROG_FC_WALL GD_PROG_F77_WALL): Added. * configure.ac: Check whether the compilers accept -Wall * bindings/cxx/big_test.cpp: Fix for renamed functions. 2010-09-15 D. V. Wiebe <getdata@ketiltrout.net> svn:446 * bindings/cxx/dirfile.cpp (Dirfile::EoF Dirfile::BoF): Renamed. 2010-09-11 D. V. Wiebe <getdata@ketiltrout.net> svn:445 * bindings/f77/fgetdata.c (GDFNSS): Don't call the explicitly 64-bit version of gd_framenum_subset. * util/dirfile2ascii.c: Unroll type_data initialisation some more. 2010-09-11 D. V. Wiebe <getdata@ketiltrout.net> svn:444 * test/ src/ bindings/ util/: ANSI-C-ify. * src/getdata.h.in: Define GD_NO_C99_API when the C99-compliant API has been disabled at build time. * src/getdata.h.in src/internal.h: ANSI C does not permit anonymous union and structures, so name all the sub-bits of gd_entry_t and gd_private_entry. * src/getdata.h.in: Encompass everything in an extern "C" block for C++ compilers. * src/: include gd_throw in definition of functions. * src/debug.c src/common.c src/Makefile.am: Move gd_col_count and gd_debug_col to common.c to remove the need for GDLIB. * test/legacy_get_rofs.c test/legacy_get.c test/legacy_nonexistent.c test/legacy_put.c: Fix skip test. * test/flush_spec.c: Skip the blank line. * test/slim_nframes.c: Add missing r. * bindings/idl/test/Makefile.am: Use DL_LIBRARY_PATH in TESTS_ENVIRONMENT. * configure.ac: Add --enable-ansi-c, which will disable Python and IDL. A fail of AC_PROG_CC_C99 will also cause this to be asserted. * configure.ac: Fix lfs_transitional_api check. 2010-08-10 D. V. Wiebe <getdata@ketiltrout.net> svn:443 * src/common.c (_GD_BadInput): Check the propper entry for scalarness. 2010-08-10 D. V. Wiebe <getdata@ketiltrout.net> svn:442 * bindings/cxx/getdata/linterpentry.h bindings/cxx/getdata/bitentry.h bindings/cxx/getdata/entry.h bindings/cxx/getdata/sbitentry.h: Remove __gd_unused. * src/endian.c (_GD_ByteSwapFragment) src/encoding.c (_GD_RecodeFragment) src/move.c (gd_move) src/flimits.c (_GD_ShiftFragment) src/mod.c (_GD_Change) src/globals.c (gd_reference) src/add.c (_GD_Add gd_madd_spec gd_add_spec): Clear GD_HAVE_VERSION. * src/mod.c (gd_alter_spec gd_malter_spec): Use the standards version of the open dirfile rather than GD_DIRFILE_STANDARDS_VERSION. * src/include.c (gd_include): Calculate the opend dirfile's version if necessary, and use this instead of GD_DIRFILE_STANDARDS_VERSION. Clear GD_HAVE_VERSION at the end. * src/getdata.c (gd_getdata64) src/putdata.c (gd_putdata64) src/flimits.c (_GD_GetEOF _GD_GetBOF): Return GD_E_DIMENSION instead of GD_E_BAD_FIELD_TYPE on scalar field. * src/errors.c: Add GD_E_DIMENSION errors. * src/internal.h: Add GD_E_DIMENSION suberrors. * src/getdata.h.in src/errors.c: Rename GD_E_OPEN_INCLUDE to GD_E_OPEN_FRAGMENT. * bindings/make_parameters.c: Add GD_E_OPEN_FRAGMENT (in addition to the legacy GD_E_OPEN_INCLUDE, which remains). * src/getdata.h.in configure.ac: Rename GETDATA_LEGACY_API, NO_GETDATA_LEGACY_API, GETDATA_C89_API, GETDATA_FUNCTION_ALIASES, DIRFILE_STANDARDS_VERSION to GD_LEGACY_API, GD_NO_LEGACY_API, GD_C89_API, GD_FUNCTION_ALIASES, GD_DIRFILE_STANDARDS_VERSION. * util/checkdirfile.c: Fix pluralisations. 2010-07-20 D. V. Wiebe <getdata@ketiltrout.net> svn:441 * src/flush.c (_GD_FlushMeta gd_metaflush gd_rewrite_fragment): Return error on read-only dirfile. 2010-07-20 D. V. Wiebe <getdata@ketiltrout.net> svn:440 * util/checkdirfile.c: Fix reporting of conformant Standards Versions. 2010-07-20 D. V. Wiebe <getdata@ketiltrout.net> svn:439 * test/version_0_write.c test/version_1_write.c test/version_2_write.c test/version_3_write.c test/version_4_write.c test/version_5_write.c test/version_6_write.c test/version_7_write.c test/version_8_write.c: Added. * bindings/python/test/big_test.py bindings/cxx/test/big_test.cpp bindings/f77/test/big_test95.f90 bindings/f77/test/big_test.f bindings/idl/test/big_test.pro: Add test 155. * bindings/python/pyfragment.c (gdpy_fragment_rewrite): Added. * bindings/cxx/fragment.cpp (Fragment::ReWrite): Added. * bindings/f77/fgetdata.c (GDRFRG): Added. * bindings/f77/getdata.f90.in (fgd_rewrite_fragment): Added. * bindings/idl/getdata.c (gdidl_gd_rewrite_fragment): Added. * src/flush.c (_GD_OldTypeName): Added * src/flush.c (_GD_StringEscapeise _GD_PadField): Avoid escaping on early versions. * src/flush.c (_GD_FieldSpec _GD_FlushFragment): Write the specified version metadata. * src/flush.c (_GD_FlushMeta): Add force parameter. * src/flush.c (gd_rewrite_fragment): Added. * src/flush.c (_GD_FindVersion): Remove the REFERENCE check: it can be wrong. 2010-07-17 D. V. Wiebe <getdata@ketiltrout.net> svn:438 * test/version_0.c test/version_1.c test/version_2.c test/version_3.ctest/version_4.c: Weed out version 8. * test/add_spec_directive.c: The test works again in version 8, so try it in version 7. * test/version_8_strict.c: Test syntax removed in version 8. * bindings/idl/getdata.c (gdidl_gd_alter_endianness gdidl_gd_include gdidl_gd_open): Handle ARM_ENDIAN and PERMISSIVE. * bindings/make_parameters.c: Add GD_ARM_ENDIAN and GD_PERMISSIVE. * src/add.c (gd_madd_spec gd_add_spec): Use the current version rather than DIRFILE_STANDARDS_VERSION when calling the parser. * src/name.c (_GD_ValidateField): Allow directives as field names in version 8 * src/endian.c (_GD_ByteSwapFragment) src/move.c (_GD_MogrifyFile): Handle ARM ended floats. * src/flush.c (_GD_FindVersion): Directives are permitted as field names in version 8. * src/parse.c (_GD_RawType): Single character types aren't permitted in version 8. * src/parse.c (_GD_ParseDirective): Slash is mandatory in version 8. * src/open.c (gd_cbopen) getdata.c (_GD_DoRaw) putdata.c (_GD_DoRawOut: Merge byte_sex and float_sex. * src/flush.c (_GD_FlushFragment) src/parse.c (_GD_ParseDirective): Allow only "arm" as float sex in format. 2010-07-15 D. V. Wiebe <getdata@ketiltrout.net> svn:436 * bindings/f77/test/big_test.f: Added tests 143-154 * bindings/f77/test/big_test95.f90: Added tests 143, 145-154 * bindings/cxx/test/big_test.cpp: Added tests 143, 145-148, 152, 153 * bindings/idl/test/big_test.pro: Added tests 143, 145, 146, 148, 152, 153 * bindings/python/test/big_test.py: Added tests 143, 145, 146, 149, 151 * bindings/f77/fgetdata.c (GDGEDV GDGERC GDGECR GDADDV GDADRC GDADCR GDMDDV GDMDRC GDMDCR GDALDV GDALRC GDALCR): Added. * bindings/f77/fgetdata.c (GDGSCA GDASCA): Update for DIVIDE and RECIP. * bindings/f77/getdata.f90.in (fgd_entry fgd_add fgd_madd fgd_alter_entry): Update for DIVIDE and RECIP. * bindings/f77/getdata.f90.in (fgd_add_divide fgd_add_recip fgd_add_crecip fgd_madd_divide fgd_madd_recip fgd_madd_crecip): Added. * bindings/cxx/entry.cpp (Entry::CheckIndex Entry::Scalar) bindings/cxx/dirfile.cpp (Dirfile::Entry) bindings/cxx/getdata/entry.h: Update for DIVIDE and RECIP. * bindings/cxx/entry.cpp (Entry::Scalar): Don't reject valid indicies. * bindings/cxx/recipentry.cpp bindings/cxx/divideentry.cpp bindings/cxx/getdata/recipentry.h bindings/cxx/getdata/divideentry.h: Added. * bindings/python/pyentry.c (gdpy_entry_getdividend gdpy_entry_setdividend): Added. * bindings/python/pyentry.c (gdpy_set_entry_from_tuple gdpy_set_entry_from_dict gdpy_entry_getinfields gdpy_entry_setinfields gdpy_entry_getparms): Update for DIVIDE and RECIP. * bindings/idl/getdata.c (gdidl_make_idl_entry gdidl_read_idl_entry): Update for DIVIDE and RECIP. * bindings/idl/getdata.c (gdidl_gd_add_divide gdidl_gd_add_recip gdidl_gd_alter_divide gdidl_gd_alter_recip): Added. * bindings/python/pydirfile.c: Doc updates. * bindings/python/pyentry.c (gdpy_entry_getshift): Properly handle non-literal scalar fields. * bindings/make_parameters.c: Update. * test/dfes_recip.c test/get_recip.c test/parse_recip.c test/alter_recip.c test/put_recip.c test/spf_recip.c test/version_8.c test/get_recip_const.c test/alter_crecip89.c test/alter_crecip.c: Update for swapped parameters. * src/parse.c (_GD_ParseRecip): Swap order of parameters in spec line to agree with other derived fields. Initalise comp_scal. * src/debug.c: Export the shift buffer. 2010-07-11 D. V. Wiebe <getdata@ketiltrout.net> svn:435 The Great Renaming, part 2: removed get_ from many public function names. 2010-07-10 D. V. Wiebe <getdata@ketiltrout.net> svn:434 * test/madd_crecip.c test/add_recip.c test/add_crecip.c test/dfes_recip.c test/get_recip.c test/spf_divide.c test/parse_recip.c test/alter_recip.c test/put_recip.c test/spf_recip.c test/version_8.c test/madd_recip.c test/madd_crecip89.c test/dfes_divide.c test/get_recip_const.c test/alter_crecip89.c test/get_divide.c test/parse_divide.c test/version_8_strict.c test/add_divide_invalid.c test/madd_divide.c test/add_divide.c test/put_divide.c test/add_crecip89.c test/alter_crecip.c: Added. * src/entry.c (_GD_FreeE _GD_CalculateEntry gd_get_entry gd_validate) src/getdata.c (_GD_DoField) src/native.c (_GD_NativeType) src/spf.c (_GD_GetSPF) src/putdata.c (_GD_DoFieldOut) src/del.c (_GD_DeReference _GD_ClearDerived) src/flimits.c (_GD_GetEOF _GD_GetBOF) src/mod.c (_GD_Change) src/add.c (_GD_Add): Split RECIP from DIVIDE. * src/legacy.c (CopyMultDivEntry CopyMultiplyEntry): Renamed CopyMultiplyEntry to CopyMultDivEntry. * src/getdata.c (_GD_DoRecip) src/parse.c (_GD_ParseRecip _GD_ParseDivide) src/mod.c (gd_alter_recip gd_alter_crecip gd_alter_crecip89 gd_alter_divide) src/add.c (gd_add_divide gd_add_recip gd_add_crecip gd_add_crecip89 gd_madd_divide gd_madd_recip gd_madd_crecip gd_madd_crecip89): Added. * src/getdata.h.in: Bump standards version to Version 8. Add GD_RECIP_ENTRY. Fix unified entry struct for RECIP. * src/parse.c (_GD_ParseFieldSpec): Recognise DIVIDE and RECIP. * src/flush.c (_GD_FindVersion): Add Version 8. * src/putdata.c (_GD_DoDivideOut _GD_DoRecipOut): Renamed _GD_DoDivideOut to _GD_DoRecipOut. * src/getdata.c (DIVIDE): Swap divisor and dividend in entry struct. * test/version_6.c test/version_7.c: Update for Standards Version 8. * test/convert_float64_int8.c test/eof_lincom.c: Delete the test dirfile. * configure.ac m4/encoding.m4: Add --without-external-libraries switch. 2010-07-08 D. V. Wiebe <getdata@ketiltrout.net> svn:433 * test/alter_lincom_32.c: Added. * src/native.c (_GD_NativeType): Fix computation of MULTIPLY. * src/mod.c (_GD_Change): Fix memory leaks in LINCOM. * src/putdata.c (_GD_DoLincomOut): Remove unnecessary error check. * src/entry.c (_GD_FreeE _GD_CalculateEntry gd_get_entry gd_validate) src/getdata.c (_GD_DoField) src/native.c (_GD_NativeType) src/spf.c (_GD_GetSPF) src/putdata.c (_GD_DoFieldOut) src/del.c (_GD_DeReference _GD_ClearDerived) src/flimits.c (_GD_GetEOF _GD_GetBOF) src/mod.c (_GD_Change) src/add.c (_GD_Add): Handle DIVIDE. * src/getdata.c (_GD_DivideData _GD_CDivideData _GD_DoDivide) src/putdata.c (_GD_DoDivideOut) src/common.c (_GD_InvertData _GD_CInvertData): Added. * src/nfields.c (gd_get_nfields_by_type): Use a default case. * src/getdata.h.in: Add GD_DIVIDE_ENTRY and DIVIDE entries to the entry struct. * src/legacy.c (CopyReciprocalEntry): Added. * src/legacy.c (GetFormat): Store DIVIDEs as LINCOMs or MULTIPLYs. * src/getdata.c: Combine MULTIPLY() and CMULTIPLY() macros. 2010-07-07 D. V. Wiebe <getdata@ketiltrout.net> svn:432 * src/common.c (_GD_ReadLinterpFile): Only sort if necessary. 2010-07-07 D. V. Wiebe <getdata@ketiltrout.net> svn:431 * test/get_linterp_notab.c: Test for dummy linterp creation. * src/common.c (_GD_MakeDummyLinterp): Deleted. * src/common.c (_GD_ReadLinterpFile): Don't make a dummy LUT on error. 2010-07-07 D. V. Wiebe <getdata@ketiltrout.net> svn:430 * test/bof_lincom.c: Fix. * test/get_linterp_sort.c test/put_linterp_reverse.c test/put_linterp_nomono.c: Added. * src/getdata.c (_GD_DoLinterp): Update call to _GD_LinterpData. * src/putdata.c (_GD_DoLinterpOut): Reject non-monotonic LUTs. Update for new LUT struct. * src/common.c (_GD_LinterpData): Handle both complex and real tables. * src/common.c (_GD_CLinterpData): Deleted. * src/common.c (_GD_ReadLinterpFile): Sort the LUT. * src/internal.h: GD_E_DOMAIN_ANTITONIC added. Define new LUT struct. * src/common.c (_GD_ReadLinterpFile): Don't read the file twice, instead dynamically resize the LUT buffer. * src/common.c (_GD_GetLine): Abort early on EOF. * src/flimits.c (_GD_GetEOF): Fix INDEX check in PHASE. 2010-07-07 D. V. Wiebe <getdata@ketiltrout.net> svn:428 * bindings/cxx/test/addentry.cpp bindings/cxx/test/getdata.cpp bindings/cxx/test/nframes.cpp bindings/cxx/test/spf.cpp bindings/cxx/test/putdata.cpp: Deleted; coverage duplicated by big_test. 2010-07-06 D. V. Wiebe <getdata@ketiltrout.net> svn:427 * test/eof_phase.c test/eof.c test/eof_lincom.c test/eof_index.c: Renamed from nsamples*.c * test/bof.c test/bof_lincom.c test/bof_phase.c: Added. * bindings/python/test/big_test.py bindings/cxx/test/big_test.cpp bindings/f77/test/big_test.f bindings/f77/test/big_test95.f90 bindings/idl/test/big_test.pro: Add a new test 86 and also add test 142. * bindings/cxx/dirfile.cpp (Dirfile::EOF Dirfile::BOF): Added. * bindings/python/pydirfile.c (gdpy_dirfile_getbof gdpy_dirfile_geteof): Added. * bindings/f77/fgetdata.c (GDGBOF GDGEOF): Added. * bindings/f77/getdata.f90.in (fgd_get_bof fgd_get_eof): Added. * bindings/idl/getdata.c (gdidl_get_bof gdidl_get_eof): Added. * bindings/idl/makedlm.sh.in: Sort the subroutine list. * src/flimits.c (gd_get_bof gd_get_bof64 _GD_GetBOF): Added. * src/flimits.c (gd_get_eof gd_get_eof64 _GD_GetEOF): Renamed. Proper INDEX handling added. * src/foffs.c src/flimits.c src/nsamples.c: foffs.c and nsamples.c merged and renamed flimits.c. 2010-06-30 D. V. Wiebe <getdata@ketiltrout.net> svn:425 svn:426 * test/nsamples.c test/nsamples_index.c test/nsamples_lincom.c test/nsamples_phase.c: Added. * src/nsamples.c: Added. 2010-06-30 D. V. Wiebe <getdata@ketiltrout.net> svn:420 * src/errors.c: Update for GD_E_BAD_VERSION and GD_E_FLUSH. * src/flush.c (_GD_FlushFragment): Replace GD_E_OPEN_INCLUDE errors with GD_E_FLUSH for more sensical error reporting. * src/getdata.h.in: Added GD_E_FLUSH. * src/internal.h: Added GD_E_FLUSH suberrors. 2010-06-30 D. V. Wiebe <getdata@ketiltrout.net> svn:419 * src/mod.c (_GD_SPFConvert): _GD_AddData is only used by _GD_Change to convert SPFs, so pare it down and rename. * src/common.c (_GD_AddData): Moved to src/mod.c and renamed _GD_SPFConvert. 2010-06-29 D. V. Wiebe <getdata@ketiltrout.net> svn:418 * m4/compiler.m4 (GD_CHECK_LFS_TYPE): Added. * configure.ac: Better tests for LFS Transitional API types. Don't rely on the `complex' macro when checking types. Move the MSCVRT test back to the proper place. 2010-06-28 D. V. Wiebe <getdata@ketiltrout.net> svn:414 Merged in changes from the ARM branch, revision 385: * bindings/make_parameters.c: Don't include the legacy API. * test/put_endian_float32_big.c test/put_endian_float64_big.c test/put_endian_complex64_little.c test/put_endian_float32_arm.c test/put_endian_float64_arm.c test/get_endian_complex64_big.c test/put_endian_float32_little.c test/put_endian_complex64_big.c test/endian_get.c test/get_endian_complex64_arm.c test/put_endian_complex64_arm.c test/put_endian_complex128_big.c test/get_endian_float32_little.c test/put_endian_complex128_arm.c test/get_endian_complex128_big.c test/get_endian_float32_big.c test/get_endian_float64_big.c test/get_endian_complex128_little.c test/get_endian_complex128_arm.c test/get_endian_float32_arm.c test/get_endian_float64_arm.c test/get_endian_complex64_little.c test/put_endian_float64_little.c test/put_endian_complex128_little.c test/get_endian_float64_little.c: Added. * test/put_endian_float32.c test/get_endian_float64.c test/put_endian_complex128.c test/put_endian_complex64.c test/put_endian_float64.c test/get_endian_complex64.c test/get_endian_complex128.c test/get_endian_float32.c: Removed. * src/parse.c (_GD_ParseDirective): Handle missing second parameter to /ENDIAN. * m4/python.m4: Don't specify -L unless needed. * bindings/idl/getdata.c (gdidl_read_idl_entry): Fix compiler warning. * configure.ac: Calculate BUILDCC * bindings/Makefile.am: use BUILDCC * bindings/make_parameters.c (main): Return zero. * src/open.c (dirfile_cbopen): Fix default float_sex. * test/endian_get.c: Test both sexes. * configure.ac: Calculate BUILDCC * bindings/Makefile.am: use BUILDCC * configure.ac: Call GD_C_FLOATORDERING. * m4/compiler.m4 (GD_C_FLOATORDERING): Added. * configure.ac bindings/f77/Makefile.am: Handle missing diff gracefully. * src/getdata.c (_GD_DoRaw) src/putdata.c (_GD_DoRawOut): Call _GD_ArmEndianise when appropriate. Check float_sex when appropriate. * src/endian.c (_GD_ArmEndianise): Added. * bindings/cxx/Makefile.am bindings/cxx/test/Makefile.am bindings/f77/Makefile.am bindings/f77/test/Makefile.am src/Makefile.am test/Makefile.am util/Makefile.am: use *_WEXTRA conditionals. * configure.ac: Call GD_PROG_CC_WEXTRA, GD_PROG_CXX_WEXTRA, GD_PROG_F77_WEXTRA, GD_PROG_FC_WEXTRA; don't bother checking compilers we aren't going to use. * compiler.m4: Renamed from intel.m4. * compiler.m4 (GD_PROG_CC_WEXTRA GD_PROG_CXX_WEXTRA GD_PROG_F77_WEXTRA GD_PROG_FC_WEXTRA): Added. 2010-06-27 D. V. Wiebe <getdata@ketiltrout.net> svn:410 * src/internal.h: Only use the MSVCRT aliases when appropriate. Handle no complex.h, but with complex support in GCC (for Cygwin). Deal with Cygwin 64-bit stat. * src/getdata.h.in: Define LFS transitional functions under Cygwin. * configure.ac: Disable Python and IDL tests for both Cygwin and MinGW. Only conditionally define _LARGEFILE64_SOURCE. 2010-06-26 D. V. Wiebe <getdata@ketiltrout.net> svn:409 * configure.ac: Fix test for struct stat64. Restore accidentally deleted AC_SUBST. 2010-06-25 D. V. Wiebe <getdata@ketiltrout.net> svn:408 * test/: Include O_BINARY in open() calls. Write "#\n" instead of "\n" in empty fragments. * test/test.h (gd_system): Added. Use PRIxxx codes for format specifiers. * test/trunc_rofs.c test/open_eaccess.c: Skip the test if the FS doesn't honour access permissions. * test/ascii_put.c: Read data as ints. * test/legacy_put.c: Skip the stat() check. * src/open.c (_GD_CreateDirfile): Use mode "rb" in fopen() call. * src/gzip.c (_GD_GzipSize) src/encoding.c (_GD_GenericTouch) src/include.c (_GD_Include) src/raw.c (_GD_RawOpen): Include O_BINARY in open() calls. * src/errors.c (gd_error_string): Handle STRERROR_R_CHAR_P. * src/flush.c (_GD_FlushFragment): Skip fchmod() call unless HAVE_FCHMOD defined. * src/flush.c (_GD_FlushFragment) src/mod.c (_GD_Change) src/encoding.c (_GD_GenericMove) src/raw.c (_GD_RawTemp): Replaced rename() with _GD_Rename(). * src/encoding.c (_GD_ResolveEncoding) src/raw.c (_GD_RawSize): Use gd_stat64_t and gd_stat64(). * src/ascii.c (_GD_AsciiOpen _GD_AsciiSize _GD_AsciiTemp): Use O_TEXT in open call. * src/ascii.c (_GD_ScanFormat _GD_AsciiRead): Handle NO_8BIT_INT_PREFIX. * src/internal.h: Include <io.h> for Win32. Define O_BINARY, O_TEXT if necessary. Define NO_8BIT_INT_PREFIX when appropriate. Handle Win32 function aliases. * src/compat.c: Added. * src/common.c (GD_ReadLinterpFile): Call fopen() with FOPEN_TEXT. * bindings/cxx/test/big_test.cpp bindings/cxx/test/putdata.cpp bindings/cxx/test/spf.cpp bindings/cxx/test/getdata.cpp bindings/cxx/test/nframes.cpp: Handle Win32 stuff. * configure.ac: Call GD_MSYS_SHELL. Add various Win32 checks. * m4/win32.m4: Added. 2010-05-22 D. V. Wiebe <getdata@ketiltrout.net> svn:401 svn:402 svn:403 The Great Renaming: * test/: Update for new function names. Modernise error reporting. * test/test.h: Added. * test/add_many.h test/global_ref_get.c: Deleted. * util/dirfile2ascii.c util/checkdirfile.c: Update for new function names. * util/checkdirifle.c: Report standards version compliance. * bindings/python/test/big_test.py bindings/cxx/test/big_test.cpp bindings/f77/test/big_test.f bindings/f77/test/big_test95.f90 bindings/idl/test/big_test.pro: Remove test 86. * bindings/python/*.c: Update for new function names. * bindings/cxx/*.cxx: Ditto. * bindigns/f77/fgetdata.c: Ditto. * bindings/f77/getdata.f90.in: Ditto. * bindings/idl/getdata.c: Ditto. * src/: Use the gd_ namespace for all public functions. * src/getdata.h.in: Add function aliases. * src/legacy.c: Fix lengths of global error buffers. * src/getdata_legacy.h src/getdata.h.in: Fix function attributes to work with gcc but a non-gnu libc. * bindings/cxx/fragment.cpp: Remove dependence on the LFS transitional API. * src/configure.ac: Remove obsolete Darwin check. * src/globals.c (get_reference): Deleted. 2010-05-17 D. V. Wiebe <getdata@ketiltrout.net> svn:400 * src/flush.c (_GD_FlushFragment): malloc temp_file. * src/internal.h: Fix handling of !defined(HAVE_OFF64_T). * src/getdata.h.in: __APPLE__ specifics. * configure.ac: Set DL_LIBRARY_PATH based on $host. * bindings/python/test/Makefile.am: Use DL_LIBRARY_PATH * bindings/python/pydirfile.c bindings/python/pyfragment.c: De-LFSise. * bindings/python/pydirfile.h: Define _FILE_OFFSET_BITS. * bindings/cxx/fragment.cpp: De-LFSise. * bindings/cxx/getdata/indexentry.h bindings/cxx/getdata/rawentry.h bindings/cxx/getdata/dirfile.h bindings/cxx/getdata/linterpentry.h bindings/cxx/getdata/polynomentry.h bindings/cxx/getdata/bitentry.h bindings/cxx/getdata/entry.h bindings/cxx/getdata/multiplyentry.h bindings/cxx/getdata/phaseentry.h bindings/cxx/getdata/fragment.h bindings/cxx/getdata/lincomentry.h bindings/cxx/getdata/sbitentry.h bindings/cxx/getdata/constentry.h bindings/cxx/getdata/stringentry.h: Define _FILE_OFFSET_BITS. * util/dirfile2ascii.c: Define off64_t if not present. 2010-04-24 D. V. Wiebe <getdata@ketiltrout.net> svn:390 * bindings/python/pydirfile.c (gdpy_dirfile_getdata): Use numpy to allocate the data buffer, instead of doing it ourselves, to avoid memory hassles. Also, only retrieve spf when needed. * bindings/python/pygetdata.c (gdpy_type_from_npytype): Fix debug message. * bindings/python/pygetdata.h: Undef Python's SIZEOF_OFF_T. * bindings/make_parameters.c (main): Don't fall off the end. 2010-03-17 D. V. Wiebe <getdata@ketiltrout.net> svn:387 * configure.ac src/getdata.h.in: Disable LFS transitional API on Darwin. * bindings/f77/Makefile.am: Change order of sed arguments to work with Darwin sed. 2010-03-05 D. V. Wiebe <getdata@ketiltrout.net> svn:386 * test/version_0.c test/version_1.c test/version_2.c test/version_3.c test/version_4.c test/version_5.c test/version_6.c test/version_7.c: Call dirfile_standards(). * test/parse_version_include.c: Use GD_PERMISSIVE. * src/internal.h: Add GD_HAVE_VERSION. * src/getdata.h.in: Add GD_E_BAD_VERSION, GD_VERSION_* * src/flush.c (_GD_FindVersion dirfile_standards): Added. * src/open.c (dirfile_cbopen): Clear GD_PERMISSIVE if GD_PEDANTIC is set. Clear GD_IGNORE_REFS if set. If necessary, determine the standards conformance of the dirfile. * src/parse.c (_GD_ParseDirective): Set proper flags when calling _GD_Include. Propagate pedantry back up. Enumerate fragment versions. * src/include.c (_GD_Include): Take a pointer to the flags, to permit propagation of pedantry. Enumerate fragment versions. * src/parse.c (_GD_ParseFragment): Take a pointer to the flags, to permit propagation of pedantry. * src/name.c (_GD_ValidateField): Prohibit characters < 0x20 in field names. * src/parse.c (_GD_ParseDirective): Remove unnecessary first_fragment parameter. 2010-03-02 D. V. Wiebe <getdata@ketiltrout.net> svn:380 * test/version_0.c test/version_1.c test/version_2.c test/version_6_strict.c test/version_3.c test/version_4.c test/version_5.c test/version_6.c test/parse_version_permissive.c test/version_7_strict.c test/version_7.c test/version_5_strict.c: Added. * test/parse_version_pedantic.c: Removed. * test/parse_name.c: Update. * test/put_foffs.c test/parse_version.c test/parse_version_slash.c test/get_bad_code.c test/parse_name_ext.c: Better error reporting. * src/getdata.h.in: Add GD_PERMISSIVE. * src/name.c src/internal.h: move entry_cmp() to header as a static inline. * src/internal.h: Add n_dot, dot_list, standards to _GD_DIRFILE. * src/common.c (_GD_FindField): Pass the list and count as parameters. If looking for FILEFRAM in early versions, look for INDEX instead. * src/common.c (_GD_FindFieldAndRepr): Added. * src/entry.c (_GD_GetScalar get_entry get_entry_type get_fragment_index dirfile_validate): Call _GD_FindFieldAndRepr instead of _GD_GetRepr and _GD_FindField. * src/index.c (get_framenum_subset64): Ditto. * src/getdata.c (getdata64): Ditto. * src/flush.c (dirfile_flush): Ditto. * src/native.c (get_native_type): Ditto. * src/spf.c (get_spf): Ditto. * src/constant.c (get_constant put_constant): Ditto. * src/putdata.c (putdata64): Ditto. * src/del.c (dirfile_delete): Ditto. * src/entry.c (get_raw_filename): Remove the representation from the input by calling _GD_FindFieldAndRepr. * src/name.c (_GD_ValidateField): Behave differently with different versions. Also set *is_dot on permitted '.' in field name. * src/parse.c (_GD_RawType _GD_ParseRaw _GD_ParseLincom _GD_ParseLinterp _GD_ParseMultiply _GD_ParseBit _GD_ParsePhase _GD_ParsePolynom _GD_ParseConst _GD_ParseString _GD_ParseFragment): Behave differently with different versions. * src/parse.c (_GD_ParseFieldSpec): Behave differently with different versions. Make FILEFRAM a reserved field name in early versions. * src/parse.c (_GD_ParseDirective): Behave differently with different versions. Try to allow fields with directive names when it wouldn't confuse us, and not in pedantic mode. Set GD_PEDANTIC on encountering a VERSION directive unless GD_PERMISSIVE was specified. * src/name.c (dirfile_rename): Update the dot list when necessary. * src/add.c (_GD_Add): Ditto. * src/open.c (dirfile_cbopen): Initialise D->standards. 2010-03-02 D. V. Wiebe <getdata@ketiltrout.net> svn:379 * util/dirfile2ascii.c: Fix missing break statement per Matthew Truch. 2010-02-19 D. V. Wiebe <getdata@ketiltrout.net> svn:377 * util/dirfile2ascii.c: Add -a, -A, -F, -u. Read UINT64 when appropriate. Add --version and other long options. Increase BUF_LEN to GD_MAX_LINE_LENGTH. Turn off default verbose. Make ff an off64_t. * m4/python.m4 m4/idl.m4: Fix typos in help strings. 2010-02-17 D. V. Wiebe <getdata@ketiltrout.net> svn:375 Merged in changes from the 0.6 branch, revision 373: * src/ascii.c (_GD_AsciiSize): Don't trample on the file name. * test/ascii_nframes.c: Update to test for same. 2010-02-15 D. V. Wiebe <getdata@ketiltrout.net> svn:362 * util/dirfile2ascii.c: Added Matthew Truch's ASCII conversion utility. 2010-02-12 D. V. Wiebe <getdata@ketiltrout.net> svn:361 GetData 0.6.1 released. 2010-02-09 D. V. Wiebe <getdata@ketiltrout.net> svn:358 GetData-0.6.1rc2: * src/legacy.c: Fix length of global error string buffers. * configure.ac: Bump GETDATA_IMPL_REVISION. * configure.ac: Fix diff check. * man/get_native_type.3 man/put_string.3: Typos. 2010-02-04 D. V. Wiebe <getdata@ketiltrout.net> svn:349 * bindings/cxx/test/getdata.cpp: Also fix the mkdir() bug here. 2010-02-03 D. V. Wiebe <getdata@ketiltrout.net> svn:346 GetData-0.6.1rc1: * test/convert_complex128_float64.c test/add_cpolynom.c test/convert_float32_complex128.c test/get_const_complex.c test/get_complex128.c test/convert_float64_complex128.c test/repr_uint64.c test/repr_real_m.c test/convert_complex64_uint64.c test/add_clincom.c test/repr_float32.c test/convert_int16_complex64.c test/repr_i.c test/get_complex64.c test/repr_int32.c test/put_complex128.c test/convert_uint8_complex64.c test/get_cpolynom.c test/repr_int16.c test/convert_float64_complex64.c test/convert_complex64_complex128.c test/convert_float32_complex64.c test/repr_real_a.c test/repr_int64.c test/convert_complex128_int64.c test/convert_complex64_int64.c test/put_endian_complex128.c test/put_endian_complex64.c test/repr_a.c test/convert_uint16_complex128.c test/repr_m.c test/put_complex64.c test/convert_uint16_complex64.c test/repr_real_r.c test/repr_int8.c test/convert_int64_complex64.c test/get_endian_complex64.c test/repr_uint8.c test/convert_int32_complex64.c test/convert_int8_complex128.c test/convert_int16_complex128.c test/madd_clincom.c test/repr_float64.c test/convert_complex128_complex64.c test/convert_int8_complex64.c test/convert_complex128_uint64.c test/convert_uint32_complex128.c test/repr_uint32.c test/get_endian_complex128.c test/madd_cpolynom.c test/convert_uint64_complex64.c test/repr_uint16.c test/convert_int32_complex128.c test/get_clincom.c test/convert_uint32_complex64.c test/convert_uint8_complex128.c test/repr_r.c test/alter_cpolynom.c test/convert_uint64_complex128.c test/get_const_repr.c test/convert_complex64_float64.c test/repr_real_i.c test/convert_int64_complex128.c: Include complex.h. * m4/encoding.m4 (GD_HIDE_LTDL_SYM): Removed. * m4/ltdl.m4: Removed. * src/gd_ltdl.c src/gd_ltdl.h: Removed. * configure.ac: Update for libtool 2.x. Remove support for the internal ltdl. * bindings/f77/test/Makefile.am bindings/f77/Makefile.am: Removed the libtool 1.5.x hack. * bindings/idl/getdata.c (gdidl_dirfile_alter_entry gdidl_dirfile_move gdidl_dirfile_rename gdidl_dirfile_uninclude): Initialise kw.error and kw.estr. * bindings/cxx/test/big_test.cpp: Include headers to declare mkdir(). Bug report from Matthew Truch. 2009-11-13 D. V. Wiebe <getdata@ketiltrout.net> svn:345 * src/getdata.h.in: Don't include <complex.h>; use _Complex directly. 2009-11-03 D. V. Wiebe <getdata@ketiltrout.net> svn:340 GetData 0.6.0 released. 2009-11-01 D. V. Wiebe <getdata@ketiltrout.net> svn:334 GetData-0.6.0rc4: * test/header_complex.c: Added. * test/repr_real_m.c test/repr_i.c test/repr_real_a.c test/repr_m.c test/repr_real_r.c test/repr_a.c test/repr_real_i.c: Replaced M_PI with a literal. * configure.ac: Determine types for gd_bit_t, gd_spf_t, and gd_shift_t. Fix NumPy test. * m4/intel.m4: Better tests for Fortran compilers. * src/getdata.h.in: Export a C-89 compliant API if GETDATA_C89_API is set. Include <complex.h> only if needed. typedef gd_bit_t, gd_spf_t, gd_shift_t, and use them in the public API. * src/entry.c (_GD_GetScalar): Use correct types in call to _GD_DoField. * src/entry.c (_GD_CalculateEntry): Use correct types in call to _GD_GetScalar. * src/flush.c (_GD_WriteConst _GD_FieldSpec): Use correct types and C-99 printf codes. * src/del.c (_GD_DeReference): Use correct types in call to _GD_DeReferenceOne. * src/parse.c (_GD_ParseRaw _GD_ParseBit _GD_ParsePhase): Remove unnecessary periphrasis in calls to _GD_SetScalar. * bindings/python/pyentry.c (gdpy_set_scalar_from_pyobj): Use proper types. * bindings/cxx/bitentry.cpp (BitEntry::SetFirstBit BitEntry::SetNumBits): Remove periphrasis in calls to get_constant. * bindings/cxx/rawentry.cpp (RawEntry::SetSamplesPerFrame): Remove periphrasis in call to get_constant. * bindings/cxx/phaseentry.cpp (PhaseEntry::SetShift): Remove periphrasis in call to get_constant. * bindings/cxx/sbitentry.cpp (SBitEntry::SetFirstBit SBitEntry::SetNumBits): Remove periphrasis in calls to get_constant. * src/index.c (_GD_GetIndex): Explicit typecast. * src/getdata.c (EXTRACT_REPR MULTIPLY): Explicit typecasts. * src/getdata.c (CMULTIPLY): Added. * src/native.c (_GD_NativeType): Return GD_UNKNOWN on recursion error. * src/add.c (_GD_Add): Properly set comp_scal for POLYNOM. * src/getdata.c (_GD_DoBit): Remove unnecessary call to _GD_GetSPF. * bindings/python/pydirfile.c: Allow compilation without NumPy. * bindings/cxx/lincomentry.cpp bindings/cxx/polynomentry.cpp: Use C++ complex class. * bindings/cxx/tests/big_test.cpp: Use C++ complex class. * bindings/cxx/getdata/indexentry.h bindings/cxx/getdata/rawentry.h bindings/cxx/getdata/dirfile.hbindings/cxx/getdata/linterpentry.h bindings/cxx/getdata/polynomentry.h bindings/cxx/getdata/bitentry.h bindings/cxx/getdata/entry.h bindings/cxx/getdata/multiplyentry.h bindings/cxx/getdata/phaseentry.h bindings/cxx/getdata/fragment.h bindings/cxx/getdata/lincomentry.h bindings/cxx/getdata/sbitentry.h bindings/cxx/getdata/constentry.h bindings/cxx/getdata/stringentry.h: Use the C-89 GetData API. * bindings/f77/test/Makefile.am: If using ifort, pass -assume byterecl * bindings/f77/test/big_test95.f90: replace realpart() and imagpart() with real(real()) and real(aimag()) 2009-10-29 D. V. Wiebe <getdata@ketiltrout.net> svn:332 * bindings/cxx/test/addentry.cpp bindings/cxx/test/big_test.cpp bindings/cxx/test/getdata.cpp bindings/cxx/test/nframes.cpp bindings/cxx/test/putdata.cpp bindings/cxx/test/spf.cpp: Fix dirfile initialisation. 2009-10-29 D. V. Wiebe <getdata@keiltrout.net> svn:331 * src/entry.c (_GD_FreeE): Free E->e->filebase. Reported by CBN. * bindings/cxx/dirfile.cpp (Dirfile::~Dirfile): Fix call to dirfile_close(). Previously it only called dirfile_close() on NULL pointers. Reported by CBN. 2009-10-29 D. V. Wiebe <getdata@keiltrout.net> svn:329 * bindings/python/test/big_test.py: NumPy tests. * configure.ac: Detect NumPy. * bindings/python/pygetdata.h: #include <numpy/arrayobject.h> * bindings/python/pygetdata.c (gdpy_type_from_npytype gdpy_npytype_from_type): Added. * bindings/python/pygetdata.c (initpygetdata): Call import_array(). Add "__numpy_supported__" to Python module. * bindings/python/pydirfile.c (gdpy_dirfile_getdata): Add "as_list" parameter. Return NumPy array. * bindings/python/pydirfile.c (gdpy_dirfile_putdata): Handle NumPy arrays. 2009-10-23 D. V. Wiebe <getdata@keiltrout.net> svn:327 * test/entry_scalar_repr.c: Added. * test/put_endian_complex128.c test/put_endian_complex64.c test/get_endian_complex64.c test/get_endian_complex128.c: Fix checks.o * src/entry.c (_GD_GetScalar): Handle representations: call _GD_DoField instead of _GD_DoConst * src/del.c (_GD_DeReferenceOne): Added. * src/del.c (_GD_DeReference): Handle representations: call _GD_DoField. * src/getdata.c (_GD_DoConst): Make static. Callers should use _GD_DoField so that the representation is properly handled. * src/flush.c (_GD_StringEscapeise): Preprocessor check for unsigned char. * src/flush.c (_GD_WriteConst): Handle long int for PHASE shift. * src/parse.c (_GD_SetScalar): Don't convert everything willy-nilly to double first. Properly handle types. * src/parse.c (_GD_ParseRaw _GD_ParseBit _GD_ParsePhase): Call _GD_SetScalar with an intermediary. * src/parse.c (_GD_ParseConst): Call _GD_SetScalar with the right type code. * bindings/python/pydirfile.c (gdpy_dirfile_getdata): Use correct integer types and codes in PyArg_ParseTupleAndKeywords call. * bindings/python/pyentry.c (gdpy_set_scalar_from_pyobj): Fix type for PHASE shift. * bindings/f77/fgetdata.c (GDASCA): Fix scalar_l type. Reject index = 0. * bindings/f77/test/Makefile.am bindings/python/Makefile.am bindings/Makefile.am man/Makefile.am: noinst_ flag built files. 2009-10-19 D. V. Wiebe <getdata@ketiltrout.net> svn:325 GetData-0.6.0rc3: * test/repr_real_m.c test/repr_i.c test/repr_real_a.c test/repr_m.c test/repr_real_r.c test/repr_a.c test/repr_r.c test/repr_real_i.c: Made more rigorous. * src/getdata.c (_GD_ExtractRepr): Work with any input data type. * src/getdata.c (_GD_DoField): Properly handle representations of real data. * src/flush.c (_GD_Flush): Remove third argument by moving the E == NULL test to dirfile_flush(). * src/flush.c (dirfile_flush): Discard representation. * src/encoding.c: Add missing punctuation. * bindings/python/pygetdata.c bindings/python/pydirfile.c bindings/python/pyentry.c: Add module documentation. * bindings/python/pydirfile.c (gdpy_dirfile_alter): Require field_code, like the C API. * bindings/python/pydirfile.c (gdpy_dirfile_delentry): Make flags optional. * bindings/python/pydirfile.c (gdpy_dirfile_getfieldlist gdpy_dirfile_getfieldlistbytype): Combine. * bindings/python/pydirfile.c (gdpy_dirfile_getmfieldlist gdpy_dirfile_getmfieldlistbytype): Combine. * bindings/python/pydirfile.c (gdpy_dirfile_getnfields gdpy_dirfile_getnfieldsbytype): Combine. * bindings/python/pydirfile.c (gdpy_dirfile_getnmfields gdpy_dirfile_getnmfieldsbytype): Combine. * bindings/python/pyentry.c (gdpy_entry_getscalars): Deleted. * bindings/make_parameters.c: Add E_FORMAT_LITERAL (=GDF_LT). * bindings/idl/getdata.c: Make SHIFT long. * bindings/idl/getdata.c (gdidl_dirfile_alter_encoding gdidl_dirfile_alter_endianness gdidl_dirfile_alter_frameoffset gdidl_dirfile_protect): fragment_index is GD_ALL_FRAGMENTS by default. * doc/README.f77 doc/README.f95 doc/README.cxx doc/README.python: Update. * doc/README.idl: Added. * man/get_native_type.3 man/dirfile_alter_entry.3 man/get_framenum_subset.3 man/put_string.3 man/get_string.3 man/getdata.3 man/put_constant.3 man/get_fragment_index.3 man/get_entry_type.3 man/putdata.3 man/dirfile_alter_bit.3 man/dirfile_move.3 man/dirfile_rename.3 man/get_spf.3 man/get_raw_filename.3 man/dirfile_reference.3 man/dirfile_delete.3 man/dirfile-format.5 man/dirfile_flush.3 man/dirfile_validate.3 NEWS: Update. * man/get_framenum_subset64.3: Added. 2009-10-17 D. V. Wiebe <getdata@ketiltrout.net> svn:324 * src/entry.c (_GD_Calculate): Memory leak. * src/entry.c (get_entry get_entry_type get_fragment_index dirfile_validate): Throw GD_E_BAD_REPR when necessary. * src/native.c (_GD_NativeType): Only calculate the entry if needed. Properly calculate LINTERP and MULTIPLY native types. * man/get_native_type.3 man/get_framenum_subset.3 man/dirfile_validate.3: Added. 2009-10-16 D. V. Wiebe <getdata@ketiltrout.net> svn:323 * src/internal.h: Fix spelling of GD_E_FORMAT_LITERAL. * src/errors.c src/parse.c: Ditto. * src/putdata.c: Don't assume size_t is signed. 2009-10-16 D. V. Wiebe <getdata@ketiltrout.net> svn:322 * test/madd.c: Properly initialise E. * src/getdata.c (_GD_DoRaw): Don't assume size_t is signed. * src/flush.c (_GD_FlushFragment): Don't justify field names if they're very long. * bindings/f77/test/big_test95.f90: Use fixed width strings in array initialisations. * man/dirfile_alter_entry.3 man/dirfile_add_bit.3 man/get_mfield_list_by_type.3 man/get_entry_type.3 man/get_nvectors.3 man/dirfile_alter_bit.3 man/dirfile_cbopen.3 man/dirfile_rename.3 man/dirfile_include.3 man/dirfile_add.3 man/dirfile-format.5 man/get_field_list_by_type.3 man/get_mvector_list.3 man/dirfile_flush.3 man/get_vector_list.3 man/get_entry.3 man/dirfile_madd_bit.3 man/dirfile-encoding.5: Update. 2009-10-14 D. V. Wiebe <getdata@ketiltrout.net> svn:321 * internal.h: Add .ffname member to encoding_t. * parse.c (_GD_ParseDirective): Run through _gd_ef instead of hard-coding encoding names. 2009-10-14 D. V. Wiebe <getdata@ketiltrout.net> svn:319 GetData-0.6.0rc2: * bindings/f77/test/big_test.f: Fix typos. * bindings/idl/test/big_test.pro: Add scalar members to structure initialisations in tests 125 and 126. * bindings/idl/Makefile.am: Make sure .libs exists. 2009-10-13 D. V. Wiebe <getdata@ketiltrout.net> svn:318 * test/alter_polynom_coeff.c test/entry_raw_scalar.c test/entry_polynom_scalar.c test/entry_bit_scalar.c test/add.c test/entry_lincom_scalar.c test/entry_phase_scalar.c test/entry_bit.c: Update for scalar[] in gd_entry_t. * test/add_phase.c test/madd_phase.c test/get_phase.c: Update for long shift. * test/add_scalar.c alter_entry_scalar3.c alter_entry_scalar4.c alter_entry_scalar2n.c alter_entry_scalar2a.c: Added. * src/getdata.h.in: Use long int for phase shift in gd_entry_t. * src/parse.c (_GD_SetScalar): Use INT64 for shift internally. * src/internal.h src/getdata.h.in: Make scalar[] array public: moved from _gd_private_entry to gd_entry_t. * src/entry.c (_GD_FreeE _GD_CalculateEntry): Update for above. * src/del.c (_GD_DeReference): Ditto. * src/parse.c (_GD_SetScalar _GD_ParseLincom _GD_ParseBit _GD_ParsePhase _GD_ParsePolynom _GD_ParseRaw): Ditto. * src/mod.c (dirfile_alter_raw dirfile_alter_lincom dirfile_alter_clincom dirfile_alter_linterp dirfile_alter_bit dirfile_alter_sbit dirfile_alter_phase dirfile_alter_polynom dirfile_alter_cpolynom): Initialise E.scalar[]. * src/add.c (_GD_Add): Allow adding of non-literal scalars via dirfile_add. * src/mod.c (_GD_AlterScalar): Added. * src/mod.c (_GD_Change): Call _GD_AlterScalar to allow scalar modifications. * src/entry.c (_GD_GetScalar): Assume 16 bit integers for int types. * src/internal.h: Encodings and byte_sex are unsigned longs. * src/getdata.h.in: Renumber some open flags. * src/encoding.c (_GD_ResolveEncoding): Return unsigned long. * src/move.c (_GD_MogrifyFile): Parameters encoding and bye_sex are unsigned longs. * src/parse.c (_GD_ParseDirective _GD_ParseFragment): Parameter flags is unsigned long. * src/internal.h: typedef unsigned int as _gd_spf_t for use as internal representation for SPFs. In the external API, unsigned int is still explicitly used. * src/index.c (get_framenum_subset64): Use _gd_spf_t. * src/getdata.c (_GD_MultiplyData _GD_CMultiplyData _GD_DoLincom _GD_DoMultiply getdata64): Use _gd_spf_t internally. * src/spf.c (_GD_GetSPF get_spf): Use _gd_spf_t internally. * src/putdata.c (putdata64): Use _gd_spf_t internally. * src/common.c (_GD_AddData _GD_LincomData _GD_CLincomData): Use _gd_spf_t. * src/getdata.h.in: Added GD_PRETTY_PRINT. * src/flush.c (_GD_PadField): Added. * src/flush.c (_GD_FieldSpec): Pad field specs if requested. * src/flush.c (_GD_FlushFragment): Compute max and mean field lengths if pretty printing. * bindings/make_parameters.c: Add GD_PRETTY_PRINT. * src/getdata.h.in: Bump standards version. * src/globals.c (dirfilename dirfile_reference): Clear error on success. * bindings/python/test/big_test.py: Test adding/modifying scalars. * bindings/python/pyentry.c (gdpy_set_scalar_from_pyobj gdpy_entry_getscalars): Added. * bindings/python/pyentry.c (gdpy_set_entry_from_tuple): Update for scalar[]. * bindings/python/pyentry.c (gdpy_entry_setspf gdpy_entry_setm gdpy_entry_setb gdpy_entry_setbitnum gdpy_entry_setnumbits gdpy_entry_setshift gdpy_entry_seta): Allow non-literal CONST names. * bindings/python/pyentry.c (gdpy_entry_getspf gdpy_entry_getm gdpy_entry_getb gdpy_entry_getbitnum gdpy_entry_getnumbits gdpy_entry_getshift gdpy_entry_geta): Return non-literal CONST names. * bindings/cxx/bitentry.cpp (BitEntry::Scalar): Added. * bindings/cxx/bitentry.cpp (BitEntry::SetFirstBit BitEntry::SetNumBits): Add CONST name versions. * bindings/cxx/sbitentry.cpp (SBitEntry::Scalar): Added. * bindings/cxx/sbitentry.cpp (SBitEntry::SetFirstBit BitEntry::SetNumBits): Add CONST name versions. * bindings/cxx/entry.cpp (Entry::Scalar): Added. * bindings/cxx/lincomentry.cpp (LincomEntry::SetScale LincomEntry::SetOffset): Add CONST name versions. * bindings/cxx/lincomentry.cpp (LincomEntry::Scalar): Added. * bindings/cxx/rawentry.cpp (RawEntry::SetSamplesPerFrame): Add CONST name version. * bindings/cxx/polynomentry.cpp (PolynomEntry::SetCoefficient): Add CONST name version. * bindings/cxx/phaseentry.cpp (PhaseEntry::SetShift): Add CONST name version. * bindings/cxx/getdata/rawentry.h (Scalar): Added. * bindings/cxx/getdata/phaseentry.h (Scalar): Added. * bindings/cxx/phaseentry.cpp (PhaseEntry::SetShift): shift is long int. * bindings/cxx/getdata/entry.h (PhaseEntry::Shift): shift is long int. * bindings/cxx/getdata/phaseentry.h (PhaseEntry::Shift): shift is long int. * bindings/cxx/dirfile.cpp (Dirfile::Dirfile Dirfile::Include): Flags is unsigned long. * bindings/f77/fgetdata.c (GDCLOS GDDSCD): Don't close dirfile unit #0. * bindings/f77/fgetdata.c (GDGSCA GDASCA): Added. * bindings/f77/test/big_test.f: Test GDGSCA and GDASCA. * bindings/f77/getdata.f90.in: Add scalar member. to gd_entry. * bindings/f77/getdata.f90.in (fget_entry): Call GDGSCA to fill scalar members. * bindings/idl/getdata.c: Add SCALAR to GD_ENTRY structure. * bindings/idl/getdata.c (gdidl_make_idl_entry gdidl_read_idl_entry): Copy SCALAR members. * bindings/idl/getdata.c (gdidl_dirfile_close): Don't close dirfile unit #0. 2009-10-07 D. V. Wiebe <getdata@ketiltrout.net> svn:316 * configure.ac: Update interface version info. * m4/python.m4: Fix no Python assignment. * configure.ac: Don't compute BUILD_DATE if it's not needed. * bindings/f77/test/big_test.f: Use constant length strings in array constructors. 2009-10-06 D. V. Wiebe <getdata@ketiltrout.net> svn:315 GetData-0.6.0rc1: * test/move_meta.c: Added. * m4/idl.m4: Add --with-idl-dlm-dir argument; needed by distcheck. * src/ascii.c: Explicitly cast edata to (FILE*) to fix compiler warnings. Reported by Josh Netterfield. * src/move.c (dirfile_move): Update metafield entries on parent move. * src/mod.c (dirfile_malter_spec): Fix "filename" in _GD_Tokenise call. * bindings/python/pygetdata.c: Add GETDATA_VERSION_SUFFIX to version tuple. * bindings/f77/fgetdata.c (_GDF_Callback): Fix debug message. * bindings/make_parameters.c: Moved from f77 subdir, and updated to handle both IDL and Python bindings as well. * bindings/python/pyconstants.c: Removed; now automatically generated by make_parameters. * bindings/python/test/callback.py: Clean-up after test.o * bindings/python/test/Makefile.am: Fix for rpath builds. * bindings/idl/test: Added. * bindings/idl/getdata.c (gdidl_clear_dirfile gdidl_cmp_to_c99 gdidl_get_frameoffset gdidl_get_string): Added. * bindings/idl/getdata.c (gdidl_make_idl_entry): Initialise N_FIELDS and POLY_ORD. Fix initialisation of CM, CB, CA. * bindings/idl/getdata.c (gdidl_read_idl_entry): Allow proper use for dirfile_alter, by conditionally handling missing structure elements. * bindings/idl/getdata.c (gdidl_convert_encoding): If the encoding is numeric, assume it's a proper GD_<foo>_ENCODED value. * bindings/idl/getdata.c (gdidl_dirfile_add_bit gdidl_dirfile_add_const gdidl_dirfile_add_lincom gdidl_dirfile_add_linterp gdidl_dirfile_add_multiply gdidl_dirfile_add_phase gdidl_dirfile_add_polynom gdidl_dirfile_add_sbit gdidl_dirfile_add_string): Fix dirfile_madd_<foo>() calls. * bindings/idl/getdata.c: IDL 6 appears to be adding INT type keyword paramters to the existing value, instead of replacing them. Fix the bindings to allow for this. * bindings/idl/getdata.c (gdidl_dirfile_alter_lincom gdidl_dirfile_alter_polynom): Initialise n_fields/poly_ord if necessary. Fix complex data conversion. * bindings/idl/getdata.c (gdidl_dirfile_close): Add the "/DISCARD" keyword to call dirfile_discard(). Remove the dirfile from the internal list on success. * bindings/idl/getdata.c (gdidl_dirfile_discard): Removed. * bindings/idl/getdata.c (gdidl_get_entry): Handle look-up failure. * bindings/idl/getdata.c (IDL_Load): Initialise the GD_CONSTANTS structure. * configure.ac: Add getdata_extra macro.o * man/dirfile_alter_encoding.3.in man/dirfile_alter_entry.3 man/getdata.3 man/dirfile_add_bit.3 man/dirfile_alter_bit.3 man/dirfile_cbopen.3 man/dirfile_add.3 man/dirfile-format.5 man/dirfile.5 man/get_constant.3 man/dirfile_add_spec.3 man/dirfile_madd_bit.3 man/dirfile-encoding.5: Update. * man/dirfile-complex.5: Added. 2009-09-30 D. V. Wiebe <getdata@ketiltrout.net> svn:314 * test/convert_complex128_float64.c test/get_const_complex.c test/madd_lincom.c test/madd_polynom.c test/repr_real_m.c test/repr_i.c test/put_repr.c test/repr_real_a.c test/repr_m.c test/repr_real_r.c test/get_const.c test/madd_string.c test/add_string.c test/repr_a.c test/convert_complex128_complex64.c test/repr_r.c test/get_const_repr.c test/convert_complex64_float64.c test/repr_real_i.c: Clean compiler warnings. * src/open.c (dirfile_parser_callback): Changed the parser callback protoype again. This is hopefully less likely to break things in the future. * src/getdata.h.in: Define two new types: gd_parser_data_t, a structure of getdata data passed to the callback function, and gd_parser_callback_t, the callback function itself. * src/parse.c (_GD_ParseFragment): Call the new parser callback. * test/open_cb_invalid.c test/include_cb.c test/open_cb_rescan.c test/open_cb_ignore.c test/include_pc.c test/open_cb_cont.c test/open_cb_abort.c bindings/python/test/callback.py bindings/python/pydirfile.c bindings/cxx/dirfile.cpp bindings/cxx/getdata/dirfile.h bindings/f77/fgetdata.c: Update for new callback prototype. * configure.ac: Attempt to compile a minimal F90 program with a .f90 extension. This should tip us off to any old G77s which are pretending to be "Fortran" compilers. * util/checkdirfile.c: A significant overhaul to add more functionality: reports all the lines with syntax errors, calls dirfile_validate() on all fields. 2009-09-29 D. V. Wiebe <getdata@ketiltrout.net> svn:313 * test/madd_spec.c test/madd_polynom.c test/get_polynom.c test/entry_polynom.c test/entry_lincom.c test/add_string.c test/madd_phase.c test/madd_sbit.c test/madd_linterp.c test/alter_linterp.c test/madd_multiply.c: Make tests more rigorous. * test/convert_complex128_float64.c test/parse_meta_implicit.c test/convert_float32_complex128.c test/parse_meta_implicit2.c test/get_const_complex.c test/get_complex128.c test/alter_spec_meta.c test/convert_float64_complex128.c test/repr_uint64.c test/repr_real_m.c test/convert_complex64_uint64.c test/repr_float32.c test/convert_int16_complex64.c test/repr_i.c test/get_complex64.c test/repr_int32.c test/put_complex128.c test/convert_uint8_complex64.c test/alter_lincom_23.c test/get_cpolynom.c test/repr_int16.c test/convert_float64_complex64.c test/put_repr.c test/convert_complex64_complex128.c test/convert_float32_complex64.c test/repr_real_a.c test/convert_complex128_int64.c test/convert_complex64_int64.c test/put_endian_complex128.c test/put_endian_complex64.c test/convert_uint16_complex128.c test/repr_m.c test/convert_uint16_complex64.c test/repr_real_r.c test/convert_int64_complex64.c test/get_const.c test/parse_meta_index2.c test/get_endian_complex64.c test/repr_uint8.c test/convert_int32_complex64.c test/convert_int8_complex128.c test/convert_int16_complex128.c test/madd_string.c test/repr_float64.c test/convert_complex128_complex64.c test/convert_int8_complex64.c test/repr_int64.c test/convert_complex128_uint64.c test/convert_uint32_complex128.c test/repr_a.c test/put_complex64.c test/repr_int8.c test/repr_uint32.c test/get_endian_complex128.c test/madd_cpolynom.c test/convert_uint64_complex64.c test/add_spec_meta.c test/repr_uint16.c test/convert_int32_complex128.c test/get_clincom.c test/convert_uint32_complex64.c test/convert_uint8_complex128.c test/repr_r.c test/alter_cpolynom.c test/convert_uint64_complex128.c test/get_const_repr.c test/convert_complex64_float64.c test/repr_real_i.c test/convert_int64_complex128.c: Added. * bindings/python/test/big_test.py: Added. * bindings/python/test/tst_getdata.py: Deleted. * bindings/cxx/test/big_test.cpp: Added. * bindings/cxx/test/entry.cpp: Deleted. * bindings/f77/test/big_test95.f90: Added. * bindings/f77/test/big_test.f: Completed. * bindings/f77/test/fget_field_list.f90 bindings/f77/test/fget_entry.f90 bindings/f77/test/gdfget.f bindings/f77/test/fgetdata.f90: Deleted. * index.c (get_framenum_subset64): Multiply user-supplied frame limits by spf. * getdata.c (_GD_DoField): Don't pass the user-supplie represenation when calculating the native type. * errors.c: Fix error strings for GD_E_DELETE. * encoding.c (_GD_EncodingUnderstood): Add GD_LZMA_ENCODED. * constant.c (get_constant): specify num_samp=1 in _GD_DoField call to ensure correct repr handling. * putdata.c (_GD_DoRawOut): Properly handle byte swapping for complex data. * putdata.c (putdata64): Remove spurious free(). * parse.c: Remove bogus const specifier from in_cols. * internal.h: Add table_len to private entry struct. * parse.c (_GD_ParseLinterp): Don't store the computed path in E->table. * mod.c (_GD_Change): ditto. Reset Qe.table_path instead. Furthermore, if moving the table, recompute table_path, first. * common.c (_GD_SetTablePath): Added. * common.c (_GD_ReadLinterpFile): Update for table_path. * common.c (_GD_ReadLinterpFile): Close the file after reading it. * mod.c (_GD_Change): Fix the limits on the scalar free. * mod.c (dirfile_alter_cpolynom): Move invariant code out of the loop. * parse.c (_GD_ParseFieldSpec): Parse a "Barth"-style meta field specification. * parse.c (_GD_ParseFieldSpec): Allow "INDEX" as a metafield name. * mod.c (_GD_Change): Recompute comp_scal, instead of just using the input. * add.c (_GD_Add): ditto. * add.c (dirfile_madd_string): Search for the correct field code. * common.c (_GD_Alloc): Return early on n=0. * bindings/python: Renamed module to pygetdata. * bindings/python/pydirfile.c (gdpy_dirfile_alter gdpy_dirfile_getfragmentindex gdpy_dirfile_getrawfilename gdpy_dirfile_move gdpy_dirfile_rename): Added. * bindings/python/pyentry.c (gdpy_set_entry_from_tuple): Fix initialisation of PHASE->shift. * bindings/python/pyentry.c (gdpy_set_entry_from_dict): Fix RAW keys. * bindings/python/pyentry.c (gdpy_entry_init): Make the parameter list optional for STRING entries. * bindings/python/pyentry.c (gdpy_entry_getbitnum gdpy_entry_setbitnum gdpy_entry_getshift gdpy_entry_setshift): Fix field_type check. * bindings/cxx/entry.cpp (Entry::Rename): Properly handle renaming metafields. * bindings/cxx/entry.cpp (Entry::SetName Entry::SetFragmentIndex): Added. * bindings/cxx/getdata/entry.h (Entry::Associated Entry::Dissociate Entry::Name Entry::ComplexScalars Entry::ConstType): Added. * bindings/cxx/fragment.cpp (Fragment::SetEncoding): Fix dirfile_alter_encoding call. * bindings/cxx/lincomentry.cpp (LincomEntry::SetScale LincomEntry::SetOffset): Add complex versions. * bindings/cxx/polynomentry.cpp (PolynomEntry::SetCoefficient): ditto. * bindings/cxx/dirfile.cpp (Dirfile::Dirfile): Add empty constructor. * bindings/cxx/dirfile.cpp (Dirfile::FragmentIndex Dirfile::Name): Added. * bindings/cxx/getdata/rawentry.h bindings/cxx/getdata/linterpentry.h bindings/cxx/getdata/polynomentry.h bindings/cxx/getdata/bitentry.h bindings/cxx/getdata/multiplyentry.h bindings/cxx/getdata/phaseentry.h bindings/cxx/getdata/lincomentry.h bindings/cxx/getdata/sbitentry.h bindings/cxx/getdata/constentry.h bindings/cxx/getdata/stringentry.h: Added empty constructors. * bindings/cxx/getdata/dirfile.h: Include all the other headers. * bindings/cxx/getdata.entry.h (Entry::Coefficient Entry::CCoefficient Entry::Input): Fix calls for POLYNOM entries. * bindigns/f77/fgetdata.c (_GDF_CString): Return a empty string instead of NULL on l=0. * bindings/f77/fgetdata.c (_GDF_GetDirfile): Don't crash on index out of range. * bindings/f77/fgetdata.c (gdgtst gdptst): Report a length one less than the C API. * bindings/f77/getdata.f90.in: Don't overload gd_entry%n_fields: use gd_entry%poly_ord when necessary. * bindings/f77/getdata.f90.in (fget_nmfields): Call the right F77 function. * bindings/f77/getdata.f90.in (fget_mvector_list): Fix gdmven call. * bindings/f77/getdata.f90.in (fget_entry): Call the right F77 function for PHASE entries. * bindings/f77/getdata.f90.in (fdirfile_add_multiply fdirfile_add_phase fdirfile_madd_multiply fdirfile_madd_phase fdirfile_alter_multiply fdirfile_alter_phase): Fix name. * bindings/f77/getdata.f90.in (fdirfile_madd_sbit fdirfilename): Added. 2009-09-26 D. V. Wiebe <getdata@ketiltrout.net> svn:312 * bindings/idl/getdata.c: Fixed typo in DLM magic for gdidl_get_raw_filename. * configure.ac: Remove spurious AC_SUBST. 2009-09-21 D. V. Wiebe <getdata@ketiltrout.net> svn:311 * src/getdata.h.in: complex_scalars member shortened to comp_scal. * test/add_cpolynom.c test/add_clincom.c test/index.c test/index_range.c test/madd_clincom.c test/index_domain.c test/madd_const.c: Added. * test/madd_bit.c test/madd_lincom.c test/add_lincom.c test/add_phase.c test/add_multiply.c test/add_bit.c test/add_const.c test/add_linterp.c test/add.c test/add_sbit.c test/madd.c test/add_raw.c test/add_polynom.c test/add_spec.c: Make more rigourous tests for success. * src/entry.c (dirfile_validate): Added. * src/getdata.c (_GD_DoField): removed the largely unnecessary field_code argument. All callers changed. * src/putdata.c (_GD_DoFieldOut): ditto. * src/legacy.c (CopyPolynomEntry GetFormat): Report POLYNOMs and LINCOMs. Similarly, report SBITs as BITs. * src/index.c: Added. * src/getdata.c (_GD_DoLincom _GD_DoPolynom): Select complex versions of the calculation functions based on E->comp_scal, not the native type. * src/errors.c (get_error_string): Properly report success. * src/getdata.c src/internal.h: Moved the NAN() function to the header. * src/getdata.h.in: Removed a number of GNUisms. * src/add.c (_GD_Add): Set E->comp_scal for LINCOMs and POLYNOMs. Fix copying of POLYNOM parameters. * src/add.c (dirfile_madd_clincom): Set comp_scal correctly. * src/add.c (dirfile_madd_const): Search for the correct field code. * bindings/python/test/callback.py bindings/python/test/tst_getdata.py: Added. * bindings/python/pygetdata.c bindings/python/pyconstants.c bindings/python/pydirfile.c bindings/python/pygetdata.h bindings/python/pyentry.c: Update for get_framenum() and complex values. * bindings/cxx/dirfile.cpp (Dirfile::NativeType Dirfile::Validate Dirfile::FrameNum): Added. * bindings/cxx/lincomentry.cpp bindings/cxx/polynomentry.cpp bindings/cxx/getdata/polynomentry.h: Update for complex values. * bindings/f77/test/big_test.f: Added. * bindings/f77/fgetdata.c (_GDF_FString): Don't unnecessarily cut of the last character of the string. Also, don't corrupt memory. * bindings/f77/fgetdata.c (GDFLDN GDMFDN): Check for field_num < 0. * bindings/f77/fgetdata.c (GDESTR): Properly space-pad the string. * bindings/f77/fgetdata.c (GDGERW GDGELC GDGEPN GDGECP GDGEBT GDGESB GDGEMT GDGEPH GDGECO): Fix crash-on-error due to indiscriminate use of dirfile_free_entry_strings(). * bindings/f77/fgetdata.c (GDGEPN): Fix multiple bugs resulting from improper translationg from GDGELC. * bindings/f77/fgetdata.c (GDGECL GDGECP GDADCL GDADCP GDMDCL GDMDCP GDALCL GDALCP GDNTYP GDCSCL GDVLDT GDFNUM GDFNSS): Added. * bindings/f77/getdata.f90.in (fgetdata_c8 fgetdata_c16 fget_constant_c8 fget_constant_c16 fputdata_c8 fputdata_c16 fput_constant_c8 fput_constant_c16 fdirfile_add_clincom fdirfile_add_cpolynom fdirfile_madd_clincom fdirfile_madd_cpolynom fdirfile_alter_clincom fdirfile_alter_cpolynom fget_native_type fdirfile_validate fget_framenum fget_framenum_subset): Added. * bindings/idl/getdata.c: Update. 2009-09-21 D. V. Wiebe <getdata@ketiltrout.net> svn:309 * src/meta_list.c (get_mstrings): Properly terminate the list. Bug report from Matthew Truch. * test/svlist_meta.c: Be more verbose. 2009-09-03 D. V. Wiebe <getdata@ketiltrout.net> svn:308 * test/put_sbit.c: Ensure data is signed. * src/internal.h: Add repr, complex_table, cy, cconst to _gd_private_entry; added representation stuff. * src/getdata.h.in: Add GD_E_BAD_REPR, GD_E_FORMAT_LITTERAL, GD_COMPLEX64, GD_COMPLEX128. Add complex_scalars, cm, cb, ca to _gd_unified_entry. * src/entry.c (_GD_GetScalar): Set complex_scalars. * src/entry.c (_GD_CalculateEntry): Retrieve all scalars as GD_COMPLEX, and then realify back down. * src/types.c (_GD_ConvertType): Handle complex types. * src/getdata.c (_GD_FillFileFrame _GD_PolynomData _GD_MultiplyData): Handle complex types. * src/getdata.c (_GD_DoRaw): Handle complex data endianness correction properly. * src/getdata.c (_GD_CPolynomData _GD_CMultiplyData): Added. * src/getdata.c (_GD_DoMultiply _GD_DoPolynom): Handle complex input fields. * src/getdata.c (_GD_DoLinterp): Permit complex y-valued LUTs. * src/getdata.c (_GD_DoConst): Handle complex valued scalars. * src/flush.c (_GD_TypeName): Add GD_COMPLEX64 and GD_COMPLEX128. * src/flush.c (_GD_WriteConst): Write a complex literal. * src/flush.c (_GD_FieldSpec): Handle complex valued literals. * src/ascii.c (_GD_ScanFormat _GD_AsciiRead _GD_AsciiWrite): Handle complex data. * src/putdata.c (_GD_DoLinterpOut _GD_DoLincomOut _GD_DoPolynomOut _GD_DoConstOut): Handle complex writes. * src/del.c (_GD_DeReference): Handle complex scalars. * src/parse.c (_GD_RawType): Add GD_COMPLEX64 and GD_COMPLEX128. * src/parse.c (_GD_SetScalar): Handle complex literals. This may now through the FORMAT suberror GD_E_FORMAT_LITTERAL. Callers updated. * src/parse.c (_GD_ParseLincom _GD_ParsePolynom _GD_ParseConst): Handle complex literals. * src/mod.c (_GD_Change): Handle complex scalars. * src/mod.c (dirfile_alter_clincom dirfile_alter_cpolynom): Added. * src/add.c (_GD_Add): Handle complex scalars. * src/add.c (dirfile_add_clincom dirfile_add_cpolynom dirfile_madd_clincom dirfile_madd_cpolynom): Added. * src/common.c (_GD_ReadLinterpFile): Allow complex y-values. * src/common.c (_GD_LinterpData): Handle complex return types. * src/common.c (_GD_CLinterpData): Added. * src/native.c: Added. * src/entry.c (get_entry get_entry_type get_fragment_index): Discard any represenation in the input field code. * src/getdata.c (_GD_ExtractRepr): Added. * src/getdata.c (_GD_DoField): Handle represenations for both complex and real types. * src/getdata.c (getdata64): Decode the input representation. * src/name.c (_GD_ValidateField): Don't allow representation suffixes in field names. * src/spf.c (get_spf): Discard any represenation in the input field code. * src/constant.c (get_constant put_constant): Handle representations. * src/putdata.c (_GD_DoFieldOut): Complain on getting a representation. * src/putdata.c (putdata64): Decode the input representation. * src/common.c (_GD_GetRepr): Added. * src/errors.c: Add errors for GD_E_FORMAT_LITTERAL and GD_E_BAD_REPRs. * src/legacy.c: Add GD_E_BAD_REPR to GD_ERROR_CODES. * src/getdata.c (_GD_FillZero): Let the caller deal with s0. * src/getdata.c (_GD_DoLincom _GD_DoMultiply _GD_DoBit _GD_DoPhase _GD_DoLinterp _GD_DoPolynom): Use _GD_BadInput. * src/spf.c (_GD_GetSPF): Use _GD_BadInput. * src/common.c (_GD_BadInput): Added. * src/constant.c (put_constant): Return -1 on error. * src/getdata.c (_GD_DoLincom): Rewrote for better optimisation. Includes Matthew Truch's m=1 b=0 short circuit. * src/common.c (_GD_ScaleData): Deleted. * src/commonc. (_GD_LincomData _GD_CLincomData): Added. * src/common.c (_GD_Alloc): Throw GD_E_ALLOC on malloc error. * src/flush.c (_GD_FlushFragment): Add the missing encoding types, and write something to the file on an unhandled type. * src/putdata.c (_GD_DoRawOut): Check malloc return. * src/getdata.c (_GD_DoRaw _GD_DoLincom _GD_DoMultiply _GD_DoBit _GD_DoPhase _GD_DoLinterp _GD_DoPolynom _GD_DoField getdata64): Only the user cares about first_frame, and num_frames. Convert to pure samples early in getdata64(). * src/putdata.c (_GD_DoRawOut _GD_DoLincomOut _GD_DoBitOut _GD_DoPhaseOut _GD_DoLinterpOut _GD_DoPolynomOut _GD_DoFieldOut putdata64): Ditto in putdata64(). 2009-08-17 D. V. Wiebe <getdata@ketiltrout.net> svn:306 * src/getdata.c (_GD_DoMultiply): Load the second field as GD_DOUBLE. * src/getdata.c (_GD_MultiplyData): Compute MULTIPLYs in double precision, rather than the return_type. 2009-08-13 D. V. Wiebe <getdata@ketiltrout.net> svn:305 GetData license changed to GNU LGPLv2.1+. All documentation updated. 2009-08-04 D. V. Wiebe <getdata@ketiltrout.net> svn:304 * m4/ax_compare_version.m4 m4/idl.m4: Added. * m4/idl.m4: Added. * bindings/idl: Added. * src/getdata.h.in: Renamed GD_MAX_POLYNOM to GD_MAX_POLYORD to remove confusion as to what this actually is. * bindings/f77/fgetdata.c: Ensure the f77dirfiles array is initialised before we try to read from it, even if the caller hasn't opened a dirfile yet. 2009-07-20 D. V. Wiebe <getdata@ketiltrout.net> svn:302 * test/open_cb_invalid.c test/include_cb.c test/open_cb_rescan.c test/open_cb_ignore.c test/include_pc.c test/open_cb_cont.c test/open_cb_abort.c: Update for new sehandler. * test/flush_spec.c: Fix compiler warinings. 2009-07-20 D. V. Wiebe <getdata@ketiltrout.net> svn:301 * util/: moved from bin/ * test/flush_spec.c: Added. * src/flush.c (_GD_StringEscapeise): Properly handle bytex 0x80-0xFF. * src/flush.c (_GD_WriteConst): Added. * src/flush.c (_GD_FieldSpec): Write CONST field parameters, where appropriate. * src/parse.c (_GD_ParseBit): Fix check for CONST field in error checks for numbits and bitnum. * m4/python.m4: Added. * bindings/python/: Added. * configure.ac: Python tests. * src/open.c (dirfile_parser_callback dirfile_cbopen): Pass an opaque pointer as a fourth argument to the parser callback handler. * src/parse.c (_GD_ParseFragment): Pass the fourth, opaque pointer to the callback. * bindings/cxx/dirfile.cpp: Update for fourth argument to callback. * bindings/f77/fgetdata.c: Use fourth argument to callback to support per-dirfile callback functions. Removed _gdf_f77_callback global. * src/mod.c (_GD_Change): Fix _GD_SetError calls for GD_E_BAD_TYPE errors. * src/add.c (_GD_Add): Ditto. * src/add.c (dirfile_add_spec dirfile_madd_spec): Flag fragment as modified on parser success. * src/foffs.c: Remove spurious newlines from debugging trace messages. * src/types.c (_GD_ConvertType): return propper error on bad out_type * src/getdata.h.in: Changed the value of GD_SCALAR_ENTRY * bindings/cxx/entry.cpp bindings/cxx/dirfile.cpp bindings/cxx/getdata/dirfile.h bindings/cxx/getdata/entry.h: Update for SBIT and POLYNOM. * bindings/cxx/polynomentry.cpp bindings/cxx/sbitentry.cpp bindings/cxx/getdata/polynomentry.h bindings/cxx/getdata/sbitentry.h: Added. * bindings/f77/fgetdata.c (GDGEPN GDGESB GDADPN GDADSB GDMDPN GDMDSB GDALSB GDALPN): Added. * bindings/f77/make_parameters.c: Added GD_LZMA_ENCODED GD_POLYNOM_ENTRY GD_SBIT_ENTRY. * bindings/f77/getdata.f90.in (fget_entry fdirfile_add fdirfile_madd fdirfile_alter_entry): Update for SBIT and POLYNOM. * bindings/f77/getdata.f90.in (fdirfile_add_sbit fdirfile_add_polynom fdirfile_madd_polynom fdirfile_alter_sbit fdirfile_alter_polynom): Added. * bindings/cxx/test/fragment.h: Add the Index() method. * bindings/cxx/lincomentry.cpp (LincomEntry::SetNFields): Fix initialisation of new terms. * man/dirfile_uninclude.3 man/dirfile_include.3 man/get_entry.3: Typoes. 2009-06-23 D. V. Wiebe <getdata@ketiltrout.net> svn:298 * test/get_sbit.c test/parse_sbit.c test/add_sbit.c test/put_sbit.c test/madd_sbit.c: Added. * src/getdata.h.in: define GD_SBIT_ENTRY. * src/entry.c (_GD_FreeE _GD_CalculateEntry get_entry): Update for SBIT. * src/getdata.c (_GD_DoBit): Add is_signed parameter and calculates signed bitfields when needed. * src/getdata.c (_GD_DoField): Update for SBIT. * src/flush.c (_GD_FieldSpec _GD_Flush): Update for SBIT. * src/nfields.c (get_nfields_by_type): Update for SBIT. * src/putdata.c (_GD_DoFieldOut): Update for SBIT. * src/del.c (_GD_ClearDerived _GD_DeReference): Update for SBIT. * src/parse.c (_GD_ParseBit): Add is_signed parameter and parse SBIT. * src/parse.c (_GD_ParseFieldSpec): Update for SBIT. * src/field_list.c: Add GD_SBIT_ENTRY to _gd_entype_index. * src/mod.c (dirfile_alter_sbit): Added. * src/mod.c (_GD_Change): Update for SBIT. * src/add.c (_GD_Add): Update for SBIT. * src/add.c (dirfile_add_sbit dirfile_madd_sbit): Added. 2009-06-18 D. V. Wiebe <getdata@ketiltrout.net> svn:297 * configure.ac: Move AM_CONDITIONALS to a block near the end to avoid testing them too soon. 2009-06-16 D. V. Wiebe <getdata@ketiltrout.net> svn:295 * test/xz_nframes.c test/lzma_nframes.c test/lzma_get.c test/xz_get.c: Added. * m4/encoding.m4 (GD_CHECK_ENCODING): Fix to allow an empty 6th parameter. * configure.ac: Add LZMA/xz encoding framework check. * src/lzma.c: Added. * src/encoding.c: Add entries to _gd_ef for the LZMA schemes. * src/internal.h: Add GD_ENC_LZMA_RAW and GD_ENC_XZ_RAW. * src/getdata.h.in: Add GD_LZMA_ENCODED. * src/bzip.c (_GD_Bzip2Read): Fix length count. 2009-06-11 D. V. Wiebe <getdata@ketiltrout.net> svn:292 * test/get_lincom_non.c test/parse_lincom_non_ncols.c test/parse_lincom_non.c: Added. * src/parse.c (_GD_ParseLincom): Make <n> optional. 2009-06-11 D. V. Wiebe <getdata@ketiltrout.net> svn:291 * test/alter_polynom_coeff.c test/get_polynom_noin.c test/parse_polynom_scalar.c test/put_polynom1.c test/alter_polynom_input.c test/put_polynom2.c test/madd_polynom.c test/entry_polynom_scalar.c test/parse_polynom_ncols1.c test/parse_polynom.c test/add_polynom.c test/spf_polynom.c test/parse_polynom_ncols2.c test/put_polynom_noin.c test/alter_polynom_ord.c test/get_polynom.c test/entry_polynom.c: Added. * src/getdata.c (_GD_DoField): Fix call to _GD_DoPolynom. * src/parse.c (_GD_ParsePolynom): Fix off-by-one error. * src/mod.c (_GD_Change): Handle poly_ord = 0 properly. * src/mod.c (dirfile_alter_polynom): Fix off-by-one error. * src/getdata.h.in: Declare polynom API. * src/add.c (_GD_Add): Only copy the first polynom in_field. 2009-06-09 D. V. Wiebe <getdata@ketiltrout.net> svn:290 * src/internal.h: Add GD_E_BAD_ENTRY_POLYORD. * src/getdata.h.in: Define GD_MAX_POLYNOM and GD_POLYNOM_ENTRY. Increment GD_N_ENTYPES. Add POLYNOM struct to the entry struct. * src/entry.c (_GD_FreeE _GD_CalculateEntry get_entry): Add case for GD_POLYNOM_ENTRY. * src/getdata.c (_GD_DoField): Add case for GD_POLYNOM_ENTRY. * src/flush.c (_GD_Flush _GD_FieldSpec): Add case for GD_POLYNOM_ENTRY. * src/nfields.c (get_nfields_by_type): Add case for GD_POLYNOM_ENTRY. * src/spf.c (_GD_GetSPF): Add case for GD_POLYNOM_ENTRY. * src/putdata.c (_GD_DoFieldOut): Add case for GD_POLYNOM_ENTRY. * src/del.c (_GD_ClearDerived _GD_DeReference): Add case for GD_POLYNOM_ENTRY. * src/mod.c (_GD_Change): Add case for GD_POLYNOM_ENTRY. * src/add.c (_GD_Add): Add case for GD_POLYNOM_ENTRY. * src/getdata.c (_GD_PolynomData _GD_DoPolynom): Added. * src/putdata.c (_GD_DoPolynomOut): Added. * src/parse.c (_GD_ParsePolynom): Added. * src/mod.c (dirfile_alter_polynom): Added. * src/add.c (dirfile_add_polynom dirfile_madd_polynom): Added. * src/entry.c (_GD_FreeE): GD_MAX_LINCOM -> GD_MAX_POLYNOM in limits. * src/mod.c (_GD_Change): GD_MAX_LINCOM -> GD_MAX_POLYNOM in limits. * src/internal.h: GD_MAX_LINCOM -> GD_MAX_POLYNOM in limits. * src/parse.c (_GD_ParseFieldSpec): Handle POLYNOM field type. * src/errors.c: Add GD_E_BAD_ENTRY_POLYORD suberror under GD_E_BAD_ENTRY. * src/field_list.c: Add GD_POLYNOM_ENTRY to _gd_entype_index. * src/mod.c (dirfile_alter_entry): For POLYNOM, also set move. * src/mod.c (_GD_Change): Fix scalar_free flags for LINCOM. * src/mod.c (dirfile_alter_lincom): Rename "move" to "flags" to avoid obfuscating the purpose of this variable. * src/mod.c (dirfile_alter_lincom): Check validity of n_fields before use. * src/add.c (_GD_Add dirfile_add_lincom dirfile_madd_lincom): Check validity of n_fields before use. 2009-01-16 D. V. Wiebe <getdata@ketiltrout.net> svn:285 GetData 0.5.0 released. 2009-01-13 D. V. Wiebe <getdata@ketiltrout.net> svn:283 GetData-0.5.0rc4: * test/endian_move.c test/encode_move.c test/endian_alter.c: Fix more big-endian errors reported by Matthew Truch. * bindings/f77/fgetdata.c (gdcopn gdclbk): Properly check the callback parameter for NULL. Reported by Matthew Truch. * bindings/f77/fgetdata.c bindings/f77/Makefile.am: Add debugging tracing. 2009-01-09 D. V. Wiebe <getdata@ketiltrout.net> svn:281 GetData-0.5.0rc3: * test/encode_move.c test/move_data_endian.c test/endian_get.c test/endian_alter.c: Fix for correct operation on big endian architectures. * src/gzip.c (_GD_GzipSize): Byte swap size on big endian machines. * src/flush.c (_GD_FlushFragment): Static. * bindings/cxx/dirfile.cpp (Dirfile::Add Dirfile::MAdd): Don't return before setting the dirfile for the entry. * bindings/f77/fgetdata.c (_GDF_Callback): Static. * bindings/f77/fgetdata.h: Fix function names. 2009-01-08 D. V. Wiebe <getdata@ketiltrout.net> svn:279 GetData-0.5.0rc2: * src/encoding.c src/endian.c src/foffs.c src/getdata.c src/name.c src/flush.c src/encoding.c src/putdata.c src/del.c src/move.c src/parse.c src/mod.c src/internal.h src/nframes.c: Hide internal symbols. * src/internal.h src/Makefile.am Makefile.am configure.ac: Use an embeded ltdl if no system ltdl is found. * m4/encdoing.m4: Hide ltdl symbols. * m4/ltdl.m4 src/gd_ltdl.c src/gd_ltdl.h: Added. These are taken unmodified from the libtool distribution. 2008-12-23 D. V. Wiebe <getdata@ketiltrout.net> svn:277 GetData-0.5.0rc1: * NEWS README: Updated. * src/slim.c (_GD_SlimOpen _GD_SlimSize): Remove filebase stuff. 2008-12-21 D. V. Wiebe <getdata@ketiltrout.net> svn:276 * bindings/cxx/linterpentry.cpp bindings/cxx/bitentry.cpp bindings/cxx/multiplyentry.cpp bindings/cxx/lincomentry.cpp bindings/cxx/fragment.cpp bindings/cxx/constentry.cpp bindings/cxx/rawentry.cpp bindings/cxx/phaseentry.cpp bindings/cxx/getdata/indexentry.h bindings/cxx/getdata/getdata/rawentry.h bindigns/cxx/getdata/linterpentry.h bindings/cxx/getdata/bitentry.h bindings/cxx/getdata/multiplyentry.h bindings/cxx/getdata/phaseentry.h bindings/cxx/getdata/lincomentry.h bindings/cxx/getdata/fragment.h bindings/cxx/getdata/constentry.h bindings/cxx/getdata/stringentry.h bindings/cxx/stringentry.cpp bindings/cxx/indexentry.cpp: Added. * bindings/cxx/dirfile.cpp bindings/cxx/getdata/dirfile.h bindings/cxx/entry.cpp bindings/cxx/getdata/entry.h: Updated C++ bindings for the new functions. * bindings/f77/fgetdata.c bindings/f77/getdata.f.in bindings/f77/getdata.f90.in: Update for get_entry_type and get_fragment_index. * test/fragment_index.c test/entry_type.c: Added. * src/entry.c (get_entry_type get_fragment_index): Added. * src/name.c (dirfile_rename): Prohibit renaming INDEX. * src/move.c (dirfile_move): Prohibit moving INDEX. 2008-12-19 D. V. Wiebe <getdata@ketiltrout.net> svn:274 * bindings/f77/getdata.f90.in doc/README.F95: Add Fortran 95 bindings for new functions, and for the dirfile_[m]add_<field_type> functions. * bindings/f77/getdata.f90.in: Fix call to gdadsp and gdmdsp 2008-12-19 D. V. Wiebe <getdata@ketiltrout.net> svn:273 * src/protect.c (dirfile_protect): Swap order of arguments for consistency with the dirfile_alter_<metadata> functions. * bindings/f77/fgetdata.c (_GDF_CString _GDF_FString): Use Fortran string length = 0 as a proxy for a C NULL pointer. * bindings/f77/fgetdata.c bindings/f77/fgetdata.h bindings/f77/getdata.f.in doc/README.f77: Add Fortran 77 bindings for new functions. 2008-12-18 D. V. Wiebe <getdata@ketiltrout.net> svn:272 * test/include_pc.c test/include_cb.c test/include_syntax.c: Added. * src/open.c (dirfile_parser_callback): Added. 2008-12-18 D. V. Wiebe <getdata@ketiltrout.net> svn:270 * test/global_ref_get.c: Added. * src/globals.c (get_reference): Added. * bindings/f77/test/gdcopn.f: Added. * bindings/f77/fgetdata.c (_GDF_ClearDirfile): Let caller close dirfile. * bindings/f77/fgetdata.c (_GDF_FString): Fix off-by-one error. * bindings/f77/fgetdata.c (_GDF_Callback): Added. * bindings/f77/fgetdata.c: Add bindings for dirfile_cbopen and dirfile_discard. * bindings/f77/make_parameters.c: Add delete flags, protect levels, callback actions, syntax suberrors, GD_MAX_LINE_LENGTH, GD_ALL_FRAGMENTS, DIRFILE_STANDARDS_VERSION. 2008-12-18 D. V. Wiebe <getdata@ketiltrout.net> svn:269 * bindings/f77/make_parameters.c: Update for GD_E_BAD_PROTECTION and GD_E_UNCLEAN_DB. * bindings/f77/fgetdata.c bindings/f77/getdata.f.in bindings/f77/fgetdata.h bindings/f77/getdata.f90.in README.f77 bindings/f77/test/gdfget.f: Convert all Fortran-77 function names from GDFxxx to GDxxxx. * test/alter_mspec.c test/alter_spec.c: Added. * src/mod.c (dirfile_alter_spec dirfile_malter_spec): Call _GD_ParseFieldSpec with creat = 0. 2008-12-17 D. V. Wiebe <getdata@ketiltrout.net> svn:267 * test/name_move.c test/protect_alter.c test/move_subdir.c test/file_code.c test/protect_get.c test/name.c test/unclude_del.c test/unclude.c test/file_type.c test/parent.c test/file.c test/unclude_move.c: Added. * doc/unclean_database_recovery.txt: Added. * COPYING.DOC: Added. * man/dirfile_alter_encoding.3.in man/dirfile_alter_endianness.3.in man/dirfile_alter_frameoffset.3in configure.ac: Build mans with paths. * src/getdata.h.in src/error.c: Added GD_E_UNCLEAN_DB. * src/endian.c (_GD_ByteSwapFragment) src/foffs.c (_GD_ShiftFragment) src/encoding.c (_GD_RecodeFragment): Return the dreaded GD_E_UNCLEAN_DB if finalisation fails. * src/entry.c (get_raw_filename): Call _GD_SetEncodedName. * src/flush.c (_GD_FlushFragment): Added. * src/flush.c (_GD_FlushMeta): Call _GD_FlushFragment. * src/internal.h: Add parent field to private entry. * src/parse.c (_GD_ParseFieldSpec): Record parent. * src/parse.c (_GD_Tokenise): Gracefully handle lines without terminating newlines. * src/include.c (dirfile_uninclude _GD_CollectFragments _GD_ContainsFragment): Added. * src/parse.c src/open.c: Split open.c * src/move.c (_GD_MogrifyFile dirfile_move): Perform mogrification if filebase has changed. * src/move.c (strcmpnull): Added. * src/fragment.c (get_parent_fragment): Added. * src/fragment.c: Prperly clear error in public functions. * src/fragment.c: Renamed from format_list.c * src/name.c (_GD_ValidateField): Moved from encoding.c. * src/name.c src/protect.c: Added. * src/getdata.h.in src/error.c: Added GD_E_BAD_PROTECTION. * src/getdata.h.in src/internal.h: Move GD_PROTECT macros to public header. * src/encoding.c src/internal.h: Add move method to encoding framework. * src/encoding.c (_GD_GenericMove): Added. 2008-12-10 D. V. Wiebe <getdata@ketiltrout.net> svn:266 * bindings/cxx/dirfile.cpp (Dirfile::ReferenceFilename): Added. 2008-12-10 D. V. Wiebe <getdata@ketiltrout.net> svn:265 * src/encoding.c (_GD_EncodingUnderstood): Understand GD_TEXT_ENCODED. * src/encoding.c (_GD_RecodeFragment): Properly handle moving the temporary file and deleting the old file. * src/encoding.c (get_encoding): Determine encoding if needed. Report GD_ENC_UNSUPPORTED if encoding is not understood. 2008-12-09 D. V. Wiebe <getdata@ketiltrout.net> svn:264 * test/endian_move.c test/endian_get.c test/endian_alter.c: Added. * src/endian.c: Use unsigned long for byte_sex parameters. * src/endian.c (_GD_ByteSwapFragment) src/open.c (dirfile_cbopen) src/include.c (_GD_Include): Canonicalise byte sex as soon as possible. * src/ascii.c (_GD_AsciiTemp) src/raw.c (_GD_RawTemp): Check for valid field name before trying move. * src/endian.c (_GD_ByteSwapFragment): Don't bother checking encoding ecor before calling _GD_Mogrify. * src/endian.c (get_endianness): Return unsigned long and 0 on error. 2008-12-08 D. V. Wiebe <getdata@ketiltrout.net> svn:263 * test/foffs_move.c test/foffs_get.c test/foffs_alter.c: Added. 2008-12-08 D. V. Wiebe <getdata@ketiltrout.net> svn:261 * test/alter_multiply.c test/alter_entry.c test/alter_phase.c test/alter_linterp_move.c test/alter_lincom_input.c test/alter_lincom_slope.c test/alter_linterp.c test/alter_const.c test/alter_raw_type.c test/alter_entry_recode.c test/alter_bit_bitnum.c test/alter_raw_spf.c test/alter_bit_numbits.c test/alter_lincom_offset.c: Added. * src/flush.c (_GD_FlushMeta): Preserve access mode for fragments. * src/ascii.c (_GD_AsciiTemp) src/raw.c (_GD_RawTemp): Preserve access mode. * src/mod.c (_GD_Change): Don't initialise enc until subencoding is determined. Fully determine LUT table paths. Type convert CONST data as needed. Fix lincom argument handling. * src/mod.c (dirfile_alter_raw): Swap order of spf and data type arguments to correspond to dirfile_add_raw(). * src/mod.c (dirfile_alter_lincom): Set n_fields properly, potentially by finding the field to be changed first. Fix checks for NULL arguments. * src/mod.c (dirfile_alter_multiply): Set correct field type. * src/mod.c (dirfile_malter_spec): Swap order of line and parent arguments to correspond to dirfile_madd_spec(). 2008-12-06 D. V. Wiebe <getdata@ketiltrout.net> svn:260 * src/endian.c (dirfile_alter_endianness): Renamed from put_endianness. * src/foffs.c (dirfile_alter_frameoffset64 dirfile_alter_frameoffset): Renamed from put_frameoffset64 and put_frameoffset. * src/encoding.c (dirfile_alter_encoding): Renamed from put_encoding. * src/mod.c (dirfile_alter_raw dirfile_alter_lincom dirfile_alter_linterp dirfile_alter_bit dirfile_alter_multiply dirfile_alter_phase dirfile_alter_const dirfile_alter_spec dirfile_malter_spec): Renamed from dirfile_change_*. * src/mod.c (dirfile_alter_entry): Renamed from dirfile_change. 2008-12-03 D. V. Wiebe <getdata@ketiltrout.net> svn:258 * src/open.c (_GD_ParseDirective): Handle bzip and gzip ENCODING directives. * src/encoding.c: Fix bzip2 non-module framework. * src/ascii.c (_GD_AsciiRead): Don't throw an error on EOF. * src/ascii.c (_GD_AsciiTemp) src/raw.c (_GD_RawTemp): Don't overwrite the main file. * src/bzip.c (_GD_Bzip2Seek _GD_Bzip2Read): Intelligently handle EOF. * src/move.c (_GD_MogrifyData): Handle new_filebase internally. Don't check the input encoding before determining it. Always use temp files, even when changing encodings. Error handling fixes. * test/move_data_enc_ar.c test/gzip_move_from.c test/move_data_enc_ra.c test/move_data_foffs.c test/move_data_endian.c test/bzip_move_from.c test/move_data_nop.c: Added. 2008-12-03 D. V. Wiebe <getdata@ketiltrout.net> svn:254 * src/move.c (dirfile_move): Don't bother checking whether the encoding is understood if we're not moving the data. Also, update the fragment index for the field and mark both the old and new fragments as dirty. * test/move.c test/move_protect.c test/move_index.c: Added. 2008-12-01 D. V. Wiebe <getdata@ketiltrout.net> svn:253 * src/ascii.c src/bzip.c src/encoding.c src/gzip.c src/raw.c: Initialise filename in the library directly instead of passing that off on the encoding framework. * man/dirfile_move.3: Added. * src/getdata.h.in: Add GD_IGNORE_REFS. * src/include.c (dirfile_include): Handle both explicit and implicit reference field declarations, along with GD_IGNORE_REFS. * test/include_ignore.c test/include_ref.c test/include_auto.c: Added. * man/dirfile_include.3: Update. * test/global_ref_empty.c test/global_ref_set.c test/global_ref.c: Added. * man/dirfile_reference.3: Added. * add.c (_GD_Add): Don't modify the dirfile until we're sure to succeed. * src/add.c (_GD_Add) src/entry.c (_GD_GetScalar) src/legacy.c (_GD_GetDirfile GetFormat) src/open.c (_GD_ParseFieldSpec) src/globals.c (dirfile_reference): Properly check realloc for error before use. * src/slim.c src/encoding.c: Fix symbols for slim module. * src/del.c (dirfile_delete): If the reference field is deleted, do something sensible. * src/open.c (dirfile_cbopen dirfile_open) src/include.c (dirfile_include): Flags are long. * m4/encoding.m4: Fix library check for extra prefix. * src/common.c (_GD_FindField): index should be unsigned. * bindings/f77/make_parameters.c README.f77: Update for new symbols. 2008-11-28 D. V. Wiebe <getdata@ketiltrout.net> svn:252 * man/dirfile_include.3: Updated for calback. * man/dirfile_close.3: Updated for dirfile_discard. * src/getdata.h.in: Sorted. * src/Makefile.am: Correct flags for bzip2 module. * src/globals.c (dirfile_reference): Renamed from put_reference and merged with get_reference. * test/close_discard.c: Added. * src/encoding.c src/internal.h: Removed the per-dirfile encoding frameworks. Renamed encoding_framework ef and made non static and non const. * src/encoding.c (_GD_InitialiseFramework): Reimplemented to initialise global framework. * src/open.c (dirfile_cbopen): Call _GD_InitialiseFramework to initialise global framework. * src/close.c (_GD_ShutdownDirfile): Don't call lt_dlexit(); * src/close.c (_GD_ShutdownDirfile): Renamed from dirfile_close and added the flush_meta parameter. * src/close.c (dirfile_close dirfile_discard): Added. 2008-11-28 D. V. Wiebe <getdata@ketiltrout.net> svn:251 * test/del.c test/del_meta.c test/del_meta_force.c test/del_const.c test/del_const_deref.c test/del_const_force.c test/del_data.c test/del_derived.c test/del_derived_force.c test/open_cb_invalid.c: Added. * man/dirfile_delete.3: Added. * src/spf.c (_GD_GetSPF): Calculate RAW fields, if requried. * src/del.c (dirfile_delete): Multiple bug fixes. * src/getdata.h.in: Remove GD_DEL_NONE 2008-11-27 D. V. Wiebe <getdata@ketiltrout.net> svn:250 * test/open_cb_ignore.c test/open_cb_cont.c test/open_cb_abort.c test/open_cb_rescan.c: Added. * src/open.c (_GD_ParseFragment): Properly ABORT or RESCAN. * src/internal.h src/getdata.h.in: GD_SYNTAX_* macros should be public. * src/getdata.h.in: dirfile_cbopen() forward declaration. 2008-11-27 D. V. Wiebe <getdata@ketiltrout.net> svn:248 svn:249 * test/global_name.c: Added. * src/open.c (_GD_ParseFragment): Fail with GD_E_CALLBACK on invalid callback response. * src/open.c (dirfile_cbopen): Check malloc. * man/dirfilename.3: Added. 2008-11-27 D. V. Wiebe <getdata@ketiltrout.net> svn:247 * test/bzip_put.c test/bzip_get_get.c test/bzip_nframes.c test/bzip_get.c: Added. * m4/encodings.m4: Always AC_SUBST the Makefile variables. Differentiate between internal and external encodings. * src/bzip.c: Added. * src/encoding.c: Add bzip2 framework. * src/gzip.c (_GD_GzipSeek): Return samples not bytes. * src/configure.ac: Add --enable-modules with checks. * src/Makefile.am: Add rules for USE_MODULES * src/encoding.c: Initialise encoding framework for USE_MODULES * src/open.c (dirfile_cbopen) src/close.c (dirfile_close) src/slim.c src/gzip.c src/encoding.c: Wrap ltdl stuff in USE_MODULES 2008-11-25 D. V. Wiebe <getdata@ketiltrout.net> svn:246 * m4/encoding.m4: Check for executables needed for tests even if the library isn't found. * test/slim_nframes.c test/slim_get.c test/gzip_get_get.c test/gzip_get.c test/gzip_nframes.c: Allow proper execution in the absence of the corresponding encoding support. 2008-11-25 D. V. Wiebe <getdata@ketiltrout.net> svn:244 * configure.ac: Reduce code duplication with the introduction of the GD_CHECK_ENCODING macro. * m4/encoding.m4: Added. * src/common.c: Replaced the only assert() in the library with an internal library error. * configure.ac src/internal.h: Removed assert-related checks. 2008-11-24 D. V. Wiebe <getdata@ketiltrout.net> svn:243 * configure.ac: Fix pthread check. 2008-11-24 D. V. Wiebe <getdata@ketiltrout.net> svn:242 * src/encoding.c (_GD_ValidateField): Moved from open.c because it needs the global encoding framework array. * src/internal.h: Add local encoding framework array to DIRFILE struct. Most functions now use this. (GD_SetEncodedName is a notable exception.) * src/encoding.c (_GD_InitialiseFramework): Added. * test/gzip_get_get: Added. * src/encoding.c (_GD_ResolveSymbol _GD_MissingFramework): Use ltdl to dynamically load libraries instead of calling dlopen directly. * src/gzip.c src/slim.c: Export ltdl symbols. * src/open.c (dirfile_cbopen): Call lt_dlinit(). * src/close.c (dirfile_close): Call lt_dlexit(). * configure.ac: ltdl checks. * Makefile.am: conditionally descend into libltdl. * src/Makefile.am: Pass -export-dynamic -module and -dlopen to libtool as appropriate. * configure.ac: remove --disable-pkg-config. * src/Makefile.am: always install getdata.pc. * man/Makefile.am: Properly link to dirfile_madd_bit.3 2008-11-23 D. V. Wiebe <getdata@ketiltrout.net> svn:241 * src/add.c (_GD_Add) src/include.c (_GD_Include) open.c (_GD_ParseRaw): Don't unnecessarily add "/./" to paths. * src/gzip.c: Added. * src/encoding.c src/getdata.h.in: Add GD_GZIP_ENCODING. * test/gzip_get.c test/gzip_nframes.c test/gzip_put.c: Added. * conigure.ac Makefile.am src/Makefile.am: Add gzip support. * src/entry.c (_GD_FreeE): fix de-allocation of gd_raw_file objects. * configure.ac: Check for -ldl. * src/encoding.c (_GD_ResolveSymbol): Added. * src/encoding.c (_GD_MissingFramework): dlopen an encoding sublibrary if required. Made non-static. * src/encoding.c (GD_SetEncodedName): Remove initial underscore to enable exporting because sublibraries may need it. * src/Makefile.am: Compile slim.c into a stand-alone "sublibrary" libgetdataslim.la. * src/raw.c (_GD_RawWrite): Return samples, not bytes. * src/move.c (_GD_MogrifyFile): Add encoding recoding. Fix endianness conversion calculation. * src/encoding.c (_GD_RecodeFragment): Replaced the heavy lifting with a call to _GD_MogrifyFile. 2008-11-21 D. V. Wiebe <getdata@ketiltrout.net> svn:240 * src/move.c: Added. * src/foffs.c (_GD_ShiftFragment) src/endian.c (_GD_ByteSwapFragment): Call _GD_MogrifyFile (in move.c) instead of handling the file translation directly. * src/encoding.c (_GD_RecodeFragment): Reset subencodings when not moving files. 2008-11-21 D. V. Wiebe <getdata@ketiltrout.net> svn:239 * src/mod.c (dirfile_change_spec dirfile_mchange_spec): Added. * src/open.c (_GD_ParseFieldSpec): Add insert parameter to indicate whether the parsed entry should be inserted into the dirfile. * sr/mod.c (_GD_Change): Remove unnecessary intermediate variables. Properly handle scalars. 2008-11-21 D. V. Wiebe <getdata@ketiltrout.net> svn:238 * src/common.c (_GD_AddData): Moved from getdata.c and made non-static. * src/mod.c: Added. 2008-11-20 D. V. Wiebe <getdata@ketiltrout.net> svn:237 * configure.ac: Use AC_PROG_CC_C99 again, bump AC_PREREQ to 2.63. * m4/c99.m4: Removed. 2008-11-20 D. V. Wiebe <getdata@ketiltrout.net> svn:236 * src/endian.c (_GD_FixEndianness): Moved from types.c. * src/endian.c: Added. * src/encoding.c (_GD_RecodeFragment put_encoding get_encoding): Added. * src/foffs.c (_GD_ShiftFragment): Check for GD_EF_SEEK. Only open the input file if not already open. Check seek success. Seek on both files. * src/getdata.h.in legacy.c: Add GD_E_BAD_ENDIANNESS. * src/putdata.c (_GD_DoRawOut): Don't divide n_wrote by size. * src/slim.c (_GD_SlimSeek) src/raw.c (_GD_RawSeek): Return samples, not bytes. * src/getdata.c (_GD_DoRaw) src/putdata.c (_GD_DoRawOut): Check seek success. * src/internal.h: Split the unnecessarily difficult fragment->flags into fragment->encoding and fragment->byte_sex. 2008-11-18 D. V. Wiebe <getdata@ketiltrout.net> svn:232 * src/open.c (_GD_ParseFragment): Added GD_IGNORE_DUPS flags. * test/parse_duplicate_ignore.c: Added. * src/internal.h src/getdata.h.in: Moved gd_entry_t->size to _gd_private_entry. * src/foffs.c (_GD_ShiftFragment): Do the move and cleanup. * src/ascii.c (_GD_AsciiTemp) src/raw.c (_GD_RawTemp): Added. * src/foffs.c (put_frameoffset64): Check offset parameter for range. * src/encoding.c (_GD_SetEncodedName): Added. * src/slim.c (_GD_SlimUnlink) src/ascii.c (_GD_AsciiUnlink) src/raw.c (_GD_RawUnlink): Removed and replaced by _GD_GenericUnlink. * src/ascii.c (_GD_AsciiTouch) src/raw.c (_GD_RawTouch): Removed and replaced by _GD_GenericTouch. * src/internal.h: Created the _gd_raw_file object. Renamed _gd_private_entry->file to _gd_private_entry->filebase. * src/encoding.c: Encoding framework updated to work on _gd_raw_file objects. * src/entry.c (get_raw_filename): Use cached filename. 2008-11-18 D. V. Wiebe <getdata@ketiltrout.net> svn:228 Merged in changes from the 0.4.x branch, revision 223: * src/flush.c (_GD_Flush): Fix SEGV. * src/getdata.c (_GD_DoRaw): don't divide samples_read by data size. * src/raw.c (_GD_RawRead): divide nread by data size. * test/slim_get.c test/slim_nframes.c: Test with uint16_t to check for above bug. Invoke slim binary with -k (force). * src/legacy.c (GetFormat): Remove const from return * src/getdata_legacy.h: wrap all function declarations in extern "C" * src/legacy.c: Trace function calls. * src/Makefile.am: add symbolic link getdata_struct.h -> getdata.h for better legacy API support. * src/include.c (_GD_Include) src/open.c (dirfile_open): Initialise protection level for fragments. 2008-11-17 D. V. Wiebe <getdata@ketiltrout.net> svn:224 * src/getdata.h.in src/internal.h: Rename MAX_LINE_LENGTH to GD_MAX_LINE_LENGTH and move to public header. * src/getdata.h.in src/internal.h: Clean up GD_E_FORMAT_* suberrors and move to public header. GD_E_FORMAT_N_COLS renamed to GD_E_FORMAT_N_TOK. GD_E_FORMAT_MAX_I, GD_E_FORMAT_N_RAW, removed. All codes renumbered. * src/internal.h: _gd_private_entry->stream renamed to edata. * src/entry.c (_GD_GetScalar): Call _GD_DoConst() directly instead of _GD_DoField(). * src/getdata.c (_GD_DoConst): No longer static. * src/errors.c: Correct typo in GD_E_FORMAT:GD_E_FORMAT_CHARACTER string. * src/entry.c (get_raw_filename): Added. * src/encoding.c (_GD_Supports): Added. * src/encoding.c (_GD_ResolveEncoding): Make static. * src/open.c (_GD_ParseFieldSpec) src/putdata.c (_GD_DoRawOut) src/getdata.c (_GD_DoRaw) src/add.c (_GD_Add) src/nframes.c (get_nframes64): Replace encoding checks with _GD_Supports call. * src/common.c (_GD_FindField): Rename argument next to index. * src/encoding.c (_GD_GenericUnlink _GD_GenericTouch): Added. * src/slim.c (_GD_SlimUnlink) src/ascii.c (_GD_AsciiUnlink) src/raw.c (_GD_RawUnlink): Added. * src/ascii.c (_GD_AsciiTouch) src/raw.c (_GD_RawTouch): Call _GD_GenericTouch(). * src/open.c (dirfile_cbopen): Renamed from dirfile_open * src/open.c (dirfile_open): Added. * src/open.c (_GD_ParseFragment): Call sehandler. * src/slim.c: Trace. * src/foffs.c: Added. * src/del.c: Added. * src/globals.c: Added. * src/encoding.c: Split from getdata.c. 2008-11-14 D. V. Wiebe <getdata@ketiltrout.net> svn:216 Fork GetData-0.4. 2008-11-07 D. V. Wiebe <getdata@ketiltrout.net> svn:211 * src/open.c (_GD_ValidateField _GD_Tokeniser): Replace slow strchr calls with explicit tests. * src/open.c (_GD_ValidateField): Conditionally allow "." in field names, but prohibit encoding extensions in this case. * test/parse_name_dot.c test/parse_name_ext.c test/parse_name_pedantic.c: Added. * src/open.c (_GD_ParseRaw): Don't set fragment->ref_name: it will be done later. * src/entry.c (_GD_FreeE): Free the file string for RAW fields. * src/close.c (_GD_FreeD): Call _GD_FreeE instead of de-allocating entries explicitly. A few other missing free calls added. * src/getdata.c src/internal.h src/ascii.c: Add _GD_AsciiTouch. 2008-10-31 D. V. Wiebe <getdata@ketiltrout.net> svn:206 GetData-0.4.0 released. 2008-10-28 D. V. Wiebe <getdata@ketiltrout.net> svn:204 GetData-0.4.0rc4: * src/nframes.c (get_nframes): Don't divide by the datatype size twice. * bindings/cxx/test/entry.cpp bindings/cxx/test/putdata.cpp bindings/cxx/test/spf.cpp bindings/cxx/test/getdata.cpp bindings/cxx/test/addentry.cp bindings/cxx/test/nframes.cpp: Update for new header locations. 2008-10-28 D. V. Wiebe <getdata@ketiltrout.net> svn:200 GetData-0.4.0rc3: * src/field_list.c (get_field_list get_vector_list get_field_list_by_type get_strings) src/meta_list.c (get_mfield_list get_mvector_list get_mfield_list_by_type get_mstrings): Return a valid list even if there are zero elements. * src/field_list.c (get_mfield_list_by_type): Return the correct list in all cases. 2008-10-22 D. V. Wiebe <getdata@ketiltrout.net> svn:197 GetData-0.4.0rc2: * src/putdata.c (_GD_DoRawOut): Figure out the encoding scheme before attempting to check whether idem needs byte-swapping. Bug report from Matthew Truch. 2008-10-21 D. V. Wiebe <getdata@ketiltrout.net> svn:185 GetData-0.4.0rc1: * src/include.c: Remove duplicate accessmode check. 2008-10-21 D. V. Wiebe <getdata@ketiltrout.net> svn:184 * src/open.c: Fix PROTECT parsing. * src/putdata.c: Check protection for STRING, not PHASE. * src/putdata.c (_GD_DoStringOut): Don't de-allocate old string until new string is successful. * src/internal.h: Don't mix CONST data and client list. * src/flush.c (_GD_FlushMeta): Don't write INDEX. * src/add.c (_GD_Add): Split format and data protection checks. 2008-10-21 D. V. Wiebe <getdata@ketiltrout.net> svn:180 * src/internal.h: Add protection, ref_name, and frame_offset to gd_fragment_t. Remove first_field, first_fragment from same. Remove frame_offset from DIRFILE. * src/open.c (_GD_DoRaw): Set the first field stuff after attempting to create the new file. * src/open.c (_GD_ParseDirective): FRAMEOFFSET is fragment local. Parse PROTECT. * src/open.c (_GD_ParseFragment): Set reference name. * src/flush.c (_GD_FlushMeta): Write PROTECT, REFERENCE, FRAMEOFFSET. Don't worry about first fields any more. * src/add.c (_GD_Add dirfile_add_spec dirfile_madd_spec) src/putdata.c (_GD_DoRawOut _GD_DoConstOut _GD_DoStringOut): Check protection. * src/getdata.c (_GD_DoRaw _GD_DoRawOut): frame_offset is fragment local. * src/include.c (dirfile_include): check access mode and protection. 2008-10-21 D. V. Wiebe <getdata@ketiltrout.net> svn:179 * src/internal.h: Renamed D->include_list, D->n_include, and D->first_field to D->fragment, D->n_fragment, and D->reference_field. Also removed E->e->first and D->fragment[].first and added D->fragment[].first_field and D->fragment[].first_fragment. * src/getdata.h.in bindings/f77/make_parameters.c: Added GD_E_BAD_REFERENCE. * src/open.c (_GD_ParseFieldSpec): Return a pointer to the gd_entry_t just created if it's a RAW field (or else NULL). Also, it no longer gets passed &have_first. * src/open.c (_GD_ParseDirective): Update ref_name instead of have_first. Parse REFERENCE directive. * src/open.c (_GD_ParseFragment): Renamed from _GD_ParseFormatFile. Returns the ref_name. Sets fragment->first_fragment and fragment->first_raw. * src/flush.c (_GD_FlushMeta): Updated for new first field stuff. * src/include.c (_GD_Include): Accept and return ref_name to caller. * src/include.c (dirfile_include) open.c (dirfile_open): Resolve REFERENCE after parsing completes. * man/dirfile_include.3 man/dirfile_open.3 dirfile-format.5: Update for REFERENCE. * src/flush.c (_GD_FlushMeta): Write global metadata at the end so it will take precedence. * src/flush.c (_GD_FieldSpec): String escapeise the field name. 2008-10-19 D. V. Wiebe <getdata@ketiltrout.net> svn:173 * src/errors.c (_GD_SetError) src/getdata.h.in: Added GD_VERBOSE flag. * src/flush.c (_GD_Flush): Use encoding framework to flush and close raw files. * src/open.c (_GD_Tokenise): Properly handle trailing backslash. * test/parse_eol.c test/parse_quote_mismatch.c: Added. 2008-10-17 D. V. Wiebe <getdata@ketiltrout.net> svn:169 * src/getdata.c (_GD_DoRaw) src/putdata.c (_GD_DoRawOut): Some encodings need no endianness correction. 2008-10-17 D. V. Wiebe <getdata@ketiltrout.net> svn:165 * src/nmeta.c: Renamed get_nmetafields, get_nmetavectors, and get_nmetafields_by_type to get_nmfields, get_nmvectors, and get_nmfields_by_type. * src/field_list.c: Renamed get_constant_values and get_string_values to get_constants and get_strings. * src/flush.c: Renamed dirfile_flush_metadata to dirfile_metaflush * src/meta_list.c: Renamed get_metaconstant_values, get_metastring_values, get_metafield_list_by_type, get_metavector_list, and get_metafield_list to get_mconstants, get_mstrings, get_mfield_list_by_type, get_mvector_list, and get_mfield_list. * src/add.c: Renamed dirfile_add_metaspec, dirfile_add_meta, dirfile_add_metalincom, dirfile_add_metalinterp, dirfile_add_metabit, dirfile_add_metamultiply, dirfile_add_metaphase, dirfile_add_metastring, and dirfile_add_metaconst to dirfile_madd_spec, dirfile_madd, dirfile_madd_lincom, dirfile_madd_linterp, dirfile_madd_bit, dirfile_madd_multiply, dirfile_madd_phase, dirfile_madd_string, and dirfile_madd_const. * bindings/cxx/dirfile.cpp bindings/cxx/dirfile.h: Updated C++ bindings accordingly. * bindings/f77/fgetdata.c bindings/f77/getdata.f.in bindings/f77/fgetdata.h bindings/f77/getdata.f90.in: Updated Fortran 77 and 95 bindings accordingly. * test/add_meta_linterp_invalid.c test/add_meta_lincom_invalid.c test/add_meta_phase_invalid.c test/add_meta_phase.c test/add_meta_multiply.c test/add_meta_spec_invalid.c test/add_meta_spec.c test/add_meta_linterp.c test/add_meta_lincom.c test/add_meta_spec_directive.c test/add_meta_bit_invalid.c test/add_meta_bit.c test/add_meta.c test/add_meta_multiply_invalid.c: Removed. * test/madd_bit.c test/madd_lincom_invalid.c test/madd_lincom.c test/madd_spec.c test/madd_phase.c test/madd.c test/madd_linterp_invalid.c test/madd_bit_invalid.c test/madd_linterp.c test/madd_spec_invalid.c test/madd_spec_directive.c test/madd_multiply_invalid.c test/madd_multiply.c test/madd_phase_invalid.c: Added. * test/nmeta_type.c test/vlist_meta.c test/cvlist_invalid.c test/nmeta_vectors_parent.c test/svlist_invalid.c test/cvlist.c test/svlist.c test/nmeta_parent.c test/nmeta_vectors.c test/cvlist_meta_invalid.c test/flist_meta_invalid.c test/svlist_meta_invalid.c test/cvlist_meta.c test/nmeta_type_invalid.c test/vlist_meta_invalid.c test/flush_meta.c test/svlist_meta.c test/nmeta_invalid.c test/nmeta.c test/flist_type_meta_invalid.c test/flist_type_meta.c test/nmeta_vectors_invalid.c test/nmeta_type_parent.c test/flist_meta.c: Updated. 2008-10-17 D. V. Wiebe <getdata@ketiltrout.net> svn:164 * src/open.c src/putdata.c src/getdata.c src/flush.c src/getdata.h.in src/add.c src/nframes.c: Rename format_file in gd_entry_t to fragment_index, also similar function parameters. * bindings/cxx/entry.cpp bindings/cxx/entry.h bindings/f77/fgetdata.c bindings/f77/getdata.f.in bindings/f77/fgetdata.h bindings/f77/getdata.f90.in: Update bindings to match. * test/add_rdonly.c test/add_invalid.ca test/add.c test/add_code.c test/add_duplicate.c test/add_type.c test/add_meta.c test/add_format.c: Updated. * src/open.c (_GD_ParseRaw): Use me instead of E->fragment_index, since the latter hasn't been initialised yet. * test/format_filename.c test/nformats.c test/format_filename_oor.c: Removed. * test/fragmentname.c test/nfragments.c test/fragmentname_oor.c: Added. 2008-10-17 D. V. Wiebe <getdata@ketiltrout.net> svn:163 * src/getdata.c (_GD_DoString) src/string.c (get_string): Add one to string length to account for terminating NUL. * src/putdata.c (_GD_DoStringOut) src/string.c (put_string): Return string length. * src/format_list.c: Renamed get_format_filename to get_fragmentname and get_nformats to get_nfragments. Bindings changed. * src/constant.c (get_constant put_constant): Reutrn -1 on error. 2008-10-16 D. V. Wiebe <getdata@ketiltrout.net> svn:161 * src/meta_list.c src/nmeta.c: Fail if the specified parent is itself a metafield. 2008-10-16 D. V. Wiebe <getdata@ketiltrout.net> svn:155 * src/open.c: Moved meta field enumeration to _GD_ParseFieldSpec from _GD_ParseDirective to allow dirfile_add_metaspec to benefit seamlessly. * src/add.c (dirfile_add_metaspec dirfile_add_spec): Reversed parameters. It's better to keep the order consistent with the other dirfile_add functions rather than having it consistent with the format file. * bindings/cxx/dirfile.cpp bindings/cxx/dirfile.h bindings/f77/fgetdata.c bindings/f77/fgetdata.h bindings/f77/getdata.f90.in README.cxx README.f95 README.f77: Ditto for bindings. * src/add.c (dirfile_add_metaspec dirfile_add_spec): Fail on a read-only dirfile or format_file out of range. * src/add.c (dirfile_add_metaspec): Pass parent to _GD_ParseFieldSpec. * test/add_meta_spec_invalid.c test/add_meta_spec.c test/add_meta_spec_directive.c: Added. 2008-10-15 D. V. Wiebe <getdata@ketiltrout.net> svn:151 * src/add.c src/flush.c src/getdata.c src/include.c src/internal.h src/nframes.c src/open.c src/putdata.c man/dirfile-format.5: Made endianness fragment-local. * man/dirfile_include.3: Added. 2008-10-15 D. V. Wiebe <getdata@ketiltrout.net> svn:148 * src/include.c (dirfile_include): Throw GD_E_ACCMODE if GD_CREAT or GD_TRUNC are passed to a read-only dirfile. * test/include.c test/include_invalid.c test/include_accmode.c test/include_creat.c test/include_nonexistent.c: Added. 2008-10-15 D. V. Wiebe <getdata@ketiltrout.net> svn:147 * README.f77 bindings/f77/fgetdata.c bindings/f77/fgetdata.h bindings/f77/getdata.f.in: Add more Fortran 77 bindings. * README.f95 bindings/f77/fgetdata.f90.in: Added Fortran 95 bindings for the new public functions. 2008-10-14 D. V. Wiebe <getdata@ketiltrout.net> svn:146 * bindings/f77/fgetdata.c bindings/f77/fgetdata.h bindings/f77/getdata.f90.in: Renamed GDFNFT to GDFNFO. * README.f77 bindings/f77/fgetdata.c bindings/f77/fgetdata.h bindings/f77/getdata.f.in bindings/f77/make_parameters.c: Added Fortran 77 bindings for the new public functions. 2008-10-14 D. V. Wiebe <getdata@ketiltrout.net> svn:143 * test/nframes_empty.c: Correct for removal of GD_E_EMPTY. * README.cxx bindings/cxx/dirfile.h bindings/cxx/dirfile.cpp bindings/cxx/entry.h: Added C++ bindings for new public functions. * src/constant.c: get_constant returns size_t, not ssize_t, like the other get_<foo>() functions. * src/getdata.h.in: Add some missing public prototypes. * src/nfields.c src/nmeta.c: Removed the _ after nmeta in public function names. * test/nmeta_type.c test/nmeta_vectors_parent.c test/nmeta_parent.c test/add_meta_phase.c test/add_meta_multiply.c test/nmeta_type_invalid.c test/add_meta_linterp.c test/add_meta_lincom.c test/nmeta_invalid.c test/nmeta.c test/nmeta_vectors_invalid.c test/add_meta_bit.c test/add_meta.c test/nmeta_type_parent.c: Updated. * src/close.c (_GD_FreeD) src/entry.c (_GD_FreeE) src/field_list.c src/internal.h src/meta_list.c: Replaced get_constant_list() and get_string_list() with get_field_list_by_type(), which reduces the amount of duplicated code and provides a more flexible interface. Similarly with the META versions. * test/clist.c test/clist_invalid.c test/clist_meta.c test/clist_meta_invalid.c test/slist.c test/slist_invalid.c test/slist_meta.c test/slist_meta_invalid.c: Removed. * test/flist_type.c test/flist_type_invalid.c test/flist_type_meta.c test/flist_type_meta_invalid.c: Added. * src/open.c: Reduce paranoia by not re-zeroing memory already memset to zero. 2008-10-14 D. V. Wiebe <getdata@ketiltrout.net> svn:140 * src/legacy.c src/errors.c src/nframes.c (get_nframes64): GD_E_EMPTY is no-longer an error. (Per discussion with Barth.) * bindings/f77/make_parameters.c: Updated. 2008-10-14 D. V. Wiebe <getdata@ketiltrout.net> svn:139 * bindings/f77/test/fget_field_list.f90: Fix for new list and count function behaviour. * bindings/cxx/test/addentry.cpp: Fix for new get_nfields behaviour and properly clean-up dirfile. * src/entry.c (_GD_FreeE) src/internal.h: Add calculated and scalar[] array. * src/open.c (_GD_SetScalar): Added. * src/open.c (_GD_ParseRaw _GD_ParseLincom _GD_ParseLinterp _GD_ParseMultiply _GD_ParseBit _GD_ParsePhase _GD_ParseConst _GD_ParsePhase): Record non-numeric scalar tokens for deferred calculation. Numeric tokens are detected using strtod(). * src/entry.c (_GD_GetScalar _GD_CalculateEntry): Added. * src/entry.c (get_entry) src/getdata.c (_GD_DoField) src/putdata.c (_GD_DoFieldOut): Call _GD_CalculateEntry when necessary. * src/constant.c (put_constant): Reset clients after changing the constant. * src/add.c (_GD_Add) src/open.c (_GD_ParseConst): Initialise client list. * test/entry_bit_scalar.c test/entry_lincom_scalar.c test/entry_phase_scalar.c test/entry_raw_scalar.c test/parse_bit_scalar.c test/parse_lincom_scalar.c test/parse_phase_scalar.c test/parse_raw_scalar.c test/entry_raw_scalar_code test/entry_raw_scalar_type: Added. 2008-10-14 D. V. Wiebe <getdata@ketiltrout.net> svn:138 * src/field_list.c (get_string_values): Fix array out of bounds crash. * src/internal.h: Remove errant ; on _GD_InternalError macro. * src/open.c (dirfile_open): Gave INDEX it's own explicit entry. This automatically allows defining /META fields for INDEX, per Barth's request. This entry has the special type GD_INDEX_ENTRY. Some other simplifications/complications result. First among these is that the list functions and the counting functions now may include INDEX, as appropriate. * test/add_lincom.c test/add_sort.c test/add_spec_directive.c test/add_phase.c test/add_string.c test/add_multiply.c test/add_bit_numbits.c test/add_bit_bitsize.c test/flist.c test/vlist.c test/add_raw.c test/add_bit.c test/add_code.c test/add_duplicate.c test/add_const.c test/nvectors.c test/add_type.c test/add_meta.c test/parse_sort.c test/add_linterp.c test/add_format.c test/add_spec.c: Update for new list and counting function behaviour. * test/parse_meta_index.c: Added. * src/common.c (_GD_GetEntry): Removed (no longer needed). Callers call _GD_FindField directly now, and must throw their own errors. * src/getdata.c (_GD_DoField) src/putdata.c (_GD_DoFieldOut) src/spf.c (_Get_SPF): Replaced INDEX special-casing with GD_INDEX_ENTRY handling. 2008-10-13 D. V. Wiebe <getdata@ketiltrout.net> svn:137 * src/add.c (_GD_Add): Properly initialise the private entry after creating it. Crash report from Matthew Truch. * test/add_meta_linterp_invalid.c test/add_meta_lincom_invalid.c test/add_raw_invalid.c test/nmeta_vectors_parent.c test/nmeta_parent.c test/add_meta_phase_invalid.c test/add_invalid.c test/add_phase_invalid.c test/add_string.c test/add_linterp_invalid.c test/add_bit_invalid.c test/add_lincom_invalid.c test/add_meta_bit_invalid.c test/add_multiply_invalid.c test/add_meta_multiply_invalid.c test/add_spec_invalid.c test/nmeta_type_parent.c: Fix compiler warning. * getdata.h.in: Add declarations for dirfile_add_string() and dirfile_add_const(). 2008-10-12 D. V. Wiebe <getdata@ketiltrout.net> svn:136 * src/add.c (_GD_Add): Prohibit declaring METAs in a fragment not containing its parent. * src/open.c (_GD_ParseDirective): Ditto. * src/getdata.h.in: GD_FORMAT_AUTO is no longer needed. * src/internal.h src/open.c: MAX_IN_COLS moved to header. * src/add.c (dirfile_add_metaspec dirfile_add_spec): Added. * src/internal.h: Store subdir (sname) in include list. * src/close.c (_GD_FreeD): free sname. * src/open.c (_GD_ParseRaw _GD_ParseFieldSpec _GD_ParseDirective): Derive subdir and other relevant information from the include_list, where possible. * src/open.c (_GD_Tokenise): Allow specification of the empty string as "". * src/open.c (_GD_ValidateField): Prohibit reserved words and the empty string. * src/add.c (_GD_Add): Provide defaults for CONST and STRING; properly enumerate types. * src/add.c: Add GD_INVALID checks to all public functions. * src/add.c (dirfile_add_metalincom dirfile_add_metalinterp dirfile_add_metabit dirfile_add_metamultiply dirfile_add_metaphase): Put parent parameter before field_code to mimic the field spec order. * src/flush.c (_GD_FieldSpec _GD_FlushMeta): Properly handle META fields. * src/getdata.h.in: dirfile_add_raw dirfile_add dirfile_add_spec dirfile_add_metaspec may all potentially call I/O functions; ergo, don't mark them with THROW.o * test/Makefile.am: Re-organise tests. * test/add_meta_linterp_invalid.c test/add_meta_lincom_invalid.c test/vlist_invalid.c test/add_raw_invalid.c test/vlist_meta.c test/cvlist_invalid.c test/svlist_invalid.c test/cvlist.c test/svlist.c test/add_meta_phase_invalid.c test/add_invalid.c test/add_meta_phase.c test/add_phase_invalid.c test/add_spec_directive.c test/add_string.c test/clist_invalid.c test/add_linterp_invalid.c test/add_meta_multiply.c test/slist_invalid.c test/clist.c test/cvlist_meta_invalid.c test/flist_meta_invalid.c test/slist.c test/svlist_meta_invalid.c test/cvlist_meta.c test/vlist_meta_invalid.c test/svlist_meta.c test/parse_string_null.c test/add_meta_linterp.c test/add_meta_lincom.c test/vlist.c test/add_bit_invalid.c test/add_lincom_invalid.c test/add_meta_bit_invalid.c test/add_meta_bit.c test/add_multiply_invalid.c test/add_const.c test/add_meta_multiply_invalid.c test/clist_meta_invalid.c test/add_meta.c test/add_spec_invalid.c test/slist_meta_invalid.c test/clist_meta.c test/add_spec.c test/slist_meta.c test/flist_meta.c: Added tests for the list functions, add_spec, and add_meta. * src/include.c (_GD_Include): Extracted include file handler from _GD_ParseDirective in src/open.c. * src/include.c (dirfile_include): Added. * src/add.c (_GD_Add) src/getdata.c (_GD_DoRaw) src/include.c (_GD_Include) src/nframes.c (get_nframes64) src/putdata.c (_GD_DoRawOut): Make encodings fragment specific. * src/flush.c (_GD_FlushMeta): Write /ENCODING. 2008-10-11 D. V. Wiebe <getdata@ketiltrout.net> svn:135 * src/open.c (_GD_Tokenise _GD_ParseDirective _GD_ParseFieldSpec _GD_ParseFormatFile): Okay, the parser is now in three pieces: tokeniser, directive parser (formerly _GD_ParseFormatLine), and field spec parser, all called from _GD_ParseFormatFile, which handles looping through a format file. This should be sufficiently functional for the upcoming features. 2008-10-11 D. V. Wiebe <getdata@ketiltrout.net> svn:133 * src/open.c (_GD_Tokenise _GD_ParseFormatLine): Split tokeniser from line parser. 2008-10-10 D. V. Wiebe <getdata@ketiltrout.net> svn:132 * src/open.c (_GD_ParseFormatFile _GD_ParseFormatLine dirfile_open): Properly propagate standards. 2008-10-10 D. V. Wiebe <getdata@ketiltrout.net> svn:131 * src/open.c (_GD_ParseFieldSpec): Properly propagate have_first to caller. * src/open.c (_GD_ParseFormatFile _GD_ParseFormatLine): Split line parsing (now in _GD_ParseFormatLine) from the format file loop (the little bit remaining in _GD_ParseFormatFile). * bindings/cxx/test/Makefile.am: Properly clean up after tests. 2008-10-10 D. V. Wiebe <getdata@ketiltrout.net> svn:130 * src/getdata.h.in: Incorporate a GD_SCALAR_ENTRY flag in gd_entype_t. * src/field_list.c (get_nvectors) src/meta_list.c (get_nmeta_vectors): Use GD_SCALAR_ENTRY. * src/add.c (_GD_Add): Properly initialise the meta field lists in the private entry to prevent crash on error. (Reported by Matthew Truch) * src/raw.c (_GD_RawTouch): Add mode to open call (patch from Matthew Truch). * src/getdata.h.in: Add GD_E_DIMENSION * src/getdata.c src/putdata.c src/spf.c: Detect and fail if a vector type contains an input field that's a scalar. * src/spf.c (_GD_GetSPF): Removed redundant field_code parameter. * src/common.c (_GD_GetEntry): Removed FILEFRAM as an alias for INDEX per discussion with Barth. 2008-10-10 D. V. Wiebe <getdata@ketiltrout.net> svn:129 * src/entry.c (_GD_FreeE): Renamed from dirfile_free_entry_strings (for which a new boilerplate function has been created). Separated cleaning up internal and externally created entries. Internally, the library now uses this function in all places where it used to call dirfile_free_entry_strings. * src/open.c (_GD_ParseRaw): n_meta should be zero. * src/open.c (_GD_ParseFormatFile): fix duplicates check * test/add_sort.c test/nfields_type.c test/nfields_type_invalid.c test/nmeta.c test/nmeta_invalid.c test/nmeta_parent.c test/nmeta_type.c test/nmeta_type_invalid.c test/nmeta_type_parent.c test/nmeta_vectors.c test/nmeta_vectors_invalid.c test/nmeta_vectors_parent.c test/nvectors.c test/nvectors_invalid.c test/parse_const.c test/parse_const_ncols.c test/parse_duplicate.c test/parse_meta.c test/parse_meta_parent.c test/parse_meta_raw.c test/parse_quote.c test/parse_sort.c test/parse_string.c test/parse_string_ncols.c test/parse_whitespace.c: Added. * src/add.c (_GD_Add): Encapsulate the file creation with a call to an encoding specific *touch() function. * src/raw.c (_GD_RawTouch): Added. (Also used for the ASCII encoding). * src/meta_list.c: Fixed all functions to get them working. * src/field_list.c: Call _GD_ClearError in all public functions. * src/nmeta.c: Added (META version of nfields.c) * src/open.c (_GD_ParseFieldSpec): Moved some repeated code out of the ParseFoo functions and into this one. Also, don't count META fields in n_string or n_cost. 2008-10-09 D. V. Wiebe <getdata@ketiltrout.net> svn:127 * src/open.c (_GD_ValidateField): Now takes a pointer to the parent, rather than the parent's name, and generates the "/" demarcation itself. * src/open.c (_GD_ParseFormatFile): Determine META field's parent entry. * src/open.c (_GD_ParseRaw _GD_ParseLincom _GD_ParseLinterp _GD_ParseBit _GD_ParsePhase _GD_ParseConst _GD_ParseString _GD_ParseFieldSpec): Pass around the parent's pointer, rather than its name. * src/add.c (_GD_Add) src/open.c (_GD_ParseRaw): Remember the full path name. * src/getdata.c (_GD_DoRaw) src/nframes.c (_GD_NFrames) src/putdata.c (_GD_DoRawOut): No need to compose file name. * src/open.c (_GD_ParseFieldSpec): Simplify the switch() code. Also, check for duplicates. * src/common.c (_GD_InsertSort): Added. * src/open.c (_GD_ParseFormatFile): Automatically handle /u and /ooo out of range. * src/close.c (_GD_FreeD): Clean up include_list[0], too. * src/close.c (dirfile_close): Call _GD_FlushMeta(). 2008-10-08 D. V. Wiebe <getdata@ketiltrout.net> svn:125 * src/open.c (_GD_ParseRaw): Prohibit META RAW fields. * src/add.c (_GD_Add): Ditto. * src/add.c (dirfile_add_metaraw): Deleted. 2008-10-08 D. V. Wiebe <getdata@ketiltrout.net> svn:124 * src/open.c (_GD_ValidateField): Malloc one more byte for the terminating NULL. Crash report from Matthew Truch. * test/add_many.c: Add test-case for same (from Matthew Truch). * src/internal.h: Removed all instances of ierror and user_error in the DIRFILE struct. * src/add.c (_GD_Add): Properly compose metafield codes. Always create the empty binary file. 2008-10-08 D. V. Wiebe <getdata@ketiltrout.net> svn:123 * src/add.c: Fix debugging messages 2008-10-08 D. V. Wiebe <getdata@ketiltrout.net> svn:122 * man/Makefile.am: Fix install target (patch from Matthew Truch) 2008-10-08 D. V. Wiebe <getdata@ketiltrout.net> svn:121 * src/getdata.h.in: Add forward declarations for public functions. 2008-10-08 D. V. Wiebe <getdata@ketiltrout.net> svn:120 * src/putdata.c (putdata64): Fail if passed a CONST or STRING field code. * src/string.c (put_string): Added. * src/constant.c (put_constant): Added. * src/add.c (_GD_Add): Renamed from dirfile_add, which is now a boilerplate stub for this internal function. Added meta field support. * src/add.c (dirfile_add_meta dirfile_add_metaraw dirfile_add_metalincom dirfile_add_metalinterp dirfile_add_metabit dirfile_add_metamultiply dirfile_add_metaphase dirfile_add_metastring dirfile_add_metaconst): Added. * src/add.c (_GD_Add): create an empty raw file, when necessary. 2008-10-07 D. V. Wiebe <getdata@ketiltrout.net> svn:119 * src/add.c (dirfile_add_string dirfile_add_const): Added. * man/dirfile_add_raw: Updated for dirfile_add_string and dirfile_add_const. 2008-10-07 D. V. Wiebe <getdata@ketiltrout.net> svn:118 * src/flush.c: Add hostname to comments at the top of the format file. * src/nfields (get_nvectors get_nfields_by_type): Added. * man/get_nvectors.3 man/get_nfields_by_type.3: Added. 2008-10-07 D. V. Wiebe <getdata@ketiltrout.net> svn:115 * src/open.c: Record whether a field is meta. * src/open.c: Count strings, constants and meta fields. * src/open.c (_GD_CreateDirfile): If creating (or truncating) a dirfile, assume GD_UNENCODED if GD_AUTO_ENCODED was specified. * src/putdata.c (_GD_DoRawOut): Set GD_E_UNKNOWN_ENCODING instead of GD_UNSUPPORTED if the encoding can't be figured out. * src/field_list.c (get_constant_values get_constant_list get_string_values get_string_list get_vector_list): Added. * src/field_list.c (get_field_list): Don't return meta fields in the list. * src/nfields.c: Return the number of non-meta fields. * src/constant.c: Renamed from src/get_constant.c * src/string.c: Renamed from src/get_string.c * src/getdata.c (_GD_DoString): If num_samp == 0 or data_out is NULL, don't copy the string. * src/errors.c (dirfile_user_error): Removed per discussion with Barth. * man/get_constant.3 man/get_error.3 man/get_string.3: Added. 2008-10-06 D. V. Wiebe <getdata@ketiltrout.net> svn:114 * test/error_error.c: Added. * test/flush_recurse.c: Removed. _GD_Flush no longer resolves input fields. * src/common.c (_GD_GetEntry): Added a _GD_FindField wrapper that properly handles INDEX/FILEFRAM. * src/open.c (_GD_ValidateField): Add field prefix needed for META fields. * src/open.c (_GD_ParseFieldSpec): Split from _GD_ParseFormatFile to handle both META and regular field specs. * src/open.c (_GD_ParseFormatFile): Add /META support. * src/open.c (_GD_ParseFormatFile): Fix the parser bug introduced in svn:113. * src/open.c (_GD_CreateDirfile): Report the dirfile path not the format file path in error strings. * src/flush.c src/getdata.c src/putdata.c src/spf.c: Use pre-cached entry pointers. * src/get_constant.c src/get_string.c: Added. * src/getdata.c (getdata64): Prevent calling getdata() with CONST or STRING fields. * src/errors.c: Got rid of the positional parameter C99 desecration which GCC 4.3 complains about. get_error_string() now builds the string itself. * src/format_list.c (get_format_filename): make the index parameter unsigned. 2008-10-05 D. V. Wiebe <getdata@ketiltrout.net> svn:113 * src/add.c src/close.c src/entry.c src/flush.c src/getdata.c src/getdata.h.in src/open.c src/putdata.: Add support for CONST, STRING, and ENCODING. * src/common.c src/open.c: Added escape sequence and quoted token support. * src/flush.c src/getdata.c src/putdata.c src/spf.c: Functions that check recurse_level now also take care of incrementing and decrementing it. * man/dirfile-format.5: Update for standards version six. 2008-10-02 D. V. Wiebe <getdata@ketiltrout.net> svn:112 * configure.ac: Locate `slim' and `unslim' binaries needed for slimlib tests. * test/Makefile.am test/ascii_get.c test/ascii_nframes.c test/ascii_put.c test/slim_get.c test/slim_nframes.c test/slim_put.c: Add tests for ASCII and slimlib encodings. (slim_put is currently always skipped.) * src/ascii.c: Bug fixes. 2008-10-01 D. V. Wiebe <getdata@ketiltrout.net> svn:111 * src/entry.c: Properly initialise the private data in the gd_entry_t object returned. * bindings/cxx/test/putdata.cpp: Fix constructor call. * bindings/f77/make_parameters.c: Add encoding framework parameters. 2008-10-01 D. V. Wiebe <getdata@ketiltrout.net> svn:110 * src/internal.h: Moved config.h inclusion to internal.h * src/open.c: Added "." to the list of prohibited field code characters. * src/getdata.h.in, src/internal.h: Hide dirfile implementation from the public. * src/errors.c: Added get_error() and dirfile_user_error() * src/getdata.c src/internal.h src/nframes.c src/open.c src/putdata.c src/raw.c: Added encoding framework. * src/getdata.c src/slim.c: Add slimlib encoding. * src/ascii.c src/getdata.c: Add ASCII encoding. 2008-09-28 D. V. Wiebe <getdata@ketiltrout.net> svn:109 * bindings/cxx/dirfile.cpp bindings/cxx/dirfile.h bindings/cxx/entry.cpp bindings/cxx/entry.h test/Makefile.am test/addentry.cpp: Add C++ support for dirfile_add(), dirfile_flush_metadata(), get_format_filename(), and get_nformats(). * bindings/f77/fgetdata.c bindings/f77/fgetdata.h bindings/f77/getdata.f.in bindings/f77/getdata.f90.in bindings/f77/make_parameters.c: Add F77 and F95 bindings for dirfile_add(), dirfile_flush_metadata(), get_format_filename(), and get_nformats(). * src/add.c (dirfile_add_raw): swap spf and data_type to correspond to the ordering in the format file. 2008-09-28 D. V. Wiebe <getdata@ketiltrout.net> svn:108 * man/dirfile_add.3 man/dirfile_add_raw.3: Added. * man/Makefile.am: Install all the mans previously forgotten about. Also, link to aliases. * src/add.c (dirfile_add_lincom): Don't use a variadic function, since in obfuscates data typing. * src/add.c (dirfile_add): Add suberror codes for GD_E_BAD_ENTRY. Initialise internal data. Initialise the first RAW field, if necessary. * src/close.c src/flush.c src/open.c: Distinguish between "canonical" format file names (i.e. the full path used to open the file) and "external" names (i.e. the relative path written to the parent format file). * src/errors.c: Add strings for dirfile_add(). * src/getdata.h.in: Move FILENAME_MAX stuff into internal.h since it doesn't need to be public anymore. * src/internal.h: Always define MAX_LINE_LENGTH to 4096. * test/Makefile.am test/add.c test/add_bit.c test/add_bit.c test/add_bit_bitnum.c test/add_bit_bitsize.c test/add_bit_numbits.c test/add_code.c test/add_duplicate.c test/add_format.c test/add_lincom.c test/add_lincom_nfields.c test/add_linterp.c test/add_multiply.c test/add_phase.c test/add_raw.c test/add_raw_spf.c test/add_raw_type.c test/add_rdonly.c test/add_type.c test/error.c test/error_short.c test/flush_meta.c test/format_filename.c test/format_filename_oor.c test/nformats.c: Added tests for dirfile_add() and alternates, get_error_string(), dirfile_flush_metadata(), get_format_filename(), and get_nformats(). * test/Makefile.am: test put_linterp_noin, which has been around for a while, but missing from the Makefile. * test/trunc_readonly.c: Deleted. (An old copy of trunc_rdonly.c) 2008-09-27 D. V. Wiebe <getdata@ketiltrout.net> svn:106 * src/flush.c (_GD_Flush): Don't call fsync on read-only dirfiles. * src/open.c (_GD_ParseFormatFile dirfile_open): Don't find the first raw field at the end, but rather do it as we're scanning raw fields. Also, record some format file metadata: whether it contains the first raw field, and whether it is modified. * src/close.c (_GD_FreeD): free the include_list. * src/internal.h: Minimum format file line length is 4096 characters. * src/flish.c (_GD_FlushMeta dirfile_flush_metadata): flush metadata changes to disk (i.e. write format files). Includes public function. * src/add.c (dirfile_add): prevent adding to read-only dirfiles 2008-09-26 D. V. Wiebe <getdata@ketiltrout.net> svn:105 * man/get_entry.3 src/add.c src/getdata.h.in src/open.c: Expose include_list to the public. Add include index to each entry. * man/get_format_filename.3 man/get_nformats.3 src/format_list.c src/getdata.h.in: Add public functions get_nformats() and get_format_filename(). 2008-09-25 D. V. Wiebe <getdata@ketiltrout.net> svn:103 * src/open.c (_GD_ParseRaw _GD_ParseLincom _GD_ParseLinterp _GD_ParseMultiply _GD_ParseBit _GD_ParsePhase): Fixed memory leaks * src/errors.c (_GD_ClearError): Replaced with a macro of the same name defined in internal.h. * src/add.c src/getdata.h.in: First part of dirfile_add(): input validation and add to DIRFILE list. 2008-09-22 D. V. Wiebe <getdata@ketiltrout.net> svn:99 GetData-0.3.1 released. 2008-09-22 D. V. Wiebe <getdata@ketiltrout.net> svn:97 * configure.ac bindings/cxx/Makefile.am bindings/cxx/test/Makefile.am: Call the C++ bindings libgetdata++ instead of libdirfile to be a little more explicit about what it is. This also allows installation alongside TK's libdirfile. 2008-09-22 D. V. Wiebe <getdata@ketiltrout.net> svn:94 * bindings/cxx/entry.cpp: Use <cstring> instead of <string>. Patch from Matthew Truch. 2008-09-18 D. V. Wiebe <getdata@ketiltrout.net> svn:90 * src/legacy.c (_GD_GetDirfile) test/legacy_get_rofs.c test/legacy_get_put.c: Open dirfiles read-only unless called via PutData(). Re-open read-only dirfile read-write when necessary. Added two test-cases for same. * test/Makefile.am: Conditionally compile legacy tests. 2008-09-15 D. V. Wiebe <getdata@ketiltrout.net> svn:86 * src/errors.c: Fix GD_E_RAW_IO error string. 2008-09-15 D. V. Wiebe <getdata@ketiltrout.net> svn:84 GetData-0.3.0 released. 2008-09-05 D. V. Wiebe <getdata@ketiltrout.net> svn:77 * m4/c99.m4 configure.ac Makefile.am: Re-implement AC_PROG_CC_C99 as GD_PROG_CC_C99 to fix `deprecated -c99' warning with icc. * bindings/cxx/dirfile.h bindings/cxx/entry.h bindings/cxx/test/getdata.cpp bindings/cxx/test/putdata.cpp bindings/f77/fgetdata.h test/convert_float32_float64.c test/convert_float32_int16.c test/convert_float32_int32.c test/convert_float32_int64.c test/convert_float32_int8.c test/convert_float32_uint16.c test/convert_float32_uint32.c test/convert_float32_uint64.c test/convert_float32_uint8.c test/convert_float64_float32.c test/convert_int16_float32.c test/convert_int16_float64.c test/convert_int16_int32.c test/convert_int16_int64.c test/convert_int16_int8.c test/convert_int16_uint16.c test/convert_int16_uint32.c test/convert_int16_uint64.c test/convert_int16_uint8.c test/convert_int32_float32.c test/convert_int32_float64.c test/convert_int64_float32.c test/convert_int64_float64.c test/convert_int8_float32.c test/convert_int8_float64.c test/convert_int8_int16.c test/convert_int8_int32.c test/convert_int8_int64.c test/convert_int8_uint16.c test/convert_int8_uint32.c test/convert_int8_uint64.c test/convert_int8_uint8.c test/convert_uint16_float32.c test/convert_uint16_float64.c test/convert_uint16_int16.c test/convert_uint16_int32.c test/convert_uint16_int64.c test/convert_uint16_int8.c test/convert_uint16_uint32.c test/convert_uint16_uint64.c test/convert_uint16_uint8.c test/convert_uint32_float32.c test/convert_uint32_float64.c test/convert_uint64_float32.c test/convert_uint64_float64.c test/convert_uint8_float32.c test/convert_uint8_float64.c test/convert_uint8_int16.c test/convert_uint8_int32.c test/convert_uint8_int64.c test/convert_uint8_int8.c test/convert_uint8_uint16.c test/convert_uint8_uint32.c test/convert_uint8_uint64.c test/dfes_phase.c test/dfes_raw.c test/flush.c test/flush_all.c test/get64.c test/get_bit.c test/get_char.c test/get_endian16.c test/get_endian32.c test/get_endian64.c test/get_endian8.c test/get_endian_float32.c test/get_endian_float64.c test/get_ff.c test/get_float32.c test/get_float64.c test/get_foffs.c test/get_fs.c test/get_int16.c test/get_int8.c test/get_lincom1.c test/get_lincom2.c test/get_lincom3.c test/get_linterp.c test/get_linterp_noin.c test/get_linterp_notab.c test/get_multiply.c test/get_multiply_noin.c test/get_nonexistent.c test/get_null.c test/get_off64.c test/get_phase.c test/get_sf.c test/get_ss.c test/get_type.c test/get_uint16.c test/legacy_get.c test/legacy_put.c test/nframes_spf.c test/put64.c test/put_bit.c test/put_char.c test/put_endian16.c test/put_endian32.c test/put_endian64.c test/put_endian8.c test/put_endian_float32.c test/put_endian_float64.c test/put_ff.c test/put_float32.c test/put_float64.c test/put_foffs.c test/put_fs.c test/put_int16.c test/put_int8.c test/put_lincom1.c test/put_lincom2.c test/put_lincom_noin.c test/put_linterp.c test/put_linterp_noin.c test/put_linterp_notab.c test/put_multiply.c test/put_off64.c test/put_phase.c test/put_phase_noin.c test/put_sf.c test/put_ss.c test/put_uint16.c: Fix compiler warnings 2008-09-05 D. V. Wiebe <getdata@ketiltrout.net> svn:75 * man/get_field_list.3 src/field_list.c: NULL terminate the list. * src/field_list.c (get_field_list): Return GD_E_ALLOC on malloc error. 2008-09-04 D. V. Wiebe <getdata@ketiltrout.net> svn:73 * bindings/cxx/entry.h (Entry::Scale Entry::Offset): fix return. * src/flush.c (_GD_Flush): Handle GD_NO_ENTRY in switch * test/dfes_bit.c test/dfes_linterp test/dfes_lincom test/dfes_multiply test/dfes_phase test/dfes_raw test/flist test/flush_invalid test/flush_bad_code test/flush_recurse: Remove unused variables * test/entry_lincom: Include math.h 2008-09-04 D. V. Wiebe <getdata@ketiltrout.net> svn:68 * src/getdata_legacy.h src/legacy.c: Go through all the bother to reconstruct the former FormatType for callers who use GetFormat() * src/close.c (_GD_FreeD): Handle GD_NO_ENTRY in switch * configure.ac: Use modern AM_INIT_AUTOMAKE invocation so as not to have to repeat package name and package version. * Makefile.am: Require automake 1.6 * NEWS: added 2008-09-04 D. V. Wiebe <getdata@ketiltrout.net> svn:67 * bindings/cxx/Makefile.am: Fix include dir * bindings/f77/fgetdata.c (GDFELC): Return nfield = 0 on error * bindings/f77/getdata.f90.in: Make field an array * Makefile.am: Add ChangeLog to dist. * README.cxx README.f77 README.f95: Update for get_entry() bindings 2008-09-04 D. V. Wiebe <getdata@ketiltrout.net> svn:66 * test/Makefile.am test/dfes_bit.c test/dfes_lincom.c test/dfes_linterp.c test/dfes_multiply.c test/dfes_null.c test/dfes_phase.c test/dfes_raw.c test/dfes_zero.c test/entry_bad_code.c test/entry_bit.c test/entry_invalid.c test/entry_lincom.c test/entry_linterp.c test/entry_multiply.c test/entry_phase.c test/entry_raw.c: Add test suite for dirfile_free_entry_strings() and get_entry() * bindings/cxx/entry.h bindings/cxx/test/entry.cpp bindings/f77/fgetdata.c bindings/f77/getdata.f90.in bindings/f77/test/fget_entry.f90 man/get_entry.3 src/entry.c src/getdata.h.in: RAW filename should be internal * bindings/f77/make_parameters.c: Fix parentheses around F77 parameters * man/Makefile.am: install get_entry.3 2008-09-03 D. V. Wiebe <getdata@ketiltrout.net> svn:64 svn:65 * src/entry.c (dirfile_free_entry_strings): Fix double free * bindings/cxx/dirfile.cpp bindings/cxx/dirfile.h: Use the GetData namespace * bindings/cxx/Makefile.am bindings/cxx/dirfile.cpp bindings/cxx/dirfile.h bindings/cxx/entry.cpp bindings/cxx/entry.h bindings/cxx/test/Makefile.am bindings/cxx/test/entry.cpp: Add GetData::Entry class to abstractise gd_entry_t as well as C++ bindings for get_entry(). * bindings/f77/fgetdata.c bindings/f77/getdata.f.in bindings/f77/getdata.f90.in bindings/f77/make_parameters.c bindings/f77/test/fget_entry.f90: Add Fortran bindings for get_entry() 2008-09-03 D. V. Wiebe <getdata@ketiltrout.net> svn:63 * src/getdata.h.in: add a GD_NO_ENTRY entry type * man/dirfile_free_entry_strings man/get_entry.3 src/entry.c src/getdata.h.in: add dirfile_free_entry_strings() 2008-09-02 D. V. Wiebe <getdata@ketiltrout.net> svn:62 * bindings/f77/test/Makefile.am: fix include directory * src/getdata.h.in src/close.c src/common.c src/getdata.c src/nframes.c src/open.c src/putdata.c src/spf.c: re-organised gd_entry_t again * src/getdata.c (_GD_DoLincom): ensure we return 0 on error * src/close.c (dirfile_close): return -1 instead of 1 on error * src/entry.c (get_entry): instead of returning the library's internal gd_entry_t, copy the relevant bits to a caller supplied object. This should be significantly more bullet proof against unintentional metadata corruption * man/get_entry.3: update * test/Makefile.am: clean up after tests 2009-09-02 D. V. Wiebe <getdata@ketiltrout.net> svn:61 * man/get_entry.3 src/Makefile.am src/entry.c src/getdata.h.in: added get_entry() * src/close.c src/flush.c: Split flush.c from close.c * src/field_list.c src/nfields.c: Split nfields.c from field_list.c * src/common.c src/open.c: Moved _GD_GetLine to common.c * src/Makefile.am: Don't export internal symbols 2009-09-02 D. V. Wiebe <getdata@ketiltrout.net> svn:60 * README src/getdata.h.in: Add NO_GETDATA_LEGACY_API to getdata.h to permit callers to not include the legacy API. 2009-09-02 D. V. Wiebe <getdata@ketiltrout.net> svn:59 * configure.ac: disable all Fortran bindings with one option. Rename the bindings options. 2008-09-01 D. V. Wiebe <getdata@ketiltrout.net> svn:58 * src/getdata_legacy.c src/legacy.c: Re-implement GetFormat(); * src/getdata.h.in: store frame offset as off64_t * man/dirfile_flush.3: added * man/dirfile_close.3: corrected for changes made in revision 57 2008-09-01 D. V. Wiebe <getdata@ketiltrout.net> svn:57 * man/get_error_string.3 src/errors.c: Renamed getdata_error_string to get_error_string so people don't think its relevance is exclusive to getdata() * src/internal.h: Suberror codes may not = 0. * README.cxx README.f77 README.f95 bindings/cxx/dirfile.cpp bindings/cxx/dirfile.h bindings/f77/fgetdata.c bindings/f77/getdata.f.in bindings/f77/getdata.f90.in man/Makefile.am man/dirfile_close.3 src/close.c src/getdata.h.in test/Makefile.am test/close.c test/close_bad.c test/close_null.c test/flush.c test/flush_all.c test/flush_bad_code.c test/flush_invalid.c test/flush_recurse.c: Added public function dirfile_flush() along with corresponding C++, F77 and F95 bindings. dirfile_close calls dirfile_flush and might now fail (if fsync(2) or close(2) returns with an error); ergo, it now returns an integer success value, since D->error can't be checked if the call was successful. * src/close.c (dirfile_close): per the man page, now always succeeds when passed NULL. * man/dirfile-format.5 src/open.c test/Makefile.am test/parse_endian_slash.c test/parse_foffs_slash.c test/parse_include_slash.c test/parse_version_slash.c: reserved words in the format file may now have an initial '/' to ensure they're treated as such. * man/dirfile-format.5 src/errors.c src/open.c test/Makefile.am test/parse_name.c: prohibit / \ < > # & | ; in field names. Of these, / would confuse the filesystem (and is now used to optionally demarcate reserved words), # is already cast out by GetLine(). We reserve the others for future use. Most of these are bash(1) metacharacters; ( and ) are the other non-whitespace metacharacters in bash, but GetData allows them in field names. 2008-09-01 D. V. Wiebe <getdata@ketiltrout.net> svn:56 * src/open.c src/close.c: split up dirfile_open.c * src/getdata.c src/types.c src/common.c: split up getdata.c 2008-08-30 D. V. Wiebe <getdata@ketiltrout.net> svn:54 * field_list.c: renamed get_n_fields() to get_nfields() * nframes.c: renamed get_n_frames() to get_nframes() * spf.c: renamed get_samples_per_frame() to get_spf() 2008-08-30 D. V. Wiebe <getdata@ketiltrout.net> svn:52 svn:53 * bindings/f77/Makefile.am bindings/f77/getdata.f90.in bindings/f77/test/Makefile.am bindings/f77/test/fget_field_list.f90 bindings/f77/test/fgetdata.f90: Use .f90 instead of .f95 for free-form Fortran source code 2008-08-29 D. V. Wiebe <getdata@ketiltrout.net> svn:51 * man/README.cxx man/README.f77 bindings/cxx/dirfile.cpp bindings/cxx/dirfile.h bindings/f77/fgetdata.c bindings/f77/getdata.f: added get_n_fields and get_field_list to C++ and F77 bindings. * bindings/f77/Makefile.am bindings/f77/getdata.f.in bindings/f77/make_parameters.c : automatically generate parameters * README.f95 bindings/f77/Makefile.am bindings/f77/getdata.f95.in bindings/f77/test/Makefile.am bindings/f77/test/fget_field_list.f95 bindings/f77/test/fgetdata.f95 configure.ac: Added Fortran 95 bindings 2008-08-29 D. V. Wiebe <getdata@ketiltrout.net> svn:50 * man/dirfile-format.5: Fix a rather egregious omission 2008-08-29 D. V. Wiebe <getdata@ketiltrout.net> svn:49 * src/getdata.h.in: Change GD_UNKNOWN 2008-08-26 D. V. Wiebe <getdata@ketiltrout.net> svn:47 svn:48 * man/Makefile.am man/get_field_list.3 man/get_n_fields.3 src/Makefile.am src/dirfile_open.c src/field_list.c src/getdata.h.in test/Makefile.am test/flist.c test/flist_invalid.c test/nfields.c test/nfields_invalid.c: Add get_n_fields and get_field_list functions * man/dirfile_open.3: Add BUGS section 2008-08-25 D. V. Wiebe <getdata@ketiltrout.net> svn:45 * configure.ac src/Makefile.am src/debug.c src/dirfile_open.c src/errors.c src/getdata.c src/internal.h src/nframes.c src/putdata.c src/spf.c: tracing in debug mode 2008-08-25 D. V. Wiebe <getdata@ketiltrout.net> svn:41 svn:42 svn:43 svn:44 * src/getdata_internal.h: renamed to internal.h * README.cxx README.f77: add 2008-08-25 D. V. Wiebe <getdata@ketiltrout.net> svn:40 * src/errors.c (getdata_error_string): Rewrote to get rid of the nested switches and to collect the strings. * src/errors.c src/getdata.h.in src/getdata_legacy.h src/legacy.c: Move GD_ERROR_CODES to legacy.c and deprecate. * src/dirfile_open.c src/getdata.c src/nframes.c src/putdata.c: Cleaned up error reporting code 2008-08-25 D. V. Wiebe <getdata@ketiltrout.net> svn:38 * src/dirfile_open.c src/getdata.c src/getdata.h.in src/getdata_internal.h nframes.c putdata.c spf.c: Replace the various different EntryType structs with a single, unified one. This also gets rid of the ENTRY() craziness. 2008-08-25 D. V. Wiebe <getdata@ketiltrout.net> svn:36 svn:37 * src/getdata.c src/getdata_internal.h src/putdata.c src/spf.c: Add _GD_InternalError() * src/errors.c: Rename _GD_SetGetDataError and _GD_ClearGetDataError to _GD_SetError and _GD_ClearError 2008-08-25 D. V. Wiebe <getdata@ketiltrout.net> svn:35 * bindings/f77/fgetdata.c (_GDF_ClearDirfile): Don't accidentally close dirfile unit zero 2008-08-21 D. V. Wiebe <getdata@ketiltrout.net> svn:34 * bindings/f77/fgetdata.c configure.ac src/dirfile_open.c src/getdata.c src/getdata.h.in src/getdata_internal.h src/getdata_legacy.h src/putdata.c: Fixes for compilation with icc, mostly concerning type casting. * configure.ac: AC_PREREQ([2.60]) * Makefile.am: don't include getdata.h in the tarball 2008-08-21 D. V. Wiebe <getdata@ketiltrout.net> svn:33 * src/getdata.h.in: Be less clever defining stuff. 2008-08-20 D. V. Wiebe <getdata@ketiltrout.net> svn:32 * bindings/f77/getdata.f: Add EXTERNAL function declarations 2008-08-19 D. V. Wiebe <getdata@ketiltrout.net> svn:30 * bindings/f77/test/gdfget.f: Remove references to TRIM 2008-08-19 D. V. Wiebe <getdata@ketiltrout.net> svn:26 svn:27 * README: add * Makefile.am: Remove explicit -lm 2008-08-19 D. V. Wiebe <getdata@ketiltrout.net> svn:25 * test/: Fix test suite for VPATH builds 2008-08-18 D. V. Wiebe <getdata@ketiltrout.net> svn:24 * Makefile.am configure.ac bindings/: Add C++ and Fortran 77 bindings. 2008-08-17 D. V. Wiebe <getdata@ketiltrout.net> svn:20 svn:21 * configure.ac getdata.h.in: Use AC_CONFIG_HEADERS with getdata.h * INSTALL: This is the generic autoconf/libtool INSTALL document. 2008-08-17 D. V. Wiebe <getdata@ketiltrout.net> svn:19 * Makefile.am configure.ac bin/Makefile.am bin/checkdirfile.c: add checkdirfile util 2008-08-17 D. V. Wiebe <getdata@ketiltrout.net> svn:18 * getdata_internal.h: If FILENAME_MAX is unreasonably small, still permit roomy format file lines. 2008-08-17 D. V. Wiebe <getdata@ketiltrout.net> svn:16 * Makefile.am test/: added test suite * man/get_n_frames64.3 man/getdata64.3 man/putdata.3 man/putdata64.3: added * man/getdata.3: Added .SH LIMITATIONS * src/dirfile_open.c src/errors.c src/getdata.c src/nframes.c src/spf.c: split getdata.c into smaller pieces * src/putdata.c (putdata): add support for access mode and frame offset 2008-08-12 D. V. Wiebe <getdata@ketiltrout.net> svn:13 * src/getdata.c src/getdata.h.in: rm unused error codes 2008-08-12 D. V. Wiebe <getdata@ketiltrout.net> svn:10 svn:11 svn:12 * configure.ac man/getdata.3 man/get_n_frames.3 src/getdata.c src/getdata.h.in src/getdata_internal.h src/legacy.c src/putdata.c: LFS support 2008-08-12 D. V. Wiebe <getdata@ketiltrout.net> svn:8 * src/getdata.c src/getdata.h.in: remove GD_E_ENDIAN_ERROR * src/putdata.c (_GD_DoBitOut): Multibit putdata 2008-08-12 D. V. Wiebe <getdata@ketiltrout.net> svn:7 * man/dirfile_open.3: modern symbol 2008-08-12 D. V. Wiebe <getdata@ketiltrout.net> svn:6 * src/getdata.c (_GD_SetGetDataError): don't crash on NULL * src/putdata.c (_GD_DoPhaseOut): add 2008-08-12 D. V. Wiebe <getdata@ketiltrout.net> svn:5 * src/legacy.c: Don't SEGV on bad dirfiles * src/getdata.c src/getdata_internal.h src/putdata.c: Check for invalid DIRFILEs 2008-08-12 D. V. Wiebe <getdata@ketiltrout.net> svn:4 * configure.ac: --enable-debug * src/getdata.c src/legacy.c src/putdata.c: rename DIRFILE_DEBUG to GETDATA_DEBUG 2008-08-12 D. V. Wiebe <getdata@ketiltrout.net> svn:2 * AUTHORS COPYING Makefile.am configure.ac man/Makefile.am man/dirfile-format.5 man/dirfile.5 man/dirfile_close.3 man/dirfile_open.3 get_n_frames.3 man/get_samples_per_frame.3 man/getdata.3 man/getdata_error_string.3 src/Makefile.am src/getdata.c src/getdata.h.in src/getdata_internal.h src/getdata_legacy.h src/legacy.c src/putdata.c: Initial import of getdata for sourceforge.net. Previous history for getdata can be found in the KDE subversion repository, for the kst project. |