Thread: [Getdata-commits] SF.net SVN: getdata:[713] trunk/getdata (Page 6)
Scientific Database Format
Brought to you by:
ketiltrout
From: <ket...@us...> - 2012-05-26 00:25:16
|
Revision: 713 http://getdata.svn.sourceforge.net/getdata/?rev=713&view=rev Author: ketiltrout Date: 2012-05-26 00:25:05 +0000 (Sat, 26 May 2012) Log Message: ----------- Change hot the 64-bit off_t API is handled. It's now always available, regardless of platform. Fix C++ bindings to use it, instead of _FILE_OFFSET_BITS. Modified Paths: -------------- trunk/getdata/ChangeLog trunk/getdata/bindings/cxx/dirfile.cpp trunk/getdata/bindings/cxx/fragment.cpp trunk/getdata/bindings/cxx/getdata/dirfile.h trunk/getdata/bindings/perl/Makefile.am trunk/getdata/configure.ac trunk/getdata/man/Makefile.am trunk/getdata/man/gd_framenum_subset64.3 trunk/getdata/man/gd_frameoffset64.3 trunk/getdata/man/gd_getdata64.3 trunk/getdata/man/gd_nframes64.3 trunk/getdata/man/gd_putdata64.3 trunk/getdata/src/common.c trunk/getdata/src/constant.c trunk/getdata/src/encoding.c trunk/getdata/src/flush.c trunk/getdata/src/getdata.c trunk/getdata/src/getdata.h.in trunk/getdata/src/internal.h trunk/getdata/src/name.c trunk/getdata/src/putdata.c trunk/getdata/src/types.c trunk/getdata/test/Makefile.am Added Paths: ----------- trunk/getdata/man/gd_bof64.3 trunk/getdata/man/gd_eof64.3 trunk/getdata/man/gd_seek64.3 trunk/getdata/man/gd_tell64.3 Modified: trunk/getdata/ChangeLog =================================================================== --- trunk/getdata/ChangeLog 2012-05-23 23:24:48 UTC (rev 712) +++ trunk/getdata/ChangeLog 2012-05-26 00:25:05 UTC (rev 713) @@ -1,3 +1,20 @@ +2012-05-25 D. V. Wiebe <ge...@ke...> svn:712 + * bindings/cxx/fragment.cpp (Fragment::Fragment Fragment::SetEndianness) + bindings/cxx/dirfile.cpp (Dirfile::NFrames Dirfile::EoF Dirfile::BoF + Dirfile::GetData Dirfile::PutData Dirfile::FrameNum Dirfile::Seek + Dirfile::Tell): Call the 64-bit API. + + * src/getdata.h.in: Support GD_64BIT_API and use configure to define + gd_off64_t. + * src/internal.h bindings/cxx/getdata/dirfile.h: Define GD_64BIT_API before + including getdata.h. + + * test/Makefile.am man/Makefile.am: Remove LFS_TRANSITIONAL_API (always + enabled). + + * confihure.ac: Figure out a suitable type for gd_off64_t. Remove + LFS_TRANSITIONAL_API conditional. + 2012-05-23 D. V. Wiebe <ge...@ke...> svn:710 * test/test.h: Don't redefine isnan if it's okay as-is. Modified: trunk/getdata/bindings/cxx/dirfile.cpp =================================================================== --- trunk/getdata/bindings/cxx/dirfile.cpp 2012-05-23 23:24:48 UTC (rev 712) +++ trunk/getdata/bindings/cxx/dirfile.cpp 2012-05-26 00:25:05 UTC (rev 713) @@ -259,17 +259,17 @@ off_t Dirfile::NFrames() const { - return gd_nframes(D); + return (off_t)gd_nframes64(D); } off_t Dirfile::EoF(const char *field_code) const { - return gd_eof(D, field_code); + return (off_t)gd_eof64(D, field_code); } off_t Dirfile::BoF(const char *field_code) const { - return gd_bof(D, field_code); + return (off_t)gd_bof64(D, field_code); } int Dirfile::GetCarray(const char *field_code, DataType type, void *data_out, @@ -292,8 +292,9 @@ off_t first_sample, size_t num_frames, size_t num_samples, DataType type, void* data_out) const { - return gd_getdata(D, field_code, first_frame, first_sample, num_frames, - num_samples, (gd_type_t)type, data_out); + return gd_getdata64(D, field_code, (gd_off64_t)first_frame, + (gd_off64_t)first_sample, num_frames, num_samples, (gd_type_t)type, + data_out); } size_t Dirfile::GetString(const char *field_code, size_t len, char* data_out) @@ -322,8 +323,9 @@ off_t first_sample, size_t num_frames, size_t num_samples, DataType type, const void* data_in) const { - return gd_putdata(D, field_code, first_frame, first_sample, num_frames, - num_samples, (gd_type_t)type, data_in); + return gd_putdata64(D, field_code, (gd_off64_t)first_frame, + (gd_off64_t)first_sample, num_frames, num_samples, (gd_type_t)type, + data_in); } size_t Dirfile::PutString(const char *field_code, const char* data_in) const @@ -424,7 +426,8 @@ double Dirfile::FrameNum(const char* field_code, double value, off_t frame_start, off_t frame_end) const { - return gd_framenum_subset(D, field_code, value, frame_start, frame_end); + return gd_framenum_subset64(D, field_code, value, (gd_off64_t)frame_start, + (gd_off64_t)frame_end); } int Dirfile::FragmentIndex(const char* field_code) const @@ -445,12 +448,13 @@ off_t Dirfile::Seek(const char* field_code, off_t frame_num, off_t sample_num, int flags) const { - return gd_seek(D, field_code, frame_num, sample_num, flags); + return (off_t)gd_seek64(D, field_code, (gd_off64_t)frame_num, + (gd_off64_t)sample_num, flags); } off_t Dirfile::Tell(const char* field_code) const { - return gd_tell(D, field_code); + return (off_t)gd_tell64(D, field_code); } int Dirfile::AddAlias(const char* field_code, const char* target, Modified: trunk/getdata/bindings/cxx/fragment.cpp =================================================================== --- trunk/getdata/bindings/cxx/fragment.cpp 2012-05-23 23:24:48 UTC (rev 712) +++ trunk/getdata/bindings/cxx/fragment.cpp 2012-05-26 00:25:05 UTC (rev 713) @@ -31,7 +31,7 @@ ind = index; enc = (GetData::EncodingScheme)gd_encoding(D->D, index); end = gd_endianness(D->D, index); - off = gd_frameoffset(D->D, index); + off = (off_t)gd_frameoffset64(D->D, index); prot = gd_protection(D->D, index); name = gd_fragmentname(D->D, index); parent = (index == 0) ? -1 : gd_parent_fragment(D->D, index); @@ -73,7 +73,7 @@ int Fragment::SetFrameOffset(off_t offset, int recode) { - int ret = gd_alter_frameoffset(D->D, offset, ind, recode); + int ret = gd_alter_frameoffset64(D->D, (gd_off64_t)offset, ind, recode); if (!ret) off = offset; Modified: trunk/getdata/bindings/cxx/getdata/dirfile.h =================================================================== --- trunk/getdata/bindings/cxx/getdata/dirfile.h 2012-05-23 23:24:48 UTC (rev 712) +++ trunk/getdata/bindings/cxx/getdata/dirfile.h 2012-05-26 00:25:05 UTC (rev 713) @@ -22,16 +22,17 @@ #ifndef GETDATA_DIRFILE_H #define GETDATA_DIRFILE_H -#ifndef _FILE_OFFSET_BITS -# define _FILE_OFFSET_BITS 64 +// Enable the explicit 64-bit API (gd_getdata64() &c.) +#ifndef GD_64BIT_API +# define GD_64BIT_API #endif -// We don't want the legacy API since its symbols clash with us. +// Disable the legacy API since its symbols clash with us. #ifndef GD_NO_LEGACY_API # define GD_NO_LEGACY_API #endif -// We use the C89 API since C++ compilers aren't required to support the +// Use the C89 API since C++ compilers aren't required to support the // C99 _Complex keyword #ifndef GD_C89_API # define GD_C89_API Modified: trunk/getdata/bindings/perl/Makefile.am =================================================================== --- trunk/getdata/bindings/perl/Makefile.am 2012-05-23 23:24:48 UTC (rev 712) +++ trunk/getdata/bindings/perl/Makefile.am 2012-05-26 00:25:05 UTC (rev 713) @@ -37,22 +37,23 @@ perlautogetdatadir=${perldir}/auto/GetData nodist_perlautogetdata_SCRIPTS=blib/arch/auto/GetData/GetData.bs blib/arch/auto/GetData/GetData.so -t: - mkdir t +t lib: + mkdir $@ -t/%.t: test/%.t t +t/%.t: test/%.t + $(MAKE) t cat $< > $@ -lib: - mkdir lib - -lib/GetData.xs: lib GetData.xs +lib/GetData.xs: GetData.xs + $(MAKE) lib cat $(srcdir)/GetData.xs > $@ -lib/typemap: lib typemap +lib/typemap: typemap + $(MAKE) lib cat $(srcdir)/typemap > $@ -lib/simple_funcs.xs: lib simple_funcs.xsin simple_funcs.pl +lib/simple_funcs.xs: simple_funcs.xsin simple_funcs.pl + $(MAKE) lib $(PERL) $(srcdir)/simple_funcs.pl $(srcdir)/simple_funcs.xsin > $@ MANIFEST: MANIFEST.in @@ -75,6 +76,7 @@ blib/lib/GetData.pm blib/libdoc/GetData.$(PERL_MAN3EXT): Build \ lib/GetData.xs lib/simple_funcs.xs lib/typemap $(PERL) Build build + touch $@ .PRECIOUS: Build Build: Build.PL GetData.pm lib/GetData.xs lib/simple_funcs.xs lib/typemap \ Modified: trunk/getdata/configure.ac =================================================================== --- trunk/getdata/configure.ac 2012-05-23 23:24:48 UTC (rev 712) +++ trunk/getdata/configure.ac 2012-05-26 00:25:05 UTC (rev 713) @@ -620,17 +620,6 @@ #endif ]) -if test "x$gd_cv_c_need_lfs_defined" = "xyes"; then - AC_DEFINE([_LARGEFILE64_SOURCE], [1], - [ Additional functionality from LFS for large files. ]) -fi - -if test "x$gd_cv_type_off64_t" = "xyes"; then - dnl Assume we have the entire LFS defined transitional API - AC_DEFINE([HAVE_OFF64_T], [1], - [ Define to 1 if the system has the type `off64_t'. ]) dnl ` -fi - dnl integer sizes AC_CHECK_SIZEOF([short int]) AC_CHECK_SIZEOF([int]) @@ -683,14 +672,31 @@ gd_uint64_t="long long int" fi +if test "x$gd_cv_type_off64_t" = "xyes"; then + dnl Assume we have the entire LFS defined transitional API + AC_DEFINE([HAVE_OFF64_T], [1], + [ Define to 1 if the system has the type `off64_t'. ]) dnl ` + define_lf64s="#ifndef _LARGEFILE64_SOURCE +#define _LARGEFILE64_SOURCE +#endif +" + gd_off64_t="off64_t" +elif test $ac_cv_sizeof_off_t -eq 8;then + gd_off64_t="off64_t" +else + gd_off64_t=$gd_int64_t +fi + DEFINE_gd_int16_t="# define gd_int16_t $gd_int16_t"; DEFINE_gd_uint16_t="# define gd_uint16_t $gd_uint16_t"; DEFINE_gd_int64_t="# define gd_int64_t $gd_int64_t"; DEFINE_gd_uint64_t="# define gd_uint64_t $gd_uint64_t"; +DEFINE_gd_off64_t="$define_lf64s# define gd_off64_t $gd_off64_t"; AC_SUBST([DEFINE_gd_int16_t]) AC_SUBST([DEFINE_gd_uint16_t]) AC_SUBST([DEFINE_gd_int64_t]) AC_SUBST([DEFINE_gd_uint64_t]) +AC_SUBST([DEFINE_gd_off64_t]) dnl library functions echo @@ -987,7 +993,6 @@ AM_CONDITIONAL(INTEL_F77_COMPILER, [test "x$gd_cv_f77_compiler_intel" == "xyes"]) AM_CONDITIONAL(INTEL_FC_COMPILER, [test "x$gd_cv_fc_compiler_intel" == "xyes"]) -AM_CONDITIONAL(LFS_TRANSITIONAL_API, [test "x$gd_cv_type_off64_t" = "xyes"]) AM_CONDITIONAL(INCLUDE_LEGACY_API, [test "x$include_legacy_api" != "xno"]) AM_CONDITIONAL(MAKE_CXXBINDINGS, [test "x$make_cxxbindings" = "xyes"]) AM_CONDITIONAL(MAKE_F77BINDINGS, [test "x$make_f77bindings" != "xno"]) @@ -1066,16 +1071,9 @@ enable_debug="assert only" fi -if test "x$gd_cv_type_off64_t" = "xyes"; then - lfs_transitional_api="yes" -else - lfs_transitional_api="no" -fi - echo echo "Configuration summary: " echo " ANSI C compatibility mode: ${disable_c99}" -echo " LFS transitional API: ${lfs_transitional_api}" echo " Legacy API: ${include_legacy_api}" echo " Verbose debugging: ${enable_debug}" echo " Use modules: ${use_modules}" Modified: trunk/getdata/man/Makefile.am =================================================================== --- trunk/getdata/man/Makefile.am 2012-05-23 23:24:48 UTC (rev 712) +++ trunk/getdata/man/Makefile.am 2012-05-26 00:25:05 UTC (rev 713) @@ -20,37 +20,33 @@ # AUTOMAKE_OPTIONS = foreign -if LFS_TRANSITIONAL_API -LFS_transitional_mans = gd_getdata64.3 gd_framenum_subset64.3 \ - gd_frameoffset64.3 gd_nframes64.3 gd_putdata64.3 -MAN3ALIASES64=gd_frameoffset64.3:gd_alter_frameoffset64.3 -endif - nodist_man_MANS = gd_alter_encoding.3 gd_alter_endianness.3 \ gd_alter_frameoffset.3 dist_man_MANS = checkdirfile.1 dirfile2ascii.1 gd_add.3 gd_add_alias.3 \ gd_add_bit.3 gd_add_spec.3 gd_alias_target.3 gd_aliases.3 \ gd_alter_affixes.3 gd_alter_bit.3 gd_alter_entry.3 \ - gd_alter_protection.3 gd_alter_spec.3 gd_bof.3 gd_carray_len.3 \ - gd_carrays.3 gd_cbopen.3 gd_close.3 gd_constants.3 gd_delete.3 \ - gd_desync.3 gd_dirfile_standards.3 gd_dirfilename.3 \ - gd_encoding.3 gd_endianness.3 gd_entry.3 gd_entry_list.3 \ - gd_entry_type.3 gd_eof.3 gd_error.3 gd_error_count.3 \ - gd_error_string.3 gd_flags.3 gd_flush.3 gd_fragment_affixes.3 \ - gd_fragment_index.3 gd_fragmentname.3 gd_framenum_subset.3 \ - gd_frameoffset.3 gd_free_entry_strings.3 gd_get_carray_slice.3 \ - gd_get_constant.3 gd_get_string.3 gd_getdata.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_alter_protection.3 gd_alter_spec.3 gd_bof.3 gd_bof64.3 \ + gd_carray_len.3 gd_carrays.3 gd_cbopen.3 gd_close.3 \ + gd_constants.3 gd_delete.3 gd_desync.3 gd_dirfile_standards.3 \ + gd_dirfilename.3 gd_encoding.3 gd_endianness.3 gd_entry.3 \ + gd_entry_list.3 gd_entry_type.3 gd_eof.3 gd_eof64.3 gd_error.3 \ + gd_error_count.3 gd_error_string.3 gd_flags.3 gd_flush.3 \ + 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_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_parent_fragment.3 gd_parser_callback.3 gd_protection.3 \ - gd_put_carray_slice.3 gd_put_constant.3 gd_put_string.3 \ - gd_putdata.3 gd_raw_filename.3 gd_reference.3 gd_rename.3 \ - gd_rewrite_fragment.3 gd_seek.3 gd_spf.3 gd_strings.3 \ - gd_tell.3 gd_uninclude.3 gd_validate.3 gd_verbose_prefix.3 \ - dirfile.5 dirfile-encoding.5 dirfile-format.5 \ - $(LFS_transitional_mans) + gd_nframes64.3 gd_parent_fragment.3 gd_parser_callback.3 \ + gd_protection.3 gd_put_carray_slice.3 gd_put_constant.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_tell.3 gd_tell64.3 \ + gd_uninclude.3 gd_validate.3 gd_verbose_prefix.3 dirfile.5 \ + dirfile-encoding.5 dirfile-format.5 # these are real_file:alias MAN3ALIASES=gd_add_bit.3:gd_add_carray.3 gd_add_bit.3:gd_add_clincom.3 \ @@ -99,7 +95,7 @@ gd_entry_list.3:gd_field_list.3 gd_entry_list.3:gd_field_list_by_type.3 \ gd_entry_list.3:gd_mfield_list.3 gd_entry_list.3:gd_mfield_list_by_type.3 \ gd_entry_list.3:gd_nmvectore.3 gd_entry_list.3:gd_vector_list.3 \ - $(MAN3ALIASES64) + gd_frameoffset64.3:gd_alter_frameoffset64.3 #man conversion HTMLMANS=$(addsuffix .html,$(nodist_man_MANS)) \ Added: trunk/getdata/man/gd_bof64.3 =================================================================== --- trunk/getdata/man/gd_bof64.3 (rev 0) +++ trunk/getdata/man/gd_bof64.3 2012-05-26 00:25:05 UTC (rev 713) @@ -0,0 +1,54 @@ +.\" gd_bof64.3. The gd_bof64 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_bof64 3 "25 May 2012" "Version 0.8.0" "GETDATA" +.SH NAME +gd_bof64 \(em retrieve data from a dirfile database, with largefile support +.SH SYNOPSIS +.B #define GD_64BIT_API + +.B #include <getdata.h> +.HP +.nh +.ad l +.BI "gd_off64_t gd_bof64(DIRFILE *" dirfile ", const char *" field_code ); +.hy +.ad n +.SH DESCRIPTION +This version of +.BR gd_bof (3) +uses a 64-bit offset type +.RB ( gd_off64_t ), +where one is available, regardless of the size of +.BR off_t . +It is only available if one defines +.IR GD_64BIT_API +or +.IR _LARGEFILE64_SOURCE +before including getdata.h. + +If +.I off_t +is a 64-bit type (possibly because +.I _FILE_OFFSET_BITS +has been defined to 64), this function will the same as +.BR gd_bof (3). +Otherwise, +.BR gd_bof (3) +will be a version of this function which uses a 32-bit +.IR off_t . +.SH SEE ALSO +.BR gd_bof (3), +.BR feature_test_macros (7) Added: trunk/getdata/man/gd_eof64.3 =================================================================== --- trunk/getdata/man/gd_eof64.3 (rev 0) +++ trunk/getdata/man/gd_eof64.3 2012-05-26 00:25:05 UTC (rev 713) @@ -0,0 +1,54 @@ +.\" gd_eof64.3. The gd_eof64 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_eof64 3 "25 May 2012" "Version 0.8.0" "GETDATA" +.SH NAME +gd_eof64 \(em retrieve data from a dirfile database, with largefile support +.SH SYNOPSIS +.B #define GD_64BIT_API + +.B #include <getdata.h> +.HP +.nh +.ad l +.BI "gd_off64_t gd_eof64(DIRFILE *" dirfile ", const char *" field_code ); +.hy +.ad n +.SH DESCRIPTION +This version of +.BR gd_eof (3) +uses a 64-bit offset type +.RB ( gd_off64_t ), +where one is available, regardless of the size of +.BR off_t . +It is only available if one defines +.IR GD_64BIT_API +or +.IR _LARGEFILE64_SOURCE +before including getdata.h. + +If +.I off_t +is a 64-bit type (possibly because +.I _FILE_OFFSET_BITS +has been defined to 64), this function will the same as +.BR gd_eof (3). +Otherwise, +.BR gd_eof (3) +will be a version of this function which uses a 32-bit +.IR off_t . +.SH SEE ALSO +.BR gd_eof (3), +.BR feature_test_macros (7) Modified: trunk/getdata/man/gd_framenum_subset64.3 =================================================================== --- trunk/getdata/man/gd_framenum_subset64.3 2012-05-23 23:24:48 UTC (rev 712) +++ trunk/getdata/man/gd_framenum_subset64.3 2012-05-26 00:25:05 UTC (rev 713) @@ -1,6 +1,6 @@ .\" gd_framenum_subset64.3. The gd_framenum_subset64 man page. .\" -.\" Copyright (C) 2008, 2010 D. V. Wiebe +.\" Copyright (C) 2008, 2010, 2012 D. V. Wiebe .\" .\"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" .\" @@ -13,37 +13,43 @@ .\" Texts. A copy of the license is included in the `COPYING.DOC' file .\" as part of this distribution. .\" -.TH gd_framenum_subset64 3 "15 July 2010" "Version 0.7.0" "GETDATA" +.TH gd_framenum_subset64 3 "25 May 2012" "Version 0.8.0" "GETDATA" .SH NAME gd_framenum_subset64 \(em perform a reverse look-up on a monotonic dirfile -field +field, with largefile support. .SH SYNOPSIS -.B #define _LARGEFILE64_SOURCE +.B #define GD_64BIT_API .B #include <getdata.h> .HP .nh .ad l .BI "double gd_framenum_subset64(DIRFILE *" dirfile , -.BI "const char *" field_code ", double " value ", off64_t " field_start , -.BI "off64_t " field_end ); +.BI "const char *" field_code ", double " value ", gd_off64_t " field_start , +.BI "gd_off64_t " field_end ); .hy .ad n .SH DESCRIPTION This version of .BR gd_framenum_subset (3) -uses a 64-bit offset type, even if -.I off_t -is a 32-bit type. It is only available if one defines -.IR _LARGEFILE64_SOURCE . +uses a 64-bit offset type +.RB ( gd_off64_t ), +where one is available, regardless of the size of +.BR off_t . +It is only available if one defines +.IR GD_64BIT_API +or +.IR _LARGEFILE64_SOURCE +before including getdata.h. + If .I off_t -is a 64-bit type (i.e. if +is a 64-bit type (possibly because .I _FILE_OFFSET_BITS -is defined to be 64), this function will be called -.BR gd_framenum_subset (). +has been defined to 64), this function will the same as +.BR gd_framenum_subset (3). Otherwise, -.BR gd_framenum_subset () +.BR gd_framenum_subset (3) will be a version of this function which uses a 32-bit .IR off_t . .SH SEE ALSO Modified: trunk/getdata/man/gd_frameoffset64.3 =================================================================== --- trunk/getdata/man/gd_frameoffset64.3 2012-05-23 23:24:48 UTC (rev 712) +++ trunk/getdata/man/gd_frameoffset64.3 2012-05-26 00:25:05 UTC (rev 713) @@ -13,47 +13,51 @@ .\" Texts. A copy of the license is included in the `COPYING.DOC' file .\" as part of this distribution. .\" -.TH gd_frameoffset64 3 "16 July 2010" "Version 0.7.0" "GETDATA" +.TH gd_frameoffset64 3 "25 May 2012" "Version 0.8.0" "GETDATA" .SH NAME gd_frameoffset64, gd_alter_frameoffset64 \(em report or change the frame offset of fields in a dirfile, with largefile support .SH SYNOPSIS -.B #define _LARGEFILE64_SOURCE +.B #define GD_64BIT_API .B #include <getdata.h> .HP .nh .ad l -.BI "off64_t gd_frameoffset(DIRFILE *" dirfile ", int " fragment_index ); +.BI "gd_off64_t gd_frameoffset(DIRFILE *" dirfile ", int " fragment_index ); .HP -.BI "int gd_alter_frameoffset64(DIRFILE *" dirfile ", off64_t " offset , +.BI "int gd_alter_frameoffset64(DIRFILE *" dirfile ", gd_off64_t " offset , .BI "int " fragment_index ", int " move ); .hy .ad n .SH DESCRIPTION -These version of +These versions of .BR gd_frameoffset (3) and .BR gd_alter_frameoffset (3) -use a 64-bit offset type, even if -.I off_t -is a 32-bit type. They are only available if the caller defines -.I _LARGEFILE64_SOURCE +use a 64-bit offset type +.RB ( gd_off64_t ), +where one is available, regardless of the size of +.BR off_t . +They are only available if one defines +.IR GD_64BIT_API +or +.IR _LARGEFILE64_SOURCE before including getdata.h. If .I off_t -is a 64-bit type (i.e. if +is a 64-bit type (possibly because .I _FILE_OFFSET_BITS -is defined to be 64), these function will be called -.BR gd_frameoffset () +has been defined to 64), these functions will the same as +.BR gd_framenum_subset (3) and -.BR gd_alter_frameoffset (). +.BR gd_alter_frameoffset (3). Otherwise, -.BR gd_frameoffset () +.BR gd_framenum_subset (3) and -.BR gd_alter_frameoffset () -will be versions of these functions which use a 32-bit +.BR gd_alter_frameoffset (3) +will be versions of these function which use a 32-bit .IR off_t . .SH SEE ALSO .BR gd_alter_frameoffset (3), Modified: trunk/getdata/man/gd_getdata64.3 =================================================================== --- trunk/getdata/man/gd_getdata64.3 2012-05-23 23:24:48 UTC (rev 712) +++ trunk/getdata/man/gd_getdata64.3 2012-05-26 00:25:05 UTC (rev 713) @@ -1,6 +1,6 @@ .\" gd_getdata64.3. The gd_getdata64 man page. .\" -.\" Copyright (C) 2008, 2010 D. V. Wiebe +.\" Copyright (C) 2008, 2010, 2012 D. V. Wiebe .\" .\"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" .\" @@ -13,36 +13,43 @@ .\" Texts. A copy of the license is included in the `COPYING.DOC' file .\" as part of this distribution. .\" -.TH gd_getdata64 3 "25 May 2010" "Version 0.7.0" "GETDATA" +.TH gd_getdata64 3 "25 May 2012" "Version 0.8.0" "GETDATA" .SH NAME -gd_getdata64 \(em retrieve data from a dirfile database with largefile support +gd_getdata64 \(em retrieve data from a dirfile database, with largefile support .SH SYNOPSIS -.B #define _LARGEFILE64_SOURCE +.B #define GD_64BIT_API .B #include <getdata.h> .HP .nh .ad l -.BI "size_t gd_getdata64(DIRFILE *" dirfile ", const char *" field_code ", off64_t" -.IB first_frame ", off64_t " first_sample ", size_t " num_frames ", size_t" -.IB num_samples ", gd_type_t " return_type ", void *" data_out ); +.BI "size_t gd_getdata64(DIRFILE *" dirfile ", const char *" field_code , +.BI "gd_off64_t " first_frame ", gd_off64_t " first_sample ", size_t +.IB num_frames ", size_t " num_samples ", gd_type_t " return_type , +.BI "void *" data_out ); .hy .ad n .SH DESCRIPTION This version of .BR gd_getdata (3) -uses a 64-bit offset type, even if -.I off_t -is a 32-bit type. It is only available if one defines -.IR _LARGEFILE64_SOURCE . +uses a 64-bit offset type +.RB ( gd_off64_t ), +where one is available, regardless of the size of +.BR off_t . +It is only available if one defines +.IR GD_64BIT_API +or +.IR _LARGEFILE64_SOURCE +before including getdata.h. + If .I off_t -is a 64-bit type (i.e. if +is a 64-bit type (possibly because .I _FILE_OFFSET_BITS -is defined to be 64), this function will be called -.BR gd_getdata (). +has been defined to 64), this function will the same as +.BR gd_getdata (3). Otherwise, -.BR gd_getdata () +.BR gd_getdata (3) will be a version of this function which uses a 32-bit .IR off_t . .SH SEE ALSO Modified: trunk/getdata/man/gd_nframes64.3 =================================================================== --- trunk/getdata/man/gd_nframes64.3 2012-05-23 23:24:48 UTC (rev 712) +++ trunk/getdata/man/gd_nframes64.3 2012-05-26 00:25:05 UTC (rev 713) @@ -1,6 +1,6 @@ .\" gd_nframes64.3. The gd_nframes64 man page. .\" -.\" Copyright (C) 2008, 2010 D. V. Wiebe +.\" Copyright (C) 2008, 2010, 2012 D. V. Wiebe .\" .\"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" .\" @@ -13,34 +13,40 @@ .\" Texts. A copy of the license is included in the `COPYING.DOC' file .\" as part of this distribution. .\" -.TH gd_nframes64 3 "16 July 2010" "Version 0.7.0" "GETDATA" +.TH gd_nframes64 3 "25 May 2012" "Version 0.8.0" "GETDATA" .SH NAME -gd_nframes64 \(em report the size of a dirfile with largefile support +gd_nframes64 \(em report the size of a dirfile, with largefile support .SH SYNOPSIS -.B #define _LARGEFILE64_SOURCE +.B #define GD_64BIT_API .B #include <getdata.h> .HP .nh .ad l -.BI "off64_t gd_nframes64(DIRFILE *" dirfile ); +.BI "gd_off64_t gd_nframes64(DIRFILE *" dirfile ); .hy .ad n .SH DESCRIPTION This version of .BR gd_nframes (3) -uses a 64-bit offset type, even if -.I off_t -is a 32-bit type. It is only available if one defines -.IR _LARGEFILE64_SOURCE . +uses a 64-bit offset type +.RB ( gd_off64_t ), +where one is available, regardless of the size of +.BR off_t . +It is only available if one defines +.IR GD_64BIT_API +or +.IR _LARGEFILE64_SOURCE +before including getdata.h. + If .I off_t -is a 64-bit type (i.e. if +is a 64-bit type (possibly because .I _FILE_OFFSET_BITS -is defined to be 64), this function will be called -.BR gd_nframes (). +has been defined to 64), this function will the same as +.BR gd_nframes (3). Otherwise, -.BR gd_nframes () +.BR gd_nframes (3) will be a version of this function which uses a 32-bit .IR off_t . .SH SEE ALSO Modified: trunk/getdata/man/gd_putdata64.3 =================================================================== --- trunk/getdata/man/gd_putdata64.3 2012-05-23 23:24:48 UTC (rev 712) +++ trunk/getdata/man/gd_putdata64.3 2012-05-26 00:25:05 UTC (rev 713) @@ -1,6 +1,6 @@ .\" gd_putdata64.3. The gd_putdata64 man page. .\" -.\" Copyright (C) 2008, 2010 D. V. Wiebe +.\" Copyright (C) 2008, 2010, 2012 D. V. Wiebe .\" .\"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" .\" @@ -13,36 +13,43 @@ .\" Texts. A copy of the license is included in the `COPYING.DOC' file .\" as part of this distribution. .\" -.TH gd_putdata64 3 "25 May 2010" "Version 0.7.0" "GETDATA" +.TH gd_putdata64 3 "25 May 2012" "Version 0.8.0" "GETDATA" .SH NAME -gd_putdata64 \(em write data to a dirfile database with largefile support +gd_putdata64 \(em write data to a dirfile database, with largefile support .SH SYNOPSIS -.B #define _LARGEFILE64_SOURCE +.B #define GD_64BIT_API .B #include <getdata.h> .HP .nh .ad l -.BI "size_t gd_putdata64(DIRFILE *" dirfile ", const char *" field_code ", off64_t" -.IB first_frame ", off64_t " first_sample ", size_t " num_frames ", size_t" -.IB num_samples ", gd_type_t " data_type ", const void *" data_out ); +.BI "size_t gd_putdata64(DIRFILE *" dirfile ", const char *" field_code , +.BI "gd_off64_t " first_frame ", gd_off64_t " first_sample ", size_t +.IB num_frames ", size_t " num_samples ", gd_type_t " data_type , +.BI "const void *" data_out ); .hy .ad n .SH DESCRIPTION This version of .BR gd_putdata (3) -uses a 64-bit offset type, even if -.I off_t -is a 32-bit type. It is only available if one defines -.IR _LARGEFILE64_SOURCE . +uses a 64-bit offset type +.RB ( gd_off64_t ), +where one is available, regardless of the size of +.BR off_t . +It is only available if one defines +.IR GD_64BIT_API +or +.IR _LARGEFILE64_SOURCE +before including getdata.h. + If .I off_t -is a 64-bit type (i.e. if +is a 64-bit type (possibly because .I _FILE_OFFSET_BITS -is defined to be 64), this function will be called -.BR gd_putdata (). +has been defined to 64), this function will the same as +.BR gd_putdata (3). Otherwise, -.BR gd_putdata () +.BR gd_putdata (3) will be a version of this function which uses a 32-bit .IR off_t . .SH SEE ALSO Added: trunk/getdata/man/gd_seek64.3 =================================================================== --- trunk/getdata/man/gd_seek64.3 (rev 0) +++ trunk/getdata/man/gd_seek64.3 2012-05-26 00:25:05 UTC (rev 713) @@ -0,0 +1,55 @@ +.\" gd_seek64.3. The gd_seek64 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_seek64 3 "25 May 2012" "Version 0.8.0" "GETDATA" +.SH NAME +gd_seek64 \(em retrieve data from a dirfile database, with largefile support +.SH SYNOPSIS +.B #define GD_64BIT_API + +.B #include <getdata.h> +.HP +.nh +.ad l +.BI "gd_off64_t gd_seek64(DIRFILE *" dirfile ", const char *" field_code , +.BI "gd_off64_t " frame_num ", gd_off64_t " sample_num ", int " flags ); +.hy +.ad n +.SH DESCRIPTION +This version of +.BR gd_seek (3) +uses a 64-bit offset type +.RB ( gd_off64_t ), +where one is available, regardless of the size of +.BR off_t . +It is only available if one defines +.IR GD_64BIT_API +or +.IR _LARGEFILE64_SOURCE +before including getdata.h. + +If +.I off_t +is a 64-bit type (possibly because +.I _FILE_OFFSET_BITS +has been defined to 64), this function will the same as +.BR gd_seek (3). +Otherwise, +.BR gd_seek (3) +will be a version of this function which uses a 32-bit +.IR off_t . +.SH SEE ALSO +.BR gd_seek (3), +.BR feature_test_macros (7) Added: trunk/getdata/man/gd_tell64.3 =================================================================== --- trunk/getdata/man/gd_tell64.3 (rev 0) +++ trunk/getdata/man/gd_tell64.3 2012-05-26 00:25:05 UTC (rev 713) @@ -0,0 +1,54 @@ +.\" gd_tell64.3. The gd_tell64 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_tell64 3 "25 May 2012" "Version 0.8.0" "GETDATA" +.SH NAME +gd_tell64 \(em retrieve data from a dirfile database, with largefile support +.SH SYNOPSIS +.B #define GD_64BIT_API + +.B #include <getdata.h> +.HP +.nh +.ad l +.BI "gd_off64_t gd_tell64(DIRFILE *" dirfile ", const char *" field_code ); +.hy +.ad n +.SH DESCRIPTION +This version of +.BR gd_tell (3) +uses a 64-bit offset type +.RB ( gd_off64_t ), +where one is available, regardless of the size of +.BR off_t . +It is only available if one defines +.IR GD_64BIT_API +or +.IR _LARGEFILE64_SOURCE +before including getdata.h. + +If +.I off_t +is a 64-bit type (possibly because +.I _FILE_OFFSET_BITS +has been defined to 64), this function will the same as +.BR gd_tell (3). +Otherwise, +.BR gd_tell (3) +will be a version of this function which uses a 32-bit +.IR off_t . +.SH SEE ALSO +.BR gd_tell (3), +.BR feature_test_macros (7) Modified: trunk/getdata/src/common.c =================================================================== --- trunk/getdata/src/common.c 2012-05-23 23:24:48 UTC (rev 712) +++ trunk/getdata/src/common.c 2012-05-26 00:25:05 UTC (rev 713) @@ -480,8 +480,8 @@ size_t i; double x; - dtrace("%p, %p, 0x%x, %i, %p, %" PRNsize_t ", %p, %" PRNsize_t, D, data, type, complex_table, - data_in, npts, lut, n_ln); + dtrace("%p, %p, 0x%x, %i, %p, %" PRNsize_t ", %p, %" PRNsize_t, D, data, type, + complex_table, data_in, npts, lut, n_ln); switch (type) { case GD_NULL: break; @@ -574,8 +574,8 @@ { size_t i; - dtrace("%p, %i, %p, 0x%x, %p, %p, %p, %p, %p, %" PRNsize_t, D, n, data1, return_type, - data2, data3, m, b, spf, n_read); + dtrace("%p, %i, %p, 0x%x, %p, %p, %p, %p, %p, %" PRNsize_t, D, n, data1, + return_type, data2, data3, m, b, spf, n_read); switch(return_type) { case GD_NULL: break; @@ -683,8 +683,8 @@ { size_t i; - dtrace("%p, %i, %p, 0x%x, %p, %p, %p, %p, %p, %" PRNsize_t, D, n, data1, return_type, - data2, data3, m, b, spf, n_read); + dtrace("%p, %i, %p, 0x%x, %p, %p, %p, %p, %p, %" PRNsize_t, D, n, data1, + return_type, data2, data3, m, b, spf, n_read); switch(return_type) { case GD_NULL: break; @@ -729,7 +729,8 @@ { size_t i; - dtrace("%p, %p, 0x%x, %g, %" PRNsize_t, D, data, return_type, dividend, n_read); + dtrace("%p, %p, 0x%x, %g, %" PRNsize_t, D, data, return_type, dividend, + n_read); switch(return_type) { case GD_NULL: break; @@ -785,8 +786,8 @@ { size_t i; - dtrace("%p, %p, 0x%x, %g;%g, %" PRNsize_t, D, data, return_type, creal(dividend), - cimag(dividend), n_read); + dtrace("%p, %p, 0x%x, %g;%g, %" PRNsize_t, D, data, return_type, + creal(dividend), cimag(dividend), n_read); switch(return_type) { case GD_NULL: break; Modified: trunk/getdata/src/constant.c =================================================================== --- trunk/getdata/src/constant.c 2012-05-23 23:24:48 UTC (rev 712) +++ trunk/getdata/src/constant.c 2012-05-26 00:25:05 UTC (rev 713) @@ -259,8 +259,8 @@ int repr; char* field_code; - dtrace("%p, \"%s\", %i, %" PRNsize_t ", 0x%x, %p", D, field_code_in, first, n, data_type, - data_in); + dtrace("%p, \"%s\", %i, %" PRNsize_t ", 0x%x, %p", D, field_code_in, first, n, + data_type, data_in); if (D->flags & GD_INVALID) { _GD_SetError(D, GD_E_BAD_DIRFILE, 0, NULL, 0, NULL); Modified: trunk/getdata/src/encoding.c =================================================================== --- trunk/getdata/src/encoding.c 2012-05-23 23:24:48 UTC (rev 712) +++ trunk/getdata/src/encoding.c 2012-05-26 00:25:05 UTC (rev 713) @@ -456,7 +456,8 @@ { ssize_t n_wrote; - dtrace("%p, %p, %p, %p, 0x%X, %" PRNsize_t ", %i", D, E, enc, ptr, type, n, temp); + dtrace("%p, %p, %p, %p, 0x%X, %" PRNsize_t ", %i", D, E, enc, ptr, type, n, + temp); if (temp) n_wrote = (*enc->write)(E->e->u.raw.file + 1, ptr, type, n); Modified: trunk/getdata/src/flush.c =================================================================== --- trunk/getdata/src/flush.c 2012-05-23 23:24:48 UTC (rev 712) +++ trunk/getdata/src/flush.c 2012-05-26 00:25:05 UTC (rev 713) @@ -275,8 +275,8 @@ int dummy; char *ptr; - dtrace("%p, %p, \"%s\", \"%s\", \"%s\", %" PRNsize_t ", %i, %i", D, stream, prefix, - suffix, in, len, permissive, standards); + dtrace("%p, %p, \"%s\", \"%s\", \"%s\", %" PRNsize_t ", %i, %i", D, stream, + prefix, suffix, in, len, permissive, standards); ptr = _GD_MungeCode(D, NULL, prefix, suffix, NULL, NULL, in, &dummy); Modified: trunk/getdata/src/getdata.c =================================================================== --- trunk/getdata/src/getdata.c 2012-05-23 23:24:48 UTC (rev 712) +++ trunk/getdata/src/getdata.c 2012-05-26 00:25:05 UTC (rev 713) @@ -104,8 +104,8 @@ { size_t i; - dtrace("%p, %p, 0x%X, %p, 0x%X, %" PRNsize_t ", %i", D, cdata, in_type, rdata, type, n, - repr); + dtrace("%p, %p, 0x%X, %p, 0x%X, %" PRNsize_t ", %i", D, cdata, in_type, rdata, + type, n, repr); switch (type) { case GD_UINT8: EXTRACT_REPRS( uint8_t); break; @@ -258,8 +258,8 @@ char *databuffer; size_t zero_pad = 0; - dtrace("%p, %p, %lli, %" PRNsize_t ", 0x%X, %p)", D, E, (long long)s0, ns, return_type, - data_out); + dtrace("%p, %p, %lli, %" PRNsize_t ", 0x%X, %p)", D, E, (long long)s0, ns, + return_type, data_out); if (s0 < E->EN(raw,spf) * D->fragment[E->fragment_index].frame_offset) zero_pad = E->EN(raw,spf) * D->fragment[E->fragment_index].frame_offset - @@ -871,8 +871,8 @@ size_t i; const double NaN = NAN; - dtrace("%p, %p, %u, %p, %u, 0x%X, %i, {%g,%llx,%lli}, %" PRNsize_t, D, A, spfA, B, - spfB, type, op, threshold.r, (unsigned long long)threshold.u, + dtrace("%p, %p, %u, %p, %u, 0x%X, %i, {%g,%llx,%lli}, %" PRNsize_t, D, A, + spfA, B, spfB, type, op, threshold.r, (unsigned long long)threshold.u, (long long)threshold.i, n); switch (type) { @@ -929,8 +929,8 @@ { size_t i; - dtrace("%p, %p, %u, %p, %u, 0x%X, %i, %p, %" PRNsize_t, D, A, spfA, B, spfB, type, - val, start, n); + dtrace("%p, %p, %u, %p, %u, 0x%X, %i, %p, %" PRNsize_t, D, A, spfA, B, spfB, + type, val, start, n); switch (type) { case GD_NULL: break; @@ -967,8 +967,8 @@ const gd_type_t ntype = (return_type & GD_COMPLEX) ? GD_COMPLEX128 : GD_FLOAT64; - dtrace("%p, %p, %lli, %" PRNsize_t ", 0x%X, %p", D, E, (long long)first_samp, num_samp, - return_type, data_out); + dtrace("%p, %p, %lli, %" PRNsize_t ", 0x%X, %p", D, E, (long long)first_samp, + num_samp, return_type, data_out); /* input field checks */ for (i = 0; i < E->EN(lincom,n_fields); ++i) { @@ -1101,8 +1101,8 @@ off64_t first_samp2; gd_type_t type2; - dtrace("%p, %p, %lli, %" PRNsize_t ", 0x%X, %p", D, E, (long long)first_samp, num_samp, - return_type, data_out); + dtrace("%p, %p, %lli, %" PRNsize_t ", 0x%X, %p", D, E, (long long)first_samp, + num_samp, return_type, data_out); /* Check input fields */ if (_GD_BadInput(D, E, 0, 1)) { @@ -1196,8 +1196,8 @@ { size_t n_read; - dtrace("%p, %p, %lli, %" PRNsize_t ", 0x%X, %p", D, E, (long long)first_samp, num_samp, - return_type, data_out); + dtrace("%p, %p, %lli, %" PRNsize_t ", 0x%X, %p", D, E, (long long)first_samp, + num_samp, return_type, data_out); /* Check input fields */ if (_GD_BadInput(D, E, 0, 1)) { @@ -1242,8 +1242,8 @@ off64_t first_samp2; gd_type_t type2; - dtrace("%p, %p, %lli, %" PRNsize_t ", 0x%X, %p", D, E, (long long)first_samp, num_samp, - return_type, data_out); + dtrace("%p, %p, %lli, %" PRNsize_t ", 0x%X, %p", D, E, (long long)first_samp, + num_samp, return_type, data_out); /* Check input fields */ if (_GD_BadInput(D, E, 0, 1) || _GD_BadInput(D, E, 1, 1)) { @@ -1391,8 +1391,8 @@ { size_t n_read; - dtrace("%p, %p, %lli, %" PRNsize_t ", 0x%X, %p", D, E, (long long)first_samp, num_samp, - return_type, data_out); + dtrace("%p, %p, %lli, %" PRNsize_t ", 0x%X, %p", D, E, (long long)first_samp, + num_samp, return_type, data_out); if (_GD_BadInput(D, E, 0, 1)) { dreturn("%i", 0); @@ -1415,8 +1415,8 @@ size_t n_read = 0; double* data_in; - dtrace("%p, %p, %lli, %" PRNsize_t ", 0x%X, %p", D, E, (long long)first_samp, num_samp, - return_type, data_out); + dtrace("%p, %p, %lli, %" PRNsize_t ", 0x%X, %p", D, E, (long long)first_samp, + num_samp, return_type, data_out); if (E->e->u.linterp.table_len < 0) { _GD_ReadLinterpFile(D, E); @@ -1465,8 +1465,8 @@ { size_t n_read; - dtrace("%p, %p, %lli, %" PRNsize_t ", 0x%X, %p", D, E, (long long)first_samp, num_samp, - return_type, data_out); + dtrace("%p, %p, %lli, %" PRNsize_t ", 0x%X, %p", D, E, (long long)first_samp, + num_samp, return_type, data_out); if (_GD_BadInput(D, E, 0, 1)) { dreturn("%i", 0); @@ -1511,8 +1511,8 @@ off64_t first_samp2; gd_type_t type2; - dtrace("%p, %p, %lli, %" PRNsize_t ", 0x%X, %p", D, E, (long long)first_samp, num_samp, - return_type, data_out); + dtrace("%p, %p, %lli, %" PRNsize_t ", 0x%X, %p", D, E, (long long)first_samp, + num_samp, return_type, data_out); /* Check input fields */ if (_GD_BadInput(D, E, 0, 1)) { @@ -1617,8 +1617,8 @@ const size_t size = GD_SIZE(return_type); off64_t first_samp2; - dtrace("%p, %p, %lli, %" PRNsize_t ", 0x%X, %p", D, E, (long long)first_samp, num_samp, - return_type, data_out); + dtrace("%p, %p, %lli, %" PRNsize_t ", 0x%X, %p", D, E, (long long)first_samp, + num_samp, return_type, data_out); /* Check input fields */ if (_GD_BadInput(D, E, 0, 1)) { @@ -1974,9 +1974,9 @@ int repr; unsigned int spf; - dtrace("%p, \"%s\", %lli, %lli, %" PRNsize_t ", %" PRNsize_t ", 0x%X, %p", D, field_code_in, - (long long)first_frame, (long long)first_samp, num_frames, num_samp, - return_type, data_out); + dtrace("%p, \"%s\", %lli, %lli, %" PRNsize_t ", %" PRNsize_t ", 0x%X, %p", D, + field_code_in, (long long)first_frame, (long long)first_samp, num_frames, + num_samp, return_type, data_out); if (D->flags & GD_INVALID) {/* don't crash */ _GD_SetError(D, GD_E_BAD_DIRFILE, 0, NULL, 0, NULL); Modified: trunk/getdata/src/getdata.h.in =================================================================== --- trunk/getdata/src/getdata.h.in 2012-05-23 23:24:48 UTC (rev 712) +++ trunk/getdata/src/getdata.h.in 2012-05-26 00:25:05 UTC (rev 713) @@ -36,6 +36,15 @@ * array of doubles in place of the complex types. This symbol permits * including these declarations using a non-C99 conforming compiler. * + * - defining GD_64BIT_API will expose the declaration of versions of funtions + * using an explicitly 64-bit off_t type, regardless of the actual size of + * off_t itself. These functions have "64" appended to their name (e.g. + * gd_getdata64()). It will also define th gd_off64_t type, which is used in + * these exposed definitions as a replacement for off_t. This symbol is + * automatically defined if _LARGEFILE64_SOURCE has been defined before + * including this file, and may also be defined on certain platforms where + * off_t is 64-bits. + * * - defining GD_FUNCTION_ALIASES will result in a number of function aliases * which map the version 0.7 function names to the names used in GetData-0.6. * This feature is provided only to ease transistion, and will be removed in @@ -1075,13 +1084,14 @@ /* if required, declare the LFS transitional extension */ #if defined _LARGEFILE64_SOURCE || (defined _FILE_OFFSET_BITS && \ _FILE_OFFSET_BITS == 64) || (defined __CYGWIN__) || (defined __APPLE__) +#if ! defined GD_64BIT_API +#define GD_64BIT_API +#endif +#endif -#if (defined _FILE_OFFSET_BITS && _FILE_OFFSET_BITS == 64) || \ - (defined __APPLE__) || (defined __CYGWIN__) -#define gd_off64_t off_t -#else -#define gd_off64_t off64_t -#endif +#ifdef GD_64BIT_API +@DEFINE_gd_off64_t@ + extern int gd_alter_frameoffset64(DIRFILE *dirfile, gd_off64_t offset, int fragment, int recode) gd_nonnull ((1)); Modified: trunk/getdata/src/internal.h =================================================================== --- trunk/getdata/src/internal.h 2012-05-23 23:24:48 UTC (rev 712) +++ trunk/getdata/src/internal.h 2012-05-26 00:25:05 UTC (rev 713) @@ -26,6 +26,7 @@ #include "gd_config.h" #endif +#define GD_64BIT_API #include "getdata.h" /* OS X 10.6 deprecates lstat64 */ Modified: trunk/getdata/src/name.c =================================================================== --- trunk/getdata/src/name.c 2012-05-23 23:24:48 UTC (rev 712) +++ trunk/getdata/src/name.c 2012-05-26 00:25:05 UTC (rev 713) @@ -207,7 +207,8 @@ char **list, size_t len, int n, int pass, int *nl) { char **ptr; - dtrace("%p, %p, %p, %p, %" PRNsize_t ", %i, %i, %i", D, T, E, list, len, n, pass, *nl); + dtrace("%p, %p, %p, %p, %" PRNsize_t ", %i, %i, %i", D, T, E, list, len, n, + pass, *nl); if (pass & GD_UPDI) { if ((ptr = (char**)_GD_Realloc(D, list, sizeof(char *) * (*nl + 1))) @@ -306,7 +307,8 @@ char **list, size_t len, int n, int pass, int *nl) { char **ptr; - dtrace("%p, %p, %p, %p, %" PRNsize_t ", %i, %i, %i", D, T, E, list, len, n, pass, *nl); + dtrace("%p, %p, %p, %p, %" PRNsize_t ", %i, %i, %i", D, T, E, list, len, n, + pass, *nl); if (pass != 0 && T->e->entry[n] == NULL) _GD_BadInput(D, T, n, 0); Modified: trunk/getdata/src/putdata.c =================================================================== --- trunk/getdata/src/putdata.c 2012-05-23 23:24:48 UTC (rev 712) +++ trunk/getdata/src/putdata.c 2012-05-26 00:25:05 UTC (rev 713) @@ -36,8 +36,8 @@ return 0; } - dtrace("%p, %p, %lli, %" PRNsize_t ", 0x%X, %p", D, E, (long long)s0, ns, data_type, - data_in); + dtrace("%p, %p, %lli, %" PRNsize_t ", 0x%X, %p", D, E, (long long)s0, ns, + data_type, data_in); if (s0 < D->fragment[E->fragment_index].frame_offset * E->EN(raw,spf)) { _GD_SetError(D, GD_E_RANGE, GD_E_OUT_OF_RANGE, NULL, 0, NULL); @@ -131,8 +131,8 @@ double *tmpbuf; struct _gd_lut *tmp_lut; - dtrace("%p, %p, %lli, %" PRNsize_t ", 0x%X, %p", D, E, (long long)first_samp, num_samp, - data_type, data_in); + dtrace("%p, %p, %lli, %" PRNsize_t ", 0x%X, %p", D, E, (long long)first_samp, + num_samp, data_type, data_in); if (_GD_BadInput(D, E, 0, 1)) { dreturn("%i", 0); @@ -232,8 +232,8 @@ size_t n_wrote; void* tmpbuf; - dtrace("%p, %p, %lli, %" PRNsize_t ", 0x%X, %p", D, E, (long long)first_samp, num_samp, - data_type, data_in); + dtrace("%p, %p, %lli, %" PRNsize_t ", 0x%X, %p", D, E, (long long)first_samp, + num_samp, data_type, data_in); /* we cannot write to LINCOM fields that are a linear combination */ /* of more than one raw field (no way to know how to split data). */ @@ -311,8 +311,8 @@ const uint64_t mask = (E->EN(bit,numbits) == 64) ? 0xffffffffffffffffULL : ((uint64_t)1 << E->EN(bit,numbits)) - 1; - dtrace("%p, %p, %lli, %" PRNsize_t ", 0x%X, %p", D, E, (long long)first_samp, num_samp, - data_type, data_in); + dtrace("%p, %p, %lli, %" PRNsize_t ", 0x%X, %p", D, E, (long long)first_samp, + num_samp, data_type, data_in); if (_GD_BadInput(D, E, 0, 1)) { dreturn("%i", 0); @@ -366,8 +366,8 @@ { size_t n_wrote; - dtrace("%p, %p, %lli, %" PRNsize_t ", 0x%X, %p", D, E, (long long)first_samp, num_samp, - data_type, data_in); + dtrace("%p, %p, %lli, %" PRNsize_t ", 0x%X, %p", D, E, (long long)first_samp, + num_samp, data_type, data_in); if (_GD_BadInput(D, E, 0, 1)) { dreturn("%i", 0); @@ -389,8 +389,8 @@ size_t n_wrote; void* tmpbuf; - dtrace("%p, %p, %lli, %" PRNsize_t ", 0x%X, %p", D, E, (long long)first_samp, num_samp, - data_type, data_in); + dtrace("%p, %p, %lli, %" PRNsize_t ", 0x%X, %p", D, E, (long long)first_samp, + num_samp, data_type, data_in); if (_GD_BadInput(D, E, 0, 1)) { dreturn("%i", 0); @@ -435,8 +435,8 @@ size_t n_wrote; void* tmpbuf; - dtrace("%p, %p, %lli, %" PRNsize_t ", 0x%X, %p", D, E, (long long)first_samp, num_samp, - data_type, data_in); + dtrace("%p, %p, %lli, %" PRNsize_t ", 0x%X, %p", D, E, (long long)first_samp, + num_samp, data_type, data_in); /* we cannot write to POLYNOM fields that are quadradic or higher order */ @@ -529,8 +529,8 @@ { size_t i; - dtrace("%p, %p, %u, %p, %u, %p, 0x%X %i, %" PRNsize_t, D, A, spfA, B, spfB, C, type, - val, n); + dtrace("%p, %p, %u, %p, %u, %p, 0x%X %i, %" PRNsize_t, D, A, spfA, B, spfB, C, + type, val, n); switch (type) { case GD_NULL: break; @@ -563,8 +563,8 @@ off64_t first_samp2; unsigned int spf1, spf2; - dtrace("%p, %p, %lli, %" PRNsize_t ", 0x%X, %p", D, E, (long long)first_samp, num_samp, - data_type, data_in); + dtrace("%p, %p, %lli, %" PRNsize_t ", 0x%X, %p", D, E, (long long)first_samp, + num_samp, data_type, data_in); if (_GD_BadInput(D, E, 0, 1)) { dreturn("%i", 0); @@ -632,8 +632,8 @@ off64_t first, size_t len, gd_type_t data_type, const void *restrict data_in) { - dtrace("%p, %p, %lli, %" PRNsize_t ", 0x%X, %p", D, E, (long long)first, len, data_type, - data_in); + dtrace("%p, %p, %lli, %" PRNsize_t ", 0x%X, %p", D, E, (long long)first, len, + data_type, data_in); /* check protection */ if (D->fragment[E->fragment_index].protection & GD_PROTECT_FORMAT) @@ -690,8 +690,8 @@ { size_t n_wrote = 0; - dtrace("%p, %p, %i, %lli, %" PRNsize_t ", 0x%X, %p", D, E, repr, (long long)first_samp, - num_samp, data_type, data_in); + dtrace("%p, %p, %i, %lli, %" PRNsize_t ", 0x%X, %p", D, E, repr, + (long long)first_samp, num_samp, data_type, data_in); if (++D->recurse_level >= GD_MAX_RECURSE_LEVEL) { _GD_SetError(D, GD_E_RECURSE_LEVEL, GD_E_RECURSE_CODE, NULL, 0, E->field); @@ -785,9 +785,9 @@ int repr; unsigned int spf = 0; - dtrace("%p, \"%s\", %lli, %lli, %" PRNsize_t ", %" PRNsize_t ", 0x%X, %p", D, field_code_in, - (long long)first_frame, (long long)first_samp, num_frames, num_samp, - data_type, data_in); + dtrace("%p, \"%s\", %lli, %lli, %" PRNsize_t ", %" PRNsize_t ", 0x%X, %p", D, + field_code_in, (long long)first_frame, (long long)first_samp, num_frames, + num_samp, data_type, data_in); if (D->flags & GD_INVALID) {/* don't crash */ _GD_SetError(D, GD_E_BAD_DIRFILE, 0, NULL, 0, NULL); Modified: trunk/getdata/src/types.c =================================================================== --- trunk/getdata/src/types.c 2012-05-23 23:24:48 UTC (rev 712) +++ trunk/getdata/src/types.c 2012-05-26 00:25:05 UTC (rev 713) @@ -63,8 +63,8 @@ { size_t i; - dtrace("%p, %p, 0x%x, %p, 0x%x, %" PRNsize_t, D, data_in, in_type, data_out, out_type, - n); + dtrace("%p, %p, 0x%x, %p, 0x%x, %" PRNsize_t, D, data_in, in_type, data_out, + out_type, n); dreturnvoid(); if (out_type == GD_NULL) /* null return type: don't return data */ Modified: trunk/getdata/test/Makefile.am =================================================================== --- trunk/getdata/test/Makefile.am 2012-05-23 23:24:48 UTC (rev 712) +++ trunk/getdata/test/Makefile.am 2012-05-26 00:25:05 UTC (rev 713) @@ -28,17 +28,6 @@ WEXTRA=-Wextra endif -if LFS_TRANSITIONAL_API -GET64=get64 -GET_OFF64=get_off64 -NFRAMES64=nframes64 -NFRAMES_OFF64=nframes_off64 -PUT64=put64 -PUT_OFF64=put_off64 -SEEK64=seek64 -TELL64=tell64 -endif - LDADD=../src/libgetdata.la INCLUDES=${WALL} $(WEXTRA) -I$(top_srcdir)/src @@ -179,7 +168,7 @@ fragment_affix_dup fragment_index fragment_index_alias \ fragment_name fragment_name_oor fragment_num fragment_parent -GET_TESTS=${GET64} get_bad_code get_bit get_carray get_carray_len \ +GET_TESTS=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_endian8 get_endian16 get_endian32 \ @@ -195,7 +184,7 @@ 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_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 \ @@ -244,8 +233,8 @@ nfields_type_hidden nfields_type_invalid nfields_vector \ nfields_vector_hidden nfields_vector_invalid -NFRAMES_TESTS=nframes ${NFRAMES64} nframes_empty nframes_invalid \ - $(NFRAMES_OFF64) nframes_spf +NFRAMES_TESTS=nframes nframes64 nframes_empty nframes_invalid \ + nframes_off64 nframes_spf NMETA_TESTS=nmeta nmeta_hidden nmeta_invalid nmeta_parent nmeta_type \ nmeta_type_hidden nmeta_type_invalid nmeta_type_parent \ @@ -296,7 +285,7 @@ PROTECT_TESTS=protect_alter protect_get -PUT_TESTS=${PUT64} put_bad_code put_bit put_bof put_carray put_carray_slice \ +PUT_TESTS=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_endian8 put_endian16 put_endian32 put_endian64 \ put_endian_complex128_arm put_endian_complex128_big \ @@ -309,7 +298,7 @@ put_int32 put_int64 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_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 \ @@ -322,7 +311,7 @@ repr_real_m repr_real_r repr_uint16 repr_uint32 repr_uint64 \ repr_uint8 -SEEK_TESTS=$(SEEK64) seek_cur seek_end seek_foffs seek_set +SEEK_TESTS=seek64 seek_cur seek_end seek_foffs seek_set SIE_TESTS=sie_get_big sie_get_little sie_move_from sie_move_to sie_nframes_big \ sie_nframes_little sie_put_big sie_put_little @@ -336,7 +325,7 @@ spf_divide spf_lincom spf_multiply \ spf_polynom spf_recip spf_recurse -TELL_TESTS=tell ${TELL64} +TELL_TESTS=tell tell64 TRUNC_TESTS=trunc trunc_dir trunc_rdonly trunc_rofs trunc_truncsub This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ket...@us...> - 2012-05-26 23:17:32
|
Revision: 714 http://getdata.svn.sourceforge.net/getdata/?rev=714&view=rev Author: ketiltrout Date: 2012-05-26 23:17:26 +0000 (Sat, 26 May 2012) Log Message: ----------- Update mingw cmake defined based on configure under msys. Modified Paths: -------------- trunk/getdata/cmake/CMakeLists.txt trunk/getdata/cmake/test/CMakeLists.txt trunk/getdata/src/internal.h trunk/getdata/test/Makefile.am trunk/getdata/test/get_endian64.c trunk/getdata/test/get_int64.c trunk/getdata/test/get_uint64.c trunk/getdata/test/name_update.c trunk/getdata/test/name_update_const.c trunk/getdata/test/put_endian64.c Modified: trunk/getdata/cmake/CMakeLists.txt =================================================================== --- trunk/getdata/cmake/CMakeLists.txt 2012-05-26 00:25:05 UTC (rev 713) +++ trunk/getdata/cmake/CMakeLists.txt 2012-05-26 23:17:26 UTC (rev 714) @@ -42,6 +42,7 @@ # MSVCRT integer types set(DEFINE_gd_int64_t "#define gd_int64_t __int64") set(DEFINE_gd_uint64_t "#define gd_uint64_t unsigned __int64") + set(DEFINE_gd_off64_t "#define gd_off64_t __int64") add_definitions(-D_CRT_SECURE_NO_WARNINGS -D_CRT_NONSTDC_NO_WARNINGS) add_definitions( @@ -91,33 +92,76 @@ set(DEFINE_gd_uint16_t "#define gd_uint16_t unsigned __int16") set(DEFINE_gd_int64_t "#define gd_int64_t __int64") set(DEFINE_gd_uint64_t "#define gd_uint64_t unsigned __int64") + set(DEFINE_gd_off64_t "#define gd_off64_t off64_t") add_definitions( - -D__MSVCRT__ -D__MSVCRT_VERSION__=0x0601 - -DSTDC_HEADERS + -DGD_DIRSEP='\\\\' + -DGD_RESTRICT_ARRAY_OK=1 + -DHAVE_BASENAME + -DHAVE_CABS + -DHAVE_COMPLEX_H + -DHAVE_DIRECT_H + -DHAVE_DIRENT_H + -DHAVE_FCNTL_H + -DHAVE_FLOAT_H + -DHAVE_FSEEKO64 + -DHAVE_FTELLO64 + -DHAVE_FTRUNCATE + -DHAVE_GETCWD + -DHAVE_INTTYPES_H -DHAVE_IO_H + -DHAVE_ISNAN + -DHAVE_LIBGEN_H + -DHAVE_LSEEK64 + -DHAVE_MEMORY_H + -DHAVE_NAN + -DHAVE_OFF64_T + -DHAVE_SNPRINTF + -DHAVE_SSIZE_T + -DHAVE_STDDEF_H -DHAVE_STDINT_H - -DHAVE_COMPLEX_H - -DHAVE_OFF64_T - -DHAVE_LIBGEN_H + -DHAVE_STDLIB_H + -DHAVE_STRINGS_H + -DHAVE_STRING_H -DHAVE_STRTOLL - -DHAVE_DIRENT_H - -DHAVE_DIRECT_H + -DHAVE_STRTOULL + -DHAVE_STRUCT___STAT64 + -DHAVE_SYS_FILE_H + -DHAVE_SYS_PARAM_H + -DHAVE_SYS_STAT_H + -DHAVE_SYS_TYPES_H + -DHAVE_UNISTD_H + -DHAVE__CHSIZE -DHAVE__COMMIT + -DHAVE__COMPLEX_DOUBLE + -DHAVE__COMPLEX_FLOAT + -DHAVE__FDOPEN + -DHAVE__FSTAT + -DHAVE__FSTAT64 + -DHAVE__GETCWD + -DHAVE__ISNAN + -DHAVE__LSEEKI64 + -DHAVE__MKDIR + -DHAVE__OPEN + -DHAVE__READ + -DHAVE__RMDIR + -DHAVE__SNPRINTF -DHAVE__STAT64 -DHAVE__STRTOI64 -DHAVE__STRTOUI64 - -DHAVE_STRUCT___STAT64 - -DHAVE__GETCWD + -DHAVE__UNLINK + -DHAVE__WRITE -DMKDIR_NO_MODE - -DHAVE_SYS_FILE_H - -DHAVE_SYS_STAT_H - -DHAVE_DIRENT_H - -DS_IFLNK=0xa000 - -DHAVE_DECL_OFFSETOF - -DHAVE__CHSIZE - -DGD_DIRSEP=0x53 + -DSIZEOF_INT=4 + -DSIZEOF_UNSIGNED_INT=4 + -DSTDC_HEADERS + -D_BSD_SOURCE=1 + -D_GNU_SOURCE=1 + -D_POSIX_C_SOURCE=1200809L + -D_POSIX_SOURCE=1 + -D_SVID_SOURCE=0 + -Drestrict=__restrict ) set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=gnu99") endif() Modified: trunk/getdata/cmake/test/CMakeLists.txt =================================================================== --- trunk/getdata/cmake/test/CMakeLists.txt 2012-05-26 00:25:05 UTC (rev 713) +++ trunk/getdata/cmake/test/CMakeLists.txt 2012-05-26 23:17:26 UTC (rev 714) @@ -21,23 +21,15 @@ set(tests_ignored ${tests_ignored} error_verbose error_verbose_prefix - get64 get_uint64 get_endian64 get_int64 get_off64 - nframes64 - put64 put_endian64 put_off64 - seek64 - tell64 + get_off64 put_off64 ) endif() if(MINGW) set(tests_ignored ${tests_ignored} - add_crecip89 - alter_crecip89 - endian_alter endian_get endian_move - header_complex - madd_crecip89 - move_data_endian + error_verbose error_verbose_prefix + get_off64 put_off64 ) endif() @@ -45,7 +37,7 @@ list(REMOVE_ITEM gd_sources ${GD_DIR}/test/${_item}.c) endforeach() -#set(gd_sources ${GD_DIR}/test/parse_include_relabs.c) +#set(gd_sources ${GD_DIR}/test/sie_get_little.c) foreach(_test ${gd_sources}) get_filename_component(testname ${_test} NAME_WE) Modified: trunk/getdata/src/internal.h =================================================================== --- trunk/getdata/src/internal.h 2012-05-26 00:25:05 UTC (rev 713) +++ trunk/getdata/src/internal.h 2012-05-26 23:17:26 UTC (rev 714) @@ -112,7 +112,7 @@ #endif #ifndef HAVE_OFF64_T -typedef off_t off64_t; +typedef gd_off64_t off64_t; #endif #ifdef _MSC_VER Modified: trunk/getdata/test/Makefile.am =================================================================== --- trunk/getdata/test/Makefile.am 2012-05-26 00:25:05 UTC (rev 713) +++ trunk/getdata/test/Makefile.am 2012-05-26 23:17:26 UTC (rev 714) @@ -225,7 +225,7 @@ move_index move_meta move_protect move_subdir NAME_TESTS=name name_affix name_affix_bad name_after name_after_const name_dup \ - name_move name_update name_update_const + name_move name_updb name_updb_const NENTRIES_TESTS=nentries_alias nentries_hidden nentries_scalar Modified: trunk/getdata/test/get_endian64.c =================================================================== --- trunk/getdata/test/get_endian64.c 2012-05-26 00:25:05 UTC (rev 713) +++ trunk/getdata/test/get_endian64.c 2012-05-26 23:17:26 UTC (rev 714) @@ -59,7 +59,7 @@ ? "little" : "big"); for (fd = 0; fd < 128; ++fd) - data_data[fd] = fd * (0x020100000201LLU); + data_data[fd] = fd * (0x020100000201); fd = open(format, O_CREAT | O_EXCL | O_WRONLY, 0666); write(fd, format_data, strlen(format_data)); @@ -81,7 +81,7 @@ CHECKI(error, 0); CHECKI(n, 1); - CHECKX(c, 0x50a0000050a0000LLU); + CHECKX(c, 0x50a0000050a0000); return r; } Modified: trunk/getdata/test/get_int64.c =================================================================== --- trunk/getdata/test/get_int64.c 2012-05-26 00:25:05 UTC (rev 713) +++ trunk/getdata/test/get_int64.c 2012-05-26 23:17:26 UTC (rev 714) @@ -45,7 +45,7 @@ mkdir(filedir, 0777); for (fd = 0; fd < 64; ++fd) - data_data[fd] = fd * (0x0200000000000001LLU) * (2 * (fd % 2) - 1); + data_data[fd] = fd * (0x0200000000000001) * (2 * (fd % 2) - 1); fd = open(format, O_CREAT | O_EXCL | O_WRONLY, 0666); write(fd, format_data, strlen(format_data)); @@ -63,7 +63,7 @@ CHECKI(n, 8); for (i = 0; i < 8; ++i) - CHECKIi(i,c[i], (0x5000000000000028LL + i * 0x0200000000000001LL) + CHECKIi(i,c[i], (0x5000000000000028 + i * 0x0200000000000001) * (2 * (i % 2) - 1)); gd_close(D); Modified: trunk/getdata/test/get_uint64.c =================================================================== --- trunk/getdata/test/get_uint64.c 2012-05-26 00:25:05 UTC (rev 713) +++ trunk/getdata/test/get_uint64.c 2012-05-26 23:17:26 UTC (rev 714) @@ -45,7 +45,7 @@ mkdir(filedir, 0777); for (fd = 0; fd < 128; ++fd) - data_data[fd] = fd * (0x0200000000000001LLU); + data_data[fd] = fd * (0x0200000000000001); fd = open(format, O_CREAT | O_EXCL | O_WRONLY, 0666); write(fd, format_data, strlen(format_data)); @@ -62,7 +62,7 @@ CHECKI(error, 0); CHECKI(n, 8); for (i = 0; i < 8; ++i) - CHECKUi(i,c[i],0x5000000000000028LLU + i * 0x0200000000000001LLU); + CHECKUi(i,c[i],0x5000000000000028 + i * 0x0200000000000001); gd_close(D); Modified: trunk/getdata/test/name_update.c =================================================================== --- trunk/getdata/test/name_update.c 2012-05-26 00:25:05 UTC (rev 713) +++ trunk/getdata/test/name_update.c 2012-05-26 23:17:26 UTC (rev 714) @@ -1,60 +0,0 @@ -/* Copyright (C) 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" - -int main(void) -{ - const char *filedir = "dirfile"; - const char *format = "dirfile/format"; - const char *format_data = - "early PHASE data 0\n" - "late PHASE data 0\n" - "data RAW UINT8 8\n"; - int fd, e1, e2, e3, r = 0; - DIRFILE *D; - - rmdirfile(); - mkdir(filedir, 0777); - - fd = open(format, O_CREAT | O_EXCL | O_WRONLY, 0666); - write(fd, format_data, strlen(format_data)); - close(fd); - - D = gd_open(filedir, GD_RDWR | GD_VERBOSE); - gd_validate(D, "early"); - gd_rename(D, "data", "zata", GD_REN_UPDB); - e1 = gd_error(D); - gd_spf(D, "early"); - e2 = gd_error(D); - gd_spf(D, "late"); - e3 = gd_error(D); - - gd_discard(D); - - unlink(format); - rmdir(filedir); - - CHECKI(e1,0); - CHECKI(e2,0); - CHECKI(e3,0); - - return r; -} Modified: trunk/getdata/test/name_update_const.c =================================================================== --- trunk/getdata/test/name_update_const.c 2012-05-26 00:25:05 UTC (rev 713) +++ trunk/getdata/test/name_update_const.c 2012-05-26 23:17:26 UTC (rev 714) @@ -1,63 +0,0 @@ -/* Copyright (C) 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" - -int main(void) -{ - const char *filedir = "dirfile"; - const char *format = "dirfile/format"; - const char *format_data = - "early RAW UINT8 c<1>\n" - "late RAW UINT8 c<0>\n" - "c CARRAY UINT8 2 3\n"; - int fd, e1, e2, e3, r = 0; - unsigned s2, s3; - 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_RDWR | GD_VERBOSE); - gd_validate(D, "early"); - gd_rename(D, "c", "d", GD_REN_UPDB); - e1 = gd_error(D); - s2 = gd_spf(D, "early"); - e2 = gd_error(D); - s3 = gd_spf(D, "late"); - e3 = gd_error(D); - - gd_discard(D); - - unlink(format); - rmdir(filedir); - - CHECKI(e1,0); - CHECKI(e2,0); - CHECKI(e3,0); - CHECKU(s2,3); - CHECKU(s3,2); - - return r; -} Modified: trunk/getdata/test/put_endian64.c =================================================================== --- trunk/getdata/test/put_endian64.c 2012-05-26 00:25:05 UTC (rev 713) +++ trunk/getdata/test/put_endian64.c 2012-05-26 23:17:26 UTC (rev 714) @@ -46,7 +46,7 @@ const char *format = "dirfile/format"; const char *data = "dirfile/data"; char format_data[1000]; - uint64_t c = 0x0203000000040001LLU, d = 0; + uint64_t c = 0x0203000000040001, d = 0; const int big_endian = BigEndian(); int fd, n, error, r = 0; DIRFILE *D; @@ -76,7 +76,7 @@ unlink(format); rmdir(filedir); - CHECKX(d,0x0100040000000302LLU); + CHECKX(d,0x0100040000000302); CHECKI(n,1); CHECKI(error,0); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ket...@us...> - 2012-06-02 21:33:02
|
Revision: 717 http://getdata.svn.sourceforge.net/getdata/?rev=717&view=rev Author: ketiltrout Date: 2012-06-02 21:32:56 +0000 (Sat, 02 Jun 2012) Log Message: ----------- Allow NULL in call to _GD_AbsPath Modified Paths: -------------- trunk/getdata/ChangeLog trunk/getdata/configure.ac trunk/getdata/src/internal.h Modified: trunk/getdata/ChangeLog =================================================================== --- trunk/getdata/ChangeLog 2012-05-27 01:24:27 UTC (rev 716) +++ trunk/getdata/ChangeLog 2012-06-02 21:32:56 UTC (rev 717) @@ -1,3 +1,6 @@ +2012-05-25 D. V. Wiebe <ge...@ke...> svn:717 + * src/internal.h (_GD_AbsPath): Allow s == NULL. + 2012-05-25 D. V. Wiebe <ge...@ke...> svn:712 * bindings/cxx/fragment.cpp (Fragment::Fragment Fragment::SetEndianness) bindings/cxx/dirfile.cpp (Dirfile::NFrames Dirfile::EoF Dirfile::BoF Modified: trunk/getdata/configure.ac =================================================================== --- trunk/getdata/configure.ac 2012-05-27 01:24:27 UTC (rev 716) +++ trunk/getdata/configure.ac 2012-06-02 21:32:56 UTC (rev 717) @@ -411,7 +411,7 @@ case "${host}" in *-pc-mingw*|*-pc-cygwin*) - NO_UNDEFINED=" -no-undefined --enable-auto-import"; + NO_UNDEFINED=" -no-undefined -enable-auto-import"; NO_DLOPEN_TESTS=1 ;; *) NO_DLOPEN_TESTS=0 ;; esac Modified: trunk/getdata/src/internal.h =================================================================== --- trunk/getdata/src/internal.h 2012-05-27 01:24:27 UTC (rev 716) +++ trunk/getdata/src/internal.h 2012-06-02 21:32:56 UTC (rev 717) @@ -613,8 +613,8 @@ /* path malarkey */ #if defined _WIN32 || defined _WIN64 -# define _GD_AbsPath(s) ((s)[0] == '/' || (s)[0] == GD_DIRSEP || \ - ((s)[0] != '\0' && (s)[1] == ':')) +# define _GD_AbsPath(s) (s && ((s)[0] == '/' || (s)[0] == GD_DIRSEP || \ + ((s)[0] != '\0' && (s)[1] == ':'))) # define _GD_Root(s,d,l) \ do { \ if ((d)[0] == '/' || (d)[0] == GD_DIRSEP) { \ @@ -637,7 +637,7 @@ ((d)[1] == '/' || (d)[1] == GD_DIRSEP) ? 2 : 1 : 3 \ ) #else -# define _GD_AbsPath(s) ((s)[0] == '/') +# define _GD_AbsPath(s) (s && (s)[0] == '/') # define _GD_Root(s,d,l) \ do { \ (s)[0] = '/'; \ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ket...@us...> - 2012-06-04 22:25:50
|
Revision: 719 http://getdata.svn.sourceforge.net/getdata/?rev=719&view=rev Author: ketiltrout Date: 2012-06-04 22:25:43 +0000 (Mon, 04 Jun 2012) Log Message: ----------- svn:ignore Property Changed: ---------------- trunk/getdata/bindings/perl/ trunk/getdata/test/ Property changes on: trunk/getdata/bindings/perl ___________________________________________________________________ Modified: svn:ignore - simple_funcs.xs Makefile.in GetData.pm GetData.c .deps make_parameters.sed Makefile MYMETA.yml MYMETA.json _build Build lib debug.c blib Build.PL t MANIFEST + simple_funcs.xs Makefile.in GetData.pm GetData.c .deps make_parameters.sed Makefile MYMETA.yml MYMETA.json _build Build lib debug.c blib Build.PL t MANIFEST build.stamp 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_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_after name_after_const name_dup name_move name_update name_update_const nentries_alias nentries_hidden 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_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_after name_after_const name_dup name_move name_updb name_updb_const nentries_alias nentries_hidden 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 This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ket...@us...> - 2012-06-13 21:32:34
|
Revision: 722 http://getdata.svn.sourceforge.net/getdata/?rev=722&view=rev Author: ketiltrout Date: 2012-06-13 21:32:28 +0000 (Wed, 13 Jun 2012) Log Message: ----------- GetData-0.8.0rc2. Modified Paths: -------------- trunk/getdata/ChangeLog trunk/getdata/NEWS trunk/getdata/m4/version.m4 Modified: trunk/getdata/ChangeLog =================================================================== --- trunk/getdata/ChangeLog 2012-06-05 23:12:09 UTC (rev 721) +++ trunk/getdata/ChangeLog 2012-06-13 21:32:28 UTC (rev 722) @@ -1,4 +1,12 @@ -2012-05-25 D. V. Wiebe <ge...@ke...> svn:717 +2012-06-13 D. V. Wiebe <ge...@ke...> svn:721 + GetData-0.8.0rc2. + +2012-06-04 D. V. Wiebe <ge...@ke...> svn:720 + * bindings/cxx/dirfile.cpp bindings/cxx/fragment.cpp + bindings/cxx/getdata/dirfile.h bindings/cxx/getdata/fragment.h: off_t + -> gd_off64_t. + +2012-06-02 D. V. Wiebe <ge...@ke...> svn:717 * src/internal.h (_GD_AbsPath): Allow s == NULL. 2012-05-25 D. V. Wiebe <ge...@ke...> svn:712 Modified: trunk/getdata/NEWS =================================================================== --- trunk/getdata/NEWS 2012-06-05 23:12:09 UTC (rev 721) +++ trunk/getdata/NEWS 2012-06-13 21:32:28 UTC (rev 722) @@ -1,4 +1,4 @@ -New in version 0.8.0rc1: +New in version 0.8.0rc2: Dirfile Changes @@ -253,6 +253,11 @@ 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. + * 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 Modified: trunk/getdata/m4/version.m4 =================================================================== --- trunk/getdata/m4/version.m4 2012-06-05 23:12:09 UTC (rev 721) +++ trunk/getdata/m4/version.m4 2012-06-13 21:32:28 UTC (rev 722) @@ -21,7 +21,7 @@ m4_define(getdata_major, 0) m4_define(getdata_minor, 8) m4_define(getdata_revision, 0) -m4_define(getdata_extra, [rc1]) +m4_define(getdata_extra, [rc2]) m4_define(getdata_version, getdata_major.getdata_minor.getdata_revision[]getdata_extra) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ket...@us...> - 2012-06-25 15:13:45
|
Revision: 723 http://getdata.svn.sourceforge.net/getdata/?rev=723&view=rev Author: ketiltrout Date: 2012-06-25 15:13:34 +0000 (Mon, 25 Jun 2012) Log Message: ----------- Add ALIAS to _GD_FindVersion. Modified Paths: -------------- trunk/getdata/ChangeLog trunk/getdata/src/flush.c trunk/getdata/util/checkdirfile.c Modified: trunk/getdata/ChangeLog =================================================================== --- trunk/getdata/ChangeLog 2012-06-13 21:32:28 UTC (rev 722) +++ trunk/getdata/ChangeLog 2012-06-25 15:13:34 UTC (rev 723) @@ -1,3 +1,8 @@ +2012-06-25 D. V. Wiebe <ge...@ke...> svn:723 + * src/flush.c (_GD_FindVersion): ALIAS means >= 9. + + * util/checkdirfile.c: Grammar. + 2012-06-13 D. V. Wiebe <ge...@ke...> svn:721 GetData-0.8.0rc2. Modified: trunk/getdata/src/flush.c =================================================================== --- trunk/getdata/src/flush.c 2012-06-13 21:32:28 UTC (rev 722) +++ trunk/getdata/src/flush.c 2012-06-25 15:13:34 UTC (rev 723) @@ -1003,7 +1003,7 @@ if (D->entry[i]->hidden) D->av &= GD_VERS_GE_9; else - switch (D->entry[i]->field_type) { + switch ((int)D->entry[i]->field_type) { case GD_RAW_ENTRY: switch (D->entry[i]->EN(raw,data_type)) { case GD_COMPLEX128: @@ -1052,6 +1052,7 @@ D->av &= GD_VERS_GE_5; } break; + case GD_ALIAS_ENTRY: case GD_WINDOW_ENTRY: case GD_MPLEX_ENTRY: D->av &= GD_VERS_GE_9; Modified: trunk/getdata/util/checkdirfile.c =================================================================== --- trunk/getdata/util/checkdirfile.c 2012-06-13 21:32:28 UTC (rev 722) +++ trunk/getdata/util/checkdirfile.c 2012-06-25 15:13:34 UTC (rev 723) @@ -202,7 +202,8 @@ return 1; } - printf(" Found %llu frames.\n", (unsigned long long)n); + printf(" Found %llu %s.\n", (unsigned long long)n, + n == 1 ? "frame" : "frames"); gd_close(dirfile); return 0; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ket...@us...> - 2012-06-27 00:51:28
|
Revision: 724 http://getdata.svn.sourceforge.net/getdata/?rev=724&view=rev Author: ketiltrout Date: 2012-06-27 00:51:18 +0000 (Wed, 27 Jun 2012) Log Message: ----------- Sanity fix: delete gd_rename_alias and make gd_rename not deref. Doc updates. Modified Paths: -------------- trunk/getdata/ChangeLog trunk/getdata/NEWS trunk/getdata/bindings/perl/GetData.pm.in trunk/getdata/configure.ac trunk/getdata/m4/perl.m4 trunk/getdata/man/Makefile.am trunk/getdata/man/dirfile-encoding.5 trunk/getdata/man/dirfile-format.5 trunk/getdata/man/gd_delete.3 trunk/getdata/man/gd_mplex_lookback.3 trunk/getdata/man/gd_naliases.3 trunk/getdata/man/gd_rename.3 trunk/getdata/man/make_html.pl trunk/getdata/src/add.c trunk/getdata/src/getdata.h.in trunk/getdata/src/internal.h trunk/getdata/src/name.c trunk/getdata/src/parse.c trunk/getdata/test/Makefile.am trunk/getdata/test/name.c trunk/getdata/test/name_updb.c trunk/getdata/test/name_updb_const.c Added Paths: ----------- trunk/getdata/doc/README.perl.in trunk/getdata/test/name_alias.c trunk/getdata/test/name_move_alias.c trunk/getdata/test/name_updb_alias.c trunk/getdata/test/name_updb_const_alias.c Removed Paths: ------------- trunk/getdata/doc/README.perl trunk/getdata/test/name_after.c trunk/getdata/test/name_after_const.c Property Changed: ---------------- trunk/getdata/test/ trunk/getdata/test/name_updb.c trunk/getdata/test/name_updb_const.c Modified: trunk/getdata/ChangeLog =================================================================== --- trunk/getdata/ChangeLog 2012-06-25 15:13:34 UTC (rev 723) +++ trunk/getdata/ChangeLog 2012-06-27 00:51:18 UTC (rev 724) @@ -1,3 +1,17 @@ +2012-06-27 D. V. Wiebe <ge...@ke...> svn:724 + * src/name.c (_GD_UpdateScalar _GD_InvalidateConst _GD_UpdateInField + _GD_InvalidateVect): Handle aliases. + * src/name.c (gd_rename): Don't dereference aliases. + * src/name.c (gd_rename_alias): Deleted. + * test/name.c test/name_updb_const.c test/name_updb.c: Updated. + * test/name_updb_const_alias.c test/name_move_alias.c test/name_alias.c + test/name_updb_alias.c: Added. + * test/name_after_const.c test/name_after.c: Deleted. + + * src/parse.c (_GD_ResolveAlias): Reset aliases if requested. + + * man/make_html.pl: Don't eat "**" in synopses. + 2012-06-25 D. V. Wiebe <ge...@ke...> svn:723 * src/flush.c (_GD_FindVersion): ALIAS means >= 9. Modified: trunk/getdata/NEWS =================================================================== --- trunk/getdata/NEWS 2012-06-25 15:13:34 UTC (rev 723) +++ trunk/getdata/NEWS 2012-06-27 00:51:18 UTC (rev 724) @@ -11,7 +11,11 @@ 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 + * 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 @@ -175,16 +179,15 @@ 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(). + * 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(). - * 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(), gd_delete_alias(), and - gd_rename_alias(). - * 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 Modified: trunk/getdata/bindings/perl/GetData.pm.in =================================================================== --- trunk/getdata/bindings/perl/GetData.pm.in 2012-06-25 15:13:34 UTC (rev 723) +++ trunk/getdata/bindings/perl/GetData.pm.in 2012-06-27 00:51:18 UTC (rev 724) @@ -285,7 +285,7 @@ =back -GetData internally converts the Perl data into a format readably by the C API. +GetData internally converts the Perl data into a format readable by the C API. In cases 3 and 4 above, the type the data is converted into is specified explicitly in the call. In the other cases, GetData must guess an appropriate C type into which to convert the data. It does so by looking at the first @@ -411,9 +411,9 @@ =back -This function always returns a valid Dirfile object, even if the call failed; +This function always returns a Dirfile object, even if the call failed; the caller should use the returned dirfile's L<error>() method to test for -success. +success. On error, the returned object will be flagged as invalid. =item invalid_dirfile () Modified: trunk/getdata/configure.ac =================================================================== --- trunk/getdata/configure.ac 2012-06-25 15:13:34 UTC (rev 723) +++ trunk/getdata/configure.ac 2012-06-27 00:51:18 UTC (rev 724) @@ -312,6 +312,9 @@ AC_CHECK_PROGS([DIFF], [diff], []) GD_MSYS_SHELL +echo +echo "*** Checking host environment" +echo AC_MSG_CHECKING([whether ${host} supports fast unaligned memory access]) case "${host}" in i?86-*-*|powerpc-*-*|x86_64-*-*) gd_unaligned_ok=yes; @@ -965,6 +968,9 @@ AC_CONFIG_FILES([bindings/python/Makefile]) AC_CONFIG_FILES([bindings/python/test/Makefile]) AC_CONFIG_FILES([doc/Makefile]) +if test "x$make_perlbindings" != "xno"; then +AC_CONFIG_FILES([doc/README.perl]) +fi AC_CONFIG_FILES([man/Makefile]) AC_CONFIG_FILES([man/gd_alter_encoding.3]) AC_CONFIG_FILES([man/gd_alter_endianness.3]) Deleted: trunk/getdata/doc/README.perl =================================================================== --- trunk/getdata/doc/README.perl 2012-06-25 15:13:34 UTC (rev 723) +++ trunk/getdata/doc/README.perl 2012-06-27 00:51:18 UTC (rev 724) @@ -1,12 +0,0 @@ -PERL BINDINGS FOR GETDATA -========================= - -The Perl bindings consist of a perl module, `GetData.pm'. They should work with -Perl 5.6 or newer. Complex is represented within the module as Math::Complex -objects. - -The GetData Perl bindings are documented in POD markup within GetData.pm. -After installation, this documentation should be available in section 3 of the -UNIX manual: - - $ man 3 GetData Copied: trunk/getdata/doc/README.perl.in (from rev 722, trunk/getdata/doc/README.perl) =================================================================== --- trunk/getdata/doc/README.perl.in (rev 0) +++ trunk/getdata/doc/README.perl.in 2012-06-27 00:51:18 UTC (rev 724) @@ -0,0 +1,16 @@ +PERL BINDINGS FOR GETDATA +========================= + +The Perl bindings consist of a perl module, `GetData.pm'. They should work with +Perl 5.6 or newer. Complex data are represented within the module as +Math::Complex objects. + +The GetData Perl bindings are documented in POD markup within GetData.pm. +After installation, this documentation should be available in section @PERL_MAN3EXT@ of +the UNIX manual: + + $ man @PERL_MAN3EXT@ GetData + +Before installation, the manual can be read using a command along the lines of + + $ pod2man bindings/perl/GetData.pm.in | nroff -mandoc | less Modified: trunk/getdata/m4/perl.m4 =================================================================== --- trunk/getdata/m4/perl.m4 2012-06-25 15:13:34 UTC (rev 723) +++ trunk/getdata/m4/perl.m4 2012-06-27 00:51:18 UTC (rev 724) @@ -52,7 +52,7 @@ AC_DEFUN([GD_PERL_MAN3EXT], [ AC_MSG_CHECKING([for the section 3 manual page extension]) -PERL_MAN3EXT=`$PERL -MModule::Build -e 'print Module::Build->new(module_name=>"conftest",dist_version=>0)->config('man3ext');'` +PERL_MAN3EXT=`$PERL -MModule::Build -e 'print "\n>>GD ", Module::Build->new(module_name=>"conftest",dist_version=>0)->config('man3ext'), " GD<<";' | $AWK '/>>GD .* GD<</ { print @S|@2 }'` AC_MSG_RESULT([.$PERL_MAN3EXT]) AC_SUBST([PERL_MAN3EXT]) ]) Modified: trunk/getdata/man/Makefile.am =================================================================== --- trunk/getdata/man/Makefile.am 2012-06-25 15:13:34 UTC (rev 723) +++ trunk/getdata/man/Makefile.am 2012-06-27 00:51:18 UTC (rev 724) @@ -84,7 +84,6 @@ gd_get_carray_slice.3:gd_get_carray.3 \ gd_put_carray_slice.3:gd_put_carray.3 \ gd_delete.3:gd_delete_alias.3 \ - gd_rename.3:gd_rename_alias.3 \ gd_move.3:gd_move_alias.3 \ gd_hide.3:gd_unhide.3 \ gd_add_alias.3:gd_madd_alias.3 \ @@ -98,8 +97,8 @@ gd_frameoffset64.3:gd_alter_frameoffset64.3 #man conversion -HTMLMANS=$(addsuffix .html,$(nodist_man_MANS)) \ - $(addsuffix .html,$(dist_man_MANS)) +HTMLMANS=$(addsuffix .html,${nodist_man_MANS}) \ + $(addsuffix .html,${dist_man_MANS}) %.html: % make_html.pl ./make_html.pl $< > $@ Modified: trunk/getdata/man/dirfile-encoding.5 =================================================================== --- trunk/getdata/man/dirfile-encoding.5 2012-06-25 15:13:34 UTC (rev 723) +++ trunk/getdata/man/dirfile-encoding.5 2012-06-27 00:51:18 UTC (rev 724) @@ -231,7 +231,7 @@ The ZZSlim Encoding is a convolution of the Slim Encoding and the ZZip Encoding. To create ZZSlim Encoded files, first the raw data are compressed using the -slim library, and then these slim-compressed files are archived (and comrpessed +slim library, and then these slim-compressed files are archived (and compressed again) into a ZIP archive. As with the ZZip Encoding, the ZIP archive is .I raw.zip by default, but a different name may be specified with the @@ -239,7 +239,7 @@ directive. .PP Notably, since the archives have the same name as ZZip Encoded data, automatic -encodind detection on ZZSlim Encoded data always fails: they are incorrectly +encoding detection on ZZSlim Encoded data always fails: they are incorrectly identified as simply ZZip Encoded. As a result, an .B /ENCODING directive in the format file or else a Modified: trunk/getdata/man/dirfile-format.5 =================================================================== --- trunk/getdata/man/dirfile-format.5 2012-06-25 15:13:34 UTC (rev 723) +++ trunk/getdata/man/dirfile-format.5 2012-06-27 00:51:18 UTC (rev 724) @@ -205,8 +205,7 @@ 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 derived field exist -.RI ( q.v. ), +requriement 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: .IP .RS @@ -214,12 +213,12 @@ .I <name> <target> .RE .IP -A metafield alias may defined by using the +A metafield alias may defined using the .IR <parent-field> / <alias-name> syntax for .I name in the /ALIAS directive. No restriction is placed on -.IR target , +.IR target ; specifically, a metafield alias may target a top-level field, or a metafield of with a different parent; conversely, a top-level alias may target a metafield. @@ -237,7 +236,7 @@ \fB/ALIAS\fR field2/alias field1 .RE .IP -The metafield +the metafield .I field1/meta may not be referred to as .IR field2/alias/meta , @@ -294,7 +293,7 @@ The .I enc-datum token provides additional data for certain encoding schemes; see -.BR dirfile-format (5) +.BR dirfile-encoding (5) for details. The form of enc-datum is not specified. .PP The /ENCODING directive has @@ -531,7 +530,7 @@ and propagating downwards to sub-fragments after the directive. .PP In Standards Version 8 and earlier, its effect also propagates upwards back to -the parent fragment, and affect subsequent metadata. Starting with Standards +the parent fragment, and affects subsequent metadata. Starting with Standards Version 9, this no longer happens. As a result, a /VERSION directive which indicates a version of 9 or later never propagates upwards; additionally, /VERSION directives found in subfragments included in a Version 9 or later @@ -831,15 +830,8 @@ .I count and .I max -are non-negative integers, either or both may be literal numbers, or else -the field code of a -.B CONST -or -.B CARRAY -field type containing their values. +are non-negative integers. .PP -The resultant field has the same sample rate as -.IR input . At every sample .IR n , the derived field is computed as: @@ -1199,8 +1191,6 @@ .IR check . It may never be complex valued. .PP -The derived field has the same sample rate as -.IR input . Outside the region extracted, the value of the derived field is implementation dependent. .PP Modified: trunk/getdata/man/gd_delete.3 =================================================================== --- trunk/getdata/man/gd_delete.3 2012-06-25 15:13:34 UTC (rev 723) +++ trunk/getdata/man/gd_delete.3 2012-06-27 00:51:18 UTC (rev 724) @@ -65,7 +65,8 @@ specified a .B RAW field and this flag is not specified, the field will still be deleted but the -binary file will be left untouched. +binary file will be left untouched. Ignored by +.BR gd_delete_alias (). .TP .B GD_DEL_DEREF If the field to be deleted is a @@ -87,7 +88,8 @@ those, too. If the field has metafields and this flag is not specified, the call will fail with the .B GD_E_DELETE -error. +error. Ignored by +.BR gd_delete_alias (). .SH RETURN VALUE On successful deletion, zero is returned. On error, -1 is returned and the dirfile error is set to a non-zero error value. Possible error values are: Modified: trunk/getdata/man/gd_mplex_lookback.3 =================================================================== --- trunk/getdata/man/gd_mplex_lookback.3 2012-06-25 15:13:34 UTC (rev 723) +++ trunk/getdata/man/gd_mplex_lookback.3 2012-06-27 00:51:18 UTC (rev 724) @@ -13,7 +13,7 @@ .\" Texts. A copy of the license is included in the `COPYING.DOC' file .\" as part of this distribution. .\" -.TH gd_mplex_lookback 3 "21 April 2012" "Version 0.8.0" "GETDATA" +.TH gd_mplex_lookback 3 "20 June 2012" "Version 0.8.0" "GETDATA" .SH NAME gd_mplex_lookback \(em set the GetData lookback length for MPLEX fields. .SH SYNOPSIS @@ -35,7 +35,8 @@ If the first sample returned of a .B MPLEX -field does not contain the value of the field, GetData must search the field +field does not contain the value of the field, because the index field does not +take on the specified multiplex index value, GetData must search the field backwards to find the last time the field was updated, in order to propagate that value into the initial portion of the returned data. (See .BR gd_getdata (3) @@ -63,10 +64,8 @@ .I MPLEX cycles to search. Each .B MPLEX -field has its own -.B MPLEX -cycle length, measured in samples of the index field, which is defined as -follows: +field has its own MPLEX cycle length, measured in samples of the index field, +which is defined as follows: .IP \(bu if the .B MPLEX @@ -75,7 +74,7 @@ positive parameter (see the MPLEX definition in dirfile-format(5)), its MPLEX cycle length is that many samples; .IP \(bu -if the +otherwise, if the .B MPLEX field's .I count_val Modified: trunk/getdata/man/gd_naliases.3 =================================================================== --- trunk/getdata/man/gd_naliases.3 2012-06-25 15:13:34 UTC (rev 723) +++ trunk/getdata/man/gd_naliases.3 2012-06-27 00:51:18 UTC (rev 724) @@ -30,7 +30,7 @@ function queries a dirfile(5) database specified by .I dirfile and returns the number of aliases of the field specified by -.IR field code . +.IR field_code . The .I dirfile Modified: trunk/getdata/man/gd_rename.3 =================================================================== --- trunk/getdata/man/gd_rename.3 2012-06-25 15:13:34 UTC (rev 723) +++ trunk/getdata/man/gd_rename.3 2012-06-27 00:51:18 UTC (rev 724) @@ -13,9 +13,9 @@ .\" Texts. A copy of the license is included in the `COPYING.DOC' file .\" as part of this distribution. .\" -.TH gd_rename 3 "19 April 2012" "Version 0.8.0" "GETDATA" +.TH gd_rename 3 "27 June 2012" "Version 0.8.0" "GETDATA" .SH NAME -gd_rename, gd_rename_alias \(em change the name of a dirfile field or alias +gd_rename \(em change the name of a dirfile field or alias .SH SYNOPSIS .B #include <getdata.h> .HP @@ -23,15 +23,12 @@ .ad l .BI "int gd_rename(DIRFILE *" dirfile ", const char" .BI * old_code ", const char *" new_name ", unsigned int " flags ); -.HP -.BI "int gd_rename_alias(DIRFILE *" dirfile ", const char *" old_code , -.BI "const char *" new_name ); .hy .ad n .SH DESCRIPTION The .BR gd_rename () -function changes the name of the field specified by +function changes the name of the field or alias specified by .IR old_code , which should not contain a representation suffix, defined in the dirfile specified by @@ -40,18 +37,6 @@ .IR new_name . If the new name is the same as the old name, this function does nothing. -The -.BR gd_rename_alias () -function behaves similarly, but renames the alias specified by -.I alias_name -instead. (This function is needed, since passing -.I alias_name -to -.BR gd_rename () -as -.I old_code -would have resulted in the field pointed to by the alias being renamed instead.) - When renaming a metafield, the metafield should be specified in .I old_code by its full (slashed) field code, while Modified: trunk/getdata/man/make_html.pl =================================================================== --- trunk/getdata/man/make_html.pl 2012-06-25 15:13:34 UTC (rev 723) +++ trunk/getdata/man/make_html.pl 2012-06-27 00:51:18 UTC (rev 724) @@ -132,7 +132,7 @@ s/ / /g if ($nf and not /^\./); # sugar - s/\*\*([0-9]*)/<sup>$1<\/sup>/; + s/\*\*([0-9]+)/<sup>$1<\/sup>/; if ($table) { if (/center tab/) { @@ -366,7 +366,8 @@ $html =~ s/ \* / × /g; $html =~ s/\\~/ /g; $html =~ s/(<B>(gd_\w*?)<\/B>\(3\))/<A HREF="$2.3.html">$1<\/A>/g; -$html =~ s/((?:<B>)?(dirfile[-a-z]*)(?:<\/B>)?\(5\))/<A HREF="$2.5.html">$1<\/A>/g; +$html =~ s/(<B>(dirfile[-a-z]*)<\/B>\(5\))/<A HREF="$2.5.html">$1<\/A>/g; +$html =~ s/([^>])(dirfile[-a-z]*)<\/B>\(5\)/$1<A HREF="$2.5.html">$2<\/A>/g; $html =~ s/\\e/\\/g; Modified: trunk/getdata/src/add.c =================================================================== --- trunk/getdata/src/add.c 2012-06-25 15:13:34 UTC (rev 723) +++ trunk/getdata/src/add.c 2012-06-27 00:51:18 UTC (rev 724) @@ -551,8 +551,8 @@ D->fragment[E->fragment_index].modified = 1; D->flags &= ~GD_HAVE_VERSION; - /* Update aliases */ - _GD_UpdateAliases(D); + /* Update aliases - no reason to do a reset: all we did was add a field */ + _GD_UpdateAliases(D, 0); dreturn("%p", E); return E; @@ -621,7 +621,7 @@ } /* Update aliases */ - _GD_UpdateAliases(D); + _GD_UpdateAliases(D, 0); D->fragment[me].modified = 1; D->flags &= ~GD_HAVE_VERSION; @@ -686,7 +686,7 @@ } /* Update aliases */ - _GD_UpdateAliases(D); + _GD_UpdateAliases(D, 0); D->fragment[fragment_index].modified = 1; D->flags &= ~GD_HAVE_VERSION; @@ -2040,7 +2040,7 @@ /* Update aliases */ - _GD_UpdateAliases(D); + _GD_UpdateAliases(D, 0); dreturn("%i", 0); return 0; Modified: trunk/getdata/src/getdata.h.in =================================================================== --- trunk/getdata/src/getdata.h.in 2012-06-25 15:13:34 UTC (rev 723) +++ trunk/getdata/src/getdata.h.in 2012-06-27 00:51:18 UTC (rev 724) @@ -889,9 +889,6 @@ extern const char *gd_reference(DIRFILE *dirfile, const char *field_code) gd_nothrow gd_nonnull ((1)); -extern int gd_rename_alias(DIRFILE *dirfile, const char *old_code, - const char *new_name) gd_nothrow gd_nonnull ((1,2,3)); - extern unsigned int gd_spf(DIRFILE *dirfile, const char *field_code) gd_nothrow gd_nonnull ((1, 2)); Modified: trunk/getdata/src/internal.h =================================================================== --- trunk/getdata/src/internal.h 2012-06-25 15:13:34 UTC (rev 723) +++ trunk/getdata/src/internal.h 2012-06-27 00:51:18 UTC (rev 724) @@ -1124,7 +1124,7 @@ int _GD_Tokenise(DIRFILE *restrict, const char *restrict, char **, const char **, int, char **, const char *restrict, int linenum, int standards, int pedantic); -void _GD_UpdateAliases(DIRFILE*); +void _GD_UpdateAliases(DIRFILE*, int); int _GD_ValidateField(const char*, int, int, int, int*); off64_t _GD_WriteSeek(DIRFILE *restrict, gd_entry_t *restrict, const struct encoding_t *restrict, off64_t, unsigned int mode); Modified: trunk/getdata/src/name.c =================================================================== --- trunk/getdata/src/name.c 2012-06-25 15:13:34 UTC (rev 723) +++ trunk/getdata/src/name.c 2012-06-27 00:51:18 UTC (rev 724) @@ -204,13 +204,23 @@ * pass == 3: initialise update */ static char **_GD_UpdateScalar(DIRFILE *D, gd_entry_t *T, const gd_entry_t *E, - char **list, size_t len, int n, int pass, int *nl) + const char *old_name, char **list, size_t len, int n, int pass, int *nl) { char **ptr; - dtrace("%p, %p, %p, %p, %" PRNsize_t ", %i, %i, %i", D, T, E, list, len, n, - pass, *nl); + size_t old_len; - if (pass & GD_UPDI) { + dtrace("%p, %p, %p, \"%s\", %p, %" PRNsize_t ", %i, %i, %i", D, T, E, + old_name, list, len, n, pass, *nl); + + old_len = strlen(old_name); + if (strncmp(T->scalar[n], old_name, old_len) || + !(T->scalar[n][old_len] == 0 || T->scalar[n][old_len] == '.')) + { + dreturn("%p (-)", list); + return list; + } + + if (pass & GD_UPDI) { /* pass 1 or 3 */ if ((ptr = (char**)_GD_Realloc(D, list, sizeof(char *) * (*nl + 1))) == NULL) { @@ -220,7 +230,11 @@ } list = ptr; list[(*nl)++] = (char*)_GD_Malloc(D, len + 3); + } else if (pass == 0) { + if (!T->e->calculated) + _GD_CalculateEntry(D, T, 0); } else if (pass == 2) { + T->e->calculated = 0; D->fragment[T->fragment_index].modified = 1; free(T->scalar[n]); T->scalar[n] = list[(*nl)++]; @@ -236,91 +250,42 @@ return list; } -static char **_GD_InvalidateConst(DIRFILE *D, const gd_entry_t *E, char **list, - size_t len, int pass, int *nl) -{ - int i, j; - unsigned u; - - dtrace("%p, %p, %p, %" PRNsize_t ", %i, %p", D, E, list, len, pass, nl); - - if (pass & GD_UPDI) - for (u = 0; u < D->n_entries; ++u) - if (!D->entry[u]->e->calculated) - _GD_CalculateEntry(D, D->entry[u], 0); - - for (j = 0; j < E->e->u.scalar.n_client; ++j) { - if (!(pass & GD_UPDI)) - E->e->u.scalar.client[j]->e->calculated = 0; - - if (!(pass & GD_UPDU)) - continue; - - switch (E->e->u.scalar.client[j]->field_type) { - case GD_LINCOM_ENTRY: - for (i = 0; i < E->e->u.scalar.client[j]->EN(lincom,n_fields); ++i) { - list = _GD_UpdateScalar(D, E->e->u.scalar.client[j], E, list, len, i, - pass, nl); - list = _GD_UpdateScalar(D, E->e->u.scalar.client[j], E, list, len, - i + GD_MAX_LINCOM, pass, nl); - } - break; - case GD_POLYNOM_ENTRY: - for (i = 0; i <= E->e->u.scalar.client[j]->EN(polynom,poly_ord); ++i) - list = _GD_UpdateScalar(D, E->e->u.scalar.client[j], E, list, len, i, - pass, nl); - break; - case GD_BIT_ENTRY: - case GD_SBIT_ENTRY: - case GD_MPLEX_ENTRY: - list = _GD_UpdateScalar(D, E->e->u.scalar.client[j], E, list, len, 1, - pass, nl); - /* Fallthrough */ - case GD_PHASE_ENTRY: - case GD_RAW_ENTRY: - case GD_RECIP_ENTRY: - case GD_WINDOW_ENTRY: - list = _GD_UpdateScalar(D, E->e->u.scalar.client[j], E, list, len, 0, - pass, nl); - break; - case GD_NO_ENTRY: - case GD_LINTERP_ENTRY: - case GD_MULTIPLY_ENTRY: - case GD_DIVIDE_ENTRY: - case GD_INDEX_ENTRY: - case GD_STRING_ENTRY: - case GD_CONST_ENTRY: - case GD_CARRAY_ENTRY: - break; - } - } - - dreturn("%p", list); - return list; -} - /* pass == 0: clear cached derived entries - * pass == 1: initialise re-writen derived channels + * pass == 1: unused * pass == 2: finalise re-writen derivd channels + * pass == 3: initialise re-writen derived channels */ static char **_GD_UpdateInField(DIRFILE *D, gd_entry_t *T, const gd_entry_t *E, - char **list, size_t len, int n, int pass, int *nl) + const char *old_name, char **list, size_t len, int n, int pass, int *nl) { char **ptr; - dtrace("%p, %p, %p, %p, %" PRNsize_t ", %i, %i, %i", D, T, E, list, len, n, - pass, *nl); + int m = n; + dtrace("%p, %p, %p, \"%s\", %p, %" PRNsize_t ", %i, %i, %i", D, T, E, + old_name, list, len, n, pass, *nl); - if (pass != 0 && T->e->entry[n] == NULL) + if (T->field_type == GD_ALIAS_ENTRY) + m = 1; + else if (pass != 0 && T->e->entry[n] == NULL) _GD_BadInput(D, T, n, 0); - if (T->e->entry[n] != E) { + if (E->field_type == GD_ALIAS_ENTRY) { + /* it's hard to detect the use of an alias other than by inspecting the + * name itself */ + size_t len = strlen(old_name); + if (strncmp(T->in_fields[n], old_name, len) || + !(T->in_fields[n][len] == 0 || T->in_fields[n][len] == '.')) + { + dreturn("%p (a-)", list); + return list; + } + } else if (T->e->entry[m] != E) { dreturn("%p (-)", list); return list; } if (pass == 0) - T->e->entry[n] = NULL; - else if (pass == 1) { + T->e->entry[m] = NULL; + else if (pass == 3) { if ((ptr = (char**)_GD_Realloc(D, list, sizeof(char *) * (*nl + 1))) == NULL) { @@ -346,32 +311,99 @@ return list; } -static char **_GD_InvalidateVect(DIRFILE *D, const gd_entry_t *E, char **list, - size_t len, int pass, int *nl) +static char **_GD_InvalidateConst(DIRFILE *D, const gd_entry_t *E, + const char *old_name, char **list, size_t len, int pass, int *nl) { + int i; unsigned u; + dtrace("%p, %p, \"%s\", %p, %" PRNsize_t ", %i, %p", D, E, old_name, list, + len, pass, nl); + + /* aliases prevent us from just running over this field's client list */ + for (u = 0; u < D->n_entries; ++u) + if (D->entry[u] != E) { + switch (D->entry[u]->field_type) { + case GD_LINCOM_ENTRY: + for (i = 0; i < D->entry[u]->EN(lincom,n_fields); ++i) { + list = _GD_UpdateScalar(D, D->entry[u], E, old_name, list, len, i, + pass, nl); + list = _GD_UpdateScalar(D, D->entry[u], E, old_name, list, len, + i + GD_MAX_LINCOM, pass, nl); + } + break; + case GD_POLYNOM_ENTRY: + for (i = 0; i <= D->entry[u]->EN(polynom,poly_ord); ++i) + list = _GD_UpdateScalar(D, D->entry[u], E, old_name, list, len, i, + pass, nl); + break; + case GD_BIT_ENTRY: + case GD_SBIT_ENTRY: + case GD_MPLEX_ENTRY: + list = _GD_UpdateScalar(D, D->entry[u], E, old_name, list, len, 1, + pass, nl); + /* Fallthrough */ + case GD_PHASE_ENTRY: + case GD_RAW_ENTRY: + case GD_RECIP_ENTRY: + case GD_WINDOW_ENTRY: + list = _GD_UpdateScalar(D, D->entry[u], E, old_name, list, len, 0, + pass, nl); + break; + case GD_ALIAS_ENTRY: + list = _GD_UpdateInField(D, D->entry[u], E, old_name, list, len, 0, + pass, nl); + break; + case GD_NO_ENTRY: + case GD_LINTERP_ENTRY: + case GD_MULTIPLY_ENTRY: + case GD_DIVIDE_ENTRY: + case GD_INDEX_ENTRY: + case GD_STRING_ENTRY: + case GD_CONST_ENTRY: + case GD_CARRAY_ENTRY: + break; + } + } + + /* gotta update those aliases ... */ + for (u = 0; u < D->n_entries; ++u) + if (D->entry[u] != E && D->entry[u]->field_type == GD_ALIAS_ENTRY) + + dreturn("%p", list); + return list; +} + +static char **_GD_InvalidateVect(DIRFILE *D, const gd_entry_t *E, + const char *old_name, char **list, size_t len, int pass, int *nl) +{ + unsigned u; + dtrace("%p, %p, %p, %" PRNsize_t ", %i, %p", D, E, list, len, pass, nl); for (u = 0; u < D->n_entries; ++u) { if (D->entry[u] != E) switch (D->entry[u]->field_type) { case GD_LINCOM_ENTRY: - list = _GD_UpdateInField(D, D->entry[u], E, list, len, 2, pass, nl); + list = _GD_UpdateInField(D, D->entry[u], E, old_name, list, len, 2, + pass, nl); /* Fallthrough */ case GD_MULTIPLY_ENTRY: case GD_DIVIDE_ENTRY: case GD_WINDOW_ENTRY: case GD_MPLEX_ENTRY: - list = _GD_UpdateInField(D, D->entry[u], E, list, len, 1, pass, nl); + list = _GD_UpdateInField(D, D->entry[u], E, old_name, list, len, 1, + pass, nl); /* Fallthrough */ + case GD_ALIAS_ENTRY: case GD_LINTERP_ENTRY: case GD_BIT_ENTRY: case GD_PHASE_ENTRY: case GD_POLYNOM_ENTRY: case GD_RECIP_ENTRY: case GD_SBIT_ENTRY: - list = _GD_UpdateInField(D, D->entry[u], E, list, len, 0, pass, nl); + list = _GD_UpdateInField(D, D->entry[u], E, old_name, list, len, 0, + pass, nl); break; case GD_INDEX_ENTRY: case GD_RAW_ENTRY: @@ -593,6 +625,7 @@ gd_entry_t *E = NULL; int ret, i, nl = 0, old_dot = 0; size_t len; + gd_entype_t type; unsigned dot_ind = 0; char **code_list = NULL; @@ -615,7 +648,7 @@ if (E) old_dot = 1; else - E = _GD_FindField(D, old_code, D->entry, D->n_entries, 1, NULL); + E = _GD_FindField(D, old_code, D->entry, D->n_entries, 0, NULL); if (E == NULL) { _GD_SetError(D, GD_E_BAD_CODE, GD_E_CODE_MISSING, NULL, 0, old_code); @@ -623,19 +656,26 @@ return -1; } - if (E->field_type == GD_INDEX_ENTRY) { + type = E->field_type; + + if (type == GD_INDEX_ENTRY) { _GD_SetError(D, GD_E_BAD_FIELD_TYPE, GD_E_FIELD_BAD, NULL, 0, "INDEX"); dreturn("%i", -1); return -1; } + /* resolve field type */ + if (type == GD_ALIAS_ENTRY && E->e->entry[0]) + type = E->e->entry[0]->field_type; + /* check derived/client fields */ - if (E->field_type == GD_CARRAY_ENTRY || E->field_type == GD_CONST_ENTRY) - code_list = _GD_InvalidateConst(D, E, code_list, len, + if (type == GD_CARRAY_ENTRY || type == GD_CONST_ENTRY) + code_list = _GD_InvalidateConst(D, E, old_code, code_list, len, GD_UPDI | (flags & GD_REN_UPDB ? GD_UPDU : 0), &nl); - else if (E->field_type != GD_STRING_ENTRY) + else if (type != GD_STRING_ENTRY) if (flags & GD_REN_UPDB) - code_list = _GD_InvalidateVect(D, E, code_list, len, 1, &nl); + code_list = _GD_InvalidateVect(D, E, old_code, code_list, len, + GD_UPDI | GD_UPDU, &nl); if (D->error) { if (code_list) { @@ -652,14 +692,17 @@ if (!ret) { nl = 0; /* update derived/client fields */ - if (E->field_type == GD_CARRAY_ENTRY || E->field_type == GD_CONST_ENTRY) - _GD_InvalidateConst(D, E, code_list, 0, + if (type == GD_CARRAY_ENTRY || type == GD_CONST_ENTRY) + _GD_InvalidateConst(D, E, old_code, code_list, 0, flags & GD_REN_UPDB ? GD_UPDU : 0, &nl); - else if (E->field_type != GD_STRING_ENTRY) - _GD_InvalidateVect(D, E, code_list, 0, + else if (type != GD_STRING_ENTRY) + _GD_InvalidateVect(D, E, old_code, code_list, 0, flags & GD_REN_UPDB ? GD_UPDU : 0, &nl); } + /* rehash the aliases */ + _GD_UpdateAliases(D, 1); + if (code_list) { if (D->error) for (i = 0; i < nl; ++i) @@ -670,39 +713,3 @@ dreturn("%i", ret); return ret; } - -int gd_rename_alias(DIRFILE *D, const char *old_code, const char *new_name) - gd_nothrow -{ - gd_entry_t *E; - int ret; - - dtrace("%p, \"%s\", \"%s\"", D, old_code, new_name); - - if (D->flags & GD_INVALID) { - _GD_SetError(D, GD_E_BAD_DIRFILE, 0, NULL, 0, NULL); - dreturn("%i", -1); - return -1; - } - - _GD_ClearError(D); - - E = _GD_FindField(D, old_code, D->entry, D->n_entries, 0, NULL); - - if (E == NULL) { - _GD_SetError(D, GD_E_BAD_CODE, GD_E_CODE_MISSING, NULL, 0, old_code); - dreturn("%i", -1); - return -1; - } - - if (E->field_type != GD_ALIAS_ENTRY) { - _GD_SetError(D, GD_E_BAD_FIELD_TYPE, GD_E_FIELD_BAD, NULL, 0, "INDEX"); - dreturn("%i", -1); - return -1; - } - - ret = _GD_Rename(D, E, new_name, 0, 0, 0); - - dreturn("%i", ret); - return ret; -} Modified: trunk/getdata/src/parse.c =================================================================== --- trunk/getdata/src/parse.c 2012-06-25 15:13:34 UTC (rev 723) +++ trunk/getdata/src/parse.c 2012-06-27 00:51:18 UTC (rev 724) @@ -2229,12 +2229,17 @@ return D->error ? NULL : E->e->entry[0]; } -void _GD_UpdateAliases(DIRFILE *D) +void _GD_UpdateAliases(DIRFILE *D, int reset) { unsigned u; - dtrace("%p", D); + dtrace("%p, %i", D, reset); + if (reset) + for (u = 0; u < D->n_entries; ++u) + if (D->entry[u]->field_type == GD_ALIAS_ENTRY) + D->entry[u]->e->entry[0] = D->entry[u]->e->entry[1] = NULL; + for (u = 0; u < D->n_entries; ++u) if (D->entry[u]->field_type == GD_ALIAS_ENTRY && D->entry[u]->e->entry[1] == NULL) @@ -2377,7 +2382,7 @@ /* resolve aliases, if requested */ if (resolve && !D->error) - _GD_UpdateAliases(D); + _GD_UpdateAliases(D, 0); dreturn("%p", ref_name); return ref_name; 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_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_after name_after_const name_dup name_move name_updb name_updb_const nentries_alias nentries_hidden 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_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_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 rep... [truncated message content] |
From: <ket...@us...> - 2012-06-28 00:24:16
|
Revision: 726 http://getdata.svn.sourceforge.net/getdata/?rev=726&view=rev Author: ketiltrout Date: 2012-06-28 00:24:07 +0000 (Thu, 28 Jun 2012) Log Message: ----------- Allow retrieval of aliases via gd_entry_list using GD_ALIAS_ENTRIES. This is the only way to discover dangling aliases. Modified Paths: -------------- trunk/getdata/ChangeLog trunk/getdata/bindings/cxx/dirfile.cpp trunk/getdata/bindings/cxx/entry.cpp trunk/getdata/bindings/cxx/getdata/dirfile.h trunk/getdata/bindings/f77/fgetdata.c trunk/getdata/bindings/idl/getdata.c trunk/getdata/bindings/make_parameters.c trunk/getdata/bindings/perl/GetData.xs trunk/getdata/bindings/perl/typemap trunk/getdata/bindings/python/pydirfile.c trunk/getdata/bindings/python/pyentry.c trunk/getdata/src/add.c trunk/getdata/src/common.c trunk/getdata/src/del.c trunk/getdata/src/entry.c trunk/getdata/src/field_list.c trunk/getdata/src/flimits.c trunk/getdata/src/flush.c trunk/getdata/src/fpos.c trunk/getdata/src/getdata.c trunk/getdata/src/getdata.h.in trunk/getdata/src/internal.h trunk/getdata/src/legacy.c trunk/getdata/src/mod.c trunk/getdata/src/native.c trunk/getdata/src/nfields.c trunk/getdata/src/putdata.c trunk/getdata/src/spf.c trunk/getdata/test/Makefile.am trunk/getdata/util/checkdirfile.c Added Paths: ----------- trunk/getdata/test/elist_alias.c trunk/getdata/test/nentries_alias.c Property Changed: ---------------- trunk/getdata/test/ Modified: trunk/getdata/ChangeLog =================================================================== --- trunk/getdata/ChangeLog 2012-06-27 23:16:46 UTC (rev 725) +++ trunk/getdata/ChangeLog 2012-06-28 00:24:07 UTC (rev 726) @@ -1,3 +1,23 @@ +2012-06-28 D. V. Wiebe <ge...@ke...> svn:725,726 + * util/checkdirfile.c: Find and report dangling aliases. + + * bindings/python/pydirfile.c (gdpy_dirfile_nentries gdpy_dirfile_entrylist) + bindings/cxx/dirfile.cpp (Dirfile::NEntries Dirfile::EntryList) + bindings/perl/GetData.xs (entry_list) : Fix signedness of "type". + * bindings/idl/getdata.c (gdidl_get_field_list gdidl_get_nfields): Deal with + /ALIASES. + * bindings/make_parameters.c: Add GD_ALIAS_ENTRIES. + + * test/nentries_noalias.c test/elist_noalias.c: Renamed from ..._alias.c. + * test/nentries_alias.c test/elist_alias.c: Added. + + * src/internal.h getdata.h.in: Move GD_ALIAS_ENTRY to public header. + * src/getdata.h.in: Define GD_ALIAS_ENTRIES. + * src/field_list.c (_GD_EntryIndex _GD_ListEntry) src/nfields.c + (_GD_NEntries): Handle GD_ALIAS_ENTRIES. + + * src/common.c (_GD_CanonicalPath): Sidestep GCC warning. + 2012-06-27 D. V. Wiebe <ge...@ke...> svn:724 * src/name.c (_GD_UpdateScalar _GD_InvalidateConst _GD_UpdateInField _GD_InvalidateVect): Handle aliases. Modified: trunk/getdata/bindings/cxx/dirfile.cpp =================================================================== --- trunk/getdata/bindings/cxx/dirfile.cpp 2012-06-27 23:16:46 UTC (rev 725) +++ trunk/getdata/bindings/cxx/dirfile.cpp 2012-06-28 00:24:07 UTC (rev 726) @@ -555,14 +555,14 @@ gd_mplex_lookback(D, lookback); } -unsigned int Dirfile::NEntries(const char *parent, unsigned int type, - unsigned int flags) const +unsigned int Dirfile::NEntries(const char *parent, int type, unsigned int flags) + const { return gd_nentries(D, parent, type, flags); } -const char** Dirfile::EntryList(const char *parent, unsigned int type, - unsigned int flags) const +const char** Dirfile::EntryList(const char *parent, int type, + unsigned int flags) const { return gd_entry_list(D, parent, type, flags); } Modified: trunk/getdata/bindings/cxx/entry.cpp =================================================================== --- trunk/getdata/bindings/cxx/entry.cpp 2012-06-27 23:16:46 UTC (rev 725) +++ trunk/getdata/bindings/cxx/entry.cpp 2012-06-28 00:24:07 UTC (rev 726) @@ -51,6 +51,7 @@ case GD_CARRAY_ENTRY: case GD_STRING_ENTRY: case GD_NO_ENTRY: + case GD_ALIAS_ENTRY: return 0; case GD_LINCOM_ENTRY: if (index > n_fields) @@ -172,6 +173,7 @@ case GD_CARRAY_ENTRY: case GD_STRING_ENTRY: case GD_NO_ENTRY: + case GD_ALIAS_ENTRY: return 0; } Modified: trunk/getdata/bindings/cxx/getdata/dirfile.h =================================================================== --- trunk/getdata/bindings/cxx/getdata/dirfile.h 2012-06-27 23:16:46 UTC (rev 725) +++ trunk/getdata/bindings/cxx/getdata/dirfile.h 2012-06-28 00:24:07 UTC (rev 726) @@ -127,7 +127,7 @@ GetData::Entry* Entry(const char *field_code) const; - const char **EntryList(const char *parent = NULL, unsigned int type = 0, + const char **EntryList(const char *parent = NULL, int type = 0, unsigned int flags = 0) const; gd_off64_t EoF(const char *field_code) const; @@ -209,7 +209,7 @@ int NAliases(const char* field_code) const; - unsigned int NEntries(const char *parent = NULL, unsigned int type = 0, + unsigned int NEntries(const char *parent = NULL, int type = 0, unsigned int flags = 0) const; unsigned int NFields() const; Modified: trunk/getdata/bindings/f77/fgetdata.c =================================================================== --- trunk/getdata/bindings/f77/fgetdata.c 2012-06-27 23:16:46 UTC (rev 725) +++ trunk/getdata/bindings/f77/fgetdata.c 2012-06-28 00:24:07 UTC (rev 726) @@ -3082,6 +3082,7 @@ ok = 1; switch (E.field_type) { case GD_NO_ENTRY: + case GD_ALIAS_ENTRY: case GD_LINTERP_ENTRY: case GD_MULTIPLY_ENTRY: case GD_DIVIDE_ENTRY: @@ -3153,6 +3154,7 @@ switch (E.field_type) { case GD_NO_ENTRY: + case GD_ALIAS_ENTRY: case GD_LINTERP_ENTRY: case GD_MULTIPLY_ENTRY: case GD_DIVIDE_ENTRY: Modified: trunk/getdata/bindings/idl/getdata.c =================================================================== --- trunk/getdata/bindings/idl/getdata.c 2012-06-27 23:16:46 UTC (rev 725) +++ trunk/getdata/bindings/idl/getdata.c 2012-06-28 00:24:07 UTC (rev 726) @@ -613,6 +613,7 @@ IDL_MSG_LONGJMP, NULL)) = E->const_type; break; case GD_NO_ENTRY: + case GD_ALIAS_ENTRY: case GD_INDEX_ENTRY: case GD_STRING_ENTRY: break; @@ -1005,6 +1006,7 @@ E->const_type = GD_NULL; break; case GD_NO_ENTRY: + case GD_ALIAS_ENTRY: case GD_INDEX_ENTRY: case GD_STRING_ENTRY: break; @@ -4026,19 +4028,20 @@ typedef struct { IDL_KW_RESULT_FIRST_FIELD; GDIDL_KW_RESULT_ERROR; - unsigned int type; + int type; IDL_STRING parent; int parent_x; - int hidden, noalias, scalars, vectors; + int hidden, noalias, scalars, vectors, aliases; } KW_RESULT; KW_RESULT kw; GDIDL_KW_INIT_ERROR; kw.type = 0; - kw.hidden = kw.noalias = kw.scalars = kw.vectors = 0; + kw.hidden = kw.noalias = kw.scalars = kw.vectors = kw.aliases = 0; kw.parent_x = 0; static IDL_KW_PAR kw_pars[] = { + { "ALIASES", IDL_TYP_INT, 1, 0, 0, IDL_KW_OFFSETOF(aliases) }, GDIDL_KW_PAR_ERROR, GDIDL_KW_PAR_ESTRING, { "HIDDEN", IDL_TYP_INT, 1, 0, 0, IDL_KW_OFFSETOF(hidden) }, @@ -4068,6 +4071,8 @@ kw.type = GD_VECTOR_ENTRIES; else if (kw.scalars) kw.type = GD_SCALAR_ENTRIES; + else if (kw.aliases) + kw.type = GD_ALIAS_ENTRIES; } nentries = gd_nentries(D, parent, kw.type, flags); @@ -4248,19 +4253,20 @@ typedef struct { IDL_KW_RESULT_FIRST_FIELD; GDIDL_KW_RESULT_ERROR; - unsigned int type; + int type; IDL_STRING parent; int parent_x; - int hidden, noalias, scalars, vectors; + int aliases, hidden, noalias, scalars, vectors; } KW_RESULT; KW_RESULT kw; GDIDL_KW_INIT_ERROR; kw.type = 0; - kw.hidden = kw.noalias = kw.scalars = kw.vectors = 0; + kw.hidden = kw.noalias = kw.scalars = kw.vectors = kw.aliases = 0; kw.parent_x = 0; static IDL_KW_PAR kw_pars[] = { + { "ALIASES", IDL_TYP_INT, 1, 0, 0, IDL_KW_OFFSETOF(aliases) }, GDIDL_KW_PAR_ERROR, GDIDL_KW_PAR_ESTRING, { "HIDDEN", IDL_TYP_INT, 1, 0, 0, IDL_KW_OFFSETOF(hidden) }, @@ -4290,6 +4296,8 @@ kw.type = GD_VECTOR_ENTRIES; else if (kw.scalars) kw.type = GD_SCALAR_ENTRIES; + else if (kw.aliases) + kw.type = GD_ALIAS_ENTRIES; } nentries = gd_nentries(D, parent, kw.type, flags); Modified: trunk/getdata/bindings/make_parameters.c =================================================================== --- trunk/getdata/bindings/make_parameters.c 2012-06-27 23:16:46 UTC (rev 725) +++ trunk/getdata/bindings/make_parameters.c 2012-06-28 00:24:07 UTC (rev 726) @@ -223,9 +223,10 @@ CONSTANT(DESYNC_PATHCHECK, "GDDS_P", 13), CONSTANT(DESYNC_REOPEN, "GDDS_O", 13), - CONSTANT(ALL_ENTRIES, "GDEN_A", 14), + CONSTANT(ALL_ENTRIES, "GDEN_X", 14), CONSTANT(VECTOR_ENTRIES, "GDEN_V", 14), CONSTANT(SCALAR_ENTRIES, "GDEN_S", 14), + CONSTANT(ALIAS_ENTRIES, "GDEN_A", 14), CONSTANT(ENTRIES_HIDDEN, "GDEN_H", 14), CONSTANT(ENTRIES_NOALIAS, "GDEN_N", 14), Modified: trunk/getdata/bindings/perl/GetData.xs =================================================================== --- trunk/getdata/bindings/perl/GetData.xs 2012-06-27 23:16:46 UTC (rev 725) +++ trunk/getdata/bindings/perl/GetData.xs 2012-06-28 00:24:07 UTC (rev 726) @@ -1517,14 +1517,14 @@ entry_list(dirfile, parent, type, flags) DIRFILE * dirfile gdpu_char * parent - gdpu_type_t type + gdpu_int type gdpu_uint_t flags PREINIT: GDP_DIRFILE_ALIAS; ALIAS: GetData::Dirfile::entry_list = 1 PPCODE: - dtrace("%p, \"%s\", %u, %u; %i", dirfile, parent, type, flags, + dtrace("%p, \"%s\", %i, %u; %i", dirfile, parent, type, flags, (int)GIMME_V); /* in array context, return the field list, otherwise return nfields */ Modified: trunk/getdata/bindings/perl/typemap =================================================================== --- trunk/getdata/bindings/perl/typemap 2012-06-27 23:16:46 UTC (rev 725) +++ trunk/getdata/bindings/perl/typemap 2012-06-28 00:24:07 UTC (rev 726) @@ -11,7 +11,7 @@ gd_entype_t T_UV gd_shift_t T_IV gd_triplet_t T_TRIPLET -gd_type_t T_UV +gd_type_t T_IV gd_windop_t T_IV # GetData Perl pseudotypes @@ -22,7 +22,7 @@ gdpu_numbits_t T_IV_ZERO gdpu_shift_t T_IV_ZERO gdpu_uint_t T_UV_ZERO -gdpu_type_t T_UV_ZERO +gdpu_type_t T_IV_ZERO gdpu_complex T_COMPLEX_ZERO Modified: trunk/getdata/bindings/python/pydirfile.c =================================================================== --- trunk/getdata/bindings/python/pydirfile.c 2012-06-27 23:16:46 UTC (rev 725) +++ trunk/getdata/bindings/python/pydirfile.c 2012-06-28 00:24:07 UTC (rev 726) @@ -2606,11 +2606,12 @@ dtrace("%p, %p, %p", self, args, keys); char* keywords[] = { "parent", "type", "flags", NULL }; - unsigned int nentries, type = 0, flags = 0; + unsigned int nentries, flags = 0; + int type = 0; const char *parent = NULL; if (!PyArg_ParseTupleAndKeywords(args, keys, - "|sII:pygetdata.dirfile.nentries", keywords, &parent, &type, &flags)) + "|siI:pygetdata.dirfile.nentries", keywords, &parent, &type, &flags)) { dreturn("%p", NULL); return NULL; @@ -2633,12 +2634,12 @@ const char **entries; char* keywords[] = { "parent", "type", "flags", NULL }; - int i; - unsigned int type = 0, flags = 0; + int i, type = 0; + unsigned int flags = 0; const char *parent = NULL; if (!PyArg_ParseTupleAndKeywords(args, keys, - "|sII:pygetdata.dirfile.entry_list", keywords, &parent, &type, &flags)) + "|siI:pygetdata.dirfile.entry_list", keywords, &parent, &type, &flags)) { dreturn("%p", NULL); return NULL; Modified: trunk/getdata/bindings/python/pyentry.c =================================================================== --- trunk/getdata/bindings/python/pyentry.c 2012-06-27 23:16:46 UTC (rev 725) +++ trunk/getdata/bindings/python/pyentry.c 2012-06-28 00:24:07 UTC (rev 726) @@ -460,6 +460,7 @@ PyErr_SetString(PyExc_ValueError, "'pygetdata.entry' invalid data type"); case GD_NO_ENTRY: + case GD_ALIAS_ENTRY: case GD_STRING_ENTRY: case GD_INDEX_ENTRY: break; @@ -571,6 +572,7 @@ break; case GD_STRING_ENTRY: case GD_NO_ENTRY: + case GD_ALIAS_ENTRY: case GD_INDEX_ENTRY: break; } @@ -778,6 +780,7 @@ self->E->in_fields[1]); break; case GD_NO_ENTRY: + case GD_ALIAS_ENTRY: case GD_RAW_ENTRY: case GD_INDEX_ENTRY: case GD_CONST_ENTRY: @@ -889,6 +892,7 @@ } break; case GD_NO_ENTRY: + case GD_ALIAS_ENTRY: case GD_RAW_ENTRY: case GD_INDEX_ENTRY: case GD_CONST_ENTRY: @@ -1855,6 +1859,7 @@ switch (self->E->field_type) { case GD_NO_ENTRY: + case GD_ALIAS_ENTRY: case GD_INDEX_ENTRY: case GD_STRING_ENTRY: tuple = Py_BuildValue("()"); Modified: trunk/getdata/src/add.c =================================================================== --- trunk/getdata/src/add.c 2012-06-27 23:16:46 UTC (rev 725) +++ trunk/getdata/src/add.c 2012-06-28 00:24:07 UTC (rev 726) @@ -453,6 +453,7 @@ for (i = 0; i < E->EN(polynom,poly_ord); ++i) copy_scalar[i] = 1; break; + case GD_ALIAS_ENTRY: case GD_INDEX_ENTRY: case GD_NO_ENTRY: _GD_InternalError(D); /* We've already verrified field_type is valid */ Modified: trunk/getdata/src/common.c =================================================================== --- trunk/getdata/src/common.c 2012-06-27 23:16:46 UTC (rev 725) +++ trunk/getdata/src/common.c 2012-06-28 00:24:07 UTC (rev 726) @@ -1180,7 +1180,7 @@ /* now we have to start all over again */ ptr = target; - if (_GD_AbsPath(target)) { + if (_GD_AbsPath(ptr)) { _GD_Root(res, target, res_root); res_len = res_root; ptr += res_root; Modified: trunk/getdata/src/del.c =================================================================== --- trunk/getdata/src/del.c 2012-06-27 23:16:46 UTC (rev 725) +++ trunk/getdata/src/del.c 2012-06-28 00:24:07 UTC (rev 726) @@ -214,6 +214,7 @@ case GD_CONST_ENTRY: case GD_CARRAY_ENTRY: case GD_INDEX_ENTRY: + case GD_ALIAS_ENTRY: break; } Modified: trunk/getdata/src/entry.c =================================================================== --- trunk/getdata/src/entry.c 2012-06-27 23:16:46 UTC (rev 725) +++ trunk/getdata/src/entry.c 2012-06-28 00:24:07 UTC (rev 726) @@ -287,6 +287,7 @@ case GD_CONST_ENTRY: case GD_CARRAY_ENTRY: case GD_INDEX_ENTRY: + case GD_ALIAS_ENTRY: break; } @@ -464,6 +465,7 @@ case GD_CARRAY_ENTRY: case GD_STRING_ENTRY: case GD_NO_ENTRY: + case GD_ALIAS_ENTRY: break; } @@ -811,6 +813,7 @@ case GD_STRING_ENTRY: case GD_INDEX_ENTRY: case GD_NO_ENTRY: + case GD_ALIAS_ENTRY: break; } Modified: trunk/getdata/src/field_list.c =================================================================== --- trunk/getdata/src/field_list.c 2012-06-27 23:16:46 UTC (rev 725) +++ trunk/getdata/src/field_list.c 2012-06-28 00:24:07 UTC (rev 726) @@ -84,9 +84,12 @@ case GD_SCALAR_ENTRIES: i = 17; break; - case GD_ALL_ENTRIES: + case GD_ALIAS_ENTRY: i = 18; break; + case GD_ALL_ENTRIES: + i = 19; + break; default: i = -1; break; @@ -98,9 +101,9 @@ /* returns true if E a member of the given list */ int _GD_ListEntry(const gd_entry_t *E, int meta, int hidden, int noalias, - unsigned int special, gd_entype_t type) + int special, gd_entype_t type) { - dtrace("%p{%s}, %i, %i, %i, %u, 0x%X", E, E->field, meta, hidden, noalias, + dtrace("%p{%s}, %i, %i, %i, %i, 0x%X", E, E->field, meta, hidden, noalias, special, type); /* check hidden */ @@ -118,10 +121,18 @@ /* aliases */ if (E->field_type == GD_ALIAS_ENTRY) { int ret = 0; + if (noalias) { dreturn("%i (alias)", 0); return 0; } + + /* that's right: GD_ALIAS_ENTRY + noalias gets you what you deserve */ + if (special == GD_ALIAS_ENTRIES) { + dreturn("%i (aliases)", 1); + return 1; + } + if (E->e->entry[0]) ret = _GD_ListEntry(E->e->entry[0], meta, hidden, 0, special, type); dreturn("%i", ret); @@ -137,6 +148,9 @@ { dreturn("%i (scalar)", 0); return 0; + } else if (special == GD_ALIAS_ENTRIES) { /* we weeded out aliases earlier */ + dreturn("%i (aliases)", 0); + return 0; } else if (type && E->field_type != type) { dreturn("%i (type)", 0); return 0; @@ -147,12 +161,12 @@ } static const char **_GD_EntryList(DIRFILE *D, struct _gd_private_entry *p, - size_t offs, unsigned int type, unsigned int flags) gd_nothrow + size_t offs, int type, unsigned int flags) gd_nothrow { char** el; int i, index; unsigned int u, n = 0; - const unsigned int special = (type & GD_SPECIAL_ENTRY_BIT) ? type : 0; + const int special = (type & GD_SPECIAL_ENTRY_BIT) ? type : 0; const gd_entype_t ctype = (type & GD_SPECIAL_ENTRY_BIT) ? GD_NO_ENTRY : (gd_entype_t)type; const int hidden = (flags & GD_ENTRIES_HIDDEN); @@ -236,14 +250,14 @@ return (const char **)el; } -const char **gd_entry_list(DIRFILE* D, const char *parent, unsigned int type, +const char **gd_entry_list(DIRFILE* D, const char *parent, int type, unsigned int flags) gd_nothrow { const char **el; size_t offs = 0; struct _gd_private_entry *p = NULL; - dtrace("%p, \"%s\", %u, %u", D, parent, type, flags); + dtrace("%p, \"%s\", %i, %u", D, parent, type, flags); if (D->flags & GD_INVALID) { _GD_SetError(D, GD_E_BAD_DIRFILE, 0, NULL, 0, NULL); Modified: trunk/getdata/src/flimits.c =================================================================== --- trunk/getdata/src/flimits.c 2012-06-27 23:16:46 UTC (rev 725) +++ trunk/getdata/src/flimits.c 2012-06-28 00:24:07 UTC (rev 726) @@ -339,6 +339,9 @@ case GD_NO_ENTRY: _GD_SetError(D, GD_E_BAD_FIELD_TYPE, GD_E_FIELD_BAD, NULL, 0, E->field); break; + case GD_ALIAS_ENTRY: + _GD_InternalError(D); + break; } D->recurse_level--; @@ -523,6 +526,7 @@ _GD_SetError(D, GD_E_DIMENSION, GD_E_DIM_CALLER, NULL, 0, E->field); break; case GD_NO_ENTRY: + case GD_ALIAS_ENTRY: _GD_InternalError(D); break; } Modified: trunk/getdata/src/flush.c =================================================================== --- trunk/getdata/src/flush.c 2012-06-27 23:16:46 UTC (rev 725) +++ trunk/getdata/src/flush.c 2012-06-28 00:24:07 UTC (rev 726) @@ -78,6 +78,7 @@ case GD_STRING_ENTRY: case GD_INDEX_ENTRY: case GD_NO_ENTRY: + case GD_ALIAS_ENTRY: break; } @@ -552,6 +553,7 @@ fputc('\n', stream); break; case GD_INDEX_ENTRY: + case GD_ALIAS_ENTRY: case GD_NO_ENTRY: _GD_InternalError(D); break; @@ -1003,7 +1005,7 @@ if (D->entry[i]->hidden) D->av &= GD_VERS_GE_9; else - switch ((int)D->entry[i]->field_type) { + switch (D->entry[i]->field_type) { case GD_RAW_ENTRY: switch (D->entry[i]->EN(raw,data_type)) { case GD_COMPLEX128: Modified: trunk/getdata/src/fpos.c =================================================================== --- trunk/getdata/src/fpos.c 2012-06-27 23:16:46 UTC (rev 725) +++ trunk/getdata/src/fpos.c 2012-06-28 00:24:07 UTC (rev 726) @@ -101,6 +101,7 @@ case GD_CONST_ENTRY: case GD_STRING_ENTRY: case GD_CARRAY_ENTRY: + case GD_ALIAS_ENTRY: _GD_InternalError(D); } @@ -296,6 +297,7 @@ case GD_CONST_ENTRY: case GD_STRING_ENTRY: case GD_CARRAY_ENTRY: + case GD_ALIAS_ENTRY: _GD_InternalError(D); } Modified: trunk/getdata/src/getdata.c =================================================================== --- trunk/getdata/src/getdata.c 2012-06-27 23:16:46 UTC (rev 725) +++ trunk/getdata/src/getdata.c 2012-06-28 00:24:07 UTC (rev 726) @@ -1944,6 +1944,7 @@ case GD_STRING_ENTRY: n_read = _GD_DoString(E, num_samp, (char *)data_out); break; + case GD_ALIAS_ENTRY: case GD_NO_ENTRY: /* Can't get here */ _GD_InternalError(D); Modified: trunk/getdata/src/getdata.h.in =================================================================== --- trunk/getdata/src/getdata.h.in 2012-06-27 23:16:46 UTC (rev 725) +++ trunk/getdata/src/getdata.h.in 2012-06-28 00:24:07 UTC (rev 726) @@ -242,16 +242,20 @@ GD_MPLEX_ENTRY = 0x0D, GD_CONST_ENTRY = GD_SCALAR_ENTRY_BIT | 0x00, GD_STRING_ENTRY = GD_SCALAR_ENTRY_BIT | 0x01, - GD_CARRAY_ENTRY = GD_SCALAR_ENTRY_BIT | 0x02 + GD_CARRAY_ENTRY = GD_SCALAR_ENTRY_BIT | 0x02, + + /* not a real entry type, but it's convenient to put this here */ + GD_ALIAS_ENTRY = -1 } gd_entype_t; -/* GD_NO_ENTRY is not part of this count */ +/* GD_NO_ENTRY and GD_ALIAS_ENTRY are not part of this count */ #define GD_N_ENTYPES 16 /* Special types for gd_nentries(3) and gd_entry_list(3) */ #define GD_ALL_ENTRIES 0 #define GD_VECTOR_ENTRIES (GD_SPECIAL_ENTRY_BIT | 0x01) #define GD_SCALAR_ENTRIES (GD_SPECIAL_ENTRY_BIT | 0x02) +#define GD_ALIAS_ENTRIES GD_ALIAS_ENTRY /* gd_nentries(3) and gd_entry_list(3) flags */ #define GD_ENTRIES_HIDDEN 0x1 @@ -688,8 +692,8 @@ extern int gd_entry(DIRFILE *dirfile, const char *field_code, gd_entry_t *entry) gd_nothrow gd_nonnull ((1, 2)); -extern const char **gd_entry_list(DIRFILE* D, const char *parent, - unsigned int type, unsigned int flags) gd_nothrow gd_nonnull ((1)); +extern const char **gd_entry_list(DIRFILE* D, const char *parent, int type, + unsigned int flags) gd_nothrow gd_nonnull ((1)); extern gd_entype_t gd_entry_type(DIRFILE *dirfile, const char *field_code) gd_nothrow gd_nonnull ((1)); @@ -850,8 +854,8 @@ extern gd_type_t gd_native_type(DIRFILE *dirfile, const char *field_code) gd_nothrow gd_nonnull ((1,2)); -extern unsigned int gd_nentries(DIRFILE *D, const char *parent, - unsigned int type, unsigned int flags) gd_nothrow gd_nonnull ((1)); +extern unsigned int gd_nentries(DIRFILE *D, const char *parent, int type, + unsigned int flags) gd_nothrow gd_nonnull ((1)); extern unsigned int gd_nfields(DIRFILE *dirfile) gd_nothrow gd_nonnull ((1)); Modified: trunk/getdata/src/internal.h =================================================================== --- trunk/getdata/src/internal.h 2012-06-27 23:16:46 UTC (rev 725) +++ trunk/getdata/src/internal.h 2012-06-28 00:24:07 UTC (rev 726) @@ -743,8 +743,8 @@ #define GD_FILE_TEMP 0x4 #define GD_FILE_TOUCH 0x8 -/* lists */ -#define GD_N_ENTRY_LISTS (GD_N_ENTYPES + 3) +/* lists -- all the entry types plus alias, scalar, vector, all */ +#define GD_N_ENTRY_LISTS (GD_N_ENTYPES + 4) #define GD_LIST_VALID_STRING_VALUE 0x01 @@ -933,9 +933,6 @@ #define GD_HAVE_VERSION 0x40000000 /* have computed the version */ #define GD_INVALID 0x80000000 /* the dirfile is invalid */ -/* aliases */ -#define GD_ALIAS_ENTRY ((gd_entype_t)-1) - /* representation suffixes */ #define GD_REPR_NONE 0 #define GD_REPR_REAL 'r' @@ -1085,7 +1082,7 @@ void _GD_LinterpData(DIRFILE *restrict, void *restrict, gd_type_t, int, const double *restrict, size_t, const struct _gd_lut *restrict, size_t); int _GD_ListEntry(const gd_entry_t *E, int meta, int hidden, int noalias, - unsigned int special, gd_entype_t type); + int special, gd_entype_t type); char *_GD_MakeFullPath(DIRFILE *restrict, int, const char *restrict, int); #define _GD_MakeFullPathOnly gd_MakeFullPathOnly char *_GD_MakeFullPathOnly(const DIRFILE *D, int dirfd, const char *name); @@ -1100,8 +1097,8 @@ 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); -unsigned int _GD_NEntries(DIRFILE *D, struct _gd_private_entry *p, - unsigned int type, unsigned int flags); +unsigned int _GD_NEntries(DIRFILE*, struct _gd_private_entry*, int, + unsigned int); DIRFILE *_GD_Open(DIRFILE*, int, const char*, unsigned long, gd_parser_callback_t, void*); gd_entry_t *_GD_ParseFieldSpec(DIRFILE *restrict, int, char**, Modified: trunk/getdata/src/legacy.c =================================================================== --- trunk/getdata/src/legacy.c 2012-06-27 23:16:46 UTC (rev 725) +++ trunk/getdata/src/legacy.c 2012-06-28 00:24:07 UTC (rev 726) @@ -449,6 +449,7 @@ Format.n_mplex++; break; case GD_NO_ENTRY: + case GD_ALIAS_ENTRY: case GD_CONST_ENTRY: case GD_CARRAY_ENTRY: case GD_INDEX_ENTRY: @@ -526,6 +527,7 @@ case GD_CONST_ENTRY: case GD_CARRAY_ENTRY: case GD_INDEX_ENTRY: + case GD_ALIAS_ENTRY: case GD_NO_ENTRY: break; } Modified: trunk/getdata/src/mod.c =================================================================== --- trunk/getdata/src/mod.c 2012-06-27 23:16:46 UTC (rev 725) +++ trunk/getdata/src/mod.c 2012-06-28 00:24:07 UTC (rev 726) @@ -894,6 +894,7 @@ /* INDEX may not be modified */ _GD_SetError(D, GD_E_BAD_FIELD_TYPE, GD_E_FIELD_BAD, NULL, 0, field_code); case GD_NO_ENTRY: + case GD_ALIAS_ENTRY: case GD_STRING_ENTRY: break; } Modified: trunk/getdata/src/native.c =================================================================== --- trunk/getdata/src/native.c 2012-06-27 23:16:46 UTC (rev 725) +++ trunk/getdata/src/native.c 2012-06-28 00:24:07 UTC (rev 726) @@ -123,6 +123,7 @@ type = GD_NULL; break; case GD_NO_ENTRY: + case GD_ALIAS_ENTRY: _GD_InternalError(D); } Modified: trunk/getdata/src/nfields.c =================================================================== --- trunk/getdata/src/nfields.c 2012-06-27 23:16:46 UTC (rev 725) +++ trunk/getdata/src/nfields.c 2012-06-28 00:24:07 UTC (rev 726) @@ -20,12 +20,12 @@ */ #include "internal.h" -unsigned int _GD_NEntries(DIRFILE *D, struct _gd_private_entry *p, - unsigned int type, unsigned int flags) +unsigned int _GD_NEntries(DIRFILE *D, struct _gd_private_entry *p, int type, + unsigned int flags) { int i; unsigned int u, n = 0; - const unsigned int special = (type & GD_SPECIAL_ENTRY_BIT) ? type : 0; + const int special = (type & GD_SPECIAL_ENTRY_BIT) ? type : 0; const gd_entype_t ctype = (type & GD_SPECIAL_ENTRY_BIT) ? GD_NO_ENTRY : (gd_entype_t)type; const int hidden = (flags & GD_ENTRIES_HIDDEN); @@ -54,7 +54,7 @@ return n; } -unsigned int gd_nentries(DIRFILE *D, const char *parent, unsigned int type, +unsigned int gd_nentries(DIRFILE *D, const char *parent, int type, unsigned int flags) gd_nothrow { unsigned int n; Modified: trunk/getdata/src/putdata.c =================================================================== --- trunk/getdata/src/putdata.c 2012-06-27 23:16:46 UTC (rev 725) +++ trunk/getdata/src/putdata.c 2012-06-28 00:24:07 UTC (rev 726) @@ -764,6 +764,7 @@ case GD_STRING_ENTRY: n_wrote = _GD_DoStringOut(D, E, (const char *)data_in); break; + case GD_ALIAS_ENTRY: case GD_NO_ENTRY: _GD_InternalError(D); break; Modified: trunk/getdata/src/spf.c =================================================================== --- trunk/getdata/src/spf.c 2012-06-27 23:16:46 UTC (rev 725) +++ trunk/getdata/src/spf.c 2012-06-28 00:24:07 UTC (rev 726) @@ -65,6 +65,7 @@ case GD_CONST_ENTRY: case GD_CARRAY_ENTRY: case GD_STRING_ENTRY: + case GD_ALIAS_ENTRY: case GD_NO_ENTRY: _GD_InternalError(D); } 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_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_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_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 Modified: trunk/getdata/test/Makefile.am =================================================================== --- trunk/getdata/test/Makefile.am 2012-06-27 23:16:46 UTC (rev 725) +++ trunk/getdata/test/Makefile.am 2012-06-28 00:24:07 UTC (rev 726) @@ -135,7 +135,7 @@ DESYNC_TESTS=desync desync_flush desync_reopen desync_reopen_inv -ELIST_TESTS=elist_alias elist_hidden elist_scalar +ELIST_TESTS=elist_alias elist_hidden elist_noalias elist_scalar ENCODE_TESTS=encode_alter encode_get encode_move @@ -228,7 +228,7 @@ name_move_alias name_updb name_updb_alias name_updb_const \ name_updb_const_alias -NENTRIES_TESTS=nentries_alias nentries_hidden nentries_scalar +NENTRIES_TESTS=nentries_alias nentries_hidden nentries_noalias nentries_scalar NFIELDS_TESTS=nfields nfields_hidden nfields_invalid nfields_type \ nfields_type_hidden nfields_type_invalid nfields_vector \ Added: trunk/getdata/test/elist_alias.c =================================================================== --- trunk/getdata/test/elist_alias.c (rev 0) +++ trunk/getdata/test/elist_alias.c 2012-06-28 00:24:07 UTC (rev 726) @@ -0,0 +1,78 @@ +/* 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 <sys/types.h> +#include <sys/stat.h> +#include <fcntl.h> +#include <stdio.h> +#include <string.h> +#include <errno.h> + +int main(void) +{ + const char *filedir = "dirfile"; + const char *format = "dirfile/format"; + const char *format_data = + "data1 RAW UINT8 1\n" + "/ALIAS data2 data1\n" + "/ALIAS data3 data4\n"; + int fd, i, error, r = 0; + const char **field_list; + 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); + field_list = gd_entry_list(D, NULL, GD_ALIAS_ENTRIES, 0); + + error = gd_error(D); + + CHECKI(error, 0); + CHECKPN(field_list); + + for (i = 0; ; ++i) { + if (field_list[i] == NULL) + break; + + if (strcmp(field_list[i], "data3") == 0) + continue; + else if (strcmp(field_list[i], "data2") == 0) + continue; + + fprintf(stderr, "field_list[%i] = \"%s\"\n", i, field_list[i]); + r = 1; + } + + CHECKI(i, 2); + + gd_close(D); + unlink(format); + rmdir(filedir); + + return r; +} Property changes on: trunk/getdata/test/elist_alias.c ___________________________________________________________________ Added: svn:eol-style + native Added: trunk/getdata/test/nentries_alias.c =================================================================== --- trunk/getdata/test/nentries_alias.c (rev 0) +++ trunk/getdata/test/nentries_alias.c 2012-06-28 00:24:07 UTC (rev 726) @@ -0,0 +1,61 @@ +/* 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 <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 = + "data1 RAW UINT8 1\n" + "/ALIAS data2 data1\n" + "/ALIAS data3 data4\n"; + int fd, error, r = 0; + unsigned int nfields; + 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); + nfields = gd_nentries(D, NULL, GD_ALIAS_ENTRIES, 0); + error =... [truncated message content] |
From: <ket...@us...> - 2012-06-29 00:29:53
|
Revision: 728 http://getdata.svn.sourceforge.net/getdata/?rev=728&view=rev Author: ketiltrout Date: 2012-06-29 00:29:46 +0000 (Fri, 29 Jun 2012) Log Message: ----------- Merge GD_E_BAD_VERSION into GD_E_ARGUMENT. Doc updates. Modified Paths: -------------- trunk/getdata/ChangeLog trunk/getdata/NEWS trunk/getdata/bindings/cxx/test/big_test.cpp trunk/getdata/bindings/f77/test/big_test.f trunk/getdata/bindings/f77/test/big_test95.f90 trunk/getdata/bindings/idl/test/big_test.pro trunk/getdata/bindings/make_parameters.c trunk/getdata/bindings/perl/test/big_test.t trunk/getdata/bindings/python/pygetdata.c trunk/getdata/bindings/python/test/big_test.py trunk/getdata/doc/README.cxx trunk/getdata/doc/README.f77 trunk/getdata/doc/README.idl trunk/getdata/man/Makefile.am trunk/getdata/man/gd_dirfile_standards.3 trunk/getdata/man/gd_entry_list.3 trunk/getdata/man/gd_nentries.3 trunk/getdata/src/errors.c trunk/getdata/src/flush.c trunk/getdata/src/getdata.h.in trunk/getdata/src/internal.h trunk/getdata/src/legacy.c Added Paths: ----------- trunk/getdata/man/gd_strtok.3 Modified: trunk/getdata/ChangeLog =================================================================== --- trunk/getdata/ChangeLog 2012-06-28 00:25:11 UTC (rev 727) +++ trunk/getdata/ChangeLog 2012-06-29 00:29:46 UTC (rev 728) @@ -1,3 +1,7 @@ +2012-06-29 D. V. Wiebe <ge...@ke...> svn:728 + * src/getdata.h.in src/internal.h src/errors.c: Merge GD_E_BAD_VERSION into + GD_E_ARGUMENT. + 2012-06-28 D. V. Wiebe <ge...@ke...> svn:725,726 * util/checkdirfile.c: Find and report dangling aliases. Modified: trunk/getdata/NEWS =================================================================== --- trunk/getdata/NEWS 2012-06-28 00:25:11 UTC (rev 727) +++ trunk/getdata/NEWS 2012-06-29 00:29:46 UTC (rev 728) @@ -227,13 +227,14 @@ * 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 (O_CREAT | - O_EXCL) GetData will now return the new error GD_E_EXISTS if the dirfile + * 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 and GD_E_BAD_PROTECTION have been - combined into a more generic error code: GD_E_ARGUMENT. The old symbols are - retained for backwards compatibility. + * 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. * 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). Modified: trunk/getdata/bindings/cxx/test/big_test.cpp =================================================================== --- trunk/getdata/bindings/cxx/test/big_test.cpp 2012-06-28 00:25:11 UTC (rev 727) +++ trunk/getdata/bindings/cxx/test/big_test.cpp 2012-06-29 00:29:46 UTC (rev 728) @@ -1265,7 +1265,7 @@ CHECK_OK2(157,1); CHECK_INT(157,n,9); d->Standards(0); - CHECK_ERROR2(157,2,GD_E_BAD_VERSION); + CHECK_ERROR2(157,2,GD_E_ARGUMENT); // 158 gd_get_carray n = d->GetCarray("carray", Float64, p); Modified: trunk/getdata/bindings/f77/test/big_test.f =================================================================== --- trunk/getdata/bindings/f77/test/big_test.f 2012-06-28 00:25:11 UTC (rev 727) +++ trunk/getdata/bindings/f77/test/big_test.f 2012-06-29 00:29:46 UTC (rev 728) @@ -1608,7 +1608,7 @@ n = 0 CALL GDSTDV(n, d) - CALL CHKER2(ne, 157, 2, d, GD_EVR) + CALL CHKER2(ne, 157, 2, d, GD_EAR) C 158: GDGTCA check CALL GDGTCA(d, 'carray', 6, GD_F64, p) Modified: trunk/getdata/bindings/f77/test/big_test95.f90 =================================================================== --- trunk/getdata/bindings/f77/test/big_test95.f90 2012-06-28 00:25:11 UTC (rev 727) +++ trunk/getdata/bindings/f77/test/big_test95.f90 2012-06-29 00:29:46 UTC (rev 728) @@ -1751,7 +1751,7 @@ call check_int(ne, 157, n, 9) n = fgd_dirfile_standards(d, 0) - call check_err2(ne, 157, 2, d, GD_E_BAD_VERSION) + call check_err2(ne, 157, 2, d, GD_E_ARGUMENT) ! 158: gd_get_carray_slice (INT8) call fgd_get_carray_i1(d, "carray", 0, 0, ci1) Modified: trunk/getdata/bindings/idl/test/big_test.pro =================================================================== --- trunk/getdata/bindings/idl/test/big_test.pro 2012-06-28 00:25:11 UTC (rev 727) +++ trunk/getdata/bindings/idl/test/big_test.pro 2012-06-29 00:29:46 UTC (rev 728) @@ -1026,7 +1026,7 @@ nume += check_ok2(157, 1, d) nume += check_simple(157, n, 9) n = gd_dirfile_standards(d, 0) -nume += check_error2(157, 2, d, !GD.E_BAD_VERSION) +nume += check_error2(157, 2, d, !GD.E_ARGUMENT) ; 158: gd_get_carray n = gd_get_carray(d, "carray", type=!GD.FLOAT32) Modified: trunk/getdata/bindings/make_parameters.c =================================================================== --- trunk/getdata/bindings/make_parameters.c 2012-06-28 00:25:11 UTC (rev 727) +++ trunk/getdata/bindings/make_parameters.c 2012-06-29 00:29:46 UTC (rev 728) @@ -89,7 +89,6 @@ CONSTANT(E_UNCLEAN_DB, "GD_UCL", 0), CONSTANT(E_DOMAIN, "GD_EDO", 0), CONSTANT(E_BAD_REPR, "GD_ERP", 0), - CONSTANT(E_BAD_VERSION, "GD_EVR", 0), CONSTANT(E_FLUSH, "GD_EFL", 0), CONSTANT(E_BOUNDS, "GD_EBO", 0), CONSTANT(E_LINE_TOO_LONG, "GD_ETL", 0), @@ -97,6 +96,7 @@ CONSTANT(E_OPEN_INCLUDE, "GD_EOI", 0), /* deprecated */ CONSTANT(E_BAD_ENDIANNESS, "GD_EEN", 0), /* deprecated */ CONSTANT(E_BAD_PROTECTION, "GD_EBP", 0), /* deprecated */ + CONSTANT(E_BAD_VERSION, "GD_EVR", 0), /* deprecated */ CONSTANT(RDONLY, "GD_RO", 1), CONSTANT(RDWR, "GD_RW", 1), Modified: trunk/getdata/bindings/perl/test/big_test.t =================================================================== --- trunk/getdata/bindings/perl/test/big_test.t 2012-06-28 00:25:11 UTC (rev 727) +++ trunk/getdata/bindings/perl/test/big_test.t 2012-06-29 00:29:46 UTC (rev 728) @@ -1328,7 +1328,7 @@ CheckNum2(157, 2, $s, $GetData::DIRFILE_STANDARDS_VERSION); $s = $_->dirfile_standards(0); -CheckError2(157, 3, $GetData::E_BAD_VERSION); +CheckError2(157, 3, $GetData::E_ARGUMENT); CheckNum2(157, 4, $s, undef); # 158: get_carray Modified: trunk/getdata/bindings/python/pygetdata.c =================================================================== --- trunk/getdata/bindings/python/pygetdata.c 2012-06-28 00:25:11 UTC (rev 727) +++ trunk/getdata/bindings/python/pygetdata.c 2012-06-29 00:29:46 UTC (rev 728) @@ -49,13 +49,13 @@ "BadReference", "Protected", "Deletion", - "BadArgument", + "Argument", "Callback", "Exists", "UncleanDatabase", "Domain", "BadRepr", - "BadVersion", + NULL, "Flush", "Bounds", "LineTooLong" Modified: trunk/getdata/bindings/python/test/big_test.py =================================================================== --- trunk/getdata/bindings/python/test/big_test.py 2012-06-28 00:25:11 UTC (rev 727) +++ trunk/getdata/bindings/python/test/big_test.py 2012-06-29 00:29:46 UTC (rev 728) @@ -1325,7 +1325,7 @@ try: d.standards = 0 except: - CheckException2(157,2,pygetdata.BadVersionError) + CheckException2(157,2,pygetdata.ArgumentError) # 158: gd_get_carray try: Modified: trunk/getdata/doc/README.cxx =================================================================== --- trunk/getdata/doc/README.cxx 2012-06-28 00:25:11 UTC (rev 727) +++ trunk/getdata/doc/README.cxx 2012-06-29 00:29:46 UTC (rev 728) @@ -218,8 +218,8 @@ * const void *Dirfile::Constants(GetData::DataType type = Float64) * int Dirfile::Delete(const char *field_code, int flags = 0) * int Dirfile::DeleteAlias(const char* field_code, int flags = 0) -* const char **Dirfile::EntryList(const char *parent = NULL, - unsigned int type = 0, unsigned int flags = 0) +* const char **Dirfile::EntryList(const char *parent = NULL, int type = 0, + unsigned int flags = 0) * const char **Dirfile::FieldList() * const char **Dirfile::FieldListByType(GetData::EntryType type) * unsigned long Dirfile::Flags(unsigned long set = 0, unsigned long reset = 0) @@ -256,8 +256,8 @@ * const char **Dirfile::MVectorList(const char *parent) * int Dirfile::NAliases(const char* field_code) * DataType Dirfile::NativeType(const char *field_code) -* unsigned int Dirfile::NEntries(const char *parent = NULL, - unsigned int type = 0, unsigned int flags = 0) +* unsigned int Dirfile::NEntries(const char *parent = NULL, int type = 0, + unsigned int flags = 0) * unsigned int Dirfile::NFields() * unsigned int Dirfile::NFieldsByType(GetData::EntryType type) * off_t Dirfile::NFrames() Modified: trunk/getdata/doc/README.f77 =================================================================== --- trunk/getdata/doc/README.f77 2012-06-28 00:25:11 UTC (rev 727) +++ trunk/getdata/doc/README.f77 2012-06-29 00:29:46 UTC (rev 728) @@ -1998,7 +1998,7 @@ GD_ETL GD_E_LINE_TOO_LONG GD_ETR GD_E_TRUNC GD_EUE GD_E_UNKNOWN_ENCODING - GD_EVR GD_E_BAD_VERSION + GD_EVR GD_E_BAD_VERSION Deprecated; kept as an alias for GD_EAR. GD_UCL GD_E_UNCLEAN_DB GD_UNS GD_E_UNSUPPORTED Modified: trunk/getdata/doc/README.idl =================================================================== --- trunk/getdata/doc/README.idl 2012-06-28 00:25:11 UTC (rev 727) +++ trunk/getdata/doc/README.idl 2012-06-29 00:29:46 UTC (rev 728) @@ -591,16 +591,17 @@ This function returns a GD_ENTRY structure containing the field metadata for the field specified by 'field_code'. See gd_entry(3). -FUNCTION GD_ENTRY_LIST(dirfile_unit, /HIDDEN, /NOALIAS, PARENT=parent, /SCALARS, - TYPE=type, /VECTORS) +FUNCTION GD_ENTRY_LIST(dirfile_unit, /ALIASES, /HIDDEN, /NOALIAS, PARENT=parent, + /SCALARS, TYPE=type, /VECTORS) This function returns a list of entry names defined by the dirfile. If PARENT is given, a list of metafields for the given parent will be returned otherwise top-level fields are considered. If TYPE is given, which should be one of the !GD.*_ENTRY constants, only fields of the given type will be returned. If - /SCALARS or /VECTORS is specified, the TYPE parameter is ignored if it is also - given. The list returned includes aliases, unless /NOALIAS is specified, but - not hidden fields, unless /HIDDEN is specified. See gd_entry_list(3). + /ALIASES, /SCALARS or /VECTORS is specified, the TYPE parameter is ignored if + it is also given. The list returned includes aliases, unless /NOALIAS is + specified, but not hidden fields, unless /HIDDEN is specified. See + gd_entry_list(3). FUNCTION GD_ENTRY_TYPE(dirfile_unit, field_code) @@ -783,19 +784,18 @@ The return value will be one of the data type constants: !GD.UINT8, !GD.INT8, &c. See gd_native_type(3). -FUNCTION GD_NENTRIES(dirfile_unit, /HIDDEN, /NOALIAS, PARENT=parent, /SCALARS, - TYPE=type, /VECTORS) +FUNCTION GD_NENTRIES(dirfile_unit, /ALIAS, /HIDDEN, /NOALIAS, PARENT=parent, + /SCALARS, TYPE=type, /VECTORS) This function returns the number of entries in the dirfile satisfying the given criteria. If PARENT is given, the number of metafields for the given parent will be returned otherwise top-level fields are considered. If TYPE is given, which should be one of the !GD.*_ENTRY constants, only fields of the - given type will be counted. If /SCALARS or /VECTORS is specified, the TYPE - parameter is ignored if it is also given. The number returned includes - aliases, unless /NOALIAS is specified, but not hidden fields, unless /HIDDEN - is specified. See gd_nentries(3). + given type will be counted. If /ALIASES, /SCALARS or /VECTORS is specified, + the TYPE parameter is ignored if it is also given. The number returned + includes aliases, unless /NOALIAS is specified, but not hidden fields, unless + /HIDDEN is specified. See gd_nentries(3). - FUNCTION GD_NFIELDS(dirfile_unit, /HIDDEN, /NOALIAS, PARENT=parent, /SCALARS, TYPE=type, /VECTORS) Modified: trunk/getdata/man/Makefile.am =================================================================== --- trunk/getdata/man/Makefile.am 2012-06-28 00:25:11 UTC (rev 727) +++ trunk/getdata/man/Makefile.am 2012-06-29 00:29:46 UTC (rev 728) @@ -44,9 +44,9 @@ gd_protection.3 gd_put_carray_slice.3 gd_put_constant.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_tell.3 gd_tell64.3 \ - gd_uninclude.3 gd_validate.3 gd_verbose_prefix.3 dirfile.5 \ - dirfile-encoding.5 dirfile-format.5 + gd_seek64.3 gd_spf.3 gd_strings.3 gd_strtok.3 gd_tell.3 \ + gd_tell64.3 gd_uninclude.3 gd_validate.3 gd_verbose_prefix.3 \ + dirfile.5 dirfile-encoding.5 dirfile-format.5 # these are real_file:alias MAN3ALIASES=gd_add_bit.3:gd_add_carray.3 gd_add_bit.3:gd_add_clincom.3 \ Modified: trunk/getdata/man/gd_dirfile_standards.3 =================================================================== --- trunk/getdata/man/gd_dirfile_standards.3 2012-06-28 00:25:11 UTC (rev 727) +++ trunk/getdata/man/gd_dirfile_standards.3 2012-06-29 00:29:46 UTC (rev 728) @@ -1,6 +1,6 @@ .\" gd_dirfile_standards.3. The gd_dirfile_standards man page. .\" -.\" Copyright (C) 2010 D. V. Wiebe +.\" Copyright (C) 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_dirfile_standards 3 "15 October 2010" "Version 0.7.0" "GETDATA" +.TH gd_dirfile_standards 3 "29 June 2012" "Version 0.8.0" "GETDATA" .SH NAME gd_dirfile_standards \(em change or report the current Dirfile Standards Version for a DirFile @@ -93,12 +93,12 @@ error value, and the current Standards Version is not changed. Possible error values are: .TP 8 +.B GD_E_ARGUMENT +The loaded dirfile did not conform to the specified version. Or the dirfile +conforms to no known Standards Version. +.TP .B GD_E_BAD_DIRFILE The supplied dirfile was invalid. -.TP -.B GD_E_BAD_VERSION -The loaded dirfile did not conform to the specified version. Or the dirfile -conforms to no known Standards Version. .PP The dirfile error may be retrieved by calling .BR gd_error (3). Modified: trunk/getdata/man/gd_entry_list.3 =================================================================== --- trunk/getdata/man/gd_entry_list.3 2012-06-28 00:25:11 UTC (rev 727) +++ trunk/getdata/man/gd_entry_list.3 2012-06-29 00:29:46 UTC (rev 728) @@ -13,7 +13,7 @@ .\" Texts. A copy of the license is included in the `COPYING.DOC' file .\" as part of this distribution. .\" -.TH gd_entry_list 3 "1 April 2012" "Version 0.8.0" "GETDATA" +.TH gd_entry_list 3 "28 June 2012" "Version 0.8.0" "GETDATA" .SH NAME gd_entry_list, gd_field_list, gd_field_list_by_type gd_mfield_list, gd_mfield_list_by_type, gd_mvector_list, gd_vector_list \(em list field entries in a dirfile @@ -73,14 +73,18 @@ field) or else one of the following special symbols: .TP .B GD_ALL_ENTRIES \fR(= 0) -Count entries of all types. +List entries of all types. .TP +.B GD_ALIAS_ENTRIES +List only aliases. This is the only way to get a list including aliases which +do not point to valid field codes. +.TP .B GD_SCALAR_ENTRIES -Count only scalar field types +List only scalar field types .RB ( CONST ", " CARRAY ", " STRING ). .TP .B GD_VECTOR_ENTRIES -Count only vector field types (all field types except the scalar field types +List only vector field types (all field types except the scalar field types listed above). .PP The Modified: trunk/getdata/man/gd_nentries.3 =================================================================== --- trunk/getdata/man/gd_nentries.3 2012-06-28 00:25:11 UTC (rev 727) +++ trunk/getdata/man/gd_nentries.3 2012-06-29 00:29:46 UTC (rev 728) @@ -13,7 +13,7 @@ .\" Texts. A copy of the license is included in the `COPYING.DOC' file .\" as part of this distribution. .\" -.TH gd_nentries 3 "1 April 2012" "Version 0.8.0" "GETDATA" +.TH gd_nentries 3 "28 June 2012" "Version 0.8.0" "GETDATA" .SH NAME gd_nentries, gd_nfields, gd_nfields_by_type gd_nmfields, gd_nmfields_by_type, gd_nmvectors, gd_nvectors \(em count field entries in a dirfile @@ -75,6 +75,10 @@ .B GD_ALL_ENTRIES \fR(= 0) Count entries of all types. .TP +.B GD_ALIAS_ENTRIES +Count only aliases. This is the only way to get a count including aliases which +do not point to valid field codes. +.TP .B GD_SCALAR_ENTRIES Count only scalar field types .RB ( CONST ", " CARRAY ", " STRING ). Added: trunk/getdata/man/gd_strtok.3 =================================================================== --- trunk/getdata/man/gd_strtok.3 (rev 0) +++ trunk/getdata/man/gd_strtok.3 2012-06-29 00:29:46 UTC (rev 728) @@ -0,0 +1,97 @@ +.\" gd_strtok.3. The gd_strtok 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_strtok 3 "28 June 2012" "Version 0.8.0" "GETDATA" +.SH NAME +gd_strtok \(em tokenise a string using the GetData parser +.SH SYNOPSIS +.B #include <getdata.h> +.HP +.nh +.ad l +.BI "char *gd_strtok(DIRFILE *" dirfile ", const char *" string ); +.hy +.ad n +.SH DESCRIPTION +The +.BR gd_strtok () +function parses a string into a series of tokens according to the rules of the +Dirfile metadata syntax (see dirfile-format(5)). The first time +.BR gd_strtok () +is called, the string to be parsed should be passed in +.IR string . +The first token will be returned. In subsequent calls to parse the same string, +.I string +should be NULL (as with +.BR strtok (3)). +Each time +.BR gd_strtok () +is called like this, the next token is returned. + +Operation of the Dirfile tokeniser varies between Dirfile Standards Versions. +The Standards Version used is the current Version of the loaded DIRFILE +.IR dirfile . +Use +.BR gd_dirfile_standards (3) +to retrieve or change this value. Changing the Standards Version of +.I dirfile +while parsing a string will affect the parsing of subsequent tokens, but does +not affect tokens already returned. A copy of the string is cached in the +.I dirfile +object. Calling +.BR gd_strtok () +with different +.IR dirfile s +will parse different strings. + +.SH RETURN VALUE +Upon successful completion, +.BR gd_strtok () +returns a copy of the first token (if +.I string +is non-NULL), or the subsequent token. The token strings returned are each +allocated with +.BR malloc (3) +and should be deallocated by the caller when no longer needed using +.BR free (3). +.PP +If no more tokens are available, or if an error occurred, NULL is returned. +If an error has occurred, it will also set the dirfile error a non-zero error +value. Possible error values are: +.TP 8 +.B GD_E_ALLOC +A memory allocation error occurred. +.TP +.B GD_E_ARGUMENT +There was no string to parse (i.e. +.I string +was NULL, but no previous call specified a string to parse). +.TP +.B GD_E_BAD_DIRFILE +The supplied dirfile was invalid. +.TP +.B GD_E_FORMAT +A syntax error was found in the string. +.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_dirfile_standards (3), +.BR gd_open (3), +.BR dirfile-format (5) Modified: trunk/getdata/src/errors.c =================================================================== --- trunk/getdata/src/errors.c 2012-06-28 00:25:11 UTC (rev 727) +++ trunk/getdata/src/errors.c 2012-06-29 00:29:46 UTC (rev 728) @@ -176,6 +176,10 @@ { GD_E_ARGUMENT, GD_E_ARG_PROTECTION, "Invalid protection level specified", 0 }, { GD_E_ARGUMENT, GD_E_ARG_NODATA, "No data", 0 }, + { GD_E_ARGUMENT, GD_E_ARG_NO_VERS, "Dirfile conforms to no Standards Version", + 0 }, + { GD_E_ARGUMENT, GD_E_ARG_BAD_VERS, + "Dirfile does not conform to specified Standards Version", 0 }, { GD_E_ARGUMENT, 0, "Bad argument", 0 }, /* GD_E_CALLBACK: 3 = response */ { GD_E_CALLBACK, 0, "Unrecognised response from callback function: {3}", 0 }, @@ -193,11 +197,6 @@ { GD_E_BAD_REPR, GD_E_REPR_UNKNOWN, "Unknown field representation: .{4}", 0 }, { GD_E_BAD_REPR, GD_E_REPR_PUT, "Unable to write to field reprentation: .{4}", 0 }, - /* GD_E_BAD_VERSION 3 = version */ - { GD_E_BAD_VERSION, GD_E_VERS_NONE, - "Dirfile conforms to no Standards Version", 0 }, - { GD_E_BAD_VERSION, GD_E_VERS_MISSING, - "Dirfile does not conform to Standards Version {3}", 0 }, /* GD_E_FLUSH: 3 = suberror, 4 = filename */ { GD_E_FLUSH, GD_E_FLUSH_MKTMP, "I/O error creating temporary file: ", 1 }, { GD_E_FLUSH, GD_E_FLUSH_OPEN, "I/O error opening temporary file: ", 1 }, Modified: trunk/getdata/src/flush.c =================================================================== --- trunk/getdata/src/flush.c 2012-06-28 00:25:11 UTC (rev 727) +++ trunk/getdata/src/flush.c 2012-06-29 00:29:46 UTC (rev 728) @@ -1167,8 +1167,8 @@ if (vers < 0 || vers > GD_DIRFILE_STANDARDS_VERSION || ~D->av & (1ULL << vers)) { - _GD_SetError(D, GD_E_BAD_VERSION, (D->av == 0) ? GD_E_VERS_NONE : - GD_E_VERS_MISSING, NULL, vers, NULL); + _GD_SetError(D, GD_E_ARGUMENT, (D->av == 0) ? GD_E_ARG_NO_VERS : + GD_E_ARG_BAD_VERS, NULL, vers, NULL); dreturn("%i", -1); return -1; } Modified: trunk/getdata/src/getdata.h.in =================================================================== --- trunk/getdata/src/getdata.h.in 2012-06-28 00:25:11 UTC (rev 727) +++ trunk/getdata/src/getdata.h.in 2012-06-29 00:29:46 UTC (rev 728) @@ -157,7 +157,7 @@ #define GD_E_UNCLEAN_DB 30 #define GD_E_DOMAIN 31 #define GD_E_BAD_REPR 32 -#define GD_E_BAD_VERSION 33 +/* unused 33 */ #define GD_E_FLUSH 34 #define GD_E_BOUNDS 35 #define GD_E_LINE_TOO_LONG 36 @@ -168,6 +168,7 @@ #define GD_E_OPEN_INCLUDE GD_E_OPEN_FRAGMENT #define GD_E_BAD_ENDIANNESS GD_E_ARGUMENT #define GD_E_BAD_PROTECTION GD_E_ARGUMENT +#define GD_E_BAD_VERSION GD_E_ARGUMENT #define GD_MAX_LINCOM 3 Modified: trunk/getdata/src/internal.h =================================================================== --- trunk/getdata/src/internal.h 2012-06-28 00:25:11 UTC (rev 727) +++ trunk/getdata/src/internal.h 2012-06-29 00:29:46 UTC (rev 728) @@ -728,14 +728,14 @@ #define GD_E_UNENC_UNDET 1 #define GD_E_UNENC_TARGET 2 -#define GD_E_VERS_NONE 1 -#define GD_E_VERS_MISSING 2 - #define GD_E_ARG_WHENCE 1 #define GD_E_ARG_ENDIANNESS 2 #define GD_E_ARG_PROTECTION 3 #define GD_E_ARG_NODATA 4 +#define GD_E_ARG_NO_VERS 5 +#define GD_E_ARG_BAD_VERS 6 + /* I/O flags */ #define GD_FILE_READ 0x1 #define GD_FILE_WRITE 0x2 Modified: trunk/getdata/src/legacy.c =================================================================== --- trunk/getdata/src/legacy.c 2012-06-28 00:25:11 UTC (rev 727) +++ trunk/getdata/src/legacy.c 2012-06-29 00:29:46 UTC (rev 728) @@ -76,7 +76,7 @@ NULL, /* GD_E_UNCLEAN_DB */ "Improper domain", /* GD_E_DOMAIN */ "Bad representation", /* GD_E_BAD_REPR */ - NULL, /* GD_E_BAD_VERSION */ + NULL, /* unused */ NULL, /* GD_E_FLUSH */ NULL, /* GD_E_BOUNDS */ "Line too long", /* GD_E_LINE_TOO_LONG */ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ket...@us...> - 2012-06-29 22:00:55
|
Revision: 731 http://getdata.svn.sourceforge.net/getdata/?rev=731&view=rev Author: ketiltrout Date: 2012-06-29 22:00:49 +0000 (Fri, 29 Jun 2012) Log Message: ----------- C89-ify Modified Paths: -------------- trunk/getdata/bindings/f77/fgetdata.h trunk/getdata/src/name.c trunk/getdata/test/version_9_strict.c Modified: trunk/getdata/bindings/f77/fgetdata.h =================================================================== --- trunk/getdata/bindings/f77/fgetdata.h 2012-06-29 20:58:30 UTC (rev 730) +++ trunk/getdata/bindings/f77/fgetdata.h 2012-06-29 22:00:49 UTC (rev 731) @@ -728,6 +728,22 @@ void F77_FUNC(gdentn, GDENTN) (char *name, int32_t *name_l, const int32_t *dirfile, const char *parent, const int32_t *parent_l, const int32_t *type, const int32_t *flags, const int32_t *field_num); + +void F77_FUNC(gdgewd, GDGEWD) (char *in_field, int32_t *in_field_l, + char *check_field, int32_t *check_field_l, int32_t *windop, + int32_t *ithreshold, double *rthreshold, int32_t *fragment_index, + const int32_t *dirfile, const char *field_code, + const int32_t *field_code_l); + +void F77_FUNC(gdecnt, GDECNT) (int32_t *error_count, const int32_t *dirfile); + +void F77_FUNC(gdtoke, GDTOKE) (char *toke, int32_t *toke_l, + const int32_t *dirfile, const char *string, const int32_t *string_l); + +void F77_FUNC(gdgemx, GDGEMX) (char *in_field, int32_t *in_field_l, + 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); #ifdef __cplusplus } #endif Modified: trunk/getdata/src/name.c =================================================================== --- trunk/getdata/src/name.c 2012-06-29 20:58:30 UTC (rev 730) +++ trunk/getdata/src/name.c 2012-06-29 22:00:49 UTC (rev 731) @@ -366,10 +366,6 @@ } } - /* gotta update those aliases ... */ - for (u = 0; u < D->n_entries; ++u) - if (D->entry[u] != E && D->entry[u]->field_type == GD_ALIAS_ENTRY) - dreturn("%p", list); return list; } Modified: trunk/getdata/test/version_9_strict.c =================================================================== --- trunk/getdata/test/version_9_strict.c 2012-06-29 20:58:30 UTC (rev 730) +++ trunk/getdata/test/version_9_strict.c 2012-06-29 22:00:49 UTC (rev 731) @@ -35,29 +35,29 @@ const char *format2 = "dirfile/format2"; const char *data = "dirfile/ar"; const char *format_data = - "/VERSION 8\n" // 0 - "/INCLUDE format1\n" // 1 - "w WINDOW INDEX INDEX SET 0x1\n"; // 2 + "/VERSION 8\n" /* 0 */ + "/INCLUDE format1\n" /* 1 */ + "w WINDOW INDEX INDEX SET 0x1\n"; /* 2 */ const char *format1_data = "\n\n\n" - "/VERSION 9\n" // 3 - "/INCLUDE format2 A Z\n" // 4 - "/INCLUDE format2 A.Z\n" // 5 - "Xr RAW COMPLEX128 0xA\n" // 6 - "Xy POLYNOM INDEX 8 055 0xAE 2\n" // 7 - "ar WINDOW AdZ INDEX SET 0x1\n" // 8 - "AINDEXZ PHASE INDEX 0\n" // 9 - "/HIDDEN Xy\n"; // 10 + "/VERSION 9\n" /* 3 */ + "/INCLUDE format2 A Z\n" /* 4 */ + "/INCLUDE format2 A.Z\n" /* 5 */ + "Xr RAW COMPLEX128 0xA\n" /* 6 */ + "Xy POLYNOM INDEX 8 055 0xAE 2\n" /* 7 */ + "ar WINDOW AdZ INDEX SET 0x1\n" /* 8 */ + "AINDEXZ PHASE INDEX 0\n" /* 9 */ + "/HIDDEN Xy\n"; /* 10 */ const char *format2_data = "\n\n\n" "\n\n\n\n\n\n\n\n" - "c RAW UINT8 1\n" // 11 - "/HIDDEN c\n" // 12 - "/REFERENCE c\n" // 13 - "/VERSION 8\n" // 14 - "d PHASE INDEX 0\n" // 15 - "d/c CONST FLOAT64 1\n" // 16 - "/META d d CONST FLOAT64 1\n"; // 17 + "c RAW UINT8 1\n" /* 11 */ + "/HIDDEN c\n" /* 12 */ + "/REFERENCE c\n" /* 13 */ + "/VERSION 8\n" /* 14 */ + "d PHASE INDEX 0\n" /* 15 */ + "d/c CONST FLOAT64 1\n" /* 16 */ + "/META d d CONST FLOAT64 1\n"; /* 17 */ uint16_t c[8]; int ll[NLINES]; unsigned char data_data[256]; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ket...@us...> - 2012-06-30 01:38:00
|
Revision: 732 http://getdata.svn.sourceforge.net/getdata/?rev=732&view=rev Author: ketiltrout Date: 2012-06-30 01:37:54 +0000 (Sat, 30 Jun 2012) Log Message: ----------- Fix gd_off64_t. Improve Perl dependency tracking. Modified Paths: -------------- trunk/getdata/ChangeLog trunk/getdata/README trunk/getdata/bindings/perl/Build.PL.in trunk/getdata/cmake/CMakeLists.txt trunk/getdata/configure.ac trunk/getdata/src/getdata.h.in Modified: trunk/getdata/ChangeLog =================================================================== --- trunk/getdata/ChangeLog 2012-06-29 22:00:49 UTC (rev 731) +++ trunk/getdata/ChangeLog 2012-06-30 01:37:54 UTC (rev 732) @@ -1,3 +1,9 @@ +2012-06-30 D. V. Wiebe <ge...@ke...> svn:732 + * src/getdata.h.in configure.ac cmake/CMakeLists.txt: Fix definition of + gd_off64_t. + + * bindings/perl/Build.PL.in: make getdata.h a dependency of lib/GetData.xs. + 2012-06-29 D. V. Wiebe <ge...@ke...> svn:728 * src/getdata.h.in src/internal.h src/errors.c: Merge GD_E_BAD_VERSION into GD_E_ARGUMENT. Modified: trunk/getdata/README =================================================================== --- trunk/getdata/README 2012-06-29 22:00:49 UTC (rev 731) +++ trunk/getdata/README 2012-06-30 01:37:54 UTC (rev 732) @@ -57,6 +57,7 @@ - Fortran 95 (libf95getdata) - Python (pygetdata) - the Interactive Data Language (IDL; idl_getdata) + - Perl (GetData.pm) Documentation for the various bindings, if present, can be found in files named `README.<language>' in the doc/ directory. The C interface is described Modified: trunk/getdata/bindings/perl/Build.PL.in =================================================================== --- trunk/getdata/bindings/perl/Build.PL.in 2012-06-29 22:00:49 UTC (rev 731) +++ trunk/getdata/bindings/perl/Build.PL.in 2012-06-30 01:37:54 UTC (rev 732) @@ -13,6 +13,8 @@ if ($source eq "lib/GetData.xs") { return 0 if (not $self->up_to_date("lib/simple_funcs.xs", $derived)); + return 0 if (not $self->up_to_date("@top_builddir@/src/getdata.h", + $derived)); } return $self->SUPER::up_to_date($source, $derived); } Modified: trunk/getdata/cmake/CMakeLists.txt =================================================================== --- trunk/getdata/cmake/CMakeLists.txt 2012-06-29 22:00:49 UTC (rev 731) +++ trunk/getdata/cmake/CMakeLists.txt 2012-06-30 01:37:54 UTC (rev 732) @@ -42,7 +42,6 @@ # MSVCRT integer types set(DEFINE_gd_int64_t "#define gd_int64_t __int64") set(DEFINE_gd_uint64_t "#define gd_uint64_t unsigned __int64") - set(DEFINE_gd_off64_t "#define gd_off64_t __int64") add_definitions(-D_CRT_SECURE_NO_WARNINGS -D_CRT_NONSTDC_NO_WARNINGS) add_definitions( Modified: trunk/getdata/configure.ac =================================================================== --- trunk/getdata/configure.ac 2012-06-29 22:00:49 UTC (rev 731) +++ trunk/getdata/configure.ac 2012-06-30 01:37:54 UTC (rev 732) @@ -679,27 +679,16 @@ dnl Assume we have the entire LFS defined transitional API AC_DEFINE([HAVE_OFF64_T], [1], [ Define to 1 if the system has the type `off64_t'. ]) dnl ` - define_lf64s="#ifndef _LARGEFILE64_SOURCE -#define _LARGEFILE64_SOURCE -#endif -" - gd_off64_t="off64_t" -elif test $ac_cv_sizeof_off_t -eq 8;then - gd_off64_t="off_t" -else - gd_off64_t=$gd_int64_t fi DEFINE_gd_int16_t="# define gd_int16_t $gd_int16_t"; DEFINE_gd_uint16_t="# define gd_uint16_t $gd_uint16_t"; DEFINE_gd_int64_t="# define gd_int64_t $gd_int64_t"; DEFINE_gd_uint64_t="# define gd_uint64_t $gd_uint64_t"; -DEFINE_gd_off64_t="$define_lf64s# define gd_off64_t $gd_off64_t"; AC_SUBST([DEFINE_gd_int16_t]) AC_SUBST([DEFINE_gd_uint16_t]) AC_SUBST([DEFINE_gd_int64_t]) AC_SUBST([DEFINE_gd_uint64_t]) -AC_SUBST([DEFINE_gd_off64_t]) dnl library functions echo Modified: trunk/getdata/src/getdata.h.in =================================================================== --- trunk/getdata/src/getdata.h.in 2012-06-29 22:00:49 UTC (rev 731) +++ trunk/getdata/src/getdata.h.in 2012-06-30 01:37:54 UTC (rev 732) @@ -1092,7 +1092,13 @@ #endif #ifdef GD_64BIT_API -@DEFINE_gd_off64_t@ +#ifdef __off64_t_defined +typedef __off64_t gd_off64_t; +#elif (defined _FILE_OFFSET_BITS && _FILE_OFFSET_BITS == 64) +typedef off_t gd_off64_t; +#else +typedef gd_int64_t gd_off64_t; +#endif extern int gd_alter_frameoffset64(DIRFILE *dirfile, gd_off64_t offset, int fragment, int recode) gd_nonnull ((1)); 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] |
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-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-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: <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-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-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-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-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-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-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-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 16:27:36
|
Revision: 761 http://getdata.svn.sourceforge.net/getdata/?rev=761&view=rev Author: ketiltrout Date: 2012-08-15 16:27:29 +0000 (Wed, 15 Aug 2012) Log Message: ----------- isfinite(3) for MSDN. Modified Paths: -------------- trunk/getdata/cmake/CMakeLists.txt trunk/getdata/configure.ac trunk/getdata/test/test.h Modified: trunk/getdata/cmake/CMakeLists.txt =================================================================== --- trunk/getdata/cmake/CMakeLists.txt 2012-08-15 08:01:07 UTC (rev 760) +++ trunk/getdata/cmake/CMakeLists.txt 2012-08-15 16:27:29 UTC (rev 761) @@ -49,6 +49,7 @@ -D_USE_MATH_DEFINES -DHAVE__CHSIZE -DHAVE__COMMIT + -DHAVE__FINITE -DHAVE__FSTAT64 -DHAVE__GETCWD -DHAVE__ISNAN Modified: trunk/getdata/configure.ac =================================================================== --- trunk/getdata/configure.ac 2012-08-15 08:01:07 UTC (rev 760) +++ trunk/getdata/configure.ac 2012-08-15 16:27:29 UTC (rev 761) @@ -705,13 +705,13 @@ echo "*** Looking for additional library functions" echo AC_CHECK_FUNCS([basename _chsize _chsize_s _commit fchmod _fdopen fdopendir \ - fpathconf fseeko fseeko64 _fstat fstat64 _fstat64 fstatat \ - fstatat64 fsync ftello ftello64 ftruncate ftruncate64 getcwd \ - _getcwd getdelim gmtime_r isnan _isnan lseek64 _lseeki64 lstat \ - lstat64 _mkdir mkfifo nan _open openat pathconf _read \ - readdir_r readlink renameat _rmdir snprintf _snprintf stat64 \ - _stat64 _strtoi64 strtoll _strtoui64 strtoull _unlink unlinkat \ - _write]) + _finite fpathconf fseeko fseeko64 _fstat fstat64 _fstat64 \ + fstatat fstatat64 fsync ftello ftello64 ftruncate ftruncate64 \ + getcwd _getcwd getdelim gmtime_r isfinite isnan _isnan lseek64 \ + _lseeki64 lstat lstat64 _mkdir mkfifo nan _open openat \ + pathconf _read readdir_r readlink renameat _rmdir snprintf \ + _snprintf stat64 _stat64 _strtoi64 strtoll _strtoui64 strtoull \ + _unlink unlinkat _write]) if test "x$disable_c99" = "xno"; then AC_CHECK_FUNCS([cabs]) fi Modified: trunk/getdata/test/test.h =================================================================== --- trunk/getdata/test/test.h 2012-08-15 08:01:07 UTC (rev 760) +++ trunk/getdata/test/test.h 2012-08-15 16:27:29 UTC (rev 761) @@ -34,6 +34,10 @@ #define isnan _isnan #endif +#if defined HAVE__FINITE && ! defined HAVE_ISFINITE +#define isfinite _finite +#endif + /* System call kludge for Win32 */ #if defined __MSVCRT__ && defined MSYS_SHELL #include <process.h> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ket...@us...> - 2012-08-15 18:28:36
|
Revision: 762 http://getdata.svn.sourceforge.net/getdata/?rev=762&view=rev Author: ketiltrout Date: 2012-08-15 18:28:24 +0000 (Wed, 15 Aug 2012) Log Message: ----------- Fix isfinite check. Modified Paths: -------------- trunk/getdata/configure.ac trunk/getdata/test/get_uint64.c trunk/getdata/test/table.c trunk/getdata/test/test.h Modified: trunk/getdata/configure.ac =================================================================== --- trunk/getdata/configure.ac 2012-08-15 16:27:29 UTC (rev 761) +++ trunk/getdata/configure.ac 2012-08-15 18:28:24 UTC (rev 762) @@ -562,7 +562,7 @@ echo AC_CHECK_HEADERS([asm/unaligned.h Availability.h byteswap.h direct.h fcntl.h \ float.h inttypes.h io.h libgen.h libkern/OSByteOrder.h \ - stddef.h stdint.h sys/endian.h sys/file.h sys/param.h \ + math.h stddef.h stdint.h sys/endian.h sys/file.h sys/param.h \ sys/stat.h sys/types.h sys/wait.h unistd.h]) if test "x$disable_c99" = "xno"; then AC_CHECK_HEADERS([complex.h]) @@ -707,7 +707,7 @@ AC_CHECK_FUNCS([basename _chsize _chsize_s _commit fchmod _fdopen fdopendir \ _finite fpathconf fseeko fseeko64 _fstat fstat64 _fstat64 \ fstatat fstatat64 fsync ftello ftello64 ftruncate ftruncate64 \ - getcwd _getcwd getdelim gmtime_r isfinite isnan _isnan lseek64 \ + getcwd _getcwd getdelim gmtime_r isnan _isnan lseek64 \ _lseeki64 lstat lstat64 _mkdir mkfifo nan _open openat \ pathconf _read readdir_r readlink renameat _rmdir snprintf \ _snprintf stat64 _stat64 _strtoi64 strtoll _strtoui64 strtoull \ @@ -745,6 +745,12 @@ [ Define to 1 if the `mkdir' function takes only one argument.]) fi dnl` +AC_CHECK_DECLS([isfinite],,, + [ +#ifdef HAVE_MATH_H +#include <math.h> +#endif +]) AC_CHECK_DECLS([bswap16, bswap_16, OSSwapInt16],,, [ #ifdef HAVE_BYTESWAP_H Modified: trunk/getdata/test/get_uint64.c =================================================================== --- trunk/getdata/test/get_uint64.c 2012-08-15 16:27:29 UTC (rev 761) +++ trunk/getdata/test/get_uint64.c 2012-08-15 18:28:24 UTC (rev 762) @@ -62,7 +62,7 @@ CHECKI(error, 0); CHECKI(n, 8); for (i = 0; i < 8; ++i) - CHECKUi(i,c[i],0x5000000000000028 + i * 0x0200000000000001); + CHECKUi(i,c[i],0x5000000000000028U + i * 0x0200000000000001U); gd_close(D); Modified: trunk/getdata/test/table.c =================================================================== --- trunk/getdata/test/table.c 2012-08-15 16:27:29 UTC (rev 761) +++ trunk/getdata/test/table.c 2012-08-15 18:28:24 UTC (rev 762) @@ -32,7 +32,6 @@ const char *filedir = "dirfile"; const char *format = "dirfile/format"; const char *format_data = "linterp LINTERP INDEX table\n"; - unsigned char data_data[256]; int fd, error, r = 0; char *path; DIRFILE *D; Modified: trunk/getdata/test/test.h =================================================================== --- trunk/getdata/test/test.h 2012-08-15 16:27:29 UTC (rev 761) +++ trunk/getdata/test/test.h 2012-08-15 18:28:24 UTC (rev 762) @@ -34,7 +34,8 @@ #define isnan _isnan #endif -#if defined HAVE__FINITE && ! defined HAVE_ISFINITE +#if defined HAVE__FINITE && \ + (! defined HAVE_DECL_ISFINITE || HAVE_DECL_ISFINITE == 0) #define isfinite _finite #endif This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |