2010-02-09 D. V. Wiebe <getdata@ketiltrout.net> svn:358
GetData-0.6.1rc2: * 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. |