[Getdata-commits] SF.net SVN: getdata:[928] trunk/getdata
Scientific Database Format
Brought to you by:
ketiltrout
|
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] |