getdata-commits Mailing List for GetData (Page 8)
Scientific Database Format
Brought to you by:
ketiltrout
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...> - 2012-08-15 08:01:17
|
Revision: 760 http://getdata.svn.sourceforge.net/getdata/?rev=760&view=rev Author: ketiltrout Date: 2012-08-15 08:01:07 +0000 (Wed, 15 Aug 2012) Log Message: ----------- Fix directory separator detection in Windows. Modified Paths: -------------- trunk/getdata/ChangeLog trunk/getdata/src/common.c trunk/getdata/src/internal.h Modified: trunk/getdata/ChangeLog =================================================================== --- trunk/getdata/ChangeLog 2012-08-15 01:29:50 UTC (rev 759) +++ trunk/getdata/ChangeLog 2012-08-15 08:01:07 UTC (rev 760) @@ -1,3 +1,7 @@ +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: Modified: trunk/getdata/src/common.c =================================================================== --- trunk/getdata/src/common.c 2012-08-15 01:29:50 UTC (rev 759) +++ trunk/getdata/src/common.c 2012-08-15 08:01:07 UTC (rev 760) @@ -1067,7 +1067,7 @@ /* now step through work, building up res as appropriate */ for (end = cur ; !last_element; cur = end) { /* look for the next GD_DIRSEP or NUL */ - for (; *end != '\0' && *end != GD_DIRSEP; ++end) + for (; *end != '\0' && !_GD_IsDirSep(*end); ++end) ; /* end of string */ @@ -1088,8 +1088,8 @@ /* don't strip the leading GD_DIRSEP */ if (res_len > res_root) { /* find the last GD_DIRSEP, but don't strip the leading GD_DIRSEP */ - for(ptr = res + res_len - 1; *ptr != GD_DIRSEP && ptr > res + res_root; - --ptr) + for(ptr = res + res_len - 1; + !_GD_IsDirSep(*ptr) && ptr > res + res_root; --ptr) ; /* strip the .. if possible, otherwise append it */ @@ -1109,7 +1109,7 @@ } res = ptr; } - if (res_len > 1 && res[res_len - 1] != GD_DIRSEP) + if (res_len > 1 && !_GD_IsDirSep(res[res_len - 1])) res[res_len++] = GD_DIRSEP; strcpy(res + res_len, cur); res_len += len - 1; @@ -1181,7 +1181,7 @@ } else if (res_len > res_root) { /* strip the symlink name from res */ char *rptr; - for (rptr = res + res_len - 1; *rptr != GD_DIRSEP; --rptr) + for (rptr = res + res_len - 1; !_GD_IsDirSep(*rptr); --rptr) ; *(rptr + 1) = '\0'; res_len = (rptr - res) + 1; @@ -1201,7 +1201,7 @@ char *new_work, slash[2] = { GD_DIRSEP, 0 }; len = strlen(end) + slen + 2; - if (*(ptr + slen - 1) == GD_DIRSEP) { + if (_GD_IsDirSep(*(ptr + slen - 1))) { slash[0] = '\0'; len--; } Modified: trunk/getdata/src/internal.h =================================================================== --- trunk/getdata/src/internal.h 2012-08-15 01:29:50 UTC (rev 759) +++ trunk/getdata/src/internal.h 2012-08-15 08:01:07 UTC (rev 760) @@ -619,6 +619,7 @@ #endif /* path malarkey */ +#define _GD_IsDirSep(c) (((c) == GD_DIRSEP) || ((c) == '/')) #if defined _WIN32 || defined _WIN64 # define _GD_AbsPath(s) (s && ((s)[0] == '/' || (s)[0] == GD_DIRSEP || \ ((s)[0] != '\0' && (s)[1] == ':'))) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ket...@us...> - 2012-08-15 01:29:57
|
Revision: 759 http://getdata.svn.sourceforge.net/getdata/?rev=759&view=rev Author: ketiltrout Date: 2012-08-15 01:29:50 +0000 (Wed, 15 Aug 2012) Log Message: ----------- GetData-0.8.1rc1: Remove improper restrict keywords. Modified Paths: -------------- trunk/getdata/ChangeLog trunk/getdata/NEWS trunk/getdata/m4/version.m4 trunk/getdata/src/internal.h trunk/getdata/src/parse.c Modified: trunk/getdata/ChangeLog =================================================================== --- trunk/getdata/ChangeLog 2012-08-14 22:27:24 UTC (rev 758) +++ trunk/getdata/ChangeLog 2012-08-15 01:29:50 UTC (rev 759) @@ -1,4 +1,10 @@ -2012-08-04 D. V. Wiebe <ge...@ke...> svn:757 +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. Modified: trunk/getdata/NEWS =================================================================== --- trunk/getdata/NEWS 2012-08-14 22:27:24 UTC (rev 758) +++ trunk/getdata/NEWS 2012-08-15 01:29:50 UTC (rev 759) @@ -1,4 +1,4 @@ -New in version 0.8.1: +New in version 0.8.1rc1: Library Changes: @@ -16,6 +16,10 @@ * 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. + * WIN32 BUG FIX: On Windows, the parser can now properly handle hexadecimal floating point. Modified: trunk/getdata/m4/version.m4 =================================================================== --- trunk/getdata/m4/version.m4 2012-08-14 22:27:24 UTC (rev 758) +++ trunk/getdata/m4/version.m4 2012-08-15 01:29:50 UTC (rev 759) @@ -20,23 +20,23 @@ m4_define(getdata_major, 0) m4_define(getdata_minor, 8) -m4_define(getdata_revision, 0) -m4_define(getdata_extra, []) +m4_define(getdata_revision, 1) +m4_define(getdata_extra, [rc1]) m4_define(getdata_version, getdata_major.getdata_minor.getdata_revision[]getdata_extra) dnl libgetdata current interface version -m4_define(getdata_iface_version, 5) +m4_define(getdata_iface_version, 6) dnl libgetdata current interface implementation revision m4_define(getdata_impl_revision, 0) dnl libgetdata interface age (current interface - oldest supported interface) -m4_define(getdata_iface_age, 0) +m4_define(getdata_iface_age, 1) dnl libgetdata++ interface version info -m4_define(getdataxx_version, 3:0:0) +m4_define(getdataxx_version, 4:0:1) dnl libfgetdata interface version info -m4_define(fgetdata_version, 3:0:1) +m4_define(fgetdata_version, 4:0:2) dnl libf95getdata interface version info -m4_define(f95getdata_version, 3:0:1) +m4_define(f95getdata_version, 4:0:2) Modified: trunk/getdata/src/internal.h =================================================================== --- trunk/getdata/src/internal.h 2012-08-14 22:27:24 UTC (rev 758) +++ trunk/getdata/src/internal.h 2012-08-15 01:29:50 UTC (rev 759) @@ -1114,8 +1114,8 @@ gd_entry_t *_GD_ParseFieldSpec(DIRFILE *restrict, int, char**, const gd_entry_t *restrict, const char *restrict, int, int, int, int, unsigned long, int, char**, const char*); -char *_GD_ParseFragment(FILE *restrict, DIRFILE *restrict, int, int *restrict, - unsigned long int *restrict, int); +char *_GD_ParseFragment(FILE *restrict, DIRFILE *, int, int *restrict, + unsigned long int *, int); void _GD_ReadLinterpFile(DIRFILE *restrict, gd_entry_t *restrict); void *_GD_Realloc(DIRFILE *restrict, void *restrict, size_t size); void _GD_ReleaseDir(DIRFILE *D, int dirfd); Modified: trunk/getdata/src/parse.c =================================================================== --- trunk/getdata/src/parse.c 2012-08-14 22:27:24 UTC (rev 758) +++ trunk/getdata/src/parse.c 2012-08-15 01:29:50 UTC (rev 759) @@ -1978,9 +1978,9 @@ /* _GD_ParseDirective: Actually parse a single format file line. * Returns 1 if a match was made. */ -static int _GD_ParseDirective(DIRFILE *restrict D, char **in_cols, int n_cols, +static int _GD_ParseDirective(DIRFILE *D, char **in_cols, int n_cols, int me, int *restrict standards, int linenum, char **restrict ref_name, - unsigned long *restrict flags, char **outstring, const char *tok_pos) + unsigned long *flags, char **outstring, const char *tok_pos) { const char* ptr; char *munged_code; @@ -2257,8 +2257,8 @@ * * Returns NULL unless this fragment contains a REFERENCE directive. */ -char *_GD_ParseFragment(FILE *restrict fp, DIRFILE *restrict D, int me, - int *restrict standards, unsigned long *restrict flags, int resolve) +char *_GD_ParseFragment(FILE *restrict fp, DIRFILE *D, int me, + int *restrict standards, unsigned long *flags, int resolve) { char *instring = NULL; char *outstring = NULL; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ket...@us...> - 2012-08-14 22:27:30
|
Revision: 758 http://getdata.svn.sourceforge.net/getdata/?rev=758&view=rev Author: ketiltrout Date: 2012-08-14 22:27:24 +0000 (Tue, 14 Aug 2012) Log Message: ----------- type conversions. Modified Paths: -------------- trunk/defile/input/ascii.c trunk/defile/lib/defile.h trunk/defile/lib/internal.h trunk/defile/lib/libdefile.c Modified: trunk/defile/input/ascii.c =================================================================== --- trunk/defile/input/ascii.c 2012-08-14 20:26:01 UTC (rev 757) +++ trunk/defile/input/ascii.c 2012-08-14 22:27:24 UTC (rev 758) @@ -417,7 +417,7 @@ *ptr = ptr2 + (*ptr - *tok); *tok = ptr2; } - *((*ptr)++) = c; + *((*ptr)++) = (char)c; return 0; } @@ -1342,10 +1342,10 @@ int16_t i16 = (int16_t)l; memcpy(d, &i16, 2); } else if (type == GD_INT32) { - int16_t i32 = (int32_t)l; + int32_t i32 = (int32_t)l; memcpy(d, &i32, 4); } else if (type == GD_INT64) { - int16_t i64 = (int64_t)l; + int64_t i64 = (int64_t)l; memcpy(d, &i64, 8); } } else { @@ -1357,10 +1357,10 @@ uint16_t u16 = (uint16_t)u; memcpy(d, &u16, 2); } else if (type == GD_INT32) { - uint16_t u32 = (uint32_t)u; + uint32_t u32 = (uint32_t)u; memcpy(d, &u32, 4); } else if (type == GD_INT64) { - uint16_t u64 = (uint64_t)u; + uint64_t u64 = (uint64_t)u; memcpy(d, &u64, 8); } } Modified: trunk/defile/lib/defile.h =================================================================== --- trunk/defile/lib/defile.h 2012-08-14 20:26:01 UTC (rev 757) +++ trunk/defile/lib/defile.h 2012-08-14 22:27:24 UTC (rev 758) @@ -22,6 +22,9 @@ #ifndef DEFILE_H #define DEFILE_H +#ifndef GD_64BIT_API +#define GD_64BIT_API +#endif #include <getdata.h> /* command line options */ Modified: trunk/defile/lib/internal.h =================================================================== --- trunk/defile/lib/internal.h 2012-08-14 20:26:01 UTC (rev 757) +++ trunk/defile/lib/internal.h 2012-08-14 22:27:24 UTC (rev 758) @@ -111,14 +111,14 @@ /* internal framedef */ struct df_infdef_field { int index; - off_t offset; + long long offset; unsigned int spf; size_t cadence; size_t framesize; }; struct df_infdef { - off_t framesize; + long long framesize; int n_fields; struct df_infdef_field *field; }; @@ -150,7 +150,7 @@ /* rate tracking */ double rate, tc; - off_t wpartial, rpartial; + long long wpartial, rpartial; long long nwrote, nread; long long nframes; @@ -168,7 +168,7 @@ int nfd; struct df_infdef *fd; - off_t rframesize, wframesize; + long long rframesize, wframesize; int ref_ind; Modified: trunk/defile/lib/libdefile.c =================================================================== --- trunk/defile/lib/libdefile.c 2012-08-14 20:26:01 UTC (rev 757) +++ trunk/defile/lib/libdefile.c 2012-08-14 22:27:24 UTC (rev 758) @@ -555,7 +555,7 @@ if (fd->field[i].offset + (fd->field[i].spf - 1) * c + z > fd->framesize) { fprintf(stderr, "libdefile: input error: frame definition error: " - "data extends beyond end of frame (%zu > %zu)\n", + "data extends beyond end of frame (%llu > %llu)\n", fd->field[i].offset + (fd->field[i].spf - 1) * c + z, fd->framesize); return DF_INPUT; } @@ -770,7 +770,7 @@ pthread_mutex_unlock(&config_mx); if (offset > 0) for (i = 0; i < df->nraw; ++i) - if (gd_seek(df->D, df->raw[i].name, offset, 0, + if (gd_seek64(df->D, df->raw[i].name, offset, 0, GD_SEEK_SET | GD_SEEK_WRITE) < 0) { return DF_OUTPUT; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ket...@us...> - 2012-08-14 20:26:08
|
Revision: 757 http://getdata.svn.sourceforge.net/getdata/?rev=757&view=rev Author: ketiltrout Date: 2012-08-14 20:26:01 +0000 (Tue, 14 Aug 2012) Log Message: ----------- Return the correct fragment index from _GD_Include. Modified Paths: -------------- trunk/getdata/ChangeLog trunk/getdata/NEWS trunk/getdata/src/include.c trunk/getdata/test/Makefile.am Added Paths: ----------- trunk/getdata/test/include_sub.c Property Changed: ---------------- trunk/getdata/test/ Modified: trunk/getdata/ChangeLog =================================================================== --- trunk/getdata/ChangeLog 2012-08-13 23:22:42 UTC (rev 756) +++ trunk/getdata/ChangeLog 2012-08-14 20:26:01 UTC (rev 757) @@ -1,3 +1,8 @@ +2012-08-04 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. Modified: trunk/getdata/NEWS =================================================================== --- trunk/getdata/NEWS 2012-08-13 23:22:42 UTC (rev 756) +++ trunk/getdata/NEWS 2012-08-14 20:26:01 UTC (rev 757) @@ -38,6 +38,9 @@ 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. + Bindings Changes: * F77 BUG FIX: A memory leak has been fixed in GDALLC. Modified: trunk/getdata/src/include.c =================================================================== --- trunk/getdata/src/include.c 2012-08-13 23:22:42 UTC (rev 756) +++ trunk/getdata/src/include.c 2012-08-14 20:26:01 UTC (rev 757) @@ -83,10 +83,11 @@ /* Include a format file fragment -- returns the mew fragment index, or * -1 on error */ int _GD_Include(DIRFILE *D, const char *ename, const char *format_file, - int linenum, char **ref_name, int me, const char *prefix_in, + int linenum, char **ref_name, int parent, const char *prefix_in, const char *suffix_in, int *standards, unsigned long *flags, int resolve) { int i; + int me = D->n_fragment; int old_standards = *standards; int old_pedantic = *flags & GD_PEDANTIC; int dirfd = -1; @@ -98,7 +99,7 @@ struct stat statbuf; dtrace("%p, \"%s\", \"%s\", %p, %i, %i, \"%s\", \"%s\", %p, %p, %i", D, ename, - format_file, ref_name, linenum, me, prefix_in, suffix_in, standards, + format_file, ref_name, linenum, parent, prefix_in, suffix_in, standards, flags, resolve); if (++D->recurse_level >= GD_MAX_RECURSE_LEVEL) { @@ -107,7 +108,7 @@ goto include_error; } - if (_GD_SetFieldAffixes(D, me, prefix_in, suffix_in, old_standards, + if (_GD_SetFieldAffixes(D, parent, prefix_in, suffix_in, old_standards, old_pedantic, format_file, linenum, &prefix, &suffix)) { goto include_error; @@ -132,7 +133,7 @@ goto include_error; /* Open the containing directory */ - dirfd = _GD_GrabDir(D, D->fragment[me].dirfd, ename); + dirfd = _GD_GrabDir(D, D->fragment[parent].dirfd, ename); if (dirfd == -1 && D->error == GD_E_OK) _GD_SetError(D, GD_E_OPEN_FRAGMENT, errno, format_file, linenum, ename); if (D->error) @@ -202,48 +203,47 @@ } D->fragment = (struct gd_fragment_t *)ptr; - D->fragment[D->n_fragment - 1].bname = base; - D->fragment[D->n_fragment - 1].cname = temp_buf1; - D->fragment[D->n_fragment - 1].ename = _GD_Strdup(D, ename); - D->fragment[D->n_fragment - 1].enc_data = NULL; - D->fragment[D->n_fragment - 1].modified = 0; - D->fragment[D->n_fragment - 1].parent = me; - D->fragment[D->n_fragment - 1].dirfd = dirfd; - D->fragment[D->n_fragment - 1].encoding = *flags & GD_ENCODING; - D->fragment[D->n_fragment - 1].byte_sex = + D->fragment[me].bname = base; + D->fragment[me].cname = temp_buf1; + D->fragment[me].ename = _GD_Strdup(D, ename); + D->fragment[me].enc_data = NULL; + D->fragment[me].modified = 0; + D->fragment[me].parent = parent; + D->fragment[me].dirfd = dirfd; + D->fragment[me].encoding = *flags & GD_ENCODING; + D->fragment[me].byte_sex = #ifdef WORDS_BIGENDIAN (*flags & GD_LITTLE_ENDIAN) ? GD_LITTLE_ENDIAN : GD_BIG_ENDIAN #else (*flags & GD_BIG_ENDIAN) ? GD_BIG_ENDIAN : GD_LITTLE_ENDIAN #endif ; - D->fragment[D->n_fragment - 1].ref_name = NULL; - D->fragment[D->n_fragment - 1].frame_offset = D->fragment[me].frame_offset; - D->fragment[D->n_fragment - 1].protection = GD_PROTECT_NONE; - D->fragment[D->n_fragment - 1].prefix = prefix; - D->fragment[D->n_fragment - 1].suffix = suffix; - D->fragment[D->n_fragment - 1].mtime = mtime; - D->fragment[D->n_fragment - 1].vers = - (*flags & GD_PEDANTIC) ? 1ULL << *standards : 0; + D->fragment[me].ref_name = NULL; + D->fragment[me].frame_offset = D->fragment[parent].frame_offset; + D->fragment[me].protection = GD_PROTECT_NONE; + D->fragment[me].prefix = prefix; + D->fragment[me].suffix = suffix; + D->fragment[me].mtime = mtime; + D->fragment[me].vers = (*flags & GD_PEDANTIC) ? 1ULL << *standards : 0; /* compute the (relative) subdirectory name */ if (sname[0] == '.' && sname[1] == '\0') { /* dirname is the same as the parent fragment's */ - D->fragment[D->n_fragment - 1].sname = (D->fragment[me].sname) ? - _GD_Strdup(D, D->fragment[me].sname) : NULL; + D->fragment[me].sname = (D->fragment[parent].sname) ? + _GD_Strdup(D, D->fragment[parent].sname) : NULL; free(sname); - } else if (D->fragment[me].sname && _GD_AbsPath(sname)) { + } else if (D->fragment[parent].sname && _GD_AbsPath(sname)) { /* have both a relative dirname and the parent's sname; squish them * together */ - D->fragment[D->n_fragment - 1].sname = (char*)_GD_Malloc(D, strlen(sname) + - strlen(D->fragment[me].sname) + 2); - if (D->fragment[D->n_fragment - 1].sname) - sprintf(D->fragment[D->n_fragment - 1].sname, "%s%c%s", - D->fragment[me].sname, GD_DIRSEP, sname); + D->fragment[me].sname = (char*)_GD_Malloc(D, strlen(sname) + + strlen(D->fragment[parent].sname) + 2); + if (D->fragment[me].sname) + sprintf(D->fragment[me].sname, "%s%c%s", D->fragment[parent].sname, + GD_DIRSEP, sname); free(sname); } else /* just save the sname */ - D->fragment[D->n_fragment - 1].sname = sname; + D->fragment[me].sname = sname; /* catch alloc errors */ if (D->error) { @@ -254,8 +254,7 @@ goto include_error; } - *ref_name = _GD_ParseFragment(new_fp, D, D->n_fragment - 1, standards, flags, - resolve); + *ref_name = _GD_ParseFragment(new_fp, D, me, standards, flags, resolve); fclose(new_fp); @@ -270,8 +269,8 @@ } D->recurse_level--; - dreturn("%i", D->n_fragment - 1); - return D->n_fragment - 1; + dreturn("%i", me); + return me; include_error: free(prefix); Property changes on: trunk/getdata/test ___________________________________________________________________ Modified: svn:ignore - Makefile Makefile.in valgrind.log *.o dirfile *.swp *.exe .deps .libs 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_raw_type add_rdonly add_recip add_resolv add_sbit add_scalar add_scalar_carray add_sort add_spec add_spec_affix add_spec_directive add_spec_invalid add_spec_meta add_spec_resolv add_string add_string_affix add_type add_window add_window_op alias_list alias_list_alias alias_list_missing alias_num alias_num_alias alias_num_missing alias_target alias_target_alias alias_target_missing alter_bit_bitnum alter_bit_numbits alter_carray_len alter_carray_type alter_const alter_cpolynom alter_crecip alter_crecip89 alter_crecip_zero alter_divide alter_entry alter_entry_affix alter_entry_hidden alter_entry_recode alter_entry_scalar2a alter_entry_scalar2n alter_entry_scalar3 alter_entry_scalar4 alter_lincom_23 alter_lincom_32 alter_lincom_affix alter_lincom_input alter_lincom_offset alter_lincom_slope alter_linterp alter_linterp_move alter_mplex alter_mspec alter_mspec_affix alter_multiply alter_phase alter_polynom_coeff alter_polynom_input alter_polynom_ord alter_raw_spf alter_raw_type alter_recip alter_recip_zero alter_scalar_affix alter_spec alter_spec_affix alter_spec_meta alter_window ascii_add ascii_get ascii_get_get ascii_nframes ascii_put bof bof_lincom bof_phase bzip_get bzip_get_get bzip_move_from bzip_nframes bzip_put close close_bad close_discard close_null convert_complex128_complex64 convert_complex128_float64 convert_complex128_int64 convert_complex128_uint64 convert_complex64_complex128 convert_complex64_float64 convert_complex64_int64 convert_complex64_uint64 convert_float32_complex128 convert_float32_complex64 convert_float32_float64 convert_float32_int16 convert_float32_int32 convert_float32_int64 convert_float32_int8 convert_float32_uint16 convert_float32_uint32 convert_float32_uint64 convert_float32_uint8 convert_float64_complex128 convert_float64_complex64 convert_float64_float32 convert_float64_int16 convert_float64_int32 convert_float64_int64 convert_float64_int8 convert_float64_uint16 convert_float64_uint32 convert_float64_uint64 convert_float64_uint8 convert_int16_complex128 convert_int16_complex64 convert_int16_float32 convert_int16_float64 convert_int16_int32 convert_int16_int64 convert_int16_int8 convert_int16_uint16 convert_int16_uint32 convert_int16_uint64 convert_int16_uint8 convert_int32_complex128 convert_int32_complex64 convert_int32_float32 convert_int32_float64 convert_int32_int16 convert_int32_int64 convert_int32_int8 convert_int32_uint16 convert_int32_uint32 convert_int32_uint64 convert_int32_uint8 convert_int64_complex128 convert_int64_complex64 convert_int64_float32 convert_int64_float64 convert_int64_int16 convert_int64_int32 convert_int64_int8 convert_int64_uint16 convert_int64_uint32 convert_int64_uint64 convert_int64_uint8 convert_int8_complex128 convert_int8_complex64 convert_int8_float32 convert_int8_float64 convert_int8_int16 convert_int8_int32 convert_int8_int64 convert_int8_uint16 convert_int8_uint32 convert_int8_uint64 convert_int8_uint8 convert_uint16_complex128 convert_uint16_complex64 convert_uint16_float32 convert_uint16_float64 convert_uint16_int16 convert_uint16_int32 convert_uint16_int64 convert_uint16_int8 convert_uint16_uint32 convert_uint16_uint64 convert_uint16_uint8 convert_uint32_complex128 convert_uint32_complex64 convert_uint32_float32 convert_uint32_float64 convert_uint32_int16 convert_uint32_int32 convert_uint32_int64 convert_uint32_int8 convert_uint32_uint16 convert_uint32_uint64 convert_uint32_uint8 convert_uint64_complex128 convert_uint64_complex64 convert_uint64_float32 convert_uint64_float64 convert_uint64_int16 convert_uint64_int32 convert_uint64_int64 convert_uint64_int8 convert_uint64_uint16 convert_uint64_uint32 convert_uint64_uint8 convert_uint8_complex128 convert_uint8_complex64 convert_uint8_float32 convert_uint8_float64 convert_uint8_int16 convert_uint8_int32 convert_uint8_int64 convert_uint8_int8 convert_uint8_uint16 convert_uint8_uint32 convert_uint8_uint64 creat creat_excl creat_rdonly cvlist cvlist_array cvlist_array_hidden cvlist_array_meta cvlist_array_meta_hidden cvlist_hidden cvlist_invalid cvlist_meta cvlist_meta_hidden cvlist_meta_invalid del del_carray del_carray_deref del_const del_const_deref del_const_force del_data del_derived del_derived_after del_derived_force del_meta del_meta_force desync desync_flush desync_reopen desync_reopen_inv dfes_bit dfes_divide dfes_lincom dfes_linterp dfes_multiply dfes_null dfes_phase dfes_raw dfes_recip dfes_zero elist_alias elist_hidden elist_noalias elist_scalar encode_alter encode_get encode_move endian_alter endian_alter_sie endian_get endian_move entry_bad_code entry_bit entry_bit_scalar entry_divide entry_invalid entry_lincom entry_lincom_scalar entry_linterp entry_mplex entry_mplex_scalar entry_multiply entry_phase entry_phase_scalar entry_polynom entry_polynom_scalar entry_raw entry_raw_scalar entry_raw_scalar_code entry_raw_scalar_type entry_recip entry_scalar_repr entry_type entry_type_alias entry_window entry_window_scalar eof eof_index eof_lincom eof_phase error error_error error_num error_short error_verbose error_verbose_prefix file file_code file_type flist flist_hidden flist_invalid flist_meta flist_meta_hidden flist_meta_invalid flist_type flist_type_hidden flist_type_invalid flist_type_meta flist_type_meta_hidden flist_type_meta_invalid flush flush_all flush_bad_code flush_invalid flush_meta flush_spec foffs_alter foffs_get foffs_move fragment_affix fragment_affix_alter fragment_affix_alter2 fragment_affix_dup fragment_index fragment_index_alias fragment_name fragment_name_oor fragment_num fragment_parent 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_endian16 get_endian32 get_endian64 get_endian8 get_endian_complex128_arm get_endian_complex128_big get_endian_complex128_little get_endian_complex64_arm get_endian_complex64_big get_endian_complex64_little get_endian_float32_arm get_endian_float32_big get_endian_float32_little get_endian_float64_arm get_endian_float64_big get_endian_float64_little get_ff get_float32 get_float64 get_foffs get_fs get_here get_here_foffs get_heres get_int16 get_int32 get_int64 get_int8 get_invalid get_lincom1 get_lincom2 get_lincom3 get_lincom_noin get_lincom_non get_lincom_null get_lincom_spf get_linterp get_linterp_noin get_linterp_notab get_linterp_sort get_mplex 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_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 get_window_ne get_window_set get_zero global_flags global_name global_ref global_ref_empty global_ref_set gzip_add gzip_get gzip_get_get gzip_get_put gzip_move_from gzip_move_to gzip_nframes gzip_put gzip_put_get header_complex hide hide_hidden hide_unhide include include_accmode include_affix include_auto include_cb include_creat include_ignore include_index include_invalid include_nonexistent include_pc include_ref include_syntax index index_domain index_range legacy_get legacy_get_put legacy_get_rofs legacy_nframes legacy_nonexistent legacy_put legacy_spf lzma_get lzma_nframes madd madd_affix madd_alias madd_alias_affix madd_bit madd_bit_invalid madd_carray madd_clincom madd_const madd_cpolynom madd_crecip madd_crecip89 madd_divide madd_index madd_lincom madd_lincom_invalid madd_linterp madd_linterp_invalid madd_mplex madd_multiply madd_multiply_invalid madd_phase madd_phase_invalid madd_polynom madd_recip madd_sbit madd_spec madd_spec_directive madd_spec_invalid madd_spec_resolv madd_string madd_window move move_affix move_affix_dup move_alias move_data_enc_ar move_data_enc_ra move_data_endian move_data_foffs move_data_nop move_index move_meta move_protect move_subdir name name_affix name_affix_bad name_alias name_dup name_move name_move_alias name_updb name_updb_alias name_updb_const name_updb_const_alias nentries_alias nentries_hidden nentries_noalias nentries_scalar nfields nfields_hidden nfields_invalid nfields_type nfields_type_hidden nfields_type_invalid nfields_vector nfields_vector_hidden nfields_vector_invalid nframes nframes64 nframes_empty nframes_invalid nframes_off64 nframes_spf nmeta nmeta_hidden nmeta_invalid nmeta_parent nmeta_type nmeta_type_hidden nmeta_type_invalid nmeta_type_parent nmeta_vectors nmeta_vectors_del nmeta_vectors_hidden nmeta_vectors_invalid nmeta_vectors_parent open open_abs open_cb_abort open_cb_cont open_cb_ignore open_cb_invalid open_cb_rescan open_eaccess open_nonexistent open_notdirfile parse_alias parse_alias_code parse_alias_dup parse_alias_meta parse_alias_missing parse_badline parse_bit parse_bit4 parse_bit_bitnum parse_bit_bitsize parse_bit_ncols parse_bit_numbits parse_bit_scalar parse_carray parse_carray_long parse_const parse_const_complex parse_const_ncols parse_divide 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_hidden_field parse_hidden_meta parse_include parse_include_absolute parse_include_absrel parse_include_dir parse_include_loop parse_include_nonexistent parse_include_prefix parse_include_prefix_dup parse_include_preprefix parse_include_ref parse_include_relabs parse_include_relrel parse_include_slash parse_include_suffix parse_include_sufsuffix parse_index parse_lincom parse_lincom_ncols1 parse_lincom_ncols2 parse_lincom_nfields parse_lincom_nofields parse_lincom_non parse_lincom_non_ncols parse_lincom_scalar parse_linterp parse_linterp_ncols parse_malias parse_malias_dup parse_malias_meta parse_meta parse_meta_affix parse_meta_alias parse_meta_implicit parse_meta_implicit2 parse_meta_implicit_affix parse_meta_index parse_meta_index2 parse_meta_jump parse_meta_malias parse_meta_meta parse_meta_parent parse_meta_raw parse_mplex parse_mplex_ncols parse_mplex_nomax parse_mplex_scalar parse_multiply parse_multiply_ncols parse_name parse_name_dot parse_name_ext parse_name_pedantic parse_ncols parse_phase parse_phase_ncols parse_phase_scalar parse_polynom parse_polynom_ncols1 parse_polynom_ncols2 parse_polynom_scalar parse_protect_all parse_protect_bad parse_protect_data parse_protect_format parse_protect_none parse_quote 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_version_89 parse_version_98 parse_version_include parse_version_p8 parse_version_p9 parse_version_permissive parse_version_slash parse_whitespace parse_window parse_window_ncols parse_window_op parse_window_scalar protect_alter protect_get put64 put_bad_code put_bit put_bof put_carray put_carray_slice put_char put_complex128 put_complex64 put_const put_const_protect put_divide put_endian16 put_endian32 put_endian64 put_endian8 put_endian_complex128_arm put_endian_complex128_big put_endian_complex128_little put_endian_complex64_arm put_endian_complex64_big put_endian_complex64_little put_endian_float32_arm put_endian_float32_big put_endian_float32_little put_endian_float64_arm put_endian_float64_big put_endian_float64_little put_ff put_float32 put_float64 put_foffs put_fs put_here put_heres put_int16 put_int32 put_int64 put_int8 put_invalid put_lincom1 put_lincom2 put_lincom_noin put_linterp put_linterp_noin put_linterp_nomono put_linterp_notab put_linterp_reverse put_mplex put_multiply put_null put_off64 put_phase put_phase_noin put_polynom1 put_polynom2 put_polynom_noin put_protect put_rdonly put_recip put_recurse put_repr put_rofs put_sbit put_sf put_ss put_string put_string_protect put_type put_uint16 put_uint32 put_uint64 put_window put_zero ref ref_none ref_two repr_a repr_float32 repr_float64 repr_i repr_int16 repr_int32 repr_int64 repr_int8 repr_m repr_r repr_real_a repr_real_i repr_real_m repr_real_r repr_uint16 repr_uint32 repr_uint64 repr_uint8 seek64 seek_cur seek_end seek_foffs seek_set sie_get_big sie_get_little sie_move_from sie_move_to sie_nframes_big sie_nframes_little sie_put_big sie_put_little slim_get slim_nframes slim_put spf spf_alias spf_alias_meta spf_alias_missing spf_divide spf_lincom spf_multiply spf_polynom spf_recip spf_recurse svlist svlist_hidden svlist_invalid svlist_meta svlist_meta_hidden svlist_meta_invalid table table_code table_type tell tell64 trunc trunc_dir trunc_rdonly trunc_rofs trunc_truncsub unclude unclude_del unclude_move version_0 version_0_write version_1 version_1_write version_2 version_2_write version_3 version_3_write version_4 version_4_write version_5 version_5_strict version_5_write version_6 version_6_strict version_6_write version_7 version_7_strict version_7_write version_8 version_8_strict version_8_write version_9 version_9_strict version_9_write vlist vlist_alias vlist_hidden vlist_invalid vlist_meta vlist_meta_hidden vlist_meta_invalid xz_get xz_nframes zzip_data zzip_get zzip_get_get zzip_nframes zzslim_get zzslim_nframes + Makefile Makefile.in valgrind.log *.o dirfile *.swp *.exe .deps .libs 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_raw_type add_rdonly add_recip add_resolv add_sbit add_scalar add_scalar_carray add_sort add_spec add_spec_affix add_spec_directive add_spec_invalid add_spec_meta add_spec_resolv add_string add_string_affix add_type add_window add_window_op alias_list alias_list_alias alias_list_missing alias_num alias_num_alias alias_num_missing alias_target alias_target_alias alias_target_missing alter_bit_bitnum alter_bit_numbits alter_carray_len alter_carray_type alter_const alter_cpolynom alter_crecip alter_crecip89 alter_crecip_zero alter_divide alter_entry alter_entry_affix alter_entry_hidden alter_entry_recode alter_entry_scalar2a alter_entry_scalar2n alter_entry_scalar3 alter_entry_scalar4 alter_lincom_23 alter_lincom_32 alter_lincom_affix alter_lincom_input alter_lincom_offset alter_lincom_slope alter_linterp alter_linterp_move alter_mplex alter_mspec alter_mspec_affix alter_multiply alter_phase alter_polynom_coeff alter_polynom_input alter_polynom_ord alter_raw_spf alter_raw_type alter_recip alter_recip_zero alter_scalar_affix alter_spec alter_spec_affix alter_spec_meta alter_window ascii_add ascii_get ascii_get_get ascii_nframes ascii_put bof bof_lincom bof_phase bzip_get bzip_get_get bzip_move_from bzip_nframes bzip_put close close_bad close_discard close_null convert_complex128_complex64 convert_complex128_float64 convert_complex128_int64 convert_complex128_uint64 convert_complex64_complex128 convert_complex64_float64 convert_complex64_int64 convert_complex64_uint64 convert_float32_complex128 convert_float32_complex64 convert_float32_float64 convert_float32_int16 convert_float32_int32 convert_float32_int64 convert_float32_int8 convert_float32_uint16 convert_float32_uint32 convert_float32_uint64 convert_float32_uint8 convert_float64_complex128 convert_float64_complex64 convert_float64_float32 convert_float64_int16 convert_float64_int32 convert_float64_int64 convert_float64_int8 convert_float64_uint16 convert_float64_uint32 convert_float64_uint64 convert_float64_uint8 convert_int16_complex128 convert_int16_complex64 convert_int16_float32 convert_int16_float64 convert_int16_int32 convert_int16_int64 convert_int16_int8 convert_int16_uint16 convert_int16_uint32 convert_int16_uint64 convert_int16_uint8 convert_int32_complex128 convert_int32_complex64 convert_int32_float32 convert_int32_float64 convert_int32_int16 convert_int32_int64 convert_int32_int8 convert_int32_uint16 convert_int32_uint32 convert_int32_uint64 convert_int32_uint8 convert_int64_complex128 convert_int64_complex64 convert_int64_float32 convert_int64_float64 convert_int64_int16 convert_int64_int32 convert_int64_int8 convert_int64_uint16 convert_int64_uint32 convert_int64_uint64 convert_int64_uint8 convert_int8_complex128 convert_int8_complex64 convert_int8_float32 convert_int8_float64 convert_int8_int16 convert_int8_int32 convert_int8_int64 convert_int8_uint16 convert_int8_uint32 convert_int8_uint64 convert_int8_uint8 convert_uint16_complex128 convert_uint16_complex64 convert_uint16_float32 convert_uint16_float64 convert_uint16_int16 convert_uint16_int32 convert_uint16_int64 convert_uint16_int8 convert_uint16_uint32 convert_uint16_uint64 convert_uint16_uint8 convert_uint32_complex128 convert_uint32_complex64 convert_uint32_float32 convert_uint32_float64 convert_uint32_int16 convert_uint32_int32 convert_uint32_int64 convert_uint32_int8 convert_uint32_uint16 convert_uint32_uint64 convert_uint32_uint8 convert_uint64_complex128 convert_uint64_complex64 convert_uint64_float32 convert_uint64_float64 convert_uint64_int16 convert_uint64_int32 convert_uint64_int64 convert_uint64_int8 convert_uint64_uint16 convert_uint64_uint32 convert_uint64_uint8 convert_uint8_complex128 convert_uint8_complex64 convert_uint8_float32 convert_uint8_float64 convert_uint8_int16 convert_uint8_int32 convert_uint8_int64 convert_uint8_int8 convert_uint8_uint16 convert_uint8_uint32 convert_uint8_uint64 creat creat_excl creat_rdonly cvlist cvlist_array cvlist_array_hidden cvlist_array_meta cvlist_array_meta_hidden cvlist_hidden cvlist_invalid cvlist_meta cvlist_meta_hidden cvlist_meta_invalid del del_carray del_carray_deref del_const del_const_deref del_const_force del_data del_derived del_derived_after del_derived_force del_meta del_meta_force desync desync_flush desync_reopen desync_reopen_inv dfes_bit dfes_divide dfes_lincom dfes_linterp dfes_multiply dfes_null dfes_phase dfes_raw dfes_recip dfes_zero elist_alias elist_hidden elist_noalias elist_scalar encode_alter encode_get encode_move endian_alter endian_alter_sie endian_get endian_move entry_bad_code entry_bit entry_bit_scalar entry_divide entry_invalid entry_lincom entry_lincom_scalar entry_linterp entry_mplex entry_mplex_scalar entry_multiply entry_phase entry_phase_scalar entry_polynom entry_polynom_scalar entry_raw entry_raw_scalar entry_raw_scalar_code entry_raw_scalar_type entry_recip entry_scalar_repr entry_type entry_type_alias entry_window entry_window_scalar eof eof_index eof_lincom eof_phase error error_error error_num error_short error_verbose error_verbose_prefix file file_code file_type flist flist_hidden flist_invalid flist_meta flist_meta_hidden flist_meta_invalid flist_type flist_type_hidden flist_type_invalid flist_type_meta flist_type_meta_hidden flist_type_meta_invalid flush flush_all flush_bad_code flush_invalid flush_meta flush_spec foffs_alter foffs_get foffs_move fragment_affix fragment_affix_alter fragment_affix_alter2 fragment_affix_dup fragment_index fragment_index_alias fragment_name fragment_name_oor fragment_num fragment_parent 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_endian16 get_endian32 get_endian64 get_endian8 get_endian_complex128_arm get_endian_complex128_big get_endian_complex128_little get_endian_complex64_arm get_endian_complex64_big get_endian_complex64_little get_endian_float32_arm get_endian_float32_big get_endian_float32_little get_endian_float64_arm get_endian_float64_big get_endian_float64_little get_ff get_float32 get_float64 get_foffs get_fs get_here get_here_foffs get_heres get_int16 get_int32 get_int64 get_int8 get_invalid get_lincom1 get_lincom2 get_lincom3 get_lincom_noin get_lincom_non get_lincom_null get_lincom_spf get_linterp get_linterp_noin get_linterp_notab get_linterp_sort get_mplex 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_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 get_window_ne get_window_set get_zero global_flags global_name global_ref global_ref_empty global_ref_set gzip_add gzip_get gzip_get_get gzip_get_put gzip_move_from gzip_move_to gzip_nframes gzip_put gzip_put_get header_complex hide hide_hidden hide_unhide include include_accmode include_affix include_auto include_cb include_creat include_ignore include_index include_invalid include_nonexistent include_pc include_ref include_sub include_syntax index index_domain index_range legacy_get legacy_get_put legacy_get_rofs legacy_nframes legacy_nonexistent legacy_put legacy_spf lzma_get lzma_nframes madd madd_affix madd_alias madd_alias_affix madd_bit madd_bit_invalid madd_carray madd_clincom madd_const madd_cpolynom madd_crecip madd_crecip89 madd_divide madd_index madd_lincom madd_lincom_invalid madd_linterp madd_linterp_invalid madd_mplex madd_multiply madd_multiply_invalid madd_phase madd_phase_invalid madd_polynom madd_recip madd_sbit madd_spec madd_spec_directive madd_spec_invalid madd_spec_resolv madd_string madd_window move move_affix move_affix_dup move_alias move_data_enc_ar move_data_enc_ra move_data_endian move_data_foffs move_data_nop move_index move_meta move_protect move_subdir name name_affix name_affix_bad name_alias name_dup name_move name_move_alias name_updb name_updb_alias name_updb_const name_updb_const_alias nentries_alias nentries_hidden nentries_noalias nentries_scalar nfields nfields_hidden nfields_invalid nfields_type nfields_type_hidden nfields_type_invalid nfields_vector nfields_vector_hidden nfields_vector_invalid nframes nframes64 nframes_empty nframes_invalid nframes_off64 nframes_spf nmeta nmeta_hidden nmeta_invalid nmeta_parent nmeta_type nmeta_type_hidden nmeta_type_invalid nmeta_type_parent nmeta_vectors nmeta_vectors_del nmeta_vectors_hidden nmeta_vectors_invalid nmeta_vectors_parent open open_abs open_cb_abort open_cb_cont open_cb_ignore open_cb_invalid open_cb_rescan open_eaccess open_nonexistent open_notdirfile parse_alias parse_alias_code parse_alias_dup parse_alias_meta parse_alias_missing parse_badline parse_bit parse_bit4 parse_bit_bitnum parse_bit_bitsize parse_bit_ncols parse_bit_numbits parse_bit_scalar parse_carray parse_carray_long parse_const parse_const_complex parse_const_ncols parse_divide 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_hidden_field parse_hidden_meta parse_include parse_include_absolute parse_include_absrel parse_include_dir parse_include_loop parse_include_nonexistent parse_include_prefix parse_include_prefix_dup parse_include_preprefix parse_include_ref parse_include_relabs parse_include_relrel parse_include_slash parse_include_suffix parse_include_sufsuffix parse_index parse_lincom parse_lincom_ncols1 parse_lincom_ncols2 parse_lincom_nfields parse_lincom_nofields parse_lincom_non parse_lincom_non_ncols parse_lincom_scalar parse_linterp parse_linterp_ncols parse_malias parse_malias_dup parse_malias_meta parse_meta parse_meta_affix parse_meta_alias parse_meta_implicit parse_meta_implicit2 parse_meta_implicit_affix parse_meta_index parse_meta_index2 parse_meta_jump parse_meta_malias parse_meta_meta parse_meta_parent parse_meta_raw parse_mplex parse_mplex_ncols parse_mplex_nomax parse_mplex_scalar parse_multiply parse_multiply_ncols parse_name parse_name_dot parse_name_ext parse_name_pedantic parse_ncols parse_phase parse_phase_ncols parse_phase_scalar parse_polynom parse_polynom_ncols1 parse_polynom_ncols2 parse_polynom_scalar parse_protect_all parse_protect_bad parse_protect_data parse_protect_format parse_protect_none parse_quote 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_version_89 parse_version_98 parse_version_include parse_version_p8 parse_version_p9 parse_version_permissive parse_version_slash parse_whitespace parse_window parse_window_ncols parse_window_op parse_window_scalar protect_alter protect_get put64 put_bad_code put_bit put_bof put_carray put_carray_slice put_char put_complex128 put_complex64 put_const put_const_protect put_divide put_endian16 put_endian32 put_endian64 put_endian8 put_endian_complex128_arm put_endian_complex128_big put_endian_complex128_little put_endian_complex64_arm put_endian_complex64_big put_endian_complex64_little put_endian_float32_arm put_endian_float32_big put_endian_float32_little put_endian_float64_arm put_endian_float64_big put_endian_float64_little put_ff put_float32 put_float64 put_foffs put_fs put_here put_heres put_int16 put_int32 put_int64 put_int8 put_invalid put_lincom1 put_lincom2 put_lincom_noin put_linterp put_linterp_noin put_linterp_nomono put_linterp_notab put_linterp_reverse put_mplex put_multiply put_null put_off64 put_phase put_phase_noin put_polynom1 put_polynom2 put_polynom_noin put_protect put_rdonly put_recip put_recurse put_repr put_rofs put_sbit put_sf put_ss put_string put_string_protect put_type put_uint16 put_uint32 put_uint64 put_window put_zero ref ref_none ref_two repr_a repr_float32 repr_float64 repr_i repr_int16 repr_int32 repr_int64 repr_int8 repr_m repr_r repr_real_a repr_real_i repr_real_m repr_real_r repr_uint16 repr_uint32 repr_uint64 repr_uint8 seek64 seek_cur seek_end seek_foffs seek_set sie_get_big sie_get_little sie_move_from sie_move_to sie_nframes_big sie_nframes_little sie_put_big sie_put_little slim_get slim_nframes slim_put spf spf_alias spf_alias_meta spf_alias_missing spf_divide spf_lincom spf_multiply spf_polynom spf_recip spf_recurse svlist svlist_hidden svlist_invalid svlist_meta svlist_meta_hidden svlist_meta_invalid table table_code table_type tell tell64 trunc trunc_dir trunc_rdonly trunc_rofs trunc_truncsub unclude unclude_del unclude_move version_0 version_0_write version_1 version_1_write version_2 version_2_write version_3 version_3_write version_4 version_4_write version_5 version_5_strict version_5_write version_6 version_6_strict version_6_write version_7 version_7_strict version_7_write version_8 version_8_strict version_8_write version_9 version_9_strict version_9_write vlist vlist_alias vlist_hidden vlist_invalid vlist_meta vlist_meta_hidden vlist_meta_invalid xz_get xz_nframes zzip_data zzip_get zzip_get_get zzip_nframes zzslim_get zzslim_nframes Modified: trunk/getdata/test/Makefile.am =================================================================== --- trunk/getdata/test/Makefile.am 2012-08-13 23:22:42 UTC (rev 756) +++ trunk/getdata/test/Makefile.am 2012-08-14 20:26:01 UTC (rev 757) @@ -203,7 +203,8 @@ INCLUDE_TESTS=include include_accmode include_affix include_auto include_cb \ include_creat include_ignore include_index include_invalid \ - include_nonexistent include_pc include_ref include_syntax + include_nonexistent include_pc include_ref include_sub \ + include_syntax INDEX_TESTS=index index_domain index_range Added: trunk/getdata/test/include_sub.c =================================================================== --- trunk/getdata/test/include_sub.c (rev 0) +++ trunk/getdata/test/include_sub.c 2012-08-14 20:26:01 UTC (rev 757) @@ -0,0 +1,77 @@ +/* Copyright (C) 2008-2011 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 + */ +/* Test include */ +#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 *format1 = "dirfile/format1"; + const char *format2 = "dirfile/format2"; + const char *format_data = "#\n"; + const char *format1_data = "data RAW UINT8 11\nINCLUDE format2"; + const char *format2_data = "#\n"; + int fd, n, error, r = 0; + gd_entry_t E; + 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); + + fd = open(format1, O_CREAT | O_EXCL | O_WRONLY, 0666); + write(fd, format1_data, strlen(format1_data)); + close(fd); + + fd = open(format2, O_CREAT | O_EXCL | O_WRONLY, 0666); + write(fd, format2_data, strlen(format2_data)); + close(fd); + + D = gd_open(filedir, GD_RDWR | GD_VERBOSE); + + n = gd_include(D, "format1", 0, 0); + error = gd_error(D); + CHECKI(error, 0); + + gd_entry(D, "data", &E); + CHECKI(n, E.fragment_index); + + gd_free_entry_strings(&E); + gd_close(D); + + unlink(format2); + unlink(format1); + 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...> - 2012-08-13 23:22:53
|
Revision: 756 http://getdata.svn.sourceforge.net/getdata/?rev=756&view=rev Author: ketiltrout Date: 2012-08-13 23:22:42 +0000 (Mon, 13 Aug 2012) Log Message: ----------- Get dirfile plugin working. Modified Paths: -------------- trunk/defile/bin/cli.c trunk/defile/configure.ac trunk/defile/doc/Makefile.am trunk/defile/doc/defile-input.7 trunk/defile/doc/df_add_alias.3 trunk/defile/doc/df_add_entry.3 trunk/defile/doc/df_add_framedef.3 trunk/defile/doc/df_init.3 trunk/defile/doc/df_nframes_allowed.3 trunk/defile/doc/df_offset.3 trunk/defile/doc/df_push_frame.3 trunk/defile/doc/df_set_const.3 trunk/defile/input/dirfile.c trunk/defile/lib/defile.h trunk/defile/lib/internal.h trunk/defile/lib/libdefile.c trunk/defile/test/make.c trunk/defile/test/make.h Added Paths: ----------- trunk/defile/doc/df_add_fragment.3 trunk/defile/doc/df_add_lut.3 trunk/defile/doc/df_copy_file.3 trunk/defile/doc/df_hide.3 trunk/defile/doc/df_include.3 trunk/defile/doc/df_subset_contains.3 trunk/defile/doc/df_subset_init.3 trunk/defile/doc/df_subset_reset.3 trunk/defile/doc/df_subset_update.3 Removed Paths: ------------- trunk/defile/doc/df_bsearch.3 Modified: trunk/defile/bin/cli.c =================================================================== --- trunk/defile/bin/cli.c 2012-08-04 01:42:13 UTC (rev 755) +++ trunk/defile/bin/cli.c 2012-08-13 23:22:42 UTC (rev 756) @@ -77,9 +77,9 @@ "The list of defile\noptions and the list of input options are separated " \ "by a double dash (--) to\ndistinguish them. If no input options are " \ "needed, this section, including the\ndouble dash, may be omitted.\n\n" \ -"The first bare argument (i.e. the first argument not associated with " \ +"The first bare argument (i.e. the first argument not associated with " \ "an option)\nbefore the double dash, if present, is taken to be INPUT. " \ -"If INPUT starts with\na dash (and would, therefore, be interpreted as " \ +"If INPUT starts with\n- or + (and would, therefore, be interpreted as " \ "an option), the --input= defile\noption can be used to specify it " \ "instead (see below).\n\n" \ "Defile options are listed below. For help with input options, which " \ @@ -487,44 +487,6 @@ return -1; } -static int DF_UpdateOFL(const char *name, int incl) -{ - int is_new = 0, r; - - /* the type of the OFL may be changed when nothing is in it */ - if (df->nofl == 0) - df->ofl_incl = incl; - - /* find the location */ - r = df_bsearch(name, df->ofl, 0, df->nofl - 1, sizeof(char*), &is_new, - df_strcmp); - - if (df->ofl_incl == incl) { - if (is_new) { - /* insert */ - if (df->nofl + 1 > df->ofl_size) - df->ofl = DF_Embiggen(df->ofl, sizeof(char*) * (++df->ofl_size)); - memmove(df->ofl + r + 1, df->ofl + r, sizeof(char*) * (df->nofl++ - r)); - df->ofl[r] = strdup(name); - if (df->ofl[r] == NULL) { - perror("malloc"); - exit(1); - } - } - } else { - if (!is_new) { - /* remove */ - free(df->ofl[r]); - memmove(df->ofl + r, df->ofl + r + 1, sizeof(char*) * (df->nofl-- - r)); - /* an empty OFL always means write everything */ - if (df->nofl == 0) - df->ofl_incl = 0; - } - } - - return 0; -} - enum { DF_WOPT_ADD = 1, DF_WOPT_APPEND, DF_WOPT_ASYNC, DF_WOPT_AUTOTYPE, DF_WOPT_BHEAD, DF_WOPT_BLEN, DF_WOPT_CLOBBER, DF_WOPT_CUTDIR, DF_WOPT_DEBUG, @@ -538,7 +500,6 @@ static int DF_OutputOpt(struct df_defile *df, struct df_rc_config *config, struct df_rc_data *rcd) { - int i; struct df_fwk_list l; if (df->mode_switch == 1) { @@ -570,16 +531,17 @@ df->mode_switch = 1; break; case DF_WOPT_ADD: /* -F */ - DF_UpdateOFL(config->argument, 1); + if (df_subset_update(df->ofl, config->argument, + strlen(config->argument) + 1, DF_SUBSET_ADD)) + exit(1); break; case DF_WOPT_DEL: /* +F */ - DF_UpdateOFL(config->argument, 0); + if (df_subset_update(df->ofl, config->argument, + strlen(config->argument) + 1, DF_SUBSET_DEL)) + exit(0); break; case DF_WOPT_OFLCLR: /* --reset-field-list */ - for (i = 0; i < df->nofl; ++i) - free(df->ofl[i]); - df->nofl = 0; - df->ofl_incl = 0; + df_subset_reset(df->ofl, DF_SUBSET_INIT); break; case DF_WOPT_INPUT: /* -i */ if (df->input == NULL) { @@ -1159,9 +1121,7 @@ { int i; - for (i = 0; i < df->nofl; ++i) - free(df->ofl[i]); - free(df->ofl); + df_subset_delete(df->ofl); for (i = 1; i < df->iargc; ++i) free(df->iargv[i]); @@ -1213,10 +1173,10 @@ { DF_WOPT_NOCLOBBER, DF_OPT_NO_ARG, 0, "no-clobber", "NoClobber", 0, NULL, "don't overwrite an existing dirfile (default)" }, - { DF_WOPT_CUTDIR, DF_OPT_ARG_RQ, '0', "cut-dirs", "CutDirs", 0, "NUM", + { DF_WOPT_CUTDIR, DF_OPT_ARG_RQ, 0, "cut-dirs", "CutDirs", 0, "NUM", "remove all but the last NUM path elements from the output name" }, - { DF_WOPT_NOCUTDIR, DF_OPT_NO_ARG, '0', "no-cut-dirs", "NpCutDirs", 0, NULL, + { DF_WOPT_NOCUTDIR, DF_OPT_NO_ARG, 0, "no-cut-dirs", "NpCutDirs", 0, NULL, "don't remove path elements from the output name (default)" }, { DF_WOPT_DIR, DF_OPT_ARG_RQ, 'D', "directory", "Directory", DF_OPT_EXPAND, @@ -1320,6 +1280,10 @@ lt_dlinit(); atexit(DF_ShutdownLTDL); + /* initialise and parse command line */ + df->ofl = df_subset_init(DF_SUBSET_FULL, df_subset_strcmp); + if (df->ofl == NULL) + exit(1); DF_Parse(argc, argv, &rcd, df); /* sanitise */ Modified: trunk/defile/configure.ac =================================================================== --- trunk/defile/configure.ac 2012-08-04 01:42:13 UTC (rev 755) +++ trunk/defile/configure.ac 2012-08-13 23:22:42 UTC (rev 756) @@ -151,10 +151,18 @@ AC_CHECK_TYPES([_Complex float, _Complex double]) +dnl Declare a few feature test macros +AC_DEFINE([_GNU_SOURCE], [1], [ Expose GNU extensions ]) +AC_DEFINE([_BSD_SOURCE], [1], [ Expose BSD-derived definitions ]) +AC_DEFINE([_SVID_SOURCE], [1], [ Expose System V-derived definitions ]) +AC_DEFINE([_POSIX_SOURCE], [1], [ Expose POSIX.1-1990 conforming definitions ]) +AC_DEFINE([_POSIX_C_SOURCE], [200809L], + [ Expose POSIX:2008 conforming definitions ]) + echo echo "*** Looking for additional library functions" echo -AC_CHECK_FUNCS([pipe wordexp]) +AC_CHECK_FUNCS([canonicalize_file_name realpath wordexp]) echo echo "*** Looking for external programs" Modified: trunk/defile/doc/Makefile.am =================================================================== --- trunk/defile/doc/Makefile.am 2012-08-04 01:42:13 UTC (rev 755) +++ trunk/defile/doc/Makefile.am 2012-08-13 23:22:42 UTC (rev 756) @@ -20,10 +20,36 @@ # AUTOMAKE_OPTIONS = foreign -BUILT_SOURCES=defile.1 +nodist_man_MANS = defile.1 man_MANS = defile.1 defile-input.7 df_add_alias.3 df_add_entry.3 \ - df_add_framedef.3 df_bsearch.3 df_check_abort.3 df_field_in_input.3 \ + df_add_fragment.3 df_add_framedef.3 df_add_lut.3 df_check_abort.3 \ + df_copy_file.3 df_field_in_input.3 df_hide.3 df_include.3 \ df_init.3 df_input_name.3 df_mode.3 df_nframes_allowed.3 \ df_offset.3 df_on_abort.3 df_push_frame.3 df_ready.3 \ - df_set_const.3 df_shell_expand.3 + df_set_const.3 df_shell_expand.3 df_subset_contains.3 \ + df_subset_init.3 df_subset_reset.3 df_subset_update.3 + +# these are real_file:alias +MAN3ALIASES=df_add_entry.3:df_add_spec \ + df_init.3:df_reinit.3 \ + df_set_const:df_set_carray df_set_const:df_set_string \ + df_subset_init:df_subset_delete df_subset_init:df_subset_strcmp + + +install-data-hook: + cd $(DESTDIR)$(mandir)/man3 && \ + for m in $(MAN3ALIASES); do \ + rm -f `echo $$m | $(SED) -e 's/.*://'`; \ + $(LN_S) `echo $$m | $(SED) -e 's/:/ /'`; \ + done + +uninstall-hook: + cd $(DESTDIR)$(mandir)/man3 && \ + for m in $(MAN3ALIASES); do \ + rm -f `echo $$m | $(SED) -e 's/.*://'`; \ + done + +clean-local: + rm -f *~ + rm -f $(nodist_man_MANS) Modified: trunk/defile/doc/defile-input.7 =================================================================== --- trunk/defile/doc/defile-input.7 2012-08-04 01:42:13 UTC (rev 755) +++ trunk/defile/doc/defile-input.7 2012-08-13 23:22:42 UTC (rev 756) @@ -394,7 +394,7 @@ occur in separate threads within defile. To achieve synchronisation between input and output, defile operates in one of several states while converting data. During any particular state of operation, the input plugin is restricted -to a certain subset of the defile input API. A consice list of functions +to a certain subset of the defile input API. A concise list of functions available in each state is provided below in the .B API REFERNCE section. We now discuss basic operation of defile. @@ -406,8 +406,8 @@ .BR ABORT . The input plugin's role in each state is discussed below. -The input plugin may return at any time, if it's job is complete (or if it ran -into an unrecoverable error). Returning a value of zero indicates to defile +The input plugin may return at any time if it's job is complete, or if it ran +into an unrecoverable error. Returning a value of zero indicates to defile that the input plugin completed normally (success). Returning any other value indicates that the input plugin encountered an unrecoverable error (failure). @@ -566,7 +566,9 @@ interrupt). Most of the input plugin API functions check whether defile has entered this state and return .B DF_ABORT -when detected. The input should monitor the return value of these functions to +when detected (see +.BR "Standard API Return Semaphores" ). +The input should monitor the return value of these functions to detect an unexpected transition into the .B ABORT state. @@ -664,6 +666,50 @@ disable cancelability for long periods of time may be subject to more drastic measures without forewarning. +.SS Standard API Return Semaphores + +Many API functions return a standard +.I int +semaphore indicating success or failure of the operation. The standard return +semaphore values are: +.TP +.B DF_SUCCESS \fR(=0) +The operation completed successfully. (Some functions return a non-negative +number on success instead.) +.TP +.B DF_ABORT +A catastrophic error occurred. See +.BR "ABORT state" . +If an abort handler is registered by the plugin (using +.BR df_on_abort (3)) +this value will never be returned, and the function simply does not return. +.TP +.B DF_SYSTEM +A system error (usually a memory allocation error) occurred. The input plugin +may try the call again, although the same error may result. +.TP +.B DF_SEQUENCE +A +.I sequencing error +occurred: a call was made to a function which is not available in the current +defile state (see +.B API REFERENCE +for a list of functions broken down by state). +The call should not be repeated until the correct state is achieved. +.TP +.B DF_INPUT +A bad call was made to the API, typically due to passing bad parameter data. +The call should not be repeated without correction. +.TP +.B DF_OUTPUT +An error occurred manipulating the output dirfile. The input plugin may try the +call again, although the same error may result. +.P +Except for +.BR DF_SUCCESS , +which evaluates to zero, these all have negative values. See the specific +function manual pages for more details on function return values. + .SH AUTOMATIC TYPE DETECTION If desired, and possible, the plugin may participate in the automatic type detection system used by defile when an explicit input type is not provided. Modified: trunk/defile/doc/df_add_alias.3 =================================================================== --- trunk/defile/doc/df_add_alias.3 2012-08-04 01:42:13 UTC (rev 755) +++ trunk/defile/doc/df_add_alias.3 2012-08-13 23:22:42 UTC (rev 756) @@ -67,7 +67,7 @@ .B DF_SEQUENCE The function was called while defile was not in the .B BUILD -state. (See defile-input (7)). +state. (See defile-input(7)). .PP All errors are accompanied by a message on standard error. .SH SEE ALSO Modified: trunk/defile/doc/df_add_entry.3 =================================================================== --- trunk/defile/doc/df_add_entry.3 2012-08-04 01:42:13 UTC (rev 755) +++ trunk/defile/doc/df_add_entry.3 2012-08-13 23:22:42 UTC (rev 756) @@ -101,7 +101,7 @@ .B DF_SEQUENCE The function was called while defile was not in the .B BUILD -state. (See defile-input (7)). +state. (See defile-input(7)). .PP All errors are accompanied by a message on standard error. .SH SEE ALSO Added: trunk/defile/doc/df_add_fragment.3 =================================================================== --- trunk/defile/doc/df_add_fragment.3 (rev 0) +++ trunk/defile/doc/df_add_fragment.3 2012-08-13 23:22:42 UTC (rev 756) @@ -0,0 +1,117 @@ +.\" df_add_fragment.3. The df_add_fragment man page. +.\" +.\" Copyright (C) 2012 D. V. Wiebe +.\" +.\"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" +.\" +.\" This file is part of the Defile package. +.\" +.\" Permission is granted to copy, distribute and/or modify this document +.\" under the terms of the GNU Free Documentation License, Version 1.2 or +.\" any later version published by the Free Software Foundation; with no +.\" Invariant Sections, with no Front-Cover Texts, and with no Back-Cover +.\" Texts. A copy of the license is included in the `COPYING.DOC' file +.\" as part of this distribution. +.\" +.TH df_add_fragment 3 "13 August 2012" "Version 0.0.0" DEFILE +.SH NAME +df_add_fragment \(em create a new fragment in the defile output dirfile +.SH SYNOPSIS +.nh +.ad l +.fam C +.B #include <defile.h> +.HP +.BI "int df_add_fragment(const char *" name ", int " parent , +.BI "unsigned int " encoding ", unsigned long " byte_sex , +.BI "const char *" prefix ", const char *" suffix ); +.fam +.ad +.hy +.SH DESCRIPTION +This function is part of the defile input plugin C API. See defile-input(7) for +an overview. +.PP +The +.BR df_add_fragment () +creates a new format file fragment (see dirfile-format(5)) called +.I name +in the defile output dirfile. The +.I name +may contain path elements relative to the base output dirfile directory. +Subdirectories specified in +.I name +will be created if they do not already exist. The new fragment will be included +in the fragment indexed by +.IR parent , +which should be zero (for the primary format file) or else a fragment index +returned by a previous call to +.BR df_add_fragment (). + +The encoding of data files used in the new fragment is specified with +.IR encoding , +which should be one of the symbols listed in +.BR gd_alter_encoding (3), +although not all encodings provide write capability (see dirfile-encoding(5) for +details). If this is set to +.BR GD_AUTO_ENCODED , +the encoding scheme will be chosen by defile. The byte sex of data files in +the new fragment is specified with +.IR byte_sex , +which should be one of the values listed in +.BR gd_alter_endianness (3). +To use default values for these parameters, set them to zero. + +The prefix and suffix of the new fragment may specified by +.I prefix +and +.IR suffix , +which may be NULL if the corresponding affix is not needed. + +In append mode (see +.BR df_mode (3)), +this function only tests for the existence of +.IR name , +and returns an error if it is not found. In that case, all other parameters are +ignored. + +.SH RETURN VALUE +Upon success, +.BR df_add_fragment () +returns a positive integer fragment index corresponding to the newly created +fragment. The value should be cached by the caller and used in subsequent calls +requiring a fragment index. On error, one of the following error values (all +less than zero) will be returned: +.TP +.B DF_ABORT +Another defile subprocess has requested the input plugin immediately abort. +Upon receiving this signal the plugin should shutdown and return. If it takes +too long, defile will cancel it. If an abort handler has been registered (see +.BR df_on_abort (3)), +this value is never returned and, instead, this function does not return. +.TP +.B DF_OUTPUT +An error occured attempting to add the fragment to the output dirfile. See +.BR gd_include_affix (3) +and +.BR mkdir (2) +for possible reasons. Or, defile was in append mode, and the specified +.I name +did not exist. +.TP +.B DF_SEQUENCE +The function was called while defile was not in the +.B BUILD +state. (See defile-input(7)). +.TP +.B DF_SYSTEM +A memory allocation error occurred. +.PP +All errors are accompanied by a message on standard error. +.SH SEE ALSO +.PP +defile-input(7), defile(1), +.BR df_include (3), +.BR gd_include_affix (3), +.BR gd_alter_encoding (3), +.BR gd_alter_endianness (3) Modified: trunk/defile/doc/df_add_framedef.3 =================================================================== --- trunk/defile/doc/df_add_framedef.3 2012-08-04 01:42:13 UTC (rev 755) +++ trunk/defile/doc/df_add_framedef.3 2012-08-13 23:22:42 UTC (rev 756) @@ -1,4 +1,4 @@ -.\" df_add_framdef.3. The df_add_framdef man page. +.\" df_add_framedef.3. The df_add_framedef man page. .\" .\" Copyright (C) 2012 D. V. Wiebe .\" @@ -13,9 +13,9 @@ .\" Texts. A copy of the license is included in the `COPYING.DOC' file .\" as part of this distribution. .\" -.TH df_add_framdef 3 "27 February 2012" "Version 0.0.0" DEFILE +.TH df_add_framedef 3 "27 February 2012" "Version 0.0.0" DEFILE .SH NAME -df_add_framdef \(em define a defile input subframe +df_add_framedef \(em define a defile input subframe .SH SYNOPSIS .nh .ad l @@ -32,7 +32,7 @@ an overview. .PP The -.BR df_add_framdef () +.BR df_add_framedef () function defines a defile subframe definition, .IR fdef , and adds @@ -149,7 +149,7 @@ (see defile(1)) are accepted in subframe definitions and simply ignored. .SH RETURN VALUE Upon success, -.BR df_add_framdef () +.BR df_add_framedef () returns the assigned index number of this subframe definition, which is always greater than or equal to zero. This number should be cached by the input plugin and used in subsequent calls to @@ -177,7 +177,7 @@ .B DF_SEQUENCE The function was called while defile was not in the .B BUILD -state. (See defile-input (7)). +state. (See defile-input(7)). .TP .B DF_SYSTEM A memory allocation error occurred. Added: trunk/defile/doc/df_add_lut.3 =================================================================== --- trunk/defile/doc/df_add_lut.3 (rev 0) +++ trunk/defile/doc/df_add_lut.3 2012-08-13 23:22:42 UTC (rev 756) @@ -0,0 +1,116 @@ +.\" df_add_lut.3. The df_add_lut man page. +.\" +.\" Copyright (C) 2012 D. V. Wiebe +.\" +.\"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" +.\" +.\" This file is part of the Defile package. +.\" +.\" Permission is granted to copy, distribute and/or modify this document +.\" under the terms of the GNU Free Documentation License, Version 1.2 or +.\" any later version published by the Free Software Foundation; with no +.\" Invariant Sections, with no Front-Cover Texts, and with no Back-Cover +.\" Texts. A copy of the license is included in the `COPYING.DOC' file +.\" as part of this distribution. +.\" +.TH df_add_lut 3 "13 August 2012" "Version 0.0.0" DEFILE +.SH NAME +df_add_lut \(em create a look-up table in the defile output dirfile +.SH SYNOPSIS +.nh +.ad l +.fam C +.B #include <defile.h> +.HP +.BI "int df_add_lut(const char *" name ", size_t " n ", gd_type_t " x_type , +.BI "const void *" x ", gd_type_t " y_type ", const void *" y ); +.fam +.ad +.hy +.SH DESCRIPTION +This function is part of the defile input plugin C API. See defile-input(7) for +an overview. +.PP +The +.BR df_add_lut () +creates a dirfile-compatible LINTERP look-up table (LUT) called +.I name +in the defile output dirfile from the supplied data. The +.I name +may contain path elements relative to the base output dirfile directory. +Subdirectories specified in +.I name +will be created if they do not already exist. + +The data for the LUT are given in the arrays pointed to by +.I x +and +.I y . +The data types of the two arrays are given by +.I x_type +and +.IR y_type , +which should be one of the GetData data type symbols (see +.BR gd_add_raw (3)), +with the further restriction that the +.I x +data type may not be complex valued. + +In append mode (see +.BR df_mode (3)), +this function only tests for the existence of +.IR name , +and returns an error if it is not found. In that case, all other parameters are +ignored. + +This function does not add any references to the created file to the output +dirfile. + +.SH RETURN VALUE +Upon success, +.BR df_add_lut () +returns +.B DF_SUCCESS +(=0). On error, one of the following error values (all less than zero) will be +returned: +.TP +.B DF_ABORT +Another defile subprocess has requested the input plugin immediately abort. +Upon receiving this signal the plugin should shutdown and return. If it takes +too long, defile will cancel it. If an abort handler has been registered (see +.BR df_on_abort (3)), +this value is never returned and, instead, this function does not return. +.TP +.B DF_INPUT +The value of +.I x_type +or +.I y_type +was invalid. +.B DF_OUTPUT +An error occured attempting to create the LUT. See +.BR mkdir (2), +.BR open (2), +.BR fcntl (2), +.BR fclose (3), +.BR fprintf (3), +and +.BR fputc (3) +for possible reasons. Or, defile was in append mode, and the specified +.I name +did not exist. +.TP +.TP +.B DF_SEQUENCE +The function was called while defile was not in the +.B BUILD +state. (See defile-input(7)). +.TP +.B DF_SYSTEM +A memory allocation error occurred. +.PP +All errors are accompanied by a message on standard error. +.SH SEE ALSO +.PP +defile-input(7), defile(1), dirfile-format(5), +.BR df_copy_file (3) Deleted: trunk/defile/doc/df_bsearch.3 =================================================================== --- trunk/defile/doc/df_bsearch.3 2012-08-04 01:42:13 UTC (rev 755) +++ trunk/defile/doc/df_bsearch.3 2012-08-13 23:22:42 UTC (rev 756) @@ -1,164 +0,0 @@ -.\" df_bsearch.3. The df_bsearch man page. -.\" -.\" Copyright (C) 2012 D. V. Wiebe -.\" -.\"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" -.\" -.\" This file is part of the Defile package. -.\" -.\" Permission is granted to copy, distribute and/or modify this document -.\" under the terms of the GNU Free Documentation License, Version 1.2 or -.\" any later version published by the Free Software Foundation; with no -.\" Invariant Sections, with no Front-Cover Texts, and with no Back-Cover -.\" Texts. A copy of the license is included in the `COPYING.DOC' file -.\" as part of this distribution. -.\" -.TH df_bsearch 3 "27 February 2012" "Version 0.0.0" DEFILE -.SH NAME -df_bsearch, df_strcmp \(em perform a binary search within defile -.SH SYNOPSIS -.nh -.ad l -.fam C -.B #include <defile.h> -.HP -.BI "int df_bsearch(const void *" needle ", const void *" haystack , -.BI "int " start ", int " end ", size_t " size ", int *" is_new , -.BI "int (*" compar ")(const void*, const void*)); -.HP -.BI "int df_strcmp(const void *" needle ", const void *" candidate ); -.fam -.ad -.hy -.SH DESCRIPTION -These functions are part of the defile input plugin C API. See defile-input(7) -for an overview. -.PP -The -.BR df_bsearch () -function performs a binary search on a subset of the array -.IR haystack , -which has elements of size -.I size -bytes, looking for the element -.IR needle , -using the comparison function -.IR compar . -The first element considered is indexed by -.I start -and the last element considered is immediately before the element indexed by -.IR end . -(In other words, to search the entirety of a -.IR n -element -.IR haystack , -set -.I start -to zero and -.I end -to -.IR n .) -.P -If -.I needle -is not found, -.BI * is_new -is set to one and the index where it would be, were it in the array, is -returned. -If -.I needle -is found in -.IR haystack , -its index is returned, and -.BI * is_new -is left untouched (so the caller should zero it beforehand, if necessary). This -function is similar to -.BR bsearch (3), -but behaves differently in the case where -.I needle -is not in -.IR haystack . -It is designed for use during an insertion sort. -.PP -The function pointed to by -.I compar -will be called to compare elements of -.I haystack -to -.IR needle . -The first argument passed to -.I compar -is always -.IR needle ; -the second argument will be a pointer to the candidate array element. -.PP -The -.BR df_strcmp () -function is provided as a potential -.I compar -function, useable when -.I haystack -is an array of character strings. The call -.RS -.HP -.nh -.ad l -.fam C -.BI df_strcmp( a ", " b ) -.fam -.ad -.hy -.RE -.PP -is equivalent to the -.BR strcmp (3) -call: -.RS -.HP -.nh -.ad l -.fam C -.BI "strcmp((const char*)" a ", *(const char**)" b ")\fR. -.fam -.ad -.hy -.RE -.PP -(ie. it derefences its second parameter). -.PP -These functions are used internally by defile(1) and are simply exported to the -defile C API as a convenience to input plugin authors. Error checking is -minimal: out of range -.I start -or -.I end -values may cause segmentation faults. No restriction is placed on when this -function may be called in an input plugin. -.SH RETURN VALUE -The -.BR df_bsearch () -function returns the location of -.I needle -in -.IR haystack , -if found, or the element in which to insert -.I needle -if not found. Note: while the returned value will be strictly less than -.I end -if found, if not found, -.I end -may be returned (indicating that -.I needle -should be appended to -.IR haystack . -.PP -The -.BR df_strcmp () -function returns a number with the same meaning as the return value of -.BR strcmp (3), -as indicated in the -.B DISCUSSION -section above. -.SH SEE ALSO -defile-input(7), -.BR bsearch (3), -.BR strcmp (3). Added: trunk/defile/doc/df_copy_file.3 =================================================================== --- trunk/defile/doc/df_copy_file.3 (rev 0) +++ trunk/defile/doc/df_copy_file.3 2012-08-13 23:22:42 UTC (rev 756) @@ -0,0 +1,100 @@ +.\" df_add_lut.3. The df_add_lut man page. +.\" +.\" Copyright (C) 2012 D. V. Wiebe +.\" +.\"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" +.\" +.\" This file is part of the Defile package. +.\" +.\" Permission is granted to copy, distribute and/or modify this document +.\" under the terms of the GNU Free Documentation License, Version 1.2 or +.\" any later version published by the Free Software Foundation; with no +.\" Invariant Sections, with no Front-Cover Texts, and with no Back-Cover +.\" Texts. A copy of the license is included in the `COPYING.DOC' file +.\" as part of this distribution. +.\" +.TH df_copy_file 3 "13 August 2012" "Version 0.0.0" DEFILE +.SH NAME +df_add_lut \(em create a file in the defile output dirfile +.SH SYNOPSIS +.nh +.ad l +.fam C +.B #include <defile.h> +.HP +.BI "int df_copy_file(const char *" name ", int " fd ); +.fam +.ad +.hy +.SH DESCRIPTION +This function is part of the defile input plugin C API. See defile-input(7) for +an overview. +.PP +The +.BR df_copy_file () +creates a new file called +.I name +in the defile output dirfile and copyies the contents of the open file +referenced by the file descriptor +.I fd +to it. The +.I name +may contain path elements relative to the base output dirfile directory. +Subdirectories specified in +.I name +will be created if they do not already exist. + +In append mode (see +.BR df_mode (3)), +this function only tests for the existence of +.IR name , +and returns an error if it is not found. In that case, all other parameters are +ignored. + +This function does not add any references to the created file to the output +dirfile. + +.SH RETURN VALUE +Upon success, +.BR df_copy_file () +returns +.B DF_SUCCESS +(=0). On error, one of the following error values (all less than zero) will be +returned: +.TP +.B DF_ABORT +Another defile subprocess has requested the input plugin immediately abort. +Upon receiving this signal the plugin should shutdown and return. If it takes +too long, defile will cancel it. If an abort handler has been registered (see +.BR df_on_abort (3)), +this value is never returned and, instead, this function does not return. +.TP +.B DF_OUTPUT +An error occured attempting to create the file. See +.BR mkdir (2), +.BR open (2), +.BR read (2), +.BR write (2), +and +.BR close (2) +for possible reasons. Or, defile was in append mode, and the specified +.I name +did not exist. +.TP +.B DF_SEQUENCE +The function was called while defile was not in the +.B BUILD +state. (See defile-input(7)). +.TP +.B DF_SYSTEM +A memory allocation error occurred. +.PP +All errors are accompanied by a message on standard error. +.SH NOTES +Don't use this function to create raw data files. (The desire to do so is +often an indication that your input plugin doesn't really need to be using +defile at all.) +.SH SEE ALSO +.PP +defile-input(7), defile(1), dirfile-format(5), +.BR df_add_lut (3) Added: trunk/defile/doc/df_hide.3 =================================================================== --- trunk/defile/doc/df_hide.3 (rev 0) +++ trunk/defile/doc/df_hide.3 2012-08-13 23:22:42 UTC (rev 756) @@ -0,0 +1,82 @@ +.\" df_hide.3. The df_hide man page. +.\" +.\" Copyright (C) 2012 D. V. Wiebe +.\" +.\"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" +.\" +.\" This file is part of the Defile package. +.\" +.\" Permission is granted to copy, distribute and/or modify this document +.\" under the terms of the GNU Free Documentation License, Version 1.2 or +.\" any later version published by the Free Software Foundation; with no +.\" Invariant Sections, with no Front-Cover Texts, and with no Back-Cover +.\" Texts. A copy of the license is included in the `COPYING.DOC' file +.\" as part of this distribution. +.\" +.TH df_hide 3 "21 July 2012" "Version 0.0.0" DEFILE +.SH NAME +df_hide \(em hide a field in the defile output dirfile +.SH SYNOPSIS +.nh +.ad l +.fam C +.B #include <defile.h> +.HP +.BI "int df_hide(const char *" name ); +.fam +.ad +.hy +.SH DESCRIPTION +This function is part of the defile input plugin C API. See defile-input(7) for +an overview. +.PP +The +.BR df_hide () +hides the field or alias called +.I name +in the output dirfile. The field must have been previously added to the +output dirfile using +.B df_add_alias (3), +.B df_add_framedef (3), +.B df_add_entry (3), +or +.B df_add_spec (3). +.PP +If the field has been excluded from the output dirfile by the Output Field List +(see defile(1)), this functions does nothing and succeeds. + +If defile is in append mode (see +.BR df_mode (3)), +this function simply checks whether the specified field is hidden in the +output dirfile and returns an error if it is not. +.SH RETURN VALUE +Upon success, +.BR df_hide () +returns +.B DF_SUCCESS +(=0). On error the field is not hidden, and one of the following error values +(all less than zero) will be returned: +.TP +.B DF_ABORT +Another defile subprocess has requested the input plugin immediately abort. +Upon receiving this signal the plugin should shutdown and return. If it takes +too long, defile will cancel it. If an abort handler has been registered (see +.BR df_on_abort (3)), +this value is never returned and, instead, this function does not return. +.TP +.B DF_OUTPUT +An error occured attempting to hide the field. See +.BR gd_hide (3) +for possible reasons. Or, defile was in append mode and the specified field +wasn't already hidden. +.TP +.B DF_SEQUENCE +The function was called while defile was not in the +.B BUILD +state. (See defile-input(7)). +.PP +All errors are accompanied by a message on standard error. +.SH SEE ALSO +.PP +defile-input(7), defile(1), +.BR gd_hide (3) Added: trunk/defile/doc/df_include.3 =================================================================== --- trunk/defile/doc/df_include.3 (rev 0) +++ trunk/defile/doc/df_include.3 2012-08-13 23:22:42 UTC (rev 756) @@ -0,0 +1,96 @@ +.\" df_include.3. The df_include man page. +.\" +.\" Copyright (C) 2012 D. V. Wiebe +.\" +.\"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" +.\" +.\" This file is part of the Defile package. +.\" +.\" Permission is granted to copy, distribute and/or modify this document +.\" under the terms of the GNU Free Documentation License, Version 1.2 or +.\" any later version published by the Free Software Foundation; with no +.\" Invariant Sections, with no Front-Cover Texts, and with no Back-Cover +.\" Texts. A copy of the license is included in the `COPYING.DOC' file +.\" as part of this distribution. +.\" +.TH df_include 3 "13 August 2012" "Version 0.0.0" DEFILE +.SH NAME +df_include \(em include an existing fragment in the defile output dirfile +.SH SYNOPSIS +.nh +.ad l +.fam C +.B #include <defile.h> +.HP +.BI "int df_include(const char *" filename ", int " parent , +.BI "const char *" prefix ", const char *" suffix ); +.fam +.ad +.hy +.SH DESCRIPTION +This function is part of the defile input plugin C API. See defile-input(7) for +an overview. +.PP +The +.BR df_include () +inserts an +.B /INCLUDE +directive (see dirfile-format(5)) into the output dirfile fragment indexed by +.IR parent , +which should be zero (for the primary format file) or else a fragment index +returned by a previous call to +.BR df_add_fragment (3). +The included fragment is given by +.IR filename . +The the prefix and suffix for the inclusion are given by +.I prefix +and +.IR suffix , +which may be NULL, if no corresponding affix is needed. + +The fragment specified by +.I filename +must already exist. (Use +.BR gd_add_fragment (3) +to create a new fragment.) + +In append mode (see +.BR df_mode (3)), +this function only tests whether the specified fragment is present in the +output dirfile. In that case, all other parameters are ignored. + +.SH RETURN VALUE +Upon success, +.BR df_include () +returns +.B DF_SUCCESS +(=0). On error, one of the following error values (all less than zero) will be +returned: +.TP +.B DF_ABORT +Another defile subprocess has requested the input plugin immediately abort. +Upon receiving this signal the plugin should shutdown and return. If it takes +too long, defile will cancel it. If an abort handler has been registered (see +.BR df_on_abort (3)), +this value is never returned and, instead, this function does not return. +.TP +.B DF_OUTPUT +An error occured attempting to add the fragment to the output dirfile. See +.BR gd_include_affix (3) +for possible reasons. Or defile was in append mode and the specified fragment +wasn't in the output dirfile. +.TP +.B DF_SEQUENCE +The function was called while defile was not in the +.B BUILD +state. (See defile-input(7)). +.TP +.B DF_SYSTEM +A memory allocation error occurred. +.PP +All errors are accompanied by a message on standard error. +.SH SEE ALSO +.PP +defile-input(7), defile(1), +.BR df_add_fragment (3), +.BR gd_include_affix (3) Modified: trunk/defile/doc/df_init.3 =================================================================== --- trunk/defile/doc/df_init.3 2012-08-04 01:42:13 UTC (rev 755) +++ trunk/defile/doc/df_init.3 2012-08-13 23:22:42 UTC (rev 756) @@ -43,7 +43,7 @@ .TP .I nframes the total length, in frames, of the input data. In follow mode (see -defile-input (7)) this is ignored. If the total length is unknown or difficult +defile-input(7)) this is ignored. If the total length is unknown or difficult to calculate, this should be zero. This is only used for informational purposes to the user; the input plugin may provide a different number of frames than specified here without error. @@ -66,7 +66,7 @@ specified here. .TP .I rate -the expected frame rate for live data in follow mode (see defile-input (7)). If +the expected frame rate for live data in follow mode (see defile-input(7)). If unknown or difficult to calculate, this may be -1. This value is used to prime the IIR filter in the rate calculator in the running information provided to the user, and does not set actual restictions on the data rate. In no-follow mode, Modified: trunk/defile/doc/df_nframes_allowed.3 =================================================================== --- trunk/defile/doc/df_nframes_allowed.3 2012-08-04 01:42:13 UTC (rev 755) +++ trunk/defile/doc/df_nframes_allowed.3 2012-08-13 23:22:42 UTC (rev 756) @@ -86,7 +86,7 @@ .B DF_SEQUENCE The function was called while defile was not in the .B RUN -state. (See defile-input (7)). +state. (See defile-input(7)). .PP All errors are accompanied by a message on standard error. .SH SEE ALSO Modified: trunk/defile/doc/df_offset.3 =================================================================== --- trunk/defile/doc/df_offset.3 2012-08-04 01:42:13 UTC (rev 755) +++ trunk/defile/doc/df_offset.3 2012-08-13 23:22:42 UTC (rev 756) @@ -77,7 +77,7 @@ .B BUILD nor .B RUN -states. (See defile-input (7)). +states. (See defile-input(7)). .SH SEE ALSO defile(1), defile-input(7), .BR df_init (3), Modified: trunk/defile/doc/df_push_frame.3 =================================================================== --- trunk/defile/doc/df_push_frame.3 2012-08-04 01:42:13 UTC (rev 755) +++ trunk/defile/doc/df_push_frame.3 2012-08-13 23:22:42 UTC (rev 756) @@ -87,7 +87,7 @@ .B DF_SEQUENCE The function was called while defile was not in the .B RUN -state. (See defile-input (7)). +state. (See defile-input(7)). .PP All errors are accompanied by a message on standard error. .SH SEE ALSO Modified: trunk/defile/doc/df_set_const.3 =================================================================== --- trunk/defile/doc/df_set_const.3 2012-08-04 01:42:13 UTC (rev 755) +++ trunk/defile/doc/df_set_const.3 2012-08-13 23:22:42 UTC (rev 756) @@ -125,7 +125,7 @@ .B BUILD nor .B RUN -states. (See defile-input (7)). +states. (See defile-input(7)). .PP All errors are accompanied by a message on standard error. .SH SEE ALSO Added: trunk/defile/doc/df_subset_contains.3 =================================================================== --- trunk/defile/doc/df_subset_contains.3 (rev 0) +++ trunk/defile/doc/df_subset_contains.3 2012-08-13 23:22:42 UTC (rev 756) @@ -0,0 +1,55 @@ +.\" df_subset_contains.3. The df_subset_contains man page. +.\" +.\" Copyright (C) 2012 D. V. Wiebe +.\" +.\"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" +.\" +.\" This file is part of the Defile package. +.\" +.\" Permission is granted to copy, distribute and/or modify this document +.\" under the terms of the GNU Free Documentation License, Version 1.2 or +.\" any later version published by the Free Software Foundation; with no +.\" Invariant Sections, with no Front-Cover Texts, and with no Back-Cover +.\" Texts. A copy of the license is included in the `COPYING.DOC' file +.\" as part of this distribution. +.\" +.TH df_subset_contains 3 "10 August 2012" "Version 0.0.0" DEFILE +.SH NAME +df_subset_contains \(em modify a defile subset object +.SH SYNOPSIS +.nh +.ad l +.fam C +.B #include <defile.h> +.HP +.BI "int df_subset_contains(df_subset *" subset ", const void *" value ); +.fam +.ad +.hy +.SH DESCRIPTION +This function is part of the defile input plugin C API. See defile-input(7) +for an overview. +.PP +The +.BR df_subset_contains () +returns a non-zero value if the df_subset object +.I subset +contains the item +.IR value. +The item +.I value +is assumed to be a member of the containing superset. +.PP +No restriction is placed on when this function may be called in an input plugin. +.SH RETURN VALUE +If +.I value +is contained in +.IR subset , +a non-zero number is returned. Otherwise zero is returned. +.SH SEE ALSO +defile-input(7), +.BR df_subset_delete (3), +.BR df_subset_init (3), +.BR df_subset_reset (3), +.BR df_subset_update (3). Added: trunk/defile/doc/df_subset_init.3 =================================================================== --- trunk/defile/doc/df_subset_init.3 (rev 0) +++ trunk/defile/doc/df_subset_init.3 2012-08-13 23:22:42 UTC (rev 756) @@ -0,0 +1,137 @@ +.\" df_subset_init.3. The df_subset_init man page. +.\" +.\" Copyright (C) 2012 D. V. Wiebe +.\" +.\"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" +.\" +.\" This file is part of the Defile package. +.\" +.\" Permission is granted to copy, distribute and/or modify this document +.\" under the terms of the GNU Free Documentation License, Version 1.2 or +.\" any later version published by the Free Software Foundation; with no +.\" Invariant Sections, with no Front-Cover Texts, and with no Back-Cover +.\" Texts. A copy of the license is included in the `COPYING.DOC' file +.\" as part of this distribution. +.\" +.TH df_subset_init 3 "10 August 2012" "Version 0.0.0" DEFILE +.SH NAME +df_subset_init, df_subset_delete, df_subset_strcmp \(em initialise or delete a +defile subset object +.SH SYNOPSIS +.nh +.ad l +.fam C +.B #include <defile.h> +.HP +.BI "df_subset *df_subset_init(int " init , +.BI "int (*" compar ")(const void*, const void*)); +.HP +.BI "void df_subset_delete(df_subset *" subset ); +.HP +.BI "int df_subset_strcmp(const void *" candidate ", const void **" item ); +.fam +.ad +.hy +.SH DESCRIPTION +These functions are part of the defile input plugin C API. See defile-input(7) +for an overview. +.PP +The +.BR df_subset_init () +initialises a defile df_subset object, returning a pointer to the new object. +The df_subset object represents a set of items which are part of a larger +containing superset, without knowing the contents of the superset. The subset +is built up by including or excluding specific elements from the subset (see +.BR df_subset_update (3)). + +The defile Output Field List (see defile(1)) is an example of such a data +object. + +The initial contents of the df_subset is given by +.I init +which should be either +.BR DF_SUBSET_EMPTY , +indicating the set is initially the empty set, or else +.BR DF_SUBSET_FULL , +indicating that the set is initially equal to the containing subset (but see +.BR df_subset_update (3) +for special handling of the initial subset). + +A comparison function +.I compar +must be specified which takes two pointers: +.IR candidate , +which points to an item against which to compare, and +.IR item , +is +.I a pointer to +a pointer to an object in the subset. The comparison function should return a +number less than, equal to, or greater than zero if +.I candidate +is, respectively, lexically before, equal to, or after +.BI * item\fR. + +The +.BR df_subset_delete () +function deallocates a df_subset object previously created by a call to +.BR df_subset_init (). +After calling this function, the df_subset object passed to it should be +considered invalid. If +.BR df_subset_delete () +is passed NULL, it does nothing. + +The +.BR df_subset_strcmp () +function is provided as a potential +.I compar +function, useable when the df_subset contains character strings. The call +.RS +.HP +.nh +.ad l +.fam C +.BI df_subset_strcmp( a ", " b ) +.fam +.ad +.hy +.RE +.PP +is equivalent to the +.BR strcmp (3) +call: +.RS +.HP +.nh +.ad l +.fam C +.BI "strcmp((const char*)" a ", *(const char**)" b ")\fR. +.fam +.ad +.hy +.RE +.PP +(ie. it derefences its second parameter). +.PP +No restriction is placed on when these functions may be called in an input +plugin. +.SH RETURN VALUE +The +.BR df_subset_init () +function returns a pointer to a newly created df_subset object, or NULL if a +memory allocation error occurred. The +.BR df_subset_delete () +function returns no value. +.PP +The +.BR df_subset_strcmp () +function returns a number with the same meaning as the return value of +.BR strcmp (3), +as indicated in the +.B DISCUSSION +section above. +.SH SEE ALSO +defile-input(7), +.BR df_subset_contains (3), +.BR df_subset_update (3), +.BR df_subset_reset (3), +.BR strcmp (3). Added: trunk/defile/doc/df_subset_reset.3 =================================================================== --- trunk/defile/doc/df_subset_reset.3 (rev 0) +++ trunk/defile/doc/df_subset_reset.3 2012-08-13 23:22:42 UTC (rev 756) @@ -0,0 +1,68 @@ +.\" df_subset_reset.3. The df_subset_reset man page. +.\" +.\" Copyright (C) 2012 D. V. Wiebe +.\" +.\"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" +.\" +.\" This file is part of the Defile package. +.\" +.\" Permission is granted to copy, distribute and/or modify this document +.\" under the terms of the GNU Free Documentation License, Version 1.2 or +.\" any later version published by the Free Software Foundation; with no +.\" Invariant Sections, with no Front-Cover Texts, and with no Back-Cover +.\" Texts. A copy of the license is included in the `COPYING.DOC' file +.\" as part of this distribution. +.\" +.TH df_subset_reset 3 "10 August 2012" "Version 0.0.0" DEFILE +.SH NAME +df_subset_reset \(em reset the contents of a defile subset object +.SH SYNOPSIS +.nh +.ad l +.fam C +.B #include <defile.h> +.HP +.BI "int df_subset_reset(df_subset *" subset ", int " mode ); +.fam +.ad +.hy +.SH DESCRIPTION +This function is part of the defile input plugin C API. See defile-input(7) +for an overview. +.PP +The +.BR df_subset_reset () +function re-initialises the defile df_subset object +.I subset +according to the +.I mode +parameter given which must be one of: +.TP +.B DF_SUBSET_FULL +the df_subset object is reset to contain all elements from it's containing +superset, +.TP +.B DF_SUBSET_EMPTY +the df_subset object is reset to the empty set, +.TP +.B DF_SUBSET_INIT +the df_subset object is reset to its initial value specified in the call to +.BR df_subset_init (3). +.PP +No restriction is placed on when this function may be called in an input plugin. +.SH RETURN VALUE +The +.BR df_subset_reset () +returns +.BR DF_SUCCESS +(=0) on success or else +.BR DF_INPUT +if the +.I mode +parameter is invalid. +.SH SEE ALSO +defile-input(7), +.BR df_subset_contains (3), +.BR df_subset_delete (3), +.BR df_subset_init (3), +.BR df_subset_update (3). Added: trunk/defile/doc/df_subset_update.3 =================================================================== --- trunk/defile/doc/df_subset_update.3 (rev 0) +++ trunk/defile/doc/df_subset_update.3 2012-08-13 23:22:42 UTC (rev 756) @@ -0,0 +1,82 @@ +.\" df_subset_update.3. The df_subset_update man page. +.\" +.\" Copyright (C) 2012 D. V. Wiebe +.\" +.\"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" +.\" +.\" This file is part of the Defile package. +.\" +.\" Permission is granted to copy, distribute and/or modify this document +.\" under the terms of the GNU Free Documentation License, Version 1.2 or +.\" any later version published by the Free Software Foundation; with no +.\" Invariant Sections, with no Front-Cover Texts, and with no Back-Cover +.\" Texts. A copy of the license is included in the `COPYING.DOC' file +.\" as part of this distribution. +.\" +.TH df_subset_update 3 "10 August 2012" "Version 0.0.0" DEFILE +.SH NAME +df_subset_update \(em modify a defile subset object +.SH SYNOPSIS +.nh +.ad l +.fam C +.B #include <defile.h> +.HP +.BI "int df_subset_update(df_subset *" subset ", const void *" value , +.BI "size_t " len ", int " mode ); +.fam +.ad +.hy +.SH DESCRIPTION +This function is part of the defile input plugin C API. See defile-input(7) +for an overview. +.PP +The +.BR df_subset_update () +function modifies a df_subset object previously created by a call to +.BR df_subset_init (3). +The operation performed is specified by +.IR mode , +which should be either +.B DF_SUBSET_ADD +or +.B DF_SUBSET_DEL +which indicates insertion or removal of the object +.I value +to the subset. This inserted or removed object has a size +.I len +bytes. An attempt to remove an object which is not currently in the subset, or +add one that is, does nothing and succeeds. +.PP +A completely full or completely empty df_subset object is treated specially: +attempting to add an item to a full subset will first cause the subset to be +emptied. Conversely, removing an object from an empty subset will first cause +it to be filled completely. +.PP +No restriction is placed on when this function may be called in an input plugin. +.SH RETURN VALUE +The +.BR df_subset_update () +returns +.BR DF_SUCCESS +(=0) on success or else +.BR DF_SYSTEM +if a memory allocation error occurred. +.SH NOTES +Because the elements of the containing superset are not enumerated, it is not +possible to completely fill an originally empty subset by successive adds, nor +empty an originally full one by successive removals. These states may only +be achieved through +.BR df_subset_init (), +or +.BR df_subset_reset (), +or by undoing all previous +.BR df_subset_update () +calls since the last time the subset was completely full or empty, and so +reverting to that state. +.SH SEE ALSO +defile-input(7), +.BR df_subset_contains (3), +.BR df_subset_delete (3), +.BR df_subset_init (3), +.BR df_subset_reset (3). Modified: trunk/defile/input/dirfile.c =================================================================== --- trunk/defile/input/dirfile.c 2012-08-04 01:42:13 UTC (rev 755) +++ trunk/defile/input/dirfile.c 2012-08-13 23:22:42 UTC (rev 756) @@ -24,9 +24,14 @@ #endif #include "internal.h" +#include <sys/types.h> +#include <sys/stat.h> +#include <fcntl.h> +#include <complex.h> #include <string.h> #include <stdlib.h> #include <stdio.h> +#include <libgen.h> #include <getdata.h> #define DIRFILE_COPYRIGHT "Copyright (C) 2012 D. V. Wiebe" @@ -34,12 +39,22 @@ "Please send reports of bugs and other communication to:\n " PACKAGE_BUGREPORT #define DIRFILE_DESCRIPTION "dirfile databases" +#define DIE() do { \ + fprintf(stderr, "abort in %s @ %s,%i\n", __func__, __FILE__, __LINE__); \ + df_exit(1,1); \ +} while(0) + #define CHUNK_SIZE 65535 /* in bytes, the largest amount of data we're willing to read in one go */ /* globals */ -static DIRFILE *D; +static DIRFILE *D = NULL; +static const char *dirfilename; +static size_t dirfilename_len; static unsigned int nraw; +static int *frag_cnc; +static char **lut_list = NULL; +static int n_lut = 0; static struct dirfile_raw { char *name; int index; @@ -48,8 +63,122 @@ int fpc; /* frames per bufsize */ char *b; /* buffer */ size_t blen; /* current length of data in the buffer in SAMPLES */ + gd_off64_t pos; /* current position (in samples) */ } *raw; +static struct { + df_subset *expand; + int link_ext; + int link_lut; + int flatten; + char *ext_dir; + size_t ext_dir_len; + char *lut_dir; + size_t lut_dir_len; +} conf; + +/* options definition */ +enum { + OPT_EXPAND_ALL = 1, OPT_EXPAND_NONE, OPT_EXPAND, OPT_FLATTEN, OPT_DONT_EXPAND, + OPT_LINK_LUT, OPT_COPY_LUT, OPT_LINK_EXT, OPT_COPY_EXT, OPT_EXT_DIR, + OPT_LUT_DIR, OPT_NO_FLATTEN +}; + +static const struct df_optdef opts[] = { + { OPT_EXPAND_ALL, DF_OPT_NO_ARG, 'E', "expand-all", "ExpandAll", 0, NULL, + "expand all derived channels (turn them into RAW channels)" }, + { OPT_EXPAND_NONE, DF_OPT_NO_ARG, 'E', "expand-none", "ExpandNone", + DF_OPT_PLUS, NULL, "keep all derived channels as-is (default)" }, + { OPT_EXPAND, DF_OPT_ARG_RQ, 'e', "expand", "Expand", 0, "FIELD", + "expand derived channel FIELD (turn it into a RAW channel)" }, + { OPT_DONT_EXPAND, DF_OPT_ARG_RQ, 'e', "dont-expand", "DontExpand", + DF_OPT_PLUS, "FIELD", "don't expand derived channel FIELD" }, + { OPT_FLATTEN, DF_OPT_NO_ARG, 'f', "flatten", "Flatten", 0, NULL, + "merge all fragments into one" }, + { OPT_NO_FLATTEN, DF_OPT_NO_ARG, 'f', "no-flatten", "NoFlatten", DF_OPT_PLUS, + NULL, "don't merge all fragments into one (default)" }, + { OPT_LINK_LUT, DF_OPT_NO_ARG, 'L', "link-extern-lut", "LinkExternLUTs", 0, + NULL, "link to LINTERP tables outside the source dirfile instead of " + "duplicating them" + }, + { OPT_COPY_LUT, DF_OPT_NO_ARG, 'L', "copy-extern-lut", "CopyExternLUTs", + DF_OPT_PLUS, NULL, + "duplicate LINTERP tables outside the source dirfile (default)" }, + { OPT_LINK_EXT, DF_OPT_NO_ARG, 'X', "link-extern-frag", "LinkExternFragments", + 0, NULL, + "link to fragments outside the source dirfile instead of duplicating them" + }, + { OPT_COPY_EXT, DF_OPT_NO_ARG, 'X', "copy-extern-frag", "CopyExternFragments", + DF_OPT_PLUS, NULL, + "duplicate fragments outside the source dirfile (default)" }, + { OPT_EXT_DIR, DF_OPT_ARG_RQ, 0, "ext-dir", "ExtDir", 0, "DIR", + "put external subdirfiles copied into the output in subdirectory DIR. " + "The default is \"<ext>\"" }, + { OPT_LUT_DIR, DF_OPT_ARG_RQ, 0, "lut-dir", "LUTDir", 0, "DIR", + "put LINTERP lookup tables copied into the output in subdirectory DIR. " + "The default is \"<lut>\"" }, + DF_OPT_ENDOPT +}; + +static int parse_config(const struct df_config *config) +{ + int i, n; + char *ptr; + + conf.expand = df_subset_init(DF_SUBSET_EMPTY, df_subset_strcmp); + + for (i = 0; i < config->n_config; ++i) { + switch (config->value[i]) { + case OPT_EXPAND_ALL: + df_subset_reset(conf.expand, DF_SUBSET_FULL); + break; + case OPT_EXPAND_NONE: + df_subset_reset(conf.expand, DF_SUBSET_EMPTY); + break; + case OPT_EXPAND: + df_subset_update(conf.expand, config->arg[i], + strlen(config->arg[i]) + 1, DF_SUBSET_ADD); + break; + case OPT_DONT_EXPAND: + df_subset_update(conf.expand, config->arg[i], + strlen(config->arg[i]) + 1, DF_SUBSET_DEL); + break; + case OPT_LINK_EXT: + conf.link_ext = 1; + break; + case OPT_COPY_EXT: + conf.link_ext = 0; + break; + case OPT_LINK_LUT: + conf.link_lut = 1; + break; + case OPT_COPY_LUT: + conf.link_lut = 0; + break; + case OPT_FLATTEN: + conf.flatten = 1; + break; + case OPT_NO_FLATTEN: + conf.flatten = 0; + break; + default: + fprintf(stderr, "defile-dirfile: internal error: " + "unhandled configuration: %i\n", config->value[i]); + return 1; + } + } + + /* paths */ + if (conf.ext_dir == NULL || conf.ext_dir[0] == 0) + conf.ext_dir = "<ext>"; + if (conf.lut_dir == NULL || conf.lut_dir[0] == 0) + conf.lut_dir = "<lut>"; + conf.ext_dir_len = strlen(conf.ext_dir); + conf.lut_dir_len = strlen(conf.lut_dir); + + return 0; +} + static int dirfile_probe(const char *name) { int take = 1; @@ -74,37 +203,35 @@ } /* clean up the dirfile */ -static int dirfile_cleanup(void) +static int dirfile_abort(void) { unsigned int i; + df_subset_delete(conf.expand); + for (i = 0; i < nraw; ++i) { free(raw[i].name); free(raw[i].b); } free(raw); + free(frag_cnc); + for (i = 0; i < n_lut; ++i) + free(lut_list[i]); + free(lut_list); gd_discard(D); -} -/* abort handler */ -static int dirfile_abort(void) -{ - dirfile_cleanup(); return 0; } -static int dirfile_check_gd_error(int i) +static void check_gd_error(int i) { if (gd_error(D)) { char *err = gd_error_string(D, NULL, 0); - fprintf(stderr, "defile-dirfile: getdata %i: %s\n", i, err); + fprintf(stderr, "defile-dirfile: getdata error line %i: %s\n", i, err); free(err); - dirfile_cleanup(); - return 1; + df_exit(1, 1); } - - return 0; } static ssize_t dirfile_copy_raw(int r, int debug) @@ -116,28 +243,29 @@ if (nf == 0) { /* read a bunch o' data */ - size_t n = gd_getdata(D, raw[r].name, GD_HERE, 0, raw[r].fpc, 0, + size_t n = gd_getdata64(D, raw[r].name, 0, raw[r].pos, raw[r].fpc, 0, raw[r].type, raw[r].b + raw[r].blen * GD_SIZE(raw[r].type)); - if (dirfile_check_gd_error(4)) - return -1; - else if (n == 0) /* out of data, nothing more to do */ + check_gd_error(__LINE__); + + if (n == 0) /* out of data, nothing more to do */ return 0; - + raw[r].blen += n; nf = raw[r].blen / raw[r].spf; if (debug) - fprintf(stderr, "defile-dirfile: read %zi frames of field %s\n", - nf, raw[r].name); + fprintf(stderr, "defile-dirfile: " + "read %zi frames of field %s from sample %llu (fdef #%i)\n", + nf, raw[r].name, (unsigned long long)raw[r].pos, raw[r].index); + + raw[r].pos += n; } /* shove it as much as possible up into defile */ nw = df_push_frame(raw[r].index, nf, raw[r].b, 0); - if (nw < 0) { - dirfile_cleanup(); - return -1; - } + if (nw < 0) + df_exit(1, 1); /* save any trailing part */ raw[r].blen -= nw * raw[r].spf; @@ -147,10 +275,176 @@ return nf; } +/* add a fragment */ +static int add_frag(int i, int ext, const char *fragname) +{ + char *buf, *pbase, *prefix, *suffix; + int pos; + int fragnum, parent; + unsigned long byte_sex, encoding = GD_AUTO_ENCODED; + + byte_sex = gd_endianness(D, i); + check_gd_error(__LINE__); + + parent = gd_parent_fragment(D, i); + check_gd_error(__LINE__); + + gd_fragment_affixes(D, i, &pbase, &suffix); + check_gd_error(__LINE__); + prefix = pbase; + + /* subtract the parent's affixes */ + if (prefix || suffix) { + char *pprefix, *psuffix; + + gd_fragment_affixes(D, parent, &pprefix, &psuffix); + check_gd_error(__LINE__); + + if (pprefix) { + pos = 0; + while (pprefix[pos] && pprefix[pos] == prefix[pos]) + pos++; + + prefix += pos; + free(pprefix); + } + + if (psuffix) { + char *ptr = suffix + strlen(suffix) - 1; + char *pptr = psuffix + strlen(psuffix) - 1; + + while (ptr > suffix && *ptr == *pptr) { + *(ptr--) = 0; + pptr--; + } + + free(psuffix); + } + } + + if (ext) { + if (conf.link_ext) { + if (df_include(fragname, frag_cnc[parent], prefix, suffix)) + df_exit(1, 1); + free(pbase); + free(suffix); + return -1; + } + /* prepend extdir; extract directory and filename */ + buf = malloc(strlen(fragname) + conf.ext_dir_len + 2); + sprintf(buf, "%s%s", conf.ext_dir, fragname); + } else { + pos = 0; + while (fragname[pos] && dirfilename[pos] == fragname[pos]) + pos++; + + if (fragname[pos] == '/') + pos++; + + /* extract directory and filename */ + buf = strdup(fragname + pos); + } + + /* add new fragment */ + fragnum = df_add_fragment(buf, frag_cnc[parent], encoding, byte_sex, prefix, + suffix); + + free(buf); + free(pbase); + free(suffix); + + if (fragnum < 0) + df_exit(1, 1); + + return fragnum; +} + +/* returns true if "path" is outside the input directory tree */ +static int is_extern(const char *path) +{ + return strncmp(path, dirfilename, dirfilename_len); +} + +/* returns true if we're supposed to expand this derived field */ +static int expand(const gd_entry_t *E) +{ + int i; + + /* skip inappropriate field types */ + if (E->field_type == GD_INDEX_ENTRY || (E->field_type & GD_SCALAR_ENTRY_BIT)) + return 0; + + return df_subset_contains(conf.expand, E->field); +} + +/* modify a LUT table path */ +static void update_tablename(gd_entry_t *E) +{ + const char *old_lut; + char *lut; + int i, fd, ext, found = 0; + + old_lut = gd_linterp_tablename(D, E->field); + check_gd_error(__LINE__); + + /* check it exists */ + fd = open(old_lut, O_RDONLY); + if (fd < 0) { + /* if the LUT doesn't exist, we simply do nothing, keeping the old invalid + * path in the field specification */ + return; + } + + ext = is_extern(old_lut); + + /* convert the name, if necessary */ + if ((ext && !conf.link_lut) || conf.flatten) { + size_t old_lut_len = strlen(old_lut); + free(E->table); + E->table = malloc(old_lut_len + conf.lut_dir_len + 2); + sprintf(E->table, "%s%s", conf.lut_dir, old_lut); + lut = malloc(dirfilename_len + old_lut_len + conf.lut_dir_len + 3); + sprintf(lut, "%s/%s", dirfilename, E->table); + } else + lut = strdup(old_lut); + + if (lut == NULL) { + close(fd); + perror("defile-dirfile:"); + df_exit(1, 1); + } + + /* check whether we've already handled this LUT */ + for (i = 0; i < n_lut; ++i) { + if (strcmp(lut, lut_list[i]) == 0) { + found = 1; + break; + } + } + + /* no, add it and copy it to the output dirfile */ + if (!found) { + ... [truncated message content] |
From: <ket...@us...> - 2012-08-04 01:42:19
|
Revision: 755 http://getdata.svn.sourceforge.net/getdata/?rev=755&view=rev Author: ketiltrout Date: 2012-08-04 01:42:13 +0000 (Sat, 04 Aug 2012) Log Message: ----------- Don't unnecessarily resize instring in _GD_ParseFragment. Modified Paths: -------------- trunk/getdata/ChangeLog trunk/getdata/src/parse.c Modified: trunk/getdata/ChangeLog =================================================================== --- trunk/getdata/ChangeLog 2012-08-04 01:30:42 UTC (rev 754) +++ trunk/getdata/ChangeLog 2012-08-04 01:42:13 UTC (rev 755) @@ -1,3 +1,10 @@ +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. Modified: trunk/getdata/src/parse.c =================================================================== --- trunk/getdata/src/parse.c 2012-08-04 01:30:42 UTC (rev 754) +++ trunk/getdata/src/parse.c 2012-08-04 01:42:13 UTC (rev 755) @@ -2306,15 +2306,15 @@ &outstring, tok_pos); if (D->error == GD_E_FORMAT) { - /* we guarantee a buffer size of at least GD_MAX_LINE_LENGTH */ - if (n < GD_MAX_LINE_LENGTH) { - char *ptr = (char *)_GD_Realloc(D, instring, GD_MAX_LINE_LENGTH); - if (ptr == NULL) - break; - instring = ptr; - } /* call the callback for this error */ if (D->sehandler != NULL) { + /* we guarantee a buffer size of at least GD_MAX_LINE_LENGTH */ + if (n < GD_MAX_LINE_LENGTH) { + char *ptr = (char *)_GD_Realloc(D, instring, GD_MAX_LINE_LENGTH); + if (ptr == NULL) + break; + instring = ptr; + } pdata.dirfile = D; pdata.suberror = D->suberror; pdata.linenum = linenum; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ket...@us...> - 2012-08-04 01:30:49
|
Revision: 754 http://getdata.svn.sourceforge.net/getdata/?rev=754&view=rev Author: ketiltrout Date: 2012-08-04 01:30:42 +0000 (Sat, 04 Aug 2012) Log Message: ----------- Plug another memory leak. Modified Paths: -------------- trunk/getdata/src/parse.c trunk/getdata/test/Makefile.am Added Paths: ----------- trunk/getdata/test/parse_include_ref.c Property Changed: ---------------- trunk/getdata/test/ Modified: trunk/getdata/src/parse.c =================================================================== --- trunk/getdata/src/parse.c 2012-08-03 01:04:35 UTC (rev 753) +++ trunk/getdata/src/parse.c 2012-08-04 01:30:42 UTC (rev 754) @@ -2103,6 +2103,7 @@ break; case 'I': if (strcmp(ptr, "INCLUDE") == 0 && (!pedantic || *standards >= 3)) { + char *new_ref = NULL; int frag; unsigned long subflags = D->fragment[me].encoding | D->fragment[me].byte_sex | (*flags & (GD_PEDANTIC | GD_PERMISSIVE @@ -2111,9 +2112,14 @@ matched = 1; frag = _GD_Include(D, in_cols[1], D->fragment[me].cname, linenum, - ref_name, me, (n_cols > 2) ? in_cols[2] : NULL, + &new_ref, me, (n_cols > 2) ? in_cols[2] : NULL, (n_cols > 3) ? in_cols[3] : NULL, standards, &subflags, 0); + if (new_ref) { + free(*ref_name); + *ref_name = new_ref; + } + if ((pedantic = subflags & GD_PEDANTIC)) *flags |= GD_PEDANTIC; if (frag != -1) Property changes on: trunk/getdata/test ___________________________________________________________________ Modified: svn:ignore - Makefile Makefile.in valgrind.log *.o dirfile *.swp *.exe .deps .libs 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_raw_type add_rdonly add_recip add_resolv add_sbit add_scalar add_scalar_carray add_sort add_spec add_spec_affix add_spec_directive add_spec_invalid add_spec_meta add_spec_resolv add_string add_string_affix add_type add_window add_window_op alias_list alias_list_alias alias_list_missing alias_num alias_num_alias alias_num_missing alias_target alias_target_alias alias_target_missing alter_bit_bitnum alter_bit_numbits alter_carray_len alter_carray_type alter_const alter_cpolynom alter_crecip alter_crecip89 alter_crecip_zero alter_divide alter_entry alter_entry_affix alter_entry_hidden alter_entry_recode alter_entry_scalar2a alter_entry_scalar2n alter_entry_scalar3 alter_entry_scalar4 alter_lincom_23 alter_lincom_32 alter_lincom_affix alter_lincom_input alter_lincom_offset alter_lincom_slope alter_linterp alter_linterp_move alter_mplex alter_mspec alter_mspec_affix alter_multiply alter_phase alter_polynom_coeff alter_polynom_input alter_polynom_ord alter_raw_spf alter_raw_type alter_recip alter_recip_zero alter_scalar_affix alter_spec alter_spec_affix alter_spec_meta alter_window ascii_add ascii_get ascii_get_get ascii_nframes ascii_put bof bof_lincom bof_phase bzip_get bzip_get_get bzip_move_from bzip_nframes bzip_put close close_bad close_discard close_null convert_complex128_complex64 convert_complex128_float64 convert_complex128_int64 convert_complex128_uint64 convert_complex64_complex128 convert_complex64_float64 convert_complex64_int64 convert_complex64_uint64 convert_float32_complex128 convert_float32_complex64 convert_float32_float64 convert_float32_int16 convert_float32_int32 convert_float32_int64 convert_float32_int8 convert_float32_uint16 convert_float32_uint32 convert_float32_uint64 convert_float32_uint8 convert_float64_complex128 convert_float64_complex64 convert_float64_float32 convert_float64_int16 convert_float64_int32 convert_float64_int64 convert_float64_int8 convert_float64_uint16 convert_float64_uint32 convert_float64_uint64 convert_float64_uint8 convert_int16_complex128 convert_int16_complex64 convert_int16_float32 convert_int16_float64 convert_int16_int32 convert_int16_int64 convert_int16_int8 convert_int16_uint16 convert_int16_uint32 convert_int16_uint64 convert_int16_uint8 convert_int32_complex128 convert_int32_complex64 convert_int32_float32 convert_int32_float64 convert_int32_int16 convert_int32_int64 convert_int32_int8 convert_int32_uint16 convert_int32_uint32 convert_int32_uint64 convert_int32_uint8 convert_int64_complex128 convert_int64_complex64 convert_int64_float32 convert_int64_float64 convert_int64_int16 convert_int64_int32 convert_int64_int8 convert_int64_uint16 convert_int64_uint32 convert_int64_uint64 convert_int64_uint8 convert_int8_complex128 convert_int8_complex64 convert_int8_float32 convert_int8_float64 convert_int8_int16 convert_int8_int32 convert_int8_int64 convert_int8_uint16 convert_int8_uint32 convert_int8_uint64 convert_int8_uint8 convert_uint16_complex128 convert_uint16_complex64 convert_uint16_float32 convert_uint16_float64 convert_uint16_int16 convert_uint16_int32 convert_uint16_int64 convert_uint16_int8 convert_uint16_uint32 convert_uint16_uint64 convert_uint16_uint8 convert_uint32_complex128 convert_uint32_complex64 convert_uint32_float32 convert_uint32_float64 convert_uint32_int16 convert_uint32_int32 convert_uint32_int64 convert_uint32_int8 convert_uint32_uint16 convert_uint32_uint64 convert_uint32_uint8 convert_uint64_complex128 convert_uint64_complex64 convert_uint64_float32 convert_uint64_float64 convert_uint64_int16 convert_uint64_int32 convert_uint64_int64 convert_uint64_int8 convert_uint64_uint16 convert_uint64_uint32 convert_uint64_uint8 convert_uint8_complex128 convert_uint8_complex64 convert_uint8_float32 convert_uint8_float64 convert_uint8_int16 convert_uint8_int32 convert_uint8_int64 convert_uint8_int8 convert_uint8_uint16 convert_uint8_uint32 convert_uint8_uint64 creat creat_excl creat_rdonly cvlist cvlist_array cvlist_array_hidden cvlist_array_meta cvlist_array_meta_hidden cvlist_hidden cvlist_invalid cvlist_meta cvlist_meta_hidden cvlist_meta_invalid del del_carray del_carray_deref del_const del_const_deref del_const_force del_data del_derived del_derived_after del_derived_force del_meta del_meta_force desync desync_flush desync_reopen desync_reopen_inv dfes_bit dfes_divide dfes_lincom dfes_linterp dfes_multiply dfes_null dfes_phase dfes_raw dfes_recip dfes_zero elist_alias elist_hidden elist_noalias elist_scalar encode_alter encode_get encode_move endian_alter endian_alter_sie endian_get endian_move entry_bad_code entry_bit entry_bit_scalar entry_divide entry_invalid entry_lincom entry_lincom_scalar entry_linterp entry_mplex entry_mplex_scalar entry_multiply entry_phase entry_phase_scalar entry_polynom entry_polynom_scalar entry_raw entry_raw_scalar entry_raw_scalar_code entry_raw_scalar_type entry_recip entry_scalar_repr entry_type entry_type_alias entry_window entry_window_scalar eof eof_index eof_lincom eof_phase error error_error error_num error_short error_verbose error_verbose_prefix file file_code file_type flist flist_hidden flist_invalid flist_meta flist_meta_hidden flist_meta_invalid flist_type flist_type_hidden flist_type_invalid flist_type_meta flist_type_meta_hidden flist_type_meta_invalid flush flush_all flush_bad_code flush_invalid flush_meta flush_spec foffs_alter foffs_get foffs_move fragment_affix fragment_affix_alter fragment_affix_alter2 fragment_affix_dup fragment_index fragment_index_alias fragment_name fragment_name_oor fragment_num fragment_parent 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_endian16 get_endian32 get_endian64 get_endian8 get_endian_complex128_arm get_endian_complex128_big get_endian_complex128_little get_endian_complex64_arm get_endian_complex64_big get_endian_complex64_little get_endian_float32_arm get_endian_float32_big get_endian_float32_little get_endian_float64_arm get_endian_float64_big get_endian_float64_little get_ff get_float32 get_float64 get_foffs get_fs get_here get_here_foffs get_heres get_int16 get_int32 get_int64 get_int8 get_invalid get_lincom1 get_lincom2 get_lincom3 get_lincom_noin get_lincom_non get_lincom_null get_lincom_spf get_linterp get_linterp_noin get_linterp_notab get_linterp_sort get_mplex 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_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 get_window_ne get_window_set get_zero global_flags global_name global_ref global_ref_empty global_ref_set gzip_add gzip_get gzip_get_get gzip_get_put gzip_move_from gzip_move_to gzip_nframes gzip_put gzip_put_get header_complex hide hide_hidden hide_unhide include include_accmode include_affix include_auto include_cb include_creat include_ignore include_index include_invalid include_nonexistent include_pc include_ref include_syntax index index_domain index_range legacy_get legacy_get_put legacy_get_rofs legacy_nframes legacy_nonexistent legacy_put legacy_spf lzma_get lzma_nframes madd madd_affix madd_alias madd_alias_affix madd_bit madd_bit_invalid madd_carray madd_clincom madd_const madd_cpolynom madd_crecip madd_crecip89 madd_divide madd_index madd_lincom madd_lincom_invalid madd_linterp madd_linterp_invalid madd_mplex madd_multiply madd_multiply_invalid madd_phase madd_phase_invalid madd_polynom madd_recip madd_sbit madd_spec madd_spec_directive madd_spec_invalid madd_spec_resolv madd_string madd_window move move_affix move_affix_dup move_alias move_data_enc_ar move_data_enc_ra move_data_endian move_data_foffs move_data_nop move_index move_meta move_protect move_subdir name name_affix name_affix_bad name_alias name_dup name_move name_move_alias name_updb name_updb_alias name_updb_const name_updb_const_alias nentries_alias nentries_hidden nentries_noalias nentries_scalar nfields nfields_hidden nfields_invalid nfields_type nfields_type_hidden nfields_type_invalid nfields_vector nfields_vector_hidden nfields_vector_invalid nframes nframes64 nframes_empty nframes_invalid nframes_off64 nframes_spf nmeta nmeta_hidden nmeta_invalid nmeta_parent nmeta_type nmeta_type_hidden nmeta_type_invalid nmeta_type_parent nmeta_vectors nmeta_vectors_del nmeta_vectors_hidden nmeta_vectors_invalid nmeta_vectors_parent open open_abs open_cb_abort open_cb_cont open_cb_ignore open_cb_invalid open_cb_rescan open_eaccess open_nonexistent open_notdirfile parse_alias parse_alias_code parse_alias_dup parse_alias_meta parse_alias_missing parse_badline parse_bit parse_bit4 parse_bit_bitnum parse_bit_bitsize parse_bit_ncols parse_bit_numbits parse_bit_scalar parse_carray parse_carray_long parse_const parse_const_complex parse_const_ncols parse_divide 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_hidden_field parse_hidden_meta parse_include parse_include_absolute parse_include_absrel parse_include_dir parse_include_loop parse_include_nonexistent parse_include_prefix parse_include_prefix_dup parse_include_preprefix parse_include_relabs parse_include_relrel parse_include_slash parse_include_suffix parse_include_sufsuffix parse_index parse_lincom parse_lincom_ncols1 parse_lincom_ncols2 parse_lincom_nfields parse_lincom_nofields parse_lincom_non parse_lincom_non_ncols parse_lincom_scalar parse_linterp parse_linterp_ncols parse_malias parse_malias_dup parse_malias_meta parse_meta parse_meta_affix parse_meta_alias parse_meta_implicit parse_meta_implicit2 parse_meta_implicit_affix parse_meta_index parse_meta_index2 parse_meta_jump parse_meta_malias parse_meta_meta parse_meta_parent parse_meta_raw parse_mplex parse_mplex_ncols parse_mplex_nomax parse_mplex_scalar parse_multiply parse_multiply_ncols parse_name parse_name_dot parse_name_ext parse_name_pedantic parse_ncols parse_phase parse_phase_ncols parse_phase_scalar parse_polynom parse_polynom_ncols1 parse_polynom_ncols2 parse_polynom_scalar parse_protect_all parse_protect_bad parse_protect_data parse_protect_format parse_protect_none parse_quote 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_version_89 parse_version_98 parse_version_include parse_version_p8 parse_version_p9 parse_version_permissive parse_version_slash parse_whitespace parse_window parse_window_ncols parse_window_op parse_window_scalar protect_alter protect_get put64 put_bad_code put_bit put_bof put_carray put_carray_slice put_char put_complex128 put_complex64 put_const put_const_protect put_divide put_endian16 put_endian32 put_endian64 put_endian8 put_endian_complex128_arm put_endian_complex128_big put_endian_complex128_little put_endian_complex64_arm put_endian_complex64_big put_endian_complex64_little put_endian_float32_arm put_endian_float32_big put_endian_float32_little put_endian_float64_arm put_endian_float64_big put_endian_float64_little put_ff put_float32 put_float64 put_foffs put_fs put_here put_heres put_int16 put_int32 put_int64 put_int8 put_invalid put_lincom1 put_lincom2 put_lincom_noin put_linterp put_linterp_noin put_linterp_nomono put_linterp_notab put_linterp_reverse put_mplex put_multiply put_null put_off64 put_phase put_phase_noin put_polynom1 put_polynom2 put_polynom_noin put_protect put_rdonly put_recip put_recurse put_repr put_rofs put_sbit put_sf put_ss put_string put_string_protect put_type put_uint16 put_uint32 put_uint64 put_window put_zero ref ref_none ref_two repr_a repr_float32 repr_float64 repr_i repr_int16 repr_int32 repr_int64 repr_int8 repr_m repr_r repr_real_a repr_real_i repr_real_m repr_real_r repr_uint16 repr_uint32 repr_uint64 repr_uint8 seek64 seek_cur seek_end seek_foffs seek_set sie_get_big sie_get_little sie_move_from sie_move_to sie_nframes_big sie_nframes_little sie_put_big sie_put_little slim_get slim_nframes slim_put spf spf_alias spf_alias_meta spf_alias_missing spf_divide spf_lincom spf_multiply spf_polynom spf_recip spf_recurse svlist svlist_hidden svlist_invalid svlist_meta svlist_meta_hidden svlist_meta_invalid table table_code table_type tell tell64 trunc trunc_dir trunc_rdonly trunc_rofs trunc_truncsub unclude unclude_del unclude_move version_0 version_0_write version_1 version_1_write version_2 version_2_write version_3 version_3_write version_4 version_4_write version_5 version_5_strict version_5_write version_6 version_6_strict version_6_write version_7 version_7_strict version_7_write version_8 version_8_strict version_8_write version_9 version_9_strict version_9_write vlist vlist_alias vlist_hidden vlist_invalid vlist_meta vlist_meta_hidden vlist_meta_invalid xz_get xz_nframes zzip_data zzip_get zzip_get_get zzip_nframes zzslim_get zzslim_nframes + Makefile Makefile.in valgrind.log *.o dirfile *.swp *.exe .deps .libs 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_raw_type add_rdonly add_recip add_resolv add_sbit add_scalar add_scalar_carray add_sort add_spec add_spec_affix add_spec_directive add_spec_invalid add_spec_meta add_spec_resolv add_string add_string_affix add_type add_window add_window_op alias_list alias_list_alias alias_list_missing alias_num alias_num_alias alias_num_missing alias_target alias_target_alias alias_target_missing alter_bit_bitnum alter_bit_numbits alter_carray_len alter_carray_type alter_const alter_cpolynom alter_crecip alter_crecip89 alter_crecip_zero alter_divide alter_entry alter_entry_affix alter_entry_hidden alter_entry_recode alter_entry_scalar2a alter_entry_scalar2n alter_entry_scalar3 alter_entry_scalar4 alter_lincom_23 alter_lincom_32 alter_lincom_affix alter_lincom_input alter_lincom_offset alter_lincom_slope alter_linterp alter_linterp_move alter_mplex alter_mspec alter_mspec_affix alter_multiply alter_phase alter_polynom_coeff alter_polynom_input alter_polynom_ord alter_raw_spf alter_raw_type alter_recip alter_recip_zero alter_scalar_affix alter_spec alter_spec_affix alter_spec_meta alter_window ascii_add ascii_get ascii_get_get ascii_nframes ascii_put bof bof_lincom bof_phase bzip_get bzip_get_get bzip_move_from bzip_nframes bzip_put close close_bad close_discard close_null convert_complex128_complex64 convert_complex128_float64 convert_complex128_int64 convert_complex128_uint64 convert_complex64_complex128 convert_complex64_float64 convert_complex64_int64 convert_complex64_uint64 convert_float32_complex128 convert_float32_complex64 convert_float32_float64 convert_float32_int16 convert_float32_int32 convert_float32_int64 convert_float32_int8 convert_float32_uint16 convert_float32_uint32 convert_float32_uint64 convert_float32_uint8 convert_float64_complex128 convert_float64_complex64 convert_float64_float32 convert_float64_int16 convert_float64_int32 convert_float64_int64 convert_float64_int8 convert_float64_uint16 convert_float64_uint32 convert_float64_uint64 convert_float64_uint8 convert_int16_complex128 convert_int16_complex64 convert_int16_float32 convert_int16_float64 convert_int16_int32 convert_int16_int64 convert_int16_int8 convert_int16_uint16 convert_int16_uint32 convert_int16_uint64 convert_int16_uint8 convert_int32_complex128 convert_int32_complex64 convert_int32_float32 convert_int32_float64 convert_int32_int16 convert_int32_int64 convert_int32_int8 convert_int32_uint16 convert_int32_uint32 convert_int32_uint64 convert_int32_uint8 convert_int64_complex128 convert_int64_complex64 convert_int64_float32 convert_int64_float64 convert_int64_int16 convert_int64_int32 convert_int64_int8 convert_int64_uint16 convert_int64_uint32 convert_int64_uint64 convert_int64_uint8 convert_int8_complex128 convert_int8_complex64 convert_int8_float32 convert_int8_float64 convert_int8_int16 convert_int8_int32 convert_int8_int64 convert_int8_uint16 convert_int8_uint32 convert_int8_uint64 convert_int8_uint8 convert_uint16_complex128 convert_uint16_complex64 convert_uint16_float32 convert_uint16_float64 convert_uint16_int16 convert_uint16_int32 convert_uint16_int64 convert_uint16_int8 convert_uint16_uint32 convert_uint16_uint64 convert_uint16_uint8 convert_uint32_complex128 convert_uint32_complex64 convert_uint32_float32 convert_uint32_float64 convert_uint32_int16 convert_uint32_int32 convert_uint32_int64 convert_uint32_int8 convert_uint32_uint16 convert_uint32_uint64 convert_uint32_uint8 convert_uint64_complex128 convert_uint64_complex64 convert_uint64_float32 convert_uint64_float64 convert_uint64_int16 convert_uint64_int32 convert_uint64_int64 convert_uint64_int8 convert_uint64_uint16 convert_uint64_uint32 convert_uint64_uint8 convert_uint8_complex128 convert_uint8_complex64 convert_uint8_float32 convert_uint8_float64 convert_uint8_int16 convert_uint8_int32 convert_uint8_int64 convert_uint8_int8 convert_uint8_uint16 convert_uint8_uint32 convert_uint8_uint64 creat creat_excl creat_rdonly cvlist cvlist_array cvlist_array_hidden cvlist_array_meta cvlist_array_meta_hidden cvlist_hidden cvlist_invalid cvlist_meta cvlist_meta_hidden cvlist_meta_invalid del del_carray del_carray_deref del_const del_const_deref del_const_force del_data del_derived del_derived_after del_derived_force del_meta del_meta_force desync desync_flush desync_reopen desync_reopen_inv dfes_bit dfes_divide dfes_lincom dfes_linterp dfes_multiply dfes_null dfes_phase dfes_raw dfes_recip dfes_zero elist_alias elist_hidden elist_noalias elist_scalar encode_alter encode_get encode_move endian_alter endian_alter_sie endian_get endian_move entry_bad_code entry_bit entry_bit_scalar entry_divide entry_invalid entry_lincom entry_lincom_scalar entry_linterp entry_mplex entry_mplex_scalar entry_multiply entry_phase entry_phase_scalar entry_polynom entry_polynom_scalar entry_raw entry_raw_scalar entry_raw_scalar_code entry_raw_scalar_type entry_recip entry_scalar_repr entry_type entry_type_alias entry_window entry_window_scalar eof eof_index eof_lincom eof_phase error error_error error_num error_short error_verbose error_verbose_prefix file file_code file_type flist flist_hidden flist_invalid flist_meta flist_meta_hidden flist_meta_invalid flist_type flist_type_hidden flist_type_invalid flist_type_meta flist_type_meta_hidden flist_type_meta_invalid flush flush_all flush_bad_code flush_invalid flush_meta flush_spec foffs_alter foffs_get foffs_move fragment_affix fragment_affix_alter fragment_affix_alter2 fragment_affix_dup fragment_index fragment_index_alias fragment_name fragment_name_oor fragment_num fragment_parent 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_endian16 get_endian32 get_endian64 get_endian8 get_endian_complex128_arm get_endian_complex128_big get_endian_complex128_little get_endian_complex64_arm get_endian_complex64_big get_endian_complex64_little get_endian_float32_arm get_endian_float32_big get_endian_float32_little get_endian_float64_arm get_endian_float64_big get_endian_float64_little get_ff get_float32 get_float64 get_foffs get_fs get_here get_here_foffs get_heres get_int16 get_int32 get_int64 get_int8 get_invalid get_lincom1 get_lincom2 get_lincom3 get_lincom_noin get_lincom_non get_lincom_null get_lincom_spf get_linterp get_linterp_noin get_linterp_notab get_linterp_sort get_mplex 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_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 get_window_ne get_window_set get_zero global_flags global_name global_ref global_ref_empty global_ref_set gzip_add gzip_get gzip_get_get gzip_get_put gzip_move_from gzip_move_to gzip_nframes gzip_put gzip_put_get header_complex hide hide_hidden hide_unhide include include_accmode include_affix include_auto include_cb include_creat include_ignore include_index include_invalid include_nonexistent include_pc include_ref include_syntax index index_domain index_range legacy_get legacy_get_put legacy_get_rofs legacy_nframes legacy_nonexistent legacy_put legacy_spf lzma_get lzma_nframes madd madd_affix madd_alias madd_alias_affix madd_bit madd_bit_invalid madd_carray madd_clincom madd_const madd_cpolynom madd_crecip madd_crecip89 madd_divide madd_index madd_lincom madd_lincom_invalid madd_linterp madd_linterp_invalid madd_mplex madd_multiply madd_multiply_invalid madd_phase madd_phase_invalid madd_polynom madd_recip madd_sbit madd_spec madd_spec_directive madd_spec_invalid madd_spec_resolv madd_string madd_window move move_affix move_affix_dup move_alias move_data_enc_ar move_data_enc_ra move_data_endian move_data_foffs move_data_nop move_index move_meta move_protect move_subdir name name_affix name_affix_bad name_alias name_dup name_move name_move_alias name_updb name_updb_alias name_updb_const name_updb_const_alias nentries_alias nentries_hidden nentries_noalias nentries_scalar nfields nfields_hidden nfields_invalid nfields_type nfields_type_hidden nfields_type_invalid nfields_vector nfields_vector_hidden nfields_vector_invalid nframes nframes64 nframes_empty nframes_invalid nframes_off64 nframes_spf nmeta nmeta_hidden nmeta_invalid nmeta_parent nmeta_type nmeta_type_hidden nmeta_type_invalid nmeta_type_parent nmeta_vectors nmeta_vectors_del nmeta_vectors_hidden nmeta_vectors_invalid nmeta_vectors_parent open open_abs open_cb_abort open_cb_cont open_cb_ignore open_cb_invalid open_cb_rescan open_eaccess open_nonexistent open_notdirfile parse_alias parse_alias_code parse_alias_dup parse_alias_meta parse_alias_missing parse_badline parse_bit parse_bit4 parse_bit_bitnum parse_bit_bitsize parse_bit_ncols parse_bit_numbits parse_bit_scalar parse_carray parse_carray_long parse_const parse_const_complex parse_const_ncols parse_divide 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_hidden_field parse_hidden_meta parse_include parse_include_absolute parse_include_absrel parse_include_dir parse_include_loop parse_include_nonexistent parse_include_prefix parse_include_prefix_dup parse_include_preprefix parse_include_ref parse_include_relabs parse_include_relrel parse_include_slash parse_include_suffix parse_include_sufsuffix parse_index parse_lincom parse_lincom_ncols1 parse_lincom_ncols2 parse_lincom_nfields parse_lincom_nofields parse_lincom_non parse_lincom_non_ncols parse_lincom_scalar parse_linterp parse_linterp_ncols parse_malias parse_malias_dup parse_malias_meta parse_meta parse_meta_affix parse_meta_alias parse_meta_implicit parse_meta_implicit2 parse_meta_implicit_affix parse_meta_index parse_meta_index2 parse_meta_jump parse_meta_malias parse_meta_meta parse_meta_parent parse_meta_raw parse_mplex parse_mplex_ncols parse_mplex_nomax parse_mplex_scalar parse_multiply parse_multiply_ncols parse_name parse_name_dot parse_name_ext parse_name_pedantic parse_ncols parse_phase parse_phase_ncols parse_phase_scalar parse_polynom parse_polynom_ncols1 parse_polynom_ncols2 parse_polynom_scalar parse_protect_all parse_protect_bad parse_protect_data parse_protect_format parse_protect_none parse_quote 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_version_89 parse_version_98 parse_version_include parse_version_p8 parse_version_p9 parse_version_permissive parse_version_slash parse_whitespace parse_window parse_window_ncols parse_window_op parse_window_scalar protect_alter protect_get put64 put_bad_code put_bit put_bof put_carray put_carray_slice put_char put_complex128 put_complex64 put_const put_const_protect put_divide put_endian16 put_endian32 put_endian64 put_endian8 put_endian_complex128_arm put_endian_complex128_big put_endian_complex128_little put_endian_complex64_arm put_endian_complex64_big put_endian_complex64_little put_endian_float32_arm put_endian_float32_big put_endian_float32_little put_endian_float64_arm put_endian_float64_big put_endian_float64_little put_ff put_float32 put_float64 put_foffs put_fs put_here put_heres put_int16 put_int32 put_int64 put_int8 put_invalid put_lincom1 put_lincom2 put_lincom_noin put_linterp put_linterp_noin put_linterp_nomono put_linterp_notab put_linterp_reverse put_mplex put_multiply put_null put_off64 put_phase put_phase_noin put_polynom1 put_polynom2 put_polynom_noin put_protect put_rdonly put_recip put_recurse put_repr put_rofs put_sbit put_sf put_ss put_string put_string_protect put_type put_uint16 put_uint32 put_uint64 put_window put_zero ref ref_none ref_two repr_a repr_float32 repr_float64 repr_i repr_int16 repr_int32 repr_int64 repr_int8 repr_m repr_r repr_real_a repr_real_i repr_real_m repr_real_r repr_uint16 repr_uint32 repr_uint64 repr_uint8 seek64 seek_cur seek_end seek_foffs seek_set sie_get_big sie_get_little sie_move_from sie_move_to sie_nframes_big sie_nframes_little sie_put_big sie_put_little slim_get slim_nframes slim_put spf spf_alias spf_alias_meta spf_alias_missing spf_divide spf_lincom spf_multiply spf_polynom spf_recip spf_recurse svlist svlist_hidden svlist_invalid svlist_meta svlist_meta_hidden svlist_meta_invalid table table_code table_type tell tell64 trunc trunc_dir trunc_rdonly trunc_rofs trunc_truncsub unclude unclude_del unclude_move version_0 version_0_write version_1 version_1_write version_2 version_2_write version_3 version_3_write version_4 version_4_write version_5 version_5_strict version_5_write version_6 version_6_strict version_6_write version_7 version_7_strict version_7_write version_8 version_8_strict version_8_write version_9 version_9_strict version_9_write vlist vlist_alias vlist_hidden vlist_invalid vlist_meta vlist_meta_hidden vlist_meta_invalid xz_get xz_nframes zzip_data zzip_get zzip_get_get zzip_nframes zzslim_get zzslim_nframes Modified: trunk/getdata/test/Makefile.am =================================================================== --- trunk/getdata/test/Makefile.am 2012-08-03 01:04:35 UTC (rev 753) +++ trunk/getdata/test/Makefile.am 2012-08-04 01:30:42 UTC (rev 754) @@ -261,9 +261,9 @@ parse_include_absolute parse_include_absrel parse_include_dir \ parse_include_loop parse_include_nonexistent parse_include_prefix \ parse_include_prefix_dup parse_include_preprefix \ - parse_include_relabs parse_include_relrel parse_include_slash \ - parse_include_suffix parse_include_sufsuffix parse_index \ - parse_lincom parse_lincom_ncols1 parse_lincom_ncols2 \ + parse_include_ref parse_include_relabs parse_include_relrel \ + parse_include_slash parse_include_suffix parse_include_sufsuffix \ + parse_index parse_lincom parse_lincom_ncols1 parse_lincom_ncols2 \ parse_lincom_nfields parse_lincom_nofields parse_lincom_non \ parse_lincom_non_ncols parse_lincom_scalar parse_linterp \ parse_linterp_ncols parse_malias parse_malias_dup \ Added: trunk/getdata/test/parse_include_ref.c =================================================================== --- trunk/getdata/test/parse_include_ref.c (rev 0) +++ trunk/getdata/test/parse_include_ref.c 2012-08-04 01:30:42 UTC (rev 754) @@ -0,0 +1,66 @@ +/* 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 + */ +/* Test include */ +#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 *format1 = "dirfile/format1"; + const char *format_data = + "data RAW UINT8 1\n" + "/REFERENCE data\n" + "INCLUDE format1\n"; + const char *format1_data = "zata RAW UINT8 11\n/REFERENCE zata\n"; + int fd, r = 0; + DIRFILE *D; + const char *ref; + + rmdirfile(); + mkdir(filedir, 0777); + + fd = open(format, O_CREAT | O_EXCL | O_WRONLY, 0666); + write(fd, format_data, strlen(format_data)); + close(fd); + + fd = open(format1, O_CREAT | O_EXCL | O_WRONLY, 0666); + write(fd, format1_data, strlen(format1_data)); + close(fd); + + D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); + ref = gd_reference(D, NULL); + CHECKS(ref, "zata"); + gd_close(D); + + unlink(format1); + 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...> - 2012-08-03 01:04:42
|
Revision: 753 http://getdata.svn.sourceforge.net/getdata/?rev=753&view=rev Author: ketiltrout Date: 2012-08-03 01:04:35 +0000 (Fri, 03 Aug 2012) Log Message: ----------- * Reject non-files in /INCLUDE statements * Doc updates. Modified Paths: -------------- trunk/getdata/ChangeLog trunk/getdata/NEWS trunk/getdata/configure.ac trunk/getdata/man/gd_fragment_affixes.3 trunk/getdata/src/include.c trunk/getdata/test/Makefile.am trunk/getdata/util/checkdirfile.c Added Paths: ----------- trunk/getdata/test/parse_include_dir.c Property Changed: ---------------- trunk/getdata/test/ Modified: trunk/getdata/ChangeLog =================================================================== --- trunk/getdata/ChangeLog 2012-08-02 02:46:15 UTC (rev 752) +++ trunk/getdata/ChangeLog 2012-08-03 01:04:35 UTC (rev 753) @@ -1,3 +1,6 @@ +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. Modified: trunk/getdata/NEWS =================================================================== --- trunk/getdata/NEWS 2012-08-02 02:46:15 UTC (rev 752) +++ trunk/getdata/NEWS 2012-08-03 01:04:35 UTC (rev 753) @@ -13,6 +13,9 @@ * 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. + * WIN32 BUG FIX: On Windows, the parser can now properly handle hexadecimal floating point. Modified: trunk/getdata/configure.ac =================================================================== --- trunk/getdata/configure.ac 2012-08-02 02:46:15 UTC (rev 752) +++ trunk/getdata/configure.ac 2012-08-03 01:04:35 UTC (rev 753) @@ -1,4 +1,4 @@ -dnl Copyright (C) 2008-2011 D. V. Wiebe +dnl Copyright (C) 2008-2012 D. V. Wiebe dnl dnllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllll dnl @@ -23,6 +23,15 @@ AC_INIT([GetData],[getdata_version],[get...@li...]) +AC_COPYRIGHT( +[Parts of this program are copyright (C) 2008-2012 D. V. Wiebe. + +These parts may be redistributed and/or modified 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. +See the file COPYING for details.] +) + AC_DEFINE([GETDATA_MAJOR], [getdata_major], [ The major version number ]) AC_DEFINE([GETDATA_MINOR], [getdata_minor], [ The minor version number ]) AC_DEFINE([GETDATA_REVISION], [getdata_revision], [ The revision number ]) @@ -325,6 +334,7 @@ esac AC_MSG_RESULT([$gd_unaligned_ok]) +dnl FDIRSEP is used in Fortran, where '\' should not be escaped. AC_MSG_CHECKING([the directory separator]) case "${host}" in *-*-djgpp|*-*-mingw32) GD_FDIRSEP=\\; GD_DIRSEP=\\\\ ;; Modified: trunk/getdata/man/gd_fragment_affixes.3 =================================================================== --- trunk/getdata/man/gd_fragment_affixes.3 2012-08-02 02:46:15 UTC (rev 752) +++ trunk/getdata/man/gd_fragment_affixes.3 2012-08-03 01:04:35 UTC (rev 753) @@ -13,7 +13,7 @@ .\" Texts. A copy of the license is included in the `COPYING.DOC' file .\" as part of this distribution. .\" -.TH gd_fragment_affix 3 "1 January 2012" "Version 0.8.0" "GETDATA" +.TH gd_fragment_affix 3 "2 August 2012" "Version 0.8.1" "GETDATA" .SH NAME gd_fragment_affix \(em report the field affixes of a fragment of a dirfile database .SH SYNOPSIS @@ -50,7 +50,7 @@ .SH RETURN VALUE Upon successful completion, .BR gd_fragment_affix () -returns zero. The prefix and suffix are reported in +returns zero. If non-empty, the prefix and suffix are reported in .BR malloc (3)'d buffers whose addresses are returned in .BI * prefix @@ -58,6 +58,8 @@ .BI * suffix\fR. They should be deallocated by the caller when no longer needed by calling .BR free (3). +If the fragment prefix or suffix is the empty string, NULL is returned in the +corresponding pointer. On error, -1 is returned and sets the dirfile error to a non-zero error value. In this case, the values of Modified: trunk/getdata/src/include.c =================================================================== --- trunk/getdata/src/include.c 2012-08-02 02:46:15 UTC (rev 752) +++ trunk/getdata/src/include.c 2012-08-03 01:04:35 UTC (rev 753) @@ -90,8 +90,8 @@ int old_standards = *standards; int old_pedantic = *flags & GD_PEDANTIC; int dirfd = -1; - char *temp_buf1, *temp_buf2, *sname; - char *base, *prefix = NULL, *suffix = NULL; + char *temp_buf1 = NULL, *temp_buf2, *sname = NULL; + char *base = NULL, *prefix = NULL, *suffix = NULL; void *ptr = NULL; FILE* new_fp = NULL; time_t mtime = 0; @@ -104,86 +104,68 @@ if (++D->recurse_level >= GD_MAX_RECURSE_LEVEL) { _GD_SetError(D, GD_E_RECURSE_LEVEL, GD_E_RECURSE_INCLUDE, format_file, linenum, ename); - D->recurse_level--; - dreturn("%i", 0); - return 0; + goto include_error; } if (_GD_SetFieldAffixes(D, me, prefix_in, suffix_in, old_standards, old_pedantic, format_file, linenum, &prefix, &suffix)) { - free(suffix); - D->recurse_level--; - dreturn("%i", -1); - return -1; + goto include_error; } /* isolate filename */ temp_buf2 = _GD_Strdup(D, ename); - if (temp_buf2 == NULL) { - free(prefix); - free(suffix); - D->recurse_level--; - dreturn("%i", -1); - return -1; - } + if (temp_buf2 == NULL) + goto include_error; base = _GD_Strdup(D, basename(temp_buf2)); - if (base == NULL) { - free(temp_buf2); - free(prefix); - free(suffix); - D->recurse_level--; - dreturn("%i", -1); - return -1; - } free(temp_buf2); + if (base == NULL) + goto include_error; /* isolate relative path */ temp_buf2 = _GD_Strdup(D, ename); - if (temp_buf2 == NULL) { - free(base); - free(prefix); - free(suffix); - D->recurse_level--; - dreturn("%i", -1); - return -1; - } + if (temp_buf2 == NULL) + goto include_error; sname = _GD_Strdup(D, dirname(temp_buf2)); - if (sname == NULL) { - free(temp_buf2); - free(base); - free(prefix); - free(suffix); - D->recurse_level--; - dreturn("%i", -1); - return -1; - } free(temp_buf2); + if (sname == NULL) + goto include_error; /* Open the containing directory */ dirfd = _GD_GrabDir(D, D->fragment[me].dirfd, ename); if (dirfd == -1 && D->error == GD_E_OK) _GD_SetError(D, GD_E_OPEN_FRAGMENT, errno, format_file, linenum, ename); - if (D->error) { - free(prefix); - free(suffix); - free(sname); - D->recurse_level--; - dreturn("%i", -1); - return -1; - } + if (D->error) + goto include_error; temp_buf1 = _GD_MakeFullPath(D, dirfd, base, 1); if (temp_buf1 == NULL) { _GD_ReleaseDir(D, dirfd); - free(prefix); - free(suffix); - free(sname); - D->recurse_level--; - dreturn("%i", -1); - return -1; + goto include_error; } + /* Reject weird stuff */ + if (gd_StatAt(D, dirfd, base, &statbuf, 0)) { + if (!(*flags & GD_CREAT)) { + _GD_SetError(D, GD_E_OPEN_FRAGMENT, errno, format_file, linenum, + temp_buf1); + _GD_ReleaseDir(D, dirfd); + goto include_error; + } + } else { + if (S_ISDIR(statbuf.st_mode)) { + _GD_SetError(D, GD_E_OPEN_FRAGMENT, EISDIR, format_file, linenum, + temp_buf1); + _GD_ReleaseDir(D, dirfd); + goto include_error; + } else if (!S_ISREG(statbuf.st_mode)) { + _GD_SetError(D, GD_E_OPEN_FRAGMENT, EINVAL, format_file, linenum, + temp_buf1); + _GD_ReleaseDir(D, dirfd); + goto include_error; + } + } + /* Try to open the file */ i = gd_OpenAt(D, dirfd, base, (((D->flags & GD_ACCMODE) == GD_RDWR) ? O_RDWR : O_RDONLY) | ((*flags & GD_CREAT) ? O_CREAT : 0) | @@ -193,14 +175,8 @@ if (i < 0) { _GD_SetError(D, GD_E_OPEN_FRAGMENT, errno, format_file, linenum, temp_buf1); - free(prefix); - free(suffix); - free(base); - free(sname); - free(temp_buf1); - D->recurse_level--; - dreturn("%i", -1); - return -1; + _GD_ReleaseDir(D, dirfd); + goto include_error; } new_fp = fdopen(i, ((D->flags & GD_ACCMODE) == GD_RDWR) ? "rb+" : "rb"); @@ -208,14 +184,8 @@ /* If opening the file failed, set the error code and abort parsing. */ if (new_fp == NULL) { _GD_SetError(D, GD_E_OPEN_FRAGMENT, errno, format_file, linenum, temp_buf1); - free(prefix); - free(suffix); - free(base); - free(sname); - free(temp_buf1); - D->recurse_level--; - dreturn("%i", -1); - return -1; + _GD_ReleaseDir(D, dirfd); + goto include_error; } /* fstat the file and record the mtime */ @@ -226,16 +196,9 @@ ptr = _GD_Realloc(D, D->fragment, (++D->n_fragment) * sizeof(struct gd_fragment_t)); if (ptr == NULL) { + _GD_ReleaseDir(D, dirfd); D->n_fragment--; - fclose(new_fp); - free(prefix); - free(suffix); - free(base); - free(sname); - free(temp_buf1); - D->recurse_level--; - dreturn("%i", -1); - return -1; + goto include_error; } D->fragment = (struct gd_fragment_t *)ptr; @@ -285,12 +248,10 @@ /* catch alloc errors */ if (D->error) { D->n_fragment--; + temp_buf1 = prefix = suffix = base = NULL; fclose(new_fp); - free(prefix); - free(suffix); - D->recurse_level--; - dreturn("%i", -1); - return -1; + _GD_ReleaseDir(D, dirfd); + goto include_error; } *ref_name = _GD_ParseFragment(new_fp, D, D->n_fragment - 1, standards, flags, @@ -311,6 +272,16 @@ D->recurse_level--; dreturn("%i", D->n_fragment - 1); return D->n_fragment - 1; + +include_error: + free(prefix); + free(suffix); + free(base); + free(sname); + free(temp_buf1); + D->recurse_level--; + dreturn("%i", -1); + return -1; } int gd_include_affix(DIRFILE* D, const char* file, int fragment_index, Property changes on: trunk/getdata/test ___________________________________________________________________ Modified: svn:ignore - Makefile Makefile.in valgrind.log *.o dirfile *.swp *.exe .deps .libs 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_raw_type add_rdonly add_recip add_resolv add_sbit add_scalar add_scalar_carray add_sort add_spec add_spec_affix add_spec_directive add_spec_invalid add_spec_meta add_spec_resolv add_string add_string_affix add_type add_window add_window_op alias_list alias_list_alias alias_list_missing alias_num alias_num_alias alias_num_missing alias_target alias_target_alias alias_target_missing alter_bit_bitnum alter_bit_numbits alter_carray_len alter_carray_type alter_const alter_cpolynom alter_crecip alter_crecip89 alter_crecip_zero alter_divide alter_entry alter_entry_affix alter_entry_hidden alter_entry_recode alter_entry_scalar2a alter_entry_scalar2n alter_entry_scalar3 alter_entry_scalar4 alter_lincom_23 alter_lincom_32 alter_lincom_affix alter_lincom_input alter_lincom_offset alter_lincom_slope alter_linterp alter_linterp_move alter_mplex alter_mspec alter_mspec_affix alter_multiply alter_phase alter_polynom_coeff alter_polynom_input alter_polynom_ord alter_raw_spf alter_raw_type alter_recip alter_recip_zero alter_scalar_affix alter_spec alter_spec_affix alter_spec_meta alter_window ascii_add ascii_get ascii_get_get ascii_nframes ascii_put bof bof_lincom bof_phase bzip_get bzip_get_get bzip_move_from bzip_nframes bzip_put close close_bad close_discard close_null convert_complex128_complex64 convert_complex128_float64 convert_complex128_int64 convert_complex128_uint64 convert_complex64_complex128 convert_complex64_float64 convert_complex64_int64 convert_complex64_uint64 convert_float32_complex128 convert_float32_complex64 convert_float32_float64 convert_float32_int16 convert_float32_int32 convert_float32_int64 convert_float32_int8 convert_float32_uint16 convert_float32_uint32 convert_float32_uint64 convert_float32_uint8 convert_float64_complex128 convert_float64_complex64 convert_float64_float32 convert_float64_int16 convert_float64_int32 convert_float64_int64 convert_float64_int8 convert_float64_uint16 convert_float64_uint32 convert_float64_uint64 convert_float64_uint8 convert_int16_complex128 convert_int16_complex64 convert_int16_float32 convert_int16_float64 convert_int16_int32 convert_int16_int64 convert_int16_int8 convert_int16_uint16 convert_int16_uint32 convert_int16_uint64 convert_int16_uint8 convert_int32_complex128 convert_int32_complex64 convert_int32_float32 convert_int32_float64 convert_int32_int16 convert_int32_int64 convert_int32_int8 convert_int32_uint16 convert_int32_uint32 convert_int32_uint64 convert_int32_uint8 convert_int64_complex128 convert_int64_complex64 convert_int64_float32 convert_int64_float64 convert_int64_int16 convert_int64_int32 convert_int64_int8 convert_int64_uint16 convert_int64_uint32 convert_int64_uint64 convert_int64_uint8 convert_int8_complex128 convert_int8_complex64 convert_int8_float32 convert_int8_float64 convert_int8_int16 convert_int8_int32 convert_int8_int64 convert_int8_uint16 convert_int8_uint32 convert_int8_uint64 convert_int8_uint8 convert_uint16_complex128 convert_uint16_complex64 convert_uint16_float32 convert_uint16_float64 convert_uint16_int16 convert_uint16_int32 convert_uint16_int64 convert_uint16_int8 convert_uint16_uint32 convert_uint16_uint64 convert_uint16_uint8 convert_uint32_complex128 convert_uint32_complex64 convert_uint32_float32 convert_uint32_float64 convert_uint32_int16 convert_uint32_int32 convert_uint32_int64 convert_uint32_int8 convert_uint32_uint16 convert_uint32_uint64 convert_uint32_uint8 convert_uint64_complex128 convert_uint64_complex64 convert_uint64_float32 convert_uint64_float64 convert_uint64_int16 convert_uint64_int32 convert_uint64_int64 convert_uint64_int8 convert_uint64_uint16 convert_uint64_uint32 convert_uint64_uint8 convert_uint8_complex128 convert_uint8_complex64 convert_uint8_float32 convert_uint8_float64 convert_uint8_int16 convert_uint8_int32 convert_uint8_int64 convert_uint8_int8 convert_uint8_uint16 convert_uint8_uint32 convert_uint8_uint64 creat creat_excl creat_rdonly cvlist cvlist_array cvlist_array_hidden cvlist_array_meta cvlist_array_meta_hidden cvlist_hidden cvlist_invalid cvlist_meta cvlist_meta_hidden cvlist_meta_invalid del del_carray del_carray_deref del_const del_const_deref del_const_force del_data del_derived del_derived_after del_derived_force del_meta del_meta_force desync desync_flush desync_reopen desync_reopen_inv dfes_bit dfes_divide dfes_lincom dfes_linterp dfes_multiply dfes_null dfes_phase dfes_raw dfes_recip dfes_zero elist_alias elist_hidden elist_noalias elist_scalar encode_alter encode_get encode_move endian_alter endian_alter_sie endian_get endian_move entry_bad_code entry_bit entry_bit_scalar entry_divide entry_invalid entry_lincom entry_lincom_scalar entry_linterp entry_mplex entry_mplex_scalar entry_multiply entry_phase entry_phase_scalar entry_polynom entry_polynom_scalar entry_raw entry_raw_scalar entry_raw_scalar_code entry_raw_scalar_type entry_recip entry_scalar_repr entry_type entry_type_alias entry_window entry_window_scalar eof eof_index eof_lincom eof_phase error error_error error_num error_short error_verbose error_verbose_prefix file file_code file_type flist flist_hidden flist_invalid flist_meta flist_meta_hidden flist_meta_invalid flist_type flist_type_hidden flist_type_invalid flist_type_meta flist_type_meta_hidden flist_type_meta_invalid flush flush_all flush_bad_code flush_invalid flush_meta flush_spec foffs_alter foffs_get foffs_move fragment_affix fragment_affix_alter fragment_affix_alter2 fragment_affix_dup fragment_index fragment_index_alias fragment_name fragment_name_oor fragment_num fragment_parent 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_endian16 get_endian32 get_endian64 get_endian8 get_endian_complex128_arm get_endian_complex128_big get_endian_complex128_little get_endian_complex64_arm get_endian_complex64_big get_endian_complex64_little get_endian_float32_arm get_endian_float32_big get_endian_float32_little get_endian_float64_arm get_endian_float64_big get_endian_float64_little get_ff get_float32 get_float64 get_foffs get_fs get_here get_here_foffs get_heres get_int16 get_int32 get_int64 get_int8 get_invalid get_lincom1 get_lincom2 get_lincom3 get_lincom_noin get_lincom_non get_lincom_null get_lincom_spf get_linterp get_linterp_noin get_linterp_notab get_linterp_sort get_mplex 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_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 get_window_ne get_window_set get_zero global_flags global_name global_ref global_ref_empty global_ref_set gzip_add gzip_get gzip_get_get gzip_get_put gzip_move_from gzip_move_to gzip_nframes gzip_put gzip_put_get header_complex hide hide_hidden hide_unhide include include_accmode include_affix include_auto include_cb include_creat include_ignore include_index include_invalid include_nonexistent include_pc include_ref include_syntax index index_domain index_range legacy_get legacy_get_put legacy_get_rofs legacy_nframes legacy_nonexistent legacy_put legacy_spf lzma_get lzma_nframes madd madd_affix madd_alias madd_alias_affix madd_bit madd_bit_invalid madd_carray madd_clincom madd_const madd_cpolynom madd_crecip madd_crecip89 madd_divide madd_index madd_lincom madd_lincom_invalid madd_linterp madd_linterp_invalid madd_mplex madd_multiply madd_multiply_invalid madd_phase madd_phase_invalid madd_polynom madd_recip madd_sbit madd_spec madd_spec_directive madd_spec_invalid madd_spec_resolv madd_string madd_window move move_affix move_affix_dup move_alias move_data_enc_ar move_data_enc_ra move_data_endian move_data_foffs move_data_nop move_index move_meta move_protect move_subdir name name_affix name_affix_bad name_alias name_dup name_move name_move_alias name_updb name_updb_alias name_updb_const name_updb_const_alias nentries_alias nentries_hidden nentries_noalias nentries_scalar nfields nfields_hidden nfields_invalid nfields_type nfields_type_hidden nfields_type_invalid nfields_vector nfields_vector_hidden nfields_vector_invalid nframes nframes64 nframes_empty nframes_invalid nframes_off64 nframes_spf nmeta nmeta_hidden nmeta_invalid nmeta_parent nmeta_type nmeta_type_hidden nmeta_type_invalid nmeta_type_parent nmeta_vectors nmeta_vectors_del nmeta_vectors_hidden nmeta_vectors_invalid nmeta_vectors_parent open open_abs open_cb_abort open_cb_cont open_cb_ignore open_cb_invalid open_cb_rescan open_eaccess open_nonexistent open_notdirfile parse_alias parse_alias_code parse_alias_dup parse_alias_meta parse_alias_missing parse_badline parse_bit parse_bit4 parse_bit_bitnum parse_bit_bitsize parse_bit_ncols parse_bit_numbits parse_bit_scalar parse_carray parse_carray_long parse_const parse_const_complex parse_const_ncols parse_divide 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_hidden_field parse_hidden_meta parse_include parse_include_absolute parse_include_absrel parse_include_loop parse_include_nonexistent parse_include_prefix parse_include_prefix_dup parse_include_preprefix parse_include_relabs parse_include_relrel parse_include_slash parse_include_suffix parse_include_sufsuffix parse_index parse_lincom parse_lincom_ncols1 parse_lincom_ncols2 parse_lincom_nfields parse_lincom_nofields parse_lincom_non parse_lincom_non_ncols parse_lincom_scalar parse_linterp parse_linterp_ncols parse_malias parse_malias_dup parse_malias_meta parse_meta parse_meta_affix parse_meta_alias parse_meta_implicit parse_meta_implicit2 parse_meta_implicit_affix parse_meta_index parse_meta_index2 parse_meta_jump parse_meta_malias parse_meta_meta parse_meta_parent parse_meta_raw parse_mplex parse_mplex_ncols parse_mplex_nomax parse_mplex_scalar parse_multiply parse_multiply_ncols parse_name parse_name_dot parse_name_ext parse_name_pedantic parse_ncols parse_phase parse_phase_ncols parse_phase_scalar parse_polynom parse_polynom_ncols1 parse_polynom_ncols2 parse_polynom_scalar parse_protect_all parse_protect_bad parse_protect_data parse_protect_format parse_protect_none parse_quote 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_version_89 parse_version_98 parse_version_include parse_version_p8 parse_version_p9 parse_version_permissive parse_version_slash parse_whitespace parse_window parse_window_ncols parse_window_op parse_window_scalar protect_alter protect_get put64 put_bad_code put_bit put_bof put_carray put_carray_slice put_char put_complex128 put_complex64 put_const put_const_protect put_divide put_endian16 put_endian32 put_endian64 put_endian8 put_endian_complex128_arm put_endian_complex128_big put_endian_complex128_little put_endian_complex64_arm put_endian_complex64_big put_endian_complex64_little put_endian_float32_arm put_endian_float32_big put_endian_float32_little put_endian_float64_arm put_endian_float64_big put_endian_float64_little put_ff put_float32 put_float64 put_foffs put_fs put_here put_heres put_int16 put_int32 put_int64 put_int8 put_invalid put_lincom1 put_lincom2 put_lincom_noin put_linterp put_linterp_noin put_linterp_nomono put_linterp_notab put_linterp_reverse put_mplex put_multiply put_null put_off64 put_phase put_phase_noin put_polynom1 put_polynom2 put_polynom_noin put_protect put_rdonly put_recip put_recurse put_repr put_rofs put_sbit put_sf put_ss put_string put_string_protect put_type put_uint16 put_uint32 put_uint64 put_window put_zero ref ref_none ref_two repr_a repr_float32 repr_float64 repr_i repr_int16 repr_int32 repr_int64 repr_int8 repr_m repr_r repr_real_a repr_real_i repr_real_m repr_real_r repr_uint16 repr_uint32 repr_uint64 repr_uint8 seek64 seek_cur seek_end seek_foffs seek_set sie_get_big sie_get_little sie_move_from sie_move_to sie_nframes_big sie_nframes_little sie_put_big sie_put_little slim_get slim_nframes slim_put spf spf_alias spf_alias_meta spf_alias_missing spf_divide spf_lincom spf_multiply spf_polynom spf_recip spf_recurse svlist svlist_hidden svlist_invalid svlist_meta svlist_meta_hidden svlist_meta_invalid table table_code table_type tell tell64 trunc trunc_dir trunc_rdonly trunc_rofs trunc_truncsub unclude unclude_del unclude_move version_0 version_0_write version_1 version_1_write version_2 version_2_write version_3 version_3_write version_4 version_4_write version_5 version_5_strict version_5_write version_6 version_6_strict version_6_write version_7 version_7_strict version_7_write version_8 version_8_strict version_8_write version_9 version_9_strict version_9_write vlist vlist_alias vlist_hidden vlist_invalid vlist_meta vlist_meta_hidden vlist_meta_invalid xz_get xz_nframes zzip_data zzip_get zzip_get_get zzip_nframes zzslim_get zzslim_nframes + Makefile Makefile.in valgrind.log *.o dirfile *.swp *.exe .deps .libs 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_raw_type add_rdonly add_recip add_resolv add_sbit add_scalar add_scalar_carray add_sort add_spec add_spec_affix add_spec_directive add_spec_invalid add_spec_meta add_spec_resolv add_string add_string_affix add_type add_window add_window_op alias_list alias_list_alias alias_list_missing alias_num alias_num_alias alias_num_missing alias_target alias_target_alias alias_target_missing alter_bit_bitnum alter_bit_numbits alter_carray_len alter_carray_type alter_const alter_cpolynom alter_crecip alter_crecip89 alter_crecip_zero alter_divide alter_entry alter_entry_affix alter_entry_hidden alter_entry_recode alter_entry_scalar2a alter_entry_scalar2n alter_entry_scalar3 alter_entry_scalar4 alter_lincom_23 alter_lincom_32 alter_lincom_affix alter_lincom_input alter_lincom_offset alter_lincom_slope alter_linterp alter_linterp_move alter_mplex alter_mspec alter_mspec_affix alter_multiply alter_phase alter_polynom_coeff alter_polynom_input alter_polynom_ord alter_raw_spf alter_raw_type alter_recip alter_recip_zero alter_scalar_affix alter_spec alter_spec_affix alter_spec_meta alter_window ascii_add ascii_get ascii_get_get ascii_nframes ascii_put bof bof_lincom bof_phase bzip_get bzip_get_get bzip_move_from bzip_nframes bzip_put close close_bad close_discard close_null convert_complex128_complex64 convert_complex128_float64 convert_complex128_int64 convert_complex128_uint64 convert_complex64_complex128 convert_complex64_float64 convert_complex64_int64 convert_complex64_uint64 convert_float32_complex128 convert_float32_complex64 convert_float32_float64 convert_float32_int16 convert_float32_int32 convert_float32_int64 convert_float32_int8 convert_float32_uint16 convert_float32_uint32 convert_float32_uint64 convert_float32_uint8 convert_float64_complex128 convert_float64_complex64 convert_float64_float32 convert_float64_int16 convert_float64_int32 convert_float64_int64 convert_float64_int8 convert_float64_uint16 convert_float64_uint32 convert_float64_uint64 convert_float64_uint8 convert_int16_complex128 convert_int16_complex64 convert_int16_float32 convert_int16_float64 convert_int16_int32 convert_int16_int64 convert_int16_int8 convert_int16_uint16 convert_int16_uint32 convert_int16_uint64 convert_int16_uint8 convert_int32_complex128 convert_int32_complex64 convert_int32_float32 convert_int32_float64 convert_int32_int16 convert_int32_int64 convert_int32_int8 convert_int32_uint16 convert_int32_uint32 convert_int32_uint64 convert_int32_uint8 convert_int64_complex128 convert_int64_complex64 convert_int64_float32 convert_int64_float64 convert_int64_int16 convert_int64_int32 convert_int64_int8 convert_int64_uint16 convert_int64_uint32 convert_int64_uint64 convert_int64_uint8 convert_int8_complex128 convert_int8_complex64 convert_int8_float32 convert_int8_float64 convert_int8_int16 convert_int8_int32 convert_int8_int64 convert_int8_uint16 convert_int8_uint32 convert_int8_uint64 convert_int8_uint8 convert_uint16_complex128 convert_uint16_complex64 convert_uint16_float32 convert_uint16_float64 convert_uint16_int16 convert_uint16_int32 convert_uint16_int64 convert_uint16_int8 convert_uint16_uint32 convert_uint16_uint64 convert_uint16_uint8 convert_uint32_complex128 convert_uint32_complex64 convert_uint32_float32 convert_uint32_float64 convert_uint32_int16 convert_uint32_int32 convert_uint32_int64 convert_uint32_int8 convert_uint32_uint16 convert_uint32_uint64 convert_uint32_uint8 convert_uint64_complex128 convert_uint64_complex64 convert_uint64_float32 convert_uint64_float64 convert_uint64_int16 convert_uint64_int32 convert_uint64_int64 convert_uint64_int8 convert_uint64_uint16 convert_uint64_uint32 convert_uint64_uint8 convert_uint8_complex128 convert_uint8_complex64 convert_uint8_float32 convert_uint8_float64 convert_uint8_int16 convert_uint8_int32 convert_uint8_int64 convert_uint8_int8 convert_uint8_uint16 convert_uint8_uint32 convert_uint8_uint64 creat creat_excl creat_rdonly cvlist cvlist_array cvlist_array_hidden cvlist_array_meta cvlist_array_meta_hidden cvlist_hidden cvlist_invalid cvlist_meta cvlist_meta_hidden cvlist_meta_invalid del del_carray del_carray_deref del_const del_const_deref del_const_force del_data del_derived del_derived_after del_derived_force del_meta del_meta_force desync desync_flush desync_reopen desync_reopen_inv dfes_bit dfes_divide dfes_lincom dfes_linterp dfes_multiply dfes_null dfes_phase dfes_raw dfes_recip dfes_zero elist_alias elist_hidden elist_noalias elist_scalar encode_alter encode_get encode_move endian_alter endian_alter_sie endian_get endian_move entry_bad_code entry_bit entry_bit_scalar entry_divide entry_invalid entry_lincom entry_lincom_scalar entry_linterp entry_mplex entry_mplex_scalar entry_multiply entry_phase entry_phase_scalar entry_polynom entry_polynom_scalar entry_raw entry_raw_scalar entry_raw_scalar_code entry_raw_scalar_type entry_recip entry_scalar_repr entry_type entry_type_alias entry_window entry_window_scalar eof eof_index eof_lincom eof_phase error error_error error_num error_short error_verbose error_verbose_prefix file file_code file_type flist flist_hidden flist_invalid flist_meta flist_meta_hidden flist_meta_invalid flist_type flist_type_hidden flist_type_invalid flist_type_meta flist_type_meta_hidden flist_type_meta_invalid flush flush_all flush_bad_code flush_invalid flush_meta flush_spec foffs_alter foffs_get foffs_move fragment_affix fragment_affix_alter fragment_affix_alter2 fragment_affix_dup fragment_index fragment_index_alias fragment_name fragment_name_oor fragment_num fragment_parent 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_endian16 get_endian32 get_endian64 get_endian8 get_endian_complex128_arm get_endian_complex128_big get_endian_complex128_little get_endian_complex64_arm get_endian_complex64_big get_endian_complex64_little get_endian_float32_arm get_endian_float32_big get_endian_float32_little get_endian_float64_arm get_endian_float64_big get_endian_float64_little get_ff get_float32 get_float64 get_foffs get_fs get_here get_here_foffs get_heres get_int16 get_int32 get_int64 get_int8 get_invalid get_lincom1 get_lincom2 get_lincom3 get_lincom_noin get_lincom_non get_lincom_null get_lincom_spf get_linterp get_linterp_noin get_linterp_notab get_linterp_sort get_mplex 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_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 get_window_ne get_window_set get_zero global_flags global_name global_ref global_ref_empty global_ref_set gzip_add gzip_get gzip_get_get gzip_get_put gzip_move_from gzip_move_to gzip_nframes gzip_put gzip_put_get header_complex hide hide_hidden hide_unhide include include_accmode include_affix include_auto include_cb include_creat include_ignore include_index include_invalid include_nonexistent include_pc include_ref include_syntax index index_domain index_range legacy_get legacy_get_put legacy_get_rofs legacy_nframes legacy_nonexistent legacy_put legacy_spf lzma_get lzma_nframes madd madd_affix madd_alias madd_alias_affix madd_bit madd_bit_invalid madd_carray madd_clincom madd_const madd_cpolynom madd_crecip madd_crecip89 madd_divide madd_index madd_lincom madd_lincom_invalid madd_linterp madd_linterp_invalid madd_mplex madd_multiply madd_multiply_invalid madd_phase madd_phase_invalid madd_polynom madd_recip madd_sbit madd_spec madd_spec_directive madd_spec_invalid madd_spec_resolv madd_string madd_window move move_affix move_affix_dup move_alias move_data_enc_ar move_data_enc_ra move_data_endian move_data_foffs move_data_nop move_index move_meta move_protect move_subdir name name_affix name_affix_bad name_alias name_dup name_move name_move_alias name_updb name_updb_alias name_updb_const name_updb_const_alias nentries_alias nentries_hidden nentries_noalias nentries_scalar nfields nfields_hidden nfields_invalid nfields_type nfields_type_hidden nfields_type_invalid nfields_vector nfields_vector_hidden nfields_vector_invalid nframes nframes64 nframes_empty nframes_invalid nframes_off64 nframes_spf nmeta nmeta_hidden nmeta_invalid nmeta_parent nmeta_type nmeta_type_hidden nmeta_type_invalid nmeta_type_parent nmeta_vectors nmeta_vectors_del nmeta_vectors_hidden nmeta_vectors_invalid nmeta_vectors_parent open open_abs open_cb_abort open_cb_cont open_cb_ignore open_cb_invalid open_cb_rescan open_eaccess open_nonexistent open_notdirfile parse_alias parse_alias_code parse_alias_dup parse_alias_meta parse_alias_missing parse_badline parse_bit parse_bit4 parse_bit_bitnum parse_bit_bitsize parse_bit_ncols parse_bit_numbits parse_bit_scalar parse_carray parse_carray_long parse_const parse_const_complex parse_const_ncols parse_divide 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_hidden_field parse_hidden_meta parse_include parse_include_absolute parse_include_absrel parse_include_dir parse_include_loop parse_include_nonexistent parse_include_prefix parse_include_prefix_dup parse_include_preprefix parse_include_relabs parse_include_relrel parse_include_slash parse_include_suffix parse_include_sufsuffix parse_index parse_lincom parse_lincom_ncols1 parse_lincom_ncols2 parse_lincom_nfields parse_lincom_nofields parse_lincom_non parse_lincom_non_ncols parse_lincom_scalar parse_linterp parse_linterp_ncols parse_malias parse_malias_dup parse_malias_meta parse_meta parse_meta_affix parse_meta_alias parse_meta_implicit parse_meta_implicit2 parse_meta_implicit_affix parse_meta_index parse_meta_index2 parse_meta_jump parse_meta_malias parse_meta_meta parse_meta_parent parse_meta_raw parse_mplex parse_mplex_ncols parse_mplex_nomax parse_mplex_scalar parse_multiply parse_multiply_ncols parse_name parse_name_dot parse_name_ext parse_name_pedantic parse_ncols parse_phase parse_phase_ncols parse_phase_scalar parse_polynom parse_polynom_ncols1 parse_polynom_ncols2 parse_polynom_scalar parse_protect_all parse_protect_bad parse_protect_data parse_protect_format parse_protect_none parse_quote 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_version_89 parse_version_98 parse_version_include parse_version_p8 parse_version_p9 parse_version_permissive parse_version_slash parse_whitespace parse_window parse_window_ncols parse_window_op parse_window_scalar protect_alter protect_get put64 put_bad_code put_bit put_bof put_carray put_carray_slice put_char put_complex128 put_complex64 put_const put_const_protect put_divide put_endian16 put_endian32 put_endian64 put_endian8 put_endian_complex128_arm put_endian_complex128_big put_endian_complex128_little put_endian_complex64_arm put_endian_complex64_big put_endian_complex64_little put_endian_float32_arm put_endian_float32_big put_endian_float32_little put_endian_float64_arm put_endian_float64_big put_endian_float64_little put_ff put_float32 put_float64 put_foffs put_fs put_here put_heres put_int16 put_int32 put_int64 put_int8 put_invalid put_lincom1 put_lincom2 put_lincom_noin put_linterp put_linterp_noin put_linterp_nomono put_linterp_notab put_linterp_reverse put_mplex put_multiply put_null put_off64 put_phase put_phase_noin put_polynom1 put_polynom2 put_polynom_noin put_protect put_rdonly put_recip put_recurse put_repr put_rofs put_sbit put_sf put_ss put_string put_string_protect put_type put_uint16 put_uint32 put_uint64 put_window put_zero ref ref_none ref_two repr_a repr_float32 repr_float64 repr_i repr_int16 repr_int32 repr_int64 repr_int8 repr_m repr_r repr_real_a repr_real_i repr_real_m repr_real_r repr_uint16 repr_uint32 repr_uint64 repr_uint8 seek64 seek_cur seek_end seek_foffs seek_set sie_get_big sie_get_little sie_move_from sie_move_to sie_nframes_big sie_nframes_little sie_put_big sie_put_little slim_get slim_nframes slim_put spf spf_alias spf_alias_meta spf_alias_missing spf_divide spf_lincom spf_multiply spf_polynom spf_recip spf_recurse svlist svlist_hidden svlist_invalid svlist_meta svlist_meta_hidden svlist_meta_invalid table table_code table_type tell tell64 trunc trunc_dir trunc_rdonly trunc_rofs trunc_truncsub unclude unclude_del unclude_move version_0 version_0_write version_1 version_1_write version_2 version_2_write version_3 version_3_write version_4 version_4_write version_5 version_5_strict version_5_write version_6 version_6_strict version_6_write version_7 version_7_strict version_7_write version_8 version_8_strict version_8_write version_9 version_9_strict version_9_write vlist vlist_alias vlist_hidden vlist_invalid vlist_meta vlist_meta_hidden vlist_meta_invalid xz_get xz_nframes zzip_data zzip_get zzip_get_get zzip_nframes zzslim_get zzslim_nframes Modified: trunk/getdata/test/Makefile.am =================================================================== --- trunk/getdata/test/Makefile.am 2012-08-02 02:46:15 UTC (rev 752) +++ trunk/getdata/test/Makefile.am 2012-08-03 01:04:35 UTC (rev 753) @@ -258,8 +258,8 @@ parse_endian_little parse_endian_slash parse_eol parse_foffs \ parse_foffs_include parse_foffs_slash parse_hidden \ parse_hidden_field parse_hidden_meta parse_include \ - parse_include_absolute parse_include_absrel parse_include_loop \ - parse_include_nonexistent parse_include_prefix \ + parse_include_absolute parse_include_absrel parse_include_dir \ + parse_include_loop parse_include_nonexistent parse_include_prefix \ parse_include_prefix_dup parse_include_preprefix \ parse_include_relabs parse_include_relrel parse_include_slash \ parse_include_suffix parse_include_sufsuffix parse_index \ Added: trunk/getdata/test/parse_include_dir.c =================================================================== --- trunk/getdata/test/parse_include_dir.c (rev 0) +++ trunk/getdata/test/parse_include_dir.c 2012-08-03 01:04:35 UTC (rev 753) @@ -0,0 +1,58 @@ +/* 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" + +#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 *subdir = "dirfile/sub"; + const char *format = "dirfile/format"; + const char *format_data = "INCLUDE sub\n"; + int fd, error, r = 0; + DIRFILE *D; + + rmdirfile(); + mkdir(filedir, 0777); + mkdir(subdir, 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); + error = gd_error(D); + gd_close(D); + + unlink(format); + rmdir(subdir); + rmdir(filedir); + + CHECKI(error, GD_E_OPEN_FRAGMENT); + return r; +} Modified: trunk/getdata/util/checkdirfile.c =================================================================== --- trunk/getdata/util/checkdirfile.c 2012-08-02 02:46:15 UTC (rev 752) +++ trunk/getdata/util/checkdirfile.c 2012-08-03 01:04:35 UTC (rev 753) @@ -58,13 +58,14 @@ if (argc < 2 || !strcmp(argv[1], "--version") || !strcmp(argv[1], "--help")) { printf("Usage:\n" - " checkdirfile DIRFILE Check the DirFile database " + " checkdirfile DIRFILE Check the DirFile database " "DIRFILE for\n" - " errors.\n" - " checkdirfile [ --help | --version] Print this message and exit.\n" + " errors.\n" + " checkdirfile [ --help | --version ] Print this message and exit.\n" "\n\n" - "This program is part of %s. Copyright (C) 2008-2010 D. V. Wiebe\n" - "Please send reports of bugs and other communication to:\n %s\n\n" + "This program is part of %s.\n" + "Copyright (C) 2008-2010, 2012 D. V. Wiebe\n" + "Please send reports of bugs and other communication to:\n\n %s\n\n" "This program comes with NO WARRANTY, not even for MERCHANTABILITY " "or FITNESS\n" "FOR A PARTICULAR PURPOSE. You may redistribute it under the terms of " This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ket...@us...> - 2012-08-02 02:46:24
|
Revision: 752 http://getdata.svn.sourceforge.net/getdata/?rev=752&view=rev Author: ketiltrout Date: 2012-08-02 02:46:15 +0000 (Thu, 02 Aug 2012) Log Message: ----------- * Make gd_dirfilename() return the full path. Since a third party may modify symlinks, the caller can't otherwise determine the path to the dirfile that was actually opened. * Added gd_linterp_tablename() for the same reasons. * Fix post-0.8.0 bug in _GD_Add. Modified Paths: -------------- trunk/getdata/ChangeLog trunk/getdata/NEWS trunk/getdata/bindings/cxx/dirfile.cpp trunk/getdata/bindings/cxx/getdata/dirfile.h trunk/getdata/bindings/cxx/test/big_test.cpp trunk/getdata/bindings/f77/fgetdata.c trunk/getdata/bindings/f77/fgetdata.h trunk/getdata/bindings/f77/getdata.f.in trunk/getdata/bindings/f77/getdata.f90.in trunk/getdata/bindings/f77/test/big_test.f trunk/getdata/bindings/f77/test/big_test95.f90 trunk/getdata/bindings/idl/getdata.c trunk/getdata/bindings/idl/test/big_test.pro trunk/getdata/bindings/perl/simple_funcs.pl trunk/getdata/bindings/perl/simple_funcs.xsin trunk/getdata/bindings/perl/test/big_test.t trunk/getdata/bindings/python/pydirfile.c trunk/getdata/bindings/python/test/big_test.py trunk/getdata/doc/list.tests trunk/getdata/man/Makefile.am trunk/getdata/man/gd_dirfilename.3 trunk/getdata/src/add.c trunk/getdata/src/entry.c trunk/getdata/src/getdata.h.in trunk/getdata/src/globals.c trunk/getdata/test/Makefile.am trunk/getdata/test/global_name.c Added Paths: ----------- trunk/getdata/man/gd_linterp_tablename.3 trunk/getdata/test/table.c trunk/getdata/test/table_code.c trunk/getdata/test/table_type.c Property Changed: ---------------- trunk/getdata/test/ Modified: trunk/getdata/ChangeLog =================================================================== --- trunk/getdata/ChangeLog 2012-07-26 22:01:36 UTC (rev 751) +++ trunk/getdata/ChangeLog 2012-08-02 02:46:15 UTC (rev 752) @@ -1,3 +1,23 @@ +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. Modified: trunk/getdata/NEWS =================================================================== --- trunk/getdata/NEWS 2012-07-26 22:01:36 UTC (rev 751) +++ trunk/getdata/NEWS 2012-08-02 02:46:15 UTC (rev 752) @@ -25,6 +25,12 @@ metdata (gd_add(), gd_alter_entry(), &c.), supplied field codes must also contain the appropriate suffixes. + * gd_dirfilename() now returns a fully canonicalised version of the dirfile + path. + + * A new function, gd_linterp_tablename() has been added which returns a fully + canonicalised version of the look-up table pathname for a LINTERP. + * 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. Modified: trunk/getdata/bindings/cxx/dirfile.cpp =================================================================== --- trunk/getdata/bindings/cxx/dirfile.cpp 2012-07-26 22:01:36 UTC (rev 751) +++ trunk/getdata/bindings/cxx/dirfile.cpp 2012-08-02 02:46:15 UTC (rev 752) @@ -566,3 +566,8 @@ { return gd_entry_list(D, parent, type, flags); } + +char* Dirfile::LinterpTableName(const char *field_code) +{ + return gd_linterp_tablename(D, field_code); +} Modified: trunk/getdata/bindings/cxx/getdata/dirfile.h =================================================================== --- trunk/getdata/bindings/cxx/getdata/dirfile.h 2012-07-26 22:01:36 UTC (rev 751) +++ trunk/getdata/bindings/cxx/getdata/dirfile.h 2012-08-02 02:46:15 UTC (rev 752) @@ -178,6 +178,8 @@ const char* prefix = NULL, const char* suffix = NULL, unsigned long flags = 0) const; + char *LinterpTableName(const char *field_code); + int MAdd(GetData::Entry &entry, const char *parent) const; int MAddAlias(const char* parent, const char* name, const char* target) Modified: trunk/getdata/bindings/cxx/test/big_test.cpp =================================================================== --- trunk/getdata/bindings/cxx/test/big_test.cpp 2012-07-26 22:01:36 UTC (rev 751) +++ trunk/getdata/bindings/cxx/test/big_test.cpp 2012-08-02 02:46:15 UTC (rev 752) @@ -147,7 +147,7 @@ "/META data mlut LINTERP DATA ./lut\n" "const CONST FLOAT64 5.5\n" "carray CARRAY FLOAT64 1.1 2.2 3.3 4.4 5.5 6.6\n" - "linterp LINTERP data /look/up/file\n" + "linterp LINTERP data ./lut\n" "polynom POLYNOM data 1.1 2.2 2.2 3.3;4.4 const const\n" "bit BIT data 3 4\n" "sbit SBIT data 5 6\n" @@ -338,7 +338,7 @@ CHECK_INT2(21,1,ent->Type(),LinterpEntryType); CHECK_INT2(21,2,ent->FragmentIndex(),0); CHECK_STRING2(21,3,ent->Input(),"data"); - CHECK_STRING2(21,4,ent->Table(),"/look/up/file"); + CHECK_STRING2(21,4,ent->Table(),"./lut"); delete ent; // 22: Dirfile::Entry / BitEntry check @@ -997,7 +997,7 @@ // 80: Dirfile::Name check str = d->Name(); CHECK_OK(80); - CHECK_STRING(80,str,"dirfile"); + CHECK_EOSTRING(80,str,"dirfile"); // 81: Fragment::Parent check frag = d->Fragment(1); @@ -1727,12 +1727,19 @@ d->MplexLookback(GD_LOOKBACK_ALL); CHECK_OK(240); + // 241: gd_linterp_tablename check + tok = d->LinterpTableName("linterp"); + CHECK_OK(241); + sprintf(buf, "dirfile%clut", GD_DIRSEP); + CHECK_EOSTRING(241,tok,buf); + free(tok); + // =================================================================== d->Discard(); delete d; Modified: trunk/getdata/bindings/f77/fgetdata.c =================================================================== --- trunk/getdata/bindings/f77/fgetdata.c 2012-07-26 22:01:36 UTC (rev 751) +++ trunk/getdata/bindings/f77/fgetdata.c 2012-08-02 02:46:15 UTC (rev 752) @@ -4012,3 +4012,23 @@ free(pa); dreturn("%i", *name_l); } + +/* gd_linterp_tablename wrapper */ +void F77_FUNC(gdlttn, GDLTTN) (char *name, int32_t *name_l, + const int32_t *dirfile, const char *field_code, const int32_t *field_code_l) +{ + char *fc, *fn; + + dtrace("%p, %i, %i, %p, %i", name, *name_l, *dirfile, field_code, + *field_code_l); + + fn = gd_linterp_tablename(_GDF_GetDirfile(*dirfile), _GDF_CString(&fc, + field_code, *field_code_l)); + + _GDF_FString(name, name_l, fn); + + free(fc); + free(fn); + + dreturn("%i", *name_l); +} Modified: trunk/getdata/bindings/f77/fgetdata.h =================================================================== --- trunk/getdata/bindings/f77/fgetdata.h 2012-07-26 22:01:36 UTC (rev 751) +++ trunk/getdata/bindings/f77/fgetdata.h 2012-08-02 02:46:15 UTC (rev 752) @@ -744,6 +744,10 @@ char *count_field, int32_t *count_field_l, int32_t *val, int32_t *max, int32_t *fragment_index, const int32_t *dirfile, const char *field_code, const int32_t *field_code_l); + +void F77_FUNC(gdlttn, GDLTTN) (char *name, int32_t *name_l, + const int32_t *dirfile, const char *field_code, + const int32_t *field_code_l); #ifdef __cplusplus } #endif Modified: trunk/getdata/bindings/f77/getdata.f.in =================================================================== --- trunk/getdata/bindings/f77/getdata.f.in 2012-07-26 22:01:36 UTC (rev 751) +++ trunk/getdata/bindings/f77/getdata.f.in 2012-08-02 02:46:15 UTC (rev 752) @@ -237,6 +237,8 @@ EXTERNAL GDINCL C Corresponding to gd_invalid_dirfile(3) EXTERNAL GDINVD +C Corresponding to gd_linterp_tablename(3) + EXTERNAL GDLTTN C Corresponding to gd_mconstants(3) (sort of) EXTERNAL GDMCOS C Corresponding to gd_madd_alias(3) Modified: trunk/getdata/bindings/f77/getdata.f90.in =================================================================== --- trunk/getdata/bindings/f77/getdata.f90.in 2012-07-26 22:01:36 UTC (rev 751) +++ trunk/getdata/bindings/f77/getdata.f90.in 2012-08-02 02:46:15 UTC (rev 752) @@ -2868,4 +2868,15 @@ end if end subroutine +function fgd_linterp_tablename (dirfile, field_code) + character (len=GD_MAX_LINE_LENGTH) :: fgd_linterp_tablename + integer, intent(in) :: dirfile + character (len=*), intent(in) :: field_code + + integer :: l = GD_MAX_LINE_LENGTH + + call gdlttn (fgd_linterp_tablename, l, dirfile, TRIM(field_code), & + LEN_TRIM(field_code)) +end function + end module Modified: trunk/getdata/bindings/f77/test/big_test.f =================================================================== --- trunk/getdata/bindings/f77/test/big_test.f 2012-07-26 22:01:36 UTC (rev 751) +++ trunk/getdata/bindings/f77/test/big_test.f 2012-08-02 02:46:15 UTC (rev 752) @@ -245,7 +245,7 @@ WRITE(1, *) '/META data mlut LINTERP DATA ./lut' WRITE(1, *) 'const CONST FLOAT64 5.5' WRITE(1, *) 'carray CARRAY FLOAT64 1.1 2.2 3.3 4.4 5.5 6.6' - WRITE(1, *) 'linterp LINTERP data /look/up/file' + WRITE(1, *) 'linterp LINTERP data ./lut' WRITE(1, *) 'polynom POLYNOM data 1.1 2.2 2.2 3.3;4.4 + const const' WRITE(1, *) 'bit BIT data 3 4' @@ -481,7 +481,7 @@ CALL CHKIN2(ne, 21, 1, l, flen) CALL CHKIN2(ne, 21, 2, n, 0) CALL CHKST2(ne, 21, 3, fn, 'data') - CALL CHKST2(ne, 21, 4, str, '/look/up/file') + CALL CHKST2(ne, 21, 4, str, './lut') C 22: GDGEBT check l = flen @@ -1263,11 +1263,11 @@ CALL CHKINT(ne, 79, n, GD_LE + GD_NA) C 80: GDNAME check - l = slen - CALL GDNAME(str, l, d, 0) + l = plen + CALL GDNAME(path, l, d, 0) CALL CHKEOK(ne, 80, d) - CALL CHKINT(ne, 80, l, slen) - CALL CHKSTR(ne, 80, str, 'test_dirfile') + CALL CHKINT(ne, 80, l, plen) + CALL CHKEOS(ne, 80, path, 'test_dirfile') C 81: GDPFRG check CALL GDPFRG(n, d, 1) @@ -2140,6 +2140,12 @@ CALL GDMXLB(d, GDLB_A) CALL CHKEOK(ne, 240, d) +C 241: GDLTTN check + l = plen + CALL GDLTTN(path, l, d, "linterp", 7) + CALL CHKEOK(ne, 241, d) + CALL CHKINT(ne, 241, l, plen) + CALL CHKEOS(ne, 241, path, 'test_dirfile'//DIRSEP//'lut') @@ -2148,6 +2154,7 @@ + C =============================================================== C Cleanup CALL GDDSCD(d) Modified: trunk/getdata/bindings/f77/test/big_test95.f90 =================================================================== --- trunk/getdata/bindings/f77/test/big_test95.f90 2012-07-26 22:01:36 UTC (rev 751) +++ trunk/getdata/bindings/f77/test/big_test95.f90 2012-08-02 02:46:15 UTC (rev 752) @@ -203,6 +203,7 @@ character (len=flen), dimension(nfields + 11) :: fields character (len=flen), dimension(nfields + 11) :: flist character (len=GD_FIELD_LEN) :: str + character (len=4096) :: path integer(1), dimension(80) :: datadata integer :: i, d, n, l, ne real :: fl @@ -245,7 +246,7 @@ write(1, *) '/META data mlut LINTERP DATA ./lut' write(1, *) 'const CONST FLOAT64 5.5' write(1, *) 'carray CARRAY FLOAT64 1.1 2.2 3.3 4.4 5.5 6.6' - write(1, *) 'linterp LINTERP data /look/up/file' + write(1, *) 'linterp LINTERP data ./lut' write(1, *) 'polynom POLYNOM data 1.1 2.2 2.2 3.3;4.4 const const' write(1, *) 'bit BIT data 3 4' write(1, *) 'sbit SBIT data 5 6' @@ -656,7 +657,7 @@ call check_int2(ne, 21, 1, n, GD_LINTERP_ENTRY) call check_int2(ne, 21, 2, ent%fragment_index, 0) call check_str2(ne, 21, 3, ent%field(1), 'data') - call check_str2(ne, 21, 4, ent%field(2), '/look/up/file') + call check_str2(ne, 21, 4, ent%field(2), './lut') ! 22: fgd_entry (bit) check n = fgd_entry(d, 'bit', ent) @@ -1461,11 +1462,11 @@ call check_int(ne, 79, n, (GD_LITTLE_ENDIAN + GD_NOT_ARM_ENDIAN)) ! 80: fgd_dirfilename check - l = GD_FIELD_LEN - call fgd_dirfilename(str, l, d, 0) + l = 4096 + call fgd_dirfilename(path, l, d, 0) call check_ok(ne, 80, d) - call check_int(ne, 80, l, GD_FIELD_LEN) - call check_str(ne, 80, str, 'test95_dirfile') + call check_int(ne, 80, l, 4096) + call check_eos(ne, 80, path, 'test95_dirfile') ! 81: fgd_parent_fragment check n = fgd_parent_fragment(d, 1) @@ -2559,7 +2560,12 @@ call fgd_mplex_lookback(d, GD_LOOKBACK_ALL) call check_ok(ne, 240, d) +! 241: fgd_raw_filename check + str = fgd_linterp_tablename(d, "linterp") + call check_ok(ne, 241, d) + call check_eos(ne, 241, str, 'test95_dirfile'//DIRSEP//'lut') + Modified: trunk/getdata/bindings/idl/getdata.c =================================================================== --- trunk/getdata/bindings/idl/getdata.c 2012-07-26 22:01:36 UTC (rev 751) +++ trunk/getdata/bindings/idl/getdata.c 2012-08-02 02:46:15 UTC (rev 752) @@ -5803,7 +5803,29 @@ dreturnvoid(); } +/* @@DLM: F gdidl_get_linterp_tablename GD_LINTERP_TABLENAME 2 2 KEYWORDS */ +IDL_VPTR gdidl_get_linterp_tablename(int argc, IDL_VPTR argv[], char *argk) +{ + dtraceidl(); + GDIDL_KW_ONLY_ERROR; + + DIRFILE* D = gdidl_get_dirfile(IDL_LongScalar(argv[0])); + const char *field_code = IDL_VarGetString(argv[1]); + + char *name = gd_linterp_tablename(D, field_code); + + GDIDL_SET_ERROR(D); + + IDL_KW_FREE; + + IDL_VPTR r = IDL_StrToSTRING(name); + free(name); + dreturn("%p", r); + return r; +} + + /**** Module initialisation ****/ /* These are defined in the automatically generated sublist.c */ Modified: trunk/getdata/bindings/idl/test/big_test.pro =================================================================== --- trunk/getdata/bindings/idl/test/big_test.pro 2012-07-26 22:01:36 UTC (rev 751) +++ trunk/getdata/bindings/idl/test/big_test.pro 2012-08-02 02:46:15 UTC (rev 752) @@ -57,7 +57,7 @@ printf,1,'/META data mlut LINTERP DATA ./lut' printf,1,'const CONST FLOAT64 5.5' printf,1,'carray CARRAY FLOAT64 1.1 2.2 3.3 4.4 5.5 6.6' -printf,1,'linterp LINTERP data /look/up/file' +printf,1,'linterp LINTERP data ./lut' printf,1,'polynom POLYNOM data 1.1 2.2 2.2 3.3;4.4 const const' printf,1,'bit BIT data 3 4' printf,1,'sbit SBIT data 5 6' @@ -214,7 +214,7 @@ nume += check_simple2(21, 2, n.field, "linterp") nume += check_simple2(21, 3, n.fragment, 0) nume += check_simple2(21, 4, n.in_fields, [ "data" ]) -nume += check_simple2(21, 5, n.table, "/look/up/file") +nume += check_simple2(21, 5, n.table, "./lut") ; 22: gd_entry (bit) n = gd_entry(d, "bit") @@ -804,7 +804,7 @@ ; 80: dirfilename n = gd_dirfilename(d) nume += check_ok(80, d) -nume += check_simple(80, n, "test_dirfile") +nume += check_eostring(80, n, "test_dirfile") ; 81: gd_parent_fragment n = gd_parent_fragment(d, fragment=1) @@ -1377,14 +1377,19 @@ "new2", "new21", "new4", "new6", "new7", "new8", "phase", "polynom", $ "recip", "sbit", "window"]) -; 239: gd_mplex_lookback check +; 240: gd_mplex_lookback check gd_mplex_lookback, d, /ALL nume += check_ok(240, d) +; 241: gd_linterp_tablename +n = gd_linterp_tablename(d, 'linterp') +nume += check_ok(241, d) +nume += check_eostring(241, n, "test_dirfile/lut") + ; =============================================================== ; Cleanup gd_close, d, /DISCARD Modified: trunk/getdata/bindings/perl/simple_funcs.pl =================================================================== --- trunk/getdata/bindings/perl/simple_funcs.pl 2012-07-26 22:01:36 UTC (rev 751) +++ trunk/getdata/bindings/perl/simple_funcs.pl 2012-08-02 02:46:15 UTC (rev 752) @@ -150,9 +150,11 @@ print "\tCLEANUP:\n", map(printcleanup($_), @arg); if ($ret eq "void") { - print "\t\tdreturnvoid();\n\n"; + print "\t\tdreturnvoid();\n"; } else { print "\t\tdreturn(\"", &printfmt($ret), "\", "; - print &printmunge([$ret, "RETVAL"]), ");\n\n"; + print &printmunge([$ret, "RETVAL"]), ");\n"; } + print "\t\tsafefree(RETVAL);\n" if $ret eq "char *"; + print "\n"; } Modified: trunk/getdata/bindings/perl/simple_funcs.xsin =================================================================== --- trunk/getdata/bindings/perl/simple_funcs.xsin 2012-07-26 22:01:36 UTC (rev 751) +++ trunk/getdata/bindings/perl/simple_funcs.xsin 2012-08-02 02:46:15 UTC (rev 752) @@ -154,3 +154,4 @@ unsigned long int reset=0) int verbose_prefix(DIRFILE *dirfile, gdpu_char *prefix=NULL) void mplex_lookback(DIRFILE *dirfile, int lookback) +char *linterp_tablename(DIRFILE *dirfile, const char *field_code) Modified: trunk/getdata/bindings/perl/test/big_test.t =================================================================== --- trunk/getdata/bindings/perl/test/big_test.t 2012-07-26 22:01:36 UTC (rev 751) +++ trunk/getdata/bindings/perl/test/big_test.t 2012-08-02 02:46:15 UTC (rev 752) @@ -22,7 +22,7 @@ use GetData; use Math::Complex; use strict; -use Test::More tests => 1303; +use Test::More tests => 1305; my $ne = 0; my ($s, @a, %h); @@ -163,7 +163,7 @@ /META data mlut LINTERP DATA ./lut const CONST FLOAT64 5.5 carray CARRAY FLOAT64 1.1 2.2 3.3 4.4 5.5 6.6 -linterp LINTERP data /look/up/file +linterp LINTERP data ./lut polynom POLYNOM data 1.1 2.2 2.2 3.3;4.4 const const bit BIT data 3 4 sbit SBIT data 5 6 @@ -352,7 +352,7 @@ CheckNum2(21, 2, $h{'field_type'}, $GetData::LINTERP_ENTRY); CheckNum2(21, 3, $h{'fragment_index'}, 0); CheckString2(21, 4, $h{'in_fields'}, "data"); -CheckString2(21, 5, $h{'table'}, "/look/up/file"); +CheckString2(21, 5, $h{'table'}, "./lut"); # 22: get_entry check %h = $_->entry("bit"); @@ -1045,7 +1045,7 @@ # 80: dirfilename $s = $_->dirfilename; CheckOK(80); -CheckString(80, $s, "dirfile"); +CheckEOString(80, $s, "dirfile"); # 81: parent_fragment $s = $_->parent_fragment(1); @@ -1702,6 +1702,10 @@ $_->mplex_lookback($GetData::LOOKBACK_ALL); CheckOK(240); +# 241: raw_filename +$s = $_->linterp_tablename("linterp"); +CheckOK(241); +CheckEOString(241, $s, "dirfile/lut"); @@ -1709,5 +1713,6 @@ + $d = $_ = undef; system "rm -rf dirfile"; Modified: trunk/getdata/bindings/python/pydirfile.c =================================================================== --- trunk/getdata/bindings/python/pydirfile.c 2012-07-26 22:01:36 UTC (rev 751) +++ trunk/getdata/bindings/python/pydirfile.c 2012-08-02 02:46:15 UTC (rev 752) @@ -2658,6 +2658,32 @@ return pylist; } +static PyObject* gdpy_dirfile_linterptablename(struct gdpy_dirfile_t* self, + PyObject* args, PyObject* keys) +{ + dtrace("%p, %p, %p", self, args, keys); + + char* keywords[] = { "field_code", NULL }; + const char* field_code; + char* filename; + + if (!PyArg_ParseTupleAndKeywords(args, keys, + "s:pygetdata.dirfile.linterp_tablename", keywords, &field_code)) + { + dreturn ("%p", NULL); + return NULL; + } + + filename = gd_linterp_tablename(self->D, field_code); + + PYGD_CHECK_ERROR(self->D, NULL); + + PyObject* pyobj = PyString_FromString(filename); + free(filename); + dreturn("%p", pyobj); + return pyobj; +} + static PyGetSetDef gdpy_dirfile_getset[] = { { "error", (getter)gdpy_dirfile_geterror, NULL, "The numerical error code encountered by the last call to the GetData\n" @@ -2918,6 +2944,14 @@ "hide(field_code)\n\n" "Sets the hidden flag on the specified field. See gd_hide(3)." }, + {"linterp_tablename", (PyCFunction)gdpy_dirfile_linterptablename, + METH_VARARGS | METH_KEYWORDS, + "linterp_tablename(field_code)\n\n" + "Return the pathname of the look-up table (LUT) on disk used by the\n" + /* ------- handy ruler ---------------------------------------------| */ + "LINTERP field specified by 'field_code'. See\n" + "gd_linterp_tablename(3)." + }, {"mcarrays", (PyCFunction)gdpy_dirfile_mcarrays, METH_VARARGS | METH_KEYWORDS, "mcarrays(parent, return_type [, as_list])\n\n" "Retrieve all CARRAY metafields, and their values, for the parent\n" @@ -2996,7 +3030,6 @@ "Return a count of entries in the database. If 'parent' is given,\n" "metafields under 'parent' will be considered, otherwise top-level\n" "fields are counted. If given, 'type' should be either one of the\n" - /* ------- handy ruler ---------------------------------------------| */ "the pygetdata.*_ENTRY symbols, or else one of the special\n" "pygetdata.*_ENTRIES symbols; if not given, 'type' defaults to\n" "pygetdata.ALL_ENTRIES. If given 'flags' should be a bitwise or'd\n" Modified: trunk/getdata/bindings/python/test/big_test.py =================================================================== --- trunk/getdata/bindings/python/test/big_test.py 2012-07-26 22:01:36 UTC (rev 751) +++ trunk/getdata/bindings/python/test/big_test.py 2012-08-02 02:46:15 UTC (rev 752) @@ -104,7 +104,7 @@ "/META data mlut LINTERP DATA ./lut\n" "const CONST FLOAT64 5.5\n" "carray CARRAY FLOAT64 1.1 2.2 3.3 4.4 5.5 6.6\n" - "linterp LINTERP data /look/up/file\n" + "linterp LINTERP data ./lut\n" "polynom POLYNOM data 1.1 2.2 2.2 3.3;4.4 const const\n" "bit BIT data 3 4\n" "sbit SBIT data 5 6\n" @@ -387,7 +387,7 @@ CheckSimple2(21,2,ent.field_type_name,"LINTERP_ENTRY") CheckSimple2(21,3,ent.fragment,0) CheckSimple2(21,4,ent.in_fields,( "data", )) -CheckSimple2(21,5,ent.table,"/look/up/file") +CheckSimple2(21,5,ent.table,"./lut") # 22: entry (bit) check try: @@ -1009,7 +1009,7 @@ # 80: dirfilename check try: - CheckSimple(80,d.name,"dirfile") + CheckEOS(80,d.name,"dirfile") except: CheckOK(80) @@ -1988,6 +1988,12 @@ CheckOK2(240, 2) CheckSimple(240, n, pygetdata.LOOKBACK_ALL) +# 241: raw_filename check +try: + n = d.linterp_tablename("linterp") +except: + CheckOK(241) +CheckEOS(241,n,"dirfile/lut") @@ -2000,6 +2006,7 @@ + # ========================================================================== d.discard() Modified: trunk/getdata/doc/list.tests =================================================================== --- trunk/getdata/doc/list.tests 2012-07-26 22:01:36 UTC (rev 751) +++ trunk/getdata/doc/list.tests 2012-08-02 02:46:15 UTC (rev 752) @@ -252,3 +252,4 @@ 238 F9.... fgd_entry_name_max 239 F9CIpP gd_entry_list 240 F9CIpP gd_mplex_lookback +241 F9CIpP gd_linterp_tablename Modified: trunk/getdata/man/Makefile.am =================================================================== --- trunk/getdata/man/Makefile.am 2012-07-26 22:01:36 UTC (rev 751) +++ trunk/getdata/man/Makefile.am 2012-08-02 02:46:15 UTC (rev 752) @@ -34,9 +34,9 @@ gd_fragment_affixes.3 gd_fragment_index.3 gd_fragmentname.3 \ gd_framenum_subset.3 gd_framenum_subset64.3 gd_frameoffset.3 \ gd_frameoffset64.3 gd_free_entry_strings.3 \ - gd_get_carray_slice.3 gd_get_string.3 \ - gd_getdata.3 gd_getdata64.3 gd_hidden.3 gd_hide.3 \ - gd_include_affix.3 gd_invalid_dirfile.3 gd_madd_bit.3 \ + gd_get_carray_slice.3 gd_get_string.3 gd_getdata.3 \ + gd_getdata64.3 gd_hidden.3 gd_hide.3 gd_include_affix.3 \ + gd_invalid_dirfile.3 gd_linterp_tablename.3 gd_madd_bit.3 \ gd_mcarrays.3 gd_mconstants.3 gd_metaflush.3 gd_move.3 \ gd_mplex_lookback.3 gd_mstrings.3 gd_naliases.3 \ gd_native_type.3 gd_nentries.3 gd_nfragments.3 gd_nframes.3 \ Modified: trunk/getdata/man/gd_dirfilename.3 =================================================================== --- trunk/getdata/man/gd_dirfilename.3 2012-07-26 22:01:36 UTC (rev 751) +++ trunk/getdata/man/gd_dirfilename.3 2012-08-02 02:46:15 UTC (rev 752) @@ -1,6 +1,6 @@ .\" gd_dirfilename.3. The dirfilename man page. .\" -.\" Copyright (C) 2008, 2010 D. V. Wiebe +.\" Copyright (C) 2008, 2010, 2012 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_dirfilename 3 "25 May 2010" "Version 0.7.0" "GETDATA" +.TH gd_dirfilename 3 "1 August 2012" "Version 0.8.1" "GETDATA" .SH NAME gd_dirfilename \(em retrieve the name of a dirfile .SH SYNOPSIS @@ -21,7 +21,7 @@ .HP .nh .ad l -.BI "const char *gd_dirfilename(const DIRFILE *" dirfile ); +.BI "const char *gd_dirfilename(DIRFILE *" dirfile ); .hy .ad n .SH DESCRIPTION @@ -29,11 +29,8 @@ .BR gd_dirfilename () function queries a dirfile(5) database specified by .I dirfile -and returns its name. The name of a dirfile is the pathname passed to -.BR gd_cbopen () -or -.BR gd_open () -when the dirfile was opened. +and returns its name. The name of a dirfile is an absolute pathname which +refers to the dirfile base directory. The .I dirfile @@ -58,4 +55,5 @@ a call to .BR gd_error_string (3). .SH SEE ALSO -.BR gd_cbopen (3) +.BR gd_cbopen (3), +.BR path_resolution (7) Added: trunk/getdata/man/gd_linterp_tablename.3 =================================================================== --- trunk/getdata/man/gd_linterp_tablename.3 (rev 0) +++ trunk/getdata/man/gd_linterp_tablename.3 2012-08-02 02:46:15 UTC (rev 752) @@ -0,0 +1,81 @@ +.\" gd_linterp_tablename.3. The gd_linterp_tablename man page. +.\" +.\" Copyright (C) 2012 D. V. Wiebe +.\" +.\"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" +.\" +.\" This file is part of the GetData project. +.\" +.\" Permission is granted to copy, distribute and/or modify this document +.\" under the terms of the GNU Free Documentation License, Version 1.2 or +.\" any later version published by the Free Software Foundation; with no +.\" Invariant Sections, with no Front-Cover Texts, and with no Back-Cover +.\" 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" +.SH NAME +gd_linterp_tablename \(em retrieve the pathname of a look-up table in a dirfile +.SH SYNOPSIS +.B #include <getdata.h> +.HP +.nh +.ad l +.BI "const char *gd_linterp_tablename(DIRFILE *" dirfile ", const char" +.BI * field_code ); +.hy +.ad n +.SH DESCRIPTION +The +.BR gd_linterp_tablename () +function retrieves the pathname of the look-up table (LUT) used by the +.B LINTERP +field specified by +.I field_code +in the dirfile specified by +.IR dirfile . +If +.I field_code +contains a valid representation suffix, it will be ignored. + +.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: +.TP 8 +.B GD_E_ALLOC +The library was unable to allocate memory. +.TP +.B GD_E_BAD_CODE +The field specified by +.I field_code +was not found. +.TP +.B GD_E_BAD_DIRFILE +The supplied dirfile was invalid. +.TP +.B GD_E_BAD_FIELD_TYPE +The field specified by +.I field_code +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). +A descriptive error string for the last error encountered can be obtained from +a call to +.BR gd_error_string (3). +.SH SEE ALSO +.BR gd_entry (3), +.BR gd_error (3), +.BR gd_error_string (3), +.BR dirfile (5), +.BR dirfile-format (5) Modified: trunk/getdata/src/add.c =================================================================== --- trunk/getdata/src/add.c 2012-07-26 22:01:36 UTC (rev 751) +++ trunk/getdata/src/add.c 2012-08-02 02:46:15 UTC (rev 752) @@ -256,7 +256,11 @@ 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; - if ((E->e->u.raw.filebase = _GD_Strdup(D, E->field)) == NULL) + E->e->u.raw.filebase = _GD_MungeCode(D, NULL, + D->fragment[entry->fragment_index].prefix, + D->fragment[entry->fragment_index].suffix, NULL, NULL, E->field, + &offset, 0); + if (D->error) break; if ((E->EN(raw,spf) = entry->EN(raw,spf)) == 0) Modified: trunk/getdata/src/entry.c =================================================================== --- trunk/getdata/src/entry.c 2012-07-26 22:01:36 UTC (rev 751) +++ trunk/getdata/src/entry.c 2012-08-02 02:46:15 UTC (rev 752) @@ -819,3 +819,49 @@ dreturn("%i", 0); return 0; } + +char *gd_linterp_tablename(DIRFILE *D, const char *field_code_in) gd_nothrow +{ + int repr; + gd_entry_t *E; + char *field_code, *table; + + dtrace("%p, \"%s\"", D, field_code_in); + + if (D->flags & GD_INVALID) { + _GD_SetError(D, GD_E_BAD_DIRFILE, 0, NULL, 0, NULL); + dreturn("%p", NULL); + return NULL; + } + + _GD_ClearError(D); + + E = _GD_FindFieldAndRepr(D, field_code_in, &field_code, &repr, 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); + dreturn("%p", NULL); + return NULL; + } + + /* initialise */ + if (E->e->u.linterp.table_file == NULL) + if (_GD_SetTablePath(D, E, E->e)) { + dreturn("%p", NULL); + return NULL; + } + + table = _GD_MakeFullPath(D, E->e->u.linterp.table_dirfd, + E->e->u.linterp.table_file, 1); + + dreturn("%s", table); + return table; +} Modified: trunk/getdata/src/getdata.h.in =================================================================== --- trunk/getdata/src/getdata.h.in 2012-07-26 22:01:36 UTC (rev 751) +++ trunk/getdata/src/getdata.h.in 2012-08-02 02:46:15 UTC (rev 752) @@ -731,6 +731,9 @@ extern DIRFILE *gd_invalid_dirfile(void) gd_nothrow; +extern char *gd_linterp_tablename(DIRFILE *D, const char *field_code) gd_nothrow +gd_nonnull ((1, 2)); + extern int gd_madd(DIRFILE *dirfile, const gd_entry_t *entry, const char *parent) gd_nothrow gd_nonnull ((1,2,3)); Modified: trunk/getdata/src/globals.c =================================================================== --- trunk/getdata/src/globals.c 2012-07-26 22:01:36 UTC (rev 751) +++ trunk/getdata/src/globals.c 2012-08-02 02:46:15 UTC (rev 752) @@ -20,9 +20,10 @@ */ #include "internal.h" -/* This is nothing other than what the caller gave us. Presumably it should - * be better at keeping track of such things than us, but this is present in - * the event that it is not. */ +/* This is a canonicalised version of the path specified in the open call. + * In the presence of third parties modifying symlinks after dirfile open, the + * caller is unable to determine the actual path to the dirfile that was + * opened if we don't help out. */ const char *gd_dirfilename(DIRFILE* D) gd_nothrow { dtrace("%p", D); @@ -35,8 +36,8 @@ _GD_ClearError(D); - dreturn("\"%s\"", D->name); - return D->name; + dreturn("\"%s\"", D->dir[0].path); + return D->dir[0].path; } const char *gd_reference(DIRFILE* D, const char* field_code) gd_nothrow Property changes on: trunk/getdata/test ___________________________________________________________________ Modified: svn:ignore - Makefile Makefile.in valgrind.log *.o dirfile *.swp *.exe .deps .libs 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_raw_type add_rdonly add_recip add_resolv add_sbit add_scalar add_scalar_carray add_sort add_spec add_spec_affix add_spec_directive add_spec_invalid add_spec_meta add_spec_resolv add_string add_string_affix add_type add_window add_window_op alias_list alias_list_alias alias_list_missing alias_num alias_num_alias alias_num_missing alias_target alias_target_alias alias_target_missing alter_bit_bitnum alter_bit_numbits alter_carray_len alter_carray_type alter_const alter_cpolynom alter_crecip alter_crecip89 alter_crecip_zero alter_divide alter_entry alter_entry_affix alter_entry_hidden alter_entry_recode alter_entry_scalar2a alter_entry_scalar2n alter_entry_scalar3 alter_entry_scalar4 alter_lincom_23 alter_lincom_32 alter_lincom_affix alter_lincom_input alter_lincom_offset alter_lincom_slope alter_linterp alter_linterp_move alter_mplex alter_mspec alter_mspec_affix alter_multiply alter_phase alter_polynom_coeff alter_polynom_input alter_polynom_ord alter_raw_spf alter_raw_type alter_recip alter_recip_zero alter_scalar_affix alter_spec alter_spec_affix alter_spec_meta alter_window ascii_add ascii_get ascii_get_get ascii_nframes ascii_put bof bof_lincom bof_phase bzip_get bzip_get_get bzip_move_from bzip_nframes bzip_put close close_bad close_discard close_null convert_complex128_complex64 convert_complex128_float64 convert_complex128_int64 convert_complex128_uint64 convert_complex64_complex128 convert_complex64_float64 convert_complex64_int64 convert_complex64_uint64 convert_float32_complex128 convert_float32_complex64 convert_float32_float64 convert_float32_int16 convert_float32_int32 convert_float32_int64 convert_float32_int8 convert_float32_uint16 convert_float32_uint32 convert_float32_uint64 convert_float32_uint8 convert_float64_complex128 convert_float64_complex64 convert_float64_float32 convert_float64_int16 convert_float64_int32 convert_float64_int64 convert_float64_int8 convert_float64_uint16 convert_float64_uint32 convert_float64_uint64 convert_float64_uint8 convert_int16_complex128 convert_int16_complex64 convert_int16_float32 convert_int16_float64 convert_int16_int32 convert_int16_int64 convert_int16_int8 convert_int16_uint16 convert_int16_uint32 convert_int16_uint64 convert_int16_uint8 convert_int32_complex128 convert_int32_complex64 convert_int32_float32 convert_int32_float64 convert_int32_int16 convert_int32_int64 convert_int32_int8 convert_int32_uint16 convert_int32_uint32 convert_int32_uint64 convert_int32_uint8 convert_int64_complex128 convert_int64_complex64 convert_int64_float32 convert_int64_float64 convert_int64_int16 convert_int64_int32 convert_int64_int8 convert_int64_uint16 convert_int64_uint32 convert_int64_uint64 convert_int64_uint8 convert_int8_complex128 convert_int8_complex64 convert_int8_float32 convert_int8_float64 convert_int8_int16 convert_int8_int32 convert_int8_int64 convert_int8_uint16 convert_int8_uint32 convert_int8_uint64 convert_int8_uint8 convert_uint16_complex128 convert_uint16_complex64 convert_uint16_float32 convert_uint16_float64 convert_uint16_int16 convert_uint16_int32 convert_uint16_int64 convert_uint16_int8 convert_uint16_uint32 convert_uint16_uint64 convert_uint16_uint8 convert_uint32_complex128 convert_uint32_complex64 convert_uint32_float32 convert_uint32_float64 convert_uint32_int16 convert_uint32_int32 convert_uint32_int64 convert_uint32_int8 convert_uint32_uint16 convert_uint32_uint64 convert_uint32_uint8 convert_uint64_complex128 convert_uint64_complex64 convert_uint64_float32 convert_uint64_float64 convert_uint64_int16 convert_uint64_int32 convert_uint64_int64 convert_uint64_int8 convert_uint64_uint16 convert_uint64_uint32 convert_uint64_uint8 convert_uint8_complex128 convert_uint8_complex64 convert_uint8_float32 convert_uint8_float64 convert_uint8_int16 convert_uint8_int32 convert_uint8_int64 convert_uint8_int8 convert_uint8_uint16 convert_uint8_uint32 convert_uint8_uint64 creat creat_excl creat_rdonly cvlist cvlist_array cvlist_array_hidden cvlist_array_meta cvlist_array_meta_hidden cvlist_hidden cvlist_invalid cvlist_meta cvlist_meta_hidden cvlist_meta_invalid del del_carray del_carray_deref del_const del_const_deref del_const_force del_data del_derived del_derived_after del_derived_force del_meta del_meta_force desync desync_flush desync_reopen desync_reopen_inv dfes_bit dfes_divide dfes_lincom dfes_linterp dfes_multiply dfes_null dfes_phase dfes_raw dfes_recip dfes_zero elist_alias elist_hidden elist_noalias elist_scalar encode_alter encode_get encode_move endian_alter endian_alter_sie endian_get endian_move entry_bad_code entry_bit entry_bit_scalar entry_divide entry_invalid entry_lincom entry_lincom_scalar entry_linterp entry_mplex entry_mplex_scalar entry_multiply entry_phase entry_phase_scalar entry_polynom entry_polynom_scalar entry_raw entry_raw_scalar entry_raw_scalar_code entry_raw_scalar_type entry_recip entry_scalar_repr entry_type entry_type_alias entry_window entry_window_scalar eof eof_index eof_lincom eof_phase error error_error error_num error_short error_verbose error_verbose_prefix file file_code file_type flist flist_hidden flist_invalid flist_meta flist_meta_hidden flist_meta_invalid flist_type flist_type_hidden flist_type_invalid flist_type_meta flist_type_meta_hidden flist_type_meta_invalid flush flush_all flush_bad_code flush_invalid flush_meta flush_spec foffs_alter foffs_get foffs_move fragment_affix fragment_affix_alter fragment_affix_alter2 fragment_affix_dup fragment_index fragment_index_alias fragment_name fragment_name_oor fragment_num fragment_parent 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_endian16 get_endian32 get_endian64 get_endian8 get_endian_complex128_arm get_endian_complex128_big get_endian_complex128_little get_endian_complex64_arm get_endian_complex64_big get_endian_complex64_little get_endian_float32_arm get_endian_float32_big get_endian_float32_little get_endian_float64_arm get_endian_float64_big get_endian_float64_little get_ff get_float32 get_float64 get_foffs get_fs get_here get_here_foffs get_heres get_int16 get_int32 get_int64 get_int8 get_invalid get_lincom1 get_lincom2 get_lincom3 get_lincom_noin get_lincom_non get_lincom_null get_lincom_spf get_linterp get_linterp_noin get_linterp_notab get_linterp_sort get_mplex 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_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 get_window_ne get_window_set get_zero global_flags global_name global_ref global_ref_empty global_ref_set gzip_add gzip_get gzip_get_get gzip_get_put gzip_move_from gzip_move_to gzip_nframes gzip_put gzip_put_get header_complex hide hide_hidden hide_unhide include include_accmode include_affix include_auto include_cb include_creat include_ignore include_index include_invalid include_nonexistent include_pc include_ref include_syntax index index_domain index_range legacy_get legacy_get_put legacy_get_rofs legacy_nframes legacy_nonexistent legacy_put legacy_spf lzma_get lzma_nframes madd madd_affix madd_alias madd_alias_affix madd_bit madd_bit_invalid madd_carray madd_clincom madd_const madd_cpolynom madd_crecip madd_crecip89 madd_divide madd_index madd_lincom madd_lincom_invalid madd_linterp madd_linterp_invalid madd_mplex madd_multiply madd_multiply_invalid madd_phase madd_phase_invalid madd_polynom madd_recip madd_sbit madd_spec madd_spec_directive madd_spec_invalid madd_spec_resolv madd_string madd_window move move_affix move_affix_dup move_alias move_data_enc_ar move_data_enc_ra move_data_endian move_data_foffs move_data_nop move_index move_meta move_protect move_subdir name name_affix name_affix_bad name_alias name_dup name_move name_move_alias name_updb name_updb_alias name_updb_const name_updb_const_alias nentries_alias nentries_hidden nentries_noalias nentries_scalar nfields nfields_hidden nfields_invalid nfields_type nfields_type_hidden nfields_type_invalid nfields_vector nfields_vector_hidden nfields_vector_invalid nframes nframes64 nframes_empty nframes_invalid nframes_off64 nframes_spf nmeta nmeta_hidden nmeta_invalid nmeta_parent nmeta_type nmeta_type_hidden nmeta_type_invalid nmeta_type_parent nmeta_vectors nmeta_vectors_del nmeta_vectors_hidden nmeta_vectors_invalid nmeta_vectors_parent open open_abs open_cb_abort open_cb_cont open_cb_ignore open_cb_invalid open_cb_rescan open_eaccess open_nonexistent open_notdirfile parse_alias parse_alias_code parse_alias_dup parse_alias_meta parse_alias_missing parse_badline parse_bit parse_bit4 parse_bit_bitnum parse_bit_bitsize parse_bit_ncols parse_bit_numbits parse_bit_scalar parse_carray parse_carray_long parse_const parse_const_complex parse_const_ncols parse_divide 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_hidden_field parse_hidden_meta parse_include parse_include_absolute parse_include_absrel parse_include_loop parse_include_nonexistent parse_include_prefix parse_include_prefix_dup parse_include_preprefix parse_include_relabs parse_include_relrel parse_include_slash parse_include_suffix parse_include_sufsuffix parse_index parse_lincom parse_lincom_ncols1 parse_lincom_ncols2 parse_lincom_nfields parse_lincom_nofields parse_lincom_non parse_lincom_non_ncols parse_lincom_scalar parse_linterp parse_linterp_ncols parse_malias parse_malias_dup parse_malias_meta parse_meta parse_meta_affix parse_meta_alias parse_meta_implicit parse_meta_implicit2 parse_meta_implicit_affix parse_meta_index parse_meta_index2 parse_meta_jump parse_meta_malias parse_meta_meta parse_meta_parent parse_meta_raw parse_mplex parse_mplex_ncols parse_mplex_nomax parse_mplex_scalar parse_multiply parse_multiply_ncols parse_name parse_name_dot parse_name_ext parse_name_pedantic parse_ncols parse_phase parse_phase_ncols parse_phase_scalar parse_polynom parse_polynom_ncols1 parse_polynom_ncols2 parse_polynom_scalar parse_protect_all parse_protect_bad parse_protect_data parse_protect_format parse_protect_none parse_quote 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_version_89 parse_version_98 parse_version_include parse_version_p8 parse_version_p9 parse_version_permissive parse_version_slash parse_whitespace parse_window parse_window_ncols parse_window_op parse_window_scalar protect_alter protect_get put64 put_bad_code put_bit put_bof put_carray put_carray_slice put_char put_complex128 put_complex64 put_const put_const_protect put_divide put_endian16 put_endian32 put_endian64 put_endian8 put_endian_complex128_arm put_endian_complex128_big put_endian_complex128_little put_endian_complex64_arm put_endian_complex64_big put_endian_complex64_little put_endian_float32_arm put_endian_float32_big put_endian_float32_little put_endian_float64_arm put_endian_float64_big put_endian_float64_little put_ff put_float32 put_float64 put_foffs put_fs put_here put_heres put_int16 put_int32 put_int64 put_int8 put_invalid put_lincom1 put_lincom2 put_lincom_noin put_linterp put_linterp_noin put_linterp_nomono put_linterp_notab put_linterp_reverse put_mplex put_multiply put_null put_off64 put_phase put_phase_noin put_polynom1 put_polynom2 put_polynom_noin put_protect put_rdonly put_recip put_recurse put_repr put_rofs put_sbit put_sf put_ss put_string put_string_protect put_type put_uint16 put_uint32 put_uint64 put_window put_zero ref ref_none ref_two repr_a repr_float32 repr_float64 repr_i repr_int16 repr_int32 repr_int64 repr_int8 repr_m repr_r repr_real_a repr_real_i repr_real_m repr_real_r repr_uint16 repr_uint32 repr_uint64 repr_uint8 seek64 seek_cur seek_end seek_foffs seek_set sie_get_big sie_get_little sie_move_from sie_move_to sie_nframes_big sie_nframes_little sie_put_big sie_put_little slim_get slim_nframes slim_put spf spf_alias spf_alias_meta spf_alias_missing spf_divide spf_lincom spf_multiply spf_polynom spf_recip spf_recurse svlist svlist_hidden svlist_invalid svlist_meta svlist_meta_hidden svlist_meta_invalid tell tell64 trunc trunc_dir trunc_rdonly trunc_rofs trunc_truncsub unclude unclude_del unclude_move version_0 version_0_write version_1 version_1_write version_2 version_2_write version_3 version_3_write version_4 version_4_write version_5 version_5_strict version_5_write version_6 version_6_strict version_6_write version_7 version_7_strict version_7_write version_8 version_8_strict version_8_write version_9 version_9_strict version_9_write vlist vlist_alias vlist_hidden vlist_invalid vlist_meta vlist_meta_hidden vlist_meta_invalid xz_get xz_nframes zzip_data zzip_get zzip_get_get zzip_nframes zzslim_get zzslim_nframes + Makefile Makefile.in valgrind.log *.o dirfile *.swp *.exe .deps .libs 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_raw_type add_rdonly add_recip add_resolv add_sbit add_scalar add_scalar_carray add_sort add_spec add_spec_affix add_spec_directive add_spec_invalid add_spec_meta add_spec_resolv add_string add_string_affix add_type add_window add_window_op alias_list alias_list_alias alias_list_missing alias_num alias_num_alias alias_num_missing alias_target alias_target_alias alias_target_missing alter_bit_bitnum alter_bit_numbits alter_carray_len alter_carray_type alter_const alter_cpolynom alter_crecip alter_crecip89 alter_crecip_zero alter_divide alter_entry alter_entry_affix alter_entry_hidden alter_entry_recode alter_entry_scalar2a alter_entry_scalar2n alter_entry_scalar3 alter_entry_scalar4 alter_lincom_23 alter_lincom_32 alter_lincom_affix alter_lincom_input alter_lincom_offset alter_lincom_slope alter_linterp alter_linterp_move alter_mplex alter_mspec alter_mspec_affix alter_multiply alter_phase alter_polynom_coeff alter_polynom_input alter_polynom_ord alter_raw_spf alter_raw_type alter_recip alter_recip_zero alter_scalar_affix alter_spec alter_spec_affix alter_spec_meta alter_window ascii_add ascii_get ascii_get_get ascii_nframes ascii_put bof bof_lincom bof_phase bzip_get bzip_get_get bzip_move_from bzip_nframes bzip_put close close_bad close_discard close_null convert_complex128_complex64 convert_complex128_float64 convert_complex128_int64 convert_complex128_uint64 convert_complex64_complex128 convert_complex64_float64 convert_complex64_int64 convert_complex64_uint64 convert_float32_complex128 convert_float32_complex64 convert_float32_float64 convert_float32_int16 convert_float32_int32 convert_float32_int64 convert_float32_int8 convert_float32_uint16 convert_float32_uint32 convert_float32_uint64 convert_float32_uint8 convert_float64_complex128 convert_float64_complex64 convert_float64_float32 convert_float64_int16 convert_float64_int32 convert_float64_int64 convert_float64_int8 convert_float64_uint16 convert_float64_uint32 convert_float64_uint64 convert_float64_uint8 convert_int16_complex128 convert_int16_complex64 convert_int16_float32 convert_int16_float64 convert_int16_int32 convert_int16_int64 convert_int16_int8 convert_int16_uint16 convert_int16_uint32 convert_int16_uint64 convert_int16_uint8 convert_int32_complex128 convert_int32_complex64 convert_int32_float32 convert_int32_float64 convert_int32_int16 convert_int32_int64 convert_int32_int8 convert_int32_uint16 convert_int32_uint32 convert_int32_uint64 convert_int32_uint8 convert_int64_complex128 convert_int64_complex64 convert_int64_float32 convert_int64_float64 convert_int64_int16 convert_int64_int32 convert_int64_int8 convert_int64_uint16 convert_int64_uint32 convert_int64_uint64 convert_int64_uint8 convert_int8_complex128 convert_int8_complex64 convert_int8_float32 convert_int8_float64 convert_int8_int16 convert_int8_int32 convert_int8_int64 convert_int8_uint16 convert_int8_uint32 convert_int8_uint64 convert_int8_uint8 convert_uint16_complex128 convert_uint16_complex64 convert_uint16_float32 convert_uint16_float64 convert_uint16_int16 convert_uint16_int32 convert_uint16_int64 convert_uint16_int8 convert_uint16_uint32 convert_uint16_uint64 convert_uint16_uint8 convert_uint32_complex128 convert_uint32_complex64 convert_uint32_float32 convert_uint32_float64 convert_uint32_int16 convert_uint32_int32 convert_uint32_int64 convert_uint32_int8 convert_uint32_uint16 convert_uint32_uint64 convert_uint32_uint8 convert_uint64_complex128 convert_uint64_complex64 convert_uint64_float32 convert_uint64_float64 convert_uint64_int16 convert_uint64_int32 convert_uint64_int64 convert_uint64_int8 convert_uint64_uint16 convert_uint64_uint32 convert_uint64_uint8 convert_uint8_complex128 convert_uint8_complex64 convert_uint8_float32 convert_uint8_float64 convert_uint8_int16 convert_uint8_int32 convert_uint8_int64 convert_uint8_int8 convert_uint8_uint16 convert_uint8_uint32 convert_uint8_uint64 creat creat_excl creat_rdonly cvlist cvlist_array cvlist_array_hidden cvlist_array_meta cvlist_array_meta_hidden cvlist_hidden cvlist_invalid cvlist_meta cvlist_meta_hidden cvlist_meta_invalid del del_carray del_carray_deref del_const del_const_deref del_const_force del_data del_derived del_derived_after del_derived_force del_meta del_meta_force desync desync_flush desync_reopen desync_reopen_inv dfes_bit dfes_divide dfes_lincom dfes_linterp dfes_multiply dfes_null dfes_phase dfes_raw dfes_recip dfes_zero elist_alias elist_hidden elist_noalias elist_scalar encode_alter encode_get encode_move endian_alter endian_alter_sie endian_get endian_move entry_bad_code entry_bit entry_bit_scalar entry_divide entry_invalid entry_lincom entry_lincom_scalar entry_linterp entry_mplex entry_mplex_scalar entry_multiply entry_phase entry_phase_scalar entry_polynom entry_polynom_scalar entry_raw entry_raw_scalar entry_raw_scalar_code entry_raw_scalar_type entry_recip entry_scalar_repr entry_type entry_type_alias entry_window entry_window_scalar eof eof_index eof_lincom eof_phase error error_error error_num error_short error_verbose error_verbose_prefix file file_code file_type flist flist_hidden flist_invalid flist_meta flist_meta_hidden flist_meta_invalid flist_type flist_type_hidden flist_type_invalid flist_type_meta flist_type_meta_hidden flist_type_meta_invalid flush flush_all flush_bad_code flush_invalid flush_meta flush_spec foffs_alter foffs_get foffs_move fragment_affix fragment_affix_alter fragment_affix_alter2 fragment_affix_dup fragment_index fragment_index_alias fragment_name fragment_name_oor fragment_num fragment_parent 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_endian16 get_endian32 get_endian64 get_endian8 get_endian_complex128_arm get_endian_complex128_big get_endian_complex128_little get_endian_complex64_arm get_endian_complex64_big get_endian_complex64_little get_endian_float32_arm get_endian_float32_big get_endian_float32_little get_endian_float64_arm get_endian_float64_big get_endian_float64_little get_ff get_float32 get_float64 get_foffs get_fs get_here get_here_foffs get_heres get_int16 get_int32 get_int64 get_int8 get_invalid get_lincom1 get_lincom2 get_lincom3 get_lincom_noin get_lincom_non get_lincom_null get_lincom_spf get_linterp get_linterp_noin get_linterp_notab get_linterp_sort get_mplex 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_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 get_window_ne get_window_set get_zero global_flags global_name global_ref global_ref_empty global_ref_set gzip_add gzip_get gzip_get_get gzip_get_put gzip_move_from gzip_move_to gzip_nframes gzip_put gzip_put_get header_complex hide hide_hidden hide_unhide include include_accmode include_affix include_auto include_cb include_creat include_ignore include_index include_invalid include_nonexistent include_pc include_ref include_syntax index index_domain index_range legacy_get legacy_get_put legacy_get_rofs legacy_nframes legacy_nonexistent legacy_put legacy_spf lzma_get lzma_nframes madd madd_affix madd_alias madd_alias_affix madd_bit madd_bit_invalid madd_carray madd_clincom madd_const madd_cpolynom madd_crecip madd_crecip89 madd_divide madd_index madd_lincom madd_lincom_invalid madd_linterp madd_linterp_invalid madd_mplex madd_multiply madd_multiply_invalid madd_phase madd_phase_invalid madd_polynom madd_recip madd_sbit madd_spec madd_spec_directive madd_spec_invalid madd_spec_resolv madd_string madd_window move move_affix move_affix_dup move_alias move_data_enc_ar move_data_enc_ra move_data_endian move_data_foffs move_data_nop move_index move_meta move_protect move_subdir name name_affix name_affix_bad name_alias name_dup name_move name_move_alias name_updb name_updb_alias name_updb_const name_updb_const_alias nentries_alias nentries_hidden nentries_noalias nentries_scalar nfields nfields_hidden nfields_invalid nfields_type nfields_type_hidden nfields_type_invalid nfields_vector nfields_vector_hidden nfields_vector_invalid nframes nframes64 nframes_empty nframes_invalid nframes_off64 nframes_spf nmeta nmeta_hidden nmeta_invalid nmeta_parent nmeta_type nmeta_type_hidden nmeta_type_invalid nmeta_type_parent nmeta_vectors nmeta_vectors_del nmeta_vectors_hidden nmeta_vectors_invalid nmeta_vectors_parent open open_abs open_cb_abort open_cb_cont open_cb_ignore open_cb_invalid open_cb_rescan open_eaccess open_nonexistent open_notdirfile parse_alias parse_alias_code parse_alias_dup parse_alias_meta parse_alias_missing parse_badline parse_bit parse_bit4 parse_bit_bitnum parse_bit_bitsize parse_bit_ncols parse_bit_numbits parse_bit_scalar parse_carray parse_carray_long parse_const parse_const_complex parse_const_ncols parse_divide 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_hidden_field parse_hidden_meta parse_include parse_include_absolute parse_include_absrel parse_include_loop parse_include_nonexistent parse_include_prefix parse_include_prefix_dup parse_include_preprefix parse_include_relabs parse_include_relrel parse_include_slash parse_include_suffix parse_include_sufsuffix parse_index parse_lincom parse_lincom_ncols1 parse_lincom_ncols2 parse_lincom_nfields parse_lincom_nofields parse_lincom_non parse_lincom_non_ncols parse_lincom_scalar parse_linterp parse_linterp_ncols parse_malias parse_malias_dup parse_malias_meta parse_meta parse_meta_affix parse_meta_alias parse_meta_implicit parse_meta_implicit2 parse_meta_implicit_affix parse_meta_index parse_meta_index2 parse_meta_jump parse_meta_malias parse_meta_meta parse_meta_parent parse_meta_raw parse_mplex parse_mplex_ncols parse_mplex_nomax parse_mplex_scalar parse_multiply parse_multiply_ncols parse_name parse_name_dot parse_name_ext parse_name_pedantic parse_ncols parse_phase parse_phase_ncols parse_phase_scalar parse_polynom parse_polynom_ncols1 parse_polynom_ncols2 parse_polynom_scalar parse_protect_all parse_protect_bad parse_protect_data parse_protect_format parse_protect_none parse_quote 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_version_89 parse_version_98 parse_version_include parse_version_p8 parse_version_p9 parse_version_permissive parse_version_slash parse_whitespace parse_window parse_window_ncols parse_window_op parse_window_scalar protect_alter protect_get put64 put_bad_code put_bit put_bof put_carray put_carray_slice put_char put_complex128 put_complex64 put_const put_const_protect put_divide put_endian16 put_endian32 put_endian64 put_endian8 put_endian_complex128_arm put_endian_complex128_big put_endian_complex128_little put_endian_complex64_arm put_endian_complex64_big put_endian_complex64_little put_endian_float32_arm put_endian_float32_big put_endian_float32_little put_endian_float64_arm put_endian_float64_big put_endian_float64_little put_ff put_float32 put_float64 put_foffs put_fs put_here put_heres put_int16 put_int32 put_int64 put_int8 put_invalid put_lincom1 put_lincom2 put_lincom_noin put_linterp put_linterp_noin put_linterp_nomono put_linterp_notab put_linterp_reverse put_mplex put_multiply put_null put_off64 put_phase put_phase_noin put_polynom1 put_polynom2 put_polynom_noin put_protect put_rdonly put_recip put_recurse put_repr put_rofs put_sbit put_sf put_ss put_string put_string_protect put_type put_uint16 put_uint32 put_uint64 put_window put_zero ref ref_none ref_two repr_a repr_float32 repr_float64 repr_i repr_int16 repr_int32 repr_int64 repr_int8 repr_m repr_r repr_real_a repr_real_i repr_real_m repr_real_r repr_uint16 repr_uint32 repr_uint64 repr_uint8 seek64 seek_cur seek_end seek_foffs seek_set sie_get_big sie_get_little sie_move_from sie_move_to sie_nframes_big sie_nframes_little sie_put_big sie_put_little slim_get slim_nframes slim_put spf spf_alias spf_alias_meta spf_alias_missing spf_divide spf_lincom spf_multiply spf_polynom spf_recip spf_recurse svlist svlist_hidden svlist_invalid svlist_meta svlist_meta_hidden svlist_meta_invalid table table_code table_type tell tell64 trunc trunc_dir trunc_rdonly trunc_rofs trunc_truncsub unclude unclude_del unclude_move version_0 version_0_write version_1 version_1_write version_2 version_2_write version_3 version_3_write version_4 version_4_write version_5 version_5_strict version_5_write version_6 version_6_strict version_6_write version_7 version_7_strict version_7_write version_8 version_8_strict version_8_write version_9 version_9_strict version_9_write vlist vlist_alias vlist_hidden vlist_invalid vlist_meta vlist_meta_hidden vlist_meta_invalid xz_get xz_nframes zzip_data zzip_get zzip_get_get zzip_nframes zzslim_get zzslim_nframes Modified: trunk/getdata/test/Makefile.am =================================================================== --- trunk/getdata/test/Makefile.am 2012-07-26 22:01:36 UTC (rev 751) +++ trunk/getdata/test/Makefile.am 2012-08-02 02:46:15 UTC (rev 752) @@ -329,6 +329,8 @@ spf_divide spf_lincom spf_multiply \ spf_polynom spf_recip spf_recurse +TABLE_TESTS=table table_code table_type + TELL_TESTS=tell tell64 TRUNC_TESTS=trunc trunc_dir trunc_rdonly trunc_rofs trunc_truncsub @@ -363,9 +365,9 @@ $(NENTRIES_TESTS) $(NFIELDS_TESTS) $(NFRAMES_TESTS) $(NMETA_TESTS) \ $(OPEN_TESTS) $(PARSE_TESTS) $(PROTECT_TESTS) $(PUT_TESTS) \ $(REF_TESTS) $(REPR_TESTS) $(SEEK_TESTS) $(SIE_TESTS) \ - $(SLIM_TESTS) $(SPF_TESTS) $(SVLIST_TESTS) $(TELL_TESTS) \ - $(TRUNC_TESTS) $(UNCLUDE_TESTS) $(VERSION_TESTS) $(VLIST_TESTS) \ - $(XZ_TESTS) $(ZZIP_TESTS) $(ZZSLIM_TESTS) + $(SLIM_TESTS) $(SPF_TESTS) $(SVLIST_TESTS) $(TABLE_TESTS) \ + $(TELL_TESTS) $(TRUNC_TESTS) $(UNCLUDE_TESTS) $(VERSION_TESTS) \ + $(VLIST_TESTS) $(XZ_TESTS) ... [truncated message content] |
From: <ket...@us...> - 2012-07-26 22:01:47
|
Revision: 751 http://getdata.svn.sourceforge.net/getdata/?rev=751&view=rev Author: ketiltrout Date: 2012-07-26 22:01:36 +0000 (Thu, 26 Jul 2012) Log Message: ----------- Write /HIDDEN directives for /ALIASes. Modified Paths: -------------- trunk/getdata/ChangeLog trunk/getdata/NEWS trunk/getdata/src/flush.c trunk/getdata/test/version_9_write.c Modified: trunk/getdata/ChangeLog =================================================================== --- trunk/getdata/ChangeLog 2012-07-26 00:28:43 UTC (rev 750) +++ trunk/getdata/ChangeLog 2012-07-26 22:01:36 UTC (rev 751) @@ -1,3 +1,6 @@ +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 Modified: trunk/getdata/NEWS =================================================================== --- trunk/getdata/NEWS 2012-07-26 00:28:43 UTC (rev 750) +++ trunk/getdata/NEWS 2012-07-26 22:01:36 UTC (rev 751) @@ -11,6 +11,8 @@ * 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. + * WIN32 BUG FIX: On Windows, the parser can now properly handle hexadecimal floating point. Modified: trunk/getdata/src/flush.c =================================================================== --- trunk/getdata/src/flush.c 2012-07-26 00:28:43 UTC (rev 750) +++ trunk/getdata/src/flush.c 2012-07-26 22:01:36 UTC (rev 751) @@ -372,216 +372,218 @@ _GD_WriteFieldCode(D, stream, me, E->in_fields[0], permissive, D->standards); fputc('\n', stream); - dreturnvoid(); - return; - } + } else { + ptr = E->field; - ptr = E->field; + /* From Standards Version 7 and on, just use Barth-style */ + if (meta && D->standards < 7) { + fputs("META ", stream); + _GD_StringEscapeise(stream, ptr, 1, permissive, D->standards); + fputc(' ', stream); + ptr = strchr(E->field, '/') + 1; + } - /* From Standards Version 7 and on, just use Barth-style */ - if (meta && D->standards < 7) { - fputs("META ", stream); - _GD_StringEscapeise(stream, ptr, 1, permissive, D->standards); - fputc(' ', stream); - ptr = strchr(E->field, '/') + 1; - } + /* field name */ + _GD_PadField(D, stream, me, ptr, max_len, permissive, D->standards); - /* field name */ - _GD_PadField(D, stream, me, ptr, max_len, permissive, D->standards); - - switch(E->field_type) { - case GD_RAW_ENTRY: - fprintf(stream, " RAW%s %s ", pretty ? " " : "", - (permissive || D->standards >= 5) ? _GD_TypeName(D, - E->EN(raw,data_type)) : _GD_OldTypeName(D, E->EN(raw,data_type))); - _GD_WriteConst(D, stream, me, permissive, GD_UINT16, &E->EN(raw,spf), - E->scalar[0], E->scalar_ind[0], "\n"); - break; - case GD_LINCOM_ENTRY: - fprintf(stream, " LINCOM%s %i", pretty ? " " : "", - E->EN(lincom,n_fields)); - for (i = 0; i < E->EN(lincom,n_fields); ++i) { + switch(E->field_type) { + case GD_RAW_ENTRY: + fprintf(stream, " RAW%s %s ", pretty ? " " : "", + (permissive || D->standards >= 5) ? _GD_TypeName(D, + E->EN(raw,data_type)) : _GD_OldTypeName(D, E->EN(raw,data_type))); + _GD_WriteConst(D, stream, me, permissive, GD_UINT16, &E->EN(raw,spf), + E->scalar[0], E->scalar_ind[0], "\n"); + break; + case GD_LINCOM_ENTRY: + fprintf(stream, " LINCOM%s %i", pretty ? " " : "", + E->EN(lincom,n_fields)); + for (i = 0; i < E->EN(lincom,n_fields); ++i) { + fputc(' ', stream); + _GD_WriteFieldCode(D, stream, me, E->in_fields[i], permissive, + D->standards); + fputc(' ', stream); + if (E->comp_scal) { + _GD_WriteConst(D, stream, me, permissive, GD_COMPLEX128, + &E->EN(lincom,cm)[i], E->scalar[i], E->scalar_ind[i], " "); + _GD_WriteConst(D, stream, me, permissive, GD_COMPLEX128, + &E->EN(lincom,cb)[i], E->scalar[i + GD_MAX_LINCOM], + E->scalar_ind[i + GD_MAX_LINCOM], ""); + } else { + _GD_WriteConst(D, stream, me, permissive, GD_FLOAT64, + &E->EN(lincom,m)[i], E->scalar[i], E->scalar_ind[i], " "); + _GD_WriteConst(D, stream, me, permissive, GD_FLOAT64, + &E->EN(lincom,b)[i], E->scalar[i + GD_MAX_LINCOM], + E->scalar_ind[i + GD_MAX_LINCOM], ""); + } + } + fputc('\n', stream); + break; + case GD_LINTERP_ENTRY: + fprintf(stream, " LINTERP%s ", pretty ? " " : ""); + _GD_WriteFieldCode(D, stream, me, E->in_fields[0], permissive, + D->standards); fputc(' ', stream); - _GD_WriteFieldCode(D, stream, me, E->in_fields[i], permissive, + _GD_StringEscapeise(stream, E->EN(linterp,table), 0, permissive, D->standards); + fputc('\n', stream); + break; + case GD_BIT_ENTRY: + fprintf(stream, " BIT%s ", pretty ? " " : ""); + _GD_WriteFieldCode(D, stream, me, E->in_fields[0], permissive, + D->standards); fputc(' ', stream); - if (E->comp_scal) { - _GD_WriteConst(D, stream, me, permissive, GD_COMPLEX128, - &E->EN(lincom,cm)[i], E->scalar[i], E->scalar_ind[i], " "); - _GD_WriteConst(D, stream, me, permissive, GD_COMPLEX128, - &E->EN(lincom,cb)[i], E->scalar[i + GD_MAX_LINCOM], - E->scalar_ind[i + GD_MAX_LINCOM], ""); - } else { - _GD_WriteConst(D, stream, me, permissive, GD_FLOAT64, - &E->EN(lincom,m)[i], E->scalar[i], E->scalar_ind[i], " "); - _GD_WriteConst(D, stream, me, permissive, GD_FLOAT64, - &E->EN(lincom,b)[i], E->scalar[i + GD_MAX_LINCOM], - E->scalar_ind[i + GD_MAX_LINCOM], ""); + _GD_WriteConst(D, stream, me, permissive, GD_INT_TYPE, &E->EN(bit,bitnum), + E->scalar[0], E->scalar_ind[0], " "); + _GD_WriteConst(D, stream, me, permissive, GD_INT_TYPE, + &E->EN(bit,numbits), E->scalar[1], E->scalar_ind[1], "\n"); + break; + case GD_DIVIDE_ENTRY: + fprintf(stream, " DIVIDE%s ", pretty ? " " : ""); + _GD_WriteFieldCode(D, stream, me, E->in_fields[0], permissive, + D->standards); + fputc(' ', stream); + _GD_WriteFieldCode(D, stream, me, E->in_fields[1], permissive, + D->standards); + fputc('\n', stream); + break; + case GD_RECIP_ENTRY: + fprintf(stream, " RECIP%s ", pretty ? " " : ""); + _GD_WriteFieldCode(D, stream, me, E->in_fields[0], permissive, + D->standards); + fputc(' ', stream); + _GD_WriteConst(D, stream, me, permissive, GD_COMPLEX128, + &E->EN(recip,cdividend), E->scalar[0], E->scalar_ind[0], "\n"); + break; + case GD_MULTIPLY_ENTRY: + fputs(" MULTIPLY ", stream); + _GD_WriteFieldCode(D, stream, me, E->in_fields[0], permissive, + D->standards); + fputc(' ', stream); + _GD_WriteFieldCode(D, stream, me, E->in_fields[1], permissive, + D->standards); + fputc('\n', stream); + break; + case GD_PHASE_ENTRY: + fprintf(stream, " PHASE%s ", pretty ? " " : ""); + _GD_WriteFieldCode(D, stream, me, E->in_fields[0], permissive, + D->standards); + fputc(' ', stream); + _GD_WriteConst(D, stream, me, permissive, GD_INT64, &E->EN(phase,shift), + E->scalar[0], E->scalar_ind[0], "\n"); + break; + case GD_POLYNOM_ENTRY: + fprintf(stream, " POLYNOM%s ", pretty ? " " : ""); + _GD_WriteFieldCode(D, stream, me, E->in_fields[0], permissive, + D->standards); + fputc(' ', stream); + for (i = 0; i <= E->EN(polynom,poly_ord); ++i) + if (E->comp_scal) + _GD_WriteConst(D, stream, me, permissive, GD_COMPLEX128, + &E->EN(polynom,ca)[i], E->scalar[i], E->scalar_ind[i], + (i == E->EN(polynom,poly_ord)) ? "\n" : " "); + else + _GD_WriteConst(D, stream, me, permissive, GD_FLOAT64, + &E->EN(polynom,a)[i], E->scalar[i], E->scalar_ind[i], + (i == E->EN(polynom,poly_ord)) ? "\n" : " "); + break; + case GD_SBIT_ENTRY: + fprintf(stream, " SBIT%s ", pretty ? " " : ""); + _GD_WriteFieldCode(D, stream, me, E->in_fields[0], permissive, + D->standards); + fputc(' ', stream); + _GD_WriteConst(D, stream, me, permissive, GD_INT_TYPE, &E->EN(bit,bitnum), + E->scalar[0], E->scalar_ind[0], " "); + _GD_WriteConst(D, stream, me, permissive, GD_INT_TYPE, + &E->EN(bit,numbits), E->scalar[1], E->scalar_ind[1], "\n"); + break; + case GD_WINDOW_ENTRY: + fprintf(stream, " WINDOW%s ", pretty ? " " : ""); + _GD_WriteFieldCode(D, stream, me, E->in_fields[0], permissive, + D->standards); + fputc(' ', stream); + _GD_WriteFieldCode(D, stream, me, E->in_fields[1], permissive, + D->standards); + fprintf(stream, " %s ", _GD_WindopName(D, E->EN(window,windop))); + switch (E->EN(window,windop)) { + case GD_WINDOP_EQ: + case GD_WINDOP_NE: + _GD_WriteConst(D, stream, me, permissive, GD_INT64, + &E->EN(window,threshold.i), E->scalar[0], E->scalar_ind[0], + "\n"); + break; + case GD_WINDOP_SET: + case GD_WINDOP_CLR: + _GD_WriteConst(D, stream, me, permissive, GD_UINT64, + &E->EN(window,threshold.u), E->scalar[0], E->scalar_ind[0], + "\n"); + break; + default: + _GD_WriteConst(D, stream, me, permissive, GD_FLOAT64, + &E->EN(window,threshold.r), E->scalar[0], E->scalar_ind[0], + "\n"); + break; } - } - fputc('\n', stream); - break; - case GD_LINTERP_ENTRY: - fprintf(stream, " LINTERP%s ", pretty ? " " : ""); - _GD_WriteFieldCode(D, stream, me, E->in_fields[0], permissive, - D->standards); - fputc(' ', stream); - _GD_StringEscapeise(stream, E->EN(linterp,table), 0, permissive, - D->standards); - fputc('\n', stream); - break; - case GD_BIT_ENTRY: - fprintf(stream, " BIT%s ", pretty ? " " : ""); - _GD_WriteFieldCode(D, stream, me, E->in_fields[0], permissive, - D->standards); - fputc(' ', stream); - _GD_WriteConst(D, stream, me, permissive, GD_INT_TYPE, &E->EN(bit,bitnum), - E->scalar[0], E->scalar_ind[0], " "); - _GD_WriteConst(D, stream, me, permissive, GD_INT_TYPE, - &E->EN(bit,numbits), E->scalar[1], E->scalar_ind[1], "\n"); - break; - case GD_DIVIDE_ENTRY: - fprintf(stream, " DIVIDE%s ", pretty ? " " : ""); - _GD_WriteFieldCode(D, stream, me, E->in_fields[0], permissive, - D->standards); - fputc(' ', stream); - _GD_WriteFieldCode(D, stream, me, E->in_fields[1], permissive, - D->standards); - fputc('\n', stream); - break; - case GD_RECIP_ENTRY: - fprintf(stream, " RECIP%s ", pretty ? " " : ""); - _GD_WriteFieldCode(D, stream, me, E->in_fields[0], permissive, - D->standards); - fputc(' ', stream); - _GD_WriteConst(D, stream, me, permissive, GD_COMPLEX128, - &E->EN(recip,cdividend), E->scalar[0], E->scalar_ind[0], "\n"); - break; - case GD_MULTIPLY_ENTRY: - fputs(" MULTIPLY ", stream); - _GD_WriteFieldCode(D, stream, me, E->in_fields[0], permissive, - D->standards); - fputc(' ', stream); - _GD_WriteFieldCode(D, stream, me, E->in_fields[1], permissive, - D->standards); - fputc('\n', stream); - break; - case GD_PHASE_ENTRY: - fprintf(stream, " PHASE%s ", pretty ? " " : ""); - _GD_WriteFieldCode(D, stream, me, E->in_fields[0], permissive, - D->standards); - fputc(' ', stream); - _GD_WriteConst(D, stream, me, permissive, GD_INT64, &E->EN(phase,shift), - E->scalar[0], E->scalar_ind[0], "\n"); - break; - case GD_POLYNOM_ENTRY: - fprintf(stream, " POLYNOM%s ", pretty ? " " : ""); - _GD_WriteFieldCode(D, stream, me, E->in_fields[0], permissive, - D->standards); - fputc(' ', stream); - for (i = 0; i <= E->EN(polynom,poly_ord); ++i) - if (E->comp_scal) - _GD_WriteConst(D, stream, me, permissive, GD_COMPLEX128, - &E->EN(polynom,ca)[i], E->scalar[i], E->scalar_ind[i], - (i == E->EN(polynom,poly_ord)) ? "\n" : " "); - else - _GD_WriteConst(D, stream, me, permissive, GD_FLOAT64, - &E->EN(polynom,a)[i], E->scalar[i], E->scalar_ind[i], - (i == E->EN(polynom,poly_ord)) ? "\n" : " "); - break; - case GD_SBIT_ENTRY: - fprintf(stream, " SBIT%s ", pretty ? " " : ""); - _GD_WriteFieldCode(D, stream, me, E->in_fields[0], permissive, - D->standards); - fputc(' ', stream); - _GD_WriteConst(D, stream, me, permissive, GD_INT_TYPE, &E->EN(bit,bitnum), - E->scalar[0], E->scalar_ind[0], " "); - _GD_WriteConst(D, stream, me, permissive, GD_INT_TYPE, - &E->EN(bit,numbits), E->scalar[1], E->scalar_ind[1], "\n"); - break; - case GD_WINDOW_ENTRY: - fprintf(stream, " WINDOW%s ", pretty ? " " : ""); - _GD_WriteFieldCode(D, stream, me, E->in_fields[0], permissive, - D->standards); - fputc(' ', stream); - _GD_WriteFieldCode(D, stream, me, E->in_fields[1], permissive, - D->standards); - fprintf(stream, " %s ", _GD_WindopName(D, E->EN(window,windop))); - switch (E->EN(window,windop)) { - case GD_WINDOP_EQ: - case GD_WINDOP_NE: - _GD_WriteConst(D, stream, me, permissive, GD_INT64, - &E->EN(window,threshold.i), E->scalar[0], E->scalar_ind[0], "\n"); - break; - case GD_WINDOP_SET: - case GD_WINDOP_CLR: - _GD_WriteConst(D, stream, me, permissive, GD_UINT64, - &E->EN(window,threshold.u), E->scalar[0], E->scalar_ind[0], "\n"); - break; - default: - _GD_WriteConst(D, stream, me, permissive, GD_FLOAT64, - &E->EN(window,threshold.r), E->scalar[0], E->scalar_ind[0], "\n"); - break; - } - break; - case GD_MPLEX_ENTRY: - fprintf(stream, " MPLEX%s ", pretty ? " " : ""); - _GD_WriteFieldCode(D, stream, me, E->in_fields[0], permissive, - D->standards); - fputc(' ', stream); - _GD_WriteFieldCode(D, stream, me, E->in_fields[1], permissive, - D->standards); - fputc(' ', stream); - _GD_WriteConst(D, stream, me, permissive, GD_INT_TYPE, - &E->EN(mplex,count_val), E->scalar[0], E->scalar_ind[0], ""); - if (E->EN(mplex,count_max) > 0 || E->scalar[1]) { + break; + case GD_MPLEX_ENTRY: + fprintf(stream, " MPLEX%s ", pretty ? " " : ""); + _GD_WriteFieldCode(D, stream, me, E->in_fields[0], permissive, + D->standards); fputc(' ', stream); + _GD_WriteFieldCode(D, stream, me, E->in_fields[1], permissive, + D->standards); + fputc(' ', stream); _GD_WriteConst(D, stream, me, permissive, GD_INT_TYPE, - &E->EN(mplex,count_max), E->scalar[1], E->scalar_ind[1], "\n"); - } else + &E->EN(mplex,count_val), E->scalar[0], E->scalar_ind[0], ""); + if (E->EN(mplex,count_max) > 0 || E->scalar[1]) { + fputc(' ', stream); + _GD_WriteConst(D, stream, me, permissive, GD_INT_TYPE, + &E->EN(mplex,count_max), E->scalar[1], E->scalar_ind[1], "\n"); + } else + fputc('\n', stream); + break; + case GD_CONST_ENTRY: + fprintf(stream, " CONST%s %s ", pretty ? " " : "", _GD_TypeName(D, + E->EN(scalar,const_type))); + if (E->EN(scalar,const_type) & GD_SIGNED) + fprintf(stream, "%" PRIi64 "\n", *(int64_t*)E->e->u.scalar.d); + else if (E->EN(scalar,const_type) & GD_IEEE754) + fprintf(stream, "%.15g\n", *(double*)E->e->u.scalar.d); + else if (E->EN(scalar,const_type) & GD_COMPLEX) + fprintf(stream, "%.15g;%.15g\n", *(double*)E->e->u.scalar.d, + *((double*)E->e->u.scalar.d + 1)); + else + fprintf(stream, "%" PRIu64 "\n", *(uint64_t*)E->e->u.scalar.d); + break; + case GD_CARRAY_ENTRY: + fprintf(stream, " CARRAY%s %s", pretty ? " " : "", _GD_TypeName(D, + E->EN(scalar,const_type))); + if (E->EN(scalar,const_type) & GD_SIGNED) + for (z = 0; z < E->EN(scalar,array_len); ++z) + fprintf(stream, " %" PRIi64, ((int64_t*)E->e->u.scalar.d)[z]); + else if (E->EN(scalar,const_type) & GD_IEEE754) + for (z = 0; z < E->EN(scalar,array_len); ++z) + fprintf(stream, " %.15g", ((double*)E->e->u.scalar.d)[z]); + else if (E->EN(scalar,const_type) & GD_COMPLEX) + for (z = 0; z < E->EN(scalar,array_len); ++z) + fprintf(stream, " %.15g;%.15g", ((double*)E->e->u.scalar.d)[2 * z], + ((double*)E->e->u.scalar.d)[2 * z + 1]); + else + for (z = 0; z < E->EN(scalar,array_len); ++z) + fprintf(stream, " %" PRIu64, ((uint64_t*)E->e->u.scalar.d)[z]); fputc('\n', stream); - break; - case GD_CONST_ENTRY: - fprintf(stream, " CONST%s %s ", pretty ? " " : "", _GD_TypeName(D, - E->EN(scalar,const_type))); - if (E->EN(scalar,const_type) & GD_SIGNED) - fprintf(stream, "%" PRIi64 "\n", *(int64_t*)E->e->u.scalar.d); - else if (E->EN(scalar,const_type) & GD_IEEE754) - fprintf(stream, "%.15g\n", *(double*)E->e->u.scalar.d); - else if (E->EN(scalar,const_type) & GD_COMPLEX) - fprintf(stream, "%.15g;%.15g\n", *(double*)E->e->u.scalar.d, - *((double*)E->e->u.scalar.d + 1)); - else - fprintf(stream, "%" PRIu64 "\n", *(uint64_t*)E->e->u.scalar.d); - break; - case GD_CARRAY_ENTRY: - fprintf(stream, " CARRAY%s %s", pretty ? " " : "", _GD_TypeName(D, - E->EN(scalar,const_type))); - if (E->EN(scalar,const_type) & GD_SIGNED) - for (z = 0; z < E->EN(scalar,array_len); ++z) - fprintf(stream, " %" PRIi64, ((int64_t*)E->e->u.scalar.d)[z]); - else if (E->EN(scalar,const_type) & GD_IEEE754) - for (z = 0; z < E->EN(scalar,array_len); ++z) - fprintf(stream, " %.15g", ((double*)E->e->u.scalar.d)[z]); - else if (E->EN(scalar,const_type) & GD_COMPLEX) - for (z = 0; z < E->EN(scalar,array_len); ++z) - fprintf(stream, " %.15g;%.15g", ((double*)E->e->u.scalar.d)[2 * z], - ((double*)E->e->u.scalar.d)[2 * z + 1]); - else - for (z = 0; z < E->EN(scalar,array_len); ++z) - fprintf(stream, " %" PRIu64, ((uint64_t*)E->e->u.scalar.d)[z]); - fputc('\n', stream); - break; - case GD_STRING_ENTRY: - fprintf(stream, " STRING%s ", pretty ? " " : ""); - _GD_StringEscapeise(stream, E->e->u.string, 0, permissive, D->standards); - fputc('\n', stream); - break; - case GD_INDEX_ENTRY: - case GD_ALIAS_ENTRY: - case GD_NO_ENTRY: - _GD_InternalError(D); - break; + break; + case GD_STRING_ENTRY: + fprintf(stream, " STRING%s ", pretty ? " " : ""); + _GD_StringEscapeise(stream, E->e->u.string, 0, permissive, + D->standards); + fputc('\n', stream); + break; + case GD_INDEX_ENTRY: + case GD_ALIAS_ENTRY: + case GD_NO_ENTRY: + _GD_InternalError(D); + break; + } } if (!D->error && E->hidden && (permissive || D->standards >= 9)) { Modified: trunk/getdata/test/version_9_write.c =================================================================== --- trunk/getdata/test/version_9_write.c 2012-07-26 00:28:43 UTC (rev 750) +++ trunk/getdata/test/version_9_write.c 2012-07-26 22:01:36 UTC (rev 751) @@ -53,7 +53,7 @@ }; uint16_t c[8]; unsigned char data_data[256]; - int fd, i, error, n, v, r = 0; + int fd, i, error, n, v, h1, h2, r = 0; DIRFILE *D; memset(c, 0, 16); @@ -74,6 +74,7 @@ close(fd); D = gd_open(filedir, GD_RDWR | GD_VERBOSE); + h1 = gd_hidden(D, "AdYZ"); gd_rewrite_fragment(D, GD_ALL_FRAGMENTS); error = gd_error(D); gd_close(D); @@ -81,6 +82,7 @@ D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); v = gd_dirfile_standards(D, GD_VERSION_CURRENT); n = gd_getdata(D, "ar", 4, 0, 8, 0, GD_UINT16, c); + h2 = gd_hidden(D, "AdYZ"); gd_close(D); @@ -90,6 +92,8 @@ rmdir(filedir); CHECKI(error,0); + CHECKI(h1,1); + CHECKI(h2,1); CHECKI(n,8); CHECKI(v,9); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ket...@us...> - 2012-07-26 00:28:50
|
Revision: 750 http://getdata.svn.sourceforge.net/getdata/?rev=750&view=rev Author: ketiltrout Date: 2012-07-26 00:28:43 +0000 (Thu, 26 Jul 2012) Log Message: ----------- Doc update. Modified Paths: -------------- trunk/getdata/man/gd_add.3 trunk/getdata/man/gd_add_alias.3 trunk/getdata/man/gd_add_bit.3 trunk/getdata/man/gd_alter_bit.3 trunk/getdata/man/gd_alter_entry.3 Modified: trunk/getdata/man/gd_add.3 =================================================================== --- trunk/getdata/man/gd_add.3 2012-07-26 00:17:51 UTC (rev 749) +++ trunk/getdata/man/gd_add.3 2012-07-26 00:28:43 UTC (rev 750) @@ -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 "2 March 2012" "Version 0.8.0" "GETDATA" +.TH gd_add 3 "26 July 2012" "Version 0.8.1" "GETDATA" .SH NAME gd_add, gd_madd \(em add a field to a dirfile .SH SYNOPSIS @@ -106,8 +106,8 @@ .B GD_E_BAD_CODE The field name provided in .IR entry -> field -contained invalid characters or did not contain the affected fragment's prefix -or suffix. Alternately, the +contained invalid characters; or it or an input field did not contain the +affected fragment's prefix or suffix. Alternately, the .I parent field code was not found, or was already a metafield. .TP Modified: trunk/getdata/man/gd_add_alias.3 =================================================================== --- trunk/getdata/man/gd_add_alias.3 2012-07-26 00:17:51 UTC (rev 749) +++ trunk/getdata/man/gd_add_alias.3 2012-07-26 00:28:43 UTC (rev 750) @@ -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_alias 3 "1 January 2012" "Version 0.8.0" "GETDATA" +.TH gd_add_alias 3 "26 July 2012" "Version 0.8.1" "GETDATA" .SH NAME gd_add_alias, gd_madd_alias \(em add a field to a dirfile .SH SYNOPSIS @@ -62,8 +62,8 @@ .B GD_E_BAD_CODE The .IR alias_name -parameter contained invalid characters or was missing the indicated fragment's -field prefix or suffix. Alternately, the +contained invalid characters; or it or an input field did not contain the +affected fragment's prefix or suffix. Alternately, the .I parent field code was not found, or was already a metafield. .TP Modified: trunk/getdata/man/gd_add_bit.3 =================================================================== --- trunk/getdata/man/gd_add_bit.3 2012-07-26 00:17:51 UTC (rev 749) +++ trunk/getdata/man/gd_add_bit.3 2012-07-26 00:28:43 UTC (rev 750) @@ -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 "1 April 2012" "Version 0.8.0" "GETDATA" +.TH gd_add_bit 3 "26 July 2012" "Version 0.8.1" "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, @@ -233,8 +233,8 @@ .B GD_E_BAD_CODE The .IR field_name -argument contained invalid characters or did not contain the affected fragment's -prefix or suffix. +contained invalid characters; or it or an input field did not contain the +affected fragment's prefix or suffix. .TP .B GD_E_BAD_DIRFILE The supplied dirfile was invalid. Modified: trunk/getdata/man/gd_alter_bit.3 =================================================================== --- trunk/getdata/man/gd_alter_bit.3 2012-07-26 00:17:51 UTC (rev 749) +++ trunk/getdata/man/gd_alter_bit.3 2012-07-26 00:28:43 UTC (rev 750) @@ -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 "19 April 2012" "Version 0.8.0" "GETDATA" +.TH gd_alter_bit 3 "26 July 2012" "Version 0.8.1" "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, @@ -221,7 +221,8 @@ .B GD_E_BAD_CODE The field specified by .I field_code -was not found. +was not found, or a supplied field code did not contain the appropriate prefix +or suffix. .TP .B GD_E_BAD_DIRFILE The supplied dirfile was invalid. Modified: trunk/getdata/man/gd_alter_entry.3 =================================================================== --- trunk/getdata/man/gd_alter_entry.3 2012-07-26 00:17:51 UTC (rev 749) +++ trunk/getdata/man/gd_alter_entry.3 2012-07-26 00:28:43 UTC (rev 750) @@ -1,6 +1,6 @@ .\" gd_alter_entry.3. The gd_alter_entry man page. .\" -.\" Copyright (C) 2008, 2009, 2010 D. V. Wiebe +.\" Copyright (C) 2008, 2009, 2010, 2012 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 "3 November 2010" "Version 0.7.0" "GETDATA" +.TH gd_alter_entry 3 "26 July 2012" "Version 0.8.1" "GETDATA" .SH NAME gd_alter_entry \(em modify the metadata of a dirfile field .SH SYNOPSIS @@ -173,8 +173,9 @@ .B GD_E_BAD_CODE The field specified by .I field_code -was not found. This error may also result from attempting to dereference a -scalar field code which indicates a non-existent field. +was not found or a supplied field code did not contain the appropriate prefix +or suffix. This error may also result from attempting to dereference a scalar +field code which indicates a non-existent field. .TP .B GD_E_BAD_DIRFILE The supplied dirfile was invalid. This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ket...@us...> - 2012-07-26 00:18:00
|
Revision: 749 http://getdata.svn.sourceforge.net/getdata/?rev=749&view=rev Author: ketiltrout Date: 2012-07-26 00:17:51 +0000 (Thu, 26 Jul 2012) Log Message: ----------- Automake affix bookkeeping when reading metadata. Modified Paths: -------------- trunk/getdata/ChangeLog trunk/getdata/NEWS trunk/getdata/bindings/perl/GetData.xs trunk/getdata/man/gd_include_affix.3 trunk/getdata/src/add.c trunk/getdata/src/common.c trunk/getdata/src/entry.c trunk/getdata/src/flush.c trunk/getdata/src/fragment.c trunk/getdata/src/internal.h trunk/getdata/src/mod.c trunk/getdata/src/move.c trunk/getdata/src/name.c trunk/getdata/src/parse.c trunk/getdata/test/Makefile.am trunk/getdata/test/add_affix.c trunk/getdata/test/add_string_affix.c trunk/getdata/test/madd_affix.c Added Paths: ----------- trunk/getdata/test/add_alias_affix.c trunk/getdata/test/add_lincom_affix.c trunk/getdata/test/add_spec_affix.c trunk/getdata/test/alter_lincom_affix.c trunk/getdata/test/alter_scalar_affix.c trunk/getdata/test/get_affix.c trunk/getdata/test/madd_alias_affix.c Property Changed: ---------------- trunk/getdata/test/ Modified: trunk/getdata/ChangeLog =================================================================== --- trunk/getdata/ChangeLog 2012-07-21 09:03:26 UTC (rev 748) +++ trunk/getdata/ChangeLog 2012-07-26 00:17:51 UTC (rev 749) @@ -1,3 +1,33 @@ +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. Modified: trunk/getdata/NEWS =================================================================== --- trunk/getdata/NEWS 2012-07-21 09:03:26 UTC (rev 748) +++ trunk/getdata/NEWS 2012-07-26 00:17:51 UTC (rev 749) @@ -1,6 +1,41 @@ +New in version 0.8.1: + + Library Changes: + + * 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. + + * BUG FIX: A number of minor memory leaks, mostly occurring when the library + encounters an error, have been fixed. + + * WIN32 BUG FIX: On Windows, the parser can now properly handle hexadecimal + 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 suffixes. + + * 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. + + Bindings Changes: + + * F77 BUG FIX: A memory leak has been fixed in GDALLC. + +|==============================================================================| + New in version 0.8.0: - Dirfile Changes + Dirfile Changes: * Dirfile Standards Version 9 has been released. It adds two new field types: MPLEX, which allows multiplexing multiple low-rate channels in Modified: trunk/getdata/bindings/perl/GetData.xs =================================================================== --- trunk/getdata/bindings/perl/GetData.xs 2012-07-21 09:03:26 UTC (rev 748) +++ trunk/getdata/bindings/perl/GetData.xs 2012-07-26 00:17:51 UTC (rev 749) @@ -1126,7 +1126,6 @@ GDP_PUSHuv(E.field_type); GDP_PUSHpvn("fragment_index"); GDP_PUSHuv(E.fragment_index); - dwatch("%i", E.field_type); switch (E.field_type) { case GD_BIT_ENTRY: case GD_SBIT_ENTRY: Modified: trunk/getdata/man/gd_include_affix.3 =================================================================== --- trunk/getdata/man/gd_include_affix.3 2012-07-21 09:03:26 UTC (rev 748) +++ trunk/getdata/man/gd_include_affix.3 2012-07-26 00:17:51 UTC (rev 749) @@ -23,7 +23,7 @@ .nh .ad l .BI "int gd_include_affix(DIRFILE *" dirfile ", const char *" include_file , -.BI "int " parent_fragment ", const char *" prefix , "const char *" suffix , +.BI "int " parent_fragment ", const char *" prefix ", const char *" suffix , .BI "unsigned long " flags ); .HP .BI "int gd_include(DIRFILE *" dirfile ", const char *" include_file , Modified: trunk/getdata/src/add.c =================================================================== --- trunk/getdata/src/add.c 2012-07-21 09:03:26 UTC (rev 748) +++ trunk/getdata/src/add.c 2012-07-26 00:17:51 UTC (rev 749) @@ -45,8 +45,13 @@ dtrace("%p, %p, \"%s\", %i, %p", D, buffer, name, frag, offset); - /* Apply prefix and suffix */ - *buffer = ptr = _GD_MungeFromFrag(D, NULL, frag, name, offset); + /* Check prefix and suffix */ + if (_GD_CheckCodeAffixes(D, NULL, name, frag)) { + dreturn("%p", NULL); + return NULL; + } + + *buffer = ptr = _GD_Strdup(D, name); if (ptr == NULL) { free(ptr); @@ -78,7 +83,8 @@ sprintf(temp2, "%s/%s", P->field, ptr); free(*buffer); *buffer = temp2; - } + } else + *offset = 0; dreturn("%p (\"%s\", %i)", P, *buffer, *offset); return P; @@ -148,8 +154,8 @@ temp_buffer[offset - 1] = '/'; strcpy(temp_buffer + offset, entry->field); } else { - /* this will munge the name and take care of detecting Barth-style metafield - * definitions */ + /* this will check for affixes and take care of detecting Barth-style + * metafield definitions */ P = _GD_FixName(D, &temp_buffer, entry->field, entry->fragment_index, &offset); @@ -275,6 +281,18 @@ if (E->EN(lincom,n_fields) < 1 || E->EN(lincom,n_fields) > GD_MAX_LINCOM) _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) { + _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; @@ -310,15 +328,34 @@ case GD_LINTERP_ENTRY: E->e->u.linterp.table_len = -1; + if (_GD_CheckCodeAffixes(D, NULL, entry->in_fields[0], + entry->fragment_index)) + { + break; + } + E->in_fields[0] = _GD_Strdup(D, entry->in_fields[0]); E->EN(linterp,table) = _GD_Strdup(D, entry->EN(linterp,table)); break; case GD_MULTIPLY_ENTRY: case GD_DIVIDE_ENTRY: + if (_GD_CheckCodeAffixes(D, NULL, entry->in_fields[0], + entry->fragment_index) || _GD_CheckCodeAffixes(D, NULL, + entry->in_fields[1], entry->fragment_index)) + { + break; + } + E->in_fields[0] = _GD_Strdup(D, entry->in_fields[0]); 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)) + { + break; + } + E->in_fields[0] = _GD_Strdup(D, entry->in_fields[0]); copy_scalar[0] = 1; @@ -337,6 +374,12 @@ 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)) + { + break; + } + E->in_fields[0] = _GD_Strdup(D, entry->in_fields[0]); if (E->EN(bit,numbits) < 1) _GD_SetError(D, GD_E_BAD_ENTRY, GD_E_ENTRY_NUMBITS, NULL, @@ -352,6 +395,12 @@ case GD_PHASE_ENTRY: E->EN(phase,shift) = entry->EN(phase,shift); + if (_GD_CheckCodeAffixes(D, NULL, entry->in_fields[0], + entry->fragment_index)) + { + break; + } + E->in_fields[0] = _GD_Strdup(D, entry->in_fields[0]); copy_scalar[0] = 1; break; @@ -359,6 +408,13 @@ 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) || _GD_CheckCodeAffixes(D, NULL, + entry->in_fields[1], entry->fragment_index)) + { + break; + } + 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))) @@ -369,6 +425,14 @@ case GD_MPLEX_ENTRY: E->EN(mplex,count_val) = entry->EN(mplex,count_val); E->EN(mplex,count_max) = entry->EN(mplex,count_max); + + if (_GD_CheckCodeAffixes(D, NULL, entry->in_fields[0], + entry->fragment_index) || _GD_CheckCodeAffixes(D, NULL, + entry->in_fields[1], entry->fragment_index)) + { + break; + } + E->in_fields[0] = _GD_Strdup(D, entry->in_fields[0]); E->in_fields[1] = _GD_Strdup(D, entry->in_fields[1]); E->e->u.mplex.type = GD_NULL; @@ -430,29 +494,36 @@ { _GD_SetError(D, GD_E_BAD_ENTRY, GD_E_ENTRY_NFIELDS, NULL, E->EN(polynom,poly_ord), NULL); + } else { + _GD_CheckCodeAffixes(D, NULL, entry->in_fields[0], + entry->fragment_index); + _GD_CheckCodeAffixes(D, NULL, entry->in_fields[1], + entry->fragment_index); } - else { - if (entry->comp_scal) { - int cs = 0; - memcpy(E->EN(polynom,ca), entry->EN(polynom,ca), sizeof(double) * 2 * - (E->EN(polynom,poly_ord) + 1)); - for (i = 0; i <= E->EN(polynom,poly_ord); ++i) { - E->EN(polynom,a)[i] = creal(E->EN(polynom,ca)[i]); - if (cimag(E->EN(polynom,ca)[i])) - cs = 1; - } - E->comp_scal = cs; - } else { - memcpy(E->EN(polynom,a), entry->EN(polynom,a), sizeof(double) * - (E->EN(polynom,poly_ord) + 1)); - for (i = 0; i <= E->EN(polynom,poly_ord); ++i) - _gd_r2c(E->EN(polynom,ca)[i], E->EN(polynom,a)[i]); - E->comp_scal = 0; + + if (D->error) + break; + + if (entry->comp_scal) { + int cs = 0; + memcpy(E->EN(polynom,ca), entry->EN(polynom,ca), sizeof(double) * 2 * + (E->EN(polynom,poly_ord) + 1)); + for (i = 0; i <= E->EN(polynom,poly_ord); ++i) { + E->EN(polynom,a)[i] = creal(E->EN(polynom,ca)[i]); + if (cimag(E->EN(polynom,ca)[i])) + cs = 1; } - - E->in_fields[0] = _GD_Strdup(D, entry->in_fields[0]); + E->comp_scal = cs; + } else { + memcpy(E->EN(polynom,a), entry->EN(polynom,a), sizeof(double) * + (E->EN(polynom,poly_ord) + 1)); + for (i = 0; i <= E->EN(polynom,poly_ord); ++i) + _gd_r2c(E->EN(polynom,ca)[i], E->EN(polynom,a)[i]); + E->comp_scal = 0; } + 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; @@ -468,6 +539,11 @@ 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]; } @@ -1195,7 +1271,7 @@ /* add a MPLEX entry */ int gd_add_mplex(DIRFILE *D, const char *field_code, const char *in_field, const char *count_field, int count_val, int count_max, int fragment_index) -gd_nothrow + gd_nothrow { gd_entry_t E; int error; @@ -1337,7 +1413,7 @@ /* add a META LINCOM entry */ int gd_madd_lincom(DIRFILE* D, const char* parent, const char* field_code, int n_fields, const char** in_fields, const double* m, const double* b) -gd_nothrow + gd_nothrow { int i, error; gd_entry_t L; @@ -1792,7 +1868,7 @@ /* add a META MPLEX entry */ int gd_madd_mplex(DIRFILE *D, const char *parent, const char *field_code, const char *in_field, const char *count_field, int count_val, int count_max) -gd_nothrow + gd_nothrow { int error; gd_entry_t E; @@ -1919,9 +1995,9 @@ { unsigned u; int offset; - char *munged_code; + char *munged_code = NULL; void *ptr; - gd_entry_t *E, *P = NULL; + gd_entry_t *E = NULL, *P = NULL; dtrace("%p, \"%s\", \"%s\", \"%s\", %i", D, parent, field_code, target, fragment_index); @@ -1948,16 +2024,14 @@ P = _GD_FindField(D, parent, D->entry, D->n_entries, 1, NULL); if (P == NULL) { _GD_SetError(D, GD_E_BAD_CODE, GD_E_CODE_MISSING, NULL, 0, parent); - dreturn("%i", -1); - return -1; + goto add_alias_error; } fragment_index = P->fragment_index; /* make sure it's not a meta field already */ if (P->e->n_meta == -1) { _GD_SetError(D, GD_E_BAD_CODE, GD_E_CODE_INVALID, NULL, 0, parent); - dreturn("%i", -1); - return -1; + goto add_alias_error; } offset = strlen(parent) + 1; @@ -1968,15 +2042,12 @@ strcpy(munged_code + offset, field_code); } } else - /* this will munge the name and take care of detecting Barth-style metafield - * definitions */ + /* 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) { - free(munged_code); - dreturn("%i", -1); - return -1; - } + if (D->error) + goto add_alias_error; /* check alias name */ if (munged_code && _GD_ValidateField(munged_code + offset, D->standards, 1, 0, @@ -1985,35 +2056,28 @@ _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)) _GD_SetError(D, GD_E_DUPLICATE, 0, NULL, 0, munged_code); + else + _GD_CheckCodeAffixes(D, NULL, target, fragment_index); /* check target */ - if (D->error) { - free(munged_code); - dreturn("%i", -1); - return -1; - } + if (D->error) + goto add_alias_error; ptr = _GD_Realloc(D, D->entry, (D->n_entries + 1) * sizeof(gd_entry_t*)); - if (ptr == NULL) { - free(munged_code); - dreturn("%i", -1); - return -1; - } + if (ptr == NULL) + goto add_alias_error; D->entry = (gd_entry_t **)ptr; /* create and store */ E = (gd_entry_t *)_GD_Malloc(D, sizeof(gd_entry_t)); - if (E == NULL) { - dreturn("%i", -1); - return -1; - } + if (E == NULL) + goto add_alias_error; + memset(E, 0, sizeof(gd_entry_t)); E->e = (struct _gd_private_entry *)_GD_Malloc(D, sizeof(struct _gd_private_entry)); - if (E->e == NULL) { - free(E); - dreturn("%i", -1); - return -1; - } + if (E->e == NULL) + goto add_alias_error; + memset(E->e, 0, sizeof(struct _gd_private_entry)); E->field = munged_code; @@ -2023,6 +2087,7 @@ E->e->calculated = 1; if (D->error) { + _GD_FreeE(D, E, 1); dreturn("%i", -1); return -1; } @@ -2042,12 +2107,17 @@ D->entry_list_validity = 0; } - /* Update aliases */ _GD_UpdateAliases(D, 0); dreturn("%i", 0); return 0; + +add_alias_error: + free(E); + free(munged_code); + dreturn("%i", -1); + return -1; } int gd_add_alias(DIRFILE *D, const char *alias_name, const char *target_code, @@ -2078,6 +2148,8 @@ dtrace("%p, \"%s\", \"%s\", \"%s\"", D, parent, alias_name, target_code); + _GD_ClearError(D); + ret = _GD_AddAlias(D, parent, alias_name, target_code, 0); dreturn("%i", ret); Modified: trunk/getdata/src/common.c =================================================================== --- trunk/getdata/src/common.c 2012-07-21 09:03:26 UTC (rev 748) +++ trunk/getdata/src/common.c 2012-07-26 00:17:51 UTC (rev 749) @@ -854,28 +854,21 @@ /* Ensure that an input field has been identified (with error checking) */ int _GD_BadInput(DIRFILE *D, const gd_entry_t *E, int i, int err) { - char *code, *munged_code; - int offset; + char *code; dtrace("%p, %p, %i, %i", D, E, i, err); if (E->e->entry[i] == NULL) { - munged_code = _GD_MungeFromFrag(D, NULL, E->fragment_index, E->in_fields[i], - &offset); - if (munged_code) - E->e->entry[i] = _GD_FindFieldAndRepr(D, munged_code, &code, - &E->e->repr[i], NULL, 1, err); + E->e->entry[i] = _GD_FindFieldAndRepr(D, E->in_fields[i], &code, + &E->e->repr[i], NULL, 1, err); if (E->e->entry[i] == NULL) { - free(munged_code); dreturn("%i", 1); return 1; } - if (code != munged_code) + if (code != E->in_fields[i]) free(code); - - free(munged_code); } /* scalar entries not allowed */ Modified: trunk/getdata/src/entry.c =================================================================== --- trunk/getdata/src/entry.c 2012-07-21 09:03:26 UTC (rev 748) +++ trunk/getdata/src/entry.c 2012-07-26 00:17:51 UTC (rev 749) @@ -145,21 +145,17 @@ { void *ptr = NULL; gd_entry_t* C = NULL; - int repr, offset; - char* field_code, *munged_code; + int repr; + char* field_code; const char* scalar = E->scalar[i]; int index = E->scalar_ind[i]; dtrace("%p, %p, %i, %i, %p, %i", D, E, i, type, data, err); if (scalar != NULL) { - munged_code = _GD_MungeFromFrag(D, NULL, E->fragment_index, scalar, - &offset); - if (munged_code) - C = _GD_FindFieldAndRepr(D, munged_code, &field_code, &repr, NULL, 0, 1); + C = _GD_FindFieldAndRepr(D, scalar, &field_code, &repr, NULL, 0, 1); if (D->error) { - free(munged_code); dreturnvoid(); return; } @@ -194,10 +190,8 @@ } } - if (field_code != munged_code) + if (field_code != scalar) free(field_code); - - free(munged_code); } dreturnvoid(); Modified: trunk/getdata/src/flush.c =================================================================== --- trunk/getdata/src/flush.c 2012-07-21 09:03:26 UTC (rev 748) +++ trunk/getdata/src/flush.c 2012-07-26 00:17:51 UTC (rev 749) @@ -268,25 +268,43 @@ return len; } -static void _GD_PadField(DIRFILE *D, FILE* stream, const char *prefix, - const char *suffix, const char* in, size_t len, int permissive, - int standards) +/* write a field code, taking care of stripping off affixes; returns the length + * written */ +static size_t _GD_WriteFieldCode(DIRFILE *D, FILE *stream, int me, + const char *code, int permissive, int standards) { - size_t i; int dummy; + size_t len; char *ptr; - dtrace("%p, %p, \"%s\", \"%s\", \"%s\", %" PRNsize_t ", %i, %i", D, stream, - prefix, suffix, in, len, permissive, standards); + dtrace("%p, %p, %i, \"%s\", %i, %i", D, stream, me, code, permissive, + standards); - ptr = _GD_MungeCode(D, NULL, prefix, suffix, NULL, NULL, in, &dummy); + ptr = _GD_MungeCode(D, NULL, D->fragment[me].prefix, D->fragment[me].suffix, + NULL, NULL, code, &dummy, 0); - for (i = _GD_StringEscapeise(stream, ptr, 0, permissive, standards); i < len; - ++i) + len = _GD_StringEscapeise(stream, ptr, 0, permissive, standards); + + free(ptr); + + dreturn("%" PRNsize_t, len); + return len; +} + +/* write a field, padding to the specified length */ +static void _GD_PadField(DIRFILE *D, FILE *stream, int me, const char *in, + size_t len, int permissive, int standards) +{ + size_t i; + + dtrace("%p, %p, %i, \"%s\", %" PRNsize_t ", %i, %i", D, stream, me, in, len, + permissive, standards); + + for (i = _GD_WriteFieldCode(D, stream, me, in, permissive, standards); + i < len; ++i) { fputc(' ', stream); } - free(ptr); dreturnvoid(); } @@ -296,19 +314,15 @@ int type, const void* value, const char* scalar, int index, const char* postamble) { - int dummy; dtrace("%p, %p, %i, %i, 0x%X, %p, \"%s\", %i, \"%s\"", D, stream, me, permissive, type, value, scalar, index, postamble); if (scalar != NULL) { - char *ptr = _GD_MungeCode(D, NULL, D->fragment[me].prefix, - D->fragment[me].suffix, NULL, NULL, scalar, &dummy); - _GD_StringEscapeise(stream, ptr, 0, permissive, D->standards); + _GD_WriteFieldCode(D, stream, me, scalar, permissive, D->standards); if (index == -1) fprintf(stream, "%s", postamble); else fprintf(stream, "<%i>%s", index, postamble); - free(ptr); } else if (type == GD_UINT64) fprintf(stream, "%" PRIu64 "%s", *(uint64_t *)value, postamble); @@ -353,11 +367,9 @@ /* aliases */ if (E->field_type == GD_ALIAS_ENTRY) { fputs("/ALIAS ", stream); - _GD_PadField(D, stream, D->fragment[me].prefix, D->fragment[me].suffix, - E->field, 0, permissive, D->standards); + _GD_WriteFieldCode(D, stream, me, E->field, permissive, D->standards); fputc(' ', stream); - _GD_PadField(D, stream, D->fragment[me].prefix, D->fragment[me].suffix, - E->e->entry[1] ? E->e->entry[1]->field : E->in_fields[0], 0, permissive, + _GD_WriteFieldCode(D, stream, me, E->in_fields[0], permissive, D->standards); fputc('\n', stream); dreturnvoid(); @@ -375,8 +387,7 @@ } /* field name */ - _GD_PadField(D, stream, D->fragment[me].prefix, D->fragment[me].suffix, ptr, - max_len, permissive, D->standards); + _GD_PadField(D, stream, me, ptr, max_len, permissive, D->standards); switch(E->field_type) { case GD_RAW_ENTRY: @@ -391,7 +402,7 @@ E->EN(lincom,n_fields)); for (i = 0; i < E->EN(lincom,n_fields); ++i) { fputc(' ', stream); - _GD_StringEscapeise(stream, E->in_fields[i], 0, permissive, + _GD_WriteFieldCode(D, stream, me, E->in_fields[i], permissive, D->standards); fputc(' ', stream); if (E->comp_scal) { @@ -412,7 +423,8 @@ break; case GD_LINTERP_ENTRY: fprintf(stream, " LINTERP%s ", pretty ? " " : ""); - _GD_StringEscapeise(stream, E->in_fields[0], 0, permissive, D->standards); + _GD_WriteFieldCode(D, stream, me, E->in_fields[0], permissive, + D->standards); fputc(' ', stream); _GD_StringEscapeise(stream, E->EN(linterp,table), 0, permissive, D->standards); @@ -420,7 +432,8 @@ break; case GD_BIT_ENTRY: fprintf(stream, " BIT%s ", pretty ? " " : ""); - _GD_StringEscapeise(stream, E->in_fields[0], 0, permissive, D->standards); + _GD_WriteFieldCode(D, stream, me, E->in_fields[0], permissive, + D->standards); fputc(' ', stream); _GD_WriteConst(D, stream, me, permissive, GD_INT_TYPE, &E->EN(bit,bitnum), E->scalar[0], E->scalar_ind[0], " "); @@ -429,35 +442,42 @@ break; case GD_DIVIDE_ENTRY: fprintf(stream, " DIVIDE%s ", pretty ? " " : ""); - _GD_StringEscapeise(stream, E->in_fields[0], 0, permissive, D->standards); + _GD_WriteFieldCode(D, stream, me, E->in_fields[0], permissive, + D->standards); fputc(' ', stream); - _GD_StringEscapeise(stream, E->in_fields[1], 0, permissive, D->standards); + _GD_WriteFieldCode(D, stream, me, E->in_fields[1], permissive, + D->standards); fputc('\n', stream); break; case GD_RECIP_ENTRY: fprintf(stream, " RECIP%s ", pretty ? " " : ""); - _GD_StringEscapeise(stream, E->in_fields[0], 0, permissive, D->standards); + _GD_WriteFieldCode(D, stream, me, E->in_fields[0], permissive, + D->standards); fputc(' ', stream); _GD_WriteConst(D, stream, me, permissive, GD_COMPLEX128, &E->EN(recip,cdividend), E->scalar[0], E->scalar_ind[0], "\n"); break; case GD_MULTIPLY_ENTRY: fputs(" MULTIPLY ", stream); - _GD_StringEscapeise(stream, E->in_fields[0], 0, permissive, D->standards); + _GD_WriteFieldCode(D, stream, me, E->in_fields[0], permissive, + D->standards); fputc(' ', stream); - _GD_StringEscapeise(stream, E->in_fields[1], 0, permissive, D->standards); + _GD_WriteFieldCode(D, stream, me, E->in_fields[1], permissive, + D->standards); fputc('\n', stream); break; case GD_PHASE_ENTRY: fprintf(stream, " PHASE%s ", pretty ? " " : ""); - _GD_StringEscapeise(stream, E->in_fields[0], 0, permissive, D->standards); + _GD_WriteFieldCode(D, stream, me, E->in_fields[0], permissive, + D->standards); fputc(' ', stream); _GD_WriteConst(D, stream, me, permissive, GD_INT64, &E->EN(phase,shift), E->scalar[0], E->scalar_ind[0], "\n"); break; case GD_POLYNOM_ENTRY: fprintf(stream, " POLYNOM%s ", pretty ? " " : ""); - _GD_StringEscapeise(stream, E->in_fields[0], 0, permissive, D->standards); + _GD_WriteFieldCode(D, stream, me, E->in_fields[0], permissive, + D->standards); fputc(' ', stream); for (i = 0; i <= E->EN(polynom,poly_ord); ++i) if (E->comp_scal) @@ -471,7 +491,8 @@ break; case GD_SBIT_ENTRY: fprintf(stream, " SBIT%s ", pretty ? " " : ""); - _GD_StringEscapeise(stream, E->in_fields[0], 0, permissive, D->standards); + _GD_WriteFieldCode(D, stream, me, E->in_fields[0], permissive, + D->standards); fputc(' ', stream); _GD_WriteConst(D, stream, me, permissive, GD_INT_TYPE, &E->EN(bit,bitnum), E->scalar[0], E->scalar_ind[0], " "); @@ -480,9 +501,11 @@ break; case GD_WINDOW_ENTRY: fprintf(stream, " WINDOW%s ", pretty ? " " : ""); - _GD_StringEscapeise(stream, E->in_fields[0], 0, permissive, D->standards); + _GD_WriteFieldCode(D, stream, me, E->in_fields[0], permissive, + D->standards); fputc(' ', stream); - _GD_StringEscapeise(stream, E->in_fields[1], 0, permissive, D->standards); + _GD_WriteFieldCode(D, stream, me, E->in_fields[1], permissive, + D->standards); fprintf(stream, " %s ", _GD_WindopName(D, E->EN(window,windop))); switch (E->EN(window,windop)) { case GD_WINDOP_EQ: @@ -503,9 +526,11 @@ break; case GD_MPLEX_ENTRY: fprintf(stream, " MPLEX%s ", pretty ? " " : ""); - _GD_StringEscapeise(stream, E->in_fields[0], 0, permissive, D->standards); + _GD_WriteFieldCode(D, stream, me, E->in_fields[0], permissive, + D->standards); fputc(' ', stream); - _GD_StringEscapeise(stream, E->in_fields[1], 0, permissive, D->standards); + _GD_WriteFieldCode(D, stream, me, E->in_fields[1], permissive, + D->standards); fputc(' ', stream); _GD_WriteConst(D, stream, me, permissive, GD_INT_TYPE, &E->EN(mplex,count_val), E->scalar[0], E->scalar_ind[0], ""); @@ -561,8 +586,7 @@ if (!D->error && E->hidden && (permissive || D->standards >= 9)) { fputs("/HIDDEN ", stream); - _GD_PadField(D, stream, D->fragment[me].prefix, D->fragment[me].suffix, - E->field, 0, permissive, D->standards); + _GD_WriteFieldCode(D, stream, me, E->field, permissive, D->standards); fputc('\n', stream); } @@ -730,9 +754,9 @@ 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); + 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); + NULL, D->fragment[j].suffix, &dummy, 0); fprintf(stream, "%sINCLUDE ", (D->standards >= 5) ? "/" : ""); _GD_StringEscapeise(stream, D->fragment[j].ename, 0, permissive, Modified: trunk/getdata/src/fragment.c =================================================================== --- trunk/getdata/src/fragment.c 2012-07-21 09:03:26 UTC (rev 748) +++ trunk/getdata/src/fragment.c 2012-07-26 00:17:51 UTC (rev 749) @@ -110,9 +110,9 @@ 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); + 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); + NULL, suffix, D->fragment[j].suffix, &dummy, 1); if (D->error) { free(subprefix); dreturn("%p (%i)", new_codes, *n); @@ -138,7 +138,8 @@ 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); + D->fragment[i].suffix, prefix, suffix, D->entry[u]->field, &dummy, + 0); /* look for a duplicate and validate */ if (new_codes[nn - 1] && _GD_FindField(D, new_codes[nn - 1], D->entry, Modified: trunk/getdata/src/internal.h =================================================================== --- trunk/getdata/src/internal.h 2012-07-21 09:03:26 UTC (rev 748) +++ trunk/getdata/src/internal.h 2012-07-26 00:17:51 UTC (rev 749) @@ -1027,6 +1027,8 @@ char *_GD_CanonicalPath(const char *restrict, const char *restrict); gd_entry_t *_GD_CheckParent(DIRFILE *restrict D, char **restrict name, int me, int linenum); +int _GD_CheckCodeAffixes(DIRFILE *D, const gd_entry_t *P, + const char *field_code, int fragment); void _GD_CInvertData(DIRFILE *restrict, void *restrict, gd_type_t return_type, GD_DCOMPLEXA(dividend), size_t); @@ -1101,7 +1103,7 @@ unsigned long int, off64_t, int, int, char *restrict); char *_GD_MungeCode(DIRFILE *restrict, const gd_entry_t *restrict, const char *restrict, const char *restrict, const char *restrict, - const char *restrict, const char *restrict, int *restrict); + const char *restrict, const char *restrict, int *restrict, int); char *_GD_MungeFromFrag(DIRFILE *restrict, const gd_entry_t *restrict, int, const char *restrict, int *restrict); gd_type_t _GD_NativeType(DIRFILE *restrict, gd_entry_t *restrict, int); Modified: trunk/getdata/src/mod.c =================================================================== --- trunk/getdata/src/mod.c 2012-07-21 09:03:26 UTC (rev 748) +++ trunk/getdata/src/mod.c 2012-07-26 00:17:51 UTC (rev 749) @@ -39,13 +39,13 @@ */ static int _GD_AlterScalar(DIRFILE* D, int alter_literal, gd_type_t type, void *lout, const void *lin, char **sout, int *iout, const char *sin, - int iin, int calculated) + int iin, int calculated, int fragment_index) { int r = 0; int set_lout = 0; - dtrace("%p, %i, 0x%X, %p, %p, %p, %p, %p, %i, %i", D, alter_literal, type, - lout, lin, sout, iout, sin, iin, calculated); + dtrace("%p, %i, 0x%X, %p, %p, %p, %p, %p, %i, %i, %i", D, alter_literal, type, + lout, lin, sout, iout, sin, iin, calculated, fragment_index); if (sin == NULL) { if (*sout != NULL) { @@ -79,9 +79,11 @@ /* 2: set a new CONST field from sout; if this is a RAW field, and we've * been asked to move the raw file, _GD_Change is going to need to * recalculate the entry; no need to change lout: it's ignored. */ - r = GD_AS_FREE_SCALAR | GD_AS_NEED_RECALC | GD_AS_MODIFIED; - *sout = _GD_Strdup(D, sin); - *iout = iin; + if (!_GD_CheckCodeAffixes(D, NULL, sin, fragment_index)) { + r = GD_AS_FREE_SCALAR | GD_AS_NEED_RECALC | GD_AS_MODIFIED; + *sout = _GD_Strdup(D, sin); + *iout = iin; + } } if (!D->error && set_lout) { @@ -187,6 +189,29 @@ dreturnvoid(); } +/* returns -1 on error, 1 if modified, 0 if no change */ +static int _GD_AlterInField(DIRFILE *D, int i, char **Q, char *const *N, + char *const *E, int fragment_index, int force) +{ + dtrace("%p, %i, %p, %p, %p, %i, %i", D, i, Q, N, E, fragment_index, force); + + if (force || (N[i] != NULL && strcmp(E[i], N[i]))) { + if (_GD_CheckCodeAffixes(D, NULL, N[i], fragment_index)) { + dreturn("%i", -1); + return -1; + } else if ((Q[i] = _GD_Strdup(D, N[i])) == NULL) { + dreturn("%i", -1); + return -1; + } + + dreturn("%i", 1); + return 1; + } + + dreturn("%i", 0); + return 0; +} + /* N is the new entry, supplied by the user * E is the old entry, stored in the database * Q is our workspace; in the end, Q is a sanitised N which replaces E */ @@ -233,7 +258,7 @@ case GD_RAW_ENTRY: j = _GD_AlterScalar(D, N->EN(raw,spf) && N->EN(raw,spf) != E->EN(raw,spf), GD_UINT16, &Q.EN(raw,spf), &N->EN(raw,spf), Q.scalar, Q.scalar_ind, - N->scalar[0], N->scalar_ind[0], E->e->calculated); + N->scalar[0], N->scalar_ind[0], E->e->calculated, E->fragment_index); if (j & GD_AS_ERROR) break; @@ -406,29 +431,30 @@ Q.comp_scal = 0; for (i = 0; i < Q.EN(lincom,n_fields); ++i) { - if (flags & 0x1) - if (E->EN(lincom,n_fields) <= i || (N->in_fields[i] != NULL && - strcmp(E->in_fields[i], N->in_fields[i]))) - { - if ((Q.in_fields[i] = _GD_Strdup(D, N->in_fields[i])) == NULL) - break; - + if (flags & 0x1) { + j = _GD_AlterInField(D, i, Q.in_fields, N->in_fields, E->in_fields, + E->fragment_index, E->EN(lincom,n_fields) <= i); + if (j < 0) + break; + else if (j) { modified = 1; field_free |= 1 << i; } + } if (flags & 0x2) { if (N->comp_scal) { j = _GD_AlterScalar(D, !_gd_ccmpc(E->EN(lincom,cm)[i], N->EN(lincom,cm)[i]), GD_COMPLEX128, Q.EN(lincom,cm) + i, N->EN(lincom,cm) + i, Q.scalar + i, Q.scalar_ind + i, - N->scalar[i], N->scalar_ind[i], E->e->calculated); + N->scalar[i], N->scalar_ind[i], E->e->calculated, + E->fragment_index); Q.EN(lincom,m)[i] = creal(Q.EN(lincom,cm)[i]); } else { j = _GD_AlterScalar(D, E->EN(lincom,m)[i] != N->EN(lincom,m)[i], GD_FLOAT64, Q.EN(lincom,m) + i, N->EN(lincom,m) + i, Q.scalar + i, Q.scalar_ind + i, N->scalar[i], N->scalar_ind[i], - E->e->calculated); + E->e->calculated, E->fragment_index); _gd_r2c(Q.EN(lincom,cm)[i], Q.EN(lincom,m)[i]); } @@ -448,14 +474,15 @@ N->EN(lincom,cb)[i]), GD_COMPLEX128, Q.EN(lincom,cb) + i, N->EN(lincom,cb) + i, Q.scalar + i + GD_MAX_LINCOM, Q.scalar_ind + i + GD_MAX_LINCOM, N->scalar[i + GD_MAX_LINCOM], - N->scalar_ind[i + GD_MAX_LINCOM], E->e->calculated); + N->scalar_ind[i + GD_MAX_LINCOM], E->e->calculated, + E->fragment_index); Q.EN(lincom,b)[i] = creal(Q.EN(lincom,cb)[i]); } else { j = _GD_AlterScalar(D, E->EN(lincom,b)[i] != N->EN(lincom,b)[i], GD_FLOAT64, Q.EN(lincom,b) + i, N->EN(lincom,b) + i, Q.scalar + i + GD_MAX_LINCOM, Q.scalar_ind + i + GD_MAX_LINCOM, N->scalar[i + GD_MAX_LINCOM], N->scalar_ind[i + GD_MAX_LINCOM], - E->e->calculated); + E->e->calculated, E->fragment_index); _gd_r2c(Q.EN(lincom,cb)[i], Q.EN(lincom,b)[i]); } @@ -477,10 +504,11 @@ modified = 1; break; case GD_LINTERP_ENTRY: - if (N->in_fields[0] != NULL && strcmp(E->in_fields[0], N->in_fields[0])) { - if ((Q.in_fields[0] = _GD_Strdup(D, N->in_fields[0])) == NULL) - break; - + j = _GD_AlterInField(D, 0, Q.in_fields, N->in_fields, E->in_fields, + E->fragment_index, 0); + if (j < 0) + break; + else if (j) { modified = 1; field_free = 1; } @@ -524,7 +552,7 @@ j = _GD_AlterScalar(D, N->EN(bit,numbits) >= 1 && E->EN(bit,numbits) != N->EN(bit,numbits), GD_INT_TYPE, &Q.EN(bit,numbits), &N->EN(bit,numbits), Q.scalar + 1, Q.scalar_ind + 1, N->scalar[1], - N->scalar_ind[1], E->e->calculated); + N->scalar_ind[1], E->e->calculated, E->fragment_index); if (j & GD_AS_ERROR) break; @@ -538,7 +566,7 @@ j = _GD_AlterScalar(D, N->EN(bit,bitnum) >= 0 && E->EN(bit,bitnum) != N->EN(bit,bitnum), GD_INT_TYPE, &Q.EN(bit,bitnum), &N->EN(bit,bitnum), Q.scalar, Q.scalar_ind, N->scalar[0], N->scalar_ind[0], - E->e->calculated); + E->e->calculated, E->fragment_index); if (j & GD_AS_ERROR) break; @@ -549,10 +577,11 @@ if (j & GD_AS_MODIFIED) modified = 1; - if (N->in_fields[0] != NULL && strcmp(E->in_fields[0], N->in_fields[0])) { - if ((Q.in_fields[0] = _GD_Strdup(D, N->in_fields[0])) == NULL) - break; - + j = _GD_AlterInField(D, 0, Q.in_fields, N->in_fields, E->in_fields, + E->fragment_index, 0); + if (j < 0) + break; + else if (j) { modified = 1; field_free = 1; } @@ -560,28 +589,31 @@ break; case GD_MULTIPLY_ENTRY: case GD_DIVIDE_ENTRY: - if (N->in_fields[0] != NULL && strcmp(E->in_fields[0], N->in_fields[0])) { - if ((Q.in_fields[0] = _GD_Strdup(D, N->in_fields[0])) == NULL) - break; - + j = _GD_AlterInField(D, 0, Q.in_fields, N->in_fields, E->in_fields, + E->fragment_index, 0); + if (j < 0) + break; + else if (j) { modified = 1; field_free = 1; } - if (N->in_fields[1] != NULL && strcmp(E->in_fields[1], N->in_fields[1])) { - if ((Q.in_fields[1] = _GD_Strdup(D, N->in_fields[1])) == NULL) - break; - + j = _GD_AlterInField(D, 1, Q.in_fields, N->in_fields, E->in_fields, + E->fragment_index, 0); + if (j < 0) + break; + else if (j) { modified = 1; field_free |= 2; } break; case GD_RECIP_ENTRY: - if (N->in_fields[0] != NULL && strcmp(E->in_fields[0], N->in_fields[0])) { - if ((Q.in_fields[0] = _GD_Strdup(D, N->in_fields[0])) == NULL) - break; - + j = _GD_AlterInField(D, 0, Q.in_fields, N->in_fields, E->in_fields, + E->fragment_index, 0); + if (j < 0) + break; + else if (j) { modified = 1; field_free = 1; } @@ -589,10 +621,10 @@ Q.comp_scal = 0; if (N->comp_scal) { j = _GD_AlterScalar(D, cabs(N->EN(recip,cdividend)) != 0 && - !_gd_ccmpc(E->EN(recip,cdividend), N->EN(recip,cdividend)), - GD_COMPLEX128, &Q.EN(recip,cdividend), &(N->EN(recip,cdividend)), - Q.scalar, Q.scalar_ind, N->scalar[0], N->scalar_ind[0], - E->e->calculated); + !_gd_ccmpc(E->EN(recip,cdividend), N->EN(recip,cdividend)), + GD_COMPLEX128, &Q.EN(recip,cdividend), &(N->EN(recip,cdividend)), + Q.scalar, Q.scalar_ind, N->scalar[0], N->scalar_ind[0], + E->e->calculated, E->fragment_index); Q.EN(recip,dividend) = creal(Q.EN(recip,cdividend)); if (cimag(Q.EN(recip,cdividend)) != 0) Q.comp_scal = 1; @@ -600,7 +632,8 @@ j = _GD_AlterScalar(D, N->EN(recip,dividend) != 0 && E->EN(recip,dividend) != N->EN(recip,dividend), GD_FLOAT64, &Q.EN(recip,dividend), &(N->EN(recip,dividend)), Q.scalar, - Q.scalar_ind, N->scalar[0], N->scalar_ind[0], E->e->calculated); + Q.scalar_ind, N->scalar[0], N->scalar_ind[0], E->e->calculated, + E->fragment_index); _gd_r2c(Q.EN(recip,cdividend), Q.EN(recip,dividend)); } @@ -620,7 +653,7 @@ case GD_PHASE_ENTRY: j = _GD_AlterScalar(D, E->EN(phase,shift) != N->EN(phase,shift), GD_INT64, &Q.EN(phase,shift), &N->EN(phase,shift), Q.scalar, Q.scalar_ind, - N->scalar[0], N->scalar_ind[0], E->e->calculated); + N->scalar[0], N->scalar_ind[0], E->e->calculated, E->fragment_index); if (j & GD_AS_ERROR) break; @@ -631,20 +664,22 @@ if (j & GD_AS_MODIFIED) modified = 1; - if (N->in_fields[0] != NULL && strcmp(E->in_fields[0], N->in_fields[0])) { - if ((Q.in_fields[0] = _GD_Strdup(D, N->in_fields[0])) == NULL) - break; - + j = _GD_AlterInField(D, 0, Q.in_fields, N->in_fields, E->in_fields, + E->fragment_index, 0); + if (j < 0) + break; + else if (j) { modified = 1; field_free = 1; } break; case GD_POLYNOM_ENTRY: - if (N->in_fields[0] != NULL && strcmp(E->in_fields[0], N->in_fields[0])) { - if ((Q.in_fields[0] = _GD_Strdup(D, N->in_fields[0])) == NULL) - break; - + j = _GD_AlterInField(D, 0, Q.in_fields, N->in_fields, E->in_fields, + E->fragment_index, 0); + if (j < 0) + break; + else if (j) { modified = 1; field_free = 1; } @@ -662,13 +697,14 @@ j = _GD_AlterScalar(D, !_gd_ccmpc(E->EN(polynom,ca)[i], N->EN(polynom,ca)[i]), GD_COMPLEX128, Q.EN(polynom,ca) + i, N->EN(polynom,ca) + i, Q.scalar + i, Q.scalar_ind + i, - N->scalar[i], N->scalar_ind[i], E->e->calculated); + N->scalar[i], N->scalar_ind[i], E->e->calculated, + E->fragment_index); Q.EN(polynom,a)[i] = creal(Q.EN(polynom,ca)[i]); } else { j = _GD_AlterScalar(D, E->EN(polynom,a)[i] != N->EN(polynom,a)[i], GD_FLOAT64, Q.EN(polynom,a) + i, N->EN(polynom,a) + i, Q.scalar + i, Q.scalar_ind + i, N->scalar[i], N->scalar_ind[i], - E->e->calculated); + E->e->calculated, E->fragment_index); _gd_r2c(Q.EN(polynom,ca)[i], Q.EN(polynom,a)[i]); } @@ -703,20 +739,20 @@ j = _GD_AlterScalar(D, E->EN(window,threshold.i) != N->EN(window,threshold.i), GD_INT64, &Q.EN(window,threshold.i), &N->EN(window,threshold.i), Q.scalar, Q.scalar_ind, N->scalar[0], - N->scalar_ind[0], E->e->calculated); + N->scalar_ind[0], E->e->calculated, E->fragment_index); break; case GD_WINDOP_SET: case GD_WINDOP_CLR: j = _GD_AlterScalar(D, E->EN(window,threshold.u) != N->EN(window,threshold.u), GD_UINT64, &Q.EN(window,threshold.u), &N->EN(window,threshold.u), Q.scalar, Q.scalar_ind, N->scalar[0], - N->scalar_ind[0], E->e->calculated); + N->scalar_ind[0], E->e->calculated, E->fragment_index); break; default: j = _GD_AlterScalar(D, E->EN(window,threshold.r) != N->EN(window,threshold.r), GD_FLOAT64, &Q.EN(window,threshold.r), &N->EN(window,threshold.r), Q.scalar, Q.scalar_ind, N->scalar[0], - N->scalar_ind[0], E->e->calculated); + N->scalar_ind[0], E->e->calculated, E->fragment_index); break; } @@ -729,18 +765,20 @@ if (j & GD_AS_MODIFIED) modified = 1; - if (N->in_fields[0] != NULL && strcmp(E->in_fields[0], N->in_fields[0])) { - if ((Q.in_fields[0] = _GD_Strdup(D, N->in_fields[0])) == NULL) - break; - + j = _GD_AlterInField(D, 0, Q.in_fields, N->in_fields, E->in_fields, + E->fragment_index, 0); + if (j < 0) + break; + else if (j) { modified = 1; field_free |= 1; } - if (N->in_fields[1] != NULL && strcmp(E->in_fields[1], N->in_fields[1])) { - if ((Q.in_fields[1] = _GD_Strdup(D, N->in_fields[1])) == NULL) - break; - + j = _GD_AlterInField(D, 1, Q.in_fields, N->in_fields, E->in_fields, + E->fragment_index, 0); + if (j < 0) + break; + else if (j) { modified = 1; field_free |= 2; } @@ -750,7 +788,8 @@ j = _GD_AlterScalar(D, N->EN(mplex,count_max) != -1 && E->EN(mplex,count_max) != N->EN(mplex,count_max), GD_INT_TYPE, &Q.EN(mplex,count_max), &N->EN(mplex,count_max), Q.scalar, - Q.scalar_ind, N->scalar[0], N->scalar_ind[0], E->e->calculated); + Q.scalar_ind, N->scalar[0], N->scalar_ind[0], E->e->calculated, + E->fragment_index); if (j & GD_AS_ERROR) break; @@ -764,7 +803,8 @@ j = _GD_AlterScalar(D, N->EN(mplex,count_val) != -1 && 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], E->e->calculated); + Q.scalar_ind, N->scalar[1], N->scalar_ind[1], E->e->calculated, + E->fragment_index); if (j & GD_AS_ERROR) break; @@ -775,18 +815,20 @@ if (j & GD_AS_MODIFIED) modified = 1; - if (N->in_fields[0] != NULL && strcmp(E->in_fields[0], N->in_fields[0])) { - if ((Q.in_fields[0] = _GD_Strdup(D, N->in_fields[0])) == NULL) - break; - + j = _GD_AlterInField(D, 0, Q.in_fields, N->in_fields, E->in_fields, + E->fragment_index, 0); + if (j < 0) + break; + else if (j) { modified = 1; field_free |= 1; } - if (N->in_fields[1] != NULL && strcmp(E->in_fields[1], N->in_fields[1])) { - if ((Q.in_fields[1] = _GD_Strdup(D, N->in_fields[1])) == NULL) - break; - + j = _GD_AlterInField(D, 1, Q.in_fields, N->in_fields, E->in_fields, + E->fragment_index, 0); + if (j < 0) + break; + else if (j) { modified = 1; field_free |= 2; } @@ -945,6 +987,8 @@ return -1; } + _GD_ClearError(D); + /* To ensure .e is NULLed */ memcpy(&N, entry, sizeof(gd_entry_t)); N.e = NULL; @@ -1553,7 +1597,7 @@ int gd_alter_window(DIRFILE* D, const char *field_code, const char *in_field, const char *check_field, gd_windop_t windop, gd_triplet_t threshold) -gd_nothrow + gd_nothrow { int ret; gd_entry_t N; @@ -1585,7 +1629,7 @@ int gd_alter_mplex(DIRFILE* D, const char *field_code, const char *in_field, const char *count_field, int count_val, int count_max) -gd_nothrow + gd_nothrow { int ret; gd_entry_t N; Modified: trunk/getdata/src/move.c =================================================================== --- trunk/getdata/src/move.c 2012-07-21 09:03:26 UTC (rev 748) +++ trunk/getdata/src/move.c 2012-07-26 00:17:51 UTC (rev 749) @@ -339,7 +339,7 @@ /* Compose the field's new name */ new_filebase = _GD_MungeCode(D, NULL, D->fragment[E->fragment_index].prefix, - D->fragment[E->fragment_index].suffix, NULL, NULL, E->field, &dummy); + D->fragment[E->fragment_index].suffix, NULL, NULL, E->field, &dummy, 0); if (!new_filebase) { _GD_InternalError(D); /* the prefix/suffix wasn't found */ Modified: trunk/getdata/src/name.c =================================================================== --- trunk/getdata/src/name.c 2012-07-21 09:03:26 UTC (rev 748) +++ trunk/getdata/src/name.c 2012-07-26 00:17:51 UTC (rev 749) @@ -23,14 +23,14 @@ /* add/remove/modify the prefix and suffix from a field code */ char *_GD_MungeCode(DIRFILE *D, const gd_entry_t *P, const char *old_prefix, const char *old_suffix, const char *new_prefix, const char *new_suffix, - const char *code, int *offset) + const char *code, int *offset, int err_ok) { size_t len, oplen = 0, oslen = 0, nplen = 0, nslen = 0, plen = 0, mlen = 0; const char *ptr, *slash; char *new_code; - dtrace("%p, %p, \"%s\", \"%s\", \"%s\", \"%s\", \"%s\", %p", D, P, old_prefix, - old_suffix, new_prefix, new_suffix, code, offset); + dtrace("%p, %p, \"%s\", \"%s\", \"%s\", \"%s\", \"%s\", %p, %i", D, P, + old_prefix, old_suffix, new_prefix, new_suffix, code, offset, err_ok); if (code == NULL) { dreturn("%p", NULL); @@ -44,7 +44,10 @@ oplen = strlen(old_prefix); if (strncmp(old_prefix, code, oplen)) { /* prefix missing */ - _GD_SetError(D, GD_E_BAD_CODE, GD_E_CODE_INVALID, NULL, 0, code); + if (err_ok) + _GD_SetError(D, GD_E_BAD_CODE, GD_E_CODE_INVALID, NULL, 0, code); + else + _GD_InternalError(D); dreturn("%p", NULL); return NULL; } @@ -67,7 +70,10 @@ oslen = strlen(old_suffix); if (strncmp(old_suffix, ptr + len - oslen, oslen)) { /* suffix missing */ - _GD_SetError(D, GD_E_BAD_CODE, GD_E_CODE_INVALID, NULL, 0, code); + if (err_ok) + _GD_SetError(D, GD_E_BAD_CODE, GD_E_CODE_INVALID, NULL, 0, code); + else + _GD_InternalError(D); dreturn("%p", NULL); return NULL; } @@ -117,7 +123,7 @@ return new_code; } -/* Munge a field code or field name using the prefix and suffix of the current +/* Munge a field code or field name using the prefix and suffix of the given * fragment. Returns a newly malloc'd munged code, or NULL on error */ char *_GD_MungeFromFrag(DIRFILE *D, const gd_entry_t *P, int me, const char *code, int *offset) @@ -126,12 +132,32 @@ dtrace("%p, %p, %i, \"%s\", %p", D, P, me, code, offset); new_code = _GD_MungeCode(D, P, NULL, NULL, D->fragment[me].prefix, - D->fragment[me].suffix, code, offset); + D->fragment[me].suffix, code, offset, 1); dreturn("\"%s\"", new_code); return new_code; } +/* Return non-zero if the a field codes doesn't contain the correct affixes. */ +int _GD_CheckCodeAffixes(DIRFILE *D, const gd_entry_t *P, + const char *field_code, int fragment) +{ + int dummy; + + dtrace("%p, %p, \"%s\", %i", D, P, field_code, fragment); + + if (field_code == NULL) { + dreturn("%i", 0); + return 0; + } + + free(_GD_MungeCode(D, P, D->fragment[fragment].prefix, + D->fragment[fragment].suffix, NULL, NULL, field_code, &dummy, 1)); + + dreturn("%i", D->error); + return D->error; +} + /* Check for a valid field name -- returns 1 on error */ int _GD_ValidateField(const char* field_code, int standards, int strict, int affix, int* is_dot) @@ -459,7 +485,7 @@ } else { /* Verify prefix and suffix */ name = _GD_MungeCode(D, NULL, D->fragment[E->fragment_index].prefix, - D->fragment[E->fragment_index].suffix, NULL, NULL, new_name, &dummy); + D->fragment[E->fragment_index].suffix, NULL, NULL, new_name, &dummy, 1); if (name == NULL || name[0] == '\0') { _GD_SetError(D, GD_E_BAD_CODE, GD_E_CODE_INVALID, NULL, 0, new_name); dreturn("%i", -1); Modified: trunk/getdata/src/parse.c =================================================================== --- trunk/getdata/src/parse.c 2012-07-21 09:03:26 UTC (rev 748) +++ trunk/getdata/src/parse.c 2012-07-26 00:17:51 UTC (rev 749) @@ -113,11 +113,13 @@ /* Returns a newly malloc'd string containing the scalar field name, or NULL on * numeric literal or error */ static char *_GD_SetScalar(DIRFILE *restrict D, const char *restrict token, - void *restrict data, int type, const char *restrict format_file, int line, - int *restrict index, int *restrict comp_scal, int standards, int pedantic) + void *restrict data, int type, int me, const char *restrict format_file, + int line, int *restrict index, int *restrict comp_scal, int standards, + int pedantic) { char *ptr = NULL; char *lt; + int dummy; dtrace("%p, \"%s\", %p, 0x%X, \"%s\", %i, %p, %p, %i, %i", D, token, data, type, format_file, line, index, comp_scal, standards, pedantic); @@ -186,7 +188,7 @@ /* there were trailing characters in the long long int */ if (*ptr != '\0') { - ptr = _GD_Strdup(D, token); + ptr = _GD_MungeFromFrag(D, NULL, me, token, &dummy); if (D->error) { dreturn("%p", NULL); return NULL; @@ -211,7 +213,7 @@ /* there were trailing characters in the unsigned long long int */ if (*ptr != '\0') { - ptr = _GD_Strdup(D, token); + ptr = _GD_MungeFromFrag(D, NULL, me, token, &dummy); if (D->error) { dreturn("%p", NULL); return NULL; @@ -314,7 +316,7 @@ _GD_SetError(D, GD_E_FORMAT, GD_E_FORMAT_BAD_TYPE, format_file, line, in_cols[2]); else if ((E->scalar[0] = _GD_SetScalar(D, in_cols[3], &E->EN(raw,spf), - GD_UINT16, format_file, line, E->scalar_ind, NULL, standards, + GD_UINT16, me, format_file, line, E->scalar_ind, NULL, standards, pedantic)) == NULL) { E->e->calculated = 1; @@ -407,13 +409,14 @@ _GD_SetError(D, GD_E_FORMAT, GD_E_FORMAT_N_TOK, format_file, line, NULL); else for (i = 0; i < E->EN(lincom,n_fields); i++) { - E->in_fields[i] = _GD_Strdup(D, in_cols[i * 3 + 3]); + E->in_fields[i] = _GD_MungeFromFrag(D, NULL, me, in_cols[i * 3 + 3], + &offset); E->scalar[i] = _GD_SetScalar(D, in_cols[i * 3 + 4], &E->EN(lincom,cm)[i], - GD_COMPLEX128, format_file, line, E->scalar_ind + i, &E->comp_scal, - standards, pedantic); + GD_COMPLEX128, me, format_file, line, E->scalar_ind + i, + &E->comp_scal, standards, pedantic); E->EN(lincom,m)[i] = creal(E->EN(lincom,cm)[i]); E->scalar[i + GD_MAX_LINCOM] = _GD_SetScalar(D, in_cols[i * 3 + 5], - &E->EN(lincom,cb)[i], GD_COMPLEX128, format_file, line, + &E->EN(lincom,cb)[i], GD_COMPLEX128, me, format_file, line, E->scalar_ind + i + GD_MAX_LINCOM, &E->comp_scal, standards, pedantic); E->EN(lincom,b)[i] = creal(E->EN(lincom,cb)[i]); @@ -483,7 +486,7 @@ return NULL; } - E->in_fields[0] = _GD_Strdup(D, in_cols[2]); + E->in_fields[0] = _GD_MungeFromFrag(D, NULL, me, in_cols[2], &offset); E->e->u.linterp.table_len = -1; /* linterp file not read yet */ E->EN(linterp,table) = _GD_Strdup(D, in_cols[3]); @@ -548,8 +551,8 @@ return NULL; } - E->in_fields[0] = _GD_Strdup(D, in_cols[2]); - E->in_fields[1] = _GD_Strdup(D, in_cols[3]); + E->in_fields[0] = _GD_MungeFromFrag(D, NULL, me, in_cols[2], &offset); + E->in_fields[1] = _GD_MungeFromFrag(D, NULL, me, in_cols[3], &offset); if (D->error) { _GD_FreeE(D, E, 1); @@ -611,11 +614,11 @@ return NULL; } - E->in_fields[0] = _GD_Strdup(D, in_cols[2]); + E->in_fields[0] = _GD_MungeFromFrag(D, NULL, me, in_cols[2], &offset); E->scalar[0] = _GD_SetScalar(D, in_cols[3], &E->EN(recip,cdividend), - GD_COMPLEX128, format_file, line, E->scalar_ind, &E->comp_scal, standards, - pedantic); + GD_COMPLEX128, me, format_file, line, E->scalar_ind, &E->comp_scal, + standards, pedantic); E->EN(recip,dividend) = creal(E->EN(recip,cdividend)); E->comp_scal = (cimag(E->EN(recip,cdividend)) == 0) ? 0 : 1; @@ -676,8 +679,8 @@ return NULL; } - E->in_fields[0] = _GD_Strdup(D, in_cols[2]); - E->in_fields[1] = _GD_Strdup(D, in_cols[3]); + E->in_fields[0] = _GD_MungeFromFrag(D, NULL, me, in_cols[2], &offset); + E->in_fields[1] = _GD_MungeFromFrag(D, NULL, me, in_cols[3], &offset); E->EN(window,windop) = _GD_WindOp(in_cols[4]); if (E->EN(window,windop) == GD_WINDOP_UNK) { @@ -692,18 +695,18 @@ case GD_WINDOP_EQ: case GD_WINDOP_NE: E->scalar[0] = _GD_SetScalar(D, in_cols[5], &E->EN(window,threshold.i), - GD_INT64, format_file, line, E->scalar_ind, NULL, standards, + GD_INT64, me, format_file, line, E->scalar_ind, NULL, standards, pedantic); break; case GD_WINDOP_SET: case GD_WINDOP_CLR: E->scalar[0] = _GD_SetScalar(D, in_cols[5], &E->EN(window,threshold.u), - GD_UINT64, format_file, line, E->scalar_ind, NULL, standards, + GD_UINT64, me, format_file, line, E->scalar_ind, NULL, standards, pedantic); break; default: E->scalar[0] = _GD_SetScalar(D, in_cols[5], &E->EN(window,threshold.r), - GD_FLOAT64, format_file, line, E->scalar_ind, NULL, standards, + GD_FLOAT64, me, format_file, line, E->scalar_ind, NULL, standards, pedantic); break; } @@ -765,16 +768,17 @@ return NULL; } - E->in_fields[0] = _GD_Strdup(D, in_cols[2]); - E->in_fields[1] = _GD_Strdup(D, in_cols[3]); + E->in_fields[0] = _GD_MungeFromFrag(D, NULL, me, in_cols[2], &offset); + E->in_fields[1] = _GD_MungeFromFrag(D, NULL, me, in_cols[3], &offset); E->scalar[0] = _GD_SetScalar(D, in_cols[4], &E->EN(mplex,count_val), - GD_UINT16, format_file, line, E->scalar_ind, NULL, standards, pedantic); + GD_UINT16, me, format_file, line, E->scalar_ind, NULL, standards, + pedantic); /* the count max, if present */ if (n_cols > 5) { E->scalar[1] = _GD_SetScalar(D, in_cols[5], &E->EN(mplex,count_max), - GD_UINT16, format_file, line, E->scalar_ind + 1, NULL, standards, + GD_UINT16, me, format_file, line, E->scalar_ind + 1, NULL, standards, pedantic); if (E->EN(mplex,count_max) < 0) _GD_SetError(D, GD_E_FORMAT, GD_E_FORMAT_MPLEXVAL, format_file, line, @@ -850,8 +854,8 @@ return NULL; } - E->in_fields[0] = _GD_Strdup(D, in_cols[2]); - E->in_fields[1] = _GD_Strdup(D, in_cols[3]); + E->in_fields[0] = _GD_MungeFromFrag(D, NULL, me, in_cols[2], &offset); + E->in_fields[1] = _GD_MungeFromFrag(D, NULL, me, in_cols[3], &offset); if (D->error) { _GD_FreeE(D, E, 1); @@ -915,13 +919,13 @@ return NULL; } - E->in_fields[0] = _GD_Strdup(D, in_cols[2]); + E->in_fields[0] = _GD_MungeFromFrag(D, NULL, me, in_cols[2], &offset); E->scalar[0] = _GD_SetScalar(D, in_cols[3], &E->EN(bit,bitnum), GD_INT_TYPE, - format_file, line, E->scalar_ind, NULL, standards, pedantic); + me, format_file, line, E->scalar_ind, NULL, standards, pedantic); if (n_cols > 4) E->scalar[1] = _GD_SetScalar(D, in_cols[4], &E->EN(bit,numbits), - GD_INT_TYPE, format_file, line, E->scalar_ind + 1, NULL, standards, + GD_INT_TYPE, me, format_file, line, E->scalar_ind + 1, NULL, standards, pedantic); else E->EN(bit,numbits) = 1; @@ -995,10 +999,10 @@ return NULL; } - E->in_fields[0] = _GD_Strdup(D, in_cols[2]); /* field */ + E->in_fields[0] = _GD_MungeFromFrag(D, NULL, me, in_cols[2], &offset); if ((E->scalar[0] = _GD_SetScalar(D, in_cols[3], &E->EN(phase,shift), - GD_INT64, format_file, line, E->scalar_ind, NULL, standards, + GD_INT64, me, format_file, line, E->scalar_ind, NULL, standards, pedantic)) == NULL) { E->e->calculated = 1; @@ -1068,11 +1072,11 @@ E->e->calculated = 1; - E->in_fields[0] = _GD_Strdup(D, in_cols[2]); + E->in_fields[0] =... [truncated message content] |
From: <syn...@us...> - 2012-07-21 09:03:32
|
Revision: 748 http://getdata.svn.sourceforge.net/getdata/?rev=748&view=rev Author: syntheticpp Date: 2012-07-21 09:03:26 +0000 (Sat, 21 Jul 2012) Log Message: ----------- also build with mingw-w64 Modified Paths: -------------- trunk/getdata/src/internal.h Modified: trunk/getdata/src/internal.h =================================================================== --- trunk/getdata/src/internal.h 2012-07-21 09:02:51 UTC (rev 747) +++ trunk/getdata/src/internal.h 2012-07-21 09:03:26 UTC (rev 748) @@ -93,6 +93,9 @@ #ifdef HAVE_UNISTD_H #include <unistd.h> #endif +#ifdef HAVE_DIRECT_H +#include <direct.h> +#endif /* MSVC types */ #ifdef _MSC_VER @@ -432,9 +435,13 @@ # define fsync _commit #endif +#ifndef __MINGW64_VERSION_MAJOR /* mingw-w64 has pthread.h*/ +#ifndef HAVE_PTHREAD_H #ifndef HAVE_GMTIME_R struct tm *gmtime_r(const time_t *timep, struct tm *result); #endif +#endif +#endif #ifndef HAVE_LSEEK64 # ifdef HAVE__LSEEKI64 This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <syn...@us...> - 2012-07-21 09:02:58
|
Revision: 747 http://getdata.svn.sourceforge.net/getdata/?rev=747&view=rev Author: syntheticpp Date: 2012-07-21 09:02:51 +0000 (Sat, 21 Jul 2012) Log Message: ----------- fix build with mingw in cmd.exe Modified Paths: -------------- trunk/getdata/test/test.h Modified: trunk/getdata/test/test.h =================================================================== --- trunk/getdata/test/test.h 2012-07-20 23:36:20 UTC (rev 746) +++ trunk/getdata/test/test.h 2012-07-21 09:02:51 UTC (rev 747) @@ -26,11 +26,6 @@ #include <string.h> #include <stdlib.h> -/* for MSVCRT _getcwd */ -#ifdef HAVE_DIRECT_H -#include <direct.h> -#endif - #ifdef HAVE_FLOAT_H #include <float.h> #endif @@ -59,7 +54,7 @@ #endif /* rm for MSVC */ -#ifdef _MSC_VER +#ifdef _WIN32 #define rmdirfile() system("rmdir /q/s dirfile"); #else #define rmdirfile() chmod("dirfile", 0755); system("rm -rf dirfile"); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ket...@us...> - 2012-07-20 23:36:26
|
Revision: 746 http://getdata.svn.sourceforge.net/getdata/?rev=746&view=rev Author: ketiltrout Date: 2012-07-20 23:36:20 +0000 (Fri, 20 Jul 2012) Log Message: ----------- Bump getdata version requirement. Modified Paths: -------------- trunk/defile/configure.ac Modified: trunk/defile/configure.ac =================================================================== --- trunk/defile/configure.ac 2012-07-20 23:34:30 UTC (rev 745) +++ trunk/defile/configure.ac 2012-07-20 23:36:20 UTC (rev 746) @@ -125,7 +125,7 @@ echo echo "*** Checking for external libraries" echo -PKG_CHECK_MODULES([GETDATA], [getdata >= 0.7.0]) +PKG_CHECK_MODULES([GETDATA], [getdata >= 0.8.0]) AC_SEARCH_LIBS([exp],[m]) AC_SEARCH_LIBS([pthread_create],[pthread]) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ket...@us...> - 2012-07-20 23:34:39
|
Revision: 745 http://getdata.svn.sourceforge.net/getdata/?rev=745&view=rev Author: ketiltrout Date: 2012-07-20 23:34:30 +0000 (Fri, 20 Jul 2012) Log Message: ----------- Get the ASCII datasource working. Modified Paths: -------------- trunk/defile/bin/cli.c trunk/defile/bin/rc.c trunk/defile/configure.ac trunk/defile/doc/Makefile.am trunk/defile/doc/defile-input.7 trunk/defile/doc/defile.1.in trunk/defile/doc/df_add_alias.3 trunk/defile/doc/df_add_entry.3 trunk/defile/doc/df_add_framedef.3 trunk/defile/doc/df_bsearch.3 trunk/defile/doc/df_check_abort.3 trunk/defile/doc/df_field_in_input.3 trunk/defile/doc/df_init.3 trunk/defile/doc/df_input_name.3 trunk/defile/doc/df_nframes_allowed.3 trunk/defile/doc/df_on_abort.3 trunk/defile/doc/df_push_frame.3 trunk/defile/doc/df_ready.3 trunk/defile/doc/df_set_const.3 trunk/defile/doc/df_shell_expand.3 trunk/defile/input/ascii.c trunk/defile/lib/defile.h trunk/defile/lib/internal.h trunk/defile/lib/libdefile.c Added Paths: ----------- trunk/defile/doc/df_mode.3 trunk/defile/doc/df_offset.3 Property Changed: ---------------- trunk/defile/doc/ Modified: trunk/defile/bin/cli.c =================================================================== --- trunk/defile/bin/cli.c 2012-07-12 22:38:02 UTC (rev 744) +++ trunk/defile/bin/cli.c 2012-07-20 23:34:30 UTC (rev 745) @@ -55,12 +55,19 @@ #define DEFILE_COPYRIGHT "Copyright (C) 2012 D. V. Wiebe" #define DEFILE_CONTACT \ -"Please send reports of bugs and other communication to:\n" \ +"Please send reports of bugs and other communication regarding defile to:\n" \ " " PACKAGE_BUGREPORT "\n\n" \ "** NB: Contact and licensing information for input plugins accessible " \ "through\n this interface may be different than those of Defile " \ "itself. For such\n information, execute:\n\n" \ -" %s -t <input_type> -- --version" +" %s -t <input_type> -- --version\n" \ +"\nThis program comes with NO WARRANTY, not even for MERCHANTABILITY or " \ +"FITNESS\nFOR A PARTICULAR PURPOSE. You may redistribute it under the " \ +"terms of the GNU\nGeneral Public License, either version 2 of the " \ +"License, or (at your option)\nany later version.\n\nYou should have " \ +"received a copy of the GNU General Public License along with\n" \ +"this program; if not, write to the Free Software Foundation, Inc.,\n" \ +"51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA\n" #define DEFILE_USAGE_PREAMBLE "Usage:\n" \ " %s [DEFILE_OPTION]... [INPUT] [ -- [INPUT_OPTION]... ]\n\n" \ @@ -234,8 +241,8 @@ { lt_dlhandle lib; const struct df_input_framework *fwk = NULL; - char *path, *base, *type; - int i, have, result = 3; + char *path, *base, *type, *ptr; + int i, result = 3; struct df_fwk_list *l = (struct df_fwk_list*)data; @@ -247,11 +254,18 @@ } base = basename(path); - /* ensure it is of the form "[stuff]defile-<type>" */ + /* ensure it is of the form "[stuff]defile-<type>[-stuff]" */ type = strstr(base, "defile-"); if (type) { type += sizeof("defile-") - 1; + /* look for a trailing '-' */ + for (ptr = type; *ptr; ++ptr) + if (*ptr == '-') { + *ptr = 0; + break; + } + /* check if it's the right type, if necessary */ if ((l->t == NULL) || strcmp(l->t, type) == 0) { /* try to retrieve the framework */ @@ -260,6 +274,17 @@ } free(path); + /* discard things we've already seen */ + for (i = 0; i < l->n; ++i) { + if (strcmp(l->l[i]->name, type) == 0) { + if (df->mode_flags & DF_MODE_DEBUG) + fprintf(stderr, "defile: ignoring extra %s plugin: %s\n", type, + filename); + lt_dlclose(lib); + return 0; + } + } + /* if we have an input name, probe this plugin to see if it wants it */ if (result == 0 && l->i) { if (fwk->probe && (*fwk->probe)(l->i)) @@ -276,37 +301,27 @@ /* success, add it to the list */ if (result == 0) { - /* discard things we've already seen */ - have = 0; - for (i = 0; i < l->n; ++i) - if (strcmp(l->l[i]->name, type) == 0) { - have = 1; - } + l->r = 0; - if (!have) { - l->r = 0; + l->l = (const struct df_input_framework **)DF_Embiggen(l->l, + sizeof(const struct df_input_framework*) * (l->n + 1)); + l->l[l->n] = fwk; - l->l = (const struct df_input_framework **)DF_Embiggen(l->l, - sizeof(const struct df_input_framework*) * (l->n + 1)); - l->l[l->n] = fwk; + l->p = (char **)DF_Embiggen(l->p, sizeof(char*) * (l->n + 1)); + if ((l->p[l->n] = strdup(filename)) == NULL) { + perror("strdup"); + exit(1); + } - l->p = (char **)DF_Embiggen(l->p, sizeof(char*) * (l->n + 1)); - if ((l->p[l->n] = strdup(filename)) == NULL) { - perror("strdup"); - exit(1); - } + l->h = (lt_dlhandle*)DF_Embiggen(l->h, sizeof(lt_dlhandle) * (l->n + 1)); + l->h[l->n] = lib; - l->h = (lt_dlhandle*)DF_Embiggen(l->h, sizeof(lt_dlhandle) * (l->n + 1)); - l->h[l->n] = lib; + l->f = l->p[l->n]; + l->n++; - l->f = l->p[l->n]; - l->n++; - - /* stop searching if we're not compiling a list */ - if (l->t) - return 1; - } else - lt_dlclose(lib); + /* stop searching if we're not compiling a list */ + if (l->t) + return 1; } else if (result < l->r) { l->r = result; free(l->f); @@ -328,8 +343,10 @@ struct df_fwk_list *l) { int i; - const char *dlp = getenv("DEFILE_LIBRARY_PATH"); + const char *dlp; + dlp = getenv("DEFILE_LIBRARY_PATH"); + memset(l, 0, sizeof(struct df_fwk_list)); l->i = input; l->t = type; @@ -433,7 +450,7 @@ return fwk; } -static int DF_InputOpt(struct df_config *rc, const struct df_rc_config *config, +static int DF_InputOpt(struct df_config *rc, struct df_rc_config *config, struct df_rc_data *rcd) { static int mode = 0; @@ -462,7 +479,9 @@ sizeof(const char *) * (rc->n_config + 1)); rc->value[rc->n_config] = value; + /* steal the argument, if any */ rc->arg[rc->n_config++] = config->argument; + config->argument = NULL; } return -1; @@ -659,26 +678,49 @@ static int DF_OutputFini(int delete) { - gd_close(df->D); - if (delete) { - pid_t pid = fork(); - int status; + const char **list; + const char *name; + int i; - if (pid > 0) - waitpid(pid, NULL, 0); - else if (pid == 0) { - execl(PATH_RM, PATH_RM, "-rf", df->output, (char*)NULL); - /* can't get here */ - fputs("defile: exec failure while deleting discarded output\n", stderr); - exit(1); + /* since the bahaviour of encoding schemes can be murky, close all open data + * files so they're not recreated later during the discard. */ + gd_raw_close(df->D, NULL); + + /* loop over RAW fields, unlinking files */ + for (list = gd_entry_list(df->D, NULL, GD_RAW_ENTRY, + GD_ENTRIES_HIDDEN | GD_ENTRIES_NOALIAS); *list; ++list) + { + name = gd_raw_filename(df->D, *list); + if (name && unlink(name)) + perror("unlink"); } - waitpid(pid, &status, 0); - if (!WIFEXITED(status) || WEXITSTATUS(status)) { - fputs("defile: error deleting discarded output\n", stderr); - return 1; + + /* loop over fragments, deleting metadata and directories */ + for (i = gd_nfragments(df->D) - 1; i >= 0; --i) { + name = gd_fragmentname(df->D, i); + if (name) { + if (unlink(name)) + perror("unlink"); + else { + /* dirname(3) may modify its input */ + char *buf = strdup(name); + if (buf) { + char *dir = dirname(buf); + if (dir && rmdir(dir)) + perror("rmdir"); + free(buf); + } + } + } } - } + + /* discard the dirfile; since we've already unlinked everything, this + * should trigger deletion of files */ + gd_discard(df->D); + } else + gd_close(df->D); + free(df->output); return 0; @@ -729,7 +771,7 @@ gd_verbose_prefix(df->D, "defile: "); if (append) { - unsigned long long nf = gd_nframes(df->D); + long long nf = gd_nframes(df->D); pthread_mutex_lock(&config_mx); if (df->offset < nf) df->offset = nf; @@ -914,7 +956,7 @@ pthread_mutex_unlock(&r->mx); continue; } - + if (!(df_mode() & DF_MODE_ASYNC)) { /* in synchronous mode, the reference field is special: we only write * frames to it if all other fields have those frames committed */ @@ -1030,13 +1072,13 @@ #define RATE_TC (120.) /* rate IIR characteristic time (in seconds) */ static double DF_PrintRate(struct timeval *then, double rate) { - static unsigned long long lw = 0; + static long long lw = 0; static int init = 2; const char eol = (df_mode() & DF_MODE_DEBUG) ? '\n' : '\r'; double delta, drate; - unsigned long long nf, nw, nr; + long long nf, nw, nr; char si; struct timezone tz; struct timeval now; @@ -1257,7 +1299,7 @@ .copyright = DEFILE_COPYRIGHT, .default_config = "defilerc", .flags = DF_RC_FLAG_NMSB, - .licence = DF_LICENCE_GPL, + .licence = 0, .name = NULL, .options = options, .parser = (df_parser_func_t)DF_OutputOpt, @@ -1330,6 +1372,7 @@ action.sa_handler = DF_SignalHandler; action.sa_mask = signals; + action.sa_flags = 0; sigaction(SIGHUP, &action, NULL); sigaction(SIGTERM, &action, NULL); sigaction(SIGINT, &action, NULL); @@ -1381,9 +1424,9 @@ /* one last check */ if (pthread_kill(df->input_id, 0) == 0) - fputs("defile: terminating with input still active!\n", stderr); + fputs("defile: Warning: terminating with input still active!\n", stderr); if (pthread_kill(df->output_id, 0) == 0) - fputs("defile: terminating with output still active!\n", stderr); + fputs("defile: Warning: terminating with output still active!\n", stderr); return 0; } Modified: trunk/defile/bin/rc.c =================================================================== --- trunk/defile/bin/rc.c 2012-07-12 22:38:02 UTC (rev 744) +++ trunk/defile/bin/rc.c 2012-07-20 23:34:30 UTC (rev 745) @@ -39,27 +39,27 @@ #define SHIFT_THIS 0x4 #define SAME_BOILERPLATE \ - "\nThis program comes with NO WARRANTY, not even for MERCHANTABILITY or " \ + "\nThis plugin comes with NO WARRANTY, not even for MERCHANTABILITY or " \ "FITNESS\nFOR A PARTICULAR PURPOSE. You may redistribute it under the " \ "same terms as defile\nitself. For details, execute:\n\n" \ " %s --version\n" #define GPL_BOILERPLATE \ - "\nThis program comes with NO WARRANTY, not even for MERCHANTABILITY or " \ + "\nThis plugin comes with NO WARRANTY, not even for MERCHANTABILITY or " \ "FITNESS\nFOR A PARTICULAR PURPOSE. You may redistribute it under the " \ "terms of the GNU\nGeneral Public License, either version 2 of the " \ "License, or (at your option)\nany later version.\n\nYou should have " \ "received a copy of the GNU General Public License along with\n" \ -"this program; if not, write to the Free Software Foundation, Inc.,\n" \ +"this plugin; if not, write to the Free Software Foundation, Inc.,\n" \ "51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA" #define LGPL_BOILERPLATE \ - "\nThis program comes with NO WARRANTY, not even for MERCHANTABILITY or " \ + "\nThis plugin comes with NO WARRANTY, not even for MERCHANTABILITY or " \ "FITNESS\nFOR A PARTICULAR PURPOSE. You may redistribute it under the " \ "terms of the GNU\nLesser General Public License, either version 2.1 of the " \ "License, or (at your\noption) any later version.\n\nYou should have " \ "received a copy of the GNU General Public License along with\n" \ -"this program; if not, write to the Free Software Foundation, Inc.,\n" \ +"this plugin; if not, write to the Free Software Foundation, Inc.,\n" \ "51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA" static const struct df_optdef df_no_opts[] = { @@ -80,7 +80,7 @@ #define logprintf(...) #endif -#define DF_OPT_WIDTH 26 +#define DF_OPT_WIDTH 28 #define DF_TTY_WIDTH 80 static void DF_OptUsage(const struct df_optdef *opt, char shift_char) @@ -267,8 +267,8 @@ free(opt); - puts(" --help display this help and exit"); - puts(" --version display version information and exit\n"); + puts(" --help display this help and exit"); + puts(" --version display version information and exit\n"); if (rcd->usage_postamble) puts(rcd->usage_postamble); @@ -289,7 +289,9 @@ putchar('\n'); } - if (rcd->contact) + if (!rcd->name) + printf(rcd->contact, argv0); + else if (rcd->contact) puts(rcd->contact); if (rcd->licence == DF_LICENCE_SAME) @@ -769,7 +771,7 @@ else if (rcd->config[i].optind == DF_RC_RAW_ARG) fprintf(stderr, "%i: ARGUMENT => %s\n", i, rcd->config[i].argument); else - fprintf(stderr, "%i (%s): %i (oE=%i) => %s\n", i, + fprintf(stderr, "%i: (%s): %i (oE=%i) => %s\n", i, rcd->options[rcd->config[i].optind].lopt, rcd->config[i].optind, rcd->config[i].error, rcd->config[i].argument); #endif Modified: trunk/defile/configure.ac =================================================================== --- trunk/defile/configure.ac 2012-07-12 22:38:02 UTC (rev 744) +++ trunk/defile/configure.ac 2012-07-20 23:34:30 UTC (rev 745) @@ -20,7 +20,7 @@ dnl m4_define(defile_major, 0) -m4_define(defile_minor, 1) +m4_define(defile_minor, 0) m4_define(defile_revision, 0) m4_define(defile_extra, []) m4_define(defile_version, @@ -126,6 +126,7 @@ echo "*** Checking for external libraries" echo PKG_CHECK_MODULES([GETDATA], [getdata >= 0.7.0]) +AC_SEARCH_LIBS([exp],[m]) AC_SEARCH_LIBS([pthread_create],[pthread]) echo @@ -153,7 +154,7 @@ echo echo "*** Looking for additional library functions" echo -AC_CHECK_FUNCS([wordexp]) +AC_CHECK_FUNCS([pipe wordexp]) echo echo "*** Looking for external programs" Property changes on: trunk/defile/doc ___________________________________________________________________ Added: svn:ignore + defile.1 Makefile Makefile.in Modified: trunk/defile/doc/Makefile.am =================================================================== --- trunk/defile/doc/Makefile.am 2012-07-12 22:38:02 UTC (rev 744) +++ trunk/defile/doc/Makefile.am 2012-07-20 23:34:30 UTC (rev 745) @@ -24,5 +24,6 @@ man_MANS = defile.1 defile-input.7 df_add_alias.3 df_add_entry.3 \ df_add_framedef.3 df_bsearch.3 df_check_abort.3 df_field_in_input.3 \ - df_init.3 df_input_name.3 df_nframes_allowed.3 df_on_abort.3 \ - df_push_frame.3 df_ready.3 df_set_const.3 df_shell_expand.3 + df_init.3 df_input_name.3 df_mode.3 df_nframes_allowed.3 \ + df_offset.3 df_on_abort.3 df_push_frame.3 df_ready.3 \ + df_set_const.3 df_shell_expand.3 Modified: trunk/defile/doc/defile-input.7 =================================================================== --- trunk/defile/doc/defile-input.7 2012-07-12 22:38:02 UTC (rev 744) +++ trunk/defile/doc/defile-input.7 2012-07-20 23:34:30 UTC (rev 745) @@ -13,7 +13,7 @@ .\" Texts. A copy of the license is included in the `COPYING.DOC' file .\" as part of this distribution. .\" -.TH defile-input 7 "21 February 2012" "Version 0.1.0" DEFILE +.TH defile-input 7 "23 March 2012" "Version 0.1.0" DEFILE .SH NAME defile-input \(em overview of the defile input plugin API .SH DESCRIPTION @@ -43,18 +43,19 @@ .B DEFILE OPERATION below. -An input plugin is a dynamically loaded shared library which reads data from a -data source and passes it on to defile for output as a dirfile. Each input -plugin is identified by it's type name. The type name identifies the type of -data the input plugin is capable of reading. The type name should consist of -one or more lower case letters, numbers, or the underscore (_) character. The -type name must be unique among all defile input plugins: defile will only ever -consider the first input plugin with a given type name that it finds. +An input plugin is a dynamically loaded shared library which asynchronously +reads data from a data source and passes it on to defile for output as a +dirfile. Each input plugin is identified by it's type name. The type name +identifies the type of data the input plugin is capable of reading. The type +name should consist of one or more lower case letters, numbers, or the +underscore (_) character. The type name must be unique among all defile input +plugins: defile will only ever consider the first input plugin with a given type +name that it finds. The name of the shared library must be of the form: .IP .fam C -[\fIanything\fR]\fBdefile-<\fItype\fR>[\fI.ext\fR] +[\fIanything\fR]\fBdefile-<\fItype\fR>[-\fIanything\fR][\fI.ext\fR] .fam .PP where @@ -64,7 +65,9 @@ .B defile- is literaly "defile" followed by a dash, .I type -is the input type name, and +is the input type name, +.I -anything +contains more optional characters, separated from the type name by a dash, and .I .ext is a file extension appropriate for native dynamically loadable modules on the host platform, if any. @@ -108,17 +111,16 @@ .TP .I name is the type name of the plugin. Defile will consider the module malformed and -ignore it if this is not identical to the type name used in both the exported -df_input_framework symbol, and the filename of the module itself. +ignore it if this is not identical to the type name used in both the name of +the exported df_input_framework symbol, and the filename of the module itself. .TP .I version a version string for the plugin, typically a verison triplet of the form -"XX.YY.ZZ", +"XX.YY.ZZ", although defile puts no restriction on it. .TP .I copyright is a copyright string for the plugin, typically of the form -"Copyright \(co <date> <author(s)>". (The non-ASCII \(co is typically -approximated by "(C)".) +"Copyright \(co <date> <author(s)>". .TP .IR contact ", " preamble ", and " postamble are formatted strings used in the usage or version information output to the @@ -164,10 +166,11 @@ .SH INPUT OPTIONS -The input plugin may declare input options and directives which defile will -parse for it using the +The input plugin may declare input options and directives using the .I opts member of the framework. If the input plugin has none, this may simply be NULL. +Defile uses this list to parse the input options and directives given by the +user on the command line and in any associated run control files. Defile treats input options and directives together. In the following, whenever we refer input options, the remarks apply equally to input directives unless @@ -196,11 +199,11 @@ where .TP .I value -is a positive number used by defile to indentify the option. Bare arguments -among the input options (those not associated with an option) are assigned a -value of zero, so that should be avoided in the definition of input options. -Unless two options should be treated as identical, each option should have a -unique value. There is no requirement that consequitive values be used. +is a positive number used by defile to indentify the option to the input plugin. +Bare arguments among the input options (those not associated with an option) are +assigned a value of zero, so that should be avoided in the definition of input +options. Unless two options should be treated as identical, each option should +have a unique value. There is no requirement that consequitive values be used. After parsing the input options, defile will present the input plugin an array of (value, argument) pairs. See the .B Start State @@ -210,7 +213,7 @@ by defile for bookkeeping purposes and should be avoided. .TP .I type -should be one of the following symbols inidcating the type of option: +should be one of the following symbols indicating the type of option: .RS .TP .B DF_OPT_NO_ARG @@ -238,7 +241,7 @@ this option record. If no directive is defined, this should be NULL. .TP .I flags -either zero, or else one or more of the following flags providing further +zero or more of the following flags, bitwise or'd together, providing further information on how the option should be interpreted: .RS .TP @@ -260,7 +263,7 @@ .B -x on the command line. If .I sopt -is zero (inidcating no short option is associated with this record) this flag +is zero (indicating no short option is associated with this record) this flag is ignored. .RE .TP @@ -273,7 +276,7 @@ value of "ARG" is used. .TP .I usage -an unformated string explaining the argument. The strig will be used in the +an unformated string explaining the argument. The string will be used in the usage output (see the .B HELP AND VERSION OUTPUT section below). It should contain no newlines; they will be inserted where @@ -330,18 +333,19 @@ .I preamble string given in the framework definition, if any, .IP \(bu -an alphabetised and formatted list of the input options, including their usage -strings, generated from the input option list given in the framework -definiition, +a sorted and formatted list of the input options, including their usage strings, +generated from the input option list +.I opts +given in the framework definiition, .IP \(bu the .I postamble string given in the framework definition, if any. .PP Unless the plugin is simple enough to be summarised in the usage text, plugin -developers are encouraged to provide an accompanying Unix manual page called -defile-<\fItype\fR>(1). Other documentation, if any, should be mentioned in the -usage preamble or postamble. +developers are encouraged to provide accompanying documentation, if possible a +Unix manual page called defile-<\fItype\fR>(1). Any such other documentation +should be mentioned in the usage preamble or postamble. .PP When .B \-\-version @@ -421,17 +425,15 @@ the data provided in the input framework definition. Once this has completed successfully, both the reader (input plugin) and -output (dirfile writer) are started. The reader is started by calling the +writer (dirfile output) are started. The reader is started by calling the .I entry procedure defined in the input plugin's framework definition. The input plugin will be passed a struct df_config pointer which provides the input plugin with -it's parsed configuration, and a few other important pieces of opterational -information. The struct df_config is defined as: +its parsed configuration. The struct df_config is defined as: .IP .nf .fam C struct df_config { - unsigned int mode_flags; int n_config; int *value; const char **arg; @@ -441,32 +443,6 @@ .PP where .TP -.I mode_flags -a bitwise or'd collection of zero or more of the following flags, indicating -defile's operational mode: -.RS -.TP -.B DF_MODE_ASYNC -defile is operating in asynchronous mode and the input plugin is not required to -adhere to the restrictions of synchronous mode. (See the -.B RUN State -section below for a discussion of the implications of synchronous and -asynchronous modes.) An input plugin is not required to implement asynchronous -mode. (Implementing synchronous mode \fIis\fR required.) -.TP -.B DF_MODE_DEBUG -defile is operating in debug mode and is printing extra debugging messages on -standard error. This does not affect the operation of defile, but this flag may -be used by the input plugin to decide when to emit its own debugging messages. -Otherwise, it may be safely ignored by input plugins. -.TP -.B DF_MODE_FOLLOW -defile is operating in follow mode and requests the input plugin to continue -to monitor the input data source when it reaches the end, providing additional -data to defile as it appears. An input plugin is not required to implement -follow mode and, so, may exit upon running out of data regardless of this flag. -.RE -.TP .I n_config the number of elements in the configuration produced by parsing the input options and input directives. @@ -475,8 +451,8 @@ an array of integers of length .I n_config containing the values (see -.B INPUT OPTIONS above) -of the input options in the order they were encountered. Bare arguments +.B INPUT OPTIONS +above) of the input options in the order they were encountered. Bare arguments encountered (arguments which are not associated with an option) will have a value of zero. Other options will have the corresponding value that was specified in the options array in the framework definition. @@ -489,16 +465,20 @@ .PP During .B STARTUP -the input plugin should perform initialisation, parse the input string +the input plugin should perform initialisation, parse the input designator (obtainable from .BR df_input_name (3)) -and verify that the data type of the input is understood by the plugin. Once -it is ready to proceed, it should call +and verify that it does indeed specify a data source understood by the plugin. +Once it is ready to proceed, it should call .BR df_init (3), which triggers the transition into the .B BUILD state. +If the input plugin exits while in the +.B START +state, no output dirfile will be created, regardless of success or failure. + .SS BUILD State The .B BUILD @@ -512,8 +492,15 @@ (See also the .B DEFILE DATA MODEL section below for an overview of how defile expects data to be marshalled.) +This is also the earliest time at which the input plugin is able to determine +the requested starting frame for the data (by calling +.BR df_offset (3)). -When it has finished creating the output dirfile's metadata, it should call +If the input plugin exits while in the +.B BUILD +state, no output dirfile will be created, regardless of success or failure. +Otherwise, when it has finished creating the output dirfile's metadata, it +should call .BR df_ready (3), which triggers the transition into the .B RUN @@ -522,9 +509,9 @@ .SS RUN State The .B RUN -state is when data frames are read by the input plugin, transferred to the -dirfile writer, and written to disk. Typically defile will spend the bulk of -it's time in this state. +state is when data frames from the data source are transferred by the input +plugin to the dirfile writer, and written to disk. Typically defile will spend +the bulk of it's time in this state. The input plugin provides data to the dirfile writer by calling .BR df_push_frame (3), @@ -552,7 +539,8 @@ The input plugin may trigger a return to the .B BUILD state by calling -.BR gd_reinit (3). +.BR gd_reinit (3), +typically when the input plugin notices a change in the datasource metadata. Otherwise, defile remains in the .B RUN state as long as the input plugin is running. The plugin returning success @@ -573,10 +561,10 @@ Defile enters the .B ABORT -state in cases when an unrecoverable, catastrophic error occurs during -operation, or else when it receives an asynchronous request to cancel (for -example a keyboard interrupt). Most of the C API functions check whether -defile has entered this state and return +state in cases when an unrecoverable error occurs during operation, or else when +it receives an asynchronous request to cancel (for example a keyboard +interrupt). Most of the input plugin API functions check whether defile has +entered this state and return .B DF_ABORT when detected. The input should monitor the return value of these functions to detect an unexpected transition into the @@ -616,8 +604,8 @@ For each field, the number of samples per frame is constant, but different fields may have different number of samples per frame. As a result, not all data need to be sampled at the same rate, but the ratio of sample rates of all -fields is fixed and the frame period must be some multiple of the lowest common -multiple of all sample periods. +fields is fixed and the frame period must be some common multiple of all sample +periods. For data marshalling purposes, defile breaks the dirfile frame into one or more subframes, each of fixed format (see @@ -653,7 +641,7 @@ .SH OTHER CONSIDERATIONS WHILE RUNNING A few other operational points to remember while writing the main loop for an -inpuy plugin are discussed below. +input plugin are discussed below. .SS Signal Handling @@ -673,7 +661,8 @@ The most common reason for this is the input plugin spending too long in the .B ABORT state, but it may happen in other exceptional circumstances. Input plugins which -disable cancelability for long periods of time may be subject to more drastic measures without forewarning. +disable cancelability for long periods of time may be subject to more drastic +measures without forewarning. .SH AUTOMATIC TYPE DETECTION If desired, and possible, the plugin may participate in the automatic type @@ -706,8 +695,9 @@ .SH API REFERENCE -The following functions are provided by the defile C API, grouped here by -sequencing restrictions. See the indicated manual pages for details. +The following functions (some listed multiple times) are provided by the defile +C API, grouped here by sequencing restrictions. See the indicated manual pages +for details. .TP .RB "Functions which may be called at any time, regardless of current state:" @@ -715,6 +705,7 @@ .BR df_check_abort (3), .BR df_field_in_output (3), .BR df_input_name (3), +.BR df_mode (3), .BR df_on_abort (3), .BR df_shell_expand (3), .BR df_strcmp (3) @@ -725,8 +716,10 @@ Functions which may be called during the \fBBUILD\fR state: .BR df_add_alias (3), .BR df_add_entry (3), -.BR df_add_spec (3), +.BR df_add_fragment (3), .BR df_add_framedef (3), +.BR df_add_spec (3), +.BR df_offset (3), .BR df_ready (3), .BR df_set_const (3), .BR df_set_carray (3), @@ -734,15 +727,12 @@ .TP Functions which may be called during the \fBRUN\fR state: .BR df_nframes_allowed (3), +.BR df_offset (3), .BR df_push_frame (3), .BR df_reinit (3), .BR df_set_const (3), .BR df_set_carray (3), .BR df_set_string (3) -.IP -NB: See -.BR df_reinit (3) -for caveats involving sequencing in the case when this function fails. .SH SEE ALSO .BR defile (1), Modified: trunk/defile/doc/defile.1.in =================================================================== --- trunk/defile/doc/defile.1.in 2012-07-12 22:38:02 UTC (rev 744) +++ trunk/defile/doc/defile.1.in 2012-07-20 23:34:30 UTC (rev 745) @@ -15,7 +15,7 @@ .\" Texts. A copy of the license is included in the `COPYING.DOC' file .\" as part of this distribution. .\" -.TH defile 1 "21 February 2012" "Version 0.1.0" GETDATA +.TH defile 1 "21 February 2012" "Version 0.1.0" DEFILE .SH NAME defile \(em convert data in various formats into dirfiles .SH SYNOPSIS Modified: trunk/defile/doc/df_add_alias.3 =================================================================== --- trunk/defile/doc/df_add_alias.3 2012-07-12 22:38:02 UTC (rev 744) +++ trunk/defile/doc/df_add_alias.3 2012-07-20 23:34:30 UTC (rev 745) @@ -1,4 +1,4 @@ -.\" df_add_entry.3. The df_add_entry man page. +.\" df_add_alias.3. The df_add_entry man page. .\" .\" Copyright (C) 2012 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 df_add_entry 3 "1 March 2012" "Version 0.1.0" DEFILE +.TH df_add_alias 3 "23 March 2012" "Version 0.0.0" DEFILE .SH NAME df_add_alias \(em add a field alias to defile's output dirfile .SH SYNOPSIS @@ -22,7 +22,8 @@ .fam C .B #include <defile.h> .HP -.BI "int df_add_spec(const char *" name ", const char *" target ); +.BI "int df_add_alias(const char *" name ", const char *" target , +.BR "int " fragment ); .fam .ad .hy @@ -37,6 +38,12 @@ pointing to .I target to the output dirfile produced by defile(1). +.PP +The alias is added to the fragment indicated by +.IR fragment , +which should either be zero (indicating the primary format file) or else a +fragment index returned by a previous call to +.BR df_add_fragment (3). .SH RETURN VALUE Upon success, .BR df_add_alias () @@ -65,10 +72,8 @@ All errors are accompanied by a message on standard error. .SH SEE ALSO .PP -defile-input(7), defile(1), dirfile-format(5), +defile-input(7), defile(1), +.BR df_add_entry (3), +.BR df_add_fragment (3), .BR df_add_framedef (3), -.BR gd_add (3), -.BR df_set_carray (3), -.BR df_set_const (3), -.BR df_set_string (3), -.BR gd_entry (3). +.BR gd_add_alias (3). Modified: trunk/defile/doc/df_add_entry.3 =================================================================== --- trunk/defile/doc/df_add_entry.3 2012-07-12 22:38:02 UTC (rev 744) +++ trunk/defile/doc/df_add_entry.3 2012-07-20 23:34:30 UTC (rev 745) @@ -13,7 +13,7 @@ .\" Texts. A copy of the license is included in the `COPYING.DOC' file .\" as part of this distribution. .\" -.TH df_add_entry 3 "27 February 2012" "Version 0.1.0" DEFILE +.TH df_add_entry 3 "21 July 2012" "Version 0.0.0" DEFILE .SH NAME df_add_entry, df_add_spec \(em add a derived field to defile's output dirfile .SH SYNOPSIS @@ -24,7 +24,7 @@ .HP .BI "int df_add_entry(const gd_entry_t *" entry ); .HP -.BI "int df_add_spec(const char *" spec ); +.BI "int df_add_spec(const char *" spec ", int " fragment ); .fam .ad .hy @@ -48,6 +48,14 @@ to the output dirfile. The syntax of Dirfile field specification lines is defined in dirfile-format(5). .PP +The entry is added to the fragment indicated by +.I fragment +or +.IR entry -> fragment_index . +This should either be zero (indicating the primary format file) or else a +fragment index returned by a previous call to +.BR df_add_fragment (3). +.PP For scalar field types .RB ( CONST ", " CARRAY ", " STRING ) added with @@ -99,6 +107,8 @@ .SH SEE ALSO .PP defile-input(7), defile(1), dirfile-format(5), +.BR df_add_carray (3), +.BR df_add_fragment (3), .BR df_add_framedef (3), .BR gd_add (3), .BR df_set_carray (3), Modified: trunk/defile/doc/df_add_framedef.3 =================================================================== --- trunk/defile/doc/df_add_framedef.3 2012-07-12 22:38:02 UTC (rev 744) +++ trunk/defile/doc/df_add_framedef.3 2012-07-20 23:34:30 UTC (rev 745) @@ -13,7 +13,7 @@ .\" Texts. A copy of the license is included in the `COPYING.DOC' file .\" as part of this distribution. .\" -.TH df_add_framdef 3 "27 February 2012" "Version 0.1.0" DEFILE +.TH df_add_framdef 3 "27 February 2012" "Version 0.0.0" DEFILE .SH NAME df_add_framdef \(em define a defile input subframe .SH SYNOPSIS @@ -22,7 +22,8 @@ .fam C .B #include <defile.h> .HP -.BI "int df_add_framedef(const struct df_fdef *" fdef ", int " count ); +.BI "int df_add_framedef(const struct df_fdef *" fdef ", int " count , +.BI "int " parent ); .fam .ad .hy @@ -132,6 +133,18 @@ output in the order defined in the subframe definition, which may be different than their ordering within the subframe itself. .PP +Specifications for field which have not appeared in any previous subframe +definition will be added to the output fragment indexed by +.IR fragment , +which should be either zero (for the primary fragment) or else a fragment index +returned by +.BR df_add_fragment (3). +The +.I fragment +parameter is ignored for fields which have already appeared in a previous +subframe definition, and need not be the same as the fragment in which the +field is actually defined. +.PP Fields which have been excluded from the output dirfile by the Output Field List (see defile(1)) are accepted in subframe definitions and simply ignored. .SH RETURN VALUE @@ -174,6 +187,7 @@ .PP defile-input(7), defile(1), .BR df_add_entry (3), +.BR df_add_fragment (3), .BR df_add_spec (3), .BR df_push_frame (3), .BR gd_add_raw (3) Modified: trunk/defile/doc/df_bsearch.3 =================================================================== --- trunk/defile/doc/df_bsearch.3 2012-07-12 22:38:02 UTC (rev 744) +++ trunk/defile/doc/df_bsearch.3 2012-07-20 23:34:30 UTC (rev 745) @@ -13,7 +13,7 @@ .\" Texts. A copy of the license is included in the `COPYING.DOC' file .\" as part of this distribution. .\" -.TH df_bsearch 3 "27 February 2012" "Version 0.1.0" DEFILE +.TH df_bsearch 3 "27 February 2012" "Version 0.0.0" DEFILE .SH NAME df_bsearch, df_strcmp \(em perform a binary search within defile .SH SYNOPSIS Modified: trunk/defile/doc/df_check_abort.3 =================================================================== --- trunk/defile/doc/df_check_abort.3 2012-07-12 22:38:02 UTC (rev 744) +++ trunk/defile/doc/df_check_abort.3 2012-07-20 23:34:30 UTC (rev 745) @@ -13,7 +13,7 @@ .\" Texts. A copy of the license is included in the `COPYING.DOC' file .\" as part of this distribution. .\" -.TH df_check_abort 3 "27 February 2012" "Version 0.1.0" DEFILE +.TH df_check_abort 3 "27 February 2012" "Version 0.0.0" DEFILE .SH NAME df_check_abort \(em set an abort handler for a defile input plugin .SH SYNOPSIS Modified: trunk/defile/doc/df_field_in_input.3 =================================================================== --- trunk/defile/doc/df_field_in_input.3 2012-07-12 22:38:02 UTC (rev 744) +++ trunk/defile/doc/df_field_in_input.3 2012-07-20 23:34:30 UTC (rev 745) @@ -13,7 +13,7 @@ .\" Texts. A copy of the license is included in the `COPYING.DOC' file .\" as part of this distribution. .\" -.TH df_field_in_output 3 "27 February 2012" "Version 0.1.0" DEFILE +.TH df_field_in_output 3 "27 February 2012" "Version 0.0.0" DEFILE .SH NAME df_field_in_output \(em check whether defile is writing a field to its output .SH SYNOPSIS Modified: trunk/defile/doc/df_init.3 =================================================================== --- trunk/defile/doc/df_init.3 2012-07-12 22:38:02 UTC (rev 744) +++ trunk/defile/doc/df_init.3 2012-07-20 23:34:30 UTC (rev 745) @@ -13,7 +13,7 @@ .\" Texts. A copy of the license is included in the `COPYING.DOC' file .\" as part of this distribution. .\" -.TH df_init 3 "27 February 2012" "Version 0.1.0" DEFILE +.TH df_init 3 "27 February 2012" "Version 0.0.0" DEFILE .SH NAME df_init, df_reinit \(em (re-)intialise defile for input .SH SYNOPSIS @@ -22,10 +22,10 @@ .fam C .B #include <defile.h> .HP -.BI "int df_init(unsigned long long " nframes ", unsigned long long " offset , +.BI "int df_init(long long " nframes ", long long " offset , .BI "double " rate ", const char *" name ); .HP -.BI "int df_reinit(unsigned long long " nframes ", unsigned long long " offset , +.BI "int df_reinit(long long " nframes ", long long " offset , .BI "double " rate ", const char *" name ", int " mode ); .fam .ad @@ -45,15 +45,25 @@ the total length, in frames, of the input data. In follow mode (see defile-input (7)) this is ignored. If the total length is unknown or difficult to calculate, this should be zero. This is only used for informational purposes -to the user; the input plugin may provide more frames that specified here -without incident. +to the user; the input plugin may provide a different number of frames than +specified here without error. .TP .I offset -the offset, in frames, of the first frame provided to defile. The first frame -defile writes to the output dirfile will correspond to this frame index. (See -.BR gd_frameoffset (3).) +the offset, in frames, of the first frame which can be provided to defile (see +.BR gd_frameoffset (3)). This may also affect the name of the output dirfile. If no frame offset is -needed, this should be zero. +needed, this should be zero. The actual frame offset of the output dirfile +may be different than this value (for example, if the output dirfile is being +appended to). +.IP +After calling either of these functions, the input plugin should call +.BR df_offset (3) +to determine the actual first frame which should be provided to defile. The +value returned by +.BR df_offset (3) +will never be less than the +.IR offset +specified here. .TP .I rate the expected frame rate for live data in follow mode (see defile-input (7)). If @@ -63,15 +73,12 @@ this number is of limited usefulness, but is still used if provided. .TP .I name -a descriptive name of the input data source. This may be used to generate the -name of the output dirfile. If this is NULL, the input descriptor passed to -defile (see +an updated input designator for the input data source. This might be used to +generate the name of the output dirfile. If this is NULL, the original input +descriptor passed to defile (see .BR df_input_name (3)) will be used. .PP -These functions will block until defile has initialised the output dirfile and -transitioned into the BUILD state. -.PP The .BR df_reinit () function behaves similarly, but is used during the @@ -90,6 +97,9 @@ .TP .B DF_REINIT_DROP to delete the in-progress dirfile before starting a new one. +.PP +These functions block until defile has initialised the output dirfile and +transitioned into the BUILD state. .SH RETURN VALUE Upon successful completion, .BR df_init () @@ -164,4 +174,5 @@ All errors are accompanied by a message on standard error. .SH SEE ALSO .PP -defile-input(7), defile(1). +defile-input(7), defile(1), +.BR df_offset (3). Modified: trunk/defile/doc/df_input_name.3 =================================================================== --- trunk/defile/doc/df_input_name.3 2012-07-12 22:38:02 UTC (rev 744) +++ trunk/defile/doc/df_input_name.3 2012-07-20 23:34:30 UTC (rev 745) @@ -13,7 +13,7 @@ .\" Texts. A copy of the license is included in the `COPYING.DOC' file .\" as part of this distribution. .\" -.TH df_input_name 3 "27 February 2012" "Version 0.1.0" DEFILE +.TH df_input_name 3 "27 February 2012" "Version 0.0.0" DEFILE .SH NAME df_input_name \(em obtain the defile input designator .SH SYNOPSIS Added: trunk/defile/doc/df_mode.3 =================================================================== --- trunk/defile/doc/df_mode.3 (rev 0) +++ trunk/defile/doc/df_mode.3 2012-07-20 23:34:30 UTC (rev 745) @@ -0,0 +1,88 @@ +.\" df_mode.3. The df_mode man page. +.\" +.\" Copyright (C) 2012 D. V. Wiebe +.\" +.\"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" +.\" +.\" This file is part of the Defile package. +.\" +.\" Permission is granted to copy, distribute and/or modify this document +.\" under the terms of the GNU Free Documentation License, Version 1.2 or +.\" any later version published by the Free Software Foundation; with no +.\" Invariant Sections, with no Front-Cover Texts, and with no Back-Cover +.\" Texts. A copy of the license is included in the `COPYING.DOC' file +.\" as part of this distribution. +.\" +.TH df_mode 3 "23 March 2012" "Version 0.0.0" DEFILE +.SH NAME +df_mode \(em obtain the defile operating modes +.SH SYNOPSIS +.nh +.ad l +.fam C +.B #include <defile.h> +.HP +.BI "unsigned int df_mode(void); +.fam +.ad +.hy +.SH DESCRIPTION +This function is part of the defile input plugin C API. See defile-input(7) +for an overview. +.PP +The +.BR df_mode () +returns the current operational modes of defile. Some mode flags are set at +invocation time, while others may change during operation. As a result, the +plugin should be careful about caching the value returned by this function. + +.SH RETURN VALUE +The +.BR df_mode () +function always returns a bitwise or'd collection of zero or more of the +following flags: +.TP +.B DF_MODE_APPEND +defile is appending to an existing Dirfile. This typically involves a frame +offset (see +.BR df_offset (3)) +and, furthermore, affects the operation of the metadata defining functions +.RB ( df_add_entry (3), +.BR df_add_spec (3), +.BR df_add_fragment (3), +.BR df_add_framedef (3)). +This flag may be changed by +.BR df_init (3) +or +.BR df_reinit (3), +and should not be cached across calls to these functions. An input plugin need +not support append mode, but should, in that case, check for this flag and exit +with an appropriate error message if it is found set. +.TP +.B DF_MODE_ASYNC +defile is operating in asynchronous mode and the input plugin is not required to +adhere to the restrictions of synchronous mode. (See defile-input(7) for a +discussion of the implications of synchronous and asynchronous modes.) An input +plugin is not required to implement asynchronous mode. (Implementing +synchronous mode \fIis\fR required.) +.TP +.B DF_MODE_DEBUG +defile is operating in debug mode and is printing extra debugging messages on +standard error. This does not affect the operation of defile, but this flag may +be used by the input plugin to decide when to emit its own debugging messages. +Otherwise, it may be safely ignored by input plugins. +.TP +.B DF_MODE_FOLLOW +defile is operating in follow mode and requests the input plugin to continue +to monitor the input data source when it reaches the end, providing additional +data to defile as it appears. An input plugin is not required to implement +follow mode and, so, may exit upon running out of data regardless of this flag. +.SH SEE ALSO +defile(1), defile-input(7), +.BR df_add_entry (3), +.BR df_add_spec (3), +.BR df_add_fragment (3), +.BR df_add_framedef (3), +.BR df_init (3), +.BR df_offset (3), +.BR df_reinit (3). Modified: trunk/defile/doc/df_nframes_allowed.3 =================================================================== --- trunk/defile/doc/df_nframes_allowed.3 2012-07-12 22:38:02 UTC (rev 744) +++ trunk/defile/doc/df_nframes_allowed.3 2012-07-20 23:34:30 UTC (rev 745) @@ -13,7 +13,7 @@ .\" Texts. A copy of the license is included in the `COPYING.DOC' file .\" as part of this distribution. .\" -.TH df_nframes_allowed 3 "1 March 2012" "Version 0.1.0" DEFILE +.TH df_nframes_allowed 3 "1 March 2012" "Version 0.0.0" DEFILE .SH NAME df_nframes_allowed \(em report the amount of data defile is willing to accept .SH SYNOPSIS Added: trunk/defile/doc/df_offset.3 =================================================================== --- trunk/defile/doc/df_offset.3 (rev 0) +++ trunk/defile/doc/df_offset.3 2012-07-20 23:34:30 UTC (rev 745) @@ -0,0 +1,85 @@ +.\" df_offset.3. The df_offset man page. +.\" +.\" Copyright (C) 2012 D. V. Wiebe +.\" +.\"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" +.\" +.\" This file is part of the Defile package. +.\" +.\" Permission is granted to copy, distribute and/or modify this document +.\" under the terms of the GNU Free Documentation License, Version 1.2 or +.\" any later version published by the Free Software Foundation; with no +.\" Invariant Sections, with no Front-Cover Texts, and with no Back-Cover +.\" Texts. A copy of the license is included in the `COPYING.DOC' file +.\" as part of this distribution. +.\" +.TH df_offset 3 "23 March 2012" "Version 0.0.0" DEFILE +.SH NAME +df_offset \(em obtain the defile operating modes +.SH SYNOPSIS +.nh +.ad l +.fam C +.B #include <defile.h> +.HP +.BI "long long df_offset(void); +.fam +.ad +.hy +.SH DESCRIPTION +This function is part of the defile input plugin C API. See defile-input(7) +for an overview. +.PP +The +.BR df_offset () +returns the number of frames, counting from the start of the data source, +which the input plugin should skip. The first frame pushed to defile should +be the frame immediately following the skipped frames. +.PP +The number returned will be the greatest of: +.IP \(bu +the frame skip specified at invocation via the +.B --skip +command line option (see defile(1)); +.IP \(bu +the offset of the first frame available in the data source, provided to defile +by the input plugin via +.BR df_init (3) +or +.BR df_reinit (3); +.IP \(bu +if in append mode (see +.BR df_mode (3)), +the current length of the output dirfile. +.PP +Unless the input data is independent of frame number, this function should be +called at least once after every call to +.BR df_init (3) +or +.BR df_reinit (3). + +.SH RETURN VALUE +On success, +.BR df_offset () +function returns the number of frames to initially skip counting from frame +zero, which is a non-negative number. On error, one of the following error +values (all less than zero) will be returned: +.TP +.B DF_ABORT +Another defile subprocess has requested the input plugin immediately abort. +Upon receiving this signal the plugin should shutdown and return. If it takes +too long, defile will cancel it. If an abort handler has been registered (see +.BR df_on_abort (3)), +this value is never returned and, instead, this function does not return. +.TP +.B DF_SEQUENCE +The function was called while defile was not in the +.B BUILD +nor +.B RUN +states. (See defile-input (7)). +.SH SEE ALSO +defile(1), defile-input(7), +.BR df_init (3), +.BR df_mode (3), +.BR df_reinit (3). Modified: trunk/defile/doc/df_on_abort.3 =================================================================== --- trunk/defile/doc/df_on_abort.3 2012-07-12 22:38:02 UTC (rev 744) +++ trunk/defile/doc/df_on_abort.3 2012-07-20 23:34:30 UTC (rev 745) @@ -13,7 +13,7 @@ .\" Texts. A copy of the license is included in the `COPYING.DOC' file .\" as part of this distribution. .\" -.TH df_on_abort 3 "27 February 2012" "Version 0.1.0" DEFILE +.TH df_on_abort 3 "27 February 2012" "Version 0.0.0" DEFILE .SH NAME df_on_abort \(em set an abort handler for a defile input plugin .SH SYNOPSIS Modified: trunk/defile/doc/df_push_frame.3 =================================================================== --- trunk/defile/doc/df_push_frame.3 2012-07-12 22:38:02 UTC (rev 744) +++ trunk/defile/doc/df_push_frame.3 2012-07-20 23:34:30 UTC (rev 745) @@ -13,7 +13,7 @@ .\" Texts. A copy of the license is included in the `COPYING.DOC' file .\" as part of this distribution. .\" -.TH df_push_frame 3 "1 March 2012" "Version 0.1.0" DEFILE +.TH df_push_frame 3 "1 March 2012" "Version 0.0.0" DEFILE .SH NAME df_push_frame \(em buffer data for conversion by defile .SH SYNOPSIS Modified: trunk/defile/doc/df_ready.3 =================================================================== --- trunk/defile/doc/df_ready.3 2012-07-12 22:38:02 UTC (rev 744) +++ trunk/defile/doc/df_ready.3 2012-07-20 23:34:30 UTC (rev 745) @@ -13,7 +13,7 @@ .\" Texts. A copy of the license is included in the `COPYING.DOC' file .\" as part of this distribution. .\" -.TH df_ready 3 "27 February 2012" "Version 0.1.0" DEFILE +.TH df_ready 3 "27 February 2012" "Version 0.0.0" DEFILE .SH NAME df_ready \(em begin defile data conversion .SH SYNOPSIS Modified: trunk/defile/doc/df_set_const.3 =================================================================== --- trunk/defile/doc/df_set_const.3 2012-07-12 22:38:02 UTC (rev 744) +++ trunk/defile/doc/df_set_const.3 2012-07-20 23:34:30 UTC (rev 745) @@ -13,7 +13,7 @@ .\" Texts. A copy of the license is included in the `COPYING.DOC' file .\" as part of this distribution. .\" -.TH df_set_const 3 "27 February 2012" "Version 0.1.0" DEFILE +.TH df_set_const 3 "27 February 2012" "Version 0.0.0" DEFILE .SH NAME df_set_const, df_set_carray, df_set_string \(em modify scalars in defile's output dirfile .SH SYNOPSIS Modified: trunk/defile/doc/df_shell_expand.3 =================================================================== --- trunk/defile/doc/df_shell_expand.3 2012-07-12 22:38:02 UTC (rev 744) +++ trunk/defile/doc/df_shell_expand.3 2012-07-20 23:34:30 UTC (rev 745) @@ -13,7 +13,7 @@ .\" Texts. A copy of the license is included in the `COPYING.DOC' file .\" as part of this distribution. .\" -.TH df_shell_expand 3 "27 February 2012" "Version 0.1.0" DEFILE +.TH df_shell_expand 3 "27 February 2012" "Version 0.0.0" DEFILE .SH NAME df_shell_expand \(em perform shell-style word expansion within defile .SH SYNOPSIS Modified: trunk/defile/input/ascii.c =================================================================== --- trunk/defile/input/ascii.c 2012-07-12 22:38:02 UTC (rev 744) +++ trunk/defile/input/ascii.c 2012-07-20 23:34:30 UTC (rev 745) @@ -19,28 +19,183 @@ * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif #include "internal.h" #include <sys/types.h> +#include <sys/wait.h> #include <sys/stat.h> +#include <sys/select.h> #include <stdlib.h> #include <string.h> +#include <signal.h> #include <fcntl.h> #include <stdio.h> #include <math.h> +#include <errno.h> #ifdef HAVE_UNISTD_H #include <unistd.h> #endif +#define ASCII_SHELL_PATH "/bin/sh" +#define ASCII_SHELL_NAME "sh" + +/* public strings */ #define ASCII_COPYRIGHT "Copyright (C) 2012 D. V. Wiebe" #define ASCII_CONTACT \ "Please send reports of bugs and other communication to:\n " PACKAGE_BUGREPORT #define ASCII_DESCRIPTION "ASCII tabular data" +#define ASCII_PREAMBLE "An ASCII tabular data reader for defile. See defile-ascii(1) for full details." +#define DIE() do { \ + fprintf(stderr, "abort in %s @ %s,%i\n", __func__, __FILE__, __LINE__); \ + df_exit(1,1); \ +} while(0) + +/* options definition */ +enum { + ASCII_OPT_COMMENT = 1, ASCII_OPT_CONSTS, ASCII_OPT_DELIM_OPT, + ASCII_OPT_DELIM_REQ, ASCII_OPT_EDELIM, ASCII_OPT_ESCAPE, ASCII_OPT_MIC, + ASCII_OPT_NAMEROW, ASCII_OPT_NO_MIC, ASCII_OPT_NO_HEADER, ASCII_OPT_NO_NAME, + ASCII_OPT_NO_FILT, ASCII_OPT_QUOTE, ASCII_OPT_SDELIM, ASCII_OPT_SEPAR, + ASCII_OPT_SKIP, ASCII_OPT_STRINGS, ASCII_OPT_TAB, ASCII_OPT_FILTER, + ASCII_OPT_TYPE, ASCII_OPT_WIDTH, ASCII_OPT_WS, ASCII_OPT_SEP_SET, + ASCII_OPT_SEP_STR, ASCII_OPT_LAZY, ASCII_OPT_STRICT +}; + +static const struct df_optdef ascii_opts[] = { + { ASCII_OPT_COMMENT, DF_OPT_ARG_RQ, 'c', "comment", "CommentDelim", 0, + "DELIM", "comments start with DELIM (default: \"#\")" }, + { ASCII_OPT_SDELIM, DF_OPT_ARG_RQ, 0, "start-delim", "StarDelimiter", 0, + "DELIM", "start-of-field is delimited by DELIM" }, + { ASCII_OPT_EDELIM, DF_OPT_ARG_RQ, 0, "end-delim", "EndDelimiter", 0, "DELIM", + "end-of-field is delimited by DELIM" }, + { ASCII_OPT_DELIM_REQ, DF_OPT_NO_ARG, 'd', "delim-req", "DelimitersRequired", + 0, NULL, "field delimiters are mandatory" }, + { ASCII_OPT_DELIM_OPT, DF_OPT_NO_ARG, 'd', "delim-opt", "DelimitersOptional", + DF_OPT_PLUS, NULL, "field delimiters are optional (default)" }, + { ASCII_OPT_ESCAPE, DF_OPT_ARG_RQ, 'e', "escape", "EscapeChar", 0, "CHAR", + "use CHAR as the character escape (default: \"\\\")" }, + { ASCII_OPT_MIC, DF_OPT_NO_ARG, 'm', "no-meta-comments", + "MetadataSkipComments", 0, NULL, "metadata don't appear in comments" }, + { ASCII_OPT_NO_MIC, DF_OPT_NO_ARG, 'm', "meta-comments", + "MetadataInComments", DF_OPT_PLUS, NULL, "metadata appear in comments" }, + { ASCII_OPT_NAMEROW, DF_OPT_NO_ARG, 'n', "name-row", "NameInRow", 0, NULL, + "read field names from the first row" }, + { ASCII_OPT_NO_NAME, DF_OPT_NO_ARG, 'n', "no-names", "NoNames", DF_OPT_PLUS, + NULL, "don't read field names from the file (default)" }, + { ASCII_OPT_QUOTE, DF_OPT_NO_ARG, 'q', "quoted", "Quoted", 0, NULL, + "equivalent to --start-delim=\\\" --end-delim=\\\"" }, + { ASCII_OPT_SEPAR, DF_OPT_ARG_RQ, 's', "sep", "Separator", 0, "SEPAR", + "fields are separated by SEPAR (default: \",\")" }, + { ASCII_OPT_SEP_SET, DF_OPT_NO_ARG, 'S', "sep-set", "SeparSet", 0, NULL, + "the SEPAR specified with -s is a set of characters, not a literal string"}, + { ASCII_OPT_SEP_STR, DF_OPT_NO_ARG, 'S', "sep-literal", "SeparLiteral", + DF_OPT_PLUS, NULL, "the SEPAR specified with -s is a literal string, not a " + "set of characters (default)" }, + { ASCII_OPT_SKIP, DF_OPT_ARG_RQ, 0, "skip", "SkipRows", 0, "NUM", + "skip the first NUM rows" }, + { ASCII_OPT_WS, DF_OPT_NO_ARG, 'W', "whitespace", "WhiteSpace", 0, NULL, + "use space and tab as a separator set" }, + { ASCII_OPT_WIDTH, DF_OPT_ARG_RQ, 'w', "width", "FixedWidth", 0, + "NUM1[,NUM2]...", "columns have fixed width of NUM1, NUM2, &c. characters; " + "if only NUM1 given, all columns have that width" }, + { ASCII_OPT_CONSTS, DF_OPT_ARG_RQ, 0, "const-row", "ConstRow", 0, + "NAME[,TYPE]", "create CONST metafields called NAME (of type TYPE) " + "from the values in the next header row" }, + { ASCII_OPT_STRINGS, DF_OPT_ARG_RQ, 0, "string-row", "StringRow", 0, "NAME", + "create STRING metafields called NAME from the values in the next header " + "row" }, + { ASCII_OPT_FILTER, DF_OPT_ARG_RQ, 'f', "filter", "Filter", 0, "COMMAND", + "filter the input though external filter COMMAND before processing" }, + { ASCII_OPT_NO_HEADER, DF_OPT_NO_ARG, 0, "clear-header", "ClearHeader", + DF_OPT_PLUS, NULL, "forget all previous CONST and STRING row definitions" }, + { ASCII_OPT_NO_FILT, DF_OPT_NO_ARG, 'f', "clear-filters", "ClearFilters", + DF_OPT_PLUS, NULL, "forget all previously defined filters" }, + { ASCII_OPT_TAB, DF_OPT_NO_ARG, 'T', "tab", "TabSeparated", 0, NULL, + "use tab as separator" }, + { ASCII_OPT_TYPE, DF_OPT_ARG_RQ, 't', "type", "DataType", 0, "[COL,]TYPE", + "store data in column number COL (or all columns) as TYPE " + "(default FLOAT64)" }, + { ASCII_OPT_STRICT, DF_OPT_NO_ARG, 'l', "strict", "Strict", DF_OPT_PLUS, NULL, + "require a whole entry be parsed as a number (default)" }, + { ASCII_OPT_LAZY, DF_OPT_NO_ARG, 'l', "lazy", "Lazy", 0, NULL, + "allow trailing unrecognised characters in an entry" }, + DF_OPT_ENDOPT +}; + +/* user configuration */ + +/* a header row (consts or strings) */ +struct ascii_header { + int string, n_data; + gd_type_t type; + const char *name; + void *data; +}; + +/* flags for the character getter */ +#define ASCII_ESCAPED 0x01 +#define ASCII_MIC 0x02 +#define ASCII_QUOT 0x04 +#define ASCII_SOL 0x08 + +/* a per-column type */ +struct ascii_type { + int col; + gd_type_t type; +}; + +static struct { + const char *separ; + const char *sdelim; + const char *edelim; + int sep_set; + int delim_opt; + int n_width; + int *width; + int skip; + int mic; + int lazy; + int debug; + int fd; + gd_type_t gtype; + + int n_type; + struct ascii_type *type; + + int namerow; + int n_header; + struct ascii_header *header; + + int n_name; + char **name; + + int n_filt; + const char **filt; + pid_t *filt_pid; + + char comment; + char escape; + int get_flags; + + void *d; + size_t *doff; +} ascii_conf = { + .separ = ",", + .delim_opt = 1, + .comment = '#', + .escape = '\\', + .mic = 1, + .fd = -1, + .get_flags = ASCII_SOL, + .gtype = GD_FLOAT64 +}; + +static int ascii_filter_dead = 0; + +static sigset_t ascii_sigset; + /* the probe function: given the name of the input, returns non-zero if this * module is willing to attempt to decode it */ #define PROBE_SIZE 1024 @@ -63,18 +218,13 @@ return 0; } - if (!S_ISREG(stat_buf.st_mode) -#ifdef S_ISLNK - && !S_ISLNK(stat_buf.st_mode) -#endif - ) - { + if (!S_ISREG(stat_buf.st_mode)) { free(full_name); return 0; } /* try opening it */ - fd = open(full_name, O_RDONLY | O_TEXT); + fd = open(full_name, O_RDONLY); free(full_name); if (fd < 0) return 0; @@ -87,7 +237,14 @@ if (n <= 0) return 0; + /* we have to be pretty lenient here since we don't know what might be used + * as a field separator (or, frankly, a comment delimiter, but we'll guess + * with that one. */ for (i = 0; i < n; ++i) { + /* high bit on? probably not ASCII */ + if (b[i] & 0x80) + return 0; + switch(b[i]) { /* don't allow most control characters */ case 0x00: /* NUL */ @@ -116,7 +273,7 @@ case 0x17: /* ETB */ case 0x18: /* CAN */ case 0x19: /* EM */ - /* SUB (0x1A) is allowed (PDPs used it as EOF, adopted by CP/M, + /* SUB (0x1A) is allowed (PDPs used it as EOF; adopted by CP/M; * propagated by Microsoft) */ case 0x1B: /* ESC */ case 0x1C: /* FS */ @@ -127,133 +284,1270 @@ return 0; case '\n': - /* we allow anything on the first line because maybe it's column - * names? subsequent lines must start with either a # for a comment - * or else one of [-+0123456789IiNn] for a data line */ + /* remember we saw a newline */ saw_ff = 1; - newline = 1; break; - case '#': - /* comment delimeter stops this from being a dataline */ - dataline = 0; - if (newline) /* okay as a line start */ - newline = 0; + default: /* any other character is okay */ break; + } + } - case '\t': - case '\v': - case '\f': - case '\r': - case 0x1A: - case ' ': - /* skip whites... [truncated message content] |
From: <ket...@us...> - 2012-07-12 22:38:08
|
Revision: 744 http://getdata.svn.sourceforge.net/getdata/?rev=744&view=rev Author: ketiltrout Date: 2012-07-12 22:38:02 +0000 (Thu, 12 Jul 2012) Log Message: ----------- Explicitly mention hex floating point. Modified Paths: -------------- trunk/getdata/man/dirfile-format.5 Modified: trunk/getdata/man/dirfile-format.5 =================================================================== --- trunk/getdata/man/dirfile-format.5 2012-07-12 00:55:26 UTC (rev 743) +++ trunk/getdata/man/dirfile-format.5 2012-07-12 22:38:02 UTC (rev 744) @@ -13,7 +13,7 @@ .\" Texts. A copy of the license is included in the `COPYING.DOC' file .\" as part of this distribution. .\" -.TH dirfile\-format 5 "1 April 2012" "Standards Version 9" "DATA FORMATS" +.TH dirfile\-format 5 "12 July 2012" "Standards Version 9" "DATA FORMATS" .SH NAME dirfile\-format \(em the dirfile database format specification file .SH DESCRIPTION @@ -1270,16 +1270,6 @@ field whose field code consists solely of digits can never be used as a parameter in a field specification line. -Starting in Standards Version 9, in additional to decimal notation, literal -integer parameters may be specified as hexadecimal numbers, by prefixing the -number with -.B 0x -or -.BR 0X , -or as octal numbers, by prefixing the number with -.BR 0 . -Both uppercase and lowercase hexadecimal digits may be used. - Starting in Standards Version 7, literal complex number is specified as two real (floating point) numbers separated by a semicolon .RB ( ; ) @@ -1311,6 +1301,50 @@ 1 0 .I im 0;1 0 +.PP +Starting in Standards Version 9, in additional to decimal notation, literal +integer parameters may be specified as hexadecimal numbers, by prefixing the +number (after an optional +.RB ' + ' +or +.RB ' - ' +sign) with +.B 0x +or +.BR 0X , +or as octal numbers, by prefixing the number with +.BR 0 , +as described in +.BR strtol (3). +Similarly, floating point literal numbers (both purely real ones and +components of complex literals) may be specified in hexadecimal by prefixing +them with +.B 0x +or +.BR 0X , +and using +.B p +or +.B P +as the binary exponent prefix, as described in the C99 standard. Both uppercase +and lowercase hexadecimal digits may be used. In cases where a literal +floating point number may apear, the tokens +.B INF +or +.BR INFINITY , +optionally preceded by a +.RB ' + ' +or +.RB ' - ' +sign, and +.BR NAN , +optionally immediately followed by +.RB ' ( ', +then a sequence of characters, then +.RB ' ) ', +and all disregarding case, will be interpreted as the special floating point +values explained in +.BR strtod (3). .SS Field Codes When specifying the input to a field, either as a scalar parameter, or as an @@ -1345,7 +1379,9 @@ axis and the value (ie. the complex argument). The argument is in the range [-pi, pi], and a branch cut exists along the negative real axis. At the branch cut, -pi is returned if the imaginary part is -0, and pi is returned if the -imaginary part is +0. If z=0, zero is returned. +imaginary part is +0. If +.IR z =0, +zero is returned. .TP .B .i This representation indicates the projection of the value onto the imaginary This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ket...@us...> - 2012-07-12 00:55:34
|
Revision: 743 http://getdata.svn.sourceforge.net/getdata/?rev=743&view=rev Author: ketiltrout Date: 2012-07-12 00:55:26 +0000 (Thu, 12 Jul 2012) Log Message: ----------- Fix some memory issues. Modified Paths: -------------- trunk/getdata/ChangeLog trunk/getdata/bindings/cxx/test/big_test.cpp trunk/getdata/bindings/f77/fgetdata.c trunk/getdata/src/add.c trunk/getdata/src/close.c trunk/getdata/src/fragment.c trunk/getdata/src/include.c trunk/getdata/src/internal.h trunk/getdata/src/move.c trunk/getdata/src/parse.c trunk/getdata/test/Makefile.am trunk/getdata/test/add.c trunk/getdata/test/add_affix.c trunk/getdata/test/add_meta.c trunk/getdata/test/add_meta_alias.c trunk/getdata/test/add_scalar.c trunk/getdata/test/add_scalar_carray.c trunk/getdata/test/madd_affix.c trunk/getdata/test/name.c trunk/getdata/test/name_alias.c trunk/getdata/test/name_updb.c trunk/getdata/test/name_updb_alias.c trunk/getdata/test/name_updb_const.c trunk/getdata/test/name_updb_const_alias.c trunk/getdata/test/parse_mplex_nomax.c Added Paths: ----------- trunk/getdata/test/valgrind.suppressions Property Changed: ---------------- trunk/getdata/test/ Modified: trunk/getdata/ChangeLog =================================================================== --- trunk/getdata/ChangeLog 2012-07-10 18:02:47 UTC (rev 742) +++ trunk/getdata/ChangeLog 2012-07-12 00:55:26 UTC (rev 743) @@ -1,3 +1,20 @@ +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 Modified: trunk/getdata/bindings/cxx/test/big_test.cpp =================================================================== --- trunk/getdata/bindings/cxx/test/big_test.cpp 2012-07-10 18:02:47 UTC (rev 742) +++ trunk/getdata/bindings/cxx/test/big_test.cpp 2012-07-12 00:55:26 UTC (rev 743) @@ -171,6 +171,7 @@ complex<double> cq[6]; const char **list; const char* str; + char* tok; char buf[GD_MAX_LINE_LENGTH]; Dirfile *d; Entry *ent; @@ -1652,13 +1653,15 @@ delete ent; // 232: gd_tokenise - str = d->StrTok("\"test1 test2\" test3\\ test4"); + tok = d->StrTok("\"test1 test2\" test3\\ test4"); CHECK_OK2(232, 1); - CHECK_STRING2(232, 2, str, "test1 test2"); + CHECK_STRING2(232, 2, tok, "test1 test2"); + free(tok); - str = d->StrTok(); + tok = d->StrTok(); CHECK_OK2(232, 3); - CHECK_STRING2(232, 4, str, "test3 test4"); + CHECK_STRING2(232, 4, tok, "test3 test4"); + free(tok); // 233: gd_raw_close check d->RawClose("data"); Modified: trunk/getdata/bindings/f77/fgetdata.c =================================================================== --- trunk/getdata/bindings/f77/fgetdata.c 2012-07-10 18:02:47 UTC (rev 742) +++ trunk/getdata/bindings/f77/fgetdata.c 2012-07-12 00:55:26 UTC (rev 743) @@ -2458,7 +2458,7 @@ const double *b2, const char *in_field3, const int32_t *in_field3_l, const double *m3, const double *b3) { - char *fc = (char *)malloc(*field_code_l + 1); + char *fc = NULL; char *in_fields[3] = {NULL, NULL, NULL}; double m[3] = {0, 0, 0}; double b[3] = {0, 0, 0}; Modified: trunk/getdata/src/add.c =================================================================== --- trunk/getdata/src/add.c 2012-07-10 18:02:47 UTC (rev 742) +++ trunk/getdata/src/add.c 2012-07-12 00:55:26 UTC (rev 743) @@ -171,6 +171,7 @@ if (_GD_InvalidEntype(entry->field_type)) { _GD_SetError(D, GD_E_BAD_ENTRY, GD_E_ENTRY_TYPE, NULL, entry->field_type, NULL); + free(temp_buffer); dreturn("%p", NULL); return NULL; } @@ -192,6 +193,7 @@ _GD_SetError(D, GD_E_PROTECTED, GD_E_PROTECTED_FORMAT, NULL, 0, D->fragment[E->fragment_index].cname); free(E); + free(temp_buffer); dreturn("%p", NULL); return NULL; } @@ -200,6 +202,7 @@ sizeof(struct _gd_private_entry)); if (E->e == NULL) { free(E); + free(temp_buffer); dreturn("%p", NULL); return NULL; } Modified: trunk/getdata/src/close.c =================================================================== --- trunk/getdata/src/close.c 2012-07-10 18:02:47 UTC (rev 742) +++ trunk/getdata/src/close.c 2012-07-12 00:55:26 UTC (rev 743) @@ -44,7 +44,9 @@ } free(D->entry); + free(D->tok_base); free(D->dot_list); + free(D->error_prefix); free(D->error_string); free(D->error_file); for (j = 0; j < GD_N_ENTRY_LISTS; ++j) Modified: trunk/getdata/src/fragment.c =================================================================== --- trunk/getdata/src/fragment.c 2012-07-10 18:02:47 UTC (rev 742) +++ trunk/getdata/src/fragment.c 2012-07-12 00:55:26 UTC (rev 743) @@ -114,11 +114,14 @@ char *subsuffix = _GD_MungeCode(D, NULL, NULL, D->fragment[i].suffix, NULL, suffix, D->fragment[j].suffix, &dummy); if (D->error) { + free(subprefix); dreturn("%p (%i)", new_codes, *n); return new_codes; } new_codes = _GD_CheckAffixes(D, j, subprefix, subsuffix, new_codes, n); + free(subprefix); + free(subsuffix); nn = *n; if (D->error) { @@ -396,6 +399,7 @@ return -1; } _GD_Open(D, dirfd, name, flags, sehandler, extra); + free(name); if (D->error) changed = -1; Modified: trunk/getdata/src/include.c =================================================================== --- trunk/getdata/src/include.c 2012-07-10 18:02:47 UTC (rev 742) +++ trunk/getdata/src/include.c 2012-07-12 00:55:26 UTC (rev 743) @@ -149,7 +149,7 @@ return -1; } sname = _GD_Strdup(D, dirname(temp_buf2)); - if (base == NULL) { + if (sname == NULL) { free(temp_buf2); free(base); free(prefix); @@ -167,6 +167,7 @@ if (D->error) { free(prefix); free(suffix); + free(sname); D->recurse_level--; dreturn("%i", -1); return -1; @@ -177,6 +178,7 @@ _GD_ReleaseDir(D, dirfd); free(prefix); free(suffix); + free(sname); D->recurse_level--; dreturn("%i", -1); return -1; @@ -194,6 +196,7 @@ free(prefix); free(suffix); free(base); + free(sname); free(temp_buf1); D->recurse_level--; dreturn("%i", -1); @@ -208,6 +211,7 @@ free(prefix); free(suffix); free(base); + free(sname); free(temp_buf1); D->recurse_level--; dreturn("%i", -1); @@ -227,6 +231,7 @@ free(prefix); free(suffix); free(base); + free(sname); free(temp_buf1); D->recurse_level--; dreturn("%i", -1); Modified: trunk/getdata/src/internal.h =================================================================== --- trunk/getdata/src/internal.h 2012-07-10 18:02:47 UTC (rev 742) +++ trunk/getdata/src/internal.h 2012-07-12 00:55:26 UTC (rev 743) @@ -962,6 +962,7 @@ int lookback; /* for the public tokeniser */ + char *tok_base; const char *tok_pos; /* field counts */ Modified: trunk/getdata/src/move.c =================================================================== --- trunk/getdata/src/move.c 2012-07-10 18:02:47 UTC (rev 742) +++ trunk/getdata/src/move.c 2012-07-12 00:55:26 UTC (rev 743) @@ -354,6 +354,7 @@ if (_GD_FindField(D, new_code, D->entry, D->n_entries, 1, NULL)) { _GD_SetError(D, GD_E_DUPLICATE, 0, NULL, 0, new_code); free(new_filebase); + free(new_code); dreturn("%i", -1); return -1; } Modified: trunk/getdata/src/parse.c =================================================================== --- trunk/getdata/src/parse.c 2012-07-10 18:02:47 UTC (rev 742) +++ trunk/getdata/src/parse.c 2012-07-12 00:55:26 UTC (rev 743) @@ -2404,20 +2404,26 @@ _GD_ClearError(D); - if (string) - D->tok_pos = string; - else if (D->tok_pos == NULL) { + if (string) { + free(D->tok_base); + D->tok_pos = D->tok_base = _GD_Strdup(D, string); + if (D->error) { + dreturn("%p", NULL); + return NULL; + } + } else if (D->tok_pos == NULL) { _GD_SetError(D, GD_E_ARGUMENT, GD_E_ARG_NODATA, NULL, 0, NULL); dreturn("%p", NULL); return NULL; } /* tokenise! */ - n_cols = _GD_Tokenise(D, D->tok_pos, &outstring, &D->tok_pos, 1, &in_col, - "gd_strtok()", 0, D->standards, D->flags & GD_PERMISSIVE); + n_cols = _GD_Tokenise(D, D->tok_pos, &outstring, (const char **)&D->tok_pos, + 1, &in_col, "gd_strtok()", 0, D->standards, D->flags & GD_PERMISSIVE); if (D->error || n_cols < 1) { - D->tok_pos = NULL; + free(D->tok_base); + D->tok_pos = D->tok_base = NULL; free(outstring); outstring = NULL; } Property changes on: trunk/getdata/test ___________________________________________________________________ Modified: svn:ignore - Makefile Makefile.in *.o dirfile *.swp *.exe .deps .libs add add_affix add_alias 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_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_raw_type add_rdonly add_recip add_resolv add_sbit add_scalar add_scalar_carray add_sort add_spec add_spec_directive add_spec_invalid add_spec_meta add_spec_resolv add_string add_string_affix add_type add_window add_window_op alias_list alias_list_alias alias_list_missing alias_num alias_num_alias alias_num_missing alias_target alias_target_alias alias_target_missing alter_bit_bitnum alter_bit_numbits alter_carray_len alter_carray_type alter_const alter_cpolynom alter_crecip alter_crecip89 alter_crecip_zero alter_divide alter_entry alter_entry_affix alter_entry_hidden alter_entry_recode alter_entry_scalar2a alter_entry_scalar2n alter_entry_scalar3 alter_entry_scalar4 alter_lincom_23 alter_lincom_32 alter_lincom_input alter_lincom_offset alter_lincom_slope alter_linterp alter_linterp_move alter_mplex alter_mspec alter_mspec_affix alter_multiply alter_phase alter_polynom_coeff alter_polynom_input alter_polynom_ord alter_raw_spf alter_raw_type alter_recip alter_recip_zero alter_spec alter_spec_affix alter_spec_meta alter_window ascii_add ascii_get ascii_get_get ascii_nframes ascii_put bof bof_lincom bof_phase bzip_get bzip_get_get bzip_move_from bzip_nframes bzip_put close close_bad close_discard close_null convert_complex128_complex64 convert_complex128_float64 convert_complex128_int64 convert_complex128_uint64 convert_complex64_complex128 convert_complex64_float64 convert_complex64_int64 convert_complex64_uint64 convert_float32_complex128 convert_float32_complex64 convert_float32_float64 convert_float32_int16 convert_float32_int32 convert_float32_int64 convert_float32_int8 convert_float32_uint16 convert_float32_uint32 convert_float32_uint64 convert_float32_uint8 convert_float64_complex128 convert_float64_complex64 convert_float64_float32 convert_float64_int16 convert_float64_int32 convert_float64_int64 convert_float64_int8 convert_float64_uint16 convert_float64_uint32 convert_float64_uint64 convert_float64_uint8 convert_int16_complex128 convert_int16_complex64 convert_int16_float32 convert_int16_float64 convert_int16_int32 convert_int16_int64 convert_int16_int8 convert_int16_uint16 convert_int16_uint32 convert_int16_uint64 convert_int16_uint8 convert_int32_complex128 convert_int32_complex64 convert_int32_float32 convert_int32_float64 convert_int32_int16 convert_int32_int64 convert_int32_int8 convert_int32_uint16 convert_int32_uint32 convert_int32_uint64 convert_int32_uint8 convert_int64_complex128 convert_int64_complex64 convert_int64_float32 convert_int64_float64 convert_int64_int16 convert_int64_int32 convert_int64_int8 convert_int64_uint16 convert_int64_uint32 convert_int64_uint64 convert_int64_uint8 convert_int8_complex128 convert_int8_complex64 convert_int8_float32 convert_int8_float64 convert_int8_int16 convert_int8_int32 convert_int8_int64 convert_int8_uint16 convert_int8_uint32 convert_int8_uint64 convert_int8_uint8 convert_uint16_complex128 convert_uint16_complex64 convert_uint16_float32 convert_uint16_float64 convert_uint16_int16 convert_uint16_int32 convert_uint16_int64 convert_uint16_int8 convert_uint16_uint32 convert_uint16_uint64 convert_uint16_uint8 convert_uint32_complex128 convert_uint32_complex64 convert_uint32_float32 convert_uint32_float64 convert_uint32_int16 convert_uint32_int32 convert_uint32_int64 convert_uint32_int8 convert_uint32_uint16 convert_uint32_uint64 convert_uint32_uint8 convert_uint64_complex128 convert_uint64_complex64 convert_uint64_float32 convert_uint64_float64 convert_uint64_int16 convert_uint64_int32 convert_uint64_int64 convert_uint64_int8 convert_uint64_uint16 convert_uint64_uint32 convert_uint64_uint8 convert_uint8_complex128 convert_uint8_complex64 convert_uint8_float32 convert_uint8_float64 convert_uint8_int16 convert_uint8_int32 convert_uint8_int64 convert_uint8_int8 convert_uint8_uint16 convert_uint8_uint32 convert_uint8_uint64 creat creat_excl creat_rdonly cvlist cvlist_array cvlist_array_hidden cvlist_array_meta cvlist_array_meta_hidden cvlist_hidden cvlist_invalid cvlist_meta cvlist_meta_hidden cvlist_meta_invalid del del_carray del_carray_deref del_const del_const_deref del_const_force del_data del_derived del_derived_after del_derived_force del_meta del_meta_force desync desync_flush desync_reopen desync_reopen_inv dfes_bit dfes_divide dfes_lincom dfes_linterp dfes_multiply dfes_null dfes_phase dfes_raw dfes_recip dfes_zero elist_alias elist_hidden elist_noalias elist_scalar encode_alter encode_get encode_move endian_alter endian_alter_sie endian_get endian_move entry_bad_code entry_bit entry_bit_scalar entry_divide entry_invalid entry_lincom entry_lincom_scalar entry_linterp entry_mplex entry_mplex_scalar entry_multiply entry_phase entry_phase_scalar entry_polynom entry_polynom_scalar entry_raw entry_raw_scalar entry_raw_scalar_code entry_raw_scalar_type entry_recip entry_scalar_repr entry_type entry_type_alias entry_window entry_window_scalar eof eof_index eof_lincom eof_phase error error_error error_num error_short error_verbose error_verbose_prefix file file_code file_type flist flist_hidden flist_invalid flist_meta flist_meta_hidden flist_meta_invalid flist_type flist_type_hidden flist_type_invalid flist_type_meta flist_type_meta_hidden flist_type_meta_invalid flush flush_all flush_bad_code flush_invalid flush_meta flush_spec foffs_alter foffs_get foffs_move fragment_affix fragment_affix_alter fragment_affix_alter2 fragment_affix_dup fragment_index fragment_index_alias fragment_name fragment_name_oor fragment_num fragment_parent get64 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_endian16 get_endian32 get_endian64 get_endian8 get_endian_complex128_arm get_endian_complex128_big get_endian_complex128_little get_endian_complex64_arm get_endian_complex64_big get_endian_complex64_little get_endian_float32_arm get_endian_float32_big get_endian_float32_little get_endian_float64_arm get_endian_float64_big get_endian_float64_little get_ff get_float32 get_float64 get_foffs get_fs get_here get_here_foffs get_heres get_int16 get_int32 get_int64 get_int8 get_invalid get_lincom1 get_lincom2 get_lincom3 get_lincom_noin get_lincom_non get_lincom_null get_lincom_spf get_linterp get_linterp_noin get_linterp_notab get_linterp_sort get_mplex 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_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 get_window_ne get_window_set get_zero global_flags global_name global_ref global_ref_empty global_ref_set gzip_add gzip_get gzip_get_get gzip_get_put gzip_move_from gzip_move_to gzip_nframes gzip_put gzip_put_get header_complex hide hide_hidden hide_unhide include include_accmode include_affix include_auto include_cb include_creat include_ignore include_index include_invalid include_nonexistent include_pc include_ref include_syntax index index_domain index_range legacy_get legacy_get_put legacy_get_rofs legacy_nframes legacy_nonexistent legacy_put legacy_spf lzma_get lzma_nframes madd madd_affix madd_alias madd_bit madd_bit_invalid madd_carray madd_clincom madd_const madd_cpolynom madd_crecip madd_crecip89 madd_divide madd_index madd_lincom madd_lincom_invalid madd_linterp madd_linterp_invalid madd_mplex madd_multiply madd_multiply_invalid madd_phase madd_phase_invalid madd_polynom madd_recip madd_sbit madd_spec madd_spec_directive madd_spec_invalid madd_spec_resolv madd_string madd_window move move_affix move_affix_dup move_alias move_data_enc_ar move_data_enc_ra move_data_endian move_data_foffs move_data_nop move_index move_meta move_protect move_subdir name name_affix name_affix_bad name_alias name_dup name_move name_move_alias name_updb name_updb_alias name_updb_const name_updb_const_alias nentries_alias nentries_hidden nentries_noalias nentries_scalar nfields nfields_hidden nfields_invalid nfields_type nfields_type_hidden nfields_type_invalid nfields_vector nfields_vector_hidden nfields_vector_invalid nframes nframes64 nframes_empty nframes_invalid nframes_off64 nframes_spf nmeta nmeta_hidden nmeta_invalid nmeta_parent nmeta_type nmeta_type_hidden nmeta_type_invalid nmeta_type_parent nmeta_vectors nmeta_vectors_del nmeta_vectors_hidden nmeta_vectors_invalid nmeta_vectors_parent open open_abs open_cb_abort open_cb_cont open_cb_ignore open_cb_invalid open_cb_rescan open_eaccess open_nonexistent open_notdirfile parse_alias parse_alias_code parse_alias_dup parse_alias_meta parse_alias_missing parse_badline parse_bit parse_bit4 parse_bit_bitnum parse_bit_bitsize parse_bit_ncols parse_bit_numbits parse_bit_scalar parse_carray parse_carray_long parse_const parse_const_complex parse_const_ncols parse_divide 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_hidden_field parse_hidden_meta parse_include parse_include_absolute parse_include_absrel parse_include_loop parse_include_nonexistent parse_include_prefix parse_include_prefix_dup parse_include_preprefix parse_include_relabs parse_include_relrel parse_include_slash parse_include_suffix parse_include_sufsuffix parse_index parse_lincom parse_lincom_ncols1 parse_lincom_ncols2 parse_lincom_nfields parse_lincom_nofields parse_lincom_non parse_lincom_non_ncols parse_lincom_scalar parse_linterp parse_linterp_ncols parse_malias parse_malias_dup parse_malias_meta parse_meta parse_meta_affix parse_meta_alias parse_meta_implicit parse_meta_implicit2 parse_meta_implicit_affix parse_meta_index parse_meta_index2 parse_meta_jump parse_meta_malias parse_meta_meta parse_meta_parent parse_meta_raw parse_mplex parse_mplex_ncols parse_mplex_nomax parse_mplex_scalar parse_multiply parse_multiply_ncols parse_name parse_name_dot parse_name_ext parse_name_pedantic parse_ncols parse_phase parse_phase_ncols parse_phase_scalar parse_polynom parse_polynom_ncols1 parse_polynom_ncols2 parse_polynom_scalar parse_protect_all parse_protect_bad parse_protect_data parse_protect_format parse_protect_none parse_quote 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_version_89 parse_version_98 parse_version_include parse_version_p8 parse_version_p9 parse_version_permissive parse_version_slash parse_whitespace parse_window parse_window_ncols parse_window_op parse_window_scalar protect_alter protect_get put64 put_bad_code put_bit put_bof put_carray put_carray_slice put_char put_complex128 put_complex64 put_const put_const_protect put_divide put_endian16 put_endian32 put_endian64 put_endian8 put_endian_complex128_arm put_endian_complex128_big put_endian_complex128_little put_endian_complex64_arm put_endian_complex64_big put_endian_complex64_little put_endian_float32_arm put_endian_float32_big put_endian_float32_little put_endian_float64_arm put_endian_float64_big put_endian_float64_little put_ff put_float32 put_float64 put_foffs put_fs put_here put_heres put_int16 put_int32 put_int64 put_int8 put_invalid put_lincom1 put_lincom2 put_lincom_noin put_linterp put_linterp_noin put_linterp_nomono put_linterp_notab put_linterp_reverse put_mplex put_multiply put_null put_off64 put_phase put_phase_noin put_polynom1 put_polynom2 put_polynom_noin put_protect put_rdonly put_recip put_recurse put_repr put_rofs put_sbit put_sf put_ss put_string put_string_protect put_type put_uint16 put_uint32 put_uint64 put_window put_zero ref ref_none ref_two repr_a repr_float32 repr_float64 repr_i repr_int16 repr_int32 repr_int64 repr_int8 repr_m repr_r repr_real_a repr_real_i repr_real_m repr_real_r repr_uint16 repr_uint32 repr_uint64 repr_uint8 seek64 seek_cur seek_end seek_foffs seek_set sie_get_big sie_get_little sie_move_from sie_move_to sie_nframes_big sie_nframes_little sie_put_big sie_put_little slim_get slim_nframes slim_put spf spf_alias spf_alias_meta spf_alias_missing spf_divide spf_lincom spf_multiply spf_polynom spf_recip spf_recurse svlist svlist_hidden svlist_invalid svlist_meta svlist_meta_hidden svlist_meta_invalid tell tell64 trunc trunc_dir trunc_rdonly trunc_rofs trunc_truncsub unclude unclude_del unclude_move version_0 version_0_write version_1 version_1_write version_2 version_2_write version_3 version_3_write version_4 version_4_write version_5 version_5_strict version_5_write version_6 version_6_strict version_6_write version_7 version_7_strict version_7_write version_8 version_8_strict version_8_write version_9 version_9_strict version_9_write vlist vlist_alias vlist_hidden vlist_invalid vlist_meta vlist_meta_hidden vlist_meta_invalid xz_get xz_nframes zzip_data zzip_get zzip_get_get zzip_nframes zzslim_get zzslim_nframes + Makefile Makefile.in valgrind.log *.o dirfile *.swp *.exe .deps .libs add add_affix add_alias 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_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_raw_type add_rdonly add_recip add_resolv add_sbit add_scalar add_scalar_carray add_sort add_spec add_spec_directive add_spec_invalid add_spec_meta add_spec_resolv add_string add_string_affix add_type add_window add_window_op alias_list alias_list_alias alias_list_missing alias_num alias_num_alias alias_num_missing alias_target alias_target_alias alias_target_missing alter_bit_bitnum alter_bit_numbits alter_carray_len alter_carray_type alter_const alter_cpolynom alter_crecip alter_crecip89 alter_crecip_zero alter_divide alter_entry alter_entry_affix alter_entry_hidden alter_entry_recode alter_entry_scalar2a alter_entry_scalar2n alter_entry_scalar3 alter_entry_scalar4 alter_lincom_23 alter_lincom_32 alter_lincom_input alter_lincom_offset alter_lincom_slope alter_linterp alter_linterp_move alter_mplex alter_mspec alter_mspec_affix alter_multiply alter_phase alter_polynom_coeff alter_polynom_input alter_polynom_ord alter_raw_spf alter_raw_type alter_recip alter_recip_zero alter_spec alter_spec_affix alter_spec_meta alter_window ascii_add ascii_get ascii_get_get ascii_nframes ascii_put bof bof_lincom bof_phase bzip_get bzip_get_get bzip_move_from bzip_nframes bzip_put close close_bad close_discard close_null convert_complex128_complex64 convert_complex128_float64 convert_complex128_int64 convert_complex128_uint64 convert_complex64_complex128 convert_complex64_float64 convert_complex64_int64 convert_complex64_uint64 convert_float32_complex128 convert_float32_complex64 convert_float32_float64 convert_float32_int16 convert_float32_int32 convert_float32_int64 convert_float32_int8 convert_float32_uint16 convert_float32_uint32 convert_float32_uint64 convert_float32_uint8 convert_float64_complex128 convert_float64_complex64 convert_float64_float32 convert_float64_int16 convert_float64_int32 convert_float64_int64 convert_float64_int8 convert_float64_uint16 convert_float64_uint32 convert_float64_uint64 convert_float64_uint8 convert_int16_complex128 convert_int16_complex64 convert_int16_float32 convert_int16_float64 convert_int16_int32 convert_int16_int64 convert_int16_int8 convert_int16_uint16 convert_int16_uint32 convert_int16_uint64 convert_int16_uint8 convert_int32_complex128 convert_int32_complex64 convert_int32_float32 convert_int32_float64 convert_int32_int16 convert_int32_int64 convert_int32_int8 convert_int32_uint16 convert_int32_uint32 convert_int32_uint64 convert_int32_uint8 convert_int64_complex128 convert_int64_complex64 convert_int64_float32 convert_int64_float64 convert_int64_int16 convert_int64_int32 convert_int64_int8 convert_int64_uint16 convert_int64_uint32 convert_int64_uint64 convert_int64_uint8 convert_int8_complex128 convert_int8_complex64 convert_int8_float32 convert_int8_float64 convert_int8_int16 convert_int8_int32 convert_int8_int64 convert_int8_uint16 convert_int8_uint32 convert_int8_uint64 convert_int8_uint8 convert_uint16_complex128 convert_uint16_complex64 convert_uint16_float32 convert_uint16_float64 convert_uint16_int16 convert_uint16_int32 convert_uint16_int64 convert_uint16_int8 convert_uint16_uint32 convert_uint16_uint64 convert_uint16_uint8 convert_uint32_complex128 convert_uint32_complex64 convert_uint32_float32 convert_uint32_float64 convert_uint32_int16 convert_uint32_int32 convert_uint32_int64 convert_uint32_int8 convert_uint32_uint16 convert_uint32_uint64 convert_uint32_uint8 convert_uint64_complex128 convert_uint64_complex64 convert_uint64_float32 convert_uint64_float64 convert_uint64_int16 convert_uint64_int32 convert_uint64_int64 convert_uint64_int8 convert_uint64_uint16 convert_uint64_uint32 convert_uint64_uint8 convert_uint8_complex128 convert_uint8_complex64 convert_uint8_float32 convert_uint8_float64 convert_uint8_int16 convert_uint8_int32 convert_uint8_int64 convert_uint8_int8 convert_uint8_uint16 convert_uint8_uint32 convert_uint8_uint64 creat creat_excl creat_rdonly cvlist cvlist_array cvlist_array_hidden cvlist_array_meta cvlist_array_meta_hidden cvlist_hidden cvlist_invalid cvlist_meta cvlist_meta_hidden cvlist_meta_invalid del del_carray del_carray_deref del_const del_const_deref del_const_force del_data del_derived del_derived_after del_derived_force del_meta del_meta_force desync desync_flush desync_reopen desync_reopen_inv dfes_bit dfes_divide dfes_lincom dfes_linterp dfes_multiply dfes_null dfes_phase dfes_raw dfes_recip dfes_zero elist_alias elist_hidden elist_noalias elist_scalar encode_alter encode_get encode_move endian_alter endian_alter_sie endian_get endian_move entry_bad_code entry_bit entry_bit_scalar entry_divide entry_invalid entry_lincom entry_lincom_scalar entry_linterp entry_mplex entry_mplex_scalar entry_multiply entry_phase entry_phase_scalar entry_polynom entry_polynom_scalar entry_raw entry_raw_scalar entry_raw_scalar_code entry_raw_scalar_type entry_recip entry_scalar_repr entry_type entry_type_alias entry_window entry_window_scalar eof eof_index eof_lincom eof_phase error error_error error_num error_short error_verbose error_verbose_prefix file file_code file_type flist flist_hidden flist_invalid flist_meta flist_meta_hidden flist_meta_invalid flist_type flist_type_hidden flist_type_invalid flist_type_meta flist_type_meta_hidden flist_type_meta_invalid flush flush_all flush_bad_code flush_invalid flush_meta flush_spec foffs_alter foffs_get foffs_move fragment_affix fragment_affix_alter fragment_affix_alter2 fragment_affix_dup fragment_index fragment_index_alias fragment_name fragment_name_oor fragment_num fragment_parent get64 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_endian16 get_endian32 get_endian64 get_endian8 get_endian_complex128_arm get_endian_complex128_big get_endian_complex128_little get_endian_complex64_arm get_endian_complex64_big get_endian_complex64_little get_endian_float32_arm get_endian_float32_big get_endian_float32_little get_endian_float64_arm get_endian_float64_big get_endian_float64_little get_ff get_float32 get_float64 get_foffs get_fs get_here get_here_foffs get_heres get_int16 get_int32 get_int64 get_int8 get_invalid get_lincom1 get_lincom2 get_lincom3 get_lincom_noin get_lincom_non get_lincom_null get_lincom_spf get_linterp get_linterp_noin get_linterp_notab get_linterp_sort get_mplex 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_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 get_window_ne get_window_set get_zero global_flags global_name global_ref global_ref_empty global_ref_set gzip_add gzip_get gzip_get_get gzip_get_put gzip_move_from gzip_move_to gzip_nframes gzip_put gzip_put_get header_complex hide hide_hidden hide_unhide include include_accmode include_affix include_auto include_cb include_creat include_ignore include_index include_invalid include_nonexistent include_pc include_ref include_syntax index index_domain index_range legacy_get legacy_get_put legacy_get_rofs legacy_nframes legacy_nonexistent legacy_put legacy_spf lzma_get lzma_nframes madd madd_affix madd_alias madd_bit madd_bit_invalid madd_carray madd_clincom madd_const madd_cpolynom madd_crecip madd_crecip89 madd_divide madd_index madd_lincom madd_lincom_invalid madd_linterp madd_linterp_invalid madd_mplex madd_multiply madd_multiply_invalid madd_phase madd_phase_invalid madd_polynom madd_recip madd_sbit madd_spec madd_spec_directive madd_spec_invalid madd_spec_resolv madd_string madd_window move move_affix move_affix_dup move_alias move_data_enc_ar move_data_enc_ra move_data_endian move_data_foffs move_data_nop move_index move_meta move_protect move_subdir name name_affix name_affix_bad name_alias name_dup name_move name_move_alias name_updb name_updb_alias name_updb_const name_updb_const_alias nentries_alias nentries_hidden nentries_noalias nentries_scalar nfields nfields_hidden nfields_invalid nfields_type nfields_type_hidden nfields_type_invalid nfields_vector nfields_vector_hidden nfields_vector_invalid nframes nframes64 nframes_empty nframes_invalid nframes_off64 nframes_spf nmeta nmeta_hidden nmeta_invalid nmeta_parent nmeta_type nmeta_type_hidden nmeta_type_invalid nmeta_type_parent nmeta_vectors nmeta_vectors_del nmeta_vectors_hidden nmeta_vectors_invalid nmeta_vectors_parent open open_abs open_cb_abort open_cb_cont open_cb_ignore open_cb_invalid open_cb_rescan open_eaccess open_nonexistent open_notdirfile parse_alias parse_alias_code parse_alias_dup parse_alias_meta parse_alias_missing parse_badline parse_bit parse_bit4 parse_bit_bitnum parse_bit_bitsize parse_bit_ncols parse_bit_numbits parse_bit_scalar parse_carray parse_carray_long parse_const parse_const_complex parse_const_ncols parse_divide 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_hidden_field parse_hidden_meta parse_include parse_include_absolute parse_include_absrel parse_include_loop parse_include_nonexistent parse_include_prefix parse_include_prefix_dup parse_include_preprefix parse_include_relabs parse_include_relrel parse_include_slash parse_include_suffix parse_include_sufsuffix parse_index parse_lincom parse_lincom_ncols1 parse_lincom_ncols2 parse_lincom_nfields parse_lincom_nofields parse_lincom_non parse_lincom_non_ncols parse_lincom_scalar parse_linterp parse_linterp_ncols parse_malias parse_malias_dup parse_malias_meta parse_meta parse_meta_affix parse_meta_alias parse_meta_implicit parse_meta_implicit2 parse_meta_implicit_affix parse_meta_index parse_meta_index2 parse_meta_jump parse_meta_malias parse_meta_meta parse_meta_parent parse_meta_raw parse_mplex parse_mplex_ncols parse_mplex_nomax parse_mplex_scalar parse_multiply parse_multiply_ncols parse_name parse_name_dot parse_name_ext parse_name_pedantic parse_ncols parse_phase parse_phase_ncols parse_phase_scalar parse_polynom parse_polynom_ncols1 parse_polynom_ncols2 parse_polynom_scalar parse_protect_all parse_protect_bad parse_protect_data parse_protect_format parse_protect_none parse_quote 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_version_89 parse_version_98 parse_version_include parse_version_p8 parse_version_p9 parse_version_permissive parse_version_slash parse_whitespace parse_window parse_window_ncols parse_window_op parse_window_scalar protect_alter protect_get put64 put_bad_code put_bit put_bof put_carray put_carray_slice put_char put_complex128 put_complex64 put_const put_const_protect put_divide put_endian16 put_endian32 put_endian64 put_endian8 put_endian_complex128_arm put_endian_complex128_big put_endian_complex128_little put_endian_complex64_arm put_endian_complex64_big put_endian_complex64_little put_endian_float32_arm put_endian_float32_big put_endian_float32_little put_endian_float64_arm put_endian_float64_big put_endian_float64_little put_ff put_float32 put_float64 put_foffs put_fs put_here put_heres put_int16 put_int32 put_int64 put_int8 put_invalid put_lincom1 put_lincom2 put_lincom_noin put_linterp put_linterp_noin put_linterp_nomono put_linterp_notab put_linterp_reverse put_mplex put_multiply put_null put_off64 put_phase put_phase_noin put_polynom1 put_polynom2 put_polynom_noin put_protect put_rdonly put_recip put_recurse put_repr put_rofs put_sbit put_sf put_ss put_string put_string_protect put_type put_uint16 put_uint32 put_uint64 put_window put_zero ref ref_none ref_two repr_a repr_float32 repr_float64 repr_i repr_int16 repr_int32 repr_int64 repr_int8 repr_m repr_r repr_real_a repr_real_i repr_real_m repr_real_r repr_uint16 repr_uint32 repr_uint64 repr_uint8 seek64 seek_cur seek_end seek_foffs seek_set sie_get_big sie_get_little sie_move_from sie_move_to sie_nframes_big sie_nframes_little sie_put_big sie_put_little slim_get slim_nframes slim_put spf spf_alias spf_alias_meta spf_alias_missing spf_divide spf_lincom spf_multiply spf_polynom spf_recip spf_recurse svlist svlist_hidden svlist_invalid svlist_meta svlist_meta_hidden svlist_meta_invalid tell tell64 trunc trunc_dir trunc_rdonly trunc_rofs trunc_truncsub unclude unclude_del unclude_move version_0 version_0_write version_1 version_1_write version_2 version_2_write version_3 version_3_write version_4 version_4_write version_5 version_5_strict version_5_write version_6 version_6_strict version_6_write version_7 version_7_strict version_7_write version_8 version_8_strict version_8_write version_9 version_9_strict version_9_write vlist vlist_alias vlist_hidden vlist_invalid vlist_meta vlist_meta_hidden vlist_meta_invalid xz_get xz_nframes zzip_data zzip_get zzip_get_get zzip_nframes zzslim_get zzslim_nframes Modified: trunk/getdata/test/Makefile.am =================================================================== --- trunk/getdata/test/Makefile.am 2012-07-10 18:02:47 UTC (rev 742) +++ trunk/getdata/test/Makefile.am 2012-07-12 00:55:26 UTC (rev 743) @@ -378,7 +378,7 @@ rm -f $@; \ for x in $^; do ( \ echo $$x:; \ - sed -e 's/exec "/exec valgrind --leak-check=full --track-origins=yes --track-fds=yes "/' $$x | sh; \ + sed -e 's/exec "/exec valgrind --leak-check=full --track-origins=yes --track-fds=yes --suppressions=valgrind.suppressions "/' $$x | sh; \ echo $$x = $$? ); done &> $@; # clean up after the tests Modified: trunk/getdata/test/add.c =================================================================== --- trunk/getdata/test/add.c 2012-07-10 18:02:47 UTC (rev 742) +++ trunk/getdata/test/add.c 2012-07-12 00:55:26 UTC (rev 743) @@ -39,9 +39,9 @@ gd_entry_t E, e; rmdirfile(); + memset(&E, 0, sizeof(E)); E.field = "data"; E.field_type = GD_RAW_ENTRY; - E.fragment_index = 0; E.EN(raw,spf) = 2; E.EN(raw,data_type) = GD_UINT8; E.scalar[0] = NULL; Modified: trunk/getdata/test/add_affix.c =================================================================== --- trunk/getdata/test/add_affix.c 2012-07-10 18:02:47 UTC (rev 742) +++ trunk/getdata/test/add_affix.c 2012-07-12 00:55:26 UTC (rev 743) @@ -34,6 +34,7 @@ rmdirfile(); mkdir(filedir, 0777); + memset(&E, 0, sizeof(E)); E.field = "data"; E.field_type = GD_RAW_ENTRY; E.fragment_index = 1; Modified: trunk/getdata/test/add_meta.c =================================================================== --- trunk/getdata/test/add_meta.c 2012-07-10 18:02:47 UTC (rev 742) +++ trunk/getdata/test/add_meta.c 2012-07-12 00:55:26 UTC (rev 743) @@ -39,6 +39,7 @@ gd_entry_t E, e; rmdirfile(); + memset(&E, 0, sizeof(E)); E.field = "data"; E.field_type = GD_CONST_ENTRY; E.fragment_index = 0; Modified: trunk/getdata/test/add_meta_alias.c =================================================================== --- trunk/getdata/test/add_meta_alias.c 2012-07-10 18:02:47 UTC (rev 742) +++ trunk/getdata/test/add_meta_alias.c 2012-07-12 00:55:26 UTC (rev 743) @@ -39,6 +39,7 @@ gd_entry_t E, e; rmdirfile(); + memset(&E, 0, sizeof(E)); E.field = "data"; E.field_type = GD_CONST_ENTRY; E.fragment_index = 0; Modified: trunk/getdata/test/add_scalar.c =================================================================== --- trunk/getdata/test/add_scalar.c 2012-07-10 18:02:47 UTC (rev 742) +++ trunk/getdata/test/add_scalar.c 2012-07-12 00:55:26 UTC (rev 743) @@ -28,6 +28,7 @@ DIRFILE *D; gd_entry_t E, e; + memset(&E, 0, sizeof(E)); E.field = "data"; E.field_type = GD_LINCOM_ENTRY; E.fragment_index = 0; Modified: trunk/getdata/test/add_scalar_carray.c =================================================================== --- trunk/getdata/test/add_scalar_carray.c 2012-07-10 18:02:47 UTC (rev 742) +++ trunk/getdata/test/add_scalar_carray.c 2012-07-12 00:55:26 UTC (rev 743) @@ -28,6 +28,7 @@ DIRFILE *D; gd_entry_t E, e; + memset(&E, 0, sizeof(E)); E.field = "data"; E.field_type = GD_LINCOM_ENTRY; E.fragment_index = 0; Modified: trunk/getdata/test/madd_affix.c =================================================================== --- trunk/getdata/test/madd_affix.c 2012-07-10 18:02:47 UTC (rev 742) +++ trunk/getdata/test/madd_affix.c 2012-07-12 00:55:26 UTC (rev 743) @@ -34,6 +34,7 @@ rmdirfile(); mkdir(filedir, 0777); + memset(&E, 0, sizeof(E)); E.field = "data"; E.field_type = GD_RAW_ENTRY; E.fragment_index = 1; Modified: trunk/getdata/test/name.c =================================================================== --- trunk/getdata/test/name.c 2012-07-10 18:02:47 UTC (rev 742) +++ trunk/getdata/test/name.c 2012-07-12 00:55:26 UTC (rev 743) @@ -119,10 +119,15 @@ CHECKS(s2, "data"); CHECKS(s3, "data"); + free(s1); + free(s2); + free(s3); free(field_list[0]); free(field_list[1]); free(field_list[2]); free(field_list[3]); + free(field_list[4]); + free(field_list[5]); return r; } Modified: trunk/getdata/test/name_alias.c =================================================================== --- trunk/getdata/test/name_alias.c 2012-07-10 18:02:47 UTC (rev 742) +++ trunk/getdata/test/name_alias.c 2012-07-12 00:55:26 UTC (rev 743) @@ -114,6 +114,7 @@ gd_entry(D, "aata", &E); e5 = gd_error(D); s5 = strdup(gd_alias_target(D, "aata")); + gd_free_entry_strings(&E); gd_entry(D, "bata", &E); e6 = gd_error(D); @@ -156,6 +157,17 @@ free(field_list[1]); free(field_list[2]); free(field_list[3]); + free(field_list[4]); + free(field_list[5]); + free(field_list[6]); + free(field_list[7]); + free(field_list[8]); + free(s1); + free(s2); + free(s3); + free(s4); + free(s5); + free(s6); return r; } Modified: trunk/getdata/test/name_updb.c =================================================================== --- trunk/getdata/test/name_updb.c 2012-07-10 18:02:47 UTC (rev 742) +++ trunk/getdata/test/name_updb.c 2012-07-12 00:55:26 UTC (rev 743) @@ -63,6 +63,7 @@ gd_entry(D, "bata", &E); e4 = gd_error(D); s3 = strdup(gd_alias_target(D, "bata")); + gd_free_entry_strings(&E); gd_discard(D); @@ -77,5 +78,9 @@ CHECKS(s2, "zata"); CHECKS(s3, "zata"); + free(s1); + free(s2); + free(s3); + return r; } Modified: trunk/getdata/test/name_updb_alias.c =================================================================== --- trunk/getdata/test/name_updb_alias.c 2012-07-10 18:02:47 UTC (rev 742) +++ trunk/getdata/test/name_updb_alias.c 2012-07-12 00:55:26 UTC (rev 743) @@ -82,10 +82,12 @@ gd_entry(D, "aata", &E); e5 = gd_error(D); s5 = strdup(gd_alias_target(D, "aata")); + gd_free_entry_strings(&E); gd_entry(D, "bata", &E); e6 = gd_error(D); s6 = strdup(gd_alias_target(D, "bata")); + gd_free_entry_strings(&E); gd_discard(D); @@ -106,5 +108,12 @@ CHECKS(s5, "cata"); CHECKS(s6, "zata"); + free(s1); + free(s2); + free(s3); + free(s4); + free(s5); + free(s6); + return r; } Modified: trunk/getdata/test/name_updb_const.c =================================================================== --- trunk/getdata/test/name_updb_const.c 2012-07-10 18:02:47 UTC (rev 742) +++ trunk/getdata/test/name_updb_const.c 2012-07-12 00:55:26 UTC (rev 743) @@ -63,6 +63,7 @@ gd_entry(D, "b", &E); e4 = gd_error(D); s3 = strdup(gd_alias_target(D, "b")); + gd_free_entry_strings(&E); gd_discard(D); @@ -77,5 +78,9 @@ CHECKS(s2, "d"); CHECKS(s3, "d"); + free(s1); + free(s2); + free(s3); + return r; } Modified: trunk/getdata/test/name_updb_const_alias.c =================================================================== --- trunk/getdata/test/name_updb_const_alias.c 2012-07-10 18:02:47 UTC (rev 742) +++ trunk/getdata/test/name_updb_const_alias.c 2012-07-12 00:55:26 UTC (rev 743) @@ -64,6 +64,7 @@ gd_entry(D, "b", &E); e4 = gd_error(D); s3 = strdup(gd_alias_target(D, "b")); + gd_free_entry_strings(&E); gd_discard(D); @@ -78,5 +79,9 @@ CHECKS(s2, "d"); CHECKS(s3, "d"); + free(s1); + free(s2); + free(s3); + return r; } Modified: trunk/getdata/test/parse_mplex_nomax.c =================================================================== --- trunk/getdata/test/parse_mplex_nomax.c 2012-07-10 18:02:47 UTC (rev 742) +++ trunk/getdata/test/parse_mplex_nomax.c 2012-07-12 00:55:26 UTC (rev 743) @@ -40,6 +40,7 @@ e1 = gd_error(D); e2 = gd_entry(D, "data", &E); gd_close(D); + gd_free_entry_strings(&E); unlink(format); rmdir(filedir); Added: trunk/getdata/test/valgrind.suppressions =================================================================== --- trunk/getdata/test/valgrind.suppressions (rev 0) +++ trunk/getdata/test/valgrind.suppressions 2012-07-12 00:55:26 UTC (rev 743) @@ -0,0 +1,7 @@ +{ + libdl_fillin_rpath + Memcheck:Cond + fun:strlen + fun:fillin_rpath + fun:_dl_init_paths +} This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ket...@us...> - 2012-07-10 18:02:58
|
Revision: 742 http://getdata.svn.sourceforge.net/getdata/?rev=742&view=rev Author: ketiltrout Date: 2012-07-10 18:02:47 +0000 (Tue, 10 Jul 2012) Log Message: ----------- svn:ignore Property Changed: ---------------- trunk/getdata/test/ Property changes on: trunk/getdata/test ___________________________________________________________________ Modified: svn:ignore - Makefile Makefile.in *.o dirfile *.swp *.exe .deps .libs add add_affix add_alias 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_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_raw_type add_rdonly add_recip add_resolv add_sbit add_scalar add_scalar_carray add_sort add_spec add_spec_directive add_spec_invalid add_spec_meta add_spec_resolv add_string add_string_affix add_type add_window add_window_op alias_list alias_list_alias alias_list_missing alias_num alias_num_alias alias_num_missing alias_target alias_target_alias alias_target_missing alter_bit_bitnum alter_bit_numbits alter_carray_len alter_carray_type alter_const alter_cpolynom alter_crecip alter_crecip89 alter_crecip_zero alter_divide alter_entry alter_entry_affix alter_entry_hidden alter_entry_recode alter_entry_scalar2a alter_entry_scalar2n alter_entry_scalar3 alter_entry_scalar4 alter_lincom_23 alter_lincom_32 alter_lincom_input alter_lincom_offset alter_lincom_slope alter_linterp alter_linterp_move alter_mplex alter_mspec alter_mspec_affix alter_multiply alter_phase alter_polynom_coeff alter_polynom_input alter_polynom_ord alter_raw_spf alter_raw_type alter_recip alter_recip_zero alter_spec alter_spec_affix alter_spec_meta alter_window ascii_add ascii_get ascii_get_get ascii_nframes ascii_put bof bof_lincom bof_phase bzip_get bzip_get_get bzip_move_from bzip_nframes bzip_put close close_bad close_discard close_null convert_complex128_complex64 convert_complex128_float64 convert_complex128_int64 convert_complex128_uint64 convert_complex64_complex128 convert_complex64_float64 convert_complex64_int64 convert_complex64_uint64 convert_float32_complex128 convert_float32_complex64 convert_float32_float64 convert_float32_int16 convert_float32_int32 convert_float32_int64 convert_float32_int8 convert_float32_uint16 convert_float32_uint32 convert_float32_uint64 convert_float32_uint8 convert_float64_complex128 convert_float64_complex64 convert_float64_float32 convert_float64_int16 convert_float64_int32 convert_float64_int64 convert_float64_int8 convert_float64_uint16 convert_float64_uint32 convert_float64_uint64 convert_float64_uint8 convert_int16_complex128 convert_int16_complex64 convert_int16_float32 convert_int16_float64 convert_int16_int32 convert_int16_int64 convert_int16_int8 convert_int16_uint16 convert_int16_uint32 convert_int16_uint64 convert_int16_uint8 convert_int32_complex128 convert_int32_complex64 convert_int32_float32 convert_int32_float64 convert_int32_int16 convert_int32_int64 convert_int32_int8 convert_int32_uint16 convert_int32_uint32 convert_int32_uint64 convert_int32_uint8 convert_int64_complex128 convert_int64_complex64 convert_int64_float32 convert_int64_float64 convert_int64_int16 convert_int64_int32 convert_int64_int8 convert_int64_uint16 convert_int64_uint32 convert_int64_uint64 convert_int64_uint8 convert_int8_complex128 convert_int8_complex64 convert_int8_float32 convert_int8_float64 convert_int8_int16 convert_int8_int32 convert_int8_int64 convert_int8_uint16 convert_int8_uint32 convert_int8_uint64 convert_int8_uint8 convert_uint16_complex128 convert_uint16_complex64 convert_uint16_float32 convert_uint16_float64 convert_uint16_int16 convert_uint16_int32 convert_uint16_int64 convert_uint16_int8 convert_uint16_uint32 convert_uint16_uint64 convert_uint16_uint8 convert_uint32_complex128 convert_uint32_complex64 convert_uint32_float32 convert_uint32_float64 convert_uint32_int16 convert_uint32_int32 convert_uint32_int64 convert_uint32_int8 convert_uint32_uint16 convert_uint32_uint64 convert_uint32_uint8 convert_uint64_complex128 convert_uint64_complex64 convert_uint64_float32 convert_uint64_float64 convert_uint64_int16 convert_uint64_int32 convert_uint64_int64 convert_uint64_int8 convert_uint64_uint16 convert_uint64_uint32 convert_uint64_uint8 convert_uint8_complex128 convert_uint8_complex64 convert_uint8_float32 convert_uint8_float64 convert_uint8_int16 convert_uint8_int32 convert_uint8_int64 convert_uint8_int8 convert_uint8_uint16 convert_uint8_uint32 convert_uint8_uint64 creat creat_excl creat_rdonly cvlist cvlist_array cvlist_array_hidden cvlist_array_meta cvlist_array_meta_hidden cvlist_hidden cvlist_invalid cvlist_meta cvlist_meta_hidden cvlist_meta_invalid del del_carray del_carray_deref del_const del_const_deref del_const_force del_data del_derived del_derived_after del_derived_force del_meta del_meta_force desync desync_flush desync_reopen desync_reopen_inv dfes_bit dfes_divide dfes_lincom dfes_linterp dfes_multiply dfes_null dfes_phase dfes_raw dfes_recip dfes_zero elist_alias elist_hidden elist_noalias elist_scalar encode_alter encode_get encode_move endian_alter endian_alter_sie endian_get endian_move entry_bad_code entry_bit entry_bit_scalar entry_divide entry_invalid entry_lincom entry_lincom_scalar entry_linterp entry_mplex entry_mplex_scalar entry_multiply entry_phase entry_phase_scalar entry_polynom entry_polynom_scalar entry_raw entry_raw_scalar entry_raw_scalar_code entry_raw_scalar_type entry_recip entry_scalar_repr entry_type entry_type_alias entry_window entry_window_scalar eof eof_index eof_lincom eof_phase error error_error error_num error_short error_verbose error_verbose_prefix file file_code file_type flist flist_hidden flist_invalid flist_meta flist_meta_hidden flist_meta_invalid flist_type flist_type_hidden flist_type_invalid flist_type_meta flist_type_meta_hidden flist_type_meta_invalid flush flush_all flush_bad_code flush_invalid flush_meta flush_spec foffs_alter foffs_get foffs_move fragment_affix fragment_affix_alter fragment_affix_alter2 fragment_affix_dup fragment_index fragment_index_alias fragment_name fragment_name_oor fragment_num fragment_parent get64 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_endian16 get_endian32 get_endian64 get_endian8 get_endian_complex128_arm get_endian_complex128_big get_endian_complex128_little get_endian_complex64_arm get_endian_complex64_big get_endian_complex64_little get_endian_float32_arm get_endian_float32_big get_endian_float32_little get_endian_float64_arm get_endian_float64_big get_endian_float64_little get_ff get_float32 get_float64 get_foffs get_fs get_here get_here_foffs get_heres get_int16 get_int32 get_int64 get_int8 get_invalid get_lincom1 get_lincom2 get_lincom3 get_lincom_noin get_lincom_non get_lincom_null get_lincom_spf get_linterp get_linterp_noin get_linterp_notab get_linterp_sort get_mplex 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_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 get_window_ne get_window_set get_zero global_flags global_name global_ref global_ref_empty global_ref_set gzip_add gzip_get gzip_get_get gzip_get_put gzip_move_from gzip_move_to gzip_nframes gzip_put gzip_put_get header_complex hide hide_hidden hide_unhide include include_accmode include_affix include_auto include_cb include_creat include_ignore include_index include_invalid include_nonexistent include_pc include_ref include_syntax index index_domain index_range legacy_get legacy_get_put legacy_get_rofs legacy_nframes legacy_nonexistent legacy_put legacy_spf lzma_get lzma_nframes madd madd_affix madd_alias madd_bit madd_bit_invalid madd_carray madd_clincom madd_const madd_cpolynom madd_crecip madd_crecip89 madd_divide madd_index madd_lincom madd_lincom_invalid madd_linterp madd_linterp_invalid madd_mplex madd_multiply madd_multiply_invalid madd_phase madd_phase_invalid madd_polynom madd_recip madd_sbit madd_spec madd_spec_directive madd_spec_invalid madd_spec_resolv madd_string madd_window move move_affix move_affix_dup move_alias move_data_enc_ar move_data_enc_ra move_data_endian move_data_foffs move_data_nop move_index move_meta move_protect move_subdir name name_affix name_affix_bad name_alias name_dup name_move name_move_alias name_updb name_updb_alias name_updb_const name_updb_const_alias nentries_alias nentries_hidden nentries_noalias nentries_scalar nfields nfields_hidden nfields_invalid nfields_type nfields_type_hidden nfields_type_invalid nfields_vector nfields_vector_hidden nfields_vector_invalid nframes nframes64 nframes_empty nframes_invalid nframes_off64 nframes_spf nmeta nmeta_hidden nmeta_invalid nmeta_parent nmeta_type nmeta_type_hidden nmeta_type_invalid nmeta_type_parent nmeta_vectors nmeta_vectors_del nmeta_vectors_hidden nmeta_vectors_invalid nmeta_vectors_parent open open_abs open_cb_abort open_cb_cont open_cb_ignore open_cb_invalid open_cb_rescan open_eaccess open_nonexistent open_notdirfile parse_alias parse_alias_code parse_alias_dup parse_alias_meta parse_alias_missing parse_badline parse_bit parse_bit4 parse_bit_bitnum parse_bit_bitsize parse_bit_ncols parse_bit_numbits parse_bit_scalar parse_carray parse_carray_long parse_const parse_const_ncols parse_divide 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_hidden_field parse_hidden_meta parse_include parse_include_absolute parse_include_absrel parse_include_loop parse_include_nonexistent parse_include_prefix parse_include_prefix_dup parse_include_preprefix parse_include_relabs parse_include_relrel parse_include_slash parse_include_suffix parse_include_sufsuffix parse_index parse_lincom parse_lincom_ncols1 parse_lincom_ncols2 parse_lincom_nfields parse_lincom_nofields parse_lincom_non parse_lincom_non_ncols parse_lincom_scalar parse_linterp parse_linterp_ncols parse_malias parse_malias_dup parse_malias_meta parse_meta parse_meta_affix parse_meta_alias parse_meta_implicit parse_meta_implicit2 parse_meta_implicit_affix parse_meta_index parse_meta_index2 parse_meta_jump parse_meta_malias parse_meta_meta parse_meta_parent parse_meta_raw parse_mplex parse_mplex_ncols parse_mplex_nomax parse_mplex_scalar parse_multiply parse_multiply_ncols parse_name parse_name_dot parse_name_ext parse_name_pedantic parse_ncols parse_phase parse_phase_ncols parse_phase_scalar parse_polynom parse_polynom_ncols1 parse_polynom_ncols2 parse_polynom_scalar parse_protect_all parse_protect_bad parse_protect_data parse_protect_format parse_protect_none parse_quote 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_version_89 parse_version_98 parse_version_include parse_version_p8 parse_version_p9 parse_version_permissive parse_version_slash parse_whitespace parse_window parse_window_ncols parse_window_op parse_window_scalar protect_alter protect_get put64 put_bad_code put_bit put_bof put_carray put_carray_slice put_char put_complex128 put_complex64 put_const put_const_protect put_divide put_endian16 put_endian32 put_endian64 put_endian8 put_endian_complex128_arm put_endian_complex128_big put_endian_complex128_little put_endian_complex64_arm put_endian_complex64_big put_endian_complex64_little put_endian_float32_arm put_endian_float32_big put_endian_float32_little put_endian_float64_arm put_endian_float64_big put_endian_float64_little put_ff put_float32 put_float64 put_foffs put_fs put_here put_heres put_int16 put_int32 put_int64 put_int8 put_invalid put_lincom1 put_lincom2 put_lincom_noin put_linterp put_linterp_noin put_linterp_nomono put_linterp_notab put_linterp_reverse put_mplex put_multiply put_null put_off64 put_phase put_phase_noin put_polynom1 put_polynom2 put_polynom_noin put_protect put_rdonly put_recip put_recurse put_repr put_rofs put_sbit put_sf put_ss put_string put_string_protect put_type put_uint16 put_uint32 put_uint64 put_window put_zero ref ref_none ref_two repr_a repr_float32 repr_float64 repr_i repr_int16 repr_int32 repr_int64 repr_int8 repr_m repr_r repr_real_a repr_real_i repr_real_m repr_real_r repr_uint16 repr_uint32 repr_uint64 repr_uint8 seek64 seek_cur seek_end seek_foffs seek_set sie_get_big sie_get_little sie_move_from sie_move_to sie_nframes_big sie_nframes_little sie_put_big sie_put_little slim_get slim_nframes slim_put spf spf_alias spf_alias_meta spf_alias_missing spf_divide spf_lincom spf_multiply spf_polynom spf_recip spf_recurse svlist svlist_hidden svlist_invalid svlist_meta svlist_meta_hidden svlist_meta_invalid tell tell64 trunc trunc_dir trunc_rdonly trunc_rofs trunc_truncsub unclude unclude_del unclude_move version_0 version_0_write version_1 version_1_write version_2 version_2_write version_3 version_3_write version_4 version_4_write version_5 version_5_strict version_5_write version_6 version_6_strict version_6_write version_7 version_7_strict version_7_write version_8 version_8_strict version_8_write version_9 version_9_strict version_9_write vlist vlist_alias vlist_hidden vlist_invalid vlist_meta vlist_meta_hidden vlist_meta_invalid xz_get xz_nframes zzip_data zzip_get zzip_get_get zzip_nframes zzslim_get zzslim_nframes + Makefile Makefile.in *.o dirfile *.swp *.exe .deps .libs add add_affix add_alias 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_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_raw_type add_rdonly add_recip add_resolv add_sbit add_scalar add_scalar_carray add_sort add_spec add_spec_directive add_spec_invalid add_spec_meta add_spec_resolv add_string add_string_affix add_type add_window add_window_op alias_list alias_list_alias alias_list_missing alias_num alias_num_alias alias_num_missing alias_target alias_target_alias alias_target_missing alter_bit_bitnum alter_bit_numbits alter_carray_len alter_carray_type alter_const alter_cpolynom alter_crecip alter_crecip89 alter_crecip_zero alter_divide alter_entry alter_entry_affix alter_entry_hidden alter_entry_recode alter_entry_scalar2a alter_entry_scalar2n alter_entry_scalar3 alter_entry_scalar4 alter_lincom_23 alter_lincom_32 alter_lincom_input alter_lincom_offset alter_lincom_slope alter_linterp alter_linterp_move alter_mplex alter_mspec alter_mspec_affix alter_multiply alter_phase alter_polynom_coeff alter_polynom_input alter_polynom_ord alter_raw_spf alter_raw_type alter_recip alter_recip_zero alter_spec alter_spec_affix alter_spec_meta alter_window ascii_add ascii_get ascii_get_get ascii_nframes ascii_put bof bof_lincom bof_phase bzip_get bzip_get_get bzip_move_from bzip_nframes bzip_put close close_bad close_discard close_null convert_complex128_complex64 convert_complex128_float64 convert_complex128_int64 convert_complex128_uint64 convert_complex64_complex128 convert_complex64_float64 convert_complex64_int64 convert_complex64_uint64 convert_float32_complex128 convert_float32_complex64 convert_float32_float64 convert_float32_int16 convert_float32_int32 convert_float32_int64 convert_float32_int8 convert_float32_uint16 convert_float32_uint32 convert_float32_uint64 convert_float32_uint8 convert_float64_complex128 convert_float64_complex64 convert_float64_float32 convert_float64_int16 convert_float64_int32 convert_float64_int64 convert_float64_int8 convert_float64_uint16 convert_float64_uint32 convert_float64_uint64 convert_float64_uint8 convert_int16_complex128 convert_int16_complex64 convert_int16_float32 convert_int16_float64 convert_int16_int32 convert_int16_int64 convert_int16_int8 convert_int16_uint16 convert_int16_uint32 convert_int16_uint64 convert_int16_uint8 convert_int32_complex128 convert_int32_complex64 convert_int32_float32 convert_int32_float64 convert_int32_int16 convert_int32_int64 convert_int32_int8 convert_int32_uint16 convert_int32_uint32 convert_int32_uint64 convert_int32_uint8 convert_int64_complex128 convert_int64_complex64 convert_int64_float32 convert_int64_float64 convert_int64_int16 convert_int64_int32 convert_int64_int8 convert_int64_uint16 convert_int64_uint32 convert_int64_uint64 convert_int64_uint8 convert_int8_complex128 convert_int8_complex64 convert_int8_float32 convert_int8_float64 convert_int8_int16 convert_int8_int32 convert_int8_int64 convert_int8_uint16 convert_int8_uint32 convert_int8_uint64 convert_int8_uint8 convert_uint16_complex128 convert_uint16_complex64 convert_uint16_float32 convert_uint16_float64 convert_uint16_int16 convert_uint16_int32 convert_uint16_int64 convert_uint16_int8 convert_uint16_uint32 convert_uint16_uint64 convert_uint16_uint8 convert_uint32_complex128 convert_uint32_complex64 convert_uint32_float32 convert_uint32_float64 convert_uint32_int16 convert_uint32_int32 convert_uint32_int64 convert_uint32_int8 convert_uint32_uint16 convert_uint32_uint64 convert_uint32_uint8 convert_uint64_complex128 convert_uint64_complex64 convert_uint64_float32 convert_uint64_float64 convert_uint64_int16 convert_uint64_int32 convert_uint64_int64 convert_uint64_int8 convert_uint64_uint16 convert_uint64_uint32 convert_uint64_uint8 convert_uint8_complex128 convert_uint8_complex64 convert_uint8_float32 convert_uint8_float64 convert_uint8_int16 convert_uint8_int32 convert_uint8_int64 convert_uint8_int8 convert_uint8_uint16 convert_uint8_uint32 convert_uint8_uint64 creat creat_excl creat_rdonly cvlist cvlist_array cvlist_array_hidden cvlist_array_meta cvlist_array_meta_hidden cvlist_hidden cvlist_invalid cvlist_meta cvlist_meta_hidden cvlist_meta_invalid del del_carray del_carray_deref del_const del_const_deref del_const_force del_data del_derived del_derived_after del_derived_force del_meta del_meta_force desync desync_flush desync_reopen desync_reopen_inv dfes_bit dfes_divide dfes_lincom dfes_linterp dfes_multiply dfes_null dfes_phase dfes_raw dfes_recip dfes_zero elist_alias elist_hidden elist_noalias elist_scalar encode_alter encode_get encode_move endian_alter endian_alter_sie endian_get endian_move entry_bad_code entry_bit entry_bit_scalar entry_divide entry_invalid entry_lincom entry_lincom_scalar entry_linterp entry_mplex entry_mplex_scalar entry_multiply entry_phase entry_phase_scalar entry_polynom entry_polynom_scalar entry_raw entry_raw_scalar entry_raw_scalar_code entry_raw_scalar_type entry_recip entry_scalar_repr entry_type entry_type_alias entry_window entry_window_scalar eof eof_index eof_lincom eof_phase error error_error error_num error_short error_verbose error_verbose_prefix file file_code file_type flist flist_hidden flist_invalid flist_meta flist_meta_hidden flist_meta_invalid flist_type flist_type_hidden flist_type_invalid flist_type_meta flist_type_meta_hidden flist_type_meta_invalid flush flush_all flush_bad_code flush_invalid flush_meta flush_spec foffs_alter foffs_get foffs_move fragment_affix fragment_affix_alter fragment_affix_alter2 fragment_affix_dup fragment_index fragment_index_alias fragment_name fragment_name_oor fragment_num fragment_parent get64 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_endian16 get_endian32 get_endian64 get_endian8 get_endian_complex128_arm get_endian_complex128_big get_endian_complex128_little get_endian_complex64_arm get_endian_complex64_big get_endian_complex64_little get_endian_float32_arm get_endian_float32_big get_endian_float32_little get_endian_float64_arm get_endian_float64_big get_endian_float64_little get_ff get_float32 get_float64 get_foffs get_fs get_here get_here_foffs get_heres get_int16 get_int32 get_int64 get_int8 get_invalid get_lincom1 get_lincom2 get_lincom3 get_lincom_noin get_lincom_non get_lincom_null get_lincom_spf get_linterp get_linterp_noin get_linterp_notab get_linterp_sort get_mplex 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_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 get_window_ne get_window_set get_zero global_flags global_name global_ref global_ref_empty global_ref_set gzip_add gzip_get gzip_get_get gzip_get_put gzip_move_from gzip_move_to gzip_nframes gzip_put gzip_put_get header_complex hide hide_hidden hide_unhide include include_accmode include_affix include_auto include_cb include_creat include_ignore include_index include_invalid include_nonexistent include_pc include_ref include_syntax index index_domain index_range legacy_get legacy_get_put legacy_get_rofs legacy_nframes legacy_nonexistent legacy_put legacy_spf lzma_get lzma_nframes madd madd_affix madd_alias madd_bit madd_bit_invalid madd_carray madd_clincom madd_const madd_cpolynom madd_crecip madd_crecip89 madd_divide madd_index madd_lincom madd_lincom_invalid madd_linterp madd_linterp_invalid madd_mplex madd_multiply madd_multiply_invalid madd_phase madd_phase_invalid madd_polynom madd_recip madd_sbit madd_spec madd_spec_directive madd_spec_invalid madd_spec_resolv madd_string madd_window move move_affix move_affix_dup move_alias move_data_enc_ar move_data_enc_ra move_data_endian move_data_foffs move_data_nop move_index move_meta move_protect move_subdir name name_affix name_affix_bad name_alias name_dup name_move name_move_alias name_updb name_updb_alias name_updb_const name_updb_const_alias nentries_alias nentries_hidden nentries_noalias nentries_scalar nfields nfields_hidden nfields_invalid nfields_type nfields_type_hidden nfields_type_invalid nfields_vector nfields_vector_hidden nfields_vector_invalid nframes nframes64 nframes_empty nframes_invalid nframes_off64 nframes_spf nmeta nmeta_hidden nmeta_invalid nmeta_parent nmeta_type nmeta_type_hidden nmeta_type_invalid nmeta_type_parent nmeta_vectors nmeta_vectors_del nmeta_vectors_hidden nmeta_vectors_invalid nmeta_vectors_parent open open_abs open_cb_abort open_cb_cont open_cb_ignore open_cb_invalid open_cb_rescan open_eaccess open_nonexistent open_notdirfile parse_alias parse_alias_code parse_alias_dup parse_alias_meta parse_alias_missing parse_badline parse_bit parse_bit4 parse_bit_bitnum parse_bit_bitsize parse_bit_ncols parse_bit_numbits parse_bit_scalar parse_carray parse_carray_long parse_const parse_const_complex parse_const_ncols parse_divide 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_hidden_field parse_hidden_meta parse_include parse_include_absolute parse_include_absrel parse_include_loop parse_include_nonexistent parse_include_prefix parse_include_prefix_dup parse_include_preprefix parse_include_relabs parse_include_relrel parse_include_slash parse_include_suffix parse_include_sufsuffix parse_index parse_lincom parse_lincom_ncols1 parse_lincom_ncols2 parse_lincom_nfields parse_lincom_nofields parse_lincom_non parse_lincom_non_ncols parse_lincom_scalar parse_linterp parse_linterp_ncols parse_malias parse_malias_dup parse_malias_meta parse_meta parse_meta_affix parse_meta_alias parse_meta_implicit parse_meta_implicit2 parse_meta_implicit_affix parse_meta_index parse_meta_index2 parse_meta_jump parse_meta_malias parse_meta_meta parse_meta_parent parse_meta_raw parse_mplex parse_mplex_ncols parse_mplex_nomax parse_mplex_scalar parse_multiply parse_multiply_ncols parse_name parse_name_dot parse_name_ext parse_name_pedantic parse_ncols parse_phase parse_phase_ncols parse_phase_scalar parse_polynom parse_polynom_ncols1 parse_polynom_ncols2 parse_polynom_scalar parse_protect_all parse_protect_bad parse_protect_data parse_protect_format parse_protect_none parse_quote 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_version_89 parse_version_98 parse_version_include parse_version_p8 parse_version_p9 parse_version_permissive parse_version_slash parse_whitespace parse_window parse_window_ncols parse_window_op parse_window_scalar protect_alter protect_get put64 put_bad_code put_bit put_bof put_carray put_carray_slice put_char put_complex128 put_complex64 put_const put_const_protect put_divide put_endian16 put_endian32 put_endian64 put_endian8 put_endian_complex128_arm put_endian_complex128_big put_endian_complex128_little put_endian_complex64_arm put_endian_complex64_big put_endian_complex64_little put_endian_float32_arm put_endian_float32_big put_endian_float32_little put_endian_float64_arm put_endian_float64_big put_endian_float64_little put_ff put_float32 put_float64 put_foffs put_fs put_here put_heres put_int16 put_int32 put_int64 put_int8 put_invalid put_lincom1 put_lincom2 put_lincom_noin put_linterp put_linterp_noin put_linterp_nomono put_linterp_notab put_linterp_reverse put_mplex put_multiply put_null put_off64 put_phase put_phase_noin put_polynom1 put_polynom2 put_polynom_noin put_protect put_rdonly put_recip put_recurse put_repr put_rofs put_sbit put_sf put_ss put_string put_string_protect put_type put_uint16 put_uint32 put_uint64 put_window put_zero ref ref_none ref_two repr_a repr_float32 repr_float64 repr_i repr_int16 repr_int32 repr_int64 repr_int8 repr_m repr_r repr_real_a repr_real_i repr_real_m repr_real_r repr_uint16 repr_uint32 repr_uint64 repr_uint8 seek64 seek_cur seek_end seek_foffs seek_set sie_get_big sie_get_little sie_move_from sie_move_to sie_nframes_big sie_nframes_little sie_put_big sie_put_little slim_get slim_nframes slim_put spf spf_alias spf_alias_meta spf_alias_missing spf_divide spf_lincom spf_multiply spf_polynom spf_recip spf_recurse svlist svlist_hidden svlist_invalid svlist_meta svlist_meta_hidden svlist_meta_invalid tell tell64 trunc trunc_dir trunc_rdonly trunc_rofs trunc_truncsub unclude unclude_del unclude_move version_0 version_0_write version_1 version_1_write version_2 version_2_write version_3 version_3_write version_4 version_4_write version_5 version_5_strict version_5_write version_6 version_6_strict version_6_write version_7 version_7_strict version_7_write version_8 version_8_strict version_8_write version_9 version_9_strict version_9_write vlist vlist_alias vlist_hidden vlist_invalid vlist_meta vlist_meta_hidden vlist_meta_invalid xz_get xz_nframes zzip_data zzip_get zzip_get_get zzip_nframes zzslim_get zzslim_nframes This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ket...@us...> - 2012-07-10 18:01:55
|
Revision: 741 http://getdata.svn.sourceforge.net/getdata/?rev=741&view=rev Author: ketiltrout Date: 2012-07-10 18:01:45 +0000 (Tue, 10 Jul 2012) Log Message: ----------- Tests. Added Paths: ----------- trunk/getdata/test/parse_const_complex.c trunk/getdata/test/parse_double.c Added: trunk/getdata/test/parse_const_complex.c =================================================================== --- trunk/getdata/test/parse_const_complex.c (rev 0) +++ trunk/getdata/test/parse_const_complex.c 2012-07-10 18:01:45 UTC (rev 741) @@ -0,0 +1,74 @@ +/* Copyright (C) 2008-2011 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 *format_data = "const CONST COMPLEX128 1;2\n"; + int fd, e1, e2, r = 0; +#ifdef GD_NO_C99_API + double c[2]; + const double v[2] = {1, 2}; +#else + complex double c; +#endif + 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); + e1 = gd_error(D); + +#ifdef GD_NO_C99_API + gd_get_constant(D, "const", GD_COMPLEX128, c); +#else + gd_get_constant(D, "const", GD_COMPLEX128, &c); +#endif + e2 = gd_error(D); + + gd_close(D); + + unlink(format); + rmdir(filedir); + + CHECKI(e1,GD_E_OK); + CHECKI(e2,GD_E_OK); +#ifdef GD_NO_C99_API + CHECKC(c,v); +#else + CHECKC(c,1 + _Complex_I * 2); +#endif + return r; +} Added: trunk/getdata/test/parse_double.c =================================================================== --- trunk/getdata/test/parse_double.c (rev 0) +++ trunk/getdata/test/parse_double.c 2012-07-10 18:01:45 UTC (rev 741) @@ -0,0 +1,86 @@ +/* Copyright (C) 2008-2011 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 <math.h> + +int main(void) +{ + const char *filedir = "dirfile"; + const char *format = "dirfile/format"; + const char *format_data = + "hex CONST FLOAT64 0xABC\n" + "dec CONST FLOAT64 1.3e3\n" + "flt CONST FLOAT64 -0x1.3p+3\n" + "inf CONST FLOAT64 INF\n" + "nan CONST FLOAT64 NAN\n"; + int fd, e1, e2, e3, e4, e5, e6, r = 0; + double d, h, i, n, p; + 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); + e1 = gd_error(D); + + gd_get_constant(D, "dec", GD_FLOAT64, &d); + e2 = gd_error(D); + + gd_get_constant(D, "flt", GD_FLOAT64, &p); + e3 = gd_error(D); + + gd_get_constant(D, "inf", GD_FLOAT64, &i); + e4 = gd_error(D); + + gd_get_constant(D, "nan", GD_FLOAT64, &n); + e5 = gd_error(D); + + gd_get_constant(D, "hex", GD_FLOAT64, &h); + e6 = gd_error(D); + + gd_close(D); + + unlink(format); + rmdir(filedir); + + CHECKI(e1,GD_E_OK); + CHECKI(e2,GD_E_OK); + CHECKI(e3,GD_E_OK); + CHECKI(e4,GD_E_OK); + CHECKI(e5,GD_E_OK); + CHECKI(e6,GD_E_OK); + CHECKF(h,2748.); + CHECKF(d,1300.); + CHECKF(p,-9.5); + CHECK(isfinite(i),i,"%g","infinity",i); + CHECKNAN(n); + return r; +} This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ket...@us...> - 2012-07-10 18:01:27
|
Revision: 740 http://getdata.svn.sourceforge.net/getdata/?rev=740&view=rev Author: ketiltrout Date: 2012-07-10 18:01:15 +0000 (Tue, 10 Jul 2012) Log Message: ----------- Improve posixiness of gd_strtod; fix pointer arithmetic in symlink negotiation. Modified Paths: -------------- trunk/getdata/ChangeLog trunk/getdata/src/common.c trunk/getdata/src/compat.c trunk/getdata/test/Makefile.am Modified: trunk/getdata/ChangeLog =================================================================== --- trunk/getdata/ChangeLog 2012-07-05 01:59:30 UTC (rev 739) +++ trunk/getdata/ChangeLog 2012-07-10 18:01:15 UTC (rev 740) @@ -1,3 +1,9 @@ +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. Modified: trunk/getdata/src/common.c =================================================================== --- trunk/getdata/src/common.c 2012-07-05 01:59:30 UTC (rev 739) +++ trunk/getdata/src/common.c 2012-07-10 18:01:15 UTC (rev 740) @@ -1191,7 +1191,7 @@ for (rptr = res + res_len - 1; *rptr != GD_DIRSEP; --rptr) ; *(rptr + 1) = '\0'; - res_len = res - rptr + 1; + res_len = (rptr - res) + 1; } /* now make a new work buffer of "target/remaining", asusming Modified: trunk/getdata/src/compat.c =================================================================== --- trunk/getdata/src/compat.c 2012-07-05 01:59:30 UTC (rev 739) +++ trunk/getdata/src/compat.c 2012-07-10 18:01:15 UTC (rev 740) @@ -328,17 +328,13 @@ double gd_strtod(const char *nptr, char **endptr) { const char *ptr = nptr; - double r; - long int li; + double r = 0; int sign = 0; dtrace("\"%s\", %p", nptr, endptr); /* the basic problem here is that MSVCRT's strtod() doesn't properly covert - * octal or hexadecimal numbers, nor does it do the special values "INF" and - * "NAN. So, we have to check for those first. For the first two, we then - * run it through strtol instead (which does do octal and hex fine in the - * MSVCRT) and then cast back to double. For the other two we're on our own. + * hexadecimal numbers, nor does it do the special values "INF" and "NAN". */ /* skip sign */ @@ -348,23 +344,47 @@ ptr++; } - /* check for octal "0[0-7]..." or hex ("0[Xx][0-9A-Fa-f]...") */ - if (*ptr == '0') { - switch (*(ptr + 1)) { - case '0': - case '1': - case '2': - case '3': - case '4': - case '5': - case '6': - case '7': - case 'x': - case 'X': - li = strtol(nptr, endptr, 0); - dreturn("%li", li); - return (double)li; + /* check for hex, either integer or floating point */ + if (*ptr == '0' && (*(ptr + 1) | 0x20) == 'x') { + double fact = 1.; + /* we store the mantissa in r */ + for (ptr += 2; *ptr; ++ptr) { + if ((*ptr >= '0' && *ptr <= '9') || + ((*ptr | 0x20) >= 'a' && (*ptr | 0x20) <= 'f')) + { + if (fact == 1.) + r *= 16; + else if (fact == 0.) + fact = 1./16; + else + fact /= 16; + + if (*ptr >= '0' && *ptr <= '9') + r += fact * (*ptr - '0'); + else + r += fact * ((*ptr | 0x20) - 'a' + 10); + } else if (*ptr == '.' && fact == 1.) + fact = 0.; + else if ((*ptr | 0x20) == 'p') { + /* use strtol to get exponent, which is in decimal */ + long exp = strtol(ptr + 1, endptr, 10); + r *= pow(2., exp); + + /* to avoid setting it again */ + endptr = NULL; + break; + } else + break; } + + if (endptr) + *endptr = (char*)ptr; + + if (sign) + r = -r; + + dreturn("%g (%c)", r, endptr ? **endptr : '-'); + return r; } else if ((*ptr | 0x20) == 'n') { if (((*(ptr + 1) | 0x20) == 'a') && ((*(ptr + 2) | 0x20) == 'n')) { /* an IEEE-754 double-precision quiet NaN: @@ -384,12 +404,12 @@ } nan_punning = {{ 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF }}; if (endptr) { - *endptr = ptr += 3; + *endptr = (char*)(ptr += 3); /* a NaN may end with something in parentheses */ if (*ptr == '(') { while (*++ptr) { if (*ptr == ')') { - *endptr = ptr + 1; + *endptr = (char*)(ptr + 1); break; } } @@ -398,7 +418,6 @@ /* return NaN */ dreturn("%g (%c)", nan_punning.d, endptr ? **endptr : '-'); - errno = 0; return nan_punning.d; } } else if ((*ptr | 0x20) == 'i') { @@ -424,7 +443,7 @@ }}; if (endptr) { - *endptr = ptr += 3; + *endptr = (char*)(ptr += 3); /* INF may also be INFINITY, disregarding case */ if ( ((*ptr | 0x20) == 'i') && @@ -439,7 +458,6 @@ /* return signed infinity */ dreturn("%g (%c)", inf_punning.d, endptr ? **endptr : '-'); - errno = 0; return inf_punning.d; } } Modified: trunk/getdata/test/Makefile.am =================================================================== --- trunk/getdata/test/Makefile.am 2012-07-05 01:59:30 UTC (rev 739) +++ trunk/getdata/test/Makefile.am 2012-07-10 18:01:15 UTC (rev 740) @@ -146,7 +146,7 @@ entry_mplex entry_mplex_scalar entry_multiply entry_phase \ entry_phase_scalar entry_polynom entry_polynom_scalar entry_raw \ entry_raw_scalar entry_raw_scalar_code entry_raw_scalar_type \ - entry_recip entry_scalar_repr entry_type entry_type_alias \ + entry_scalar_repr entry_recip entry_type entry_type_alias \ entry_window entry_window_scalar EOF_TESTS=eof eof_index eof_lincom eof_phase @@ -250,11 +250,12 @@ parse_alias_missing parse_badline parse_bit parse_bit4 \ parse_bit_bitnum parse_bit_bitsize parse_bit_ncols \ parse_bit_numbits parse_bit_scalar parse_carray parse_carray_long \ - parse_const parse_const_ncols parse_divide 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_hidden_field parse_hidden_meta parse_include \ + parse_const parse_const_complex parse_const_ncols parse_divide \ + 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_hidden_field parse_hidden_meta parse_include \ parse_include_absolute parse_include_absrel parse_include_loop \ parse_include_nonexistent parse_include_prefix \ parse_include_prefix_dup parse_include_preprefix \ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ket...@us...> - 2012-07-05 01:59:36
|
Revision: 739 http://getdata.svn.sourceforge.net/getdata/?rev=739&view=rev Author: ketiltrout Date: 2012-07-05 01:59:30 +0000 (Thu, 05 Jul 2012) Log Message: ----------- Delete GetData-0.7 branch. Removed Paths: ------------- branches/getdata-0.7/ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ket...@us...> - 2012-07-05 01:58:13
|
Revision: 738 http://getdata.svn.sourceforge.net/getdata/?rev=738&view=rev Author: ketiltrout Date: 2012-07-05 01:58:07 +0000 (Thu, 05 Jul 2012) Log Message: ----------- Tag GetData-0.8.0. Added Paths: ----------- tags/getdata-0.8.0/ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ket...@us...> - 2012-07-05 00:56:24
|
Revision: 737 http://getdata.svn.sourceforge.net/getdata/?rev=737&view=rev Author: ketiltrout Date: 2012-07-05 00:56:17 +0000 (Thu, 05 Jul 2012) Log Message: ----------- GetData-0.8.0. Modified Paths: -------------- trunk/getdata/ChangeLog trunk/getdata/NEWS trunk/getdata/m4/version.m4 trunk/html/bindings.html.in trunk/html/dirfile.html.in trunk/html/download.html.in trunk/html/encoding.html.in trunk/html/getdata.html.in trunk/html/index.html.in trunk/html/sie_compression.png Modified: trunk/getdata/ChangeLog =================================================================== --- trunk/getdata/ChangeLog 2012-07-04 23:53:37 UTC (rev 736) +++ trunk/getdata/ChangeLog 2012-07-05 00:56:17 UTC (rev 737) @@ -1,4 +1,7 @@ -2012-06-30 D. V. Wiebe <ge...@ke...> svn:734 +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 Modified: trunk/getdata/NEWS =================================================================== --- trunk/getdata/NEWS 2012-07-04 23:53:37 UTC (rev 736) +++ trunk/getdata/NEWS 2012-07-05 00:56:17 UTC (rev 737) @@ -1,4 +1,4 @@ -New in version 0.8.0rc2: +New in version 0.8.0: Dirfile Changes Modified: trunk/getdata/m4/version.m4 =================================================================== --- trunk/getdata/m4/version.m4 2012-07-04 23:53:37 UTC (rev 736) +++ trunk/getdata/m4/version.m4 2012-07-05 00:56:17 UTC (rev 737) @@ -21,7 +21,7 @@ m4_define(getdata_major, 0) m4_define(getdata_minor, 8) m4_define(getdata_revision, 0) -m4_define(getdata_extra, [rc2]) +m4_define(getdata_extra, []) m4_define(getdata_version, getdata_major.getdata_minor.getdata_revision[]getdata_extra) Modified: trunk/html/bindings.html.in =================================================================== --- trunk/html/bindings.html.in 2012-07-04 23:53:37 UTC (rev 736) +++ trunk/html/bindings.html.in 2012-07-05 00:56:17 UTC (rev 737) @@ -39,7 +39,7 @@ <h2><A name="fortran">Fortran Bindings</a></h2> <p>Two sets of Fortran bindings are provided. The basic bindings are - implemented in a compatiblity library (libfgetdata) and defined in a + implemented in a compatibility library (libfgetdata) and defined in a Fortran-77 source file, <code>getdata.f</code>, which will be installed along with the GetData header files. This file defines several convenient parameters including the DIRFILE flags, the data type @@ -83,7 +83,7 @@ second bindings conform to the Fortran-95 standard and declare a GetData module, described by a <code>getdata.mod</code> file installed alongside the GetData headers. The Fortran-95 bindings provide longer identifier - names, stronger type-saftey, and abstract data types as compared to the + names, stronger type-safety, and abstract data types as compared to the basic Fortran-77 bindings, and should be preferred when possible. Furthermore, while character string arguments in the Fortran-77 bindings require also an integer indicating the size of the character buffer, the @@ -147,7 +147,7 @@ <span class="syntax keyword">gd_entype_t</span> values (<span class="syntax literal">GD_NO_ENTRY</span>, <span class="syntax literal">GD_RAW_ENTRY</span>, &c.). C-style - parser callback functions can be used by thses bindings. Vector data + parser callback functions can be used by these bindings. Vector data fetched by <span class="syntax">Dirfile.getdata()</span> or provided to <span class="syntax">Dirfile.putdata()</span> are specified via pointer, as in the C API. Complex valued metadata are returned as Modified: trunk/html/dirfile.html.in =================================================================== --- trunk/html/dirfile.html.in 2012-07-04 23:53:37 UTC (rev 736) +++ trunk/html/dirfile.html.in 2012-07-05 00:56:17 UTC (rev 737) @@ -28,7 +28,7 @@ <a href="man/dirfile.5.html"><b>dirfile</b>(5)</a>, <a href="man/dirfile-format.5.html"><b>dirfile-format</b>(5)</a>, and <a href="man/dirfile-encoding.5.html"><b>dirfile-encoding</b>(5)</a>. - Additionally, this document discusses some implementation-dependant + Additionally, this document discusses some implementation-dependent behaviour specific to GetData not found in those documents. The latest release of the Dirfile Standards is Standards Version 9 (April 2012). <p>The dirfile database is centred around one or more time-ordered data @@ -122,10 +122,10 @@ the UTF-8 encoding of Unicode and UCS. <p>The format file is composed of <a href="#directives">directive lines</a> and <a href="#fields">field specification lines</a>, - optionally separated by blank lines, or lines containing ony whitespace. + optionally separated by blank lines, or lines containing only whitespace. Lines are separated by the line-feed character (0x0A). Unless escaped - (see below), the hash mark (<b>#</b>) is the comment delimeter; the - comment delimeter, and any text following it to the end of the line, is + (see below), the hash mark (<b>#</b>) is the comment delimiter; the + comment delimiter, and any text following it to the end of the line, is ignored. <h3><a name="tokens">Tokens</a></h3> <p>Both directive lines and field specification line consist of several @@ -237,7 +237,7 @@ situation, (for example, when used as a field name). <p>Standards Versions 5 and earlier do not recognise the character escape sequences, nor allow quoting of tokens. As a result, they prohibit both - whitespace and the comment delimileter from being used in tokens. + whitespace and the comment delimiter from being used in tokens. <h2><a name="directives">Directives</a></h2> <p>There are ten <i>directives</i>, each specified by a different @@ -255,8 +255,8 @@ <b>/INCLUDE</b> directive, but only if those sub-fragments don't have their own corresponding directive. Directives which have fragment scope are: <b>/ENCODING</b>, <b>/ENDIAN</b>, <b>/FRAMEOFFSET</b>, and - <b>/PROTECT</b>. Becase of these scoping rules, different portions of the - dirfile may have different encodings, endiannesses, frame offsets, or + <b>/PROTECT</b>. Because of these scoping rules, different portions of + the dirfile may have different encodings, endiannesses, frame offsets, or protection levels. <p>If a directive with fragment scope appears more than once in a fragment, only the last such directive is be honoured, with the @@ -272,7 +272,7 @@ from the target's original, canonical name. Aliases may be chained (that is, the target name appearing in an /ALIAS directive may itself be an alias). In this case, the new alias is another name for the target's - own target. Just as there is no requriement that the input fields of a + own target. Just as there is no requirement that the input fields of a derived field exist, it is not an error for the target of an alias to not exist. Syntax is: <div class="syntax"> @@ -564,7 +564,7 @@ since they derive their value from one or more input fields. <p>Five of these derived fields (<b>DIVIDE</b>, <b>LINCOM</b>, <b>MPLEX</b>, <b>MULTIPLY</b>, and <b>WINDOW</b>) may have more than one - input field. In situations where these input fields have differeing + input field. In situations where these input fields have differing sample rates, the sample rate of the derived field is the same as the sample rate of the first (left-most) input field specified. Furthermore, the input fields are synchronised by aligning them on frame boundaries, @@ -735,7 +735,7 @@ </ul> Introduced in Standards Version 4. <li><b>POLYNOM</b>: The POLYNOM field type specifies a polynomial - function of a single input field. Synax is: + function of a single input field. Syntax is: <div class="syntax"><fieldname> <b>POLYNOM</b> <input> <a<sub>0</sub>> <a<sub>1</sub>> [ <a<sub>2</sub>> [ <a<sub>3</sub>> [ <a<sub>4</sub>> @@ -748,7 +748,7 @@ + a<sub>2</sub> input<sup>2</sup> + a<sub>3</sub> input<sup>3</sup> + a<sub>4</sub> input<sup>4</sup> + a<sub>5</sub> input<sup>5</sup> </div> - with the highter-order terms computed only if the corresponding + with the higher-order terms computed only if the corresponding co-efficients a<sub><i>i</i></sub> are specified. </ul> Introduced in Standards Version 7. @@ -1030,7 +1030,7 @@ directives, the affixes to <b>/INCLUDE</b>, and the optional <i>enc-datum</i> token to <b>/ENCODING</b>. It permitted specification of integer literals in octal and hexadecimal. - Finally, it deprecated the type aliases <i>FLOAT</i> andr + Finally, it deprecated the type aliases <i>FLOAT</i> and <i>DOUBLE</i>. </td> </tr> Modified: trunk/html/download.html.in =================================================================== --- trunk/html/download.html.in 2012-07-04 23:53:37 UTC (rev 736) +++ trunk/html/download.html.in 2012-07-05 00:56:17 UTC (rev 737) @@ -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 April, 2011, is: + 4 July, 2012, is: <ul> <li><a - href="http://sourceforge.net/projects/getdata/files/getdata/0.7.3/" - >0.7.3</a>. Three packages are available: + href="http://sourceforge.net/projects/getdata/files/getdata/0.8.0/" + >0.8.0</a>. Three packages are available: <dl> - <dt><a href="http://sourceforge.net/projects/getdata/files/getdata/0.7.3/getdata-0.7.3.tar.bz2/download">getdata-0.7.3.tar.bz2</a>/<a href="http://sourceforge.net/projects/getdata/files/getdata/0.7.3/getdata-0.7.3.tar.gz/download">.gz</a>:</dt> + <dt><a href="http://sourceforge.net/projects/getdata/files/getdata/0.8.0/getdata-0.8.0.tar.bz2/download">getdata-0.8.0.tar.bz2</a>/<a href="http://sourceforge.net/projects/getdata/files/getdata/0.8.0/getdata-0.8.0.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.7.3/getdata_win-0.7.3.zip/download">getdata_win-0.7.3.zip</a>:</dt> + <dt><a href="http://sourceforge.net/projects/getdata/files/getdata/0.8.0/getdata_win-0.8.0.zip/download">getdata_win-0.8.0.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,7 +41,7 @@ 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.7.3/idl_getdata-0.7.3.tar.bz2/download">idl_getdata-0.7.3.tar.bz2</a>/<a href="http://sourceforge.net/projects/getdata/files/getdata/0.7.3/idl_getdata-0.7.3.tar.gz/download">.gz</a>:</dt> + <dt><a href="http://sourceforge.net/projects/getdata/files/getdata/0.8.0/idl_getdata-0.8.0.tar.bz2/download">idl_getdata-0.8.0.tar.bz2</a>/<a href="http://sourceforge.net/projects/getdata/files/getdata/0.8.0/idl_getdata-0.8.0.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, @@ -53,10 +53,11 @@ GetData may be <a href="http://sourceforge.net/projects/getdata/files/" >downloaded</a> from your local SourceForge mirror. - <p class="inset">GetData 0.7 supports Dirfile Standards Version Eight. - Highlights of Standards Version Eight include vector division and - reciprocal field types, and scalar arrays. This version is also the first - GetData version to be supported under MacOS X and Win32. + <p class="inset">GetData 0.8 supports Dirfile Standards Version Nine. + Highlights of Standards Version Nine include multiplex and windowing field + types, field name munging, aliasing, and hiding. This version is also the + first GetData version to support writing to gzip-compressed Dirfiles. (It + also provides Perl bindings for no good reason.) </p> <h2><a name="distro">Pre-Built Packages</a></h2> <p>GetData has been packaged for release on various Linux distributions, @@ -65,28 +66,23 @@ <dt>Debian:</dt> <dd>GetData is available in <a href="http://www.debian.org/">Debian</a> sid (unstable) and wheezy (testing). <i>NB:</i> In Debian, the GetData - Project is packaged as <code><a - href="http://packages.debian.org/search?searchon=sourcenames&keywords=libgetdata">libgetdata</a></code> - and should not be confused with the unrelated getData package. These - packages are maintained by Michael Milligan and S. J. Benton. + Project is packaged as <code><a href="http://packages.debian.org/search?searchon=sourcenames&keywords=libgetdata">libgetdata</a></code> + and should not be confused with the unrelated getData package.</dd> <dt>Fedora & Red Hat Enterprise Linux:</dt> <dd>GetData has been included in <a href="http://fedoraproject.org/">Fedora</a> since Fedora 8 and EPEL - since version 4. These packages are maintained by - <a href="http://matt.truch.net/">Matthew Truch</a>.</dd> + since version 4.</dd> <dt>OpenSUSE - <dd>GetData has been included in - <a href="http://opensuse.org/">openSUSE</a> since openSUSE 11.4. - These packages are maintained by Christian Trippe. + <dd>GetData has been included in <a + href="http://opensuse.org/">openSUSE</a> since openSUSE 11.4.</dd> <dt>Ubuntu:</dt> - <dd>Builds of GetData are available for - <a href="http://www.ubuntu.com/">Ubuntu</a> on Launchpad. For + <dd>Builds of GetData are available for <a + href="http://www.ubuntu.com/">Ubuntu</a> on Launchpad. For Ubuntu version 9.04 see the <a href="https://launchpad.net/~stevebenton/+archive/kst2-jaunty" >kst2-jaunty</a> PPA, and for later versions, the <a - href="https://launchpad.net/~stevebenton/+archive/kst2">kst2</a> PPA. - These packages are maintained by S. J. Benton. - </dd> + href="https://launchpad.net/~stevebenton/+archive/kst2">kst2</a> + PPA.</dd> </dl> <h2><a name="svn">Subversion</a></h2> <p>The GetData source code is housed in a Subversion repository. The @@ -131,26 +127,26 @@ <p>Older getdata releases available include the following: <ul> <li><a - href="http://sourceforge.net/projects/getdata/files/getdata/0.7.2/" - >0.7.2</a> + href="http://sourceforge.net/projects/getdata/files/getdata/0.7.3/" + >0.7.3</a>—<i>April 2011</i> <li><a href="http://sourceforge.net/projects/getdata/files/getdata/0.6.3/" - >0.6.3</a>—<a + >0.6.3</a>—<i>April 2010:</i> <a href="http://sourceforge.net/projects/getdata/files/getdata/0.6.3/RELEASE_NOTES-0.6.3/view" >Release Notes</a> <li><a href="http://sourceforge.net/projects/getdata/files/getdata/0.5.0/" - >0.5.0</a>—<a + >0.5.0</a>—<i>January 2009:</i> <a href="http://sourceforge.net/project/shownotes.php?release_id=654262" >Release Notes</a> <li><a href="http://sourceforge.net/projects/getdata/files/getdata/0.4.2/" - >0.4.2</a>—<a + >0.4.2</a>—<i>November 2008:</i><a href="http://sourceforge.net/project/shownotes.php?release_id=640554" >Release Notes</a> <li><a href="http://sourceforge.net/projects/getdata/files/getdata/0.3.1/" - >0.3.1</a>—<a + >0.3.1</a>—<i>September 2008:</i><a href="http://sourceforge.net/project/shownotes.php?release_id=628542" >Release Notes</a> </ul> @@ -158,12 +154,14 @@ GetData 0.3 only supports dirfiles up to and including Dirfile Standards Version Five. GetData 0.4 and 0.5 support dirfiles only up to and including Standards Version Six. GetData 0.6 supports dirfiles only up to - and including Standards Version Seven. + and including Standards Version Seven. GetData 0.7 supports dirfiles only + up to and including Standards Version Eight. <p class="inset">GetData 0.4 added the ability to add fields, support for the <a href="http://slimdata.sourceforge.net/">slim compression - scheme</a>. GetData 0.5 added support for gzip and bzip2 complession + scheme</a>. GetData 0.5 added support for gzip and bzip2 compression schemes, and added functionality for the manipulation of metadata. - GetData 0.6 added Python and IDL bindings. + GetData 0.6 added Python and IDL bindings. GetData 0.7 added MacOS X + and Microsoft Windows support. <p class="inset">GetData 0.5 and earlier are released under the terms of the <a href="COPYING.GPL">GNU General Public License</a>. Later releases are available under the <a href="#warranty">GNU Lesser General Public Modified: trunk/html/encoding.html.in =================================================================== --- trunk/html/encoding.html.in 2012-07-04 23:53:37 UTC (rev 736) +++ trunk/html/encoding.html.in 2012-07-05 00:56:17 UTC (rev 737) @@ -162,9 +162,9 @@ <h3><a name="lzma">LZMA Encoding</a></h3> <p>The <i>lzma encoding</i> compresses raw binary files using the - Lempel-Ziv Markov Chain Algrorithm (LZMA), implemented in the xz - container format, using the liblzma library, part of the - <a href="http://xztools.com/">XZ Utils</a> suite written by Lasse Collin, + Lempel-Ziv Markov Chain Algorithm (LZMA), implemented in the xz container + format, using the liblzma library, part of the <a + href="http://xztools.com/">XZ Utils</a> suite written by Lasse Collin, Ville Koskinen, and Igor Pavlov. GetData's lzma encoding framework currently lacks write capabilities; as a result, only <a href="getdata.html#gd_getdata"><span @@ -185,17 +185,17 @@ run. The sample number indicates the last sample in the uncompressed data which took the associated value. All operations are supported by the sample-index encoding. - <p>All runs, even those of lenth one, are replaced by such a record. As a - result, sample-index encoding only produces a reduction in the size of a + <p>All runs, even those of length one, are replaced by such a record. As + a result, sample-index encoding only produces a reduction in the size of a file when the data contain long stretches of identical values, in which case it provides significant access speed improvements over the more complex compression encodings. Specifically, given a <i>n</i>-sample long - data stream of <i>s</i>-byte values which change values <i>m</i> times, - sample-index encoding will reduce the size of the data on disk + data stream of <i>s</i>-byte-wide values which change values <i>m</i> + times, sample-index encoding will reduce the size of the data on disk compared to raw data only when <div class="inset"><img class="math" src="sie_compression.png" alt="m < n / (1 + 8/s) - 1" title="m < n / (1 + 8/s) - 1" - width="115" height="40">.</div> + width="138" height="35">.</div> The file extension of the sample-index encoding is <b>.sie</b>. <h3><a name="slim">Slim Encoding</a></h3> Modified: trunk/html/getdata.html.in =================================================================== --- trunk/html/getdata.html.in 2012-07-04 23:53:37 UTC (rev 736) +++ trunk/html/getdata.html.in 2012-07-05 00:56:17 UTC (rev 737) @@ -21,7 +21,7 @@ <h2><a name="prelim">Introduction</a></h2> <p>GetData is a C library. The APIs it provides are described below. In addition to this C library, <a href="#bindings">bindings</a> are - also provided to simplify using GetData in other programming languagues. + also provided to simplify using GetData in other programming languages. The library is designed to be robust, but does, at times, sacrifice exactness for speed. (Most notably <p>This page provides only a partial overview of the functionality of the @@ -67,14 +67,14 @@ <dd><p>An ANSI-C compliant API for use in situations where the C99 API is inappropriate. If GetData is built without a C99-compliant compiler, this will be the default API, and the <i>C99 API</i> will be absent. - But, even when GetData is built whith a C99-compliant compiler, this API + But, even when GetData is built with a C99-compliant compiler, this API is still available. The most obvious distinction compared to the <i>C99 API</i> is the lack of native complex data types, but other, subtler changes (described below) are also present, due to differences between ANSI-C and C99. For the most part, interchangeable with the <i>C99 API</i>. <dt><a href="#header64">The Largefile API</a></dt> - <dd><p>A number of funtions in the <i>C99</i> and <i>C89 APIs</i> use + <dd><p>A number of functions in the <i>C99</i> and <i>C89 APIs</i> use the POSIX standard type <span class="syntax keyword">off_t</span> when dealing with file offsets and sizes. On some systems, this is a 32-bit type, which has the effect of limiting file sizes to 2<sup>31</sup> @@ -247,7 +247,7 @@ support. Defining <span class="syntax preprocessor">GD_64BIT_API</span> before including <span class="syntax"><b>getdata.h</b></span> will define the 64-bit type <span class="syntax keyword">gd_off64_t</span>, as well as - declare additional funtions for this 64-bit type. If the platform + declare additional functions for this 64-bit type. If the platform provides <span class="syntax keyword">off64_t</span>, the GetData type will be simply that. <p>On platforms where <span class="syntax keyword">off_t</span> is 64-bits @@ -291,7 +291,7 @@ class="syntax"><b>--disable-legacy-api</b></span> to <span class="syntax">./configure</span>), <span class="syntax">getdata_legacy.h</span> will not be installed, and the - legacy API will never be declared, regarless of the state of <span + legacy API will never be declared, regardless of the state of <span class="syntax preprocessor">GD_NO_LEGACY_API</span>. <h2><a name="bindings">Language Bindings</a></h2> @@ -571,7 +571,7 @@ <p>After opening a dirfile flags which affect long-term operation may be modified by calling <div class="syntax"> - <span class="keyword">unigned int</span> + <span class="keyword">unsigned int</span> <span class="identifier">gd_flags</span><span class="operator">(</span><span class="keyword">DIRFILE</span> <span class="operator">*</span><span @@ -787,7 +787,7 @@ </tr> <tr> <td class="syntax">GD_E_BAD_REPR</td> - <td>An invalid <a href="dirfile.html#field_code">represenation + <td>An invalid <a href="dirfile.html#field_code">representation suffix</a> was passed to the library.</td> </tr> <tr> @@ -802,7 +802,7 @@ </tr> <tr> <td class="syntax">GD_E_BOUNDS</td> - <td>An attmept was made to read a <b>CARRAY</b> element past the + <td>An attempt was made to read a <b>CARRAY</b> element past the end of the field.</td> </tr> <tr> @@ -993,7 +993,7 @@ <div class="syntax"> <span class="keyword">DIRFILE</span> <span class="operator">*</span><span - class="identifier">gd_invaid_dirfile</span><span + class="identifier">gd_invaild_dirfile</span><span class="operator">(</span><span class="keyword">void</span><span class="operator">);</span> </div> @@ -1342,7 +1342,7 @@ <h3><a name="gd_mcarrays">gd_mcarrays()</a><span class="manlink"><a href="man/gd_mcarrays.3.html">man page</a></span></h3> <p>The value of <i>all</i> <b>CARRAY</b> metafields for a given parent - fieldmay be fetched from the dirfile with + field may be fetched from the dirfile with <div class="syntax"> <span class="keyword">const gd_carray_t</span> <span class="operator">*</span><span @@ -1664,7 +1664,7 @@ The <span class="syntax indentifier">flags</span> parameter should be one of <span class="syntax literal">GD_SEEK_SET</span>, <span class="syntax literal">GD_SEEK_CUR</span>, or <span class="syntax - literal">GD_SEEK_END</span>, indicating that the supllied offset is + literal">GD_SEEK_END</span>, indicating that the supplied offset is relative to the beginning of the field, the current position, or the end of the field, respectively. This should further be bitwise or'd with <span class="syntax literal">GD_SEEK_WRITE</span>, if the next operation @@ -1866,7 +1866,7 @@ class="syntax">gd_nfragments()</span></a>. On error, this function returns −1. - <h3><a name="gd_rfragment_affixes">gd_fragment_affixes()</a> + <h3><a name="gd_fragment_affixes">gd_fragment_affixes()</a> <span class="manlink"><a href="man/gd_fragment_affixes.3.html">man page</a></span></h3> The field name prefix and suffix associated with a fragment may be @@ -1891,8 +1891,8 @@ returned in <span class="syntax operator">*</span><span class="syntax identifier">prefix</span> and <span class="syntax operator">*</span><span class="syntax identifier">suffix</span>. They - should be free(3)'d by the caller. This function zero iff successful, or - −1 on error. + should be free(3)'d by the caller. This function returns zero if + successful, or −1 on error. <h3><a name="gd_raw_filename">gd_raw_filename()</a> <span class="manlink"><a @@ -2124,7 +2124,7 @@ <td class="syntax">cdividend<br> <span class="c89 syntax">u.recip.cdividend[2]</span></td> <td colspan="2" rowspan="2">RECIP</td> - <td rowspan="2">Dividend (a multiplicitave factor). + <td rowspan="2">Dividend (a multiplicative factor). The <span class="syntax">dividend</span> member contains only the real part of <span class="syntax">cdividend</span>.</td> </tr> @@ -2180,7 +2180,7 @@ href="dfes">gd_free_entry_strings()</a></span>. Variables of type <span class="keyword">gd_type_t</span> represent data types, and will be one of the symbols listed in <a href="#data">Table 5</a>. Members - for different field types may occupy the same phyical memory. + for different field types may occupy the same physical memory. <p><a name="entrytype"></a>The field type stored in the <span class="syntax">field_type</span> member of the <span class="keyword">gd_entry_t</span> will be one of the following symbols: @@ -2425,7 +2425,7 @@ <span class="operator">*</span><span class="identifier">field_code</span><span class="operator">);</span> </div> - If successful, the list alwways contains at least <span class="syntax + If successful, the list always contains at least <span class="syntax identifier">field_code</span>. On error <span class="syntax literal">NULL</span> is returned. @@ -2672,7 +2672,7 @@ <span class="identifier">flags</span><span class="operator">);</span> </div> If <span class="syntax identifier">parent</span> is <span class="syntax - literal">NULL</span>, top-level fields are luisted. The <span + literal">NULL</span>, top-level fields are listed. The <span class="syntax identifier">type</span> parameter should be a valid <a href="#entrytype">entry type</a>, or else one of the symbols listed in <a href="#gd_nentries">Table 8 above</a>. The <span class="syntax @@ -4940,7 +4940,7 @@ index, the operation proceeds one fragment at a time, aborting early in the case of error. As a result, at most one fragment will ever be unclean (the ones before the unclean fragment will have been successfully - modified, the one's after will be still in their unmodifed state). + modified, the ones after will be still in their unmodified state). <h3><a name="mitigation">Mitigation</a></h3> <p>Once <span class="syntax">GD_E_UNCLEAN_DB</span> is encountered by an @@ -4988,7 +4988,7 @@ class="syntax"><field_name>_<i>XXXXXX</i></span></b> where the <b><span class="syntax"><i>XXXXXX</i></span></b> represents an arbitrary set of six characters. In this case there should also be a - file with the propper binary file name, ie. <b><span + file with the proper binary file name, ie. <b><span class="syntax"><field_name></span></b>, possibly appended with an encoding extension. <dt><strong>Class B</strong> @@ -5007,7 +5007,7 @@ class="syntax">GD_E_UNCLEAN_DB</span> was returned by a function other than <span class="syntax"><a href="#gd_alter_encoding" >gd_alter_encoding()</a></span>), the field should be cleaned by - simply moving the temporary file over top of the exising binary file with + simply moving the temporary file over top of the existing binary file with the correct name. <p>If the encoding was changed (ie. <span @@ -5031,7 +5031,7 @@ <p>If the data returned appear corrupted, it is possible that the old data file was not deleted; recheck the dirfile. If an I/O error - occurrs, it is possible that the replacement file has an incorrect + occurs, it is possible that the replacement file has an incorrect name or permissions; again, recheck the dirfile. <div class="foot"><div class="copy">© 2008, 2009, 2010, 2011 D. V. Modified: trunk/html/index.html.in =================================================================== --- trunk/html/index.html.in 2012-07-04 23:53:37 UTC (rev 736) +++ trunk/html/index.html.in 2012-07-05 00:56:17 UTC (rev 737) @@ -58,9 +58,9 @@ <h2><a name="download">Get GetData</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 April, 2011, is <a - href="http://sourceforge.net/projects/getdata/files/getdata/0.7.3/" - >0.7.3</a>; see: + 4 July, 2012, is <a + href="http://sourceforge.net/projects/getdata/files/getdata/0.8.0/" + >0.8.0</a>; see: <ul><li><a href="download.html">Get GetData</a></ul> <h2><a name="documentation">Documentation</a></h2> Modified: trunk/html/sie_compression.png =================================================================== (Binary files differ) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ket...@us...> - 2012-07-04 23:53:47
|
Revision: 736 http://getdata.svn.sourceforge.net/getdata/?rev=736&view=rev Author: ketiltrout Date: 2012-07-04 23:53:37 +0000 (Wed, 04 Jul 2012) Log Message: ----------- Merge CONST and CARRAY handling. Doc updates. Modified Paths: -------------- trunk/getdata/ChangeLog trunk/getdata/NEWS trunk/getdata/README trunk/getdata/README.win trunk/getdata/RELEASE_NOTES.in trunk/getdata/man/Makefile.am trunk/getdata/man/gd_carray_len.3 trunk/getdata/man/gd_get_carray_slice.3 trunk/getdata/man/gd_put_carray_slice.3 trunk/getdata/src/constant.c Removed Paths: ------------- trunk/getdata/man/gd_get_constant.3 trunk/getdata/man/gd_put_constant.3 Modified: trunk/getdata/ChangeLog =================================================================== --- trunk/getdata/ChangeLog 2012-07-04 02:39:25 UTC (rev 735) +++ trunk/getdata/ChangeLog 2012-07-04 23:53:37 UTC (rev 736) @@ -1,3 +1,9 @@ +2012-06-30 D. V. Wiebe <ge...@ke...> svn:734 + * 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. Modified: trunk/getdata/NEWS =================================================================== --- trunk/getdata/NEWS 2012-07-04 02:39:25 UTC (rev 735) +++ trunk/getdata/NEWS 2012-07-04 23:53:37 UTC (rev 736) @@ -2,277 +2,287 @@ Dirfile Changes - * Dirfile Standards Version 9 has been released. It adds two new field types: - MPLEX, which allows multiplexing multiple low-rate channels in one high-rate - one, and WINDOW, which extracts a portion of a field based on the value of - a second field. More changes are listed below. + * Dirfile Standards Version 9 has been released. It adds two new field + types: MPLEX, which allows multiplexing multiple low-rate channels in + one high-rate one, and WINDOW, which extracts a portion of a field + based on the value of a second field. More changes are listed below. - * Alternate field names may be defined using the /ALIAS directive. Aliases - can't be used as a parent when defining metafields, but are otherwise - indistinguishable from a field's original ("canonical") name. + * Alternate field names may be defined using the /ALIAS directive. + Aliases can't be used as a parent when defining metafields, but are + otherwise indistinguishable from a field's original ("canonical") name. - * The /VERSION directive now has fragment scope, which should alleviate some - of the problems associated with "version leakage" found in previous - versions. Previous versions are unchanged, but a "/VERSION 9" directive - will not propagate back up into a parent fragment, nor will any /VERSION - directive be propagated back up into a Version 9 fragment. + * The /VERSION directive now has fragment scope, which should alleviate + some of the problems associated with "version leakage" found in + previous versions. Previous versions are unchanged, but a "/VERSION 9" + directive will not propagate back up into a parent fragment, nor will + any /VERSION directive be propagated back up into a Version 9 fragment. - * Fields may be "hidden" using the /HIDDEN directive. The Standards don't say - what a "hidden" field does, but GetData will, by default, exclude them from - the count and list functions. + * Fields may be "hidden" using the /HIDDEN directive. The Standards + don't say what a "hidden" field does, but GetData will, by default, + exclude them from the count and list functions. - * Literal integers in the format may now be specified in octal (using 0####) - or hexidecimal (using 0x##### or 0X#####) in addition to decimal. + * Literal integers in the format may now be specified in octal (using + 0####) or hexidecimal (using 0x##### or 0X#####) in addition to + decimal. - * Effects of the /VERSION directive no longer propagate upwards to parent - fragments. This makes subdirfile encapsulation easier and fixes the - "Version Leak" problem reported with earlier Standards. The effect of this - is twofold: "/VERSION 9" never propagates upwards, but neither do the - Versions specified in subfragments included in a Version 9 fragment (even if - they are earlier Versions). + * The /INCLUDE directive can take two additional, optional parameters + which specify a prefix and/or suffix used to modify the entry names of + the fields defined in the included fragment. (The intent of this is to + permit the inclusion of multiple subdirfiles which define the same set + of fields, by modifying their field names.) - * The /INCLUDE directive can take two additional, optional parameters which - specify a prefix and/or suffix used to modify the entry names of the fields - defined in the included fragment. (The intent of this is to permit the - inclusion of multiple subdirfiles which define the same set of fields, by - modifying their field names.) + * Three new encoding schemes are available. The first is the Sample- + Index Encoding (SIE), similar to run-length encoding, useful for + compressing data which changes very rarely varying data. Like the + ASCII encoding, GetData implements it internally, so it's always + available. The other two schemes (zzip and zzslim) are based around + the ZZip library, an access library for PKWARE ZIP files. These are + unusual in that they store all raw data in the same ZIP archive. - * Three new encoding schemes are available. The first is the Sample-Index - Encoding (SIE), similar to run-length encoding, useful for compressing data - which changes very rarely varying data. Like the ASCII encoding, GetData - implements it internally, so it's always available. The other two schemes - (zzip and zzslim) are based around the ZZip library, an access library for - PKWARE ZIP files. These are unusual in that they store all raw data in the - same ZIP archive. + * The /ENCODING directive takes an optional second token. The zzip and + zzslim encoding schemes optionally use this token to specify the name + of the combined ZIP archive. - * The /ENCODING directive takes an optional second token. The zzip and zzslim - encoding schemes optionally use this token to specify the name of the - combined ZIP archive. + * The data type names FLOAT (an alias for FLOAT32) and DOUBLE (an alias + for FLOAT64) have been deprecated. - * The data type names FLOAT (an alias for FLOAT32) and DOUBLE (an alias for - FLOAT64) have been deprecated. - Library Changes: - * On POSIX systems, GetData now caches the dirfile directory (and any other - necessary subdirectories). This guards against third-parties renaming the - directory while GetData is interested in it. + * On POSIX systems, GetData now caches the dirfile directory (and any + other necessary subdirectories). This guards against third-parties + renaming the directory while GetData is interested in it. - * GetData is, in general, more careful about pathname management. At least - on POSIX systems, it will now try to canonicalise all paths it comes across, - including resolving symlinks. As a result, GetData no longer becomes - befuddled by a caller who opens a Dirfile with a relative pathname and then - calls chdir(2). Functions like gd_fragmentname() and gd_raw_filename() now - return canonicalised paths. + * GetData is, in general, more careful about pathname management. At + least on POSIX systems, it will now try to canonicalise all paths it + comes across, including resolving symlinks. As a result, GetData no + longer becomes befuddled by a caller who opens a Dirfile with a + relative pathname and then calls chdir(2). Functions like + gd_fragmentname() and gd_raw_filename() now return canonicalised paths. * The library no longer forces a sync of all raw data on close. The sync - causes a flush of filesystem buffers, which is usually unnecessary overhead, - and degredatious to efficient disk I/O. Use an explicit gd_sync() or - gd_flush() before closing to recover the old behaviour, if desired. + causes a flush of filesystem buffers, which is usually unnecessary + overhead, and degredatious to efficient disk I/O. Use an explicit + gd_sync() or gd_flush() before closing to recover the old behaviour, if + desired. * The error messages output by GetData with GD_VERBOSE turned on now has - "libgetdata: " prefixed to it. A further prefix may be specified by the - caller. + "libgetdata: " prefixed to it. A further prefix may be specified by + the caller. - * When truncating a dirfile, the primary format file is no longer deleted and - then recreated. Instead, it is simply truncated in-place. This change - means that a Dirfile which is undergoing truncation always appears (to - GetData, at least) to be a valid Dirfile, which can be useful if it is being - concurrently read. + * When truncating a dirfile, the primary format file is no longer deleted + and then recreated. Instead, it is simply truncated in-place. This + change means that a Dirfile which is undergoing truncation always + appears (to GetData, at least) to be a valid Dirfile, which can be + useful if it is being concurrently read. - * Write support for gzip-encoded data has been added. Writes occur out of - place, which means sufficient space on the filesystem is needed for a second - copy of every field being written. Writing to a gzip compressed field - requires uncompressing the portion of the field before the write of the - existing file, recompressing it to the temporary file, then writing the new - data to the temporary file. A subsequent write at a later position, will - continue to write to the compressed file, but a subsequent write to an - earlier position requires coping all remaining data from the old file to the - temporary file, finalising it, moving it over top of the old file, and then - starting afresh with a new temporary file. As a result, it's not very fast, - and likely should be avoided for non-sequential writes. + * Write support for gzip-encoded data has been added. Writes occur out + of place, which means sufficient space on the filesystem is needed for + a second copy of every field being written. Writing to a gzip + compressed field requires uncompressing the portion of the field before + the write of the existing file, recompressing it to the temporary file, + then writing the new data to the temporary file. A subsequent write at + a later position, will continue to write to the compressed file, but a + subsequent write to an earlier position requires coping all remaining + data from the old file to the temporary file, finalising it, moving it + over top of the old file, and then starting afresh with a new temporary + file. As a result, it's not very fast, and likely should be avoided + for non-sequential writes. - * Raw data files are now only opened for writing if writing is going to occur. - In particular, this means that opening a dirfile with GD_RDWR will still - work even if you don't have write access to it, so long as you don't try - writing to it. + * Raw data files are now only opened for writing if writing is going to + occur. In particular, this means that opening a dirfile with GD_RDWR + will still work even if you don't have write access to it, so long as + you don't try writing to it. - * GetData now tracks a "current location" for all RAW files, and allows reads - and writes to occur at the "current location" (via the special symbol - GD_HERE). For some derived fields the idea of a "current location" doesn't - make sense, and won't work. + * GetData now tracks a "current location" for all RAW files, and allows + reads and writes to occur at the "current location" (via the special + symbol GD_HERE). For some derived fields the idea of a "current + location" doesn't make sense, and this won't work. - * BUG FIX: In previous versions, renaming a field with gd_rename() wouldn't - update or invalidate the cache of fields which depended on the old name, - leading to surprising results. It will now either invalidate these fields' - metadata caches or else change the name in those definitions as well. + * BUG FIX: In previous versions, renaming a field with gd_rename() + wouldn't update or invalidate the cache of fields which depended on the + old name, leading to surprising results. It will now either invalidate + these fields' metadata caches or else change the name in those + definitions as well. * BUG FIX: The invalid syntax "/META parent/child granchild ..." is now - properly rejected by the parser. Previously it half-worked, resulting in - a segfault in gd_close(). + properly rejected by the parser. Previously it half-worked, resulting + in a segfault in gd_close(). * BUG FIX: Several syntax errors encountered in PHASE and RECIP field - specifications weren't being reported by the parser, leading to corrupted - metadata on open. + specifications weren't being reported by the parser, leading to + corrupted metadata on open. - * BUG FIX: GetData no longer omits the input field to a RECIP when writing - metadata to disk. Nor does it forget to put newlines after RECIP or DIVIDE - field specifications. + * BUG FIX: GetData no longer omits the input field to a RECIP when + writing metadata to disk. Nor does it forget to put newlines after + RECIP or DIVIDE field specifications. - * BUG FIX: GetData no longer assumes all LINCOM input fields have the same - number of samples per frame. + * BUG FIX: GetData no longer assumes all LINCOM input fields have the + same number of samples per frame. - * BUG FIX: Writing an empty fragment with GD_PRETTY_PRINT turned on no longer - results in a floating-point exception. + * BUG FIX: Writing an empty fragment with GD_PRETTY_PRINT turned on no + longer results in a floating-point exception. - * BUG FIX: Renaming a field now properly flags the fragment which contains it - as dirty, which will ensure the rename is writen to disk when the metadata - are next flushed. + * BUG FIX: Renaming a field now properly flags the fragment which + contains it as dirty, which will ensure the rename is writen to disk + when the metadata are next flushed. - * BUG FIX: Whitespace within tokens is now properly escaped when metadata is - flushed to disk. + * BUG FIX: Whitespace within tokens is now properly escaped when metadata + is flushed to disk. * BUG FIX: The parser no longer gets tripped up by two character escape sequences in a row, nor by an escape sequence at the start of a token. - * BUG FIX: "/PROTECT data" directives are now being written when they should - be. Previously, they were dropped completely. Reported by Alexandra - Rahlin. + * BUG FIX: "/PROTECT data" directives are now being written when they + should be. Previously, they were dropped completely. Reported by + Alexandra Rahlin. - * BUG FIX: CARRAY indices provided to gd_add() in the entry.scalar_ind member - are no longer ignored. Reported by S. J. Benton. + * BUG FIX: CARRAY indices provided to gd_add() in the entry.scalar_ind + member are no longer ignored. Reported by S. J. Benton. - * BUG FIX: When adding a metafield with gd_(m)add(), GetData no longer checks - the protection of the fragment indexed by entry->fragment_index. Instead it - ignores entry->fragment_index completely (as the documentation indicates it - should) and checks the protection of the fragment containing the parent - field. + * BUG FIX: When adding a metafield with gd_(m)add(), GetData no longer + checks the protection of the fragment indexed by entry->fragment_index. + Instead it ignores entry->fragment_index completely (as the + documentation indicates it should) and checks the protection of the + fragment containing the parent field. API Changes: - * Functions which add fields (gd_add(), gd_add_<type>(), &c.) can now be used - to add metafields by using their full "parent/name" field code. The old, - explicit metafield adding routines (gd_madd(), &c.) are still available. + * Functions which add fields (gd_add(), gd_add_<type>(), &c.) can now be + used to add metafields by using their full "parent/name" field code. + The old, explicit metafield adding routines (gd_madd(), &c.) are still + available. - * As with their corresponding names in the Standards, the gd_type_t symbols - GD_FLOAT and GD_DOUBLE are now deprecated. Use GD_FLOAT32 and GD_FLOAT64 as - appropriate. + * As with their corresponding names in the Standards, the gd_type_t + symbols GD_FLOAT and GD_DOUBLE are now deprecated. Use GD_FLOAT32 and + GD_FLOAT64 as appropriate. * A new open flag, GD_TRUNCSUB, will cause GD_TRUNC to descend into - subdirectories of a directory it is truncating. If not specified along with - GD_TRUNC, it does nothing. + subdirectories of a directory it is truncating. If not specified along + with GD_TRUNC, it does nothing. - * New public functions gd_nentries() and gd_entry_list() provide a generic - interface to the field counting and list functionality. The other functions - (gd_nfields(), gd_nfields_by_type(), &c. and gd_field_list(), - gd_field_list_by_type(), &c. are now simply special cases of these two - functions. + * New public functions gd_nentries() and gd_entry_list() provide a + generic interface to the field counting and list functionality. The + other functions (gd_nfields(), gd_nfields_by_type(), &c. and + gd_field_list(), gd_field_list_by_type(), &c.) are now simply special + cases of these two functions. - * The "hiddenness" of a field name may be queried with gd_hidden(), set with - gd_hide() and cleared with gd_unhide(). + * The "hiddenness" of a field name may be queried with gd_hidden(), set + with gd_hide() and cleared with gd_unhide(). * /INCLUDE affixes may be queried with gd_fragment_affixes() and added, - modified or deleted with gd_alter_affixes(). A new fragment can be added to - the dirfile with affixes using gd_include_affix(). + modified or deleted with gd_alter_affixes(). A new fragment can be + added to the dirfile with affixes using gd_include_affix(). - * New aliases may be added with gd_add_alias() or gd_madd_alais. The target - of an alias is retrned by gd_alias_target(); a list of aliases of a field, - or their number, is returned by gd_aliases() and gd_naliases(). + * New aliases may be added with gd_add_alias() or gd_madd_alais. The + target of an alias is retrned by gd_alias_target(); a list of aliases + of a field, or their number, is returned by gd_aliases() and + gd_naliases(). * Because GetData considers aliases and canonical names to be - indistinguishable, passing an alias name to most functions will result in - the function operating on target field. To manipulate aliases themselves, - the API has the new interfaces gd_move_alias() and gd_delete_alias(). + indistinguishable, passing an alias name to most functions will result + in the function operating on target field. To manipulate aliases + themselves, the API has the new interfaces gd_move_alias() and + gd_delete_alias(). * In addition to the special symbol GD_HERE which may be passed to gd_getdata() and gd_putdata(), the "current location" of fields may be queried with gd_tell() and moved with gd_seek(). - * The typedefs gd_bit_t and gd_spf_t have been deprecated. They are replaced - with 'int' and 'unsigned int' respectively. For backwards compatibility, - the typedefs (with their new types) are still declared in getdata.h, but the - API no longer makes use of them. + * The typedefs gd_bit_t and gd_spf_t have been deprecated. They are + replaced with 'int' and 'unsigned int' respectively. For backwards + compatibility, the typedefs (with their new types) are still declared + in getdata.h, but the API no longer makes use of them. - * GetData's tokeniser has been exposed to the public API via the gd_strtok() - function, which works similar to strtok(3), and returns successive tokens of - a string given it. + * GetData's tokeniser has been exposed to the public API via the + gd_strtok() function, which works similar to strtok(3), and returns + successive tokens of a string given it. * A new function gd_error_count() returns the number of GetData errors - encountered on a Dirfile since it was last called (or since the Dirfile was - opened). This is useful for programs that care whether *something* failed, - but don't really care what it was. + encountered on a Dirfile since it was last called (or since the Dirfile + was opened). This is useful for programs that care whether *something* + failed, but don't really care what it was. - * Reading MPLEX fields can result in inefficiencies due to GetData having to - look backwards for the first value of the part of the derived field - requested. A new function, gd_mplex_lookback(), can be used to alter how - much lookback is done, if any. + * Reading MPLEX fields can result in inefficiencies due to GetData having + to look backwards for the first value of the part of the derived field + requested. A new function, gd_mplex_lookback(), can be used to alter + how much lookback is done, if any. - * The "move_data" flag in gd_rename() has been replaced with a generic "flags" - parameter. Two rename flags are defined: GD_REN_DATA, which recovers the - old behaviour of move_data, and GD_REN_UBDB which will cause references to - the renamed field to be renamed also in derived fields which refer to it. - Without GD_REN_UBDB, these definitions are left unchagned. + * The "move_data" flag in gd_rename() has been replaced with a generic + "flags" parameter. Two rename flags are defined: GD_REN_DATA, which + recovers the old behaviour of move_data, and GD_REN_UBDB which will + cause references to the renamed field to be renamed also in derived + fields which refer to it. Without GD_REN_UBDB, these definitions are + left unchagned. - * Flags which affect the long-term operation of GetData may be modified after - open using gd_flags(). Currently these flags are just GD_VERBOSE and - GD_PRETTY_PRTNT. + * Flags which affect the long-term operation of GetData may be modified + after open using gd_flags(). Currently these flags are just GD_VERBOSE + and GD_PRETTY_PRTNT. - * The gd_flush() function, which both syncs and closes RAW files, has been - broken up into its two parts with two new functions: gd_sync(), which just - syncs and gd_raw_close(), which just closes. gd_flush() still does both. + * The gd_flush() function, which both syncs and closes RAW files, has + been broken up into its two parts with two new functions: gd_sync(), + which just syncs and gd_raw_close(), which just closes. gd_flush() + still does both. - * Using the new gd_desync() function will cause GetData to determine whether - the Dirfile metadata on disk has changed since the Dirfile was opened. + * Using the new gd_desync() function will cause GetData to determine + whether the Dirfile metadata on disk has changed since the Dirfile was + opened. - * A prefix to the automatic error messages printed by GetData when using the - GD_VERBOSE flag may be specified with gd_verbose_prefix(). + * A prefix to the automatic error messages printed by GetData when using + the GD_VERBOSE flag may be specified with gd_verbose_prefix(). - * When requesting the exclusive creation of a new dirfile with (GD_CREAT | - GD_EXCL) GetData will now return the new error GD_E_EXISTS if the dirfile - already exists. Previously it would return GD_E_CREAT in this situation. + * When requesting the exclusive creation of a new dirfile with (GD_CREAT + | GD_EXCL) GetData will now return the new error GD_E_EXISTS if the + dirfile already exists. Previously it would return GD_E_CREAT in this + situation. * The error codes GD_E_BAD_ENDIANNESS, GD_E_BAD_PROTECTION, and GD_E_BAD_VERSION have been combined into a more generic error code: - GD_E_ARGUMENT. The old symbols are retained for backwards compatibility but - have been marked deprecated. + GD_E_ARGUMENT. The old symbols are retained for backwards + compatibility but have been marked deprecated. - * C89 API: Passing NULL to gd_alter_crecip() for cdividend is now treated as - if it were passed zero (ie. it indicates no change for cdividend). + * CONST and CARRAY handling has been combined somewhat. When passed to + {get,put}_carray[_slice]() or gd_carray_len(), CONSTs behave like + length-one CARRAYs. Similarly, {get,put}_constant() will operate on + the first element of a CARRAY, as if it were a CONST field. - * BUG FIX: calling gd_putdata() with num_frames and num_samples both zero no - longer confuses GetData: instead it simply does nothing. + * C89 API: Passing NULL to gd_alter_crecip() for cdividend is now treated + as if it were passed zero (ie. it indicates no change for cdividend). + * BUG FIX: calling gd_putdata() with num_frames and num_samples both zero + no longer confuses GetData: instead it simply does nothing. + * BUG FIX: gd_spf() now returns GD_E_DIMENSION when passed a scalar field code, as the documentation says it should. Previously it returned GD_E_BAD_FIELD_TYPE. Legacy API Changes: - * The never-used n_mplex/mplexEntries part of the FormatType now has a use: - both MPLEX and WINDOW entries are reported there. + * The never-used n_mplex/mplexEntries part of the FormatType now has a + use: both MPLEX and WINDOW entries are reported there. Bindings Changes: - * Bindings for Perl5 have been added. Perl is not well suited to numerical - analysis, and the bindings may be inefficient. + * Bindings for Perl5 have been added. Perl is not well suited to + numerical analysis, and the bindings may be inefficient. - * F77: Due to small namespace issues, the encoding parameters (corresponding - to the GD_...ENCODED symbols in the C API) have all been renamed. They - are now of the form GDE_xx. + * F77: Due to small namespace issues, the encoding parameters + (corresponding to the GD_...ENCODED symbols in the C API) have all been + renamed. They are now of the form GDE_xx. * C++: The bindings now make use of the explicitly-64-bit offset type - gd_off64_t defined in getdata.h. Previously, the bindings tried to force - off_t to be 64-bit through preprocessor shenanigans, which led, in certain - cases, to linking problems down the road when used by third parties. + gd_off64_t defined in getdata.h. Previously, the bindings tried to + force off_t to be 64-bit through preprocessor shenanigans, which led, + in certain cases, to linking problems down the road when used by third + parties. * Python: The return_type, num_fields, and num_samples parameters to dirfile.getdata() are now optional. The return_type defautls to - pygetdata.FLOAT, and if neither num_fields nor num_samples are given, all - frames (ie. the value of dirfile.nframes) are returned. + pygetdata.FLOAT, and if neither num_fields nor num_samples are given, + all frames (ie. the value of dirfile.nframes) are returned. * IDL: A number of undocumented, unnecessary function aliases have been - removed. They should be replaced with their canonical names, without change - in use: + removed. They should be replaced with their canonical names, without + change in use: Alias Replacement ---------------------- ---------------- @@ -310,11 +320,12 @@ GD_NMFIELDS_BY_TYPE GD_NENTRIES GD_NMVECTORS GD_NVECTORS - * BUG FIX: All bindings now provide a named constant corresponding to the C - API error GD_E_UNKNOWN_ENCODING, which was overlooked in previous releases. + * BUG FIX: All bindings now provide a named constant corresponding to the + C API error GD_E_UNKNOWN_ENCODING, which was overlooked in previous + releases. - * IDL BUG FIX: The missing /IGNORE_REFS and /PRETTY_PRINT are now available in - gd_open. + * IDL BUG FIX: The missing /IGNORE_REFS and /PRETTY_PRINT are now + available in gd_open. |==============================================================================| Modified: trunk/getdata/README =================================================================== --- trunk/getdata/README 2012-07-04 02:39:25 UTC (rev 735) +++ trunk/getdata/README 2012-07-04 23:53:37 UTC (rev 736) @@ -67,25 +67,22 @@ file called `NEWS'. -DIRFILE STANDARDS VERSION 8 +DIRFILE STANDARDS VERSION 9 =========================== -The 0.7.0 release of the GetData Library (October 2010), was released in -conjunction with a new version of the Dirfile Standards, known as Standards -Version 8. +The 0.8.0 release of the GetData Library (July 2012) is the first release to +provide suuport the latest version of the Dirfile Standards, known as Standards +Version 9. -Standards Version 8 introduces the following: - * Two new field types: DIVIDE, the quotient of two input vector fields, - and RECIP, the reciprocal of a vector field. - * Support for middle-endian ARM double-precision floating point data. - * Furthermore, several deprecated features have been removed. The old single - character type names are no longer accepted, and directives now require an - initial forward slash. (NB: these features are only removed from Standards - Version 8; GetData, which understands all Standards Versions, still can work - with these features.) +Standards Version 9 introduces the following: + * Two new field types: MPLEX and WINDOW, both meant to deal with extracting a + subset of their input. + * Field name munging via /INCLUDEs, aliases, and "hidden" names. + * Support for zzip-compressed dirfiles, as well as simple compression via an + in-built scheme called Sample Index Encoding. -This is the first update to the Dirfile Standards since Standards Version 7 -(October 2009). A full history of the Dirfile Standards can be found in the +This is the first update to the Dirfile Standards since Standards Version 8 +(November 2010). A full history of the Dirfile Standards can be found in the dirfile-format(5) man page. @@ -132,9 +129,10 @@ - the slim compression library by Joseph Fowler; - the zlib library by Jean-loup Gailly and Mark Adler; -- the bzip2 compression library by Julian Seward; and, +- the bzip2 compression library by Julian Seward; - the lzma library, part of the XZ Utils suite by Lasse Collin, Ville Koskinen, - and Igor Pavlov. + and Igor Pavlov; and, +- the zzip library by Tomi Ollila and Guido Draheim. If these libraries are not found by configure, GetData will lack support for the associated encoding scheme and fail gracefully if encountering dirfiles so @@ -145,10 +143,10 @@ ================= To use the library in C programs, the header file getdata.h should be included. -This file declares both the new and legacy APIs. Programs linking to static -versions of the GetData library need to be linked against the C Standard Math -Library, in addition to GetData itself, plus any other libraries required for -encodings supported by the library, e.g. using `-lgetdata -lm +This file declares all the various APIs provided by th library. Programs +linking to static versions of the GetData library need to be linked against the +C Standard Math Library, in addition to GetData itself, plus any other libraries +required for encodings supported by the library, e.g. using `-lgetdata -lm <other-libraries>'. The various small programs in the `util' subdirectory of the package provide Modified: trunk/getdata/README.win =================================================================== --- trunk/getdata/README.win 2012-07-04 02:39:25 UTC (rev 735) +++ trunk/getdata/README.win 2012-07-04 23:53:37 UTC (rev 736) @@ -63,26 +63,22 @@ http://getdata.sourceforge.net/ - -DIRFILE STANDARDS VERSION 8 +DIRFILE STANDARDS VERSION 9 =========================== -The 0.7.0 release of the GetData Library (October 2010), was released in -conjunction with a new version of the Dirfile Standards, known as Standards -Version 8. +The 0.8.0 release of the GetData Library (July 2012) is the first release to +provide suuport the latest version of the Dirfile Standards, known as Standards +Version 9. -Standards Version 8 introduces the following: - * Two new field types: DIVIDE, the quotient of two input vector fields, - and RECIP, the reciprocal of a vector field. - * Support for middle-endian ARM double-precision floating point data. - * Furthermore, several deprecated features have been removed. The old single - character type names are no longer accepted, and directives now require an - initial forward slash. (NB: these features are only removed from Standards - Version 8; GetData, which understands all Standards Versions, still can work - with these features.) +Standards Version 9 introduces the following: + * Two new field types: MPLEX and WINDOW, both meant to deal with extracting a + subset of their input. + * Field name munging via /INCLUDEs, aliases, and "hidden" names. + * Support for zzip-compressed dirfiles, as well as simple compression via an + in-built scheme called Sample Index Encoding. -This is the first update to the Dirfile Standards since Standards Version 7 -(October 2009). A full history of the Dirfile Standards can be found in the +This is the first update to the Dirfile Standards since Standards Version 8 +(November 2010). A full history of the Dirfile Standards can be found in the dirfile-format(5) man page. @@ -139,9 +135,10 @@ - the slim compression library by Joseph Fowler; - the zlib library by Jean-loup Gailly and Mark Adler; -- the bzip2 compression library by Julian Seward; and, +- the bzip2 compression library by Julian Seward; - the lzma library, part of the XZ Utils suite by Lasse Collin, Ville Koskinen, - and Igor Pavlov. + and Igor Pavlov; and, +- the zzip library by Tomi Ollila and Guido Draheim. If these libraries are not found by configure, GetData will lack support for the associated encoding scheme and fail gracefully if encountering dirfiles so Modified: trunk/getdata/RELEASE_NOTES.in =================================================================== --- trunk/getdata/RELEASE_NOTES.in 2012-07-04 02:39:25 UTC (rev 735) +++ trunk/getdata/RELEASE_NOTES.in 2012-07-04 23:53:37 UTC (rev 736) @@ -1,9 +1,8 @@ -GetData 0.7.2 is known to compile and pass the test suite on the following +GetData 0.8.0 is known to compile and pass the test suite on the following systems (including C++ and Fortran bindings): Linux: -* x86, x86_64, PPC, S390, SPARC, ARM under (variously) Debian, Slackware, - Fedora, Ubuntu, CentOS +* x86, x86_64, ARM under (variously) Debian, Slackware, Ubuntu MacOS X: * x86 and x86_64, using Xcode 3.2/gcc 4.2, under MacOS X Snow Leopard Cygwin: @@ -11,30 +10,36 @@ Win32: * x86_64, using mingw/gcc 4.5, under MSys * X86_64, using MSVC 10 +OpenBSD: +* x86, using gcc 4.2 The Python bindings have been tested with Python 2.4 through Python 2.7. The IDL bindings have been tested with IDL 6.0, IDL 7.1. -------------------------------------------------------------------------------- +The Perl bindings have been tested with Perl 5.8 through Perl 5.12. +--------------------------------------------------------------------------- + Three packages are available: -* getdata-0.7.2.tar.bz2/.gz: the full source code to the library, with +* getdata-0.8.0.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.7.2.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 MSys shell is - used to run the build system.) Currently, the only bindings provided by - this package are the C++ bindings, and the 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.7.2.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 without having to - recompile the whole GetData package. + designed for POSIX systems (UNIX, Linux, BSD, MacOS X, Cygwin, MSys, + &c.) +* getdata_win-0.8.0.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 + MSys shell is used to run the build system.) Currently, the only + bindings provided by this package are the C++ bindings, and the + 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.0.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 + without having to recompile the whole GetData package. -------------------------------------------------------------------------------- +--------------------------------------------------------------------------- Modified: trunk/getdata/man/Makefile.am =================================================================== --- trunk/getdata/man/Makefile.am 2012-07-04 02:39:25 UTC (rev 735) +++ trunk/getdata/man/Makefile.am 2012-07-04 23:53:37 UTC (rev 736) @@ -34,14 +34,14 @@ gd_fragment_affixes.3 gd_fragment_index.3 gd_fragmentname.3 \ gd_framenum_subset.3 gd_framenum_subset64.3 gd_frameoffset.3 \ gd_frameoffset64.3 gd_free_entry_strings.3 \ - gd_get_carray_slice.3 gd_get_constant.3 gd_get_string.3 \ + gd_get_carray_slice.3 gd_get_string.3 \ gd_getdata.3 gd_getdata64.3 gd_hidden.3 gd_hide.3 \ gd_include_affix.3 gd_invalid_dirfile.3 gd_madd_bit.3 \ gd_mcarrays.3 gd_mconstants.3 gd_metaflush.3 gd_move.3 \ gd_mplex_lookback.3 gd_mstrings.3 gd_naliases.3 \ gd_native_type.3 gd_nentries.3 gd_nfragments.3 gd_nframes.3 \ gd_nframes64.3 gd_parent_fragment.3 gd_parser_callback.3 \ - gd_protection.3 gd_put_carray_slice.3 gd_put_constant.3 \ + gd_protection.3 gd_put_carray_slice.3 \ gd_put_string.3 gd_putdata.3 gd_putdata64.3 gd_raw_filename.3 \ gd_reference.3 gd_rename.3 gd_rewrite_fragment.3 gd_seek.3 \ gd_seek64.3 gd_spf.3 gd_strings.3 gd_strtok.3 gd_tell.3 \ @@ -82,7 +82,9 @@ gd_alter_spec.3:gd_malter_spec.3 \ gd_framenum_subset.3:gd_framenum.3 \ gd_get_carray_slice.3:gd_get_carray.3 \ + gd_get_carray_slice.3:gd_get_constant.3 \ gd_put_carray_slice.3:gd_put_carray.3 \ + gd_put_carray_slice.3:gd_put_constant.3 \ gd_delete.3:gd_delete_alias.3 \ gd_move.3:gd_move_alias.3 \ gd_hide.3:gd_unhide.3 \ Modified: trunk/getdata/man/gd_carray_len.3 =================================================================== --- trunk/getdata/man/gd_carray_len.3 2012-07-04 02:39:25 UTC (rev 735) +++ trunk/getdata/man/gd_carray_len.3 2012-07-04 23:53:37 UTC (rev 736) @@ -1,6 +1,6 @@ .\" gd_carray_len.3. The gd_carray_len man page. .\" -.\" Copyright (C) 2010, 2011 D. V. Wiebe +.\" Copyright (C) 2010, 2011, 2012 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_carray_len 3 "15 August 2011" "Version 0.8.0" "GETDATA" +.TH gd_carray_len 3 "4 July 2012" "Version 0.8.0" "GETDATA" .SH NAME gd_carray_len \(em returns the length of a CARRAY field in a dirfile .SH SYNOPSIS @@ -30,12 +30,14 @@ function queries a dirfile(5) database specified by .I dirfile and returns the number of length of the +.B CONST +or .B CARRAY field .IR field_code . If .I field_code -contains a valid representation suffix, it will be ignored. +contains a valid representation suffix, it will be ignored. The .I dirfile @@ -45,8 +47,10 @@ .SH RETURN VALUE Upon successful completion, .BR gd_carray_len () -returns the length of the field specified. On error, it returns zero and sets -the dirfile error to a non-zero error value. Possible error values are: +returns the array length of the field specified. (The length of a +.B CONST +field is always 1.) 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_ALLOC The library was unable to allocate memory. @@ -62,9 +66,10 @@ .B GD_E_BAD_FIELD_TYPE The field specified by .I field_code -was not of -.B CARRAY -type. +was not a +.B CONST +or +.BR CARRAY . .TP .B GD_E_BAD_REPR The representation suffix specified in Modified: trunk/getdata/man/gd_get_carray_slice.3 =================================================================== --- trunk/getdata/man/gd_get_carray_slice.3 2012-07-04 02:39:25 UTC (rev 735) +++ trunk/getdata/man/gd_get_carray_slice.3 2012-07-04 23:53:37 UTC (rev 736) @@ -1,6 +1,6 @@ .\" gd_get_carray_slice.3. The gd_get_carray_slice man page. .\" -.\" Copyright (C) 2010 D. V. Wiebe +.\" Copyright (C) 2010, 2011, 2012 D. V. Wiebe .\" .\"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" .\" @@ -13,10 +13,9 @@ .\" Texts. A copy of the license is included in the `COPYING.DOC' file .\" as part of this distribution. .\" -.TH gd_get_carray_slice 3 "18 August 2011" "Version 0.8.0" "GETDATA" +.TH gd_get_carray_slice 3 "4 July 2012" "Version 0.8.0" "GETDATA" .SH NAME -gd_get_carray, gd_get_carray_slice \(em retrieve CARRAY data from a dirfile -database +gd_get_carray, gd_get_carray_slice, gd_get_constant \(em retrieve CONST or\CARRAY data from a dirfile database .SH SYNOPSIS .B #include <getdata.h> .HP @@ -28,6 +27,9 @@ .HP .BI "int gd_get_carray(DIRFILE *" dirfile ", const char *" field_code , .BI "gd_type_t " return_type ", void *" data_out ); +.HP +.BI "int gd_get_constant(DIRFILE *" dirfile ", const char *" field_code , +.BI "gd_type_t " return_type ", void *" data_out ); .hy .ad n .SH DESCRIPTION @@ -36,6 +38,8 @@ function queries a dirfile(5) database specified by .I dirfile for the +.B CONST +or .B CARRAY scalar array .IR field_code , @@ -48,9 +52,26 @@ .IR start , and the number of elements stored is given by .IR len . + The .BR gd_get_carray () -function behaves similarly, except it returns the entire field. +function behaves similarly, except it returns the entire field, as if +.BR gd_get_carray_slice () +were called with +.I start +equal to zero and +.I len +equal to the value returned by +.BR gd_carray_len (3). +The +.BR gd_get_constant () +function is equivalent to calling +.BR gd_get_carray_slice () +with +.I start +equal to zero and +.I len +equal to one. The .I dirfile @@ -69,8 +90,7 @@ calling .BR gd_get_carray_slice () never results in a short read; attempting to read past the end of the -.B CARRAY -will result in an error, and no data will be returned. +field will result in an error, and no data will be returned. The .I return_type @@ -152,11 +172,12 @@ .B GD_E_BAD_FIELD_TYPE The supplied .I field_code -referred to a field of a type other than +was not a +.BR CONST +nor .BR CARRAY . The caller should use -.BR gd_getdata (3), -.BR gd_get_constant (3), +.BR gd_getdata (3) or .BR gd_get_string (3) instead. Deleted: trunk/getdata/man/gd_get_constant.3 =================================================================== --- trunk/getdata/man/gd_get_constant.3 2012-07-04 02:39:25 UTC (rev 735) +++ trunk/getdata/man/gd_get_constant.3 2012-07-04 23:53:37 UTC (rev 736) @@ -1,165 +0,0 @@ -.\" gd_get_constant.3. The gd_get_constant man page. -.\" -.\" Copyright (C) 2008, 2010, 2011 D. V. Wiebe -.\" -.\"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" -.\" -.\" This file is part of the GetData project. -.\" -.\" Permission is granted to copy, distribute and/or modify this document -.\" under the terms of the GNU Free Documentation License, Version 1.2 or -.\" any later version published by the Free Software Foundation; with no -.\" Invariant Sections, with no Front-Cover Texts, and with no Back-Cover -.\" Texts. A copy of the license is included in the `COPYING.DOC' file -.\" as part of this distribution. -.\" -.TH gd_get_constant 3 "17 August 2011" "Version 0.8.0" "GETDATA" -.SH NAME -gd_get_constant \(em retrieve a scalar constant from a dirfile database -.SH SYNOPSIS -.B #include <getdata.h> -.HP -.nh -.ad l -.BI "int gd_get_constant(DIRFILE *" dirfile ", const char *" field_code , -.BI "gd_type_t " return_type ", void *" data_out ); -.hy -.ad n -.SH DESCRIPTION -The -.BR gd_get_constant () -function queries a dirfile(5) database specified by -.I dirfile -for the -.B CONST -scalar -.IR field_code , -which may contain a representation suffix. -The constant is converted to the data type specified by -.IR return_type , -and stored in the user-supplied buffer -.IR data_out . - -The -.I dirfile -argument must point to a valid DIRFILE object previously created by a call to -.BR gd_open (3). -The argument -.I data_out -must point to a valid memory location of sufficient size to hold a value of the -return type specified. - -The -.I return_type -argument should be one of the following symbols, which indicates the desired -return type of the data: -.RS -.TP 11 -.B GD_UINT8 -unsigned 8-bit integer -.TP -.B GD_INT8 -signed (two's complement) 8-bit integer -.TP -.B GD_UINT16 -unsigned 16-bit integer -.TP -.B GD_INT16 -signed (two's complement) 16-bit integer -.TP -.B GD_UINT32 -unsigned 32-bit integer -.TP -.B GD_INT32 -signed (two's complement) 32-bit integer -.TP -.B GD_UINT64 -unsigned 64-bit integer -.TP -.B GD_INT64 -signed (two's complement) 64-bit integer -.TP -.B GD_FLOAT32 -IEEE-754 standard 32-bit single precision floating point number -.TP -.B GD_FLOAT64 -IEEE-754 standard 64-bit double precision floating point number -.TP -.B GD_COMPLEX64 -C99-conformant 64-bit single precision complex number -.TP -.B GD_COMPLEX128 -C99-conformant 128-bit double precision complex number -.TP -.B GD_NULL -the null type: the database is queried as usual, but no data is returned. -In this case, -.I data_out -is ignored and may be NULL. -.RE - -The return type of the constant need not be the same as the type of the data -stored in the database. Type conversion will be performed as necessary to -return the requested type. If the -.I field_code -does not indicate a representation, but conversion from a complex value to a -purely real one is required, only the real portion of the requested vector will -be returned. -.SH RETURN VALUE -On success, -.BR gd_get_constant () -returns zero. On error, it returns -1 and sets the dirfile error to a non-zero -value. Possible error values are: -.TP 8 -.B GD_E_ALLOC -The library was unable to allocate memory. -.TP -.B GD_E_BAD_CODE -The field specified by -.I field_code -was not found in the database. -.TP -.B GD_E_BAD_DIRFILE -An invalid -.I dirfile -was supplied. -.TP -.B GD_E_BAD_FIELD_TYPE -The supplied -.I field_code -referred to a field of a type other than -.BR CONST . -The caller should use -.BR gd_getdata (3), -or -.BR gd_get_string (3) -instead. -.TP -.B GD_E_BAD_REPR -The representation suffix specified in -.I field_code -was invalid. -.TP -.B GD_E_BAD_TYPE -An invalid -.I return_type -was specified. -.TP -.B GD_E_INTERNAL_ERROR -An internal error occurred in the library while trying to perform the task. -This indicates a bug in the library. Please report the incident to the -maintainer. -.PP -The dirfile error may be retrieved by calling -.BR gd_error (3). -A descriptive error string for the last error encountered may be obtained from -a call to -.BR gd_error_string (3). -.SH SEE ALSO -.BR dirfile (5), -.BR gd_open (3), -.BR gd_error (3), -.BR gd_error_string (3), -.BR gd_get_carray (3), -.BR gd_constants (3), -.BR gd_put_constant (3) Modified: trunk/getdata/man/gd_put_carray_slice.3 =================================================================== --- trunk/getdata/man/gd_put_carray_slice.3 2012-07-04 02:39:25 UTC (rev 735) +++ trunk/getdata/man/gd_put_carray_slice.3 2012-07-04 23:53:37 UTC (rev 736) @@ -1,6 +1,6 @@ .\" gd_put_carray_slice.3. The gd_put_carray_slice man page. .\" -.\" Copyright (C) 2010, 2011 D. V. Wiebe +.\" Copyright (C) 2010, 2011, 2012 D. V. Wiebe .\" .\"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" .\" @@ -13,9 +13,10 @@ .\" Texts. A copy of the license is included in the `COPYING.DOC' file .\" as part of this distribution. .\" -.TH gd_put_carray_slice 3 "19 August 2011" "Version 0.8.0" "GETDATA" +.TH gd_put_carray_slice 3 "4 July 2012" "Version 0.8.0" "GETDATA" .SH NAME -gd_put_carray, gd_put_carray_slice \(em write CARRAY data to a dirfile database +gd_put_carray, gd_put_carray_slice, gd_put_constant \(em write CONST or CARRAY +data to a dirfile database .SH SYNOPSIS .B #include <getdata.h> .HP @@ -27,6 +28,9 @@ .HP .BI "int gd_put_carray(DIRFILE *" dirfile ", const char *" field_code , .BI "gd_type_t " data_type ", const void *" data_in ); +.HP +.BI "int gd_put_constant(DIRFILE *" dirfile ", const char *" field_code , +.BI "gd_type_t " data_type ", const void *" data_in ); .hy .ad n .SH DESCRIPTION @@ -47,10 +51,26 @@ .IR start , and the number of elements stored is given by .IR len . + The .BR gd_put_carray () -function behaves similarly, except the whole scalar array is written. These -interface cannot write to field representations. +function behaves similarly, except the whole scalar array is written, as if +.BR gd_put_carray_slice () +were called with +.I start +equal zero and +.I len +equal to the value returned by +.BR gd_carray_len (3). +The +.BR gd_put_constant () +function is equivalent to calling +.BR gd_put_carray_slice () +with +.I start +equal to zero and +.I len +equal to one. None of these interfaces can write to field representations. The argument .I data_in @@ -61,7 +81,7 @@ .BR gd_carray_len (3). Unlike .BR gd_putdata (3), -writing data past the end of the field is not permitted. To add data to the +writing data past the end of the field is not permitted. To add data to a .BR CARRAY , first increase its length by calling .BR gd_alter_carray (3), @@ -111,10 +131,9 @@ C99-conformant 128-bit double precision complex number .RE -The type of the input data need not be the same as the -.B CARRAY -storage type. Type conversion will be performed as necessary to return the -requested type. The +The type of the input data need not be the same as the storage type of the +field. Type conversion will be performed as necessary to return the requested +type. The .I dirfile argument must point to a valid DIRFILE object previously created by a call to .BR gd_open (3). @@ -147,7 +166,9 @@ .B GD_E_BAD_FIELD_TYPE The supplied .I field_code -referred to a field of a type other than +was not a +.B CONST +nor a .BR CARRAY . The caller should use .BR gd_putdata (3), Deleted: trunk/getdata/man/gd_put_constant.3 =================================================================== --- trunk/getdata/man/gd_put_constant.3 2012-07-04 02:39:25 UTC (rev 735) +++ trunk/getdata/man/gd_put_constant.3 2012-07-04 23:53:37 UTC (rev 736) @@ -1,168 +0,0 @@ -.\" gd_put_constant.3. The gd_put_constant man page. -.\" -.\" Copyright (C) 2008, 2009, 2010, 2011, 2012 D. V. Wiebe -.\" -.\"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" -.\" -.\" This file is part of the GetData project. -.\" -.\" Permission is granted to copy, distribute and/or modify this document -.\" under the terms of the GNU Free Documentation License, Version 1.2 or -.\" any later version published by the Free Software Foundation; with no -.\" Invariant Sections, with no Front-Cover Texts, and with no Back-Cover -.\" Texts. A copy of the license is included in the `COPYING.DOC' file -.\" as part of this distribution. -.\" -.TH gd_put_constant 3 "21 April 2012" "Version 0.8.0" "GETDATA" -.SH NAME -gd_put_constant \(em retrieve a scalar constant from a dirfile database -.SH SYNOPSIS -.B #include <getdata.h> -.HP -.nh -.ad l -.BI "int gd_put_constant(DIRFILE *" dirfile ", const char *" field_code , -.BI "gd_type_t " data_type ", const void *" data_in ); -.hy -.ad n -.SH DESCRIPTION -The -.BR gd_put_constant () -function queries a dirfile(5) database specified by -.I dirfile -and sets the -.B CONST -scalar -.I field_code , -which may not contain a representation suffix, to the value specified in -.IR data_in , -which should be of the type indicated by -.IR data_type . - -The -.I dirfile -argument must point to a valid DIRFILE object previously created by a call to -.BR gd_open (3). - -The -.I data_type -argument should be one of the following symbols, which indicates the desired -return type of the data: -.RS -.TP 11 -.B GD_UINT8 -unsigned 8-bit integer -.TP -.B GD_INT8 -signed (two's complement) 8-bit integer -.TP -.B GD_UINT16 -unsigned 16-bit integer -.TP -.B GD_INT16 -signed (two's complement) 16-bit integer -.TP -.B GD_UINT32 -unsigned 32-bit integer -.TP -.B GD_INT32 -signed (two's complement) 32-bit integer -.TP -.B GD_UINT64 -unsigned 64-bit integer -.TP -.B GD_INT64 -signed (two's complement) 64-bit integer -.TP -.B GD_FLOAT32 -IEEE-754 standard 32-bit single precision floating point number -.TP -.B GD_FLOAT64 -IEEE-754 standard 64-bit double precision floating point number -.TP -.B GD_COMPLEX64 -C99-conformant 64-bit single precision complex number -.TP -.B GD_COMPLEX128 -C99-conformant 128-bit double precision complex number -.RE - -The data type of the supplied value need not be the same as the type of the -storage type of the constant in the database. Type conversion will be performed -as necessary to return the requested type. The argument -.I data_out -must point to valid data type of the specified type. - -Because constant values are stored in the dirfile metadata, the new value of -.I field_code -won't be written to disk until the dirfile metadata is flushed with -.BR gd_metaflush (3), -or until the dirfile is closed. -.SH RETURN VALUE -On success, -.BR gd_put_constant () -returns zero. On error, it returns -1 and sets the dirfile error to a non-zero -value. Possible error values are: -.TP 8 -.B GD_E_ACCMODE -The specified -.I dirfile -was opened read-only. -.TP -.B GD_E_ALLOC -The library was unable to allocate memory. -.TP -.B GD_E_BAD_CODE -The field specified by -.I field_code -was not found in the database. -.TP -.B GD_E_BAD_DIRFILE -An invalid -.I dirfile -was supplied. -.TP -.B GD_E_BAD_FIELD_TYPE -The supplied -.I field_code -referred to a field of type other than -.BR CONST . -The caller should use -.BR gd_putdata "(3), " gd_put_carray (3), -or -.BR gd_put_string (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 -was specified. -.TP -.B GD_E_INTERNAL_ERROR -An internal error occurred in the library while trying to perform the task. -This indicates a bug in the library. Please report the incident to the -maintainer. -.TP -.B GD_E_PROTECTED -The fragment containing the constant was protected from change. -.PP -The dirfile error may be retrieved by calling -.BR gd_error (3). -A descriptive error string for the last error encountered may be obtained from -a call to -.BR gd_error_string (3). -.SH SEE ALSO -.BR dirfile (5), -.BR gd_metaflush (3), -.BR gd_get_constant (3), -.BR gd_error (3), -.BR gd_error_string (3), -.BR gd_open (3), -.BR gd_put_carray (3), -.BR gd_put_string (3), -.BR gd_putdata (3) Modified: trunk/getdata/src/constant.c =================================================================== --- trunk/getdata/src/constant.c 2012-07-04 02:39:25 UTC (rev 735) +++ trunk/getdata/src/constant.c 2012-07-04 23:53:37 UTC (rev 736) @@ -20,49 +20,6 @@ */ #include "internal.h" -/* this function is little more than a public boilerplate for _GD_DoField */ -int gd_get_constant(DIRFILE* D, const char *field_code_in, - gd_type_t return_type, void *data_out) gd_nothrow -{ - gd_entry_t *entry; - char* field_code; - int repr; - - dtrace("%p, \"%s\", 0x%x, %p", D, field_code_in, return_type, data_out); - - if (D->flags & GD_INVALID) {/* don't crash */ - _GD_SetError(D, GD_E_BAD_DIRFILE, 0, NULL, 0, NULL); - dreturn("%i", -1); - return -1; - } - - _GD_ClearError(D); - - entry = _GD_FindFieldAndRepr(D, field_code_in, &field_code, &repr, NULL, 1, - 1); - - if (D->error) { - dreturn("%i", -1); - return -1; - } - - if (entry->field_type != GD_CONST_ENTRY) - _GD_SetError(D, GD_E_BAD_FIELD_TYPE, GD_E_FIELD_BAD, NULL, 0, field_code); - else if (!D->error) - _GD_DoField(D, entry, repr, 0, 1, return_type, data_out); - - if (field_code != field_code_in) - free(field_code); - - if (D->error) { - dreturn("%i", -1); - return -1; - } - - dreturn("%i", 0); - return 0; -} - int gd_get_carray_slice(DIRFILE* D, const char *field_code_in, unsigned int start, size_t n, gd_type_t return_type, void *data_out) gd_nothrow @@ -84,17 +41,21 @@ entry = _GD_FindFieldAndRepr(D, field_code_in, &field_code, &repr, NULL, 1, 1); - + if (D->error) { dreturn("%i", -1); return -1; } - if (entry->field_type != GD_CARRAY_ENTRY) + if (entry->field_type != GD_CARRAY_ENTRY && + entry->field_type != GD_CONST_ENTRY) + { _GD_SetError(D, GD_E_BAD_FIELD_TYPE, GD_E_FIELD_BAD, NULL, 0, field_code); - else if (start + n > entry->EN(scalar,array_len)) + } else if (start + n > ((entry->field_type == GD_CONST_ENTRY) ? 1 : + entry->EN(scalar,array_len))) + { _GD_SetError(D, GD_E_BOUNDS, 0, NULL, 0, NULL); - else if (!D->error) + } else if (!D->error) _GD_DoField(D, entry, repr, start, n, return_type, data_out); if (field_code != field_code_in) @@ -128,17 +89,19 @@ entry = _GD_FindFieldAndRepr(D, field_code_in, &field_code, &repr, NULL, 1, 1); - + if (D->error) { dreturn("%i", -1); return -1; } - if (entry->field_type != GD_CARRAY_ENTRY) + if (entry->field_type != GD_CARRAY_ENTRY && + entry->field_type != GD_CONST_ENTRY) + { _GD_SetError(D, GD_E_BAD_FIELD_TYPE, GD_E_FIELD_BAD, NULL, 0, field_code); - else if (!D->error) - _GD_DoField(D, entry, repr, 0, entry->EN(scalar,array_len), return_type, - data_out); + } else if (!D->error) + _GD_DoField(D, entry, repr, 0, (entry->field_type == GD_CONST_ENTRY) ? 1 : + entry->EN(scalar,array_len), return_type, data_out); if (field_code != field_code_in) free(field_code); @@ -152,6 +115,12 @@ return 0; } +int gd_get_constant(DIRFILE* D, const char *field_code_in, + g... [truncated message content] |