This list is closed, nobody may subscribe to it.
2010 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
(5) |
Oct
(20) |
Nov
(21) |
Dec
(16) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2011 |
Jan
(1) |
Feb
(1) |
Mar
(56) |
Apr
(20) |
May
(4) |
Jun
(2) |
Jul
(3) |
Aug
(11) |
Sep
(2) |
Oct
(4) |
Nov
(18) |
Dec
(16) |
2012 |
Jan
(8) |
Feb
(12) |
Mar
(30) |
Apr
(13) |
May
(10) |
Jun
(17) |
Jul
(18) |
Aug
(19) |
Sep
|
Oct
(1) |
Nov
(1) |
Dec
(9) |
2013 |
Jan
(1) |
Feb
(4) |
Mar
(27) |
Apr
(6) |
May
(3) |
Jun
(1) |
Jul
(10) |
Aug
|
Sep
(3) |
Oct
(15) |
Nov
(4) |
Dec
(9) |
2014 |
Jan
|
Feb
(3) |
Mar
(4) |
Apr
(10) |
May
(15) |
Jun
|
Jul
(14) |
Aug
|
Sep
(2) |
Oct
(6) |
Nov
|
Dec
(9) |
2015 |
Jan
(2) |
Feb
(3) |
Mar
(1) |
Apr
(2) |
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: <ket...@us...> - 2015-04-03 01:53:39
|
Revision: 946 http://sourceforge.net/p/getdata/code/946 Author: ketiltrout Date: 2015-04-03 01:53:26 +0000 (Fri, 03 Apr 2015) Log Message: ----------- Reformat with linewidth=75 Modified Paths: -------------- trunk/getdata/NEWS Modified: trunk/getdata/NEWS =================================================================== --- trunk/getdata/NEWS 2015-04-03 00:14:27 UTC (rev 945) +++ trunk/getdata/NEWS 2015-04-03 01:53:26 UTC (rev 946) @@ -3,161 +3,169 @@ Library Changes: * Literals in format metadata may now have complex form (i.e. include a - semicolon) when the parameter is purely real. However, a non-zero imaginary - part is still an error. + semicolon) when the parameter is purely real. However, a non-zero + imaginary part is still an error. * gd_free_entry_strings() now NULLs pointers after freeing them. - * gd_entry() now returns entry metadata when they contain scalar field codes - which do not exist. In this case the GD_EN_CALC flag in the object will - not be set. Previously, on such entries, this function would fail with the - error GD_E_BAD_SCALAR, and return nothing. + * gd_entry() now returns entry metadata when they contain scalar field + codes which do not exist. In this case the GD_EN_CALC flag in the + object will not be set. Previously, on such entries, this function + would fail with the error GD_E_BAD_SCALAR, and return nothing. * gd_rename() now by default updates the target of ALIASes pointing to a renamed field to point to the new field instead of leaving them dangle. (But see GD_REN_DANGLE in the API section below). - * CARRAYs are no longer truncated to GD_MAX_CARRAY_LENGTH elements. Flushing - metadata to disk will now fail if writing a CARRAY would overflow a format - file line. (It's platform specific, but format file lines are typically - permitted to be at least 2**31 bytes long, so such an error usually - indicates something pathological happening.) The GD_MAX_CARRAY_LENGTH - symbol has been removed from the GetData header file. + * CARRAYs are no longer truncated to GD_MAX_CARRAY_LENGTH elements. + Flushing metadata to disk will now fail if writing a CARRAY would + overflow a format file line. (It's platform specific, but format file + lines are typically permitted to be at least 2**31 bytes long, so such + an error usually indicates something pathological happening.) The + GD_MAX_CARRAY_LENGTH symbol has been removed from the GetData header + file. - * Write support for bzip2-encoded and lzma-encoded data has been added. LZMA - write support is only available for .xz files, not the obsolete .lzma - format. The write support occurs out-of-place, just like how writing - gzip-encoded data works. See the gzip discussion in the 0.8.0 section below - for important notes. + * Write support for bzip2-encoded and lzma-encoded data has been added. + LZMA write support is only available for .xz files, not the obsolete + .lzma format. The write support occurs out-of-place, just like how + writing gzip-encoded data works. See the gzip discussion in the 0.8.0 + section below for important notes. - * A newly-created dirfile is now always opened in read-write mode, ignoring - the access mode specified in the call. Previously, specifying both + * A newly-created dirfile is now always opened in read-write mode, ignor- + ing the access mode specified in the call. Previously, specifying both GD_RDONLY and GD_CREAT in open calls would result in an access mode (GD_E_ACCMODE) error if the dirfile didn't already exist. * Many functions which used to silently ignore representation suffixes in - field codes passed to them no longer do that. Most of these will report - an error (GD_E_BAD_CODE) if passed a representation suffix. The affected - functions are: gd_bof, gd_entry, gd_entry_type, gd_eof, gd_flush, - gd_linterp_tablename, gd_put_carray, gd_put_carray_slice, gd_putdata, - gd_raw_close, gd_raw_filename, gd_seek, gd_spf, gd_sync, gd_tell. + field codes passed to them no longer do that. Most of these will + report an error (GD_E_BAD_CODE) if passed a representation suffix. The + affected functions are: gd_bof, gd_entry, gd_entry_type, gd_eof, + gd_flush, gd_linterp_tablename, gd_put_carray, gd_put_carray_slice, + gd_putdata, gd_raw_close, gd_raw_filename, gd_seek, gd_spf, gd_sync, + gd_tell. - * BUG FIX: In addition to the addition of write support mentioned above, a - number of problems with reading LZMA files has been fixed, which should - result in fewer segmentaion faults. + * BUG FIX: In addition to the addition of write support mentioned above, + a number of problems with reading LZMA files has been fixed, which + should result in fewer segmentaion faults. - * BUG FIX: The parser no longer silently appends a closing > to scalar field - codes that contain an umatched opening < (e.g. "scalar<3"). This is now - interpreted as a simple field code (which may be rejected later due to the - presence of the invalid '<' character). + * BUG FIX: The parser no longer silently appends a closing > to scalar + field codes that contain an umatched opening < (e.g. "scalar<3"). This + is now interpreted as a simple field code (which may be rejected later + due to the presence of the invalid '<' character). * BUG FIX: The parser no-longer interprets various numbers as field codes - when it shouldn't (e.g. when specifying a PHASE shift as "1." instead of - "1"). + when it shouldn't (e.g. when specifying a PHASE shift as "1." instead + of "1"). - * BUG FIX: When writing scalar field codes to disk which could be interpreted - as a number (e.g. the field code "1"), the library now forces the - interpretation of these field codes as codes rather than numbers by + * BUG FIX: When writing scalar field codes to disk which could be inter- + preted as a number (e.g. the field code "1"), the library now forces + the interpretation of these field codes as codes rather than numbers by appending a scalar index (making, e.g., "1<0>"), which is harmless. - Previously, these were written as-is, resulting in misinterpretation the - next time the Dirfile was opened. This only happens with Standards Version - 8 or later, see the following for earlier versions. + Previously, these were written as-is, resulting in misinterpretation + the next time the Dirfile was opened. This only happens with Standards + Version 8 or later, see the following for earlier versions. * BUG FIX: If the current Standards Version in effect is 7 or earlier, ambiguous field codes (e.g., "1"), are now rejected by gd_[m]add() and gd_alter_entry() with the error GD_E_BAD_CODE, since they can't be - represented in the metadata on disk. For the behaviour with later Versions, - and in permissive mode, see the previous. + represented in the metadata on disk. For the behaviour with later + Versions, and in permissive mode, see the previous. - * BUG FIX: If performing a metadata update due to renaming fields (perhaps - by passing GD_REN_UPDB to gd_rename()) results in an invalid field code - due to affix restrictions, the update now fails (but see GD_REN_FORCE). - Previously the invalid field code would be stored, leading to errors when - flushing the modified metadata to disk. + * BUG FIX: If performing a metadata update due to renaming fields + (perhaps by passing GD_REN_UPDB to gd_rename()) results in an invalid + field code due to affix restrictions, the update now fails (but see + GD_REN_FORCE). Previously the invalid field code would be stored, + leading to errors when flushing the modified metadata to disk. - * BUG FIX: When performing a metadata update due to a renamed field, the field - codes containing subfields of the renamed field are now also updated, - including field codes specifying meta subfields which do not exist. + * BUG FIX: When performing a metadata update due to a renamed field, the + field codes containing subfields of the renamed field are now also + updated, including field codes specifying meta subfields which do not + exist. - * BUG FIX: reading a LINTERP table with fewer than two lines no longer results - in a segfault on close/discard. + * BUG FIX: reading a LINTERP table with fewer than two lines no longer + results in a segfault on close/discard. - * BUG FIX: Several fixes have been made to the sample index encoding (SIE) - engine, which should now produce properly encoded data when performing - random writes. + * BUG FIX: Several fixes have been made to the sample index encoding + (SIE) engine, which should now produce properly encoded data when + performing random writes. - * BUG FIX: gd_alter_raw() and similar no longer fail when asked to re-encode - the data file of a RAW field which has not been previously accessed. + * BUG FIX: gd_alter_raw() and similar no longer fail when asked to re- + encode the data file of a RAW field which has not been previously + accessed. * BUG FIX: A previously-read LINTERP table is now always discarded when - changing table paths with gd_alter_linterp() or similar. Previously these - obsolete, cached LUTs would sometimes linger, causing incorrect LINTERP - computation. + changing table paths with gd_alter_linterp() or similar. Previously + these obsolete, cached LUTs would sometimes linger, causing incorrect + LINTERP computation. API Changes: - * CLARIFICATION: The macro GD_SIZE() declared in getdata.h is indeed part of - the public API. It returns the size in bytes of a sample of data of a given - type (e.g. GD_SIZE(GD_COMPLEX64) returns 8). It has been around since - GetData-0.3.0, but has only been documented since GetData-0.8.3. + * CLARIFICATION: The macro GD_SIZE() declared in getdata.h is indeed part + of the public API. It returns the size in bytes of a sample of data of + a given type (e.g. GD_SIZE(GD_COMPLEX64) returns 8). It has been + around since GetData-0.3.0, but has only been documented since + GetData-0.8.3. * A new data type code, GD_STRING, has been declared. It is needed in - gd_getdata() calls to retrieve SINDIR data. Purely for convenience, it has - the property: GD_SIZE(GD_STRING) == sizeof(char*). + gd_getdata() calls to retrieve SINDIR data. Purely for convenience, it + has the property: GD_SIZE(GD_STRING) == sizeof(char*). * get_native_type() now returns GD_STRING for string type fields (STRING, SARRAY, SINDIR). Formerly it would return GD_NULL. - * The comp_scal member of the gd_entry_t object has been replaced with a flags - member, containing a flag (GD_EN_COMPSCAL) with the meaning of the former - comp_scal member. There are also flags for hiddenness (GD_EN_HIDDEN) and - whether the scalar entry codes in the field definition have been - dereferenced (GD_EN_CALC). + * The comp_scal member of the gd_entry_t object has been replaced with a + flags member, containing a flag (GD_EN_COMPSCAL) with the meaning of + the former comp_scal member. There are also flags for hiddenness + (GD_EN_HIDDEN) and whether the scalar entry codes in the field defi- + nition have been dereferenced (GD_EN_CALC). * gd_[m]add() and gd_alter_entry() can now be used to set or change the - hiddenness of a field by setting or clearing the GD_EN_HIDDEN bit in the - supplied gd_entry_t object. + hiddenness of a field by setting or clearing the GD_EN_HIDDEN bit in + the supplied gd_entry_t object. * Two new rename flags have been added: - - GD_REN_DANGLE which indicates the library shouldn't update ALIASes whose - target has been renamed (instead it will turn them into dangling aliases) - - GD_REN_FORCE which causes the library to skip updating field codes which - would be invalid due to affixes instead of failing. + - GD_REN_DANGLE which indicates the library shouldn't update ALIASes + whose target has been renamed (instead it will turn them into + dangling aliases) + - GD_REN_FORCE which causes the library to skip updating field codes + which would be invalid due to affixes instead of failing. - * The move_data argument of gd_move() has been replaced with a flags argument - which accepts the GD_REN_* flags, which have the same meaning as they do - with gd_rename(). + * The move_data argument of gd_move() has been replaced with a flags + argument which accepts the GD_REN_* flags, which have the same meaning + as they do with gd_rename(). - * gd_move_alias() and gd_delete_alias() have been deleted: their functions are - now performed by gd_move() and gd_delete(), which now operate on the alias - itself when given the field code to an alias, rather than the field the - alias points to. + * gd_move_alias() and gd_delete_alias() have been deleted: their + functions are now performed by gd_move() and gd_delete(), which now + operate on the alias itself when given the field code to an alias, + rather than the field the alias points to. * A number of different error codes which indicated the same problem (an - I/O error returned by the operating system) have been merged into one. The - error codes GD_E_OPEN, GD_E_TRUNC, GD_E_RAW_IO, GD_E_OPEN_FRAGMENT, - GD_E_FLUSH are replaced by the new error GD_E_IO. The old symbols remain as - aliases but are deprecated. There is one exception to this merge: attempts - to flush metadata lines which are too long are now reported using - GD_E_LINE_TOO_LONG. Previously, these errors used GD_E_FLUSH. + I/O error returned by the operating system) have been merged into one. + The error codes GD_E_OPEN, GD_E_TRUNC, GD_E_RAW_IO, GD_E_OPEN_FRAGMENT, + GD_E_FLUSH are replaced by the new error GD_E_IO. The old symbols + remain as aliases but are deprecated. There is one exception to this + merge: attempts to flush metadata lines which are too long are now + reported using GD_E_LINE_TOO_LONG. Previously, these errors used + GD_E_FLUSH. - * The error code GD_E_OPEN_LINFILE has also been removed. It has been split - into two parts: - - I/O errors resulting from reading the LINTERP table file are now reported - using GD_E_IO; - - Syntax errors in the table are reported using the new GD_E_LUT error code. - GD_E_OPEN_LINFILE remains as a deprecated alias for GD_E_LUT. + * The error code GD_E_OPEN_LINFILE has also been removed. It has been + split into two parts: + - I/O errors resulting from reading the LINTERP table file are now + reported using GD_E_IO; + - Syntax errors in the table are reported using the new GD_E_LUT error + code. GD_E_OPEN_LINFILE remains as a deprecated alias for GD_E_LUT. - * gd_encoding_support() has been added to permit run-time determination of - supported encodings. + * gd_encoding_support() has been added to permit run-time determination + of supported encodings. - * gd_array_len() is the new name for gd_carray_len(). It now also handles - STRING and SARRAY field types. The gd_carray_len() name remains in the - library, but has been marked deprecated. + * gd_array_len() is the new name for gd_carray_len(). It now also + handles STRING and SARRAY field types. The gd_carray_len() name + remains in the library, but has been marked deprecated. * BUG FIX: If the dirfile path provided cannot be resolved (due to, for - instance, a symbolic link pointing to a non-existent path), gd_open() and - friends now return GD_E_OPEN, as documented, instead of GD_E_RAW_IO. + instance, a symbolic link pointing to a non-existent path), gd_open() + and friends now return GD_E_OPEN, as documented, instead of + GD_E_RAW_IO. * BUG FIX: gd_naliases() now returns an unsigned int, and zero on error, as documented. @@ -166,124 +174,132 @@ * PHP bindings have been added. - * F77 and F95: The bindings no longer raise SIGABRT when the dirfile space is - exhausted. Instead they simply return an invalid dirfile unit number. + * F77 and F95: The bindings no longer raise SIGABRT when the dirfile + space is exhausted. Instead they simply return a invalid dirfile unit + number. - * F77: Functions to add fields with named scalar parameters have been added - (GDASBT GDASCL GDASCP GDASCR GDASLC GDASMX GDASPH GDASPN GDASRC GDASRW - GDASSB GDASWD), but only for those field types which permit named scalars. - Similarly, functions for altering field metatdata with named scalars are - also present (GDLSBT GDLSCL GDLSCP GDLSCR GDLSLC GDLSMX GDLSPH GDLSPN GDLSRC - GDLSRW GDLSSB GDLSWD). These are provided as an alternative to using GDASCA - after the fact. + * F77: Functions to add fields with named scalar parameters have been + added (GDASBT GDASCL GDASCP GDASCR GDASLC GDASMX GDASPH GDASPN GDASRC + GDASRW GDASSB GDASWD), but only for those field types which permit + named scalars. Similarly, functions for altering field metatdata with + named scalars are also present (GDLSBT GDLSCL GDLSCP GDLSCR GDLSLC + GDLSMX GDLSPH GDLSPN GDLSRC GDLSRW GDLSSB GDLSWD). These are provided + as an alternative to using GDASCA after the fact. - * IDL: The entry structure parser has been rewritten. It no longer requires - members which it doesn't need, and is also a lot more lax about numerical - data types. Notably, it now ignores a supplied COMP_SCAL member. Floating - point parameters can be specified in either the base name (M, B, A, - DIVIDEND) or else the member prefixed with 'C' (CM, CB, CA, CDIVIDEND), - whatever numerical type. The bindings will ingest them appropriately. - Also, N_FIELDS and POLY_ORD, may be omitted, and will be calculated from the - supplied data. A scalar IN_FIELDS is treated like an single element array. + * IDL: The entry structure parser has been rewritten. It no longer + requires members which it doesn't need, and is also a lot more lax + about numerical data types. Notably, it now ignores a supplied + COMP_SCAL member. Floating point parameters can be specified in either + the base name (M, B, A, DIVIDEND) or else the member prefixed with 'C' + (CM, CB, CA, CDIVIDEND), whatever numerical type. The bindings will + ingest them appropriately. Also, N_FIELDS and POLY_ORD, may be + omitted, and will be calculated from the supplied data. A scalar + IN_FIELDS is treated like an single element array. - * PERL: The entry hash parser has been rewritten. It no longer requires keys - which it doesn't need. + * PERL: The entry hash parser has been rewritten. It no longer requires + keys which it doesn't need. - * PERL: alter_entry() now only updates defined elements in the passed entry - hash. + * PERL: alter_entry() now only updates defined elements in the passed + entry hash. * PYTHON: for backwards compatiblity, exceptions now exist for deprecated - error codes (such as OpenError). These deprecated exceptions are simply - aliases for the current ones and are never returned by the bindings. + error codes (such as OpenError). These deprecated exceptions are + simply aliases for the current ones and are never returned by the + bindings. * F95 BUG FIX: fgd_add and fgd_alter_entry no longer ignore named scalar parameters provided in supplied entry structures. Miscellaneous: - * The minimum autotools versions have been bumped. Autoconf-2.65 or newer, - automake-1.13 or newer, and libtool-2.2.7b or newer are now required to - rebuild the configure script and associated build environment. NOTE: In - general, most people building GetData from a source release don't need the - tools to build GetData; the autotools are only needed if changes need to be - made to the configure script or Makefile input files provided in the - release or if building from the repository. + * The minimum autotools versions have been bumped. Autoconf-2.65 or + newer, automake-1.13 or newer, and libtool-2.2.7b or newer are now + required to rebuild the configure script and associated build environ- + ment. NOTE: In general, most people building GetData from a source + release don't need the tools to build GetData; the autotools are only + needed if changes need to be made to the configure script or Makefile + input files provided in the release or if building from the repository. -|==============================================================================| +|=========================================================================| New in version 0.8.6: Library Changes: * BUG FIX: Computation of LINCOMs with complex valued input fields now - correctly happens in the complex plane. As a side effect, gd_native_type() - now also correctly reports such LINCOM fields to be complex valued. + correctly happens in the complex plane. As a side effect, + gd_native_type() now also correctly reports such LINCOM fields to be + complex valued. - * BUG FIX: The gd_[m]add() functions now ignore zero-length scalar strings. - Previously they would store these invalid field codes, causing problems - later. + * BUG FIX: The gd_[m]add() functions now ignore zero-length scalar + strings. Previously they would store these invalid field codes, + causing problems later. * BUG FIX: Returning complex-valued CARRAYs as purely real now works. - Previously only the first element requested would be returned, the remaining - output buffer containing uninitialised data. + Previously only the first element requested would be returned, the + remaining output buffer containing uninitialised data. - * BUG FIX: Entry members spf, bitnum, numbits, and period are now completely - ignored by gd_[m]add() when corresponding named scalars are specified. - Previously, an invalid value in these members would result in the entry - being rejected, even though the rest of GetData ignored the invalid, unsued - value. + * BUG FIX: Entry members spf, bitnum, numbits, and period are now com- + pletely ignored by gd_[m]add() when corresponding named scalars are + specified. Previously, an invalid value in these members would result + in the entry being rejected, even though the rest of GetData ignored + the invalid, unsued value. * BUG FIX: The parsing of the \x and \u escape sequences is now correct. * BUG FIX: A scalar field code specified for the last factor in a POLYNOM entry is no longer ignored by gd_[m]add(). - * BUG FIX: gd_[m]add() no longer rejects MPLEX fields with negative count_val. + * BUG FIX: gd_[m]add() no longer rejects MPLEX fields with negative + count_val. * BUG FIX: DIVIDE fields with complex-valued divisors are now properly computed. - * BUG FIX: Complex-valued POLYNOM and RECIP fields are now computed properly - when the library is built in ANSI C mode. + * BUG FIX: Complex-valued POLYNOM and RECIP fields are now computed + properly when the library is built in ANSI C mode. * BUG FIX: gd_alter_entry() no longer corrupts the DIRFILE when modifying named scalars of MPLEX fields. - * BUG FIX: Writing complex-valued MPLEX fields no longer corrupts the stored - data. + * BUG FIX: Writing complex-valued MPLEX fields no longer corrupts the + stored data. - * BUG FIX: gd_bof() now returns the correct number (i.e.: zero) when reporting - the beginning of field of derived fields shifted to before the start of the - dirfile. Previously, this function incorrectly returned values ranging from - zero to one less than the samples-per-frame of the requested field. + * BUG FIX: gd_bof() now returns the correct number (i.e.: zero) when + reporting the beginning of field of derived fields shifted to before + the start of the dirfile. Previously, this function incorrectly + returned values ranging from zero to one less than the samples-per- + frame of the requested field. * BUG FIX: gd_flush(), gd_sync(), gd_raw_close() no longer segfault when operating on a LINCOM with only one input field. * BUG FIX: gd_seek() now works correctly on PHASE fields; previously, the sign of the PHASE shift was flipped. - * BUG FIX: gd_seek() now correctly positions the virtual I/O pointer of the - INDEX field. + * BUG FIX: gd_seek() now correctly positions the virtual I/O pointer of + the INDEX field. - * BUG FIX: gd_framenum_subset() now returns the correct value when passed a - field_end which is beyond the end of field, and then is required to + * BUG FIX: gd_framenum_subset() now returns the correct value when passed + a field_end which is beyond the end of field, and then is required to extrapolate outside of the specified frame range. - * BUG FIX: gd_error_string() now produces the correct string when reporting - an out-of-range poly_ord encountered by gd_add_polynom() and similar. + * BUG FIX: gd_error_string() now produces the correct string when + reporting an out-of-range poly_ord encountered by gd_add_polynom() and + similar. - * BUG FIX: gd_[m]alter_spec() no longer ignore co-efficients specified for - POLYNOM entries. + * BUG FIX: gd_[m]alter_spec() no longer ignore co-efficients specified + for POLYNOM entries. - * BUG FIX: gd_alter_encoding() now deletes the internal cache of RAW filenames - of the affected fragment; previously, these old, cached filenames could lead - to I/O errors when reading and writing the re-encoded RAW data files. + * BUG FIX: gd_alter_encoding() now deletes the internal cache of RAW + filenames of the affected fragment; previously, these old, cached + filenames could lead to I/O errors when reading and writing the re- + encoded RAW data files. - * BUG FIX: Calling the Legacy API function GetFormat() on a Dirfile with MPLEX - or WINDOW fields no longer results in a segmentation fault. + * BUG FIX: Calling the Legacy API function GetFormat() on a Dirfile with + MPLEX or WINDOW fields no longer results in a segmentation fault. - * BUG FIX: Attempts to read past the EOF of a gzipped field no longer results - in an I/O error, but successfully returns no data. + * BUG FIX: Attempts to read past the EOF of a gzipped field no longer + results in an I/O error, but successfully returns no data. * BUG FIX: The internal recursion counter wasn't being properly reset on certain error conditions, leading to spurious GD_E_RECURSE_LEVEL errors @@ -291,8 +307,9 @@ Bindings Changes: - * F77 and F95 BUG FIX: Named scalar indices are now indexed from one instead - of zero, like all other array indices are in the Fortran GetData bindings. + * F77 and F95 BUG FIX: Named scalar indices are now indexed from one + instead of zero, like all other array indices are in the Fortran + GetData bindings. * C++ BUG FIX: Fixed segfault in RawEntry destructor. Reported by S. J. Benton. @@ -301,217 +318,226 @@ entries when appropriate, instead of always returning zero. (The RecipEntry::ComplexScalars() method always returned the correct value.) - * IDL BUG FIX: The /UPDATEDB flag to gd_rename is no longer ignored; also, the - /MOVE_DATA flag no longer also acts as if /UPDATEDB had been specified. + * IDL BUG FIX: The /UPDATEDB flag to gd_rename is no longer ignored; + also, the /MOVE_DATA flag no longer also acts as if /UPDATEDB had been + specified. * PYTHON BUG FIX: The keyword for the "dirfile" parameter in the getdata.fragment constructor is now properly spelled. -|==============================================================================| +|=========================================================================| New in verison 0.8.5: Library Changes: - * BUG FIX: The zzslim encoding framework, which was inadvertantly rendered - non-compilable in 0.8.4, should once again work. Reported by Matthew - Hasselfield. + * BUG FIX: The zzslim encoding framework, which was inadvertantly + rendered non-compilable in 0.8.4, should once again work. Reported by + Matthew Hasselfield. Bindings Changes: * PYTHON BUG FIX: A spurious debugging message accidentally left in the 0.8.4 release has been expunged. -|==============================================================================| +|=========================================================================| New in version 0.8.4: Dirfile Changes: * CLARIFICATION: Inconsistant behaviour in the library, coupled with - contradictory statements in the Dirfile Standards, has resulted in confusion - over the meaning of the final, optional, parameter in a MPLEX definition. - To be clear: this parameter is simply the expected period between successive - occurances of the "count" value in the index vector. (It is used by GetData - only to figure out a resonable length for the MPLEX lookback.) The - following clarifications and corrections have been made to the definition - of the MPLEX field type in dirfile-format(5): + contradictory statements in the Dirfile Standards, has resulted in + confusion over the meaning of the final, optional, parameter in a MPLEX + definition. To be clear: this parameter is simply the expected period + between successive occurances of the "count" value in the index vector. + (It is used by GetData only to figure out a resonable length for the + MPLEX lookback.) The following clarifications and corrections have + been made to the definition of the MPLEX field type in + dirfile-format(5): - - The final, optional parameter has been renamed from "max" to "period". + - The final, optional parameter has been renamed from "max" to + "period". - - This parameter indicates not the maximal range of the index vector, as - previously stated, but the expected number of samples between successive - occurances of the specified "count" value in the index vector; as before, - it should be regarded as a hint, and does not place any actual restriction - on the contents of the index vector. + - This parameter indicates not the maximal range of the index vector, + as previously stated, but the expected number of samples between + successive occurances of the specified "count" value in the index + vector; as before, it should be regarded as a hint, and does not + place any actual restriction on the contents of the index vector. - - The incorrect requirement that the "count" parameter be non-negative has - been deleted. + - The incorrect requirement that the "count" parameter be non-negative + has been deleted. - - The incorrect requirement that "count" be less than or equal to "max", if - "max" is present and non-zero, has been deleted. + - The incorrect requirement that "count" be less than or equal to + "max", if "max" is present and non-zero, has been deleted. - - The meaning of an omitted or zero "period", indicating that the spacing of - "count" in the index vector is unknown or non-uniform, is now explicitly - stated. + - The meaning of an omitted or zero "period", indicating that the + spacing of "count" in the index vector is unknown or non-uniform, is + now explicitly stated. - - Different MPLEX fields using the same index vector may specify different - periods. + - Different MPLEX fields using the same index vector may specify + different periods. See also the related library bug fixes below. Library Changes: - * BUG FIX: The library no longer incorrectly rejects negative count_val MPLEX - parameters. Furthermore, a count_val of -1 in gd_alter_entry or - gd_[m]alter_mplex calls is not a special value: it just sets count_val to - -1. + * BUG FIX: The library no longer incorrectly rejects negative count_val + MPLEX parameters. Furthermore, a count_val of -1 in gd_alter_entry or + gd_[m]alter_mplex calls is not a special value: it just sets count_val + to -1. * BUG FIX: The library no longer incorrectly rejects MPLEX fields where count_val is greater than the period (formerly called count_max). - * BUG FIX: The default MPLEX period, if none is specified, is 2*count_val + 1, - not simply 2 * count_val, when count_val is greater than 5. + * BUG FIX: The default MPLEX period, if none is specified, is + 2 * count_val + 1, not simply 2 * count_val, when count_val is greater + than 5. * BUG FIX: Trying to position an I/O pointer to before sample zero with - gd_seek() now properly fails. Previously it would allow it, causing bizarre - things to happen later. + gd_seek() now properly fails. Previously it would allow it, causing + bizarre things to happen later. - * BUG FIX: Using gd_tell to get the I/O pointer position of a derived field - with exactly two input fields (MULTIPLY, DIVIDE, MPLEX, WINDOW) now properly - reports an error in the "multiposition" case (ie. when the two inputs are - ultimately reading from different locations in the same RAW field). + * BUG FIX: Using gd_tell to get the I/O pointer position of a derived + field with exactly two input fields (MULTIPLY, DIVIDE, MPLEX, WINDOW) + now properly reports an error in the "multiposition" case (ie. when the + two inputs are ultimately reading from different locations in the same + RAW field). - * BUG FIX: Trying to read sample zero of a gzipped RAW field the second time - now works as expected. Previously, the request to reposition the I/O - pointer back to zero would be ignored by the gzip framework. Reported by - Alexandra Rahlin. + * BUG FIX: Trying to read sample zero of a gzipped RAW field the second + time now works as expected. Previously, the request to reposition the + I/O pointer back to zero would be ignored by the gzip framework. + Reported by Alexandra Rahlin. * BUG FIX: The field code of a reference field declared in a subfragment - included with affixes is no longer corrupted by spurious application of the - affixes when the subfragment's metadata are (re-)written. Reported by Seth. + included with affixes is no longer corrupted by spurious application of + the affixes when the subfragment's metadata are (re-)written. Reported + by Seth. API Changes: - * The count_max member of the gd_entry_t object has been renamed to period. - The corresponding dummy argument in various function prototypes has been - similarly renamed. + * The count_max member of the gd_entry_t object has been renamed to + period. The corresponding dummy argument in various function proto- + types has been similarly renamed. Bindings Changes: - * C++: The Entry and MplexEntry member functions CountMax and SetCountMax have - been renamed to Period and SetPeriod for consistency with the changes listed - above. CountMax and SetCountMax are still avaialbe as aliases, but are - marked deprecated. + * C++: The Entry and MplexEntry member functions CountMax and SetCountMax + have been renamed to Period and SetPeriod for consistency with the + changes listed above. CountMax and SetCountMax are still avaialbe as + aliases, but are marked deprecated. - * IDL BUG FIX: GD_ENTRY structures representing MPLEX fields are now properly - interpreted. Previously, the underlying gd_entry_t object was being - incorrectly initialised. + * IDL BUG FIX: GD_ENTRY structures representing MPLEX fields are now + properly interpreted. Previously, the underlying gd_entry_t object was + being incorrectly initialised. * PYTHON BUG FIX: Numpy arrays returned by dirfile.getdata() are now the - correct length. Previously they would always be the length requested (or - the length of the dirfile, if no length was explicitly given) even if fewer - samples were returned. Extra elements would contain uninitialised memory. + correct length. Previously they would always be the length requested + (or the length of the dirfile, if no length was explicitly given) even + if fewer samples were returned. Extra elements would contain unini- + tialised memory. -|==============================================================================| +|=========================================================================| New in version 0.8.3: Library Changes: - * BUG FIX: Several bugs on big-ended systems have been fixed. Reported by - Dinar Valeev. + * BUG FIX: Several bugs on big-ended systems have been fixed. Reported + by Dinar Valeev. - * BUG FIX: Adding an entry via gd_[m]add() with a negative CARRAY scalar index - no longer results in an internal error or worse when the added field is - later read. Instead, a proper error is returned. + * BUG FIX: Adding an entry via gd_[m]add() with a negative CARRAY scalar + index no longer results in an internal error or worse when the added + field is later read. Instead, a proper error is returned. * BUG FIX: Changing a CONST field to a real floating point type using - gd_alter_const() (or similar) no longer results in the value of the field - being corrupted. + gd_alter_const() (or similar) no longer results in the value of the + field being corrupted. - * BUG FIX: A bug in the parser's tokeniser has been fixed to prevent spurious - "unterminated token" syntax errors. Typically this would only be seen when - using gd_strtok() to tokenise an (apparently innocuous) user-supplied - string, but a carefully crafted format file could also be made to get - gd_open() to produce it. + * BUG FIX: A bug in the parser's tokeniser has been fixed to prevent + spurious "unterminated token" syntax errors. Typically this would only + be seen when using gd_strtok() to tokenise an (apparently innocuous) + user-supplied string, but a carefully crafted format file could also be + made to get gd_open() to produce it. Bindings Changes: * Bindings for MATLAB have been added. - * The IDL, Perl, and Python bindings no longer require a C99 compiler to be - built. + * The IDL, Perl, and Python bindings no longer require a C99 compiler to + be built. -|==============================================================================| +|=========================================================================| New in version 0.8.2: Library Changes: - * BUG FIX: A trailing symlink (i.e. situations where a symlink is the last - element of a path) no longer confuses GetData when the target of the - symlink: (1) is absolute, or (2) starts with "../". Reported by S. J. - Benton. + * BUG FIX: A trailing symlink (i.e. situations where a symlink is the + last element of a path) no longer confuses GetData when the target of + the symlink: (1) is absolute, or (2) starts with "../". Reported by + S. J. Benton. - * BUG FIX: Trying to read data from the first sample of an MPLEX no longer - results in an internal error if the first sample of the index doesn't match - the target value. + * BUG FIX: Trying to read data from the first sample of an MPLEX no + longer results in an internal error if the first sample of the index + doesn't match the target value. -|==============================================================================| +|=========================================================================| New in version 0.8.1: Library Changes: - * gd_dirfilename() now returns a fully canonicalised version of the dirfile - path. + * gd_dirfilename() now returns a fully canonicalised version of the + dirfile path. - * BUG FIX: A segfault when negotiating symbolic links in file paths, typically - manifesting in gd_open calls, has been fixed. + * BUG FIX: A segfault when negotiating symbolic links in file paths, + typically manifesting in gd_open calls, has been fixed. * BUG FIX: gd_strtok now saves a copy of the string passed to it, as the - documentation suggests it should. Previously it cached the pointer itself. + documentation suggests it should. Previously it cached the pointer + itself. - * BUG FIX: A number of minor memory leaks, mostly occurring when the library - encounters an error, have been fixed. + * BUG FIX: A number of minor memory leaks, mostly occurring when the + library encounters an error, have been fixed. * BUG FIX: /HIDDEN directives weren't being written for aliases. * BUG FIX: The parser now fails properly on /INCLUDEs which specify paths which don't point to regular files. - * BUG FIX: Fixed a bug which would result in the parser getting confused over - the current Standards Version, potentially leading to rejected valid - dirfiles. Reported by Daniel Flanigan. + * BUG FIX: Fixed a bug which would result in the parser getting confused + over the current Standards Version, potentially leading to rejected + valid dirfiles. Reported by Daniel Flanigan. - * BUG FIX: gd_alter_entry() and gd_madd_alias() weren't clearing the Dirfile - error before operation, resulting in them failing erroneously in certain - situations. + * BUG FIX: gd_alter_entry() and gd_madd_alias() weren't clearing the + Dirfile error before operation, resulting in them failing erroneously + in certain situations. - * BUG FIX: When including an existing fragment which itself has subfragments, - gd_include() no longer returns the wrong fragment index. + * BUG FIX: When including an existing fragment which itself has subfrag- + ments, gd_include() no longer returns the wrong fragment index. - * WIN32 BUG FIX: On Windows, the parser can now properly handle hexadecimal - floating point. + * WIN32 BUG FIX: On Windows, the parser can now properly handle hexade- + cimal floating point. API Changes: - * How the API deals with field code affixes has changed. Input vector and - scalar fields are reported by gd_entry(), &c. now include their prefix and - suffix, if any, which should remove the need to do manual affix bookkeeping - when reading metadata. The other side to this change is that when modifying - metdata (gd_add(), gd_alter_entry(), &c.), supplied field codes must also - contain the appropriate affixes. + * How the API deals with field code affixes has changed. Input vector + and scalar fields are reported by gd_entry(), &c. now include their + prefix and suffix, if any, which should remove the need to do manual + affix bookkeeping when reading metadata. The other side to this change + is that when modifying metdata (gd_add(), gd_alter_entry(), &c.), + supplied field codes must also contain the appropriate affixes. - * A new function, gd_linterp_tablename() has been added which returns a fully - canonicalised version of the look-up table pathname for a LINTERP. + * A new function, gd_linterp_tablename() has been added which returns a + fully canonicalised version of the look-up table pathname for a + LINTERP. Bindings Changes: * F77 BUG FIX: A memory leak has been fixed in GDALLC. -|==============================================================================| +|=========================================================================| New in version 0.8.0: @@ -843,82 +869,85 @@ * IDL BUG FIX: The missing /IGNORE_REFS and /PRETTY_PRINT are now available in gd_open. -|==============================================================================| +|=========================================================================| New in version 0.7.3: Library Changes - * BUG FIX: Passing a zero dividend to alter_crecip() and alter_recip() now - results in the dividend not changing, per documentation. + * BUG FIX: Passing a zero dividend to alter_crecip() and alter_recip() + now results in the dividend not changing, per documentation. - * BUG FIX: GetData wasn't properly computing the module directory, causing - encodings using external modules to fail with GD_E_UNSUPPORTED. + * BUG FIX: GetData wasn't properly computing the module directory, + causing encodings using external modules to fail with GD_E_UNSUPPORTED. - * BUG FIX: Metafield records are now properly stored in the format file for - Standards Version 8. + * BUG FIX: Metafield records are now properly stored in the format file + for Standards Version 8. * BUG FIX: gd_raw_filename() wasn't clearing the Dirfile error before operation, resulting in it failing erroneously in certain situations. Utilities Changes: - * BUG FIX: A potential segmentation fault has been patched in dirfile2ascii. + * BUG FIX: A potential segmentation fault has been patched in + dirfile2ascii. -|==============================================================================| +|=========================================================================| New in version 0.7.2: Library Changes - * If built with modules, the plugin shared objects will now be installed in - a separate directory (by default "${libdir}/getdata", but see the + * If built with modules, the plugin shared objects will now be installed + in a separate directory (by default "${libdir}/getdata", but see the --with-module-dir option in ./configure). - * BUG FIX: When using modules, a missing plugin no longer results in a lock up - the second time an attempt is made to find it. + * BUG FIX: When using modules, a missing plugin no longer results in a + lock up the second time an attempt is made to find it. - * BUG FIX: GetData now properly processes /INCLUDE directives with absolute - paths, as the documentation insists it should. + * BUG FIX: GetData now properly processes /INCLUDE directives with + absolute paths, as the documentation insists it should. - * BUG FIX: gd_add()ing the first raw field in a dirfile to a subfragment no - longer results in memory corruption when calling gd_close(). + * BUG FIX: gd_add()ing the first raw field in a dirfile to a subfragment + no longer results in memory corruption when calling gd_close(). API Changes - * If called with GD_CREAT but no encoding specified, gd_include() now will - duplicate the encoding of the parent fragment (if any). + * If called with GD_CREAT but no encoding specified, gd_include() now + will duplicate the encoding of the parent fragment (if any). Miscellaneous * The python module install dir can now be changed by passing --with-python-module-dir to configure. -|==============================================================================| +|=========================================================================| New in version 0.7.1: Library Changes - * BUG FIX: When the parser fails in a gd_include() call, the internal list of - conformant Standards Versions for the loaded dirfile is no longer corrupted. + * BUG FIX: When the parser fails in a gd_include() call, the internal + list of conformant Standards Versions for the loaded dirfile is no + longer corrupted. * BUG FIX Performing two consecutive reads of the same field in an ASCII encoded datasources no longer confuses GetData. - * BUG FIX: Numerous memory leaks have been patched (mostly pin-holes, although - there are a few, rare but egregious ones). + * BUG FIX: Numerous memory leaks have been patched (mostly pin-holes, + although there are a few, rare but egregious ones). API Changes: * The value(s) of a CONST or CARRAY field added with gd_[m]add() is now guaranteed to be zero; previously, it was unspecified. - * BUG FIX: Specifying both GD_VERBOSE and GD_IGNORE_DUPS no longer results in - spurious "Field code already defined" messages when duplicate fields are - encountered. + * BUG FIX: Specifying both GD_VERBOSE and GD_IGNORE_DUPS no longer + results in spurious "Field code already defined" messages when dupli- + cate fields are encountered. - * BUG FIX: Calling gd_delete on a metafield no longer results in a segfault. + * BUG FIX: Calling gd_delete on a metafield no longer results in a + segfault. Bindings Changes: @@ -933,191 +962,199 @@ pad may be specified with '-z', and defaults to 0/NaN. Previously, the value of uninitialized memory was output. - * BUG FIX: dirfile2ascii now does what the user intends when presented with - cart-before-horse arguments, ie. "dirfile2ascii -e field DIRFILE". + * BUG FIX: dirfile2ascii now does what the user intends when presented + with cart-before-horse arguments, ie. "dirfile2ascii -e field DIRFILE". Previously this resulted in confusion. * BUG FIX: dirfile2ascii now accepts field conversion '-u', which was documented but overlooked in the argument parser. -|==============================================================================| +|=========================================================================| New in version 0.7.0: Dirfile Changes * Dirfile Standards Version 8 has been released. It adds three new field - types: DIVIDE, which computes X/Y for vectors X and Y, RECIP, which computes - A/X for vector X and scalar A, and CARRAY, which is an array of CONST - scalars. A few other changes are listed below. + types: DIVIDE, which computes X/Y for vectors X and Y, RECIP, which + computes A/X for vector X and scalar A, and CARRAY, which is an array + of CONST scalars. A few other changes are listed below. * Like CONST fields, CARRAY elements can be used as parametersin the definition of other fields. Syntax is 'field<n>', where 'field' is the - field name and 'n' the element index in the CARRAY (and the angle brackets - are literal angle brackets). If the '<n>' is omitted, the first element - (numbered 0) is assumed. + field name and 'n' the element index in the CARRAY (and the angle + brackets are literal angle brackets). If the '<n>' is omitted, the + first element (numbered 0) is assumed. - * Slashes on reserved words are now mandatory, allowing fields with reserved - words as names. + * Slashes on reserved words are now mandatory, allowing fields with + reserved words as names. - * The long-deprecated single character data type codes have been removed from - Standards Version 8. (They are still accepted by GetData, which handles - all previous Standards Versions as well.) + * The long-deprecated single character data type codes have been removed + from Standards Version 8. (They are still accepted by GetData, which + handles all previous Standards Versions as well.) * The /ENDIAN directive now takes an optional second parameter. The only - allowed value for this second token is "arm", which indicates that double - precision floating point data (including double precision complex data) are - stored in the ARM middle-endian format. Without this, floating point data - are assumed to have the same byte sex as integer data. + allowed value for this second token is "arm", which indicates that + double precision floating point data (including double precision + complex data) are stored in the ARM middle-endian format. Without + this, floating point data are assumed to have the same byte sex as + integer data. Library Changes - * GetData, including its bindings, is now supported under MacOS X, Cygwin, and - Win32 using MinGW. In the case of MinGW, this includes linking against the - Microsoft C Runtime, which isn't POSIX compliant. Users should exercise - caution when writing to dirfiles in this case. + * GetData, including its bindings, is now supported under MacOS X, + Cygwin, and Win32 using MinGW. In the case of MinGW, this includes + linking against the Microsoft C Runtime, which isn't POSIX compliant. + Users should exercise caution when writing to dirfiles in this case. - * GetData can now be used on ARM processors. As a side-effect, GetData can - now read and write the middle-ended floating point format used by older ARM - processors (on any processor, via endianness conversion). + * GetData can now be used on ARM processors. As a side-effect, GetData + can now read and write the middle-ended floating point format used by + older ARM processors (on any processor, via endianness conversion). - * Some changes have been made to the parser. It now operates in one of two - modes: pedantic mode, which adheres strictly to one particular Dirfile - Standards Version, and permissive mode (the default) which is more - lenient, as the old parser was. Encountering a /VERSION directive will - switch the parser from permissive to pedantic mode unless told not to (see - GD_PERMISSIVE below), and will change the particular Standards Version to - which pedantic mode is adhering. + * Some changes have been made to the parser. It now operates in one of + two modes: pedantic mode, which adheres strictly to one particular + Dirfile Standards Version, and permissive mode (the default) which is + more lenient, as the old parser was. Encountering a /VERSION directive + will switch the parser from permissive to pedantic mode unless told not + to (see GD_PERMISSIVE below), and will change the particular Standards + Version to which pedantic mode is adhering. - * As a result of the previous change, the Standards compliance of the parser - in strict mode has been greatly increased. This affects allowed characters - in field names, and field name lengths. The existence or lack thereof of - the implicit FILEFRAM field (an alias for INDEX) is also affected. + * As a result of the previous change, the Standards compliance of the + parser in strict mode has been greatly increased. This affects allowed + characters in field names, and field name lengths. The existence or + lack thereof of the implicit FILEFRAM field (an alias for INDEX) is + also affected. - * Since Standards Versions 4 and earlier were never codified, we've made some - assumptions as to their behaviour in certain undocumented situtations. Most - noticably, they still prohibit ASCII control codes (bytes < 0x20) and '/' - in field names. We also assume these dirfiles have native byte sex, even - though some early GetData behaviour implied only little-ended data was - acceptable. + * Since Standards Versions 4 and earlier were never codified, we've made + some assumptions as to their behaviour in certain undocumented situta- + tions. Most noticably, they still prohibit ASCII control codes (bytes + 0x01 through 0x1F) and '/' in field names. We also assume these + dirfiles have native byte sex, even though some early GetData behaviour + implied only little-ended data was acceptable. * Every Dirfile object now records its current Standards Version, which - affects functions such as gd_add_spec(). The Version will start out as the - value of the last /VERSION directive encountered by the parser, or else the - latest compliant Standards Version. It can be changed (see below). + affects functions such as gd_add_spec(). The Version will start out as + the value of the last /VERSION directive encountered by the parser, or + else the latest compliant Standards Version. It can be changed (see + below). - * When writing metadata to disk, fragments will be written according to the - current Standards Version of the dirfile object, rather than always using - the latest version, as before. + * When writing metadata to disk, fragments will be written according to + the current Standards Version of the dirfile object, rather than always + using the latest version, as before. * The C library now sports an "ANSI C" mode, which allows compilation of - GetData without a C99-compliant compiler. Some functionality may be lost, - most prominently, but unsurprisingly, the default (C99) API. + GetData without a C99-compliant compiler. Some functionality may be + lost, most prominently, but unsurprisingly, the default (C99) API. - * The artificial maximum line length of 4096 bytes for format metadata has - been removed. The maximum line length is now 2**31 bytes on 32-bit systems, - and more on 64-bit systems. This also has the side-effect of removing the - same length limit which had been applied to field names. + * The artificial maximum line length of 4096 bytes for format metadata + has been removed. The maximum line length is now 2**31 bytes on 32-bit + systems, and more on 64-bit systems. This also has the side-effect of + removing the same length limit which had been applied to field names. * LINTERP tables are no longer required to be sorted. The library will - sort them, if needed. As a side-effect of this, tables are no longer read - twice when loading, leading to potential speed-up. + sort them, if needed. As a side-effect of this, tables are no longer + read twice when loading, leading to potential speed-up. - * BUG FIX: The library wasn't properly checking that the second and higher - input fields in LINCOM and MULTIPLY fields were, in fact, vectors, leading - to possible segfaults. + * BUG FIX: The library wasn't properly checking that the second and + higher input fields in LINCOM and MULTIPLY fields were, in fact, + vectors, leading to possible segfaults. - * BUG FIX: A memory leak associated with modifying LINCOM metadata has been - fixed. + * BUG FIX: A memory leak associated with modifying LINCOM metadata has + been fixed. * BUG FIX: Using a complex valued vector as the second input field in a - MULTIPLY wouldn't result in the field being internally flagged as complex, - leading to loss of the imaginary part in certain situtaitons. + MULTIPLY wouldn't result in the field being internally flagged as + complex, leading to loss of the imaginary part in certain situtaitons. - * BUG FIX: Trying to write to a LINTERP via a table which isn't monotonic now - results in error. Previously, this was allowed, with arbitrary data stored - to disk. + * BUG FIX: Trying to write to a LINTERP via a table which isn't monotonic + now results in error. Previously, this was allowed, with arbitrary + data stored to disk. - * BUG FIX: On encountering a line longer than it was prepared to deal with, - the parser used to get very confused, potentially resulting in bizarre - behaviour. On the off chance such a line is encountered, GetData will now - raise GD_E_LINE_TOO_LONG in these cases. (And, since the maxmium line - length has been increased to at least 2**31 characters, this should only - occur in pathological situations.) + * BUG FIX: On encountering a line longer than it was prepared to deal + with, the parser used to get very confused, potentially resulting in + bizarre behaviour. On the off chance such a line is encountered, + GetData will now raise GD_E_LINE_TOO_LONG in these cases. (And, since + the maxmium line length has been increased to at least 2**31 charac- + ters, this should only occur in pathological situations.) * BUG FIX: Deleting a metafield was not being communicated to its parent, - resulting in differing opinions within the library as to the deleted field's - exsitence. + resulting in differing opinions within the library as to the deleted + field's exsitence. API Changes - * Due to namespace conflicts with the MacOS X System Library (which contains - the C Standard Library), a wholesale renaming of public symbols has been - performed. All public functions, and data types now begin with 'gd_'. All - public preprocessor macros now begin with 'GD_'. Symbol renaming has - occurred in the following manner: + * Due to namespace conflicts with the MacOS X System Library (which + contains the C Standard Library), a wholesale renaming of public + symbols has been performed. ... [truncated message content] |
From: <ket...@us...> - 2015-04-03 00:14:40
|
Revision: 945 http://sourceforge.net/p/getdata/code/945 Author: ketiltrout Date: 2015-04-03 00:14:27 +0000 (Fri, 03 Apr 2015) Log Message: ----------- Experimental backport of PHP bindings to 0.8.6. Modified Paths: -------------- branches/getdata-0.8.6-php/src/Makefile.am branches/getdata-0.8.6-php/src/getdata.c branches/getdata-0.8.6-php/src/php_getdata.h branches/getdata-0.8.6-php/src/test/Makefile.am branches/getdata-0.8.6-php/src/test/big_test.php Added Paths: ----------- branches/getdata-0.8.6-php/ branches/getdata-0.8.6-php/AUTHORS branches/getdata-0.8.6-php/COPYING branches/getdata-0.8.6-php/ChangeLog branches/getdata-0.8.6-php/INSTALL branches/getdata-0.8.6-php/NEWS branches/getdata-0.8.6-php/README branches/getdata-0.8.6-php/README.php branches/getdata-0.8.6-php/m4/ branches/getdata-0.8.6-php/m4/compiler.m4 branches/getdata-0.8.6-php/m4/php.m4 branches/getdata-0.8.6-php/m4/version.m4 branches/getdata-0.8.6-php/make_parameters.c branches/getdata-0.8.6-php/src/ Index: branches/getdata-0.8.6-php =================================================================== --- branches/getdata-0.8.6-php 2015-03-12 02:03:24 UTC (rev 944) +++ branches/getdata-0.8.6-php 2015-04-03 00:14:27 UTC (rev 945) Property changes on: branches/getdata-0.8.6-php ___________________________________________________________________ Added: svn:ignore ## -0,0 +1,22 ## +.deps +Makefile +Makefile.am +Makefile.in +aclocal.m4 +autom4te.cache +compile +config.guess +config.log +config.lt +config.status +config.sub +configure +configure.ac +depcomp +install-sh +libtool +ltmain.sh +make_parameters +missing +php_getdata-*.tar.bz2 +php_getdata-*.tar.gz Copied: branches/getdata-0.8.6-php/AUTHORS (from rev 943, branches/getdata-0.8/AUTHORS) =================================================================== --- branches/getdata-0.8.6-php/AUTHORS (rev 0) +++ branches/getdata-0.8.6-php/AUTHORS 2015-04-03 00:14:27 UTC (rev 945) @@ -0,0 +1,36 @@ +C. B. Netterfield <net...@as...> developed the original +dirfile standard and created the first GetData library. + +D. V. Wiebe <dv...@ke...> developed the "large dirfile extension" +(AKA Standards Version 3) and currently maintains GetData and the dirfile +standards. + +Ted Kisner <tsk...@gm...> wrote the PutData library +(libdirfile). + +Sean Bryan <sea...@ca...> provided code which was adapted to create +the MATLAB bindings. + +Eli Fidler <el...@st...> ported PutData to this version of the GetData +library. + +Joseph Fowler <jf...@pr...> provided code which was adapted to +create the slimlib encoding support. + +Adam D Hincks <ada...@ut...> provided code whic was adapted to +create the zzip encoding support. The original zzip encoding (ZIRFILE) was +developed by Mike Nolta <no...@ci...>. + +Peter Kümmel <syn...@gm...> ported GetData to MSVC (Windows). + +George Staikos <st...@kd...> maintained the GetData library as part of +kst. + +Adam Treat <tr...@kd...> wrote the code for the PHASE field type. + +Matthew Truch <ma...@tr...> wrote the dirfile2ascii conversion utility. + +Andrew Walker <arw...@su...> maintained the GetData library as +part of kst. + +vi: tw=75 Copied: branches/getdata-0.8.6-php/COPYING (from rev 943, branches/getdata-0.8/COPYING) =================================================================== --- branches/getdata-0.8.6-php/COPYING (rev 0) +++ branches/getdata-0.8.6-php/COPYING 2015-04-03 00:14:27 UTC (rev 945) @@ -0,0 +1,504 @@ + GNU LESSER GENERAL PUBLIC LICENSE + Version 2.1, February 1999 + + Copyright (C) 1991, 1999 Free Software Foundation, Inc. + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + +[This is the first released version of the Lesser GPL. It also counts + as the successor of the GNU Library Public License, version 2, hence + the version number 2.1.] + + Preamble + + The licenses for most software are designed to take away your +freedom to share and change it. By contrast, the GNU General Public +Licenses are intended to guarantee your freedom to share and change +free software--to make sure the software is free for all its users. + + This license, the Lesser General Public License, applies to some +specially designated software packages--typically libraries--of the +Free Software Foundation and other authors who decide to use it. You +can use it too, but we suggest you first think carefully about whether +this license or the ordinary General Public License is the better +strategy to use in any particular case, based on the explanations below. + + When we speak of free software, we are referring to freedom of use, +not price. Our General Public Licenses are designed to make sure that +you have the freedom to distribute copies of free software (and charge +for this service if you wish); that you receive source code or can get +it if you want it; that you can change the software and use pieces of +it in new free programs; and that you are informed that you can do +these things. + + To protect your rights, we need to make restrictions that forbid +distributors to deny you these rights or to ask you to surrender these +rights. These restrictions translate to certain responsibilities for +you if you distribute copies of the library or if you modify it. + + For example, if you distribute copies of the library, whether gratis +or for a fee, you must give the recipients all the rights that we gave +you. You must make sure that they, too, receive or can get the source +code. If you link other code with the library, you must provide +complete object files to the recipients, so that they can relink them +with the library after making changes to the library and recompiling +it. And you must show them these terms so they know their rights. + + We protect your rights with a two-step method: (1) we copyright the +library, and (2) we offer you this license, which gives you legal +permission to copy, distribute and/or modify the library. + + To protect each distributor, we want to make it very clear that +there is no warranty for the free library. Also, if the library is +modified by someone else and passed on, the recipients should know +that what they have is not the original version, so that the original +author's reputation will not be affected by problems that might be +introduced by others. + + Finally, software patents pose a constant threat to the existence of +any free program. We wish to make sure that a company cannot +effectively restrict the users of a free program by obtaining a +restrictive license from a patent holder. Therefore, we insist that +any patent license obtained for a version of the library must be +consistent with the full freedom of use specified in this license. + + Most GNU software, including some libraries, is covered by the +ordinary GNU General Public License. This license, the GNU Lesser +General Public License, applies to certain designated libraries, and +is quite different from the ordinary General Public License. We use +this license for certain libraries in order to permit linking those +libraries into non-free programs. + + When a program is linked with a library, whether statically or using +a shared library, the combination of the two is legally speaking a +combined work, a derivative of the original library. The ordinary +General Public License therefore permits such linking only if the +entire combination fits its criteria of freedom. The Lesser General +Public License permits more lax criteria for linking other code with +the library. + + We call this license the "Lesser" General Public License because it +does Less to protect the user's freedom than the ordinary General +Public License. It also provides other free software developers Less +of an advantage over competing non-free programs. These disadvantages +are the reason we use the ordinary General Public License for many +libraries. However, the Lesser license provides advantages in certain +special circumstances. + + For example, on rare occasions, there may be a special need to +encourage the widest possible use of a certain library, so that it becomes +a de-facto standard. To achieve this, non-free programs must be +allowed to use the library. A more frequent case is that a free +library does the same job as widely used non-free libraries. In this +case, there is little to gain by limiting the free library to free +software only, so we use the Lesser General Public License. + + In other cases, permission to use a particular library in non-free +programs enables a greater number of people to use a large body of +free software. For example, permission to use the GNU C Library in +non-free programs enables many more people to use the whole GNU +operating system, as well as its variant, the GNU/Linux operating +system. + + Although the Lesser General Public License is Less protective of the +users' freedom, it does ensure that the user of a program that is +linked with the Library has the freedom and the wherewithal to run +that program using a modified version of the Library. + + The precise terms and conditions for copying, distribution and +modification follow. Pay close attention to the difference between a +"work based on the library" and a "work that uses the library". The +former contains code derived from the library, whereas the latter must +be combined with the library in order to run. + + GNU LESSER GENERAL PUBLIC LICENSE + TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + + 0. This License Agreement applies to any software library or other +program which contains a notice placed by the copyright holder or +other authorized party saying it may be distributed under the terms of +this Lesser General Public License (also called "this License"). +Each licensee is addressed as "you". + + A "library" means a collection of software functions and/or data +prepared so as to be conveniently linked with application programs +(which use some of those functions and data) to form executables. + + The "Library", below, refers to any such software library or work +which has been distributed under these terms. A "work based on the +Library" means either the Library or any derivative work under +copyright law: that is to say, a work containing the Library or a +portion of it, either verbatim or with modifications and/or translated +straightforwardly into another language. (Hereinafter, translation is +included without limitation in the term "modification".) + + "Source code" for a work means the preferred form of the work for +making modifications to it. For a library, complete source code means +all the source code for all modules it contains, plus any associated +interface definition files, plus the scripts used to control compilation +and installation of the library. + + Activities other than copying, distribution and modification are not +covered by this License; they are outside its scope. The act of +running a program using the Library is not restricted, and output from +such a program is covered only if its contents constitute a work based +on the Library (independent of the use of the Library in a tool for +writing it). Whether that is true depends on what the Library does +and what the program that uses the Library does. + + 1. You may copy and distribute verbatim copies of the Library's +complete source code as you receive it, in any medium, provided that +you conspicuously and appropriately publish on each copy an +appropriate copyright notice and disclaimer of warranty; keep intact +all the notices that refer to this License and to the absence of any +warranty; and distribute a copy of this License along with the +Library. + + You may charge a fee for the physical act of transferring a copy, +and you may at your option offer warranty protection in exchange for a +fee. + + 2. You may modify your copy or copies of the Library or any portion +of it, thus forming a work based on the Library, and copy and +distribute such modifications or work under the terms of Section 1 +above, provided that you also meet all of these conditions: + + a) The modified work must itself be a software library. + + b) You must cause the files modified to carry prominent notices + stating that you changed the files and the date of any change. + + c) You must cause the whole of the work to be licensed at no + charge to all third parties under the terms of this License. + + d) If a facility in the modified Library refers to a function or a + table of data to be supplied by an application program that uses + the facility, other than as an argument passed when the facility + is invoked, then you must make a good faith effort to ensure that, + in the event an application does not supply such function or + table, the facility still operates, and performs whatever part of + its purpose remains meaningful. + + (For example, a function in a library to compute square roots has + a purpose that is entirely well-defined independent of the + application. Therefore, Subsection 2d requires that any + application-supplied function or table used by this function must + be optional: if the application does not supply it, the square + root function must still compute square roots.) + +These requirements apply to the modified work as a whole. If +identifiable sections of that work are not derived from the Library, +and can be reasonably considered independent and separate works in +themselves, then this License, and its terms, do not apply to those +sections when you distribute them as separate works. But when you +distribute the same sections as part of a whole which is a work based +on the Library, the distribution of the whole must be on the terms of +this License, whose permissions for other licensees extend to the +entire whole, and thus to each and every part regardless of who wrote +it. + +Thus, it is not the intent of this section to claim rights or contest +your rights to work written entirely by you; rather, the intent is to +exercise the right to control the distribution of derivative or +collective works based on the Library. + +In addition, mere aggregation of another work not based on the Library +with the Library (or with a work based on the Library) on a volume of +a storage or distribution medium does not bring the other work under +the scope of this License. + + 3. You may opt to apply the terms of the ordinary GNU General Public +License instead of this License to a given copy of the Library. To do +this, you must alter all the notices that refer to this License, so +that they refer to the ordinary GNU General Public License, version 2, +instead of to this License. (If a newer version than version 2 of the +ordinary GNU General Public License has appeared, then you can specify +that version instead if you wish.) Do not make any other change in +these notices. + + Once this change is made in a given copy, it is irreversible for +that copy, so the ordinary GNU General Public License applies to all +subsequent copies and derivative works made from that copy. + + This option is useful when you wish to copy part of the code of +the Library into a program that is not a library. + + 4. You may copy and distribute the Library (or a portion or +derivative of it, under Section 2) in object code or executable form +under the terms of Sections 1 and 2 above provided that you accompany +it with the complete corresponding machine-readable source code, which +must be distributed under the terms of Sections 1 and 2 above on a +medium customarily used for software interchange. + + If distribution of object code is made by offering access to copy +from a designated place, then offering equivalent access to copy the +source code from the same place satisfies the requirement to +distribute the source code, even though third parties are not +compelled to copy the source along with the object code. + + 5. A program that contains no derivative of any portion of the +Library, but is designed to work with the Library by being compiled or +linked with it, is called a "work that uses the Library". Such a +work, in isolation, is not a derivative work of the Library, and +therefore falls outside the scope of this License. + + However, linking a "work that uses the Library" with the Library +creates an executable that is a derivative of the Library (because it +contains portions of the Library), rather than a "work that uses the +library". The executable is therefore covered by this License. +Section 6 states terms for distribution of such executables. + + When a "work that uses the Library" uses material from a header file +that is part of the Library, the object code for the work may be a +derivative work of the Library even though the source code is not. +Whether this is true is especially significant if the work can be +linked without the Library, or if the work is itself a library. The +threshold for this to be true is not precisely defined by law. + + If such an object file uses only numerical parameters, data +structure layouts and accessors, and small macros and small inline +functions (ten lines or less in length), then the use of the object +file is unrestricted, regardless of whether it is legally a derivative +work. (Executables containing this object code plus portions of the +Library will still fall under Section 6.) + + Otherwise, if the work is a derivative of the Library, you may +distribute the object code for the work under the terms of Section 6. +Any executables containing that work also fall under Section 6, +whether or not they are linked directly with the Library itself. + + 6. As an exception to the Sections above, you may also combine or +link a "work that uses the Library" with the Library to produce a +work containing portions of the Library, and distribute that work +under terms of your choice, provided that the terms permit +modification of the work for the customer's own use and reverse +engineering for debugging such modifications. + + You must give prominent notice with each copy of the work that the +Library is used in it and that the Library and its use are covered by +this License. You must supply a copy of this License. If the work +during execution displays copyright notices, you must include the +copyright notice for the Library among them, as well as a reference +directing the user to the copy of this License. Also, you must do one +of these things: + + a) Accompany the work with the complete corresponding + machine-readable source code for the Library including whatever + changes were used in the work (which must be distributed under + Sections 1 and 2 above); and, if the work is an executable linked + with the Library, with the complete machine-readable "work that + uses the Library", as object code and/or source code, so that the + user can modify the Library and then relink to produce a modified + executable containing the modified Library. (It is understood + that the user who changes the contents of definitions files in the + Library will not necessarily be able to recompile the application + to use the modified definitions.) + + b) Use a suitable shared library mechanism for linking with the + Library. A suitable mechanism is one that (1) uses at run time a + copy of the library already present on the user's computer system, + rather than copying library functions into the executable, and (2) + will operate properly with a modified version of the library, if + the user installs one, as long as the modified version is + interface-compatible with the version that the work was made with. + + c) Accompany the work with a written offer, valid for at + least three years, to give the same user the materials + specified in Subsection 6a, above, for a charge no more + than the cost of performing this distribution. + + d) If distribution of the work is made by offering access to copy + from a designated place, offer equivalent access to copy the above + specified materials from the same place. + + e) Verify that the user has already received a copy of these + materials or that you have already sent this user a copy. + + For an executable, the required form of the "work that uses the +Library" must include any data and utility programs needed for +reproducing the executable from it. However, as a special exception, +the materials to be distributed need not include anything that is +normally distributed (in either source or binary form) with the major +components (compiler, kernel, and so on) of the operating system on +which the executable runs, unless that component itself accompanies +the executable. + + It may happen that this requirement contradicts the license +restrictions of other proprietary libraries that do not normally +accompany the operating system. Such a contradiction means you cannot +use both them and the Library together in an executable that you +distribute. + + 7. You may place library facilities that are a work based on the +Library side-by-side in a single library together with other library +facilities not covered by this License, and distribute such a combined +library, provided that the separate distribution of the work based on +the Library and of the other library facilities is otherwise +permitted, and provided that you do these two things: + + a) Accompany the combined library with a copy of the same work + based on the Library, uncombined with any other library + facilities. This must be distributed under the terms of the + Sections above. + + b) Give prominent notice with the combined library of the fact + that part of it is a work based on the Library, and explaining + where to find the accompanying uncombined form of the same work. + + 8. You may not copy, modify, sublicense, link with, or distribute +the Library except as expressly provided under this License. Any +attempt otherwise to copy, modify, sublicense, link with, or +distribute the Library is void, and will automatically terminate your +rights under this License. However, parties who have received copies, +or rights, from you under this License will not have their licenses +terminated so long as such parties remain in full compliance. + + 9. You are not required to accept this License, since you have not +signed it. However, nothing else grants you permission to modify or +distribute the Library or its derivative works. These actions are +prohibited by law if you do not accept this License. Therefore, by +modifying or distributing the Library (or any work based on the +Library), you indicate your acceptance of this License to do so, and +all its terms and conditions for copying, distributing or modifying +the Library or works based on it. + + 10. Each time you redistribute the Library (or any work based on the +Library), the recipient automatically receives a license from the +original licensor to copy, distribute, link with or modify the Library +subject to these terms and conditions. You may not impose any further +restrictions on the recipients' exercise of the rights granted herein. +You are not responsible for enforcing compliance by third parties with +this License. + + 11. If, as a consequence of a court judgment or allegation of patent +infringement or for any other reason (not limited to patent issues), +conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot +distribute so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you +may not distribute the Library at all. For example, if a patent +license would not permit royalty-free redistribution of the Library by +all those who receive copies directly or indirectly through you, then +the only way you could satisfy both it and this License would be to +refrain entirely from distribution of the Library. + +If any portion of this section is held invalid or unenforceable under any +particular circumstance, the balance of the section is intended to apply, +and the section as a whole is intended to apply in other circumstances. + +It is not the purpose of this section to induce you to infringe any +patents or other property right claims or to contest validity of any +such claims; this section has the sole purpose of protecting the +integrity of the free software distribution system which is +implemented by public license practices. Many people have made +generous contributions to the wide range of software distributed +through that system in reliance on consistent application of that +system; it is up to the author/donor to decide if he or she is willing +to distribute software through any other system and a licensee cannot +impose that choice. + +This section is intended to make thoroughly clear what is believed to +be a consequence of the rest of this License. + + 12. If the distribution and/or use of the Library is restricted in +certain countries either by patents or by copyrighted interfaces, the +original copyright holder who places the Library under this License may add +an explicit geographical distribution limitation excluding those countries, +so that distribution is permitted only in or among countries not thus +excluded. In such case, this License incorporates the limitation as if +written in the body of this License. + + 13. The Free Software Foundation may publish revised and/or new +versions of the Lesser General Public License from time to time. +Such new versions will be similar in spirit to the present version, +but may differ in detail to address new problems or concerns. + +Each version is given a distinguishing version number. If the Library +specifies a version number of this License which applies to it and +"any later version", you have the option of following the terms and +conditions either of that version or of any later version published by +the Free Software Foundation. If the Library does not specify a +license version number, you may choose any version ever published by +the Free Software Foundation. + + 14. If you wish to incorporate parts of the Library into other free +programs whose distribution conditions are incompatible with these, +write to the author to ask for permission. For software which is +copyrighted by the Free Software Foundation, write to the Free +Software Foundation; we sometimes make exceptions for this. Our +decision will be guided by the two goals of preserving the free status +of all derivatives of our free software and of promoting the sharing +and reuse of software generally. + + NO WARRANTY + + 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO +WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW. +EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR +OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY +KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE +LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME +THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + + 16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN +WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY +AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU +FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR +CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE +LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING +RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A +FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF +SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH +DAMAGES. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Libraries + + If you develop a new library, and you want it to be of the greatest +possible use to the public, we recommend making it free software that +everyone can redistribute and change. You can do so by permitting +redistribution under these terms (or, alternatively, under the terms of the +ordinary General Public License). + + To apply these terms, attach the following notices to the library. It is +safest to attach them to the start of each source file to most effectively +convey the exclusion of warranty; and each file should have at least the +"copyright" line and a pointer to where the full notice is found. + + <one line to give the library's name and a brief idea of what it does.> + Copyright (C) <year> <name of author> + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + +Also add information on how to contact you by electronic and paper mail. + +You should also get your employer (if you work as a programmer) or your +school, if any, to sign a "copyright disclaimer" for the library, if +necessary. Here is a sample; alter the names: + + Yoyodyne, Inc., hereby disclaims all copyright interest in the + library `Frob' (a library for tweaking knobs) written by James Random Hacker. + + <signature of Ty Coon>, 1 April 1990 + Ty Coon, President of Vice + +That's all there is to it! + + Copied: branches/getdata-0.8.6-php/ChangeLog (from rev 943, branches/getdata-0.8/ChangeLog) =================================================================== --- branches/getdata-0.8.6-php/ChangeLog (rev 0) +++ branches/getdata-0.8.6-php/ChangeLog 2015-04-03 00:14:27 UTC (rev 945) @@ -0,0 +1,5831 @@ +2014-12-07 D. V. Wiebe <ge...@ke...> svn:935 + GetData-0.8.6 released. + +2014-12-06 D. V. Wiebe <ge...@ke...> svn:932 + Backport more bugfixes from trunk: + + * src/native.c (_GD_NativeType): Don't always return GD_FLOAT64 for LINCOMs. + (r867) + + * src/putdata.c (_GD_MplexOutData): Fix computation of complex data. (r867) + + * src/open.c (_GD_CreateDirfile _GD_Open): Close descriptors on error. + (r877) + + * src/types.c (_GD_ConvertType): Add missing break. (r877) + + * bindings/python/pydirfile.c (gdpy_dirfile_getentry gdpy_dirfile_getstring + gdpy_dirfile_putcarray gdpy_dirfile_putdata) src/include.c (_GD_Include) + src/putdata.c (_GD_DoMplexOut): Deallocate buffers on error. (r877) + + * src/parse.c (_GD_ParseCarray): Return on error. (r877) + + * src/parse.c (_GD_ParseFieldSpec): Only resize the dot_list when necessary. + Also, clean up if the resize doesn't work. (r877) + + * src/getdata.h.in: Remove __nonnull__ from parameter two of + gd_verbose_prefix. (r877) + + * src/common.c (_GD_CanonicalPath): Don't let readlink overrun the buffer. + Also fix double free. (r877) + + * bindings/python/pygetdata.h (PYGD_REPORT_ERROR): Added. (r877) + + * bindings/python/pyentry.c (gdpy_entry_seta): Set a[i] if the pyobj is + complex. (r877) + + * bindings/cxx/entry.cpp (Entry::Entry): Zero E if gd_entry call fails. + (r877) + + * bindings/cxx/fragment.cpp (Fragment::Fragment): Handle error in + gd_fragment_affixes call. (r877) + + * bindings/f77/fgetdata.c (GDASCA): Handle error in gd_entry call. (r877) + + * util/dirfile2ascii.c (main): Fix check for too many fields. (r877) + +2014-12-06 D. V. Wiebe <ge...@ke...> svn:931 + Backport more bugfixes from trunk: + + * src/getdata.c (_GD_DoConst): Return len instead of 1. (r848) + * src/field_list.c (gd_carrays gd_mcarrays): Update _GD_DoField calls to + deal with the above. (r848) + * test/get_carray_c2r.c: Added. (r848) + + * src/add.c (_GD_CopyScalars): Added. (r848) + * src/add.c (_GD_Change): Fix scalar copying for GD_POLYNOM_ENTRY. Don't + throw errors for passed members which will be ignored due to scalars (spf, + numbits, bitnum). (r848) + * test/add_bit_scalars.c test/add_mplex_scalars.c test/add_raw_spf_scalar.c + * test/add_polynom_scalar.c: Added. (r848) + + * src/mod.c (_GD_Change): Fix MPLEX scalar modifying. (r848) + +2014-12-05 D. V. Wiebe <ge...@ke...> svn:930 + Backport bugfixes from trunk: + + * bindings/cxx/rawentry.cpp (RawEntry::RawEntry): Initialise filename. + Patch from S. J. Benton. (r863) + + * src/add.c (_GD_Add): Set the right suberror (GD_E_ENTRY_POLYORD) for + poly_ord out of range. (r867) + + * src/flimits.c (_GD_GetBOF): Also zero *ds if we're before sample zero. + (r867) + + * src/flush.c (_GD_Flush): Don't flush the second lincom field if it's not + used. (r867) + + * src/fpos.c (_GD_Seek): Fix sign on PHASE shift. (r867) + + * src/fpos.c (gd_seek64): Pass index_pos=-1 to _GD_GetFilePos. (r867) + + * src/getdata.c (_GD_CDivideData): Fix computation of complex division. + (r867) + + * src/index.c (_GD_GetIndex): Fix extrapolations performed when required to + search for the EOF. (r867) + * src/index.c (gd_framenum_subset64): Fix conversion of field_end from + frames to samples. (r867) + + * src/add.c (_GD_Change): Don't throw an error on mplex.count_val < 0. + (r848) + * src/errors.c src/internal.h: Remove unused GD_E_ENTRY_CNTVAL. (r848) + * test/add_mplex_val.c: Deleted. (r848) + + * src/legacy.c (GetFormat): Allocate Format.mplexEntries. (r867) + + * src/mod.c (gd_alter_spec gd_malter_spec): Set move flags for POLYNOM + entries to ensure co-efficients are updated. (r867) + + * src/parse.c (_GD_Tokenise): Fix parsing of \x and \u. Don't unnecessarily + overwrite earlier errors with GD_E_FORMAT_UNTERM. (r867) + + * bindings/idl/getdata.c (gdidl_rename): Fix handling of UPDATEDB. (r867) + + * bindings/cxx/getdata/entry.h (Entry::CompScal): Allow non-zero for + RECIP, too. (r868) + + * src/common.c (_GD_CInvertData): Correct algebra in C89 INVERT macro. + (r872) + * src/getdata.c (_GD_PolynomData): Implement correct C89 POLYNOMC macro. + (r872) + * src/getdata.c (_GD_CDivideData): Correct algebra in C89 DIVIDEC macro. + (r872) + + * src/internal.h: Fix pointer arithmetic in C89 gd_cap_ macro. (r872) + + * bindings/python/pyfragment.c (gdpy_fragment_init): Fix typo in keyword + names. (r876) + + * Makefile.am: Auotmake version bumped to 1.13. (r915) + * configure.ac: Autoconf version bumped to 2.65. (r915) + +2013-09-05 D. V. Wiebe <ge...@ke...> svn:845 + GetData-0.8.5 released. + + * src/zzslim.c: Fix for rename of gd_raw_file_. + +2013-07-17 D. V. Wiebe <ge...@ke...> svn:835 + + * bindings/python/pydirfile.c: Remove spurious debug printf. + + * bindings/doc/Makefile.am: Fix make clean + + * bindings/bindings/perl/Makefile.am: Fix make clean + +2013-05-14 D. V. Wiebe <ge...@ke...> svn:832 + GetData-0.8.4 released. + +2013-04-11 D. V. Wiebe <ge...@ke...> svn:830 + GetData-0.8.4rc2: + + * bindings/perl/Build.PL.in: make include_dirs an array. Reported by Seth. + + * bindings/idl/package/configure.ac bindings/matlab/package/configure.ac: + Require GetData >= 0.8.4. + +2013-04-10 D. V. Wiebe <ge...@ke...> svn:829 + GetData-0.8.4rc1. + +2013-04-06 D. V. Wiebe <ge...@ke...> svn:827 + * bindings/cxx/getdata/entry.h (Entry::CountMax) + bindings/cxx/getdata/mplexentry.h (MplexEntry::CountMax + MplexEntry::SetCountMax): Added (but marked deprecated) for backwards + compatibility. + +2013-04-05 D. V. Wiebe <ge...@ke...> svn:826 + * bindings/f77/test/big_test.f bindings/f77/test/big_test95.f90 + bindings/perl/t/big_test.t: Fix test 231. + +2013-04-05 D. V. Wiebe <ge...@ke...> svn:825 + * src/getdata.h.in: Renamed gd_entry_t.count_max to gd_entry_t.period. + + * bindings/cxx/getdata/entry.h (Entry::Period) + bindings/cxx/getdata/mplexentry.h (NplexEntry::Period): Renamed from CountMax. + * bindings/cxx/mplexentry.cpp (MplexEntry::SetPeriod): Renamed from + SetCountMax. + * bindings/cxx/mplexentry.cpp (MplexEntry::MplexEntry) + bindings/f77/fgetdata.c (GDGEMX) bindings/f77/getdata.f90.in (fgd_entry + fgd_add fgd_madd fgd_alter_entry fgd_add_mplex fgd_madd_mplex + fgd_alter_mplex) bindings/idl/getdata.c (gdidl_make_idl_entry + gdidl_alter_mplex) bindings/matlab/gd_add_mplex.m + bindings/matlab/gd_alter_mplex.m bindings/matlab/gd_madd_mplex.m + bindings/matlab/matlab.c (gdmx_from_entry gdmx_to_entry) + bindings/perl/GetData.xs (gdp_to_entry entry) bindings/python/pyentry.c + (gdpy_set_entry_from_tuple gdpy_entry_getperiod gdpy_entry_setperiod + gdpy_entry_getparms): Rename count_max to period. + + * src/add.c (_GD_Add): Fix range checks on MPLEX parameters. + + * src/getdata.c (_GD_DoMplex): The default period is 2n+1, not 2n. + + * src/internal.h: Rename GD_E_ENTRY_CNTMAX to GD_E_ENTRY_PERIOD. + * src/errors.c: Update GD_E_ENTRY_PERIOD and GD_E_FORMAT_MPLEXVAL messages. + + * src/mod.c (_GD_Change): mplex.count_val = -1 is not a magic value. + + * src/parse.c (_GD_ParseMplex): Remove incorrect restrictions count_val <= + period and count_val >= 0. + + * bindings/idl/getdata.c (gdidl_read_idl_entry): Properly convert an IDL + MPLEX entry object. + + * bindings/idl/getdata.c (gdidl_alter_mplex): Handle missing COUNT_VAL. + + * man/dirfile-format.5: Fix and clarify MPLEX specification. + +2013-03-13 D. V. Wiebe <ge...@ke...> svn:819 + * src/flush.c (_GD_FlushFragment): Strip affixes from field codes in + /REFERENCE directives. + * test/flush_ref.c test/parse_include_affix_ref.c: Added. + +2013-03-12 D. V. Wiebe <ge...@ke...> svn:818 + * bindings/python/pydirfile.c (gdpy_dirfile_getdata): Resize the ndarray + before returning it, if necessary. Also, don't try to read past the EOF in + read-to-end mode. + + * src/fpos.c (_GD_GetFilePos): Fix computation of two input field derived + types to properly return MULTIPOS when necessary. + * test/tell_multidiv.c: Added. + + * src/fpos.c (_GD_Seek): Return error if trying to place the I/O pointer + before sample zero. + * test/seek_neg.c: Added. + + * src/gzip.c (_GD_GzipSeek): Allow seeking to sample zero. + * test/gzip_get_get2.c: Added. + +2013-03-12 D. V. Wiebe <ge...@ke...> svn:815 + GetData-0.8.3 released. + +2013-03-09 D. V. Wiebe <ge...@ke...> svn:807 + * src/flush.c: C89-ify the GD_VERS_... constants. + +2013-03-08 D. V. Wiebe <ge...@ke...> svn:806 + GetData-0.8.3rc1. + +2013-03-08 D. V. Wiebe <ge...@ke...> svn:803 + * src/internal.h (gd_put_unalinged64): Fix spelling. + + * src/encoding.c (_GD_FiniRawIO): Don't pass NULL to gd_UnlinkAt. + + * man/GD_SIZE.3: Added. + + * configure.ac: Turn on fast unaligned access for armv[6789] per Dinar + Valeev. Also add add --enable-fast-unaligned to allow users to override the + check. + +2013-02-15 D. V. Wiebe <ge...@ke...> svn:795 + * bindings/matlab/package: Added. + * Makefile.am: Add matlabdist and matlabdistcheck + + * doc/README.matlab bindings/matlab/make_contents.sh.in + bindings/matlab/Contents.m.head bindings/matlab/doc.tail: Added. + + * bindinag/matlab/matlab.c (gdmx_from_carrays): Added. + * bindings/matlab/gd_mcarrays.c: Added. + * bindings/matlab/test/big_test.m: Add test 243. + + * bindings/matlab/gd_include.c: Renamed from gd_include_affix.c + * bindings/matlab/gd_include.m: Deleted. + +2013-02-13 D. V. Wiebe <ge...@ke...> svn:794 + * bindings/cxx/test/big_test.cpp bindings/perl/t/big_test.t + bindings/python/test/big_test.py: Add test 243. + +2013-02-06 D. V. Wiebe <ge...@ke...> svn:793 + * src/parse.c (_GD_Tokenise): Don't falsely report an unterminated token when + stopping a partial tokenisation on top of a " or \. + * test/tok_arg.c test/tok_escape.c test/tok_quote.c: Added. + +2013-02-02 D. V. Wiebe <ge...@ke...> svn:792 + * src/string.c (gd_get_string): Handle string retrieval directly instead of + calling _GD_DoField. + * src/string.c (_GD_DoStringOut): Moved from putdata.c. + * src/string.c (gd_put_string) src/add.c (gd_add_string gd_madd_string): Call + _GD_DoStringOut directly instead of _GD_DoFieldOut. + * src/getdata.c (_GD_DoString): Deleted. + * src/getdata.c (_GD_DoField) src/putdata.c (_GD_DoFieldOut): Remove string + processing. + +2013-02-02 D. V. Wiebe <ge...@ke...> svn:790 + * bindings/matlab/matlab.c: ANSI C. + +2013-02-02 D. V. Wiebe <ge...@ke...> svn:789 + * bindings/python/pyentry.c (gdpy_set_scalar_from_pyobj): Add missing data + types. + * bindings/python/pyentry.c (gdpy_set_entry_from_tuple gdpy_entry_setspf + gdpy_entry_setbitnum gdpy_entry_setnumbits gdpy_entry_setcountval + gdpy_entry_setcountmax): Fix data type in gdpy_set_scalar_from_pyobj calls. + + * src/entry.c (_GD_GetScalar): Handle bogus CARRAY indices. + + * src/mod.c (_GD_Change): Fix floating point CONST conversions. + + * test/add_scalar_carray_bad.c test/alter_const_c2r.c: Added. + + * bindings/python/test/big_test.py: Fix the part of test 35 that the + previous fix broke. + +2013-02-02 D. V. Wiebe <ge...@ke...> svn:788 + * src/debug.c (gd_colclear): Added. + + * src/protect.c (gd_protection gd_alter_protection): Fix error reporting for + GD_E_BAD_INDEX. + + * m4/matlab.m4 bindings/matlab: Added. + * configure.ac bindings/Makefile.am: Added MATLAB config. + * bindings/make_parameters.c (MatLab): Added. + + * bindings/python/test/big_test.py: Fixed tests 35 and 67. + +2013-01-26 D. V. Wiebe <ge...@ke...> svn:787 + * src/del.c (_GD_DeReference) src/entry.c (_GD_CalculateEntry) src/flush.c + (_GD_FieldSpec) src/mod.c (_GD_Change): Fix data type (size) of + EN(raw,spf) in function calls. + +2013-01-15 D. V. Wiebe <ge...@ke...> svn:785 + * m4/floatordering.m4: Split from m4/compiler.m4 + + * src/parse.c (_GD_ParseRaw _GD_ParseMplex): Fix types in _GD_SetScalar + calls. + +2013-01-04 D. V. Wiebe <ge...@ke...> svn:783 + * configure.ac: powerpc64 also supports fast unaligned access. Reported by + Dinar Valeev. + +2012-12-13 D. V. Wiebe <ge...@ke...> svn:775 + GetData-0.8.2 released. + +2012-12-12 D. V. Wiebe <ge...@ke...> svn:773 + * src/common.c (_GD_CanonicalPath): Don't bail early when encountering a + trailing absolute symlink. + + * src/common.c (_GD_CanonicalPath): Strip DIRSEP along with a symlink name + from res when necessary. + + * test/test.h test/parse_include_absolute.c test/parse_include_absrel.c + test/parse_include_relabs.c: Abstract getcwd in the header. + * test/open_sym_a.c test/open_sym_al.c test/open_sym_at.c test/open_sym_c.c + test/open_sym_cl.c test/open_sym_ct.c test/open_sym_p.c test/open_sym_pl.c + test/open_sym_pt.c: Added. + +2012-11-22 D. V. Wiebe <ge...@ke...> svn:772 + * src/encoding.c (_GD_WriteOut): Remove unnecessary DIRFILE parameter. + +2012-10-10 D. V. Wiebe <ge...@ke...> svn:771 + * src/getdata.c (_GD_DoMplex): Check we're at the BOF before trying to do a + lookback. + + * src/internal.h: Only export gd_MakeFullPathOnly when using modules. + +2012-08-20 D. V. Wiebe <ge...@ke...> svn:767 + GetData-0.8.1 released. + +2012-08-15 D. V. Wiebe <ge...@ke...> svn:760 + * src/internal (_GD_IsDirSep): Added. + * src/common.c (_GD_CanonicalPath): Call _GD_IsDirSep + +2012-08-15 D. V. Wiebe <ge...@ke...> svn:759 + GetData-0.8.1rc1: + + * src/parse.c (_GD_ParseDirective _GD_ParseFragment): Remove inappropriate + restrict keywords. Reported by Daniel Flanigan. + +2012-08-14 D. V. Wiebe <ge...@ke...> svn:757 + * src/include.c (_GD_Include): Return the correct fragment index, not just + D->n_fragment - 1. + * test/include_sub.c: Added. + +2012-08-04 D. V. Wiebe <ge...@ke...> svn:755 + * src/parse.c (_GD_ParseFragment): Don't resize instring unnecessarily. + +2012-08-04 D. V. Wiebe <ge...@ke...> svn:754 + * src/parse.c (_GD_ParseDirective): Delete free reference on encountered + one in a subfragment. + +2012-08-02 D. V. Wiebe <ge...@ke...> svn:753 + * src/include.c (_GD_Include): Reject non-regular files as fragments. + +2012-08-02 D. V. Wiebe <ge...@ke...> svn:752 + * src/globals.c (gd_dirfilename): Return the full path. + * test/global_name.c: Update. + + * src/add.c (_GD_Add): Properly compute filebase. + + * src/entry.c (gd_linterp_tablename): Added. + * test/table.c test/table_code. test/table_type.c: Added. + * bindings/cxx/dirfile.cpp (Dirfile::LinterpTableName) + bindings/perl/simple_funcs.xsin (linterp_tablename) + bindings/f77/getdata.f90.in (fgd_linterp_tablename) bindings/f77/fgetdata.c + (GDLTTN) bindings/idl/getdata.c (gdidl_get_linterp_tablename) + bindings/python/pydirfile.c (gdpy_dirfile_linterptablename): Added. + * bindings/perl/simple_funcs.pl: Handle returning malloc'd string. + + * bindings/cxx/test/big_test.cpp bindings/perl/test/big_test.t + bindings/f77/test/big_test.f bindings/f77/test/big_test95.f90 + bindings/idl/test/big_test.pro bindings/python/test/big_test.py: Add test + 241. Update tests 21 and 80. + +2012-07-26 D. V. Wiebe <ge...@ke...> svn:751 + * src/flush.c (_GD_FieldSpec): Write /HIDDEN directives for /ALIASes. + +2012-07-26 D. V. Wiebe <ge...@ke...> svn:749 + * src/parse.c (_GD_SetScalar _GD_ParseLincom _GD_ParseLinterp + _GD_ParseMultiply _GD_ParseRecip _GD_ParseWindow _GD_ParseMplex + _GD_ParseDivide _GD_ParseBit _GD_ParsePhase _GD_ParsePolynom + _GD_ParseAlias): Store munged input fields. + * src/entry.c (_GD_GetScalar) src/common.c (_GD_BadInput) src/parse.c + (_GD_ResolveAlias): Don't (re-)munge field codes. + + * src/name.c (_GD_MungeCode): Take an additional parameter, err_ok, + indicating whether missing affixes indicate an internal error or not. + + * src/mod.c (_GD_AlterInField) src/name.c (_GD_CheckCodeAffixes): Added. + * src/mod.c (_GD_AlterScalar) src/add.c (_GD_FixName _GD_Add _GD_AddAlias): + Call _GD_CheckCodeAffixes. + * src/mod.c (_GD_Change): Call _GD_AlterInField to modify in_fields. + + * src/flush.c (_GD_WriteFieldCode): Added. + * src/flush.c (_GD_PadField _GD_WriteConst _GD_FieldSpec): Call + _GD_WriteFieldCode. + + * test/get_affix.c test/add_alias_affix.c test/add_alias_affix.c + test/add_spec_affix.c test/madd_alias_affix.c test/alter_lincom_affix.c + test/add_lincom_affix.c test/alter_scalar_affix.c: Added. + + * test/add_string_affix.c test/madd_affix.c test/add_affix.c: Update for new + affix semantics. + + * src/mod.c (gd_alter_entry) src/add.c (gd_madd_alias): Clear error when + starting. + +2012-07-12 D. V. Wiebe <ge...@ke...> svn:743 + * bindings/f77/fgetdata.c (GDALLC): Delete unnecessary malloc. + * src/fragment.c (_GD_CheckAffixes): Free subaffixes on error. + * src/fragment.c (gd_desync): Free old name after reopen. + * src/include.c (_GD_Include): Free sname on error. + * src/add.c (_GD_Add): Free temp_buffer on error. + * src/close.c (_GD_FreeD): Free tok_base and error_prefix. + * src/move.c (_GD_Move): Free new_code on error. + * src/parse.c (gd_strtok): Cache the string per documentation. + + * test/valgrind.suppressions: Added. + * bindings/cxx/test/big_test.cpp test/add_affix.c test/add_meta_alias.c + test/add_scalar_carray.c test/name_updb_alias.c test/name_updb_const.c + test/name_updb_const_alias.c test/name_alias.c test/name_updb.c + test/madd_affix.c test/add_meta.c test/add_scalar.c test/name.c test/add.c + test/parse_mplex_nomax.c: Deal with memory. + +2012-07-10 D. V. Wiebe <ge...@ke...> svn:740 + * src/common.c (_GD_CanonicalPath): Fix pointer arithmetic + + * src/compat.c (gd_strtod): Drop octal (not in POSIX); handle hex floating + point; don't zero errno. + +2012-07-04 D. V. Wiebe <ge...@ke...> svn:737 + GetData-0.8.0 released. + +2012-07-04 D. V. Wiebe <ge...@ke...> svn:736 + * src/constant.c (gd_get_carray_slice gd_get_carray gd_carray_len + gd_put_carray_slice gd_put_carray): Handle both CONST and CARRAY. + * src/constant.c (gd_get_constant gd_put_constant): Just call the + corresponding carray_slice function. + +2012-06-30 D. V. Wiebe <ge...@ke...> svn:732 + * src/getdata.h.in configure.ac cmake/CMakeLists.txt: Fix definition of + gd_off64_t. + + * bindings/perl/Build.PL.in: make getdata.h a dependency of lib/GetData.xs. + +2012-06-29 D. V. Wiebe <ge...@ke...> svn:728 + * src/getdata.h.in src/internal.h src/errors.c: Merge GD_E_BAD_VERSION into + GD_E_ARGUMENT. + +2012-06-28 D. V. Wiebe <ge...@ke...> svn:725,726 + * util/checkdirfile.c: Find and report dangling aliases. + + * bindings/python/pydirfile.c (gdpy_dirfile_nentries gdpy_dirfile_entrylist) + bindings/cxx/dirfile.cpp (Dirfile::NEntries Dirfile::EntryList) + bindings/perl/GetData.xs (entry_list) : Fix signedness of "type". + * bindings/idl/getdata.c (gdidl_get_field_list gdidl_get_nfields): Deal with + /ALIASES. + * bindings/make_parameters.c: Add GD_ALIAS_ENTRIES. + + * test/nentries_noalias.c test/elist_noalias.c: Renamed from ..._alias.c. + * test/nentries_alias.c test/elist_alias.c: Added. + + * src/internal.h getdata.h.in: Move GD_ALIAS_ENTRY to public header. + * src/getdata.h.in: Define GD_ALIAS_ENTRIES. + * src/field_list.c (_GD_EntryIndex _GD_ListEntry) src/nfields.c + (_GD_NEntries): Handle GD_ALIAS_ENTRIES. + + * src/common.c (_GD_CanonicalPath): Sidestep GCC warning. + +2012-06-27 D. V. Wiebe <ge...@ke...> svn:724 + * src/name.c (_GD_UpdateScalar _GD_InvalidateConst _GD_UpdateInField + _GD_InvalidateVect): Handle aliases. + * src/name.c (gd_rename): Don't dereference aliases. + * src/name.c (gd_rename_alias): Deleted. + * test/name.c test/name_updb_const.c test/name_updb.c: Updated. + * test/name_updb_const_alias.c test/name_move_alias.c test/name_alias.c + test/name_updb_alias.c: Added. + * test/name_after_const.c test/name_after.c: Deleted. + + * src/parse.c (_GD_ResolveAlias): Reset aliases if requested. + + * man/make_html.pl: Don't eat "**" in synopses. + +2012-06-25 D. V. Wiebe <ge...@ke...> svn:723 + * src/flush.c (_GD_FindVersion): ALIAS means >= 9. + + * util/checkdirfile.c: Grammar. + +2012-06-13 D. V. Wiebe <ge...@ke...> svn:721 + GetData-0.8.0rc2. + +2012-06-04 D. V. Wiebe <ge...@ke...> svn:720 + * bindings/cxx/dirfile.cpp bindings/cxx/fragment.cpp + bindings/cxx/getdata/dirfile.h bindings/cxx/getdata/fragment.h: off_t + -> gd_off64_t. + +2012-06-02 D. V. Wiebe <ge...@ke...> svn:717 + * src/internal.h (_GD_AbsPath): Allow s == NULL. + +2012-05-25 D. V. Wiebe <ge...@ke...> svn:712 + * bindings/cxx/fragment.cpp (Fragment::Fragment Fragment::SetEndianness) + bindings/cxx/dirfile.cpp (Dirfile::NFrames Dirfile::EoF Dirfile::BoF + Dirfile::GetData Dirfile::PutData Dirfile::FrameNum Dirfile::Seek + Dirfile::Tell): Call the 64-bit API. + + * src/getdata.h.in: Support GD_64BIT_API and use configure to define + gd_off64_t. + * src/internal.h bindings/cxx/getdata/dirfile.h: Define GD_64BIT_API before + including getdata.h. + + * test/Makefile.am man/Makefile.am: Remove LFS_TRANSITIONAL_API (always + enabled). + + * confihure.ac: Figure out a suitable type for gd_off64_t. Remove + LFS_TRANSITIONAL_API conditional. + +2012-05-23 D. V. Wiebe <ge...@ke...> svn:710 + * test/test.h: Don't redefine isnan if it's okay as-is. + + * src/open.c (_GD_CreateDirfile): Don't unnecessarily disable mtime + acquisition. + * cmake/test/CMakeLists.txt: enable desync checks. + + * src/compat.c (gd_strtod): Fix sign check. + +2012-05-22 D. V. Wiebe <ge...@ke...> svn:709 + * cmake/CMakeLists.txt: Update definitons. Support GD_UTIL. + * cmake/test/CMakeLists.txt: Update the list of excluded tests. + * cmake/src/CMakeLists.txt: Support GD_DEBUG and conditionally build debug.c. + * cmake/bindings/cxx/CMakeLists.txt: Support GD_TEST. + * cmake/util/CMakeLists.txt cmake/bindings/cxx/test/CMakeLists.txt: Added. + + * src/internal.h: Define PRNsize_t and PRNssize_t to get around printf()s + which don't recognise the "z" length modifier. Changed everywhere. Handle + basename, offsetof, strtod. + + * src/compat.c (basename gd_strtod): Added. + * src/parse.c (_GD_SetScalar) src/nan.h: Call gd_strtod. + + * README.win: Update. + + * bindings/cxx/test/big_test.cpp: Tweak includes to allow compilation with + MSVC. + + * bindings/cxx/getdata/entry.h bindings/cxx/getdata/fragment.h: Include + dirfile.h. + + * test/include_cb.c test/madd_window.c test/open_cb_cont.c + test/open_cb_invalid.c test/include_pc.c test/test.h test/open_cb_rescan.c + test/open_cb_abort.c test/open_cb_ignore.c: Tweak for compilation with MSVC. + + * test/add_meta_alias.c test/madd_affix.c test/parse_mplex_nomax.c + test/add_meta.c: Fix gd_entry_t access. + + * util/checkdirfile.c: Preprocessor fixes for compilation with MSVC. + +2012-04-21 D. V. Wiebe <ge...@ke...> svn:706 + GetData-0.8.0rc1: + + * bindings/cxx/test/big_test.cpp bindings/perl/test/big_test.t: Fix + mplex_lookback checks. + +2012-04-21 D. V. Wiebe <ge...@ke...> svn:705 + * man/make_html.pl: Improvements. + + * src/globals.c (gd_mplex_lookback): Always succeed; return void. + + * bindings/perl/simple_funcs.pl: Handle returning void. + +2012-04-19 D. V. Wiebe <ge...@ke...> svn:701 + * src/add.c (_GD_Add): Don't check protection level before figuring out the + fragment index. + + * bindings/perl/GetData.xs bindings/perl/typemap + bindings/perl/simple_funcs.pl: gdpu_spf_t -> gdpu_uint_t. + + * bindings/perl/GetData.xs (gdp_to_entry entry): Use "in_fields" everywhere + to be consistent with the C API. + + * bindings/perl/GetData.xs (mcarrays): Remove unpacked. Use GIMME_V + instead. + + * bindings/perl/simple_funcs.xsin (reference alter_phase add_window + alter_window alter_affixes add_mplex alter_mplex desync flags + verbose_prefix): Fix parameter defaults and types. + + * bindings/perl/Build.PL.in: Install GetData.pm + + * bindings/perl/simple_funcs.xsin (include include_affex): Deleted. + * bindings/perl/GetData.xs (include): Added. + + * doc/README.perl: Added. + * bindings/perl/GetData.pm.in: POD. + + * bindings/cxx/test/Makefile.am bindings/f77/Makefile.am test/Makefile.am + test/error_verbose.c test/error_verbose_prefix.c: Remove GNUisms. + +2012-04-13 D. V. Wiebe <ge...@ke...> svn:699 + * src/common.c (_GD_CanonicalPath): Terminate and don't clobber string + from realpath(). + + * bindings/make_parameters.c: Add GD_SIE_ENCODED. + + * bindings/cxx/getdata/fragment.h: Update encodings. + + * bindings/f77/fgetdata.c (GDTOKE) bindings/f77/getdata.f90.in (fgd_strtok): + Drop the 'n' parameter: just do what the C API does. + + * bindings/idl/getdata.c (gdidl_getdata gdidl_putdata): Drop /HERE: just use + the absense of FIRST_FRAME and FIRST_SAMPLE. + + * bindings/idl/getdata.c (gdidl_add_mplex): Make the MAX parameter optional. + +2012-04-01 D. V. Wiebe <ge...@ke...> svn:696 + * src/compat.c (_GD_ReadDir): Renamed from gd_readdir(). + +2012-04-01 D. V. Wiebe <ge...@ke...> svn:694 + * src/getdata.h.in: Deprecate gd_bit_t and gd_spf_t. Remove gd_count_t. + * src/getdata.h.in bindings/make_parameters.c: Remove GD_COUNT_MAX. + * cmake/CMakeLists.txt: Remove DEFINE_gd_int16_t and DEFINE_gd_uint16_t. + * src/internal.h: Calculate GD_INT_TYPE and GD_UINT_TYPE. + + * src/entry.c (_GD_CalculateEntry) src/flush.c (_GD_FieldSpec) src/getdata.c + (_GD_DoMplex) src/putdata.c (_GD_DoMplexOut gd_putdata64) src/del.c + (_GD_DeReference) src/parse.c (_GD_ParseMplex _GD_ParseBit) src/mod.c + (_GD_Change): Use GD_INT_TYPE when dealing with bitnum, numbits, count_max, + and count_val. + * src/add.c (gd_add_bit gd_add_sbit gd_add_mplex gd_madd_bit gd_madd_sbit + gd_madd_mplex) src/mod.c (gd_alter_bit gd_alter_sbit gd_alter_mplex) + bindings/python/pyentry.c (gdpy_entry_setnumbits gdpy_entry_setbitnum + gdpy_entry_setcountval gdpy_entry_setcountmax) bindings/cxx/mplexentry.cpp + (MplexEntry::MplexEntry MplexEntry::SetCountVal MplexEntry::SetCountMax) + bindings/cxx/sbitentry.cpp (SBitEntry::SBitEntry SBitEntry::SetFirstBit + SBitEntry::SetNumBits) bindings/cxx/test/big_test.cpp + bindings/cxx/bitentry.cpp (BitEntry::BitEntry BitEntry::SetFirstBit + BitEntry::SetNumBits) bindings/cxx/getdata/bitentry.h (FirstBit NumBits) + bindings/cxx/getdata/entry.h (FirstBit NumBits CountVal CountMax) + bindings/cxx/getdata/mplexentry.h (CountVal CountMax) + bindings/cxx/getdata/sbitentry.h (FirstBit NumBits) bindings/perl/GetData.xs + bindings/perl/typemap bindings/perl/simple_funcs.pl bindings/f77/fgetdata.c + (GDADBT GDADSB GDMDBT GDMDSB GDALBT GDALSB) bindings/idl/getdata.c + (gdidl_make_idl_entry gdidl_read_idl_entry gdidl_add_mplex gdidl_alter_mplex): + gd_bit_t, gd_count_t -> int. + * src/fpos.c (_GD_Seek) src/getdata.c (_GD_MultiplyData _GD_CMultiplyData + _GD_DivideData _GD_CDivideData _GD_WindowData _GD_CDivideData _GD_MplexData + _GD_DoLincom _GD_DoMultiply _GD_DoDivide _GD_DoWindow _GD_DoMplex + gd_getdata64) src/putdata.c (_GD_MplexOutData gd_putdata64) src/flimits.c + (_GD_GetEOF _GD_GetBOF gd_bof64) src/common.c (_GD_LinterpData + _GD_LincomData) src/add.c (gd_add_raw) src/spf.c (_GD_GetSPF gd_spf) + src/mod.c (_GD_SPFConvert) src/mod.c (gd_alter_entry) src/index.c + (gd_framenum_subset64) bindings/python/pyentry.c (gdpy_entry_setspf) + bindings/python/pydirfile.c (gdpy_dirfile_getdata) bindings/cxx/rawentry.cpp + (RawEntry::RawEntry RawEntry::SetSamplesPerFrame) + bindings/cxx/getdata/rawentry.h (SamplesPerFrame) bindings/perl/GetData.xs + bindings/perl/typemap bindings/perl/simple_funcs.pl bindings/f77/fgetdata.c + (GDADRW GDALRW) util/dirfile2ascii.c: gd_spf_t -> unsigned int. + * src/flush.c (_GD_WriteConst) src/mod.c (_GD_AlterScalar): Add missing + integer types. + + * src/parse.c (_GD_ParseMplex): Make count_max optional. + * src/getdata.c (_GD_DoMplex) src/add.c (_GD_Add): Handle count_max == 0. + + * src/getdata.h.in: Mark GD_FLOAT and GD_DOUBLE as deprecated. + + * src/encoding.c (_GD_FiniRawIO): Handle short writes and IO errors. + + * src/getdata.c (_GD_DoMplex): use D->lookback to determine how far to + search backwards. Also, read data in chunks of size GD_BUFFER_SIZE. + * src/open.c (_GD_Open): Initialise D->lookback. + * src/globals.c (gd_mplex_lookback): Added. + * bindings/cxx/dirfile.cpp (Dirfile::MplexLookback) + bindings/perl/simple_funcs.xsin (mplex_lookback) bindings/f77/getdata.f90.in + (fgd_mplex_lookback) bindings/f77/fgetdata.c (GDMXLB) bindings/idl/getdata.c + (gdidl_mplex_lookback): Added. + + * src/parse.c (gd_strtok): Renamed from gd_tokenise to avoid regional + spelling variations. Bindings renamed accordingly (except for the F77 + bindings). + + * bindings/python/pygetdata.c: Add GD_E_EXISTS exception. + + * bindings/python/pydirfile.h: Add mplex_lookback and verbose_prefix to + gdpy_constant_t. + * bindings/python/pydirfile.c (gdpy_dirfile_delete): Delete verbose_prefix. + * bindings/python/pydirfile.c (gdpy_dirfile_create): Initialise + mplex_lookback and verbose_prefix. + * bindings/python/pydirfile.c (gdpy_dirfile_verbose_prefix): Deleted. + * bindings/python/pydirfile.c (gdpy_dirfile_getverboseprefix + gdpy_dirfile_setverboseprefix gdpy_dirfile_getmplexlookback + gdpy_dirfile_setmplexlookback): Added. + + * bindings/Makefile.am: add src/gd_config.h to the prerequisites of + make_parameters. + + * src/flush.c (_GD_FlushFragment): Write /ENCODING for zzip and zzslim. + + * src/meta_list.c: Merged into src/field_list.c + * src/nmeta.c: Merged into src/nfields.c + + * src/add.c (_GD_InvalidEntype): Added. + * src/internal.h: Add en... [truncated message content] |
From: <ket...@us...> - 2015-03-12 02:03:32
|
Revision: 944 http://sourceforge.net/p/getdata/code/944 Author: ketiltrout Date: 2015-03-12 02:03:24 +0000 (Thu, 12 Mar 2015) Log Message: ----------- Fix initial padding when df->output_adjust_set is true. Modified Paths: -------------- trunk/defile/configure.ac trunk/defile/lib/libdefile.c Modified: trunk/defile/configure.ac =================================================================== --- trunk/defile/configure.ac 2015-02-20 19:41:37 UTC (rev 943) +++ trunk/defile/configure.ac 2015-03-12 02:03:24 UTC (rev 944) @@ -22,7 +22,7 @@ m4_define(defile_major, 0) m4_define(defile_minor, 0) m4_define(defile_revision, 0) -m4_define(defile_extra, [a]) +m4_define(defile_extra, [b]) m4_define(defile_version, defile_major.defile_minor.defile_revision[]defile_extra) Modified: trunk/defile/lib/libdefile.c =================================================================== --- trunk/defile/lib/libdefile.c 2015-02-20 19:41:37 UTC (rev 943) +++ trunk/defile/lib/libdefile.c 2015-03-12 02:03:24 UTC (rev 944) @@ -1250,7 +1250,7 @@ if (!append && output_offset) { gd_alter_frameoffset64(df->D, output_offset, GD_ALL_FRAGMENTS, 0); output_offset = offset; - } else if (append) + } else if (append || df->output_adjust_set) offset = output_offset; if (offset > 0) { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ket...@us...> - 2015-02-20 19:41:39
|
Revision: 943 http://sourceforge.net/p/getdata/code/943 Author: ketiltrout Date: 2015-02-20 19:41:37 +0000 (Fri, 20 Feb 2015) Log Message: ----------- Version number Modified Paths: -------------- trunk/defile/configure.ac Modified: trunk/defile/configure.ac =================================================================== --- trunk/defile/configure.ac 2015-02-20 19:39:20 UTC (rev 942) +++ trunk/defile/configure.ac 2015-02-20 19:41:37 UTC (rev 943) @@ -22,7 +22,7 @@ m4_define(defile_major, 0) m4_define(defile_minor, 0) m4_define(defile_revision, 0) -m4_define(defile_extra, []) +m4_define(defile_extra, [a]) m4_define(defile_version, defile_major.defile_minor.defile_revision[]defile_extra) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ket...@us...> - 2015-02-20 19:39:23
|
Revision: 942 http://sourceforge.net/p/getdata/code/942 Author: ketiltrout Date: 2015-02-20 19:39:20 +0000 (Fri, 20 Feb 2015) Log Message: ----------- Disentangle appending vs. resuming Modified Paths: -------------- trunk/defile/bin/defile.c trunk/defile/bin/net.c trunk/defile/doc/defile.1.in trunk/defile/lib/defile.h trunk/defile/lib/internal.h trunk/defile/lib/libdefile.c Modified: trunk/defile/bin/defile.c =================================================================== --- trunk/defile/bin/defile.c 2015-02-20 16:50:05 UTC (rev 941) +++ trunk/defile/bin/defile.c 2015-02-20 19:39:20 UTC (rev 942) @@ -945,7 +945,7 @@ DF_WOPT_NOLISTEN, DF_WOPT_RCMD, DF_WOPT_RDEBUG, DF_WOPT_NORDEBUG, DF_WOPT_SRVRATE, DF_WOPT_DAEMON, DF_WOPT_CURFILE, DF_WOPT_SYMLINK, DF_WOPT_NOSYMLINK, DF_WOPT_NOCURFILE, DF_WOPT_CLOBBERONE, DF_WOPT_FOFFS, - DF_WOPT_NFRAMES, DF_WOPT_ALLFRAMES + DF_WOPT_NFRAMES, DF_WOPT_ALLFRAMES, DF_WOPT_RESUME }; static int DF_OutputOpt(struct df_defile *df, struct df_rc_config *config, @@ -1072,6 +1072,7 @@ SETMODE(APPEND, DF_MODE_APPEND); + SETMODE(RESUME, DF_MODE_APPEND | DF_MODE_RESUME); CLRMODE(NOAPPEND, DF_MODE_APPEND); SETULONG(BHEAD, bufhead); @@ -1097,7 +1098,7 @@ SETLINT(QUIET, quiet, 1); SETLINT(VERBOSE, quiet, 0); - SETULLONG(SKIP, offset); + SETULLONG(SKIP, skip); SETMODE(ASYNC, DF_MODE_ASYNC); CLRMODE(SYNC, DF_MODE_ASYNC); @@ -1251,11 +1252,10 @@ if (df->rateout == 2) putchar('\n'); if (df->nframes_in > 0) - printf("R:[%llu of %llu] W:[%llu] %.*f %cHz \r", nr + df->offset, - df->nframes_in, nw + df->offset, + printf("R:[%llu of %llu] W:[%llu] %.*f %cHz \r", nr, df->nframes_in, nw, (drate >= 100) ? 1 : (drate >= 10) ? 2 : 3, drate, si); else - printf("R:[%llu] W:[%llu] %.*f %cHz \r", nr + df->offset, nw + df->offset, + printf("R:[%llu] W:[%llu] %.*f %cHz \r", nr, nw, (drate >= 100) ? 1 : (drate >= 10) ? 2 : 3, drate, si); fflush(stdout); @@ -1303,7 +1303,7 @@ return 0; } -static int DF_CreateOutput(int clobber, int append) +static int DF_CreateOutput(int clobber, int append, int resume) { int new = 1; @@ -1329,10 +1329,11 @@ return 1; } } else if (gd_error(df->D) == GD_E_OK) { + /* dirfile doesn't exist. Turn off append mode */ pthread_mutex_lock(&df_config_mx); - df->mode_flags &= ~DF_MODE_APPEND; + df->mode_flags &= ~(DF_MODE_APPEND | DF_MODE_RESUME); pthread_mutex_unlock(&df_config_mx); - append = 0; + append = resume = 0; } if (gd_error(df->D)) { @@ -1347,17 +1348,20 @@ gd_flags(df->D, GD_VERBOSE, 0); gd_verbose_prefix(df->D, "defile: "); + /* append mode offset */ if (append) { long long nf = gd_nframes(df->D); pthread_mutex_lock(&df_config_mx); - if (df->offset < nf) - df->offset = nf; + df->output_offset = nf; pthread_mutex_unlock(&df_config_mx); - } + if (resume) + df->skip = nf; + } else + df->output_offset = 0; if (!(df->mode_flags & DF_MODE_SERVER)) - df_dprintf(DF_PRN_INFO, "%s %s\n", append ? "appending to" : - new ? "created" : "overwriting", df->dirfile); + df_dprintf(DF_PRN_INFO, "%s %s\n", resume ? "resuming" : + append ? "appending to" : new ? "created" : "overwriting", df->dirfile); return 0; @@ -1600,8 +1604,11 @@ if (!df->dirfile) return 1; - if (DF_CreateOutput(df->clobber, df_mode() & DF_MODE_APPEND)) + if (DF_CreateOutput(df->clobber, df_mode() & DF_MODE_APPEND, + df_mode() & DF_MODE_RESUME)) + { return 1; + } if (df->output_state == DF_ST_ABORT) return 1; @@ -1922,7 +1929,7 @@ df_rpc_push_uint8(&data, DF_RPC_FRAME); /* frame number */ - df_rpc_push_uint64(&data, df->nwrote + df->offset); + df_rpc_push_uint64(&data, df->nwrote + df->skip); /* buffer some frames */ if (nf_out + df->srv_base > df->buflen) @@ -2424,12 +2431,6 @@ return h; } -static void DF_ShutdownLTDL(void) -{ - lt_dlclose(df->inhandle); - lt_dlexit(); -} - void df_discard_metadata(int reset) { int i; @@ -2502,6 +2503,9 @@ { DF_WOPT_NOAPPEND, DF_OPT_NO_ARG, 'A', "no-append", "NoAppend", NULL, "don't append data (default)" }, + { DF_WOPT_RESUME, DF_OPT_NO_ARG, 'r', "resume", "Resume", NULL, + "resume an interrupted conversion (implies --append)" + }, { DF_WOPT_ASYNC, DF_OPT_NO_ARG, 'a', "async", "Asynchronous", NULL, "turn on asynchronous mode" }, @@ -2691,7 +2695,6 @@ /* initialise LTDL and register its cleanup function */ lt_dlinit(); - atexit(DF_ShutdownLTDL); /* initialise and parse command line */ df->ofl = df_string_subset(DF_SUBSET_FULL); Modified: trunk/defile/bin/net.c =================================================================== --- trunk/defile/bin/net.c 2015-02-20 16:50:05 UTC (rev 941) +++ trunk/defile/bin/net.c 2015-02-20 19:39:20 UTC (rev 942) @@ -1172,8 +1172,7 @@ + ((df->mode_flags & DF_MODE_RDEBUG_O) ? sizeof(" -d o") : 0) + ((df->mode_flags & DF_MODE_RDEBUG_T) ? sizeof(" -d t") : 0) + (!(df->mode_flags & DF_MODE_FOLLOW) ? sizeof(" +f") : 0) - + ((df->offset > 0) ? sizeof(" -s ") + 1 - + (int)(log(df->offset) * M_LOG10E) : 0) + + ((df->skip > 0) ? sizeof(" -s ") + 1 + (int)(log(df->skip) * M_LOG10E) : 0) + (df->type ? sizeof(" -t ") + strlen(df->type) : 0) ; if (df->iargc > 1) { @@ -1197,8 +1196,8 @@ wordlen += sprintf(cmd[nwords] + wordlen, " -d t"); if (!(df->mode_flags & DF_MODE_FOLLOW)) wordlen += sprintf(cmd[nwords] + wordlen, " +f"); - if (df->offset) - wordlen += sprintf(cmd[nwords] + wordlen, " -s %lli", df->offset); + if (df->skip) + wordlen += sprintf(cmd[nwords] + wordlen, " -s %lli", df->skip); if (df->type) wordlen += sprintf(cmd[nwords] + wordlen, " -t %s", df->type); Modified: trunk/defile/doc/defile.1.in =================================================================== --- trunk/defile/doc/defile.1.in 2015-02-20 16:50:05 UTC (rev 941) +++ trunk/defile/doc/defile.1.in 2015-02-20 19:39:20 UTC (rev 942) @@ -180,9 +180,9 @@ has not been specified, and the input plugin provides a new name, a new output dirfile will be created in the directory specified with .BR \-\-directory , -if possible. If you want to clobber a pre-existing, explicitly named output -dirfile, but not allow the input plugin to cause defile to overwrite its output, -use +if possible. If you want to overwrite a pre-existing dirfile when defile first +starts up, but not allow the input plugin to subsequently cause defile to +overwrite its newly-created output, use .BR \-\-clobber\-once . .TP @@ -302,29 +302,16 @@ .BR \-s ", " \-\-skip=\fINUM Skip the first .I NUM -frames of the input; equivalently: request the input start with the frame -numbered +frames of the input. Even when this option is specified, defile may start on a +later frame, if the first frame available in the input is greater than .IR NUM . -Even when this option is specified, defile may start on a later frame, if the -first frame available in the input is greater than -.IR NUM . Only the last .B \-\-skip specified is honoured. The default skip is zero (i.e. start with the first -frame). - -Using -.B \-\-append -(q.v.) to append to a pre-existing output dirfile has the effect of specifying -an implicit -.B \-\-skip -with -.I NUM -equal to the number of frames currently in the output dirfile. A -.B \-\-skip -which specifies a smaller number is ignored, but this option can be used to -advance the starting frame number further (leaving a hole in the outpu -dirfile). (Directive: +available frame). In some cases, this option also affect the starting frame +number of the output dirfile; see +.B \-\-offset\-adjust +below. (Directive: .BR Skip ) .TP @@ -365,7 +352,10 @@ adds 100 to the default frame offset. The default is, effectively, "+0" (i.e., no adjustment). In .I Append Mode\fR, -an adjustment is relative to the current end of the output dirfile. (Directive: +an adjustment is relative to the current end of the output dirfile, and is +unaffected by a +.B \-\-skip +option. (Directive: .BR OutputAdjust ) .TP @@ -423,16 +413,23 @@ .TP .BR \-A ", " \-\-append .I Append Mode on\fR: -if the output dirfile already exists, append data to it. Unless a -.B \-\-skip -follows to set the starting frame number, this option will ask the input to -start on the frame following the last frame in the existing output, making it -suitable for resuming an interrupted conversion. +if the output dirfile already exists, append data to it. See also +.BR \-\-resume , +which provides a convenient way to use append mode to resume an interrupted +conversion. To adjust the frame number where the appended data start, see +.BR \-\-offset\-adjust . .TP .BR +A ", " \-\-no\-append .I Append Mode off\fR: don't append data to an existing dirfile. This is the default mode. .TP +.BR \-r ", " \-\-resume +Equivalent to +.B \-\-append \-\-skip=\fIN +where +.I N +is the current number of frames in the output dirfile. +.TP .BR \-d ", " \-\-debug [\fB=\fIWHAT\fR] .I Debug Mode on\fR: write extra debugging messages to standard error. This is primarily useful Modified: trunk/defile/lib/defile.h =================================================================== --- trunk/defile/lib/defile.h 2015-02-20 16:50:05 UTC (rev 941) +++ trunk/defile/lib/defile.h 2015-02-20 19:39:20 UTC (rev 942) @@ -84,12 +84,12 @@ }; /* mode flags */ -#define DF_MODE_APPEND 0x001 /* append mode */ -#define DF_MODE_ASYNC 0x002 /* asynchronous writing */ -#define DF_MODE_DEBUG 0x004 /* input plugin debug mode */ -#define DF_MODE_FOLLOW 0x008 /* follow mode */ -#define DF_MODE_SERVER 0x010 /* server mode */ -/* 0x020-0x800 are reserved */ +#define DF_MODE_APPEND 0x0001 /* append mode */ +#define DF_MODE_ASYNC 0x0002 /* asynchronous writing */ +#define DF_MODE_DEBUG 0x0004 /* input plugin debug mode */ +#define DF_MODE_FOLLOW 0x0008 /* follow mode */ +#define DF_MODE_SERVER 0x0010 /* server mode */ +/* 0x020-0x1000 are reserved */ /* defile configuration */ Modified: trunk/defile/lib/internal.h =================================================================== --- trunk/defile/lib/internal.h 2015-02-20 16:50:05 UTC (rev 941) +++ trunk/defile/lib/internal.h 2015-02-20 19:39:20 UTC (rev 942) @@ -125,13 +125,14 @@ /* private mode flags */ #define DF_MODE_DEBUG_I DF_MODE_DEBUG /* alias for consistency */ -#define DF_MODE_DEBUG_O 0x020 /* output debug */ -#define DF_MODE_DEBUG_T 0x040 /* transfer debug */ -#define DF_MODE_RDEBUG_I 0x080 /* remote input debug */ -#define DF_MODE_RDEBUG_O 0x100 /* remote output debug */ -#define DF_MODE_RDEBUG_T 0x200 /* transfer debug */ -#define DF_MODE_CLOBBER 0x400 /* overwrite the output dirfile */ -#define DF_MODE_NO_DAEMON 0x800 /* don't daemonise servers */ +#define DF_MODE_DEBUG_O 0x0020 /* output debug */ +#define DF_MODE_DEBUG_T 0x0040 /* transfer debug */ +#define DF_MODE_RDEBUG_I 0x0080 /* remote input debug */ +#define DF_MODE_RDEBUG_O 0x0100 /* remote output debug */ +#define DF_MODE_RDEBUG_T 0x0200 /* transfer debug */ +#define DF_MODE_CLOBBER 0x0400 /* overwrite the output dirfile */ +#define DF_MODE_NO_DAEMON 0x0800 /* don't daemonise servers */ +#define DF_MODE_RESUME 0x1000 /* resume mode */ /* long long integer conversion */ #ifndef HAVE_STRTOULL @@ -295,9 +296,10 @@ /* operations */ struct df_config config; - long long offset; - long long input_offset; - long long output_adjust; + long long output_offset; /* EOF for append mode, zero otherwise */ + long long skip; /* specified by --skip or --resume */ + long long input_offset; /* specified by input plugin */ + long long output_adjust; /* specified by --output-adjust */ long long nframes_out; int output_adjust_set; unsigned long buflen; Modified: trunk/defile/lib/libdefile.c =================================================================== --- trunk/defile/lib/libdefile.c 2015-02-20 16:50:05 UTC (rev 941) +++ trunk/defile/lib/libdefile.c 2015-02-20 19:39:20 UTC (rev 942) @@ -1229,9 +1229,13 @@ /* handle a starting offset */ pthread_mutex_lock(&df_config_mx); - if (df->input_offset > df->offset) - df->offset = df->input_offset; - offset = df->offset; + if (df->output_offset > 0) + offset = df->output_offset; + else { + if (df->input_offset > df->skip) + df->skip = df->input_offset; + offset = df->skip; + } pthread_mutex_unlock(&df_config_mx); /* output frameoffset */ @@ -1477,7 +1481,7 @@ /* restart */ pthread_mutex_lock(&df_config_mx); - df->input_offset = df->offset = 0; + df->input_offset = df->skip = 0; df->mode_flags &= ~DF_MODE_APPEND; if (df->clobber > 1) /* --clobber-once */ df->clobber = 0; @@ -2113,7 +2117,7 @@ DF_CHECK_SEQUENCE2(DF_ST_BUILD, DF_ST_RUN); pthread_mutex_lock(&df_config_mx); - offset = (df->input_offset > df->offset) ? df->input_offset : df->offset; + offset = (df->input_offset > df->skip) ? df->input_offset : df->skip; pthread_mutex_unlock(&df_config_mx); return offset; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ket...@us...> - 2015-02-20 16:50:10
|
Revision: 941 http://sourceforge.net/p/getdata/code/941 Author: ketiltrout Date: 2015-02-20 16:50:05 +0000 (Fri, 20 Feb 2015) Log Message: ----------- Output adjust in append mode Modified Paths: -------------- trunk/defile/doc/defile.1.in trunk/defile/lib/libdefile.c Modified: trunk/defile/doc/defile.1.in =================================================================== --- trunk/defile/doc/defile.1.in 2015-01-12 10:09:51 UTC (rev 940) +++ trunk/defile/doc/defile.1.in 2015-02-20 16:50:05 UTC (rev 941) @@ -328,7 +328,7 @@ .BR Skip ) .TP -.BR \-O ", " \-\-offset-adjust=\fIADJUST +.BR \-O ", " \-\-offset\-adjust=\fIADJUST When not in .I Append Mode\fR, defile will, by default, set the frame offset of the output dirfile to the @@ -365,7 +365,7 @@ adds 100 to the default frame offset. The default is, effectively, "+0" (i.e., no adjustment). In .I Append Mode\fR, -this option is ignored. (Directive: +an adjustment is relative to the current end of the output dirfile. (Directive: .BR OutputAdjust ) .TP Modified: trunk/defile/lib/libdefile.c =================================================================== --- trunk/defile/lib/libdefile.c 2015-01-12 10:09:51 UTC (rev 940) +++ trunk/defile/lib/libdefile.c 2015-02-20 16:50:05 UTC (rev 941) @@ -1134,7 +1134,7 @@ { int i, missing = 0, set_reference = 1; const int append = df_mode() & DF_MODE_APPEND; - long long offset; + long long offset, output_offset; DF_CHECK_SEQUENCE(DF_ST_BUILD); @@ -1235,18 +1235,20 @@ pthread_mutex_unlock(&df_config_mx); /* output frameoffset */ - if (!append) { - long long output_offset = offset; - if (df->output_adjust_set) - output_offset = df->output_adjust; - else if (output_offset < -df->output_adjust) /* underflow */ - output_offset = 0; - else - output_offset += df->output_adjust; - if (output_offset) - gd_alter_frameoffset64(df->D, output_offset, GD_ALL_FRAGMENTS, 0); - } + output_offset = offset; + if (df->output_adjust_set) + output_offset = df->output_adjust; + else if (output_offset < -df->output_adjust) /* underflow */ + output_offset = 0; + else + output_offset += df->output_adjust; + if (!append && output_offset) { + gd_alter_frameoffset64(df->D, output_offset, GD_ALL_FRAGMENTS, 0); + output_offset = offset; + } else if (append) + offset = output_offset; + if (offset > 0) { /* seek to the start frame */ for (i = 0; i < df->nraw; ++i) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ket...@us...> - 2015-01-12 10:10:05
|
Revision: 940 http://sourceforge.net/p/getdata/code/940 Author: ketiltrout Date: 2015-01-12 10:09:51 +0000 (Mon, 12 Jan 2015) Log Message: ----------- Namespaces. Includes some refactoring of field code handling in the parser. Modified Paths: -------------- trunk/getdata/ChangeLog trunk/getdata/NEWS trunk/getdata/configure.ac trunk/getdata/man/gd_array_len.3 trunk/getdata/man/gd_bof.3 trunk/getdata/man/gd_entry.3 trunk/getdata/man/gd_entry_type.3 trunk/getdata/man/gd_eof.3 trunk/getdata/man/gd_flush.3 trunk/getdata/man/gd_framenum_subset.3 trunk/getdata/man/gd_get_carray_slice.3 trunk/getdata/man/gd_getdata.3 trunk/getdata/man/gd_linterp_tablename.3 trunk/getdata/man/gd_native_type.3 trunk/getdata/man/gd_put_carray_slice.3 trunk/getdata/man/gd_put_string.3 trunk/getdata/man/gd_putdata.3 trunk/getdata/man/gd_raw_filename.3 trunk/getdata/man/gd_seek.3 trunk/getdata/man/gd_spf.3 trunk/getdata/man/gd_tell.3 trunk/getdata/man/gd_validate.3 trunk/getdata/src/add.c trunk/getdata/src/common.c trunk/getdata/src/constant.c trunk/getdata/src/entry.c trunk/getdata/src/errors.c trunk/getdata/src/flimits.c trunk/getdata/src/flush.c trunk/getdata/src/fpos.c trunk/getdata/src/fragment.c trunk/getdata/src/getdata.c trunk/getdata/src/getdata.h.in trunk/getdata/src/include.c trunk/getdata/src/internal.h trunk/getdata/src/mod.c trunk/getdata/src/move.c trunk/getdata/src/name.c trunk/getdata/src/open.c trunk/getdata/src/parse.c trunk/getdata/src/putdata.c trunk/getdata/src/spf.c trunk/getdata/test/Makefile.am trunk/getdata/test/del_alias.c trunk/getdata/test/get_polynom_cmpin.c trunk/getdata/test/put_repr.c trunk/getdata/test/repr_bad.c trunk/getdata/test/version_9_strict.c Added Paths: ----------- trunk/getdata/test/add_dot10.c trunk/getdata/test/add_dot5.c trunk/getdata/test/add_dot6.c trunk/getdata/test/add_ns.c trunk/getdata/test/add_ns_frag.c trunk/getdata/test/add_ns_frag2.c trunk/getdata/test/include_ns.c trunk/getdata/test/name_dot10.c trunk/getdata/test/name_dot5.c trunk/getdata/test/name_dot5r.c trunk/getdata/test/name_dot9.c trunk/getdata/test/name_ns.c trunk/getdata/test/name_ns2.c trunk/getdata/test/name_ns2r.c trunk/getdata/test/name_nsdot.c trunk/getdata/test/parse_include_ns.c trunk/getdata/test/parse_include_ns2.c trunk/getdata/test/parse_include_nsabs.c trunk/getdata/test/parse_include_nsinh.c trunk/getdata/test/parse_include_nspop.c trunk/getdata/test/parse_include_nsrabs.c trunk/getdata/test/parse_include_nsrainh.c trunk/getdata/test/parse_include_nsrinh.c trunk/getdata/test/parse_include_nsroot.c trunk/getdata/test/parse_ns.c trunk/getdata/test/parse_ns_abs.c trunk/getdata/test/parse_ns_dot.c trunk/getdata/test/parse_ns_dotdot.c trunk/getdata/test/parse_ns_dotdotns.c trunk/getdata/test/parse_ns_dotns.c trunk/getdata/test/parse_ns_ndotdots.c trunk/getdata/test/parse_ns_ndots.c trunk/getdata/test/parse_ns_nsdot.c trunk/getdata/test/parse_ns_nsdotdot.c trunk/getdata/test/parse_ns_par.c trunk/getdata/test/parse_ns_sub.c trunk/getdata/test/parse_nsf.c trunk/getdata/test/parse_nsf_abs.c trunk/getdata/test/parse_nsf_alias.c trunk/getdata/test/parse_nsf_dot.c trunk/getdata/test/parse_nsf_hide.c trunk/getdata/test/parse_nsf_index.c trunk/getdata/test/parse_nsf_meta.c trunk/getdata/test/parse_nsf_meta2.c trunk/getdata/test/parse_nsf_par.c trunk/getdata/test/parse_nsf_ref.c trunk/getdata/test/parse_nsf_refabs.c trunk/getdata/test/parse_nsf_refrel.c trunk/getdata/test/parse_nsf_root.c trunk/getdata/test/parse_nsf_rpar.c trunk/getdata/test/parse_nsf_sub.c Removed Paths: ------------- trunk/getdata/test/add_dot.c trunk/getdata/test/name_dot.c Property Changed: ---------------- trunk/getdata/test/ Modified: trunk/getdata/ChangeLog =================================================================== --- trunk/getdata/ChangeLog 2015-01-12 07:35:20 UTC (rev 939) +++ trunk/getdata/ChangeLog 2015-01-12 10:09:51 UTC (rev 940) @@ -1,9 +1,64 @@ -2014-10-16 D. V. Wiebe <g et...@ke...> svn:929 +2014-12-31 D. V. Wiebe <ge...@ke...> svn:??? + * src/getdata.c (_GD_DoField) src/putdata.c (_GD_DoFieldOut): Fix recursion + counting on error. + + * src/getdata.h.in src/errors.c: Merge GD_E_BAD_REPR into GD_E_BAD_CODE. + + * src/common.c (_GD_FindEntry): Added. + * src/entry.c (gd_raw_filename gd_entry, gd_entry_type gd_linterp_tablename) + src/flush.c (_GD_SyncOrClose) src/spf.c (_GD_GetSPF) src/constant.c + (gd_put_carray_slice gd_put_carray) src/putdata.c (gd_putdata64) + src/flimits.c (gd_eof64 gd_bof64) src/fpos.c (gd_tell64 gd_seek64): + Use _GD_FindEntry instead of _GD_FindFieldAndRepr. + * src/constant.c (_GD_PutCarraySlice) src/putdata.c (_GD_DoFieldOut): + Remove repr parameter. + * src/putdata.c (_GD_DoLinterpOut _GD_DoLincomOut _GD_DoBitOut + _GD_DoPhaseOut _GD_DoRecipOut _GD_DoPolynomOut _GD_DoMplexOut + _GD_DoConstOut): Return error if input field has a repr. + + * src/parse.c: Use struct parser_state to pass around parser data rather + than passing bits and pieces individually. + * src/internal.h: Define struct parser_state. + * src/parse.c (_GD_SimpleParserInit): Added. + * src/open.c (_GD_Open): Initialise the parser proto-state; set or clear + GD_PEDANTIC in the dirfile flags after parsing completes. + + * src/mod.c (gd_alter_spec gd_malter_spec) src/parse.c (gd_strtok) src/add.c + (_GD_FixName gd_madd_spec gd_add_spec): Call _GD_SimpleParserInit(). + + * src/parse.c (_GD_ParseFieldSpec): Speed up strcmps. + + * src/common.c (_GD_GrabDir): Let callers (i.e. _GD_Include) skip + canonicalisation, if they've already done it. + + * src/internal.h: Add ns and nsl to gd_fragment_t. + * src/name.c (_GD_MungeCode): Remove subfield munging (the P parameter). + Replace err_ok with flags parameter. Don't malloc the buffer it the caller + doesn't want it. + * src/name.c (_GD_ValidateField): Replaced affix parameter with flags. + * src/parse.c (_GD_SubfieldCode _GD_CodeFromFrag _GD_InputCode _GD_SetField): + Added. + + * src/name.c (_GD_MungeCode _GD_CheckCodeAffixes _GD_ValidateField) + src/include.c (_GD_SetFieldAffixes _GD_Include): Handle + namespaces. + * src/parse.c (_GD_ParseNamespace): Added. + * src/parse.c (_GD_ParseDirective): Handle "/NAMESPACE" + + * src/name,c (_GD_MakeNewCode): Handle errors better. + + * src/getdata.h.in: Declare GD_EN_DOTTED. + * src/name.c (_GD_PerformRename) src/add.c (_GD_Add): Set or clear GD_EN_DOTTED. + + * src/fragment.c (_GD_SubFragmentList _GD_CheckChangeNamespace + gd_fragment_namespace): Added. + +2014-10-16 D. V. Wiebe <ge...@ke...> svn:929 * src/open.c (_GD_CreateDirfile): Force GD_RDWR when creating a dirfile. * test/creat_rdonly.c: Updated. * test/creat_rdonly_exists.c: Added. -2014-10-16 D. V. Wiebe <g et...@ke...> svn:928 +2014-10-16 D. V. Wiebe <ge...@ke...> svn:928 * bindings/make_parameters.c: Replace numeric type literals with CPP macros for legibility. @@ -22,7 +77,7 @@ * bindings/python/pygetdata.c: Define deprecated Exceptions as aliases for current ones. -2014-07-30 D. V. Wiebe <g et...@ke...> svn:921 +2014-07-30 D. V. Wiebe <ge...@ke...> svn:921 * src/del.c (gd_delete_alias): Deleted. * src/del.c (gd_delete): Don't dereference the field code. @@ -41,11 +96,11 @@ test 225. -2014-07-25 D. V. Wiebe <g et...@ke...> svn:915 +2014-07-25 D. V. Wiebe <ge...@ke...> svn:915 * Makefile.am: Auotmake version bumped to 1.13. * configure.ac: Autoconf version bumped to 2.65. -2014-07-25 D. V. Wiebe <g et...@ke...> svn:914 +2014-07-25 D. V. Wiebe <ge...@ke...> svn:914 * src/parse.c (_GD_TokToNum): Added. * src/parse.c (_GD_SetScalar): Call _GD_TokToNum to parse numbers. @@ -69,14 +124,14 @@ * test/add_amb_code7.c test/alter_entry_scalar_amb.c test/flush_amb_code.c test/parse_scalar1.c test/parse_scalar2.c test/parse_scalar_repr.c: Added. -2014-07-17 D. V. Wiebe <g et...@ke...> svn:912 +2014-07-17 D. V. Wiebe <ge...@ke...> svn:912 * bindings/f77/fgetdata.c (_GDF_SetDirfile): Don't abort on error, just return -1 (optionally discarding the dirfile first). * bindings/f77/fgetdata.c (_GDF_Callback GDCOPN): Handle running out of DUNs. -2014-07-17 D. V. Wiebe <g et...@ke...> svn:911 +2014-07-17 D. V. Wiebe <ge...@ke...> svn:911 * src/getdata.c (_GD_DoSindir): Renamed from gd_getstrdata64 and internalised. Do return_type checks, and handle num_samp = 0. * src/getdata.c (gd_getstrdata): Deleted. @@ -374,7 +429,8 @@ * bindings/f77/fgetdata.c (GDASCA): Handle error in gd_entry call. - * bindings/php/getdata.c (gdphp_data_to_array): Add missing break. + * bindings/php/getdata.c (gdphp_data_to_array) src/types.c (_GD_ConvertType): + Add missing break. * bindings/php/getdata.c (gd_error_string): Handle error in gd_error_string call. @@ -384,7 +440,7 @@ * bindings/python/pydirfile.c (gdpy_dirfile_getentry gdpy_dirfile_getstring gdpy_dirfile_putcarray gdpy_dirfile_putdata) src/include.c (_GD_Include) src/name.c (_GD_PrepareRename) src/putdata.c (_GD_DoMplexOut) src/sie.c - (_GD_SampIndWrite) src/types.c (_GD_ConvertType): Deallocate buffers on error. + (_GD_SampIndWrite): Deallocate buffers on error. * bindings/python/pyentry.c (gdpy_entry_seta): Set a[i] if the pyobj is complex. @@ -437,7 +493,7 @@ 2013-12-12 D. V. Wiebe <ge...@ke...> svn:874 * src/endian.c (_GD_CheckByteSex): Added. * src/endian.c (_GD_FileSwapBytes): Added (replacing macro in internal.h). - * src/endian.c (_GD_FixEndianness): Call _GD_CheckByteSex() to check wether + * src/endian.c (_GD_FixEndianness): Call _GD_CheckByteSex() to check whether correction is needed. * src/getdata.c (_GD_DoRaw) src/move.c (_GD_MogrifyFile) src/putdata.c @@ -474,8 +530,8 @@ * test/cvlist_meta0.c: Check error. - * bindings/cxx/ getdata/entry.h (Entry::CompScal): Allow non-zero for - RECIP, too. + * bindings/cxx/getdata/entry.h (Entry::CompScal): Allow non-zero for + RECIP, too. 2013-12-06 D. V. Wiebe <ge...@ke...> svn:867 * test/add_dot.c test/alter_clincom.c test/alter_const_r2c.c test/sie_sync.c Modified: trunk/getdata/NEWS =================================================================== --- trunk/getdata/NEWS 2015-01-12 07:35:20 UTC (rev 939) +++ trunk/getdata/NEWS 2015-01-12 10:09:51 UTC (rev 940) @@ -35,6 +35,13 @@ GD_RDONLY and GD_CREAT in open calls would result in an access mode (GD_E_ACCMODE) error if the dirfile didn't already exist. + * Many functions which used to silently ignore representation suffixes in + field codes passed to them no longer do that. Most of these will report + an error (GD_E_BAD_CODE) if passed a representation suffix. The affected + functions are: gd_bof, gd_entry, gd_entry_type, gd_eof, gd_flush, + gd_linterp_tablename, gd_put_carray, gd_put_carray_slice, gd_putdata, + gd_raw_close, gd_raw_filename, gd_seek, gd_spf, gd_sync, gd_tell. + * BUG FIX: In addition to the addition of write support mentioned above, a number of problems with reading LZMA files has been fixed, which should result in fewer segmentaion faults. Modified: trunk/getdata/configure.ac =================================================================== --- trunk/getdata/configure.ac 2015-01-12 07:35:20 UTC (rev 939) +++ trunk/getdata/configure.ac 2015-01-12 10:09:51 UTC (rev 940) @@ -80,14 +80,14 @@ AC_CANONICAL_HOST dnl Legacy API -AC_ARG_ENABLE(legacy-api, AS_HELP_STRING([--disable-legacy-api], - [don't include the legacy API wrapper in the library]), dnl' +AC_ARG_ENABLE(legacy-api, AS_HELP_STRING([--enaable-legacy-api], + [include the legacy API wrapper in the library]), dnl' [ case "${enableval}" in no) include_legacy_api="no" ;; *) include_legacy_api="yes" ;; esac - ], [ include_legacy_api="yes" ]) + ], [ include_legacy_api="no" ]) AC_MSG_CHECKING([whether to include the legacy API]) AC_MSG_RESULT([$include_legacy_api]) Modified: trunk/getdata/man/gd_array_len.3 =================================================================== --- trunk/getdata/man/gd_array_len.3 2015-01-12 07:35:20 UTC (rev 939) +++ trunk/getdata/man/gd_array_len.3 2015-01-12 10:09:51 UTC (rev 940) @@ -69,11 +69,6 @@ The field specified by .I field_code was not of one of the field types listed above. -.TP -.B GD_E_BAD_REPR -The representation suffix specified in -.I field_code -was not recognised. .PP The dirfile error may be retrieved by calling .BR gd_error (3). Modified: trunk/getdata/man/gd_bof.3 =================================================================== --- trunk/getdata/man/gd_bof.3 2015-01-12 07:35:20 UTC (rev 939) +++ trunk/getdata/man/gd_bof.3 2015-01-12 10:09:51 UTC (rev 940) @@ -78,11 +78,6 @@ .B GD_E_BAD_DIRFILE The supplied dirfile was invalid. .TP -.B GD_E_BAD_REPR -The representation suffix specified in -.IR field_code , -or in one of its inputs was not recognised. -.TP .B GD_E_DIMENSION A scalar field was found where a vector field was expected in the definition of Modified: trunk/getdata/man/gd_entry.3 =================================================================== --- trunk/getdata/man/gd_entry.3 2015-01-12 07:35:20 UTC (rev 939) +++ trunk/getdata/man/gd_entry.3 2015-01-12 10:09:51 UTC (rev 940) @@ -93,11 +93,6 @@ .TP .B GD_E_BAD_DIRFILE The supplied dirfile was invalid. -.TP -.B GD_E_BAD_REPR -The representation suffix specified in -.I field_code -was not recognised. .PP The dirfile error may be retrieved by calling .BR gd_error (3). Modified: trunk/getdata/man/gd_entry_type.3 =================================================================== --- trunk/getdata/man/gd_entry_type.3 2015-01-12 07:35:20 UTC (rev 939) +++ trunk/getdata/man/gd_entry_type.3 2015-01-12 10:09:51 UTC (rev 940) @@ -80,11 +80,6 @@ The field specified by .I field_code was not found in the database. -.TP -.B GD_E_BAD_REPR -The representation suffix specified in -.I field_code -was not recognised. .PP The dirfile error may be retrieved by calling .BR gd_error (3). Modified: trunk/getdata/man/gd_eof.3 =================================================================== --- trunk/getdata/man/gd_eof.3 2015-01-12 07:35:20 UTC (rev 939) +++ trunk/getdata/man/gd_eof.3 2015-01-12 10:09:51 UTC (rev 940) @@ -89,11 +89,6 @@ .I INDEX as one of its inputs. .TP -.B GD_E_BAD_REPR -The representation suffix specified in -.IR field_code , -or in one of its inputs was not recognised. -.TP .B GD_E_DIMENSION A scalar field was found where a vector field was expected in the definition of Modified: trunk/getdata/man/gd_flush.3 =================================================================== --- trunk/getdata/man/gd_flush.3 2015-01-12 07:35:20 UTC (rev 939) +++ trunk/getdata/man/gd_flush.3 2015-01-12 10:09:51 UTC (rev 940) @@ -85,11 +85,6 @@ .B GD_E_BAD_DIRFILE The supplied dirfile was invalid. .TP -.B GD_E_BAD_REPR -The representation suffix specified in -.I field_code -was not recognised. -.TP .B GD_E_IO An I/O error occurred while trying to write modified data or metadata to disk. .TP Modified: trunk/getdata/man/gd_framenum_subset.3 =================================================================== --- trunk/getdata/man/gd_framenum_subset.3 2015-01-12 07:35:20 UTC (rev 939) +++ trunk/getdata/man/gd_framenum_subset.3 2015-01-12 10:09:51 UTC (rev 940) @@ -110,11 +110,6 @@ .B GD_E_BAD_DIRFILE The supplied dirfile was invalid. .TP -.B GD_E_BAD_REPR -The representation suffix specified in -.IR field_code , -or in one of its input fields, was not recognised. -.TP .B GD_E_BAD_SCALAR A scalar field used in the definition of the field was not found, or was not of scalar type. Modified: trunk/getdata/man/gd_get_carray_slice.3 =================================================================== --- trunk/getdata/man/gd_get_carray_slice.3 2015-01-12 07:35:20 UTC (rev 939) +++ trunk/getdata/man/gd_get_carray_slice.3 2015-01-12 10:09:51 UTC (rev 940) @@ -183,11 +183,6 @@ .BR gd_get_string (3) instead. .TP -.B GD_E_BAD_REPR -The representation suffix specified in -.IR field_code , -or in one of the field codes it uses for input, was invalid. -.TP .B GD_E_BAD_TYPE An invalid .I return_type Modified: trunk/getdata/man/gd_getdata.3 =================================================================== --- trunk/getdata/man/gd_getdata.3 2015-01-12 07:35:20 UTC (rev 939) +++ trunk/getdata/man/gd_getdata.3 2015-01-12 10:09:51 UTC (rev 940) @@ -269,11 +269,6 @@ .I dirfile was supplied. .TP -.B GD_E_BAD_REPR -The representation suffix specified in -.IR field_code , -or in one of the field codes it uses for input, was invalid. -.TP .B GD_E_BAD_SCALAR A scalar field used in the definition of the field was not found, or was not of scalar type. Modified: trunk/getdata/man/gd_linterp_tablename.3 =================================================================== --- trunk/getdata/man/gd_linterp_tablename.3 2015-01-12 07:35:20 UTC (rev 939) +++ trunk/getdata/man/gd_linterp_tablename.3 2015-01-12 10:09:51 UTC (rev 940) @@ -76,11 +76,6 @@ was not a .B LINTERP field. -.TP -.B GD_E_BAD_REPR -The representation suffix specified in -.I field_code -was not recognised. .PP The dirfile error may be retrieved by calling .BR gd_error (3). Modified: trunk/getdata/man/gd_native_type.3 =================================================================== --- trunk/getdata/man/gd_native_type.3 2015-01-12 07:35:20 UTC (rev 939) +++ trunk/getdata/man/gd_native_type.3 2015-01-12 10:09:51 UTC (rev 940) @@ -125,11 +125,6 @@ .B GD_E_BAD_DIRFILE The supplied dirfile was invalid. .TP -.B GD_E_BAD_REPR -The representation suffix specified in -.IR field_code , -or in one of its input fields, was not recognised. -.TP .B GD_E_DIMENSION A scalar field was found where a vector field was expected. .TP Modified: trunk/getdata/man/gd_put_carray_slice.3 =================================================================== --- trunk/getdata/man/gd_put_carray_slice.3 2015-01-12 07:35:20 UTC (rev 939) +++ trunk/getdata/man/gd_put_carray_slice.3 2015-01-12 10:09:51 UTC (rev 940) @@ -178,10 +178,6 @@ .BR gd_put_string (3) instead. .TP -.B GD_E_BAD_REPR -A representation suffix in the field definition was invalid, or an attempt was -made to write to a representation, instead of the underlying field. -.TP .B GD_E_BAD_TYPE An invalid .I data_type Modified: trunk/getdata/man/gd_put_string.3 =================================================================== --- trunk/getdata/man/gd_put_string.3 2015-01-12 07:35:20 UTC (rev 939) +++ trunk/getdata/man/gd_put_string.3 2015-01-12 10:09:51 UTC (rev 940) @@ -80,11 +80,6 @@ .BR gd_put_constant (3) instead. .TP -.B GD_E_BAD_REPR -The representation suffix specified in -.I field_code -was not recognised. -.TP .B GD_E_BAD_TYPE An invalid .I data_type Modified: trunk/getdata/man/gd_putdata.3 =================================================================== --- trunk/getdata/man/gd_putdata.3 2015-01-12 07:35:20 UTC (rev 939) +++ trunk/getdata/man/gd_putdata.3 2015-01-12 10:09:51 UTC (rev 940) @@ -182,12 +182,6 @@ how to partition the input data. Alternately, the caller may have attempted to write to the implicit INDEX field, which is not possible. .TP -.B GD_E_BAD_REPR -The representation suffix specified in -.I field_code -was not recognised, or an attempt was made to write to a field representation, -instead of the underlying field. -.TP .B GD_E_BAD_TYPE An invalid .I data_type Modified: trunk/getdata/man/gd_raw_filename.3 =================================================================== --- trunk/getdata/man/gd_raw_filename.3 2015-01-12 07:35:20 UTC (rev 939) +++ trunk/getdata/man/gd_raw_filename.3 2015-01-12 10:09:51 UTC (rev 940) @@ -67,11 +67,6 @@ .B RAW field. .TP -.B GD_E_BAD_REPR -The representation suffix specified in -.I field_code -was not recognised. -.TP .B GD_E_UNKNOWN_ENCODING The encoding scheme of the specified field could not be determined or was not understood by GetData. Modified: trunk/getdata/man/gd_seek.3 =================================================================== --- trunk/getdata/man/gd_seek.3 2015-01-12 07:35:20 UTC (rev 939) +++ trunk/getdata/man/gd_seek.3 2015-01-12 10:09:51 UTC (rev 940) @@ -159,11 +159,6 @@ .I INDEX field, which has no end-of-field marker. .TP -.B GD_E_BAD_REPR -The representation suffix specified in -.IR field_code , -or in one of the field codes it uses for input, was invalid. -.TP .B GD_E_DIMENSION The specified field or one of its inputs wasn't of vector type. .TP Modified: trunk/getdata/man/gd_spf.3 =================================================================== --- trunk/getdata/man/gd_spf.3 2015-01-12 07:35:20 UTC (rev 939) +++ trunk/getdata/man/gd_spf.3 2015-01-12 10:09:51 UTC (rev 940) @@ -59,11 +59,6 @@ .B GD_E_BAD_DIRFILE The supplied dirfile was invalid. .TP -.B GD_E_BAD_REPR -The representation suffix specified in -.I field_code -was not recognised. -.TP .B GD_E_DIMENSION A scalar field was found where a vector field was expected. .TP Modified: trunk/getdata/man/gd_tell.3 =================================================================== --- trunk/getdata/man/gd_tell.3 2015-01-12 07:35:20 UTC (rev 939) +++ trunk/getdata/man/gd_tell.3 2015-01-12 10:09:51 UTC (rev 940) @@ -60,11 +60,6 @@ .B GD_E_BAD_DIRFILE The supplied dirfile was invalid. .TP -.B GD_E_BAD_REPR -The representation suffix specified in -.IR field_code , -or in one of the field codes it uses for input, was invalid. -.TP .B GD_E_DIMENSION The specified field or one of its inputs wasn't of vector type. .TP Modified: trunk/getdata/man/gd_validate.3 =================================================================== --- trunk/getdata/man/gd_validate.3 2015-01-12 07:35:20 UTC (rev 939) +++ trunk/getdata/man/gd_validate.3 2015-01-12 10:09:51 UTC (rev 940) @@ -56,11 +56,6 @@ .B GD_E_BAD_DIRFILE The supplied dirfile was invalid. .TP -.B GD_E_BAD_REPR -The representation suffix specified in -.I field_code -was not recognised. -.TP .B GD_E_BAD_SCALAR A non-literal scalar used in the definition of the field or one of its inputs was not found, or was not a Modified: trunk/getdata/src/add.c =================================================================== --- trunk/getdata/src/add.c 2015-01-12 07:35:20 UTC (rev 939) +++ trunk/getdata/src/add.c 2015-01-12 10:09:51 UTC (rev 940) @@ -43,11 +43,12 @@ { gd_entry_t *P; char *ptr; + struct parser_state p; dtrace("%p, %p, \"%s\", %i, %p", D, buffer, name, frag, offset); /* Check prefix and suffix */ - if (_GD_CheckCodeAffixes(D, NULL, name, frag, 1)) { + if (_GD_CheckCodeAffixes(D, name, frag, 1)) { dreturn("%p", NULL); return NULL; } @@ -60,7 +61,8 @@ return NULL; } - P = _GD_CheckParent(D, &ptr, -1, 0); + _GD_SimpleParserInit(D, NULL, &p); + P = _GD_CheckParent(D, &p, &ptr, -1); if (D->error) { free(*buffer); @@ -109,11 +111,8 @@ E->scalar[i] = NULL; } else { /* check for correct affixes */ - if (_GD_CheckCodeAffixes(D, NULL, entry->scalar[i], entry->fragment_index, - 1)) - { + if (_GD_CheckCodeAffixes(D, entry->scalar[i], entry->fragment_index, 1)) break; - } /* when using early Standards, reject ambiguous field codes */ if (entry->scalar_ind[i] == -1 && !(D->flags & GD_NOSTANDARD) && @@ -267,7 +266,9 @@ added field this way */ /* Check */ - if (_GD_ValidateField(E->field + offset, D->standards, 1, 0, &is_dot)) { + if (_GD_ValidateField(E->field + offset, D->standards, 1, GD_VF_CODE, + &is_dot)) + { _GD_SetError(D, GD_E_BAD_CODE, GD_E_CODE_INVALID, NULL, 0, entry->field); _GD_FreeE(D, E, 1); dreturn("%p", NULL); @@ -300,10 +301,10 @@ E->e->u.raw.file[0].idata = E->e->u.raw.file[1].idata = -1; E->e->u.raw.file[0].subenc = GD_ENC_UNKNOWN; - E->e->u.raw.filebase = _GD_MungeCode(D, NULL, + E->e->u.raw.filebase = _GD_MungeCode(D, NULL, 0, D->fragment[entry->fragment_index].prefix, D->fragment[entry->fragment_index].suffix, NULL, NULL, E->field, - &offset, 0); + NULL, NULL, GD_MC_RQ_PARTS); if (D->error) break; @@ -331,8 +332,7 @@ E->EN(lincom,n_fields), NULL); for (i = 0; i < E->EN(lincom,n_fields); ++i) - _GD_CheckCodeAffixes(D, NULL, entry->in_fields[i], - entry->fragment_index, 1); + _GD_CheckCodeAffixes(D, entry->in_fields[i], entry->fragment_index, 1); if (D->error) break; @@ -369,8 +369,8 @@ case GD_LINTERP_ENTRY: E->e->u.linterp.table_len = -1; - if (_GD_CheckCodeAffixes(D, NULL, entry->in_fields[0], - entry->fragment_index, 1)) + if (_GD_CheckCodeAffixes(D, entry->in_fields[0], entry->fragment_index, + 1)) { break; } @@ -382,9 +382,9 @@ case GD_DIVIDE_ENTRY: case GD_INDIR_ENTRY: case GD_SINDIR_ENTRY: - if (_GD_CheckCodeAffixes(D, NULL, entry->in_fields[0], - entry->fragment_index, 1) || _GD_CheckCodeAffixes(D, NULL, - entry->in_fields[1], entry->fragment_index, 1)) + if (_GD_CheckCodeAffixes(D, entry->in_fields[0], entry->fragment_index, + 1) || _GD_CheckCodeAffixes(D, entry->in_fields[1], + entry->fragment_index, 1)) { break; } @@ -393,8 +393,8 @@ E->in_fields[1] = _GD_Strdup(D, entry->in_fields[1]); break; case GD_RECIP_ENTRY: - if (_GD_CheckCodeAffixes(D, NULL, entry->in_fields[0], - entry->fragment_index, 1)) + if (_GD_CheckCodeAffixes(D, entry->in_fields[0], entry->fragment_index, + 1)) { break; } @@ -418,8 +418,8 @@ E->EN(bit,numbits) = entry->EN(bit,numbits); E->EN(bit,bitnum) = entry->EN(bit,bitnum); - if (_GD_CheckCodeAffixes(D, NULL, entry->in_fields[0], - entry->fragment_index, 1)) + if (_GD_CheckCodeAffixes(D, entry->in_fields[0], entry->fragment_index, + 1)) { break; } @@ -441,8 +441,8 @@ case GD_PHASE_ENTRY: E->EN(phase,shift) = entry->EN(phase,shift); - if (_GD_CheckCodeAffixes(D, NULL, entry->in_fields[0], - entry->fragment_index, 1)) + if (_GD_CheckCodeAffixes(D, entry->in_fields[0], entry->fragment_index, + 1)) { break; } @@ -455,9 +455,9 @@ E->EN(window,windop) = entry->EN(window,windop); E->EN(window,threshold) = entry->EN(window,threshold); - if (_GD_CheckCodeAffixes(D, NULL, entry->in_fields[0], - entry->fragment_index, 1) || _GD_CheckCodeAffixes(D, NULL, - entry->in_fields[1], entry->fragment_index, 1)) + if (_GD_CheckCodeAffixes(D, entry->in_fields[0], entry->fragment_index, + 1) || _GD_CheckCodeAffixes(D, entry->in_fields[1], + entry->fragment_index, 1)) { break; } @@ -474,9 +474,9 @@ E->EN(mplex,count_val) = entry->EN(mplex,count_val); E->EN(mplex,period) = entry->EN(mplex,period); - if (_GD_CheckCodeAffixes(D, NULL, entry->in_fields[0], - entry->fragment_index, 1) || _GD_CheckCodeAffixes(D, NULL, - entry->in_fields[1], entry->fragment_index, 1)) + if (_GD_CheckCodeAffixes(D, entry->in_fields[0], entry->fragment_index, + 1) || _GD_CheckCodeAffixes(D, entry->in_fields[1], + entry->fragment_index, 1)) { break; } @@ -545,10 +545,8 @@ _GD_SetError(D, GD_E_BAD_ENTRY, GD_E_ENTRY_POLYORD, NULL, E->EN(polynom,poly_ord), NULL); } else { - _GD_CheckCodeAffixes(D, NULL, entry->in_fields[0], - entry->fragment_index, 1); - _GD_CheckCodeAffixes(D, NULL, entry->in_fields[1], - entry->fragment_index, 1); + _GD_CheckCodeAffixes(D, entry->in_fields[0], entry->fragment_index, 1); + _GD_CheckCodeAffixes(D, entry->in_fields[1], entry->fragment_index, 1); } if (D->error) @@ -607,6 +605,7 @@ dreturn("%p", NULL); return NULL; } + E->flags |= GD_EN_DOTTED; D->dot_list = (gd_entry_t **)new_list; } @@ -680,6 +679,7 @@ int n_cols; int me; gd_entry_t* E = NULL; + struct parser_state p; dtrace("%p, \"%s\", \"%s\"", D, line, parent); @@ -718,13 +718,14 @@ } /* start parsing */ - n_cols = _GD_Tokenise(D, line, &outstring, &tok_pos, MAX_IN_COLS, in_cols, - "dirfile_madd_spec()", 0, D->standards, D->flags & GD_NOSTANDARD); + _GD_SimpleParserInit(D, "gd_madd_spec()", &p); + n_cols = _GD_Tokenise(D, &p, line, &outstring, &tok_pos, MAX_IN_COLS, + in_cols); /* Directive parsing is skipped -- The Field Spec parser will add the field */ if (!D->error) - _GD_ParseFieldSpec(D, n_cols, in_cols, E, "dirfile_madd_spec()", 0, me, - D->standards, 1, GD_PEDANTIC, 1, &outstring, tok_pos); + _GD_ParseFieldSpec(D, &p, n_cols, in_cols, E, me, 1, 1, &outstring, + tok_pos); free(outstring); @@ -749,6 +750,7 @@ const char *tok_pos = NULL; char *in_cols[MAX_IN_COLS]; int n_cols; + struct parser_state p; dtrace("%p, \"%s\", %i", D, line, fragment_index); @@ -782,14 +784,23 @@ _GD_ClearError(D); + if (~D->flags & GD_HAVE_VERSION) + _GD_FindVersion(D); + + if (D->av) { + p.standards = D->standards; + p.pedantic = 1; + } + /* start parsing */ - n_cols = _GD_Tokenise(D, line, &outstring, &tok_pos, MAX_IN_COLS, in_cols, - "dirfile_add_spec()", 0, D->standards, D->flags & GD_NOSTANDARD); + _GD_SimpleParserInit(D, "gd_add_spec()", &p); + n_cols = _GD_Tokenise(D, &p, line, &outstring, &tok_pos, MAX_IN_COLS, + in_cols); /* Directive parsing is skipped -- The Field Spec parser will add the field */ if (!D->error) - _GD_ParseFieldSpec(D, n_cols, in_cols, NULL, "dirfile_add_spec()", 0, - fragment_index, D->standards, 1, GD_PEDANTIC, 1, &outstring, tok_pos); + _GD_ParseFieldSpec(D, &p, n_cols, in_cols, NULL, fragment_index, 1, 1, + &outstring, tok_pos); free(outstring); @@ -1425,7 +1436,7 @@ /* Actually store the constant, now */ if (entry) - _GD_DoFieldOut(D, entry, 0, 0, 1, data_type, value); + _GD_DoFieldOut(D, entry, 0, 1, data_type, value); dreturn("%i", D->error ? -1 : 0); return D->error ? -1 : 0; @@ -1458,7 +1469,7 @@ /* Actually store the carray, now */ if (entry) - _GD_DoFieldOut(D, entry, 0, 0, array_len, data_type, values); + _GD_DoFieldOut(D, entry, 0, array_len, data_type, values); dreturn("%i", D->error ? -1 : 0); return D->error ? -1 : 0; @@ -2120,7 +2131,7 @@ /* Actually store the constant, now */ if (entry) - _GD_DoFieldOut(D, entry, 0, 0, 1, data_type, value); + _GD_DoFieldOut(D, entry, 0, 1, data_type, value); dreturn("%i", D->error ? -1 : 0); return D->error ? -1 : 0; @@ -2153,7 +2164,7 @@ /* Actually store the carray, now */ if (entry) - _GD_DoFieldOut(D, entry, 0, 0, array_len, data_type, values); + _GD_DoFieldOut(D, entry, 0, array_len, data_type, values); dreturn("%i", D->error ? -1 : 0); return D->error ? -1 : 0; @@ -2282,12 +2293,14 @@ } /* check alias name */ - if (_GD_ValidateField(munged_code + offset, D->standards, 1, 0, NULL)) + if (_GD_ValidateField(munged_code + offset, D->standards, 1, GD_VF_CODE, + NULL)) + { _GD_SetError(D, GD_E_BAD_CODE, GD_E_CODE_INVALID, NULL, 0, field_code); - else if (_GD_FindField(D, munged_code, D->entry, D->n_entries, 1, &u)) + } else if (_GD_FindField(D, munged_code, D->entry, D->n_entries, 1, &u)) _GD_SetError(D, GD_E_DUPLICATE, 0, NULL, 0, munged_code); else - _GD_CheckCodeAffixes(D, NULL, target, fragment_index, 1); /* check target */ + _GD_CheckCodeAffixes(D, target, fragment_index, 1); /* check target */ if (D->error) goto add_alias_error; Modified: trunk/getdata/src/common.c =================================================================== --- trunk/getdata/src/common.c 2015-01-12 07:35:20 UTC (rev 939) +++ trunk/getdata/src/common.c 2015-01-12 10:09:51 UTC (rev 940) @@ -218,7 +218,7 @@ dtrace("%p, %p, %p", D, E, e); e->u.linterp.table_dirfd = _GD_GrabDir(D, - D->fragment[E->fragment_index].dirfd, E->EN(linterp,table)); + D->fragment[E->fragment_index].dirfd, E->EN(linterp,table), 0); temp_buffer = _GD_Strdup(D, E->EN(linterp,table)); if (temp_buffer == NULL) { @@ -840,8 +840,8 @@ break; default: if (err) - _GD_SetError(D, GD_E_BAD_REPR, GD_E_REPR_UNKNOWN, NULL, 0, - field_code_in + field_code_len - 1); + _GD_SetError(D, GD_E_BAD_CODE, GD_E_CODE_REPR, NULL, 0, + field_code_in); dreturn("%i", 0); return 0; } @@ -896,6 +896,28 @@ return 0; } +/* Find an entry without a representation */ +gd_entry_t *_GD_FindEntry(DIRFILE *restrict D, const char *restrict field_code, + unsigned int *restrict index, int set, int err) +{ + gd_entry_t *E = NULL; + + dtrace("%p, \"%s\", %p, %i, %i", D, field_code, index, set, err); + + if (D->n_dot > 0) + E = _GD_FindField(D, field_code, D->dot_list, D->n_dot, 1, NULL); + + if (E == NULL || index != NULL) + E = _GD_FindField(D, field_code, D->entry, D->n_entries, 1, index); + + if (E == NULL && set) + if (err) + _GD_SetError(D, GD_E_BAD_CODE, GD_E_CODE_MISSING, NULL, 0, field_code); + + dreturn("%p", E); + return E; +} + /* Find the entry and the representation */ gd_entry_t *_GD_FindFieldAndRepr(DIRFILE *restrict D, const char *restrict field_code_in, char **restrict field_code, @@ -1306,15 +1328,18 @@ return filepath; } -int _GD_GrabDir(DIRFILE *D, int dirfd, const char *name) +int _GD_GrabDir(DIRFILE *D, int dirfd, const char *name, int canonical) { unsigned int i; char *path, *dir = NULL; void *ptr; - dtrace("%p, %i, \"%s\"", D, dirfd, name); + dtrace("%p, %i, \"%s\", %i", D, dirfd, name, canonical); - path = _GD_MakeFullPath(D, dirfd, name, 1); + if (canonical) + path = _GD_Strdup(D, name); + else + path = _GD_MakeFullPath(D, dirfd, name, 1); if (path == NULL) { dreturn("%i", -1); Modified: trunk/getdata/src/constant.c =================================================================== --- trunk/getdata/src/constant.c 2015-01-12 07:35:20 UTC (rev 939) +++ trunk/getdata/src/constant.c 2015-01-12 10:09:51 UTC (rev 940) @@ -170,14 +170,13 @@ return gd_array_len(D, field_code); } -static int _GD_PutCarraySlice(DIRFILE* D, gd_entry_t *E, int repr, - unsigned long first, size_t n, gd_type_t data_type, const void *data_in) - gd_nothrow +static int _GD_PutCarraySlice(DIRFILE* D, gd_entry_t *E, unsigned long first, + size_t n, gd_type_t data_type, const void *data_in) gd_nothrow { int i; - dtrace("%p, %p, %i, %lu, %" PRNsize_t ", 0x%X, %p", D, E, repr, first, n, - data_type, data_in); + dtrace("%p, %p, %lu, %" PRNsize_t ", 0x%X, %p", D, E, first, n, data_type, + data_in); if ((D->flags & GD_ACCMODE) != GD_RDWR) { _GD_SetError(D, GD_E_ACCMODE, 0, NULL, 0, NULL); @@ -190,7 +189,7 @@ { _GD_SetError(D, GD_E_BOUNDS, 0, NULL, 0, NULL); } else - _GD_DoFieldOut(D, E, repr, first, n, data_type, data_in); + _GD_DoFieldOut(D, E, first, n, data_type, data_in); if (D->error) { dreturn("%i", -1); @@ -210,15 +209,13 @@ return 0; } -int gd_put_carray_slice(DIRFILE* D, const char *field_code_in, - unsigned long first, size_t n, gd_type_t data_type, const void *data_in) -gd_nothrow +int gd_put_carray_slice(DIRFILE* D, const char *field_code, unsigned long first, + size_t n, gd_type_t data_type, const void *data_in) gd_nothrow { gd_entry_t *entry; - int repr, r = -1; - char* field_code; + int r = -1; - dtrace("%p, \"%s\", %lu, %" PRNsize_t ", 0x%X, %p", D, field_code_in, first, + dtrace("%p, \"%s\", %lu, %" PRNsize_t ", 0x%X, %p", D, field_code, first, n, data_type, data_in); if (D->flags & GD_INVALID) { @@ -229,10 +226,10 @@ _GD_ClearError(D); - entry = _GD_FindFieldAndRepr(D, field_code_in, &field_code, &repr, NULL, 1, - 1); + entry = _GD_FindField(D, field_code, D->entry, D->n_entries, 1, NULL); - if (D->error) { + if (entry == NULL) { + _GD_SetError(D, GD_E_BAD_CODE, GD_E_CODE_MISSING, NULL, 0, field_code); dreturn("%i", -1); return -1; } @@ -242,23 +239,19 @@ { _GD_SetError(D, GD_E_BAD_FIELD_TYPE, GD_E_FIELD_BAD, NULL, 0, field_code); } else - r = _GD_PutCarraySlice(D, entry, repr, first, n, data_type, data_in); + r = _GD_PutCarraySlice(D, entry, first, n, data_type, data_in); - if (field_code != field_code_in) - free(field_code); - dreturn("%i", r); return r; } -int gd_put_carray(DIRFILE* D, const char *field_code_in, gd_type_t data_type, +int gd_put_carray(DIRFILE* D, const char *field_code, gd_type_t data_type, const void *data_in) gd_nothrow { gd_entry_t *entry; - int repr, r = -1; - char* field_code; + int r = -1; - dtrace("%p, \"%s\", 0x%x, %p", D, field_code_in, data_type, data_in); + dtrace("%p, \"%s\", 0x%x, %p", D, field_code, data_type, data_in); if (D->flags & GD_INVALID) { _GD_SetError(D, GD_E_BAD_DIRFILE, 0, NULL, 0, NULL); @@ -268,10 +261,10 @@ _GD_ClearError(D); - entry = _GD_FindFieldAndRepr(D, field_code_in, &field_code, &repr, NULL, 1, - 1); + entry = _GD_FindField(D, field_code, D->entry, D->n_entries, 1, NULL); - if (D->error) { + if (entry == NULL) { + _GD_SetError(D, GD_E_BAD_CODE, GD_E_CODE_MISSING, NULL, 0, field_code); dreturn("%i", -1); return -1; } @@ -281,21 +274,18 @@ { _GD_SetError(D, GD_E_BAD_FIELD_TYPE, GD_E_FIELD_BAD, NULL, 0, field_code); } else - r = _GD_PutCarraySlice(D, entry, repr, 0, + r = _GD_PutCarraySlice(D, entry, 0, (entry->field_type == GD_CONST_ENTRY) ? 1 : entry->EN(scalar,array_len), data_type, data_in); - if (field_code != field_code_in) - free(field_code); - dreturn("%i", r); return r; } -int gd_put_constant(DIRFILE* D, const char *field_code_in, gd_type_t data_type, +int gd_put_constant(DIRFILE* D, const char *field_code, gd_type_t data_type, const void *data_in) gd_nothrow { - return gd_put_carray_slice(D, field_code_in, 0, 1, data_type, data_in); + return gd_put_carray_slice(D, field_code, 0, 1, data_type, data_in); } /* vim: ts=2 sw=2 et tw=80 Modified: trunk/getdata/src/entry.c =================================================================== --- trunk/getdata/src/entry.c 2015-01-12 07:35:20 UTC (rev 939) +++ trunk/getdata/src/entry.c 2015-01-12 10:09:51 UTC (rev 940) @@ -342,13 +342,12 @@ return !e; } -char* gd_raw_filename(DIRFILE* D, const char* field_code_in) gd_nothrow +char* gd_raw_filename(DIRFILE* D, const char* field_code) gd_nothrow { - int repr; - char *field_code, *filename; + char *filename; gd_entry_t *E; - dtrace("%p, \"%s\"", D, field_code_in); + dtrace("%p, \"%s\"", D, field_code); _GD_ClearError(D); @@ -359,7 +358,7 @@ } /* Check field */ - E = _GD_FindFieldAndRepr(D, field_code_in, &field_code, &repr, NULL, 1, 1); + E = _GD_FindEntry(D, field_code, NULL, 1, 1); if (D->error) { dreturn("%p", NULL); @@ -372,9 +371,6 @@ return NULL; } - if (field_code != field_code_in) - free(field_code); - if (E->e->u.raw.file[0].name == NULL) { /* ensure encoding sybtype is known */ if (!_GD_Supports(D, E, GD_EF_NAME)) { @@ -402,14 +398,12 @@ return filename; } -int gd_entry(DIRFILE* D, const char* field_code_in, gd_entry_t* entry) - gd_nothrow +int gd_entry(DIRFILE* D, const char* field_code, gd_entry_t* entry) gd_nothrow { - int i, repr; + int i; gd_entry_t *E; - char* field_code; - dtrace("%p, \"%s\", %p", D, field_code_in, entry); + dtrace("%p, \"%s\", %p", D, field_code, entry); if (D->flags & GD_INVALID) { _GD_SetError(D, GD_E_BAD_DIRFILE, 0, NULL, 0, NULL); @@ -419,17 +413,14 @@ _GD_ClearError(D); - /* get rid of the represenation, if any */ - E = _GD_FindFieldAndRepr(D, field_code_in, &field_code, &repr, NULL, 1, 1); + E = _GD_FindEntry(D, field_code, NULL, 1, 1); if (D->error) { + _GD_SetError(D, GD_E_BAD_CODE, GD_E_CODE_MISSING, NULL, 0, field_code); dreturn("%i", -1); return -1; } - if (field_code != field_code_in) - free(field_code); - /* Calculate the entry, if necessary */ if (!(E->flags & GD_EN_CALC)) _GD_CalculateEntry(D, E, 0); @@ -630,13 +621,11 @@ return n; } -gd_entype_t gd_entry_type(DIRFILE* D, const char* field_code_in) gd_nothrow +gd_entype_t gd_entry_type(DIRFILE* D, const char* field_code) gd_nothrow { gd_entry_t* E; - char* field_code; - int repr; - dtrace("%p, \"%s\"", D, field_code_in); + dtrace("%p, \"%s\"", D, field_code); if (D->flags & GD_INVALID) { _GD_SetError(D, GD_E_BAD_DIRFILE, 0, NULL, 0, NULL); @@ -646,17 +635,13 @@ _GD_ClearError(D); - /* get rid of the represenation, if any */ - E = _GD_FindFieldAndRepr(D, field_code_in, &field_code, &repr, NULL, 1, 1); + E = _GD_FindEntry(D, field_code, NULL, 1, 1); if (D->error) { dreturn("%i", GD_NO_ENTRY); return GD_NO_ENTRY; } - if (field_code != field_code_in) - free(field_code); - dreturn("%i", E->field_type); return E->field_type; } @@ -813,7 +798,6 @@ _GD_ClearError(D); - /* get rid of the representation, if any */ E = _GD_FindFieldAndRepr(D, field_code_in, &field_code, &repr, NULL, 1, 1); if (D->error) { @@ -876,13 +860,12 @@ return 0; } -char *gd_linterp_tablename(DIRFILE *D, const char *field_code_in) gd_nothrow +char *gd_linterp_tablename(DIRFILE *D, const char *field_code) gd_nothrow { - int repr; gd_entry_t *E; - char *field_code, *table; + char *table; - dtrace("%p, \"%s\"", D, field_code_in); + dtrace("%p, \"%s\"", D, field_code); if (D->flags & GD_INVALID) { _GD_SetError(D, GD_E_BAD_DIRFILE, 0, NULL, 0, NULL); @@ -892,19 +875,15 @@ _GD_ClearError(D); - E = _GD_FindFieldAndRepr(D, field_code_in, &field_code, &repr, NULL, 1, 1); + E = _GD_FindEntry(D, field_code, NULL, 1, 1); if (D->error) { dreturn("%p", NULL); return NULL; } - if (field_code != field_code_in) - free(field_code); - if (E->field_type != GD_LINTERP_ENTRY) { - _GD_SetError(D, GD_E_BAD_FIELD_TYPE, GD_E_FIELD_BAD, NULL, 0, - field_code_in); + _GD_SetError(D, GD_E_BAD_FIELD_TYPE, GD_E_FIELD_BAD, NULL, 0, field_code); dreturn("%p", NULL); return NULL; } Modified: trunk/getdata/src/errors.c =================================================================== --- trunk/getdata/src/errors.c 2015-01-12 07:35:20 UTC (rev 939) +++ trunk/getdata/src/errors.c 2015-01-12 10:09:51 UTC (rev 940) @@ -49,8 +49,7 @@ "Field name is reserved on line {3} of {2}", 0 }, { GD_E_FORMAT, GD_E_FORMAT_ENDIAN, "Unrecognised endianness on line {3} of {2}", 0 }, - { GD_E_FORMAT, GD_E_FORMAT_BAD_NAME, - "Bad field name on line {3} of {2}: {4}", 0 }, + { GD_E_FORMAT, GD_E_FORMAT_BAD_NAME, "Bad name on line {3} of {2}: {4}", 0 }, { GD_E_FORMAT, GD_E_FORMAT_UNTERM, "Unterminated token on line {3} of {2}", 0 }, { GD_E_FORMAT, GD_E_FORMAT_METARAW, @@ -79,8 +78,10 @@ { GD_E_CREAT, GD_E_CREAT_FORMAT, "Unable to create format file {2}: ", 1 }, /* GD_E_BAD_CODE: 4 = field code */ { GD_E_BAD_CODE, GD_E_CODE_MISSING, "Field not found: {4}", 0 }, - { GD_E_BAD_CODE, GD_E_CODE_INVALID, "Bad field name: {4}", 0 }, + { GD_E_BAD_CODE, GD_E_CODE_INVALID, "Bad field code: {4}", 0 }, { GD_E_BAD_CODE, GD_E_CODE_AMBIGUOUS, "Ambiguous field code: {4}", 0 }, + { GD_E_BAD_CODE, GD_E_CODE_INVALID_NS, "Bad namespace: {4}", 0 }, + { GD_E_BAD_CODE, GD_E_CODE_REPR, "Invalid representation suffix in: {4}", 0 }, /* GD_E_BAD_TYPE: 1 = data type */ { GD_E_BAD_TYPE, 0, "Bad data type: {1}", 0 }, /* GD_E_IO: 2 = filename; 3 = line; 4 = included file */ @@ -196,10 +197,6 @@ { GD_E_DOMAIN, GD_E_DOMAIN_EMPTY, "Improper domain: empty set", 0 }, { GD_E_DOMAIN, GD_E_DOMAIN_ANTITONIC, "Improper domain: not monotonic", 0 }, { GD_E_DOMAIN, GD_E_DOMAIN_MULTIPOS, "I/O position mismatch in inputs", 0 }, - /* GD_E_UNCLEAN_DB: 4 = repr */ - { GD_E_BAD_REPR, GD_E_REPR_UNKNOWN, "Unknown field representation: .{4}", 0 }, - { GD_E_BAD_REPR, GD_E_REPR_PUT, "Unable to write to field reprentation: .{4}", - 0 }, /* GD_E_BOUNDS: (nothing) */ { GD_E_BOUNDS, 0, "Array length out of bounds", 0 }, /* GD_E_LINE_TOO_LONG */ Modified: trunk/getdata/src/flimits.c =================================================================== --- trunk/getdata/src/flimits.c 2015-01-12 07:35:20 UTC (rev 939) +++ trunk/getdata/src/flimits.c 2015-01-12 10:09:51 UTC (rev 940) @@ -355,14 +355,13 @@ return ns; } -off64_t gd_eof64(DIRFILE* D, const char *field_code_in) +off64_t gd_eof64(DIRFILE* D, const char *field_code) { off64_t ns; gd_entry_t *entry; - int repr, is_index; - char* field_code; + int is_index; - dtrace("%p, \"%s\"", D, field_code_in); + dtrace("%p, \"%s\"", D, field_code); _GD_ClearError(D); @@ -372,8 +371,7 @@ return -1; } - entry = _GD_FindFieldAndRepr(D, field_code_in, &field_code, &repr, NULL, 1, - 1); + entry = _GD_FindEntry(D, field_code, NULL, 1, 1); if (D->error) { dreturn("%i", -1); @@ -385,9 +383,6 @@ if (is_index) _GD_SetError(D, GD_E_BAD_FIELD_TYPE, GD_E_FIELD_BAD, NULL, 0, field_code); - if (field_code != field_code_in) - free(field_code); - dreturn("%lli", (unsigned long long)ns); return ns; } @@ -549,16 +544,14 @@ return bof; } -off64_t gd_bof64(DIRFILE* D, const char *field_code_in) gd_nothrow +off64_t gd_bof64(DIRFILE* D, const char *field_code) gd_nothrow { off64_t bof; gd_entry_t *entry; - int repr; - char *field_code; unsigned int spf; long long ds; - dtrace("%p, \"%s\"", D, field_code_in); + dtrace("%p, \"%s\"", D, field_code); _GD_ClearError(D); @@ -568,8 +561,7 @@ return -1; } - entry = _GD_FindFieldAndRepr(D, field_code_in, &field_code, &repr, NULL, 1, - 1); + entry = _GD_FindEntry(D, field_code, NULL, 1, 1); if (D->error) { dreturn("%i", -1); @@ -581,9 +573,6 @@ if (bof != -1) bof = bof * spf + ds; - if (field_code != field_code_in) - free(field_code); - dreturn("%lli", (unsigned long long)bof); return bof; } Modified: trunk/getdata/src/flush.c =================================================================== --- trunk/getdata/src/flush.c 2015-01-12 07:35:20 UTC (rev 939) +++ trunk/getdata/src/flush.c 2015-01-12 10:09:51 UTC (rev 940) @@ -295,7 +295,6 @@ static ssize_t _GD_WriteFieldCode(DIRFILE *D, FILE *stream, int me, const char *code, int index, int permissive, int standards, unsigned flags) { - int dummy; ssize_t len; char *ptr; @@ -305,8 +304,8 @@ dtrace("%p, %p, %i, \"%s\", %i, %i, %i, 0x%X", D, stream, me, code, index, permissive, standards, flags); - ptr = _GD_MungeCode(D, NULL, D->fragment[me].prefix, D->fragment[me].suffix, - NULL, NULL, code, &dummy, 0); + ptr = _GD_MungeCode(D, NULL, 0, D->fragment[me].prefix, + D->fragment[me].suffix, NULL, NULL, code, NULL, NULL, GD_MC_RQ_PARTS); len = _GD_StringEscapeise(stream, ptr, 0, permissive, standards); @@ -817,7 +816,7 @@ char temp_file[] = "format_XXXXXX"; char* ptr; struct tm now; - int fd, dummy; + int fd; int pretty = 0; ssize_t max_len = 0; unsigned int u; @@ -1017,10 +1016,10 @@ if (permissive || D->standards >= 3) for (j = 0; j < D->n_fragment; ++j) if (D->fragment[j].parent == i) { - char *prefix = _GD_MungeCode(D, NULL, D->fragment[i].prefix, NULL, NULL, - NULL, D->fragment[j].prefix, &dummy, 0); - char *suffix = _GD_MungeCode(D, NULL, NULL, D->fragment[i].suffix, NULL, - NULL, D->fragment[j].suffix, &dummy, 0); + char *prefix = _GD_MungeCode(D, NULL, 0, D->fragment[i].prefix, NULL, + NULL, NULL, D->fragment[j].prefix, NULL, NULL, GD_MC_RQ_PARTS); + char *suffix = _GD_MungeCode(D, NULL, 0, NULL, D->fragment[i].suffix, + NULL, NULL, D->fragment[j].suffix, NULL, NULL, GD_MC_RQ_PARTS); if (fprintf(stream, "%sINCLUDE ", (D->standards >= 5) ? "/" : "") < 0 || _GD_StringEscapeise(stream, D->fragment[j].ename, 0, permissive, @@ -1185,8 +1184,6 @@ static int _GD_SyncOrClose(DIRFILE* D, const char* field_code, int syn, int clo) { unsigned int i; - int repr; - char *simple_field_code; gd_entry_t *E; dtrace("%p, \"%s\", %i, %i", D, field_code, syn, clo); @@ -1202,15 +1199,10 @@ if (D->entry[i]->field_type == GD_RAW_ENTRY) _GD_Flush(D, D->entry[i], syn, clo); } else { - /* discard representation */ - E = _GD_FindFieldAndRepr(D, field_code, &simple_field_code, &repr, NULL, 1, - 1); + E = _GD_FindEntry(D, field_code, NULL, 1, 1); if (!D->error) _GD_Flush(D, E, syn, clo); - - if (field_code != simple_field_code) - free(simple_field_code); } dreturn("%i", (D->error == GD_E_OK) ? 0 : -1); @@ -1411,7 +1403,10 @@ D->av &= GD_VERS_GE_6; break; case '.': - D->av &= GD_VERS_LE_5; + if (D->entry[i]->flags & GD_EN_DOTTED) + D->av &= GD_VERS_LE_5; + else + D->av &= GD_VERS_GE_10; break; case '&': case ';': Modified: trunk/getdata/src/fpos.c =================================================================== --- trunk/getdata/src/fpos.c 2015-01-12 07:35:20 UTC (rev 939) +++ trunk/getdata/src/fpos.c 2015-01-12 10:09:51 UTC (rev 940) @@ -123,14 +123,12 @@ /* Get the current I/O position of the given field */ -off64_t gd_tell64(DIRFILE *D, const char *field_code_in) gd_nothrow +off64_t gd_tell64(DIRFILE *D, const char *field_code) gd_nothrow { off64_t pos = -1; gd_entry_t* entry; - char* field_code; - int repr; - dtrace("%p, \"%s\"", D, field_code_in); + dtrace("%p, \"%s\"", D, field_code); if (D->flags & GD_INVALID) {/* don't crash */ _GD_SetError(D, GD_E_BAD_DIRFILE, 0, NULL, 0, NULL); @@ -140,8 +138,7 @@ _GD_ClearError(D); - entry = _GD_FindFieldAndRepr(D, field_code_in, &field_code, &repr, NULL, 1, - 1); + entry = _GD_FindEntry(D, field_code, NULL, 1, 1); if (D->error) { dreturn("%u", 0); @@ -153,9 +150,6 @@ else pos = _GD_GetFilePos(D, entry, -1); - if (field_code != field_code_in) - free(field_code); - dreturn("%lli", (long long)pos); return pos; } @@ -335,17 +329,16 @@ /* Set the I/O position of the given field */ -off64_t gd_seek64(DIRFILE *D, const char *field_code_in, off64_t frame_num, +off64_t gd_seek64(DIRFILE *D, const char *field_code, off64_t frame_num, off64_t sample_num, int whence) { unsigned int spf = 0; off64_t pos = 0; gd_entry_t* entry; - char* field_code; - int repr, is_index = 0; + int is_index = 0; unsigned int mode = (whence & GD_SEEK_WRITE) ? GD_FILE_WRITE : GD_FILE_READ; - dtrace("%p, \"%s\", %lli, %lli, 0x%X", D, field_code_in, (long long)frame_num, + dtrace("%p, \"%s\", %lli, %lli, 0x%X", D, field_code, (long long)frame_num, (long long)sample_num, whence); if (D->flags & GD_INVALID) {/* don't crash */ @@ -356,8 +349,7 @@ _GD_ClearError(D); - entry = _GD_FindFieldAndRepr(D, field_code_in, &field_code, &repr, NULL, 1, - 1); + entry = _GD_FindEntry(D, field_code, NULL, 1, 1); if (D->error) { dreturn("%i", -1); @@ -366,8 +358,6 @@ if (entry->field_type & GD_SCALAR_ENTRY_BIT) { _GD_SetError(D, GD_E_DIMENSION, GD_E_DIM_CALLER, NULL, 0, field_code); - if (field_code != field_code_in) - free(field_code); dreturn("%i", -1); return -1; } @@ -376,8 +366,6 @@ spf = _GD_GetSPF(D, entry); if (D->error) { - if (field_code != field_code_in) - free(field_code); dreturn("%i", -1); return -1; } @@ -400,9 +388,6 @@ if (!D->error) _GD_Seek(D, entry, sample_num + pos, mode); - if (field_code != field_code_in) - free(field_code); - if (D->error) pos = -1; else Modified: trunk/getdata/src/fragment.c =================================================================== --- trunk/getdata/src/fragment.c 2015-01-12 07:35:20 UTC (rev 939) +++ trunk/getdata/src/fragment.c 2015-01-12 10:09:51 UTC (rev 940) @@ -83,7 +83,7 @@ static char **_GD_CheckAffixes(DIRFILE *D, int i, const char *prefix, const char *suffix, char **codes, unsigned *n) { - int j, dummy; + int j; unsigned u, nn = *n; char **new_codes = codes, **ptr; @@ -109,10 +109,12 @@ /* Propagate changes downward */ for (j = 0; j < D->n_fragment; ++j) if (D->fragment[j].parent == i) { - char *subprefix = _GD_MungeCode(D, NULL, D->fragment[i].prefix, NULL, - prefix, NULL, D->fragment[j].prefix, &dummy, 1); - char *subsuffix = _GD_MungeCode(D, NULL, NULL, D->fragment[i].suffix, - NULL, suffix, D->fragment[j].suffix, &dummy, 1); + char *subprefix = _GD_MungeCode(D, NULL, 0, D->fragment[i].prefix, + NULL, prefix, NULL, D->fragment[j].prefix, NULL, NULL, + GD_MC_RQ_PARTS | GD_MC_ERROR_OK); + char *subsuffix = _GD_MungeCode(D, NULL, 0, NULL, + D->fragment[i].suffix, NULL, suffix, D->fragment[j].suffix, NULL, + NULL, GD_MC_RQ_PARTS | GD_MC_ERROR_OK); if (D->error) { free(subprefix); dreturn("%p (%i)", new_codes, *n); @@ -135,20 +137,19 @@ if (D->entry[u]->fragment_index == i && D->entry[u]->e->n_meta != -1) { ptr = _GD_Realloc(D, new_codes, sizeof(*ptr) * ++nn); if (ptr) { + char *nso; new_codes = ptr; /* remunge the code */ - new_codes[nn - 1] = _GD_MungeCode(D, NULL, D->fragment[i].prefix, - D->fragment[i].suffix, prefix, suffix, D->entry[u]->field, &dummy, - 0); + new_codes[nn - 1] = _GD_MungeCode(D, NULL, 0, D->fragment[i].prefix, + D->fragment[i].suffix, prefix, suffix, D->entry[u]->field, &nso, + NULL, GD_MC_RQ_PARTS); /* look for a duplicate and validate */ if (new_codes[nn - 1] && _GD_FindField(D, new_codes[nn - 1], D->entry, D->n_entries, 1, NULL)) { _GD_SetError(D, GD_E_DUPLICATE, 0, NULL, 0, new_codes[nn - 1]); - } else if (_GD_ValidateField(new_codes[nn - 1], D->standards, 1, 0, - NULL)) - { + } else if (_GD_ValidateField(nso, D->standards, 1, GD_VF_NAME, NULL)) { _GD_SetError(D, GD_E_BAD_CODE, GD_E_CODE_INVALID, NULL, 0, new_codes[nn - 1]); } @@ -409,3 +410,266 @@ dreturn("%i", changed); return changed; } + +/* create a list of indices to subfragments, including this one */ +static int _GD_SubFragmentList(DIRFILE *restrict D, int i, int **restrict ilist) +{ + int *list; + int j, n = 1; + + dtrace("%p, %i, %p", D, i, ilist); + + /* i is always in the list */ + list = _GD_Malloc(D, sizeof(*list)); + if (list == NULL) { + dreturn("%i", 0); + return 0; + } + list[0] = i; + + /* search for children */ + for (j = 0; j < D->n_fragment; ++j) + if (D->fragment[j].parent == i) { + int nsub, *sublist, *ptr; + + nsub = _GD_SubFragmentList(D, j, &sublist); + if (nsub == 0) { + free(list); + dreturn("%i", 0); + return 0; + } + + /* append to current list */ + ptr = _GD_Realloc(D, list, (nsub + n) * sizeof(*list)); + if (ptr == NULL) { + free(list); + dreturn("%i", 0); + return 0; + } + list = ptr; + memcpy(list + n, sublist, nsub * sizeof(*list)); + free(sublist); + + n += nsub; + } + + /* done */ + *ilist = list; + dreturn("%i", n); + return n; +} + +/* Check a fragment namespace change. Returns non-zero if the checks fail. */ +static int _GD_CheckChangeNamespace(DIRFILE *D, const char *newns, + size_t newnsl, size_t oldnsl, int i, char ***codes) +{ + int j, ni; + unsigned u; + int *ilist; + char **c = *codes; + const ssize_t dnsl = newnsl - oldnsl; + + dtrace("%p, \"%s\", %" PRNsize_t ", %" PRNsize_t ", %i, %p", D, newns, newnsl, + oldnsl, i, codes); + + if (newns == NULL) + newns = ""; + + /* find all affected fragments */ + ni = _GD_SubFragmentList(D, i, &ilist); + if (ni == 0) { /* malloc error */ + free(*codes); + dreturn("%i", 1); + return 1; + } + + /* find all affected entries and generate new field codes */ + for (u = 0; u < D->n_entries; ++u) { + /* check fragment list */ + int found = 0; + size_t l; + + for (j = 0; j < ni; ++j) + if (D->entry[u]->fragment_index == ilist[j]) { + found = 1; + break; + } + + if (!found) { + c[u] = NULL; + continue; + } + + /* compose the new name */ + l = strlen(D->entry[u]->field); + c[u] = _GD_Malloc(D, l + dnsl + 1); + if (c[u] == NULL) + goto CHECKS_FAILED; + + /* so much easier than dealing with affixes... */ + strncpy(c[u], newns, newnsl); + strcpy(c[u] + newnsl, D->entry[i]->field + oldnsl); + + /* Check whether it already exists */ + if (_GD_FindField(D, c[u], D->entry, D->n_entries, 1, NULL)) { + _GD_SetError(D, GD_E_DUPLICATE, 0, NULL, 0, c[u]); + goto CHECKS_FAILED; + } + } + + free(ilist); + dreturn("%i", 0); + return 0; + +CHECKS_FAILED: + do { + free(c[u]); + } while (u--); + free(c); + free(ilist); + dreturn("%i", 1); + return 1; +} + +const char *gd_fragment_namespace(DIRFILE *D, int index, const char *ns) +{ + dtrace("%p, %i, \"%s\"", D, index, ns); + + _GD_ClearError(D); + + if (D->flags & GD_INVALID) { + _GD_SetError(D, GD_E_BAD_DIRFILE, 0, NULL, 0, NULL); + dreturn("%i", 0); + return 0; + } + + if (index < 0 || index >= D->n_fragment) { + _GD_SetError(D, GD_E_BAD_INDEX, 0, NULL, 0, NULL); + dreturn("%p", NULL); + return NULL; + } + + if (ns) { + unsigned u; + char **codes, *newns; + size_t newnsl; + + const char *oldns = D->fragment[index].ns; + size_t oldnsl = D->fragment[index].nsl; + + const char *pns = index > 0 ? D->fragment[D->fragment[index].parent].ns + : NULL; + size_t pnsl = index > 0 ? D->fragment[D->fragment[index].parent].nsl : 0; + + if (index == 0) { + _GD_SetError(D, GD_E_BAD_INDEX, 0, NULL, 0, NULL); + dreturn("%p", NULL); + return NULL; + } + + if ((D->flags & GD_ACCMODE) == GD_RDONLY) { + _GD_SetError(D, GD_E_ACCMODE, 0, NULL, 0, NULL); + dreturn("%p", NULL); + return NULL; + } + + if (D->fragment[D->fragment[index].parent].protection & GD_PROTECT_FORMAT) { + _GD_SetError(D, GD_E_PROTECTED, GD_E_PROTECTED_FORMAT, NULL, 0, + D->fragment[D->fragment[index].parent].cname); + dreturn("%p", NULL); + return NULL; + } + + if (_GD_ValidateField(ns, D->standards, 1, GD_VF_NS, NULL)) { + /* invalid namespace */ + _GD_SetError(D, GD_E_BAD_CODE, GD_E_CODE_INVALID, NULL, 0, ns); + dreturn("%p", NULL); + return NULL; + } + + /* remove spurious leading dot */ + if (ns[0] == '.') + ns++; + + newnsl = strlen(ns); + + if (ns[0] == '\0') { + /* Duplicate parent space */ + newnsl = pnsl; + if (pns == NULL) { + newns = NULL; + newnsl = 0; + } else { + newns = _GD_Strdup(D, pns); + if (newns == NULL) { + dreturn("%p", NULL); + return NULL; + } + } + } else if (pns) { + /* append */ + newnsl += pnsl + 1; + newns = _GD_Malloc(D, newnsl + 1); + + if (newns == NULL) { + dreturn("%p", NULL); + return NULL; + } + strcpy(new... [truncated message content] |
From: <ket...@us...> - 2015-01-12 07:35:23
|
Revision: 939 http://sourceforge.net/p/getdata/code/939 Author: ketiltrout Date: 2015-01-12 07:35:20 +0000 (Mon, 12 Jan 2015) Log Message: ----------- GetData-0.8.6. Modified Paths: -------------- trunk/html/download.html.in trunk/html/index.html.in Modified: trunk/html/download.html.in =================================================================== --- trunk/html/download.html.in 2014-12-14 03:50:00 UTC (rev 938) +++ trunk/html/download.html.in 2015-01-12 07:35:20 UTC (rev 939) @@ -21,17 +21,17 @@ <h2><a name="source">Latest Release</a></h2> <p>The complete source code for official releases of the GetData project are available from SourceForge. The latest version of GetData, released - 5 September, 2013, is: + 7 December, 2014, is: <ul> <li><a - href="http://sourceforge.net/projects/getdata/files/getdata/0.8.5/" - >0.8.5</a>. Four packages are available: + href="http://sourceforge.net/projects/getdata/files/getdata/0.8.6/" + >0.8.6</a>. Four packages are available: <dl> - <dt><a href="http://sourceforge.net/projects/getdata/files/getdata/0.8.5/getdata-0.8.5.tar.bz2/download">getdata-0.8.5.tar.bz2</a>/<a href="http://sourceforge.net/projects/getdata/files/getdata/0.8.5/getdata-0.8.5.tar.gz/download">.gz</a>:</dt> + <dt><a href="http://sourceforge.net/projects/getdata/files/getdata/0.8.6/getdata-0.8.6.tar.bz2/download">getdata-0.8.6.tar.bz2</a>/<a href="http://sourceforge.net/projects/getdata/files/getdata/0.8.6/getdata-0.8.6.tar.gz/download">.gz</a>:</dt> <dd>The full source code to the library, with bindings. This package uses the GNU autotools build system, and is designed for POSIX systems (UNIX, Linux, BSD, MacOS X, Cygwin, MSys, &c.)</dd> - <dt><a href="http://sourceforge.net/projects/getdata/files/getdata/0.8.5/getdata_win-0.8.5.zip/download">getdata_win-0.8.5.zip</a>:</dt> + <dt><a href="http://sourceforge.net/projects/getdata/files/getdata/0.8.6/getdata_win-0.8.6.zip/download">getdata_win-0.8.6.zip</a>:</dt> <dd>A reduced source code package, with the CMake build system designed to be built on Microsoft Windows, either using the free MinGW compiler, or else Microsoft's Visual C++ compiler. (The full source @@ -41,14 +41,14 @@ compressed dirfiles, the Legacy API, and a few other features. This build is used in native Microsoft Windows builds of <a href="http://kst.kde.org/">kst-2</a>.</dd> - <dt><a href="http://sourceforge.net/projects/getdata/files/getdata/0.8.5/idl_getdata-0.8.5.tar.bz2/download">idl_getdata-0.8.5.tar.bz2</a>/<a href="http://sourceforge.net/projects/getdata/files/getdata/0.8.5/idl_getdata-0.8.5.tar.gz/download">.gz</a>:</dt> + <dt><a href="http://sourceforge.net/projects/getdata/files/getdata/0.8.6/idl_getdata-0.8.6.tar.bz2/download">idl_getdata-0.8.6.tar.bz2</a>/<a href="http://sourceforge.net/projects/getdata/files/getdata/0.8.6/idl_getdata-0.8.6.tar.gz/download">.gz</a>:</dt> <dd>The Interactive Data Language (IDL) bindings, packaged separately with an autotools build system, designed to be built against an already installed version of GetData. Due to licensing restrictions, <a href="#distro">pre-built packages</a> rarely come with these bindings, and this package allows end-users to add support for IDL without having to recompile the whole GetData package.</dd> - <dt><a href="http://sourceforge.net/projects/getdata/files/getdata/0.8.5/matlab_getdata-0.8.5.tar.bz2/download">matlab_getdata-0.8.5.tar.bz2</a>/<a href="http://sourceforge.net/projects/getdata/files/getdata/0.8.5/matlab_getdata-0.8.5.tar.gz/download">.gz</a>:</dt> + <dt><a href="http://sourceforge.net/projects/getdata/files/getdata/0.8.6/matlab_getdata-0.8.6.tar.bz2/download">matlab_getdata-0.8.6.tar.bz2</a>/<a href="http://sourceforge.net/projects/getdata/files/getdata/0.8.6/matlab_getdata-0.8.6.tar.gz/download">.gz</a>:</dt> <dd>The MATLAB bindings, packaged separately with an autotools build system, designed to be built against an already installed version of GetData. Due to licensing restrictions, <a href="#distro">pre-built @@ -87,9 +87,8 @@ href="http://www.ubuntu.com">Ubuntu</a> (via debian) since 12.04 Precise Pangolin. <a href="#debian">Like in debian</a>, it is packaged as <code>libgetdata</code>. Builds of newer versions of libgetdata, and - builds for some older Ubuntu releases, are available in a <a - href="https://launchpad.net/~getdata/+archive/ppa">personal package - archive</a>. + builds for some older Ubuntu releases, are available on <a + href="https://launchpad.net/~getdata/+archive/ppa">launchpad</a>. </dd> </dl> <p>These binary packages are not maintained by the GetData library @@ -137,7 +136,7 @@ <ul> <li><a href="http://sourceforge.net/projects/getdata/files/getdata/0.8.3/" - >0.8.4</a>—<i>May 2013</i> + >0.8.5</a>—<i>September 2013</i> <li><a href="http://sourceforge.net/projects/getdata/files/getdata/0.7.3/" >0.7.3</a>—<i>April 2011</i> Modified: trunk/html/index.html.in =================================================================== --- trunk/html/index.html.in 2014-12-14 03:50:00 UTC (rev 938) +++ trunk/html/index.html.in 2015-01-12 07:35:20 UTC (rev 939) @@ -59,14 +59,14 @@ <p>The complete source code for official releases of the GetData project are available from SourceForge. <ul><li> - The latest version of GetData, released 5 September, 2013, is <a - href="http://sourceforge.net/projects/getdata/files/getdata/0.8.5/" - >GetData 0.8.5</a>.</ul> + The latest version of GetData, released 7 December, 2014, is <a + href="http://sourceforge.net/projects/getdata/files/getdata/0.8.6/" + >GetData 0.8.6</a>.</ul> See: <ul><li><a href="download.html">Get GetData</a></ul> <h2><a name="documentation">Documentation</a></h2> - <p>The new API is fully documented in Unix man pages provided with the + <p>The API is fully documented in Unix man pages provided with the distribution. Further documentation is available below:</p> <ul> <li><a href="bindings.html">GetData Bindings</a> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ket...@us...> - 2014-12-14 03:50:10
|
Revision: 938 http://sourceforge.net/p/getdata/code/938 Author: ketiltrout Date: 2014-12-14 03:50:00 +0000 (Sun, 14 Dec 2014) Log Message: ----------- Update for bugfixes backported to 0.8.6. Modified Paths: -------------- trunk/getdata/NEWS Modified: trunk/getdata/NEWS =================================================================== --- trunk/getdata/NEWS 2014-12-07 05:27:01 UTC (rev 937) +++ trunk/getdata/NEWS 2014-12-14 03:50:00 UTC (rev 938) @@ -30,10 +30,10 @@ gzip-encoded data works. See the gzip discussion in the 0.8.0 section below for important notes. - * A newly-created dirfile is now always opened in read-write mode, ignoring the - access mode specified in the call. Previously, specifying both GD_RDONLY and - GD_CREAT in open calls would result in an access mode (GD_E_ACCMODE) error if - the dirfile didn't already exist. + * A newly-created dirfile is now always opened in read-write mode, ignoring + the access mode specified in the call. Previously, specifying both + GD_RDONLY and GD_CREAT in open calls would result in an access mode + (GD_E_ACCMODE) error if the dirfile didn't already exist. * BUG FIX: In addition to the addition of write support mentioned above, a number of problems with reading LZMA files has been fixed, which should @@ -44,8 +44,6 @@ interpreted as a simple field code (which may be rejected later due to the presence of the invalid '<' character). - * BUG FIX: The parsing of the \x and \u escape sequences is now correct. - * BUG FIX: The parser no-longer interprets various numbers as field codes when it shouldn't (e.g. when specifying a PHASE shift as "1." instead of "1"). @@ -64,10 +62,6 @@ represented in the metadata on disk. For the behaviour with later Versions, and in permissive mode, see the previous. - * BUG FIX: Computation of LINCOMs with complex valued input fields now - correctly happens in the complex plane. As a side effect, gd_native_type() - now also correctly reports such LINCOM fields to be complex valued. - * BUG FIX: If performing a metadata update due to renaming fields (perhaps by passing GD_REN_UPDB to gd_rename()) results in an invalid field code due to affix restrictions, the update now fails (but see GD_REN_FORCE). @@ -78,65 +72,13 @@ codes containing subfields of the renamed field are now also updated, including field codes specifying meta subfields which do not exist. - * BUG FIX: The gd_[m]add() functions now ignore zero-length strings in the - scalar[] member (i.e., they treat them as if they were NULL). Previously - they would store these invalid field codes, causing problems later. - - * BUG FIX: Fetching complex-valued CARRAYs as purely real data now works. - Previously only the first element requested would be returned, the remaining - output buffer containing uninitialised data. - - * BUG FIX: A scalar field code specified for the last factor in a POLYNOM - entry is no longer ignored by gd_[m]add(). - - * BUG FIX: Entry members spf, bitnum, numbits, and period are now completely - ignored by gd_[m]add() if corresponding named scalars are specified. - Previously, an invalid value in these members would result in the entry - being rejected, even though the invalid value was immediately discarded - when the field was added. - - * BUG FIX: gd_[m]add() no longer rejects MPLEX fields with negative count_val. - - * BUG FIX: gd_alter_entry() no longer corrupts the DIRFILE when modifying - named scalars of MPLEX fields. - * BUG FIX: reading a LINTERP table with fewer than two lines no longer results in a segfault on close/discard. - * BUG FIX: DIVIDE fields with complex-valued divisors are now properly - computed. - - * BUG FIX: Complex-valued DIVIDE, POLYNOM, and RECIP fields are now computed - properly when the library is built in ANSI C mode. - - * BUG FIX: Writing complex-valued MPLEX fields no longer corrupts the stored - data. - * BUG FIX: Several fixes have been made to the sample index encoding (SIE) engine, which should now produce properly encoded data when performing random writes. - * BUG FIX: gd_bof() now returns the correct number (i.e.: zero) when reporting - the beginning of field of derived fields shifted to before the start of the - dirfile. Previously, this function incorrectly returned values ranging from - zero to one less than the samples-per-frame of the requested field. - - * BUG FIX: gd_flush(), gd_sync(), gd_raw_close() no longer segfault when - operating on a LINCOM with only one input field. - - * BUG FIX: gd_seek() now works correctly on PHASE fields; previously, the - sign of the PHASE shift was flipped. - - * BUG FIX: gd_seek() now correctly positions the virtual I/O pointer of the - INDEX field. - - * BUG FIX: gd_framenum_subset() now returns the correct value when passed a - field_end which is beyond the end of field, and then is required to - extrapolate outside of the specified frame range. - - * BUG FIX: gd_error_string() now produces the correct string when reporting - an out-of-range poly_ord encountered by gd_add_polynom() and similar. - * BUG FIX: gd_alter_raw() and similar no longer fail when asked to re-encode the data file of a RAW field which has not been previously accessed. @@ -145,19 +87,6 @@ obsolete, cached LUTs would sometimes linger, causing incorrect LINTERP computation. - * BUG FIX: gd_[m]alter_spec() no longer ignore co-efficients specified for - POLYNOM entries. - - * BUG FIX: gd_alter_encoding() now deletes the internal cache of RAW filenames - of the affected fragment; previously, these old, cached filenames could lead - to I/O errors when reading and writing the re-encoded RAW data files. - - * BUG FIX: Calling the Legacy API function GetFormat() on a Dirfile with MPLEX - or WINDOW fields no longer results in a segmentation fault. - - * BUG FIX: Attempts to read past the EOF of a gzipped field no longer results - in an I/O error, but successfully returns no data. - API Changes: * CLARIFICATION: The macro GD_SIZE() declared in getdata.h is indeed part of @@ -198,11 +127,11 @@ alias points to. * A number of different error codes which indicated the same problem (an - I/O error returned by the filesystem) have been merged into one. The error - codes GD_E_OPEN, GD_E_TRUNC, GD_E_RAW_IO, GD_E_OPEN_FRAGMENT, GD_E_FLUSH - are replaced by the new error GD_E_IO. The old symbols remain as aliases - but are deprecated. There is one exception to this merge: attempts to - flush metadata lines which are too long are now reported using + I/O error returned by the operating system) have been merged into one. The + error codes GD_E_OPEN, GD_E_TRUNC, GD_E_RAW_IO, GD_E_OPEN_FRAGMENT, + GD_E_FLUSH are replaced by the new error GD_E_IO. The old symbols remain as + aliases but are deprecated. There is one exception to this merge: attempts + to flush metadata lines which are too long are now reported using GD_E_LINE_TOO_LONG. Previously, these errors used GD_E_FLUSH. * The error code GD_E_OPEN_LINFILE has also been removed. It has been split @@ -260,25 +189,9 @@ error codes (such as OpenError). These deprecated exceptions are simply aliases for the current ones and are never returned by the bindings. - * C++ BUG FIX: Fixed segfault in RawEntry destructor. Reported by S. J. - Benton. - - * C++ BUG FIX: Entry::ComplexScalars() now returns non-zero for RECIP - entries when appropriate, instead of always returning zero. (The - RecipEntry::ComplexScalars() method always returned the correct value.) - - * F77 and F95 BUG FIX: Named scalar indices are now indexed from one instead - of zero, like all other array indices are in the Fortran GetData bindings. - * F95 BUG FIX: fgd_add and fgd_alter_entry no longer ignore named scalar parameters provided in supplied entry structures. - * IDL BUG FIX: the /UPDATEDB flag to gd_rename now operates as expected. - Previously it would act like /MOVE_DATA. - - * PYTHON BUG FIX: The keyword for the "dirfile" parameter in the - getdata.fragment constructor is now properly spelled. - Miscellaneous: * The minimum autotools versions have been bumped. Autoconf-2.65 or newer, @@ -291,6 +204,104 @@ |==============================================================================| +New in version 0.8.6: + + Library Changes: + + * BUG FIX: Computation of LINCOMs with complex valued input fields now + correctly happens in the complex plane. As a side effect, gd_native_type() + now also correctly reports such LINCOM fields to be complex valued. + + * BUG FIX: The gd_[m]add() functions now ignore zero-length scalar strings. + Previously they would store these invalid field codes, causing problems + later. + + * BUG FIX: Returning complex-valued CARRAYs as purely real now works. + Previously only the first element requested would be returned, the remaining + output buffer containing uninitialised data. + + * BUG FIX: Entry members spf, bitnum, numbits, and period are now completely + ignored by gd_[m]add() when corresponding named scalars are specified. + Previously, an invalid value in these members would result in the entry + being rejected, even though the rest of GetData ignored the invalid, unsued + value. + + * BUG FIX: The parsing of the \x and \u escape sequences is now correct. + + * BUG FIX: A scalar field code specified for the last factor in a POLYNOM + entry is no longer ignored by gd_[m]add(). + + * BUG FIX: gd_[m]add() no longer rejects MPLEX fields with negative count_val. + + * BUG FIX: DIVIDE fields with complex-valued divisors are now properly + computed. + + * BUG FIX: Complex-valued POLYNOM and RECIP fields are now computed properly + when the library is built in ANSI C mode. + + * BUG FIX: gd_alter_entry() no longer corrupts the DIRFILE when modifying + named scalars of MPLEX fields. + + * BUG FIX: Writing complex-valued MPLEX fields no longer corrupts the stored + data. + + * BUG FIX: gd_bof() now returns the correct number (i.e.: zero) when reporting + the beginning of field of derived fields shifted to before the start of the + dirfile. Previously, this function incorrectly returned values ranging from + zero to one less than the samples-per-frame of the requested field. + + * BUG FIX: gd_flush(), gd_sync(), gd_raw_close() no longer segfault when + operating on a LINCOM with only one input field. + * BUG FIX: gd_seek() now works correctly on PHASE fields; previously, the + sign of the PHASE shift was flipped. + + * BUG FIX: gd_seek() now correctly positions the virtual I/O pointer of the + INDEX field. + + * BUG FIX: gd_framenum_subset() now returns the correct value when passed a + field_end which is beyond the end of field, and then is required to + extrapolate outside of the specified frame range. + + * BUG FIX: gd_error_string() now produces the correct string when reporting + an out-of-range poly_ord encountered by gd_add_polynom() and similar. + + * BUG FIX: gd_[m]alter_spec() no longer ignore co-efficients specified for + POLYNOM entries. + + * BUG FIX: gd_alter_encoding() now deletes the internal cache of RAW filenames + of the affected fragment; previously, these old, cached filenames could lead + to I/O errors when reading and writing the re-encoded RAW data files. + + * BUG FIX: Calling the Legacy API function GetFormat() on a Dirfile with MPLEX + or WINDOW fields no longer results in a segmentation fault. + + * BUG FIX: Attempts to read past the EOF of a gzipped field no longer results + in an I/O error, but successfully returns no data. + + * BUG FIX: The internal recursion counter wasn't being properly reset on + certain error conditions, leading to spurious GD_E_RECURSE_LEVEL errors + being returned from valid calls. + + Bindings Changes: + + * F77 and F95 BUG FIX: Named scalar indices are now indexed from one instead + of zero, like all other array indices are in the Fortran GetData bindings. + + * C++ BUG FIX: Fixed segfault in RawEntry destructor. Reported by S. J. + Benton. + + * C++ BUG FIX: Entry::ComplexScalars() now returns non-zero for RECIP + entries when appropriate, instead of always returning zero. (The + RecipEntry::ComplexScalars() method always returned the correct value.) + + * IDL BUG FIX: The /UPDATEDB flag to gd_rename is no longer ignored; also, the + /MOVE_DATA flag no longer also acts as if /UPDATEDB had been specified. + + * PYTHON BUG FIX: The keyword for the "dirfile" parameter in the + getdata.fragment constructor is now properly spelled. + +|==============================================================================| + New in verison 0.8.5: Library Changes: This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ket...@us...> - 2014-12-07 05:27:14
|
Revision: 937 http://sourceforge.net/p/getdata/code/937 Author: ketiltrout Date: 2014-12-07 05:27:01 +0000 (Sun, 07 Dec 2014) Log Message: ----------- Tag GetData-0.8.6. Added Paths: ----------- tags/getdata-0.8.6/ tags/getdata-0.8.6/ChangeLog tags/getdata-0.8.6/RELEASE_NOTES.in Removed Paths: ------------- tags/getdata-0.8.6/ChangeLog tags/getdata-0.8.6/RELEASE_NOTES.in Deleted: tags/getdata-0.8.6/ChangeLog =================================================================== --- branches/getdata-0.8/ChangeLog 2014-12-06 09:57:30 UTC (rev 934) +++ tags/getdata-0.8.6/ChangeLog 2014-12-07 05:27:01 UTC (rev 937) @@ -1,5828 +0,0 @@ -2014-12-06 D. V. Wiebe <ge...@ke...> svn:932 - Backport more bugfixes from trunk: - - * src/native.c (_GD_NativeType): Don't always return GD_FLOAT64 for LINCOMs. - (r867) - - * src/putdata.c (_GD_MplexOutData): Fix computation of complex data. (r867) - - * src/open.c (_GD_CreateDirfile _GD_Open): Close descriptors on error. - (r877) - - * src/types.c (_GD_ConvertType): Add missing break. (r877) - - * bindings/python/pydirfile.c (gdpy_dirfile_getentry gdpy_dirfile_getstring - gdpy_dirfile_putcarray gdpy_dirfile_putdata) src/include.c (_GD_Include) - src/putdata.c (_GD_DoMplexOut): Deallocate buffers on error. (r877) - - * src/parse.c (_GD_ParseCarray): Return on error. (r877) - - * src/parse.c (_GD_ParseFieldSpec): Only resize the dot_list when necessary. - Also, clean up if the resize doesn't work. (r877) - - * src/getdata.h.in: Remove __nonnull__ from parameter two of - gd_verbose_prefix. (r877) - - * src/common.c (_GD_CanonicalPath): Don't let readlink overrun the buffer. - Also fix double free. (r877) - - * bindings/python/pygetdata.h (PYGD_REPORT_ERROR): Added. (r877) - - * bindings/python/pyentry.c (gdpy_entry_seta): Set a[i] if the pyobj is - complex. (r877) - - * bindings/cxx/entry.cpp (Entry::Entry): Zero E if gd_entry call fails. - (r877) - - * bindings/cxx/fragment.cpp (Fragment::Fragment): Handle error in - gd_fragment_affixes call. (r877) - - * bindings/f77/fgetdata.c (GDASCA): Handle error in gd_entry call. (r877) - - * util/dirfile2ascii.c (main): Fix check for too many fields. (r877) - -2014-12-06 D. V. Wiebe <ge...@ke...> svn:931 - Backport more bugfixes from trunk: - - * src/getdata.c (_GD_DoConst): Return len instead of 1. (r848) - * src/field_list.c (gd_carrays gd_mcarrays): Update _GD_DoField calls to - deal with the above. (r848) - * test/get_carray_c2r.c: Added. (r848) - - * src/add.c (_GD_CopyScalars): Added. (r848) - * src/add.c (_GD_Change): Fix scalar copying for GD_POLYNOM_ENTRY. Don't - throw errors for passed members which will be ignored due to scalars (spf, - numbits, bitnum). (r848) - * test/add_bit_scalars.c test/add_mplex_scalars.c test/add_raw_spf_scalar.c - * test/add_polynom_scalar.c: Added. (r848) - - * src/mod.c (_GD_Change): Fix MPLEX scalar modifying. (r848) - -2014-12-05 D. V. Wiebe <ge...@ke...> svn:930 - Backport bugfixes from trunk: - - * bindings/cxx/rawentry.cpp (RawEntry::RawEntry): Initialise filename. - Patch from S. J. Benton. (r863) - - * src/add.c (_GD_Add): Set the right suberror (GD_E_ENTRY_POLYORD) for - poly_ord out of range. (r867) - - * src/flimits.c (_GD_GetBOF): Also zero *ds if we're before sample zero. - (r867) - - * src/flush.c (_GD_Flush): Don't flush the second lincom field if it's not - used. (r867) - - * src/fpos.c (_GD_Seek): Fix sign on PHASE shift. (r867) - - * src/fpos.c (gd_seek64): Pass index_pos=-1 to _GD_GetFilePos. (r867) - - * src/getdata.c (_GD_CDivideData): Fix computation of complex division. - (r867) - - * src/index.c (_GD_GetIndex): Fix extrapolations performed when required to - search for the EOF. (r867) - * src/index.c (gd_framenum_subset64): Fix conversion of field_end from - frames to samples. (r867) - - * src/add.c (_GD_Change): Don't throw an error on mplex.count_val < 0. - (r848) - * src/errors.c src/internal.h: Remove unused GD_E_ENTRY_CNTVAL. (r848) - * test/add_mplex_val.c: Deleted. (r848) - - * src/legacy.c (GetFormat): Allocate Format.mplexEntries. (r867) - - * src/mod.c (gd_alter_spec gd_malter_spec): Set move flags for POLYNOM - entries to ensure co-efficients are updated. (r867) - - * src/parse.c (_GD_Tokenise): Fix parsing of \x and \u. Don't unnecessarily - overwrite earlier errors with GD_E_FORMAT_UNTERM. (r867) - - * bindings/idl/getdata.c (gdidl_rename): Fix handling of UPDATEDB. (r867) - - * bindings/cxx/getdata/entry.h (Entry::CompScal): Allow non-zero for - RECIP, too. (r868) - - * src/common.c (_GD_CInvertData): Correct algebra in C89 INVERT macro. - (r872) - * src/getdata.c (_GD_PolynomData): Implement correct C89 POLYNOMC macro. - (r872) - * src/getdata.c (_GD_CDivideData): Correct algebra in C89 DIVIDEC macro. - (r872) - - * src/internal.h: Fix pointer arithmetic in C89 gd_cap_ macro. (r872) - - * bindings/python/pyfragment.c (gdpy_fragment_init): Fix typo in keyword - names. (r876) - - * Makefile.am: Auotmake version bumped to 1.13. (r915) - * configure.ac: Autoconf version bumped to 2.65. (r915) - -2013-09-05 D. V. Wiebe <ge...@ke...> svn:845 - GetData-0.8.5 released. - - * src/zzslim.c: Fix for rename of gd_raw_file_. - -2013-07-17 D. V. Wiebe <ge...@ke...> svn:835 - - * bindings/python/pydirfile.c: Remove spurious debug printf. - - * bindings/doc/Makefile.am: Fix make clean - - * bindings/bindings/perl/Makefile.am: Fix make clean - -2013-05-14 D. V. Wiebe <ge...@ke...> svn:832 - GetData-0.8.4 released. - -2013-04-11 D. V. Wiebe <ge...@ke...> svn:830 - GetData-0.8.4rc2: - - * bindings/perl/Build.PL.in: make include_dirs an array. Reported by Seth. - - * bindings/idl/package/configure.ac bindings/matlab/package/configure.ac: - Require GetData >= 0.8.4. - -2013-04-10 D. V. Wiebe <ge...@ke...> svn:829 - GetData-0.8.4rc1. - -2013-04-06 D. V. Wiebe <ge...@ke...> svn:827 - * bindings/cxx/getdata/entry.h (Entry::CountMax) - bindings/cxx/getdata/mplexentry.h (MplexEntry::CountMax - MplexEntry::SetCountMax): Added (but marked deprecated) for backwards - compatibility. - -2013-04-05 D. V. Wiebe <ge...@ke...> svn:826 - * bindings/f77/test/big_test.f bindings/f77/test/big_test95.f90 - bindings/perl/t/big_test.t: Fix test 231. - -2013-04-05 D. V. Wiebe <ge...@ke...> svn:825 - * src/getdata.h.in: Renamed gd_entry_t.count_max to gd_entry_t.period. - - * bindings/cxx/getdata/entry.h (Entry::Period) - bindings/cxx/getdata/mplexentry.h (NplexEntry::Period): Renamed from CountMax. - * bindings/cxx/mplexentry.cpp (MplexEntry::SetPeriod): Renamed from - SetCountMax. - * bindings/cxx/mplexentry.cpp (MplexEntry::MplexEntry) - bindings/f77/fgetdata.c (GDGEMX) bindings/f77/getdata.f90.in (fgd_entry - fgd_add fgd_madd fgd_alter_entry fgd_add_mplex fgd_madd_mplex - fgd_alter_mplex) bindings/idl/getdata.c (gdidl_make_idl_entry - gdidl_alter_mplex) bindings/matlab/gd_add_mplex.m - bindings/matlab/gd_alter_mplex.m bindings/matlab/gd_madd_mplex.m - bindings/matlab/matlab.c (gdmx_from_entry gdmx_to_entry) - bindings/perl/GetData.xs (gdp_to_entry entry) bindings/python/pyentry.c - (gdpy_set_entry_from_tuple gdpy_entry_getperiod gdpy_entry_setperiod - gdpy_entry_getparms): Rename count_max to period. - - * src/add.c (_GD_Add): Fix range checks on MPLEX parameters. - - * src/getdata.c (_GD_DoMplex): The default period is 2n+1, not 2n. - - * src/internal.h: Rename GD_E_ENTRY_CNTMAX to GD_E_ENTRY_PERIOD. - * src/errors.c: Update GD_E_ENTRY_PERIOD and GD_E_FORMAT_MPLEXVAL messages. - - * src/mod.c (_GD_Change): mplex.count_val = -1 is not a magic value. - - * src/parse.c (_GD_ParseMplex): Remove incorrect restrictions count_val <= - period and count_val >= 0. - - * bindings/idl/getdata.c (gdidl_read_idl_entry): Properly convert an IDL - MPLEX entry object. - - * bindings/idl/getdata.c (gdidl_alter_mplex): Handle missing COUNT_VAL. - - * man/dirfile-format.5: Fix and clarify MPLEX specification. - -2013-03-13 D. V. Wiebe <ge...@ke...> svn:819 - * src/flush.c (_GD_FlushFragment): Strip affixes from field codes in - /REFERENCE directives. - * test/flush_ref.c test/parse_include_affix_ref.c: Added. - -2013-03-12 D. V. Wiebe <ge...@ke...> svn:818 - * bindings/python/pydirfile.c (gdpy_dirfile_getdata): Resize the ndarray - before returning it, if necessary. Also, don't try to read past the EOF in - read-to-end mode. - - * src/fpos.c (_GD_GetFilePos): Fix computation of two input field derived - types to properly return MULTIPOS when necessary. - * test/tell_multidiv.c: Added. - - * src/fpos.c (_GD_Seek): Return error if trying to place the I/O pointer - before sample zero. - * test/seek_neg.c: Added. - - * src/gzip.c (_GD_GzipSeek): Allow seeking to sample zero. - * test/gzip_get_get2.c: Added. - -2013-03-12 D. V. Wiebe <ge...@ke...> svn:815 - GetData-0.8.3 released. - -2013-03-09 D. V. Wiebe <ge...@ke...> svn:807 - * src/flush.c: C89-ify the GD_VERS_... constants. - -2013-03-08 D. V. Wiebe <ge...@ke...> svn:806 - GetData-0.8.3rc1. - -2013-03-08 D. V. Wiebe <ge...@ke...> svn:803 - * src/internal.h (gd_put_unalinged64): Fix spelling. - - * src/encoding.c (_GD_FiniRawIO): Don't pass NULL to gd_UnlinkAt. - - * man/GD_SIZE.3: Added. - - * configure.ac: Turn on fast unaligned access for armv[6789] per Dinar - Valeev. Also add add --enable-fast-unaligned to allow users to override the - check. - -2013-02-15 D. V. Wiebe <ge...@ke...> svn:795 - * bindings/matlab/package: Added. - * Makefile.am: Add matlabdist and matlabdistcheck - - * doc/README.matlab bindings/matlab/make_contents.sh.in - bindings/matlab/Contents.m.head bindings/matlab/doc.tail: Added. - - * bindinag/matlab/matlab.c (gdmx_from_carrays): Added. - * bindings/matlab/gd_mcarrays.c: Added. - * bindings/matlab/test/big_test.m: Add test 243. - - * bindings/matlab/gd_include.c: Renamed from gd_include_affix.c - * bindings/matlab/gd_include.m: Deleted. - -2013-02-13 D. V. Wiebe <ge...@ke...> svn:794 - * bindings/cxx/test/big_test.cpp bindings/perl/t/big_test.t - bindings/python/test/big_test.py: Add test 243. - -2013-02-06 D. V. Wiebe <ge...@ke...> svn:793 - * src/parse.c (_GD_Tokenise): Don't falsely report an unterminated token when - stopping a partial tokenisation on top of a " or \. - * test/tok_arg.c test/tok_escape.c test/tok_quote.c: Added. - -2013-02-02 D. V. Wiebe <ge...@ke...> svn:792 - * src/string.c (gd_get_string): Handle string retrieval directly instead of - calling _GD_DoField. - * src/string.c (_GD_DoStringOut): Moved from putdata.c. - * src/string.c (gd_put_string) src/add.c (gd_add_string gd_madd_string): Call - _GD_DoStringOut directly instead of _GD_DoFieldOut. - * src/getdata.c (_GD_DoString): Deleted. - * src/getdata.c (_GD_DoField) src/putdata.c (_GD_DoFieldOut): Remove string - processing. - -2013-02-02 D. V. Wiebe <ge...@ke...> svn:790 - * bindings/matlab/matlab.c: ANSI C. - -2013-02-02 D. V. Wiebe <ge...@ke...> svn:789 - * bindings/python/pyentry.c (gdpy_set_scalar_from_pyobj): Add missing data - types. - * bindings/python/pyentry.c (gdpy_set_entry_from_tuple gdpy_entry_setspf - gdpy_entry_setbitnum gdpy_entry_setnumbits gdpy_entry_setcountval - gdpy_entry_setcountmax): Fix data type in gdpy_set_scalar_from_pyobj calls. - - * src/entry.c (_GD_GetScalar): Handle bogus CARRAY indices. - - * src/mod.c (_GD_Change): Fix floating point CONST conversions. - - * test/add_scalar_carray_bad.c test/alter_const_c2r.c: Added. - - * bindings/python/test/big_test.py: Fix the part of test 35 that the - previous fix broke. - -2013-02-02 D. V. Wiebe <ge...@ke...> svn:788 - * src/debug.c (gd_colclear): Added. - - * src/protect.c (gd_protection gd_alter_protection): Fix error reporting for - GD_E_BAD_INDEX. - - * m4/matlab.m4 bindings/matlab: Added. - * configure.ac bindings/Makefile.am: Added MATLAB config. - * bindings/make_parameters.c (MatLab): Added. - - * bindings/python/test/big_test.py: Fixed tests 35 and 67. - -2013-01-26 D. V. Wiebe <ge...@ke...> svn:787 - * src/del.c (_GD_DeReference) src/entry.c (_GD_CalculateEntry) src/flush.c - (_GD_FieldSpec) src/mod.c (_GD_Change): Fix data type (size) of - EN(raw,spf) in function calls. - -2013-01-15 D. V. Wiebe <ge...@ke...> svn:785 - * m4/floatordering.m4: Split from m4/compiler.m4 - - * src/parse.c (_GD_ParseRaw _GD_ParseMplex): Fix types in _GD_SetScalar - calls. - -2013-01-04 D. V. Wiebe <ge...@ke...> svn:783 - * configure.ac: powerpc64 also supports fast unaligned access. Reported by - Dinar Valeev. - -2012-12-13 D. V. Wiebe <ge...@ke...> svn:775 - GetData-0.8.2 released. - -2012-12-12 D. V. Wiebe <ge...@ke...> svn:773 - * src/common.c (_GD_CanonicalPath): Don't bail early when encountering a - trailing absolute symlink. - - * src/common.c (_GD_CanonicalPath): Strip DIRSEP along with a symlink name - from res when necessary. - - * test/test.h test/parse_include_absolute.c test/parse_include_absrel.c - test/parse_include_relabs.c: Abstract getcwd in the header. - * test/open_sym_a.c test/open_sym_al.c test/open_sym_at.c test/open_sym_c.c - test/open_sym_cl.c test/open_sym_ct.c test/open_sym_p.c test/open_sym_pl.c - test/open_sym_pt.c: Added. - -2012-11-22 D. V. Wiebe <ge...@ke...> svn:772 - * src/encoding.c (_GD_WriteOut): Remove unnecessary DIRFILE parameter. - -2012-10-10 D. V. Wiebe <ge...@ke...> svn:771 - * src/getdata.c (_GD_DoMplex): Check we're at the BOF before trying to do a - lookback. - - * src/internal.h: Only export gd_MakeFullPathOnly when using modules. - -2012-08-20 D. V. Wiebe <ge...@ke...> svn:767 - GetData-0.8.1 released. - -2012-08-15 D. V. Wiebe <ge...@ke...> svn:760 - * src/internal (_GD_IsDirSep): Added. - * src/common.c (_GD_CanonicalPath): Call _GD_IsDirSep - -2012-08-15 D. V. Wiebe <ge...@ke...> svn:759 - GetData-0.8.1rc1: - - * src/parse.c (_GD_ParseDirective _GD_ParseFragment): Remove inappropriate - restrict keywords. Reported by Daniel Flanigan. - -2012-08-14 D. V. Wiebe <ge...@ke...> svn:757 - * src/include.c (_GD_Include): Return the correct fragment index, not just - D->n_fragment - 1. - * test/include_sub.c: Added. - -2012-08-04 D. V. Wiebe <ge...@ke...> svn:755 - * src/parse.c (_GD_ParseFragment): Don't resize instring unnecessarily. - -2012-08-04 D. V. Wiebe <ge...@ke...> svn:754 - * src/parse.c (_GD_ParseDirective): Delete free reference on encountered - one in a subfragment. - -2012-08-02 D. V. Wiebe <ge...@ke...> svn:753 - * src/include.c (_GD_Include): Reject non-regular files as fragments. - -2012-08-02 D. V. Wiebe <ge...@ke...> svn:752 - * src/globals.c (gd_dirfilename): Return the full path. - * test/global_name.c: Update. - - * src/add.c (_GD_Add): Properly compute filebase. - - * src/entry.c (gd_linterp_tablename): Added. - * test/table.c test/table_code. test/table_type.c: Added. - * bindings/cxx/dirfile.cpp (Dirfile::LinterpTableName) - bindings/perl/simple_funcs.xsin (linterp_tablename) - bindings/f77/getdata.f90.in (fgd_linterp_tablename) bindings/f77/fgetdata.c - (GDLTTN) bindings/idl/getdata.c (gdidl_get_linterp_tablename) - bindings/python/pydirfile.c (gdpy_dirfile_linterptablename): Added. - * bindings/perl/simple_funcs.pl: Handle returning malloc'd string. - - * bindings/cxx/test/big_test.cpp bindings/perl/test/big_test.t - bindings/f77/test/big_test.f bindings/f77/test/big_test95.f90 - bindings/idl/test/big_test.pro bindings/python/test/big_test.py: Add test - 241. Update tests 21 and 80. - -2012-07-26 D. V. Wiebe <ge...@ke...> svn:751 - * src/flush.c (_GD_FieldSpec): Write /HIDDEN directives for /ALIASes. - -2012-07-26 D. V. Wiebe <ge...@ke...> svn:749 - * src/parse.c (_GD_SetScalar _GD_ParseLincom _GD_ParseLinterp - _GD_ParseMultiply _GD_ParseRecip _GD_ParseWindow _GD_ParseMplex - _GD_ParseDivide _GD_ParseBit _GD_ParsePhase _GD_ParsePolynom - _GD_ParseAlias): Store munged input fields. - * src/entry.c (_GD_GetScalar) src/common.c (_GD_BadInput) src/parse.c - (_GD_ResolveAlias): Don't (re-)munge field codes. - - * src/name.c (_GD_MungeCode): Take an additional parameter, err_ok, - indicating whether missing affixes indicate an internal error or not. - - * src/mod.c (_GD_AlterInField) src/name.c (_GD_CheckCodeAffixes): Added. - * src/mod.c (_GD_AlterScalar) src/add.c (_GD_FixName _GD_Add _GD_AddAlias): - Call _GD_CheckCodeAffixes. - * src/mod.c (_GD_Change): Call _GD_AlterInField to modify in_fields. - - * src/flush.c (_GD_WriteFieldCode): Added. - * src/flush.c (_GD_PadField _GD_WriteConst _GD_FieldSpec): Call - _GD_WriteFieldCode. - - * test/get_affix.c test/add_alias_affix.c test/add_alias_affix.c - test/add_spec_affix.c test/madd_alias_affix.c test/alter_lincom_affix.c - test/add_lincom_affix.c test/alter_scalar_affix.c: Added. - - * test/add_string_affix.c test/madd_affix.c test/add_affix.c: Update for new - affix semantics. - - * src/mod.c (gd_alter_entry) src/add.c (gd_madd_alias): Clear error when - starting. - -2012-07-12 D. V. Wiebe <ge...@ke...> svn:743 - * bindings/f77/fgetdata.c (GDALLC): Delete unnecessary malloc. - * src/fragment.c (_GD_CheckAffixes): Free subaffixes on error. - * src/fragment.c (gd_desync): Free old name after reopen. - * src/include.c (_GD_Include): Free sname on error. - * src/add.c (_GD_Add): Free temp_buffer on error. - * src/close.c (_GD_FreeD): Free tok_base and error_prefix. - * src/move.c (_GD_Move): Free new_code on error. - * src/parse.c (gd_strtok): Cache the string per documentation. - - * test/valgrind.suppressions: Added. - * bindings/cxx/test/big_test.cpp test/add_affix.c test/add_meta_alias.c - test/add_scalar_carray.c test/name_updb_alias.c test/name_updb_const.c - test/name_updb_const_alias.c test/name_alias.c test/name_updb.c - test/madd_affix.c test/add_meta.c test/add_scalar.c test/name.c test/add.c - test/parse_mplex_nomax.c: Deal with memory. - -2012-07-10 D. V. Wiebe <ge...@ke...> svn:740 - * src/common.c (_GD_CanonicalPath): Fix pointer arithmetic - - * src/compat.c (gd_strtod): Drop octal (not in POSIX); handle hex floating - point; don't zero errno. - -2012-07-04 D. V. Wiebe <ge...@ke...> svn:737 - GetData-0.8.0 released. - -2012-07-04 D. V. Wiebe <ge...@ke...> svn:736 - * src/constant.c (gd_get_carray_slice gd_get_carray gd_carray_len - gd_put_carray_slice gd_put_carray): Handle both CONST and CARRAY. - * src/constant.c (gd_get_constant gd_put_constant): Just call the - corresponding carray_slice function. - -2012-06-30 D. V. Wiebe <ge...@ke...> svn:732 - * src/getdata.h.in configure.ac cmake/CMakeLists.txt: Fix definition of - gd_off64_t. - - * bindings/perl/Build.PL.in: make getdata.h a dependency of lib/GetData.xs. - -2012-06-29 D. V. Wiebe <ge...@ke...> svn:728 - * src/getdata.h.in src/internal.h src/errors.c: Merge GD_E_BAD_VERSION into - GD_E_ARGUMENT. - -2012-06-28 D. V. Wiebe <ge...@ke...> svn:725,726 - * util/checkdirfile.c: Find and report dangling aliases. - - * bindings/python/pydirfile.c (gdpy_dirfile_nentries gdpy_dirfile_entrylist) - bindings/cxx/dirfile.cpp (Dirfile::NEntries Dirfile::EntryList) - bindings/perl/GetData.xs (entry_list) : Fix signedness of "type". - * bindings/idl/getdata.c (gdidl_get_field_list gdidl_get_nfields): Deal with - /ALIASES. - * bindings/make_parameters.c: Add GD_ALIAS_ENTRIES. - - * test/nentries_noalias.c test/elist_noalias.c: Renamed from ..._alias.c. - * test/nentries_alias.c test/elist_alias.c: Added. - - * src/internal.h getdata.h.in: Move GD_ALIAS_ENTRY to public header. - * src/getdata.h.in: Define GD_ALIAS_ENTRIES. - * src/field_list.c (_GD_EntryIndex _GD_ListEntry) src/nfields.c - (_GD_NEntries): Handle GD_ALIAS_ENTRIES. - - * src/common.c (_GD_CanonicalPath): Sidestep GCC warning. - -2012-06-27 D. V. Wiebe <ge...@ke...> svn:724 - * src/name.c (_GD_UpdateScalar _GD_InvalidateConst _GD_UpdateInField - _GD_InvalidateVect): Handle aliases. - * src/name.c (gd_rename): Don't dereference aliases. - * src/name.c (gd_rename_alias): Deleted. - * test/name.c test/name_updb_const.c test/name_updb.c: Updated. - * test/name_updb_const_alias.c test/name_move_alias.c test/name_alias.c - test/name_updb_alias.c: Added. - * test/name_after_const.c test/name_after.c: Deleted. - - * src/parse.c (_GD_ResolveAlias): Reset aliases if requested. - - * man/make_html.pl: Don't eat "**" in synopses. - -2012-06-25 D. V. Wiebe <ge...@ke...> svn:723 - * src/flush.c (_GD_FindVersion): ALIAS means >= 9. - - * util/checkdirfile.c: Grammar. - -2012-06-13 D. V. Wiebe <ge...@ke...> svn:721 - GetData-0.8.0rc2. - -2012-06-04 D. V. Wiebe <ge...@ke...> svn:720 - * bindings/cxx/dirfile.cpp bindings/cxx/fragment.cpp - bindings/cxx/getdata/dirfile.h bindings/cxx/getdata/fragment.h: off_t - -> gd_off64_t. - -2012-06-02 D. V. Wiebe <ge...@ke...> svn:717 - * src/internal.h (_GD_AbsPath): Allow s == NULL. - -2012-05-25 D. V. Wiebe <ge...@ke...> svn:712 - * bindings/cxx/fragment.cpp (Fragment::Fragment Fragment::SetEndianness) - bindings/cxx/dirfile.cpp (Dirfile::NFrames Dirfile::EoF Dirfile::BoF - Dirfile::GetData Dirfile::PutData Dirfile::FrameNum Dirfile::Seek - Dirfile::Tell): Call the 64-bit API. - - * src/getdata.h.in: Support GD_64BIT_API and use configure to define - gd_off64_t. - * src/internal.h bindings/cxx/getdata/dirfile.h: Define GD_64BIT_API before - including getdata.h. - - * test/Makefile.am man/Makefile.am: Remove LFS_TRANSITIONAL_API (always - enabled). - - * confihure.ac: Figure out a suitable type for gd_off64_t. Remove - LFS_TRANSITIONAL_API conditional. - -2012-05-23 D. V. Wiebe <ge...@ke...> svn:710 - * test/test.h: Don't redefine isnan if it's okay as-is. - - * src/open.c (_GD_CreateDirfile): Don't unnecessarily disable mtime - acquisition. - * cmake/test/CMakeLists.txt: enable desync checks. - - * src/compat.c (gd_strtod): Fix sign check. - -2012-05-22 D. V. Wiebe <ge...@ke...> svn:709 - * cmake/CMakeLists.txt: Update definitons. Support GD_UTIL. - * cmake/test/CMakeLists.txt: Update the list of excluded tests. - * cmake/src/CMakeLists.txt: Support GD_DEBUG and conditionally build debug.c. - * cmake/bindings/cxx/CMakeLists.txt: Support GD_TEST. - * cmake/util/CMakeLists.txt cmake/bindings/cxx/test/CMakeLists.txt: Added. - - * src/internal.h: Define PRNsize_t and PRNssize_t to get around printf()s - which don't recognise the "z" length modifier. Changed everywhere. Handle - basename, offsetof, strtod. - - * src/compat.c (basename gd_strtod): Added. - * src/parse.c (_GD_SetScalar) src/nan.h: Call gd_strtod. - - * README.win: Update. - - * bindings/cxx/test/big_test.cpp: Tweak includes to allow compilation with - MSVC. - - * bindings/cxx/getdata/entry.h bindings/cxx/getdata/fragment.h: Include - dirfile.h. - - * test/include_cb.c test/madd_window.c test/open_cb_cont.c - test/open_cb_invalid.c test/include_pc.c test/test.h test/open_cb_rescan.c - test/open_cb_abort.c test/open_cb_ignore.c: Tweak for compilation with MSVC. - - * test/add_meta_alias.c test/madd_affix.c test/parse_mplex_nomax.c - test/add_meta.c: Fix gd_entry_t access. - - * util/checkdirfile.c: Preprocessor fixes for compilation with MSVC. - -2012-04-21 D. V. Wiebe <ge...@ke...> svn:706 - GetData-0.8.0rc1: - - * bindings/cxx/test/big_test.cpp bindings/perl/test/big_test.t: Fix - mplex_lookback checks. - -2012-04-21 D. V. Wiebe <ge...@ke...> svn:705 - * man/make_html.pl: Improvements. - - * src/globals.c (gd_mplex_lookback): Always succeed; return void. - - * bindings/perl/simple_funcs.pl: Handle returning void. - -2012-04-19 D. V. Wiebe <ge...@ke...> svn:701 - * src/add.c (_GD_Add): Don't check protection level before figuring out the - fragment index. - - * bindings/perl/GetData.xs bindings/perl/typemap - bindings/perl/simple_funcs.pl: gdpu_spf_t -> gdpu_uint_t. - - * bindings/perl/GetData.xs (gdp_to_entry entry): Use "in_fields" everywhere - to be consistent with the C API. - - * bindings/perl/GetData.xs (mcarrays): Remove unpacked. Use GIMME_V - instead. - - * bindings/perl/simple_funcs.xsin (reference alter_phase add_window - alter_window alter_affixes add_mplex alter_mplex desync flags - verbose_prefix): Fix parameter defaults and types. - - * bindings/perl/Build.PL.in: Install GetData.pm - - * bindings/perl/simple_funcs.xsin (include include_affex): Deleted. - * bindings/perl/GetData.xs (include): Added. - - * doc/README.perl: Added. - * bindings/perl/GetData.pm.in: POD. - - * bindings/cxx/test/Makefile.am bindings/f77/Makefile.am test/Makefile.am - test/error_verbose.c test/error_verbose_prefix.c: Remove GNUisms. - -2012-04-13 D. V. Wiebe <ge...@ke...> svn:699 - * src/common.c (_GD_CanonicalPath): Terminate and don't clobber string - from realpath(). - - * bindings/make_parameters.c: Add GD_SIE_ENCODED. - - * bindings/cxx/getdata/fragment.h: Update encodings. - - * bindings/f77/fgetdata.c (GDTOKE) bindings/f77/getdata.f90.in (fgd_strtok): - Drop the 'n' parameter: just do what the C API does. - - * bindings/idl/getdata.c (gdidl_getdata gdidl_putdata): Drop /HERE: just use - the absense of FIRST_FRAME and FIRST_SAMPLE. - - * bindings/idl/getdata.c (gdidl_add_mplex): Make the MAX parameter optional. - -2012-04-01 D. V. Wiebe <ge...@ke...> svn:696 - * src/compat.c (_GD_ReadDir): Renamed from gd_readdir(). - -2012-04-01 D. V. Wiebe <ge...@ke...> svn:694 - * src/getdata.h.in: Deprecate gd_bit_t and gd_spf_t. Remove gd_count_t. - * src/getdata.h.in bindings/make_parameters.c: Remove GD_COUNT_MAX. - * cmake/CMakeLists.txt: Remove DEFINE_gd_int16_t and DEFINE_gd_uint16_t. - * src/internal.h: Calculate GD_INT_TYPE and GD_UINT_TYPE. - - * src/entry.c (_GD_CalculateEntry) src/flush.c (_GD_FieldSpec) src/getdata.c - (_GD_DoMplex) src/putdata.c (_GD_DoMplexOut gd_putdata64) src/del.c - (_GD_DeReference) src/parse.c (_GD_ParseMplex _GD_ParseBit) src/mod.c - (_GD_Change): Use GD_INT_TYPE when dealing with bitnum, numbits, count_max, - and count_val. - * src/add.c (gd_add_bit gd_add_sbit gd_add_mplex gd_madd_bit gd_madd_sbit - gd_madd_mplex) src/mod.c (gd_alter_bit gd_alter_sbit gd_alter_mplex) - bindings/python/pyentry.c (gdpy_entry_setnumbits gdpy_entry_setbitnum - gdpy_entry_setcountval gdpy_entry_setcountmax) bindings/cxx/mplexentry.cpp - (MplexEntry::MplexEntry MplexEntry::SetCountVal MplexEntry::SetCountMax) - bindings/cxx/sbitentry.cpp (SBitEntry::SBitEntry SBitEntry::SetFirstBit - SBitEntry::SetNumBits) bindings/cxx/test/big_test.cpp - bindings/cxx/bitentry.cpp (BitEntry::BitEntry BitEntry::SetFirstBit - BitEntry::SetNumBits) bindings/cxx/getdata/bitentry.h (FirstBit NumBits) - bindings/cxx/getdata/entry.h (FirstBit NumBits CountVal CountMax) - bindings/cxx/getdata/mplexentry.h (CountVal CountMax) - bindings/cxx/getdata/sbitentry.h (FirstBit NumBits) bindings/perl/GetData.xs - bindings/perl/typemap bindings/perl/simple_funcs.pl bindings/f77/fgetdata.c - (GDADBT GDADSB GDMDBT GDMDSB GDALBT GDALSB) bindings/idl/getdata.c - (gdidl_make_idl_entry gdidl_read_idl_entry gdidl_add_mplex gdidl_alter_mplex): - gd_bit_t, gd_count_t -> int. - * src/fpos.c (_GD_Seek) src/getdata.c (_GD_MultiplyData _GD_CMultiplyData - _GD_DivideData _GD_CDivideData _GD_WindowData _GD_CDivideData _GD_MplexData - _GD_DoLincom _GD_DoMultiply _GD_DoDivide _GD_DoWindow _GD_DoMplex - gd_getdata64) src/putdata.c (_GD_MplexOutData gd_putdata64) src/flimits.c - (_GD_GetEOF _GD_GetBOF gd_bof64) src/common.c (_GD_LinterpData - _GD_LincomData) src/add.c (gd_add_raw) src/spf.c (_GD_GetSPF gd_spf) - src/mod.c (_GD_SPFConvert) src/mod.c (gd_alter_entry) src/index.c - (gd_framenum_subset64) bindings/python/pyentry.c (gdpy_entry_setspf) - bindings/python/pydirfile.c (gdpy_dirfile_getdata) bindings/cxx/rawentry.cpp - (RawEntry::RawEntry RawEntry::SetSamplesPerFrame) - bindings/cxx/getdata/rawentry.h (SamplesPerFrame) bindings/perl/GetData.xs - bindings/perl/typemap bindings/perl/simple_funcs.pl bindings/f77/fgetdata.c - (GDADRW GDALRW) util/dirfile2ascii.c: gd_spf_t -> unsigned int. - * src/flush.c (_GD_WriteConst) src/mod.c (_GD_AlterScalar): Add missing - integer types. - - * src/parse.c (_GD_ParseMplex): Make count_max optional. - * src/getdata.c (_GD_DoMplex) src/add.c (_GD_Add): Handle count_max == 0. - - * src/getdata.h.in: Mark GD_FLOAT and GD_DOUBLE as deprecated. - - * src/encoding.c (_GD_FiniRawIO): Handle short writes and IO errors. - - * src/getdata.c (_GD_DoMplex): use D->lookback to determine how far to - search backwards. Also, read data in chunks of size GD_BUFFER_SIZE. - * src/open.c (_GD_Open): Initialise D->lookback. - * src/globals.c (gd_mplex_lookback): Added. - * bindings/cxx/dirfile.cpp (Dirfile::MplexLookback) - bindings/perl/simple_funcs.xsin (mplex_lookback) bindings/f77/getdata.f90.in - (fgd_mplex_lookback) bindings/f77/fgetdata.c (GDMXLB) bindings/idl/getdata.c - (gdidl_mplex_lookback): Added. - - * src/parse.c (gd_strtok): Renamed from gd_tokenise to avoid regional - spelling variations. Bindings renamed accordingly (except for the F77 - bindings). - - * bindings/python/pygetdata.c: Add GD_E_EXISTS exception. - - * bindings/python/pydirfile.h: Add mplex_lookback and verbose_prefix to - gdpy_constant_t. - * bindings/python/pydirfile.c (gdpy_dirfile_delete): Delete verbose_prefix. - * bindings/python/pydirfile.c (gdpy_dirfile_create): Initialise - mplex_lookback and verbose_prefix. - * bindings/python/pydirfile.c (gdpy_dirfile_verbose_prefix): Deleted. - * bindings/python/pydirfile.c (gdpy_dirfile_getverboseprefix - gdpy_dirfile_setverboseprefix gdpy_dirfile_getmplexlookback - gdpy_dirfile_setmplexlookback): Added. - - * bindings/Makefile.am: add src/gd_config.h to the prerequisites of - make_parameters. - - * src/flush.c (_GD_FlushFragment): Write /ENCODING for zzip and zzslim. - - * src/meta_list.c: Merged into src/field_list.c - * src/nmeta.c: Merged into src/nfields.c - - * src/add.c (_GD_InvalidEntype): Added. - * src/internal.h: Add entry_list and entry_list_flags to DIRFILE and - private_entry. - * src/internal.h (_GD_EntryIndex): Deleted. - * src/field_list.c (_GD_EntryIndex _GD_EntryList gd_entry_list): Added. - * src/field_list.c (_GD_ListEntry): Handle GD_ENTRIES_... flags. - * src/field_list.c (gd_field_list_by_type gd_vector_list gd_field_list - gd_mfield_list_by_type gd_mfield_list): Reimplement via gd_entry_list(). - - * src/nfields.c (_GD_NEntries gd_nentries): Added. - * src/nfields.c (gd_nfields gd_nvectors gd_nfields_by_type gd_nmfields - gd_nmvectors gd_nmfields_by_type): Reimplement via gd_nentries(). - - * src/field_list.c (gd_constants gd_carrays gd_strings gd_mconstants - gd_mcarrays gd_mstrings): Call _GD_NEntries for counts. - - * src/entry.c (gd_hide gd_unhide) src/del.c (_GD_Delete) src/include.c - (gd_uninclude) src/add.c (_GD_Add): Delete count updates. - - * src/name.c (_GD_Rename) src/del.c (_GD_Delete) src/include.c - (gd_uninclude) src/add.c (_GD_Add _GD_AddAlias): Invalidate metafield lists - too. - - * src/entry.c (_GD_FreeE) src/close.c (_GD_FreeD): Delete entry_lists. - - * src/globals.c (gd_flags): Don't check GD_INVALID. - - * bindings/python/pydirfile.c (gdpy_dirfile_nentries - gdpy_dirfile_entrylist) bindings/perl/GetData.xs (entry_list) - bindings/cxx/dirfile.cpp (Dirfile::NEntries Dirfile::EntryList) - bindings/f77/getdata.f90.in (fgd_nentries fgd_entry_name_max fgd_entry_list) - bindings/f77/fgetdata.c (GDNENT GDENTX GDENTN): Added. - * bindings/idl/getdata.c (gdidl_get_field_list gdidl_get_nfields)): Convert to - bindings for gd_entry_list and gd_nentries. - - * bindings/python/test/big_test.py bindings/cxx/test/big_test.cpp - bindings/perl/test/big_test.t bindings/f77/test/big_test.f - bindings/f77/test/big_test95.f90 bindings/idl/test/big_test.pro: Add tests - 237 through 240. - - * test/elist_alias.c test/elist_hidden.c test/elist_scalar.c - test/get_lincom_null.c test/get_mplex_lball.c test/get_mplex_nolb.c - test/nentries_alias.c test/nentries_hidden.c test/nentries_scalar.c - test/parse_malias_meta.c test/parse_mplex_nomax.c: Added. - - * man/: Updated. - -2012-03-28 D. V. Wiebe <ge...@ke...> svn:691 - * src/flush.c (_GD_FieldSpec) src/parse.c (_GD_ParseMplex): Swap order of - fields in MPLEX specification. - - * bindings/python/test/big_test.py bindings/cxx/test/big_test.cpp - bindings/perl/test/big_test.t bindings/f77/test/big_test.f - bindings/f77/test/big_test95.f90 bindings/idl/test/big_test.pro - test/entry_mplex_scalar.c test/get_mplex.c test/alter_mplex.c - test/put_mplex.c test/get_mplex_lb.ctest/entry_mplex.c: Update for - Standards change. - -2012-03-28 D. V. Wiebe <ge...@ke...> svn:690 - * m4/compiler.m4 (GD_C_RESTRICT_ARRAY): Fix test program. - * bindings/idl/getdata.c (gdidl_alter_mplex): Fix uninitialised variable. - -2012-03-28 D. V. Wiebe <ge...@ke...> svn:689 - * m4/compiler.m4 (GD_C_RESTRICT_ARRAY): Added. - * src/parse.c src/internal.h: Work around deficiencies in the GCC-3.4 C99 - compliance. - -2012-03-22 D. V. Wiebe <ge...@ke...> svn:683 - * src/sie.c (_GD_SampIndWrite): Fix file size calculation during truncation. - - * bindings/python/pydirfile.c (gdpy_dirfile_getdata): Make return_type and - num_<foo> optional. - -2012-03-16 D. V. Wiebe <ge...@ke...> svn:680 - * src/globals.c (gd_flags gd_verbose_prefix): Added. - * src/errors.c (_GD_SetError): Print verbose prefix, if present. - - * make_parameters.c: Promote GD_VERBOSE and GD_PRETTY_PRINT. - * bindings/cxx/dirfile.cpp (Dirfile::Flags Dirfile::VerbosePrefix) - bindings/python/pydirfile.c (gdpy_dirfile_getflags gdpy_dirfile_setflags - gdpy_dirfile_verbose_prefix) bindings/perl/simple_funcs.xsin (flags - verbose_prefix) bindings/f77/fgetdata.c (GDFLAG GDVBPX) - bindings/f77/getdata.f90.in (fgd_flags fgd_verbose_prefix) - bindings/idl/getdata.c (gdidl_flags gdidl_verbose_prefix): Added. - * bindings/python/test/big_test.py bindings/cxx/test/big_test.cpp - bindings/perl/test/big_test.t bindings/f77/test/big_test.f - bindings/f77/test/big_test95.f90 bindings/idl/test/big_test.pro: Add tests - 235, 236. - - * src/open.c (_GD_Open): Reset errno to prevent spurious error messages. - - * src/flush.c (_GD_FlushFragment): Avoid FPE. - - * test/global_flags.c test/error_verbose.c test/error_verbose_prefix.c: - Added. - - * bindings/idl/getdata.c (gdidl_open): Add missing IGNORE_REFS, - PRETTY_PRINT, TRUNCSUB. - - * bindings/f77/fgetdata.c (_GDF_CString): Take care of the malloc'ing rather - than forcing the caller to do it. - -2012-03-16 D. V. Wiebe <ge...@ke...> svn:678 - * src/errors.c src/getdata.h.in: Add GD_E_EXISTS - * src/open.c (_GD_CreateDirfile): Replace GD_E_CREAT:GD_E_CREAT_EXCL with - GD_E_EXISTS. - -2012-03-16 D. V. Wiebe <ge...@ke...> svn:676 - * configure.ac bindings/idl/package/configure.ac src/include.h - bindings/make_parameters.c bindings/cxx/internal.h bindings/idl/getdata.c - test/test.h util/dirfile2ascii.c util/checkdirfile.c: Renamed config.h to - gd_config.h to get around lossage in the Perl CORE public headers. - - * bindings/perl/test: Renamed from t. - * bindings/perl/MANIFEST.in: Renamed from MANIFEST. - * bindings/perl Makefile.am bindings/f77/test/Makefile.am: VPATH fixes. - - * src/fragment.c (gd_desync): dup the dirfile fd before closing. - * test/desync_reopen.c test/desync_reopen_inv.c: Added. - - * bindings/idl/package/configure.ac bindings/idl/package/README: Bump - GetData min version. - -2012-03-15 D. V. Wiebe <ge...@ke...> svn:675 - * src/internal.h: Add fragment->mtime, dirfile->open_flags. Deconst - fragment->sname. - * src/close.c (_GD_FreeD _GD_ShutdownDirfile): Add new parameter - (keep_dirfile) to prohibit deallocating the dirfile struct itself. - De-staticked _GD_ShutdownDirfile. - * src/include.c (_GD_Include): Compute the path relative to the parent of - fragment and store it in fragment->sname. Store mtime. - * src/close.c (_GD_FreeD): Free fragment->sname. - * src/flush.c (_GD_FlushFragment): Remove unnecessary strdup: we already - cache the basename. Update mtime. - * src/open.c (_GD_CreateDirfile): Return mtime. - * src/open.c (_GD_Open): Renamed from gd_cbopen; optionally take an existing - dirfd and DIRFILE pointer. Fix the dirfd/dirfile race condition by - canonicalising dirfile first. - * src/fragment.c (gd_desync) src/open.c (gd_cbopen): Added. - * src/getdata.h.in: Added GD_DESYNC_PATHCHECK GD_DESYNC_REOPEN. - * test/desync.c test/desync_flush.c: Added. - - * src/internal.h (offsetof): Added. - * src/compat.c (gd_readdir): Added. - * src/open.c (_GD_TruncDir): Use a thread-safe readdir where possible. - - * src/include.c (gd_include_affix): Don't call do stuff before validating - the dirfile. - - * bindings/make_parameters.c: Add desync flags. - * bindings/python/pydirfile.c (gdpy_dirfile_desync) bindings/cxx/dirfile.cpp - (Dirfile::DeSync) bindings/perl/simple_funcs.xsin (desync) - bindings/f77/getdata.f90.in (fgd_desync) bindings/f77/fgetdata.c (GDDSYN) - bindings/idl/getdata.c (gdidl_desync): Added. - * bindings/python/test/big_test.py bindings/cxx/test/big_test.cpp - bindings/perl/t/big_test.t bindings/f77/test/big_test.f - bindings/f77/test/big_test95.f90 bindings/idl/test/big_test.pro: Added test - 234. - - * bindings/cxx/test/big_test.cpp: Functionise to reduce compilation work. - - * bindings/perl/Makefile.am: Tweak yet some more. - -2012-03-14 D. V. Wiebe <ge...@ke...> svn:674 - * src/open.c (gd_cbopen): Handle failure of _GD_CanonicalPath better. - -2012-03-14 D. V. Wiebe <ge...@ke...> svn:671 - * src/flush.c (_GD_FlushFragment): Write SIE encoding directives. - - * src/sie.c (_GD_SampIndOpen): Initialise file->pos to 0 to avoid issues - with _GD_GetFilePos. - * src/sie.c (_GD_SampIndSeek): Don't short circuit if no record is loaded. - - * src/flush.c (_GD_Flush _GD_SyncOrClose): Make syncing optional with a new - parameter (syn). - * src/flush.c (gd_raw_close): Added. - * src/clsoe.c (_GD_ShutdownDirfile) src/include.c (gd_uninclude): Don't - sync, just close raw files. - - * bindings/python/pydirfile.c (gdpy_dirfile_raw_close) - bindings/cxx/dirfile.cpp (Dirfile::RawClose) bindings/perl/simple_funcs.xsin - (raw_close) bindings/f77/fgetdata.c (GDRCLO) bindings/f77/getdata.f90.in - (fgd_raw_close): Added. - * bindings/idl/getdata.c (gdidl_flush): Add /NOSYNC. - * bindings/python/test/big_test.py bindings/cxx/test/big_test.cpp - bindings/perl/t/big_test.t bindings/f77/test/big_test.f - bindings/f77/test/big_test95.f90: Added test 233. - - * bindings/perl/Build.PL.in: subclass Module::Build to properly handle - simple_funcs.xs dependency tracking. - -2012-03-06 D. V. Wiebe <ge...@ke...> svn:667 - * src/errors.c: Change prefix on verbose output to "libgetdata". - - * src/add.c (_GD_FixName): Added. - * src/add.c (_GD_Add _GD_AddAlias): Call _GD_FixName. - * test/add_alias_meta.c: Added. - - * src/open.c (_GD_TruncDir): Fix subdirectory truncation. - * src/internal.h: Remove conditional defition of AT_SYMLINK_NOFOLLOW. - * src/compat.c (gd_StatAt): Check for definition of AT_SYMLINK_NOFOLLOW - before use. - -2012-03-03 D. V. Wiebe <ge...@ke...> svn:665 - * src/getdata.h.in bindings/make_parameters.c: Added GD_TRUNCSUB open flag. - * src/open.c (_GD_TruncDir): Added. - * src/open.c (_GD_CreateDirfile): Call _GD_TruncDir. - * test/trunc_dir.c test/trunc_truncsub.c: Added. - - * src/fragment.c (gd_alter_affixes): Handle GD_E_ACCMODE and GD_E_PROTECTED - errors. - - * bindings/f77/fgetdata.c (GDDELA): Correct call to gd_delete_alias. - -2012-03-02 D. V. Wiebe <ge...@ke...> svn:664 - * src/errors.c: Added GD_E_ARGUMENT:GD_E_ARG_NODATA. - * src/parse.c (_GD_Tokenise): Take number of columns to return. - * src/parse.c (gd_tokenise): Added. - * src/internal.h: Added _GD_DIRFILE->tok_pos. - - * src/parse.c (_GD_CheckParent): Destatickify, and modify for use by - _GD_Add. - * src/add.c (_GD_Add): Call _GD_CheckParent to automatically allow - parent/meta style metafield addition via gd_add[_<whatever>](). - - * bindings/python/pydirfile.c (gdpy_dirfile_tokenise) - bindings/cxx/dirfile.cpp (Dirfile::Tokenise) bindings/perl/GetData.xs - (tokenise) bindings/f77/getdata.f90.in (fgd_tokenise) - bindings/f77/fgetdata.c (GDTOKE) bindings/idl/getdata.c (gdidl_tokenise): - Added. - - * bindings/python/test/big_test.py bindings/cxx/test/big_test.cpp - bindings/perl/t/big_test.t bindings/f77/test/big_test.f - bindings/f77/test/big_test95.f90 bindings/idl/test/big_test.pro: Add test - #232. - - * bindings/f77/getdata.f90.in (fgd_fragment_affixes): Fix GDFRAF call. - - * bindings/f77/fgetdata.c (_GDF_SetDirfile _GDF_Callback GDCOPN GDCLBK): - Don't cast between data and code pointers. Encapsulate the F77 callback - function in a container. - * bindings/f77/fgetdata.c (GDNOCB): Added. - * bindings/f77/test/gdcopn.f: Add GDCLBK and GDNOCB tests. - - * test/ascii_get.c test/ascii_put.c test/ascii_get_get.c - test/ascii_nframes.c: Delete FOPEN_TEXT. - - * test/add_meta.c test/add_meta_alias.c: Added. - -2012-02-16 D. V. Wiebe <ge...@ke...> svn:658 - * src/getdata.c (_GD_DoLincom): Get the correct SPFs. - * test/get_lincom_spf.c: Added. - - * src/open.c (_GD_CreateDirfile): When truncating, don't delete and then - recreate the format file; just truncate it. (This helps kst not get - confused when monitoring a dirfile which gets truncated.) - -2012-02-14 D. V. Wiebe <ge...@ke...> svn:656 svn:657 - * src/putdata.c (gd_putdata): Return early if num_samp == 0. - * test/put_zero.c: Added. - -2012-02-01 D. V. Wiebe <ge...@ke...> svn:652 - * configure.ac: Figure out the directory separator (ie. '/' on POSIX). - - * src/open.c (_GD_CreateDirfile): Handle DIRSEP. - * src/internal.h (_GD_Root): Added. - * src/common.c (_GD_CanonicalPath): Handle WIN32/DOS paths. - - * src/open.c (gd_cbopen): Temporarily store the full path in D->name so that - _GD_CreateDirfile can use it when needed. - - * src/spf.c (_GD_GetSPF): De const-ify E. - - * src/common.c (_GD_FindField): Fix buffer length calculation. - - * test/file.c test/fragment_name.c bindings/cxx/test/big_test.cpp - bindings/f77/test/big_test.f bindings/f77/test/big_test95.f90: Handle DIRSEP. - * bindings/f77/test/test_getdata.f.in: Added. - -2012-01-18 D. V. Wiebe <ge...@ke...> svn:650 - * src/getdata.h.in src/internal.h: Define GD_ENC_ZZSLIM GD_ZZSLIM_ENCODED. - * src/zzslim.c: Added. - * src/encoding.c: In the initialisation of _gd_ef, differentiate things - that are willing to use the Generic functions from those that aren't. Added - zzslim. - - * src/common.c (_GD_CanonicalPath): Don't truncate on ENOENT. - - * src/slim.c (_GD_SlimOpen): The slimdopen in slimlib-2.6.5 doesn't interact - well with slim's own zzip support, so let's ignore it for now. - - * bindings/make_parameters.c: Convert F77 encoding parameters to the form - GDE_xx. - - * configure.ac: zzslim tests. Always look for a C++ compiler. - * m4/encoding.m4: Separate LIBS from LDFLAGS; fix some underquoting. - -2012-01-11 D. V. Wiebe <ge...@ke...> svn:644 - * src/getdata.h.in: Added GD_MPLEX_ENTRY. Updated gd_entry_t. Defined - GD_COUNT_MAX. - - * src/legacy.c (CopyMplexEntry) src/getdata.c (_GD_MplexData _GD_DoMplex) - src/putdata.c (_GD_MplexOutData _GD_DoMplexOut) src/parse.c (_GD_ParseMplex) - src/add.c (gd_add_mplex gd_madd_mplex) src/mod.c (gd_alter_mplex): Added. - * src/internal.h: Define GD_MPLEX_LOOKBACK - - * src/entry.c (_GD_FreeE _GD_CalculateEntry gd_entry gd_validate) - src/flush.c (_GD_Flush _GD_FieldSpec _GD_FindVersion) src/fpos.c - (_GD_GetFilePos _GD_WriteSeek) src/legacy.c (GetFormat) src/getdata.c - (_GD_DoField) src/name.c (_GD_InvalidateConst _GD_InvalidateVect) - src/native.c (_GD_NativeType) src/putdata.c (_GD_DoFieldOut) src/del.c - (_GD_ClearDerived _GD_DeReference) src/flimits.c (_GD_GetEOF _GD_GetBOF) - src/parse.c (_GD_ParseFieldSpec) src/add.c (_GD_Add) src/spf.c (_GD_GetSPF) - src/mod.c (_GD_Change): Handle MPLEX. - - * src/fpos.c (_GD_Seek): De-statickify. - * src/legacy.c (CopyWindowEntry): Report as MPLEX. - * src/getdata_legacy.h: Fix mplex list in FormatType. - - * src/errors.c: Rename GD_E_BAD_ENTRY_* suberrors to GD_E_ENTRY_* for - brevity. Added GD_E_FORMAT_MPLEXVAL, GD_E_ENTRY_CNTVAL, GD_E_ENTRY_CNTMAX. - - * src/field_list.c (_GD_ListEntry): Move the alias check down so that hidden - and meta alias are handled properly. - - * internal.h src/common.c (_GD_Malloc _GD_Realloc _GD_Strdup): Moved from - internal.h. - - * bindings/make_parameters.c: Define MPLEX_ENTRY, E_FORMAT_MPLEXVAL, - COUNT_MAX. - * bindings/cxx/mplexentry.cpp bindings/cxx/getdata/mplexentry.h: Added. - * bindings/python/pyentry.c (gdpy_entry_getcountval gdpy_entry_setcountval - gdpy_entry_getcountmax gdpy_entry_setcountmax) bindings/cxx/getdata/entry.h - (Entry::CountVal Entry::CountMax) bindings/f77/getdata.f90.in (fgd_add_mplex - fgd_madd_mplex fgd_alter_mplex) bindings/f77/fgetdata.c (GDGEMX GDADMX - GDMDMX GDALMX) bindings/idl/getdata.c (gdidl_add_mplex gdidl_alter_mplex): - Added. - - * bindings/python/pyentry.c (gdpy_set_entry_from_tuple - gdpy_set_entry_from_dict gdpy_entry_getinfields gdpy_entry_setinfields - gdpy_entry_getparms) bindings/cxx/entry.cpp (CheckIndex scalar_ok) - bindings/cxx/dirfile.cpp (Dirfile::Entry) bindings/cxx/getdata/dirfile.h - bindings/perl/GetData.xs (gdp_to_entry entry) bindings/f77/getdata.f90.in - (fgd_entry fgd_add fgd_madd) bindings/f77/fgetdata.c (GDASCA GDMDWD) - bindings/idl/getdata.c (gdidl_make_idl_entry gdidl_read_idl_entry): MPLEX - bindings. - - * bindings/perl/simple_funcs.xsin: Add add_mplex, alter_mplex, madd_mplex. - * bindings/perl/simple_funcs.pl: Handle gd_count_t. - - * bindings/python/test/big_test.py bindings/cxx/test/big_test.cpp - bindings/perl/t/big_test.t bindings/f77/test/big_test.f - bindings/f77/test/big_test95.f90 bindings/idl/test/big_test.pro: Add tests - 228-231. - - * bindings/cxx/windowentry.cpp bindings/cxx/getdata/windowentry.h - bindings/idl/getdata.c (gdidl_alter_window): Get rid of - Check stuff: just use Input, for consistency. - - * test/add_mplex.c test/add_mplex_val.c test/alter_mplex.c - test/entry_mplex.c test/entry_mplex_scalar.c test/get_mplex.c - test/get_mplex_lb.c test/madd_mplex.c test/parse_mplex.c - test/parse_mplex_ncols.c test/parse_mplex_scalar.c test/put_mplex.c: Added. - -2011-12-31 D. V. Wiebe <ge...@ke...> svn:643 - * bindings/python/pyentry.c (gdpy_set_entry_from_dict): Add missing INCREF. - -2011-12-29 D. V. Wiebe <ge...@ke...> svn:641 - * src/internal.h src/encoding.c (_GD_GenericName): Added fragment->enc_data. - Pass enc_data to gd_ef->name. Flag encodings that use enc_data with - GD_EF_EDAT. - * src/parse.c (_GD_ParseDirective): Allow an optional second parameter to - /ENCODING of encoding-specific data. - * src/entry.c (_GD_ResolveEncoding): Pass in enc_data. - * src/zzip.c (_GD_ZzipName): Use enc_data to specify archive name. - -2011-12-29 D. V. Wiebe <ge...@ke...> svn:640 - * configure.ac: zzip encoding check. - * src/getdata.h.in src/internal.h: GD_ZZIP_ENCODED / GD_ENC_ZZIP; Added name - to encoding_t. - * src/zzip.c: Added. - * src/encoding.c: Add Zzip encoding; gd_ef_name_t. - * src/encoding.c (_GD_GenericName): Renamed from _GD_SetEncodedName and - pushed down into the encoding framework. - * src/encoding.c (_GD_MissingFramework): Handle GD_EF_NAME. - * src/encoding.c (_GD_ResolveEncoding): Handle external name functions. - * src/entry.c (gd_raw_filename) src/encoding.c (_GD_InitRawIO - _GD_RecodeFragment) src/move.c (_GD_MogrifyFile) src/name.c (_GD_Rename) - src/del.c (_GD_Delete) src/flimits.c (_GD_GetEOF): Call _gd_ef->name. - * test/zzip_get.c test/zzip_get_get.c test/zzip_nframes.c: Added. - -2011-12-27 D. V. Wiebe <ge...@ke...> svn:639 - * src/add.c (gd_madd_lincom gd_madd_clincom gd_madd_linterp gd_madd_bit - gd_madd_sbit gd_madd_multiply gd_madd_phase gd_madd_polynom gd_madd_cpolynom - gd_madd_string gd_madd_const gd_madd_carray): Zero entry before - initialisation. - - * src/fragment.c (gd_alter_affixes): Allow {pre,suf}fix == NULL to indicate - no change. - - * src/entry.c (_GD_FreeE): Handle aliases. - - * src/close.c (_GD_FreeD): Free fragment affixes. - - * src/debug.c (gd_colnil gd_coladd gd_colsub): Export debugging symbols. - - * src/field_list.c (_GD_ListEntry): Added. - * src/field_list.c (gd_constants gd_carrays gd_strings gd_field_list_by_type - gd_vector_list gd_field_list) src/meta_list.c (gd_mconstants gd_mcarrays - gd_mstrings gd_mfield_list_by_type gd_mvector_list gd_mfield_list): Call - _GD_ListEntry. - - * bindings/python/pyentry.c bindings/python/pyfragment.c - bindings/python/pydirfile.c: Update for DSV9. - * bindings/cxx/fragment.cpp bindings/cxx/entry.cpp bindings/cxx/dirfile.cpp - bindings/cxx/getdata/entry.h bindings/cxx/getdata/dirfile.h: Update for - DSV9. - * bindings/cxx/windowentry.cpp bindings/cxx/getdata/windowentry.h: Added. - * bindings/perl/GetData.xs bindings/perl/simple_funcs.xsin: Update for DSV9. - * bindings/f77/fgetdata.c bindings/f77/getdata.f90.in: Update for DSV9. - * bindings/idl/getdata.c: Update for DSV9. Removed most of the function - aliases. - - * bindings/make_parameters.c: Update for DSV9. Add missing - GD_E_UNKNWON_ENCODING. - - * bindings/python/pygetdata.c (initpygetdata): Handle gaps in - gdpy_exception_list. Fix exception list. - - * bindings/python/pyentry.c (gdpy_entry_settable): Set correct parameter. - - * test/vlist_alias.c: Added. - -2011-12-20 D. V. Wiebe <ge...@ke...> svn:638 - * src/entry.c (_GD_GetScalar _GD_CalculateEntry) src/common.c (_GD_GetRepr - _GD_BadInput _GD_FindFieldAndRepr: Optionally prohibit setting errors (for - use by the post-rename update stuff). - * src/errors.c: Added GD_E_FORMAT_ALIAS, GD_E_DEL_ALIAS. - * src/flush.c (_GD_FieldSpec): Write aliases. Also tweaked to allow slashed - metafield specification with DSV7. - * src/del.c (_GD_ClearDerived): Handle aliases. - * src/parse.c (_GD_CheckParent _GD_ParseAlias _GD_ResolveAlias - _GD_UpdateAliases) src/add.c (_GD_AddAlias gd_add_alias gd_madd_alias): Added. - * src/parse.c (_GD_ParseFieldSpec): Call _GD_CheckParent. - * src/parse.c (_GD_ParseDirective): Use a switch to reduce the number of - strcmps done. Handle /ALIAS. - * src/parse.c (_GD_ParseFragment): Optionally call _GD_UpdateAliases to - resolve aliases. - * src/add.c (_GD_Add gd_madd_spec gd_add_spec): Update aliases after addition. - - * src/common.c (_GD_FindField): Optionally dealias names. - - * src/del.c (_GD_Delete): Renamed from gd_delete(). - * src/del.c (gd_delete gd_delete_alias): Added. - - * src/name.c (_GD_UpdateScalar _GD_InvalidateConst _GD_UpdateInField - _GD_InvalidateVect): Added. - * src/name.c (_GD_Rename): Renamed from gd_rename(). Handle cleaning up - after the rename. - - * src/move.c (_GD_Move): Renamed from gd_move(). - - * src/name.c (_GD_ValidateField): Permit is_dot = NULL. - - * src/entry.c (gd_alias_target gd_aliases gd_naliases gd_hidden) src/move.c - (gd_move gd_move_alias) src/name.c (gd_rename gd_rename_alias): Added. - - * src/alias.c (gd_fragment_index gd_hide gd_unhide): Call _GD_FindField - instead of _GD_FindFieldAndRepr to avoid resolving aliases. As a side effect, - these function will no long ignore representation suffices. - - * src/flush.c (_GD_StringEscapeise): Handle writing slashed meta-fields. - - * src/spf.c (_GD_GetSPF): Ensure return is zero on error. - - * test/alias_num_missing.c alias_target_missing.c spf_alias_missing.c - alias_list.c del_derived_after.c madd_spec_resolv.c parse_alias_meta.c - entry_type_alias.c spf_alias.c name_after_const.c parse_malias_dup.c - add_alias.c alias_target.c alias_list_alias.c add_resolv.c spf_alias_meta.c - move_alias.c name_after.c parse_meta_jump.c parse_alias_missing.c - name_update_const.c madd_alias.c parse_alias_dup.c fragment_index_alias.c - add_spec_resolv.c alias_target_alias.c name_update.c hide_hidden.c - alias_num_alias.c parse_malias.c parse_alias_code.c parse_alias.c - alias_num.c parse_meta_malias.c parse_meta_alias.c alias_list_missing.c: - Added. - - * test/fragment_parent.c: Renamed from test/parent.c. - * test/fragment_num.c: Renamed from test/nfragments.c. - - * test/version_9_write.c: Update. - -2011-12-13 D. V. Wiebe <ge...@ke...> svn:637 - * test/fragment_affix_alter2.c test/fragment_affix_alter.c - test/fragment_affix_dup.c test/fragment_affix.c test/include_affix.c: Added. - - * src/move.c (_GD_StrCmpNull): Renamed from strcmpnull and de-statickified. - - * src/name.c (_GD_MungeFromFrag): Added. - * src/name.c (_GD_MungeCode): Converted into a swiss army munger handling - both enmunging and demunging. Most old, simple, uses of this function now - call _GD_MungeFromFrag (which calls this) instead. - * src/flush.c (_GD_DeMungeCode): Deleted in favour of the new _GD_MungeCode. - - * src/fragment.c (gd_fragment_affixes _GD_CheckAffixes _GD_ChangeAffixes - gd_alter_affixes): Added. - - * src/include.c (gd_include_affix): Renamed from gd_include. - * src/include.c (gd_include): Added. - -2011-12-11 D. V. Wiebe <ge...@ke...> svn:635 - * test/add_string_affix.c test/name_affix_bad.c test/move_affix.c - test/alter_entry_affix.c test/alter_entry_affix.c test/madd_affix.c - test/parse_meta_affix.c test/madd_index.c test/name_affix.c - test/alter_mspec_affix.c test/name_dup.c test/parse_meta_implicit_affix.c - test/add_affix.c test/alter_spec_affix.c: Added. - - * test/version_9_strict.c test/version_9_write.c: Expanded. - - * src/open.c (gd_cbopen): Set errors for _GD_CanonicalPath. - - * src/errors.c: Distingish missing codes from invalid codes for - GD_E_BAD_CODE. - - * src/name.c (gd_rename): Validate the new name first and then DeMunge it - if it's not a meta field. - - * src/move.c (gd_move): Compose the new field name by remunging it for the - new fragment. Also compose the new names of all its metafield early, if - necessary. - - * src/parse.c (_GD_ParseFieldSpec _GD_ParseDirective): Munge field codes - before lookup. Also munge the reference field. - - * src/mod.c (gd_alter_spec gd_malter_spec): The parser will end up - reapplying affixes to the field name, so undo that. - - * src/add.c (_GD_Add gd_add_string gd_add_const gd_add_const gd_madd_string - gd_madd_const gd_madd_carray): _GD_Add() returns the added entry on success. - This saves a field lookup in the others. - - * src/add.c (_GD_Add): Munge field name earlier. - - * src/name.c (gd_rename): Flag fragment as modified. - - * src/flush.c (_GD_FieldSpec): Properly write /HIDDEN directives. - -2011-12-09 D. V. Wiebe <ge...@ke...> svn:634 - * test/parse_include_preprefix.c test/version_9_strict.c test/version_9.c - test/parse_include_suffix.c test/parse_include_loop.c test/version_9_write.c - test/parse_include_sufsuffix.c test/parse_include_prefix.c - test/parse_include_prefix_dup.c test/get_phase_affix.c: Added. - - * test/add_sort.c test/add_scalar_carray.c test/add_code.c test/add_type.c - test/add_invalid.c test/put_carray.c test/add_scalar.c test/madd.c - test/add_format.c: Remove dirfile before starting. - - * test/version_8_strict.c: Fix initialisation. - - * test/version_6_write.c: Test whitespace in field names. - - * test/test.h: Armour plate macros. - - * src/internal.h: Add prefix and suffix to gd_fragment_t. - * src/name.c (_GD_MungeCode) src/flush.c (_GD_DeMungeCode) src/include.c - (_GD_SetFieldAffixes): Added. - * src/flush.c (_GD_StringEscapeise): Handle null tokens. Escape spaces - rather than assuming the caller will quote the token (which it wasn't - doing). - * src/entry.c (_GD_GetScalar) src/name.c (gd_rename) src/add.c (_GD_Add) - src/commonc. (_GD_BadInput): Munge field code before use. - * src/flush.c (_GD_PadField): Demunge field code before writing. - * src/flush.c (_GD_WriteConst): Properly demunge and escapeise scalar names. - * src/name.c (_GD_ValidateField): This function no longer takes care of - malloc'ing. Modified to return integer true on error. - * src/name.c (_GD_FlushFragment): Add prefix and suffix to INCLUDE when - present. - * src/parse.c (_GD_ParseRaw _GD_ParseLincom _GD_ParseLinterp - _GD_ParseMultiply _GD_ParseRecip _GD_ParseLincom _GD_ParseWindow - _GD_ParseDivide _GD_ParseBit _GD_ParsePhase _GD_ParsePolynom _GD_ParseConst - _GD_ParseCarray _GD_ParseString): Munge field code on parsing. - * include.c (_GD_Include): Handle affixes. - - * src/common.c (_GD_EntryCmp): Moved from src/internal.h and deinlined, - destatickified. Given that the only use of this function is to pass it to - qsort, making it static inline only ensured that it got replaced once per - translation unit that referred to it. - - * include.c (_GD_Include): Replaced the old filename comparison stage with a - simple recursion counter. - - * src/parse.c (_GD_Tokenise): Handle token-initial escaped character. - Handle "\[ux#]##\...". - - * src/flush.c (_GD_FindVersion): Prefix or suffix implies DSV >= 9. - - * src/parse.c (_GD_SetScalar): Handle bad malloc. - - * src/name.c (_GD_FieldSpec): Properly escapeise input field codes. - - * src/errors.c: Distinguish GD_E_RECURSE_CODE from GD_E_RECURSE_INCLUDE. - - * src/internal.h (_GD_Malloc _GD_Realloc _GD_Strdup): Added. - * src/commonc. (_GD_MakeFullPath): Set error if requested. - * src/common.c (_GD_MakeFullPathOnly): Added. This is a wrapper around - _GD_MakeFullPath which ensures the DIRFILE is not modified. Used by the - compatibility functions and the slim encoding framework (ie. things that have - at best a tenuous connection to the DIRFILE object). - - * src/internal.h: Define GD_MULTISTANDARD. - * src/include.c (_GD_Include): Set GD_MULTISTANDARD if moving into/out of - DSV >= 9. - * src/open.c (gd_cbopen): If the metadata contain multiple standards, figure - out a single one for the whole dirfile. - -2011-12-08 D. V. Wiebe <ge...@ke...> svn:633 - * test/svlist_hidden.c test/svlist_meta_hidden.c test/hide.c - test/flist_hidden.c test/nfields_hidden.c test/parse_version_89.c - test/nmeta_type_hidden.c test/parse_version_98.c test/nmeta_vectors_hidden.c - test/nmeta_hidden.c test/alter_entry_hidden.c test/parse_version_p8.c - test/parse_version_p9.c test/hide_unhide.c test/cvlist_meta_hidden.c - test/nfields_type_hidden.c test/vlist_hidden.c test/flist_meta_hidden.c - test/vlist_meta_hidden.c test/flist_type_meta_hidden.c - test/parse_hidden_meta.c test/cvlist_array_hidden.c test/parse_meta_meta.c - test/nfields_vector_hidden.c test/parse_hidden.c test/parse_hidden_field.c - test/cvlist_hidden.c test/cvlist_array_meta_hidden.c - test/flist_type_hidden.c: Added. - - * test/nfields_vector.c test/nfields_vector_invalid.c: Renamed from nvectors* - - * src/parse.c (_GD_ParseDirective): Parse /HIDDEN directives. - * src/entry.c (gd_hide gd_unhide): Added. - * src/nmeta.c (gd_nmfields gd_nmvectors gd_nmfields_by_type) src/nfields.c - (gd_nfields gd_nvectors gd_nfields_by_type) src/field_list.c (gd_constants - gd_carrays gd_strings gd_field_list_by_type gd_vector_list gd_field_list) - src/meta_list (gd_mconstants gd_mcarrays gd_mstrings gd_mfield_list_by_type - gd_mvector_list gd_mfield_list): Compensate for hidden fields. - * src/flush.c (_GD_FieldSpec): Write /HIDDEN directives. - * src/flush.c (_GD_FindVersion): Consider hidden entries. - * src/mod.c (_GD_Change): Prohibit changing hiddenness via gd_alter_entry(). - - * src/parse.c (_GD_ParseDirective): Forbid a metafield code from appearing - as a parent in /META directives. - - * src/internal.h: Record the number of each type of field, rather than just - for the scalar field types. - * src/internal.h (_GD_EntryIndex): Added. - * src/open.c (gd_cbopen): Initialise D->n[INDEX_ENTRY]. - * src/nmeta.c (gd_nmvectors gd_nmfields_by_type) src/nfields.c (gd_nvectors - gd_nfields_by_type) src/field_list.c (gd_constants gd_carrays gd_strings - gd_field_list_by_type gd_vector_list) src/meta_list.c (gd_mconstants - gd_mcarrays gd_mstrings gd_mfield_list_by_type gd_mvector_list): Use type - counts. - * src/del.c (gd_delete) src/parse.c (_GD_ParseFieldSpec) src/include.c - (gd_uninclude) src/add.c (_GD_Add): Update type counts. - * src/field_list.c (_gd_entype_index): Deleted. - - *... [truncated message content] |
From: <ket...@us...> - 2014-12-07 05:25:41
|
Revision: 936 http://sourceforge.net/p/getdata/code/936 Author: ketiltrout Date: 2014-12-07 05:25:36 +0000 (Sun, 07 Dec 2014) Log Message: ----------- GetData-0.8.6 released. Modified Paths: -------------- branches/getdata-0.8/ChangeLog Modified: branches/getdata-0.8/ChangeLog =================================================================== --- branches/getdata-0.8/ChangeLog 2014-12-07 05:05:02 UTC (rev 935) +++ branches/getdata-0.8/ChangeLog 2014-12-07 05:25:36 UTC (rev 936) @@ -1,3 +1,6 @@ +2014-12-07 D. V. Wiebe <ge...@ke...> svn:935 + GetData-0.8.6 released. + 2014-12-06 D. V. Wiebe <ge...@ke...> svn:932 Backport more bugfixes from trunk: This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ket...@us...> - 2014-12-07 05:05:10
|
Revision: 935 http://sourceforge.net/p/getdata/code/935 Author: ketiltrout Date: 2014-12-07 05:05:02 +0000 (Sun, 07 Dec 2014) Log Message: ----------- Doc updates Modified Paths: -------------- branches/getdata-0.8/RELEASE_NOTES.in Modified: branches/getdata-0.8/RELEASE_NOTES.in =================================================================== --- branches/getdata-0.8/RELEASE_NOTES.in 2014-12-06 09:57:30 UTC (rev 934) +++ branches/getdata-0.8/RELEASE_NOTES.in 2014-12-07 05:05:02 UTC (rev 935) @@ -21,11 +21,11 @@ --------------------------------------------------------------------------- Four packages are available: -* getdata-0.8.4.tar.bz2/.gz: the full source code to the library, with +* getdata-0.8.6.tar.bz2/.gz: the full source code to the library, with bindings. This package uses the GNU autotools build system, and is designed for POSIX systems (UNIX, Linux, BSD, MacOS X, Cygwin, MSys, &c.) -* getdata_win-0.8.4.zip: a reduced source code package, with the CMake +* getdata_win-0.8.6.zip: a reduced source code package, with the CMake build system designed to be built on Microsoft Windows, either using the free MinGW compiler, or else Microsoft's Visual C++ compiler. (The full source package above can also be built using MinGW, if the @@ -34,12 +34,12 @@ package lacks support for compressed dirfiles, the Legacy API, and a few other features. This build is used in native Microsoft Windows builds of kst2. -* idl_getdata-0.8.4.tar.bz2/.gz: the Interactive Data Language (IDL) +* idl_getdata-0.8.6.tar.bz2/.gz: the Interactive Data Language (IDL) bindings, packaged separately with an autotools build system, designed to be built against an already installed version of GetData. Due to licensing restrictions, pre-built packages rarely come with these bindings, and this package allows end-users to add support for IDL -* matlab_getdata-0.8.4.tar.bz2/.gz: the MATLAB bindings, packaged separately +* matlab_getdata-0.8.6.tar.bz2/.gz: the MATLAB bindings, packaged separately with an autotools build system, designed to be built against an already installed version of GetData. Due to licensing restrictions, pre-built packages rarely come with these bindings, and this package allows end-users This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ket...@us...> - 2014-12-06 09:57:34
|
Revision: 934 http://sourceforge.net/p/getdata/code/934 Author: ketiltrout Date: 2014-12-06 09:57:30 +0000 (Sat, 06 Dec 2014) Log Message: ----------- doc/build system updates Modified Paths: -------------- branches/getdata-0.8/NEWS branches/getdata-0.8/RELEASE_NOTES.in branches/getdata-0.8/bindings/f77/Makefile.am branches/getdata-0.8/bindings/matlab/Makefile.am branches/getdata-0.8/m4/idl.m4 branches/getdata-0.8/m4/perl.m4 branches/getdata-0.8/m4/version.m4 branches/getdata-0.8/man/dirfile.5 Modified: branches/getdata-0.8/NEWS =================================================================== --- branches/getdata-0.8/NEWS 2014-12-06 07:48:51 UTC (rev 933) +++ branches/getdata-0.8/NEWS 2014-12-06 09:57:30 UTC (rev 934) @@ -1,4 +1,4 @@ -New in verison 0.8.6a: +New in verison 0.8.6: Library Changes: Modified: branches/getdata-0.8/RELEASE_NOTES.in =================================================================== --- branches/getdata-0.8/RELEASE_NOTES.in 2014-12-06 07:48:51 UTC (rev 933) +++ branches/getdata-0.8/RELEASE_NOTES.in 2014-12-06 09:57:30 UTC (rev 934) @@ -1,4 +1,4 @@ -GetData 0.8.4 is known to compile and pass the test suite on the following +GetData 0.8.6 is known to compile and pass the test suite on the following systems (including C++ and Fortran bindings): Linux: Modified: branches/getdata-0.8/bindings/f77/Makefile.am =================================================================== --- branches/getdata-0.8/bindings/f77/Makefile.am 2014-12-06 07:48:51 UTC (rev 933) +++ branches/getdata-0.8/bindings/f77/Makefile.am 2014-12-06 09:57:30 UTC (rev 934) @@ -45,7 +45,6 @@ endif FCFLAGS += $(FC_WALL) $(FC_WEXTRA) -AM_CPPFLAGS = -I$(top_srcdir)/src EXTRA_DIST=getdata.f.in getdata.f90.in SUBDIRS = test @@ -56,7 +55,7 @@ nodist_include_HEADERS=getdata.f $(F95_INC) lib_LTLIBRARIES=libfgetdata.la $(F95_LIB) -libfgetdata_la_CPPFLAGS = ${CC_WALL} $(CC_WEXTRA) +libfgetdata_la_CPPFLAGS = ${CC_WALL} $(CC_WEXTRA) -I$(top_srcdir)/src libfgetdata_la_SOURCES = fgetdata.c fgetdata.h libfgetdata_la_LIBADD=../../src/libgetdata.la libfgetdata_la_LDFLAGS = -version-info @FGETDATA_VERSION@ Modified: branches/getdata-0.8/bindings/matlab/Makefile.am =================================================================== --- branches/getdata-0.8/bindings/matlab/Makefile.am 2014-12-06 07:48:51 UTC (rev 933) +++ branches/getdata-0.8/bindings/matlab/Makefile.am 2014-12-06 09:57:30 UTC (rev 934) @@ -80,7 +80,7 @@ lib_LTLIBRARIES=libgetdata-matlab.la libgetdata_matlab_la_SOURCES=matlab.c gd_matlab.h -libgetdata_matlab_la_CPPFLAGS=${MATLAB_CPPFLAGS} +libgetdata_matlab_la_CPPFLAGS=${MATLAB_CPPFLAGS} ${AM_CPPFLAGS} libgetdata_matlab_la_LDFLAGS=-version-info @MATLABGETDATA_VERSION@ if GD_EXTERNAL Modified: branches/getdata-0.8/m4/idl.m4 =================================================================== --- branches/getdata-0.8/m4/idl.m4 2014-12-06 07:48:51 UTC (rev 933) +++ branches/getdata-0.8/m4/idl.m4 2014-12-06 09:57:30 UTC (rev 934) @@ -119,8 +119,8 @@ AC_SUBST([IDL_CFLAGS]) AC_SUBST([IDL_CFLAGS]) +AC_MSG_CHECKING([IDL linker flags]) IDL_LIBS=`(echo 'print,"@@@"+!MAKE_DLL.LD' | $IDL 2>&1) | $GREP '@@@' | sed -e 's/@@@@<:@^ @:>@* \(.*\?\) -o.*/\1/' | sed -e 's/-m \?[\w]*//g'` -AC_MSG_CHECKING([IDL linker flags]) AC_MSG_RESULT([$IDL_LIBS]) AC_SUBST([IDL_LIBS]) Modified: branches/getdata-0.8/m4/perl.m4 =================================================================== --- branches/getdata-0.8/m4/perl.m4 2014-12-06 07:48:51 UTC (rev 933) +++ branches/getdata-0.8/m4/perl.m4 2014-12-06 09:57:30 UTC (rev 934) @@ -167,7 +167,7 @@ if test $perl_inst_type = "vendor"; then GD_PERL_CONFIG([perldir], [vendorarchexp]) GD_PERL_CONFIG([perlmandir], [vendorman3direxp]) - if test perldir = "UNKNOWN"; then + if test $perldir = "UNKNOWN"; then perl_inst_type = "site"; fi fi @@ -180,7 +180,7 @@ perlmandir="${man3dir}" fi - if test $perlmandir = "UNKNOWN"; then + if test "x$perlmandir" = "xUNKNOWN"; then perlmandir="${mandir}" fi Modified: branches/getdata-0.8/m4/version.m4 =================================================================== --- branches/getdata-0.8/m4/version.m4 2014-12-06 07:48:51 UTC (rev 933) +++ branches/getdata-0.8/m4/version.m4 2014-12-06 09:57:30 UTC (rev 934) @@ -21,25 +21,25 @@ m4_define(getdata_major, 0) m4_define(getdata_minor, 8) m4_define(getdata_revision, 6) -m4_define(getdata_extra, [a]) +m4_define(getdata_extra, []) m4_define(getdata_version, getdata_major.getdata_minor.getdata_revision[]getdata_extra) dnl libgetdata current interface version m4_define(getdata_iface_version, 6) dnl libgetdata current interface implementation revision -m4_define(getdata_impl_revision, 4) +m4_define(getdata_impl_revision, 5) dnl libgetdata interface age (current interface - oldest supported interface) m4_define(getdata_iface_age, 1) dnl libgetdata++ interface version info -m4_define(getdataxx_version, 5:0:2) +m4_define(getdataxx_version, 5:1:2) dnl libfgetdata interface version info -m4_define(fgetdata_version, 4:1:2) +m4_define(fgetdata_version, 4:2:2) dnl libf95getdata interface version info -m4_define(f95getdata_version, 5:0:3) +m4_define(f95getdata_version, 5:1:3) dnl libgetdata-matlab interface version info m4_define(matlabgetdata_version, 0:1:0) Modified: branches/getdata-0.8/man/dirfile.5 =================================================================== --- branches/getdata-0.8/man/dirfile.5 2014-12-06 07:48:51 UTC (rev 933) +++ branches/getdata-0.8/man/dirfile.5 2014-12-06 09:57:30 UTC (rev 934) @@ -1,6 +1,6 @@ .\" dirfile.5. The dirfile man page. .\" -.\" Copyright (C) 2005, 2006, 2008, 2009 D. V. Wiebe +.\" Copyright (C) 2005, 2006, 2008, 2009, 2014 D. V. Wiebe .\" .\"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" .\" @@ -13,7 +13,7 @@ .\" Texts. A copy of the license is included in the `COPYING.DOC' file .\" as part of this distribution. .\" -.TH dirfile 5 "1 April 2012" "Standards Version 9" "DATA FORMATS" +.TH dirfile 5 "15 July 2014" "Standards Version 9" "DATA FORMATS" .SH NAME dirfile \(em a filesystem-based database format for time-ordered binary data .SH DESCRIPTION @@ -111,16 +111,11 @@ with the IEEE-754 real part followed by the IEEE-754 imaginary part. The specified endianness of the two components follows that of purely real floating point numbers. Endianness does not affect the ordering of the real and -imaginary parts. This format also conforms to the C99 standard. The latest -C++ standard (C++98) does not specify a standard storage format for native -complex numbers, but the upcoming standard, (C++0x) is intended to specify the -above format for compatibility with C99 -.RI ( see : -ISO/IEC JTC1/SC22/WG21/N1388). +imaginary parts. This format also conforms to the C99 and C++11 standards. To aid in using complex valued data, dirfile field codes may contain a .I representation suffix -which specifies a norm to apply to the complex valued data to convert it into +which specifies a function to apply to the complex valued data to map it into purely real data. See .BR dirfile\-format (5). This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ket...@us...> - 2014-12-06 07:48:57
|
Revision: 933 http://sourceforge.net/p/getdata/code/933 Author: ketiltrout Date: 2014-12-06 07:48:51 +0000 (Sat, 06 Dec 2014) Log Message: ----------- Doc updates from trunk Modified Paths: -------------- branches/getdata-0.8/man/gd_add_bit.3 branches/getdata-0.8/man/gd_alter_bit.3 branches/getdata-0.8/man/gd_alter_encoding.3.in branches/getdata-0.8/man/gd_alter_entry.3 branches/getdata-0.8/man/gd_linterp_tablename.3 branches/getdata-0.8/man/gd_madd_bit.3 branches/getdata-0.8/man/gd_naliases.3 branches/getdata-0.8/man/gd_raw_filename.3 Property Changed: ---------------- branches/getdata-0.8/ Index: branches/getdata-0.8 =================================================================== --- branches/getdata-0.8 2014-12-05 21:16:00 UTC (rev 932) +++ branches/getdata-0.8 2014-12-06 07:48:51 UTC (rev 933) Property changes on: branches/getdata-0.8 ___________________________________________________________________ Modified: svn:ignore ## -28,3 +28,4 ## README.txt config.lt compile +test-driver Modified: branches/getdata-0.8/man/gd_add_bit.3 =================================================================== --- branches/getdata-0.8/man/gd_add_bit.3 2014-12-05 21:16:00 UTC (rev 932) +++ branches/getdata-0.8/man/gd_add_bit.3 2014-12-06 07:48:51 UTC (rev 933) @@ -1,6 +1,6 @@ .\" gd_add_bit.3. The gd_add_bit man page. .\" -.\" Copyright (C) 2008, 2009, 2010, 2012 D. V. Wiebe +.\" Copyright (C) 2008, 2009, 2010, 2012, 2013 D. V. Wiebe .\" .\"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" .\" @@ -13,7 +13,7 @@ .\" Texts. A copy of the license is included in the `COPYING.DOC' file .\" as part of this distribution. .\" -.TH gd_add_bit 3 "26 July 2012" "Version 0.8.1" "GETDATA" +.TH gd_add_bit 3 "1 October 2013" "Version 0.8.6" "GETDATA" .SH NAME gd_add_bit, gd_add_carray gd_add_clincom, gd_add_const, gd_add_cpolynom, gd_add_crecip, gd_add_divide, gd_add_lincom, gd_add_linterp, gd_add_multiply, @@ -328,10 +328,10 @@ .HP .BI "int gd_add_cpolynom(DIRFILE *" dirfile ", const char *" field_name , .BI "int " poly_ord ", const char *" in_fields ", const double *" ca , -.BI int " fragment_index ); +.BI "int " fragment_index ); .HP .BI "int gd_add_crecip(DIRFILE *" dirfile ", const char *" field_name , -.BI "const char *" in_field ", double " cdividend [2], +.BI "const char *" in_field ", const double " cdividend [2], .BI "int " fragment_index ); .hy .ad n @@ -341,7 +341,7 @@ or .IR ca should have twice as many (purely real) elements, consisting of alternating -real and imaginary parts for the complex data. For example, +real and imaginary parts for the complex data. That is, for example, .IR ca [0] should be the real part of the first co-efficient, .IR ca [1] @@ -352,7 +352,24 @@ the imaginary part of the second co-efficient, and so on. Similarly, the .I cdividend parameter becomes a double precision array of length two. +.PP +For +.BR gd_add_clincom () +and +.BR gd_add_cpolynom (), +these are simply different (but equivalent) declarations of the C99 function +entry point. For +.BR gd_add_crecip (), +however, a different entry point is needed (since the +.I cdividend +parameter is passed by reference instead of by value). In the interests of +portability, the C89 version of +.BR gd_add_crecip () +is always available, and may be accessed as +.BR gd_add_crecip89 (), +with the C89 prototype, in both the C99 and C89 APIs. + .SH SEE ALSO .BR gd_add (3), .BR gd_add_spec (3), Modified: branches/getdata-0.8/man/gd_alter_bit.3 =================================================================== --- branches/getdata-0.8/man/gd_alter_bit.3 2014-12-05 21:16:00 UTC (rev 932) +++ branches/getdata-0.8/man/gd_alter_bit.3 2014-12-06 07:48:51 UTC (rev 933) @@ -1,6 +1,6 @@ .\" gd_alter_bit.3. The gd_alter_bit man page. .\" -.\" Copyright (C) 2008, 2009, 2010, 2012 D. V. Wiebe +.\" Copyright (C) 2008, 2009, 2010, 2012, 2013 D. V. Wiebe .\" .\"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" .\" @@ -13,7 +13,7 @@ .\" Texts. A copy of the license is included in the `COPYING.DOC' file .\" as part of this distribution. .\" -.TH gd_alter_bit 3 "26 July 2012" "Version 0.8.1" "GETDATA" +.TH gd_alter_bit 3 "1 October 2013" "Version 0.8.6" "GETDATA" .SH NAME gd_alter_bit, gd_alter_carray, gd_alter_clincom, gd_alter_const, gd_alter_cpolynom, gd_alter_crecip, gd_alter_divide, gd_alter_lincom, @@ -167,7 +167,9 @@ .IR m ", " b ", " a ", " cm ", " cb ", or " ca ; .TP .B 0\fR: -.IR spf ", " n_fields ", " numbits ", " cdividend ", or " dividend ; +.IR spf ", " n_fields ", " numbits ", " cdividend ", " dividend , +or +.IR array_len ; .TP .B -1\fR: .IR bitnum " or " period ; @@ -197,8 +199,17 @@ .I recode is non-zero, the binary file associated with the .B RAW -field will be re-encoded to reflect the new field parameters. +field will be re-encoded to reflect the new field parameters. In this case, +the field's I/O pointer will be reset to the beginning-of-frame. +If +.BR gd_alter_carray () +is used to increase the length of a +.B CARRAY +field, the added elements will be uninitialised. Use +.BR gd_put_carray_slice (3) +or equivalent to initialise them. + See .B NOTES below for information on using @@ -294,7 +305,7 @@ .BI "int " poly_ord ", const char *" in_fields ", const double *" ca ); .HP .BI "int gd_alter_crecip(DIRFILE *" dirfile ", const char *" field_code , -.BI "const char *" in_field ", double " cdividend [2]); +.BI "const char *" in_field ", const double " cdividend [2]); .hy .ad n .PP @@ -303,7 +314,7 @@ or .IR ca should have twice as many (purely real) elements, consisting of alternating -real and imaginary parts for the complex data. For example, +real and imaginary parts for the complex data. That is, for example, .IR ca [0] should be the real part of the first co-efficient, .IR ca [1] @@ -314,6 +325,22 @@ the imaginary part of the second co-efficient, and so on. Similarly, the .I cdividend parameter becomes a double precision array of length two. +.PP +For +.BR gd_alter_clincom () +and +.BR gd_alter_cpolynom (), +these are simply different (but equivalent) declarations of the C99 function +entry point. For +.BR gd_alter_crecip (), +however, a different entry point is needed (since the +.I cdividend +parameter is passed by reference instead of by value). In the interests of +portability, the C89 version of +.BR gd_alter_crecip () +is always available, and may be accessed as +.BR gd_alter_crecip89 (), +with the C89 prototype, in both the C99 and C89 APIs. .SH SEE ALSO .BR gd_alter_entry (3), Modified: branches/getdata-0.8/man/gd_alter_encoding.3.in =================================================================== --- branches/getdata-0.8/man/gd_alter_encoding.3.in 2014-12-05 21:16:00 UTC (rev 932) +++ branches/getdata-0.8/man/gd_alter_encoding.3.in 2014-12-06 07:48:51 UTC (rev 933) @@ -2,7 +2,7 @@ .\" .\" @configure_input@ .\" -.\" Copyright (C) 2008, 2009, 2010 D. V. Wiebe +.\" Copyright (C) 2008, 2009, 2010, 2014 D. V. Wiebe .\" .\"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" .\" @@ -15,7 +15,7 @@ .\" Texts. A copy of the license is included in the `COPYING.DOC' file .\" as part of this distribution. .\" -.TH gd_alter_encoding 3 "20 July 2010" "Version 0.7.0" "GETDATA" +.TH gd_alter_encoding 3 "16 October 2014" "Version 0.8.6" "GETDATA" .SH NAME gd_alter_encoding \(em modify the binary encoding of data in a dirfile .SH SYNOPSIS @@ -32,8 +32,8 @@ .BR gd_alter_encoding () function sets the binary encoding of the format specification fragment given by .I fragment_index -to -.I byte_sex +to the encoding specified by +.I encoding in the dirfile(5) database specified by .IR dirfile . The binary encoding of a fragment indicate the encoding of data stored in binary @@ -45,13 +45,14 @@ fields is ignored. The -.I byte_sex +.I encoding argument should be one of the following: .IP .nh .ad l .BR GD_UNENCODED ,\~ GD_BZIP2_ENCODED ,\~ GD_GZIP_ENCODED ,\~ -.BR GD_LZMA_ENCODED ,\~ GD_SLIM_ENCODED ,\~ GD_TEXT_ENCODED . +.BR GD_LZMA_ENCODED ,\~ GD_SLIM_ENCODED ,\~ GD_SIE_ENCODED ,\~ +.BR GD_TEXT_ENCODED . .ad n .hy .PP @@ -73,7 +74,11 @@ .B RAW fields to account for the change in binary encoding. If the encoding of the fragment is encoding insensitive, or if the data type is only one byte in -size, no change is made. If +size, no change is made. The I/O pointer of all affected +.B RAW +fields is reset to the beginning-of-frame. + +If .I recode is zero, affected binary files are left untouched. Modified: branches/getdata-0.8/man/gd_alter_entry.3 =================================================================== --- branches/getdata-0.8/man/gd_alter_entry.3 2014-12-05 21:16:00 UTC (rev 932) +++ branches/getdata-0.8/man/gd_alter_entry.3 2014-12-06 07:48:51 UTC (rev 933) @@ -1,6 +1,6 @@ .\" gd_alter_entry.3. The gd_alter_entry man page. .\" -.\" Copyright (C) 2008, 2009, 2010, 2012 D. V. Wiebe +.\" Copyright (C) 2008, 2009, 2010, 2012, 2013 D. V. Wiebe .\" .\"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" .\" @@ -13,7 +13,7 @@ .\" Texts. A copy of the license is included in the `COPYING.DOC' file .\" as part of this distribution. .\" -.TH gd_alter_entry 3 "26 July 2012" "Version 0.8.1" "GETDATA" +.TH gd_alter_entry 3 "1 October 2013" "Version 0.8.6" "GETDATA" .SH NAME gd_alter_entry \(em modify the metadata of a dirfile field .SH SYNOPSIS @@ -112,21 +112,25 @@ and then create a new field of the desired type with .BR gd_add (3). -Some field parameters have special values which indicate no change should be -made to the parameter. Specifically, if any of the string parameters, or -the parameters -.RI ( entry -> a ,\~ entry -> b ,\~ entry -> m ,\~ entry -> ca ,\~ entry -> cb , -.RI "or " entry -> cm ) -are NULL, the old values will be retained. Similarly, if -.IR entry -> spf ", " entry -> n_fields ", or " entry -> numbits -is zero, or if -.IR entry -> bitnum -is -1, or if -.IR entry -> data_type ", or " entry -> const_type -are equal to -.BR GD_NULL , -these parameters will not be modified. - +Some entry members have special values which indicate no change should be +made to the member. These special values are: +.TP +.B NULL\fR: +any of the string members, also +.IR m ", " b ", " a ", " cm ", " cb ", or " ca ; +.TP +.B 0\fR: +.IR spf ", " n_fields ", " numbits ", " cdividend ", " dividend ", or " array_len ; +.TP +.B -1\fR: +.IR bitnum " or " period ; +.TP +.B GD_NULL\fR: +.IR data_type " or " const_type ; +.TP +.B GD_WINDOP_UNK\fR: +.IR windop . +.PP All .IR entry -> scalar elements relevant for the given field type must be initialised to one of the @@ -142,10 +146,10 @@ .IR entry -> scalar_ind element should also be set. .IP \(bu 4 -a pointer the empty string (""). In this case, no change is made to the field -code for the corresponding field parameter: if one already existed, it is kept, -otherwise the corresponding literal numerical parameter is used. If the value -of the corresponding numerical +a pointer to the empty string (""). In this case, no change is made to the +field code for the corresponding field parameter: if one already existed, it is +kept, otherwise the corresponding literal numerical parameter is used. If the +value of the corresponding numerical .I entry member is the special value listed above indicating no change, no change is made to the field parameter at all. @@ -157,6 +161,12 @@ member contains a special value indicating no change listed above, GetData will de-reference the previous field code value and convert it into a literal number before removing the field code from the entry. +.PP +If this function is used to increase the length of a +.B CARRAY +field, the added elements will be uninitialised. Use +.BR gd_put_carray_slice (3) +or equivalent to initialise them. .SH RETURN VALUE On success, Modified: branches/getdata-0.8/man/gd_linterp_tablename.3 =================================================================== --- branches/getdata-0.8/man/gd_linterp_tablename.3 2014-12-05 21:16:00 UTC (rev 932) +++ branches/getdata-0.8/man/gd_linterp_tablename.3 2014-12-06 07:48:51 UTC (rev 933) @@ -1,6 +1,6 @@ .\" gd_linterp_tablename.3. The gd_linterp_tablename man page. .\" -.\" Copyright (C) 2012 D. V. Wiebe +.\" Copyright (C) 2012, 2013 D. V. Wiebe .\" .\"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" .\" @@ -13,7 +13,7 @@ .\" Texts. A copy of the license is included in the `COPYING.DOC' file .\" as part of this distribution. .\" -.TH gd_linterp_tablename 3 "1 August 2012" "Version 0.8.1" "GETDATA" +.TH gd_linterp_tablename 3 "10 December 2013" "Version 0.8.6" "GETDATA" .SH NAME gd_linterp_tablename \(em retrieve the pathname of a look-up table in a dirfile .SH SYNOPSIS @@ -21,7 +21,7 @@ .HP .nh .ad l -.BI "const char *gd_linterp_tablename(DIRFILE *" dirfile ", const char" +.BI "char *gd_linterp_tablename(DIRFILE *" dirfile ", const char" .BI * field_code ); .hy .ad n @@ -51,9 +51,13 @@ .SH RETURN VALUE On success, .BR gd_linterp_tablename () -returns the full pathname of the LUT associated with the specified field. On -error, NULL is returned and the dirfile error is set to a non-zero error value. -Possible error values are: +returns the full pathname of the LUT associated with the specified field in a +buffer allocated by +.BR malloc (3). +Once no longer needed, the returned pointer should be passed to +.BR free (3) +to deallocate the associated memory. On error, NULL is returned and the dirfile +error is set to a non-zero error value. Possible error values are: .TP 8 .B GD_E_ALLOC The library was unable to allocate memory. @@ -88,4 +92,6 @@ .BR gd_error (3), .BR gd_error_string (3), .BR dirfile (5), -.BR dirfile-format (5) +.BR dirfile-format (5), +.BR free (3), +.BR malloc (3) Modified: branches/getdata-0.8/man/gd_madd_bit.3 =================================================================== --- branches/getdata-0.8/man/gd_madd_bit.3 2014-12-05 21:16:00 UTC (rev 932) +++ branches/getdata-0.8/man/gd_madd_bit.3 2014-12-06 07:48:51 UTC (rev 933) @@ -1,6 +1,6 @@ .\" gd_madd_bit.3. The gd_madd_bit man page. .\" -.\" Copyright (C) 2008, 2009, 2010, 2012 D. V. Wiebe +.\" Copyright (C) 2008, 2009, 2010, 2012, 2013 D. V. Wiebe .\" .\"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" .\" @@ -13,7 +13,7 @@ .\" Texts. A copy of the license is included in the `COPYING.DOC' file .\" as part of this distribution. .\" -.TH gd_madd_bit 3 "1 April 2012" "Version 0.8.0" "GETDATA" +.TH gd_madd_bit 3 "30 September 2013" "Version 0.8.6" "GETDATA" .SH NAME gd_madd_bit, gd_madd_carray, gd_madd_clincom, gd_madd_const, gd_madd_cpolynom, gd_madd_crecip, gd_madd_divide, gd_madd_lincom, gd_madd_linterp, @@ -283,7 +283,7 @@ or .IR ca should have twice as many (purely real) elements, consisting of alternating -real and imaginary parts for the complex data. For example, +real and imaginary parts for the complex data. That is, for example, .IR ca [0] should be the real part of the first co-efficient, .IR ca [1] @@ -294,6 +294,22 @@ the imaginary part of the second co-efficient, and so on. Similarly, the .I cdividend parameter becomes a double precision array of length two. +.PP +For +.BR gd_madd_clincom () +and +.BR gd_madd_cpolynom (), +these are simply different (but equivalent) declarations of the C99 function +entry point. For +.BR gd_madd_crecip (), +however, a different entry point is needed (since the +.I cdividend +parameter is passed by reference instead of by value). In the interests of +portability, the C89 version of +.BR gd_madd_crecip () +is always available, and may be accessed as +.BR gd_madd_crecip89 (), +with the C89 prototype, in both the C99 and C89 APIs. .SH SEE ALSO .BR gd_add_bit (3), Modified: branches/getdata-0.8/man/gd_naliases.3 =================================================================== --- branches/getdata-0.8/man/gd_naliases.3 2014-12-05 21:16:00 UTC (rev 932) +++ branches/getdata-0.8/man/gd_naliases.3 2014-12-06 07:48:51 UTC (rev 933) @@ -1,6 +1,6 @@ .\" gd_naliases.3. The gd_naliases man page. .\" -.\" Copyright (C) 2012 D. V. Wiebe +.\" Copyright (C) 2012, 2013 D. V. Wiebe .\" .\"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" .\" @@ -13,7 +13,7 @@ .\" Texts. A copy of the license is included in the `COPYING.DOC' file .\" as part of this distribution. .\" -.TH gd_naliases 3 "1 January 2012" "Version 0.8.0" "GETDATA" +.TH gd_naliases 3 "1 October 2013" "Version 0.8.6" "GETDATA" .SH NAME gd_naliases \(em report the number of aliases of a field in a dirfile .SH SYNOPSIS @@ -40,9 +40,9 @@ .SH RETURN VALUE Upon successful completion, .BR gd_naliases () -returns the number of vector fields in the dirfile. If successful, this count -will be at least one. On error, it returns zero and sets the dirfile error -to a non-zero error value. Possible error values are: +returns the number of aliases of the specified field code in the dirfile. If +successful, this count will be at least one. On error, it returns zero and +sets the dirfile error to a non-zero error value. Possible error values are: .TP 8 .B GD_E_BAD_CODE The supplied field code was not found in the database. Modified: branches/getdata-0.8/man/gd_raw_filename.3 =================================================================== --- branches/getdata-0.8/man/gd_raw_filename.3 2014-12-05 21:16:00 UTC (rev 932) +++ branches/getdata-0.8/man/gd_raw_filename.3 2014-12-06 07:48:51 UTC (rev 933) @@ -1,6 +1,6 @@ .\" gd_raw_filename.3. The gd_raw_filename man page. .\" -.\" Copyright (C) 2008, 2009, 2010 D. V. Wiebe +.\" Copyright (C) 2008, 2009, 2010, 2013 D. V. Wiebe .\" .\"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" .\" @@ -13,7 +13,7 @@ .\" Texts. A copy of the license is included in the `COPYING.DOC' file .\" as part of this distribution. .\" -.TH gd_raw_filename 3 "16 July 2010" "Version 0.7.0" "GETDATA" +.TH gd_raw_filename 3 "10 December 2013" "Version 0.8.6" "GETDATA" .SH NAME gd_raw_filename \(em retrieve the pathname of a binary file in a dirfile .SH SYNOPSIS @@ -21,14 +21,14 @@ .HP .nh .ad l -.BI "const char *gd_raw_filename(DIRFILE *" dirfile ", const char" +.BI "char *gd_raw_filename(DIRFILE *" dirfile ", const char" .BI * field_code ); .hy .ad n .SH DESCRIPTION The .BR gd_raw_filename () -function retrieves the pathname of the file backing the +function reports the pathname of the file backing the .B RAW field specified by .I field_code @@ -42,8 +42,12 @@ On success, .BR gd_raw_filename () returns the full pathname of the binary file associated with the specified -field. On error, NULL is returned and the dirfile error is set to a non-zero -error value. Possible error values are: +field in buffer allocated by +.BR malloc (3). +The returned pointer should be passed to +.BR free (3) +once the caller no longer needs it. On error, NULL is returned and the dirfile +error is set to a non-zero error value. Possible error values are: .TP 8 .B GD_E_ALLOC The library was unable to allocate memory. @@ -83,4 +87,6 @@ .BR gd_error_string (3), .BR dirfile (5), .BR dirfile-encoding (5), -.BR dirfile-format (5) +.BR dirfile-format (5), +.BR free (3) +.BR malloc (3) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ket...@us...> - 2014-12-05 21:16:11
|
Revision: 932 http://sourceforge.net/p/getdata/code/932 Author: ketiltrout Date: 2014-12-05 21:16:00 +0000 (Fri, 05 Dec 2014) Log Message: ----------- Yet more backporting. Modified Paths: -------------- branches/getdata-0.8/ChangeLog branches/getdata-0.8/Makefile.am branches/getdata-0.8/NEWS branches/getdata-0.8/bindings/cxx/entry.cpp branches/getdata-0.8/bindings/cxx/fragment.cpp branches/getdata-0.8/bindings/f77/fgetdata.c branches/getdata-0.8/bindings/make_parameters.c branches/getdata-0.8/bindings/python/pydirfile.c branches/getdata-0.8/bindings/python/pyentry.c branches/getdata-0.8/bindings/python/pygetdata.h branches/getdata-0.8/src/add.c branches/getdata-0.8/src/bzip.c branches/getdata-0.8/src/common.c branches/getdata-0.8/src/getdata.c branches/getdata-0.8/src/getdata.h.in branches/getdata-0.8/src/include.c branches/getdata-0.8/src/lzma.c branches/getdata-0.8/src/native.c branches/getdata-0.8/src/open.c branches/getdata-0.8/src/parse.c branches/getdata-0.8/src/putdata.c branches/getdata-0.8/src/types.c branches/getdata-0.8/test/get_polynom_cmpin.c branches/getdata-0.8/util/Makefile.am branches/getdata-0.8/util/dirfile2ascii.c Modified: branches/getdata-0.8/ChangeLog =================================================================== --- branches/getdata-0.8/ChangeLog 2014-12-05 09:55:45 UTC (rev 931) +++ branches/getdata-0.8/ChangeLog 2014-12-05 21:16:00 UTC (rev 932) @@ -1,3 +1,46 @@ +2014-12-06 D. V. Wiebe <ge...@ke...> svn:932 + Backport more bugfixes from trunk: + + * src/native.c (_GD_NativeType): Don't always return GD_FLOAT64 for LINCOMs. + (r867) + + * src/putdata.c (_GD_MplexOutData): Fix computation of complex data. (r867) + + * src/open.c (_GD_CreateDirfile _GD_Open): Close descriptors on error. + (r877) + + * src/types.c (_GD_ConvertType): Add missing break. (r877) + + * bindings/python/pydirfile.c (gdpy_dirfile_getentry gdpy_dirfile_getstring + gdpy_dirfile_putcarray gdpy_dirfile_putdata) src/include.c (_GD_Include) + src/putdata.c (_GD_DoMplexOut): Deallocate buffers on error. (r877) + + * src/parse.c (_GD_ParseCarray): Return on error. (r877) + + * src/parse.c (_GD_ParseFieldSpec): Only resize the dot_list when necessary. + Also, clean up if the resize doesn't work. (r877) + + * src/getdata.h.in: Remove __nonnull__ from parameter two of + gd_verbose_prefix. (r877) + + * src/common.c (_GD_CanonicalPath): Don't let readlink overrun the buffer. + Also fix double free. (r877) + + * bindings/python/pygetdata.h (PYGD_REPORT_ERROR): Added. (r877) + + * bindings/python/pyentry.c (gdpy_entry_seta): Set a[i] if the pyobj is + complex. (r877) + + * bindings/cxx/entry.cpp (Entry::Entry): Zero E if gd_entry call fails. + (r877) + + * bindings/cxx/fragment.cpp (Fragment::Fragment): Handle error in + gd_fragment_affixes call. (r877) + + * bindings/f77/fgetdata.c (GDASCA): Handle error in gd_entry call. (r877) + + * util/dirfile2ascii.c (main): Fix check for too many fields. (r877) + 2014-12-06 D. V. Wiebe <ge...@ke...> svn:931 Backport more bugfixes from trunk: @@ -19,13 +62,62 @@ Backport bugfixes from trunk: * bindings/cxx/rawentry.cpp (RawEntry::RawEntry): Initialise filename. - Patch from S. J. Benton. (r862) + Patch from S. J. Benton. (r863) + * src/add.c (_GD_Add): Set the right suberror (GD_E_ENTRY_POLYORD) for + poly_ord out of range. (r867) + + * src/flimits.c (_GD_GetBOF): Also zero *ds if we're before sample zero. + (r867) + + * src/flush.c (_GD_Flush): Don't flush the second lincom field if it's not + used. (r867) + + * src/fpos.c (_GD_Seek): Fix sign on PHASE shift. (r867) + + * src/fpos.c (gd_seek64): Pass index_pos=-1 to _GD_GetFilePos. (r867) + + * src/getdata.c (_GD_CDivideData): Fix computation of complex division. + (r867) + + * src/index.c (_GD_GetIndex): Fix extrapolations performed when required to + search for the EOF. (r867) + * src/index.c (gd_framenum_subset64): Fix conversion of field_end from + frames to samples. (r867) + * src/add.c (_GD_Change): Don't throw an error on mplex.count_val < 0. (r848) * src/errors.c src/internal.h: Remove unused GD_E_ENTRY_CNTVAL. (r848) * test/add_mplex_val.c: Deleted. (r848) - + + * src/legacy.c (GetFormat): Allocate Format.mplexEntries. (r867) + + * src/mod.c (gd_alter_spec gd_malter_spec): Set move flags for POLYNOM + entries to ensure co-efficients are updated. (r867) + + * src/parse.c (_GD_Tokenise): Fix parsing of \x and \u. Don't unnecessarily + overwrite earlier errors with GD_E_FORMAT_UNTERM. (r867) + + * bindings/idl/getdata.c (gdidl_rename): Fix handling of UPDATEDB. (r867) + + * bindings/cxx/getdata/entry.h (Entry::CompScal): Allow non-zero for + RECIP, too. (r868) + + * src/common.c (_GD_CInvertData): Correct algebra in C89 INVERT macro. + (r872) + * src/getdata.c (_GD_PolynomData): Implement correct C89 POLYNOMC macro. + (r872) + * src/getdata.c (_GD_CDivideData): Correct algebra in C89 DIVIDEC macro. + (r872) + + * src/internal.h: Fix pointer arithmetic in C89 gd_cap_ macro. (r872) + + * bindings/python/pyfragment.c (gdpy_fragment_init): Fix typo in keyword + names. (r876) + + * Makefile.am: Auotmake version bumped to 1.13. (r915) + * configure.ac: Autoconf version bumped to 2.65. (r915) + 2013-09-05 D. V. Wiebe <ge...@ke...> svn:845 GetData-0.8.5 released. Modified: branches/getdata-0.8/Makefile.am =================================================================== --- branches/getdata-0.8/Makefile.am 2014-12-05 09:55:45 UTC (rev 931) +++ branches/getdata-0.8/Makefile.am 2014-12-05 21:16:00 UTC (rev 932) @@ -1,4 +1,4 @@ -# Copyright (C) 2008, 2011 D. V. Wiebe +# Copyright (C) 2008, 2011, 2014 D. V. Wiebe # ########################################################################## # Modified: branches/getdata-0.8/NEWS =================================================================== --- branches/getdata-0.8/NEWS 2014-12-05 09:55:45 UTC (rev 931) +++ branches/getdata-0.8/NEWS 2014-12-05 21:16:00 UTC (rev 932) @@ -2,6 +2,10 @@ Library Changes: + * BUG FIX: Computation of LINCOMs with complex valued input fields now + correctly happens in the complex plane. As a side effect, gd_native_type() + now also correctly reports such LINCOM fields to be complex valued. + * BUG FIX: The gd_[m]add() functions now ignore zero-length scalar strings. Previously they would store these invalid field codes, causing problems later. @@ -32,6 +36,9 @@ * BUG FIX: gd_alter_entry() no longer corrupts the DIRFILE when modifying named scalars of MPLEX fields. + * BUG FIX: Writing complex-valued MPLEX fields no longer corrupts the stored + data. + * BUG FIX: gd_bof() now returns the correct number (i.e.: zero) when reporting the beginning of field of derived fields shifted to before the start of the dirfile. Previously, this function incorrectly returned values ranging from Modified: branches/getdata-0.8/bindings/cxx/entry.cpp =================================================================== --- branches/getdata-0.8/bindings/cxx/entry.cpp 2014-12-05 09:55:45 UTC (rev 931) +++ branches/getdata-0.8/bindings/cxx/entry.cpp 2014-12-05 21:16:00 UTC (rev 932) @@ -1,4 +1,4 @@ -// Copyright (C) 2008-2012 D. V. Wiebe +// Copyright (C) 2008-2012, 2014 D. V. Wiebe // /////////////////////////////////////////////////////////////////////////// // @@ -31,7 +31,8 @@ Entry::Entry(const GetData::Dirfile *dirfile, const char* field_code) { D = dirfile; - gd_entry(D->D, field_code, &E); + if (gd_entry(D->D, field_code, &E)) + memset(&E, 9, sizeof(E)); } Entry::~Entry() Modified: branches/getdata-0.8/bindings/cxx/fragment.cpp =================================================================== --- branches/getdata-0.8/bindings/cxx/fragment.cpp 2014-12-05 09:55:45 UTC (rev 931) +++ branches/getdata-0.8/bindings/cxx/fragment.cpp 2014-12-05 21:16:00 UTC (rev 932) @@ -1,4 +1,4 @@ -// Copyright (C) 2008, 2010, 2011 D. V. Wiebe +// Copyright (C) 2008, 2010, 2011, 2014 D. V. Wiebe // /////////////////////////////////////////////////////////////////////////// // @@ -35,8 +35,10 @@ prot = gd_protection(D->D, index); name = gd_fragmentname(D->D, index); parent = (index == 0) ? -1 : gd_parent_fragment(D->D, index); - gd_fragment_affixes(D->D, index, &prefix, &suffix); + if (gd_fragment_affixes(D->D, index, &prefix, &suffix) == -1) + prefix = suffix = NULL; + dreturnvoid(); } Modified: branches/getdata-0.8/bindings/f77/fgetdata.c =================================================================== --- branches/getdata-0.8/bindings/f77/fgetdata.c 2014-12-05 09:55:45 UTC (rev 931) +++ branches/getdata-0.8/bindings/f77/fgetdata.c 2014-12-05 21:16:00 UTC (rev 932) @@ -1,4 +1,4 @@ -/* Copyright (C) 2008-2012 D. V. Wiebe +/* Copyright (C) 2008-2014 D. V. Wiebe * ************************************************************************* * @@ -3152,7 +3152,10 @@ return; } - gd_entry(D, _GDF_CString(&fc, field_code, *field_code_l), &E); + if (gd_entry(D, _GDF_CString(&fc, field_code, *field_code_l), &E) == -1) { + dreturnvoid(); + return; + } switch (E.field_type) { case GD_NO_ENTRY: Modified: branches/getdata-0.8/bindings/make_parameters.c =================================================================== --- branches/getdata-0.8/bindings/make_parameters.c 2014-12-05 09:55:45 UTC (rev 931) +++ branches/getdata-0.8/bindings/make_parameters.c 2014-12-05 21:16:00 UTC (rev 932) @@ -456,7 +456,7 @@ printf("s/@PARAMLIST@/"); for (i = 0; constant_list[i].lname != NULL; ++i) - printf("%s ", constant_list[i].sname, constant_list[i].value); + printf("%s ", constant_list[i].sname); printf("/\n"); } Modified: branches/getdata-0.8/bindings/python/pydirfile.c =================================================================== --- branches/getdata-0.8/bindings/python/pydirfile.c 2014-12-05 09:55:45 UTC (rev 931) +++ branches/getdata-0.8/bindings/python/pydirfile.c 2014-12-05 21:16:00 UTC (rev 932) @@ -1,4 +1,4 @@ -/* Copyright (C) 2009-2013 D. V. Wiebe +/* Copyright (C) 2009-2014 D. V. Wiebe * *************************************************************************** * @@ -728,6 +728,7 @@ const char *field_code; struct gdpy_entry_t *obj; gd_entry_t *E; + int e; dtrace("%p, %p, %p", self, args, keys); @@ -748,12 +749,20 @@ gd_entry(self->D, field_code, E); - PYGD_CHECK_ERROR(self->D, NULL); + if ((e = gd_error(self->D))) { + PYGD_REPORT_ERROR(self->D,e); + free(E); + dreturn("%p", NULL); + return NULL; + } + obj = (struct gdpy_entry_t*)gdpy_entry.tp_alloc(&gdpy_entry, 0); if (obj == NULL) { PyErr_NoMemory(); + gd_free_entry_strings(E); + free(E); dreturn("%p", NULL); return NULL; } @@ -1671,7 +1680,7 @@ len = gd_get_string(self->D, field_code, 0, NULL); - PYGD_CHECK_ERROR(self->D, NULL); + PYGD_CHECK_ERROR2(self->D, NULL, free(data)); data = malloc(len); if (data == NULL) { @@ -1848,6 +1857,7 @@ if (type == GD_UNKNOWN) { PyErr_SetString(PyExc_ValueError, "pygetdata.dirfile.put_carray() unknown data type for argument 2."); + free(data); dreturn ("%p", NULL); return NULL; } @@ -1961,6 +1971,7 @@ if (type == GD_UNKNOWN) { PyErr_SetString(PyExc_ValueError, "pygetdata.dirfile.putdata() unknown data type for argument 2."); + free(data); dreturn ("%p", NULL); return NULL; } Modified: branches/getdata-0.8/bindings/python/pyentry.c =================================================================== --- branches/getdata-0.8/bindings/python/pyentry.c 2014-12-05 09:55:45 UTC (rev 931) +++ branches/getdata-0.8/bindings/python/pyentry.c 2014-12-05 21:16:00 UTC (rev 932) @@ -1,4 +1,4 @@ -/* Copyright (C) 2009-2013 D. V. Wiebe +/* Copyright (C) 2009-2014 D. V. Wiebe * *************************************************************************** * @@ -1825,6 +1825,8 @@ PyObject *obj = PyTuple_GetItem(value, i); if (PyComplex_Check(obj)) { comp_scal = 1; + gdpy_as_complex(gd_csp_(ca[i]), obj); + a[i] = creal(ca[i]); scalar[i] = NULL; } else if (comp_scal) { gdpy_set_scalar_from_pyobj(obj, GD_COMPLEX128, scalar + i, ca + i); Modified: branches/getdata-0.8/bindings/python/pygetdata.h =================================================================== --- branches/getdata-0.8/bindings/python/pygetdata.h 2014-12-05 09:55:45 UTC (rev 931) +++ branches/getdata-0.8/bindings/python/pygetdata.h 2014-12-05 21:16:00 UTC (rev 932) @@ -69,17 +69,25 @@ #define PYGD_CHECK_ERROR2(D,R,E) \ do { \ - int the_error; \ - if ((the_error = gd_error(D))) { \ - char buffer[GD_MAX_LINE_LENGTH]; \ - PyErr_SetString(gdpy_exceptions[the_error], gd_error_string((D), \ - buffer, GD_MAX_LINE_LENGTH)); \ + int e; \ + if ((e = gd_error(D))) { \ + PYGD_REPORT_ERROR(D,e); \ E; \ dreturnvoid(); \ return (R); \ } \ } while(0) +#define PYGD_REPORT_ERROR(D,e) \ + do { \ + char *buffer = gd_error_string((D), NULL, 0); \ + if (buffer) { \ + PyErr_SetString(gdpy_exceptions[e], buffer); \ + free(buffer); \ + } else \ + PyErr_SetString(gdpy_exceptions[e], "Unspecified error"); \ + } while (0) + extern PyObject *gdpy_exceptions[GD_N_ERROR_CODES]; extern PyTypeObject gdpy_dirfile; extern PyTypeObject gdpy_entry; Modified: branches/getdata-0.8/src/add.c =================================================================== --- branches/getdata-0.8/src/add.c 2014-12-05 09:55:45 UTC (rev 931) +++ branches/getdata-0.8/src/add.c 2014-12-05 21:16:00 UTC (rev 932) @@ -1,4 +1,4 @@ -/* Copyright (C) 2008-2013 D. V. Wiebe +/* Copyright (C) 2008-2014 D. V. Wiebe * *************************************************************************** * @@ -2049,25 +2049,25 @@ offset = strlen(parent) + 1; munged_code = (char *)_GD_Malloc(D, offset + strlen(field_code) + 1); - if (munged_code) { - strcpy(munged_code, parent); - munged_code[offset - 1] = '/'; - strcpy(munged_code + offset, field_code); - } - } else + if (munged_code == NULL) + goto add_alias_error; + + strcpy(munged_code, parent); + munged_code[offset - 1] = '/'; + strcpy(munged_code + offset, field_code); + } else { /* this will check for affixes and take care of detecting Barth-style * metafield definitions */ P = _GD_FixName(D, &munged_code, field_code, fragment_index, &offset); - if (D->error) - goto add_alias_error; + if (D->error) + goto add_alias_error; + } /* check alias name */ - if (munged_code && _GD_ValidateField(munged_code + offset, D->standards, 1, 0, - NULL)) - { + if (_GD_ValidateField(munged_code + offset, D->standards, 1, 0, NULL)) _GD_SetError(D, GD_E_BAD_CODE, GD_E_CODE_INVALID, NULL, 0, field_code); - } else if (_GD_FindField(D, munged_code, D->entry, D->n_entries, 1, &u)) + else if (_GD_FindField(D, munged_code, D->entry, D->n_entries, 1, &u)) _GD_SetError(D, GD_E_DUPLICATE, 0, NULL, 0, munged_code); else _GD_CheckCodeAffixes(D, NULL, target, fragment_index); /* check target */ Modified: branches/getdata-0.8/src/bzip.c =================================================================== --- branches/getdata-0.8/src/bzip.c 2014-12-05 09:55:45 UTC (rev 931) +++ branches/getdata-0.8/src/bzip.c 2014-12-05 21:16:00 UTC (rev 932) @@ -268,9 +268,9 @@ ptr->pos = 0; ptr->end = n; } else { - free(ptr); BZ2_bzReadClose(&ptr->bzerror, ptr->bzfile); fclose(ptr->stream); + free(ptr); dreturn("%i", -1); return -1; } Modified: branches/getdata-0.8/src/common.c =================================================================== --- branches/getdata-0.8/src/common.c 2014-12-05 09:55:45 UTC (rev 931) +++ branches/getdata-0.8/src/common.c 2014-12-05 21:16:00 UTC (rev 932) @@ -1,5 +1,5 @@ /* Copyright (C) 2002-2005 C. Barth Netterfield - * Copyright (C) 2005-2012 D. V. Wiebe + * Copyright (C) 2005-2012, 2014 D. V. Wiebe * *************************************************************************** * @@ -1021,7 +1021,6 @@ work = (char*)malloc(PATH_MAX); if (res == NULL || work == NULL) { free(res); - free(res); dreturn("%p", NULL); return NULL; } @@ -1162,7 +1161,7 @@ } /* get the link target */ - slen = readlink(res, target, PATH_MAX); + slen = readlink(res, target, PATH_MAX - 1); if (slen == -1) { free(res); free(work); Modified: branches/getdata-0.8/src/getdata.c =================================================================== --- branches/getdata-0.8/src/getdata.c 2014-12-05 09:55:45 UTC (rev 931) +++ branches/getdata-0.8/src/getdata.c 2014-12-05 21:16:00 UTC (rev 932) @@ -386,10 +386,10 @@ #ifdef GD_NO_C99_API #define POLYNOMC(t) \ switch (n) { \ - case 2: POLYNOMC2(t,2 * npts); break; \ - case 3: POLYNOMC3(t,2 * npts); break; \ - case 4: POLYNOMC4(t,2 * npts); break; \ - case 5: POLYNOMC5(t,2 * npts); break; \ + case 2: POLYNOMC2(t,npts); break; \ + case 3: POLYNOMC3(t,npts); break; \ + case 4: POLYNOMC4(t,npts); break; \ + case 5: POLYNOMC5(t,npts); break; \ default: _GD_InternalError(D); \ } @@ -1845,7 +1845,7 @@ return 0; } - dreturn("%i", len); + dreturn("%" PRNsize_t, len); return len; } Modified: branches/getdata-0.8/src/getdata.h.in =================================================================== --- branches/getdata-0.8/src/getdata.h.in 2014-12-05 09:55:45 UTC (rev 931) +++ branches/getdata-0.8/src/getdata.h.in 2014-12-05 21:16:00 UTC (rev 932) @@ -1,6 +1,6 @@ /* Copyright (C) 2002-2005 C. Barth Netterfield * Copyright (C) 2003-2005 Theodore Kisner - * Copyright (C) 2005-2013 D. V. Wiebe + * Copyright (C) 2005-2014 D. V. Wiebe * *************************************************************************** * @@ -918,7 +918,7 @@ gd_nonnull((1,2)); extern int gd_verbose_prefix(DIRFILE *D, const char *prefix) gd_nothrow -gd_nonnull ((1,2)); +gd_nonnull ((1)); extern const char **gd_vector_list(DIRFILE *dirfile) gd_nothrow gd_nonnull((1)); Modified: branches/getdata-0.8/src/include.c =================================================================== --- branches/getdata-0.8/src/include.c 2014-12-05 09:55:45 UTC (rev 931) +++ branches/getdata-0.8/src/include.c 2014-12-05 21:16:00 UTC (rev 932) @@ -1,4 +1,4 @@ -/* Copyright (C) 2008-2011 D. V. Wiebe +/* Copyright (C) 2008-2011, 2014 D. V. Wiebe * *************************************************************************** * @@ -197,6 +197,7 @@ ptr = _GD_Realloc(D, D->fragment, (++D->n_fragment) * sizeof(struct gd_fragment_t)); if (ptr == NULL) { + fclose(new_fp); _GD_ReleaseDir(D, dirfd); D->n_fragment--; goto include_error; Modified: branches/getdata-0.8/src/lzma.c =================================================================== --- branches/getdata-0.8/src/lzma.c 2014-12-05 09:55:45 UTC (rev 931) +++ branches/getdata-0.8/src/lzma.c 2014-12-05 21:16:00 UTC (rev 932) @@ -110,11 +110,9 @@ int _GD_LzmaOpen(int dirfd, struct gd_raw_file_* file, int swap gd_unused_, unsigned int mode gd_unused_) { - struct gd_lzmadata *ptr; - dtrace("%i, %p, <unused>, <unused>", dirfd, file); - file->edata = ptr = _GD_LzmaDoOpen(dirfd, file); + file->edata = _GD_LzmaDoOpen(dirfd, file); if (file->edata == NULL) { dreturn("%i", 1); Modified: branches/getdata-0.8/src/native.c =================================================================== --- branches/getdata-0.8/src/native.c 2014-12-05 09:55:45 UTC (rev 931) +++ branches/getdata-0.8/src/native.c 2014-12-05 21:16:00 UTC (rev 932) @@ -47,6 +47,7 @@ break; } + type = GD_FLOAT64; for (i = 0; i < E->EN(lincom,n_fields); ++i) { if (_GD_BadInput(D, E, i, 1)) break; @@ -56,7 +57,6 @@ break; } } - type = GD_FLOAT64; break; case GD_LINTERP_ENTRY: /* initialise the table, if necessary */ Modified: branches/getdata-0.8/src/open.c =================================================================== --- branches/getdata-0.8/src/open.c 2014-12-05 09:55:45 UTC (rev 931) +++ branches/getdata-0.8/src/open.c 2014-12-05 21:16:00 UTC (rev 932) @@ -1,5 +1,5 @@ /* Copyright (C) 2002-2005 C. Barth Netterfield - * Copyright (C) 2005-2012 D. V. Wiebe + * Copyright (C) 2005-2012, 2014 D. V. Wiebe * *************************************************************************** * @@ -347,6 +347,10 @@ _GD_SetError(D, GD_E_CREAT, GD_E_CREAT_FORMAT, format_file, errno, NULL); free(dirfile); free(format_file); +#ifndef GD_NO_DIR_OPEN + if (dirfd >= 0) + close(dirfd); +#endif dreturn("%p", NULL); return NULL; } @@ -364,6 +368,10 @@ free(dirfile); free(format_file); close(fd); +#ifndef GD_NO_DIR_OPEN + if (dirfd >= 0) + close(dirfd); +#endif dreturn("%p", NULL); return NULL; } @@ -458,7 +466,8 @@ if (D == NULL) { free(dirfile); #ifndef GD_NO_DIR_OPEN - close(dirfd); + if (dirfd >= 0) + close(dirfd); #endif dreturn("%p", NULL); return NULL; @@ -481,7 +490,8 @@ if (dirfile == NULL) { _GD_SetError(D, GD_E_RAW_IO, 0, filedir, errno, NULL); #ifndef GD_NO_DIR_OPEN - close(dirfd); + if (dirfd >= 0) + close(dirfd); #endif dreturn("%p", D); return D; @@ -497,7 +507,8 @@ if (D->error) { free(dirfile); #ifndef GD_NO_DIR_OPEN - close(dirfd); + if (dirfd >= 0) + close(dirfd); #endif dreturn("%p", D); return D; @@ -535,6 +546,7 @@ D->name = strdup(filedir); if (D->name == NULL) { + fclose(fp); _GD_SetError(D, GD_E_ALLOC, 0, NULL, 0, NULL); dreturn("%p", D); return D; Modified: branches/getdata-0.8/src/parse.c =================================================================== --- branches/getdata-0.8/src/parse.c 2014-12-05 09:55:45 UTC (rev 931) +++ branches/getdata-0.8/src/parse.c 2014-12-05 21:16:00 UTC (rev 932) @@ -1,5 +1,5 @@ /* Copyright (C) 2002-2005 C. Barth Netterfield - * Copyright (C) 2005-2013 D. V. Wiebe + * Copyright (C) 2005-2014 D. V. Wiebe * *************************************************************************** * @@ -1215,7 +1215,8 @@ int pedantic, int *restrict is_dot, char **outstring, const char *tok_pos) { int offset; - int c, first, n, new_z, s, z; + int c, first, new_z, s, z; + size_t n; gd_type_t t; char* ptr; void *data; @@ -1308,6 +1309,8 @@ _GD_FreeE(D, E, 1); _GD_SetError(D, GD_E_FORMAT, GD_E_FORMAT_LITERAL, format_file, line, in_cols[c]); + dreturn("%p", NULL); + return NULL; } } @@ -1598,15 +1601,6 @@ _GD_SetError(D, GD_E_FORMAT, GD_E_FORMAT_BAD_LINE, format_file, linenum, NULL); - if (is_dot) { - ptr = _GD_Realloc(D, D->dot_list, (D->n_dot + 1) * sizeof(gd_entry_t*)); - if (ptr == NULL) { - dreturn ("%p", NULL); - return NULL; - } - D->dot_list = (gd_entry_t **)ptr; - } - if (insert && D->error == GD_E_OK && E != NULL) { /* the Format file fragment index */ unsigned int u; @@ -1623,6 +1617,16 @@ return NULL; } + if (is_dot) { + ptr = _GD_Realloc(D, D->dot_list, (D->n_dot + 1) * sizeof(gd_entry_t*)); + if (ptr == NULL) { + _GD_FreeE(D, E, 1); + dreturn ("%p", NULL); + return NULL; + } + D->dot_list = (gd_entry_t **)ptr; + } + /* Initialse the meta counts */ if (P != NULL) { E->e->n_meta = -1; Modified: branches/getdata-0.8/src/putdata.c =================================================================== --- branches/getdata-0.8/src/putdata.c 2014-12-05 09:55:45 UTC (rev 931) +++ branches/getdata-0.8/src/putdata.c 2014-12-05 21:16:00 UTC (rev 932) @@ -1,6 +1,6 @@ /* Copyright (C) 2003-2005 C. Barth Netterfield * Copyright (C) 2003-2005 Theodore Kisner - * Copyright (C) 2005-2012 D. V. Wiebe + * Copyright (C) 2005-2014 D. V. Wiebe * *************************************************************************** * @@ -518,8 +518,8 @@ do { \ for (i = 0; i < n; i++) \ if (B[i] == val) { \ - ((t*)A)[i * 2] = ((t*)C)[i * spfB / spfA]; \ - ((t*)A)[i * 2 + 1] = ((t*)C)[i * spfB / spfA + 1]; \ + ((t*)A)[i * 2] = ((t*)C)[i * 2 * spfB / spfA]; \ + ((t*)A)[i * 2 + 1] = ((t*)C)[i * 2 * spfB / spfA + 1]; \ } \ } while (0) @@ -592,6 +592,7 @@ cntbuf = (int*)_GD_Alloc(D, GD_INT_TYPE, num_samp2); if (tmpbuf == NULL || cntbuf == NULL) { + free(cntbuf); free(tmpbuf); dreturn("%i", 0); return 0; Modified: branches/getdata-0.8/src/types.c =================================================================== --- branches/getdata-0.8/src/types.c 2014-12-05 09:55:45 UTC (rev 931) +++ branches/getdata-0.8/src/types.c 2014-12-05 21:16:00 UTC (rev 932) @@ -1,5 +1,5 @@ /* Copyright (C) 2002-2005 C. Barth Netterfield - * Copyright (C) 2005-2010 D. V. Wiebe + * Copyright (C) 2005-2010, 2014 D. V. Wiebe * *************************************************************************** * @@ -633,6 +633,7 @@ _GD_SetError(D, GD_E_BAD_TYPE, out_type, NULL, 0, NULL); break; } + break; case GD_COMPLEX128: switch (out_type) { case GD_INT8: Modified: branches/getdata-0.8/test/get_polynom_cmpin.c =================================================================== --- branches/getdata-0.8/test/get_polynom_cmpin.c 2014-12-05 09:55:45 UTC (rev 931) +++ branches/getdata-0.8/test/get_polynom_cmpin.c 2014-12-05 21:16:00 UTC (rev 932) @@ -62,12 +62,6 @@ n = gd_getdata(D, "polynom", 5, 0, 8, 0, GD_COMPLEX128, &c); error = gd_error(D); - gd_discard(D); - - unlink(data); - unlink(format); - rmdir(filedir); - CHECKI(error, 0); CHECKI(n, 8); for (i = 0; i < 8; ++i) { @@ -77,5 +71,11 @@ CHECKFi(i, c[i * 2 + 1], 2 * b + 2 * a * b); } + gd_discard(D); + + unlink(data); + unlink(format); + rmdir(filedir); + return r; } Modified: branches/getdata-0.8/util/Makefile.am =================================================================== --- branches/getdata-0.8/util/Makefile.am 2014-12-05 09:55:45 UTC (rev 931) +++ branches/getdata-0.8/util/Makefile.am 2014-12-05 21:16:00 UTC (rev 932) @@ -1,4 +1,4 @@ -# Copyright (C) 2008, 2010 D. V. Wiebe +# Copyright (C) 2008, 2010, 2014 D. V. Wiebe # ########################################################################## # @@ -29,7 +29,7 @@ endif LDADD=../src/libgetdata.la -INCLUDES=${WALL} $(WEXTRA) -I$(top_srcdir)/src +AM_CPPFLAGS=${WALL} $(WEXTRA) -I$(top_srcdir)/src bin_PROGRAMS=checkdirfile dirfile2ascii checkdirfile_SOURCES=checkdirfile.c Modified: branches/getdata-0.8/util/dirfile2ascii.c =================================================================== --- branches/getdata-0.8/util/dirfile2ascii.c 2014-12-05 09:55:45 UTC (rev 931) +++ branches/getdata-0.8/util/dirfile2ascii.c 2014-12-05 21:16:00 UTC (rev 932) @@ -1,5 +1,5 @@ /* Copyright (C) 2010, 2011 Matthew Truch - * Copyright (C) 2010 D. V. Wiebe + * Copyright (C) 2010, 2014 D. V. Wiebe * *************************************************************************** * @@ -61,7 +61,7 @@ void version(void) { printf("dirfile2ascii (%s)\n" - "Copyright (C) 2010 Matthew Truch\n\n" + "Copyright (C) 2010, 2011, 2014 Matthew Truch and others\n\n" "Please send reports of bugs and other communication to:\n %s\n\n" "This program comes with NO WARRANTY, not even for MERCHANTABILITY " "or FITNESS\n" @@ -236,7 +236,7 @@ if (dirfile_name == NULL) { dirfile_name = optarg; } else { /* Standard output field */ - if (numfields > BUF_LEN) { + if (numfields >= BUF_LEN) { fprintf(stderr, "Error: Too many fields!\n"); exit(-2); } @@ -260,7 +260,7 @@ case 'F': case 'A': case 'a': - if (numfields > BUF_LEN) { + if (numfields >= BUF_LEN) { fprintf(stderr, "Error: Too many fields!\n"); exit(-2); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ket...@us...> - 2014-12-05 09:55:57
|
Revision: 931 http://sourceforge.net/p/getdata/code/931 Author: ketiltrout Date: 2014-12-05 09:55:45 +0000 (Fri, 05 Dec 2014) Log Message: ----------- More backporting from trunk. Modified Paths: -------------- branches/getdata-0.8/ChangeLog branches/getdata-0.8/NEWS branches/getdata-0.8/bindings/f77/fgetdata.c branches/getdata-0.8/src/add.c branches/getdata-0.8/src/field_list.c branches/getdata-0.8/src/getdata.c branches/getdata-0.8/src/mod.c branches/getdata-0.8/test/Makefile.am Added Paths: ----------- branches/getdata-0.8/test/add_bit_scalars.c branches/getdata-0.8/test/add_mplex_scalars.c branches/getdata-0.8/test/add_polynom_scalar.c branches/getdata-0.8/test/add_raw_spf_scalar.c branches/getdata-0.8/test/get_carray_c2r.c Removed Paths: ------------- branches/getdata-0.8/test/add_mplex_val.c Property Changed: ---------------- branches/getdata-0.8/test/ Modified: branches/getdata-0.8/ChangeLog =================================================================== --- branches/getdata-0.8/ChangeLog 2014-12-05 01:37:25 UTC (rev 930) +++ branches/getdata-0.8/ChangeLog 2014-12-05 09:55:45 UTC (rev 931) @@ -1,6 +1,31 @@ +2014-12-06 D. V. Wiebe <ge...@ke...> svn:931 + Backport more bugfixes from trunk: + + * src/getdata.c (_GD_DoConst): Return len instead of 1. (r848) + * src/field_list.c (gd_carrays gd_mcarrays): Update _GD_DoField calls to + deal with the above. (r848) + * test/get_carray_c2r.c: Added. (r848) + + * src/add.c (_GD_CopyScalars): Added. (r848) + * src/add.c (_GD_Change): Fix scalar copying for GD_POLYNOM_ENTRY. Don't + throw errors for passed members which will be ignored due to scalars (spf, + numbits, bitnum). (r848) + * test/add_bit_scalars.c test/add_mplex_scalars.c test/add_raw_spf_scalar.c + * test/add_polynom_scalar.c: Added. (r848) + + * src/mod.c (_GD_Change): Fix MPLEX scalar modifying. (r848) + 2014-12-05 D. V. Wiebe <ge...@ke...> svn:930 - Backport fixes from trunk. Update build system for autotools bump. + Backport bugfixes from trunk: + * bindings/cxx/rawentry.cpp (RawEntry::RawEntry): Initialise filename. + Patch from S. J. Benton. (r862) + + * src/add.c (_GD_Change): Don't throw an error on mplex.count_val < 0. + (r848) + * src/errors.c src/internal.h: Remove unused GD_E_ENTRY_CNTVAL. (r848) + * test/add_mplex_val.c: Deleted. (r848) + 2013-09-05 D. V. Wiebe <ge...@ke...> svn:845 GetData-0.8.5 released. Modified: branches/getdata-0.8/NEWS =================================================================== --- branches/getdata-0.8/NEWS 2014-12-05 01:37:25 UTC (rev 930) +++ branches/getdata-0.8/NEWS 2014-12-05 09:55:45 UTC (rev 931) @@ -1,7 +1,21 @@ -New in version 0.8.6a: +New in verison 0.8.6a: Library Changes: + * BUG FIX: The gd_[m]add() functions now ignore zero-length scalar strings. + Previously they would store these invalid field codes, causing problems + later. + + * BUG FIX: Returning complex-valued CARRAYs as purely real now works. + Previously only the first element requested would be returned, the remaining + output buffer containing uninitialised data. + + * BUG FIX: Entry members spf, bitnum, numbits, and period are now completely + ignored by gd_[m]add() when corresponding named scalars are specified. + Previously, an invalid value in these members would result in the entry + being rejected, even though the rest of GetData ignored the invalid, unsued + value. + * BUG FIX: The parsing of the \x and \u escape sequences is now correct. * BUG FIX: A scalar field code specified for the last factor in a POLYNOM @@ -58,6 +72,9 @@ Bindings Changes: + * F77 and F95 BUG FIX: Named scalar indices are now indexed from one instead + of zero, like all other array indices are in the Fortran GetData bindings. + * C++ BUG FIX: Fixed segfault in RawEntry destructor. Reported by S. J. Benton. Modified: branches/getdata-0.8/bindings/f77/fgetdata.c =================================================================== --- branches/getdata-0.8/bindings/f77/fgetdata.c 2014-12-05 01:37:25 UTC (rev 930) +++ branches/getdata-0.8/bindings/f77/fgetdata.c 2014-12-05 09:55:45 UTC (rev 931) @@ -25,6 +25,16 @@ #include <stdio.h> #include <string.h> +/* convert scalar_ind from C to FORTRAN */ +#define GDF_SCIND_C2F(out,in) do { \ + (out) = (in); if ((out) >= 0) (out)++; \ +} while (0) + +/* convert scalar ind from FORTRAN to C */ +#define GDF_SCIND_F2C(out,in) do { \ + (out) = (in); if ((out) > 0) (out)--; \ +} while (0) + /* Fortran 77 has no facility to take a pointer to a DIRFILE* object. * Instead, we keep a list of them here. If we ever run out of these, * the caller will be abort()ed. */ @@ -3115,7 +3125,7 @@ ok = 0; _GDF_FString(scalar, scalar_l, (ok) ? E.scalar[*index - 1] : ""); - *scalar_index = E.scalar_ind[*index - 1]; + GDF_SCIND_C2F(*scalar_index, E.scalar_ind[*index - 1]); gd_free_entry_strings(&E); @@ -3189,7 +3199,7 @@ free(E.scalar[*index - 1]); _GDF_CString(E.scalar + *index - 1, scalar, *scalar_l); - E.scalar_ind[*index - 1] = *scalar_index; + GDF_SCIND_F2C(E.scalar_ind[*index - 1], *scalar_index); gd_alter_entry(D, fc, &E, *recode); Modified: branches/getdata-0.8/src/add.c =================================================================== --- branches/getdata-0.8/src/add.c 2014-12-05 01:37:25 UTC (rev 930) +++ branches/getdata-0.8/src/add.c 2014-12-05 09:55:45 UTC (rev 931) @@ -1,4 +1,4 @@ -/* Copyright (C) 2008-2012 D. V. Wiebe +/* Copyright (C) 2008-2013 D. V. Wiebe * *************************************************************************** * @@ -90,23 +90,53 @@ return P; } +/* copy scalar entries from the user's entry; returns a mask of + * initialised scalars */ +static unsigned _GD_CopyScalars(DIRFILE *restrict D, + gd_entry_t *restrict E, const gd_entry_t *restrict entry, unsigned mask) +{ + unsigned mask_out = 0; + int i; + + dtrace("%p, %p, %p, 0x%X", D, E, entry, mask); + + /* copy scalars */ + for (i = 0; i <= GD_MAX_POLYORD; ++i) { + if (!(mask & (1 << i)) || entry->scalar[i] == NULL || + entry->scalar[i][0] == '\0') + { + E->scalar[i] = NULL; + } else { + if (_GD_CheckCodeAffixes(D, NULL, entry->scalar[i], + entry->fragment_index)) + { + break; + } + E->scalar[i] = _GD_Strdup(D, entry->scalar[i]); + E->scalar_ind[i] = entry->scalar_ind[i]; + mask_out |= (1 << i); + } + } + + dreturn("0x%X", mask_out); + return mask_out; +} + /* add an entry - returns the added entry on success. */ static gd_entry_t *_GD_Add(DIRFILE *restrict D, const gd_entry_t *restrict entry, const char *restrict parent) { char *temp_buffer; int i, is_dot, offset; - int copy_scalar[GD_MAX_POLYORD + 1]; void *new_list; void *new_ref = NULL; unsigned int u; + unsigned mask; gd_entry_t *E; gd_entry_t *P = NULL; dtrace("%p, %p, \"%s\"", D, entry, parent); - memset(copy_scalar, 0, sizeof(int) * (GD_MAX_POLYORD + 1)); - _GD_ClearError(D); /* check access mode */ @@ -263,9 +293,10 @@ if (D->error) break; - if ((E->EN(raw,spf) = entry->EN(raw,spf)) == 0) - _GD_SetError(D, GD_E_BAD_ENTRY, GD_E_ENTRY_SPF, NULL, - entry->EN(raw,spf), NULL); + mask = _GD_CopyScalars(D, E, entry, 0x1); + + if (!(mask & 1) && (E->EN(raw,spf) = entry->EN(raw,spf)) == 0) + _GD_SetError(D, GD_E_BAD_ENTRY, GD_E_ENTRY_SPF, NULL, 0, NULL); else if (E->EN(raw,data_type) & 0x40 || (E->e->u.raw.size = GD_SIZE(E->EN(raw,data_type))) == 0) _GD_SetError(D, GD_E_BAD_TYPE, entry->EN(raw,data_type), NULL, 0, NULL); @@ -277,7 +308,6 @@ /* This is the first raw field in this fragment */ new_ref = _GD_Strdup(D, E->field); } - copy_scalar[0] = 1; break; case GD_LINCOM_ENTRY: E->EN(lincom,n_fields) = entry->EN(lincom,n_fields); @@ -286,48 +316,42 @@ _GD_SetError(D, GD_E_BAD_ENTRY, GD_E_ENTRY_NFIELDS, NULL, E->EN(lincom,n_fields), NULL); - for (i = 0; i < E->EN(lincom,n_fields); ++i) { + for (i = 0; i < E->EN(lincom,n_fields); ++i) _GD_CheckCodeAffixes(D, NULL, entry->in_fields[i], entry->fragment_index); - _GD_CheckCodeAffixes(D, NULL, entry->scalar[i], entry->fragment_index); - _GD_CheckCodeAffixes(D, NULL, entry->scalar[i + GD_MAX_LINCOM], - entry->fragment_index); - } if (D->error) break; - else { - if (entry->comp_scal) { - int cs = 0; - memcpy(E->EN(lincom,cm), entry->EN(lincom,cm), sizeof(double) * 2 * - E->EN(lincom,n_fields)); - memcpy(E->EN(lincom,cb), entry->EN(lincom,cb), sizeof(double) * 2 * - E->EN(lincom,n_fields)); - for (i = 0; i < E->EN(lincom,n_fields); ++i) { - E->EN(lincom,m)[i] = creal(E->EN(lincom,cm)[i]); - E->EN(lincom,b)[i] = creal(E->EN(lincom,cb)[i]); - if (cimag(E->EN(lincom,cm)[i]) || cimag(E->EN(lincom,cb)[i])) - cs = 1; - } - E->comp_scal = cs; - } else { - memcpy(E->EN(lincom,m), entry->EN(lincom,m), sizeof(double) * - E->EN(lincom,n_fields)); - memcpy(E->EN(lincom,b), entry->EN(lincom,b), sizeof(double) * - E->EN(lincom,n_fields)); - for (i = 0; i < E->EN(lincom,n_fields); ++i) { - gd_rs2cs_(E->EN(lincom,cm)[i], E->EN(lincom,m)[i]); - gd_rs2cs_(E->EN(lincom,cb)[i], E->EN(lincom,b)[i]); - } - E->comp_scal = 0; - } + _GD_CopyScalars(D, E, entry, 9 * ((1 << E->EN(lincom,n_fields)) - 1)); + if (entry->comp_scal) { + int cs = 0; + memcpy(E->EN(lincom,cm), entry->EN(lincom,cm), sizeof(double) * 2 * + E->EN(lincom,n_fields)); + memcpy(E->EN(lincom,cb), entry->EN(lincom,cb), sizeof(double) * 2 * + E->EN(lincom,n_fields)); for (i = 0; i < E->EN(lincom,n_fields); ++i) { - E->in_fields[i] = _GD_Strdup(D, entry->in_fields[i]); - copy_scalar[i] = copy_scalar[i + GD_MAX_LINCOM] = 1; + E->EN(lincom,m)[i] = creal(E->EN(lincom,cm)[i]); + E->EN(lincom,b)[i] = creal(E->EN(lincom,cb)[i]); + if (cimag(E->EN(lincom,cm)[i]) || cimag(E->EN(lincom,cb)[i])) + cs = 1; } + E->comp_scal = cs; + } else { + memcpy(E->EN(lincom,m), entry->EN(lincom,m), sizeof(double) * + E->EN(lincom,n_fields)); + memcpy(E->EN(lincom,b), entry->EN(lincom,b), sizeof(double) * + E->EN(lincom,n_fields)); + for (i = 0; i < E->EN(lincom,n_fields); ++i) { + gd_rs2cs_(E->EN(lincom,cm)[i], E->EN(lincom,m)[i]); + gd_rs2cs_(E->EN(lincom,cb)[i], E->EN(lincom,b)[i]); + } + E->comp_scal = 0; } + + for (i = 0; i < E->EN(lincom,n_fields); ++i) + E->in_fields[i] = _GD_Strdup(D, entry->in_fields[i]); break; case GD_LINTERP_ENTRY: E->e->u.linterp.table_len = -1; @@ -362,7 +386,8 @@ E->in_fields[0] = _GD_Strdup(D, entry->in_fields[0]); - copy_scalar[0] = 1; + _GD_CopyScalars(D, E, entry, 0x1); + if (entry->comp_scal) { gd_cs2cs_(E->EN(recip,cdividend), entry->EN(recip,cdividend)); E->EN(recip,dividend) = creal(E->EN(recip,cdividend)); @@ -385,16 +410,18 @@ } E->in_fields[0] = _GD_Strdup(D, entry->in_fields[0]); - if (E->EN(bit,numbits) < 1) + + mask = _GD_CopyScalars(D, E, entry, 0x3); + + if (!(mask & 2) && E->EN(bit,numbits) < 1) _GD_SetError(D, GD_E_BAD_ENTRY, GD_E_ENTRY_NUMBITS, NULL, entry->EN(bit,numbits), NULL); - else if (E->EN(bit,bitnum) < 0) + else if (!(mask & 1) && E->EN(bit,bitnum) < 0) _GD_SetError(D, GD_E_BAD_ENTRY, GD_E_ENTRY_BITNUM, NULL, entry->EN(bit,bitnum), NULL); - else if (E->EN(bit,bitnum) + E->EN(bit,numbits) - 1 > 63) + else if (!(mask & 3) && E->EN(bit,bitnum) + E->EN(bit,numbits) - 1 > 63) _GD_SetError(D, GD_E_BAD_ENTRY, GD_E_ENTRY_BITSIZE, NULL, E->EN(bit,bitnum) + E->EN(bit,numbits) - 1, NULL); - copy_scalar[0] = copy_scalar[1] = 1; break; case GD_PHASE_ENTRY: E->EN(phase,shift) = entry->EN(phase,shift); @@ -405,8 +432,9 @@ break; } + _GD_CopyScalars(D, E, entry, 0x1); + E->in_fields[0] = _GD_Strdup(D, entry->in_fields[0]); - copy_scalar[0] = 1; break; case GD_WINDOW_ENTRY: E->EN(window,windop) = entry->EN(window,windop); @@ -419,12 +447,13 @@ break; } + _GD_CopyScalars(D, E, entry, 0x1); + E->in_fields[0] = _GD_Strdup(D, entry->in_fields[0]); E->in_fields[1] = _GD_Strdup(D, entry->in_fields[1]); if (_GD_BadWindop(E->EN(window,windop))) _GD_SetError(D, GD_E_BAD_ENTRY, GD_E_ENTRY_WINDOP, NULL, entry->EN(window,windop), NULL); - copy_scalar[0] = 1; break; case GD_MPLEX_ENTRY: E->EN(mplex,count_val) = entry->EN(mplex,count_val); @@ -441,11 +470,12 @@ E->in_fields[1] = _GD_Strdup(D, entry->in_fields[1]); E->e->u.mplex.type = GD_NULL; - if (entry->EN(mplex,period) < 0) + mask = _GD_CopyScalars(D, E, entry, 0x3); + + if (!(mask & 2) && entry->EN(mplex,period) < 0) _GD_SetError(D, GD_E_BAD_ENTRY, GD_E_ENTRY_PERIOD, NULL, entry->EN(mplex,period), NULL); - copy_scalar[0] = copy_scalar[1] = 1; break; case GD_CONST_ENTRY: E->EN(scalar,const_type) = entry->EN(scalar,const_type); @@ -503,6 +533,8 @@ if (D->error) break; + _GD_CopyScalars(D, E, entry, (1 << (E->EN(polynom,poly_ord) + 1)) - 1); + if (entry->comp_scal) { int cs = 0; memcpy(E->EN(polynom,ca), entry->EN(polynom,ca), sizeof(double) * 2 * @@ -522,9 +554,6 @@ } E->in_fields[0] = _GD_Strdup(D, entry->in_fields[0]); - - for (i = 0; i <= E->EN(polynom,poly_ord); ++i) - copy_scalar[i] = 1; break; case GD_ALIAS_ENTRY: case GD_INDEX_ENTRY: @@ -533,21 +562,6 @@ break; } - /* copy scalars */ - for (i = 0; i <= GD_MAX_POLYORD; ++i) { - if (!copy_scalar[i] || entry->scalar[i] == NULL) - E->scalar[i] = NULL; - else { - if (_GD_CheckCodeAffixes(D, NULL, entry->scalar[i], - entry->fragment_index)) - { - break; - } - E->scalar[i] = _GD_Strdup(D, entry->scalar[i]); - E->scalar_ind[i] = entry->scalar_ind[i]; - } - } - if (D->error != GD_E_OK) { free(new_ref); _GD_FreeE(D, E, 1); Modified: branches/getdata-0.8/src/field_list.c =================================================================== --- branches/getdata-0.8/src/field_list.c 2014-12-05 01:37:25 UTC (rev 930) +++ branches/getdata-0.8/src/field_list.c 2014-12-05 09:55:45 UTC (rev 931) @@ -1,4 +1,4 @@ -/* Copyright (C) 2008-2012 D. V. Wiebe +/* Copyright (C) 2008-2013 D. V. Wiebe * *************************************************************************** * @@ -360,7 +360,7 @@ fl[n].n = D->entry[i]->EN(scalar,array_len); fl[n].d = _GD_Alloc(D, return_type, fl[n].n); if (D->error || _GD_DoField(D, D->entry[i], 0, 0, fl[n].n, return_type, - fl[n].d) != 1) + fl[n].d) < 1) break; n++; } @@ -560,7 +560,7 @@ fl[n].n = e->p.meta_entry[i]->EN(scalar,array_len); fl[n].d = _GD_Alloc(D, return_type, fl[n].n); if (D->error || _GD_DoField(D, e->p.meta_entry[i], 0, 0, fl[n].n, - return_type, fl[n].d) != 1) + return_type, fl[n].d) < 1) break; n++; } Modified: branches/getdata-0.8/src/getdata.c =================================================================== --- branches/getdata-0.8/src/getdata.c 2014-12-05 01:37:25 UTC (rev 930) +++ branches/getdata-0.8/src/getdata.c 2014-12-05 09:55:45 UTC (rev 931) @@ -1,5 +1,5 @@ /* Copyright (C) 2002-2005 C. Barth Netterfield - * Copyright (C) 2005-2012 D. V. Wiebe + * Copyright (C) 2005-2013 D. V. Wiebe * *************************************************************************** * @@ -1845,8 +1845,8 @@ return 0; } - dreturn("%i", 1); - return 1; + dreturn("%i", len); + return len; } /* _GD_DoField: Locate the field in the database and read it. Modified: branches/getdata-0.8/src/mod.c =================================================================== --- branches/getdata-0.8/src/mod.c 2014-12-05 01:37:25 UTC (rev 930) +++ branches/getdata-0.8/src/mod.c 2014-12-05 09:55:45 UTC (rev 931) @@ -794,7 +794,7 @@ if (j & GD_AS_ERROR) break; if (j & GD_AS_FREE_SCALAR) - scalar_free |= 1; + scalar_free |= 2; if (j & GD_AS_NEED_RECALC) Qe.calculated = 0; if (j & GD_AS_MODIFIED) @@ -808,7 +808,7 @@ if (j & GD_AS_ERROR) break; if (j & GD_AS_FREE_SCALAR) - scalar_free |= 2; + scalar_free |= 1; if (j & GD_AS_NEED_RECALC) Qe.calculated = 0; if (j & GD_AS_MODIFIED) Index: branches/getdata-0.8/test =================================================================== --- branches/getdata-0.8/test 2014-12-05 01:37:25 UTC (rev 930) +++ branches/getdata-0.8/test 2014-12-05 09:55:45 UTC (rev 931) Property changes on: branches/getdata-0.8/test ___________________________________________________________________ Modified: svn:ignore ## -17,6 +17,7 ## add_bit_bitsize add_bit_invalid add_bit_numbits +add_bit_scalars add_carray add_clincom add_code ## -38,17 +39,19 ## add_meta add_meta_alias add_mplex -add_mplex_val +add_mplex_scalars add_multiply add_multiply_invalid add_phase add_phase_invalid add_polynom +add_polynom_scalar add_protect add_raw add_raw_include add_raw_invalid add_raw_spf +add_raw_spf_scalar add_raw_type add_rdonly add_recip ## -382,6 +385,7 ## get_bad_code get_bit get_carray +get_carray_c2r get_carray_len get_carray_slice get_char Modified: branches/getdata-0.8/test/Makefile.am =================================================================== --- branches/getdata-0.8/test/Makefile.am 2014-12-05 01:37:25 UTC (rev 930) +++ branches/getdata-0.8/test/Makefile.am 2014-12-05 09:55:45 UTC (rev 931) @@ -35,13 +35,14 @@ ADD_TESTS=add add_affix add_alias add_alias_affix add_alias_meta add_bit \ add_bit_bitnum add_bit_bitsize add_bit_invalid add_bit_numbits \ - add_carray add_clincom add_code add_const add_cpolynom add_crecip \ - add_crecip89 add_divide add_divide_invalid add_duplicate add_format \ - add_invalid add_lincom add_lincom_affix add_lincom_invalid \ - add_lincom_nfields add_linterp add_linterp_invalid add_meta \ - add_meta_alias add_mplex add_mplex_val add_multiply \ - add_multiply_invalid add_phase add_phase_invalid add_polynom \ - add_protect add_raw add_raw_include add_raw_invalid add_raw_spf \ + add_bit_scalars add_carray add_clincom add_code add_const \ + add_cpolynom add_crecip add_crecip89 add_divide add_divide_invalid \ + add_duplicate add_format add_invalid add_lincom add_lincom_affix \ + add_lincom_invalid add_lincom_nfields add_linterp \ + add_linterp_invalid add_meta add_meta_alias add_mplex \ + add_mplex_scalars add_multiply add_multiply_invalid add_phase \ + add_phase_invalid add_polynom add_polynom_scalar add_protect add_raw \ + add_raw_include add_raw_invalid add_raw_spf add_raw_spf_scalar \ add_raw_type add_rdonly add_recip add_resolv add_sbit add_scalar \ add_scalar_carray add_scalar_carray_bad add_sort add_spec \ add_spec_directive add_spec_invalid add_spec_meta add_spec_resolv \ @@ -173,7 +174,7 @@ fragment_name fragment_name_oor fragment_num fragment_parent GET_TESTS=get64 get_affix get_bad_code get_bit get_carray get_carray_len \ - get_carray_slice get_char get_clincom get_complex128 \ + get_carray_c2r get_carray_slice get_char get_clincom get_complex128 \ get_complex64 get_const get_const_complex get_const_repr \ get_cpolynom get_cpolynom1 get_cpolynom_int get_divide \ get_divide_ccin get_divide_crin \ Copied: branches/getdata-0.8/test/add_bit_scalars.c (from rev 862, trunk/getdata/test/add_bit_scalars.c) =================================================================== --- branches/getdata-0.8/test/add_bit_scalars.c (rev 0) +++ branches/getdata-0.8/test/add_bit_scalars.c 2014-12-05 09:55:45 UTC (rev 931) @@ -0,0 +1,81 @@ +/* Copyright (C) 2013 D. V. Wiebe + * + *************************************************************************** + * + * This file is part of the GetData project. + * + * GetData is free software; you can redistribute it and/or modify it under + * the terms of the GNU Lesser General Public License as published by the + * Free Software Foundation; either version 2.1 of the License, or (at your + * option) any later version. + * + * GetData is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public + * License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with GetData; if not, write to the Free Software Foundation, Inc., + * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + */ +/* Add a dirfile field */ +#include "test.h" + +#include <stdlib.h> +#include <stdio.h> +#include <sys/types.h> +#include <sys/stat.h> +#include <fcntl.h> +#include <string.h> +#include <errno.h> + +int main(void) +{ + const char *filedir = "dirfile"; + const char *format = "dirfile/format"; + const char *data = "dirfile/data"; + int e1, e2, e3, r = 0; + DIRFILE *D; + gd_entry_t E; + + rmdirfile(); + memset(&E, 0, sizeof(E)); + E.field = "bit1"; + E.field_type = GD_BIT_ENTRY; + E.in_fields[0] = "INDEX"; + E.EN(bit,bitnum) = -1; + E.EN(bit,numbits) = 1; + E.scalar[0] = "const"; + + D = gd_open(filedir, GD_RDWR | GD_CREAT | GD_VERBOSE); + gd_add(D, &E); + e1 = gd_error(D); + + E.field = "bit2"; + E.EN(bit,bitnum) = 1; + E.EN(bit,numbits) = 0; + E.scalar[0] = NULL; + E.scalar[1] = "const"; + gd_add(D, &E); + e2 = gd_error(D); + + E.field = "bit3"; + E.EN(bit,bitnum) = 61; + E.EN(bit,numbits) = 5; + E.scalar[0] = "const"; + E.scalar[1] = "const"; + gd_add(D, &E); + e3 = gd_error(D); + + gd_discard(D); + + unlink(data); + unlink(format); + rmdir(filedir); + + CHECKI(e1, GD_E_OK); + CHECKI(e2, GD_E_OK); + CHECKI(e3, GD_E_OK); + + return r; +} Copied: branches/getdata-0.8/test/add_mplex_scalars.c (from rev 862, trunk/getdata/test/add_mplex_scalars.c) =================================================================== --- branches/getdata-0.8/test/add_mplex_scalars.c (rev 0) +++ branches/getdata-0.8/test/add_mplex_scalars.c 2014-12-05 09:55:45 UTC (rev 931) @@ -0,0 +1,64 @@ +/* Copyright (C) 2013 D. V. Wiebe + * + *************************************************************************** + * + * This file is part of the GetData project. + * + * GetData is free software; you can redistribute it and/or modify it under + * the terms of the GNU Lesser General Public License as published by the + * Free Software Foundation; either version 2.1 of the License, or (at your + * option) any later version. + * + * GetData is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public + * License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with GetData; if not, write to the Free Software Foundation, Inc., + * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + */ +/* Add a dirfile field */ +#include "test.h" + +#include <stdlib.h> +#include <stdio.h> +#include <sys/types.h> +#include <sys/stat.h> +#include <fcntl.h> +#include <string.h> +#include <errno.h> + +int main(void) +{ + const char *filedir = "dirfile"; + const char *format = "dirfile/format"; + const char *data = "dirfile/data"; + int error, r = 0; + DIRFILE *D; + gd_entry_t E; + + rmdirfile(); + memset(&E, 0, sizeof(E)); + E.field = "mplex1"; + E.field_type = GD_MPLEX_ENTRY; + E.in_fields[0] = "INDEX"; + E.in_fields[1] = "INDEX"; + E.EN(mplex,count_val) = 0; + E.EN(mplex,period) = -1; + E.scalar[1] = "const"; + + D = gd_open(filedir, GD_RDWR | GD_CREAT | GD_VERBOSE); + gd_add(D, &E); + error = gd_error(D); + + gd_discard(D); + + unlink(data); + unlink(format); + rmdir(filedir); + + CHECKI(error, GD_E_OK); + + return r; +} Deleted: branches/getdata-0.8/test/add_mplex_val.c =================================================================== --- branches/getdata-0.8/test/add_mplex_val.c 2014-12-05 01:37:25 UTC (rev 930) +++ branches/getdata-0.8/test/add_mplex_val.c 2014-12-05 09:55:45 UTC (rev 931) @@ -1,43 +0,0 @@ -/* Copyright (C) 2012 D. V. Wiebe - * - *************************************************************************** - * - * This file is part of the GetData project. - * - * GetData is free software; you can redistribute it and/or modify it under - * the terms of the GNU Lesser General Public License as published by the - * Free Software Foundation; either version 2.1 of the License, or (at your - * option) any later version. - * - * GetData is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public - * License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with GetData; if not, write to the Free Software Foundation, Inc., - * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - */ -#include "test.h" - -int main(void) -{ - const char *filedir = "dirfile"; - const char *format = "dirfile/format"; - int error, r = 0; - DIRFILE *D; - - rmdirfile(); - D = gd_open(filedir, GD_RDWR | GD_CREAT); - gd_add_mplex(D, "new", "in", "count", 4, -3, 0); - error = gd_error(D); - - gd_close(D); - - unlink(format); - rmdir(filedir); - - CHECKI(error, GD_E_BAD_ENTRY); - - return r; -} Copied: branches/getdata-0.8/test/add_polynom_scalar.c (from rev 862, trunk/getdata/test/add_polynom_scalar.c) =================================================================== --- branches/getdata-0.8/test/add_polynom_scalar.c (rev 0) +++ branches/getdata-0.8/test/add_polynom_scalar.c 2014-12-05 09:55:45 UTC (rev 931) @@ -0,0 +1,79 @@ +/* Copyright (C) 2013 D. V. Wiebe + * + *************************************************************************** + * + * This file is part of the GetData project. + * + * GetData is free software; you can redistribute it and/or modify it under + * the terms of the GNU Lesser General Public License as published by the + * Free Software Foundation; either version 2.1 of the License, or (at your + * option) any later version. + * + * GetData is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public + * License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with GetData; if not, write to the Free Software Foundation, Inc., + * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + */ +#include "test.h" + +int main(void) +{ + const char *filedir = "dirfile"; + const char *format = "dirfile/format"; + int error, r = 0; + DIRFILE *D; + + gd_entry_t E, e; + memset(&E, 0, sizeof(E)); + E.field = "data"; + E.field_type = GD_POLYNOM_ENTRY; + E.fragment_index = 0; + E.EN(polynom,poly_ord) = 3; + E.comp_scal = 0; + E.in_fields[0] = "INDEX"; + E.scalar[0] = "A"; + E.scalar[1] = "B"; + E.scalar[2] = "C"; + E.scalar[3] = "D"; + + rmdirfile(); + D = gd_open(filedir, GD_RDWR | GD_CREAT | GD_VERBOSE); + gd_add_spec(D, "A CONST INT64 1", 0); + gd_add_spec(D, "B CONST INT64 2", 0); + gd_add_spec(D, "C CONST INT64 3", 0); + gd_add_spec(D, "D CONST INT64 4", 0); + gd_add(D, &E); + error = gd_error(D); + + /* check */ + gd_entry(D, "data", &e); + if (gd_error(D)) + r = 1; + else { + CHECKI(e.field_type, GD_POLYNOM_ENTRY); + CHECKI(e.fragment_index, 0); + CHECKI(e.EN(polynom,poly_ord), 3); + CHECKF(e.EN(polynom,a)[0], 1); + CHECKF(e.EN(polynom,a)[1], 2); + CHECKF(e.EN(polynom,a)[2], 3); + CHECKF(e.EN(polynom,a)[3], 4); + CHECKS(e.scalar[0], "A"); + CHECKS(e.scalar[1], "B"); + CHECKS(e.scalar[2], "C"); + CHECKS(e.scalar[3], "D"); + gd_free_entry_strings(&e); + } + + gd_close(D); + + unlink(format); + rmdir(filedir); + + CHECKI(error, GD_E_OK); + + return r; +} Copied: branches/getdata-0.8/test/add_raw_spf_scalar.c (from rev 862, trunk/getdata/test/add_raw_spf_scalar.c) =================================================================== --- branches/getdata-0.8/test/add_raw_spf_scalar.c (rev 0) +++ branches/getdata-0.8/test/add_raw_spf_scalar.c 2014-12-05 09:55:45 UTC (rev 931) @@ -0,0 +1,76 @@ +/* Copyright (C) 2013 D. V. Wiebe + * + *************************************************************************** + * + * This file is part of the GetData project. + * + * GetData is free software; you can redistribute it and/or modify it under + * the terms of the GNU Lesser General Public License as published by the + * Free Software Foundation; either version 2.1 of the License, or (at your + * option) any later version. + * + * GetData is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public + * License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with GetData; if not, write to the Free Software Foundation, Inc., + * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + */ +/* Add a dirfile field */ +#include "test.h" + +#include <stdlib.h> +#include <stdio.h> +#include <sys/types.h> +#include <sys/stat.h> +#include <fcntl.h> +#include <string.h> +#include <errno.h> + +int main(void) +{ + const char *filedir = "dirfile"; + const char *format = "dirfile/format"; + const char *data = "dirfile/data"; + int error, r = 0; + DIRFILE *D; + gd_entry_t E, e; + + rmdirfile(); + E.field = "data"; + E.field_type = GD_RAW_ENTRY; + E.fragment_index = 0; + E.EN(raw,spf) = 0; + E.EN(raw,data_type) = GD_UINT8; + E.scalar[0] = "const"; + + D = gd_open(filedir, GD_RDWR | GD_CREAT | GD_VERBOSE); + gd_add_spec(D, "const CONST UINT8 2", 0); + gd_add(D, &E); + error = gd_error(D); + + /* check */ + gd_entry(D, "data", &e); + if (gd_error(D)) + r = 1; + else { + CHECKI(e.field_type, GD_RAW_ENTRY); + CHECKI(e.fragment_index, 0); + CHECKI(e.EN(raw,spf), 2); + CHECKI(e.EN(raw,data_type), GD_UINT8); + CHECKS(e.scalar[0], "const"); + gd_free_entry_strings(&e); + } + + gd_close(D); + + unlink(data); + unlink(format); + rmdir(filedir); + + CHECKI(error, GD_E_OK); + + return r; +} Copied: branches/getdata-0.8/test/get_carray_c2r.c (from rev 862, trunk/getdata/test/get_carray_c2r.c) =================================================================== --- branches/getdata-0.8/test/get_carray_c2r.c (rev 0) +++ branches/getdata-0.8/test/get_carray_c2r.c 2014-12-05 09:55:45 UTC (rev 931) @@ -0,0 +1,62 @@ +/* Copyright (C) 2013 D. V. Wiebe + * + *************************************************************************** + * + * This file is part of the GetData project. + * + * GetData is free software; you can redistribute it and/or modify it under + * the terms of the GNU Lesser General Public License as published by the + * Free Software Foundation; either version 2.1 of the License, or (at your + * option) any later version. + * + * GetData is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public + * License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with GetData; if not, write to the Free Software Foundation, Inc., + * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + */ +#include "test.h" + +#include <stdlib.h> +#include <sys/types.h> +#include <sys/stat.h> +#include <fcntl.h> +#include <string.h> +#include <errno.h> +#include <math.h> + +int main(void) +{ + const char *filedir = "dirfile"; + const char *format = "dirfile/format"; + const char *format_data = "carray CARRAY COMPLEX128 8.3;7.2 6.1;5.0 3.9;2.8 1.7;0.6\n"; + double c[4]; + int fd, i, n, error, r = 0; + DIRFILE *D; + + rmdirfile(); + mkdir(filedir, 0777); + + fd = open(format, O_CREAT | O_EXCL | O_WRONLY, 0666); + write(fd, format_data, strlen(format_data)); + close(fd); + + D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); + n = gd_get_carray(D, "carray", GD_FLOAT64, c); + error = gd_error(D); + + gd_close(D); + + unlink(format); + rmdir(filedir); + + CHECKI(error, 0); + CHECKI(n, 0); + for (i = 0; i < 4; ++i) + CHECKFi(i, c[i], 8.3 - 2 * i * 1.1); + + return r; +} This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ket...@us...> - 2014-12-05 01:37:29
|
Revision: 930 http://sourceforge.net/p/getdata/code/930 Author: ketiltrout Date: 2014-12-05 01:37:25 +0000 (Fri, 05 Dec 2014) Log Message: ----------- Backport simple fixes from trunk to 0.8 branch. Modified Paths: -------------- branches/getdata-0.8/ChangeLog branches/getdata-0.8/Makefile.am branches/getdata-0.8/NEWS branches/getdata-0.8/bindings/cxx/Makefile.am branches/getdata-0.8/bindings/cxx/getdata/entry.h branches/getdata-0.8/bindings/cxx/rawentry.cpp branches/getdata-0.8/bindings/cxx/test/Makefile.am branches/getdata-0.8/bindings/f77/Makefile.am branches/getdata-0.8/bindings/f77/test/Makefile.am branches/getdata-0.8/bindings/idl/getdata.c branches/getdata-0.8/bindings/idl/test/Makefile.am branches/getdata-0.8/bindings/matlab/Makefile.am branches/getdata-0.8/bindings/matlab/test/Makefile.am branches/getdata-0.8/bindings/python/pyfragment.c branches/getdata-0.8/bindings/python/test/Makefile.am branches/getdata-0.8/configure.ac branches/getdata-0.8/m4/version.m4 branches/getdata-0.8/src/add.c branches/getdata-0.8/src/common.c branches/getdata-0.8/src/encoding.c branches/getdata-0.8/src/flimits.c branches/getdata-0.8/src/flush.c branches/getdata-0.8/src/fpos.c branches/getdata-0.8/src/getdata.c branches/getdata-0.8/src/gzip.c branches/getdata-0.8/src/index.c branches/getdata-0.8/src/internal.h branches/getdata-0.8/src/legacy.c branches/getdata-0.8/src/mod.c branches/getdata-0.8/src/parse.c branches/getdata-0.8/src/putdata.c branches/getdata-0.8/test/Makefile.am branches/getdata-0.8/test/get_multiply_noin.c Added Paths: ----------- branches/getdata-0.8/test/get_cpolynom1.c branches/getdata-0.8/test/get_cpolynom_int.c branches/getdata-0.8/test/get_divide_ccin.c branches/getdata-0.8/test/get_divide_crin.c branches/getdata-0.8/test/get_divide_crinr.c branches/getdata-0.8/test/get_divide_rcin.c branches/getdata-0.8/test/get_divide_s.c branches/getdata-0.8/test/get_multiply_ccin.c branches/getdata-0.8/test/get_multiply_crin.c branches/getdata-0.8/test/get_multiply_crinr.c branches/getdata-0.8/test/get_multiply_rcin.c branches/getdata-0.8/test/get_multiply_s.c branches/getdata-0.8/test/get_polynom_cmpin.c branches/getdata-0.8/test/parse_hex.c branches/getdata-0.8/test/parse_utf8.c branches/getdata-0.8/test/parse_utf8_invalid.c branches/getdata-0.8/test/parse_utf8_zero.c Property Changed: ---------------- branches/getdata-0.8/test/ Modified: branches/getdata-0.8/ChangeLog =================================================================== --- branches/getdata-0.8/ChangeLog 2014-10-17 01:13:36 UTC (rev 929) +++ branches/getdata-0.8/ChangeLog 2014-12-05 01:37:25 UTC (rev 930) @@ -1,7 +1,10 @@ +2014-12-05 D. V. Wiebe <ge...@ke...> svn:930 + Backport fixes from trunk. Update build system for autotools bump. + 2013-09-05 D. V. Wiebe <ge...@ke...> svn:845 GetData-0.8.5 released. - * src/zzslim.c: + * src/zzslim.c: Fix for rename of gd_raw_file_. 2013-07-17 D. V. Wiebe <ge...@ke...> svn:835 Modified: branches/getdata-0.8/Makefile.am =================================================================== --- branches/getdata-0.8/Makefile.am 2014-10-17 01:13:36 UTC (rev 929) +++ branches/getdata-0.8/Makefile.am 2014-12-05 01:37:25 UTC (rev 930) @@ -18,7 +18,7 @@ # along with GetData; if not, write to the Free Software Foundation, Inc., # 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA # -AUTOMAKE_OPTIONS = foreign dist-bzip2 check-news 1.10 +AUTOMAKE_OPTIONS = foreign dist-bzip2 check-news 1.13 EXTRA_DIST = ChangeLog Modified: branches/getdata-0.8/NEWS =================================================================== --- branches/getdata-0.8/NEWS 2014-10-17 01:13:36 UTC (rev 929) +++ branches/getdata-0.8/NEWS 2014-12-05 01:37:25 UTC (rev 930) @@ -1,3 +1,78 @@ +New in version 0.8.6a: + + Library Changes: + + * BUG FIX: The parsing of the \x and \u escape sequences is now correct. + + * BUG FIX: A scalar field code specified for the last factor in a POLYNOM + entry is no longer ignored by gd_[m]add(). + + * BUG FIX: gd_[m]add() no longer rejects MPLEX fields with negative count_val. + + * BUG FIX: DIVIDE fields with complex-valued divisors are now properly + computed. + + * BUG FIX: Complex-valued POLYNOM and RECIP fields are now computed properly + when the library is built in ANSI C mode. + + * BUG FIX: gd_alter_entry() no longer corrupts the DIRFILE when modifying + named scalars of MPLEX fields. + + * BUG FIX: gd_bof() now returns the correct number (i.e.: zero) when reporting + the beginning of field of derived fields shifted to before the start of the + dirfile. Previously, this function incorrectly returned values ranging from + zero to one less than the samples-per-frame of the requested field. + + * BUG FIX: gd_flush(), gd_sync(), gd_raw_close() no longer segfault when + operating on a LINCOM with only one input field. + + * BUG FIX: gd_seek() now works correctly on PHASE fields; previously, the + sign of the PHASE shift was flipped. + + * BUG FIX: gd_seek() now correctly positions the virtual I/O pointer of the + INDEX field. + + * BUG FIX: gd_framenum_subset() now returns the correct value when passed a + field_end which is beyond the end of field, and then is required to + extrapolate outside of the specified frame range. + + * BUG FIX: gd_error_string() now produces the correct string when reporting + an out-of-range poly_ord encountered by gd_add_polynom() and similar. + + * BUG FIX: gd_[m]alter_spec() no longer ignore co-efficients specified for + POLYNOM entries. + + * BUG FIX: gd_alter_encoding() now deletes the internal cache of RAW filenames + of the affected fragment; previously, these old, cached filenames could lead + to I/O errors when reading and writing the re-encoded RAW data files. + + * BUG FIX: Calling the Legacy API function GetFormat() on a Dirfile with MPLEX + or WINDOW fields no longer results in a segmentation fault. + + * BUG FIX: Attempts to read past the EOF of a gzipped field no longer results + in an I/O error, but successfully returns no data. + + * BUG FIX: The internal recursion counter wasn't being properly reset on + certain error conditions, leading to spurious GD_E_RECURSE_LEVEL errors + being returned from valid calls. + + Bindings Changes: + + * C++ BUG FIX: Fixed segfault in RawEntry destructor. Reported by S. J. + Benton. + + * C++ BUG FIX: Entry::ComplexScalars() now returns non-zero for RECIP + entries when appropriate, instead of always returning zero. (The + RecipEntry::ComplexScalars() method always returned the correct value.) + + * IDL BUG FIX: The /UPDATEDB flag to gd_rename is no longer ignored; also, the + /MOVE_DATA flag no longer also acts as if /UPDATEDB had been specified. + + * PYTHON BUG FIX: The keyword for the "dirfile" parameter in the + getdata.fragment constructor is now properly spelled. + +|==============================================================================| + New in verison 0.8.5: Library Changes: Modified: branches/getdata-0.8/bindings/cxx/Makefile.am =================================================================== --- branches/getdata-0.8/bindings/cxx/Makefile.am 2014-10-17 01:13:36 UTC (rev 929) +++ branches/getdata-0.8/bindings/cxx/Makefile.am 2014-12-05 01:37:25 UTC (rev 930) @@ -29,7 +29,7 @@ WEXTRA=-Wextra endif -INCLUDES = ${WALL} $(WEXTRA) -I$(top_srcdir)/src +AM_CPPFLAGS = ${WALL} $(WEXTRA) -I$(top_srcdir)/src LIBS= SUBDIRS=test Modified: branches/getdata-0.8/bindings/cxx/getdata/entry.h =================================================================== --- branches/getdata-0.8/bindings/cxx/getdata/entry.h 2014-10-17 01:13:36 UTC (rev 929) +++ branches/getdata-0.8/bindings/cxx/getdata/entry.h 2014-12-05 01:37:25 UTC (rev 930) @@ -101,7 +101,8 @@ virtual int ComplexScalars() const { return (E.field_type == GD_LINCOM_ENTRY || - E.field_type == GD_POLYNOM_ENTRY) ? E.comp_scal : 0; + E.field_type == GD_POLYNOM_ENTRY || + E.field_type == GD_RECIP_ENTRY) ? E.comp_scal : 0; } virtual const char *Scalar(int index = 0) const; Modified: branches/getdata-0.8/bindings/cxx/rawentry.cpp =================================================================== --- branches/getdata-0.8/bindings/cxx/rawentry.cpp 2014-10-17 01:13:36 UTC (rev 929) +++ branches/getdata-0.8/bindings/cxx/rawentry.cpp 2014-12-05 01:37:25 UTC (rev 930) @@ -30,6 +30,7 @@ E.u.raw.spf = spf; E.u.raw.data_type = (gd_type_t)data_type; E.fragment_index = fragment_index; + filename = NULL; } RawEntry::~RawEntry() Modified: branches/getdata-0.8/bindings/cxx/test/Makefile.am =================================================================== --- branches/getdata-0.8/bindings/cxx/test/Makefile.am 2014-10-17 01:13:36 UTC (rev 929) +++ branches/getdata-0.8/bindings/cxx/test/Makefile.am 2014-12-05 01:37:25 UTC (rev 930) @@ -18,7 +18,7 @@ # along with GetData; if not, write to the Free Software Foundation, Inc., # 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA # -AUTOMAKE_OPTIONS = foreign +AUTOMAKE_OPTIONS = foreign serial-tests if CXX_WALL WALL=-Wall @@ -28,7 +28,7 @@ WEXTRA=-Wextra endif -INCLUDES = ${WALL} $(WEXTRA) -I$(srcdir)/.. -I$(top_srcdir)/src +AM_CPPFLAGS = ${WALL} $(WEXTRA) -I$(srcdir)/.. -I$(top_srcdir)/src LDADD=../libgetdata++.la TESTS=big_test Modified: branches/getdata-0.8/bindings/f77/Makefile.am =================================================================== --- branches/getdata-0.8/bindings/f77/Makefile.am 2014-10-17 01:13:36 UTC (rev 929) +++ branches/getdata-0.8/bindings/f77/Makefile.am 2014-12-05 01:37:25 UTC (rev 930) @@ -45,7 +45,7 @@ endif FCFLAGS += $(FC_WALL) $(FC_WEXTRA) -INCLUDES = -I$(top_srcdir)/src +AM_CPPFLAGS = -I$(top_srcdir)/src EXTRA_DIST=getdata.f.in getdata.f90.in SUBDIRS = test Modified: branches/getdata-0.8/bindings/f77/test/Makefile.am =================================================================== --- branches/getdata-0.8/bindings/f77/test/Makefile.am 2014-10-17 01:13:36 UTC (rev 929) +++ branches/getdata-0.8/bindings/f77/test/Makefile.am 2014-12-05 01:37:25 UTC (rev 930) @@ -18,7 +18,7 @@ # along with GetData; if not, write to the Free Software Foundation, Inc., # 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA # -AUTOMAKE_OPTIONS = foreign +AUTOMAKE_OPTIONS = foreign serial-tests if FC_WALL FC_WALL=-Wall Modified: branches/getdata-0.8/bindings/idl/getdata.c =================================================================== --- branches/getdata-0.8/bindings/idl/getdata.c 2014-10-17 01:13:36 UTC (rev 929) +++ branches/getdata-0.8/bindings/idl/getdata.c 2014-12-05 01:37:25 UTC (rev 930) @@ -3487,7 +3487,7 @@ const char* new_code = IDL_VarGetString(argv[2]); gd_rename(D, field_code, new_code, (kw.move_data ? GD_REN_DATA : 0) | - (kw.move_data ? GD_REN_UPDB : 0)); + (kw.updatedb ? GD_REN_UPDB : 0)); GDIDL_SET_ERROR(D); Modified: branches/getdata-0.8/bindings/idl/test/Makefile.am =================================================================== --- branches/getdata-0.8/bindings/idl/test/Makefile.am 2014-10-17 01:13:36 UTC (rev 929) +++ branches/getdata-0.8/bindings/idl/test/Makefile.am 2014-12-05 01:37:25 UTC (rev 930) @@ -18,7 +18,7 @@ # along with GetData; if not, write to the Free Software Foundation, Inc., # 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA # -AUTOMAKE_OPTIONS = foreign +AUTOMAKE_OPTIONS = foreign serial-tests if TEST_IDL TESTS_ENVIRONMENT=${DL_LIBRARY_PATH}=${${DL_LIBRARY_PATH}}:../../../src/.libs IDL_PATH="${srcdir}" IDL_DLM_PATH=../.libs ${IDL} Modified: branches/getdata-0.8/bindings/matlab/Makefile.am =================================================================== --- branches/getdata-0.8/bindings/matlab/Makefile.am 2014-10-17 01:13:36 UTC (rev 929) +++ branches/getdata-0.8/bindings/matlab/Makefile.am 2014-12-05 01:37:25 UTC (rev 930) @@ -20,10 +20,6 @@ # AUTOMAKE_OPTIONS = foreign -if GETDATA_DEBUG -DEBUG_C = ../../src/debug.c -endif - SUBDIRS=test matlabdir=$(matlabbasedir)/getdata @@ -84,17 +80,16 @@ lib_LTLIBRARIES=libgetdata-matlab.la libgetdata_matlab_la_SOURCES=matlab.c gd_matlab.h -nodist_libgetdata_matlab_la_SOURCES=$(DEBUG_C) libgetdata_matlab_la_CPPFLAGS=${MATLAB_CPPFLAGS} libgetdata_matlab_la_LDFLAGS=-version-info @MATLABGETDATA_VERSION@ if GD_EXTERNAL libgetdata_matlab_la_LIBADD=$(GETDATA_LIBS) -INCLUDES=$(GETDATA_CFLAGS) +AM_CPPFLAGS=$(GETDATA_CFLAGS) GDMX_LIBS=$(GETDATA_LIBS) else libgetdata_matlab_la_LIBADD=../../src/libgetdata.la -INCLUDES=-I${top_srcdir}/src -I../../src +AM_CPPFLAGS=-I${top_srcdir}/src -I../../src GDMX_LIBS=-L../../src/.libs -lgetdata endif @@ -103,7 +98,7 @@ cat ${srcdir}/doc.tail >> $@ %.@mexext@: %.c libgetdata-matlab.la - ${MEX} ${INCLUDES} -L.libs -lgetdata-matlab $(GDMX_LIBS) $< + ${MEX} ${AM_CPPFLAGS} -L.libs -lgetdata-matlab $(GDMX_LIBS) $< Contents.m: ${srcdir}/Contents.m.head make_contents.sh $(matlabfiles) \ $(matlabdocfiles) ${srcdir}/doc.tail Modified: branches/getdata-0.8/bindings/matlab/test/Makefile.am =================================================================== --- branches/getdata-0.8/bindings/matlab/test/Makefile.am 2014-10-17 01:13:36 UTC (rev 929) +++ branches/getdata-0.8/bindings/matlab/test/Makefile.am 2014-12-05 01:37:25 UTC (rev 930) @@ -18,7 +18,7 @@ # along with GetData; if not, write to the Free Software Foundation, Inc., # 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA # -AUTOMAKE_OPTIONS = foreign +AUTOMAKE_OPTIONS = foreign serial-tests if TEST_MATLAB TESTS_ENVIRONMENT=${DL_LIBRARY_PATH}=${${DL_LIBRARY_PATH}}:../../../src/.libs:../.libs MATLABPATH=${srcdir}:..:${srcdir}/.. ${srcdir}/test.sh ${MATLAB} Modified: branches/getdata-0.8/bindings/python/pyfragment.c =================================================================== --- branches/getdata-0.8/bindings/python/pyfragment.c 2014-10-17 01:13:36 UTC (rev 929) +++ branches/getdata-0.8/bindings/python/pyfragment.c 2014-12-05 01:37:25 UTC (rev 930) @@ -50,7 +50,7 @@ static int gdpy_fragment_init(struct gdpy_fragment_t *self, PyObject *args, PyObject *keys) { - char *keywords[] = {"dirifle", "index", NULL}; + char *keywords[] = {"dirfile", "index", NULL}; dtrace("%p, %p, %p", self, args, keys); Modified: branches/getdata-0.8/bindings/python/test/Makefile.am =================================================================== --- branches/getdata-0.8/bindings/python/test/Makefile.am 2014-10-17 01:13:36 UTC (rev 929) +++ branches/getdata-0.8/bindings/python/test/Makefile.am 2014-12-05 01:37:25 UTC (rev 930) @@ -18,7 +18,7 @@ # along with GetData; if not, write to the Free Software Foundation, Inc., # 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA # -AUTOMAKE_OPTIONS = foreign +AUTOMAKE_OPTIONS = foreign serial-tests if TEST_PYTHON TESTS_ENVIRONMENT=${DL_LIBRARY_PATH}=${${DL_LIBRARY_PATH}}:../../../src/.libs PYTHONPATH=../.libs/ ${PYTHON} Modified: branches/getdata-0.8/configure.ac =================================================================== --- branches/getdata-0.8/configure.ac 2014-10-17 01:13:36 UTC (rev 929) +++ branches/getdata-0.8/configure.ac 2014-12-05 01:37:25 UTC (rev 930) @@ -44,7 +44,7 @@ AC_SUBST([GETDATA_REVISION], [getdata_revision]) AC_SUBST([GETDATA_VERSION_SUFFIX], [getdata_extra]) -AC_PREREQ([2.63]) +AC_PREREQ([2.65]) AC_CONFIG_MACRO_DIR([m4]) LT_PREREQ([2.2.6b]) Modified: branches/getdata-0.8/m4/version.m4 =================================================================== --- branches/getdata-0.8/m4/version.m4 2014-10-17 01:13:36 UTC (rev 929) +++ branches/getdata-0.8/m4/version.m4 2014-12-05 01:37:25 UTC (rev 930) @@ -20,8 +20,8 @@ m4_define(getdata_major, 0) m4_define(getdata_minor, 8) -m4_define(getdata_revision, 5) -m4_define(getdata_extra, []) +m4_define(getdata_revision, 6) +m4_define(getdata_extra, [a]) m4_define(getdata_version, getdata_major.getdata_minor.getdata_revision[]getdata_extra) Modified: branches/getdata-0.8/src/add.c =================================================================== --- branches/getdata-0.8/src/add.c 2014-10-17 01:13:36 UTC (rev 929) +++ branches/getdata-0.8/src/add.c 2014-12-05 01:37:25 UTC (rev 930) @@ -444,9 +444,6 @@ if (entry->EN(mplex,period) < 0) _GD_SetError(D, GD_E_BAD_ENTRY, GD_E_ENTRY_PERIOD, NULL, entry->EN(mplex,period), NULL); - else if (entry->EN(mplex,count_val) < 0) - _GD_SetError(D, GD_E_BAD_ENTRY, GD_E_ENTRY_CNTVAL, NULL, - entry->EN(mplex,count_val), NULL); copy_scalar[0] = copy_scalar[1] = 1; break; @@ -494,7 +491,7 @@ if (E->EN(polynom,poly_ord) < 1 || E->EN(polynom,poly_ord) > GD_MAX_POLYORD) { - _GD_SetError(D, GD_E_BAD_ENTRY, GD_E_ENTRY_NFIELDS, NULL, + _GD_SetError(D, GD_E_BAD_ENTRY, GD_E_ENTRY_POLYORD, NULL, E->EN(polynom,poly_ord), NULL); } else { _GD_CheckCodeAffixes(D, NULL, entry->in_fields[0], @@ -526,7 +523,7 @@ E->in_fields[0] = _GD_Strdup(D, entry->in_fields[0]); - for (i = 0; i < E->EN(polynom,poly_ord); ++i) + for (i = 0; i <= E->EN(polynom,poly_ord); ++i) copy_scalar[i] = 1; break; case GD_ALIAS_ENTRY: Modified: branches/getdata-0.8/src/common.c =================================================================== --- branches/getdata-0.8/src/common.c 2014-10-17 01:13:36 UTC (rev 929) +++ branches/getdata-0.8/src/common.c 2014-12-05 01:37:25 UTC (rev 930) @@ -761,7 +761,7 @@ for (i = 0; i < n_read; i++) { \ const t d = ((t *)data)[2 * i] * ((t *)data)[2 * i] + \ ((t *)data)[2 * i + 1] * ((t *)data)[2 * i + 1]; \ - ((t *)data)[2 * i] = (t)((dividend[0] * ((t *)data)[2 * i] - \ + ((t *)data)[2 * i] = (t)((dividend[0] * ((t *)data)[2 * i] + \ dividend[1] * ((t *)data)[2 * i + 1]) / d); \ ((t *)data)[2 * i + 1] = (t)((dividend[1] * ((t *)data)[2 * i] - \ dividend[0] * ((t *)data)[2 * i]) / d); \ Modified: branches/getdata-0.8/src/encoding.c =================================================================== --- branches/getdata-0.8/src/encoding.c 2014-10-17 01:13:36 UTC (rev 929) +++ branches/getdata-0.8/src/encoding.c 2014-12-05 01:37:25 UTC (rev 930) @@ -839,6 +839,10 @@ } /* reset encoding subscheme. */ D->entry[i]->e->u.raw.file[0].subenc = GD_ENC_UNKNOWN; + + /* delete name */ + free(D->entry[i]->e->u.raw.file[0].name); + D->entry[i]->e->u.raw.file[0].name = NULL; } } Modified: branches/getdata-0.8/src/flimits.c =================================================================== --- branches/getdata-0.8/src/flimits.c 2014-10-17 01:13:36 UTC (rev 929) +++ branches/getdata-0.8/src/flimits.c 2014-12-05 01:37:25 UTC (rev 930) @@ -448,7 +448,7 @@ /* The beginning-of-frame may not be before frame zero */ if (bof < 0) - bof = 0; + bof = *ds = 0; } break; Modified: branches/getdata-0.8/src/flush.c =================================================================== --- branches/getdata-0.8/src/flush.c 2014-10-17 01:13:36 UTC (rev 929) +++ branches/getdata-0.8/src/flush.c 2014-12-05 01:37:25 UTC (rev 930) @@ -57,9 +57,9 @@ } break; case GD_LINCOM_ENTRY: - for (i = 2; i < E->EN(lincom,n_fields); ++i) + for (i = 0; i < E->EN(lincom,n_fields); ++i) _GD_Flush(D, E->e->entry[i], syn, clo); - /* fallthrough */ + break; case GD_MULTIPLY_ENTRY: case GD_DIVIDE_ENTRY: case GD_WINDOW_ENTRY: Modified: branches/getdata-0.8/src/fpos.c =================================================================== --- branches/getdata-0.8/src/fpos.c 2014-10-17 01:13:36 UTC (rev 929) +++ branches/getdata-0.8/src/fpos.c 2014-12-05 01:37:25 UTC (rev 930) @@ -296,7 +296,7 @@ break; case GD_PHASE_ENTRY: if (!_GD_BadInput(D, E, 0, 1)) - _GD_Seek(D, E->e->entry[0], offset + E->EN(phase,shift), mode); + _GD_Seek(D, E->e->entry[0], offset - E->EN(phase,shift), mode); break; case GD_INDEX_ENTRY: E->e->u.index_pos = offset; @@ -370,7 +370,7 @@ if (whence == GD_SEEK_SET) pos = 0; else if (whence == GD_SEEK_CUR) - pos = _GD_GetFilePos(D, entry, 1); + pos = _GD_GetFilePos(D, entry, -1); else if (whence == GD_SEEK_END) { pos = _GD_GetEOF(D, entry, NULL, &is_index); if (is_index) @@ -387,7 +387,7 @@ if (D->error) pos = -1; else - pos = _GD_GetFilePos(D, entry, 1); + pos = _GD_GetFilePos(D, entry, -1); dreturn("%lli", (long long)pos); return pos; Modified: branches/getdata-0.8/src/getdata.c =================================================================== --- branches/getdata-0.8/src/getdata.c 2014-10-17 01:13:36 UTC (rev 929) +++ branches/getdata-0.8/src/getdata.c 2014-12-05 01:37:25 UTC (rev 930) @@ -386,12 +386,90 @@ #ifdef GD_NO_C99_API #define POLYNOMC(t) \ switch (n) { \ - case 2: POLYNOM2(t,2 * npts); break; \ - case 3: POLYNOM3(t,2 * npts); break; \ - case 4: POLYNOM4(t,2 * npts); break; \ - case 5: POLYNOM5(t,2 * npts); break; \ + case 2: POLYNOMC2(t,2 * npts); break; \ + case 3: POLYNOMC3(t,2 * npts); break; \ + case 4: POLYNOMC4(t,2 * npts); break; \ + case 5: POLYNOMC5(t,2 * npts); break; \ default: _GD_InternalError(D); \ } + +#define POLYNOMC5(t,npts) \ + do { \ + for (i = 0; i < npts; i++) { \ + const double x = ((t*)data)[2 * i]; \ + const double x2 = x * x; \ + const double x3 = x2 * x; \ + const double x4 = x3 * x; \ + const double x5 = x4 * x; \ + const double y = ((t*)data)[2 * i + 1]; \ + const double y2 = y * y; \ + const double y3 = y2 * y; \ + const double y4 = y3 * y; \ + const double y5 = y4 * y; \ + ((t*)data)[2 * i] = (t)( \ + a[5] * (x5 - 10 * x3 * y2 + 5 * x * y4) \ + - a[4] * (x4 - 6 * x2 * y2 + y4) - a[3] * (x3 - 3 * x * y2) \ + + a[2] * (x2 - y2) + a[1] * x + a[0] \ + ); \ + ((t*)data)[2 * i + 1] = (t)( \ + a[5] * (5 * x4 * y - 10 * x3 * y2 + y5) \ + + a[4] * (4 * x3 * y - 4 * x * y3) + a[3] * (3 * x2 * y - y3) \ + + a[2] * 2 * x * y + a[1] * y \ + ); \ + } \ + } while (0) + +#define POLYNOMC4(t,npts) \ + do { \ + for (i = 0; i < npts; i++) { \ + const double x = ((t*)data)[2 * i]; \ + const double x2 = x * x; \ + const double x3 = x2 * x; \ + const double x4 = x3 * x; \ + const double y = ((t*)data)[2 * i + 1]; \ + const double y2 = y * y; \ + const double y3 = y2 * y; \ + const double y4 = y3 * y; \ + ((t*)data)[2 * i] = (t)( \ + a[4] * (x4 - 6 * x2 * y2 + y4) + a[3] * (x3 - 3 * x * y2) \ + + a[2] * (x2 - y2) + a[1] * x + a[0] \ + ); \ + ((t*)data)[2 * i + 1] = (t)( \ + a[4] * (4 * x3 * y - 4 * x * y3) + a[3] * (3 * x2 * y - y3) \ + + a[2] * 2 * x * y + a[1] * y \ + ); \ + } \ + } while (0) + +#define POLYNOMC3(t,npts) \ + do { \ + for (i = 0; i < npts; i++) { \ + const double x = ((t*)data)[2 * i]; \ + const double x2 = x * x; \ + const double x3 = x2 * x; \ + const double y = ((t*)data)[2 * i + 1]; \ + const double y2 = y * y; \ + const double y3 = y2 * y; \ + ((t*)data)[2 * i] = (t)( \ + a[3] * (x3 - 3 * x * y2) + a[2] * (x2 - y2) + a[1] * x + a[0] \ + ); \ + ((t*)data)[2 * i + 1] = (t)( \ + a[3] * (3 * x2 * y - y3) + a[2] * 2 * x * y + a[1] * y \ + ); \ + } \ + } while (0) + +#define POLYNOMC2(t,npts) \ + do { \ + for (i = 0; i < npts; i++) { \ + const double x = ((t*)data)[2 * i]; \ + const double x2 = x * x; \ + const double y = ((t*)data)[2 * i + 1]; \ + const double y2 = y * y; \ + ((t*)data)[2 * i] = (t)(a[2] * (x2 - y2) + a[1] * x + a[0]); \ + ((t*)data)[2 * i + 1] = (t)(a[2] * 2 * x * y + a[1] * y); \ + } \ + } while (0) #else #define POLYNOMC(t) POLYNOM(complex t) #endif @@ -442,43 +520,12 @@ } #ifdef GD_NO_C99_API -#undef POLYNOM5 -#undef POLYNOM4 -#undef POLYNOM3 -#undef POLYNOM2 -#undef POLYNOMC +#undef POLYNOMC5 +#undef POLYNOMC4 +#undef POLYNOMC3 +#undef POLYNOMC2 +#undef POLYNOMC1 -#define POLYNOM5(t,npts) \ - for (i = 0; i < npts; i++) ((t*)data)[i] = (t)( \ - ((t*)data)[i] * ((t*)data)[i] * ((t*)data)[i] \ - * ((t*)data)[i] * ((t*)data)[i] * a[5][0] \ - + ((t*)data)[i] * ((t*)data)[i] * ((t*)data)[i] * ((t*)data)[i] * a[4][0]\ - + ((t*)data)[i] * ((t*)data)[i] * ((t*)data)[i] * a[3][0] \ - + ((t*)data)[i] * ((t*)data)[i] * a[2][0] \ - + ((t*)data)[i] * a[1][0] + a[0][0] \ - ) - -#define POLYNOM4(t,npts) \ - for (i = 0; i < npts; i++) ((t*)data)[i] = (t)( \ - ((t*)data)[i] * ((t*)data)[i] * ((t*)data)[i] * ((t*)data)[i] * a[4][0] \ - + ((t*)data)[i] * ((t*)data)[i] * ((t*)data)[i] * a[3][0] \ - + ((t*)data)[i] * ((t*)data)[i] * a[2][0] \ - + ((t*)data)[i] * a[1][0] + a[0][0] \ - ) - -#define POLYNOM3(t,npts) \ - for (i = 0; i < npts; i++) ((t*)data)[i] = (t)( \ - ((t*)data)[i] * ((t*)data)[i] * ((t*)data)[i] * a[3][0] \ - + ((t*)data)[i] * ((t*)data)[i] * a[2][0] \ - + ((t*)data)[i] * a[1][0] + a[0][0] \ - ) - -#define POLYNOM2(t,npts) \ - for (i = 0; i < npts; i++) ((t*)data)[i] = (t)( \ - ((t*)data)[i] * ((t*)data)[i] * a[2][0] \ - + ((t*)data)[i] * a[1][0] + a[0][0] \ - ) - #define POLYNOMC5(t,npts) \ do { \ for (i = 0; i < npts; i++) { \ @@ -580,15 +627,6 @@ ); \ } \ } while (0) - -#define POLYNOMC(t) \ - switch (n) { \ - case 2: POLYNOMC2(t,npts); break; \ - case 3: POLYNOMC3(t,npts); break; \ - case 4: POLYNOMC4(t,npts); break; \ - case 5: POLYNOMC5(t,npts); break; \ - default: _GD_InternalError(D); \ - } #endif @@ -608,16 +646,16 @@ } else { switch (type) { case GD_NULL: break; - case GD_INT8: POLYNOM( int8_t); break; - case GD_UINT8: POLYNOM( uint8_t); break; - case GD_INT16: POLYNOM( int16_t); break; - case GD_UINT16: POLYNOM(uint16_t); break; - case GD_INT32: POLYNOM( int32_t); break; - case GD_UINT32: POLYNOM(uint32_t); break; - case GD_INT64: POLYNOM( int64_t); break; - case GD_UINT64: POLYNOM(uint64_t); break; - case GD_FLOAT32: POLYNOM( float); break; - case GD_FLOAT64: POLYNOM( double); break; + case GD_INT8: + case GD_UINT8: + case GD_INT16: + case GD_UINT16: + case GD_INT32: + case GD_UINT32: + case GD_INT64: + case GD_UINT64: + case GD_FLOAT32: + case GD_FLOAT64: _GD_InternalError(D); break; case GD_COMPLEX64: POLYNOMC( float); break; case GD_COMPLEX128: POLYNOMC( double); break; default: _GD_SetError(D, GD_E_BAD_TYPE, type, NULL, 0, NULL); @@ -783,7 +821,7 @@ const t y = ((t*)A)[2 * i + 1]; \ const double d = B[i2] * B[i2] + B[i2 + 1] * B[i2 + 1]; \ ((t*)A)[2 * i] = (t)((x * B[i2] + y * B[i2 + 1]) / d); \ - ((t*)A)[2 * i + 1] = (t)((x * B[i2] + y * B[i2 + 1]) / d); \ + ((t*)A)[2 * i + 1] = (t)((y * B[i2] - x * B[i2 + 1]) / d); \ } \ } while (0) @@ -1833,18 +1871,21 @@ return 0; } - if (!E->e->calculated) + if (!E->e->calculated) { _GD_CalculateEntry(D, E, 1); - if (D->error) { - dreturn("%i", 0); - return 0; + if (D->error) { + D->recurse_level--; + dreturn("%i", 0); + return 0; + } } /* calculate the native type */ ntype = _GD_NativeType(D, E, GD_REPR_NONE); if (D->error) { + D->recurse_level--; dreturn("%i", 0); return 0; } @@ -1852,6 +1893,7 @@ if (first_samp == GD_HERE) { first_samp = _GD_GetFilePos(D, E, -1); if (D->error) { + D->recurse_level--; dreturn("%i", 0); return 0; } Modified: branches/getdata-0.8/src/gzip.c =================================================================== --- branches/getdata-0.8/src/gzip.c 2014-10-17 01:13:36 UTC (rev 929) +++ branches/getdata-0.8/src/gzip.c 2014-12-05 01:37:25 UTC (rev 930) @@ -88,8 +88,13 @@ (off_t)count, SEEK_SET); if (n == -1) { - dreturn("%i", -1); - return -1; + /* gzseek returns error on attempts to seek past the EOF in read mode */ + if (mode != GD_FILE_WRITE && gzeof((gzFile)file[0].edata)) + n = gztell((gzFile)file[0].edata); + else { + dreturn("%i", -1); + return -1; + } } n /= GD_SIZE(data_type); Modified: branches/getdata-0.8/src/index.c =================================================================== --- branches/getdata-0.8/src/index.c 2014-10-17 01:13:36 UTC (rev 929) +++ branches/getdata-0.8/src/index.c 2014-12-05 01:37:25 UTC (rev 930) @@ -125,7 +125,7 @@ } /* low is the EOF -- so, extrapolate */ - sample = _GD_Extrapolate(D, E, repr, value, low - 1, 1); + sample = _GD_Extrapolate(D, E, repr, value, low, 1); dreturn("%g", sample); return sample; } else { @@ -147,7 +147,7 @@ (dir && field_start_v < value)) { /* extrapolate BOF */ - sample = _GD_Extrapolate(D, E, repr, value, field_start_v, 0); + sample = _GD_Extrapolate(D, E, repr, value, low, 0); dreturn("%g", sample); return sample; } @@ -255,7 +255,7 @@ if (field_end == 0) field_end = (gd_nframes64(D) + 1) * spf - 1; else - field_end = field_end * spf - 1; + field_end = (field_end + 1) * spf - 1; if (field_end - field_start < 2) _GD_SetError(D, GD_E_DOMAIN, GD_E_DOMAIN_EMPTY, NULL, 0, NULL); Modified: branches/getdata-0.8/src/internal.h =================================================================== --- branches/getdata-0.8/src/internal.h 2014-10-17 01:13:36 UTC (rev 929) +++ branches/getdata-0.8/src/internal.h 2014-12-05 01:37:25 UTC (rev 930) @@ -155,7 +155,7 @@ /* imaginary part of (*z) */ # define cimagp(z) cimag(z) /* a pointer to element i of GD_DCOMPLEXP_t array a */ -# define gd_cap_(a,i) ((GD_DCOMPLEXP_t)(a + 2 * i)) +# define gd_cap_(a,i) (((GD_DCOMPLEXP_t)(a)) + 2 * i) /* a pointer to a complex scalar */ # define gd_csp_(a) ((GD_DCOMPLEXP_t)a) /* assign real two-element array b to scalar a */ Modified: branches/getdata-0.8/src/legacy.c =================================================================== --- branches/getdata-0.8/src/legacy.c 2014-10-17 01:13:36 UTC (rev 929) +++ branches/getdata-0.8/src/legacy.c 2014-12-05 01:37:25 UTC (rev 930) @@ -461,6 +461,7 @@ free(Format.rawEntries); free(Format.lincomEntries); free(Format.linterpEntries); + free(Format.mplexEntries); free(Format.multiplyEntries); free(Format.bitEntries); free(Format.phaseEntries); @@ -471,6 +472,8 @@ sizeof(struct LincomEntryType)); Format.linterpEntries = (struct LinterpEntryType *)malloc(Format.n_linterp * sizeof(struct LinterpEntryType)); + Format.mplexEntries = (struct MPlexEntryType *)malloc(Format.n_mplex * + sizeof(struct MPlexEntryType)); Format.multiplyEntries = (struct MultiplyEntryType *)malloc(Format.n_multiply * sizeof(struct MultiplyEntryType)); Format.bitEntries = (struct BitEntryType *)malloc(Format.n_bit * @@ -479,8 +482,9 @@ sizeof(struct PhaseEntryType)); if (Format.rawEntries == NULL || Format.lincomEntries == NULL || - Format.linterpEntries == NULL || Format.multiplyEntries == NULL || - Format.bitEntries == NULL || Format.phaseEntries == NULL) + Format.linterpEntries == NULL || Format.mplexEntries == NULL || + Format.multiplyEntries == NULL || Format.bitEntries == NULL || + Format.phaseEntries == NULL) { D->error = GD_E_ALLOC; *error_code = _GD_CopyGlobalError(D); Modified: branches/getdata-0.8/src/mod.c =================================================================== --- branches/getdata-0.8/src/mod.c 2014-10-17 01:13:36 UTC (rev 929) +++ branches/getdata-0.8/src/mod.c 2014-12-05 01:37:25 UTC (rev 930) @@ -787,8 +787,8 @@ case GD_MPLEX_ENTRY: j = _GD_AlterScalar(D, N->EN(mplex,period) != -1 && E->EN(mplex,period) != N->EN(mplex,period), GD_INT_TYPE, - &Q.EN(mplex,period), &N->EN(mplex,period), Q.scalar, - Q.scalar_ind, N->scalar[0], N->scalar_ind[0], E->e->calculated, + &Q.EN(mplex,period), &N->EN(mplex,period), Q.scalar + 1, + Q.scalar_ind + 1, N->scalar[1], N->scalar_ind[1], E->e->calculated, E->fragment_index); if (j & GD_AS_ERROR) @@ -802,7 +802,7 @@ j = _GD_AlterScalar(D, E->EN(mplex,count_val) != N->EN(mplex,count_val), GD_INT_TYPE, &Q.EN(mplex,count_val), &N->EN(mplex,count_val), - Q.scalar, Q.scalar_ind, N->scalar[1], N->scalar_ind[1], + Q.scalar, Q.scalar_ind, N->scalar[0], N->scalar_ind[0], E->e->calculated, E->fragment_index); if (j & GD_AS_ERROR) @@ -1738,7 +1738,7 @@ free(N->field); N->field = new_code; - if (N->field_type == GD_LINCOM_ENTRY) + if (N->field_type == GD_LINCOM_ENTRY || N->field_type == GD_POLYNOM_ENTRY) move = 7; /* Change the entry */ @@ -1814,7 +1814,7 @@ return -1; } - if (N->field_type == GD_LINCOM_ENTRY) + if (N->field_type == GD_LINCOM_ENTRY || N->field_type == GD_POLYNOM_ENTRY) move = 7; /* Change the entry */ Modified: branches/getdata-0.8/src/parse.c =================================================================== --- branches/getdata-0.8/src/parse.c 2014-10-17 01:13:36 UTC (rev 929) +++ branches/getdata-0.8/src/parse.c 2014-12-05 01:37:25 UTC (rev 930) @@ -1726,9 +1726,9 @@ if (*ip >= '0' && *ip <= '9') accumulator = accumulator * 16 + *ip - '0'; else if (*ip >= 'A' && *ip <= 'F') - accumulator = accumulator * 16 + *ip - 'A'; + accumulator = accumulator * 16 + *ip - 'A' + 10; else - accumulator = accumulator * 16 + *ip - 'a'; + accumulator = accumulator * 16 + *ip - 'a' + 10; } if (acc_mode == ACC_MODE_HEX && (n_acc == 2 || !isxdigit(*ip))) { @@ -1745,7 +1745,7 @@ escaped_char = 0; acc_mode = ACC_MODE_NONE; } else if (acc_mode == ACC_MODE_UTF8 && (n_acc == 7 || - accumulator > 0x10FF || !isxdigit(*ip))) + accumulator > 0x10FFFF || !isxdigit(*ip))) { if (_GD_UTF8Encode(D, format_file, linenum, &op, accumulator)) break; /* syntax error */ Modified: branches/getdata-0.8/src/putdata.c =================================================================== --- branches/getdata-0.8/src/putdata.c 2014-10-17 01:13:36 UTC (rev 929) +++ branches/getdata-0.8/src/putdata.c 2014-12-05 01:37:25 UTC (rev 930) @@ -672,18 +672,21 @@ return 0; } - if (!E->e->calculated) + if (!E->e->calculated) { _GD_CalculateEntry(D, E, 1); - if (D->error) { - dreturn("%i", 0); - return 0; + if (D->error) { + D->recurse_level--; + dreturn("%i", 0); + return 0; + } } /* writing to representations is prohibited */ if (repr != GD_REPR_NONE) { const char r[2] = {(char)repr, 0}; _GD_SetError(D, GD_E_BAD_REPR, GD_E_REPR_PUT, NULL, 0, r); + D->recurse_level--; dreturn("%i", 0); return 0; } Index: branches/getdata-0.8/test =================================================================== --- branches/getdata-0.8/test 2014-10-17 01:13:36 UTC (rev 929) +++ branches/getdata-0.8/test 2014-12-05 01:37:25 UTC (rev 930) Property changes on: branches/getdata-0.8/test ___________________________________________________________________ Modified: svn:ignore ## -392,7 +392,14 ## get_const_complex get_const_repr get_cpolynom +get_cpolynom1 +get_cpolynom_int get_divide +get_divide_ccin +get_divide_crin +get_divide_crinr +get_divide_rcin +get_divide_s get_endian16 get_endian32 get_endian64 ## -439,13 +446,19 ## get_mplex_lball get_mplex_nolb get_multiply +get_multiply_ccin +get_multiply_crin +get_multiply_crinr get_multiply_noin +get_multiply_rcin +get_multiply_s get_nonexistent get_null get_off64 get_phase get_phase_affix get_polynom +get_polynom_cmpin get_polynom_noin get_recip get_recip_const ## -650,6 +663,7 ## parse_foffs parse_foffs_include parse_foffs_slash +parse_hex parse_hidden parse_hidden_field parse_hidden_meta ## -735,6 +749,9 ## parse_string parse_string_ncols parse_string_null +parse_utf8 +parse_utf8_invalid +parse_utf8_zero parse_version parse_version_89 parse_version_98 Modified: branches/getdata-0.8/test/Makefile.am =================================================================== --- branches/getdata-0.8/test/Makefile.am 2014-10-17 01:13:36 UTC (rev 929) +++ branches/getdata-0.8/test/Makefile.am 2014-12-05 01:37:25 UTC (rev 930) @@ -18,7 +18,7 @@ # along with GetData; if not, write to the Free Software Foundation, Inc., # 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA # -AUTOMAKE_OPTIONS = foreign +AUTOMAKE_OPTIONS = foreign serial-tests if CC_WALL WALL=-Wall @@ -29,7 +29,7 @@ endif LDADD=../src/libgetdata.la -INCLUDES=${WALL} $(WEXTRA) -I$(top_srcdir)/src +AM_CPPFLAGS=${WALL} $(WEXTRA) -I$(top_srcdir)/src EXTRA_DIST=test.h @@ -175,7 +175,10 @@ GET_TESTS=get64 get_affix get_bad_code get_bit get_carray get_carray_len \ get_carray_slice get_char get_clincom get_complex128 \ get_complex64 get_const get_const_complex get_const_repr \ - get_cpolynom get_divide get_endian8 get_endian16 get_endian32 \ + get_cpolynom get_cpolynom1 get_cpolynom_int get_divide \ + get_divide_ccin get_divide_crin \ + get_divide_crinr get_divide_rcin get_divide_s get_endian8 \ + get_endian16 get_endian32 \ get_endian64 get_endian_complex128_arm get_endian_complex128_big \ get_endian_complex128_little get_endian_complex64_arm \ get_endian_complex64_big get_endian_complex64_little \ @@ -188,8 +191,11 @@ get_lincom_null get_lincom_spf get_linterp get_linterp_noin \ get_linterp_notab get_linterp_sort get_mplex get_mplex_bof \ get_mplex_lb get_mplex_lball get_mplex_nolb get_multiply \ - get_multiply_noin get_nonexistent get_null get_off64 get_phase \ - get_phase_affix get_polynom get_polynom_noin get_recip \ + get_multiply_ccin get_multiply_crin get_multiply_crinr \ + get_multiply_noin get_multiply_rcin get_multiply_s get_nonexistent \ + get_null get_off64 get_phase \ + get_phase_affix get_polynom get_polynom_cmpin \ + get_polynom_noin get_recip \ get_recip_const get_recurse get_rofs get_sbit get_sf get_ss get_type \ get_uint16 get_uint32 get_uint64 get_window get_window_clr \ get_window_ge get_window_gt get_window_le get_window_lt \ @@ -261,7 +267,7 @@ parse_double parse_duplicate parse_duplicate_ignore \ parse_endian_bad parse_endian_big parse_endian_force \ parse_endian_little parse_endian_slash parse_eol parse_foffs \ - parse_foffs_include parse_foffs_slash parse_hidden \ + parse_foffs_include parse_foffs_slash parse_hex parse_hidden \ parse_hidden_field parse_hidden_meta parse_include \ parse_include_absolute parse_include_absrel \ parse_include_affix_ref parse_include_dir parse_include_loop \ @@ -287,7 +293,8 @@ parse_quote_mismatch parse_raw parse_raw_char parse_raw_ncols \ parse_raw_scalar parse_raw_spf parse_raw_type parse_recip \ parse_ref parse_ref_nonexistent parse_sbit parse_sort parse_string \ - parse_string_ncols parse_string_null parse_version \ + parse_string_ncols parse_string_null parse_utf8 parse_utf8_invalid \ + parse_utf8_zero parse_version \ parse_version_89 parse_version_98 parse_version_include \ parse_version_permissive parse_version_p8 parse_version_p9 \ parse_version_slash parse_whitespace parse_window \ Added: branches/getdata-0.8/test/get_cpolynom1.c =================================================================== --- branches/getdata-0.8/test/get_cpolynom1.c (rev 0) +++ branches/getdata-0.8/test/get_cpolynom1.c 2014-12-05 01:37:25 UTC (rev 930) @@ -0,0 +1,75 @@ +/* Copyright (C) 2013 D. V. Wiebe + * + *************************************************************************** + * + * This file is part of the GetData project. + * + * GetData is free software; you can redistribute it and/or modify it under + * the terms of the GNU Lesser General Public License as published by the + * Free Software Foundation; either version 2.1 of the License, or (at your + * option) any later version. + * + * GetData is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public + * License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with GetData; if not, write to the Free Software Foundation, Inc., + * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + */ +#include "test.h" + +#include <stdio.h> +#include <stdlib.h> +#include <sys/types.h> +#include <sys/stat.h> +#include <fcntl.h> +#include <string.h> +#include <errno.h> + +int main(void) +{ + const char *filedir = "dirfile"; + const char *format = "dirfile/format"; + const char *data = "dirfile/data"; + const char *format_data = "polynom POLYNOM data 3;2 2;4\ndata RAW UINT8 1\n"; + double c[16]; + unsigned char data_data[256]; + int i, fd, n, error, r = 0; + DIRFILE *D; + + rmdirfile(); + mkdir(filedir, 0777); + + for (fd = 0; fd < 256; ++fd) + data_data[fd] = (unsigned char)fd; + + fd = open(format, O_CREAT | O_EXCL | O_WRONLY, 0666); + write(fd, format_data, strlen(format_data)); + close(fd); + + fd = open(data, O_CREAT | O_EXCL | O_WRONLY | O_BINARY, 0666); + write(fd, data_data, 256); + close(fd); + + D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); + n = gd_getdata(D, "polynom", 5, 0, 8, 0, GD_COMPLEX128, &c); + error = gd_error(D); + + gd_discard(D); + + unlink(data); + unlink(format); + rmdir(filedir); + + CHECKI(error, 0); + CHECKI(n, 8); + + for (i = 0; i < 8; ++i) { + CHECKFi(i, c[i * 2], 3 + 2 * (5 + i)); + CHECKFi(i, c[i * 2 + 1], 2 + 4 * (5 + i)); + } + + return r; +} Added: branches/getdata-0.8/test/get_cpolynom_int.c =================================================================== --- branches/getdata-0.8/test/get_cpolynom_int.c (rev 0) +++ branches/getdata-0.8/test/get_cpolynom_int.c 2014-12-05 01:37:25 UTC (rev 930) @@ -0,0 +1,72 @@ +/* Copyright (C) 2013 D. V. Wiebe + * + *************************************************************************** + * + * This file is part of the GetData project. + * + * GetData is free software; you can redistribute it and/or modify it under + * the terms of the GNU Lesser General Public License as published by the + * Free Software Foundation; either version 2.1 of the License, or (at your + * option) any later version. + * + * GetData is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public + * License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with GetData; if not, write to the Free Software Foundation, Inc., + * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + */ +#include "test.h" + +#include <stdio.h> +#include <stdlib.h> +#include <sys/types.h> +#include <sys/stat.h> +#include <fcntl.h> +#include <string.h> +#include <errno.h> + +int main(void) +{ + const char *filedir = "dirfile"; + const char *format = "dirfile/format"; + const char *data = "dirfile/data"; + const char *format_data = "polynom POLYNOM data 3;2 2;4 0;1\ndata RAW UINT8 1\n"; + int32_t c[8]; + unsigned char data_data[256]; + int fd, i, n, error, r = 0; + DIRFILE *D; + + rmdirfile(); + mkdir(filedir, 0777); + + for (fd = 0; fd < 256; ++fd) + data_data[fd] = (unsigned char)fd; + + fd = open(format, O_CREAT | O_EXCL | O_WRONLY, 0666); + write(fd, format_data, strlen(format_data)); + close(fd); + + fd = open(data, O_CREAT | O_EXCL | O_WRONLY | O_BINARY, 0666); + write(fd, data_data, 256); + close(fd); + + D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); + n = gd_getdata(D, "polynom.r", 5, 0, 8, 0, GD_INT32, &c); + error = gd_error(D); + + gd_discard(D); + + unlink(data); + unlink(format); + rmdir(filedir); + + CHECKI(error, 0); + CHECKI(n, 8); + for (i = 0; i < 8; ++i) + CHECKIi(i, c[i], 3 + 2 * (5 + i)); + + return r; +} Added: branches/getdata-0.8/test/get_divide_ccin.c =================================================================== --- branches/getdata-0.8/test/get_divide_ccin.c (rev 0) +++ branches/getdata-0.8/test/get_divide_ccin.c 2014-12-05 01:37:25 UTC (rev 930) @@ -0,0 +1,79 @@ +/* Copyright (C) 2013 D. V. Wiebe + * + *************************************************************************** + * + * This file is part of the GetData project. + * + * GetData is free software; you can redistribute it and/or modify it under + * the terms of the GNU Lesser General Public License as published by the + * Free Software Foundation; either version 2.1 of the License, or (at your + * option) any later version. + * + * GetData is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public + * License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with GetData; if not, write to the Free Software Foundation, Inc., + * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + */ +#include "test.h" + +#include <stdlib.h> +#include <sys/types.h> +#include <sys/stat.h> +#include <fcntl.h> +#include <string.h> +#include <errno.h> + +int main(void) +{ + const char *filedir = "dirfile"; + const char *format = "dirfile/format"; + const char *data = "dirfile/data"; + const char *format_data = + "div DIVIDE data phase\n" + "phase PHASE data 1\n" + "data RAW COMPLEX128 1\n"; + double c[16]; + double data_data[512]; + int i, n, error, r = 0; + DIRFILE *D; + + rmdirfile(); + mkdir(filedir, 0777); + + for (i = 0; i < 256; ++i) { + data_data[i * 2] = (double)i; + data_data[i * 2 + 1] = (double)i / 256.; + } + + i = open(format, O_CREAT | O_EXCL | O_WRONLY, 0666); + write(i, format_data, strlen(format_data)); + close(i); + + i = open(data, O_CREAT | O_EXCL | O_WRONLY | O_BINARY, 0666); + write(i, data_data, 512 * sizeof(double)); + close(i); + + D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); + n = gd_getdata(D, "div", 5, 0, 8, 0, GD_COMPLEX128, &c); + error = gd_error(D); + + gd_discard(D); + + unlink(data); + unlink(format); + rmdir(filedir); + + CHECKI(error, 0); + CHECKI(n, 8); + + for (i = 0; i < 8; ++i) { + CHECKFi(i, c[i * 2], (5. + i) / (6. + i)); + CHECKFi(i, c[i * 2 + 1], 0); + } + + return r; +} Added: branches/getdata-0.8/test/get_divide_crin.c =================================================================== --- branches/getdata-0.8/test/get_divide_crin.c (rev 0) +++ branches/getdata-0.8/test/get_divide_crin.c 2014-12-05 01:37:25 UTC (rev 930) @@ -0,0 +1,79 @@ +/* Copyright (C) 2013 D. V. Wiebe + * + *************************************************************************** + * + * This file is part of the GetData project. + * + * GetData is free software; you can redistribute it and/or modify it under + * the terms of the GNU Lesser General Public License as published by the + * Free Software Foundation; either version 2.1 of the License, or (at your + * option) any later version. + * + * GetData is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public + * License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with GetData; if not, write to the Free Software Foundation, Inc., + * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + */ +#include "test.h" + +#include <stdlib.h> +#include <sys/types.h> +#include <sys/stat.h> +#include <fcntl.h> +#include <string.h> +#include <errno.h> + +int main(void) +{ + const char *filedir = "dirfile"; + const char *format = "dirfile/format"; + const char *data = "dirfile/data"; + const char *format_data = + "div DIVIDE data phase\n" + "phase PHASE data.r 1\n" + "data RAW COMPLEX128 1\n"; + double c[16]; + double data_data[512]; + int i, n, error, r = 0; + DIRFILE *D; + + rmdirfile(); + mkdir(filedir, 0777); + + for (i = 0; i < 256; ++i) { + data_data[i * 2] = (double)i; + data_data[i * 2 + 1] = (double)i / 256.; + } + + i = open(format, O_CREAT | O_EXCL | O_WRONLY, 0666); + write(i, format_data, strlen(format_data)); + close(i); + + i = open(data, O_CREAT | O_EXCL | O_WRONLY | O_BINARY, 0666); + write(i, data_data, 512 * sizeof(double)); + close(i); + + D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); + n = gd_getdata(D, "div", 5, 0, 8, 0, GD_COMPLEX128, &c); + error = gd_error(D); + + gd_discard(D); + + unlink(data); + unlink(format); + rmdir(filedir); + + CHECKI(error, 0); + CHECKI(n, 8); + + for (i = 0; i < 8; ++i) { + CHECKFi(i, c[i * 2], (5. + i) / (6. + i)); + CHECKFi(i, c[i * 2 + 1], (5. + i) / (6. + i) / 256.); + } + + return r; +} Added: branches/getdata-0.8/test/get_divide_crinr.c =================================================================== --- branches/getdata-0.8/test/get_divide_crinr.c (rev 0) +++ branches/getdata-0.8/test/get_divide_crinr.c 2014-12-05 01:37:25 UTC (rev 930) @@ -0,0 +1,77 @@ +/* Copyright (C) 2013 D. V. Wiebe + * + *************************************************************************** + * + * This file is part of the GetData project. + * + * GetData is free software; you can redistribute it and/or modify it under + * the terms of the GNU Lesser General Public License as published by the + * Free Software Foundation; either version 2.1 of the License, or (at your + * option) any later version. + * + * GetData is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public + * License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with GetData; if not, write to the Free Software Foundation, Inc., + * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + */ +#include "test.h" + +#include <stdlib.h> +#include <sys/types.h> +#include <sys/stat.h> +#include <fcntl.h> +#include <string.h> +#include <errno.h> + +int main(void) +{ + const char *filedir = "dirfile"; + const char *format = "dirfile/format"; + const char *data = "dirfile/data"; + const char *format_data = + "div DIVIDE data phase\n" + "phase PHASE data.r 1\n" + "data RAW COMPLEX128 1\n"; + double c[8]; + double data_data[512]; + int i, n, error, r = 0; + DIRFILE *D; + + rmdirfile(); + mkdir(filedir, 0777); + + for (i = 0; i < 256; ++i) { + data_data[i * 2] = (double)i; + data_data[i * 2 + 1] = (double)i / 256.; + } + + i = open(format, O_CREAT | O_EXCL | O_WRONLY, 0666); + write(i, format_data, strlen(format_data)); + close(i); + + i = open(data, O_CREAT | O_EXCL | O_WRONLY | O_BINARY, 0666); + write(i, data_data, 512 * sizeof(double)); + close(i); + + D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); + n = gd_getdata(D, "div", 5, 0, 8, 0, GD_FLOAT64, &c); + error = gd_error(D); + + gd_discard(D); + + unlink(data); + unlink(format); + rmdir(filedir); + + CHECKI(error, 0); + CHECKI(n, 8); + + for (i = 0; i < 8; ++i) + CHECKFi(i, c[i], (5. + i) / (6. + i)); + + return r; +} Added: branches/getdata-0.8/test/get_divide_rcin.c =================================================================== --- branches/getdata-0.8/test/get_divide_rcin.c (rev 0) +++ branches/getdata-0.8/test/get_divide_rcin.c 2014-12-05 01:37:25 UTC (rev 930) @@ -0,0 +1,79 @@ +/* Copyright (C) 2013 D. V. Wiebe + * + *************************************************************************** + * + * This file is part of the GetData project. + * + * GetData is free software; you can redistribute it and/or modify it under + * the terms of the GNU Lesser General Public License as published by the + * Free Software Foundation; either version 2.1 of the License, or (at your + * option) any later version. + * + * GetData is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public + * License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with GetData; if not, write to the Free Software Foundation, Inc., + * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + */ +#include "test.h" + +#include <stdlib.h> +#include <sys/types.h> +#include <sys/stat.h> +#include <fcntl.h> +#include <string.h> +#include <errno.h> + +int main(void) +{ + const char *filedir = "dirfile"; + const char *format = "dirfile/format"; + const char *data = "dirfile/data"; + const char *format_data = + "div DIVIDE data.r phase\n" + "phase PHASE data 1\n" + "data RAW COMPLEX128 1\n"; + double c[16]; + double data_data[512]; + int i, n, error, r = 0; + DIRFILE *D; + + rmdirfile(); + mkdir(filedir, 0777); + + for (i = 0; i < 256; ++i) { + data_data[i * 2] = (double)i; + data_data[i * 2 + 1] = (double)i / 256.; + } + + i = open(format, O_CREAT | O_EXCL | O_WRONLY, 0666); + write(i, format_data, strlen(format_data)); + close(i); + + i = open(data, O_CREAT | O_EXCL | O_WRONLY | O_BINARY, 0666); + write(i, data_data, 512 * sizeof(double)); + close(i); + + D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); + n = gd_getdata(D, "div", 5, 0, 8, 0, GD_COMPLEX128, &c); + error = gd_error(D); + + gd_discard(D); + + unlink(data); + unlink(format); + rmdir(filedir); + + CHECKI(error, 0); + CHECKI(n, 8); + + for (i = 0; i < 8; ++i) { + CHECKFi(i, c[i * 2], (5. + i) * 65536. / 65537. / (6. + i)); + CHECKFi(i, c[i * 2 + 1], -(5. + i) * 256. / 65537. / (6. + i)); + } + + return r; +} Added: branches/getdata-0.8/test/get_divide_s.c =================================================================== --- branches/getdata-0.8/test/get_divide_s.c (rev 0) +++ branches/getdata-0.8/test/get_divide_s.c 2014-12-05 01:37:25 UTC (rev 930) @@ -0,0 +1,71 @@ +/* Copyright (C) 2013 D. V. Wiebe + * + *************************************************************************** + * + * This file is part of the GetData project. + * + * GetData is free software; you can redistribute it and/or modify it under + * the terms of the GNU Lesser General Public License as published by the + * Free Software Foundation; either version 2.1 of the License, or (at your + * option) any later version. + * + * GetData is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public + * License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with GetData; if not, write to the Free Software Foundation, Inc., + * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + */ +#include "test.h" + +#include <stdlib.h> +#include <sys/types.h> +#include <sys/stat.h> +#include <fcntl.h> +#include <string.h> +#include <errno.h> + +int main(void) +{ + const char *filedir = "dirfile"; + const char *format = "dirfile/format"; + const char *data = "dirfile/data"; + const char *format_data = + "div DIVIDE data phase\n" + "phase PHASE data 128\n" + "data RAW UINT8 1\n"; + unsigned char data_data[256]; + int fd, n, error, r = 0; + DIRFILE *D; + + rmdirfile(); + mkdir(filedir, 0777); + + for (fd = 0; fd < 256; ++fd) + data_data[fd] = (unsigned char)fd; + + fd = open(format, O_CREAT | O_EXCL | O_WRONLY, 0666); + write(fd, format_data, strlen(format_data)); + close(fd); + + fd = open(data, O_CREAT | O_EXCL | O_WRONLY | O_BINARY, 0666); + write(fd, data_data, 256); + close(fd); + + D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); + n = gd_getdata(D, "div", 0, 0, 1000, 0, GD_NULL, NULL); + error = gd_error(D); + + gd_discard(D); + + unlink(data); + unlink(format); + rmdir(filedir); + + CHECKI(error, 0); + CHECKI(n, 128); + + return r; +} Added: branches/getdata-0.8/test/get_multiply_ccin.c =================================================================== --- branches/getdata-0.8/test/get_multiply_ccin.c (rev 0) +++ branches/getdata-0.8/test/get_multiply_ccin.c 2014-12-05 01:37:25 UTC (rev 930) @@ -0,0 +1,79 @@ +/* Copyright (C) 2013 D. V. Wiebe + * + *************************************************************************** + * + * This file is part of the GetData project. + * + * GetData is free software; you can redistribute it and/or modify it under + * the terms of the GNU Lesser General Public License as published by the + * Free Software Foundation; either version 2.1 of the License, or (at your + * option) any later version. + * + * GetData is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public + * License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with GetData; if not, write to the Free Software Foundation, Inc., + * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + */ +/* Attempt to read MULTIPLY */ +#include "test.h" + +#include <stdlib.h> +#include <sys/types.h> +#include <sys/stat.h> +#include <fcntl.h> +#include <string.h> +#include <errno.h> + +int main(void) +{ + const char *filedir = "dirfile"; + const char *format = "dirfile/format"; + const char *data = "dirfile/data"; + const char *format_data = "mult MULTIPLY data data\ndata RAW COMPLEX128 1\n"; + double c[16]; + double data_data[512]; + int i, n, error, r = 0; + DIRFILE *D; + + rmdirfile(); + mkdir(filedir, 0777); + + for (i = 0; i < 256; ++i) { + data_data[i * 2] = (double)i; + data_data[i * 2 + 1] = (double)i / 256.; + } + + i = open(format, O_CREAT | O_EXCL | O_WRONLY, 0666); + write(i, format_data, strlen(format_data)); + close(i); + + i = open(data, O_CREAT | O_EXCL | O_WRONLY | O_BINARY, 0666); + write(i, data_data, 512 * sizeof(double)); + close(i); + + D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); + n = gd_getdata(D, "mult", 5, 0, 8, 0, GD_COMPLEX128, &c); + error = gd_error(D); + + gd_discard(D); + + unlink(data); + unlink(format); + rmdir(filedir); + + CHECKI(error, 0); + CHECKI(n, 8); + + for (i = 0; i < 8; ++i) { + const double a = 5 + i; + const double b = a / 256.; + CHECKFi(i, c[i * 2], a * a - b * b); + CHECKFi(i, c[i * 2 + 1], 2 * a * b); + } + + return r; +} Added: branches/getdata-0.8/test/get_multiply_crin.c =================================================================== --- branches/getdata-0.8/test/get_multiply_crin.c (rev 0) +++ branches/getdata-0.8/test/get_multiply_crin.c 2014-12-05 01:37:25 UTC (rev 930) @@ -0,0 +1,79 @@ +/* Copyright (C) 2013 D. V. Wiebe + * + *************************************************************************** + * + * This file is part of the GetData project. + * + * GetData is fr... [truncated message content] |
From: <ket...@us...> - 2014-10-17 01:13:49
|
Revision: 929 http://sourceforge.net/p/getdata/code/929 Author: ketiltrout Date: 2014-10-17 01:13:36 +0000 (Fri, 17 Oct 2014) Log Message: ----------- Ignore GD_RDONLY if creating a dirfile. Modified Paths: -------------- trunk/getdata/ChangeLog trunk/getdata/NEWS trunk/getdata/man/gd_cbopen.3 trunk/getdata/src/open.c trunk/getdata/test/Makefile.am trunk/getdata/test/creat_rdonly.c Added Paths: ----------- trunk/getdata/test/creat_rdonly_exists.c Property Changed: ---------------- trunk/getdata/test/ Modified: trunk/getdata/ChangeLog =================================================================== --- trunk/getdata/ChangeLog 2014-10-16 23:26:40 UTC (rev 928) +++ trunk/getdata/ChangeLog 2014-10-17 01:13:36 UTC (rev 929) @@ -1,3 +1,8 @@ +2014-10-16 D. V. Wiebe <g et...@ke...> svn:929 + * src/open.c (_GD_CreateDirfile): Force GD_RDWR when creating a dirfile. + * test/creat_rdonly.c: Updated. + * test/creat_rdonly_exists.c: Added. + 2014-10-16 D. V. Wiebe <g et...@ke...> svn:928 * bindings/make_parameters.c: Replace numeric type literals with CPP macros for legibility. Modified: trunk/getdata/NEWS =================================================================== --- trunk/getdata/NEWS 2014-10-16 23:26:40 UTC (rev 928) +++ trunk/getdata/NEWS 2014-10-17 01:13:36 UTC (rev 929) @@ -30,6 +30,11 @@ gzip-encoded data works. See the gzip discussion in the 0.8.0 section below for important notes. + * A newly-created dirfile is now always opened in read-write mode, ignoring the + access mode specified in the call. Previously, specifying both GD_RDONLY and + GD_CREAT in open calls would result in an access mode (GD_E_ACCMODE) error if + the dirfile didn't already exist. + * BUG FIX: In addition to the addition of write support mentioned above, a number of problems with reading LZMA files has been fixed, which should result in fewer segmentaion faults. Modified: trunk/getdata/man/gd_cbopen.3 =================================================================== --- trunk/getdata/man/gd_cbopen.3 2014-10-16 23:26:40 UTC (rev 928) +++ trunk/getdata/man/gd_cbopen.3 2014-10-17 01:13:36 UTC (rev 929) @@ -118,6 +118,13 @@ An empty dirfile will be created, if one does not already exist. This will create both the dirfile directory and an empty format specification file called .IR format . +If the call creates a dirfile, then the specified access mode is ignored: a +newly-created DIRFILE is always opened with access mode +.BR GD_RDWR , +even if +.B GD_RDONLY +had been specified. + The directory will have have mode .BR S_IRWXU " | " S_IRWXG " | " S_IRWXO (0777), modified by the caller's umask value (see @@ -127,7 +134,6 @@ file will have mode .BR S_IRUSR " | " S_IWUSR " | " S_IRGRP " | " S_IWGRP " | " S_IROTH " | " S_IWOTH (0666), also modified by the caller's umask. - The owner of the dirfile directory and .I format file will be the effective user ID of the caller. Group ownership follows the @@ -629,9 +635,7 @@ be internally flagged as invalid. Possible error values are: .TP 8 .B GD_E_ACCMODE -The library was asked to create or truncate a dirfile opened read-only (i.e. -.B GD_CREAT -or +The library was asked to truncate a dirfile opened read-only (i.e. .B GD_TRUNC was specified in .I flags Modified: trunk/getdata/src/open.c =================================================================== --- trunk/getdata/src/open.c 2014-10-16 23:26:40 UTC (rev 928) +++ trunk/getdata/src/open.c 2014-10-17 01:13:36 UTC (rev 929) @@ -301,13 +301,9 @@ if ((D->flags & GD_CREAT && (dirfd < 0 || format_error)) || (D->flags & GD_TRUNC)) { - /* can't create a read-only dirfile */ - if ((D->flags & GD_ACCMODE) == GD_RDONLY) { - _GD_SetError(D, GD_E_ACCMODE, 0, NULL, 0, NULL); - free(dirfile); - dreturn("%p", NULL); - return NULL; - } + /* a newly created dirfile ignores the specified access mode */ + if ((D->flags & GD_ACCMODE) == GD_RDONLY) + D->flags |= GD_RDWR; /* attempt to create the dirfile directory, if not present */ if (dirfd < 0) { Index: trunk/getdata/test =================================================================== --- trunk/getdata/test 2014-10-16 23:26:40 UTC (rev 928) +++ trunk/getdata/test 2014-10-17 01:13:36 UTC (rev 929) Property changes on: trunk/getdata/test ___________________________________________________________________ Modified: svn:ignore ## -303,6 +303,7 ## creat creat_excl creat_rdonly +creat_rdonly_exists cvlist cvlist_array cvlist_array0 Modified: trunk/getdata/test/Makefile.am =================================================================== --- trunk/getdata/test/Makefile.am 2014-10-16 23:26:40 UTC (rev 928) +++ trunk/getdata/test/Makefile.am 2014-10-17 01:13:36 UTC (rev 929) @@ -131,7 +131,7 @@ convert_uint8_int64 convert_uint8_int8 convert_uint8_uint16 \ convert_uint8_uint32 convert_uint8_uint64 -CREAT_TESTS=creat creat_excl creat_rdonly +CREAT_TESTS=creat creat_excl creat_rdonly creat_rdonly_exists DEL_TESTS=del_alias del_carray del_carray_deref del_const del_const_deref \ del_const_force del_data del_data_enoent del_data_open del_derived \ Modified: trunk/getdata/test/creat_rdonly.c =================================================================== --- trunk/getdata/test/creat_rdonly.c 2014-10-16 23:26:40 UTC (rev 928) +++ trunk/getdata/test/creat_rdonly.c 2014-10-17 01:13:36 UTC (rev 929) @@ -1,4 +1,4 @@ -/* Copyright (C) 2008-2011, 2013 D. V. Wiebe +/* Copyright (C) 2008-2011, 2013, 2014 D. V. Wiebe * *************************************************************************** * @@ -35,18 +35,20 @@ DIRFILE *D; rmdirfile(); - D = gd_open(filedir, GD_RDONLY | GD_CREAT); + D = gd_open(filedir, GD_RDONLY | GD_CREAT | GD_VERBOSE); e1 = gd_error(D); - CHECKI(e1, GD_E_ACCMODE); + CHECKI(e1, 0); - e2 = gd_close(D); + e2 = gd_add_spec(D, "test CONST UINT8 1", 0); CHECKI(e2, 0); + gd_discard(D); + unlink_ret = unlink(format); rmdir_ret = rmdir(filedir); - CHECKI(unlink_ret, -1); - CHECKI(rmdir_ret, -1); + CHECKI(unlink_ret, 0); + CHECKI(rmdir_ret, 0); return r; } Added: trunk/getdata/test/creat_rdonly_exists.c =================================================================== --- trunk/getdata/test/creat_rdonly_exists.c (rev 0) +++ trunk/getdata/test/creat_rdonly_exists.c 2014-10-17 01:13:36 UTC (rev 929) @@ -0,0 +1,55 @@ +/* Copyright (C) 2014 D. V. Wiebe + * + *************************************************************************** + * + * This file is part of the GetData project. + * + * GetData is free software; you can redistribute it and/or modify it under + * the terms of the GNU Lesser General Public License as published by the + * Free Software Foundation; either version 2.1 of the License, or (at your + * option) any later version. + * + * GetData is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public + * License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with GetData; if not, write to the Free Software Foundation, Inc., + * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + */ +#include "test.h" + +#include <stdlib.h> +#include <sys/types.h> +#include <sys/stat.h> +#include <fcntl.h> +#include <string.h> +#include <errno.h> + +int main(void) +{ + const char *filedir = "dirfile"; + const char *format = "dirfile/format"; + int e1, e2, r = 0; + DIRFILE *D; + + rmdirfile(); + mkdir(filedir, 0777); + close(open(format, O_CREAT | O_EXCL | O_WRONLY, 0666)); + + D = gd_open(filedir, GD_RDONLY | GD_CREAT); + e1 = gd_error(D); + CHECKI(e1, 0); + + gd_add_spec(D, "test CONST UINT8 1", 0); + e2 = gd_error(D); + CHECKI(e2, GD_E_ACCMODE); + + gd_discard(D); + + unlink(format); + rmdir(filedir); + + return r; +} This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ket...@us...> - 2014-10-16 23:26:46
|
Revision: 928 http://sourceforge.net/p/getdata/code/928 Author: ketiltrout Date: 2014-10-16 23:26:40 +0000 (Thu, 16 Oct 2014) Log Message: ----------- Merge all the I/O error codes into GD_E_IO. Also GD_E_LUT. Add deprecated error codes to Python. Modified Paths: -------------- trunk/getdata/ChangeLog trunk/getdata/NEWS trunk/getdata/bindings/cxx/test/big_test.cpp trunk/getdata/bindings/f77/test/big_test.f trunk/getdata/bindings/f77/test/big_test95.f90 trunk/getdata/bindings/idl/test/big_test.pro trunk/getdata/bindings/make_parameters.c trunk/getdata/bindings/matlab/matlab.c trunk/getdata/bindings/matlab/test/big_test.m trunk/getdata/bindings/perl/t/big_test.t trunk/getdata/bindings/php/test/big_test.php trunk/getdata/bindings/python/pygetdata.c trunk/getdata/bindings/python/test/big_test.py trunk/getdata/man/dirfile-encoding.5 trunk/getdata/man/gd_add.3 trunk/getdata/man/gd_add_bit.3 trunk/getdata/man/gd_add_spec.3 trunk/getdata/man/gd_alter_bit.3 trunk/getdata/man/gd_alter_encoding.3.in trunk/getdata/man/gd_alter_endianness.3.in trunk/getdata/man/gd_alter_entry.3 trunk/getdata/man/gd_alter_frameoffset.3.in trunk/getdata/man/gd_alter_spec.3 trunk/getdata/man/gd_cbopen.3 trunk/getdata/man/gd_close.3 trunk/getdata/man/gd_delete.3 trunk/getdata/man/gd_desync.3 trunk/getdata/man/gd_eof.3 trunk/getdata/man/gd_error_string.3 trunk/getdata/man/gd_flush.3 trunk/getdata/man/gd_framenum_subset.3 trunk/getdata/man/gd_getdata.3 trunk/getdata/man/gd_include_affix.3 trunk/getdata/man/gd_metaflush.3 trunk/getdata/man/gd_move.3 trunk/getdata/man/gd_native_type.3 trunk/getdata/man/gd_nframes.3 trunk/getdata/man/gd_putdata.3 trunk/getdata/man/gd_rename.3 trunk/getdata/man/gd_rewrite_fragment.3 trunk/getdata/man/gd_seek.3 trunk/getdata/man/gd_tell.3 trunk/getdata/man/gd_uninclude.3 trunk/getdata/src/common.c trunk/getdata/src/del.c trunk/getdata/src/encoding.c trunk/getdata/src/errors.c trunk/getdata/src/flimits.c trunk/getdata/src/flush.c trunk/getdata/src/fpos.c trunk/getdata/src/fragment.c trunk/getdata/src/getdata.c trunk/getdata/src/getdata.h.in trunk/getdata/src/include.c trunk/getdata/src/internal.h trunk/getdata/src/legacy.c trunk/getdata/src/mod.c trunk/getdata/src/move.c trunk/getdata/src/name.c trunk/getdata/src/nframes.c trunk/getdata/src/open.c trunk/getdata/src/putdata.c trunk/getdata/test/alter_entry_scalar_amb.c trunk/getdata/test/error_error.c trunk/getdata/test/error_verbose.c trunk/getdata/test/get_linterp1.c trunk/getdata/test/get_linterp_empty.c trunk/getdata/test/get_linterp_notab.c trunk/getdata/test/include_nonexistent.c trunk/getdata/test/legacy_error.c trunk/getdata/test/legacy_nonexistent.c trunk/getdata/test/open_eaccess.c trunk/getdata/test/open_nonexistent.c trunk/getdata/test/open_notdirfile.c trunk/getdata/test/open_sym_d.c trunk/getdata/test/open_sym_l.c trunk/getdata/test/parse_include_dir.c trunk/getdata/test/parse_include_nonexistent.c trunk/getdata/test/put_linterp_notab.c trunk/getdata/test/test.h Modified: trunk/getdata/ChangeLog =================================================================== --- trunk/getdata/ChangeLog 2014-10-11 04:38:47 UTC (rev 927) +++ trunk/getdata/ChangeLog 2014-10-16 23:26:40 UTC (rev 928) @@ -1,3 +1,22 @@ +2014-10-16 D. V. Wiebe <g et...@ke...> svn:928 + * bindings/make_parameters.c: Replace numeric type literals with CPP macros + for legibility. + + * man/gd_getdata.3: Explain I/O pointers more. + + * src/getdata.h.in: Merge GD_E_OPEN, GD_E_TRUNC, GD_E_RAW_IO, + GD_E_OPEN_FRAGMENT, most of GD_E_FLUSH and half of GD_E_OPEN_LINFILE into + the new GD_E_IO and deprecate. The remainder of GD_E_OPEN_LINFILE (syntax + errors) is now the new GD_E_LUT. + * src/common.c (_GD_ReadLinterpFile): Consolidate error handling code. + Handle syntax errors better. + * src/flush.c (_GD_FieldSpec): Raise GD_E_LINE_TOO_LONG for line overflows. + * src/errors.c (_GD_SetError2 _GD_SetError gd_error_string): Track stdlib + errno separately and implicitly. + + * bindings/python/pygetdata.c: Define deprecated Exceptions as aliases for + current ones. + 2014-07-30 D. V. Wiebe <g et...@ke...> svn:921 * src/del.c (gd_delete_alias): Deleted. * src/del.c (gd_delete): Don't dereference the field code. Modified: trunk/getdata/NEWS =================================================================== --- trunk/getdata/NEWS 2014-10-11 04:38:47 UTC (rev 927) +++ trunk/getdata/NEWS 2014-10-16 23:26:40 UTC (rev 928) @@ -189,9 +189,24 @@ * gd_move_alias() and gd_delete_alias() have been deleted: their functions are now performed by gd_move() and gd_delete(), which now operate on the alias - itself when given the field code to an alias, rather than the field the alias - points to. + itself when given the field code to an alias, rather than the field the + alias points to. + * A number of different error codes which indicated the same problem (an + I/O error returned by the filesystem) have been merged into one. The error + codes GD_E_OPEN, GD_E_TRUNC, GD_E_RAW_IO, GD_E_OPEN_FRAGMENT, GD_E_FLUSH + are replaced by the new error GD_E_IO. The old symbols remain as aliases + but are deprecated. There is one exception to this merge: attempts to + flush metadata lines which are too long are now reported using + GD_E_LINE_TOO_LONG. Previously, these errors used GD_E_FLUSH. + + * The error code GD_E_OPEN_LINFILE has also been removed. It has been split + into two parts: + - I/O errors resulting from reading the LINTERP table file are now reported + using GD_E_IO; + - Syntax errors in the table are reported using the new GD_E_LUT error code. + GD_E_OPEN_LINFILE remains as a deprecated alias for GD_E_LUT. + * gd_encoding_support() has been added to permit run-time determination of supported encodings. @@ -236,6 +251,10 @@ * PERL: alter_entry() now only updates defined elements in the passed entry hash. + * PYTHON: for backwards compatiblity, exceptions now exist for deprecated + error codes (such as OpenError). These deprecated exceptions are simply + aliases for the current ones and are never returned by the bindings. + * C++ BUG FIX: Fixed segfault in RawEntry destructor. Reported by S. J. Benton. Modified: trunk/getdata/bindings/cxx/test/big_test.cpp =================================================================== --- trunk/getdata/bindings/cxx/test/big_test.cpp 2014-10-11 04:38:47 UTC (rev 927) +++ trunk/getdata/bindings/cxx/test/big_test.cpp 2014-10-16 23:26:40 UTC (rev 928) @@ -240,7 +240,7 @@ // 1: Dirfile::Error check d = new Dirfile("x"); - CHECK_ERROR(1, GD_E_OPEN); + CHECK_ERROR(1, GD_E_IO); delete d; // 2: Dirfile::Dirfile check Modified: trunk/getdata/bindings/f77/test/big_test.f =================================================================== --- trunk/getdata/bindings/f77/test/big_test.f 2014-10-11 04:38:47 UTC (rev 927) +++ trunk/getdata/bindings/f77/test/big_test.f 2014-10-16 23:26:40 UTC (rev 928) @@ -280,7 +280,7 @@ ne = 0 C 1: GDEROR check CALL GDOPEN(d, "x", 1, GD_RO) - CALL CHKERR(ne, 1, d, GD_EOP) + CALL CHKERR(ne, 1, d, GD_EIO) C 2: GDOPEN check CALL GDOPEN(d, fildir, 12, GD_RW) Modified: trunk/getdata/bindings/f77/test/big_test95.f90 =================================================================== --- trunk/getdata/bindings/f77/test/big_test95.f90 2014-10-11 04:38:47 UTC (rev 927) +++ trunk/getdata/bindings/f77/test/big_test95.f90 2014-10-16 23:26:40 UTC (rev 928) @@ -249,7 +249,7 @@ ! 1: fgd_error check d = fgd_open('x', GD_RDONLY) - call check_err(ne, 1, d, GD_E_OPEN) + call check_err(ne, 1, d, GD_E_IO) call fgd_discard(d) ! 2: fgd_open check Modified: trunk/getdata/bindings/idl/test/big_test.pro =================================================================== --- trunk/getdata/bindings/idl/test/big_test.pro 2014-10-11 04:38:47 UTC (rev 927) +++ trunk/getdata/bindings/idl/test/big_test.pro 2014-10-16 23:26:40 UTC (rev 928) @@ -85,12 +85,12 @@ ; 0: getdata_constants check defsysv, "!GD", getdata_constants() -nume += check_simple(0, !GD.E_OPEN, 1) +nume += check_simple(0, !GD.E_OK, 0) ; 1: gd_error check d = gd_open("x",error=error) -nume += check_error(1, d, !GD.E_OPEN) -nume += check_simple(1, error, !GD.E_OPEN) +nume += check_error(1, d, !GD.E_IO) +nume += check_simple(1, error, !GD.E_IO) gd_close, d, /DISCARD ; 2: gd_open check Modified: trunk/getdata/bindings/make_parameters.c =================================================================== --- trunk/getdata/bindings/make_parameters.c 2014-10-11 04:38:47 UTC (rev 927) +++ trunk/getdata/bindings/make_parameters.c 2014-10-16 23:26:40 UTC (rev 928) @@ -29,224 +29,227 @@ #define GD_NO_LEGACY_API #include "getdata.h" -/* The type parameter: - * 0: error codes - * 1: open flags not in IDL - * 2: open flags represented as LONG in IDL - * 3: entry types - * 4: data types - * 5: delete/rename flags (not in IDL) - * 6: protection levels - * 7: callback actions (not in IDL) - * 8: GD_E_FORMAT suberrors (not in IDL) - * 9: special version codes - * 10: gd_seek whence values - * 11: gd_seek flags (not in IDL) - * 12: window operations - * 13: desynced flags (not in IDL) - * 14: entry_list constants (not in IDL) - * 15: entry flags - * 98: miscellaneous constants not in IDL - * 99: miscellaneous constants - */ +/* parameter types (used by Fortran, IDL, and PHP) */ +#define GDMP_ERR 0x00000001 /* error code */ +#define GDMP_DEPERR 0x00000002 /* deprecated error codes not in PHP */ +#define GDMP_OFLAG 0x00000004 /* open flags not in IDL */ +#define GDMP_OFLAG_L 0x00000008 /* open flags represented as LONG in IDL */ +#define GDMP_ENTYPE 0x00000010 /* entry types */ +#define GDMP_DTYPE 0x00000020 /* data types */ +#define GDMP_RFLAG 0x00000040 /* delete and rename flags (not in IDL) */ +#define GDMP_PROT 0x00000080 /* protection levels */ +#define GDMP_CALLBAK 0x00000100 /* callback actions (not in IDL) */ +#define GDMP_FORMAT 0x00000200 /* GD_E_FORMAT suberrors (not in IDL) */ +#define GDMP_VERS 0x00000400 /* special version codes */ +#define GDMP_WHENCE 0x00000800 /* gd_seek whence values */ +#define GDMP_SEEK 0x00001000 /* gd_seek flags (not in IDL) */ +#define GDMP_WINDOP 0x00002000 /* window operations */ +#define GDMP_DESYNC 0x00004000 /* desync flags (not in IDL) */ +#define GDMP_ENLIST 0x00008000 /* entry_list constants (not in IDL) */ +#define GDMP_EFLAG 0x00010000 /* entry flags */ +#define GDMP_MISC_I 0x00020000 /* miscellaneous constants not in IDL */ +#define GDMP_MISC 0x00040000 /* miscellaneous constants */ + #define CONSTANT(s,f,t) { "GD_" #s, #s, f, GD_ ## s, t } static struct { const char* lname; /* Long name */ const char* sname; /* Short name */ const char* fname; /* F77 name */ long int value; - int type; + unsigned type; } constant_list[] = { - CONSTANT(E_OK, "GD_EOK", 0), - CONSTANT(E_OPEN, "GD_EOP", 0), - CONSTANT(E_FORMAT, "GD_EFO", 0), - CONSTANT(E_TRUNC, "GD_ETR", 0), - CONSTANT(E_CREAT, "GD_ECR", 0), - CONSTANT(E_BAD_CODE, "GD_EBC", 0), - CONSTANT(E_BAD_TYPE, "GD_EBT", 0), - CONSTANT(E_RAW_IO, "GD_ERW", 0), - CONSTANT(E_OPEN_FRAGMENT, "GD_EOF", 0), - CONSTANT(E_INTERNAL_ERROR, "GD_EIE", 0), - CONSTANT(E_ALLOC, "GD_EAL", 0), - CONSTANT(E_RANGE, "GD_ERA", 0), - CONSTANT(E_OPEN_LINFILE, "GD_EOL", 0), - CONSTANT(E_RECURSE_LEVEL, "GD_ERL", 0), - CONSTANT(E_BAD_DIRFILE, "GD_EBD", 0), - CONSTANT(E_BAD_FIELD_TYPE, "GD_EBF", 0), - CONSTANT(E_ACCMODE, "GD_EAC", 0), - CONSTANT(E_UNSUPPORTED, "GD_UNS", 0), - CONSTANT(E_UNKNOWN_ENCODING,"GD_EUE",0), - CONSTANT(E_BAD_ENTRY, "GD_EBE", 0), - CONSTANT(E_DUPLICATE, "GD_EDU", 0), - CONSTANT(E_DIMENSION, "GD_EDM", 0), - CONSTANT(E_BAD_INDEX, "GD_EBI", 0), - CONSTANT(E_BAD_SCALAR, "GD_EBS", 0), - CONSTANT(E_BAD_REFERENCE, "GD_EBR", 0), - CONSTANT(E_PROTECTED, "GD_EPT", 0), - CONSTANT(E_DELETE, "GD_EDL", 0), - CONSTANT(E_ARGUMENT, "GD_EAR", 0), - CONSTANT(E_CALLBACK, "GD_ECB", 0), - CONSTANT(E_EXISTS, "GD_EEX", 0), - CONSTANT(E_UNCLEAN_DB, "GD_UCL", 0), - CONSTANT(E_DOMAIN, "GD_EDO", 0), - CONSTANT(E_BAD_REPR, "GD_ERP", 0), - CONSTANT(E_FLUSH, "GD_EFL", 0), - CONSTANT(E_BOUNDS, "GD_EBO", 0), - CONSTANT(E_LINE_TOO_LONG, "GD_ETL", 0), + CONSTANT(E_OK, "GD_EOK", GDMP_ERR), + CONSTANT(E_FORMAT, "GD_EFO", GDMP_ERR), + CONSTANT(E_CREAT, "GD_ECR", GDMP_ERR), + CONSTANT(E_BAD_CODE, "GD_EBC", GDMP_ERR), + CONSTANT(E_BAD_TYPE, "GD_EBT", GDMP_ERR), + CONSTANT(E_IO, "GD_EIO", GDMP_ERR), + CONSTANT(E_INTERNAL_ERROR, "GD_EIE", GDMP_ERR), + CONSTANT(E_ALLOC, "GD_EAL", GDMP_ERR), + CONSTANT(E_RANGE, "GD_ERA", GDMP_ERR), + CONSTANT(E_LUT, "GD_ELT", GDMP_ERR), + CONSTANT(E_RECURSE_LEVEL, "GD_ERL", GDMP_ERR), + CONSTANT(E_BAD_DIRFILE, "GD_EBD", GDMP_ERR), + CONSTANT(E_BAD_FIELD_TYPE, "GD_EBF", GDMP_ERR), + CONSTANT(E_ACCMODE, "GD_EAC", GDMP_ERR), + CONSTANT(E_UNSUPPORTED, "GD_UNS", GDMP_ERR), + CONSTANT(E_UNKNOWN_ENCODING,"GD_EUE",GDMP_ERR), + CONSTANT(E_BAD_ENTRY, "GD_EBE", GDMP_ERR), + CONSTANT(E_DUPLICATE, "GD_EDU", GDMP_ERR), + CONSTANT(E_DIMENSION, "GD_EDM", GDMP_ERR), + CONSTANT(E_BAD_INDEX, "GD_EBI", GDMP_ERR), + CONSTANT(E_BAD_SCALAR, "GD_EBS", GDMP_ERR), + CONSTANT(E_BAD_REFERENCE, "GD_EBR", GDMP_ERR), + CONSTANT(E_PROTECTED, "GD_EPT", GDMP_ERR), + CONSTANT(E_DELETE, "GD_EDL", GDMP_ERR), + CONSTANT(E_ARGUMENT, "GD_EAR", GDMP_ERR), + CONSTANT(E_CALLBACK, "GD_ECB", GDMP_ERR), + CONSTANT(E_EXISTS, "GD_EEX", GDMP_ERR), + CONSTANT(E_UNCLEAN_DB, "GD_UCL", GDMP_ERR), + CONSTANT(E_DOMAIN, "GD_EDO", GDMP_ERR), + CONSTANT(E_BAD_REPR, "GD_ERP", GDMP_ERR), + CONSTANT(E_BOUNDS, "GD_EBO", GDMP_ERR), + CONSTANT(E_LINE_TOO_LONG, "GD_ETL", GDMP_ERR), - CONSTANT(E_OPEN_INCLUDE, "GD_EOI", 0), /* deprecated */ - CONSTANT(E_BAD_ENDIANNESS, "GD_EEN", 0), /* deprecated */ - CONSTANT(E_BAD_PROTECTION, "GD_EBP", 0), /* deprecated */ - CONSTANT(E_BAD_VERSION, "GD_EVR", 0), /* deprecated */ + CONSTANT(E_BAD_ENDIANNESS, "GD_EEN", GDMP_DEPERR), + CONSTANT(E_BAD_PROTECTION, "GD_EBP", GDMP_DEPERR), + CONSTANT(E_BAD_VERSION, "GD_EVR", GDMP_DEPERR), + CONSTANT(E_OPEN_LINFILE, "GD_EOL", GDMP_DEPERR), + CONSTANT(E_FLUSH, "GD_EFL", GDMP_DEPERR), + CONSTANT(E_OPEN, "GD_EOP", GDMP_DEPERR), + CONSTANT(E_OPEN_FRAGMENT, "GD_EOF", GDMP_DEPERR), + CONSTANT(E_OPEN_INCLUDE, "GD_EOI", GDMP_DEPERR), + CONSTANT(E_RAW_IO, "GD_ERW", GDMP_DEPERR), + CONSTANT(E_TRUNC, "GD_ETR", GDMP_DEPERR), - CONSTANT(RDONLY, "GD_RO", 2), - CONSTANT(RDWR, "GD_RW", 2), - CONSTANT(FORCE_ENDIAN, "GD_FE", 1), - CONSTANT(BIG_ENDIAN, "GD_BE", 2), - CONSTANT(LITTLE_ENDIAN, "GD_LE", 2), - CONSTANT(CREAT, "GD_CR", 1), - CONSTANT(EXCL, "GD_EX", 1), - CONSTANT(TRUNC, "GD_TR", 1), - CONSTANT(PEDANTIC, "GD_PE", 1), - CONSTANT(FORCE_ENCODING, "GD_FC", 1), - CONSTANT(VERBOSE, "GD_VB", 2), - CONSTANT(IGNORE_DUPS, "GD_ID", 1), - CONSTANT(IGNORE_REFS, "GD_IR", 1), - CONSTANT(PRETTY_PRINT, "GD_PP", 2), - CONSTANT(ARM_ENDIAN, "GD_AE", 2), - CONSTANT(NOT_ARM_ENDIAN, "GD_NA", 2), - CONSTANT(PERMISSIVE, "GD_PM", 1), - CONSTANT(TRUNCSUB, "GD_TS", 1), + CONSTANT(RDONLY, "GD_RO", GDMP_OFLAG_L), + CONSTANT(RDWR, "GD_RW", GDMP_OFLAG_L), + CONSTANT(FORCE_ENDIAN, "GD_FE", GDMP_OFLAG), + CONSTANT(BIG_ENDIAN, "GD_BE", GDMP_OFLAG_L), + CONSTANT(LITTLE_ENDIAN, "GD_LE", GDMP_OFLAG_L), + CONSTANT(CREAT, "GD_CR", GDMP_OFLAG), + CONSTANT(EXCL, "GD_EX", GDMP_OFLAG), + CONSTANT(TRUNC, "GD_TR", GDMP_OFLAG), + CONSTANT(PEDANTIC, "GD_PE", GDMP_OFLAG), + CONSTANT(FORCE_ENCODING, "GD_FC", GDMP_OFLAG), + CONSTANT(VERBOSE, "GD_VB", GDMP_OFLAG_L), + CONSTANT(IGNORE_DUPS, "GD_ID", GDMP_OFLAG), + CONSTANT(IGNORE_REFS, "GD_IR", GDMP_OFLAG), + CONSTANT(PRETTY_PRINT, "GD_PP", GDMP_OFLAG_L), + CONSTANT(ARM_ENDIAN, "GD_AE", GDMP_OFLAG_L), + CONSTANT(NOT_ARM_ENDIAN, "GD_NA", GDMP_OFLAG_L), + CONSTANT(PERMISSIVE, "GD_PM", GDMP_OFLAG), + CONSTANT(TRUNCSUB, "GD_TS", GDMP_OFLAG), - CONSTANT(AUTO_ENCODED, "GDE_AU", 1), - CONSTANT(BZIP2_ENCODED, "GDE_BZ", 2), - CONSTANT(GZIP_ENCODED, "GDE_GZ", 2), - CONSTANT(LZMA_ENCODED, "GDE_LZ", 2), - CONSTANT(SIE_ENCODED, "GDE_SI", 2), - CONSTANT(SLIM_ENCODED, "GDE_SL", 2), - CONSTANT(TEXT_ENCODED, "GDE_TX", 2), - CONSTANT(UNENCODED, "GDE_UN", 2), - CONSTANT(ZZSLIM_ENCODED, "GDE_ZS", 2), - CONSTANT(ZZIP_ENCODED, "GDE_ZZ", 2), + CONSTANT(AUTO_ENCODED, "GDE_AU", GDMP_OFLAG), + CONSTANT(BZIP2_ENCODED, "GDE_BZ", GDMP_OFLAG_L), + CONSTANT(GZIP_ENCODED, "GDE_GZ", GDMP_OFLAG_L), + CONSTANT(LZMA_ENCODED, "GDE_LZ", GDMP_OFLAG_L), + CONSTANT(SIE_ENCODED, "GDE_SI", GDMP_OFLAG_L), + CONSTANT(SLIM_ENCODED, "GDE_SL", GDMP_OFLAG_L), + CONSTANT(TEXT_ENCODED, "GDE_TX", GDMP_OFLAG_L), + CONSTANT(UNENCODED, "GDE_UN", GDMP_OFLAG_L), + CONSTANT(ZZSLIM_ENCODED, "GDE_ZS", GDMP_OFLAG_L), + CONSTANT(ZZIP_ENCODED, "GDE_ZZ", GDMP_OFLAG_L), - CONSTANT(NO_ENTRY, "GD_NOE", 3), - CONSTANT(RAW_ENTRY, "GD_RWE", 3), - CONSTANT(LINCOM_ENTRY, "GD_LCE", 3), - CONSTANT(LINTERP_ENTRY, "GD_LTE", 3), - CONSTANT(BIT_ENTRY, "GD_BTE", 3), - CONSTANT(MULTIPLY_ENTRY, "GD_MTE", 3), - CONSTANT(PHASE_ENTRY, "GD_PHE", 3), - CONSTANT(INDEX_ENTRY, "GD_IXE", 3), - CONSTANT(POLYNOM_ENTRY, "GD_PNE", 3), - CONSTANT(SBIT_ENTRY, "GD_SBE", 3), - CONSTANT(DIVIDE_ENTRY, "GD_DVE", 3), - CONSTANT(RECIP_ENTRY, "GD_RCE", 3), - CONSTANT(WINDOW_ENTRY, "GD_WDE", 3), - CONSTANT(MPLEX_ENTRY, "GD_MXE", 3), - CONSTANT(INDIR_ENTRY, "GD_IDE", 3), - CONSTANT(SINDIR_ENTRY, "GD_SDE", 3), - CONSTANT(CONST_ENTRY, "GD_COE", 3), - CONSTANT(CARRAY_ENTRY, "GD_CAE", 3), - CONSTANT(STRING_ENTRY, "GD_STE", 3), - CONSTANT(SARRAY_ENTRY, "GD_SAE", 3), + CONSTANT(NO_ENTRY, "GD_NOE", GDMP_ENTYPE), + CONSTANT(RAW_ENTRY, "GD_RWE", GDMP_ENTYPE), + CONSTANT(LINCOM_ENTRY, "GD_LCE", GDMP_ENTYPE), + CONSTANT(LINTERP_ENTRY, "GD_LTE", GDMP_ENTYPE), + CONSTANT(BIT_ENTRY, "GD_BTE", GDMP_ENTYPE), + CONSTANT(MULTIPLY_ENTRY, "GD_MTE", GDMP_ENTYPE), + CONSTANT(PHASE_ENTRY, "GD_PHE", GDMP_ENTYPE), + CONSTANT(INDEX_ENTRY, "GD_IXE", GDMP_ENTYPE), + CONSTANT(POLYNOM_ENTRY, "GD_PNE", GDMP_ENTYPE), + CONSTANT(SBIT_ENTRY, "GD_SBE", GDMP_ENTYPE), + CONSTANT(DIVIDE_ENTRY, "GD_DVE", GDMP_ENTYPE), + CONSTANT(RECIP_ENTRY, "GD_RCE", GDMP_ENTYPE), + CONSTANT(WINDOW_ENTRY, "GD_WDE", GDMP_ENTYPE), + CONSTANT(MPLEX_ENTRY, "GD_MXE", GDMP_ENTYPE), + CONSTANT(INDIR_ENTRY, "GD_IDE", GDMP_ENTYPE), + CONSTANT(SINDIR_ENTRY, "GD_SDE", GDMP_ENTYPE), + CONSTANT(CONST_ENTRY, "GD_COE", GDMP_ENTYPE), + CONSTANT(CARRAY_ENTRY, "GD_CAE", GDMP_ENTYPE), + CONSTANT(STRING_ENTRY, "GD_STE", GDMP_ENTYPE), + CONSTANT(SARRAY_ENTRY, "GD_SAE", GDMP_ENTYPE), - CONSTANT(NULL, "GD_NUL", 4), - CONSTANT(UINT8, "GD_U8", 4), - CONSTANT(INT8, "GD_I8", 4), - CONSTANT(UINT16, "GD_U16", 4), - CONSTANT(INT16, "GD_I16", 4), - CONSTANT(UINT32, "GD_U32", 4), - CONSTANT(INT32, "GD_I32", 4), - CONSTANT(UINT64, "GD_U64", 4), - CONSTANT(INT64, "GD_I64", 4), - CONSTANT(FLOAT32, "GD_F32", 4), - CONSTANT(FLOAT64, "GD_F64", 4), - CONSTANT(COMPLEX64, "GD_C64", 4), - CONSTANT(COMPLEX128, "GDC128", 4), - CONSTANT(STRING, "GD_STR", 4), + CONSTANT(NULL, "GD_NUL", GDMP_DTYPE), + CONSTANT(UINT8, "GD_U8", GDMP_DTYPE), + CONSTANT(INT8, "GD_I8", GDMP_DTYPE), + CONSTANT(UINT16, "GD_U16", GDMP_DTYPE), + CONSTANT(INT16, "GD_I16", GDMP_DTYPE), + CONSTANT(UINT32, "GD_U32", GDMP_DTYPE), + CONSTANT(INT32, "GD_I32", GDMP_DTYPE), + CONSTANT(UINT64, "GD_U64", GDMP_DTYPE), + CONSTANT(INT64, "GD_I64", GDMP_DTYPE), + CONSTANT(FLOAT32, "GD_F32", GDMP_DTYPE), + CONSTANT(FLOAT64, "GD_F64", GDMP_DTYPE), + CONSTANT(COMPLEX64, "GD_C64", GDMP_DTYPE), + CONSTANT(COMPLEX128, "GDC128", GDMP_DTYPE), + CONSTANT(STRING, "GD_STR", GDMP_DTYPE), - CONSTANT(DEL_META, "GDD_MT", 5), - CONSTANT(DEL_DATA, "GDD_DT", 5), - CONSTANT(DEL_DEREF, "GDD_DR", 5), - CONSTANT(DEL_FORCE, "GDD_FO", 5), - CONSTANT(REN_DATA, "GDR_DT", 5), - CONSTANT(REN_UPDB, "GDR_UP", 5), - CONSTANT(REN_DANGLE, "GDR_DL", 5), - CONSTANT(REN_FORCE, "GDR_FO", 5), + CONSTANT(DEL_META, "GDD_MT", GDMP_RFLAG), + CONSTANT(DEL_DATA, "GDD_DT", GDMP_RFLAG), + CONSTANT(DEL_DEREF, "GDD_DR", GDMP_RFLAG), + CONSTANT(DEL_FORCE, "GDD_FO", GDMP_RFLAG), + CONSTANT(REN_DATA, "GDR_DT", GDMP_RFLAG), + CONSTANT(REN_UPDB, "GDR_UP", GDMP_RFLAG), + CONSTANT(REN_DANGLE, "GDR_DL", GDMP_RFLAG), + CONSTANT(REN_FORCE, "GDR_FO", GDMP_RFLAG), - CONSTANT(PROTECT_NONE, "GDPR_N", 6), - CONSTANT(PROTECT_FORMAT, "GDPR_F", 6), - CONSTANT(PROTECT_DATA, "GDPR_D", 6), - CONSTANT(PROTECT_ALL, "GDPR_A", 6), + CONSTANT(PROTECT_NONE, "GDPR_N", GDMP_PROT), + CONSTANT(PROTECT_FORMAT, "GDPR_F", GDMP_PROT), + CONSTANT(PROTECT_DATA, "GDPR_D", GDMP_PROT), + CONSTANT(PROTECT_ALL, "GDPR_A", GDMP_PROT), - CONSTANT(SYNTAX_ABORT, "GDSX_A", 7), - CONSTANT(SYNTAX_RESCAN, "GDSX_S", 7), - CONSTANT(SYNTAX_IGNORE, "GDSX_I", 7), - CONSTANT(SYNTAX_CONTINUE, "GDSX_C", 7), + CONSTANT(SYNTAX_ABORT, "GDSX_A", GDMP_CALLBAK), + CONSTANT(SYNTAX_RESCAN, "GDSX_S", GDMP_CALLBAK), + CONSTANT(SYNTAX_IGNORE, "GDSX_I", GDMP_CALLBAK), + CONSTANT(SYNTAX_CONTINUE, "GDSX_C", GDMP_CALLBAK), - CONSTANT(E_FORMAT_BAD_SPF, "GDF_SF", 8), - CONSTANT(E_FORMAT_N_FIELDS,"GDF_NF", 8), - CONSTANT(E_FORMAT_N_TOK, "GDF_NT", 8), - CONSTANT(E_FORMAT_NUMBITS, "GDF_NB", 8), - CONSTANT(E_FORMAT_BITNUM, "GDF_BN", 8), - CONSTANT(E_FORMAT_BITSIZE, "GDF_SZ", 8), - CONSTANT(E_FORMAT_CHARACTER,"GDF_CH", 8), - CONSTANT(E_FORMAT_BAD_LINE,"GDF_LI", 8), - CONSTANT(E_FORMAT_RES_NAME,"GDF_RN", 8), - CONSTANT(E_FORMAT_ENDIAN, "GDF_EN", 8), - CONSTANT(E_FORMAT_BAD_TYPE,"GDF_TY", 8), - CONSTANT(E_FORMAT_BAD_NAME,"GDF_NA", 8), - CONSTANT(E_FORMAT_UNTERM, "GDF_UM", 8), - CONSTANT(E_FORMAT_METARAW, "GDF_MR", 8), - CONSTANT(E_FORMAT_NO_PARENT,"GDF_PA", 8), - CONSTANT(E_FORMAT_DUPLICATE,"GDF_DU", 8), - CONSTANT(E_FORMAT_LOCATION,"GDF_LO", 8), - CONSTANT(E_FORMAT_PROTECT, "GDF_PR", 8), - CONSTANT(E_FORMAT_LITERAL, "GDF_LT", 8), - CONSTANT(E_FORMAT_WINDOP, "GDF_WO", 8), - CONSTANT(E_FORMAT_META_META,"GDF_MM", 8), - CONSTANT(E_FORMAT_ALIAS, "GDF_AL", 8), - CONSTANT(E_FORMAT_MPLEXVAL,"GDF_MV", 8), + CONSTANT(E_FORMAT_BAD_SPF, "GDF_SF", GDMP_FORMAT), + CONSTANT(E_FORMAT_N_FIELDS, "GDF_NF", GDMP_FORMAT), + CONSTANT(E_FORMAT_N_TOK, "GDF_NT", GDMP_FORMAT), + CONSTANT(E_FORMAT_NUMBITS, "GDF_NB", GDMP_FORMAT), + CONSTANT(E_FORMAT_BITNUM, "GDF_BN", GDMP_FORMAT), + CONSTANT(E_FORMAT_BITSIZE, "GDF_SZ", GDMP_FORMAT), + CONSTANT(E_FORMAT_CHARACTER,"GDF_CH", GDMP_FORMAT), + CONSTANT(E_FORMAT_BAD_LINE, "GDF_LI", GDMP_FORMAT), + CONSTANT(E_FORMAT_RES_NAME, "GDF_RN", GDMP_FORMAT), + CONSTANT(E_FORMAT_ENDIAN, "GDF_EN", GDMP_FORMAT), + CONSTANT(E_FORMAT_BAD_TYPE, "GDF_TY", GDMP_FORMAT), + CONSTANT(E_FORMAT_BAD_NAME, "GDF_NA", GDMP_FORMAT), + CONSTANT(E_FORMAT_UNTERM, "GDF_UM", GDMP_FORMAT), + CONSTANT(E_FORMAT_METARAW, "GDF_MR", GDMP_FORMAT), + CONSTANT(E_FORMAT_NO_PARENT,"GDF_PA", GDMP_FORMAT), + CONSTANT(E_FORMAT_DUPLICATE,"GDF_DU", GDMP_FORMAT), + CONSTANT(E_FORMAT_LOCATION, "GDF_LO", GDMP_FORMAT), + CONSTANT(E_FORMAT_PROTECT, "GDF_PR", GDMP_FORMAT), + CONSTANT(E_FORMAT_LITERAL, "GDF_LT", GDMP_FORMAT), + CONSTANT(E_FORMAT_WINDOP, "GDF_WO", GDMP_FORMAT), + CONSTANT(E_FORMAT_META_META,"GDF_MM", GDMP_FORMAT), + CONSTANT(E_FORMAT_ALIAS, "GDF_AL", GDMP_FORMAT), + CONSTANT(E_FORMAT_MPLEXVAL, "GDF_MV", GDMP_FORMAT), - CONSTANT(VERSION_CURRENT, "GDSV_C", 9), - CONSTANT(VERSION_LATEST, "GDSV_L", 9), - CONSTANT(VERSION_EARLIEST, "GDSV_E", 9), + CONSTANT(VERSION_CURRENT, "GDSV_C", GDMP_VERS), + CONSTANT(VERSION_LATEST, "GDSV_L", GDMP_VERS), + CONSTANT(VERSION_EARLIEST, "GDSV_E", GDMP_VERS), - CONSTANT(SEEK_SET, "GDSK_S", 10), - CONSTANT(SEEK_CUR, "GDSK_C", 10), - CONSTANT(SEEK_END, "GDSK_E", 10), - CONSTANT(SEEK_WRITE, "GDSK_W", 11), + CONSTANT(SEEK_SET, "GDSK_S", GDMP_WHENCE), + CONSTANT(SEEK_CUR, "GDSK_C", GDMP_WHENCE), + CONSTANT(SEEK_END, "GDSK_E", GDMP_WHENCE), + CONSTANT(SEEK_WRITE, "GDSK_W", GDMP_SEEK), - CONSTANT(WINDOP_UNK, "GDW_UN", 12), - CONSTANT(WINDOP_EQ, "GDW_EQ", 12), - CONSTANT(WINDOP_GE, "GDW_GE", 12), - CONSTANT(WINDOP_GT, "GDW_GT", 12), - CONSTANT(WINDOP_LE, "GDW_LE", 12), - CONSTANT(WINDOP_LT, "GDW_LT", 12), - CONSTANT(WINDOP_NE, "GDW_NE", 12), - CONSTANT(WINDOP_SET, "GDW_ST", 12), - CONSTANT(WINDOP_CLR, "GDW_CL", 12), + CONSTANT(WINDOP_UNK, "GDW_UN", GDMP_WINDOP), + CONSTANT(WINDOP_EQ, "GDW_EQ", GDMP_WINDOP), + CONSTANT(WINDOP_GE, "GDW_GE", GDMP_WINDOP), + CONSTANT(WINDOP_GT, "GDW_GT", GDMP_WINDOP), + CONSTANT(WINDOP_LE, "GDW_LE", GDMP_WINDOP), + CONSTANT(WINDOP_LT, "GDW_LT", GDMP_WINDOP), + CONSTANT(WINDOP_NE, "GDW_NE", GDMP_WINDOP), + CONSTANT(WINDOP_SET, "GDW_ST", GDMP_WINDOP), + CONSTANT(WINDOP_CLR, "GDW_CL", GDMP_WINDOP), - CONSTANT(DESYNC_PATHCHECK, "GDDS_P", 13), - CONSTANT(DESYNC_REOPEN, "GDDS_O", 13), + CONSTANT(DESYNC_PATHCHECK, "GDDS_P", GDMP_DESYNC), + CONSTANT(DESYNC_REOPEN, "GDDS_O", GDMP_DESYNC), - CONSTANT(ALL_ENTRIES, "GDEN_X", 14), - CONSTANT(VECTOR_ENTRIES, "GDEN_V", 14), - CONSTANT(SCALAR_ENTRIES, "GDEN_S", 14), - CONSTANT(ALIAS_ENTRIES, "GDEN_A", 14), - CONSTANT(ENTRIES_HIDDEN, "GDEN_H", 14), - CONSTANT(ENTRIES_NOALIAS, "GDEN_N", 14), + CONSTANT(ALL_ENTRIES, "GDEN_X", GDMP_ENLIST), + CONSTANT(VECTOR_ENTRIES, "GDEN_V", GDMP_ENLIST), + CONSTANT(SCALAR_ENTRIES, "GDEN_S", GDMP_ENLIST), + CONSTANT(ALIAS_ENTRIES, "GDEN_A", GDMP_ENLIST), + CONSTANT(ENTRIES_HIDDEN, "GDEN_H", GDMP_ENLIST), + CONSTANT(ENTRIES_NOALIAS, "GDEN_N", GDMP_ENLIST), - CONSTANT(EN_CALC, "GDE_CA", 15), - CONSTANT(EN_HIDDEN, "GDE_HI", 15), - CONSTANT(EN_COMPSCAL, "GDE_CS", 15), + CONSTANT(EN_CALC, "GDE_CA", GDMP_EFLAG), + CONSTANT(EN_HIDDEN, "GDE_HI", GDMP_EFLAG), + CONSTANT(EN_COMPSCAL, "GDE_CS", GDMP_EFLAG), - CONSTANT(ALL_FRAGMENTS, "GD_ALL", 99), - CONSTANT(DEFAULT_LOOKBACK, "GDLB_D", 99), - CONSTANT(DIRFILE_STANDARDS_VERSION, "GD_DSV", 99), - CONSTANT(HERE, "GD_HER", 98), - CONSTANT(LOOKBACK_ALL, "GDLB_A", 98), - CONSTANT(MAX_LINE_LENGTH, "GD_MLL", 99), + CONSTANT(ALL_FRAGMENTS, "GD_ALL", GDMP_MISC), + CONSTANT(DEFAULT_LOOKBACK, "GDLB_D", GDMP_MISC), + CONSTANT(DIRFILE_STANDARDS_VERSION, "GD_DSV", GDMP_MISC), + CONSTANT(HERE, "GD_HER", GDMP_MISC_I), + CONSTANT(LOOKBACK_ALL, "GDLB_A", GDMP_MISC_I), + CONSTANT(MAX_LINE_LENGTH, "GD_MLL", GDMP_MISC), { NULL } }; @@ -275,109 +278,117 @@ printf("s/@PARAMETERS95@/\\\n! Error codes\\\n"); for (j = 0; constant_list[j].lname != NULL; ++j) - if (constant_list[j].type == 0) + if (constant_list[j].type == GDMP_ERR) parameter(constant_list[j].lname, constant_list[j].fname, constant_list[j].value, i); + printf("\\\n%c Deprecated error codes\\\n", c); + + for (j = 0; constant_list[j].lname != NULL; ++j) + if (constant_list[j].type == GDMP_DEPERR) + parameter(constant_list[j].lname, constant_list[j].fname, + constant_list[j].value, i); + printf("\\\n%c Open flags\\\n", c); for (j = 0; constant_list[j].lname != NULL; ++j) - if (constant_list[j].type == 1 || constant_list[j].type == 2) + if (constant_list[j].type & (GDMP_OFLAG | GDMP_OFLAG_L)) parameter(constant_list[j].lname, constant_list[j].fname, constant_list[j].value, i); - printf("\\\n%c Field types\\\n", c); + printf("\\\n%c Entry types\\\n", c); for (j = 0; constant_list[j].lname != NULL; ++j) - if (constant_list[j].type == 3) + if (constant_list[j].type == GDMP_ENTYPE) parameter(constant_list[j].lname, constant_list[j].fname, constant_list[j].value, i); printf( "\\\n%c Data types -- the unsigned types won't work when passed as\\\n" - "%c a return type, but we keep them anyways, since\\\n" - "%c they might appear as a result of calling %s\\\n", - c, c, c, (i == 0) ? "GDGERW" : "fget_entry"); + "%c a return type; they are defined because they\\\n" + "%c may be returned by %s or %s\\\n", c, c, c, + (i == 0) ? "GDGERW" : "fget_entry", + (i == 0) ? "GDNTYP" : "fget_native_type"); for (j = 0; constant_list[j].lname != NULL; ++j) - if (constant_list[j].type == 4) + if (constant_list[j].type == GDMP_DTYPE) parameter(constant_list[j].lname, constant_list[j].fname, constant_list[j].value, i); - printf("\\\n%c Delete flags\\\n", c); + printf("\\\n%c Delete and Rename flags\\\n", c); for (j = 0; constant_list[j].lname != NULL; ++j) - if (constant_list[j].type == 5) + if (constant_list[j].type == GDMP_RFLAG) parameter(constant_list[j].lname, constant_list[j].fname, constant_list[j].value, i); printf("\\\n%c Protection levels\\\n", c); for (j = 0; constant_list[j].lname != NULL; ++j) - if (constant_list[j].type == 6) + if (constant_list[j].type == GDMP_PROT) parameter(constant_list[j].lname, constant_list[j].fname, constant_list[j].value, i); printf("\\\n%c Callback actions\\\n", c); for (j = 0; constant_list[j].lname != NULL; ++j) - if (constant_list[j].type == 7) + if (constant_list[j].type == GDMP_CALLBAK) parameter(constant_list[j].lname, constant_list[j].fname, constant_list[j].value, i); printf("\\\n%c Syntax suberrors\\\n", c); for (j = 0; constant_list[j].lname != NULL; ++j) - if (constant_list[j].type == 8) + if (constant_list[j].type == GDMP_FORMAT) parameter(constant_list[j].lname, constant_list[j].fname, constant_list[j].value, i); printf("\\\n%c Special version codes\\\n", c); for (j = 0; constant_list[j].lname != NULL; ++j) - if (constant_list[j].type == 9) + if (constant_list[j].type == GDMP_VERS) parameter(constant_list[j].lname, constant_list[j].fname, constant_list[j].value, i); printf("\\\n%c Seek flags\\\n", c); for (j = 0; constant_list[j].lname != NULL; ++j) - if (constant_list[j].type == 10 || constant_list[j].type == 11) + if (constant_list[j].type & (GDMP_WHENCE | GDMP_SEEK)) parameter(constant_list[j].lname, constant_list[j].fname, constant_list[j].value, i); printf("\\\n%c Window operations\\\n", c); for (j = 0; constant_list[j].lname != NULL; ++j) - if (constant_list[j].type == 12) + if (constant_list[j].type == GDMP_WINDOP) parameter(constant_list[j].lname, constant_list[j].fname, constant_list[j].value, i); printf("\\\n%c Desync flags\\\n", c); for (j = 0; constant_list[j].lname != NULL; ++j) - if (constant_list[j].type == 13) + if (constant_list[j].type == GDMP_DESYNC) parameter(constant_list[j].lname, constant_list[j].fname, constant_list[j].value, i); printf("\\\n%c Entry List codes and flags\\\n", c); for (j = 0; constant_list[j].lname != NULL; ++j) - if (constant_list[j].type == 14) + if (constant_list[j].type == GDMP_ENLIST) parameter(constant_list[j].lname, constant_list[j].fname, constant_list[j].value, i); printf("\\\n%c Entry object flags\\\n", c); for (j = 0; constant_list[j].lname != NULL; ++j) - if (constant_list[j].type == 15) + if (constant_list[j].type == GDMP_EFLAG) parameter(constant_list[j].lname, constant_list[j].fname, constant_list[j].value, i); printf("\\\n%c Miscellaneous parameters\\\n", c); for (j = 0; constant_list[j].lname != NULL; ++j) - if (constant_list[j].type == 98 || constant_list[j].type == 99) + if (constant_list[j].type & (GDMP_MISC | GDMP_MISC_I)) parameter(constant_list[j].lname, constant_list[j].fname, constant_list[j].value, i); @@ -424,13 +435,12 @@ ); for (i = 0; constant_list[i].lname != NULL; ++i) - if ((constant_list[i].type != 1) && (constant_list[i].type != 5) && - (constant_list[i].type != 7) && (constant_list[i].type != 8) && - (constant_list[i].type != 11) && (constant_list[i].type != 13) && - (constant_list[i].type != 14) && (constant_list[i].type != 98)) + if (constant_list[i].type & (GDMP_ERR | GDMP_DEPERR | GDMP_OFLAG_L | + GDMP_ENTYPE | GDMP_DTYPE | GDMP_PROT | GDMP_VERS | GDMP_WHENCE | + GDMP_WINDOP | GDMP_EFLAG | GDMP_MISC)) { printf("{ \"%s\", 0, (void*)IDL_TYP_%s }, ", constant_list[i].sname, - (constant_list[i].type == 2) ? "LONG" : "INT"); + (constant_list[i].type == GDMP_OFLAG_L) ? "LONG" : "INT"); } printf("{ NULL }};\n"); @@ -446,14 +456,14 @@ "\n"); for (n = i = 0; constant_list[i].lname != NULL; ++i) - if ((constant_list[i].type != 1) && (constant_list[i].type != 5) && - (constant_list[i].type != 7) && (constant_list[i].type != 8) && - (constant_list[i].type != 11) && (constant_list[i].type != 13) && - (constant_list[i].type != 14) && (constant_list[i].type != 98)) + if (constant_list[i].type & (GDMP_ERR | GDMP_DEPERR | GDMP_OFLAG_L | + GDMP_ENTYPE | GDMP_DTYPE | GDMP_PROT | GDMP_VERS | GDMP_WHENCE | + GDMP_WINDOP | GDMP_EFLAG | GDMP_MISC)) { printf("*(IDL_%s*)(data + IDL_StructTagInfoByIndex(gdidl_const_def, %i, " - "IDL_MSG_LONGJMP, NULL)) = %li;\n", (constant_list[i].type == 2) ? - "LONG" : "INT", n++, constant_list[i].value); + "IDL_MSG_LONGJMP, NULL)) = %li;\n", + (constant_list[i].type == GDMP_OFLAG_L) ? "LONG" : "INT", + n++, constant_list[i].value); } printf("return r; }\n"); @@ -569,9 +579,10 @@ ); for (i = 0; constant_list[i].lname != NULL; ++i) - printf("zend_register_long_constant(ZEND_STRS(\"%s\"), %li, CONST_CS, " - "module_number TSRMLS_CC);", constant_list[i].lname, - constant_list[i].value); + if (constant_list[i].type != GDMP_DEPERR) + printf("zend_register_long_constant(ZEND_STRS(\"%s\"), %li, CONST_CS, " + "module_number TSRMLS_CC);", constant_list[i].lname, + constant_list[i].value); puts("dreturnvoid();}"); } Modified: trunk/getdata/bindings/matlab/matlab.c =================================================================== --- trunk/getdata/bindings/matlab/matlab.c 2014-10-11 04:38:47 UTC (rev 927) +++ trunk/getdata/bindings/matlab/matlab.c 2014-10-16 23:26:40 UTC (rev 928) @@ -55,18 +55,18 @@ static const char *gdmx_msgid[GD_N_ERROR_CODES] = { NULL, /* GD_E_OK */ - GD_LIBCOMP "Open", + GD_LIBCOMP "Error01", /* unused */ GD_LIBCOMP "Format", - GD_LIBCOMP "Trunc", + GD_LIBCOMP "Error03", /* unused */ GD_LIBCOMP "Creat", GD_LIBCOMP "BadCode", GD_LIBCOMP "BadType", - GD_LIBCOMP "RawIO", - GD_LIBCOMP "OpenFragment", + GD_LIBCOMP "IO", + GD_LIBCOMP "Error08", /* unused */ GD_LIBCOMP "InternalError", GD_LIBCOMP "Alloc", GD_LIBCOMP "Range", - GD_LIBCOMP "OpenLinfile", + GD_LIBCOMP "LUT", GD_LIBCOMP "RecurseLevel", GD_LIBCOMP "BadDirfile", GD_LIBCOMP "BadFieldType", @@ -88,7 +88,7 @@ GD_LIBCOMP "Domain", GD_LIBCOMP "BadRepr", GD_LIBCOMP "Error33", /* unused */ - GD_LIBCOMP "Flush", + GD_LIBCOMP "Error34", /* unused */ GD_LIBCOMP "Bounds", GD_LIBCOMP "LineTooLong" }; Modified: trunk/getdata/bindings/matlab/test/big_test.m =================================================================== --- trunk/getdata/bindings/matlab/test/big_test.m 2014-10-11 04:38:47 UTC (rev 927) +++ trunk/getdata/bindings/matlab/test/big_test.m 2014-10-16 23:26:40 UTC (rev 928) @@ -85,7 +85,7 @@ try D = gd_open('x'); catch exc - ne = ne + check_exc(exc, 1, 'Open'); + ne = ne + check_exc(exc, 1, 'IO'); end % 2: gd_open check Modified: trunk/getdata/bindings/perl/t/big_test.t =================================================================== --- trunk/getdata/bindings/perl/t/big_test.t 2014-10-11 04:38:47 UTC (rev 927) +++ trunk/getdata/bindings/perl/t/big_test.t 2014-10-16 23:26:40 UTC (rev 928) @@ -191,7 +191,7 @@ # 1: error check $_ = &GetData::open("x", $GetData::RDONLY); -CheckError(1, $GetData::E_OPEN); +CheckError(1, $GetData::E_IO); # 2: open check $_ = &GetData::open("dirfile", $GetData::RDWR); Modified: trunk/getdata/bindings/php/test/big_test.php =================================================================== --- trunk/getdata/bindings/php/test/big_test.php 2014-10-11 04:38:47 UTC (rev 927) +++ trunk/getdata/bindings/php/test/big_test.php 2014-10-16 23:26:40 UTC (rev 928) @@ -174,7 +174,7 @@ # 1: gd_error $D = gd_open(''); -check_error(1, $D, GD_E_OPEN); +check_error(1, $D, GD_E_IO); # 2: gd_open $D = gd_open("dirfile\0extra", GD_RDWR); Modified: trunk/getdata/bindings/python/pygetdata.c =================================================================== --- trunk/getdata/bindings/python/pygetdata.c 2014-10-11 04:38:47 UTC (rev 927) +++ trunk/getdata/bindings/python/pygetdata.c 2014-10-16 23:26:40 UTC (rev 928) @@ -23,18 +23,18 @@ static PyObject *GdPy_DirfileError; static const char *gdpy_exception_list[GD_N_ERROR_CODES] = { NULL, - "Open", + NULL, /* 1 */ "Format", - "Truncate", + NULL, /* 3 */ "Creation", "BadCode", "BadType", - "RawIO", - "OpenFragment", + "IO", + NULL, /* 8 */ "Internal", "Alloc", "Range", - "OpenLinfile", + "LUT", "RecurseLevel", "BadDirfile", "BadFieldType", @@ -55,13 +55,33 @@ "UncleanDatabase", "Domain", "BadRepr", - NULL, - "Flush", + NULL, /* 33 */ + NULL, /* 34 */ "Bounds", "LineTooLong" }; PyObject *gdpy_exceptions[GD_N_ERROR_CODES]; +/* These are unused but for backwards compatibility are defined as aliases of + * current exceptions */ +static struct { + const char *name; + int e; +} gdpy_dead_exceptions[] = { + { "BadEndianness", GD_E_ARGUMENT }, + { "BadProtection", GD_E_ARGUMENT }, + { "BadVersion", GD_E_ARGUMENT }, + { "OpenLinfile", GD_E_LUT }, + { "Flush", GD_E_IO }, + { "Open", GD_E_IO }, + { "OpenFragment", GD_E_IO }, + { "OpenFragment", GD_E_IO }, + { "OpenInclude", GD_E_IO }, + { "RawIO", GD_E_IO }, + { "Trunc", GD_E_IO }, + { NULL, 0} +}; + int gdpy_convert_from_pyobj(PyObject *value, union gdpy_quadruple_value *data, gd_type_t type) { @@ -548,6 +568,7 @@ { int i; PyObject *mod; + PyObject *mdict; dtracevoid(); @@ -664,5 +685,16 @@ gdpy_exceptions[i] = GdPy_DirfileError; } + /* add dead exceptions -- we do this through manual dictionary editing */ + mdict = PyModule_GetDict(mod); + if (mdict) + for (i = 0; gdpy_dead_exceptions[i].name; ++i) { + char name[40]; + sprintf(name, "%sError", gdpy_dead_exceptions[i].name); + Py_INCREF(gdpy_exceptions[gdpy_dead_exceptions[i].e]); + PyDict_SetItemString(mdict, name, + gdpy_exceptions[gdpy_dead_exceptions[i].e]); + } + dreturnvoid(); } Modified: trunk/getdata/bindings/python/test/big_test.py =================================================================== --- trunk/getdata/bindings/python/test/big_test.py 2014-10-11 04:38:47 UTC (rev 927) +++ trunk/getdata/bindings/python/test/big_test.py 2014-10-16 23:26:40 UTC (rev 928) @@ -132,7 +132,7 @@ try: d = pygetdata.dirfile("x", pygetdata.RDONLY) except: - CheckException(1, pygetdata.OpenError) + CheckException(1, pygetdata.IOError) # 2: dirfile check try: Modified: trunk/getdata/man/dirfile-encoding.5 =================================================================== --- trunk/getdata/man/dirfile-encoding.5 2014-10-11 04:38:47 UTC (rev 927) +++ trunk/getdata/man/dirfile-encoding.5 2014-10-16 23:26:40 UTC (rev 928) @@ -1,6 +1,6 @@ .\" dirfile-encoding.5. The dirfile-encoding man page. .\" -.\" Copyright (C) 2008, 2009, 2010, 2012, 2013 D. V. Wiebe +.\" Copyright (C) 2008, 2009, 2010, 2012, 2013, 2014 D. V. Wiebe .\" .\"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" .\" @@ -13,7 +13,7 @@ .\" Texts. A copy of the license is included in the `COPYING.DOC' file .\" as part of this distribution. .\" -.TH dirfile-encoding 5 "22 May 2014" "Standards Version 10" "DATA FORMATS" +.TH dirfile-encoding 5 "16 October 2014" "Standards Version 10" "DATA FORMATS" .SH NAME dirfile-encoding \(em dirfile database encoding schemes .SH DESCRIPTION @@ -59,10 +59,12 @@ .BR gd_add "(3), " gd_add_raw "(3), " gd_add_spec (3), .BR gd_alter_encoding "(3), " gd_alter_endianness (3), .BR gd_alter_frameoffset "(3), " gd_alter_entry (3), -.BR gd_alter_raw "(3), " gd_alter_spec "(3), " gd_getdata (3), -.BR gd_move "(3), " gd_nframes "(3), " gd_putdata (3), +.BR gd_alter_raw "(3), " gd_alter_spec "(3), " gd_flush (3), +.BR gd_getdata "(3), " gd_malter_spec "(3), " gd_move (3), +.BR gd_nframes "(3), " gd_putdata "(3), " gd_raw_close (3), +.BR gd_rename (3), and -.BR gd_rename (3). +.BR gd_sync (3). .P Most of the encodings supported by GetData are implemented through external libraries which handle the actual file I/O and data translation. All such Modified: trunk/getdata/man/gd_add.3 =================================================================== --- trunk/getdata/man/gd_add.3 2014-10-11 04:38:47 UTC (rev 927) +++ trunk/getdata/man/gd_add.3 2014-10-16 23:26:40 UTC (rev 928) @@ -1,6 +1,6 @@ .\" gd_add.3. The gd_add man page. .\" -.\" Copyright (C) 2008, 2009, 2010, 2012, 2013 D. V. Wiebe +.\" Copyright (C) 2008, 2009, 2010, 2012, 2013, 2014 D. V. Wiebe .\" .\"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" .\" @@ -13,7 +13,7 @@ .\" Texts. A copy of the license is included in the `COPYING.DOC' file .\" as part of this distribution. .\" -.TH gd_add 3 "5 May 2014" "Version 0.9.0" "GETDATA" +.TH gd_add 3 "16 October 2014" "Version 0.9.0" "GETDATA" .SH NAME gd_add, gd_madd \(em add a field to a dirfile .SH SYNOPSIS @@ -163,17 +163,17 @@ This indicates a bug in the library. Please report the incident to the GetData developers. .TP +.B GD_E_IO +An I/O error occurred while creating an empty binary file to be associated with +a newly added +.B RAW +field. +.TP .B GD_E_PROTECTED The metadata of the fragment was protected from change. Or, the creation of a .B RAW field was attempted and the data of the fragment was protected. .TP -.B GD_E_RAW_IO -An I/O error occurred while creating an empty binary file to be associated with -a newly added -.B RAW -field. -.TP .B GD_E_UNKNOWN_ENCODING The encoding scheme of the indicated format specification fragment is not known to the library. As a result, the library was unable to create an empty binary Modified: trunk/getdata/man/gd_add_bit.3 =================================================================== --- trunk/getdata/man/gd_add_bit.3 2014-10-11 04:38:47 UTC (rev 927) +++ trunk/getdata/man/gd_add_bit.3 2014-10-16 23:26:40 UTC (rev 928) @@ -1,6 +1,6 @@ .\" gd_add_bit.3. The gd_add_bit man page. .\" -.\" Copyright (C) 2008, 2009, 2010, 2012, 2013 D. V. Wiebe +.\" Copyright (C) 2008, 2009, 2010, 2012, 2013, 2014 D. V. Wiebe .\" .\"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" .\" @@ -13,7 +13,7 @@ .\" Texts. A copy of the license is included in the `COPYING.DOC' file .\" as part of this distribution. .\" -.TH gd_add_bit 3 "5 May 2014" "Version 0.9.0" "GETDATA" +.TH gd_add_bit 3 "16 October 2014" "Version 0.9.0" "GETDATA" .SH NAME gd_add_bit, gd_add_carray gd_add_clincom, gd_add_const, gd_add_cpolynom, gd_add_crecip, gd_add_divide, gd_add_lincom, gd_add_linterp, gd_add_multiply, @@ -264,27 +264,30 @@ This indicates a bug in the library. Please report the incident to the GetData developers. .TP +.B GD_E_IO +.RB ( gd_add_raw () +only) An I/O error occurred while creating an empty binary file to be +associated with a newly added +.B RAW +field. +.TP .B GD_E_PROTECTED The metadata of the fragment was protected from change. Or, the creation of a .B RAW field was attempted and the data of the fragment was protected. .TP -.B GD_E_RAW_IO -An I/O error occurred while creating an empty binary file to be associated with -a newly added -.B RAW -field. -.TP .B GD_E_UNKNOWN_ENCODING -The encoding scheme of the indicated format specification fragment is not known -to the library. As a result, the library was unable to create an empty binary -file to be associated with a newly added +.RB ( gd_add_raw () +only) The encoding scheme of the indicated format specification fragment is not +known to the library. As a result, the library was unable to create an empty +binary file to be associated with a newly added .B RAW field. .TP .B GD_E_UNSUPPORTED -The encoding scheme of the indicated format specification fragment does not -support creating an empty binary file to be associated with a newly added +.RB ( gd_add_raw () +only) The encoding scheme of the indicated format specification fragment does +not support creating an empty binary file to be associated with a newly added .B RAW field. .PP Modified: trunk/getdata/man/gd_add_spec.3 =================================================================== --- trunk/getdata/man/gd_add_spec.3 2014-10-11 04:38:47 UTC (rev 927) +++ trunk/getdata/man/gd_add_spec.3 2014-10-16 23:26:40 UTC (rev 928) @@ -1,6 +1,6 @@ .\" gd_add_spec.3. The gd_add_spec man page. .\" -.\" Copyright (C) 2008, 2009, 2010 D. V. Wiebe +.\" Copyright (C) 2008, 2009, 2010, 2014 D. V. Wiebe .\" .\"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" .\" @@ -13,7 +13,7 @@ .\" Texts. A copy of the license is included in the `COPYING.DOC' file .\" as part of this distribution. .\" -.TH gd_add_spec 3 "4 November 2010" "Version 0.7.0" "GETDATA" +.TH gd_add_spec 3 "16 October 2014" "Version 0.9.0" "GETDATA" .SH NAME gd_add_spec, gd_madd_spec \(em add a field to a dirfile .SH SYNOPSIS @@ -94,6 +94,12 @@ A syntax error was encountered in .IR line . .TP +.B GD_E_IO +An I/O error occurred while creating an empty binary file to be associated with +a newly added +.B RAW +field. +.TP .B GD_E_LINE_TOO_LONG The supplied .I line @@ -109,12 +115,6 @@ .B RAW field was attempted and the data of the fragment was protected. .TP -.B GD_E_RAW_IO -An I/O error occurred while creating an empty binary file to be associated with -a newly added -.B RAW -field. -.TP .B GD_E_UNKNOWN_ENCODING The encoding scheme of the indicated format specification fragment is not known to the library. As a result, the library was unable to create an empty binary Modified: trunk/getdata/man/gd_alter_bit.3 =================================================================== --- trunk/getdata/man/gd_alter_bit.3 2014-10-11 04:38:47 UTC (rev 927) +++ trunk/getdata/man/gd_alter_bit.3 2014-10-16 23:26:40 UTC (rev 928) @@ -1,6 +1,6 @@ .\" gd_alter_bit.3. The gd_alter_bit man page. .\" -.\" Copyright (C) 2008, 2009, 2010, 2012, 2013 D. V. Wiebe +.\" Copyright (C) 2008, 2009, 2010, 2012, 2013, 2014 D. V. Wiebe .\" .\"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" .\" @@ -13,7 +13,7 @@ .\" Texts. A copy of the license is included in the `COPYING.DOC' file .\" as part of this distribution. .\" -.TH gd_alter_bit 3 "1 October 2013" "Version 0.9.0" "GETDATA" +.TH gd_alter_bit 3 "16 October 2014" "Version 0.9.0" "GETDATA" .SH NAME gd_alter_bit, gd_alter_carray, gd_alter_clincom, gd_alter_const, gd_alter_cpolynom, gd_alter_crecip, gd_alter_divide, gd_alter_lincom, @@ -197,7 +197,8 @@ .I recode is non-zero, the binary file associated with the .B RAW -field will be re-encoded to reflect the new field parameters. +field will be re-encoded to reflect the new field parameters. In this case, +the field's I/O pointer will be reset to the beginning-of-frame. If .BR gd_alter_carray () @@ -248,13 +249,7 @@ .IR data_type " or " const_type argument was invalid. .TP -.B GD_E_PROTECTED -The metadata of the fragment was protected from change. Or, a request to -translate the binary file associated with a -.B RAW -field was attempted, but the data of the fragment was protected. -.TP -.B GD_E_RAW_IO +.B GD_E_IO An I/O error occurred while translating the binary file associated with a modified .B RAW @@ -262,6 +257,12 @@ .B LINTERP table file. .TP +.B GD_E_PROTECTED +The metadata of the fragment was protected from change. Or, a request to +translate the binary file associated with a +.B RAW +field was attempted, but the data of the fragment was protected. +.TP .B GD_E_UNKNOWN_ENCODING The encoding scheme of the indicated format specification fragment is not known to the library. As a result, the library was unable to translate the binary Modified: trunk/getdata/man/gd_alter_encoding.3.in =================================================================== --- trunk/getdata/man/gd_alter_encoding.3.in 2014-10-11 04:38:47 UTC (rev 927) +++ trunk/getdata/man/gd_alter_encoding.3.in 2014-10-16 23:26:40 UTC (rev 928) @@ -2,7 +2,7 @@ .\" .\" @configure_input@ .\" -.\" Copyright (C) 2008, 2009, 2010 D. V. Wiebe +.\" Copyright (C) 2008, 2009, 2010, 2014 D. V. Wiebe .\" .\"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" .\" @@ -15,7 +15,7 @@ .\" Texts. A copy of the license is included in the `COPYING.DOC' file .\" as part of this distribution. .\" -.TH gd_alter_encoding 3 "20 July 2010" "Version 0.7.0" "GETDATA" +.TH gd_alter_encoding 3 "16 October 2014" "Version 0.9.0" "GETDATA" .SH NAME gd_alter_encoding \(em modify the binary encoding of data in a dirfile .SH SYNOPSIS @@ -32,8 +32,8 @@ .BR gd_alter_encoding () function sets the binary encoding of the format specification fragment given by .I fragment_index -to -.I byte_sex +to the encoding specified by +.I encoding in the dirfile(5) database specified by .IR dirfile . The binary encoding of a fragment indicate the encoding of data stored in binary @@ -45,13 +45,14 @@ fields is ignored. The -.I byte_sex +.I encoding argument should be one of the following: .IP .nh .ad l .BR GD_UNENCODED ,\~ GD_BZIP2_ENCODED ,\~ GD_GZIP_ENCODED ,\~ -.BR GD_LZMA_ENCODED ,\~ GD_SLIM_ENCODED ,\~ GD_TEXT_ENCODED . +.BR GD_LZMA_ENCODED ,\~ GD_SLIM_ENCODED ,\~ GD_SIE_ENCODED ,\~ +.BR GD_TEXT_ENCODED . .ad n .hy .PP @@ -73,7 +74,11 @@ .B RAW fields to account for the change in binary encoding. If the encoding of the fragment is encoding insensitive, or if the data type is only one byte in -size, no change is made. If +size, no change is made. The I/O pointer of all affected +.B RAW +fields is reset to the beginning-of-frame. + +If .I recode is zero, affected binary files are left untouched. @@ -95,14 +100,14 @@ .B GD_E_BAD_INDEX The supplied index was out of range. .TP +.B GD_E_IO +An I/O error occurred while attempting to recode a binary file. +.TP .B GD_E_PROTECTED The metadata of the given format specification fragment was protected from change, or the binary data of the fragment was protected from change and binary file recoding was requested. .TP -.B GD_E_RAW_IO -An I/O error occurred while attempting to recode a binary file. -.TP .B GD_E_UNCLEAN_DB An error occurred while moving the recoded file into place. As a result, the database may be in an unclean state. See the Modified: trunk/getdata/man/gd_alter_endianness.3.in =================================================================== --- trunk/getdata/man/gd_alter_endianness.3.in 2014-10-11 04:38:47 UTC (rev 927) +++ trunk/getdata/man/gd_alter_endianness.3.in 2014-10-16 23:26:40 UTC (rev 928) @@ -2,7 +2,7 @@ .\" .\" @configure_input@ .\" -.\" Copyright (C) 2008, 2010, 2012 D. V. Wiebe +.\" Copyright (C) 2008, 2010, 2012, 2014 D. V. Wiebe .\" .\"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" .\" @@ -15,7 +15,7 @@ .\" Texts. A copy of the license is included in the `COPYING.DOC' file .\" as part of this distribution. .\" -.TH gd_alter_endianness 3 "1 January 2012" "Version 0.8.0" "GETDATA" +.TH gd_alter_endianness 3 "16 October 2014" "Version 0.9.0" "GETDATA" .SH NAME gd_alter_endianness \(em modify the byte sex of fields in a dirfile .SH SYNOPSIS @@ -83,7 +83,11 @@ .B RAW fields to account for the change in byte sex. If the encoding of the fragment is endianness insensitive, or if the data type is only one byte in -size, no change is made. If +size, no change is made. The I/O pointer of all affected +.B RAW +fields is reset to the beginning-of-frame. + +If .I recode is zero, affected binary files are left untouched. @@ -110,14 +114,14 @@ .B GD_E_BAD_INDEX The supplied index was out of range. .TP +.B GD_E_IO +An I/O error occurred while attempting to byte swap a binary file. +.TP .B GD_E_PROTECTED The metadata of the indicated format specification fragment was protected from change, or the binary data of the fragment was protected from change and binary file byte swapping was requested. .TP -.B GD_E_RAW_IO -An I/O error occurred while attempting to byte swap a binary file. -.TP .B GD_E_UNCLEAN_DB An error occurred while moving the byte-swapped file into place. As a result, the database may be in an unclean state. See the Modified: trunk/getdata/man/gd_alter_entry.3 =================================================================== --- trunk/getdata/man/gd_alter_entry.3 2014-10-11 04:38:47 UTC (rev 927) +++ trunk/getdata/man/gd_alter_entry.3 2014-10-16 23:26:40 UTC (rev 928) @@ -1,6 +1,6 @@ .\" gd_alter_entry.3. The gd_alter_entry man page. .\" -.\" Copyright (C) 2008, 2009, 2010, 2012, 2013 D. V. Wiebe +.\" Copyright (C) 2008, 2009, 2010, 2012, 2013, 2014 D. V. Wiebe .\" .\"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" .\" @@ -13,7 +13,7 @@ .\" Texts. A copy of the license is included in the `COPYING.DOC' file .\" as part of this distribution. .\" -.TH gd_alter_entry 3 "27 November 2013" "Version 0.9.0" "GETDATA" +.TH gd_alter_entry 3 "16 October 2014" "Version 0.9.0" "GETDATA" .SH NAME gd_alter_entry \(em modify the metadata of a dirfile field .SH SYNOPSIS @@ -79,7 +79,8 @@ field and the .I recode argument is non-zero, the binary file associated with the field will be -converted for changes in data type and samples-per-frame. If +converted for changes in data type and samples-per-frame. In this case, +the field's I/O pointer will be reset to the beginning-of-frame. If .I recode is zero, no binary file conversion will take place. @@ -236,13 +237,7 @@ .BR CARRAY entry, was invalid. .TP -.B GD_E_PROTECTED -The metadata of the fragment was protected from change. Or, a request to -translate the binary file associated with a -.B RAW -field was attempted, but the data of the fragment was protected. -.TP -.B GD_E_RAW_IO +.B GD_E_IO An I/O error occurred while translating the binary file associated with a modified .B RAW @@ -250,6 +245,12 @@ .B LINTERP table file. .TP +.B GD_E_PROTECTED +The metadata of the fragment was protected from change. Or, a request to +translate the binary file associated with a +.B RAW +field was attempted, but the data of the fragment was protected. +.TP .B GD_E_UNKNOWN_ENCODING The encoding scheme of the indicated format specification fragment is not known to the library. As a result, the library was unable to translate the binary Modified: trunk/getdata/man/gd_alter_frameoffset.3.in =================================================================== --- trunk/getdata/man/gd_alter_frameoffset.3.in 2014-10-11 04:38:47 UTC (rev 927) +++ trunk/getdata/man/gd_alter_frameoffset.3.in 2014-10-16 23:26:40 UTC (rev 928) @@ -2,7 +2,7 @@ .\" .\" @configure_input@ .\" -.\" Copyright (C) 2008, 2010 D. V. Wiebe +.\" Copyright (C) 2008, 2010, 2014 D. V. Wiebe .\" .\"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" .\" @@ -15,7 +15,7 @@ .\" Texts. A copy of the license is included in the `COPYING.DOC' file .\" as part of this distribution. .\" -.TH gd_alter_frameoffset 3 "20 July 2010" "Version 0.7.0" "GETDATA" +.TH gd_alter_frameoffset 3 "16 October 2014" "Version 0.9.0" "GETDATA" .SH NAME gd_alter_frameoffset \(em modify the starting frame of fields in a dirfile .SH SYNOPSIS @@ -63,7 +63,12 @@ fields to account for the change in frame offset. If the new frame offset is larger than the old frame offset, this will result in permanent deletion of data from the database. If the new frame offset is smaller than the old frame -offset, the binary file will be padded at the front with zeroes. If +offset, the binary file will be padded at the front with zeroes. The I/O +pointer of all affected +.B RAW +fields is reset to the beginning-of-frame. + +If .I recode is zero, affected binary files are left untouched. @@ -85,6 +90,9 @@ .B GD_E_BAD_INDEX The supplied index was out of range. .TP +.B GD_E_IO +An I/O error occurred while attempting to shift a binary file. +.TP .B GD_E_PROTECTED The metadata of the given format specification fragment was protected from change, or the binary data of the fragment was protected from change and binary @@ -93,9 +101,6 @@ .B GD_E_RANGE The supplied offset was less than zero. .TP -.B GD_E_RAW_IO -An I/O error occurred while attempting to shift a binary file. -.TP .B GD_E_UNCLEAN_DB An error occurred while moving the shifted file into place. As a result, the database may be in an unclean state. See the Modified: trunk/getdata/man/gd_alter_spec.3 =================================================================== --- trunk/getdata/man/gd_alter_spec.3 2014-10-11 04:38:47 UTC (rev 927) +++ trunk/getdata/man/gd_alter_spec.3 2014-10-16 23:26:40 UTC (rev 928) @@ -1,6 +1,6 @@ .\" gd_alter_spec.3. The gd_alter_spec man page. .\" -.\" Copyright (C) 2008, 2010, 2011 D. V. Wiebe +.\" Copyright (C) 2008, 2010, 2011, 2014 D. V. Wiebe .\" .\"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" .\" @@ -13,7 +13,7 @@ .\" Texts. A copy of the license is included in the `COPYING.DOC' file .\" as part of this distribution. .\" -.TH gd_alter_spec 3 "5 May 2014" "Version 0.9.0" "GETDATA" +.TH gd_alter_spec 3 "16 October 2014" "Version 0.9.0" "GETDATA" .SH NAME gd_alter_spec, gd_malter_spec \(em modify a field in a dirfile .SH SYNOPSIS @@ -55,7 +55,8 @@ and the .I recode argument is non-zero, the binary file associated with the field will be -converted for changes in data type and samples-per-frame. If +converted for changes in data type and samples-per-frame. In this case, +the field's I/O pointer will be reset to ... [truncated message content] |
From: <ket...@us...> - 2014-10-11 04:38:50
|
Revision: 927 http://sourceforge.net/p/getdata/code/927 Author: ketiltrout Date: 2014-10-11 04:38:47 +0000 (Sat, 11 Oct 2014) Log Message: ----------- Fix offset handling in Rate display. Modified Paths: -------------- trunk/defile/bin/net.c trunk/defile/input/ascii.c trunk/defile/lib/libdefile.c Modified: trunk/defile/bin/net.c =================================================================== --- trunk/defile/bin/net.c 2014-10-01 00:19:16 UTC (rev 926) +++ trunk/defile/bin/net.c 2014-10-11 04:38:47 UTC (rev 927) @@ -792,7 +792,7 @@ } framepos = 0; case 6: - DF_GET_DATA(2, p_uint16[1], p_uint32[1]); + DF_GET_DATA(1, p_uint16[1], p_uint32[1]); case 7: df_dprintf(DF_PRN_DEBUG_I, "RPC: df_add_lut(\"%s\", %u, 0x%X, " "<xdata>, 0x%X, <ydata>)\n", string[0], p_uint32[0], p_uint16[0], Modified: trunk/defile/input/ascii.c =================================================================== --- trunk/defile/input/ascii.c 2014-10-01 00:19:16 UTC (rev 926) +++ trunk/defile/input/ascii.c 2014-10-11 04:38:47 UTC (rev 927) @@ -1194,7 +1194,7 @@ } /* record PIDs */ - ascii_conf.filt_pid = (pid_t*)malloc(sizeof(pid_t) * ascii_conf.n_filt); + ascii_conf.filt_pid = malloc(sizeof(pid_t) * ascii_conf.n_filt); if (ascii_conf.filt_pid == NULL) { df_printf(DF_PRN_ERR, "out of memory\n"); return 1; @@ -1588,7 +1588,7 @@ /* create the framedef */ fd.n_fields = nraw; fd.framesize = nraw * sizeof(double); - fd.field = (struct df_fdef_field*)malloc(sizeof(struct df_fdef_field) * nraw); + fd.field = malloc(sizeof(struct df_fdef_field) * nraw); if (fd.field == NULL) { df_puts(DF_PRN_ERR, "out of memory\n"); df_exit(1, 1); Modified: trunk/defile/lib/libdefile.c =================================================================== --- trunk/defile/lib/libdefile.c 2014-10-01 00:19:16 UTC (rev 926) +++ trunk/defile/lib/libdefile.c 2014-10-11 04:38:47 UTC (rev 927) @@ -1229,7 +1229,9 @@ /* handle a starting offset */ pthread_mutex_lock(&df_config_mx); - offset = (df->input_offset > df->offset) ? df->input_offset : df->offset; + if (df->input_offset > df->offset) + df->offset = df->input_offset; + offset = df->offset; pthread_mutex_unlock(&df_config_mx); /* output frameoffset */ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ket...@us...> - 2014-10-01 00:19:20
|
Revision: 926 http://sourceforge.net/p/getdata/code/926 Author: ketiltrout Date: 2014-10-01 00:19:16 +0000 (Wed, 01 Oct 2014) Log Message: ----------- Ditto. Modified Paths: -------------- trunk/defile/bin/net.c Modified: trunk/defile/bin/net.c =================================================================== --- trunk/defile/bin/net.c 2014-10-01 00:09:08 UTC (rev 925) +++ trunk/defile/bin/net.c 2014-10-01 00:19:16 UTC (rev 926) @@ -792,7 +792,7 @@ } framepos = 0; case 6: - DF_GET_DATA(1, p_uint16[1], p_uint32[1]); + DF_GET_DATA(2, p_uint16[1], p_uint32[1]); case 7: df_dprintf(DF_PRN_DEBUG_I, "RPC: df_add_lut(\"%s\", %u, 0x%X, " "<xdata>, 0x%X, <ydata>)\n", string[0], p_uint32[0], p_uint16[0], This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ket...@us...> - 2014-10-01 00:09:25
|
Revision: 925 http://sourceforge.net/p/getdata/code/925 Author: ketiltrout Date: 2014-10-01 00:09:08 +0000 (Wed, 01 Oct 2014) Log Message: ----------- ANother networking bug Modified Paths: -------------- trunk/defile/bin/net.c Modified: trunk/defile/bin/net.c =================================================================== --- trunk/defile/bin/net.c 2014-10-01 00:04:49 UTC (rev 924) +++ trunk/defile/bin/net.c 2014-10-01 00:09:08 UTC (rev 925) @@ -1172,7 +1172,7 @@ + ((df->mode_flags & DF_MODE_RDEBUG_O) ? sizeof(" -d o") : 0) + ((df->mode_flags & DF_MODE_RDEBUG_T) ? sizeof(" -d t") : 0) + (!(df->mode_flags & DF_MODE_FOLLOW) ? sizeof(" +f") : 0) - + ((df->offset > 0) ? sizeof(" -o ") + 1 + + ((df->offset > 0) ? sizeof(" -s ") + 1 + (int)(log(df->offset) * M_LOG10E) : 0) + (df->type ? sizeof(" -t ") + strlen(df->type) : 0) ; @@ -1198,7 +1198,7 @@ if (!(df->mode_flags & DF_MODE_FOLLOW)) wordlen += sprintf(cmd[nwords] + wordlen, " +f"); if (df->offset) - wordlen += sprintf(cmd[nwords] + wordlen, " -o %lli", df->offset); + wordlen += sprintf(cmd[nwords] + wordlen, " -s %lli", df->offset); if (df->type) wordlen += sprintf(cmd[nwords] + wordlen, " -t %s", df->type); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ket...@us...> - 2014-10-01 00:04:56
|
Revision: 924 http://sourceforge.net/p/getdata/code/924 Author: ketiltrout Date: 2014-10-01 00:04:49 +0000 (Wed, 01 Oct 2014) Log Message: ----------- --num-frames; plus network client bugfix. Modified Paths: -------------- trunk/defile/bin/defile.c trunk/defile/bin/net.c trunk/defile/doc/defile.1.in trunk/defile/lib/internal.h trunk/defile/lib/libdefile.c Modified: trunk/defile/bin/defile.c =================================================================== --- trunk/defile/bin/defile.c 2014-09-30 02:40:40 UTC (rev 923) +++ trunk/defile/bin/defile.c 2014-10-01 00:04:49 UTC (rev 924) @@ -122,6 +122,7 @@ static struct df_defile the_defile = { .buflen = DF_BUFLEN, .iargc = 1, /* like argv, iargv[0] is the program name */ + .nframes_out = -1, /* write all frames */ .srv_rate = 10 /* megabits per second */ }; struct df_defile *const df = &the_defile; @@ -481,7 +482,7 @@ if (str == NULL) return df_rpc_push_uint32(slug, 0xFFFFFFFF); - /* yeah, that's right: we silently limit strings to 4Gb */ + /* yeah, that's right: we silently limit strings to 4GB */ len = (uint32_t)strlen(str); if (len == 0xFFFFFFFF) len--; @@ -943,7 +944,8 @@ DF_WOPT_VERBOSE, DF_WOPT_REMOTE, DF_WOPT_LOCAL, DF_WOPT_RSH, DF_WOPT_LISTEN, DF_WOPT_NOLISTEN, DF_WOPT_RCMD, DF_WOPT_RDEBUG, DF_WOPT_NORDEBUG, DF_WOPT_SRVRATE, DF_WOPT_DAEMON, DF_WOPT_CURFILE, DF_WOPT_SYMLINK, - DF_WOPT_NOSYMLINK, DF_WOPT_NOCURFILE, DF_WOPT_CLOBBERONE, DF_WOPT_FOFFS + DF_WOPT_NOSYMLINK, DF_WOPT_NOCURFILE, DF_WOPT_CLOBBERONE, DF_WOPT_FOFFS, + DF_WOPT_NFRAMES, DF_WOPT_ALLFRAMES }; static int DF_OutputOpt(struct df_defile *df, struct df_rc_config *config, @@ -1048,7 +1050,6 @@ df->mode_flags &= ~(DF_MODE_RDEBUG_I | DF_MODE_RDEBUG_O | DF_MODE_RDEBUG_T); break; - case DF_WOPT_FOFFS: /* --output-offset */ /* a sign means relative adjustment */ if (config->argument[0] != '-' && config->argument[0] != '+') @@ -1057,6 +1058,14 @@ df->output_adjust_set = 0; df->output_adjust = strtoll(config->argument, NULL, 0); break; + case DF_WOPT_ALLFRAMES: /* --all-frames */ + df->nframes_out = -1; + break; + case DF_WOPT_NFRAMES: /* --num-frames */ + df->nframes_out = strtoll(config->argument, NULL, 0); + if (df->nframes_out < 0) + df->nframes_out = 0; + break; @@ -1241,9 +1250,9 @@ } if (df->rateout == 2) putchar('\n'); - if (df->nframes > 0) + if (df->nframes_in > 0) printf("R:[%llu of %llu] W:[%llu] %.*f %cHz \r", nr + df->offset, - df->nframes, nw + df->offset, + df->nframes_in, nw + df->offset, (drate >= 100) ? 1 : (drate >= 10) ? 2 : 3, drate, si); else printf("R:[%llu] W:[%llu] %.*f %cHz \r", nr + df->offset, nw + df->offset, @@ -2161,7 +2170,7 @@ /* loop through raws, writing ones that have full buffer heads */ while (!last_pass) { wait = 1; - if (finalise || df->input_state != DF_ST_RUN) + if (finalise || df->input_state != DF_ST_RUN || df->nraw_active == 0) last_pass = 1; for (i = 0; i < df->nraw; ++i) { @@ -2182,6 +2191,10 @@ nf = (r->in == out) ? df->buflen - 1 : ((r->in + r->buflen - out) % r->buflen) / r->framesize - 1; + /* deal with nframes_out */ + if (r->nframes_out >= 0 && nf > r->nframes_out) + nf = r->nframes_out; + if (nf == 0 || (!last_pass && nf <= df->bufhead)) { pthread_mutex_unlock(&r->mx); continue; @@ -2241,6 +2254,14 @@ } else r->ahead += nf; + /* update nframes_out */ + if (r->nframes_out > 0) { + r->nframes_out -= nf; + + if (r->nframes_out == 0) + df->nraw_active--; + } + if (nwrote > 0) { last_pass = 0; wait = 0; @@ -2314,7 +2335,11 @@ DF_OutputFini(0); /* done */ - DF_OUTSTATE_MX(DONE); + if (df->nframes_out >= 0 && df->nraw_active == 0) + /* Force input to abort. This is inelegant but seems to work. */ + DF_OUTSTATE_MX(ERROR); + else + DF_OUTSTATE_MX(DONE); return NULL; } @@ -2543,6 +2568,13 @@ NULL, "ignore all previous options which modifiy the ouput field list (-F, +F)" }, + { DF_WOPT_NFRAMES, DF_OPT_ARG_RQ, 'n', "num-frames", "NumFrames", + "NUM", "write at most NUM frames to the output dirfile" + }, + { DF_WOPT_ALLFRAMES, DF_OPT_PLUS | DF_OPT_NO_ARG, 'n', "all-frames", + "AllFrames", NULL, + "write all available frames to the output dirfile (default)" + }, { DF_WOPT_OUTPUT, DF_OPT_EXPAND | DF_OPT_ARG_RQ, 'o', "output", "Output", "PATH", "write data to a dirfile called PATH" }, Modified: trunk/defile/bin/net.c =================================================================== --- trunk/defile/bin/net.c 2014-09-30 02:40:40 UTC (rev 923) +++ trunk/defile/bin/net.c 2014-10-01 00:04:49 UTC (rev 924) @@ -211,7 +211,7 @@ static void df_rpc_get_cdouble(double v[2], int sock) { uint64_t u[2]; - if (df_rpc_get_mem(sock, sizeof(v), u, NULL)) + if (df_rpc_get_mem(sock, 2 * sizeof(u[0]), u, NULL)) return; u[0] = df_ntohll(u[0]); @@ -317,7 +317,7 @@ if (ioerr == DFIO_NO_DATA) return 0; \ if (ioerr) return 1; \ pos++; \ - remaining -= sizeof(2 * sizeof(double)); \ + remaining -= 2 * sizeof(double); \ } while(0) #define DF_GET_STRING(n) DF_GET_SDATUM(string[n]) @@ -521,7 +521,7 @@ } if (pos > 3) { lastpos = E.u.lincom.n_fields * 7 + 3; - for (i = 0; i < E.u.lincom.n_fields; ++i) + for (i = 0; i < E.u.lincom.n_fields; ++i) switch ((pos - 4) % 7) { case 0: DF_GET_SDATUM(E.in_fields[i]); @@ -1430,13 +1430,27 @@ } } client_ioerr: - if (ioerr == DFIO_HANG_UP) { - df_dprintf(DF_PRN_NOTE, "connection to server closed.\n"); - break; - } else if (ioerr) - goto client_drop; + switch (ioerr) { + case DFIO_HANG_UP: + df_dprintf(DF_PRN_NOTE, "connection to server closed.\n"); + goto client_hup; + case DFIO_READ_ERR: + df_dprintf(DF_PRN_ERR, "read error from server\n"); + goto client_drop; + case DFIO_NO_DATA: + df_dprintf(DF_PRN_ERR, "missing data from server\n"); + goto client_drop; + case DFIO_PROTO_ERR: + df_dprintf(DF_PRN_ERR, "protocol error from server\n"); + goto client_drop; + case DFIO_CALL_ERR: + df_dprintf(DF_PRN_ERR, "bad request from server\n"); + goto client_drop; + } } + /* normal clean up */ +client_hup: close(sock); free(iobuf); DF_INSTATE_MX(DONE); Modified: trunk/defile/doc/defile.1.in =================================================================== --- trunk/defile/doc/defile.1.in 2014-09-30 02:40:40 UTC (rev 923) +++ trunk/defile/doc/defile.1.in 2014-10-01 00:04:49 UTC (rev 924) @@ -296,7 +296,8 @@ .BR NoCurFile ) .SS Frame Selection Options -The following options affect the starting frame number for input and output. +The following options affect the starting frame number for input and output as +well as the maximum number of frames output. .TP .BR \-s ", " \-\-skip=\fINUM Skip the first @@ -367,6 +368,32 @@ this option is ignored. (Directive: .BR OutputAdjust ) +.TP +.BR \-n ", " \-\-num\-frames=\fINUM +Write at most +.I NUM +frames to the output dirfile. After writing that many frames, defile will exit, +regardless of +.I Follow Mode\fR, +even if more data are available from the input. Fewer frames may be written if +the input ends before +.I NUM +frames have been produced. In +.I Append Mode\fR, +the number of frames already in the output dirfile is not considered: that is, +defile will attempt to add +.I NUM +additional frames to the dirfile. Ignored in +.I Server Mode\fR. +(Directive: +.BR NumFrames ) + +.TP +.BR +n ", " \-\-all\-frames +Write all available data to the output dirfile. This is the default behaviour. +(Directive: +.BR AllFrames ) + .SS Running Mode Options The following options affect the modes in which defile runs. .TP Modified: trunk/defile/lib/internal.h =================================================================== --- trunk/defile/lib/internal.h 2014-09-30 02:40:40 UTC (rev 923) +++ trunk/defile/lib/internal.h 2014-10-01 00:04:49 UTC (rev 924) @@ -208,6 +208,7 @@ unsigned long in, out; /* read/write pointers */ size_t framesize; /* GD_SIZE(type) * spf */ unsigned long buflen; /* r->framesize * df->buflen */ + long long nframes_out; /* number of frames left to write */ gd_type_t type; /* data type */ unsigned int spf; /* samples-per-frame */ unsigned long ahead; /* difference between the number of frames written from @@ -289,7 +290,7 @@ double rate, tc; long long wpartial, rpartial; long long nwrote, nread; - long long nframes; + long long nframes_in; double srv_rate; /* in megabits per second */ /* operations */ @@ -297,6 +298,7 @@ long long offset; long long input_offset; long long output_adjust; + long long nframes_out; int output_adjust_set; unsigned long buflen; unsigned int mode_flags; @@ -307,7 +309,7 @@ int n_metafiles; /* output buffering */ - int nraw; + int nraw, nraw_active; struct df_raw *raw; unsigned long srv_base; Modified: trunk/defile/lib/libdefile.c =================================================================== --- trunk/defile/lib/libdefile.c 2014-09-30 02:40:40 UTC (rev 923) +++ trunk/defile/lib/libdefile.c 2014-10-01 00:04:49 UTC (rev 924) @@ -754,6 +754,9 @@ df->raw[r].spf = f->spf * count; df->raw[r].in = 0; df->raw[r].b = NULL; + df->raw[r].nframes_out = df->nframes_out; + if (df->nframes_out) + df->nraw_active++; pthread_mutex_init(&df->raw[r].mx, NULL); } else { /* increase the samples per frame of this raw */ @@ -1070,9 +1073,9 @@ if (!(df->mode_flags & DF_MODE_FOLLOW)) { pthread_mutex_lock(&df_config_mx); if (add) - df->nframes += length; + df->nframes_in += length; else - df->nframes = length; + df->nframes_in = length; pthread_mutex_unlock(&df_config_mx); } @@ -1095,7 +1098,7 @@ pthread_mutex_lock(&df_config_mx); if (rate >= 0) df->rate = rate; - df->nframes = length; + df->nframes_in = length; pthread_mutex_unlock(&df_config_mx); /* wait for the output thread to create the dirfile */ @@ -1506,7 +1509,7 @@ df->nwrote = 0; df->wpartial = 0; df->nread = 0; - df->nframes = (uint64_t)length; + df->nframes_in = (uint64_t)length; df->wframesize = df->rframesize = df->sframesize = 0; pthread_mutex_unlock(&df_rate_mx); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ket...@us...> - 2014-09-30 02:40:50
|
Revision: 923 http://sourceforge.net/p/getdata/code/923 Author: ketiltrout Date: 2014-09-30 02:40:40 +0000 (Tue, 30 Sep 2014) Log Message: ----------- Fix tests Modified Paths: -------------- trunk/defile/configure.ac trunk/defile/test/make.h Modified: trunk/defile/configure.ac =================================================================== --- trunk/defile/configure.ac 2014-09-30 02:32:45 UTC (rev 922) +++ trunk/defile/configure.ac 2014-09-30 02:40:40 UTC (rev 923) @@ -49,7 +49,7 @@ AC_ARG_ENABLE(test, AS_HELP_STRING([--enable-test], [build the defile test programs]), [ - case "${enable_val}" in + case "${enableval}" in yes) enable_test="yes" ;; *) enable_test="no" ;; esac Modified: trunk/defile/test/make.h =================================================================== --- trunk/defile/test/make.h 2014-09-30 02:32:45 UTC (rev 922) +++ trunk/defile/test/make.h 2014-09-30 02:40:40 UTC (rev 923) @@ -21,6 +21,7 @@ #ifndef DEFILE_MAKE_H #define DEFILE_MAKE_H +#define GD_C89_API #include <getdata.h> struct dfm_field_data { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ket...@us...> - 2014-09-30 02:32:55
|
Revision: 922 http://sourceforge.net/p/getdata/code/922 Author: ketiltrout Date: 2014-09-30 02:32:45 +0000 (Tue, 30 Sep 2014) Log Message: ----------- Output frameoffset. Modified Paths: -------------- trunk/defile/bin/defile.c trunk/defile/doc/defile.1.in trunk/defile/lib/internal.h trunk/defile/lib/libdefile.c Modified: trunk/defile/bin/defile.c =================================================================== --- trunk/defile/bin/defile.c 2014-07-30 20:00:59 UTC (rev 921) +++ trunk/defile/bin/defile.c 2014-09-30 02:32:45 UTC (rev 922) @@ -943,7 +943,7 @@ DF_WOPT_VERBOSE, DF_WOPT_REMOTE, DF_WOPT_LOCAL, DF_WOPT_RSH, DF_WOPT_LISTEN, DF_WOPT_NOLISTEN, DF_WOPT_RCMD, DF_WOPT_RDEBUG, DF_WOPT_NORDEBUG, DF_WOPT_SRVRATE, DF_WOPT_DAEMON, DF_WOPT_CURFILE, DF_WOPT_SYMLINK, - DF_WOPT_NOSYMLINK, DF_WOPT_NOCURFILE, DF_WOPT_CLOBBERONE + DF_WOPT_NOSYMLINK, DF_WOPT_NOCURFILE, DF_WOPT_CLOBBERONE, DF_WOPT_FOFFS }; static int DF_OutputOpt(struct df_defile *df, struct df_rc_config *config, @@ -1049,10 +1049,19 @@ ~(DF_MODE_RDEBUG_I | DF_MODE_RDEBUG_O | DF_MODE_RDEBUG_T); break; + case DF_WOPT_FOFFS: /* --output-offset */ + /* a sign means relative adjustment */ + if (config->argument[0] != '-' && config->argument[0] != '+') + df->output_adjust_set = 1; + else + df->output_adjust_set = 0; + df->output_adjust = strtoll(config->argument, NULL, 0); + break; + SETMODE(APPEND, DF_MODE_APPEND); CLRMODE(NOAPPEND, DF_MODE_APPEND); @@ -2537,6 +2546,10 @@ { DF_WOPT_OUTPUT, DF_OPT_EXPAND | DF_OPT_ARG_RQ, 'o', "output", "Output", "PATH", "write data to a dirfile called PATH" }, + { DF_WOPT_FOFFS, DF_OPT_ARG_RQ, 'O', "offset-adjust", "OffsetAdjust", + "ADJUST", "adjust the frame offset of the output dirfile by ADJUST " + "(default: +0)" + }, { DF_WOPT_QUIET, DF_OPT_NO_ARG, 'q', "quiet", "Quiet", NULL, "be less verbose" }, Modified: trunk/defile/doc/defile.1.in =================================================================== --- trunk/defile/doc/defile.1.in 2014-07-30 20:00:59 UTC (rev 921) +++ trunk/defile/doc/defile.1.in 2014-09-30 02:32:45 UTC (rev 922) @@ -295,6 +295,78 @@ Don't create a curfile. This is the default behaviour. (Directive: .BR NoCurFile ) +.SS Frame Selection Options +The following options affect the starting frame number for input and output. +.TP +.BR \-s ", " \-\-skip=\fINUM +Skip the first +.I NUM +frames of the input; equivalently: request the input start with the frame +numbered +.IR NUM . +Even when this option is specified, defile may start on a later frame, if the +first frame available in the input is greater than +.IR NUM . +Only the last +.B \-\-skip +specified is honoured. The default skip is zero (i.e. start with the first +frame). + +Using +.B \-\-append +(q.v.) to append to a pre-existing output dirfile has the effect of specifying +an implicit +.B \-\-skip +with +.I NUM +equal to the number of frames currently in the output dirfile. A +.B \-\-skip +which specifies a smaller number is ignored, but this option can be used to +advance the starting frame number further (leaving a hole in the outpu +dirfile). (Directive: +.BR Skip ) + +.TP +.BR \-O ", " \-\-offset-adjust=\fIADJUST +When not in +.I Append Mode\fR, +defile will, by default, set the frame offset of the output dirfile to the +frame number of the first converted frame (which may have been adjusted with the +.B \-\-skip +option). This option permits modification of the output dirfile's frame offset. +If the +.I ADJUST +parameter is starts with a plus (+) or minus (\-) sign, the value is taken as a +relative adjustment to this default frame offset. If the relative offset would +result in a negative frame offset, the output frame offset is set to zero. If +.I ADJUST +is a number with neither sign, the frame offset is set to that value. So: +.RS +.IP +.nh +.ad l +\-\-offset\-adjust=100 +.hy +.ad n +.RE +.IP +sets the output dirfile's frame offset to 100, regardless of the actual starting +frame, while: +.RS +.IP +.nh +.ad l +\-\-offset\-adjust=+100 +.hy +.ad n +.RE +.IP +adds 100 to the default frame offset. The default is, effectively, "+0" (i.e., +no adjustment). In +.I Append Mode\fR, +this option is ignored. (Directive: +.BR OutputAdjust ) + .SS Running Mode Options The following options affect the modes in which defile runs. .TP Modified: trunk/defile/lib/internal.h =================================================================== --- trunk/defile/lib/internal.h 2014-07-30 20:00:59 UTC (rev 921) +++ trunk/defile/lib/internal.h 2014-09-30 02:32:45 UTC (rev 922) @@ -296,6 +296,8 @@ struct df_config config; long long offset; long long input_offset; + long long output_adjust; + int output_adjust_set; unsigned long buflen; unsigned int mode_flags; Modified: trunk/defile/lib/libdefile.c =================================================================== --- trunk/defile/lib/libdefile.c 2014-07-30 20:00:59 UTC (rev 921) +++ trunk/defile/lib/libdefile.c 2014-09-30 02:32:45 UTC (rev 922) @@ -1228,11 +1228,21 @@ pthread_mutex_lock(&df_config_mx); offset = (df->input_offset > df->offset) ? df->input_offset : df->offset; pthread_mutex_unlock(&df_config_mx); + + /* output frameoffset */ + if (!append) { + long long output_offset = offset; + if (df->output_adjust_set) + output_offset = df->output_adjust; + else if (output_offset < -df->output_adjust) /* underflow */ + output_offset = 0; + else + output_offset += df->output_adjust; + if (output_offset) + gd_alter_frameoffset64(df->D, output_offset, GD_ALL_FRAGMENTS, 0); + } + if (offset > 0) { - /* frameoffset */ - if (!append) - gd_alter_frameoffset(df->D, offset, GD_ALL_FRAGMENTS, 0); - /* seek to the start frame */ for (i = 0; i < df->nraw; ++i) if (gd_seek64(df->D, df->raw[i].name, offset, 0, This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |